From nobody Sun Oct 15 02:13:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7P0j33R4z4xXcL; Sun, 15 Oct 2023 02:13: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 4S7P0j2YYwz3bFf; Sun, 15 Oct 2023 02:13:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697335989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IesMAGKIJivX4fHqnhncz720k/4B/qXW5Xslfv4KUM0=; b=F5W8CC97RO8sYdM400s0z9/NfEC0KTE/YbKAviB0XLrWXlzdndNw9fFbGSFtJgLhFTRfNe c6u4+o4UU/RLMrEwZnwysyC9xY1NaNvzxIjlOUlIcYWzLNXAzQiexdKU0BJmtlRBSVsQpO vOQnCeyWiVPxXIogz2yJgsH7wLCqBGRrwSVF4kqdp1JVG1s3EHYu9dniFuUzHEdiY1Wjee 1oAFwYLe7aKHgLJ/CtZjbqIl2cHu8o1eXQg/T54ZrLBGqRHjp6p5wPjQV/169FDOBfgSN0 LHRbNOjB6BDTdHgHe01Vi4n3dibuWcZHMeN9ThwhDCfIFqXNUwgGStBdL7JiFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697335989; a=rsa-sha256; cv=none; b=ugPIc7H+Ni6cclFntr4CeucyoS8HBtry6htIdbZbgfI35jS5cEZenlkrBSL2VxtYGhLDoD RJL/CQCEkStKqC3DML/bgcbZ3YNpxy9c6Fu1tbTH4vd3Hxr0PQAa40tUiEXs6hJWXu6aEl J+a7EENa7Vj/ix8itrYivwNkAO490rBqMiQv1CLzdUYFPrhcQaZEZsPxhkxgyANHj2+e7s DRET4YhS27/PFy1s5yElyy4iW8Z64F6xyFiT/eCeRJTCGIF2Npft7vvrQuKMFJbzdvZjQI 6LVpQ8HOco7hUg2ZsVZ3QEqs8atk3msYV5gXOpdKdDlG4YNv4U12XLtcLwbNWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697335989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IesMAGKIJivX4fHqnhncz720k/4B/qXW5Xslfv4KUM0=; b=Ht5+UOjgtlwJ225b+TeJps7/QxlfNUkGoPIFyOkqhN5Znrq2R/SnAlOUr9PbE+Yi1neUMj 0sbivSOiBxu3xt/rRa5HdxHVGoYC2XklrcD1jHhTr7YRkOqK0Ychh+3Z4VuQxFaKkrluiM iCXM7cjJn8x+mq2ahj65ySYBQ9mFObDKACb8relx0jW2/f2rlvqG9z+4vPTUTT2O5Gmkt1 KrSb7GsVsm4caOjkKl662SQuiGqICnZq7H2HNUohPYLb6Shky1BMO9+umExPO6dHMtu+ST i8Z1q46BOjw84dhZE6dmKRkFX0HBJci/Q+46GyhcY16F1V6Bpu8IH+80ifYPgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7P0j1cdLzvcW; Sun, 15 Oct 2023 02:13: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 39F2D9b3059475; Sun, 15 Oct 2023 02:13:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39F2D9vl059472; Sun, 15 Oct 2023 02:13:09 GMT (envelope-from git) Date: Sun, 15 Oct 2023 02:13:09 GMT Message-Id: <202310150213.39F2D9vl059472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 0022bd418e6c - releng/14.0 - fusefs: sanitize FUSE_READLINK results for embedded NULs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0022bd418e6c0c7c767a296a3e0d3782e5137dce Auto-Submitted: auto-generated The branch releng/14.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0022bd418e6c0c7c767a296a3e0d3782e5137dce commit 0022bd418e6c0c7c767a296a3e0d3782e5137dce Author: Alan Somers AuthorDate: 2023-10-04 18:48:01 +0000 Commit: Alan Somers CommitDate: 2023-10-15 02:13:05 +0000 fusefs: sanitize FUSE_READLINK results for embedded NULs If VOP_READLINK returns a path that contains a NUL, it will trigger an assertion in vfs_lookup. Sanitize such paths in fusefs, rejecting any and warning the user about the misbehaving server. PR: 274268 Sponsored by: Axcient Approved by: gjb (re) Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D42081 (cherry picked from commit 662ec2f781521c36b76af748d74bb0a3c2e27a76) (cherry picked from commit 8fca98f6881fdd68a786f4366c345159ab0df408) --- sys/fs/fuse/fuse_ipc.h | 1 + sys/fs/fuse/fuse_vnops.c | 7 +++++++ tests/sys/fs/fusefs/readlink.cc | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 27f3662741c5..0ec556138be0 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -239,6 +239,7 @@ struct fuse_data { #define FSESS_WARN_CACHE_INCOHERENT 0x200000 /* Read cache incoherent */ #define FSESS_WARN_WB_CACHE_INCOHERENT 0x400000 /* WB cache incoherent */ #define FSESS_WARN_ILLEGAL_INODE 0x800000 /* Illegal inode for new file */ +#define FSESS_WARN_READLINK_EMBEDDED_NUL 0x1000000 /* corrupt READLINK output */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 21ee378b24c6..3249e5988801 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2007,6 +2007,13 @@ fuse_vnop_readlink(struct vop_readlink_args *ap) if (err) { goto out; } + if (strnlen(fdi.answ, fdi.iosize) + 1 < fdi.iosize) { + struct fuse_data *data = fuse_get_mpdata(vnode_mount(vp)); + fuse_warn(data, FSESS_WARN_READLINK_EMBEDDED_NUL, + "Returned an embedded NUL from FUSE_READLINK."); + err = EIO; + goto out; + } if (((char *)fdi.answ)[0] == '/' && fuse_get_mpdata(vnode_mount(vp))->dataflags & FSESS_PUSH_SYMLINKS_IN) { char *mpth = vnode_mount(vp)->mnt_stat.f_mntonname; diff --git a/tests/sys/fs/fusefs/readlink.cc b/tests/sys/fs/fusefs/readlink.cc index ff9aa08f6fae..30815f2cd4b6 100644 --- a/tests/sys/fs/fusefs/readlink.cc +++ b/tests/sys/fs/fusefs/readlink.cc @@ -79,6 +79,45 @@ TEST_F(Readlink, eloop) EXPECT_EQ(ELOOP, errno); } +/* + * If a malicious or buggy server returns a NUL in the FUSE_READLINK result, it + * should be handled gracefully. + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274268 + */ +TEST_F(Readlink, embedded_nul) +{ + const char FULLPATH[] = "mountpoint/src"; + const char RELPATH[] = "src"; + const char dst[] = "dst\0stuff"; + char buf[80]; + const uint64_t ino = 42; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.attr.mode = S_IFLNK | 0777; + out.body.entry.nodeid = ino; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = UINT64_MAX; + }))); + + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_READLINK && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).WillRepeatedly(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + memcpy(out.body.str, dst, sizeof(dst)); + out.header.len = sizeof(out.header) + sizeof(dst) + 1; + }))); + + EXPECT_EQ(-1, readlink(FULLPATH, buf, sizeof(buf))); + EXPECT_EQ(EIO, errno); + EXPECT_EQ(-1, access(FULLPATH, R_OK)); + EXPECT_EQ(EIO, errno); +} + TEST_F(Readlink, ok) { const char FULLPATH[] = "mountpoint/src"; From nobody Sun Oct 15 13:16:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7gjx6Wdfz4wwd7; Sun, 15 Oct 2023 13:16: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 4S7gjx5lmqz3T3K; Sun, 15 Oct 2023 13:16:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697375781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3O6WXam/aHMYL8ZMCAwDAxG9odkmJnHx87c/ZnyJB4=; b=nKsktBGGJDqYZVeY8kziko7lYQymOae4t5ZrPDLg8WDgJJxKP8dQDxd7GO4S7IMqKXtNbj cRK8mF0fSCbp7gV7va4AN3CJtx5G0Gq814ouDf3T4SHfELlphPASVtvt5HAw+RlGJC00Sl L08pR7WdfGD/k4IDIB75Eb07i0i7ya0Ij8W0pfw15p1ojLOh/ddnZHtWleoQA1FsV+KyDA SQ0S+IGdedIdeZpXSX7I58dY0OlMnolSSfW/f0tEEXlCip9xrLHFRkhxpQ9rLA4+fdSQRq FvPDhE3ekAQfdeJtld/vxIDZ50cN2DgBt1HMD2Wc+NyPP7fdQbH02l8CKnB+9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697375781; a=rsa-sha256; cv=none; b=vomSJ0cl9cauNtgr6MKffcB/4xeGm1/z9F3PbctK3bFmvsULiBUZKVp1JtIe+elaKsAmwU f8p8ZnPbJgQyUA6ZdHhnBPXjHjifvrjWgxDVl/6cxLWzk0p22zzxzpuhaurJ6Nvoa11cmo kjL7tSbE9b0RunUoMYl16uT1y+r4X0t32wOOUCJigYOt4wByoAqonY6lSWwVka16x55M1J AfDhs3dM7WM2vt0d7DvA0xuUOYjgXd2tugmColrhaedW5xDkvO2LeVLdtcAvWTEvpIQtYA GOo+wvH7L2/EKGH0NHagkux9lwOekQBNhkqDoWW0i906MXY5MZnvTBTBo3zdiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697375781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3O6WXam/aHMYL8ZMCAwDAxG9odkmJnHx87c/ZnyJB4=; b=lW6C33E5UJiGVMzZ2VmSxWFsGCY93TQatNhe0bUp8fVin7EjG/Gs79dTwCfWaedCm480x+ H7X0vJ4uSSDyIgEmnAJTzqTp0cyLGTmUjgYNS/MFAkzkblUyqwhtLKwbM1O2Nxp8sfywoS IvrhrS9iIicPpEMl9m95rAIp76ldqCiYa5US0wI4cEIEM25EaCfI9wIDib4xhmGsL/GpdJ tIjMCnN+kKvDuTOKxtLdIrqRIp6XB0loS1P+EJ4zJEyEw+4C+iABzNV28NGKsRHE6kAhKu s+WzovGsH5jwYIysaYwiSgssZqVxNF9z4dTtrd2SmAMlc7N/Qu9n91eJ0MYv8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7gjx4p8zz1CxB; Sun, 15 Oct 2023 13:16: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 39FDGL3C059449; Sun, 15 Oct 2023 13:16:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39FDGLsa059446; Sun, 15 Oct 2023 13:16:21 GMT (envelope-from git) Date: Sun, 15 Oct 2023 13:16:21 GMT Message-Id: <202310151316.39FDGLsa059446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 630daf68d5bd - releng/14.0 - mrsas: Fix callout locking in mrsas_complete_cmd() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 630daf68d5bd73136e981610449bf094ca00a4a3 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=630daf68d5bd73136e981610449bf094ca00a4a3 commit 630daf68d5bd73136e981610449bf094ca00a4a3 Author: Mark Johnston AuthorDate: 2023-10-07 00:31:03 +0000 Commit: Mark Johnston CommitDate: 2023-10-15 13:16:12 +0000 mrsas: Fix callout locking in mrsas_complete_cmd() callout_stop() requires the associated lock to be held. This is a bit hacky, but I believe it's safe since the subsequent mrsas_cmd_done() call will also acquire the SIM lock to stop a different callout. Approved by: re (gjb) PR: 265484 Reviewed by: imp Tested by: Jérémie Jourdin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39559 (cherry picked from commit 4640df1b0a49697840b81f6bcd269a483514c6aa) (cherry picked from commit 29de7af6ee47a3a251763e4220203a0d960ea532) --- sys/dev/mrsas/mrsas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 1241f44761c4..e362d4b455fc 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1732,11 +1732,13 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex) data_length = r1_cmd->io_request->DataLength; sense = r1_cmd->sense; } + mtx_lock(&sc->sim_lock); r1_cmd->ccb_ptr = NULL; if (r1_cmd->callout_owner) { callout_stop(&r1_cmd->cm_callout); r1_cmd->callout_owner = false; } + mtx_unlock(&sc->sim_lock); mrsas_release_mpt_cmd(r1_cmd); mrsas_atomic_dec(&sc->fw_outstanding); mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, From nobody Sun Oct 15 13:19:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7gnS1nsCz4wwkW; Sun, 15 Oct 2023 13:19: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 4S7gnS1MCXz3TKq; Sun, 15 Oct 2023 13:19:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697375964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhtpQh32UVpRtYhggTOLdnw1vOCP4XT3V6fNW4tXYos=; b=BXwGWUPy8ZAbeXuBkamCW9uuUek1BrLFFGCjJIbKrl7R/yUyKDZYyLBZnvz71XaS5JdSid CzJIk1WQOutpyPr4fBzIq36Wdvv+Rqs507efMyGq+XjjWOzD7sGpvjMXehiqGNNwdGWcnI Ajb5E5sxzn5Tk7DwqKTljc6yrjoLVlea78A99g+Xs6IrhmkfllKpNx9clUb4fxP9pzP+/1 g8t3vWzTcHhRGeq7CHNVgQkIh8AFmjZdUB9l+qkE+OHrF2/xJYZ+ApqCh5qN4uD9Mv8uJq fRdmjQ+9z1CblZPHyGLqgJR66P3EwBrrDvcvIKIFgCysNH+H5DTk9l2Su/D1kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697375964; a=rsa-sha256; cv=none; b=kadHk5h2+815VkcOwKlr8/Vb+wDk3RSvU2iDrLgIRSNFzDQu3gxyaTFGuulTDdS5JmHCi0 pq/h1S03R+/XwBEmkPhBakI4MF2isaoXhknltSnWf9hnOjX3O3oNI6P/IN5AmGKAxi1cJF cpLY1qORHOKrnLVsyW7Mn2wtPRORdqSn9+GT/0MD5vINJXbpEjwBkm4O/YIw6qIgLWAUlP X4TSrg7H1URpST/L97Huq+7X7q4Da7pa/hplC/JEyn+zRHFXPsyYtjNdS2XGfNyUpfpskB kQ7z1BRS82u1D1LeRLPePi7oQp9qqFPFS4b5jHEf+QCz8KNSfG3dKvZoClHJog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697375964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhtpQh32UVpRtYhggTOLdnw1vOCP4XT3V6fNW4tXYos=; b=SMlqKps8zrBKmWOMx0assb3K3Omcgal4qIqdXInn6o7W2dvgtQHnszp3SPxutvnAOJ9XfP p1mux8hv7c3Yc6AGBeymBXCSB5cXXIOqElOIsTU1PL6fHbrS9HAtuBK04U7kAgMwy71ILQ 1EcfWFIU6LgvnvHW/D+YPoAuBBrcrDEd14/EkDDXyCYcnUs/SMhqzIEZv2ciOiDIpg1dT6 F4f/CbV8YsZLq5y8M8BLMDd+n/0/pmkED+vcqcqTY4BoWn0FfrFejN1mQJQlHkoNtWdKJP eD4VJe92oCeFQ5vWOvHRftsASsZVRaIBMNIsGdW9+85NpW4/OBm6pfnQMi/6uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7gnS0Jt2z1Crb; Sun, 15 Oct 2023 13:19: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 39FDJNrR060064; Sun, 15 Oct 2023 13:19:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39FDJNSW060061; Sun, 15 Oct 2023 13:19:23 GMT (envelope-from git) Date: Sun, 15 Oct 2023 13:19:23 GMT Message-Id: <202310151319.39FDJNSW060061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: ec3864cc6861 - stable/13 - fusefs: sanitize FUSE_READLINK results for embedded NULs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ec3864cc68617edb106724a6d423b47ec455e31b Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ec3864cc68617edb106724a6d423b47ec455e31b commit ec3864cc68617edb106724a6d423b47ec455e31b Author: Alan Somers AuthorDate: 2023-10-04 18:48:01 +0000 Commit: Alan Somers CommitDate: 2023-10-15 13:02:07 +0000 fusefs: sanitize FUSE_READLINK results for embedded NULs If VOP_READLINK returns a path that contains a NUL, it will trigger an assertion in vfs_lookup. Sanitize such paths in fusefs, rejecting any and warning the user about the misbehaving server. PR: 274268 Sponsored by: Axcient Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D42081 (cherry picked from commit 662ec2f781521c36b76af748d74bb0a3c2e27a76) --- sys/fs/fuse/fuse_ipc.h | 1 + sys/fs/fuse/fuse_vnops.c | 7 +++++++ tests/sys/fs/fusefs/readlink.cc | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 27f3662741c5..0ec556138be0 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -239,6 +239,7 @@ struct fuse_data { #define FSESS_WARN_CACHE_INCOHERENT 0x200000 /* Read cache incoherent */ #define FSESS_WARN_WB_CACHE_INCOHERENT 0x400000 /* WB cache incoherent */ #define FSESS_WARN_ILLEGAL_INODE 0x800000 /* Illegal inode for new file */ +#define FSESS_WARN_READLINK_EMBEDDED_NUL 0x1000000 /* corrupt READLINK output */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 8fa60ff95d4c..988e7aa3278e 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2022,6 +2022,13 @@ fuse_vnop_readlink(struct vop_readlink_args *ap) if (err) { goto out; } + if (strnlen(fdi.answ, fdi.iosize) + 1 < fdi.iosize) { + struct fuse_data *data = fuse_get_mpdata(vnode_mount(vp)); + fuse_warn(data, FSESS_WARN_READLINK_EMBEDDED_NUL, + "Returned an embedded NUL from FUSE_READLINK."); + err = EIO; + goto out; + } if (((char *)fdi.answ)[0] == '/' && fuse_get_mpdata(vnode_mount(vp))->dataflags & FSESS_PUSH_SYMLINKS_IN) { char *mpth = vnode_mount(vp)->mnt_stat.f_mntonname; diff --git a/tests/sys/fs/fusefs/readlink.cc b/tests/sys/fs/fusefs/readlink.cc index ff9aa08f6fae..30815f2cd4b6 100644 --- a/tests/sys/fs/fusefs/readlink.cc +++ b/tests/sys/fs/fusefs/readlink.cc @@ -79,6 +79,45 @@ TEST_F(Readlink, eloop) EXPECT_EQ(ELOOP, errno); } +/* + * If a malicious or buggy server returns a NUL in the FUSE_READLINK result, it + * should be handled gracefully. + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274268 + */ +TEST_F(Readlink, embedded_nul) +{ + const char FULLPATH[] = "mountpoint/src"; + const char RELPATH[] = "src"; + const char dst[] = "dst\0stuff"; + char buf[80]; + const uint64_t ino = 42; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.attr.mode = S_IFLNK | 0777; + out.body.entry.nodeid = ino; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = UINT64_MAX; + }))); + + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_READLINK && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).WillRepeatedly(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + memcpy(out.body.str, dst, sizeof(dst)); + out.header.len = sizeof(out.header) + sizeof(dst) + 1; + }))); + + EXPECT_EQ(-1, readlink(FULLPATH, buf, sizeof(buf))); + EXPECT_EQ(EIO, errno); + EXPECT_EQ(-1, access(FULLPATH, R_OK)); + EXPECT_EQ(EIO, errno); +} + TEST_F(Readlink, ok) { const char FULLPATH[] = "mountpoint/src"; From nobody Sun Oct 15 17:15:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7n1x4LhRz4xB8B; Sun, 15 Oct 2023 17:15: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 4S7n1x3r5Mz4WcB; Sun, 15 Oct 2023 17:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JVHwEkWci3UCFxUuzBnVVXS3YqQwRwTqF88YD/80EI=; b=NDuQI0/xIWEpBGQ8fBekDutjJxnpmUq5jKKqc3oVYjIGrCFPvoYDhay1FxXWw9xQYSVdOT GHWZ5nAoEGbV4rwGURa/SXh9+dadfoFP8sqMUCiK6MK+vvbMqbQWViNkeU+sjRGW7L7A69 FT+dJem6JmB9AWwEOpw8VmAaC+vSSwDTyeSa3o6GQA6GddXqqAiCQ64PezN6+RDEt/zW+7 1J9Ly7ygcLqRDsL5WcLh+RZqUKb/g5+2LR91TaowsNTJydpP8ogsyijIukFmzAT47rn+s9 2/7QP8rTv0vivc2kqxcjEv6wKrf0MFagvWIHrz3zJm+0YI7jW/PSvcJZGjT8uA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697390133; a=rsa-sha256; cv=none; b=F4XwPZUpEfM3LTqX/vHcWEkdFLGvjwAX38e7mmE3WNpgLsi1ngicee2ESB9fjRPLbPDGoJ 9Ay311VlEMNWaS+2dJDYcccXc/qPbxxBWTr7uCQERQDS8Ghs32PYAOIj8d7oJwMguJUvqw RhFhiXJ4Jhe7YFkdLKk/mREA9DgPnGDCmNoOjfQSPFlPx9lO2AnYGAVOSyY7RuL49H6Tlf rNWaM8lijmoYlyr52Wk1vyjTVu8bz7Q7Vw0S/vFAKva28vU35bFvgtLzUNhwBNmo2SvhaC 8TL0z9lMiQLsWa5DfBX/WbfBhsp9772jGoIWl2JkdcY72kLGuYArVkEk7JaK5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JVHwEkWci3UCFxUuzBnVVXS3YqQwRwTqF88YD/80EI=; b=jEkvYnEc1IiVPDBAgLhbx8Ksn6Q4RU9Mymd+Unqs3V72fhzsm6S9XaApZIqeiLANn6VuVj Rzl4sOJtnQt4PEYG0+/tJ1cM9LI68Vcmx6nD3TacSHrzzwodRluZdLJbXEaqZcKLDuPid0 p9HMuxGE4+T/QU68GYph0YinTeOMMspUAOBbTaW5FkacD9vywcckR1eBKhHiW/3upfIgBp w8u5QynJ1Y8UekhaSod0ILMWLWoVVAvcB8EZKUqsqw8XMxzIFnOAAy4YpQggfndWhC6EIs C2kxJmoz5qY4iVR1Z9EOL3gsmKmrEvpz2L6QznwOa/Cn717PoXWx2yYoV55QPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7n1x2wGQz1KmL; Sun, 15 Oct 2023 17:15: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 39FHFXCL059574; Sun, 15 Oct 2023 17:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39FHFXsO059572; Sun, 15 Oct 2023 17:15:33 GMT (envelope-from git) Date: Sun, 15 Oct 2023 17:15:33 GMT Message-Id: <202310151715.39FHFXsO059572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 80496f42b6a9 - stable/14 - releng-azure: Use port name to install Azure CLI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 80496f42b6a9c13664f6228602fd21bf7a4500a5 Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=80496f42b6a9c13664f6228602fd21bf7a4500a5 commit 80496f42b6a9c13664f6228602fd21bf7a4500a5 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:39:11 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-15 17:14:49 +0000 releng-azure: Use port name to install Azure CLI To overcome package name changing on default Python version updates. Approved by: gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41453 (cherry picked from commit 0fe6998d8ad0bf54c237c8f513bf00cab547b561) --- release/Makefile.azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index ba996bc15ac6..528371ad076e 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -38,7 +38,7 @@ azure-check-depends: . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf . endif - env ASSUME_ALWAYS_YES=yes pkg install -y py38-azure-cli + env ASSUME_ALWAYS_YES=yes pkg install -y sysutils/py-azure-cli . else env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/sysutils/py-azure-cli BATCH=1 all install clean . endif From nobody Sun Oct 15 17:15:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7n1y56yVz4xB8H; Sun, 15 Oct 2023 17:15: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 4S7n1y4hV4z4WsP; Sun, 15 Oct 2023 17:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yADFmQzaKyAb8wCZKGxRarLfGFjXTLj8LJK+t+3w+Y=; b=I12jtKs73HN6VAYU8OQDkriBmxCxc+aLPxNuAP3xs0yIqIa+Yrqr4NsKSHhqnJ0Xd71yCy KvsYRxc9MjPM8LZAbP5UXLYJP0VQPMVodpr13j77oIP8w1CtK3SiR14x/oO6fhZNr3f23x ajf9SftnijFdXy1iM9GV1V9nLkP/9UODWY2QhVGjzth81yMA6sLniV2JF3ZoMwj6yKDBLu 9ZWGjm9eMEAEZNWW6foAUB88noNIi6hO40bZh3gq2AkQa1bBYNnPhwb1c/VBrPJcPjkrPn HxHfaUCE7CSTzEB8Ky1lJi2nxewgiGUGadBlA6w9tTksYTJXnygJOH6oUjQHIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697390134; a=rsa-sha256; cv=none; b=NNdiX/v8IJzA1blAr2kU7EG5Bf2x+9SjgfrS7dCH7uxCb/NZki4kL5Ynq2ZRbHZNTe8jF4 CLr889QTSqLI88blbLu42uDisKUr4c1Bcvtno0fm3W4jyCjIQJ62kc8KXdxChZDLxqkQ5R rKGHcVO1F0vBGbbWyiHk5SpPMP5F1XYVgJxNhosXzk0rkkDlPDSeaSpNQbf/kf04i4/9qo 1uiWN0p186YUSOaa2mFOWiZ3L+ionZvEVJ0ErBPoVDGs/Aw+05yA48sYdHq3eqKw89cQzj kpOHwcQSHTP08SRsmfTfgMziHUJdGKCZHRErSriV6+w+cFVy6TNmNlMh15dGHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yADFmQzaKyAb8wCZKGxRarLfGFjXTLj8LJK+t+3w+Y=; b=AGVq30TveSKm8Fxw667Y4ZtMWkI169rAkWofNJvrdqHpjzcmNVwGV1r9PEB0koNL6VzCft U5wDYdjPtJ+wR8mBIDmNbsq88snyEh5zilxvN7T5RhclEHMnadUGkPNZ99ZN18/c8RzPpb JiEkXjyR9qF//uOlmdnA5SnXzAeOqki/Zmml5ds7RjTrsqJKqPGWe1lYH6+1QPEt2FgcFC 7Xf9gYLgJf1VH7/KLDJQylvOhYvCHqoC1PwQCVVJNgeCMkXIBw/1mDIM77Rs0yygNEg9al qZu9YBOBATpGbIdHlqN6tfRsxg1YWSsp8SP/MBi8bKL7ms1QLOTiFxfwf6OKXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7n1y3mQNz1KpZ; Sun, 15 Oct 2023 17:15: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 39FHFYZ2059633; Sun, 15 Oct 2023 17:15:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39FHFYFo059630; Sun, 15 Oct 2023 17:15:34 GMT (envelope-from git) Date: Sun, 15 Oct 2023 17:15:34 GMT Message-Id: <202310151715.39FHFYFo059630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 1e7218e33974 - stable/14 - releng-azure: Add ZFS support to Azure image buliding and uploading List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e7218e33974089234841420bb69777a29a91c61 Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=1e7218e33974089234841420bb69777a29a91c61 commit 1e7218e33974089234841420bb69777a29a91c61 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:40:39 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-15 17:14:56 +0000 releng-azure: Add ZFS support to Azure image buliding and uploading Approved by: gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41454 (cherry picked from commit 78f901dcbd84ccad3849a8029f2320cf97079856) --- release/Makefile.azure | 18 +++++++++++------- release/Makefile.vm | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 528371ad076e..a8f59282a09c 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -4,7 +4,6 @@ # Makefile for uploading Microsoft Azure disk images. # -AZURE_IMG?= ${.OBJDIR}/azure.vhdf AZURE_UPLOAD_TGTS= azure-check-depends \ azure-do-upload CLEANFILES+= ${AZURE_UPLOAD_TGTS} @@ -19,8 +18,6 @@ AZURE${VAR}!= grep -E '^AZURE${VAR}' ${AZURE_UPLOAD_CONF} | awk -F ' ' '{print $ SNAPSHOT_DATE!= date +-${BUILDDATE} .endif -AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} - START_DATE!= date -v-1d -I -u EXPIRY_DATE!= date -v+1m -I -u @@ -44,14 +41,18 @@ azure-check-depends: . endif .endif -azure-do-upload: +.for _FS in ${AZURE_FSLIST} +AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf +AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE} + +azure-do-upload-${_FS}: /usr/local/bin/az storage blob upload \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --container-name ${AZURE_STORAGE} --type page \ - --file ${AZURE_IMG} --name ${AZURE_TARGET}.vhd + --file ${AZURE_IMG_${_FS}} --name ${AZURE_TARGET_${_FS}}.vhd @echo "The disk access URL with shared access signature is:" @echo - @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET}.vhd? + @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET_${_FS}}.vhd? @/usr/local/bin/az storage container generate-sas \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --name ${AZURE_STORAGE} \ @@ -67,5 +68,8 @@ azure-do-upload: @echo @echo /usr/local/bin/az storage blob delete \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ - --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET}.vhd + --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET_${_FS}}.vhd @echo +.endfor + +azure-do-upload: azure-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index 09e31e3c0b6f..e1bba5271a4c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -23,7 +23,7 @@ CLOUDWARE_TYPES?= BASIC-CI \ OCI \ VAGRANT AZURE_FORMAT= vhdf -AZURE_FSLIST= ufs +AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs From nobody Sun Oct 15 17:15:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S7n1z63kNz4xBTg; Sun, 15 Oct 2023 17:15: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 4S7n1z5b2Mz4Wll; Sun, 15 Oct 2023 17:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeWOxtYde6RzI7w8aHm1yBYeUnApzzvAIsFfHdvDnBQ=; b=a754Iuj4NJjavXMozsoZJGpXCcHtXk7A1GywaIJYvHzZvTFKXHZBX/BfpP3v/JFqZ+ryz/ +2fIpaq2srMMvfj/Pn8lnlCcOyLvOD3FeNNPDQsLIn+K02GKrMJWqM5JgdXDVeMxxIg3Or GDrUPwPJXJJ8xqwN7soNTZmW4vGTYrsT4CA4yr+tuEs0T+FqSu/H1uOYftwVt08v7iyvmM +PrfHGvVZ1AgnTlDoxLru6/jMVLMLrU5iRinLcWSccRg0Ohp19p0cfPCajulIPjPZJH0Ni FPZcaHE0easNhSJM141aUlaP38lnd8xrtGxbZsv3N394+8tIVkeOy4+H3Pr2qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697390135; a=rsa-sha256; cv=none; b=gw6cX6uGp3qetT/22M/rLAfW+48Iay6vHi1/OM+O/3foggpdekiyfExkYRzxD2uyYb94Gp mywWItwYF2syel/+6gM4EswZpXj/sr2zfgA/EYsHtqMh0tzZyXGBKeU57EOFjiJvptFzqe nIP3V+scgxxZTYQKJPfMznMzeWAwMbF67JYtImfEdPBoscCvDUvD9do/FLRGivu35Q73eL Gbia64qt69CG5KdFxO7bSVZ+Ux+Ku8GoG4qn7es1jl/wpFVcxCnpH9fiRvTQN30Rn+RGUq qFNeIGbgWGjxlkzkcoOjeDTsEIPjXmc3BH5eptZipIbnDbuJZxPXHaIcnP5nYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697390135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeWOxtYde6RzI7w8aHm1yBYeUnApzzvAIsFfHdvDnBQ=; b=U817kUpCxKisz+FOWdemrJ7zp+ZmvGBHO7KbScF3Cmdh6SRjPZhZkRjh32U26JJHO/4Wy9 JWEq0ofpFSzaUZdkKVKHOlqiMwcNXd1RCwy5TUrgSXW4GdClMflZ7NNpD1V3rtNU4UI4HV UAKlxamaiC6DPNmyFViVz+MgzOU831TC/yhqvbQC8FXZ/tcCTWhRyouTFgZno8njpko0Jj YzxLygmJrf6lOyNqvLIN8z7JQAKUQSPobo8ttgZJHaQcpIqKVlVlEj8ybgKkX/fC4fsgai Kp7k2J6IN8EmbkzwmNRVfGB8+13QgLho2D2yJqkzVgVGUuj6ISzDK9jwCzo1yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S7n1z4htvz1L2V; Sun, 15 Oct 2023 17:15: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 39FHFZD1059699; Sun, 15 Oct 2023 17:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39FHFZMg059696; Sun, 15 Oct 2023 17:15:35 GMT (envelope-from git) Date: Sun, 15 Oct 2023 17:15:35 GMT Message-Id: <202310151715.39FHFZMg059696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: c892a9af7187 - stable/14 - releng-gce: Add ZFS support to GCE image buliding and uploading List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c892a9af7187e94f8dd6f720609e84d79c9e7d1f Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=c892a9af7187e94f8dd6f720609e84d79c9e7d1f commit c892a9af7187e94f8dd6f720609e84d79c9e7d1f Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:41:43 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-15 17:14:59 +0000 releng-gce: Add ZFS support to GCE image buliding and uploading Approved by: delphij (re), gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41527 (cherry picked from commit 1b10bdf0e2fa80a485980b783469687623d3f1c3) --- release/Makefile.gce | 38 +++++++++++++++++++++----------------- release/Makefile.vm | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index bdf7b31ba302..f7fb0d8dc419 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -4,7 +4,6 @@ # Makefile for uploading Google Compute Engine disk images. # -GCE_IMG?= ${.OBJDIR}/gce.raw GCE_UPLOAD_TGTS= gce-check-depends \ gce-do-package \ gce-do-upload @@ -27,10 +26,6 @@ SNAPSHOT_DATE= -v${BUILDDATE} GCE_FAMILY_SUFX= -snap .endif -# Really? Uppercase characters are not allowed? Sigh... -# And don't even get me started on the '.'. -GCE_TARGET:= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}${SNAPSHOT_DATE} - gce-upload: ${GCE_UPLOAD_TGTS} gce-check-depends: @@ -53,25 +48,34 @@ gce-check-depends: . endif .endif -gce-do-package: - @# Yes, really... Sigh. - cd ${.OBJDIR} && mv gce.raw disk.raw - cd ${.OBJDIR} && tar --format=gnutar -zcf \ - ${GCE_TARGET:S,${.OBJDIR}/,,}.tar.gz disk.raw - cd ${.OBJDIR} && mv disk.raw gce.raw - touch ${.OBJDIR}/${.TARGET} - gce-do-login: @echo "This requires human interaction, which is not yet supported." @true -gce-do-upload: +.for _FS in ${GCE_FSLIST} +GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +# Really? Uppercase characters are not allowed? Sigh... +# And don't even get me started on the '.'. +GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} + +gce-do-package-${_FS}: + @# Yes, really... Sigh. + cd ${.OBJDIR} && mv ${GCE_IMG_${_FS}} disk.raw + cd ${.OBJDIR} && tar --format=gnutar -zcf \ + ${GCE_TARGET_${_FS}:S,${.OBJDIR}/,,}.tar.gz disk.raw + cd ${.OBJDIR} && mv disk.raw ${GCE_IMG_${_FS}} + touch ${.OBJDIR}/${.TARGET} + +gce-do-upload-${_FS}: @# Fallthrough in case the bucket already exists. /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true - /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ + /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ - --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} +.endfor +gce-do-package: gce-do-package-${VMFS} +gce-do-upload: gce-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index e1bba5271a4c..1a58a548b9f4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -34,7 +34,7 @@ EC2_FLAVOURS= BASE CLOUD-INIT EC2-BASE_DESC= Amazon EC2 image EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw -GCE_FSLIST= ufs +GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image OCI_FORMAT= qcow2 OCI_FSLIST= ufs From nobody Mon Oct 16 04:00:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S83Kj2fhXz4wncN; Mon, 16 Oct 2023 04:00: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 4S83Kj27FGz3dgl; Mon, 16 Oct 2023 04:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibfwN6YzK0lFNDNTmJD9Et2m/oKc4B/94077Q07h+bE=; b=voujcqDiOBVfU6rnaDKnOHGacSrCFaj+VhxsHZ3Uf/BtGD/Kvv0LuPjFcua3nxD7C25vaC PsKacQrHujN8xhuoE4Y1eS43CVr8XAR3lFxWYygkGPkK27qlDfBq8IylbifkOTWv+o2K8Y 4fzSMW7kKTs/wvQAdNAmOlLzUGF1zk+n0xwRyHdhD3oAM1j8PGkpQsbChu26tnxBW5vnPE ESvIdybTdr2DX1mdfKAaExOz4rbDumK6BaIoxcMAfWthuCvwGtkRNiliYfYo9a43Wf7UfT CH0Zw5lBi/ZtcOAh8Y/IbzOzaHmOcFKQ0CoQnhqFRhG1Rr7dj2bV8z2W3CpxfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697428809; a=rsa-sha256; cv=none; b=nkfDlcSpDeacLxzCg3WUngOX06SR27bDeeEFeNtIiP/NWgBaxHwZ+35hPcLJ3YFLYdFsgF zZnAZDwXpvgAFs5w86bCn3AgqOyPf1EQYmRcFIx1vJcZjQrwnm7I56cjZfDHM0a1iB6rbj E0kpJPiG4Ad5TexzzkI4AzBWqGh7oPYotbPb/+q6QPBDPQKVgW2SGvRNg41rhMKAvt2zCy vJ58YjGc1XAqSFcqjEWv56mirPCPbbt2Qzc5coTPXA2k/cP8CzWFEpXp6LsYNhp6V8nBeb JLoCuFeblPrIgBTr6gcM42VrxhMqu60AbYvvwRg2Mq5xJ5KenaJTuf5LEDBr/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibfwN6YzK0lFNDNTmJD9Et2m/oKc4B/94077Q07h+bE=; b=vGpqubaROTpmfDjkv6MPo/bMWnpy8duW3GZQAhPWeg1k2j+gKc2GxpgnfVTRHA0/Ga35iW EJLzQyFzcg7u8tnMGmq+1rHQAbhiEIBtnzKBiA8sQ3omkdI9AN6gmGqh5sWkl0xls88DSQ nFIXOBXOI9DqwNwdgUElvW82mY5Fr9HOmzJUrrpuBDYx0aTvUvQodklNkKFysoRFA3SkqA GHE4u0hNpRqYRzm1ga4zJ05wxFkhW+qDgaW8KuzKoauuKy411rPcuIRG5ctIQKf8CiIYkO jNKedt7ECZgKv0/BCMyMHEPUhWepwPO+E/GjTzl5WhS9wF+ngDuRh3TRf4X5vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S83Kj19wJz9HF; Mon, 16 Oct 2023 04:00: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 39G409bx025988; Mon, 16 Oct 2023 04:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G409tc025983; Mon, 16 Oct 2023 04:00:09 GMT (envelope-from git) Date: Mon, 16 Oct 2023 04:00:09 GMT Message-Id: <202310160400.39G409tc025983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 8a9416b18f8a - stable/14 - unbound: Import upstream 0ee44ef3 when ENOBUFS is returned List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a9416b18f8a894c4bb0c3a284746d5e0bc81152 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9416b18f8a894c4bb0c3a284746d5e0bc81152 commit 8a9416b18f8a894c4bb0c3a284746d5e0bc81152 Author: Cy Schubert AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert CommitDate: 2023-10-16 04:00:00 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) --- contrib/unbound/.gitignore | 1 + contrib/unbound/util/netevent.c | 102 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/contrib/unbound/.gitignore b/contrib/unbound/.gitignore new file mode 100644 index 000000000000..b25c15b81fae --- /dev/null +++ b/contrib/unbound/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/contrib/unbound/util/netevent.c b/contrib/unbound/util/netevent.c index 204e4883cf27..b9395a8998b9 100644 --- a/contrib/unbound/util/netevent.c +++ b/contrib/unbound/util/netevent.c @@ -116,6 +116,8 @@ /** timeout in millisec to wait for write to unblock, packets dropped after.*/ #define SEND_BLOCKED_WAIT_TIMEOUT 200 +/** max number of times to wait for write to unblock, packets dropped after.*/ +#define SEND_BLOCKED_MAX_RETRY 5 /** Let's make timestamping code cleaner and redefine SO_TIMESTAMP* */ #ifndef SO_TIMESTAMP @@ -402,9 +404,10 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif + int retries = 0; /* if we set the fd blocking, other threads suddenly * have a blocking fd that they operate on */ - while(sent == -1 && ( + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -419,6 +422,13 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -457,8 +467,48 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; if (!is_connected) { sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), sldns_buffer_remaining(packet), 0, @@ -665,7 +715,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif - while(sent == -1 && ( + int retries = 0; + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -680,6 +731,13 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -718,8 +776,48 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; sent = sendmsg(c->fd, &msg, 0); } } From nobody Mon Oct 16 04:00:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S83LP5Pqtz4wp57; Mon, 16 Oct 2023 04:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S83LP50W0z3fRK; Mon, 16 Oct 2023 04:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ug7S1vhrzfLLHaDibIbFlACf6ApSMeRa14BDeXWWcM=; b=abMF20e8x4PoEX54LMHGGQ/mXCwU/D/54FzVHSNd9S/XPZPwgX2me1SCbscC+s/DLN2xZ/ a5P9tRx5lG3mRymn/eL7a/+YKtR0EQ8GWdFKl6RtUIldqofUWg92onFW+7rqJRUKMg5MFm lqlnfZWx61f/S6Jji3M+nO3RCgwHqqyTdqUQJuKWBiuozvtsMXuUazSLvmNkvmDNMJuu7i FcdOVE8OodGiOCKIZWXombjHAHMS8bsQE2qyIigtojQpG1fSUPgicccC+tr765RnkvGNq7 5YbR8jCsnh9Gj/XK5WUoNCMiGFu4kDSGlNTZ9cYoyI3LH/nGd0XRUsu/gdCE5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697428845; a=rsa-sha256; cv=none; b=ycBj198qLOHGmxXAyjkLPVry5cNRnBAojlHyPVmQBkvjmQQ76H0AvWR9/bdjKw7eIBADOz /mn5us6m5h62euLPVzkG+U9zlzpQ1KR3eg6lFESWO9cANXLVA1N55EnFGCQPD6dbCiEojM TA3um/wOU7Ft1OjwOdjNUAkuYeWgy9Fqp9jq+d2xIeZQ6Awj5/EZFCV0kTxFUUUP/Ci6dP k1u8xgjoCUztsDwa18MYLIlBE/y5g47e0FMerCoqJgajI0TgWAW6MKaePYGlTPeKsH3YbX OxmQqV8vEGk746mddtbOA8CklVfEybTMKOFIvs1cMTqjy5W/GqZbQEATX8LebA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ug7S1vhrzfLLHaDibIbFlACf6ApSMeRa14BDeXWWcM=; b=hlBxzEsPV1rEAXya1eHK+4DI5OaZYvVxUO1JpTHNOJzl7+G0HPsyzbCzaq4pU4CTTeTYUA QnPjK+f8ssGnLuEvy9Ehnz4/WklATTUCxpYV0QSiz0D8YXlbpAw3xkcPRC1a+t3AUk3xJs bVlqBTVB2g2sGTwyQfN84dZImRqXTItKHLOHQnYkkFpdgAiom4Yla1jJZWJzmHuJ0sMOsC s4KePoNBgEzSfu1KLTnjfuS8JAKjPCTaVevY1wXZe3pNRUNcgByu7sUzj+8+U2mFEu55RK MWrFrb8rQW2OeP0nyD+nGfJ1fhOyAsbP04zPtGaDGuwzEuQA503wKDVOLepAqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S83LP446Fz9HH; Mon, 16 Oct 2023 04:00:45 +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 39G40j5Y033807; Mon, 16 Oct 2023 04:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G40jwa033804; Mon, 16 Oct 2023 04:00:45 GMT (envelope-from git) Date: Mon, 16 Oct 2023 04:00:45 GMT Message-Id: <202310160400.39G40jwa033804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 64ac3bca3a6e - stable/13 - unbound: Import upstream 0ee44ef3 when ENOBUFS is returned List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64ac3bca3a6ec8510ae7175cbdd73aa594756e2a Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=64ac3bca3a6ec8510ae7175cbdd73aa594756e2a commit 64ac3bca3a6ec8510ae7175cbdd73aa594756e2a Author: Cy Schubert AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert CommitDate: 2023-10-16 04:00:36 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) --- contrib/unbound/.gitignore | 1 + contrib/unbound/util/netevent.c | 102 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/contrib/unbound/.gitignore b/contrib/unbound/.gitignore new file mode 100644 index 000000000000..b25c15b81fae --- /dev/null +++ b/contrib/unbound/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/contrib/unbound/util/netevent.c b/contrib/unbound/util/netevent.c index 204e4883cf27..b9395a8998b9 100644 --- a/contrib/unbound/util/netevent.c +++ b/contrib/unbound/util/netevent.c @@ -116,6 +116,8 @@ /** timeout in millisec to wait for write to unblock, packets dropped after.*/ #define SEND_BLOCKED_WAIT_TIMEOUT 200 +/** max number of times to wait for write to unblock, packets dropped after.*/ +#define SEND_BLOCKED_MAX_RETRY 5 /** Let's make timestamping code cleaner and redefine SO_TIMESTAMP* */ #ifndef SO_TIMESTAMP @@ -402,9 +404,10 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif + int retries = 0; /* if we set the fd blocking, other threads suddenly * have a blocking fd that they operate on */ - while(sent == -1 && ( + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -419,6 +422,13 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -457,8 +467,48 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; if (!is_connected) { sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), sldns_buffer_remaining(packet), 0, @@ -665,7 +715,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif - while(sent == -1 && ( + int retries = 0; + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -680,6 +731,13 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -718,8 +776,48 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; sent = sendmsg(c->fd, &msg, 0); } } From nobody Mon Oct 16 04:01:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S83Lp43tMz4wndt; Mon, 16 Oct 2023 04:01: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 4S83Lp3fKyz3fhQ; Mon, 16 Oct 2023 04:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TrdeD52UaG8ODwUF52Xi/8embO3jt7YQt7Y+IevUbJk=; b=C9teasPrBgzYSbbJnvz2dtLzS+dLUNPDtYznRtYyEPeT+sH+SDUzEJ6/zB2U8bJvQG7Jbk 8389TZb2C1yFu04wJ9tzpaga3xDkwSoT5j2mUbyU+jiKeN5ZjFbxAldPFY9pUL718PxJzR K1bFxDDXWh2pSgdxWsplBjFJCQ5AHVSyOShE0mgWZ+U6dmMTGBt6HR3xEXsuckJ9Mfw6qL xj0IuYJ7oBKvDHqImfMRbl6WfxpJsx954gjnSmKndxqDQ8jztBUcfzOVQ8Qkk3YKbRC11z 2yYjgFrOGZVCFMI2B/2F1k5AnlOzngXQI1Tv6vQVpVwi5NtfCmCio0NCm9OceA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697428866; a=rsa-sha256; cv=none; b=i6R0vJcATUHZw3W7lKy/UaXFkib1eXNnmP3E+YzDVtSowhrm4E0LhqlNO4VP6YTFgmW0QJ BKDYGOYDTsXky5x/jJmwX0/ZtbYo/rgAMxbUx55qSob3cma3/l6I76fb8t3240wlb7lShB ndSvrgxPeIF9oD/qJXa8uAYhFNzlnnHJlgTHY9XG9W4QySpWo0+TomjmbWPlsApYny8jSJ XM9rvwn+fA94pe4pCgwmfKDKnjre1G/Ebi2WxoLNTmuPESxE60Ih9OAE5TCGWmdUIlVQJ1 QLLepp25cKeVFBp16mEBtAgPD63atw71Cd4BVDNkcIreJ8aWVH8lFXehdhvw8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697428866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TrdeD52UaG8ODwUF52Xi/8embO3jt7YQt7Y+IevUbJk=; b=lFDmB8Y35BmmuxorETQ0Rq5Iy/B/hOnDYY4iHcDr1DBqJrpi1On+9H0ZApP/62AY2S8HTx XOFBcIb3Hi3ignDsQuezDNISyZgM0q1XoL/JgFnosDha4cu9qNXXPA1OL+jjLezhzNcGUy 36Dz65WBzLsfHsS/0EpSqZ9NJRQADZuRYNOyWAXkO2b+gBx0hWYDPgH4rqv0VFF5Ny9mqx pS1Zk52Lb5MDXLFMmWOt7ctpBBr1JnHjA+RgYhlArLRtMmCXvoDugDo/KWltGOEPN9qdwR i08jfZcBL7i1sxkmxKZ0RoWETqZTVVK7l3HqzAd0YPJDkvukabhmhcPBdFqOPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S83Lp2j9Hz9h4; Mon, 16 Oct 2023 04:01: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 39G416Zo034895; Mon, 16 Oct 2023 04:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G416Zp034892; Mon, 16 Oct 2023 04:01:06 GMT (envelope-from git) Date: Mon, 16 Oct 2023 04:01:06 GMT Message-Id: <202310160401.39G416Zp034892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 7d9c0fb57893 - stable/12 - unbound: Import upstream 0ee44ef3 when ENOBUFS is returned List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7d9c0fb578931f7f622970bad40d799abd74a76f Auto-Submitted: auto-generated The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7d9c0fb578931f7f622970bad40d799abd74a76f commit 7d9c0fb578931f7f622970bad40d799abd74a76f Author: Cy Schubert AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert CommitDate: 2023-10-13 01:54:35 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) --- contrib/unbound/.gitignore | 1 + contrib/unbound/util/netevent.c | 102 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/contrib/unbound/.gitignore b/contrib/unbound/.gitignore new file mode 100644 index 000000000000..b25c15b81fae --- /dev/null +++ b/contrib/unbound/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/contrib/unbound/util/netevent.c b/contrib/unbound/util/netevent.c index 204e4883cf27..b9395a8998b9 100644 --- a/contrib/unbound/util/netevent.c +++ b/contrib/unbound/util/netevent.c @@ -116,6 +116,8 @@ /** timeout in millisec to wait for write to unblock, packets dropped after.*/ #define SEND_BLOCKED_WAIT_TIMEOUT 200 +/** max number of times to wait for write to unblock, packets dropped after.*/ +#define SEND_BLOCKED_MAX_RETRY 5 /** Let's make timestamping code cleaner and redefine SO_TIMESTAMP* */ #ifndef SO_TIMESTAMP @@ -402,9 +404,10 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif + int retries = 0; /* if we set the fd blocking, other threads suddenly * have a blocking fd that they operate on */ - while(sent == -1 && ( + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -419,6 +422,13 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -457,8 +467,48 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; if (!is_connected) { sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), sldns_buffer_remaining(packet), 0, @@ -665,7 +715,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEWOULDBLOCK) { #endif - while(sent == -1 && ( + int retries = 0; + while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && ( #ifndef USE_WINSOCK errno == EAGAIN || errno == EINTR || # ifdef EWOULDBLOCK @@ -680,6 +731,13 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, #endif )) { #if defined(HAVE_POLL) || defined(USE_WINSOCK) + int send_nobufs = ( +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ); struct pollfd p; int pret; memset(&p, 0, sizeof(p)); @@ -718,8 +776,48 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, log_err("poll udp out failed: %s", sock_strerror(errno)); return 0; + } else if((pret < 0 && +#ifndef USE_WINSOCK + errno == ENOBUFS +#else + WSAGetLastError() == WSAENOBUFS +#endif + ) || (send_nobufs && retries > 0)) { + /* ENOBUFS, and poll returned without + * a timeout. Or the retried send call + * returned ENOBUFS. It is good to + * wait a bit for the error to clear. */ + /* The timeout is 20*(2^(retries+1)), + * it increases exponentially, starting + * at 40 msec. After 5 tries, 1240 msec + * have passed in total, when poll + * returned the error, and 1200 msec + * when send returned the errors. */ +#ifndef USE_WINSOCK + pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#else + pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1)); +#endif + if(pret < 0 && +#ifndef USE_WINSOCK + errno != EAGAIN && errno != EINTR && +# ifdef EWOULDBLOCK + errno != EWOULDBLOCK && +# endif + errno != ENOBUFS +#else + WSAGetLastError() != WSAEINPROGRESS && + WSAGetLastError() != WSAEINTR && + WSAGetLastError() != WSAENOBUFS && + WSAGetLastError() != WSAEWOULDBLOCK +#endif + ) { + log_err("poll udp out timer failed: %s", + sock_strerror(errno)); + } } #endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */ + retries++; sent = sendmsg(c->fd, &msg, 0); } } From nobody Mon Oct 16 07:16:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S87hM3ZjSz4x0tf; Mon, 16 Oct 2023 07:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S87hL74MCz4V0f; Mon, 16 Oct 2023 07:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFnt1QCHRPPvcsqsmwPMguEyUiFJgmaF9hvva9cSv30=; b=bcjEFkQB4l+ShN8P3r0UbybXI10ormQcxN+1MIcdKgbBGBIUlCFxKcl//WXCLny3VTWWeS X7YjoXiqy6R/pU2zDBjiWlQyK0NX+WDfoe224VhrC8im5v5ZDUsTHSlq2SkMiVmx75pPKP uluRoBTt8tcbeK7RC74d8SGNScRE0Krh0RB6GI8OqEJXrrOPEZbHngfa4JtTg/Ln7oWaf3 NtwAMn7htMSuRY7PUC4bH38ogORVA8JQEcLanpLLd9nl33panUSTQo7bL6OOcROVnOb0ND tEk8qSwLZvcO5YMwHCjOO9NjsvNkijU8VctouISlZAvn2Ta8VD4lsWWAWa/vqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697440595; a=rsa-sha256; cv=none; b=VDTHP2S/K0rbHkkIL0M9uQrJ9sgYQZz5zhnrz9JfaOL32fcyXc9KVNTnrzUU/nmsBULeRe wZe86bUwhyLIHc5ehCSk1hySTJ4PgWdDNKt9jV3k39CgUNndfsjg3FypcP1Ak5kNkJr2ir /bPt8C/4QsqukhGkdFaAzR9JxrSTH5nxtf65cxhWySQ1NU/KysPkh1DssKjJ5KDRUIzmBG 9asaixzJArZqSyJwVHajYt+hJKmLYDw3W2TmdBuXsZCW/ZIg2eG5kNVTiysi8Y58tRNq2R DLo8KLI0KtgDLuTM67fVnI2o3cnxqjUBDEl9SSOxp9fSgCOqSsj2xP/oc2qBbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFnt1QCHRPPvcsqsmwPMguEyUiFJgmaF9hvva9cSv30=; b=HzsczeGIijOEnnVaxy0saoG9CqQaNRCwlw1PYda0/XljZcVQL4o/Wgku7YT+rmHAaUbvx7 AReSrlcYYVicrxlaq/lV1Cw529BsSNKEFCE+HmXjM9+3qW/HZy6HdZUttItcAW0hkbgbzy XIyITgHDveBHXQedHUPkHDzG80e0yUSmg0cPACqH3ASoAS8vmNgjSsBSebIcZwsMzHIzQd 826Bicoe8vx2C1Qm+rYeHiUlm2eBK8FYeKlUi6VvcBqqsFF80v+gyndesszQ86A4qu8/Sa jqLy4ELoCqvyU6NdCyE3U+ZnTvdSkH4do5zoBP6vMNEGRFXyy89T0zg13NiN3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S87hL67b0zX2l; Mon, 16 Oct 2023 07:16: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 39G7GYFc054773; Mon, 16 Oct 2023 07:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G7GYrK054770; Mon, 16 Oct 2023 07:16:34 GMT (envelope-from git) Date: Mon, 16 Oct 2023 07:16:34 GMT Message-Id: <202310160716.39G7GYrK054770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5230afce76a2 - stable/14 - tun/tap: correct ref count on cloned cdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5230afce76a2de387cc162384ffef4cebf576e97 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5230afce76a2de387cc162384ffef4cebf576e97 commit 5230afce76a2de387cc162384ffef4cebf576e97 Author: Konstantin Belousov AuthorDate: 2023-09-21 10:47:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-16 07:16:01 +0000 tun/tap: correct ref count on cloned cdevs PR: 273418 (cherry picked from commit 27f1ec0be24b45559793e486a4fa5a2e7fdadc17) --- sys/net/if_tuntap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index f4dbf685fba6..a01bc11aa64c 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -548,6 +548,7 @@ tun_clone_create(struct if_clone *ifc, char *name, size_t len, if (i != 0) i = tun_create_device(drv, unit, NULL, &dev, name); if (i == 0) { + dev_ref(dev); tuncreate(dev); struct tuntap_softc *tp = dev->si_drv1; *ifpp = tp->tun_ifp; @@ -611,8 +612,10 @@ tunclone(void *arg, struct ucred *cred, char *name, int namelen, i = tun_create_device(drv, u, cred, dev, name); } - if (i == 0) + if (i == 0) { + dev_ref(*dev); if_clone_create(name, namelen, NULL); + } out: CURVNET_RESTORE(); } From nobody Mon Oct 16 07:16:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S87hN4BXVz4x1nv; Mon, 16 Oct 2023 07:16: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 4S87hN11Fjz4V9H; Mon, 16 Oct 2023 07:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLOgzdbWoYL18+nzcFwaCr/REVuUdDHZqdp+iwploGg=; b=d7YPXM2ytSg9NGTBiLlRTWJZwSLeECgRHYgSKAlmAhJ01QP8MW4KJgjMwKyQa7MMsntEuo lE27BVBtus99EbbE8bOam/TyuqXo8iOMTGo6vqByycadMmvY8xlC/6M82rJMby6BWQGd4U KTFRfZJM1Ag0gT0C1yx9/JcE07cfu/dpdWWQgqFi1HM70qNiIJXOeCjOV6Smki2oUkSC7T LAks7mPvD3r37YDVMq+EobYMYJ7QHQgnclHcI+DiO0oqT+MhYBy4+wD1YcJwlN3v+2Dgwg nEcrPlwFIP+y/8a5h8GsrQEtBGMNyhI5FAMQZya2chfUpp472ymShtlqakhWpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697440596; a=rsa-sha256; cv=none; b=E+ECjoBWq367xiBEgnzulu4YpnqikusrP66i+6KDS9dfWyIt4XmrsBB9UYXvUiZdQBnm41 oH1RE5ZSiNb/E9NU4XO8Rl5Kw6pILo4FnNv0YgNIeU67IXvdKy9Q+Pigs7wdnpZrJnN35a jbJZcA93AI1OOQVWt6ZRHJcggrHDsrSxq/xpJIPy9R5fIcAqKukRq3zfJyjqpcCxHQ9kuh U+5zl7eJiU7tP8x+COimpDl7lSYmyNHd68OuznxbGTjNWf+LmmN7CbU6EoWYYWX2dktT/I sbpf+hYsNYYo4Rozj1qjrqBd2xWrXXgk11PQpl2TI6ZUuICR5I5yFses6BJSIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLOgzdbWoYL18+nzcFwaCr/REVuUdDHZqdp+iwploGg=; b=jzvhUgKSb8DRJ4VJnxpmFk2XPfc6sEKqhZWuWX1OJF4Tco1TzWDfv7kdJ1ycS5Uuma8HO9 anOWCrqZbzLh0QXV0WN9RTGV7KQ30c8da1eBYWPjCONZvUGMlAc9eoT8hATOTqCk36qqNQ 0561+GANcQO+73GZmJ/02ra0DHEg/bMnbxuoQUj9uAQAMAev570sASSPbygVJd64OYauIq BmujDs3XDcZAI/HSSuTcebF7yxZ/scwr0RZL+49lyAwwsTfkYVPjWwf2wZmMGEAd9EAtvG Ja1nXj1fgXxAXURL6Y4DkJBW0fZOwD5VI5SQCDUzOxA6sFQQ8m74TZGYDOKLNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S87hN02hmzWZm; Mon, 16 Oct 2023 07:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39G7GZ8T054828; Mon, 16 Oct 2023 07:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G7GZmx054825; Mon, 16 Oct 2023 07:16:35 GMT (envelope-from git) Date: Mon, 16 Oct 2023 07:16:35 GMT Message-Id: <202310160716.39G7GZmx054825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 23a55498a818 - stable/14 - vkbd: correct ref count on cloned cdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 23a55498a8184add2396479a09c7ba0921d057a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=23a55498a8184add2396479a09c7ba0921d057a4 commit 23a55498a8184add2396479a09c7ba0921d057a4 Author: Konstantin Belousov AuthorDate: 2023-10-02 22:25:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-16 07:16:01 +0000 vkbd: correct ref count on cloned cdevs (cherry picked from commit 6e92fc930943a85f311e986a02e2b3dae9e37126) --- sys/dev/vkbd/vkbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index a8d4583f46c7..3dbf64063e33 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -191,6 +191,8 @@ vkbd_dev_clone(void *arg, struct ucred *cred, char *name, int namelen, *dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit, cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", unit); + else + dev_ref(*dev); } /* Open device */ From nobody Mon Oct 16 07:17:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S87jd56TGz4x1h8; Mon, 16 Oct 2023 07:17: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 4S87jd4bb4z4W25; Mon, 16 Oct 2023 07:17:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFz7YOVrtxiZtrRnHEyfj0/51CJJUm3ohMZw21capRY=; b=obkHlIEmPhBvmvis5L1k54e0uUaEIG6qenVmFHtQyvj1OWeO48fQg63+MBY7u2iFWN4zN+ ume+zKpTY4dOOOWmFsVMUMM/jtFra8YtuZpRpdDFm45/MVZZydARmmv2UW2Jl82bGsB7fa KAWgGMEUjBreOTuFHdNH6g+nOo0yjB+X6r4S7yr4EusXQhATAJgnJpcRuxpaYCTMr52NzF vHr1tD1nH4uxpCPlJiTKLiIFmBoyyPgLCW9kcjMfHwqsV9gqYV75LmuklQQm8em/kPfeLW oe4cWgiVWM9biy2WdWO3U9DqQCRPnNA20SVLy3PlKZSy0F838V+I3p0j1uLadg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697440661; a=rsa-sha256; cv=none; b=MUJkdqGuv7cHD6L/RGLjVCLN37zgK0CbE3RTiDkgg++jGLNdYc3iRzohBEagoRUHUSNXZS pgtCNzPtnYwaFidIqWLvVEUdV1wpuYex442XNH25ltd3/AVhd7aYNUcNafCyHQXHN0YFQK eR5p5TNIfWppfjy5ig7ANsE/idIFxV4KB2AQBWc3mY4GWmIQBpn9NQidfteUO95+n+ivgt esOunxZSV4EgujePZKrrIUArKiUuZtZJ72rpQ7+rXa/pNDgIoeU0tnv91TRDzDeWeYmHbA ROykLer+2BP1ta/MtVaM7SlnW7/9s203Hz3imvf5ekCOoWcqdkYriPf8UmdjkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFz7YOVrtxiZtrRnHEyfj0/51CJJUm3ohMZw21capRY=; b=ANUBOZ1dDTMm9vtm7fetinxjDfD6JfgLAKbKskar28LzPcQPGWEE25qofQ9+ukM59cuGtk 0+GPMIUp8reF5ZOwWiudS2uW32sN+5cDrBdmu44/5A1d9k8IfwoEkkxTW9T1TyerF9DD8m MddViryapny7PkiZpDq/az3exO+XgVehvGV/d57mmCl1RfQpkSOH1KUNTXiT0wfJ5Hl6C/ 8YrWWtLNl0Neb0hiZS0kqHPJDtp+pPZUWPNkOBu42iK0mZUWIsBZe6hP6fb2P/IJnShp/G 5EHYAFISrcLYZRbABGnnZtbOQggMNfOSXcxNNQ2NNYO8w/M3O/Ut4cU+4Dfwvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S87jd3g9TzX2m; Mon, 16 Oct 2023 07:17: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 39G7HftE055111; Mon, 16 Oct 2023 07:17:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G7HfUZ055108; Mon, 16 Oct 2023 07:17:41 GMT (envelope-from git) Date: Mon, 16 Oct 2023 07:17:41 GMT Message-Id: <202310160717.39G7HfUZ055108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e900c81ede85 - stable/13 - tun/tap: correct ref count on cloned cdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e900c81ede851f52ab50b541b9a6ef5fbc9bb919 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e900c81ede851f52ab50b541b9a6ef5fbc9bb919 commit e900c81ede851f52ab50b541b9a6ef5fbc9bb919 Author: Konstantin Belousov AuthorDate: 2023-09-21 10:47:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-16 07:17:23 +0000 tun/tap: correct ref count on cloned cdevs PR: 273418 (cherry picked from commit 27f1ec0be24b45559793e486a4fa5a2e7fdadc17) --- sys/net/if_tuntap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index b81c2149a62f..756aa04482cb 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -541,6 +541,8 @@ tun_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) /* find any existing device, or allocate new unit number */ dev = NULL; i = clone_create(&drv->clones, &drv->cdevsw, &unit, &dev, 0); + if (i == 0) + dev_ref(dev); /* No preexisting struct cdev *, create one */ if (i != 0) i = tun_create_device(drv, unit, NULL, &dev, name); @@ -596,6 +598,8 @@ tunclone(void *arg, struct ucred *cred, char *name, int namelen, /* find any existing device, or allocate new unit number */ i = clone_create(&drv->clones, &drv->cdevsw, &u, dev, 0); + if (i == 0) + dev_ref(*dev); if (i) { if (append_unit) { namelen = snprintf(devname, sizeof(devname), "%s%d", From nobody Mon Oct 16 07:17:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S87jf69wYz4x1pB; Mon, 16 Oct 2023 07:17: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 4S87jf5gJMz4WX3; Mon, 16 Oct 2023 07:17:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1f1BW3smOIJH0J547lUvE3TYKt07QTTYNE6EAokE4UI=; b=JyHM425hgz0drM6mT8OofSCy0Oe3ljV0LE2mQr92IEQ7GdBFo/69Yr1fGYijHZpM618Qgd d4WQjhS65qwqSebz5y3BggY9R95piWj2a9NNkuBMc4FsLN7rSwmT1ilBFyt+Qh38Yefuyz KqdiFyrjwWIs34seEgqZ573CyRQrC08Gur6Se2ywE2J/eSL2/PzsuFImqDQXqNodV17/AN IjAi/6wtVpc7cLHvafqaSyVfTHa64x23D50sefN4SOZjibTu+4NNJ+sVoBqLImpMq1K0GL JXLE/v1IaSFUUOOABbPQIY6s931KIBx2ZN/uSPxadp2B2TgldEX6HFI15p06JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697440662; a=rsa-sha256; cv=none; b=tnbXQszLDIAfuxC3k9Wul56AlqDBxtFxMM9nEdKxQwj6BHZJdjNcu5YDcwCwyOfAEaX/+F N1BcB5QHVzLEdK1Wr1KCBwkTP3GREk7pk2qkhsQFp+/kOwFJPZoSsUIsheKGrwefvB7R1p Aq9KChlGZ4D65TpDIErAtFWW+ZoSAiLFTzAYnC06wVA6v2f6Pkv7ynwq4g+ACYiSayxF0Q bTQ6j9l/bgA5qzUcQ1HGBCsgXFMqq8CnapNp6IfcOnKHZLeDQFjopwjQcqZwha3/2ACp2H Sy8+JTMR8po1ySDPcD5qLdA6e9amlmpyUhkxYjcHS1Bj1Cx9GGTEWmxcRYEApg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697440662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1f1BW3smOIJH0J547lUvE3TYKt07QTTYNE6EAokE4UI=; b=tThRgv4kXpe7t6cqJ+Wpo15exqn34n6IlH3mYd8HPV2K8WjBIUT+1nTp8G7df3JgXLAH2W nnnrVCfXpjGvghgaoqPWg2RE2dYHnwpDz4wnPTgH/oycWS42yxpMZG1zbwvniv+zJ7JJD/ vT1sgSIu/UD2zhovB7C/xe6Ql03HEJtWOX6jYcSKDCHb2H528pfKiH1ssUP9pM0sgwunhW cXsRQSbZESl7OwMFu01coEtMgcrLnIotUBLo/1CTr7k3vzBgepodYAdKD0dxskXMpfohaI 9Oew6paZ568RLqqul5MLyAlEqSDcWBMbH5l4dJBocw+tirhNxkG6Fx5l6w74UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S87jf4jc0zWZp; Mon, 16 Oct 2023 07:17: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 39G7HgqX055161; Mon, 16 Oct 2023 07:17:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39G7HgtZ055158; Mon, 16 Oct 2023 07:17:42 GMT (envelope-from git) Date: Mon, 16 Oct 2023 07:17:42 GMT Message-Id: <202310160717.39G7HgtZ055158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9769b9e9c004 - stable/13 - vkbd: correct ref count on cloned cdevs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9769b9e9c00471e366dceeb8d2fb0d0e16fbd204 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9769b9e9c00471e366dceeb8d2fb0d0e16fbd204 commit 9769b9e9c00471e366dceeb8d2fb0d0e16fbd204 Author: Konstantin Belousov AuthorDate: 2023-10-02 22:25:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-16 07:17:23 +0000 vkbd: correct ref count on cloned cdevs (cherry picked from commit 6e92fc930943a85f311e986a02e2b3dae9e37126) --- sys/dev/vkbd/vkbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index 3725e852ecd1..6a3f63796f13 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -191,6 +191,8 @@ vkbd_dev_clone(void *arg, struct ucred *cred, char *name, int namelen, *dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit, cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", unit); + else + dev_ref(*dev); } /* Open device */ From nobody Mon Oct 16 11:32:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8FM92mFpz4xGN8; Mon, 16 Oct 2023 11:32: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 4S8FM91vnfz3XW1; Mon, 16 Oct 2023 11:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697455925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ehxx1S7B8/vCvnQ4LlMAGrhywNiwjWlA+hGjSXmhC7U=; b=gHs1KgPercCbYMbjhIdUgwP4AyJ1fIV+DELU1RNKcWYPrDapNV5ALf0eSYna/hlY+3FX5m KUVdF//1hgb4xl+eQQ82E72hFPB/fYXv+Ib3XffUBj6W8LoWRGLKV1ALvXhG/eJ678og7W w2cVPeP2E+Et+ASF+J85KyNRpXtqBHFhBL5wY7nd1bo70u7cZXnfyrHAp9+x7rKCsn8bi4 Bw27Qkdf7eo++PA1KZYN/mIWqcnd5Dl7CqeTyfMqK3Ybc+cvT7qSW1j7pv9SgmMkieDCyD ChNIcO6yMiX/wDdG26+FBjTNjdxxVPQXAi20d8dtb2HYuG1RVv02/tyLBsR60g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697455925; a=rsa-sha256; cv=none; b=yXu+O/LXbLb67QUneosMotEKOOcZoCsLsT4793dDsAABrzT1RpUXkcsAdD2ukn5L91HxHt lM7uEWdNzlacZXhB2ln39PlAuAtaDnTONuzLt4UYuHH4nWyNOZS7H/NWzZ7nJNgKZmAnib kH8/yeGuAsbjHMSRMp0NbOm6vu0UX8+A20pHAbzeExAntB+T9nEvn1QZgx+l4D5Bgk0EkA tagnWpMBbYWEevpKBLkEERZ0Eocxna0UW+C/bgOK/CCtiZVQj53Dvv0CFdZSSNHXuyjF0k ByRkVcNrgJICy/t6bTV2AV4nESEuJXg/A8SeWMGQVzISrPjv9CR7yXxIqE9RDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697455925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ehxx1S7B8/vCvnQ4LlMAGrhywNiwjWlA+hGjSXmhC7U=; b=lmbD3sPEDF0cBUg20p/xt1IYOGkKtkrL/cZi6kRc76uCPsLzNRtkP6juCOdIZX48N2c0eh D3OBI45QdrQOh2PtcuqTyDE+o5aDHvaM3YD29s36dHYQlpgL08DjSBW0oJBmTGy8bPy1b/ v6bsIZ8hIPuYORPzz7vvzehBKuY4CvDy0yM5ZwhKn3DXAuTv/18L/z1nuQ7PsS2rKLjcnr 3/IyHS5zbt99aIiX6gYZ8Z5nLlWpmSWk+S8efMjLO/r6Jr43uAEUujjD6ccPbYP4MYY/J6 wE381cQjJ4Yu4Cwz+vM+ow+HIcnE8Dl+uKHKdTqXiiuVpu+nOBSlShUpbX3S1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8FM90ygBzdZP; Mon, 16 Oct 2023 11:32: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 39GBW5QR083701; Mon, 16 Oct 2023 11:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GBW5Sh083698; Mon, 16 Oct 2023 11:32:05 GMT (envelope-from git) Date: Mon, 16 Oct 2023 11:32:05 GMT Message-Id: <202310161132.39GBW5Sh083698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ff15498894e2 - stable/14 - netlink: move NETLINK define to opt_global.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff15498894e2546fcce7ffc24967e714de3805ed Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff15498894e2546fcce7ffc24967e714de3805ed commit ff15498894e2546fcce7ffc24967e714de3805ed Author: Kristof Provost AuthorDate: 2023-10-12 19:55:57 +0000 Commit: Kristof Provost CommitDate: 2023-10-16 07:42:33 +0000 netlink: move NETLINK define to opt_global.h Move the NETLINK define into opt_global.h so we can rely on it being set correctly, without having to remember to include opt_netlink.h. This ensures that the NETLINK define is correctly set. If not we may end up with unloadable modules, due to missing symbols (such as nlmsg_get_group_writer). PR: 274306 Reviewed by: imp, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42179 (cherry picked from commit ab393e9548f8cc0ee28499c411963b798ebb38a5) --- sys/compat/linux/linux_netlink.c | 1 - sys/conf/options | 2 +- sys/modules/carp/Makefile | 2 +- sys/modules/ktest/ktest/Makefile | 1 - sys/modules/ktest/ktest_example/Makefile | 1 - sys/modules/ktest/ktest_netlink_message_writer/Makefile | 1 - sys/modules/linux/Makefile | 3 +-- sys/modules/linux_common/Makefile | 3 +-- sys/modules/netlink/Makefile | 2 +- sys/net/if_clone.c | 2 -- sys/net/if_vlan.c | 1 - sys/netinet/ip_carp.c | 2 -- sys/netlink/ktest_netlink_message_writer.c | 2 -- sys/netlink/netlink_domain.c | 1 - sys/netlink/netlink_generic.c | 2 -- sys/netlink/netlink_glue.c | 2 -- sys/netlink/netlink_io.c | 2 -- sys/netlink/netlink_message_writer.c | 2 -- sys/netlink/netlink_module.c | 2 -- sys/netlink/route/iface.c | 2 -- sys/netlink/route/iface_drivers.c | 1 - sys/netlink/route/neigh.c | 2 -- sys/netlink/route/nexthop.c | 2 -- sys/netlink/route/rt.c | 2 -- sys/tests/ktest.c | 2 -- 25 files changed, 5 insertions(+), 40 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index a6846035c22e..807cdc7a14bc 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -27,7 +27,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_netlink.h" #include #include diff --git a/sys/conf/options b/sys/conf/options index 83742af0204f..aede28eeaaa7 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -470,7 +470,7 @@ MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD -NETLINK opt_netlink.h +NETLINK opt_global.h PF_DEFAULT_TO_DROP opt_pf.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile index 5506d1aaec23..d7a85043539f 100644 --- a/sys/modules/carp/Makefile +++ b/sys/modules/carp/Makefile @@ -5,6 +5,6 @@ KMOD= carp SRCS= ip_carp.c sha1.c SRCS+= device_if.h bus_if.h vnode_if.h -SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h opt_netlink.h +SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h .include diff --git a/sys/modules/ktest/ktest/Makefile b/sys/modules/ktest/ktest/Makefile index f72aa5d820db..264eb7b9f443 100644 --- a/sys/modules/ktest/ktest/Makefile +++ b/sys/modules/ktest/ktest/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest SRCS= ktest.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_example/Makefile b/sys/modules/ktest/ktest_example/Makefile index 5b0c9b41f9c8..a5fe6d6d7843 100644 --- a/sys/modules/ktest/ktest_example/Makefile +++ b/sys/modules/ktest/ktest_example/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_example SRCS= ktest_example.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_netlink_message_writer/Makefile b/sys/modules/ktest/ktest_netlink_message_writer/Makefile index cdcd1d2c190f..2f84b2fecd72 100644 --- a/sys/modules/ktest/ktest_netlink_message_writer/Makefile +++ b/sys/modules/ktest/ktest_netlink_message_writer/Makefile @@ -8,7 +8,6 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_netlink_message_writer SRCS= ktest_netlink_message_writer.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 51b434d91b00..d1035445ccfb 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -70,8 +70,7 @@ SRCS+= imgact_linux.c \ linux_vdso_selector_x86.c \ linux_x86.c \ linux_copyout.c \ - linux_netlink.c \ - opt_netlink.h + linux_netlink.c .endif .if ${MACHINE_CPUARCH} == "i386" diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 07df4555d1ee..374bc32215a2 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -7,8 +7,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ linux_dummy.c linux_errno.c linux_netlink.c \ - linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h \ - opt_netlink.h + linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_x86.c linux_vdso_selector_x86.c diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile index 667c0b2475fe..6835be6e7bd7 100644 --- a/sys/modules/netlink/Makefile +++ b/sys/modules/netlink/Makefile @@ -5,7 +5,7 @@ SRCS = netlink_module.c netlink_domain.c netlink_io.c \ netlink_message_writer.c netlink_generic.c \ netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \ route/nexthop.c route/rt.c -SRCS+= opt_inet.h opt_inet6.h opt_route.h opt_netlink.h +SRCS+= opt_inet.h opt_inet6.h opt_route.h CFLAGS+= -DNETLINK_MODULE diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 1a2cea94ad35..5345d613f9d6 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -32,8 +32,6 @@ * @(#)if.c 8.5 (Berkeley) 1/9/95 */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e7a290564722..b69d8107e30d 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -46,7 +46,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_kern_tls.h" -#include "opt_netlink.h" #include "opt_vlan.h" #include "opt_ratelimit.h" diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 28c1e535b783..b0a422d5060f 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -28,8 +28,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_bpf.h" #include "opt_inet.h" diff --git a/sys/netlink/ktest_netlink_message_writer.c b/sys/netlink/ktest_netlink_message_writer.c index c13a25e05a70..e46065dd4bd2 100644 --- a/sys/netlink/ktest_netlink_message_writer.c +++ b/sys/netlink/ktest_netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 262361773fbb..7b2bbd39447d 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -30,7 +30,6 @@ * This file contains socket and protocol bindings for netlink. */ -#include "opt_netlink.h" #include #include #include diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index b28b206a7ace..b7600b2b6b71 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index 29eac82aaffd..e7649c6b13dc 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 0745f7fdcb77..0ca71fb6219b 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 9fc0eddc78ec..8443cc59d9e0 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c index ba56ac6d6a17..b4073721fdc4 100644 --- a/sys/netlink/netlink_module.c +++ b/sys/netlink/netlink_module.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index b6e120933f83..0587b478431e 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c index 1a7aaffa7dd7..4bf913d9c978 100644 --- a/sys/netlink/route/iface_drivers.c +++ b/sys/netlink/route/iface_drivers.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 4168b5936ddc..9914e7febf57 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index 722dc5fdee4e..0d6bb5c9ec84 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 2a6a0bc54e85..cfaa2167b0d2 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/tests/ktest.c b/sys/tests/ktest.c index 495fedf95dde..cd83a6aaaa3f 100644 --- a/sys/tests/ktest.c +++ b/sys/tests/ktest.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include From nobody Mon Oct 16 12:30:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8GfR57L4z4xK1l; Mon, 16 Oct 2023 12:30: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 4S8GfR4f3qz3bl6; Mon, 16 Oct 2023 12:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aD762zxfLF209TJyp8hPPCGo9K+i3PTHbLH5t9CBmrY=; b=r5nO8DZApfwzs0NtF7QFqG7U4aVHsh2HidbmDYuqCNi7EShaFYChROOBiFocMz4pjSVVMh 2uHDDHUxhlK82+s6NbPtN7SAT48r6GtXtSfC9N4yFWdNAT09TbM7iVXdpQ18mm4NFFuUqI oHp6ouEln+SCZrft5goqfIhibvXFo2SV7O/Uj++n62taw8cD75YqcerOvLLRVtff+jvoFs Yt9zaFUfIr2ENfN2+P5XGulVSzMdJjSp+U/Nrjj8/EjVwtpHL9FeSrPGGBW25mAobcN1xa DFKVMIfURC7yfro95SuOGtGrLx1G2xA0sbKcctwNGg349t4A+CU4s8ghn5XxYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697459423; a=rsa-sha256; cv=none; b=deE6TSNsU3KEPXUe1pmuBRyfHQP1uDPlmYxEGdf6UyP2Z2eSgzj4IIiXQczYHM5VQTTYPf y/XvwCKozvu1ZVVJMJ42z05DOMTOzAb95zEhCAnKUdACbJLU1Muwl+MBhTrvE3/oFMkmfb 9hF65c2wO7Rv5B4LKoz8UJ/0yZyaDuViWR6qiNAuzNCwClS4h0rFIiWLuz75cTcmInSis0 lDnakApVUVUc5e5h+JpvSA1I8/bTEtC5fIoIdISN6Stxthku5X517RGfCaJXh7rxo3/pf4 ShwvBpTgHnlIKkSwlhaD5gQtZWItmcn4VP98o5oZTZ8op43v6sQhqnBocCdYHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aD762zxfLF209TJyp8hPPCGo9K+i3PTHbLH5t9CBmrY=; b=K8KD37z7lnJbjwIeRhS4Z3J846w3E2dn+u55DkvfrsK45IrWuvM8smFl3QsRtWq/tUUZKO IWLePnrodpMMIjP1M21s4HDvZsiZp8qE8Fkwq5URjsVN2MRHSj08Bo2cbdCukI8O4LCfyY LqhcBY/qUuo67AsPVn1RCEGGPP3KQADV4Cig2F5Gqse2Y4ou/0BtCOAtFKAQzWRcRsoKzY O+zULT0hgVC15k+B3V1vEifq83LSmvONqchB+6H2s0kkyyyG1tEpI0runK/lH7Drz9o+9q Qy6rAecf3RA0UBnmSrBlgdbYeonxWqmJCUciLiiG7ZInO18FwrASZ8xOPqgpQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8GfR3hKkzgTF; Mon, 16 Oct 2023 12:30: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 39GCUNx5079216; Mon, 16 Oct 2023 12:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GCUNBx079213; Mon, 16 Oct 2023 12:30:23 GMT (envelope-from git) Date: Mon, 16 Oct 2023 12:30:23 GMT Message-Id: <202310161230.39GCUNBx079213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 73099785902d - stable/14 - Handle MOVED_LIBS in list-old-files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73099785902d750f96d07f2c413db062bf0e47bd Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=73099785902d750f96d07f2c413db062bf0e47bd commit 73099785902d750f96d07f2c413db062bf0e47bd Author: Ed Maste AuthorDate: 2023-10-13 18:06:58 +0000 Commit: Ed Maste CommitDate: 2023-10-16 12:29:46 +0000 Handle MOVED_LIBS in list-old-files MOVED_LIBS is used when a library moves from one directory to another, e.g. /usr/lib/libc++.so.1 to /lib/libc++.so.1. delete-old-files and delete-old-libs are two separate steps, so that old libraries can be retained until third party software packages are rebuilt or reinstalled. Having two copies of the same shared library with the same so version (as can happen when delete-old-libs hasn't been run) causes trouble. The PR below gives one example. Libraries listed in MOVED_LIBS are logically equivalent to updating a library without changing the so version, and should be removed as soon as possible. Handle them in list-old-files and thus delete-old-files. Leave them also in *-old-libs for now, in case the user updates their tree between running delete-old-files and delete-old-libs. PR: 272642 Reviewed by: dim Sponsored by: The FreeBSD Foundation Co-authored-by: Dimitry Andric Differential Revision: https://reviews.freebsd.org/D42197 (cherry picked from commit 922337e8d3989e4f54a0338b7fc397e3e0af7832) --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 45d034c0002c..01d3328726bd 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3306,6 +3306,7 @@ list-old-files: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \ + -V "MOVED_LIBS:ts\n" \ ${_ALL_libcompats:@v@-V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib$v,:ts\n"@} \ ${_ALL_libcompats:@v@-V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} | \ sort From nobody Mon Oct 16 12:30:24 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8GfS6nthz4xJxG; Mon, 16 Oct 2023 12:30: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 4S8GfS68SSz3c3x; Mon, 16 Oct 2023 12:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTjkyqevDmpoGtd6kTZMHAmTWvvVyjKGnLF9r7SJh40=; b=KGqGvPuiSSRSn4ZQ+fHASGQGulR6nM9CFlNlSlLVD7EACsDXr1YHUf+REItdtHtY1HSM2g kCYg+xxh4Og5GeVJF4zzdQFhAlpM35oyQElQyKBFDBJHRNQC+EI3DTGX5sxO3KPy/hTjB8 QxiQtL7Q5lhrbGfCafcS15ZPiXmTDA+c2GDao1N0EWO4yE2wjnu6UO+ntnWbZVrg/8r51s Lt8F+GEoqjQ7SEs3wItTm/OiB/mm2jrVHvilpl7YFWS/HQ/KMdx4LcMVoxk3fTvpXAcHlq W6k31PNv3ZHMpz1lpTT46wZtaRGMGs3ownF/qBp+djQ6P+sijcwIh2qws/RMxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697459424; a=rsa-sha256; cv=none; b=h5ckszYNZulI1wbgZDgcNnfSSsBmZqT5gw+ChONtGpoyR2cRQ3GzGCGl9UpBiBGQm9J2nR vFP3EM9MIXaM/agKjLxPRUL81Q89TqKFtHtdFTbe1bjvqzviwbELs+8IaK1VeD7qHzueKr dy+GqFNrxQaquYD8x+jNnNmTGp+6LG3442Mxov6w9cUUXJXetcx0opAb+IdwS3WDNsypek CavP9FZhV+l9b8qxR+5pAltQgyTUsStdDcK7fbaIqxpj6etRTYjFjwy6vnVeJfapNplGw8 Ok2YnQWD64hpLViDVgZd0GNux5xbKqmjzLk/ZpG7U/zy8ghTaYIlb3AG089z2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTjkyqevDmpoGtd6kTZMHAmTWvvVyjKGnLF9r7SJh40=; b=E7xbjbRErB2m64gkaCQwfL1VC65VgFaFgKsDI/Gtesa2PhQSNQBuPL0suLCL96wW5uBMIe 4iIJyPgeZzDZYyLwvld81Q8Md2hbh34nWkofgcvHCw1VLaiu0Xt81xRLsUZN5WiqnCN7b7 b0Wpi0klX+wzzR6g/BsDN4sYuU0oMRwy1oHzkbiXEokJ0TWbzLvrxfHZa2SfINYplMLuy5 rTSnLVeRk21F0cHUTQKDUzT6GJAX6uSy0HBSTyJ2M5aYY9b/qfLznrF+r0QcKXz/SfatHc duUgfMGptU20C31DetsfFF9b9mmx8IBYAUrX4al9jnIYcBfmg+qKguIafxZa5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8GfS4TmJzgYn; Mon, 16 Oct 2023 12:30: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 39GCUOoj079267; Mon, 16 Oct 2023 12:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GCUOFJ079264; Mon, 16 Oct 2023 12:30:24 GMT (envelope-from git) Date: Mon, 16 Oct 2023 12:30:24 GMT Message-Id: <202310161230.39GCUOFJ079264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: af632cc56bc3 - stable/14 - setusercontext(): Fix gap when setting a realtime-class priority List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af632cc56bc3781ef4409dffe9296d5a69bb281a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af632cc56bc3781ef4409dffe9296d5a69bb281a commit af632cc56bc3781ef4409dffe9296d5a69bb281a Author: Olivier Certner AuthorDate: 2023-05-25 07:10:27 +0000 Commit: Ed Maste CommitDate: 2023-10-16 12:29:46 +0000 setusercontext(): Fix gap when setting a realtime-class priority The login.conf's "priority" capability allows to set priorities in the idle or realtime classes in addition to the classical nice values (-20 to 20), through a natural extension where values greater than 20 put the processes in the idle class (with priority adjusted within RTP_PRIO_MIN and RTP_PRIO_MAX, 21 being converted to 0, 22 to 1, etc.) and values lower than -20 put the process in the realtime class (with priority adjusted within RTP_PRIO_MIN and RTP_PRIO_MAX, -21 being converted to RTP_PRIO_MAX (31), -22 to 30, etc.). Before this fix, in the latter case (realtime class), -21 was converted to 30, and RTP_PRIO_MAX (31) could never be specified. While here, change the priority computation for the idle-class case to be symmetrical and use RTP_PRIO_MIN (in practice, this changes nothing at all, since RTP_PRIO_MIN is 0; but this is the correct theoretical formula, which would work as well with other values of RTP_PRIO_MIN). PR: 271727 Reviewed by: imp, kib MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40339 (cherry picked from commit bd572be78436473a2ad4c1b78728b739c74ef238) --- lib/libutil/login_class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index f561479690c1..90a3ec5d106a 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -452,7 +452,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (p > PRIO_MAX) { rtp.type = RTP_PRIO_IDLE; - p -= PRIO_MAX + 1; + p += RTP_PRIO_MIN - (PRIO_MAX + 1); rtp.prio = p > RTP_PRIO_MAX ? RTP_PRIO_MAX : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", @@ -460,7 +460,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in lc ? lc->lc_class : LOGIN_DEFCLASS); } else if (p < PRIO_MIN) { rtp.type = RTP_PRIO_REALTIME; - p -= PRIO_MIN - RTP_PRIO_MAX; + p += RTP_PRIO_MAX - (PRIO_MIN - 1); rtp.prio = p < RTP_PRIO_MIN ? RTP_PRIO_MIN : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", From nobody Mon Oct 16 12:30:25 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8GfT6tkCz4xK4d; Mon, 16 Oct 2023 12:30: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 4S8GfT6Pzrz3cBR; Mon, 16 Oct 2023 12:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iw500wBvszzUBAPbV1T+/6pAk1v3vH1CEvVFs8ze22Y=; b=gv4G1TPwWK6h3SrhnYbRPZOzNva+RJi8qIi1ux3np1Nty1IN3mIr+a2XkvmlPWdedGCg06 +ri0Db5kN/vr44gX9bJFY5w36xsTQQ08wi6CBDm49Iu8FIPoQtS96oZWsrZyHOnqg/mMbb TNoBTpZuRU/3Zbw1n0bKinqSJpnfrhBq6FiaGPpF2NksGrGzIqgc7lX+KNpLqEP7/chBKA EsPmmDA3PzSiyndMOSOGr+/HahPKjoJIS2Rhw0N1c2NSHunfWaqLGcR4cBZOsCGdGG31P0 6Xp/jYa45MfzRS6I1CQSPneSD46/ANKpVUjy5Y/gGi1qg/9jvqU1Kkfnfz+3iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697459425; a=rsa-sha256; cv=none; b=IXfEc4lUWTefHQYKcgOOs5tEE0PcJ2yYBcp6VZwQG7Vno+3wr6CjLEr8wKFfn1o35kJU9V 3Ap+S8X2UgUaLqkXa2COScM2aOJhRTlQZkKy7LoYVcjquD7zqVjmhzh/bFsDFvyD70tr1F /1zHNRMlLMUqBQBue3637oAXVcxWP/janRsZX83RT9x7XhRyWa0nB+5/+1wXw78Aprma8k 2tZW6t2m9XpJdaen6+3wVj2l/G8e3UV/UEFr6gDLMWQlylrDJXjQb7NuBODtgOEiozuzBC ulOIv4mX4VJY15nM1Il5+cqSeaaB/MZjSxVfJJJULdHmwUEYfbYOeGOrEAgixg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697459425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iw500wBvszzUBAPbV1T+/6pAk1v3vH1CEvVFs8ze22Y=; b=gBi/Z4w/lV3IQSGREU2gLWUiVPNO224urP+y4SJztGQEMrKzieOo+uKCbkBWcdsdcqh2K1 RyaMBfbzPH9olSJ1CQkL5nvq+eI9vhxaXtjht9THMooPkBeBpD5wLzfzvgVh3/ICpGmqOm IHyBqBc0pWTvClH8fTub7QmRHG0M2WmOK4QATd3pIXj3YTdhz2w+czYRXH5e+HKIqgpzu5 S0b+2x+GzAZxxSRjEcb6coJ6K13GyZ1HAGeobdVnWM5Ak7Vx4jpOd8aCK60qaikwLoWUFL C7evC+iWg1sSFDalNvAkz3IcqXZDQpk0HJWPDky8L+MLWYc5lC/MEjNohZnP6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8GfT5WSJzgWV; Mon, 16 Oct 2023 12:30: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 39GCUP9d079318; Mon, 16 Oct 2023 12:30:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GCUPtT079315; Mon, 16 Oct 2023 12:30:25 GMT (envelope-from git) Date: Mon, 16 Oct 2023 12:30:25 GMT Message-Id: <202310161230.39GCUPtT079315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9ef162b2392f - stable/14 - tzsetup: add support for countries in two continents List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9ef162b2392f34a88fb40b560ef700d0aacadfe1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9ef162b2392f34a88fb40b560ef700d0aacadfe1 commit 9ef162b2392f34a88fb40b560ef700d0aacadfe1 Author: Pierre Pronchery AuthorDate: 2023-07-27 16:07:22 +0000 Commit: Ed Maste CommitDate: 2023-10-16 12:29:46 +0000 tzsetup: add support for countries in two continents This supports countries located across multiple continents, as per the zone1970.tab file. This only affects Cyprus and Türkiye at the moment. PR: 236874 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41306 (cherry picked from commit 914ab28c598c108bcfa5c040cc3056a8e6fc3811) --- usr.sbin/tzsetup/tzsetup.c | 67 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 5dfe840528b5..4279f888a33f 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -276,6 +276,7 @@ struct country { char *tlc; int nzones; struct continent *override; /* continent override */ + struct continent *alternate; /* extra continent */ TAILQ_HEAD(, zone) zones; dialogMenuItem *submenu; }; @@ -374,6 +375,18 @@ find_country(int lineno, const char *tlc) return (cp); } +static void +add_cont_to_country(struct country *cp, struct continent *cont) +{ + struct zone *zp; + + TAILQ_FOREACH(zp, &cp->zones, link) { + if (zp->continent == cont) + return; + } + cp->alternate = cont; +} + static void add_zone_to_country(int lineno, struct country *cp, const char *descr, const char *file, struct continent *cont) @@ -441,13 +454,13 @@ read_zones(void) struct country *cp; size_t len; char *line, *country_list, *tlc, *file, *descr; + char *p, *q; int lineno; - bool pass1; + int pass = 1; fp = fopen(path_zonetab, "r"); if (!fp) err(1, "%s", path_zonetab); - pass1 = true; again: lineno = 0; @@ -457,7 +470,9 @@ again: errx(1, "%s:%d: invalid format", path_zonetab, lineno); line[len - 1] = '\0'; - if (pass1) { + switch (pass) + { + case 1: /* * First pass: collect overrides, only looking for * single continent ones for the moment. @@ -481,7 +496,8 @@ again: cp = find_country(lineno, tlc); cp->override = cont; } - } else { + break; + case 2: /* Second pass: parse actual data */ if (line[0] == '#') continue; @@ -498,11 +514,34 @@ again: add_zone_to_country(lineno, cp, descr, file, cont); } + break; + case 3: + /* Third pass: collect multi-continent overrides */ + if (strncmp(line, "#@", strlen("#@")) != 0) + continue; + line += 2; + country_list = strsep(&line, "\t"); + /* Skip single-continent overrides */ + if (strchr(line, ',') == NULL) + continue; + while (line != NULL) { + cont = find_continent(lineno, line); + p = q = strdup(country_list); + if (p == NULL) + errx(1, "malloc failed"); + while (q != NULL) { + tlc = strsep(&q, ","); + cp = find_country(lineno, tlc); + add_cont_to_country(cp, cont); + } + free(p); + strsep(&line, ","); + } + break; } } - if (pass1) { - pass1 = false; + if (pass++ < 3) { errno = 0; rewind(fp); if (errno != 0) @@ -555,6 +594,12 @@ make_menus(void) if (zp2 == zp) zp->continent->nitems++; } + + for (i = 0; i < NCONTINENTS; i++) { + if (cp->alternate == continent_names[i].continent) { + continent_names[i].continent->nitems++; + } + } } /* @@ -611,6 +656,16 @@ make_menus(void) dmi->fire = set_zone_menu; dmi->data = cp; } + + if (cp->alternate != NULL) { + cont = cp->alternate; + dmi = &cont->menu[cont->nitems]; + memset(dmi, 0, sizeof(*dmi)); + asprintf(&dmi->prompt, "%d", ++cont->nitems); + dmi->title = cp->name; + dmi->fire = set_zone_menu; + dmi->data = cp; + } } } From nobody Mon Oct 16 15:18:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8LN54H8Qz4xTsK; Mon, 16 Oct 2023 15:18: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 4S8LN53mWMz4X8f; Mon, 16 Oct 2023 15:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697469493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hESP2ZB7X30lacCeVxORB9HufXLVtLwNxeoT5ZR0a0U=; b=IeiEqmkyK5V8kn58nk9JANzX8u0TmGeR2OqLJVSwB1N5dICMx+/lnZFozmLK4XP3B3ZLOb Xxob/LWhHt3AON8dUo9K/tIAy3PQacTHc9EDDJyQvvIskJxjh4Z61V5us/WhetztFGS0vw Eeop0vsl7ABZlliQILXXSnPjtafyUMbSzi/KcofeZWrQKA88PwMg+mXekK7anXk4xfPxjP N5yCwnpn8HRRHHxbjn337tHn8sxxvZi5UTMPoBweeoh60TgtQosswVFAAxYmHv0cACg22A JhGlk2cMGW/xuL/kG3mU0Q3OqfgyO5D1qFWePy4nRtl9gNsVJNAz7p1LNF6tUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697469493; a=rsa-sha256; cv=none; b=PlQnyMspeP8yPQB8YawT74DvuUglCXK+NDBMrPdJVpoMkkVIFuP/K71sXwbX56n8X7KHid 88eAk4A8fObi5ni301w2JDqleMGJt7S9nC1EjOCxz6vMDdio1BLig+a9fnanZzcirQ7WSt Verg34N8ywASWSBo8LMI0LYClLTvxOr2xPq3xiCwpTKXR0jPpWKEl6RK2rAYhiiifKqDZt t0Nbi/mYaa3T3jHOVP8RbIJTYkcF3FllRGh280mcA4AgWMB1zVRa2DWqzUW9eYcID7qRb1 0h8ONKDKgULjwXXhlR6dPvshdr/f4+2LfZntocrBZ+kLNN+Qp4g0SYbtYis9vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697469493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hESP2ZB7X30lacCeVxORB9HufXLVtLwNxeoT5ZR0a0U=; b=QhyQEpzsaQpjcNv23tkvZ5Lpu/K4KHKLJwkxy0wlFszRPpj7PEOKEz/1Nu/doX6EcDT83o apzlFc0zDkBK9B23jQRv3D4zpwXR5Iw+cg6AEVrIuWQ0ab5coMQSlqN5cjMIWJ9Ma/vfKV anbD/0+hvb2lFDQX0LnfVQqDVaM4TdTFWklhlk/ygy2jC2G07yxAeeDxyZF1vBDMLRKIFr Z3Nsp6/mTp03rDGqsHVRRR3yrKDBet4RQ32QCn6rwk1CDC8cEI10G1mbTiyLuIRHb5/ixq DWSQKw8wj7mwQnvKSKmPM3b/WQlzq2WFiU0O4eyVVAAqAW200v15IgK8ba3cyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8LN52Ywszlfn; Mon, 16 Oct 2023 15:18: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 39GFIDlE054289; Mon, 16 Oct 2023 15:18:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFIDL7054286; Mon, 16 Oct 2023 15:18:13 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:18:13 GMT Message-Id: <202310161518.39GFIDL7054286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3a97686fc11a - stable/14 - tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3a97686fc11ae51ceb4004c07702a8a20f71410d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3a97686fc11ae51ceb4004c07702a8a20f71410d commit 3a97686fc11ae51ceb4004c07702a8a20f71410d Author: Zhenlei Huang AuthorDate: 2023-10-08 10:03:59 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:15:37 +0000 tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' No functional change intended. Reviewed by: cc, rscheff, #transport MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41998 (cherry picked from commit 38ecc80b2a4e5e11ece83ca4df63632f0b6fa394) --- sys/netinet/tcp_subr.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 696bd40f7ada..27b0eae83837 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -305,8 +305,17 @@ static int tcp_log_debug = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_debug, CTLFLAG_RW, &tcp_log_debug, 0, "Log errors caused by incoming TCP segments"); -static int tcp_tcbhashsize; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, +/* + * Target size of TCP PCB hash tables. Must be a power of two. + * + * Note that this can be overridden by the kernel environment + * variable net.inet.tcp.tcbhashsize + */ +#ifndef TCBHASHSIZE +#define TCBHASHSIZE 0 +#endif +static int tcp_tcbhashsize = TCBHASHSIZE; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); static int do_tcpdrain = 1; @@ -1152,16 +1161,6 @@ tcp_default_fb_fini(struct tcpcb *tp, int tcb_is_purged) return; } -/* - * Target size of TCP PCB hash tables. Must be a power of two. - * - * Note that this can be overridden by the kernel environment - * variable net.inet.tcp.tcbhashsize - */ -#ifndef TCBHASHSIZE -#define TCBHASHSIZE 0 -#endif - MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); MALLOC_DEFINE(M_TCPFUNCTIONS, "tcpfunc", "TCP function set memory"); @@ -1508,7 +1507,6 @@ VNET_SYSINIT(tcp_vnet_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, static void tcp_init(void *arg __unused) { - const char *tcbhash_tuneable; int hashsize; tcp_reass_global_init(); @@ -1576,9 +1574,7 @@ tcp_init(void *arg __unused) tcp_pcap_init(); #endif - hashsize = TCBHASHSIZE; - tcbhash_tuneable = "net.inet.tcp.tcbhashsize"; - TUNABLE_INT_FETCH(tcbhash_tuneable, &hashsize); + hashsize = tcp_tcbhashsize; if (hashsize == 0) { /* * Auto tune the hash size based on maxsockets. @@ -1595,7 +1591,7 @@ tcp_init(void *arg __unused) hashsize = 512; if (bootverbose) printf("%s: %s auto tuned to %d\n", __func__, - tcbhash_tuneable, hashsize); + "net.inet.tcp.tcbhashsize", hashsize); } /* * We require a hashsize to be a power of two. From nobody Mon Oct 16 15:18:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8LN64Nbxz4xTdp; Mon, 16 Oct 2023 15:18: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 4S8LN63TRhz4X8r; Mon, 16 Oct 2023 15:18:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697469494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Vzm8AcJ4zTo17IpsIuMYcrd0PSQy5d2wFyD0q8wVoQ=; b=iMcShzEYg0ka3Ad8D6PVMota8gwpZA6bAgpbQJkM4J9EDHUMUehOqiupvHXdoJGSwUyCu1 v82zdgRaBtjJQKzDTcInwqMW468XqVH6J6c7rJkeW2y7fedvdMvcKSZT6xCrI9GOLKspuv +O/34mPABbnACVzUPjywqbuodPcbHJJnN6l6jvvM93iQuWQF/AzWJ/j5SIQNBeyNJ1JGXF g36jpLk/tkbPPwLM9OP7yXKm2ta+dM7Aks6df0WNGN0ifMVqflFUHp1jFU08T9yxJQCICl cAdSPaGEu+ufKDAMshncoTG2OEgDiVfVJzdYmf1+30tZVZfGTHCGXwRrIxVFEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697469494; a=rsa-sha256; cv=none; b=raeUtvadawTvbzOv8BIpcgly246yIJ78MFBEXC4I/6Aj2EUXhO1O0VwJkF0EAUr6dk/u4Y kHkIgowOQpLnEiZMur56mLoTB+WjfOqkFLDS8ks9QeI3HoCgmLm9eYuvaHcJu2dko9e2oI FLVutBe6CqcfGYw0uPhE2glMsmUWZs3rzFUnlVD6hjYrauvOzdpdTG4hSwQ/drF2hnCkrH HA8+yqGSSqDLlG2GiinGmw8TeuEgHyiBQLYggXy5RI12V/2vJ6UwmV7tdeScMdOSwAnqrp Fkad2WWBvNH5EtqRsm2ehlbVghCFmwRjyWExaW51LNf3tbYiAPFlavglrOobGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697469494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Vzm8AcJ4zTo17IpsIuMYcrd0PSQy5d2wFyD0q8wVoQ=; b=kWJMaMqH2TuwNuonsNAYLjM5VRO9ALVCFpyrVQFH1W0PKEQDerrVyYRZEoCYGp2G20PA3L sUWJvEDATYNnpyOYOWuParEFKEJ5nIiNUnItEVr4KtDt6eOY4LNyEZ6eHkRyW44VG8gs5u q4FS99CFME5XdVZ/BHGDsW1q8QlcAMt995KQHfCqJrcwzXw81q/j55FmkGlPSa30fLdx/I qpbmQO5aFHMhyySyNRgaYynlWia1SsnyaCyD/l868ystv5FJs5NVBJRrbP0YhfBWHWdKJi UncSGVCV5uIGVTh/8itXt2ONC7WZbDuvFl4ObZDtHq7q26QkVGH9Is9XMgunzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8LN62T2Kzlfp; Mon, 16 Oct 2023 15:18: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 39GFIEvX054341; Mon, 16 Oct 2023 15:18:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFIEBg054337; Mon, 16 Oct 2023 15:18:14 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:18:14 GMT Message-Id: <202310161518.39GFIEBg054337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fd9de12a7110 - stable/14 - sctp: Various fixes for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2 commit fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2 Author: Zhenlei Huang AuthorDate: 2023-10-09 04:36:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:15:37 +0000 sctp: Various fixes for loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.sctp.tcbhashsize 2. net.inet.sctp.pcbhashsize 3. net.inet.sctp.chunkscale The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale' are only used during vnet initializing, thus it make no senses to make them writable tunable. Validate the values of loader tunables on vnet initialize, reset them to theirs defaults if invalid to prevent potential kernel panics. Reviewed by: tuexen, #transport, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42007 (cherry picked from commit dac91eb7660324677d8a2f71bd6f192422355ba1) --- sys/netinet/sctp_pcb.c | 8 ++++++++ sys/netinet/sctp_sysctl.c | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 16cde18c4c1d..a1742b2fffca 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5676,6 +5676,11 @@ sctp_startup_mcore_threads(void) } #endif +#define VALIDATE_LOADER_TUNABLE(var_name, prefix) \ + if (SCTP_BASE_SYSCTL(var_name) < prefix##_MIN || \ + SCTP_BASE_SYSCTL(var_name) > prefix##_MAX) \ + SCTP_BASE_SYSCTL(var_name) = prefix##_DEFAULT + void sctp_pcb_init(void) { @@ -5717,6 +5722,9 @@ sctp_pcb_init(void) TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.chunkscale", &SCTP_BASE_SYSCTL(sctp_chunkscale)); + VALIDATE_LOADER_TUNABLE(sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_chunkscale, SCTPCTL_CHUNKSCALE); SCTP_BASE_INFO(sctp_asochash) = SCTP_HASH_INIT((SCTP_BASE_SYSCTL(sctp_hashtblsize) * 31), &SCTP_BASE_INFO(hashasocmark)); SCTP_BASE_INFO(sctp_ephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 851ed408092b..2c2cc58ee086 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -867,6 +867,14 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #endif #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + +#define SCTP_UINT_SYSCTL_TUN(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH); + +#define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ { \ @@ -885,9 +893,13 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC) + +#define SCTP_UINT_SYSCTL_RDTUN(mib_name, var_name, prefix) \ + SYSCTL_UINT(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLFLAG_RDTUN|CTLFLAG_NOFETCH, \ + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, prefix##_DESC); /* * sysctl definitions @@ -909,10 +921,10 @@ SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) -SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) -SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) -SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) From nobody Mon Oct 16 15:44:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8LyY4TvPz4xW3j; Mon, 16 Oct 2023 15:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8LyY3wtwz4bcG; Mon, 16 Oct 2023 15:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZURxd2brG8uf3YvfVsf+PQNfLvLi2tyz+KxArjxCZ8=; b=mBb1uZqh5VNQDSR9+mhII9x7flKCEd+SEqg7hZhEj6kyVHg1nj3ii2k/eXD+DWV0Qxo7gv de+j1tRpFP+nWaUzV0VTJZ6ji8aw6rwVAEG11vPEJdgQAn+TW/yA7BAClYfH/imhE7rZv2 2yWiy51H44bT2S6GSGa6FnOWNuKuA25WNWSZR2/i0zdw0R1f3agyt9LPGrzSJEDsgfgcE9 2CneiB+ezEeS4KwdYc4MeluSCUtGVA0CdcyXSlJj2CDaB8F2b7gcX9PilLqa5fhy1DDvVe Y3NsmXLL4ikLy9IJ9paKYksyq5NdHs5m+G9gVl9ck2HK2nU8vgzCHWqRlp+BIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697471077; a=rsa-sha256; cv=none; b=N6HQ8YWJr0jgZzxZVdKHDxLbf2D4tie7URmiKSRbPM6hY42B0e5U81a9FrtHtRkM9iNEmk Ui85r/w3NPcZWwVG4/PPjkSQcmVgx4dlSu5j45gAJp0+VMdhJtOBsgQPOd7iRbL/nQmjVT sfCfBnJdY6ZjSV1it6K+/GEKp1jIA+cMqcSKduAF2GSgg/w4cVZM+VTBAqvXOuCaptwmS/ zYq7kSINjMKzx2Ibjfcxz7C4jCw3SG2RoTEFSjXdMgi2CxnmxJqTOnnXtUF64F9VsQ0Qr6 m6wpxCKWwDiqxZncunFQ8Ju/EExMebCoWYxhUWykJ+TbZ5u/+g4q+H46pU7nRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZURxd2brG8uf3YvfVsf+PQNfLvLi2tyz+KxArjxCZ8=; b=mNPvXxXwComuJ3ncvi3BZ70Vv32cwolu8MPI94YqXKB/V3DxrMAzxNBOMItKyVu8jyMPe8 ZTbNPXKEQvRXEwKOrICR9bOUK7wrRpHmPJlm3gDgJxhYcMiRqq556UeA4qSOkr18W0K9wJ CVgsVQ2JeNnv+Cx+qzWW/rAp1Y8HCcqk/IeY/W7eabO2QMQf/x487+8qL4GtAi2X9ynB0V Asj5OZU68H5W2L3lXeNZOQviE9BsSVfXPhtM4qlCwckfNdKd4+E9mh+Zg60A+t02PHG3OI dXIBSqyyZgdnK6ktVU6qZ2tzYqJJ5c567Ycg+Mo2WbfGnV63f3uH4GW9f3R3nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8LyY2gDfzmXV; Mon, 16 Oct 2023 15:44: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 39GFib0g003922; Mon, 16 Oct 2023 15:44:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFibEn003919; Mon, 16 Oct 2023 15:44:37 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:44:37 GMT Message-Id: <202310161544.39GFibEn003919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 379f41a117eb - stable/13 - tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 379f41a117eb8aaf1dd43414658606d2ef0534a7 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=379f41a117eb8aaf1dd43414658606d2ef0534a7 commit 379f41a117eb8aaf1dd43414658606d2ef0534a7 Author: Zhenlei Huang AuthorDate: 2023-10-08 10:03:59 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:38:26 +0000 tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' No functional change intended. Reviewed by: cc, rscheff, #transport MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41998 (cherry picked from commit 38ecc80b2a4e5e11ece83ca4df63632f0b6fa394) (cherry picked from commit 3a97686fc11ae51ceb4004c07702a8a20f71410d) --- sys/netinet/tcp_subr.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 905a72dd1f91..9bf02d21a307 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -299,8 +299,17 @@ static int tcp_log_debug = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_debug, CTLFLAG_RW, &tcp_log_debug, 0, "Log errors caused by incoming TCP segments"); -static int tcp_tcbhashsize; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, +/* + * Target size of TCP PCB hash tables. Must be a power of two. + * + * Note that this can be overridden by the kernel environment + * variable net.inet.tcp.tcbhashsize + */ +#ifndef TCBHASHSIZE +#define TCBHASHSIZE 0 +#endif +static int tcp_tcbhashsize = TCBHASHSIZE; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); static int do_tcpdrain = 1; @@ -1052,16 +1061,6 @@ tcp_default_fb_fini(struct tcpcb *tp, int tcb_is_purged) return; } -/* - * Target size of TCP PCB hash tables. Must be a power of two. - * - * Note that this can be overridden by the kernel environment - * variable net.inet.tcp.tcbhashsize - */ -#ifndef TCBHASHSIZE -#define TCBHASHSIZE 0 -#endif - /* * XXX * Callouts should be moved into struct tcp directly. They are currently @@ -1374,11 +1373,8 @@ deregister_tcp_functions(struct tcp_function_block *blk, bool quiesce, void tcp_init(void) { - const char *tcbhash_tuneable; int hashsize; - tcbhash_tuneable = "net.inet.tcp.tcbhashsize"; - #ifdef TCP_HHOOK if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_IN, &V_tcp_hhh[HHOOK_TCP_EST_IN], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) @@ -1392,8 +1388,7 @@ tcp_init(void) printf("%s: WARNING: unable to initialise TCP stats\n", __func__); #endif - hashsize = TCBHASHSIZE; - TUNABLE_INT_FETCH(tcbhash_tuneable, &hashsize); + hashsize = tcp_tcbhashsize; if (hashsize == 0) { /* * Auto tune the hash size based on maxsockets. @@ -1410,7 +1405,7 @@ tcp_init(void) hashsize = 512; if (bootverbose && IS_DEFAULT_VNET(curvnet)) printf("%s: %s auto tuned to %d\n", __func__, - tcbhash_tuneable, hashsize); + "net.inet.tcp.tcbhashsize", hashsize); } /* * We require a hashsize to be a power of two. From nobody Mon Oct 16 15:44:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8LyZ53Jqz4xW3l; Mon, 16 Oct 2023 15:44: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 4S8LyZ4K76z4bZC; Mon, 16 Oct 2023 15:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3lVvYUB8Y+QHWPyjv6vxIhCup0Czv33oKdcE5h64D4=; b=gOvR449B5kBR+Hjaksz69kbJxDjIKnEWGKZbLTuuVEITiIvjgeDx1y8QRZL5yCxg1t63u3 ChHxmKq/TsZMQwVEcAr4iSW2nbqompfQsvdv/t09lj2jgl+yCBvp54J3DJH8Gyf/nBxmei POeh0DLAJJr8HAkOgo9Na9c6vgrb/HzkMo09SHYU4FIR9XFmVHZ183LUliIzA1/YT4/yKO //biN0OIyif7uu0vg1gBoDVpzCh13+Ug9FMkd2Kd6PrdtVQwSBypInxKBP6jF1oWng8yGj 7JF223RUqKsFZ/2KRsVDZKE2mjm+eMqrFtSmMWWLucQ1CUV+q/hlNV/jGas6Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697471078; a=rsa-sha256; cv=none; b=iYwgp8/XOM68D4ABubRsZ6gLWNn/BT2E9HW/VYQM9rq6bA7gBpdUIHCyp5Ar4dcMqNcYbd cUO4eFtfsL4PEHnSpFEPSaU47+E7G+0Dki+NGig4ljml6/X+AtK2hBdCSAd+mFrFYvERTg Eq+j4BgN2cwjqSQvJUb4bAOP+iIFunbNVcqnIwKXrtHYuBt3VAFcbTEWfWw9Tqn+fqf8Ps FdYY5A1kM9fN7buHJ+MVxfNjSlBYLCopSL4AZXOmH+paqR2Sg+iyjf0g0YYgBsPjTgQt8B XyA5VxwB7MT433xSCX0ew8eUn2QhVDBJuF95B4kxWKcC2KVUpVmDccQak6rRPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3lVvYUB8Y+QHWPyjv6vxIhCup0Czv33oKdcE5h64D4=; b=qkiJxWzvIhuo7RTNH3zW433da2N3V4fLxlL55ALxs+UUCv+vL6Cu4f9E3h0KOyND9UDN+d AvGx6aXMrieyvF9C1uDNtFr2zUJ0AmOCz6YD/xTxz+lk6e+fVg0lVNsRhUfln4qTLxpmjM Yw1a9VvaSf+sPYmVoBO7GtZjFEMAgiWNZaxVEDbNuhyYO6dc6RTzy5b7k1Uxq6dJiYkWY0 Zahmb1CyI60DCRHzbIwOa+Q5JeenKTm/WgwnMnT3953+mlp8CRMjL+BYseogfT6bq05DTX tBZa6DbbDc+rS2HW404IcEezHnjQpbauBX451EIeymmJCWYBr3k8AlTMyEdcHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8LyZ3NnFzmXW; Mon, 16 Oct 2023 15:44: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 39GFicSr003967; Mon, 16 Oct 2023 15:44:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFicxI003964; Mon, 16 Oct 2023 15:44:38 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:44:38 GMT Message-Id: <202310161544.39GFicxI003964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 69e05e06c60d - stable/13 - sctp: Various fixes for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 69e05e06c60d1f068fafcc4a26ef5efdb8771c71 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=69e05e06c60d1f068fafcc4a26ef5efdb8771c71 commit 69e05e06c60d1f068fafcc4a26ef5efdb8771c71 Author: Zhenlei Huang AuthorDate: 2023-10-09 04:36:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:38:26 +0000 sctp: Various fixes for loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.sctp.tcbhashsize 2. net.inet.sctp.pcbhashsize 3. net.inet.sctp.chunkscale The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale' are only used during vnet initializing, thus it make no senses to make them writable tunable. Validate the values of loader tunables on vnet initialize, reset them to theirs defaults if invalid to prevent potential kernel panics. Reviewed by: tuexen, #transport, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42007 (cherry picked from commit dac91eb7660324677d8a2f71bd6f192422355ba1) (cherry picked from commit fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2) --- sys/netinet/sctp_pcb.c | 8 ++++++++ sys/netinet/sctp_sysctl.c | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index cecc727ac77f..b5c78bb67745 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5690,6 +5690,11 @@ sctp_startup_mcore_threads(void) } #endif +#define VALIDATE_LOADER_TUNABLE(var_name, prefix) \ + if (SCTP_BASE_SYSCTL(var_name) < prefix##_MIN || \ + SCTP_BASE_SYSCTL(var_name) > prefix##_MAX) \ + SCTP_BASE_SYSCTL(var_name) = prefix##_DEFAULT + void sctp_pcb_init(void) { @@ -5731,6 +5736,9 @@ sctp_pcb_init(void) TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.chunkscale", &SCTP_BASE_SYSCTL(sctp_chunkscale)); + VALIDATE_LOADER_TUNABLE(sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_chunkscale, SCTPCTL_CHUNKSCALE); SCTP_BASE_INFO(sctp_asochash) = SCTP_HASH_INIT((SCTP_BASE_SYSCTL(sctp_hashtblsize) * 31), &SCTP_BASE_INFO(hashasocmark)); SCTP_BASE_INFO(sctp_ephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index d05274f32bca..88d16f71ef3c 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -864,6 +864,14 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #endif #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + +#define SCTP_UINT_SYSCTL_TUN(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH); + +#define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ { \ @@ -882,9 +890,13 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC) + +#define SCTP_UINT_SYSCTL_RDTUN(mib_name, var_name, prefix) \ + SYSCTL_UINT(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLFLAG_RDTUN|CTLFLAG_NOFETCH, \ + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, prefix##_DESC); /* * sysctl definitions @@ -906,10 +918,10 @@ SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) -SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) -SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) -SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) From nobody Mon Oct 16 15:51:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8M6F24dxz4xW7d; Mon, 16 Oct 2023 15:51: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 4S8M6F19xMz4cH1; Mon, 16 Oct 2023 15:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rD+ALDOLVcEvlgBs1Mx9MFAbnV9vYI42ZlHZ4ogPuIE=; b=mI7fe/nTQ2ZpQBBlC6f/X/SXYLgeJDSbgv0msi/SzdJVfGm9XN4vPY+cl5GyJwmebmXSc2 RaM+EpUY4KIyyIuSYlU/owmXfvClSxv8winKwem6Y+8AL+bUoeYXT23+hJ3ghD6AO8QxvJ NpLLWd/S1Y5zOirYYYfQXiW+Rynm8f1B8zmRdY47ZbXe0OGOprgEu3yUp9r+DJzm6saQK7 6JtZY2vcSLVrMrG8IDTNJMRo2STM8OUH0X9Ar2lZUmnwZyIHdOIYDCNosJa9i3vhC9CGce QOfAXy2RUQVP2v3kTdmV8ihfe5pwFcWTISkmPkZFJIfxPG2ICVj/c5qZ5JzJiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697471477; a=rsa-sha256; cv=none; b=Z3SPhli/GrgVnH/Bg0+ZqLPdd9WyBH796HN9FQSa1lr9S4Xzd3QswILT/qu33jHGvf5pZ0 M7CEubktZyZeNqCqhzheRRYpTgWVoPCjKDIJyj+SeaLsYmcPKTy9tlFaC+56bpXsLbO/iD Gkk1Xomz8qEfLvLS6jbfreDQ625vK+J6sIk/asr653mJIvlVXn6c31iRvInBJh/OIQetsB gVSs8SKr1AWAVo5O1Ns+DtVWsIOZegAfLSmLBP35MDP21uVeiC705+rpHUauL0T2M86bJ2 mzMTL+DQ7A6ETtVuksmfdS0gey3iRG93HYhSqRUSRzlHWDbvA/M1oG8NbtH6IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rD+ALDOLVcEvlgBs1Mx9MFAbnV9vYI42ZlHZ4ogPuIE=; b=THaHTvCI+1hySRfBXfOJBanvTfjp/g98r0jD8KqoU+JTIkRdJAU3SXewykvg4GtvEqz3lu cLsJ7ZiGlk1Z53dO+7JxoaE5vsWc1PnjU5fjTKx8m4KyobrY2xdrrhp2AhTT5GxFuKHKjY 1L21fZcodQKPOMAQjFuBpTlu7+RymeXxnNJhxZt0kJ/TCeEU+FR+i8zeLuBzfC+aokwC5C 1vJ/im97HwcRZuiwfC2OZBhGVeOdjASnN6vXxieFjGyu7+X2gjCZLEZzRWQFBa6zo7F2v5 yTqTRm8Z8Z1qs61ZKklW07Rgc/sTmf+QhKTqsyH1rTBx4lJDN/Rz/uceLgqEiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8M6F0GXszm4N; Mon, 16 Oct 2023 15:51: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 39GFpGBR014476; Mon, 16 Oct 2023 15:51:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFpG4G014473; Mon, 16 Oct 2023 15:51:16 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:51:16 GMT Message-Id: <202310161551.39GFpG4G014473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0a31dbecd43d - stable/12 - tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0a31dbecd43d3aaa4be053a9d3c21c3c81077604 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0a31dbecd43d3aaa4be053a9d3c21c3c81077604 commit 0a31dbecd43d3aaa4be053a9d3c21c3c81077604 Author: Zhenlei Huang AuthorDate: 2023-10-08 10:03:59 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:49:59 +0000 tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' No functional change intended. Reviewed by: cc, rscheff, #transport MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41998 (cherry picked from commit 38ecc80b2a4e5e11ece83ca4df63632f0b6fa394) (cherry picked from commit 3a97686fc11ae51ceb4004c07702a8a20f71410d) (cherry picked from commit 379f41a117eb8aaf1dd43414658606d2ef0534a7) --- sys/netinet/tcp_subr.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index c82a5bf21a15..2a5ab3d402c8 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -216,8 +216,17 @@ static int tcp_log_debug = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_debug, CTLFLAG_RW, &tcp_log_debug, 0, "Log errors caused by incoming TCP segments"); -static int tcp_tcbhashsize; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, +/* + * Target size of TCP PCB hash tables. Must be a power of two. + * + * Note that this can be overridden by the kernel environment + * variable net.inet.tcp.tcbhashsize + */ +#ifndef TCBHASHSIZE +#define TCBHASHSIZE 0 +#endif +static int tcp_tcbhashsize = TCBHASHSIZE; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); static int do_tcpdrain = 1; @@ -692,16 +701,6 @@ tcp_default_fb_fini(struct tcpcb *tp, int tcb_is_purged) return; } -/* - * Target size of TCP PCB hash tables. Must be a power of two. - * - * Note that this can be overridden by the kernel environment - * variable net.inet.tcp.tcbhashsize - */ -#ifndef TCBHASHSIZE -#define TCBHASHSIZE 0 -#endif - /* * XXX * Callouts should be moved into struct tcp directly. They are currently @@ -1017,11 +1016,8 @@ deregister_tcp_functions(struct tcp_function_block *blk, bool quiesce, void tcp_init(void) { - const char *tcbhash_tuneable; int hashsize; - tcbhash_tuneable = "net.inet.tcp.tcbhashsize"; - #ifdef TCP_HHOOK if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_IN, &V_tcp_hhh[HHOOK_TCP_EST_IN], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) @@ -1030,8 +1026,7 @@ tcp_init(void) &V_tcp_hhh[HHOOK_TCP_EST_OUT], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) printf("%s: WARNING: unable to register helper hook\n", __func__); #endif - hashsize = TCBHASHSIZE; - TUNABLE_INT_FETCH(tcbhash_tuneable, &hashsize); + hashsize = tcp_tcbhashsize; if (hashsize == 0) { /* * Auto tune the hash size based on maxsockets. @@ -1048,7 +1043,7 @@ tcp_init(void) hashsize = 512; if (bootverbose && IS_DEFAULT_VNET(curvnet)) printf("%s: %s auto tuned to %d\n", __func__, - tcbhash_tuneable, hashsize); + "net.inet.tcp.tcbhashsize", hashsize); } /* * We require a hashsize to be a power of two. From nobody Mon Oct 16 15:51:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8M6G4T59z4xWQ4; Mon, 16 Oct 2023 15:51: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 4S8M6G3Dq0z4cBF; Mon, 16 Oct 2023 15:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/CmWjWpi8+X7swOtfXmDrE78zm4zBDzfWuwYEAKUgiI=; b=EQHylpTYzC4EXLNSInsA/+jRyqOAdzAISrjCVEczxjz2W2fXOzMvdE0Nn33P/HT7rgvrpW 8EE00K9IINNby9rCT0clq+z5di5Ee+Kx9uvukur2TQm3KKnP14P8XwgSucUbUf6bf6NL2e mL8pMZXR2Twp3wGrTQUNWuR7Cg9LMvHdogRNIh5UGXOz4tXGcsgUJZbd0+9q/Dh+aZusMC 35bGobM03CjvZC89LokF5SpoZ6YlAsbdgvsP+/wSB/jfUWr4jZT0I+i5UHgroNgsg/hSC9 z2mAiEovHB66ovjdHcbAJ2JWTwFtNG/8KuN15B6oyOYSXrt8C3tFQmtSjV3VLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697471478; a=rsa-sha256; cv=none; b=QUD+VKoqPDCmGxwBkSsByQrRK3OfIKjqV+9eQZo2mllEeEB5b7y+xu6TwQaoYhYxg89ekr /MlmXreY5KdbbIKeU0N7tO9OMugfHvNw1UMvDgsof0xy8y2lLW5vtjBqKHTOXqCs+py0W8 h3cf64IQxXRcDGJy59rreJ46bsWuDYfPbSqDZ6RGVxt/PunhMnTyB6c4Ip1thk84mGPUf/ kwBchuzb0OAw0k4KJsKnb9xw7NBTulc9qs9GvVHHZAUzFARLTnDojuwYbDyMje4w42DszD BXE4imLbwf843gC6hStVxM0xrPkQaTFtJ7vGDpz/al5TvWQn/MhZ/Mn0BhZa3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697471478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/CmWjWpi8+X7swOtfXmDrE78zm4zBDzfWuwYEAKUgiI=; b=WT4/dT5FTx2/j+QUSZDQCe9sMTWA3Cr3gN83Y9I23LeFGq8X0dOqGRFpcoeMWoXs4PQBtT GtEazIe1VV9MNtGpx8UGBFHkrlMagmeLuqT3WmzVLBYLdxVkDQTY0hUz54NaUhrHaYXLKI tll/Ftq3ytvKvPRpI+8gHj59Z5MHxKqZTeKL5V3eAL9FgPai0F8X4ORpkqeYI9tNiEa5ZU k6CM2IOE5gSK2jtT91RLVj5nGAKPnm8fLOlWunnktTGcKFh9HruVlFv+7gP/2ELh04Ibpi oMckTF7HnDm/cI0HY/6JrXo7mvQz846E+sxpbnnDdL3C2Hgf1vA25rTaFNeKBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8M6G15FYzm07; Mon, 16 Oct 2023 15:51: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 39GFpIra014524; Mon, 16 Oct 2023 15:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GFpIVk014521; Mon, 16 Oct 2023 15:51:18 GMT (envelope-from git) Date: Mon, 16 Oct 2023 15:51:18 GMT Message-Id: <202310161551.39GFpIVk014521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 53379a40395d - stable/12 - sctp: Various fixes for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 53379a40395dc4e66540c1c539dd1b70d8592852 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=53379a40395dc4e66540c1c539dd1b70d8592852 commit 53379a40395dc4e66540c1c539dd1b70d8592852 Author: Zhenlei Huang AuthorDate: 2023-10-09 04:36:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-16 15:49:59 +0000 sctp: Various fixes for loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.sctp.tcbhashsize 2. net.inet.sctp.pcbhashsize 3. net.inet.sctp.chunkscale The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale' are only used during vnet initializing, thus it make no senses to make them writable tunable. Validate the values of loader tunables on vnet initialize, reset them to theirs defaults if invalid to prevent potential kernel panics. Reviewed by: tuexen, #transport, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42007 (cherry picked from commit dac91eb7660324677d8a2f71bd6f192422355ba1) (cherry picked from commit fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2) (cherry picked from commit 69e05e06c60d1f068fafcc4a26ef5efdb8771c71) --- sys/netinet/sctp_pcb.c | 8 ++++++++ sys/netinet/sctp_sysctl.c | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index a1e6ebb8589b..4761fb69c05f 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5743,6 +5743,11 @@ sctp_startup_mcore_threads(void) } #endif +#define VALIDATE_LOADER_TUNABLE(var_name, prefix) \ + if (SCTP_BASE_SYSCTL(var_name) < prefix##_MIN || \ + SCTP_BASE_SYSCTL(var_name) > prefix##_MAX) \ + SCTP_BASE_SYSCTL(var_name) = prefix##_DEFAULT + void sctp_pcb_init(void) { @@ -5785,6 +5790,9 @@ sctp_pcb_init(void) TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.chunkscale", &SCTP_BASE_SYSCTL(sctp_chunkscale)); + VALIDATE_LOADER_TUNABLE(sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_chunkscale, SCTPCTL_CHUNKSCALE); SCTP_BASE_INFO(sctp_asochash) = SCTP_HASH_INIT((SCTP_BASE_SYSCTL(sctp_hashtblsize) * 31), &SCTP_BASE_INFO(hashasocmark)); SCTP_BASE_INFO(sctp_ephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 6e3b1d4ac3d5..2d5e573c0f8e 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -838,6 +838,14 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #endif #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + +#define SCTP_UINT_SYSCTL_TUN(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH); + +#define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ { \ @@ -856,9 +864,13 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC) + +#define SCTP_UINT_SYSCTL_RDTUN(mib_name, var_name, prefix) \ + SYSCTL_UINT(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLFLAG_RDTUN|CTLFLAG_NOFETCH, \ + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, prefix##_DESC); /* * sysctl definitions @@ -880,10 +892,10 @@ SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) -SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) -SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) -SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) From nobody Mon Oct 16 17:50:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8PmD5slqz4xctR; Mon, 16 Oct 2023 17:50: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 4S8PmD4r5Lz3bVf; Mon, 16 Oct 2023 17:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697478652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKq0o/MMOwalIke1WTOV8mVnsluUoRdwO8mjGxbm8/w=; b=ypvfKPrMRCQEFcBR58Vib6slEeohPp20GfeOPLhj69aEFK2DuxjsKyXmPHSWakTUhVX4G2 FDa0dgbQQlQPXd/AfvP5akNBvey3lHwnIY6wj63xwfrc2tut3jRfGMzoHOuJfWobQnfee2 Gb61sHpkaaniKRpvttXSB5FTAX79V669lF3lAFUsVyyi/nD+voZWCggVfKNzPqe4IhjCBv bKnkfZbVI92rcLQw47d4KOf525th8UQnMqVfRzGkdnlpOo5BKLKGak7jZCCP8VV47Z3bFG SbbQje1ni/3f5uT8k+c1ySU0lQ3KfLC7MAU/p0UNzOymokYn7oit9z7Zy5OfBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697478652; a=rsa-sha256; cv=none; b=eAToO4KD8Qyob3Irjr6d9MfrNEZiQ+1jCXn4yJqCPrW6qXCjDjFzrlkUJm+IVm67X2Iqjs 7TS52y0WxMH6kkYDv2RIH+3/Czir1JL3CL4foqUuImRViFCFdIpGQdKpKYg0MIWl7sv2m6 Oh0QRz92q4YapyLL4bn9XWvoHBKMcf5ONDwwRa0gZtaWgS7giu8MyHQ2SWi3+eu9s17TgY m9+7BhkWLBKKRSXPd8ZZ1gmDDZ6HbxTMlo5hwBlPOhGFiHRJVyuLTOd/eKOXBzZFjcXA6J 6zuOp9z1GJc7Ntpafh+uxPJtglyDYAUKtrwiTF1kjH+0UTIXlMKzcZhR/QoRPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697478652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKq0o/MMOwalIke1WTOV8mVnsluUoRdwO8mjGxbm8/w=; b=eELDhxkkMdaGHsds8JincnZRSmxUBtC6YIpyyqBb6ALeT/fvNq+EePHj9Y6aLtsVQHWQ4f dvldITbB/fAGjagB+l8GHF2/JMhDM8km3rDhEKiWpyp1bj09tW+ODS2SXkIbULjlnNyX22 aY2oG81Dwe9FvAkk+ISYQFSOCnPniv/rh2YGwrUnVAl9XfPXxd2v27ry5eprG6V76+y/Co cR+SyParqX5bRPgmfeFVFsMKv5SrFN+/qd9kl3hqPmerLH07iThgHMTxb5p1C2IFGCejXR X2SsaMV2jKFMwfwlhkSiKbGdQfb4/zlNjx64CNCnaCKMnnOMtPNLiTUAsmEykg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8PmD3v78zqbG; Mon, 16 Oct 2023 17:50: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 39GHoqkE022780; Mon, 16 Oct 2023 17:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GHoqRq022777; Mon, 16 Oct 2023 17:50:52 GMT (envelope-from git) Date: Mon, 16 Oct 2023 17:50:52 GMT Message-Id: <202310161750.39GHoqRq022777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6eae573dc229 - stable/14 - ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6eae573dc2298e3e0d97b0d829828a427254946c Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6eae573dc2298e3e0d97b0d829828a427254946c commit 6eae573dc2298e3e0d97b0d829828a427254946c Author: Ed Maste AuthorDate: 2023-10-13 20:25:53 +0000 Commit: Ed Maste CommitDate: 2023-10-16 17:50:10 +0000 ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r POSIX has accepted a proposal[1] to add glibc-compatible ptsname_r. It indicates an error by returning the error number, rather than returning -1 and setting errno. Update RETURN VALUES in ptsname_r's man page now to encourage folks to test that the return value != 0 rather than == -1. [1] https://www.austingroupbugs.net/bug_view_page.php?bug_id=508 Reported by: Collin Funk Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42204 (cherry picked from commit a5ed6a815e38d6c622cd97a6020592ded579cf7a) --- lib/libc/stdlib/ptsname.3 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/ptsname.3 b/lib/libc/stdlib/ptsname.3 index 532ce9e92ae0..df23e9ae6129 100644 --- a/lib/libc/stdlib/ptsname.3 +++ b/lib/libc/stdlib/ptsname.3 @@ -29,7 +29,7 @@ .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 17, 2020 +.Dd October 14, 2023 .Dt PTSNAME 3 .Os .Sh NAME @@ -104,7 +104,7 @@ function clears the lock held on the pseudo-terminal pair for the master device specified with .Fa fildes . .Sh RETURN VALUES -.Rv -std grantpt ptsname_r unlockpt +.Rv -std grantpt unlockpt .Pp The .Fn ptsname @@ -112,6 +112,19 @@ function returns a pointer to the name of the slave device on success; otherwise a .Dv NULL pointer is returned. +.Pp +The +.Fn ptsname_r +function returns the value 0 if successful; +otherwise a nonzero value is returned and the global variable +.Va errno +is set to indicate the error. +Note: +.Fn ptsname_r +was previously documented as returning -1 on error. +In the future it will be changed to return an error number, for POSIX +compatibility. +Therefore, callers should not check for -1. .Sh ERRORS The .Fn grantpt , From nobody Mon Oct 16 17:53:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Ppm1D8Kz4xd06; Mon, 16 Oct 2023 17:53: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 4S8Ppm0n84z3cWY; Mon, 16 Oct 2023 17:53:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697478784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iglNtaecCwgF/yg12pECPzqUXqwPwIlxTmz4KvGxJzk=; b=pTL48YKWWLhqFtqycx7Hs0pNnkvGwwyg9Boc3souILqVFwc+CD4IcOaH/TzSFphmnhUQNd m9awD/ctvMvV1YvuQtAoPYJNIQTKcw4iKmuj+pEsdAKgr63mEi50AQpClB41dVNG2+tiUl q0qiGH1lDzTXdZgox1QhBK7jTBokOdNnWJE94X8hskGGKTPsG0gJROX4/jrdTJzj1ygqEP Gg5JFbxl34lQyl6yvIBJTCxEM5Uu3PlUPgROzPvEkbVzZrehod3Wrq8+3xrJqusS0dsABQ 8UpdbahM53GXHzuZxXUhdttP9SMvhaswQw20YqpJelS35SGGa9hJwkyRkin75w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697478784; a=rsa-sha256; cv=none; b=Fmlj/hPrtV082tJdILM/N0LSMDfYxdJKj+BhXq1ZWCv9jHXMwfwxRVoqCqeuypXjy1V4z4 IbDAxW6q7X8qVv9bBRtjL3QLaKnJl+vSTF5HOkf+SpTC6MrAyI+tKBXbkcXepUhnVJ1ixx jJCo6oUl+Cu0ux6bqqqZ4ewQV8N0Dl8iR/aQzCDaNlFCx7oTjioVc0xM5YANAyf78tUboe oJXhyE06wTrSPo0hAzRZATTS/dZA6R4l17tQEcgLMiUhfftgr4K75ZTyEtLAKIh1boSAzA yUpGAPSFEaKR0m/UR8Wm7A+5kRoV5H3gsPyCnJixgiEr+MOH/Efw5dmdzOcL7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697478784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iglNtaecCwgF/yg12pECPzqUXqwPwIlxTmz4KvGxJzk=; b=hg/+/3S5eZKtqyn0UtKpDuXBKkhN4rG45R0dHwEK/2Pxr4KuFLs2kFCwxeT+y91Y1asDMO lhp/yXf6JsXufgk75pMMlsBjXrGX9Wrtgump1BSQkwsIE5StCYLaeiPG0D/cs0bIEehQxu gnYvGlaQw7BtPtsfCdyk/yROrsFgPjyd9HU47toDR41Adg07gCVLmIgV1zX8edneylNa3z Igghu0ByjznToawG3h81z2YQtZWWBcZQKijrMf5LYNmI1HPYB9sj2Z2EsfWIDW1TEsp87X 1kV2bYqWOxUPiA9J7Pjtk6izP9HEcrW98aTFLFsQGM+lhrY0ZVx2Q9cFAN4EJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Ppl6g2Lzq2n; Mon, 16 Oct 2023 17:53: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 39GHr3T8027781; Mon, 16 Oct 2023 17:53:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GHr3Qd027778; Mon, 16 Oct 2023 17:53:03 GMT (envelope-from git) Date: Mon, 16 Oct 2023 17:53:03 GMT Message-Id: <202310161753.39GHr3Qd027778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c90c45ac725b - stable/13 - ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c90c45ac725ba2a7f9bb940a1d555a025b7e47aa Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c90c45ac725ba2a7f9bb940a1d555a025b7e47aa commit c90c45ac725ba2a7f9bb940a1d555a025b7e47aa Author: Ed Maste AuthorDate: 2023-10-13 20:25:53 +0000 Commit: Ed Maste CommitDate: 2023-10-16 17:52:57 +0000 ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r POSIX has accepted a proposal[1] to add glibc-compatible ptsname_r. It indicates an error by returning the error number, rather than returning -1 and setting errno. Update RETURN VALUES in ptsname_r's man page now to encourage folks to test that the return value != 0 rather than == -1. [1] https://www.austingroupbugs.net/bug_view_page.php?bug_id=508 Reported by: Collin Funk Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42204 (cherry picked from commit a5ed6a815e38d6c622cd97a6020592ded579cf7a) --- lib/libc/stdlib/ptsname.3 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/ptsname.3 b/lib/libc/stdlib/ptsname.3 index 532ce9e92ae0..df23e9ae6129 100644 --- a/lib/libc/stdlib/ptsname.3 +++ b/lib/libc/stdlib/ptsname.3 @@ -29,7 +29,7 @@ .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 17, 2020 +.Dd October 14, 2023 .Dt PTSNAME 3 .Os .Sh NAME @@ -104,7 +104,7 @@ function clears the lock held on the pseudo-terminal pair for the master device specified with .Fa fildes . .Sh RETURN VALUES -.Rv -std grantpt ptsname_r unlockpt +.Rv -std grantpt unlockpt .Pp The .Fn ptsname @@ -112,6 +112,19 @@ function returns a pointer to the name of the slave device on success; otherwise a .Dv NULL pointer is returned. +.Pp +The +.Fn ptsname_r +function returns the value 0 if successful; +otherwise a nonzero value is returned and the global variable +.Va errno +is set to indicate the error. +Note: +.Fn ptsname_r +was previously documented as returning -1 on error. +In the future it will be changed to return an error number, for POSIX +compatibility. +Therefore, callers should not check for -1. .Sh ERRORS The .Fn grantpt , From nobody Mon Oct 16 22:48:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8XMW48Ktz4xtf3; Mon, 16 Oct 2023 22:48: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 4S8XMW3fmWz4ZCy; Mon, 16 Oct 2023 22:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvfwkAAjWvHu/TfEDcU5cD/CTqhKn9lbU4yj8pxmCQQ=; b=GI/rMlTDwbJfE/4iOnSlxnajaEMZEAtoZgtBa59vMr+5tNLruv83qqPETDZkm4mjGBB9Vd LtXsNzFZUelxiXjYpeF/Rt5NzJZaOOWS20kL7buCaJjbMRgQbFbOL4OBQjIbigWEaOwQzG CG47VkSOEQw62pOG96h3bFv++kvtm9Hirb3sJpMErxPziclCpGxzposSgyRU2xEHqfaDvd GetCJ5rHPnULr+NTUj0tfpGXWVebck19QtjVwIE9o8yIyRkNxCi3IdZ6OyPpdoDemKZhN0 2vTqzJiT4iCezRe82Fof46LcNrW8odCmyE4WbgREpipfS/U7eeMJLKd3I0VBOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697496503; a=rsa-sha256; cv=none; b=XddiLPiVEm4eLhpCVWnoyBkc4DD2GzdjijytLuKHQKRANTCbMSG56jctlih9A/KU+cHAFH Q88te923aoIAl/YRMjG3XkLMiMqF6aqaK2nYwHppt99kvKDig616Jqpyu5JWXReN2+e/dW K8fJZkUkIyKajktQZ+o4VmFV98hgF41Y8y1lp/UTliouMX0Oa2uzgHkolyoQ/HHK0c3DVK KRD5RyPVQPFZ9sKEc5y2G441Qy4bjIMkbc1jHXDUMJnLg5hXg8QEVQ8F/3SSPUgZ+N+LRC Jtwvnbope0lQXI+fQYxadbaWmyE6DCs1g607iDUkdA7IvqAXwrqSePqFc8SeSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvfwkAAjWvHu/TfEDcU5cD/CTqhKn9lbU4yj8pxmCQQ=; b=ry0mN7qel3o9timkzhkPEegvkgOR74i80OrK2hSLNiZH4REzyEeYo7H0pEKdgYZst1BpzY TvxPItQYWSfidJtti6qDjxfrjYtt57KQspIsFhRSd5lNkxTjXiyEAUiiH1GPsjVan2P18r CRIpj7RvrSIbxkQ20y15Mg2kCDGC8KAC2aJTh8rKqNP9EIA2AaPw+4jQVDGUFd+FFsEHTF lQVLNCFYTbEdM8ehAkml88VhFAIVas9dMXpPvSYGo/nXA2qXs9kkESaiCSEuKMTDUnK77o Iok9JTomYbeO6mLTy0Wy0niFf8dtSfW64A8y9hDvbHj6NGrINmp3VogIE2loEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8XMW2h3xzyRT; Mon, 16 Oct 2023 22:48: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 39GMmNAD013016; Mon, 16 Oct 2023 22:48:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GMmNL1013013; Mon, 16 Oct 2023 22:48:23 GMT (envelope-from git) Date: Mon, 16 Oct 2023 22:48:23 GMT Message-Id: <202310162248.39GMmNL1013013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c886dfb048f9 - releng/14.0 - tzsetup: add support for countries in two continents List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c886dfb048f9dd97d418c280d2aea1f5f4752d3e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c886dfb048f9dd97d418c280d2aea1f5f4752d3e commit c886dfb048f9dd97d418c280d2aea1f5f4752d3e Author: Pierre Pronchery AuthorDate: 2023-07-27 16:07:22 +0000 Commit: Ed Maste CommitDate: 2023-10-16 22:47:48 +0000 tzsetup: add support for countries in two continents This supports countries located across multiple continents, as per the zone1970.tab file. This only affects Cyprus and Türkiye at the moment. PR: 236874 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41306 (cherry picked from commit 914ab28c598c108bcfa5c040cc3056a8e6fc3811) (cherry picked from commit 9ef162b2392f34a88fb40b560ef700d0aacadfe1) Approved by: re (karels) --- usr.sbin/tzsetup/tzsetup.c | 67 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 5dfe840528b5..4279f888a33f 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -276,6 +276,7 @@ struct country { char *tlc; int nzones; struct continent *override; /* continent override */ + struct continent *alternate; /* extra continent */ TAILQ_HEAD(, zone) zones; dialogMenuItem *submenu; }; @@ -374,6 +375,18 @@ find_country(int lineno, const char *tlc) return (cp); } +static void +add_cont_to_country(struct country *cp, struct continent *cont) +{ + struct zone *zp; + + TAILQ_FOREACH(zp, &cp->zones, link) { + if (zp->continent == cont) + return; + } + cp->alternate = cont; +} + static void add_zone_to_country(int lineno, struct country *cp, const char *descr, const char *file, struct continent *cont) @@ -441,13 +454,13 @@ read_zones(void) struct country *cp; size_t len; char *line, *country_list, *tlc, *file, *descr; + char *p, *q; int lineno; - bool pass1; + int pass = 1; fp = fopen(path_zonetab, "r"); if (!fp) err(1, "%s", path_zonetab); - pass1 = true; again: lineno = 0; @@ -457,7 +470,9 @@ again: errx(1, "%s:%d: invalid format", path_zonetab, lineno); line[len - 1] = '\0'; - if (pass1) { + switch (pass) + { + case 1: /* * First pass: collect overrides, only looking for * single continent ones for the moment. @@ -481,7 +496,8 @@ again: cp = find_country(lineno, tlc); cp->override = cont; } - } else { + break; + case 2: /* Second pass: parse actual data */ if (line[0] == '#') continue; @@ -498,11 +514,34 @@ again: add_zone_to_country(lineno, cp, descr, file, cont); } + break; + case 3: + /* Third pass: collect multi-continent overrides */ + if (strncmp(line, "#@", strlen("#@")) != 0) + continue; + line += 2; + country_list = strsep(&line, "\t"); + /* Skip single-continent overrides */ + if (strchr(line, ',') == NULL) + continue; + while (line != NULL) { + cont = find_continent(lineno, line); + p = q = strdup(country_list); + if (p == NULL) + errx(1, "malloc failed"); + while (q != NULL) { + tlc = strsep(&q, ","); + cp = find_country(lineno, tlc); + add_cont_to_country(cp, cont); + } + free(p); + strsep(&line, ","); + } + break; } } - if (pass1) { - pass1 = false; + if (pass++ < 3) { errno = 0; rewind(fp); if (errno != 0) @@ -555,6 +594,12 @@ make_menus(void) if (zp2 == zp) zp->continent->nitems++; } + + for (i = 0; i < NCONTINENTS; i++) { + if (cp->alternate == continent_names[i].continent) { + continent_names[i].continent->nitems++; + } + } } /* @@ -611,6 +656,16 @@ make_menus(void) dmi->fire = set_zone_menu; dmi->data = cp; } + + if (cp->alternate != NULL) { + cont = cp->alternate; + dmi = &cont->menu[cont->nitems]; + memset(dmi, 0, sizeof(*dmi)); + asprintf(&dmi->prompt, "%d", ++cont->nitems); + dmi->title = cp->name; + dmi->fire = set_zone_menu; + dmi->data = cp; + } } } From nobody Mon Oct 16 22:54:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8XVB0YKSz4xtxm; Mon, 16 Oct 2023 22:54: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 4S8XVB03MVz4bL2; Mon, 16 Oct 2023 22:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=REgP9hII+L5Vk9tPumY9LvZKcAMmKI3lJVMZIW3t1PQ=; b=C/CrsqzDb+mpR26qTo59ctM30HPg2RhPfT0g2Jable270ZHCVyyUvepauMnr2yPKQIwGDW +BOaxBkje8UhspDra4EOkd3wsfBcyqfKWfhUmMdFX2XuvVB1bc5DdeL17xgpHbtCGC1DyC wvq7kFfuohAX7vGw65N16YdSvOKjOjhlNxtPG0NqJ5fyaagvxiQYyb1wKMXgh7IgbBIKYf Gt8QJMo9z9/jLhdzPVjN/Iuaz9NgabQEKn4QijjiTvsO87VnIWNgTmuNf3Y0yTCU9p/1km 88Mn/BggHsvYBmeuEDuL7Iqr+gJ0aGbAsct41OCEBHIrGP/UaocIbgXJCllg7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697496850; a=rsa-sha256; cv=none; b=PethUk2xcSh0/TPHGFL1LtZR0YRb5SGXEwkteTh9V+EPBDZ1knZDnAOjTnrrs1jiqU1J4S OHjr0NW9cVrhm3+fXCLsa4YCVE74tg9bx253ydj8ieosFy+N1ntAfQB1GzKR9MKQTPJ1pQ syZjHIvhQ8ykbvf3Zo4ZEVHiAfXwgkVcep1PP6a5p19dZB9s3tj1Xv2k2FNqNT9XpTnSZe 84iEc84OdklhZmVmrHUA4yf0G9T7XGSdXpUVfJJij0OUjN9D7ajCliiW72yd9nCYjMuDaS K7v5p6qk39ofLJk+Y9tH9cupX9pNcPM54NraENFfTX6Vz3vsFA+fBFANdORA2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=REgP9hII+L5Vk9tPumY9LvZKcAMmKI3lJVMZIW3t1PQ=; b=PjS7yudowqUKLACo9/lTRev4ObjtMgmkoF6uahcOiIbSDOyKC5ENHfk17l/3pCIzs3n4I8 aBzHQIQ7pL4nsaYVyBdZwlhuC73B7FKcYoPVEMdjUvwhDORaeOysQdqXTYK0x2m8xE9O+m SW+i76Yml4O5nTXNty63Q1DpJNIbHho2+xsP6lcLwFBAEzYq+hUCtUrJgAc7UjFiCD5K9t xU5ckHiHpeTMWPYgZa6QNag3YYryA2GP76r6kAIasIStcvcstGnWJPSVra5QLr8duLeAql BhUEoeLDOLO3QrZM/EH5LV7QklHD7JV1JdMhKj2hvtM4kQdcm8T1oddoDqfdTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8XV96CNBzywM; Mon, 16 Oct 2023 22:54: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 39GMs94T029282; Mon, 16 Oct 2023 22:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GMs98p029279; Mon, 16 Oct 2023 22:54:09 GMT (envelope-from git) Date: Mon, 16 Oct 2023 22:54:09 GMT Message-Id: <202310162254.39GMs98p029279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7bc17b59f802 - releng/14.0 - Handle MOVED_LIBS in list-old-files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7bc17b59f802d313b72930030e20e664a1c42ea2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc17b59f802d313b72930030e20e664a1c42ea2 commit 7bc17b59f802d313b72930030e20e664a1c42ea2 Author: Ed Maste AuthorDate: 2023-10-13 18:06:58 +0000 Commit: Ed Maste CommitDate: 2023-10-16 22:48:57 +0000 Handle MOVED_LIBS in list-old-files MOVED_LIBS is used when a library moves from one directory to another, e.g. /usr/lib/libc++.so.1 to /lib/libc++.so.1. delete-old-files and delete-old-libs are two separate steps, so that old libraries can be retained until third party software packages are rebuilt or reinstalled. Having two copies of the same shared library with the same so version (as can happen when delete-old-libs hasn't been run) causes trouble. The PR below gives one example. Libraries listed in MOVED_LIBS are logically equivalent to updating a library without changing the so version, and should be removed as soon as possible. Handle them in list-old-files and thus delete-old-files. Leave them also in *-old-libs for now, in case the user updates their tree between running delete-old-files and delete-old-libs. PR: 272642 Reviewed by: dim Sponsored by: The FreeBSD Foundation Co-authored-by: Dimitry Andric Differential Revision: https://reviews.freebsd.org/D42197 (cherry picked from commit 922337e8d3989e4f54a0338b7fc397e3e0af7832) (cherry picked from commit 73099785902d750f96d07f2c413db062bf0e47bd) Approved by: re (karels) --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 45d034c0002c..01d3328726bd 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3306,6 +3306,7 @@ list-old-files: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \ + -V "MOVED_LIBS:ts\n" \ ${_ALL_libcompats:@v@-V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib$v,:ts\n"@} \ ${_ALL_libcompats:@v@-V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} | \ sort From nobody Mon Oct 16 23:05:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xkw3h5Kz4xvLR; Mon, 16 Oct 2023 23:05: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 4S8Xkw3493z4dJf; Mon, 16 Oct 2023 23: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=1697497512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L+cGer3y/qt0B4xJCHXaY4vXzdAdMuV0KTs3VxiIZYU=; b=q+O04aDCr5YUf4jQWMitY9Df6CASJ6jvvvC0NSFHAnNRrurgvIKt7NbO+UET1XzCMQYPUr z3rs1UTNBxGYpRvRgmVsiRFPIFnI6m84Dqnx3INAzkMiFAgYgaGqwT5b8Rnx+gQEN66SVk 0pziK0I7AVzvcshi7HkZKvZbbSuUo5wY98qAWoB5mp5uwKRz1u5jRkowLVmx7oJtIuxCPp j5EjrK9O4cN1ugEA16ZBWa7PKhsOriq8znUUQhCmSEBYzEt5ZhQ8vxVNmZd++grrW27k8P r5OYhFMVDbnzHoV17O9Ish6yFrvQ07YJsXr3/wlBvmr1GYU5lLJJLb072AQrpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497512; a=rsa-sha256; cv=none; b=skJ4wdM1NejEZ2AKvuUQJpuy487WSP0yZg+rS+r2p8WRx713JgAoPI0zeXaA50ApMOUvCv EZqpco/LIMvZJqKY/3FpFQ9MfrWHUttdeOlpx1gNMyeHiLSwMYlYPlBTXmrDjpSgeaekgH rP01Ip/C55BhL8yO52t7QjkL1ULHKQNlHbrrEzExh83EU36QAJNTwJzMIn3aYL5qj8ngiE Ob7blj0vbgEThb1DIlwYUD71YRjKvJzXZat7dLemyrny0m4zu7jRR2sweggvCWJkzZIKQ+ HuNT8I6HjjCpbgO4isY8vYKyOWPKbdP6kL55HpGEAes3XQvs2qWfuqE+r8fqsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L+cGer3y/qt0B4xJCHXaY4vXzdAdMuV0KTs3VxiIZYU=; b=QxMOpVqV8uJl9aBHASvAzPnEnych+oV6x7rMWChv07ouonNTL82lrOSUjjMOg0yXWONWpN /6sqvIQ/5BG6coaSjrWy+a2ilfWdM3yb2FR3ly3rcdSaL+3yHmqBhFwhe6Ij/yHUjclV13 zs57wgOKaZ4tGbBUx4nKAVhiCjEUUAihs7Dwuhg372j6173uUyXQ7RIv4OWe1d8JvrTFqr 6Z3yq0x7zF+bWBcbp22TqEg3iFaRMDL0lC0y92YWJ7SAsBPU7hJSoiDMMOMzYSO9CP8lkF K7VFJQB/JseUOAGJNnbM3cJSS9llOB5/wkNDY6L23jUJJ/dQ98Qr9RItuY+hlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xkw26bzz10MD; Mon, 16 Oct 2023 23: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 39GN5Cgx046585; Mon, 16 Oct 2023 23: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 39GN5CSO046583; Mon, 16 Oct 2023 23:05:12 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:12 GMT Message-Id: <202310162305.39GN5CSO046583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c1e05a5e1a3e - releng/14.0 - virtio_random: Pipeline fetching the data List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c1e05a5e1a3e94633a050026e26211aaae59cabc Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1e05a5e1a3e94633a050026e26211aaae59cabc commit c1e05a5e1a3e94633a050026e26211aaae59cabc Author: John-Mark Gurney AuthorDate: 2023-09-05 15:59:43 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 virtio_random: Pipeline fetching the data Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion. If data has not been returned from an previous fetch during read, just return EAGAIN rather than blocking. Co-authored-by: John Baldwin Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41656 (cherry picked from commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2) (cherry picked from commit b7f5e993476f6e445895383e73aed01741f8b9cf) Approved by: re (karels) --- sys/dev/virtio/random/virtio_random.c | 73 +++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c index c02b5c98cece..d54e2e6b70d4 100644 --- a/sys/dev/virtio/random/virtio_random.c +++ b/sys/dev/virtio/random/virtio_random.c @@ -54,6 +54,8 @@ struct vtrnd_softc { struct virtqueue *vtrnd_vq; eventhandler_tag eh; bool inactive; + struct sglist *vtrnd_sg; + uint32_t *vtrnd_value; }; static int vtrnd_modevent(module_t, int, void *); @@ -67,6 +69,7 @@ static int vtrnd_negotiate_features(struct vtrnd_softc *); static int vtrnd_setup_features(struct vtrnd_softc *); static int vtrnd_alloc_virtqueue(struct vtrnd_softc *); static int vtrnd_harvest(struct vtrnd_softc *, void *, size_t *); +static void vtrnd_enqueue(struct vtrnd_softc *sc); static unsigned vtrnd_read(void *, unsigned); #define VTRND_FEATURES 0 @@ -138,12 +141,17 @@ static int vtrnd_attach(device_t dev) { struct vtrnd_softc *sc, *exp; + size_t len; int error; sc = device_get_softc(dev); sc->vtrnd_dev = dev; virtio_set_feature_desc(dev, vtrnd_feature_desc); + len = sizeof(*sc->vtrnd_value) * HARVESTSIZE; + sc->vtrnd_value = malloc_aligned(len, len, M_DEVBUF, M_WAITOK); + sc->vtrnd_sg = sglist_build(sc->vtrnd_value, len, M_WAITOK); + error = vtrnd_setup_features(sc); if (error) { device_printf(dev, "cannot setup features\n"); @@ -174,6 +182,8 @@ vtrnd_attach(device_t dev) sc->inactive = false; random_source_register(&random_vtrnd); + vtrnd_enqueue(sc); + fail: if (error) vtrnd_detach(dev); @@ -185,6 +195,7 @@ static int vtrnd_detach(device_t dev) { struct vtrnd_softc *sc; + uint32_t rdlen; sc = device_get_softc(dev); KASSERT( @@ -197,7 +208,13 @@ vtrnd_detach(device_t dev) sc->eh = NULL; } random_source_deregister(&random_vtrnd); + + /* clear the queue */ + virtqueue_poll(sc->vtrnd_vq, &rdlen); + atomic_store_explicit(&g_vtrnd_softc, NULL, memory_order_release); + sglist_free(sc->vtrnd_sg); + zfree(sc->vtrnd_value, M_DEVBUF); return (0); } @@ -251,49 +268,45 @@ vtrnd_alloc_virtqueue(struct vtrnd_softc *sc) return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); } +static void +vtrnd_enqueue(struct vtrnd_softc *sc) +{ + struct virtqueue *vq; + int error __diagused; + + vq = sc->vtrnd_vq; + + KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); + + error = virtqueue_enqueue(vq, sc, sc->vtrnd_sg, 0, 1); + KASSERT(error == 0, ("%s: virtqueue_enqueue returned error: %d", + __func__, error)); + + virtqueue_notify(vq); +} + static int vtrnd_harvest(struct vtrnd_softc *sc, void *buf, size_t *sz) { - struct sglist_seg segs[1]; - struct sglist sg; struct virtqueue *vq; - uint32_t value[HARVESTSIZE] __aligned(sizeof(uint32_t) * HARVESTSIZE); + void *cookie; uint32_t rdlen; - int error; - - _Static_assert(sizeof(value) < PAGE_SIZE, "sglist assumption"); if (sc->inactive) return (EDEADLK); - sglist_init(&sg, 1, segs); - error = sglist_append(&sg, value, *sz); - if (error != 0) - panic("%s: sglist_append error=%d", __func__, error); - vq = sc->vtrnd_vq; - KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); - - error = virtqueue_enqueue(vq, buf, &sg, 0, 1); - if (error != 0) - return (error); - - /* - * Poll for the response, but the command is likely already - * done when we return from the notify. - */ - virtqueue_notify(vq); - virtqueue_poll(vq, &rdlen); - if (rdlen > *sz) - panic("%s: random device wrote %zu bytes beyond end of provided" - " buffer %p:%zu", __func__, (size_t)rdlen - *sz, - (void *)value, *sz); - else if (rdlen == 0) + cookie = virtqueue_dequeue(vq, &rdlen); + if (cookie == NULL) return (EAGAIN); + KASSERT(cookie == sc, ("%s: cookie mismatch", __func__)); + *sz = MIN(rdlen, *sz); - memcpy(buf, value, *sz); - explicit_bzero(value, *sz); + memcpy(buf, sc->vtrnd_value, *sz); + + vtrnd_enqueue(sc); + return (0); } From nobody Mon Oct 16 23:05:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xkx5zkgz4xv9W; Mon, 16 Oct 2023 23: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 4S8Xkx45Xnz4d6c; Mon, 16 Oct 2023 23:05:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nk7oMvslZfk1PU1Il4P5dkbBwiLrkvjcdHKlhSgL45A=; b=PN53sfxtMQcn4t/qUOemfJav0phJkRcIM/E6xF3u9X8t1riYOYhaJvIsoLCHWwEl5rJUsa BMdlvk0LQUIPGA4oVrYrh81S3T9REXfyipOiGiLxQnMqNNoA6MJL9/dkEw/7gJ3cd2w5ri Ec3HMam9CHIfTQggGpSF3JBkopU0awTgTB47SlvaZ1X4ibPOLgUI1IJawbEv1WTXGk0DHC DLo0Z4KuHS0cbLf+M8GZs4KFhNO5ap0UrldN4JX9J8efkIYGOF45+v/KrKfoJl7Rr2MjCJ 2B33+w+wrE8QAtlWbjAuDARmnqoBlfmcPw0ccN2Xx8LbB+/9aAvWlqQe3tx6XA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497513; a=rsa-sha256; cv=none; b=dv9pEikhUOODiZMlqsIxeztmsIzfJFoElBKCqomnkYXPBRlzZCjeDojn1dku025B5QszOi 5CeS/siXopN/aQjtaEiqplCgsxW1+xvwP8cW8xg7NP+2OPWpMQe0JjKnGNScxiWzh0ui/z mFmaGJfQHnEt1wQrbPN49iBUlTNDRV1ceJ66mcmcMSSTLaKjXqReu1DPL5Pa7+BeZy8n8f vRMMncEVx65bO5+7w2Z+626uV8u/ldmXVjQNRQVAwhveYAGdJlDlYtxKB3+aYU0sPEJ6cP r6N9OQqCeqofKXRSm4lL/4rbV4WwvHUjpd2LI+cxrjsvb+GRTHlCoXlFQamyhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nk7oMvslZfk1PU1Il4P5dkbBwiLrkvjcdHKlhSgL45A=; b=fLklpHlAMdOUMcb7gQrUi3+PDglnCEJ6p9WaMUFp1I6A434qjJuadW/0Nm0wmoNSaypGnA ab1gWeQRrgtLT3Y4U6NpShfbEq/09wFf1NCicgv6Z0Pd+tSYR3tuhv86zQC4v77pHgiSYu H6BWDaCoQZUGcvRS+LE+vWYKQStiqpnbjSUm9ffg7vzq4GbE7N8emprfpRdXeYWHWxiMfD hsS6usSucXnzEqaMat+ORR/hVTy7bXNNM2Sl1kEj+ayQQwHAPEJD80fiY1EX6TGDUm7fBk r7Xl4yJ1CfWBSM2QKpRSUqKDCxp04LDM0cjs/kfaqlVhOCQXW0hJg4Fs39qCZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xkx2sMQzyx7; Mon, 16 Oct 2023 23:05: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 39GN5DNl046637; Mon, 16 Oct 2023 23:05:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GN5D2B046634; Mon, 16 Oct 2023 23:05:13 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:13 GMT Message-Id: <202310162305.39GN5D2B046634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7ca80c7f4bf7 - releng/14.0 - gic_acpi: Limit the number of CPUs to GIC_MAXCPU List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7ca80c7f4bf79c7df3d113dd857f7fe41cdeac2f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7ca80c7f4bf79c7df3d113dd857f7fe41cdeac2f commit 7ca80c7f4bf79c7df3d113dd857f7fe41cdeac2f Author: John Baldwin AuthorDate: 2023-09-09 19:13:57 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 gic_acpi: Limit the number of CPUs to GIC_MAXCPU madt_table_data contains an array of pointers for each CPU and was allocated on the stack. If MAXCPU is raised to a sufficiently large value this can overflow the kernel stack. Cap the stack growth by using GIC_MAXCPU instead as for other parts of the gicv1/v2 driver in commit a0e20c0ded1a. Suggested by: andrew Reviewed by: andrew, emaste Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41800 (cherry picked from commit d0af08c4ba3e400049d246d72401ce36d3bee98a) (cherry picked from commit b7f6b86ee7e49718ab8bf74f7a33fa8cda4d38dc) Approved by: re (karels) --- sys/arm/arm/gic_acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/arm/gic_acpi.c b/sys/arm/arm/gic_acpi.c index e18bc12faf4d..56ff78f9b685 100644 --- a/sys/arm/arm/gic_acpi.c +++ b/sys/arm/arm/gic_acpi.c @@ -84,7 +84,7 @@ EARLY_DRIVER_MODULE(gic, acpi, gic_acpi_driver, 0, 0, struct madt_table_data { device_t parent; ACPI_MADT_GENERIC_DISTRIBUTOR *dist; - ACPI_MADT_GENERIC_INTERRUPT *intr[MAXCPU]; + ACPI_MADT_GENERIC_INTERRUPT *intr[GIC_MAXCPU]; }; static void @@ -107,7 +107,7 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) break; case ACPI_MADT_TYPE_GENERIC_INTERRUPT: intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; - if (intr->CpuInterfaceNumber < MAXCPU) + if (intr->CpuInterfaceNumber < GIC_MAXCPU) madt_data->intr[intr->CpuInterfaceNumber] = intr; break; } @@ -151,7 +151,7 @@ gic_acpi_identify(driver_t *driver, device_t parent) } intr = NULL; - for (i = 0; i < MAXCPU; i++) { + for (i = 0; i < GIC_MAXCPU; i++) { if (madt_data.intr[i] != NULL) { if (intr == NULL) { intr = madt_data.intr[i]; From nobody Mon Oct 16 23:05:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xky5RRvz4xvcX; Mon, 16 Oct 2023 23:05: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 4S8Xky4sx8z4dKH; Mon, 16 Oct 2023 23:05:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7BMO+YrsyWj3OqzA1fQFt1V77Dvs5Ub6O5tSde5Ezk=; b=mfEKv07ZBjtQFaFq8RtL/5sdf782vqg6TidXjDA951LCjYkFUalUsXvyUOkgVCRDThELaE TzyTuOHhj9dr0euMl1CK/d0ue3P+sW06jeo6t6fvewAqxIPgg6/qLTMpcnVg210RB6mezi +R4z3R0UeeVrJ/JfkE66LgnYIDCqxncv9JEVhS9ER++wah97mUJP6tBP6poXojT9eXGPhm 3pzRAH4mdcM+aNd2XnRM8yHtor4jV3VPdwAINUuL35aAKTLYwhbL3MCSrGapFSltCIBnyx ml+ouOyFxytc2U8PWwa16EqvLX3RPTJo6AH5LWCK6ttY/A3GvLGfHas2voiH7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497514; a=rsa-sha256; cv=none; b=lY7IdKv4prhquENUZJar1puS/D0f29Lc5LZIMvVT2/vQu0CP7UuirHzaLjj/BG1uys6Lh2 ytFQum/sJkycWKzNcahvwpJAUU5qh6vZNbnFGfaSLk8FlRLU3iIAN7YZ77FDuGN+11FRpp 8jXo3jyBODCYPRDk1cBitr0JW+T2LiUzfG01cXDn5NVKqhCi9yZ0wZZ59PaklEwKBS6hBe gCu9ozI50d4xRlkHypo2erDJF9lHw+GkASjQLVvO1zj/EA+zvm7qupNZJCzYcL20zDJVWT UaWjWctsPwvNlkpw31p3L4kT2LeQmx2u1wcZLOhMJSkGSCQ0Dr74eo5kHbnGzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7BMO+YrsyWj3OqzA1fQFt1V77Dvs5Ub6O5tSde5Ezk=; b=SHxSOTNnHUPPkN2hvsL8DpR90nkcO2t1eIvlHJku6qjcKjGjMxMI7llOkhE7adi11QplbN RYY9Y0r1R0yyGxbWnoCt+sq3zLENBlb66WXrmumTp1r+Ilc/ljlfHtBzFXaZwhbTpVcthM BZfzebSaPaFn1ZRagoQwX8gqNjD6Equ1rMCTXteHLqZBZg21IXd5Sq0I9lJfBBIFZt0gS3 sqI1Pj5Z0sbgxWTHMzC9L8wPEOGguMVItWZAQa26BlnYKXHaxatUs9O725av/qQmTrMk/D /4edZt1HqMlVFGAQerwlfAmNNnnqKleJ4md1Ce6fBFr4s79e8XP2LgKeqdwu5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xky3yn6zyx8; Mon, 16 Oct 2023 23:05: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 39GN5ERb046694; Mon, 16 Oct 2023 23:05:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GN5EGp046691; Mon, 16 Oct 2023 23:05:14 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:14 GMT Message-Id: <202310162305.39GN5EGp046691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7916bb5cdf86 - releng/14.0 - cxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7916bb5cdf86d01f4e4c5049260af64ac02534d4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7916bb5cdf86d01f4e4c5049260af64ac02534d4 commit 7916bb5cdf86d01f4e4c5049260af64ac02534d4 Author: John Baldwin AuthorDate: 2023-09-08 23:30:35 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 cxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits In particular, the kernel RPC layer used by the NFS client never invokes pru_rcvd since it always reads data from the socket upcall via MSG_SOCALLBCK which avoids calling pru_rcvd. As a result, on an NFS client connection managed by t4_tom, RX credits were never returned to the TOE connection to open the TCP window resulting in connection hangs. To fix, expand the set of conditions in do_rx_data where RX credits are returned to match those in t4_rcvd_locked by calling the function directly. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41688 (cherry picked from commit dcfddc8dc091e7688abc8488a0307eba425fa7a2) (cherry picked from commit bd8cecc466adeca0763cca674f83bfcc3a751356) Approved by: re (karels) --- sys/dev/cxgbe/tom/t4_cpl_io.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 9b48b2891f64..235d4196226d 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1647,7 +1647,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) struct socket *so; struct sockbuf *sb; struct epoch_tracker et; - int len, rx_credits; + int len; uint32_t ddp_placed = 0; if (__predict_false(toep->flags & TPF_SYNQE)) { @@ -1779,12 +1779,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } sbappendstream_locked(sb, m, 0); - rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; - if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { - rx_credits = send_rx_credits(sc, toep, rx_credits); - tp->rcv_wnd += rx_credits; - tp->rcv_adv += rx_credits; - } + t4_rcvd_locked(&toep->td->tod, tp); if (ulp_mode(toep) == ULP_MODE_TCPDDP && toep->ddp.waiting_count > 0 && sbavail(sb) != 0) { From nobody Mon Oct 16 23:05:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xkz6NMBz4xv9b; Mon, 16 Oct 2023 23:05: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 4S8Xkz5zGMz4dkZ; Mon, 16 Oct 2023 23:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxCGW+PA8SsjQvzgpF486538AqlLlJmXJGw2VeaRo24=; b=BuUijGRPkKcH0LAV+MkuU/py3l00vm8HkKWYIqdFdDhXPxNarL1V4ZVwxJG0fqzBX1I3Af 2y+KIqmtbK5LSuY4JJ1fkwuaKPR3bS1dck8VS/B1cqWDF0X2vawrWPEGS+fm1Ugz62/mmJ n+OxvUAomQTq5RjSjAItnFckcgvuLNth34h5DinwMrQWs+MdM62uMdoCcLDJfuxMbWBuxd ijt+B4ZeuYb5o1f65Jl/g9QEeeVDUBrJuyKIcXTv/akFXzDB3TqgzDLnIFd9iIQmblOzIW +NC/bCtKGzFsb54nOb1U2O2hZnz1u3m8VVH56635vYX7barmXszpAjsimzrsaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497515; a=rsa-sha256; cv=none; b=UWU0NfMhvuy7PgzM8aU8hNUNn+jzcvlIPxmxlZolvbASKpwy4fHDayhv70G5eFlMZhgQ5m toUtuBT38u7qkLbuQsUB2n2Bk+PR3f5IdnuJ3XSiSJ1DpoVVpYvl+5SmVDtv3z3iWYC+yl AeXMMcjP8AZEl1wcYBjCLm2a+Px+nS4OoDbD1WEZpiSDmWz50OvvNyrToEGCc+Z9H+bNbX hNAmMpTazRjmoqWd7c7olPvuhqi0APabYZitLsnvcR3OWKWXEVKIuHdypO3bWYFzXu4a+J qTph65kdjiGScgutCZNtv/SglDgZho5DcwIoH0IL3wk6cB8QVio2XVgRr66c9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NxCGW+PA8SsjQvzgpF486538AqlLlJmXJGw2VeaRo24=; b=iHg61V9u6jlXFwHs13OSYbwMD4+gq6BIuVx+CUZDqo37EbMQBBa8J02xHBeyaSNn/37SnQ bUqha+a8tYQ9fD5WFGb1AsRxF4c6BST0D7WYcJ70OEEbojD8WCvNpITsiMcCpxHFKMRrgg zG+qVtcwjMU5u46AWZr91bE13NfSITmKaU67q/kIA/7cAKp//cIAeIIdbhB6WOu1+Qfb/W Jy4YE61QsXbBQkA8NnQeJG23pw45lsCBGe2tIYtgucngbchyknINiwtuk25Sm60O3/Acxd hWB6pj0+9dgEKrV+3HghrbQ0Bgi6BddZStAZGJ6jkgWFPDmFeBHtWOilazVa5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xkz4r4Vz100f; Mon, 16 Oct 2023 23:05: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 39GN5Flb046761; Mon, 16 Oct 2023 23:05:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GN5FnP046758; Mon, 16 Oct 2023 23:05:15 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:15 GMT Message-Id: <202310162305.39GN5FnP046758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f0441866442d - releng/14.0 - cxgbe t4_tls: Don't bother returning RX credits for a protocol receive error List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f0441866442d00aeb6a2e834b572430d679a5ca7 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f0441866442d00aeb6a2e834b572430d679a5ca7 commit f0441866442d00aeb6a2e834b572430d679a5ca7 Author: John Baldwin AuthorDate: 2023-09-08 23:30:52 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 cxgbe t4_tls: Don't bother returning RX credits for a protocol receive error Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41689 (cherry picked from commit 75af2d951cce7d51d2033405f96f083c01f39f04) (cherry picked from commit cb2cd58dbd56f734f4346ce4db3d0412b2809667) Approved by: re (karels) --- sys/dev/cxgbe/tom/t4_tls.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index b8005e213621..29a840067c62 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -1004,7 +1004,7 @@ do_rx_data_tls(const struct cpl_rx_data *cpl, struct toepcb *toep, struct tcpcb *tp; struct socket *so; struct sockbuf *sb; - int len, rx_credits; + int len; len = m->m_pkthdr.len; @@ -1075,22 +1075,6 @@ do_rx_data_tls(const struct cpl_rx_data *cpl, struct toepcb *toep, so->so_error = EBADMSG; out: - /* - * This connection is going to die anyway, so probably don't - * need to bother with returning credits. - */ - rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; -#ifdef VERBOSE_TRACES - CTR4(KTR_CXGBE, "%s: tid %u rx_credits %u rcv_wnd %u", - __func__, toep->tid, rx_credits, tp->rcv_wnd); -#endif - if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { - rx_credits = send_rx_credits(toep->vi->adapter, toep, - rx_credits); - tp->rcv_wnd += rx_credits; - tp->rcv_adv += rx_credits; - } - sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); From nobody Mon Oct 16 23:05:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xl10BQxz4xvK0; Mon, 16 Oct 2023 23:05: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 4S8Xl06ZFbz4dn8; Mon, 16 Oct 2023 23:05:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXp1aXif6v9zYUc0GdQfAmX3g27kkoZS+IYLgvyNFRM=; b=yN8/XaWHMouY1O0dV9g7QI3SjXvrKAYdRNj/15R8X6bq1BacJZ0fPzf+NyH1QnoLfs7D1I 7Fsjnt+fg+8HW4jUPofrc1Yq/EACGt92P6CGgf7u9GP6GRU1Amm1dWGWwERX2OkVecTlc4 jIHLNBQ2PAgyu3crYBUHq0law2rIPLa+uhAJB/6FHzZc4IbrEr7AvIv32ke5X9WuOGHeZs QQ4IT5M1KVfIhU1CDKkYCcASFpki7xi8A+tPB4R4vaKgJEQbs1InOoCpwikZ/nqRqRuPVM q4cOQO3V3sEDOlch/gQM4qgn6wV2Poz/PlhyPvf1PYHJkewuNP+SgEGIIv93Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497516; a=rsa-sha256; cv=none; b=huAkW07PHpiWaKwD1WsL26r+aga4koVOKHs9kBszlnVYenAawehd694nHyUFg4ilrkt/Y1 S3JgJWAIIfI9AheMukLw7F7wi6rYqKzULeHww+Ewz+mdWWhat5iBlqx4XTBfjPnv5HbiaM Byd4Udxze9JBWTU2TA9Lq5Q0oNXIHXwP4+pbImUYbNzIVXWDZlP79PfVZyf61XedDkoEbc eq7WLg2QsDkG6kx0UrfLXK4oMPlTvLkI2ZOHJSvGD2PmPDdXw9a5DQtM6YcFhvCt6MV8mK nN6o+czDzFTCXUQKVF7OlBuMl8O6f3LA48c6s+FUKz30Td0buOBSwNo8QeKaKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXp1aXif6v9zYUc0GdQfAmX3g27kkoZS+IYLgvyNFRM=; b=XhA+C1T8Dh5XttPcNJELHINAeVzXT3/3itlZ8UsTxMFmhqasRIZ71EbEYRJmaAA1KhUxWL w6QFjDZyYb4/nSqtU82PX2j95L7lBledWweA5dUYem5O66cfH3/EnXreiwznP5oaYbRbzm 1u33Puqt/E9BiqTpVanHPQw9aE6Q3e6+jjf+0vnziauy8w315xHCHsQIi25S8Ruf/35/9D Xn1yl+qjal7TGaV0dv6fwsz7NH++XEYD/gAUo5B/1fV0o7LW6oqXv8COhvoj4HDEVRnH7j NV9uPESL/m7gHm9Q+J+9758Hzif+XObb/mtbtHsAtJ8evB0+OH6OrRTfq1HPPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xl05bmPz10MF; Mon, 16 Oct 2023 23:05: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 39GN5GDf046813; Mon, 16 Oct 2023 23:05:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GN5GnP046810; Mon, 16 Oct 2023 23:05:16 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:16 GMT Message-Id: <202310162305.39GN5GnP046810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5c855665a04e - releng/14.0 - cxgbe t4_tls: Call t4_rcvd_locked from do_rx_tls_cmp List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5c855665a04ea950bc98e92f3a78f2a4d9988a3d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5c855665a04ea950bc98e92f3a78f2a4d9988a3d commit 5c855665a04ea950bc98e92f3a78f2a4d9988a3d Author: John Baldwin AuthorDate: 2023-09-08 23:31:38 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 cxgbe t4_tls: Call t4_rcvd_locked from do_rx_tls_cmp Similar to dcfddc8dc091e7688abc8488a0307eba425fa7a2, replace the simpler, inlined version with the full version. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41690 (cherry picked from commit 897e564361624411c4e557e0817642e1477f0af4) (cherry picked from commit 969dc06e919ca135fdbf5c9a760684c357ae9310) Approved by: re (karels) --- sys/dev/cxgbe/tom/t4_tls.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 29a840067c62..3a0c1a392e6c 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -794,7 +794,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) struct mbuf *tls_data; struct tls_get_record *tgr; struct mbuf *control; - int pdu_length, rx_credits, trailer_len; + int pdu_length, trailer_len; #if defined(KTR) || defined(INVARIANTS) int len; #endif @@ -975,16 +975,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) sbappendcontrol_locked(sb, m, control, 0); else sbappendstream_locked(sb, m, 0); - rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; -#ifdef VERBOSE_TRACES - CTR4(KTR_CXGBE, "%s: tid %u rx_credits %u rcv_wnd %u", - __func__, tid, rx_credits, tp->rcv_wnd); -#endif - if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { - rx_credits = send_rx_credits(sc, toep, rx_credits); - tp->rcv_wnd += rx_credits; - tp->rcv_adv += rx_credits; - } + t4_rcvd_locked(&toep->td->tod, tp); sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); From nobody Mon Oct 16 23:05:17 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8Xl22Mqfz4xvK2; Mon, 16 Oct 2023 23:05: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 4S8Xl20dWcz4dg9; Mon, 16 Oct 2023 23:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M53nAVU2qwADAEVOz6PBUaA5aHUJ7F4m6IcvsbYmoAM=; b=JEnFCiIcCdRpLsFb7XlnxlGXdCLXnz46aAO3s2NuyH/Jupss2eWyDLFpZPFALyu1Fw7tix tLnjvErEERTRhPwdfGl3Q+xDIedszLOYq63ie31SxnE878+O310E3Bu70kN8cNNM+op6vr ZYiGGiDBKPpUOGeUFfRrA3oWMfnDV2nS7oeV8y7FzM3060CY894iM3goDQcXhsqY6cKUif ANCuGbgEv5Jivet57wgmPH/0aDGWT2bJV37obcR7UzqMdxIE3em+vB2AkWpn17CDXVFqC6 T57/qHqI27Azhh+rO/Q0WKxTk18dTuZm3mgxaB/7oB/3GJ2saa6EZqAtc46C7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697497518; a=rsa-sha256; cv=none; b=fQayEqs3tC41J/1cvyweMO89c/x1J7LgBu0muqI4S4t4WcvfvpT5Cnx/kYetfPUZeg6fFi Xx5P/WNEigAq9fNbxZxz2IcZnZ6mCrArKctaT1GMttJRK26MSKYHxmhNxmnGT7fuZPNz7O jJc84eXqwIwUfoQr0z5NJB6D+4WdXnBX2HXK8C2jn1pDZYb8JnCZuHrjAIZ5nOmYxaqIpN zO5H0AC0pkkeAZaF3/pd+j2VQQj89gqMOwK4AMtj9GH2V4hu8eWwZG5NtF7Gd4jrCGheYY Vt/jQo6X6zTFGcRqR/G3iJ+8FiHdymQ9EOUbIBr4isrikFnqu2/TPTaYVRD3lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697497518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M53nAVU2qwADAEVOz6PBUaA5aHUJ7F4m6IcvsbYmoAM=; b=hUjaPttxvF0zhofa8F18vrYr6tvTIp6K9F1IaecoKUdfrG96XQOSsyBVTjZRuYDERg+l8+ 8Hm+qo9VaagjXKhBKXn4QeDZXkkFtZvJgBya+rqPIfC0eod+F3pgFMW/WiilApFc/2bj+g 8TfSZfBo2wMiXW5gblXT+XkRvNpNqPQzrdiGtD5zvvKaxkV5KoAWvy6L9bjDqkCs1Kmcdk 4FeZxkmERYqTbLOVvxrkzUR36cvX51ruw3t+mBSiSkm1ItUUh0ugt5l973AbxoUXHfQvTx jsAOzylnbBPhp8+1Uul32O6TCBDWNiLphi+iHlFrcS9soSP9NP+EDFUwpyqe+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8Xl16qklz10B9; Mon, 16 Oct 2023 23:05: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 39GN5HSk046861; Mon, 16 Oct 2023 23:05:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GN5HTf046858; Mon, 16 Oct 2023 23:05:17 GMT (envelope-from git) Date: Mon, 16 Oct 2023 23:05:17 GMT Message-Id: <202310162305.39GN5HTf046858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9851b24ed4fa - releng/14.0 - x86: Properly align interrupt vectors for MSI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 9851b24ed4fa571ae3b931f834d21b9f800db9e9 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9851b24ed4fa571ae3b931f834d21b9f800db9e9 commit 9851b24ed4fa571ae3b931f834d21b9f800db9e9 Author: John Hay AuthorDate: 2023-09-28 21:08:08 +0000 Commit: John Baldwin CommitDate: 2023-10-16 23:04:33 +0000 x86: Properly align interrupt vectors for MSI MSI (not MSI-X) interrupt vectors must be allocated in groups that are powers of 2, and the block of IDT vectors must be aligned to the size of the request. The code in native_apic_alloc_vectors() does an alignment check in the loop: if ((vector & (align - 1)) != 0) continue; first = vector; But it adds APIC_IO_INTS to the value it returns: return (first + APIC_IO_INTS); The problem is that APIC_IO_INTS is not a multiple of 32. It is 48: As a result, a request for 32 vectors (the max supported by MSI), was not always aligned. To fix, check the alignment of 'vector + APIC_IO_INTS' in the loop. PR: 274074 Reviewed by: jhb (cherry picked from commit d33a4ae8ba5343f555842e6e32321f9cd64dfd09) (cherry picked from commit d73b4f06403af6c1a384c8c59ba9eb138c861ee1) Approved by: re (karels) --- sys/x86/x86/local_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 17b0223f834b..b382368cc626 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1582,7 +1582,7 @@ apic_alloc_vectors(u_int apic_id, u_int *irqs, u_int count, u_int align) /* Start a new run if run == 0 and vector is aligned. */ if (run == 0) { - if ((vector & (align - 1)) != 0) + if (((vector + APIC_IO_INTS) & (align - 1)) != 0) continue; first = vector; } From nobody Tue Oct 17 05:57:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8jtr682rz4x66S; Tue, 17 Oct 2023 05:57: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 4S8jtr3q42z4J6C; Tue, 17 Oct 2023 05:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697522260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNo5UfhQzlgXPzp+IVYkcR7MWNyR8dvTfM8uBIDarDY=; b=F3rLRoqajF/mJPyJe3D8zz0bO+JvoV320JEWS2nB8qIn/3IMhJoKKi63NjWCM2Z2TUuzie QFeb3MQ1xlOpb59dgHTZnF/qbqpuOUo+mMDP4U/mjJcvvQrzzDqx+EESaLNOltcoXOFC65 FYySmy8NidWcXhpxpq61JbtKCATEXxZSBc+vDU+TBxcB+/NkLoMWSwbQpQze7EM9o5V0mD yHQpey13M4qnJ+mNJTK78Ev5rHxgHYPOxyjP5/6wku6nVtwmeoqYjjmJD2fvQpGtbfqJCZ XUd/lEK6DSGJPDOcT0rbIfq60M5goF2OgHXQEr9k9K3bMSKlt5+ncAnha6fVSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697522260; a=rsa-sha256; cv=none; b=y2EjdpjmO4Ic/1jb09SwtqE02e+KXJ6aBr5KXnAXQ/Km9Qr7U2dYcCHYPGrNYQ0YDj+URT sQmZhSMcaAewZmHjpueuZ+Ukj1PkueFdFVQJp8MSovgyBdmf8KyVMsIClX5ofCIRo6m76M 8xU+iR3N8PulSo0xgu8jfV/pg6HMps51fp1hRMMoAX/Mjj5d/d5ITpCOeXlgo6SK5m2xz2 syJZlKEwDhYsEUlyi63u5pPAmDoainGIdO8uvDTdNCwl193KtpqA7ojYt9W9tCsEdvCMKO YI3KFjF4j5d8O3jVHIfpSaFxXfhEY2OJtHGhYtBFo+r8P9oDB8itYPDnTWoiDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697522260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNo5UfhQzlgXPzp+IVYkcR7MWNyR8dvTfM8uBIDarDY=; b=ALh4pPioF3esl4QaHLqwweuT9w4fWuoc5sp2nFGje6jDa6K5wMr0LwLvqLSwKw0fhw7uQk Um3WgrANxY5lC7SV/lamSgfOOVlVgWMmQo7+nrEvWwxYuoh9Wu2oFOI4ll0PtrHcR1QACf XC3pbDFb2nS9fg62U8WJjAprxppD1xfPMPnERVXrO+eGQappX8CLkjPfQaada/S9fvw9W2 tUTYOiwpu2CyHxQ6pakfst3bRhLA4c7KGKC6Gg9dUPCedlx3TadWLTPhRtVvGag6GnEGgD 9R7XDk3u5p9JB7BKIr1qVS90akgRvmshmflH6nvTHtT8KsxxJ9NoNLaKUf7x4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8jtr2vwMz1BG7; Tue, 17 Oct 2023 05:57: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 39H5veFr028853; Tue, 17 Oct 2023 05:57:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39H5veCu028850; Tue, 17 Oct 2023 05:57:40 GMT (envelope-from git) Date: Tue, 17 Oct 2023 05:57:40 GMT Message-Id: <202310170557.39H5veCu028850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2ae26ba67338 - releng/14.0 - netlink: move NETLINK define to opt_global.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 2ae26ba673384a075f31cea0ef495a02af293262 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ae26ba673384a075f31cea0ef495a02af293262 commit 2ae26ba673384a075f31cea0ef495a02af293262 Author: Kristof Provost AuthorDate: 2023-10-12 19:55:57 +0000 Commit: Kristof Provost CommitDate: 2023-10-17 05:56:51 +0000 netlink: move NETLINK define to opt_global.h Move the NETLINK define into opt_global.h so we can rely on it being set correctly, without having to remember to include opt_netlink.h. This ensures that the NETLINK define is correctly set. If not we may end up with unloadable modules, due to missing symbols (such as nlmsg_get_group_writer). PR: 274306 Reviewed by: imp, markj Approved by: re (karels) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42179 (cherry picked from commit ab393e9548f8cc0ee28499c411963b798ebb38a5) (cherry picked from commit ff15498894e2546fcce7ffc24967e714de3805ed) --- sys/compat/linux/linux_netlink.c | 1 - sys/conf/options | 2 +- sys/modules/carp/Makefile | 2 +- sys/modules/ktest/ktest/Makefile | 1 - sys/modules/ktest/ktest_example/Makefile | 1 - sys/modules/ktest/ktest_netlink_message_writer/Makefile | 1 - sys/modules/linux/Makefile | 3 +-- sys/modules/linux_common/Makefile | 3 +-- sys/modules/netlink/Makefile | 2 +- sys/net/if_clone.c | 2 -- sys/net/if_vlan.c | 1 - sys/netinet/ip_carp.c | 2 -- sys/netlink/ktest_netlink_message_writer.c | 2 -- sys/netlink/netlink_domain.c | 1 - sys/netlink/netlink_generic.c | 2 -- sys/netlink/netlink_glue.c | 2 -- sys/netlink/netlink_io.c | 2 -- sys/netlink/netlink_message_writer.c | 2 -- sys/netlink/netlink_module.c | 2 -- sys/netlink/route/iface.c | 2 -- sys/netlink/route/iface_drivers.c | 1 - sys/netlink/route/neigh.c | 2 -- sys/netlink/route/nexthop.c | 2 -- sys/netlink/route/rt.c | 2 -- sys/tests/ktest.c | 2 -- 25 files changed, 5 insertions(+), 40 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index a6846035c22e..807cdc7a14bc 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -27,7 +27,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_netlink.h" #include #include diff --git a/sys/conf/options b/sys/conf/options index 56c1a33216d5..ff7c0d984646 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -470,7 +470,7 @@ MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD -NETLINK opt_netlink.h +NETLINK opt_global.h PF_DEFAULT_TO_DROP opt_pf.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile index 5506d1aaec23..d7a85043539f 100644 --- a/sys/modules/carp/Makefile +++ b/sys/modules/carp/Makefile @@ -5,6 +5,6 @@ KMOD= carp SRCS= ip_carp.c sha1.c SRCS+= device_if.h bus_if.h vnode_if.h -SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h opt_netlink.h +SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h .include diff --git a/sys/modules/ktest/ktest/Makefile b/sys/modules/ktest/ktest/Makefile index f72aa5d820db..264eb7b9f443 100644 --- a/sys/modules/ktest/ktest/Makefile +++ b/sys/modules/ktest/ktest/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest SRCS= ktest.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_example/Makefile b/sys/modules/ktest/ktest_example/Makefile index 5b0c9b41f9c8..a5fe6d6d7843 100644 --- a/sys/modules/ktest/ktest_example/Makefile +++ b/sys/modules/ktest/ktest_example/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_example SRCS= ktest_example.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_netlink_message_writer/Makefile b/sys/modules/ktest/ktest_netlink_message_writer/Makefile index cdcd1d2c190f..2f84b2fecd72 100644 --- a/sys/modules/ktest/ktest_netlink_message_writer/Makefile +++ b/sys/modules/ktest/ktest_netlink_message_writer/Makefile @@ -8,7 +8,6 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_netlink_message_writer SRCS= ktest_netlink_message_writer.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 51b434d91b00..d1035445ccfb 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -70,8 +70,7 @@ SRCS+= imgact_linux.c \ linux_vdso_selector_x86.c \ linux_x86.c \ linux_copyout.c \ - linux_netlink.c \ - opt_netlink.h + linux_netlink.c .endif .if ${MACHINE_CPUARCH} == "i386" diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 07df4555d1ee..374bc32215a2 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -7,8 +7,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ linux_dummy.c linux_errno.c linux_netlink.c \ - linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h \ - opt_netlink.h + linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_x86.c linux_vdso_selector_x86.c diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile index 667c0b2475fe..6835be6e7bd7 100644 --- a/sys/modules/netlink/Makefile +++ b/sys/modules/netlink/Makefile @@ -5,7 +5,7 @@ SRCS = netlink_module.c netlink_domain.c netlink_io.c \ netlink_message_writer.c netlink_generic.c \ netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \ route/nexthop.c route/rt.c -SRCS+= opt_inet.h opt_inet6.h opt_route.h opt_netlink.h +SRCS+= opt_inet.h opt_inet6.h opt_route.h CFLAGS+= -DNETLINK_MODULE diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 1a2cea94ad35..5345d613f9d6 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -32,8 +32,6 @@ * @(#)if.c 8.5 (Berkeley) 1/9/95 */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e7a290564722..b69d8107e30d 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -46,7 +46,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_kern_tls.h" -#include "opt_netlink.h" #include "opt_vlan.h" #include "opt_ratelimit.h" diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 28c1e535b783..b0a422d5060f 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -28,8 +28,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_bpf.h" #include "opt_inet.h" diff --git a/sys/netlink/ktest_netlink_message_writer.c b/sys/netlink/ktest_netlink_message_writer.c index c13a25e05a70..e46065dd4bd2 100644 --- a/sys/netlink/ktest_netlink_message_writer.c +++ b/sys/netlink/ktest_netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 262361773fbb..7b2bbd39447d 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -30,7 +30,6 @@ * This file contains socket and protocol bindings for netlink. */ -#include "opt_netlink.h" #include #include #include diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 54fc702d8ac6..4d95506e31b0 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index 29eac82aaffd..e7649c6b13dc 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 0745f7fdcb77..0ca71fb6219b 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 9fc0eddc78ec..8443cc59d9e0 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c index ba56ac6d6a17..b4073721fdc4 100644 --- a/sys/netlink/netlink_module.c +++ b/sys/netlink/netlink_module.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index b6e120933f83..0587b478431e 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c index 1a7aaffa7dd7..4bf913d9c978 100644 --- a/sys/netlink/route/iface_drivers.c +++ b/sys/netlink/route/iface_drivers.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 4168b5936ddc..9914e7febf57 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index 722dc5fdee4e..0d6bb5c9ec84 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 2a6a0bc54e85..cfaa2167b0d2 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/tests/ktest.c b/sys/tests/ktest.c index 495fedf95dde..cd83a6aaaa3f 100644 --- a/sys/tests/ktest.c +++ b/sys/tests/ktest.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include From nobody Tue Oct 17 14:11:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8wrq03GBz4xYTF; Tue, 17 Oct 2023 14:11: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 4S8wrp6HJfz3QQl; Tue, 17 Oct 2023 14:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697551898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TEJGU48EYtQxO2IKktlubyKZi1eYqVRnuVtiDhoQZk=; b=p6CQ/3qJcIQEeZjyhGeYPQKvHCJClhJX82x8KGKMCgsDM5nW9frrON7UrwW+mk2nGUwpSb lflwz71VhDZB5rGICIzoyyx/s3OP+hOPKqWaHUdGSLMqrgWzTNTbtJJyI6wztMTv04GjXB kTPVrC/9XsOaenlep+pjPrUUPomTYEW3Y2rHiZREEYtbx3p1N+jzNkgAwDRKV2ARMdjzVe sH3EkglWyCNiXq1k6iREen638nNu8meOpVNwEQ3Fx+hZwxJmEGqPsWa9h7WNxwPdx2BPgZ S5VVxiUjitGasFueNodXS2sDvIabMQYBcKfCkWEvlfTj6DZAZ4YMoVFrE9ZziQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697551898; a=rsa-sha256; cv=none; b=TEborb6zDXyOpxY2Rg8h7VPMXyBL3eI/L/CGnwuVu6PBwLbhYgmCzxLmxrg2MnwaVws75T AT/IPS1vA2fcSNhc000xIk9sTETTsayzhFsOTlNxf64rOIKZr+xt6VTOILjQnGUdVWXU9h sQ13QrPMFrZSVHlrgsFCF/JHep2+Sds0LTU1VsHR1sN6ygkE6vjDQqJvZc2QZ2vU3BpGFQ uzbv01M1XXZ5+UbkkU0YsmfsrdrSSr2dxWlh27HI2ti7Qx/4O+2O6jGhDmIN6IRy9dSKEw kOCFtJJpq+tPFCSNBCjOqc5Y4+GB/ZWmG5uF1eNNB7MGE7pc6ErT7JAK9E/RxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697551898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TEJGU48EYtQxO2IKktlubyKZi1eYqVRnuVtiDhoQZk=; b=wWPUPiJkaOm7X2bWgNEBxIf6ly6qqtZMTCGP1ij8QEze0b5s9FjyNg9T3RyxoTrc9V6ogh DipWOAC+um49pF47ojJPvRK8rUuIkenYru6dNdiGpcyVk6pQQNk+qJ7ULE/I24/R5HhAFl aDZjVNfOSKcqLzJv+d4zuNXxL4jN5Ik6KiHXYlRudy7N/0mC1muaCjvSxOHWy2C2E8A0II AKrMXspfA09mZ9rF7rLwqbqO+ukwLAsNHhx9r+oZSEB+eKe71uPhmJJ2ab8+4RK2ck3ttA tcuKWEND1xYRMnuAvd3ysRvLJcjP/7DHe62TpIVKn8cYBeAfX814F7XRRki45A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8wrp5Ld1zC4r; Tue, 17 Oct 2023 14:11: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 39HEBcRB058947; Tue, 17 Oct 2023 14:11:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HEBcsO058944; Tue, 17 Oct 2023 14:11:38 GMT (envelope-from git) Date: Tue, 17 Oct 2023 14:11:38 GMT Message-Id: <202310171411.39HEBcsO058944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 1ffcc2983834 - releng/14.0 - pmcstat: fix duplicate event allocation on CPU 0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1ffcc2983834accfd21089daa116ec802e90e088 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1ffcc2983834accfd21089daa116ec802e90e088 commit 1ffcc2983834accfd21089daa116ec802e90e088 Author: Mitchell Horne AuthorDate: 2023-09-27 16:37:46 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 14:11:13 +0000 pmcstat: fix duplicate event allocation on CPU 0 Commit b6e28991bf3a modified the allocation path for system scope PMCs so that the event was allocated early for CPU 0. The reason is so that the PMC's capabilities could be checked, to determine if pmcstat should allocate the event on every CPU, or just on one CPU in each NUMA domain. In the current scheme, there is no way to determine this information without performing the PMC allocation. This broke the established use-case of log analysis, and so 0aa150775179a was committed to fix the assertion. The result was what appeared to be functional, but in normal counter measurement pmcstat was silently allocating two counters for CPU 0. This cuts the total number of counters that can be allocated from a CPU in half. Additionally, depending on the particular hardware/event, we might not be able to allocate the same event twice on a single CPU. The simplest solution is to release the early-allocated PMC once we have obtained its capabilities, and reallocate it later on. This restores the event list logic to behave as it has for many years, and partially reverts commit b6e28991bf3a. Approved by: re (karels) Reported by: alc, kevans Reviewed by: jkoshy, ray Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41978 (cherry picked from commit c362fe939f6fe52056fb7506be9e5cbd0a5ef60b) (cherry picked from commit 5a2849bc3c60426039ff2aeef1d2b54940152927) --- usr.sbin/pmcstat/pmcstat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index fd4be99f83c8..c36cee436e55 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -713,8 +713,16 @@ main(int argc, char **argv) errx(EX_SOFTWARE, "ERROR: Out of memory."); (void) strncpy(ev->ev_name, optarg, c); *(ev->ev_name + c) = '\0'; + libpmc_initialize(&npmc); + if (args.pa_flags & FLAG_HAS_SYSTEM_PMCS) { + /* + * We need to check the capabilities of the + * desired event to determine if it should be + * allocated on every CPU, or only a subset of + * them. This requires allocating a PMC now. + */ if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid, ev->ev_count) < 0) @@ -726,8 +734,14 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot get pmc " "capabilities"); } - } + /* + * Release the PMC now that we have caps; we + * will reallocate shortly. + */ + pmc_release(ev->ev_pmcid); + ev->ev_pmcid = PMC_ID_INVALID; + } STAILQ_INSERT_TAIL(&args.pa_events, ev, ev_next); @@ -751,10 +765,7 @@ main(int argc, char **argv) } if (option == 's' || option == 'S') { CPU_CLR(ev->ev_cpu, &cpumask); - pmc_id_t saved_pmcid = ev->ev_pmcid; - ev->ev_pmcid = PMC_ID_INVALID; pmcstat_clone_event_descriptor(ev, &cpumask, &args); - ev->ev_pmcid = saved_pmcid; CPU_SET(ev->ev_cpu, &cpumask); } From nobody Tue Oct 17 19:43:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cc0lyPz4xvMD; Tue, 17 Oct 2023 19:43: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 4S94Cc09l4z3K5y; Tue, 17 Oct 2023 19:43:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3J1BK5T67jLAE/JA5E3WaOozkhKw6oZvfCVQeArkpc=; b=A5qfNttqb/ittWiePODo8r/TL1XfDTqz6xeKf61epqsCeLeNimGmOsmaIuMDEOMHFiWVjs jLBzY7h6JwxgWKHOv6rgMt6Q89pczZ1tH+5IwjlFKXkhoHxVMsMb5NhbipCGztrwLAmogY SnbxgHKF+2c4xeofFZ16/OXk0EmHuYd1irRj5I4FxYv9GFEq9DtLdYLZDhQ5BhnvN4bEio JnznsVyHrbz/tQz2UBEBzNo+2D+FpwC2GAimje+U0G40pS+ngvv7SneAD1inHkLBeDnGkx W/CoMF9ejBcKApZDSaX1Ncz0G3+kXpH4Bi1yXkbFXT/PkPKIk46DvqmJRAYfBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571804; a=rsa-sha256; cv=none; b=VD+flQalgg/nHGGEyd3CBhVAGlled6Lud9JUNWwUTfjVLhiIHsABVFDtY4Jy2lSp0Xu/w9 sG01aXdYykDW0samqW7xhyyXTsOE8ckMiCSpbreHK3Ks7WpVMST8aObsvQrUlDLm7n3RIk ln2K9NSQVZkI9KR13fan6bfebIls+oPXcz76AQecEIl47s6/RqO5mKo1D5y404dg+SnUWv sWN5sEqcupUU++byc6hRZ2z2mgQbZZK4DkLhfXBsU/i05rb6OKvE4CSIUZ4uyYnCfSA+20 i3bcB7dB4NWie3eML7TBiruJyV+WzD2bnWr7HaM7DAiNssOw5CIulk9SuPK5kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3J1BK5T67jLAE/JA5E3WaOozkhKw6oZvfCVQeArkpc=; b=sibA/laewBXiEFzRKRavgEkRYvNzqXOKPOIHnoTNLUgP0yAch26IRbHXxtIlOZrfT/Z1Jq Y2WDdX904WfOhjhph3rWe11KTqVL5sqoSMfAKfiFDhkIyn8UgIhLL4Axu20/C/gRqniig2 sTvEUj78jALrEbEsRiVnEOyFHhMJRS5dcIFpX+7wDu4TORPfKizrMX1X/GDx9/7eIvVyQI f5VwtfpLcoOscvgfAP4KUYR0jA8Xge7nM7sjS3RWT1szXfyDs861ELkkuyHanCcWvQ1gdi U8GQzZu/nrWJ666VKCqmhQTpuj6coeqNARJya34RURhLf2f3UEaB15+r6dJ9yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cb6Jmdzcng; Tue, 17 Oct 2023 19:43: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 39HJhNbR012801; Tue, 17 Oct 2023 19:43:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhNlX012797; Tue, 17 Oct 2023 19:43:23 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:23 GMT Message-Id: <202310171943.39HJhNlX012797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 9dad3ed1d15c - stable/14 - cr_canseejailproc(): New privilege, no direct check for UID 0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9dad3ed1d15c95c3eedb49c59e55bb25a7071250 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9dad3ed1d15c95c3eedb49c59e55bb25a7071250 commit 9dad3ed1d15c95c3eedb49c59e55bb25a7071250 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:37 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_canseejailproc(): New privilege, no direct check for UID 0 Use priv_check_cred() with a new privilege (PRIV_SEEJAILPROC) instead of explicitly testing for UID 0 (the former has been the rule for almost 20 years). As a consequence, cr_canseejailproc() now abides by the 'security.bsd.suser_enabled' sysctl and MAC policies. Update the MAC policies Biba and LOMAC, and prison_priv_check() so that they don't deny this privilege. This preserves the existing behavior (the 'root' user is not restricted, even when jailed, unless 'security.bsd.suser_enabled' is not 0) and is consistent with what is done for the related policies/privileges (PRIV_SEEOTHERGIDS, PRIV_SEEOTHERUIDS). Reviewed by: emaste (earlier version), mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40626 (cherry picked from commit 7974ca1cdbee949f5e453eea112be265b425c407) --- sys/kern/kern_jail.c | 1 + sys/kern/kern_prot.c | 7 +++++-- sys/security/mac_biba/mac_biba.c | 1 + sys/security/mac_lomac/mac_lomac.c | 1 + sys/sys/priv.h | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 39bdcaf5ef0e..57e6024a9939 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3938,6 +3938,7 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: /* * Jail implements inter-process debugging limits already, so diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 19e0b78c6709..ed15cb566499 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1426,9 +1426,12 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { - if (u1->cr_uid == 0) + if (see_jail_proc || /* Policy deactivated. */ + u1->cr_prison == u2->cr_prison || /* Same jail. */ + priv_check_cred(u1, PRIV_SEEJAILPROC) == 0) /* Privileged. */ return (0); - return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0); + + return (ESRCH); } /*- diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 6948548503e1..5d66e2fd4b9b 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1924,6 +1924,7 @@ biba_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 05bd0da06960..aa9abf458721 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -1702,6 +1702,7 @@ lomac_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 45cb5bab4275..a61de8d32fe0 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -105,6 +105,7 @@ #define PRIV_CRED_SETRESGID 58 /* setresgid. */ #define PRIV_SEEOTHERGIDS 59 /* Exempt bsd.seeothergids. */ #define PRIV_SEEOTHERUIDS 60 /* Exempt bsd.seeotheruids. */ +#define PRIV_SEEJAILPROC 61 /* Exempt from bsd.see_jail_proc. */ /* * Debugging privileges. From nobody Tue Oct 17 19:43:24 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cd3pnnz4xvRv; Tue, 17 Oct 2023 19:43: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 4S94Cd1Kbsz3K6F; Tue, 17 Oct 2023 19:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4+w3xO6Whz8QKn6nec+f2j1fnzQy31oVaH9E3nrjmA=; b=q39ZXOCuOXOvSe7wSA/ciOSziUPsh9vvBBvxhMALANSewbarkC+oEIfEZia8ja8rUw0fPI CPYHwh7z5K8fLiIibqQf6PXM4+7lzvhPwy4Sp/m2/bfAXJ51TAGHSLYyHNivwBetr/UeIm rbLF+4VwPRxEiH2HWfrGJDpWAn8yGP9jZfJcxzqLOMTUOzQpXqcZHAsieYg+IjDdDBH6mY qLbMDmYvOZ+XkHjXQBSCMi33MnKooCV7vZI6Smp3mRLAcyh08l6lYS/SV/OLte25yCqBub BzozVRGVBPvCfXlfZQWy0g9FZCxvn6Acpklb9hIgxYS8w68UiXoWjPj+q1Ibtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571805; a=rsa-sha256; cv=none; b=sPYU7djcxcvA38OmY5JcvK+yHii8g1ZFTi1bApWu0a/XTEtSS10ACbP8JuEe4eTymU/CaY Ggi0211+YGDXF/Og2tRFd7yZuf3bTXdBOa1lU7udNDTe75uQRI+qvf9fOC3NmD8polaLlk NW/TS5JOadrbME0fE1MVLge6Bblj2fNVWgL0ZyatXWTYxILOxhOGHBKlk9P20hZ3ysv5OI FoA7Q8aeVQFiLTVpmFeOmnwRH5zS7T5DGEhJYN+KSMmC7sPqkX/CjvFPUAYnSVz/4UZuXM oQn6X5mjEiSXM3BCFKG87y9fN0Ehg1+TzTTgmL5ykRQQTN2cYWtrASlshJ2kUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4+w3xO6Whz8QKn6nec+f2j1fnzQy31oVaH9E3nrjmA=; b=idXLxX3u3IuPVQdWV/7aR+8geu9mQAWWdv4bo+gWRlFiPm+bEZ4z8ko/Ph2/hvm/uj29jW FSFtWM9NlcMtl+BHEeyRJVEuZQOhzWaKFImAa3rhwrGKZFyAK35oUsKyiavHIGvCmgcr0L kvSxALntn7miM1szKZN+B3uDFORpC41yWCvJ6kcc1s8WaM+ISaYt8wGYh3k/0zBhoiSspO f8FYv/qL4m2J4RvJD/Fq4afItK7acX1nZXIx0Qk4jEM1qd8uBGLjpd/R57hqOjp8TwiFgX Oo6Rk1Ag9awRmbEWeyOtWpq0AoKzDtHgQKVGgwI5W+ijXreEDQxHypw5RcTT3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cd0CFszcbl; Tue, 17 Oct 2023 19:43: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 39HJhOBG012855; Tue, 17 Oct 2023 19:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhOhx012852; Tue, 17 Oct 2023 19:43:24 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:24 GMT Message-Id: <202310171943.39HJhOhx012852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 3ad322db8902 - stable/14 - New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ad322db8902da1c3d3669471e4e5738f980a849 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3ad322db8902da1c3d3669471e4e5738f980a849 commit 3ad322db8902da1c3d3669471e4e5738f980a849 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects This is a new helper function that leverages existing code: It calls successively cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() (as long as the previous didn't deny access). Will be used in a subsequent commit. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40627 (cherry picked from commit e4a7b4f99cfd4931468c0866da4ae8b49cf5badb) --- sys/kern/kern_prot.c | 19 +++++++++++++++++++ sys/sys/proc.h | 1 + 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ed15cb566499..1e6073b554e4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1434,6 +1434,25 @@ cr_canseejailproc(struct ucred *u1, struct ucred *u2) return (ESRCH); } +/* + * Helper for cr_cansee*() functions to abide by system-wide security.bsd.see_* + * policies. Determines if u1 "can see" u2 according to these policies. + * Returns: 0 for permitted, ESRCH otherwise + */ +int +cr_bsd_visible(struct ucred *u1, struct ucred *u2) +{ + int error; + + if ((error = cr_canseeotheruids(u1, u2))) + return (error); + if ((error = cr_canseeothergids(u1, u2))) + return (error); + if ((error = cr_canseejailproc(u1, u2))) + return (error); + return (0); +} + /*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 3102cae7add0..8609bbd124ad 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1163,6 +1163,7 @@ void ast_sched(struct thread *td, int tda); void ast_unsched_locked(struct thread *td, int tda); struct thread *choosethread(void); +int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeothergids(struct ucred *u1, struct ucred *u2); From nobody Tue Oct 17 19:43:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cf34Ysz4xvRx; Tue, 17 Oct 2023 19:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94Cf2Jbxz3KYG; Tue, 17 Oct 2023 19:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2NIqxckPlQFzI8CnouBS1QIbG494LZlfuJdw/00sFjg=; b=rND76IalCZiew+ZqABgSjjOcqPbLOyeZhrprgcipxIfgwocoYBlM0Wv7UfT9jrscv5zgyT xGfIj51FhuO3h4NH4fhNCflKPjBGHOOtxw/gwJni3DzJJMw8L2KmEK8r0XUEgiaxi8iJRE pQ5dpntaVIf08TzIh9zVd4eabPLkb40o2nbVcR5sjmeVzXi4m+JdR+eq0pJZzLlGrDLT3B /UkEhbJJxVeDBQdWcrWoztlUtTzciHm+1INtoFA+IDxetZOlGMyYTvwIDBmY4cfBZNnZ5l yJ918i0EkQIZZxlvRMaK/CIHDDpuSgL9b7KtS0Tr3mnnrK9Fyd8lx4NNsmj83w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571806; a=rsa-sha256; cv=none; b=eq35egQ7DiyMx6QC7HYFvTSDj4Konj7C7uDd2VeKke8Kk5rkYhQldOvaP5ESsawkn+Ibut NQi7RND2Bz3aj/N0mvjQB4c/qLjZrIcoz/Mt3Tb9S5knzZmWNAgLzOWkET1jqG8qc7xXH6 FqB5QO9xQURHG8sbwY9Kfg/S5ga9TEYjT1CIEk165LOfY7qge48LjVaucqq39cXjEClmCH vd/Liz6pyAUSxlX+WyGrboNxkmGWqVfQfzFWakXYlV5nEYBDvxVAJa10rK6SwV88YuV8bG vDwK6J+H3DAnzUi7kHonPOCmnkSHI1N42y4GfyzsYrmfGEiNVfoXuEJG+f8MoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2NIqxckPlQFzI8CnouBS1QIbG494LZlfuJdw/00sFjg=; b=UMaPFZM/effMK77ygwBisUf6BbjxVq9p5Ascm3VDM3+2ViBvluwn4xs6pODijMPaEmXeQ+ sOVAskK0Ah9qyATOJFGyIf24j2n0XDOwLskQa7a5k5djEQDF9TI05kLIwJ6vHoJp6CM7w0 AsJn3IkNfVkrpAQmIvc3r1C7iXbtTXKNfjD4YSDm+yaDDONxUOApmJOuwwUq1nrNanv8pS HPDk8tDZrHEMHeXtFcDMzzPTTbunu8zLfq0VZaSbg/Y0nD5W1URx5zf3wJM2Hudnk5MXl6 OyX6xcf4ny549K3Jnqv0nYizFhr0b16EyV7UXjLEsaMN0cU3oFsVnloKQgTy3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cf1BDFzcnh; Tue, 17 Oct 2023 19:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39HJhQOx012899; Tue, 17 Oct 2023 19:43:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhQMi012896; Tue, 17 Oct 2023 19:43:26 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:26 GMT Message-Id: <202310171943.39HJhQMi012896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e1153205a719 - stable/14 - Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1153205a719c6cb792cb2213a3737ee6b53d59c Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e1153205a719c6cb792cb2213a3737ee6b53d59c commit e1153205a719c6cb792cb2213a3737ee6b53d59c Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() As implemented, this security policy would only prevent seeing processes in sub-jails, but would not prevent sending signals to, changing priority of or debugging processes in these, enabling attacks where unprivileged users could tamper with random processes in sub-jails in particular circumstances (conflated UIDs) despite the policy being enforced. PR: 272092 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40628 (cherry picked from commit 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18) --- sys/kern/kern_prot.c | 25 +++++++------------------ sys/netinet/in_prot.c | 4 +--- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1e6073b554e4..648c067dc528 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1471,11 +1471,7 @@ cr_cansee(struct ucred *u1, struct ucred *u2) if ((error = mac_cred_check_visible(u1, u2))) return (error); #endif - if ((error = cr_canseeotheruids(u1, u2))) - return (error); - if ((error = cr_canseeothergids(u1, u2))) - return (error); - if ((error = cr_canseejailproc(u1, u2))) + if ((error = cr_bsd_visible(u1, u2))) return (error); return (0); } @@ -1536,9 +1532,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, int signum) if ((error = mac_proc_check_signal(cred, proc, signum))) return (error); #endif - if ((error = cr_canseeotheruids(cred, proc->p_ucred))) - return (error); - if ((error = cr_canseeothergids(cred, proc->p_ucred))) + if ((error = cr_bsd_visible(cred, proc->p_ucred))) return (error); /* @@ -1653,10 +1647,9 @@ p_cansched(struct thread *td, struct proc *p) if ((error = mac_proc_check_sched(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); + if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid && td->td_ucred->cr_uid != p->p_ucred->cr_ruid) { error = priv_check(td, PRIV_SCHED_DIFFCRED); @@ -1723,9 +1716,7 @@ p_candebug(struct thread *td, struct proc *p) if ((error = mac_proc_check_debug(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); /* @@ -1815,9 +1806,7 @@ cr_canseesocket(struct ucred *cred, struct socket *so) if (error) return (error); #endif - if (cr_canseeotheruids(cred, so->so_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, so->so_cred)) + if (cr_bsd_visible(cred, so->so_cred)) return (ENOENT); return (0); @@ -1847,7 +1836,7 @@ p_canwait(struct thread *td, struct proc *p) #endif #if 0 /* XXXMAC: This could have odd effects on some shells. */ - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); #endif diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c index 222e39c6bcd2..204f4f60456e 100644 --- a/sys/netinet/in_prot.c +++ b/sys/netinet/in_prot.c @@ -67,9 +67,7 @@ cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) if (error) return (error); #endif - if (cr_canseeotheruids(cred, inp->inp_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, inp->inp_cred)) + if (cr_bsd_visible(cred, inp->inp_cred)) return (ENOENT); return (0); From nobody Tue Oct 17 19:43:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cg3n2sz4xvNw; Tue, 17 Oct 2023 19:43: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 4S94Cg30wXz3KYj; Tue, 17 Oct 2023 19:43:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYGPp5VkmYTZiZ84i9vUmBXLvNDyvl2h6D2JxA+zaW4=; b=DXHVlNXRsdUlSlMGKhGKHU6CNJUwXbzqxtAOBRhq+Nje0ensfAS+eSS4x+ktaozi75WPl1 L1yeFIZpExbdW8Aas+TOGjlRmxhWq7QQ/eTuVHhEDBuo1D9xadizv6bhYFFkbl47v7ptYY bJ9mMaxxH2ABoy0b+dNhflWSc9U+w+IB3UnNKTy9Z65Xl1VI08BqreANTg2i16iR2FhRBg EO7Pd+2VOafLCj1mnO/E8/27Xjq8urRXbjrCf+1f9xzdritOdmLAZCQSoHrAtkmrWpiSNt QnmQNi1N4i9hfYQKu/+rYs2W8+7OJOZY2cxJ3llFKLAImpX66mXqkUfzX+NOHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571807; a=rsa-sha256; cv=none; b=KkT++4XUZ9GrVSUSjrlpWNVyQfxDCEQx73WOdiDADtjUXBJ+IbPIh7OShlyNr/eeKFwirI 8dA28JyO5dbsXrnc0ZXQkTSO4HAlgjhSRAFqP3tTGQY/hNga1x20R67cjl3LS2fVMhUIF/ 1lAl576z7zK24/j6vVr3AbOhX0jCHgBU36yKy4udscU9kY0JMqY/EiF6h/7UsMlgpRJ98d hzXfzEoy3Cr0bGswpJPKDSmD6F6r3BsI0R66sPDDxnpKM1V24cZ1l0MXrMxX9axxFFYtb7 XK2M4arIsG9NMK5uTzG/OTu/sWub5duJqdAXKlZN4kLeOuIhvneFcWOFk59idA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYGPp5VkmYTZiZ84i9vUmBXLvNDyvl2h6D2JxA+zaW4=; b=oJEhkRESIifDG9vIkoykx8ROZ2ce/D2251Q0HMF9TwUZL6E7cdlL1LXACqf2hIrOSZuS2s JfLfbudaZoJUhCgimzfpiTkPG/FlDdbWZVI52wVVKVWS5wg4HSrKECBfBsHqvKwJSfE7y7 9Pl5KXc1quxRQNZPIr6DdhmmpZfC4qhv2VQTVaJqEsWGVbjjY3EmhMv+ycT7qpJzWWaeOu gne+8uFBUhIPKHvZ19TVOosa/2xTjxjAohklcRAObsHjFjIXfn8vmPoDaptyDqOply7Sr8 lzjyFVxeyTPsxu0UdW/MCP0llI5fMrXvX0lm26NUZSVM5d+43nIWvruab6jEjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cg25sxzcr6; Tue, 17 Oct 2023 19:43: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 39HJhRDg012950; Tue, 17 Oct 2023 19:43:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhRHT012947; Tue, 17 Oct 2023 19:43:27 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:27 GMT Message-Id: <202310171943.39HJhRHT012947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f173bbdbc1f8 - stable/14 - cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f173bbdbc1f8701d55db52be30b738395ab3c925 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f173bbdbc1f8701d55db52be30b738395ab3c925 commit f173bbdbc1f8701d55db52be30b738395ab3c925 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename When these functions were renamed 7 years ago, their man pages were not. Rename the latter in accordance and fix the names inside them. Fix references to them as well. Add the old man pages to the list of obsolete files. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40630 (cherry picked from commit c59ab75c04fa32bc6d292596ff5e4593a05a6b1b) --- ObsoleteFiles.inc | 4 ++++ share/man/man9/Makefile | 4 ++-- share/man/man9/cr_cansee.9 | 8 ++++---- share/man/man9/{cr_seeothergids.9 => cr_canseeothergids.9} | 8 ++++---- share/man/man9/{cr_seeotheruids.9 => cr_canseeotheruids.9} | 8 ++++---- share/man/man9/p_candebug.9 | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6f07b70494f8..6a5e4e39fc1e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20231013: Man pages renamed to match the actual functions +OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz +OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz + # 20230906: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/E-Tugra_Certification_Authority.pem OLD_FILES+=usr/share/certs/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index eb670c924077..08ad811fa901 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,9 +69,9 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseeothergids.9 \ + cr_canseeotheruids.9 \ critical_enter.9 \ - cr_seeothergids.9 \ - cr_seeotheruids.9 \ crypto.9 \ crypto_buffer.9 \ crypto_driver.9 \ diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 8e058eb4e3e5..4824a231170b 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -50,9 +50,9 @@ variables and .Va security.bsd.see_other_uids , as per the description in -.Xr cr_seeothergids 9 +.Xr cr_canseeothergids 9 and -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 respectively. .Sh RETURN VALUES This function returns zero if the object with credential @@ -84,7 +84,7 @@ does not belong to the same jail as The MAC subsystem denied visibility. .El .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 diff --git a/share/man/man9/cr_seeothergids.9 b/share/man/man9/cr_canseeothergids.9 similarity index 94% rename from share/man/man9/cr_seeothergids.9 rename to share/man/man9/cr_canseeothergids.9 index bd8eb5d2e9d9..79269533ae5c 100644 --- a/share/man/man9/cr_seeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERGIDS 9 +.Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME -.Nm cr_seeothergids +.Nm cr_canseeothergids .Nd determine visibility of objects given their group memberships .Sh SYNOPSIS .Ft int -.Fn cr_seeothergids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the group IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeotheruids 9 , +.Xr cr_canseeotheruids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/cr_seeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 similarity index 94% rename from share/man/man9/cr_seeotheruids.9 rename to share/man/man9/cr_canseeotheruids.9 index 2cefd0f9dc8e..80acc2d7a6ca 100644 --- a/share/man/man9/cr_seeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERUIDS 9 +.Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME -.Nm cr_seeotheruids +.Nm cr_canseeotheruids .Nd determine visibility of objects given their user credentials .Sh SYNOPSIS .Ft int -.Fn cr_seeotheruids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the real user IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeothergids 9 , +.Xr cr_canseeothergids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index ffa4fedb6172..e80d313de55c 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -113,9 +113,9 @@ Process is not visible to thread .Fa td as determined by -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 or -.Xr cr_seeothergids 9 . +.Xr cr_canseeothergids 9 . .It Bq Er ESRCH Thread .Fa td @@ -129,8 +129,8 @@ The MAC subsystem denied debuggability. .Sh SEE ALSO .Xr jail 2 , .Xr sysctl 8 , -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 , .Xr prison_check 9 From nobody Tue Oct 17 19:43:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Ch4vg0z4xvn5; Tue, 17 Oct 2023 19:43: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 4S94Ch4CFMz3KlQ; Tue, 17 Oct 2023 19:43:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=glKZg05nMdIiCrMrQdWDH6xnkyWT+GI382BpSGZzeww=; b=L0MEs0aXVQBhy8OdDs/52T2NX4Z2cLjfS9EGY0eLAHVzZauWR4jyQVUcC5U24J9vIxNSc1 77ClpuLUJznTE+UuLzyQeTC5FcVWPWgwnpJm00mUKBTf4XXuRdIC6x21I4r356MyrFB68m 0SWVUX7pouHNhCX+7njf+zSH/j9oLeONZgSy9PuuL9+i8jcNZxNtialLJkkUTT6WxdX13q He7l+1vZ/s1bO5qWL7H2Kg8eg62LERsdE7L0YrCJklAk2GseE9F3xY2si1/jy/q4wVBy4h ttBOtrdllnoIjRnsnwA9jv8tmUudWcVRa6D0MCdZlmUV+4LpDnFNnEA8CWC8BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571808; a=rsa-sha256; cv=none; b=PtwCZHfwJOkDwozQJaEef0GgMWqMQMQvSMhAZiTANJh+3hpUYKgFHWyptIoYEv97+b9YtT cqXs63pbCE6hTRQt9B2vq2veyfPvxQJD3jNSF/L4/KxpWsoEdQsoI55N6LZ3+oUdFYHDWJ rmQv8jwv63X2aSNRsCNCjwVWpU7Rtgchi3hNoqmD6OtwXXs1uYG3TOOFGrYgFeJLVUYwfv uuH/2MRYpnKX5UhCAqlMrhsE9zu+muCsAXaTVaHB6PgFwecpr1cv18O6VeGilhSRrLQ48Y WW9kQbtJTP1CfKVP1lmqdIadxQa5Ka9YETVz1GcgbMm5X61a/vSEdLU2OrXzSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=glKZg05nMdIiCrMrQdWDH6xnkyWT+GI382BpSGZzeww=; b=U5FblCxh5jE4322GrAcoXhKlQHWXRjsRjGeH5A/ctm8Q/chV+xA+QXafSZD5i8b6+mTfwo NfNe5CykPKQLPba96RxCR4qhei7ffzO3v5yo/c4NMCeEV+AYXF0prnQKRll6XV4lzhLpPx 3J3NPEFp73c8IjAg4hH8w4gu+kEuS6EubyGQ1sX4Xgj9BvaEgobcIMH1yezQ5x/bOwW5py EcGMmk4cdWrQOtX72eC3wbhdfC36XyxBUT/r4Ei6p3DbjjZDrdOLH33SsiBdG5YiDWJ7/G xuZXQfcbVG2gG/wBfHcjsgDjfOYoq80sBDlDPVGRy9WXKiu52HIJRQFAOU43SA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Ch3JjXzd4G; Tue, 17 Oct 2023 19:43: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 39HJhSY7012996; Tue, 17 Oct 2023 19:43:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhS9L012993; Tue, 17 Oct 2023 19:43:28 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:28 GMT Message-Id: <202310171943.39HJhS9L012993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ce4c78b612b1 - stable/14 - cr_canseejailproc(9): New man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce4c78b612b1d933320ae794b50f85f60db2e1a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ce4c78b612b1d933320ae794b50f85f60db2e1a0 commit ce4c78b612b1d933320ae794b50f85f60db2e1a0 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_canseejailproc(9): New man page Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40631 (cherry picked from commit 29d863bb7ffc692998f21fa3e7a91afa1151cf1c) --- share/man/man9/Makefile | 1 + share/man/man9/cr_canseejailproc.9 | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 08ad811fa901..71a11a7cc6c0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,6 +69,7 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseejailproc.9 \ cr_canseeothergids.9 \ cr_canseeotheruids.9 \ critical_enter.9 \ diff --git a/share/man/man9/cr_canseejailproc.9 b/share/man/man9/cr_canseejailproc.9 new file mode 100644 index 000000000000..775c76722b05 --- /dev/null +++ b/share/man/man9/cr_canseejailproc.9 @@ -0,0 +1,81 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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 August 18, 2023 +.Dt CR_CANSEEJAILPROC 9 +.Os +.Sh NAME +.Nm cr_canseejailproc +.Nd determine if subjects may see entities in sub-jails +.Sh SYNOPSIS +.Ft int +.Fn cr_canseejailproc "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials +.Fa u1 +is denied seeing a subject or object associated to credentials +.Fa u2 +by a policy that requires both credentials to be associated to the same jail. +This is a restriction to the baseline jail policy that a subject can see +subjects or objects in its own jail or any sub-jail of it. +.Pp +This policy is active if and only if the +.Xr sysctl 8 +variable +.Va security.bsd.see_jail_proc +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Sh RETURN VALUES +The +.Fn cr_canseejailproc +function returns 0 if the policy is disabled, both credentials are associated to +the same jail, or if +.Fa u1 +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . +.Sh SEE ALSO +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This manual page was written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Tue Oct 17 19:43:29 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cj67yGz4xvnH; Tue, 17 Oct 2023 19:43: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 4S94Cj5FRKz3Kgy; Tue, 17 Oct 2023 19:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5aUray6WaQIosna2Lb2K/O+xz2ciflPGQQcl93VXoE=; b=IuyzHjrKmnBzH0mm57MBi8Neekv8IemOnjBpwkS4Sips3RUJWsZs9omzHDF5fhNAuUD59e b2swTJfG9q7y0oA0poGPjA+1b4/j+NaCCne+NNVReK5DO3hRI5tqOEffq+deNOM2dq+q3B OPDOhCQOmGKqnEKrV9WCk9sg6vsEqB8s2YfRwwpYef2APObd1JfxauvMIrEiOqQ7WseCrR lDIhgtPmq86r9fjUjbcRRhoDB0tF4k6z5Umikj8OylUIaHLzOpns7lN+1TU+i7Vc767WT0 yI50P0F8dR07bfH4ZoRMeNYTD3iDHNwKnLz9AX22CGarL9xMo/0Hdy0DdWDm8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571809; a=rsa-sha256; cv=none; b=gE1O69dk7H8bXWQy+IZv+kwCD6mgOibNDV/oir8WKl+pqI+9eBY+M7NpGDFF3Lev00tqMs pDDrQ9UYj6Z4El0hBXs9zGVrKIobfQSDcmmrFuxa0eZvaZJmGv92QNQhgK3y/OlMdmU2Tl 4YMIOVGw/XFHTSQsVVhzUs1+36ceGT5zirkk4l/8b+KY9bR4DbhnSB0bOWotq4GiGU8pS2 Yu9lHnuPPDW7riCrPz/9U73S1ZyWJvBrln+qDc34rJMmqsRvSEIQfff+PXRGG8AKEC6zaa jg0Y9sC/ZZyc/EhDynbCNFeDadgRAEcFEP29Wyi/gA6ZL1wPhxlPXCexiEa5tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5aUray6WaQIosna2Lb2K/O+xz2ciflPGQQcl93VXoE=; b=OINrwmGG6VORZxhVeoxULGay2Ktn+TlAlUcNZlKNJcCU+OUZItLN0CiAcytozqqftkKvyi 7FyZciXRm0ybPtpmy8Kq4If/G3CegbEX98Abj7Q1/MGgrcLDH1c4XqUk1X0rnp5cPOQdFN EgKDtzl56AMjDzdjmg91/0QPjRW5npNbfUwdJR+Dw/+eZooADZkYE9BLCLUH67Q2uZS4yw 6f7/7hQqmnX3XZyDD7RZWIworMLS3Ok3JcWLqyaOnkEFQkinR2qv6OE52f0j7Xz7DPoKEF kpgYxM5lagBtbW6usc9oFkeln1iJbxJBf7CnBM4d9MX48/kdg+YCylo3aR1FVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cj4LKHzcr7; Tue, 17 Oct 2023 19:43: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 39HJhTXk013037; Tue, 17 Oct 2023 19:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhTkt013033; Tue, 17 Oct 2023 19:43:29 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:29 GMT Message-Id: <202310171943.39HJhTkt013033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: d9181d86c6ae - stable/14 - cr_bsd_visible(9): New man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d9181d86c6aed243927620b414a7c37b1ae613d7 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d9181d86c6aed243927620b414a7c37b1ae613d7 commit d9181d86c6aed243927620b414a7c37b1ae613d7 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_bsd_visible(9): New man page Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40632 (cherry picked from commit 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f) --- share/man/man9/Makefile | 1 + share/man/man9/cr_bsd_visible.9 | 117 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 71a11a7cc6c0..c3c81719b7d2 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -68,6 +68,7 @@ MAN= accept_filter.9 \ copy.9 \ counter.9 \ cpuset.9 \ + cr_bsd_visible.9 \ cr_cansee.9 \ cr_canseejailproc.9 \ cr_canseeothergids.9 \ diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 new file mode 100644 index 000000000000..bd676e6f5705 --- /dev/null +++ b/share/man/man9/cr_bsd_visible.9 @@ -0,0 +1,117 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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 August 18, 2023 +.Dt CR_BSD_VISIBLE 9 +.Os +.Sh NAME +.Nm cr_bsd_visible +.Nd determine if subjects may see entities according to BSD security policies +.Sh SYNOPSIS +.In sys/proc.h +.Ft int +.Fn cr_bsd_visible "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +This function determines if a subject with credentials +.Fa u1 +is denied seeing an object or subject associated to credentials +.Fa u2 +by the following policies and associated +.Xr sysctl 8 +knobs: +.Bl -tag -width indent +.It Va security.bsd.seeotheruids +If set to 0, subjects cannot see other subjects or objects if they are not +associated with the same real user ID. +The corresponding internal function is +.Xr cr_canseeotheruids 9 . +.It Va security.bsd.seeothergids +If set to 0, subjects cannot see other subjects or objects if they are not both +a member of at least one common group. +The corresponding internal function is +.Xr cr_canseeothergids 9 . +.It Va security.bsd.see_jail_proc +If set to 0, subjects cannot see other subjects or objects that are not +associated with the same jail as they are. +The corresponding internal function is +.Xr cr_canseejailproc 9 . +.El +.Pp +As usual, the superuser (effective user ID 0) is exempt from any of these +policies provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Pp +This function is intended to be used as a helper to implement +.Xr cr_cansee 9 +and similar functions. +.Sh RETURN VALUES +This function returns zero if a subject with credentials +.Fa u1 +may see a subject or object with credentials +.Fa u2 +by the active above-mentioned policies, or +.Er ESRCH +otherwise. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +do not have the same real user ID. +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not members of any common group +.Po +as determined by +.Xr groupmember 9 +.Pc . +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not in the same jail. +.El +.Sh SEE ALSO +.Xr cr_canseeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseejailproc 9 , +.Xr priv_check_cred 9 , +.Xr cr_cansee 9 +.Sh AUTHORS +This function and its manual page were written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Tue Oct 17 19:43:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cl1XRgz4xvSB; Tue, 17 Oct 2023 19:43: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 4S94Ck5vQjz3Kkp; Tue, 17 Oct 2023 19:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcGZb4B3XAHUR6cWommntv1rCH8cTD4MjUw50dQZDOA=; b=E/SmIy+xQ09vcUL1+x5R1b+LRbEOgjIDWMwdSfrUL6zLGJYk2Yz2TM1Q87Lkgxta3qEQiG o4pthOt5U8jR+JskEssMaT9ufvlrVNOKdmk3AFkJ2f5J/Zv/qoYpmxVT+z+hCNPzjLBUmG ruZL/HYXOrWA11g9BcRdh0H3ouEFevvYYQdyIUN0zT9pGLl33j9NOIQGnyEY377swAKSdF xwysZlshWuSPQTk4mz+oawg92jxNetClVGSANdoZG0KXBKD+V04h8WwWujNIJIshY+SwM+ 5K64Tfjrla3niqzp7aKyYNQq5/Wm8MK7q0BTPjDHab+Lc22bk1F9+Il6E9Ep0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571810; a=rsa-sha256; cv=none; b=h3koemhvwr+CWSsVE0qhe/gb8ndH5Bq3p5RYQfz8PJyXCNntXCLrKtul5nsTZBkDnS0PGI AAXHX4AykFGHMwxtM6w5bDbm5hn5DiQTfiPC1uKen6DKu/v3x+v4P9hDhKSDbQZENXww3r oMtV0PFTWlb1347b3S1+M+MPXnHMAXgUGeFSyadeFnin6M8aS+f24u7snr8N5HCyAe2yiE VRn11ChAmJnp34bZaCM+dKl7qyIc6eGZBxPQlfnFuOoXHSKgVKOyJmTkEBH9HAD4ndWdfV GCRfGFtc0PAZxBxXFlC3Ut23xE7yVxsWEhbfCkO5efDNB770SJSPeLdqpSSJtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcGZb4B3XAHUR6cWommntv1rCH8cTD4MjUw50dQZDOA=; b=KDz7pwpgGwCOj7Z3TW7Ba/yldJgwXWiwZA9aU+5y3esAg3y5odNZHMthIc4VWggfE9e45o XrvJGfUBqqZdRHceDErrm5DsnEm9LYdb8bReHJmFYwFdfADDJrYlfv15a3dazJJ2ccIpoH Iz3YENYgsrG67kamst6usgr5Wb6toR9Mc1P4xrJAa0STi5VbeHAkVycOVN7F+e5LezxWVx GPzE2ZfZBqj+l6s+ZH9qGZZIW+q+u355XxqDrwavczr9LjMoifXBODMxeXqc+8WpoVfJHo VU0KJ/qhcGVi4W3plWd6rdRJrJgolbS5JxKsCV8dGXqm0q/BdAF6/Uqvu+F1mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Ck4vVmzcSQ; Tue, 17 Oct 2023 19:43: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 39HJhUC9013083; Tue, 17 Oct 2023 19:43:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhUY5013080; Tue, 17 Oct 2023 19:43:30 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:30 GMT Message-Id: <202310171943.39HJhUY5013080@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ad1486b625ed - stable/14 - cr_canseeothergids(9): Revamp, mark as internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad1486b625edbf190ba0d9c77d695560e75037cb Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ad1486b625edbf190ba0d9c77d695560e75037cb commit ad1486b625edbf190ba0d9c77d695560e75037cb Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_canseeothergids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeotheruids(9) by ones to cr_bsd_visible(9). Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40633 (cherry picked from commit 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e) --- share/man/man9/cr_canseeothergids.9 | 77 +++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index 79269533ae5c..f0c1e5c4e726 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,58 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME .Nm cr_canseeothergids -.Nd determine visibility of objects given their group memberships +.Nd determine if subjects may see entities in a disjoint group set .Sh SYNOPSIS .Ft int .Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the group IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have at least one group in common. +For this determination, the effective and supplementary group IDs are used, but +not the real group IDs, as per +.Xr groupmember 9 . .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_gids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their group membership. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if at least one of -.Fa u1 Ns 's -group IDs is present in -.Fa u2 Ns 's -group set. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_gids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_gids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeothergids +function returns 0 if the policy is disabled, the credentials share at least one +common group, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeotheruids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr groupmember 9 , +.Xr priv_check_cred 9 From nobody Tue Oct 17 19:43:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cm0BhCz4xvd1; Tue, 17 Oct 2023 19:43: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 4S94Cl6Zzzz3Kps; Tue, 17 Oct 2023 19:43:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6SZFWGxVFrsG6pALfnC65XpPhZflXGU/qAmb7PyU7I=; b=HN/DADEL50jjJi3vv4d/kVghKkMLpTWJSeWV76EKeTe3pwmsEnf0CkadTNr1TaUXB2UWHa Q7A/kzpm88LuV2qqMOvheIW81PUUqCbJd3cxBVcatQiKduL8Ruh6EhAquCDsZkR3JKNZb8 OPeU6VCXWs3ZdCJvJ1h7rWeHLx0a54Bu+wE0QI8wj8gsLQ1Zph7RTLmobFw4xk/0O/aa5P gn0u/WoOqb4AKSWGV5QmQvTp2TcymtWT3+hRz9px04J7GBx5w7DD3d7Nnhhd3cZrvIo6t3 E6YTzYjY53HE/pybHLlcZaRmFEf543qjMngXckI4263XLzb/Ld/jPifnc608eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571811; a=rsa-sha256; cv=none; b=x6ERSKIS4W7BF0rX02JPspyfdGzstos0dWxFlAxZuuQ0wVGc9yGViBEUN3sDwnjWup3qM1 efAwJFt0VbdJjFVKbRSbbuXlm5NS7u30/tOu2zxAV0SV5qa1Le7NSYr/jjFEq64Pw+OsyZ wpcH6zggomleMZOU0yG13Y64YFI0pNfTKZfeGtodH8ntz+s7yXJqtIsEFYJMmVMS6Vlti0 xpB/BvnExbyScLHcs1+zJLrpdzg93e7+Jegh38SP0qWUq1AxBeuJBlmKGpL5TZMRm1xtsf v6fCiegvDoUyCzRUaCHYTfQWRfNquhBgq95nArOLyycJbuTdme6EmMA8aXHtCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6SZFWGxVFrsG6pALfnC65XpPhZflXGU/qAmb7PyU7I=; b=U3fDfmcWcvTrVEpjQwEV3jzm94MHE8wqw0cFNxypxA3txkzhLyYuMQqKmRqQPAIQkvJcR+ dfTHFPoSeZk6jSTmm/JOMcRS86YJPEmRyTAsnoEbmN90rXxNRkKxqyzJpObmZBdaoVylP6 VHGLFHhJ9H6iAMVXtQWQOJu8qWnWlQCCkSQOksK/Z/YApPHwObY5ADebIiHRBrqwW36RYh HvfC7e3TeCe8W3tKRKgyx/94I+MvVn79cX1EaKSzWaNY0WJdDwv/EfKpResnPpkITIWm6m XIiSnhKnXU5CHDFouBaSCF9GRyXuTZzDNWffmlCY97hk0ogaEtJMVW1fuCJXQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cl5hj6zd4H; Tue, 17 Oct 2023 19:43: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 39HJhVEo013131; Tue, 17 Oct 2023 19:43:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhVG5013128; Tue, 17 Oct 2023 19:43:31 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:31 GMT Message-Id: <202310171943.39HJhVG5013128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 60cc4f16d4e9 - stable/14 - groupmember(9): Detail which groups are considered, simplify List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 60cc4f16d4e91d9d37a4619d708cfe88ff093526 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=60cc4f16d4e91d9d37a4619d708cfe88ff093526 commit 60cc4f16d4e91d9d37a4619d708cfe88ff093526 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 groupmember(9): Detail which groups are considered, simplify Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 (cherry picked from commit 75a45ca3b34062fe793ae326ad9da614a1a06df1) --- share/man/man9/groupmember.9 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index d447bf64c482..3a516622efce 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (C) 2023 Olivier Certner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 9, 2001 +.Dd August 18, 2023 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h @@ -38,21 +39,26 @@ .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Sh RETURN VALUES If the .Fa gid -is found, 1 is returned; otherwise, 0 is returned. +is found, 1 is returned, otherwise 0. +.Sh SEE ALSO +.Xr getgroups 2 +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Tue Oct 17 19:43:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cn1Lycz4xvP4; Tue, 17 Oct 2023 19:43: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 4S94Cn0nCjz3KtF; Tue, 17 Oct 2023 19:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571813; h=from:from:reply-to:subject:subject: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/0i3efXg5vKZirgDLphmskbzKId/zuGhs7aN19EGI8=; b=Ym8yBlvnytf0VoSSbi3oFpqsjZPZX0Gbwa85vfqgAgq3C7CFqNLZ2KwMidZPcREQRAIj7B moNuAUtg70UzVYUJuWtdeVxAspXOVD2Mx6lqoji9adYusn+uk9YGqulVrDEXwC4KUqrj9Q JiF73w7DMBz7vS2vH8o2nvACdbM2E/bDd2FDuT7XSSUE+4p/NL96y7YFbM3xhv84ntmrNM dQPdlGlhgd+WuawgMVA34lw27n1iB92Gns4OxMXffOkDQl/8srELfoX48+EoG2CX++vPty TSBGzvf0Fw97wTv3KRYwHRGKDfjQgIABPaxoTb8nmmgPC58QOzTLZ65MKrj6vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571813; a=rsa-sha256; cv=none; b=FL6yo3SQNVNt9yVL6L30LkGAE8e6doVlmYoeErdQjAGaJiqXCR1Mhei5I6RUnkuzIHgJO2 LoPkst6QmcNk6YWAi4N3cUhmwhRdBYf+asiBT5FYTUVC1uf441RGXDx56MWsVUpw1QrQJ8 U1J4ZWr6YMZTmBKcooxYWffxIojkG+YByK4ZRmxAIZZHvbuSgzOxmEcXd5PiHdyD98LyV/ yZkTGxeHSsPuGAHstJq5+dk2vAT56kHNCDB0aC3fxcb1k/7Ggh4Ud65ABLjGShQ2oBM67K 1CN1OhywXXZaoSKKKNNmXjeVZeOpV6PTNcGRn5UGJ3FR1JpWe88+nAdoiZGVgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571813; h=from:from:reply-to:subject:subject: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/0i3efXg5vKZirgDLphmskbzKId/zuGhs7aN19EGI8=; b=Qv4hifu3c5Hd6p6kOq6ncjZ3tHEpAMypj/zSUpAQyAf3+wEv1EdavOfM8mtscM603+nq8t zrwARAIyYt0qaYO43W7+wMzAP+RXSp1JlLqL7o1/YiMaO4LA7I/m31C3+qak6DicVwOcTy X1Ge87SohQaYcMsTUJM/IE+prnVXuIR7HIUA5jTDUC1LvCdNy+cSRQEueMUrpjzUbm2H0T atGpA+TVT4A2gBoGo+OrjapEU1fR0DrALe4c/keLk08YQDs7CwtSJUg5tOdlFWQbX3Ok54 U/y6IOWoFi5q0iuCNkEXqiIdX+qOR+63pkHu/0dDBy3gwmXCU5u6Wfoz+E4VIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cm6nW9zd0B; Tue, 17 Oct 2023 19:43: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 39HJhWtX013173; Tue, 17 Oct 2023 19:43:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhW2k013170; Tue, 17 Oct 2023 19:43:32 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:32 GMT Message-Id: <202310171943.39HJhW2k013170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e04b81f8b76c - stable/14 - cr_canseeotheruids(9): Revamp, mark as internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e04b81f8b76ceb31abec1c739b42e70433047d3d Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e04b81f8b76ceb31abec1c739b42e70433047d3d commit e04b81f8b76ceb31abec1c739b42e70433047d3d Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_canseeotheruids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeothergids(9) by ones to cr_bsd_visible(9). Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40635 (cherry picked from commit 4ddd253b38dff8725555355cc1b5238b1bbfd380) --- share/man/man9/cr_canseeotheruids.9 | 73 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 index 80acc2d7a6ca..230c5ea59b78 100644 --- a/share/man/man9/cr_canseeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,54 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME .Nm cr_canseeotheruids -.Nd determine visibility of objects given their user credentials +.Nd determine if subjects may see entities with differing user ID .Sh SYNOPSIS .Ft int .Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have the same real user ID. .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_uids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their user IDs. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if -.Fa u1 -and -.Fa u2 -have the same real user ID. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_uids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_uids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeotheruids +function returns 0 if the policy is disabled, both credentials have the same +real user ID, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 From nobody Tue Oct 17 19:43:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cp2vKcz4xvV2; Tue, 17 Oct 2023 19:43: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 4S94Cp1rdsz3KnJ; Tue, 17 Oct 2023 19:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JThUSMSr/Nx07aTgvT4lrT5HmM1h/oSegl72tma4D50=; b=PrRHdxXlwoOIkuPA4RYK0qctueYjWWrXp2zEpiRnQT2leUFtj6+2O3cjzMnKMz4ei+mwb0 U2yBdC9Oqa9k51KUAh/nzZZ3SU+nZnXdbUc1uT28KtMid0LRSY46cyqfNg6bWvrZN43czj qt+ThNTfgMcmeulaDalzW0pf51l+/+NLImCarEZyTwcDGDdX7XzwLnWGrp4LT8vEmrkKWz 3Gvr4bCGQul4mjvT5tNbYLM9xXkCUYPMO9XqJ+eCWlwekNHU5zKQbjsHOiel2ovs5mg5An tF9T++b1ZsJ43vNRdB4hNfMxFypYCovEq8I2R7RE3+4+qNF0puM90xPfaDxWFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571814; a=rsa-sha256; cv=none; b=HO1OQR+ElmbIgORyNL4he8mrppK+UZo5oRNL8TW+nmgbNJ7ofRmR/UMmEQUeSg0YzGSggK dmepjebFsNUJQsJU0bEdm5/Jk2FAtjUlnIOUWqRj7UFziA6ZAvtDpzC8KHUwYgU8XflubQ wUrQAbf83LYOWGa/tAiBR849eizJEhqXddqWRa7npZf+/0RbIkv/zvlFjjupTas2OVlAWS PJ9os044DRNnvCUiF36UzO0nB//lk2I7uVNN16yJJjdsSJo/GkC/ku3fBie/I6/b76qzkq bSv8B732+2oO1rKaRmcaAPZu7DYwImdz4KV8UzQIOOERJuRgByJEasLCpRWFGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JThUSMSr/Nx07aTgvT4lrT5HmM1h/oSegl72tma4D50=; b=HJ2oHgTXtbrX3eP0d/borQZZ0Lkht9WPJIGm3dIOslGywDHQCBVHPrzoXUdDh90TLbvBQo AS8bDeo04PY+rxgTyuqxiChtX37/uvq3esGc0qYXCA58Tvv3XfBwvMJHKExYICi70CZYDY Q444BnwrD5iHTPQmbtmUi5BzgpFNNy27YqQHXGs037ig3tbVXeo397n7GPpB/tAgoB3ebK aaE4YlHjKBUOzllZIaO97j6FeHNm6udc4O7FYd2B34WT/FkIy0oH9dIo/PJqu/wyDJ1gXF RPnocKfvtV7i9DVIi62Zyhi/99HouTggBIn4jtUjzHduPjT017L4bAHEgDTekg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cp0gYvzcnj; Tue, 17 Oct 2023 19:43: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 39HJhXXs013215; Tue, 17 Oct 2023 19:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhXs6013212; Tue, 17 Oct 2023 19:43:33 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:33 GMT Message-Id: <202310171943.39HJhXs6013212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 2ecbfdaecbd0 - stable/14 - cr_cansee(9): cr_bsd_visible() impacts, simplifications List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ecbfdaecbd009d32b2453c7b2bd6c33656b92ef Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2ecbfdaecbd009d32b2453c7b2bd6c33656b92ef commit 2ecbfdaecbd009d32b2453c7b2bd6c33656b92ef Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 cr_cansee(9): cr_bsd_visible() impacts, simplifications Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9). Defer to cr_bsd_visible() for controlling sysctl(8) variables. Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40636 (cherry picked from commit 82f9bc9ea8ed660c61050ad1d92f1a64108c7004) --- share/man/man9/cr_cansee.9 | 61 ++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 4824a231170b..d5cdfdd6f8e5 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2006 Ceri Davies +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -23,43 +24,39 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt CR_CANSEE 9 .Os .Sh NAME .Nm cr_cansee .Nd "determine visibility of objects given their user credentials" .Sh SYNOPSIS -.In sys/param.h -.In sys/systm.h -.In sys/ucred.h +.In sys/proc.h .Ft int .Fn cr_cansee "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs and group IDs in the credentials +This function determines if a subject with credential .Fa u1 -and -.Fa u2 -associated with them. +can see a subject or object associated to credential +.Fa u2 . .Pp -The visibility of objects is influenced by the +Specific types of subjects may need to submit to additional or different +restrictions. +As an example, for processes, see +.Xr p_cansee 9 , +which calls this function. +.Pp +The implementation relies on +.Xr cr_bsd_visible 9 +and consequently the .Xr sysctl 8 -variables -.Va security.bsd.see_other_gids -and -.Va security.bsd.see_other_uids , -as per the description in -.Xr cr_canseeothergids 9 -and -.Xr cr_canseeotheruids 9 -respectively. +variables referenced in its manual page influence the result. .Sh RETURN VALUES -This function returns zero if the object with credential +This function returns zero if the subject with credential .Fa u1 can .Dq see -the object with credential +the subject or object with credential .Fa u2 , or .Er ESRCH @@ -67,24 +64,20 @@ otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -The object with credential -.Fa u1 -cannot -.Dq see -the object with credential -.Fa u2 . -.It Bq Er ESRCH -The object with credential +The subject with credential .Fa u1 -has been jailed and the object with credential +has been jailed and the subject or object with credential .Fa u2 -does not belong to the same jail as -.Fa u1 . +does not belong to the same jail or one of its sub-jails, as determined by +.Xr prison_check 9 . .It Bq Er ESRCH The MAC subsystem denied visibility. +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .El .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , +.Xr cr_bsd_visible 9 , .Xr p_cansee 9 From nobody Tue Oct 17 19:43:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cq40bgz4xvP8; Tue, 17 Oct 2023 19:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94Cq2Py1z3L6j; Tue, 17 Oct 2023 19:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVTA1obK55yD6G56XzFJKSP1q3GQA1cCrt2uWpS/BO8=; b=ZcYY0veiSLKXmT/uj2cAQyF8dR+tWBgYqZn6vLvBIii3PZpnQOw+PHZljoW0UVF5XQV9iP wHev2OFWGeVSFmv0TJCwKRIJcjgU6sv7MN9uBj5VmdG/tOfn1QPEuJ/j+Xfa5XQtoHZrFi qeQPR0NW28+ltDsQST8C1JBG2qR6cqx3EhvnLLLC1RInQjiGv+Azk/xt/fkPDzbiQUIvZS 1K/069x/UnoTkh0la7P6vclMIfQw5vKFXNuY3yvEksDWyVNAIwXzKFMRvAqjzs0igYX6Ge GNoYwrBvlPl5FoKKMPrwDuPABeMVpB1iG8XzzctaL4Rk4cYH8jan047Qo4KUyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571815; a=rsa-sha256; cv=none; b=p229QbNZLTRamYYbXWUfDIjNg1F1GS43K/I4txYXXyTIxUaeFW3/HcXfabWRdyoHZ6rf+W 5qnybgnFjsbLr3qmErG+eT4KglE/tZovwrZCoOblGSnUm5QKGIaN6DuLxx+N7YtTrab/J+ OoKgFn7cvgUmNIoI/MIBqssHVEmPq9jpPq36nXNb4m0SrDv8PyQJ6XmfuFJ5Cqw6rD5EwU xkdETHDtBCJGq06nhxDpDrWxwL65arw94XxtBcxhe+f4fQXBGMh/0IUGG28ufoWDsddjUC ntymlJNTzgNaj/xaVelwi/PjHhan6QNEcnrLX7q0+SkaFgxTEdKHf7ihOWAMQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVTA1obK55yD6G56XzFJKSP1q3GQA1cCrt2uWpS/BO8=; b=reKFACeHsrdpFgqERaq4+ds5kRvNUoQWUGLN2uL0IWrjj+s2Ot8kOABkn1UKkNXdfyh7gW cn/0ljXMH2vXsUtZjqff8DaztjaIMTP6ko7p+BeZGU5zYNn2p1FfoooHZr/QVUcCBlMaBe DIbtUPdS5AqQxcZ7xh86QRCIDS7QE/VL/f/TfoFuegO5zL4bWwA/Z/KDUDVaB993048OUo jTd5G7L1ajtIco7/TQewJHBZsgRsygcyss+qDA2luiDSP+z8OWvQan/cG0DxGlFpACDeYw slqTdKM82jDRCbmmQ+VsrWIxekfZR+/3rS+9ld0ssec3Djl2cd7jEg+3QpgQ6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cq1TNGzd4J; Tue, 17 Oct 2023 19:43: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 39HJhZ8i013258; Tue, 17 Oct 2023 19:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhZkW013255; Tue, 17 Oct 2023 19:43:35 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:35 GMT Message-Id: <202310171943.39HJhZkW013255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: fea4e20afb76 - stable/14 - p_cansee(9): Bring up-to-date, misc fixes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fea4e20afb76b900bfc6a733487470e3ec6f13a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fea4e20afb76b900bfc6a733487470e3ec6f13a2 commit fea4e20afb76b900bfc6a733487470e3ec6f13a2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 p_cansee(9): Bring up-to-date, misc fixes Essentially defer to cr_cansee(9), except for the specifics. Be more specific on the return codes. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40637 (cherry picked from commit 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b) --- share/man/man9/p_cansee.9 | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9 index 84287dac951b..9fdce460dfea 100644 --- a/share/man/man9/p_cansee.9 +++ b/share/man/man9/p_cansee.9 @@ -24,19 +24,18 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANSEE 9 .Os .Sh NAME .Nm p_cansee .Nd determine visibility of a process .Sh SYNOPSIS -.In sys/param.h .In sys/proc.h .Ft int .Fn p_cansee "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p is visible to the thread .Fa td , @@ -45,13 +44,14 @@ where the notion of may be read as .Dq "awareness of existence" . .Pp -The function is implemented using -.Xr cr_cansee 9 , -and the dependencies on -.Xr sysctl 8 -variables documented in the -.Xr cr_cansee 9 -manual page apply. +This function explicitly allows a thread to always see its own process, +even with pending credentials changes +.Po +see +.Xr ucred 9 +.Pc . +Otherwise, it simply defers to +.Xr cr_cansee 9 . .Sh RETURN VALUES The .Fn p_cansee @@ -62,30 +62,18 @@ if the process denoted by .Fa p is visible by thread .Fa td , -or a non-zero error return value otherwise. +or ESRCH otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -Process -.Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_cansee 9 . -.It Bq Er ESRCH Thread .Fa td -has been jailed and process +is not part of process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied visibility. +and cannot see it as determined by +.Xr cr_cansee 9 . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , +.Xr ucred 9 , .Xr cr_cansee 9 , -.Xr mac 9 , -.Xr p_candebug 9 , -.Xr prison_check 9 +.Xr p_candebug 9 From nobody Tue Oct 17 19:43:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cr6sPwz4xvSP; Tue, 17 Oct 2023 19:43: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 4S94Cr3M4Gz3L4p; Tue, 17 Oct 2023 19:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1/3nLs9L/bFwu3Xy9YmBIjOfjZlNV9372EQtAc5dys=; b=gtv/Qm98mAjadf+3wWo4MJpqsphsY0lyNqiaAQBKwQhi+5aQuL4rx5iuGX6hIODd555Mxy nhxbr2VW+c4oHXuWr5Gfr9En096RtE3OekwmSyEJeXC1ZGujqKgboHFfX0dpJWVPa1C9vb DozpwFyEGMrHPVoe79BHI2OqpA/W4hf+fsbpV44Jkt/z8Bur7lH9pH4vrIgLwAcv9qtPwn aZnToNFVOWu5uHIZdupmW5WMOgnI3hQ6Vnjc1uGpDISNuPBqsEJztQuHVizauuKqWuCDuA O2/mcz+wmh/XcYYZtcMNfh/hNhi9pCaDBtjG82emzNS1xN3E1IDxnxyvTXaNyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571816; a=rsa-sha256; cv=none; b=yD5vrW9UDLvN2xYBlpPrLkiZqkpqoc8mSyI2heitxkhQYZXoh19fXmgSKMzqrSpDUqRswc qNLDWMNWeADvrtSd296E6B9vWirfDnbnc3Y1jboAOfeSw9oguAEF0/t79dtrh1zDl0hob8 XqOUTQqSHtZVsX3uMEOL3HkHTS6j6b2xOY7a8szCaRO2DlxiWOY2x1LUzOSy+UKa7TcVlU GmBuVXZvwcq2XHVZ2kCgtaPJWRRIaZrqVY/YLvs7I6QZAri1KLWYPmNAxFFXBYGc4LoPEf rWtwRj9KvDWFmwG6S9P7KGOgyOBHFMBPseTRtDMSaImXewOxEaYVaxBWkjprTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1/3nLs9L/bFwu3Xy9YmBIjOfjZlNV9372EQtAc5dys=; b=ehqobBGrOdQ+m845sWG/DCGWnUDb8m7hPQz8pEuFkMJI+BJsZaEV2BI3Of95vVKBczoSE2 9iKQ8tw6H0s36E+HsYzIhcYBQW3nTgbaTnLxcJ1HYSp4S3eLk9g0b+mG4AtxvCrusDwpxz nt41LDv4dOG+B18rWazAju3TsYOnzeHLf+Q8QoUkWKsShkPX1Xmd6hjhS/0/mq4yJgzSrA Ubn4wgvn/8s8rIEP0MBU/j6OzSACXP4h7IzsqJB5PXuoekZl3Nmc50zYh8vz+rBAUxjHfP Q8gx34ZgydPHbsnGg5sY6LgdPvrDFk2mEX9C06DPZj0YImExjxTwszoqMKn0kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cr2T52zcnk; Tue, 17 Oct 2023 19:43: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 39HJhanc013310; Tue, 17 Oct 2023 19:43:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhaRA013307; Tue, 17 Oct 2023 19:43:36 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:36 GMT Message-Id: <202310171943.39HJhaRA013307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 76781950658c - stable/14 - p_candebug(9): cr_bsd_visible() impacts, misc fixes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 76781950658cc95a0820af5f0fb013f2ef9eb3a9 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=76781950658cc95a0820af5f0fb013f2ef9eb3a9 commit 76781950658cc95a0820af5f0fb013f2ef9eb3a9 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +0000 p_candebug(9): cr_bsd_visible() impacts, misc fixes Mention cr_bsd_visible(9). Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9), as well as indirect references not immediately useful. Fix description of credentials checks to match reality. Re-order errors to match code's check order. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40638 (cherry picked from commit eb94f24fab4b44f13ca045370d9fcf12ca8835f2) --- share/man/man9/p_candebug.9 | 103 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index e80d313de55c..c824db974154 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 19, 2006 +.Dd August 18, 2023 .Dt P_CANDEBUG 9 .Os .Sh NAME @@ -37,24 +38,27 @@ .Ft int .Fn p_candebug "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p -is debuggable by the thread +is debuggable by some thread .Fa td . -.Sh SYSCTL VARIABLES +.Pp The following .Xr sysctl 8 variables directly influence the behaviour of .Fn p_candebug : .Bl -tag -width indent +.It Va security.bsd.unprivileged_proc_debug +Must be set to a non-zero value to allow unprivileged processes +access to the kernel's debug facilities. .It Va kern.securelevel Debugging of the init process is not allowed if this variable is .Li 1 or greater. -.It Va security.bsd.unprivileged_proc_debug -Must be set to a non-zero value to allow unprivileged processes -access to the kernel's debug facilities. .El +.Pp +Other such variables indirectly influence it; see +.Xr cr_bsd_visible 9 . .Sh RETURN VALUES The .Fn p_candebug @@ -68,35 +72,45 @@ is debuggable by thread or a non-zero error return value otherwise. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EACCESS -The MAC subsystem denied debuggability. -.It Bq Er EAGAIN -Process -.Fa p -is in the process of being -.Fn exec Ns 'ed. .It Bq Er EPERM +An unprivileged process attempted to debug another process but the system is +configured to deny it +.Po +see +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_proc_debug +above +.Pc . +.It Bq Er ESRCH Thread .Fa td -lacks super-user credentials and process -.Fa p -is executing a set-user-ID or set-group-ID executable. +has been jailed and the process to debug does not belong to the same jail or one +of its sub-jails, as determined by +.Xr prison_check 9 . +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process +lacks superuser credentials and its (effective) group set is not a superset of +process .Fa p Ns 's -group set is not a subset of -.Fa td Ns 's -effective group set. +whole group set +.Pq "including real, effective and saved group IDs" . .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process -.Fa p Ns 's -user IDs do not match thread -.Fa td Ns 's -effective user ID. +lacks superuser credentials and its (effective) user ID does not match all user +IDs of process +.Fa p . +.It Bq Er EPERM +Thread +.Fa td +lacks superuser credentials and process +.Fa p +is executing a set-user-ID or set-group-ID executable. .It Bq Er EPERM Process .Fa p @@ -107,30 +121,25 @@ and the variable .Va kern.securelevel is greater than zero. -.It Bq Er ESRCH +.It Bq Er EBUSY Process .Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_canseeotheruids 9 -or -.Xr cr_canseeothergids 9 . -.It Bq Er ESRCH -Thread -.Fa td -has been jailed and process +is in the process of being +.Fn exec Ns 'ed. +.It Bq Er EPERM +Process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied debuggability. +denied debuggability +.Po +see +.Xr procctl 2 , +command +.Dv PROC_TRACE_CTL +.Pc . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , -.Xr p_cansee 9 , -.Xr prison_check 9 +.Xr cr_bsd_visible 9 , +.Xr procctl 2 , +.Xr p_cansee 9 From nobody Tue Oct 17 19:43:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cs5R0Gz4xvSS; Tue, 17 Oct 2023 19:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94Cs4XR8z3LG3; Tue, 17 Oct 2023 19:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xJZVzBJv4C7fkydpYSTZApLXF8KImVDuJvAMNZRKBgQ=; b=H8GZMHJrdeFM2+aCK5HfyDZkAN3yApHgZ0RiMci3q14PBksTIa1nZ7bAnaQ5/wGWnjbSLd /Toj/L48eux4uJQbFDhGjKid84Ak2wlK57MnUbmkyHoB5wOf/SESrb4skk43LcgZ7hogRv GJ6VOlufhoK7tkRkXpyGDXa5vx3AvfoPQZhJ80aifxhb0Tg3DM5OYBXqYb5a10eyLpc0Nq CEqcg8dQv+foFpsRMnc5JWBMpRJGAiqCVV9wBFVTflBpxTTQrC35xT0Z0jbsYDMWqul9JJ S+n7VZrHYZ1SWh3HdIxyf7B1mb550plxAJYtTWzu8UPJnaexjf839mLc1LUNtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571817; a=rsa-sha256; cv=none; b=xRcBb4Jz8vVecICa0g1wwWlcP8Vdr97+ypR0fuQS8QBuBd1A2tn5egNFIr2eFfmJUoRAvk rEDBLyoGX2vfjs2fmUxy0HSnvJsDbU0ZaMg3KzOSAMifycTZHk4vyGGMoqpjO//fLWalql MG8U7h6+GwXQJErry08KRdBAUp8D6VFV+G3XNJacIyNTX1C/GSk+ppzmjTdjBTMw5cXA/2 ZBT3EaP3NaSlrXGO5pA7r0j9Uwq3TTjLJlByjnlzLvDI+zwAzohVuiHW4gaRDHTGw/L1tc dakbZuY6W8TrUKAgppg3+RaaWVfxwfke8l28OllPzu9htAvYA8qijxEFWojIJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xJZVzBJv4C7fkydpYSTZApLXF8KImVDuJvAMNZRKBgQ=; b=h3nNDsCxWV5Unztip6pC180G1F1wOVWKO5k3GwEgOYdluF8OKR5X5c9+uWvyJ7KHNI5/hJ K1MB+4M/AQD4mNvcCuy4cuZbuD2dx1ejt5wYaSUxslloHx7d61CtbiOJfpAsuO9qHL4+/v aklRAxo6q7vwyIYN3EMQ/RyR51suff92zHQmjgvcQ9NaYxhyhnA4rtoqBRlw9ZI/rO34D8 jRd9IojKYYdipHDRjQXoDOvsHQnCZqpIMmp5AVsPns0boCNZ63NbXlpk57kf96juDz1QBd SpkwR12WbdiEc5zWmotOrrHBCJOyBRa7H5BPkGmCsQBCK0hN2SsMGwK/ye1Plw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cs3ZLTzd4K; Tue, 17 Oct 2023 19:43: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 39HJhbwP013358; Tue, 17 Oct 2023 19:43:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhbBs013355; Tue, 17 Oct 2023 19:43:37 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:37 GMT Message-Id: <202310171943.39HJhbBs013355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 8d935c419fda - stable/14 - prison_check(9): Bring up-to-date with hierarchical jails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d935c419fdafa0cb6fe9e1a3ed6dd92fd76d776 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8d935c419fdafa0cb6fe9e1a3ed6dd92fd76d776 commit 8d935c419fdafa0cb6fe9e1a3ed6dd92fd76d776 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 prison_check(9): Bring up-to-date with hierarchical jails Reviewed by: bcr, emaste, pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40639 (cherry picked from commit e9fdd494537ca45b14e0917e8bb1595b6460f3a3) --- share/man/man9/prison_check.9 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/share/man/man9/prison_check.9 b/share/man/man9/prison_check.9 index b3bdcf6b4571..7f174e3ceb2e 100644 --- a/share/man/man9/prison_check.9 +++ b/share/man/man9/prison_check.9 @@ -25,22 +25,23 @@ .\" (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 11, 2003 +.Dd August 18, 2023 .Dt PRISON_CHECK 9 .Os .Sh NAME .Nm prison_check -.Nd determine if two credentials belong to the same jail +.Nd determine if subjects may see entities according to jail restrictions .Sh SYNOPSIS .In sys/jail.h .Ft int .Fn prison_check "struct ucred *cred1" "struct ucred *cred2" .Sh DESCRIPTION -This function can be used to determine if the two credentials +This function determines if a subject with credentials .Fa cred1 -and +is denied access to subjects or objects with credentials .Fa cred2 -belong to the same jail. +according to the policy that a subject can see subjects or objects in its own +jail or any sub-jail of it. .Sh RETURN VALUES The .Fn prison_check @@ -48,12 +49,9 @@ function returns .Er ESRCH if -.Fa cred1 -has been jailed, and -.Fa cred1 -and .Fa cred2 -do not belong to the same jail. +is not in the same jail or a sub-jail of that of +.Fa cred1 . In all other cases, .Fn prison_check returns zero. From nobody Tue Oct 17 19:43:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Ct5klLz4xvd7; Tue, 17 Oct 2023 19:43: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 4S94Ct4yG9z3LD7; Tue, 17 Oct 2023 19:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBR5f4Yl+a4RXAzL5mF8tVhY8PjrvEDFWRQP5U9onJo=; b=yz4kGQfXOzDBjTRDP5zHhPIDBmWjdy9OoFGn+ql9dfdcFbGJSbghE2SGs8dABS+UM3KDv7 gCoJJHbEOIydihhEJnIg+CrBiBD2lWpvqoVsBoT1kL6MT/BmHJlOpZrIHdmxa8HVTOPJvk pwYgyzzBfAOciRPfgaNXjWks4zNpFSwBbQXMav/NYxqhrT4FQZXqoqI3b3yOmT319/9pRL o1bJou+WWOzxd0Ok3Tt7CTs+7hcTvtVXesiLd0zgxJ8wI3cLfb+rjfi+9y/hNpFSpGMDrS qSfQjUn/Kb0UQZGgEM7TRhSu/DIZOYwNbaOTcCfixyQNOc9XlPGxMNCE8WlnVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571818; a=rsa-sha256; cv=none; b=wb3ZKoH/JpH8AnYAchAiBX0eT7PUn25cK84jOCdP/pBlCGOj1adSonLoxjYDY1N+9OGV2N HdpW+UIQx4deojqH7XYwA17ufgOzNRJYlqvQTh9pouIBMS2I7tRYN16TRfRnqFak8WBKDi YHJ2AnWYuptg6mUm/VNQCJsmSFZK5Wpr1ui1AAyvxV7PRwuIeswOxH2neBAsu+wMSi84ph t6pYi4EpRqNn5LjGZlyb65nwYud96cfTy5dZb/mzuTeFgFlblXs15vHHRbySEVdGToN2C6 b5/oKU+c8u2Pd2Gz1y6tpxvPpLvTDme8TAaq99oWPArlIjChW737h2z5kK1mFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBR5f4Yl+a4RXAzL5mF8tVhY8PjrvEDFWRQP5U9onJo=; b=jgV9N0LYGFCOQvdpKwpc7FUzuaIcAdJ4dSBsCFxlYdkn5A7jLDaWZQ9+EC9mIGsvcuZXgP yjCrALwopxAYIm5Upx/qnTf+uriwvmSJqM/FqqN3tmTgmUzBB44e8NqBuD3Uc5R24mtqof KzGkQ7QQguJ+tzI0/I2Vl0yPtICLGoc4FT7wHuK1DuJH5h9noJH0jA9xGGYAli5blw1fva 0TvxbBBjdGLTyL2Y5e44bkkHql+G+l5tOeEqpRuNQupbWWXUn6bub3vOGstFoGOKeIXFDs xZ+buUgrJyVm7ag7BRFluR3Pp3V4wgbb2cyOx1liUVCdHbKNgEFJqMsZE5iLfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Ct443Lzcr8; Tue, 17 Oct 2023 19:43: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 39HJhc8l013420; Tue, 17 Oct 2023 19:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhcPR013417; Tue, 17 Oct 2023 19:43:38 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:38 GMT Message-Id: <202310171943.39HJhcPR013417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f3de805ace48 - stable/14 - groupmember(): Extract the supplementary group search in a separate function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f3de805ace484db4a3bf9191a150ef4843ae92f3 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f3de805ace484db4a3bf9191a150ef4843ae92f3 commit f3de805ace484db4a3bf9191a150ef4843ae92f3 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 groupmember(): Extract the supplementary group search in a separate function This is in preparation for the introduction of the new realgroupmember() function, which does the same search into supplementary groups as groupmember(). Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40640 (cherry picked from commit b725f232f3b09b4bcbc426854fe1545234c66965) --- sys/kern/kern_prot.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 648c067dc528..21f5e5d3bc16 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1273,36 +1273,43 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) } /* - * Check if gid is a member of the group set. + * Returns whether gid designates a supplementary group in cred. */ -int -groupmember(gid_t gid, struct ucred *cred) +static int +supplementary_group_member(gid_t gid, struct ucred *cred) { - int l; - int h; - int m; - - if (cred->cr_groups[0] == gid) - return(1); + int l, h, m; /* - * If gid was not our primary group, perform a binary search - * of the supplemental groups. This is possible because we - * sort the groups in crsetgroups(). + * Perform a binary search of the supplemental groups. This is possible + * because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; + while (l < h) { - m = l + ((h - l) / 2); + m = l + (h - l) / 2; if (cred->cr_groups[m] < gid) - l = m + 1; + l = m + 1; else - h = m; + h = m; } - if ((l < cred->cr_ngroups) && (cred->cr_groups[l] == gid)) + + return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); +} + +/* + * Check if gid is a member of the (effective) group set (i.e., effective and + * supplementary groups). + */ +int +groupmember(gid_t gid, struct ucred *cred) +{ + + if (cred->cr_groups[0] == gid) return (1); - return (0); + return (supplementary_group_member(gid, cred)); } /* From nobody Tue Oct 17 19:43:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cv6qtHz4xvXW; Tue, 17 Oct 2023 19:43: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 4S94Cv6L14z3LV9; Tue, 17 Oct 2023 19:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJu8Khip0RcPSflCEhMF9eQhuM9I2Hd8tdloYGGd5s8=; b=dcJpqZ1BDM4c2+zFzGPBXU4kLeI6+QcTA1jM8nQzgVkbJpYywcWsO36CBt4gEhLfggAYBh T/t162BtMrAVr3GFtEi7Gk6+lJyaP9IESG62l8b4umJ5Q4Jg2giLZ5Xwxd13304tgYBQZo bABBnG4Y7YhJ32ggOnQGZay3Frw/6uZyItTgXwkKzf9aGykZHBGldsursqAypR9epPdrI3 UdmG3p7D/PQwYdtHWW4WYHYh2Da4HvP72SA5h2da9+RN2PIyMreWm1Noz0Lmjx0i5E/7k5 6zaTsfwoUOhGv/t3F66MbrNcZeidZE9jowqE/rozT9+ViVMk9WWEkJhayioarw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571819; a=rsa-sha256; cv=none; b=KaxPAPExXROWaLAN2ivJlczMvJtduMShQEq35Tr2fZZYCnjML1mZZ+6J27tRuLTCFg/pfk 7jT7/4I+kJDpLqjjj6SiLyAQ+24BvoHQ+F6c0Fd9q/VMLeAeT4/bkIyN4S30MoNZlLtv3N QXiQiNTbFoqRgkakK2/Tkqc17m15yhSTJCXskb6fmkAgc9I0HN+dOTRTLs5v7GiXFF3I6Q Tfdee3qyr1r5jievnRVOgqAkfIk8hKFdY5PQfXVVW8FAUUKcTCbjWg+wntdUSzd/XCRMv7 if5PjmY/N3d5y9hfDx1b30gkyeI27MmQCHGnZsU0u7+od2KOQESCpyP1/P32fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJu8Khip0RcPSflCEhMF9eQhuM9I2Hd8tdloYGGd5s8=; b=h7tBAVPcfREAJMjkgWkhbPboKCYyMe2JuiT6g6em7F/7XP4uurUNxV2YHskhVSEZWGqx97 Fz7OSTx3wlRrf8TZ50yLxQz1yvrMeueQsp6q/qHHlYb1cfOOGvbXsUX1+EFrp8xMHfqLg6 m/dLxZrfnIXhvEdNp2fVSflNcDJyuEKIcVicgdF1ka17wGJ1fTj63uvUGki84fmH3jrpSo 3qjp+y5R5KnfCwL6f9pMxLEq1VYuhd0Bo7sF1E6pDmsYYdzc0QGpGuL1ysuWeyV2YkrpcU /TmqToFxiimfVt6HoKCDkD1qvGxSgNIxblT30DnQPE2e6BssLLXc1ydf0SJw3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cv5GpczcVV; Tue, 17 Oct 2023 19:43: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 39HJhdIR013453; Tue, 17 Oct 2023 19:43:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhdiL013450; Tue, 17 Oct 2023 19:43:39 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:39 GMT Message-Id: <202310171943.39HJhdiL013450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: d1fde7841f3f - stable/14 - New realgroupmember() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d1fde7841f3f3dd86b932ae1f9bb285cbe16634c Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d1fde7841f3f3dd86b932ae1f9bb285cbe16634c commit d1fde7841f3f3dd86b932ae1f9bb285cbe16634c Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 New realgroupmember() Like groupmember(), but taking into account the real group instead of the effective group. Leverages the new supplementary_group_member() function. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40641 Differential Revision: https://reviews.freebsd.org/D40643 (cherry picked from commit 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559) (cherry picked from commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833) --- share/man/man9/Makefile | 1 + share/man/man9/groupmember.9 | 7 +++++++ sys/kern/kern_prot.c | 13 +++++++++++++ sys/sys/ucred.h | 1 + 4 files changed, 22 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index c3c81719b7d2..2122f8d6ea8c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1157,6 +1157,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \ g_provider.9 g_error_provider.9 \ g_provider.9 g_new_providerf.9 MLINKS+=gone_in.9 gone_in_dev.9 +MLINKS+=groupmember.9 realgroupmember.9 MLINKS+=hash.9 hash32.9 \ hash.9 hash32_buf.9 \ hash.9 hash32_str.9 \ diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index 3a516622efce..ae7ccd477955 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -36,6 +36,8 @@ .In sys/ucred.h .Ft int .Fn groupmember "gid_t gid" "struct ucred *cred" +.Ft int +.Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember @@ -49,6 +51,11 @@ Considered groups in .Fa cred are the effective and supplementary groups. The real group is not taken into account. +.Pp +Function +.Fn realgroupmember +works the same except that it considers instead the real and supplementary +groups, and not the effective one. .Sh RETURN VALUES If the .Fa gid diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 21f5e5d3bc16..23bd2009582b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1312,6 +1312,19 @@ groupmember(gid_t gid, struct ucred *cred) return (supplementary_group_member(gid, cred)); } +/* + * Check if gid is a member of the real group set (i.e., real and supplementary + * groups). + */ +int +realgroupmember(gid_t gid, struct ucred *cred) +{ + if (gid == cred->cr_rgid) + return (1); + + return (supplementary_group_member(gid, cred)); +} + /* * Test the active securelevel against a given level. securelevel_gt() * implements (securelevel > level). securelevel_ge() implements diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index eb92776c158a..633bf436fcd4 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -159,6 +159,7 @@ void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred); +int realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Tue Oct 17 19:43:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cx2Xkkz4xvPN; Tue, 17 Oct 2023 19:43: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 4S94Cx05fpz3LRm; Tue, 17 Oct 2023 19:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5WrAoCanubx5FX1+0FG43oFVI37xJoYBaWBHSCJIOdY=; b=SvJWtfFz8T+Pbue9+VZlA1CBTtiuqw9sm/BKHs9FWOcUAD6w4nXM+d+GAJFJisBfKaw59d qXinFMJnpcsSk1D0S2EyaUJsnGldAJgR8mgdosGyvCc6NHVeTqshU3yyf7UQP6pXlU5ei3 iWBu+OAnQOnl39oIkFiWik1rH0ogE9ntNkftvST7kQoHIZfC7eD98uFKJxAg1H8FDQ6hvu eUIcqGGC4dn/1+GKNYGfYYDy6Nn2pRt8sNWQQzQZJWtcD3k8sF0BE10wW0n8wDeoG3xdYd xr4D2pKYDYbgxC3nCLWo1pTI1Z+Jh0qtNrgNzM0A4CY0bjOxUwJdLCGAMif7rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571821; a=rsa-sha256; cv=none; b=NKaXS2f4r1neS97cY0Ves6pxwJ6oyt8fXeeqMsw2uiRMcOO1z4ZfT9Uw0pQsZjtDzsbW/7 4g08L5xmrC/ETU3N8jmdyEbr+Y+WWADpcZpry+Jn0Th0aIWZiw+gbOnbVXsgTR9GndgI7T wwOBYK3T5AGUFEP8fMCFx+ZzuNLbFEgWsIhNxJpv6b8muMGM4D0Evs20IBuaVNDfyuQD/q hXpphVRALWCDh5dOq5zojiRqWCW5+sevnWxxayhc1jf983O5BOalif4zosFZ7qXUcopIAe f0VhhLL67saIEoKXTx1F/1xADeg49OEGaqo8b3n4C+MP+Wp49JmSXdo4yLYDYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5WrAoCanubx5FX1+0FG43oFVI37xJoYBaWBHSCJIOdY=; b=I49uZpa8VhqgsymWd0hIo3PXEciXixTjYqNQ3MbuJeztMp5FUkWir6efaLcRsX7Ftx4iH9 UcSMhm5OSscJnGLy55LhXiTX1vZlAgOB4hXM65nT5ZSwZo0RNfn7GGF6nag59OkoO1Tbdf L+9QPriZcaACgNrmnSb4fUWNc4PgTWDtmsOW2NBiwGfb6ya0I36ZcQVdicUgL8kSV6ig9w Qdcx6qGxh+hkOqOphTkRrbCAwnjwzaUHgHMMvDBFa6WELWXMrovMRdRG/GOGv78+raHge2 xszfY/Xvq8NhNYRH0hOzrrosVV4f/QZnyWZhMmN8Bh3Le/8+9wyyYIlWh4cZuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cw6JX7zcSR; Tue, 17 Oct 2023 19:43: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 39HJheng013509; Tue, 17 Oct 2023 19:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhej2013506; Tue, 17 Oct 2023 19:43:40 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:40 GMT Message-Id: <202310171943.39HJhej2013506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f482bc958437 - stable/14 - cr_canseeothergids(): Use real instead of effective group membership List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f482bc958437e90cf8eb3a9e45e92efeb0b2556e Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f482bc958437e90cf8eb3a9e45e92efeb0b2556e commit f482bc958437e90cf8eb3a9e45e92efeb0b2556e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 cr_canseeothergids(): Use real instead of effective group membership Using the effective group and not the real one when testing membership has the consequence that unprivileged processes cannot see setuid commands they launch until these have relinquished their privileges. This is also in contradiction with how the similar cr_canseeotheruids() works, i.e., by taking into account real user IDs. Fix this by substituting groupmember() with realgroupmember(). While here, simplify the code. PR: 272093 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 Differential Revision: https://reviews.freebsd.org/D40644 (cherry picked from commit 91658080f1a598ddda03943a783c9a941199f7d2) (cherry picked from commit 0452dd841336cea7cd979b13ef12b6ea5e992eff) --- share/man/man9/cr_bsd_visible.9 | 2 +- share/man/man9/cr_canseeothergids.9 | 8 ++++---- sys/kern/kern_prot.c | 23 ++++++++++------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 index bd676e6f5705..f2d42f3835dc 100644 --- a/share/man/man9/cr_bsd_visible.9 +++ b/share/man/man9/cr_bsd_visible.9 @@ -97,7 +97,7 @@ and are not members of any common group .Po as determined by -.Xr groupmember 9 +.Xr realgroupmember 9 .Pc . .It Bq Er ESRCH Credentials diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index f0c1e5c4e726..109d41a8545d 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -48,9 +48,9 @@ This function checks if a subject associated to credentials is denied seeing a subject or object associated to credentials .Fa u2 by a policy that requires both credentials to have at least one group in common. -For this determination, the effective and supplementary group IDs are used, but -not the real group IDs, as per -.Xr groupmember 9 . +For this determination, the real and supplementary group IDs are used, but +not the effective group IDs, as per +.Xr realgroupmember 9 . .Pp This policy is active if and only if the .Xr sysctl 8 @@ -79,5 +79,5 @@ Otherwise, it returns .Er ESRCH . .Sh SEE ALSO .Xr cr_bsd_visible 9 , -.Xr groupmember 9 , +.Xr realgroupmember 9 , .Xr priv_check_cred 9 diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 23bd2009582b..43fc3100bfa7 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1404,21 +1404,18 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { - int i, match; - if (!see_other_gids) { - match = 0; - for (i = 0; i < u1->cr_ngroups; i++) { - if (groupmember(u1->cr_groups[i], u2)) - match = 1; - if (match) - break; - } - if (!match) { - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) - return (ESRCH); - } + if (realgroupmember(u1->cr_rgid, u2)) + return (0); + + for (int i = 1; i < u1->cr_ngroups; i++) + if (realgroupmember(u1->cr_groups[i], u2)) + return (0); + + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) + return (ESRCH); } + return (0); } From nobody Tue Oct 17 19:43:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cy1zJJz4xvd8; Tue, 17 Oct 2023 19:43: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 4S94Cy16x5z3LKY; Tue, 17 Oct 2023 19:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oby0n7dnGRaGpY8xeNZ6IKGCkc/P80an+ySDgvCQ3zw=; b=Z2aOdYZqWM+sOVu4FBmzBknQCKekqLRLzNeeTA39Leuq3tgLbAaa0giKIwODh7uf5l6ltk 3f13iJDv2z+wCPZ8G2QyEWV8RogOVCZKJkfT/5GFVwozw7dj7oL/lkT6XibubNUszAIE61 M4gnwpZtYY3POf2Po6nQ07kdGheECOvaBoaIpjWWRD4sllbe8TqMkUHCTI/VQdycCsIHRW PR1jaXODM5ueDsXApGG5vtg32+Y5hXnv3rbvXONykC4YkL2/sB/028xQNHEo0ZlAztERC8 gaFgE8FnfHKpg+o4mUTOw7pY8ItSp7F1yPhikxPfxZvfNiH1QT1h5W7e7yUMag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571822; a=rsa-sha256; cv=none; b=rqqqTXc3t94XnH2q3MhK2JSTYDufHurzx9fJJhtJYwmZIxnHbnUdpCCjFLa9qQp6gMY2X9 UOUBa+CCxj+4C++QOvRKUiQoGM76UqYFgSJAs7TbpBJIKnWlBKz9u4lZH3PHIMAAE6BLzb 6m4qcXIjRfvKJZm3rLFYiyCpx1ATH5UDpKYl1GT6razKgiJzGOYw+AGBA+vzvRDfZosDjR DasZkBihv16kjQmkMfGrlGnBF8gWvN1BtWF9uLxOMT7+667S65D1n2CGMRHshocbx8GZsc rGYruWhfYRRPGeeLaHiyxGx1b1tpC5e7UM1nJv8BPbhSnWC3EdeVluI1hF2/Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oby0n7dnGRaGpY8xeNZ6IKGCkc/P80an+ySDgvCQ3zw=; b=Hw6TdMq2mue1REzxmdAMqNNBYbxZzVFfTib4T2pk65RymJ26Mz34aIvjJR6sSwqmGkDOO7 xlAPCJTR8NCNYSI7eDjfkMdzIlOeF1M2MnTu2Gov4K7NzdddMZI07QmxHWh82PKawkvL1t 7pRJSle4EfXUZY8/VY5+SDGR3grRruo007J1Au2BxRRgwd7nNNB2XTpkqM5MUY0GAkRcvr j0n7T15Z98nOrFTct1Wclx3ZoWuebX7OgvxuSfuGb6j+Wxiw0WKeJSqCccV5S3x+J6/f2D 7C1d8NOxGjGx5F+PTjDkcaItWPFzxDNqhpQCE38AONGb7PgMPF3Tlh457TK4VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cy0CTDzd0C; Tue, 17 Oct 2023 19:43: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 39HJhfDr013571; Tue, 17 Oct 2023 19:43:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhfuQ013568; Tue, 17 Oct 2023 19:43:41 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:41 GMT Message-Id: <202310171943.39HJhfuQ013568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b6b76c1c09a4 - stable/14 - groupmember(), realgroupmember(): Return a bool instead of an int List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b6b76c1c09a44dbf9ef1ef8e6b0c3e8204baae7a Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b6b76c1c09a44dbf9ef1ef8e6b0c3e8204baae7a commit b6b76c1c09a44dbf9ef1ef8e6b0c3e8204baae7a Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 groupmember(), realgroupmember(): Return a bool instead of an int Requested by: mhorne Reviewed by: mhorne MFC after: 2 weeks MFC to: stable/14 releng/14.0 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40958 Differential Revision: https://reviews.freebsd.org/D40959 (cherry picked from commit ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6) (cherry picked from commit 845b7c80887ac84c82ee776836ef86d68ea71c94) --- share/man/man9/groupmember.9 | 18 +++++++++++++----- sys/kern/kern_prot.c | 12 ++++++------ sys/sys/ucred.h | 4 ++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..b7865a35fdc9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -34,9 +34,9 @@ .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h -.Ft int +.Ft bool .Fn groupmember "gid_t gid" "struct ucred *cred" -.Ft int +.Ft bool .Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The @@ -57,9 +57,17 @@ Function works the same except that it considers instead the real and supplementary groups, and not the effective one. .Sh RETURN VALUES -If the -.Fa gid -is found, 1 is returned, otherwise 0. +The +.Fn groupmember +and +.Fn realgroupmember +functions return +.Dv true +if the given credentials indicate membership of the group +.Fa gid , +or +.Dv false +otherwise. .Sh SEE ALSO .Xr getgroups 2 .Xr setgroups 2 diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 43fc3100bfa7..14b19837d5dc 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1275,7 +1275,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static int +static bool supplementary_group_member(gid_t gid, struct ucred *cred) { int l, h, m; @@ -1302,12 +1302,12 @@ supplementary_group_member(gid_t gid, struct ucred *cred) * Check if gid is a member of the (effective) group set (i.e., effective and * supplementary groups). */ -int +bool groupmember(gid_t gid, struct ucred *cred) { - if (cred->cr_groups[0] == gid) - return (1); + if (gid == cred->cr_groups[0]) + return (true); return (supplementary_group_member(gid, cred)); } @@ -1316,11 +1316,11 @@ groupmember(gid_t gid, struct ucred *cred) * Check if gid is a member of the real group set (i.e., real and supplementary * groups). */ -int +bool realgroupmember(gid_t gid, struct ucred *cred) { if (gid == cred->cr_rgid) - return (1); + return (true); return (supplementary_group_member(gid, cred)); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 633bf436fcd4..7c9e46e47774 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +bool groupmember(gid_t gid, struct ucred *cred); +bool realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Tue Oct 17 19:43:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94Cz2lX7z4xvK8; Tue, 17 Oct 2023 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94Cz26PYz3LQR; Tue, 17 Oct 2023 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUBEAYaUQMwSRYIVrfKFbnUXE7bRX4e3JeDVmsGMyVM=; b=b7hmq1/QjWoBHioVqebaUw3exP9Wp79oo60C6v/WqTQX7u5m1G6axcPcC/au+s6TDPVS0G e0NyP+6JE3rUEYKfsMtGi0MnmlM/CKhPETWjij36wtuCFj3vb/5RgXPHGCCQFqXLcw1Ngc ddvhG2RM0+Pv/M98yCh0HSZTA2RiGQJvJnxHVjRBOT4KVwrK/DrT7qqLbHFtiV6zkRxnNy oiaUMvoI4YxLYdq6S/UjPyM2NxbgHxYV1oN69DsLmn7sMpRPpvruxJfIfL9lU6VWpOilLd s+dqqnMNKy6EU7Mswn3lZsBdxl//245XbUbzzTc5M9rh1XRM+CHqsWK3nctCsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571823; a=rsa-sha256; cv=none; b=lNKammlOAQ0zgZiac2YY5NDMWDvdC0/CP4naH7wS4E3C76bLaAofraaSEd7P7L19sbOY0Q mJNaWYqw+9PJ3JRYmTfCd/arEIQNq7XyF2z260X30fnkTmq1uYRVxWDAawiZ8F5p2OHPqK KL94IgUUKSYK4IfAxuMCZ5XKrbUOuT42Dn48/zY6o6JOKQCJ0A0zrSM50JZWT13/LnNaUZ IYyZlMyxCJWafA/hY6l43Vt1F7zYM4NmprzuQnWIEefcSSkMtKvHLm9Lxubt9scqOZC/Ok giztDjYv5kUlW8ZuzVwVFFLxl5uIDrpgnjtBJak3GuevE2Y2TigBqpyIN45MGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUBEAYaUQMwSRYIVrfKFbnUXE7bRX4e3JeDVmsGMyVM=; b=lAI6S5KkZP3B0o995asHX7C15jPT21aasNRFXK2mdnEOh8VqwIhDancYNo4tmnADhB1GgJ f7XKBTt718ue70EFGrpAms87ChFQE9curM+tdiLbJZHMknpJhBNk7Ewd3kc2bVui+trQ45 btU3zj7qXWbfdgunmpv4mtpsQBln7Mte3kj95EbqiVSEKs8y/tZkWvqZ7v41z/1WTINkat Yj0uKlbyHqOH7CIBrRrMLnJ0Cw9sBwm6W4wKyueCrsJq86wRqxW8mC8ctvWXNCqA/7sExF E7aD/5wheBy2+cV+NagMtQrmvIo8pI+dw/Cga/W37l+DxL1cCVeD65nbNQMfZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94Cz1CKmzdFc; Tue, 17 Oct 2023 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39HJhhE6013621; Tue, 17 Oct 2023 19:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhhRM013619; Tue, 17 Oct 2023 19:43:43 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:43 GMT Message-Id: <202310171943.39HJhhRM013619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 4a8585251944 - stable/14 - security(7): security.bsd.see*: Be more accurate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a8585251944e1d8f0242ee7937204e4fbcd3e8f Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4a8585251944e1d8f0242ee7937204e4fbcd3e8f commit 4a8585251944e1d8f0242ee7937204e4fbcd3e8f Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 security(7): security.bsd.see*: Be more accurate Reviewed by: mhorne, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41108 (cherry picked from commit 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66) --- share/man/man7/security.7 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index ebe5e66e22af..a48e3607f0e5 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -959,16 +959,18 @@ Backwards compatibility shims for the interim sysctls under will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.see_other_uids -Controls visibility of processes owned by different uid. +Controls visibility and reachability of subjects (e.g., processes) and objects +(e.g., sockets) owned by a different uid. The knob directly affects the .Dv kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . .It Dv security.bsd.see_other_gids -Same, for processes owned by different gid. +Same, for subjects and objects owned by a different gid. .It Dv security.bsd.see_jail_proc -Same, for processes belonging to a jail. +Same, for subjects and objects belonging to a different jail, including +sub-jails. .It Dv security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like From nobody Tue Oct 17 19:43:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94D04GvMz4xvpZ; Tue, 17 Oct 2023 19:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94D03HVTz3LN0; Tue, 17 Oct 2023 19:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt/gyerQLPfInmDvFlFdCQRMxdFIqlZAHj5lVsHb9Xw=; b=kPvcDTZx1M+3VhgiBAuqUmfGXnK2kD0wq+cgFnBYt374UoR6UeTsmyTmWqfE+JmDN54S+g YfBh+hCOnB1yjDCPVCJErzby5ODZyA2p6Fp+3PsO7Qdopdj3SIGqxJO7EBrl9qv2z5MbVj tytEg1atq50z28mWzFxW9TyJJmRWLtK7uTnbImSRBrzwKveGd7YWUVoYDxtDB/XJMdsmJ9 RhN87aTRs0cJHhNn3qv6i+CM5cWmPBwSR/T5g8zh9l7TaBnwBnjEQm1I6gOlZQ+4EmIDNe RPQ+0M06/XJ5Yujgt1zXbWhBO0WSR7ZrjNwxtLGAFP9egi9yXV0Kr6JDpUCOPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571824; a=rsa-sha256; cv=none; b=BrNNiVFUXkRCT6wSa06aRPH4x+dVog0ivVuisMTUEXXp2UGn963lJFUW7/v11NRtEOXoJo A4d55JKzHyOD2JPbIrA8hNnR52yrseNEfP6j2Pq63p1LkarZjPTaMkc3gnAVEsV7sCUb8s slQ49pb8FQF9Ybw/NSTHZlVPbNSHsXCl47ZeBQZgI+4kuS6kriOLxI8ryerX09PbBtbyv2 Vt6pU0lyKZeZ9/RIaPaF74zWehaDlCPuVGZqYU89MUlz9TizHKFaYYM85wom/wIQB4m+JN Re6EqjOfxRaAHw7qzgt4eyb1lnx9r0IJOOQbyEFXY5oFt62DnGMqcDRzHfE/Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt/gyerQLPfInmDvFlFdCQRMxdFIqlZAHj5lVsHb9Xw=; b=uZ1ZBfGxwQ7xtN5mgnsCI8ySA39y0sOTbgn5mLZevIIR4NVvJaMpT9FBnUme5bAJkYuOdv 7Mz9WUo3tIdwqbQFtOlZa8uAZWK2F756KpzO1YKPLwd1EtmMcRrlxyD2dIWWmw0FBkg3Ng uYUZGoXq+LZfyRyvAOuGb4qI9OYZzY3QIjQEa3F84UjbBka/W3FuihkRHqOREd61oovUyF z0ByhBiGXudJ2++usfy6X5YNbA+368KlccbLSltL1JZgbyZCH75Pxq2MN4bBbPrzvyyrp4 r0eGAe8xkrT8jHoYl8HGlSpQdvMOI8ykB20vtdRYNNKHMB4/MwHYK5N7Uxhi3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94D02D0Fzd4L; Tue, 17 Oct 2023 19:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39HJhijh013668; Tue, 17 Oct 2023 19:43:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhiiZ013665; Tue, 17 Oct 2023 19:43:44 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:44 GMT Message-Id: <202310171943.39HJhiiZ013665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b0186790020f - stable/14 - ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0186790020f1a3eecd6b1d86fe79841d90e3438 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b0186790020f1a3eecd6b1d86fe79841d90e3438 commit b0186790020f1a3eecd6b1d86fe79841d90e3438 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc Reviewed by: mhorne, emaste, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41109 (cherry picked from commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87) --- lib/libc/sys/ptrace.2 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index d7d244b1d84a..ae1770315aa5 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd December 15, 2022 +.Dd August 18, 2023 .Dt PTRACE 2 .Os .Sh NAME @@ -149,31 +149,37 @@ its scope. The following controls are provided for this: .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.allow_ptrace -Setting this sysctl to zero value makes +Setting this sysctl to zero makes .Nm return .Er ENOSYS always as if the syscall is not implemented by the kernel. .It Dv security.bsd.unprivileged_proc_debug -Setting this sysctl to zero disallows use of +Setting this sysctl to zero disallows the use of .Fn ptrace by unprivileged processes. .It Dv security.bsd.see_other_uids -Setting this sysctl to zero value disallows +Setting this sysctl to zero prevents .Fn ptrace -requests from targeting processes with the real user identifier different -from the real user identifier of the caller. -The requests return -.Er ESRCH -if policy is not met. +requests from targeting processes with a real user identifier different +from the caller's. +These requests will fail with error +.Er ESRCH . .It Dv security.bsd.see_other_gids -Setting this sysctl to zero value disallows +Setting this sysctl to zero disallows .Fn ptrace -requests from process belonging to a group that is not also one of -the group of the target process. -The requests return -.Er ESRCH -if policy is not met. +requests from processes that have no groups in common with the target process, +considering their sets of real and supplementary groups. +These requests will fail with error +.Er ESRCH . +.It Dv security.bsd.see_jail_proc +Setting this sysctl to zero disallows +.Fn ptrace +requests from processes belonging to a different jail than that of the target +process, even if the requesting process' jail is an ancestor of the target +process'. +These requests will fail with error +.Er ESRCH . .It Dv securelevel and init The .Xr init 1 From nobody Tue Oct 17 19:43:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94D164MDz4xvVN; Tue, 17 Oct 2023 19:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S94D148xnz3LTW; Tue, 17 Oct 2023 19:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tLziKFhwBSsZ0ks7X1Ug8YnTFvtXDBDE1UWIXAKAUko=; b=Y7Dtn52OzNPdDsxsjsvax2T2tSZszpBjMJpQy8/foxyZoeoZlIWMJ7n63AJhHCYpnCRRwm vDOl1xvD1H7amnA9rk6t/tLx5DUb6NGxzchDMMHjhTEWQgQJBIhtGQV8hmvawdbDmPFIxi v14ZtKCPLZ0QJo85J25CGCC5ddQoGVWqsSc1sVyVhffnXyJlJreN+G0itXxmZRr4zJZIDE r3oq8GSgwR7vw6AuUoKXuJsI4WUVVcYltOZyuK4cU5tmCVwZTkydEpdqZUps0fl94ex0ho MdkewhRhZUDGNBols89zdK/uMBONnBQqiXJnWL9TtZaAtXrVeOK9B7n9Thdmog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571825; a=rsa-sha256; cv=none; b=I+n71QuiVYXd1JzdLxXzyugh36c8py2Dp4hl4wqMROCS5wMZ0y5HKDDEbh1iz+JR6EHL0Z F8gZ9CL1m5sBBbfm5oQB5SRY/byVQsdL6dB2sC9JwhPPmAqkD24L986mofQg2SYmqypvJI L2geCO5cTkF3b84UOHkhw0DkLfSIYIQD14F4kTDl8B3/ZAO9NUGV017k6tuunCHGbmVVxF LbYCmthWa9ArrI2vyNBnT6Tsm+a4+/oFvLy0K3lJvcwbt5PXdYOmQRMnjX4lgqhdTlrBSn ZrINLpXaaIWuh7EBIvlPtiUFmGd5/OmlpGEsFtpT0Gl5lEc+tIyPJDqEzCueaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tLziKFhwBSsZ0ks7X1Ug8YnTFvtXDBDE1UWIXAKAUko=; b=yF8ljxffbi2r79y9md37Ay0hcZQrk/x17hxPRIqYpF7ynh8bmrruXPc9ND4/a1TVgcPIvI qLon7iKnWOtDEapsOg898A7Oko6oymAvH/EpywZfRt43m2Hmz4KNc4lB3sAalnBnUw40Cm CkEdvlKsKMcmo4MTTM1aabCXQkdq7gxkntiXOw9IoAxDeYDG2zVfXVY9yC6B5Aol+mwErI er/1qdO5z/wIGEj/bKJC9WymtFVf/yhMZ4kv6a/Kcj7LHVGE5fCJhW89nkd0BmiMj5rzbL Pr4CGxxnmrEj44piIWXEAqj+Q4hkVH5TPZOFnDxuScirY80LmQl6npP8RzSWQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94D13FDxzdCR; Tue, 17 Oct 2023 19:43:45 +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 39HJhjXj013737; Tue, 17 Oct 2023 19:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhjJS013734; Tue, 17 Oct 2023 19:43:45 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:45 GMT Message-Id: <202310171943.39HJhjJS013734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: c8ca21cc94df - stable/14 - sysctl(8): Mention more security.bsd knobs; Refer to security(7) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c8ca21cc94df97ec5b85c8aa6dcc71f75e99ecfe Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c8ca21cc94df97ec5b85c8aa6dcc71f75e99ecfe commit c8ca21cc94df97ec5b85c8aa6dcc71f75e99ecfe Author: Olivier Certner AuthorDate: 2023-08-17 23:54:49 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:59 +0000 sysctl(8): Mention more security.bsd knobs; Refer to security(7) Reviewed by: mhorne, pauamma_gundo.com, emaste MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41113 (cherry picked from commit 8d7a48d367ffde2a29419ef943c4099984e3af4d) --- sbin/sysctl/sysctl.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 3e995e40131b..ed768510eb6c 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 24, 2022 +.Dd August 18, 2023 .Dt SYSCTL 8 .Os .Sh NAME @@ -194,7 +194,9 @@ for more information on which tunables are available and how to set them. .Pp The string and integer information is summarized below. For a detailed description of these variables see -.Xr sysctl 3 . +.Xr sysctl 3 +and +.Xr security 7 . .Pp The changeable column indicates whether a process with appropriate privilege can change the value. @@ -231,6 +233,8 @@ String and integer values can be set using .It "kern.logsigexit integer yes" .It "security.bsd.suser_enabled integer yes" .It "security.bsd.see_other_uids integer yes" +.It "security.bsd.see_other_gids integer yes" +.It "security.bsd.see_jail_proc integer yes" .It "security.bsd.unprivileged_proc_debug integer yes" .It "security.bsd.unprivileged_read_msgbuf integer yes" .It "vm.loadavg struct no" @@ -320,6 +324,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , +.Xr security 7, .Xr loader 8 .Sh HISTORY A From nobody Tue Oct 17 19:45:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94G66Tnkz4xvpr; Tue, 17 Oct 2023 19:45: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 4S94G65822z3R2f; Tue, 17 Oct 2023 19:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbI7hectgmysZ+CwAGWYvlDVSMsPLe8+1Ze35D88Byo=; b=kunKN6G1skAj8ENeSRMqUJylevQZ2FOZB2KIhUqD7FQDYn1m3UN2wzl07epPwWa16plCDb JWHC2tAyq/Q/h0d8hJIbbwbKjho9TbrKhhE5KJBdrznSZgi0NfE8nxIN/8dZ3zAPZk9Bmu 7kWGuDvKxSKHr3xk6u++m0GxP9Xh8ejh+bal2zJFJUtbMv3AgkmnfB6u86w6mCtNTOt8aW R3ZILNLhWyZpbgV4fzhPFHZnoHBbZsEn40w3SSIgduC+fo8MAmF49hOGjiXroESkWnoG2Z 4CTMKr9x3jyQnv458X6MxX40BbTDamU3a7MeFIHii7d062pWHM9lh7xmgSqmtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571934; a=rsa-sha256; cv=none; b=J0MIhnxihxtOMwf+QN7r/WeeOQR5fLo9Kd6BfmPYd07F+b/fpiI65X8caxi4ByL48oXtkK 48cWdQmUdHJXCMoNXVCOGDYl+/dCqqTQWAJfnB1Qsz7pffGdRbrKescGsZLBeoVAmAqlMM DIGODP6pO7QqfhydJdpebd437Q4cfMG4Ncpjsc/RzIcMqfFwJFmtgPTmWCyycMFrAOpNQf RgmF+gKk9IfpcQ4OGbGZZLn9leoutDbHIwO+NiSO9tihS1+AwhUMfk7nuVeygyYq3aze4d p7QzGFC6YU0kbqjR/zHqmwihNzuBiHVYE6+k6fxOQ79PWEeIkmw7bJMVOlSYOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbI7hectgmysZ+CwAGWYvlDVSMsPLe8+1Ze35D88Byo=; b=AjNYWmrnhzI/zTAgtrsCWkdrcUz9+CyxCkcXJ2AApy0Ibz7yIK/z11ebSc0jSrmerRwr97 +ezfpud28HQuEce8Ksnl5VBNFbUPBNvUHByDS1eIcYSjhQyfQzv9eQ6jla6J7tQLnrjLt0 /uvZ6VWyJrcNrH5IZvu3u5dJeOr8RH/n+PyGCKIlTpYhhcKzdWaex98RQLGwEBFXWrvZi8 BrINZJfDDnbZM7XT7MfvKaO1MIPriTl48HfnorJyPkbjpZINn8TDAKLZV7fpRmew9oSgDW ec7Vt2Bq+ebzmEVafX6BXh5vFxaR2IgYa2iOSoO9/8BgkqIGctpyUpVWfAAYUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94G646G5zdCb; Tue, 17 Oct 2023 19:45: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 39HJjYqf014363; Tue, 17 Oct 2023 19:45:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJjYqc014359; Tue, 17 Oct 2023 19:45:34 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:45:34 GMT Message-Id: <202310171945.39HJjYqc014359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gregory Neil Shapiro Subject: git: 9e8372d0103a - stable/13 - MFC: Remove confDH_PARAMETERS settings in favor of using sendmail's built-in default which was added in sendmail 8.15.2 (the config line predates that 8.15.2 feature). This also alleviates the need for admins to create the DH parameters file if they opt to use Diffie-Hellman. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gshapiro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e8372d0103ac474c08cc0031110860855368b05 Auto-Submitted: auto-generated The branch stable/13 has been updated by gshapiro: URL: https://cgit.FreeBSD.org/src/commit/?id=9e8372d0103ac474c08cc0031110860855368b05 commit 9e8372d0103ac474c08cc0031110860855368b05 Author: Gregory Neil Shapiro AuthorDate: 2023-08-18 00:32:56 +0000 Commit: Gregory Neil Shapiro CommitDate: 2023-10-17 19:44:01 +0000 MFC: Remove confDH_PARAMETERS settings in favor of using sendmail's built-in default which was added in sendmail 8.15.2 (the config line predates that 8.15.2 feature). This also alleviates the need for admins to create the DH parameters file if they opt to use Diffie-Hellman. PR: 248387 (cherry picked from commit 98fd1add676321978db72d77d34ef51ca454c814) --- etc/sendmail/freebsd.mc | 1 - 1 file changed, 1 deletion(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index 97264805a67f..5fd201da3900 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -66,7 +66,6 @@ define(`confCLIENT_CERT', `CERT_DIR/host.cert')dnl define(`confCLIENT_KEY', `CERT_DIR/host.key')dnl define(`confCACERT', `CERT_DIR/cacert.pem')dnl define(`confCACERT_PATH', `CERT_DIR')dnl -define(`confDH_PARAMETERS', `CERT_DIR/dh.param')dnl dnl Uncomment to allow relaying based on your MX records. dnl NOTE: This can allow sites to use your server as a backup MX without From nobody Tue Oct 17 19:49:17 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S94LQ03CGz4wwcs; Tue, 17 Oct 2023 19:49: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 4S94LP6Q06z3RMx; Tue, 17 Oct 2023 19:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697572157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8HvLidNKsUmuEb2Q5w1eg4IcNObckRgnGBboZPrBTUE=; b=an65TNK1qIvVdP/l2hvf/trKu2lbxZebZYW9CLx7nc3IpzuNo7K0MIjKbwqWhiGBYCdxb1 9bZCTFtvFZTF0peOKyvnykUMBr68Hu/+q8cPENrZXxs9/CVoQfINkUcXBnfQlFsWcuWA3i MdGJkiJz5i4ucjm2dtU/zvF3X0Gg3F10DLREuW8geTIVgvWsanL/NECG2pix/Xr3nnYtxc TfnfPx5c/IXsFBzo8LwdMo8Wt7Ml7wKlorhMUJvCS36prAZA7JIQv8U9uy6Sejz6mNoHQr Vd7NTfgq8J+ZhApRfxt7X0isJWAQOdjAJ2oIZolxt/vSahhUapIRAJxIeo62CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697572157; a=rsa-sha256; cv=none; b=CQEfTAZZI/J7RuaUTTFTzIob7RDqV3bCFZVou+ctO3gY7/3B14MnwKL0kg0R21ElAEPdW3 7uWM6/ZD8kofbGDy4qOT1teADvHiBKZw+WPPWMlTwV6sTlpfGPUUCJUyyGvhAulnHw/x5T G9T0dghCcgXaIehRVT4ni/qjJBB3bMQ19WcYEOTEKDz/ZdFPGkAsmCpcsqXmwOxA+TsI1a XKMbINSJ+UFbmKQ61dAPpU0o+eRv40HtZ0l6HVtlA6dsImH7QzX4QvUro9tsDoBQ3GmB65 4eZpbBxh5OJYsFJUUhhNx47yDzBMTP7vulTjMUBOri90w0vRwqOvjubCBi+IqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697572157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8HvLidNKsUmuEb2Q5w1eg4IcNObckRgnGBboZPrBTUE=; b=cUdQR7w+KE/D+haGmi1o0ruvDTb6zxSaVdC0ZHEZYDONbTN3F+ADQ0Ydwk64FGCBJYu1Z2 5XFaaMXKIbwGPoSw9QxyFnPEIImIllKckBa33GDssSRmV0CxruC4AxREATksWXvf113QLb WOvN/VGo/BnPKutre+b92foCpaWgz5J3gMKfs2kqaAT/ue6pYNxC616+XCTMY+O0Te/tEd aEA5FMifLbDtRfl7X/PmXrbLXoGHSJbp/k2kulecDsRjJYiFwP7KXTJ8XNTjNWXRHjW6kV v/UmuiQ4rgxOs+kimIKeJ6SrPfUsqk2+QeCpTBC34NkBRUlU5Oyb40v3yKVImA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S94LP598PzdCg; Tue, 17 Oct 2023 19:49: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 39HJnHWu015103; Tue, 17 Oct 2023 19:49:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJnHKK015100; Tue, 17 Oct 2023 19:49:17 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:49:17 GMT Message-Id: <202310171949.39HJnHKK015100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gregory Neil Shapiro Subject: git: 98f15d8f2fd4 - stable/12 - MFC: Remove confDH_PARAMETERS settings in favor of using sendmail's built-in default which was added in sendmail 8.15.2 (the config line predates that 8.15.2 feature). This also alleviates the need for admins to create the DH parameters file if they opt to use Diffie-Hellman. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gshapiro X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 98f15d8f2fd46c49a4ede89ac1a52aa3b5da8a41 Auto-Submitted: auto-generated The branch stable/12 has been updated by gshapiro: URL: https://cgit.FreeBSD.org/src/commit/?id=98f15d8f2fd46c49a4ede89ac1a52aa3b5da8a41 commit 98f15d8f2fd46c49a4ede89ac1a52aa3b5da8a41 Author: Gregory Neil Shapiro AuthorDate: 2023-08-18 00:32:56 +0000 Commit: Gregory Neil Shapiro CommitDate: 2023-10-17 19:48:22 +0000 MFC: Remove confDH_PARAMETERS settings in favor of using sendmail's built-in default which was added in sendmail 8.15.2 (the config line predates that 8.15.2 feature). This also alleviates the need for admins to create the DH parameters file if they opt to use Diffie-Hellman. PR: 248387 (cherry picked from commit 98fd1add676321978db72d77d34ef51ca454c814) --- etc/sendmail/freebsd.mc | 1 - 1 file changed, 1 deletion(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index 97264805a67f..5fd201da3900 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -66,7 +66,6 @@ define(`confCLIENT_CERT', `CERT_DIR/host.cert')dnl define(`confCLIENT_KEY', `CERT_DIR/host.key')dnl define(`confCACERT', `CERT_DIR/cacert.pem')dnl define(`confCACERT_PATH', `CERT_DIR')dnl -define(`confDH_PARAMETERS', `CERT_DIR/dh.param')dnl dnl Uncomment to allow relaying based on your MX records. dnl NOTE: This can allow sites to use your server as a backup MX without From nobody Wed Oct 18 05:52:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Kkv72ZNz4xYpl; Wed, 18 Oct 2023 05:52: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 4S9Kkv5WtTz3LB5; Wed, 18 Oct 2023 05:52:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3AdffS5EOQYfli+BqG/3F5uDCrqsXvdNIYXeo2wPqM=; b=M0srP/yHxIWASnI9lfFIIk6XBhfPuKTMo/dlJyd2WwGxPicp+qqxcLSyBqKdh3vvzl+WjL D10Z2TPuW8AdYwJX82zZtj70PwhHJB0qtXtZJdXimZef/pkXpmH0lMOvCY8z9v1ewQCUqr hMKNfyKX592AJRSuGSvFMROPz9El96sToPvAkpJTGs/YpA3Cl9CqqF3wlmVhMFVUu1d31x +RTkvLodgp5+igSwxOH9P5LSiLOIWgEYZ8pIQpms9jGBSGRJF+gujkMX0ks/YDFHw9xW8I GewNclvZdWBpHIHk6EG2WBT7yReJjV1O2Y3QWW1opIXhAJf+HvJTI7mGKTGoWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697608375; a=rsa-sha256; cv=none; b=ZdoWFv6zjppv5NFB0o8gSEB4TaqXnaR/baRrntSzaQW3lLmRkiCTwecoCy1DWvnGkQjvPg wz10c19YcHPykNWzi6K8RfDrwRbP2B99uzvHr8iSGFkzWFj9ijLpQi4TswZb4grXmFA9QQ TGBzR9miD0kE1GNPQy4G4vRC7EIAvVoOy5uvztYiZtxL3oBdThulf/XIyaNgW79UY+I8kl DSeCQqkSZCodR7EwLwqklikUVzI8jdB/7ZBOOmIituXWRJ7DFxeqF/eirPX9sxmdbdVqLD ZMmF5cDsBQIGaf8UaAV8qH6Rm3DMPTX8qxAbrg+dVHGUrhQ3boBxQVA/1yrtxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3AdffS5EOQYfli+BqG/3F5uDCrqsXvdNIYXeo2wPqM=; b=FHP7v5AXJ2JCDbuqlNBU2fkxQ54ntAUlPpOD3usiVRkJZoMcIop/o4VO5wOiT4X/TYtOnO OenAxjgPx4/MTb5PyZQoDlghqTHH6ru2fAt4//MXN/L+8wt/4dTrLc3fNj4VfkSoyri1O1 ebhkTMX1XTu0EP7dBBRkBroECkR5oyRnllcz7FTLxAUeVfpMR4Ww2p73aeWV9FbPoncGem LJPTTjK2i4nAThTvfr2R/w//jBETs2TyK/+Jp/9ngboc1ekEjHBwJomKhfpTofQbSALPq+ Xy+wswsmz97sFKviXk98m3aMKmQRv+8iJI+3T+DZzAmL7tIeXcknt2/ZlAwzxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9Kkv4c1tzvjs; Wed, 18 Oct 2023 05:52: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 39I5qtK2026252; Wed, 18 Oct 2023 05:52:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39I5qtvL026249; Wed, 18 Oct 2023 05:52:55 GMT (envelope-from git) Date: Wed, 18 Oct 2023 05:52:55 GMT Message-Id: <202310180552.39I5qtvL026249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: c9ec2fb86cf1 - stable/14 - linux(4): Drop the outdated comments about sixth register on i386 int0x80 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c9ec2fb86cf1c88624ff4e1694a19543771bffb4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c9ec2fb86cf1c88624ff4e1694a19543771bffb4 commit c9ec2fb86cf1c88624ff4e1694a19543771bffb4 Author: Dmitry Chagin AuthorDate: 2023-10-10 09:33:22 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-18 05:52:33 +0000 linux(4): Drop the outdated comments about sixth register on i386 int0x80 This is well documented in the Linux syscall(2). MFC after: 1 week (cherry picked from commit 5bdd74cc05e6c7d110688feacdbd22b6dffe5d72) --- sys/amd64/linux32/linux32_sysvec.c | 2 +- sys/i386/linux/linux_sysvec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 7104cc50735e..1002648c3df8 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -525,7 +525,7 @@ linux32_fetch_syscall_args(struct thread *td) sa->args[2] = frame->tf_rdx; sa->args[3] = frame->tf_rsi; sa->args[4] = frame->tf_rdi; - sa->args[5] = frame->tf_rbp; /* Unconfirmed */ + sa->args[5] = frame->tf_rbp; sa->code = frame->tf_rax; sa->original_code = sa->code; diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index a3d445951cce..8990b9b806ca 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -518,7 +518,7 @@ linux_fetch_syscall_args(struct thread *td) sa->args[2] = frame->tf_edx; sa->args[3] = frame->tf_esi; sa->args[4] = frame->tf_edi; - sa->args[5] = frame->tf_ebp; /* Unconfirmed */ + sa->args[5] = frame->tf_ebp; if (sa->code >= p->p_sysent->sv_size) /* nosys */ From nobody Wed Oct 18 05:52:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Kkx0LFlz4xYgZ; Wed, 18 Oct 2023 05:52: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 4S9Kkw6fZBz3Lb1; Wed, 18 Oct 2023 05:52:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvDactx54Yo2FYh0gPjm+ZyrUtJFcj2tzIkSg0lmgGw=; b=DM01zO05YxAbjQhpKujKmCgM+NrSxKXA3NJIUpWmz9ebYYTO49tKVYhOTL99XCllo7j5rE nR7GM2fat72xC6MmZPFD5IYavUQq7+Ec4Ad6ImEOhsUe04EIvih/CqMTMiyAFhU9/IDH59 TKvd/Tb+XNjUqe4ijqwmdPfB90u9ISeSA9pS9BKLKv6TpBKN78IlRjKVQZwy7bMHVrodUD T3boaUIlFjIs2CteMrLIKfDZOGy4+Oj4w0mA1mSV1nahG9PjxsdHIiP1OoCPt5y/+jnjha Ed0uMsaPfe9QUAtoom42aeYenOtzAB3/z01PEJOapGc+p7vBPMn05h35BwdOtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697608377; a=rsa-sha256; cv=none; b=PHLBDrja1Fcg+UpgvDqJ2AcMuWTWqTqopE4I7XcaYtMTYwabWcMIvFPOgCKgWh6VZ2U+n2 NOYWfAkJDCb8yLzyB5+OAOJBmkkg1P0Za1ilmgin3AxF6rfxZpu+MOHSn/xQZvbYUzeDBo V/VrlB+L34NOgu8lK2JrX1WWhLDQspBtc4rb5+OFbEnO2XmK8bdSLxPouvLAM71PMAv7Q6 KIkHffizkmhRYrRm8v2L/IVlO3op1PLG7qPkxNettSigGXKD5L0iYietbS5JN9THIK2mOn lsRJfsGKmLBPegjSc1qAbNAsVolbYGgStxRzg0bLgKqqZdk+DJrH9FWFUzgujQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvDactx54Yo2FYh0gPjm+ZyrUtJFcj2tzIkSg0lmgGw=; b=w+doS23oyaMcxoJ/rgn2UjO086jEwtqMU625ZZ6oQ7G5lhvFsbsnGGB/Wz6xBIonhI55Ya 3rJQLq7OZ9kvm/8hH01OzsDAcBppnSV/Z33X2oyf8wVrOKMX5MTpsg5nzWF/NhKCuqKjZ1 f9HxpMakMKpxy2TdTu0x8E126i1N6RJxlbNnuwgbulCH/GBI15cjcDHCr7zP1AWofISIMy I6yZkwiANG71kRbZF1eYU/zx71ZokBooeygL4zCi6I/ShpV8QdcUcd4NoHyi5CDKJ9d5FS 09Z3wMpqVabbsh9TWinajlsGn2C6rKQBSNIYse3S4W5jESqvv+S3oII79mRo8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9Kkw5d9Fzvjt; Wed, 18 Oct 2023 05:52: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 39I5qu2W026310; Wed, 18 Oct 2023 05:52:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39I5quCW026307; Wed, 18 Oct 2023 05:52:56 GMT (envelope-from git) Date: Wed, 18 Oct 2023 05:52:56 GMT Message-Id: <202310180552.39I5quCW026307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 133ada6bff53 - stable/14 - linux(4): Drop the outdated comment, nosys is fine since 39024a89 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 133ada6bff538483f308296ee944aa5ee24954ee Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=133ada6bff538483f308296ee944aa5ee24954ee commit 133ada6bff538483f308296ee944aa5ee24954ee Author: Dmitry Chagin AuthorDate: 2023-10-10 09:20:51 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-18 05:52:33 +0000 linux(4): Drop the outdated comment, nosys is fine since 39024a89 MFC after: 1 week (cherry picked from commit 03f5bd1e462576838e79145379ce314e2e03e4b3) --- sys/arm64/linux/linux_sysvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 19dd5866ba50..a850d5e34bc0 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -121,7 +121,7 @@ linux_fetch_syscall_args(struct thread *td) sa->code = td->td_frame->tf_x[8]; sa->original_code = sa->code; - /* LINUXTODO: generic syscall? */ + if (sa->code >= p->p_sysent->sv_size) sa->callp = &nosys_sysent; else From nobody Wed Oct 18 05:57:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Kr86YCPz4xYmr; Wed, 18 Oct 2023 05:57: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 4S9Kr85p4Yz3MGy; Wed, 18 Oct 2023 05:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIYzb6lHJOHUOv9RrAL8wCwpr9VZI+mC7NorWXsFeL8=; b=r0XuPVyQMN4ZslgTpIacQZqbbJ8UT1RmLrd9x/YjFjxtYQXXcg7ebbwC71eSCSgaOS9z0q DiYIVAI8S+COKvBE3Hn9be9fsb06e23IQU/sx65g1WRL4hr78YbDdM/a7pW9OoK51hpwFk sVEGcggJ24Uz6kQuBnnWRcGniM6LsV+MsvVBEWfsg2oQvKMIgjjTd7XRV0swiq3m2xPEQk tkiOLbn4adRQVWaMJwSqqxptxe+hIRH/AI/J+iHcxF8HqT7ZLbNRYaob7EfS5OtjQQ2vJ3 GMjIUbLReiCH7X+nhHuEj/wMWBoLwCe3OVzjZ5Vz1Z5Q7dUtxMHQSPAov7Sb1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697608648; a=rsa-sha256; cv=none; b=cSpcqd4Sqx/2GVkoY2rYv0YUwwAuQPEmAq/kt3d4ljkzxQRq2oPe7F1bnEWj9emkjq5C4g 2Fb3bw+yuqIcYpp05uzs8I3yX9P4layL7muDWLhl3zH1voYN3rWi6L4nzimlBBKI1FAL4h 61OqRC/gDiYpn2dU4WAu5M/8sH7ET+jdPQiZymmq92GwfA+1kzkvmNZGjzAPEh3ksXxvE8 4vQwmFYuprUvdCvmx9iXGkpDXn6KQXovN6IOuYM/0Tqx0S+F4MAEOh7pGHGgso747mAe7g srOoXAmlrHpkJ9H6OwSMZkKtb5Irc8j3iZiUv9uE2zmiTr1GmVJYaS09Z8V+xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIYzb6lHJOHUOv9RrAL8wCwpr9VZI+mC7NorWXsFeL8=; b=RsgaRNsVlsJPMuc/aKkU/jdYbZEPEbAjndk6+I8j6+N8zPecDjuBMhWHEqDhmL7Uy6qlf9 A6YiEJec+E/qB0Mwr+6lh8GrJ1QbHmFhWzxR3DFz8Qzxv55m306UbgmO0Jcwp0anoTwBnt 06A+JukmQ/PIyrjSVPGnN7KcX5+EZ4KbplrRiWdP5jhM6VNtplJaou+JSlSJaey4qiAhZ2 8znzLrkuLVwpWwO9KHmC4Y9YFMJnZ/LJVIU1DixDKEcqFx9FjNr5/3eRh7Pf99dJNWGZPw 4mVRi0bTvLCnzrkjWZOQv6Z5/0Mx0vSSNDGY+D3n76GnaGB3/1VGiZvitnHmGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9Kr84qwjzvs0; Wed, 18 Oct 2023 05:57: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 39I5vSV3027072; Wed, 18 Oct 2023 05:57:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39I5vSvu027069; Wed, 18 Oct 2023 05:57:28 GMT (envelope-from git) Date: Wed, 18 Oct 2023 05:57:28 GMT Message-Id: <202310180557.39I5vSvu027069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 44e3ce37f2f8 - stable/14 - uma.h: Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 44e3ce37f2f849ca457e2d14fba132972f0bbe01 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=44e3ce37f2f849ca457e2d14fba132972f0bbe01 commit 44e3ce37f2f849ca457e2d14fba132972f0bbe01 Author: Gordon Bergling AuthorDate: 2023-10-15 12:09:21 +0000 Commit: Gordon Bergling CommitDate: 2023-10-18 05:57:16 +0000 uma.h: Fix a typo in a source code comment - s/setable/settable/ (cherry picked from commit fc9f1d2c6391b1a4b133aab56ace625b72c9ea85) --- sys/vm/uma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 31f8dba33081..76f30efc94d1 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -637,7 +637,7 @@ void uma_zone_set_smr(uma_zone_t zone, smr_t smr); smr_t uma_zone_get_smr(uma_zone_t zone); /* - * These flags are setable in the allocf and visible in the freef. + * These flags are settable in the allocf and visible in the freef. */ #define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ #define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ From nobody Wed Oct 18 05:57:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9KrX6MdVz4xYms; Wed, 18 Oct 2023 05:57: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 4S9KrX5qqCz3MCg; Wed, 18 Oct 2023 05:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkyaOYscwTnEMkydO4UhEOA5gJypId7cXY85UB4vzOM=; b=mYRSNgUn8YdRjrdfRh33S1NuESELPvDele/M3Yt3yy6+WVDJhZJA4iBGQhTbVVOL25hZVb iFlsUR0n130bFbmInd0eLGa6hD4TNxmHbWsRB5/k/YyVDQ2xNzucBdzRYpgYvyfb1w3aEl jpmazTTuduHhU6biAzBPxmeOSQCEYeg5vJyFjXw5T3Ig4BBeKin8IpAyoJ8XFZhgexGa8N Pl9UN3SSFjhdsjleeXm7b17ZcGNrFhnL2+o0HlKsU2HoziHMIPfd14b6W5splKMLDcZKMw GJBwq7KZbLhP0kZ9w+lOeMfqguDk8ZLEd8Vc5R0UBOXNu5rOMiH6Xafvc8Z/GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697608668; a=rsa-sha256; cv=none; b=rjS05veJxz3vvRLIFFw112BWNjRLPD0az05hP2IANJ3r6MzfWx4+2EDCyrMjrJlNMauuBy a7ijhibQZiKs8ux+CF2jQ0uPir42F2lzYNzF4nMZJeDUmdd6YRO6Ul7+j4PKwDyixB0Qz1 aJMq4ldMxtQ9ppuVTQ/7fHOT8BhV0SMXSH7xouvRHcQDVwFV/PmiqdUXig0ZZwCgfWpASg 5g4LCrUv4kDIBl8TmLampx2GRhVnm9p5fYFFPwJobQbEXX3lwo90N2UGAd5RdWEcoArkcV FVYZpDFX2fFx5VIXpSueOm4jR6C35wZxSpWa/DJUesV6SjUrx/MzyssLuvCulA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697608668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkyaOYscwTnEMkydO4UhEOA5gJypId7cXY85UB4vzOM=; b=PhPbFG7P7igPMZ0aLq/yCsMCWA3Bb9e9zj3JzDk2MYUsmf4jUmBjd9/V4eEDBkXL5e+JJx FKTin2IJOECVTsNqcHhxvXb6HVvqLIyghdoUYIyEmEw1pzuc3Opx8ogrpYcSI2sCGCVdTQ hSXHjafjT+cLKFJErlZUydgMk8fVgZrP4I8/JvdC9pLYiS7hJkkx2Xkc2nlc1Uf8HIz4L6 0wvNrUIf+jUTPYB0u1htWI7H6fpBG2FqmVEyED3oH47bCUajHdYIODyx5V+7e66DtQPsBw xKzujSSBGnwPanJaqEck/Qde1mSXXZM6Bm6MvLTTZLnEmdJplUbpaQYern3uWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9KrX4sV5zvJp; Wed, 18 Oct 2023 05:57: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 39I5vmLs027246; Wed, 18 Oct 2023 05:57:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39I5vmD9027243; Wed, 18 Oct 2023 05:57:48 GMT (envelope-from git) Date: Wed, 18 Oct 2023 05:57:48 GMT Message-Id: <202310180557.39I5vmD9027243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 6c4855c18eed - stable/13 - uma.h: Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c4855c18eed77d2482bbe9cc32498bd3ad6fbe2 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6c4855c18eed77d2482bbe9cc32498bd3ad6fbe2 commit 6c4855c18eed77d2482bbe9cc32498bd3ad6fbe2 Author: Gordon Bergling AuthorDate: 2023-10-15 12:09:21 +0000 Commit: Gordon Bergling CommitDate: 2023-10-18 05:57:39 +0000 uma.h: Fix a typo in a source code comment - s/setable/settable/ (cherry picked from commit fc9f1d2c6391b1a4b133aab56ace625b72c9ea85) --- sys/vm/uma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 794bde878197..954d64c4d63b 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -636,7 +636,7 @@ void uma_zone_set_smr(uma_zone_t zone, smr_t smr); smr_t uma_zone_get_smr(uma_zone_t zone); /* - * These flags are setable in the allocf and visible in the freef. + * These flags are settable in the allocf and visible in the freef. */ #define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ #define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ From nobody Wed Oct 18 11:57:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Tqj2yl2z4xvq5; Wed, 18 Oct 2023 11:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9Tqj2Llsz4V1L; Wed, 18 Oct 2023 11:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697630257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s0ZKYu77f3B4CQjf5SX/hugi3hsMGU0StSThHl7T5JA=; b=CNhuQ1jk3qLIKWBrKeKzgDpkaCiycEkts+2dd6kyhMFVJjkCyT6lgu5MAxljCBrRPx98am c+iyyIKca4JUQe2ALWBh5KlsP3bDCrP+enEhO50YYU0uE9ndlQuBXblDotSNMP7DuYZqba xIDMleqboBsSEdz7njnxCrouTRLMaPRZjOeRwQADHqMygXVVYIzBjSeyfw9iQtGAJk0vBz fEeOz1GQc4GHRCeD20PCnOIPh3zkMX1PTzVGjk0Qmiz5QQJe1mLQxDamn+AISZLehBRUkP BKhbHEq22wirQBUqEn8QAIa7e1iGLGT56RWJWcckWC9w95is/QG1XrtNsLP+MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697630257; a=rsa-sha256; cv=none; b=eSD75mTAeC7oBQtBcDCA7KV2fcTXGUM1wpsQWLhGSZBgyjlTL8J+rflR/dZNZHq5lnn4+w UaRCi8Mic0hIK8cL4pkWHKNxatWlD/uqV2RX9d8SrDTzNh9vzsVPNbbLsCLPVvSzX3hWGi dLTgTVh3tjS+RhWiDijjBMzLaM5A4LN1uyw7WDUHUO6PL+K/Cu5WaGAnfiJbQxvzV7Gc+P VpncgxKJlONhkghy+6R3+RANKuzfgGy2VfUJlcrlfQzashVQJg1WUsS8qf8pQTU2CdlqSc d0iAxpdfMxrSMdedwiXo/R8gRIdmz/XAQBqhn+j2HLoyhkPC6D1WkC2by+mLew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697630257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s0ZKYu77f3B4CQjf5SX/hugi3hsMGU0StSThHl7T5JA=; b=mr0gDrHndhI9gSjbh6GfUzbhRD3kENphWqNyazdaAM5DYr7KZh3ia+afXN/Cfz+EB3q0/o DquXxiRD9cUzdanAAuUpVxGW2lRcqm0d7BRNjhDeO0C/uOWY5ES2okegDtDeapkomztOUJ RACZstjz+RwsJSEbUeBvWKQSDsvLyf5tzzJvF0WyuxCCe2nkmQk7NFCtVflOxbTyfBgxC8 5js6+KOlg63LsOCZTpT32N3TSH1mWZxuekd5wTPsFAgDRKJvjuQEMz5+qvgGa7d1M31pr0 ll4O2uykNDqvoC03D0jVnXzh4tWPc3ThTM4ryi8m9QhWX9RDmAU7IOASsPUQOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9Tqj1QZyz15TN; Wed, 18 Oct 2023 11:57: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 39IBvbSd024060; Wed, 18 Oct 2023 11:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IBvbCK024057; Wed, 18 Oct 2023 11:57:37 GMT (envelope-from git) Date: Wed, 18 Oct 2023 11:57:37 GMT Message-Id: <202310181157.39IBvbCK024057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ce3ab9dfee30 - stable/14 - ifconfig: add static bridge addresses for vlan 0, not 1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce3ab9dfee304d335b4307c35e77407771d6cc3f Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce3ab9dfee304d335b4307c35e77407771d6cc3f commit ce3ab9dfee304d335b4307c35e77407771d6cc3f Author: Kristof Provost AuthorDate: 2023-10-13 10:34:06 +0000 Commit: Kristof Provost CommitDate: 2023-10-18 06:43:40 +0000 ifconfig: add static bridge addresses for vlan 0, not 1 Since fd7edfcdc3 ("bridge: fix lookup for untagged packets in bridge_transmit()") and b0e38a1373 ("bridge: distinguish no vlan and vlan 1") we do a better job of distinguishing between untagged and VLAN 1 traffic. However, ifconfig still defaulted to adding addresses for VLAN 1, rather than for untagged traffic. Change this to be the most common (i.e. untagged) option. Reviewed by: zlei, philip MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42188 (cherry picked from commit 6ace92326f3cc4bbee9b74f6b656cb13699a78a2) --- sbin/ifconfig/ifbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index 3a97a5af3931..57ab0c6ae81c 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -407,7 +407,7 @@ setbridge_static(if_ctx *ctx, const char *val, const char *mac) memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst)); req.ifba_flags = IFBAF_STATIC; - req.ifba_vlan = 1; /* XXX allow user to specify */ + req.ifba_vlan = 0; /* XXX allow user to specify */ if (do_cmd(ctx, BRDGSADDR, &req, sizeof(req), 1) < 0) err(1, "BRDGSADDR %s", val); From nobody Wed Oct 18 14:30:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YDY50nnz4x60x; Wed, 18 Oct 2023 14:30: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 4S9YDY4PFvz3MP5; Wed, 18 Oct 2023 14:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQ/SLZEoxWEezjkeY7VGhwZAs7Xr6FPR/TrLBQW8qGo=; b=kvK/CnfrL5yz4x+AawaITSzkKnuRgJqYrxRZ9MOTU0aShPF+uWSGhvCPiEBi6PjOAc9pkc /vbxTkLZxNHhxY//Y9BLTDfF4rcTDRMBtMUpUlqjcaWoHUUtZ9le7LL6IM3JVhmjH5toji NBBxfc+ObXpPHdjVSEtQ6tBWoCxmErZZQSzeo2kn4ZMKOG6SbQ3IqoTPhrB7ZB/ytUziLn Ekeq/vc6TXTAZPoFANaAvcJWpPtNnqWB6KFjE6DRW62ZIOfj+ECmAyILXVr9WxadttgDZh hMsCyUCfoL1t2WMAt6OYWivAB7Rf5vRxeD9xWhv/FDV4i6tcXykuNb23BkRTBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639453; a=rsa-sha256; cv=none; b=jskOwiT59APUrr1mOKc05bd9rykk6TDP+yo2jIx1aXVvnCKUviIW4woXFLkudqkef5C/zt 7hCZ/c1SLVfVdoL+8rymL+4oM/hJNZBZyRdMBOUYy6PpEd8ZXyXgRvHm2TX9xtUO28ja26 +8/Wf+7QDhgM+oYySL/Y0UOBluZ92FbHQy+2ZQtugkIYXrO5XJ/eAxzEMumGHUbfdc0FNQ rVLBnp0PLbS4fJ/larmHMyj2TOOu+JovqBKfsc0nj4213hLGVYdZANyBOIO/Jpp8Pr45PI rt2RTDHmQCbByQ9NoF/P1MtxJ5XaRYDdFaNXA3jz0/eTSZ1Pzt/sy++0z9gRUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQ/SLZEoxWEezjkeY7VGhwZAs7Xr6FPR/TrLBQW8qGo=; b=HBeDYaIopsaaiAIAYLnsiS6s3wURpkhtq3DPvAJZsxXTu6YASkCD3U7QVRKnMhtzrM1J5h jHotsmGrxDRWhJtwY3w3Sp3lNbF5q8gt8Bnog8BPtvhGSlECWpnbPocIEU1vdE/lH6JaO6 BQ6iSy2qrBCsdT5DI7X7+A9XtdBJdnfikmA4zDErgJNfn7SVzYdnJajOrg9oVBWMkJysoH 2GAD7Scn418fy7nJip8s4qkzKkvkuCq3g1QgLAJ+TFYo9/v8s6Piz/YXgqGOvE00ZwCBUz hjMp+rLEv4FoLWhMvXggyonzG7ocHv6s2z8Ku8e3/BkOW16t3gDuSFf1Tl+s6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YDY3SrBz19Fm; Wed, 18 Oct 2023 14:30: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 39IEUrvC085341; Wed, 18 Oct 2023 14:30:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEUrj7085338; Wed, 18 Oct 2023 14:30:53 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:30:53 GMT Message-Id: <202310181430.39IEUrj7085338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 62ce4a798f2c - stable/14 - cpufreq_dt: Find the closest frequency List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62ce4a798f2c8a6357e8bc0c46e0f3e077ca1958 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=62ce4a798f2c8a6357e8bc0c46e0f3e077ca1958 commit 62ce4a798f2c8a6357e8bc0c46e0f3e077ca1958 Author: Emmanuel Vadot AuthorDate: 2023-09-06 16:40:17 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:30:22 +0000 cpufreq_dt: Find the closest frequency When building the frequencies table we convert the value in the DTS to megahertz and loose precision. While it's not a problem for most of the DTS it is when the expected frequency value is strict down to the hertz. So it's either we don't truncate the value and have some ugly and long values in the sysctls or we just find the closest frequency. Do the latter. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D41762 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 17c17872ca98df0e2b9f9c7a2c41ef73f7dee21a) --- sys/dev/cpufreq/cpufreq_dt.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/dev/cpufreq/cpufreq_dt.c b/sys/dev/cpufreq/cpufreq_dt.c index aaeada3a4e58..be434cabb4fd 100644 --- a/sys/dev/cpufreq/cpufreq_dt.c +++ b/sys/dev/cpufreq/cpufreq_dt.c @@ -104,17 +104,26 @@ static const struct cpufreq_dt_opp * cpufreq_dt_find_opp(device_t dev, uint64_t freq) { struct cpufreq_dt_softc *sc; - ssize_t n; + uint64_t diff, best_diff; + ssize_t n, best_n; sc = device_get_softc(dev); + diff = 0; + best_diff = ~0; DPRINTF(dev, "Looking for freq %ju\n", freq); - for (n = 0; n < sc->nopp; n++) - if (CPUFREQ_CMP(sc->opp[n].freq, freq)) - return (&sc->opp[n]); + for (n = 0; n < sc->nopp; n++) { + diff = abs64((int64_t)sc->opp[n].freq - (int64_t)freq); + DPRINTF(dev, "Testing %ju, diff is %ju\n", sc->opp[n].freq, diff); + if (diff < best_diff) { + best_diff = diff; + best_n = n; + DPRINTF(dev, "%ju is best for now\n", sc->opp[n].freq); + } + } - DPRINTF(dev, "Couldn't find one\n"); - return (NULL); + DPRINTF(dev, "Will use %ju\n", sc->opp[best_n].freq); + return (&sc->opp[best_n]); } static void From nobody Wed Oct 18 14:31:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFN2Bwwz4x639; Wed, 18 Oct 2023 14:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YFN1ng5z3MmW; Wed, 18 Oct 2023 14:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H6XGf7PmUC80Ui8ihQZ3eJ6rSXhJTLK07qRQFn73D28=; b=WRGX0wzi0F/v/hiqvY4Ep8aZaN2uTsA3bUiel7HxsAwa/rmeP0I+06AFwgsXvoOjoir1/6 L5ey4Z27dm3uA8Dry3ZD+Zs4peDABAMrEmeIdTQMd34baf8k7O/zw18Tt/1t3Ss626BUF7 2MLwECyhSQzyw5NYXsfuwDPt1ZeLL34+4gJJSXT3ZEG7MWq95ir/hdjfv3Hqpzmy/9vytH sqFClGTQ+FB5GVtFhEViZqrrDsq/UsTzplnAMIwCGObZrEpGtC4e6IOVbWeRMHE2+DBMHW 0oc3KyyzlCsUJT6vOeCG0yTATO6BQpVb+sBj0R2LK+1Hu48dvyXTVdkA/9u82g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639496; a=rsa-sha256; cv=none; b=okvhzrxsQ297ypPRQADSrMOdjwKNtOzIA1VvXxSyaqycQqV6XFAOJAhckqNHn7UOSqt1Of HfqnVoEd7h+z5sDCsaxvYx2FG2btUNzepOiAohJ0j6XsjEj3IB4qk9RhQfynNsYvCsNMN3 rPRR9SibvUV+fF6ex5l7Hyw10sXeh9ePyJVrdTb7rfvgV1s0KaerVxhHSu10Yp0rDMpYiq q5R77KRqNyc6J2l2Sc+sPI5kIu6bjY+sHtegJLDlD81/L+0W9nZ6MA9r6wltQiLHXWjaNE TQxiK46Kc39uhDACgj6hnolqFZrNsHtnQsbCbmM6sN8BkYgDcXPXeaYj2EAQiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H6XGf7PmUC80Ui8ihQZ3eJ6rSXhJTLK07qRQFn73D28=; b=jolx24iBHHTxx42eE7ziZ4G+AZvUGl9iE+yMpx053665b1VNVaSMG4rAlYvJRcsxPJxUFb 8F8OY0AAJO+rIuY2H8I5pw5vP9eyWaZFtyy3X8BLwv2Ja5H/+0YIc12SDMvNJQfNGeCsNu LBXHvCm7R1i5ninlFZIa+KZBoGhA1WEAiRJdigpWJ21t8Mga3kgzGzjnzeSUnA3d5vBu+R YHTLfRp9DJ7TN8e+0aqEbap9Mos7DzHQ+XW9ie/sH/yqtVUu/N53BoUaanWtGyLJeSaEps UhTI+mEYFTPooZNxoufGMR0o5CAT/+lqIArYsyaKeiWNcKOU8pEqLvGSirVuvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFN0sPFz18p2; Wed, 18 Oct 2023 14:31: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 39IEVauh089017; Wed, 18 Oct 2023 14:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVaUH089014; Wed, 18 Oct 2023 14:31:36 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:36 GMT Message-Id: <202310181431.39IEVaUH089014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ab8f34675ae7 - stable/14 - arm64: zynqmp: Add firmware driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab8f34675ae705060a6160521b1e7a91c5e00a9a Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ab8f34675ae705060a6160521b1e7a91c5e00a9a commit ab8f34675ae705060a6160521b1e7a91c5e00a9a Author: Emmanuel Vadot AuthorDate: 2023-09-07 07:56:45 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:01 +0000 arm64: zynqmp: Add firmware driver The ZynqMP SoC have a MCU running a firmware to control clocks, resets, fpga loading etc ... Add a driver that can be use to communicate with it. For now only the clock and reset part are implemented. Differential Revision: https://reviews.freebsd.org/D41811 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 9e88711f28dc9afa7d68ae8dd027d2399a2a290b) --- sys/conf/files.arm64 | 2 + sys/dev/firmware/xilinx/pm_defs.h | 380 ++++++++++++++++++++ sys/dev/firmware/xilinx/zynqmp_firmware.c | 511 +++++++++++++++++++++++++++ sys/dev/firmware/xilinx/zynqmp_firmware_if.m | 109 ++++++ 4 files changed, 1002 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 02dcadc0aa5c..987a1ea6cd09 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -698,3 +698,5 @@ arm64/rockchip/clk/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq fdt arm/xilinx/zy7_gpio.c optional gpio soc_xilinx_zynq fdt dev/usb/controller/xlnx_dwc3.c optional xhci soc_xilinx_zynq fdt +dev/firmware/xilinx/zynqmp_firmware.c optional fdt soc_xilinx_zynq +dev/firmware/xilinx/zynqmp_firmware_if.m optional fdt soc_xilinx_zynq diff --git a/sys/dev/firmware/xilinx/pm_defs.h b/sys/dev/firmware/xilinx/pm_defs.h new file mode 100644 index 000000000000..3461dd7820ad --- /dev/null +++ b/sys/dev/firmware/xilinx/pm_defs.h @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/* ZynqMP power management enums and defines */ + +#ifndef PM_DEFS_H +#define PM_DEFS_H + +/********************************************************************* + * Macro definitions + ********************************************************************/ + +/* + * Version number is a 32bit value, like: + * (PM_VERSION_MAJOR << 16) | PM_VERSION_MINOR + */ +#define PM_VERSION_MAJOR 1U +#define PM_VERSION_MINOR 1U + +#define PM_VERSION ((PM_VERSION_MAJOR << 16U) | PM_VERSION_MINOR) + +/** + * PM API versions + */ +/* Expected version of firmware APIs */ +#define FW_API_BASE_VERSION (1U) +/* Expected version of firmware API for feature check */ +#define FW_API_VERSION_2 (2U) +/* Version of APIs implemented in ATF */ +#define ATF_API_BASE_VERSION (1U) + +/* Capabilities for RAM */ +#define PM_CAP_ACCESS 0x1U +#define PM_CAP_CONTEXT 0x2U + +#define MAX_LATENCY (~0U) +#define MAX_QOS 100U + +/* State arguments of the self suspend */ +#define PM_STATE_CPU_IDLE 0x0U +#define PM_STATE_SUSPEND_TO_RAM 0xFU + +/* APU processor states */ +#define PM_PROC_STATE_FORCEDOFF 0U +#define PM_PROC_STATE_ACTIVE 1U +#define PM_PROC_STATE_SLEEP 2U +#define PM_PROC_STATE_SUSPENDING 3U + +#define EM_FUNID_NUM_MASK 0xF0000U + +#define PM_GET_CALLBACK_DATA 0xa01 +#define PM_SET_SUSPEND_MODE 0xa02 +#define PM_GET_TRUSTZONE_VERSION 0xa03 + +/********************************************************************* + * Enum definitions + ********************************************************************/ + +enum pm_api_id { + /* Miscellaneous API functions: */ + PM_GET_API_VERSION = 1, /* Do not change or move */ + PM_SET_CONFIGURATION, + PM_GET_NODE_STATUS, + PM_GET_OP_CHARACTERISTIC, + PM_REGISTER_NOTIFIER, + /* API for suspending of PUs: */ + PM_REQ_SUSPEND, + PM_SELF_SUSPEND, + PM_FORCE_POWERDOWN, + PM_ABORT_SUSPEND, + PM_REQ_WAKEUP, + PM_SET_WAKEUP_SOURCE, + PM_SYSTEM_SHUTDOWN, + /* API for managing PM slaves: */ + PM_REQ_NODE, + PM_RELEASE_NODE, + PM_SET_REQUIREMENT, + PM_SET_MAX_LATENCY, + /* Direct control API functions: */ + PM_RESET_ASSERT, + PM_RESET_GET_STATUS, + PM_MMIO_WRITE, + PM_MMIO_READ, + PM_INIT_FINALIZE, + PM_FPGA_LOAD, + PM_FPGA_GET_STATUS, + PM_GET_CHIPID, + PM_SECURE_RSA_AES, + PM_SECURE_SHA, + PM_SECURE_RSA, + PM_PINCTRL_REQUEST, + PM_PINCTRL_RELEASE, + PM_PINCTRL_GET_FUNCTION, + PM_PINCTRL_SET_FUNCTION, + PM_PINCTRL_CONFIG_PARAM_GET, + PM_PINCTRL_CONFIG_PARAM_SET, + PM_IOCTL, + /* API to query information from firmware */ + PM_QUERY_DATA, + /* Clock control API functions */ + PM_CLOCK_ENABLE, + PM_CLOCK_DISABLE, + PM_CLOCK_GETSTATE, + PM_CLOCK_SETDIVIDER, + PM_CLOCK_GETDIVIDER, + PM_CLOCK_SETRATE, + PM_CLOCK_GETRATE, + PM_CLOCK_SETPARENT, + PM_CLOCK_GETPARENT, + PM_SECURE_IMAGE, + /* FPGA PL Readback */ + PM_FPGA_READ, + PM_SECURE_AES, + /* PLL control API functions */ + PM_PLL_SET_PARAMETER, + PM_PLL_GET_PARAMETER, + PM_PLL_SET_MODE, + PM_PLL_GET_MODE, + /* PM Register Access API */ + PM_REGISTER_ACCESS, + PM_EFUSE_ACCESS, + PM_FPGA_GET_VERSION, + PM_FPGA_GET_FEATURE_LIST, + PM_FEATURE_CHECK = 63, + PM_API_MAX +}; + +enum pm_query_id { + PM_QID_INVALID = 0, + PM_QID_CLOCK_GET_NAME, + PM_QID_CLOCK_GET_TOPOLOGY, + PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS, + PM_QID_CLOCK_GET_PARENTS, + PM_QID_CLOCK_GET_ATTRIBUTES, + PM_QID_PINCTRL_GET_NUM_PINS, + PM_QID_PINCTRL_GET_NUM_FUNCTIONS, + PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS, + PM_QID_PINCTRL_GET_FUNCTION_NAME, + PM_QID_PINCTRL_GET_FUNCTION_GROUPS, + PM_QID_PINCTRL_GET_PIN_GROUPS, + PM_QID_CLOCK_GET_NUM_CLOCKS, + PM_QID_CLOCK_GET_MAX_DIVISOR, +}; + +enum pm_node_id { + NODE_UNKNOWN = 0, + NODE_APU, + NODE_APU_0, + NODE_APU_1, + NODE_APU_2, + NODE_APU_3, + NODE_RPU, + NODE_RPU_0, + NODE_RPU_1, + NODE_PLD, + NODE_FPD, + NODE_OCM_BANK_0, + NODE_OCM_BANK_1, + NODE_OCM_BANK_2, + NODE_OCM_BANK_3, + NODE_TCM_0_A, + NODE_TCM_0_B, + NODE_TCM_1_A, + NODE_TCM_1_B, + NODE_L2, + NODE_GPU_PP_0, + NODE_GPU_PP_1, + NODE_USB_0, + NODE_USB_1, + NODE_TTC_0, + NODE_TTC_1, + NODE_TTC_2, + NODE_TTC_3, + NODE_SATA, + NODE_ETH_0, + NODE_ETH_1, + NODE_ETH_2, + NODE_ETH_3, + NODE_UART_0, + NODE_UART_1, + NODE_SPI_0, + NODE_SPI_1, + NODE_I2C_0, + NODE_I2C_1, + NODE_SD_0, + NODE_SD_1, + NODE_DP, + NODE_GDMA, + NODE_ADMA, + NODE_NAND, + NODE_QSPI, + NODE_GPIO, + NODE_CAN_0, + NODE_CAN_1, + NODE_EXTERN, + NODE_APLL, + NODE_VPLL, + NODE_DPLL, + NODE_RPLL, + NODE_IOPLL, + NODE_DDR, + NODE_IPI_APU, + NODE_IPI_RPU_0, + NODE_GPU, + NODE_PCIE, + NODE_PCAP, + NODE_RTC, + NODE_LPD, + NODE_VCU, + NODE_IPI_RPU_1, + NODE_IPI_PL_0, + NODE_IPI_PL_1, + NODE_IPI_PL_2, + NODE_IPI_PL_3, + NODE_PL, + NODE_GEM_TSU, + NODE_SWDT_0, + NODE_SWDT_1, + NODE_CSU, + NODE_PJTAG, + NODE_TRACE, + NODE_TESTSCAN, + NODE_PMU, + NODE_MAX, +}; + +enum pm_request_ack { + REQ_ACK_NO = 1, + REQ_ACK_BLOCKING, + REQ_ACK_NON_BLOCKING, +}; + +enum pm_abort_reason { + ABORT_REASON_WKUP_EVENT = 100, + ABORT_REASON_PU_BUSY, + ABORT_REASON_NO_PWRDN, + ABORT_REASON_UNKNOWN, +}; + +enum pm_suspend_reason { + SUSPEND_REASON_PU_REQ = 201, + SUSPEND_REASON_ALERT, + SUSPEND_REASON_SYS_SHUTDOWN, +}; + +enum pm_ram_state { + PM_RAM_STATE_OFF = 1, + PM_RAM_STATE_RETENTION, + PM_RAM_STATE_ON, +}; + +enum pm_opchar_type { + PM_OPCHAR_TYPE_POWER = 1, + PM_OPCHAR_TYPE_TEMP, + PM_OPCHAR_TYPE_LATENCY, +}; + +/** + * @PM_RET_SUCCESS: success + * @PM_RET_ERROR_ARGS: illegal arguments provided (deprecated) + * @PM_RET_ERROR_NOTSUPPORTED: feature not supported (deprecated) + * @PM_RET_ERROR_NOT_ENABLED: feature is not enabled + * @PM_RET_ERROR_INTERNAL: internal error + * @PM_RET_ERROR_CONFLICT: conflict + * @PM_RET_ERROR_ACCESS: access rights violation + * @PM_RET_ERROR_INVALID_NODE: invalid node + * @PM_RET_ERROR_DOUBLE_REQ: duplicate request for same node + * @PM_RET_ERROR_ABORT_SUSPEND: suspend procedure has been aborted + * @PM_RET_ERROR_TIMEOUT: timeout in communication with PMU + * @PM_RET_ERROR_NODE_USED: node is already in use + */ +enum pm_ret_status { + PM_RET_SUCCESS = (0U), + PM_RET_ERROR_ARGS = (1U), + PM_RET_ERROR_NOTSUPPORTED = (4U), + PM_RET_ERROR_NOT_ENABLED = (29U), + PM_RET_ERROR_INTERNAL = (2000U), + PM_RET_ERROR_CONFLICT = (2001U), + PM_RET_ERROR_ACCESS = (2002U), + PM_RET_ERROR_INVALID_NODE = (2003U), + PM_RET_ERROR_DOUBLE_REQ = (2004U), + PM_RET_ERROR_ABORT_SUSPEND = (2005U), + PM_RET_ERROR_TIMEOUT = (2006U), + PM_RET_ERROR_NODE_USED = (2007U), + PM_RET_ERROR_NO_FEATURE = (2008U) +}; + +/** + * @PM_INITIAL_BOOT: boot is a fresh system startup + * @PM_RESUME: boot is a resume + * @PM_BOOT_ERROR: error, boot cause cannot be identified + */ +enum pm_boot_status { + PM_INITIAL_BOOT, + PM_RESUME, + PM_BOOT_ERROR, +}; + +/** + * @PMF_SHUTDOWN_TYPE_SHUTDOWN: shutdown + * @PMF_SHUTDOWN_TYPE_RESET: reset/reboot + * @PMF_SHUTDOWN_TYPE_SETSCOPE_ONLY: set the shutdown/reboot scope + */ +enum pm_shutdown_type { + PMF_SHUTDOWN_TYPE_SHUTDOWN, + PMF_SHUTDOWN_TYPE_RESET, + PMF_SHUTDOWN_TYPE_SETSCOPE_ONLY, +}; + +/** + * @PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM: shutdown/reboot APU subsystem only + * @PMF_SHUTDOWN_SUBTYPE_PS_ONLY: shutdown/reboot entire PS (but not PL) + * @PMF_SHUTDOWN_SUBTYPE_SYSTEM: shutdown/reboot entire system + */ +enum pm_shutdown_subtype { + PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM, + PMF_SHUTDOWN_SUBTYPE_PS_ONLY, + PMF_SHUTDOWN_SUBTYPE_SYSTEM, +}; + +/** + * @PM_PLL_PARAM_DIV2: Enable for divide by 2 function inside the PLL + * @PM_PLL_PARAM_FBDIV: Feedback divisor integer portion for the PLL + * @PM_PLL_PARAM_DATA: Feedback divisor fractional portion for the PLL + * @PM_PLL_PARAM_PRE_SRC: Clock source for PLL input + * @PM_PLL_PARAM_POST_SRC: Clock source for PLL Bypass mode + * @PM_PLL_PARAM_LOCK_DLY: Lock circuit config settings for lock windowsize + * @PM_PLL_PARAM_LOCK_CNT: Lock circuit counter setting + * @PM_PLL_PARAM_LFHF: PLL loop filter high frequency capacitor control + * @PM_PLL_PARAM_CP: PLL charge pump control + * @PM_PLL_PARAM_RES: PLL loop filter resistor control + */ +enum pm_pll_param { + PM_PLL_PARAM_DIV2, + PM_PLL_PARAM_FBDIV, + PM_PLL_PARAM_DATA, + PM_PLL_PARAM_PRE_SRC, + PM_PLL_PARAM_POST_SRC, + PM_PLL_PARAM_LOCK_DLY, + PM_PLL_PARAM_LOCK_CNT, + PM_PLL_PARAM_LFHF, + PM_PLL_PARAM_CP, + PM_PLL_PARAM_RES, + PM_PLL_PARAM_MAX, +}; + +/** + * @PM_PLL_MODE_RESET: PLL is in reset (not locked) + * @PM_PLL_MODE_INTEGER: PLL is locked in integer mode + * @PM_PLL_MODE_FRACTIONAL: PLL is locked in fractional mode + */ +enum pm_pll_mode { + PM_PLL_MODE_RESET, + PM_PLL_MODE_INTEGER, + PM_PLL_MODE_FRACTIONAL, + PM_PLL_MODE_MAX, +}; + +/** + * @PM_CLOCK_DIV0_ID: Clock divider 0 + * @PM_CLOCK_DIV1_ID: Clock divider 1 + */ +enum pm_clock_div_id { + PM_CLOCK_DIV0_ID, + PM_CLOCK_DIV1_ID, +}; + +/** + * EM API IDs + */ +enum em_api_id { + EM_SET_ACTION = 1, + EM_REMOVE_ACTION, + EM_SEND_ERRORS, +}; + +#endif /* PM_DEFS_H */ diff --git a/sys/dev/firmware/xilinx/zynqmp_firmware.c b/sys/dev/firmware/xilinx/zynqmp_firmware.c new file mode 100644 index 000000000000..8ee6c9a21377 --- /dev/null +++ b/sys/dev/firmware/xilinx/zynqmp_firmware.c @@ -0,0 +1,511 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include + +#include "zynqmp_firmware_if.h" + +enum { + IOCTL_GET_RPU_OPER_MODE = 0, + IOCTL_SET_RPU_OPER_MODE = 1, + IOCTL_RPU_BOOT_ADDR_CONFIG = 2, + IOCTL_TCM_COMB_CONFIG = 3, + IOCTL_SET_TAPDELAY_BYPASS = 4, + IOCTL_SET_SGMII_MODE = 5, + IOCTL_SD_DLL_RESET = 6, + IOCTL_SET_SD_TAPDELAY = 7, + /* Ioctl for clock driver */ + IOCTL_SET_PLL_FRAC_MODE = 8, + IOCTL_GET_PLL_FRAC_MODE = 9, + IOCTL_SET_PLL_FRAC_DATA = 10, + IOCTL_GET_PLL_FRAC_DATA = 11, + IOCTL_WRITE_GGS = 12, + IOCTL_READ_GGS = 13, + IOCTL_WRITE_PGGS = 14, + IOCTL_READ_PGGS = 15, + /* IOCTL for ULPI reset */ + IOCTL_ULPI_RESET = 16, + /* Set healthy bit value */ + IOCTL_SET_BOOT_HEALTH_STATUS = 17, + IOCTL_AFI = 18, + /* Probe counter read/write */ + IOCTL_PROBE_COUNTER_READ = 19, + IOCTL_PROBE_COUNTER_WRITE = 20, + IOCTL_OSPI_MUX_SELECT = 21, + /* IOCTL for USB power request */ + IOCTL_USB_SET_STATE = 22, + /* IOCTL to get last reset reason */ + IOCTL_GET_LAST_RESET_REASON = 23, + /* AI engine NPI ISR clear */ + IOCTL_AIE_ISR_CLEAR = 24, + /* Register SGI to ATF */ + IOCTL_REGISTER_SGI = 25, +}; + +typedef int (*zynqmp_callfn_t)(register_t, register_t, register_t, uint32_t *payload); + +struct zynqmp_firmware_softc { + struct simplebus_softc sc; + device_t dev; + zynqmp_callfn_t callfn; +}; + +/* SMC calling methods */ +#define PM_SIP_SVC 0xC2000000 + +static int +zynqmp_call_smc(uint32_t id, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t *payload, bool ignore_error) +{ + struct arm_smccc_res res; + uint64_t args[3]; + + args[0] = id | PM_SIP_SVC; + args[1] = ((uint64_t)a1 << 32) | a0; + args[2] = ((uint64_t)a3 << 32) | a2; + arm_smccc_smc(args[0], args[1], args[2], 0, 0, 0, 0, 0, &res); + if (payload != NULL) { + payload[0] = res.a0 & 0xFFFFFFFF; + payload[1] = res.a0 >> 32; + payload[2] = res.a1 & 0xFFFFFFFF; + payload[3] = res.a1 >> 32; + if (!ignore_error && payload[0] != PM_RET_SUCCESS) { + printf("%s: fail %x\n", __func__, payload[0]); + return (EINVAL); + } + } + return (0); +} + +/* Firmware methods */ +static int +zynqmp_get_api_version(struct zynqmp_firmware_softc *sc) +{ + uint32_t payload[4]; + int rv; + + rv = zynqmp_call_smc(PM_GET_API_VERSION, 0, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + device_printf(sc->dev, "API version = %d.%d\n", + payload[1] >> 16, payload[1] & 0xFFFF); +out: + return (rv); +} + +static int +zynqmp_get_chipid(struct zynqmp_firmware_softc *sc) +{ + uint32_t payload[4]; + int rv; + + rv = zynqmp_call_smc(PM_GET_CHIPID, 0, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + device_printf(sc->dev, "ID Code = %x Version = %x\n", + payload[1], payload[2]); +out: + return (rv); +} + +static int +zynqmp_get_trustzone_version(struct zynqmp_firmware_softc *sc) +{ + uint32_t payload[4]; + int rv; + + rv = zynqmp_call_smc(PM_GET_TRUSTZONE_VERSION, 0, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + device_printf(sc->dev, "Trustzone Version = %x\n", + payload[1]); +out: + return (rv); +} + +/* zynqmp_firmware methods */ +static int +zynqmp_firmware_clock_enable(device_t dev, uint32_t clkid) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_ENABLE, clkid, 0, 0, 0, payload, false); + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); +} + +static int +zynqmp_firmware_clock_disable(device_t dev, uint32_t clkid) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_DISABLE, clkid, 0, 0, 0, payload, false); + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); +} + +static int +zynqmp_firmware_clock_getstate(device_t dev, uint32_t clkid, bool *enabled) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_GETSTATE, clkid, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *enabled = payload[1] == 1 ? true : false; + +out: + return (rv); +} + +static int +zynqmp_firmware_clock_setdivider(device_t dev, uint32_t clkid, uint32_t div) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_SETDIVIDER, clkid, div, 0, 0, payload, false); + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); +} + +static int +zynqmp_firmware_clock_getdivider(device_t dev, uint32_t clkid, uint32_t *div) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_GETDIVIDER, clkid, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *div = payload[1]; + +out: + return (rv); +} + +static int +zynqmp_firmware_clock_setparent(device_t dev, uint32_t clkid, uint32_t parentid) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_SETPARENT, clkid, parentid, 0, 0, payload, false); + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); +} + +static int +zynqmp_firmware_clock_getparent(device_t dev, uint32_t clkid, uint32_t *parentid) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_CLOCK_GETPARENT, clkid, 0, 0, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *parentid = payload[1]; +out: + return (rv); +} + +static int +zynqmp_firmware_pll_get_mode(device_t dev, uint32_t pllid, uint32_t *mode) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_IOCTL, 0, IOCTL_GET_PLL_FRAC_MODE, pllid, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *mode = payload[1]; +out: + return (rv); +} + +static int +zynqmp_firmware_pll_get_frac_data(device_t dev, uint32_t pllid, uint32_t *data) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_IOCTL, 0, IOCTL_GET_PLL_FRAC_DATA, pllid, 0, payload, false); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *data = payload[1]; +out: + return (rv); +} + +static int +zynqmp_firmware_clock_get_fixedfactor(device_t dev, uint32_t clkid, uint32_t *mult, uint32_t *div) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_QUERY_DATA, PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS, clkid, 0, 0, payload, true); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + goto out; + } + *mult = payload[1]; + *div = payload[2]; +out: + return (rv); +} + +static int +zynqmp_firmware_query_data(device_t dev, uint32_t qid, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t *data) +{ + struct zynqmp_firmware_softc *sc; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_QUERY_DATA, qid, arg1, arg2, arg3, data, true); + /* + * PM_QID_CLOCK_GET_NAME always success and if the clock name couldn't + * be found the clock name will be all null byte + */ + if (qid == 1) + rv = 0; + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); +} + +static int +zynqmp_firmware_reset_assert(device_t dev, uint32_t resetid, bool enable) +{ + struct zynqmp_firmware_softc *sc; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_RESET_ASSERT, resetid, enable, 0, 0, NULL, true); + if (rv != 0) + device_printf(sc->dev, "SMC Call fail %d\n", rv); + + return (rv); +} + +static int +zynqmp_firmware_reset_get_status(device_t dev, uint32_t resetid, bool *status) +{ + struct zynqmp_firmware_softc *sc; + uint32_t payload[4]; + int rv; + + sc = device_get_softc(dev); + rv = zynqmp_call_smc(PM_RESET_GET_STATUS, resetid, 0, 0, 0, payload, true); + if (rv != 0) { + device_printf(sc->dev, "SMC Call fail %d\n", rv); + return (rv); + } + *status = payload[1]; + + return (rv); +} + +/* Simplebus methods */ +static struct simplebus_devinfo * +zynqmp_firmware_setup_dinfo(device_t dev, phandle_t node, + struct simplebus_devinfo *di) +{ + struct simplebus_softc *sc; + struct simplebus_devinfo *ndi; + + sc = device_get_softc(dev); + if (di == NULL) + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + else + ndi = di; + if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { + if (di == NULL) + free(ndi, M_DEVBUF); + return (NULL); + } + + /* reg resources is from the parent but interrupts is on the node itself */ + resource_list_init(&ndi->rl); + ofw_bus_reg_to_rl(dev, OF_parent(node), sc->acells, sc->scells, &ndi->rl); + ofw_bus_intr_to_rl(dev, node, &ndi->rl, NULL); + + return (ndi); +} + +static device_t +zynqmp_firmware_add_device(device_t dev, phandle_t node, u_int order, + const char *name, int unit, struct simplebus_devinfo *di) +{ + struct simplebus_devinfo *ndi; + device_t cdev; + + if ((ndi = zynqmp_firmware_setup_dinfo(dev, node, di)) == NULL) + return (NULL); + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + ndi->obdinfo.obd_name); + resource_list_free(&ndi->rl); + ofw_bus_gen_destroy_devinfo(&ndi->obdinfo); + if (di == NULL) + free(ndi, M_DEVBUF); + return (NULL); + } + device_set_ivars(cdev, ndi); + + return(cdev); +} + +static int +zynqmp_firmware_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "xlnx,zynqmp-firmware")) + return (ENXIO); + device_set_desc(dev, "ZynqMP Firmware"); + return (0); +} + +static int +zynqmp_firmware_attach(device_t dev) +{ + struct zynqmp_firmware_softc *sc; + phandle_t node, child; + device_t cdev; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bootverbose) { + zynqmp_get_api_version(sc); + zynqmp_get_chipid(sc); + zynqmp_get_trustzone_version(sc); + } + + /* Attach children */ + node = ofw_bus_get_node(dev); + for (child = OF_child(node); child != 0; child = OF_peer(child)) { + cdev = zynqmp_firmware_add_device(dev, child, 0, NULL, -1, NULL); + if (cdev != NULL) + device_probe_and_attach(cdev); + } + + return (bus_generic_attach(dev)); +} + +static device_method_t zynqmp_firmware_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, zynqmp_firmware_probe), + DEVMETHOD(device_attach, zynqmp_firmware_attach), + + /* zynqmp_firmware_if */ + DEVMETHOD(zynqmp_firmware_clock_enable, zynqmp_firmware_clock_enable), + DEVMETHOD(zynqmp_firmware_clock_disable, zynqmp_firmware_clock_disable), + DEVMETHOD(zynqmp_firmware_clock_getstate, zynqmp_firmware_clock_getstate), + DEVMETHOD(zynqmp_firmware_clock_setdivider, zynqmp_firmware_clock_setdivider), + DEVMETHOD(zynqmp_firmware_clock_getdivider, zynqmp_firmware_clock_getdivider), + DEVMETHOD(zynqmp_firmware_clock_setparent, zynqmp_firmware_clock_setparent), + DEVMETHOD(zynqmp_firmware_clock_getparent, zynqmp_firmware_clock_getparent), + DEVMETHOD(zynqmp_firmware_pll_get_mode, zynqmp_firmware_pll_get_mode), + DEVMETHOD(zynqmp_firmware_pll_get_frac_data, zynqmp_firmware_pll_get_frac_data), + DEVMETHOD(zynqmp_firmware_clock_get_fixedfactor, zynqmp_firmware_clock_get_fixedfactor), + DEVMETHOD(zynqmp_firmware_query_data, zynqmp_firmware_query_data), + DEVMETHOD(zynqmp_firmware_reset_assert, zynqmp_firmware_reset_assert), + DEVMETHOD(zynqmp_firmware_reset_get_status, zynqmp_firmware_reset_get_status), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_firmware, zynqmp_firmware_driver, zynqmp_firmware_methods, + sizeof(struct zynqmp_firmware_softc), simplebus_driver); + +EARLY_DRIVER_MODULE(zynqmp_firmware, simplebus, zynqmp_firmware_driver, 0, 0, + BUS_PASS_BUS + BUS_PASS_ORDER_LATE); +MODULE_VERSION(zynqmp_firmware, 1); diff --git a/sys/dev/firmware/xilinx/zynqmp_firmware_if.m b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m new file mode 100644 index 000000000000..1007d721952d --- /dev/null +++ b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m @@ -0,0 +1,109 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +INTERFACE zynqmp_firmware; + +METHOD int clock_enable { + device_t dev; + uint32_t clkid; +}; + +METHOD int clock_disable { + device_t dev; + uint32_t clkid; +}; *** 70 LINES SKIPPED *** From nobody Wed Oct 18 14:31:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFP2q04z4x5yX; Wed, 18 Oct 2023 14:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YFP2KkRz3Mmr; Wed, 18 Oct 2023 14:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viwfSEXI/iozLdyJ9QbTIwTTJtP/vFS4fUuVfAGeYdM=; b=B1Vss2pd3p4vkeg7p/WbVB5IEiUEICGvW4EhWfLMJ2AvhOZJz4MQ1d5iBMk77KFhkG3Ci/ 4CSjSBvO1O6HWk7xD9iyppWTCrfur9tntCwfEKDjGUNRbDMdpzIcZoiEpyxHrrJGvkyq/t jUOCh2S/md8KnriAb0wiS8FzQSnAlB7kySExJa/zXMsKEnyhbzbiAlnwLZDVn5nd0XTsfZ LUV8LzwuDsCDOgV7/RuvsejoUdb6lcQuAfHlLsjhy6GZ4iFHpOQhtzODkR3xMVenGS8xH9 0wnA5YpiiV1dt01KyMxtMiKNtbgF6pQmX+uF2RT3pZV2WsPvDmg53BKj0Tvniw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639497; a=rsa-sha256; cv=none; b=yJcE839LnvDVRW/PQ3R7D2ETzKdYG3GeC9PaA1bRVcRO6y7xAYO9tQalgbIrlpCWcWvWk6 H66C/IORdKytoU/IH9eRH3M6D3Su6gicO7SOrmJnxTw+lgGPCUjreyHDuPVyTn/SSwXfvU BayRGouZj0xAPzf2gRaEKpoeCtfeSozlcQliIWLi1OMAdF3XNMKw0nYIkGQHvnuZyKNX7W iOvqwSkzZl8mGZCKPcNuU5LzRPzRYhOvx8BmnPL9MoERjIf5Gmx4CvrPYZgSIHfMl55qBN qmjzxzPo6wC/MJa1CkrMvCL5jysLKPOhFgJESIqhSHjsY8RChTJz40INzwgv6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viwfSEXI/iozLdyJ9QbTIwTTJtP/vFS4fUuVfAGeYdM=; b=My5vNOsDegM2eMkh8mxOCSkXvLZMCUf+F6wihKxz0TeNOd1W8S05NbhjQ861ULTZbaKe4I RrXWhHoC5j7SmbeNIqTV37hSLqPrgUGdbrcbjSLIhnFdWgP9Fyujs56hYwrdK6OiD+qDPj lMYJAXcTYBEn5oiSjPUFeZqrkV1rmUvpYY7ys1gMRBP9YfV4jcwfDNohu35S+q+cZ5aLwk I1vwvYBWknSeUrRl+46bryXZhXO1YOwBD4wME7gz48WFwFF8JTYgyYXQuLVLYkCIlz+x5+ wD6cmKrLdoMaowQc0CSWn/QC8W2fVERj8xO8g1JbU0F9jctg+tFnATUhIiDPcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFP1D18z19Fy; Wed, 18 Oct 2023 14:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39IEVbJM089062; Wed, 18 Oct 2023 14:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVbdN089059; Wed, 18 Oct 2023 14:31:37 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:37 GMT Message-Id: <202310181431.39IEVbdN089059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 20d6c796fae0 - stable/14 - arm64: zynqmp: Add clock driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 20d6c796fae0d3075485159514825a9090e50ce8 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=20d6c796fae0d3075485159514825a9090e50ce8 commit 20d6c796fae0d3075485159514825a9090e50ce8 Author: Emmanuel Vadot AuthorDate: 2023-09-07 07:57:03 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:03 +0000 arm64: zynqmp: Add clock driver Add clock and reset drivers for the ZynqMP SoC. The clocks are discovered by talking to the firmware as the topology isn't fixed on this SoC. Differential Revision: https://reviews.freebsd.org/D41812 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 4e579ad047720775ab580b74192c7de8a3386fea) --- sys/conf/files.arm64 | 7 + sys/dev/clk/xilinx/zynqmp_clk_div.c | 140 +++++++++ sys/dev/clk/xilinx/zynqmp_clk_div.h | 38 +++ sys/dev/clk/xilinx/zynqmp_clk_fixed.c | 101 ++++++ sys/dev/clk/xilinx/zynqmp_clk_fixed.h | 33 ++ sys/dev/clk/xilinx/zynqmp_clk_gate.c | 102 ++++++ sys/dev/clk/xilinx/zynqmp_clk_gate.h | 33 ++ sys/dev/clk/xilinx/zynqmp_clk_mux.c | 89 ++++++ sys/dev/clk/xilinx/zynqmp_clk_mux.h | 33 ++ sys/dev/clk/xilinx/zynqmp_clk_pll.c | 132 ++++++++ sys/dev/clk/xilinx/zynqmp_clk_pll.h | 33 ++ sys/dev/clk/xilinx/zynqmp_clock.c | 562 ++++++++++++++++++++++++++++++++++ sys/dev/clk/xilinx/zynqmp_reset.c | 253 +++++++++++++++ 13 files changed, 1556 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 987a1ea6cd09..dc78840646bb 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -700,3 +700,10 @@ arm/xilinx/zy7_gpio.c optional gpio soc_xilinx_zynq fdt dev/usb/controller/xlnx_dwc3.c optional xhci soc_xilinx_zynq fdt dev/firmware/xilinx/zynqmp_firmware.c optional fdt soc_xilinx_zynq dev/firmware/xilinx/zynqmp_firmware_if.m optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clock.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clk_div.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clk_fixed.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clk_gate.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clk_mux.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_clk_pll.c optional fdt soc_xilinx_zynq +dev/clk/xilinx/zynqmp_reset.c optional fdt soc_xilinx_zynq diff --git a/sys/dev/clk/xilinx/zynqmp_clk_div.c b/sys/dev/clk/xilinx/zynqmp_clk_div.c new file mode 100644 index 000000000000..cc6e4d73e92d --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_div.c @@ -0,0 +1,140 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +#define DIV_ROUND_CLOSEST(n, d) (((n) + (d) / 2) / (d)) + +struct zynqmp_clk_div_softc { + device_t firmware; + enum zynqmp_clk_div_type type; + uint32_t id; +}; + +static int +zynqmp_clk_div_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +zynqmp_clk_div_recalc(struct clknode *clk, uint64_t *freq) +{ + struct zynqmp_clk_div_softc *sc; + uint32_t div; + int rv; + + sc = clknode_get_softc(clk); + rv = ZYNQMP_FIRMWARE_CLOCK_GETDIVIDER(sc->firmware, sc->id, &div); + if (rv != 0) { + printf("%s: Error while getting divider for %s\n", + __func__, + clknode_get_name(clk)); + return (EINVAL); + } + + if (sc->type == CLK_DIV_TYPE_DIV0) + div &= 0xFFFF; + else + div = div >> 16; + *freq = howmany((unsigned long long)*freq, div + 1); + return (0); +} + +static int +zynqmp_clk_div_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct zynqmp_clk_div_softc *sc; + uint32_t div; + int rv; + + sc = clknode_get_softc(clk); + + div = DIV_ROUND_CLOSEST(fparent, *fout); + if (sc->type == CLK_DIV_TYPE_DIV0) { + div &= 0xFFFF; + div |= 0xFFFF << 16; + } else { + div <<= 16; + div |= 0xFFFF; + } + + rv = ZYNQMP_FIRMWARE_CLOCK_SETDIVIDER(sc->firmware, sc->id, div); + if (rv != 0) { + printf("%s: Error while setting divider for %s\n", + __func__, + clknode_get_name(clk)); + return (EINVAL); + } + + return (rv); +} + +static clknode_method_t zynqmp_clk_div_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_div_init), + CLKNODEMETHOD(clknode_recalc_freq, zynqmp_clk_div_recalc), + CLKNODEMETHOD(clknode_set_freq, zynqmp_clk_div_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_div_clknode, zynqmp_clk_div_clknode_class, + zynqmp_clk_div_clknode_methods, sizeof(struct zynqmp_clk_div_softc), clknode_class); + +int +zynqmp_clk_div_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef, enum zynqmp_clk_div_type type) +{ + struct clknode *clk; + struct zynqmp_clk_div_softc *sc; + uint32_t fw_clk_id; + + fw_clk_id = clkdef->id - 1; + clkdef->id = 0; + clk = clknode_create(clkdom, &zynqmp_clk_div_clknode_class, clkdef); + if (clk == NULL) + return (1); + sc = clknode_get_softc(clk); + sc->id = fw_clk_id; + sc->firmware = fw; + sc->type = type; + clknode_register(clkdom, clk); + return (0); +} diff --git a/sys/dev/clk/xilinx/zynqmp_clk_div.h b/sys/dev/clk/xilinx/zynqmp_clk_div.h new file mode 100644 index 000000000000..f0dc07bf63e6 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_div.h @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ZYNQMP_CLK_DIV_H_ +#define _ZYNQMP_CLK_DIV_H_ + +enum zynqmp_clk_div_type { + CLK_DIV_TYPE_DIV0 = 0, + CLK_DIV_TYPE_DIV1 +}; + +int zynqmp_clk_div_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef, enum zynqmp_clk_div_type type); + +#endif /* _ZYNQMP_CLK_DIV_H_ */ diff --git a/sys/dev/clk/xilinx/zynqmp_clk_fixed.c b/sys/dev/clk/xilinx/zynqmp_clk_fixed.c new file mode 100644 index 000000000000..94de0491acb6 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_fixed.c @@ -0,0 +1,101 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +struct zynqmp_clk_fixed_softc { + device_t firmware; + uint32_t id; +}; + +static int +zynqmp_clk_fixed_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +zynqmp_clk_fixed_recalc(struct clknode *clk, uint64_t *freq) +{ + struct zynqmp_clk_fixed_softc *sc; + uint32_t mult, div; + int rv; + + sc = clknode_get_softc(clk); + rv = ZYNQMP_FIRMWARE_CLOCK_GET_FIXEDFACTOR(sc->firmware, sc->id, &mult, &div); + if (rv != 0) { + printf("%s: Error while getting fixed factor for %s\n", + __func__, + clknode_get_name(clk)); + return (EINVAL); + } + + *freq = (*freq * mult) / div; + return (0); +} + +static clknode_method_t zynqmp_clk_fixed_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_fixed_init), + CLKNODEMETHOD(clknode_recalc_freq, zynqmp_clk_fixed_recalc), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_fixed_clknode, zynqmp_clk_fixed_clknode_class, + zynqmp_clk_fixed_clknode_methods, sizeof(struct zynqmp_clk_fixed_softc), clknode_class); + +int +zynqmp_clk_fixed_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef) +{ + struct clknode *clk; + struct zynqmp_clk_fixed_softc *sc; + uint32_t fw_clk_id; + + fw_clk_id = clkdef->id - 1; + clkdef->id = 0; + clk = clknode_create(clkdom, &zynqmp_clk_fixed_clknode_class, clkdef); + if (clk == NULL) + return (1); + sc = clknode_get_softc(clk); + sc->id = fw_clk_id; + sc->firmware = fw; + clknode_register(clkdom, clk); + return (0); +} diff --git a/sys/dev/clk/xilinx/zynqmp_clk_fixed.h b/sys/dev/clk/xilinx/zynqmp_clk_fixed.h new file mode 100644 index 000000000000..c014ea7b5457 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_fixed.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ZYNQMP_CLK_FIXED_H_ +#define _ZYNQMP_CLK_FIXED_H_ + +int zynqmp_clk_fixed_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef); + +#endif /* _ZYNQMP_CLK_FIXED_H_ */ diff --git a/sys/dev/clk/xilinx/zynqmp_clk_gate.c b/sys/dev/clk/xilinx/zynqmp_clk_gate.c new file mode 100644 index 000000000000..180c7db38c09 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_gate.c @@ -0,0 +1,102 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +struct zynqmp_clk_gate_softc { + device_t firmware; + uint32_t id; +}; + +static int +zynqmp_clk_gate_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +zynqmp_clk_set_gate(struct clknode *clk, bool enable) +{ + struct zynqmp_clk_gate_softc *sc; + int rv; + + sc = clknode_get_softc(clk); + if (enable) + rv = ZYNQMP_FIRMWARE_CLOCK_ENABLE(sc->firmware, sc->id); + else + rv = ZYNQMP_FIRMWARE_CLOCK_DISABLE(sc->firmware, sc->id); + if (rv != 0) { + printf("%s: Error %sbling %s\n", + __func__, + enable == true ? "ena" : "disa", + clknode_get_name(clk)); + return (EINVAL); + } + return (0); +} + +static clknode_method_t zynqmp_clk_gate_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_gate_init), + CLKNODEMETHOD(clknode_set_gate, zynqmp_clk_set_gate), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_gate_clknode, zynqmp_clk_gate_clknode_class, + zynqmp_clk_gate_clknode_methods, sizeof(struct zynqmp_clk_gate_softc), clknode_class); + +int +zynqmp_clk_gate_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef) +{ + struct clknode *clk; + struct zynqmp_clk_gate_softc *sc; + uint32_t fw_clk_id; + + fw_clk_id = clkdef->id - 1; + clkdef->id = 0; + clk = clknode_create(clkdom, &zynqmp_clk_gate_clknode_class, clkdef); + if (clk == NULL) + return (1); + sc = clknode_get_softc(clk); + sc->id = fw_clk_id; + sc->firmware = fw; + clknode_register(clkdom, clk); + return (0); +} diff --git a/sys/dev/clk/xilinx/zynqmp_clk_gate.h b/sys/dev/clk/xilinx/zynqmp_clk_gate.h new file mode 100644 index 000000000000..bc6e9f218d41 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_gate.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ZYNQMP_CLK_GATE_H_ +#define _ZYNQMP_CLK_GATE_H_ + +int zynqmp_clk_gate_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef); + +#endif /* _ZYNQMP_CLK_GATE_H_ */ diff --git a/sys/dev/clk/xilinx/zynqmp_clk_mux.c b/sys/dev/clk/xilinx/zynqmp_clk_mux.c new file mode 100644 index 000000000000..6826ee5123fe --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_mux.c @@ -0,0 +1,89 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +struct zynqmp_clk_mux_softc { + device_t firmware; + uint32_t id; +}; + +static int +zynqmp_clk_mux_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +zynqmp_clk_mux_set_mux(struct clknode *clk, int idx) +{ + + printf("%s: called for %s\n", __func__, clknode_get_name(clk)); + return (0); +} + +static clknode_method_t zynqmp_clk_mux_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_mux_init), + CLKNODEMETHOD(clknode_set_mux, zynqmp_clk_mux_set_mux), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_mux_clknode, zynqmp_clk_mux_clknode_class, + zynqmp_clk_mux_clknode_methods, sizeof(struct zynqmp_clk_mux_softc), clknode_class); + +int +zynqmp_clk_mux_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef) +{ + struct clknode *clk; + struct zynqmp_clk_mux_softc *sc; + uint32_t fw_clk_id; + + fw_clk_id = clkdef->id - 1; + clkdef->id = 0; + clk = clknode_create(clkdom, &zynqmp_clk_mux_clknode_class, clkdef); + if (clk == NULL) + return (1); + sc = clknode_get_softc(clk); + sc->id = fw_clk_id; + sc->firmware = fw; + clknode_register(clkdom, clk); + return (0); +} diff --git a/sys/dev/clk/xilinx/zynqmp_clk_mux.h b/sys/dev/clk/xilinx/zynqmp_clk_mux.h new file mode 100644 index 000000000000..4768accd2c9e --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_mux.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ZYNQMP_CLK_MUX_H_ +#define _ZYNQMP_CLK_MUX_H_ + +int zynqmp_clk_mux_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef); + +#endif /* _ZYNQMP_CLK_MUX_H_ */ diff --git a/sys/dev/clk/xilinx/zynqmp_clk_pll.c b/sys/dev/clk/xilinx/zynqmp_clk_pll.c new file mode 100644 index 000000000000..6e5da9533859 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_pll.c @@ -0,0 +1,132 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +struct zynqmp_clk_pll_softc { + device_t firmware; + uint32_t id; +}; + +enum pll_mode { + PLL_MODE_INT = 0, + PLL_MODE_FRAC, + PLL_MODE_ERROR, +}; + +static int +zynqmp_clk_pll_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +zynqmp_clk_pll_recalc(struct clknode *clk, uint64_t *freq) +{ + struct zynqmp_clk_pll_softc *sc; + uint64_t pll_freq, pll_frac; + uint32_t div, mode, frac; + int rv; + + sc = clknode_get_softc(clk); + rv = ZYNQMP_FIRMWARE_CLOCK_GETDIVIDER(sc->firmware, sc->id, &div); + if (rv != 0) { + printf("%s: Error while getting divider for %s\n", + __func__, + clknode_get_name(clk)); + } + rv = ZYNQMP_FIRMWARE_PLL_GET_MODE(sc->firmware, sc->id, &mode); + if (rv != 0) { + printf("%s: Error while getting mode for %s\n", + __func__, + clknode_get_name(clk)); + } + if (mode == PLL_MODE_ERROR) + return (0); + + pll_freq = *freq * div; + if (mode == PLL_MODE_FRAC) { + ZYNQMP_FIRMWARE_PLL_GET_FRAC_DATA(sc->firmware, sc->id, &frac); + pll_frac = (*freq * frac) / (1 << 16); + pll_freq += pll_frac; + } + + *freq = pll_freq; + return (0); +} + +static int +zynqmp_clk_pll_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + + /* TODO probably at one point */ + return (ENOTSUP); +} + +static clknode_method_t zynqmp_clk_pll_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_pll_init), + CLKNODEMETHOD(clknode_recalc_freq, zynqmp_clk_pll_recalc), + CLKNODEMETHOD(clknode_set_freq, zynqmp_clk_pll_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_pll_clknode, zynqmp_clk_pll_clknode_class, + zynqmp_clk_pll_clknode_methods, sizeof(struct zynqmp_clk_pll_softc), clknode_class); + +int +zynqmp_clk_pll_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef) +{ + struct clknode *clk; + struct zynqmp_clk_pll_softc *sc; + uint32_t fw_clk_id; + + fw_clk_id = clkdef->id - 1; + clkdef->id = 0; + clk = clknode_create(clkdom, &zynqmp_clk_pll_clknode_class, clkdef); + if (clk == NULL) + return (1); + sc = clknode_get_softc(clk); + sc->id = fw_clk_id; + sc->firmware = fw; + clknode_register(clkdom, clk); + return (0); +} diff --git a/sys/dev/clk/xilinx/zynqmp_clk_pll.h b/sys/dev/clk/xilinx/zynqmp_clk_pll.h new file mode 100644 index 000000000000..c905efc1755f --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clk_pll.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ZYNQMP_CLK_PLL_H_ +#define _ZYNQMP_CLK_PLL_H_ + +int zynqmp_clk_pll_register(struct clkdom *clkdom, device_t fw, struct clknode_init_def *clkdef); + +#endif /* _ZYNQMP_CLK_PLL_H_ */ diff --git a/sys/dev/clk/xilinx/zynqmp_clock.c b/sys/dev/clk/xilinx/zynqmp_clock.c new file mode 100644 index 000000000000..76f23cec38d0 --- /dev/null +++ b/sys/dev/clk/xilinx/zynqmp_clock.c @@ -0,0 +1,562 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "clkdev_if.h" +#include "zynqmp_firmware_if.h" + +#define ZYNQMP_MAX_NAME_LEN 16 +#define ZYNQMP_MAX_NODES 6 +#define ZYNQMP_MAX_PARENTS 100 + +#define ZYNQMP_CLK_IS_VALID (1 << 0) +#define ZYNQMP_CLK_IS_EXT (1 << 2) + +#define ZYNQMP_GET_NODE_TYPE(x) (x & 0x7) +#define ZYNQMP_GET_NODE_CLKFLAGS(x) ((x >> 8) & 0xFF) +#define ZYNQMP_GET_NODE_TYPEFLAGS(x) ((x >> 24) & 0xF) + +enum ZYNQMP_NODE_TYPE { + CLK_NODE_TYPE_NULL = 0, + CLK_NODE_TYPE_MUX, + CLK_NODE_TYPE_PLL, + CLK_NODE_TYPE_FIXED, + CLK_NODE_TYPE_DIV0, + CLK_NODE_TYPE_DIV1, + CLK_NODE_TYPE_GATE, +}; + +/* + * Clock IDs in the firmware starts at 0 but + * exported clocks (and so clock exposed by the clock framework) + * starts at 1 + */ +#define ZYNQMP_ID_TO_CLK(x) ((x) + 1) +#define CLK_ID_TO_ZYNQMP(x) ((x) - 1) + +struct zynqmp_clk { + TAILQ_ENTRY(zynqmp_clk) next; + struct clknode_init_def clkdef; + uint32_t id; + uint32_t parentids[ZYNQMP_MAX_PARENTS]; + uint32_t topology[ZYNQMP_MAX_NODES]; + uint32_t attributes; +}; + +struct zynqmp_clock_softc { + device_t dev; + device_t parent; + phandle_t node; + clk_t clk_pss_ref; + clk_t clk_video; + clk_t clk_pss_alt_ref; + clk_t clk_aux_ref; + clk_t clk_gt_crx_ref; + struct clkdom *clkdom; +}; + +struct name_resp { + char name[16]; +}; + +struct zynqmp_clk_softc { + struct zynqmp_clk *clk; + device_t firmware; + uint32_t id; +}; + +static int +zynqmp_clk_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static clknode_method_t zynqmp_clk_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, zynqmp_clk_init), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(zynqmp_clk_clknode, zynqmp_clk_clknode_class, + zynqmp_clk_clknode_methods, sizeof(struct zynqmp_clk_softc), clknode_class); + +static int *** 686 LINES SKIPPED *** From nobody Wed Oct 18 14:31:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFQ4D9Dz4x5yb; Wed, 18 Oct 2023 14:31: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 4S9YFQ3f7cz3N4W; Wed, 18 Oct 2023 14:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hUx1HkA99z7QbZoWQwfajfEEtuqiSeipocXoBdK8omA=; b=nDgmIyD9PZT0mpIO08KKl4a6d+f9SWeflf4kuuW9KJNCHGoPUdVKR2FoF8QSbkB2pELy4K oaNalOkJFV5XooAlD742wFHdXPJ/02l3ia+qClF0zLSevKRqcoxpky/LSYvl7eUUFw6L81 rIYKUdp6vEWDqRP14kr3xXQSuFqpQiNHNGdYtIR4PPuyd7Kg3IhmOE5zv+CezPaWZiMwhU 8c2f0DvEKONl3FXlKQiQhW6TwtiJ1d1S/wNeCE/90ltlinM+OG+SIb0Xg0qYnOTr7r5a7r 7HSVa1PVMyQS8zbhpuLW322JS5hAtT5ZCdLSeEJdNePVFHeKiPuaYtStpDazNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639498; a=rsa-sha256; cv=none; b=pRX4l2F86O5HAOjHoW/doWFnHWR2mye8lzOGmnKajx6mhblCLcQMyTraYQGzXiy9CEnx0r U0DIsXvnzsES71TktxR7uWr2hhsOa33vxeKU50ppb/TUuujWBfCrCsymoboXyH+JuD1iLa kxmi7Hozu83R52TrBD6WvIfLMoPOPbSiUfRvGWZ10gdqGfuJkmu8uy06M21i4Lbgmwhv/m PXYpVj4fE/NI1IqreJnzRLmdkS+1mil/NzwABSuaUldY9rx0oe2zTvgeDT0rb26aSbf+lL 1DorrAZ7yPLB5kFS9Iz1DFcazzyBFUguwil2+yqULmbRk5AHAVlRBE/Iw2lxvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hUx1HkA99z7QbZoWQwfajfEEtuqiSeipocXoBdK8omA=; b=gehqLT/p347QH6RSmX6EQOQyar+8N0ym57B2u79mGgFkbN1c3EtEMtmku7EGiK7HgkBU3c sJHjKy/hEZ2r5uJT/Fg0TcbTNiMhCz6jG6bS+g7OnPhIi3qSnSVXZPGOULZxLfPiJhZU2u WTVxT/htV4tDkOo+b1PDVnDjoKx05Vqk8KtEs5NCtQ3RilEBq/7WIVoalAEuM+GhDrkR11 k0f32mUAHDeAfn+k4AiSdfeTXfIGHOWwINfbSrHRXufuNOGynk5y7bZjw1HX7ZdbO9jspi uOL2OTSxGhBILRtLWkDf+cNXMeiAUz+h3qWKXYEsO0v/BInQ/rmaU0Sy98eogA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFQ2TD3z18ts; Wed, 18 Oct 2023 14:31: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 39IEVcT6089107; Wed, 18 Oct 2023 14:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVcCI089104; Wed, 18 Oct 2023 14:31:38 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:38 GMT Message-Id: <202310181431.39IEVcCI089104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 023ba06b4f95 - stable/14 - sdhci: fdt: Remove sdhci_generic compatible string List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 023ba06b4f95fa106e6bda2fe349ff32f9ab42c9 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=023ba06b4f95fa106e6bda2fe349ff32f9ab42c9 commit 023ba06b4f95fa106e6bda2fe349ff32f9ab42c9 Author: Emmanuel Vadot AuthorDate: 2023-09-06 08:59:18 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:05 +0000 sdhci: fdt: Remove sdhci_generic compatible string This was used when we had our own DTS, it's not used anymore. Reviewed-by: bz Differential Revision: https://reviews.freebsd.org/D41807 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 8c7e747491ad636d6ee4069a74ddb24814870540) --- sys/dev/sdhci/sdhci_fdt.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index 4a355d6514ad..16748dd4982c 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -70,12 +70,11 @@ #define MAX_SLOTS 6 #define SDHCI_FDT_ARMADA38X 1 -#define SDHCI_FDT_GENERIC 2 -#define SDHCI_FDT_XLNX_ZY7 3 -#define SDHCI_FDT_QUALCOMM 4 -#define SDHCI_FDT_RK3399 5 -#define SDHCI_FDT_RK3568 6 -#define SDHCI_FDT_XLNX_ZMP 7 +#define SDHCI_FDT_XLNX_ZY7 2 +#define SDHCI_FDT_QUALCOMM 3 +#define SDHCI_FDT_RK3399 4 +#define SDHCI_FDT_RK3568 5 +#define SDHCI_FDT_XLNX_ZMP 6 #define RK3399_GRF_EMMCCORE_CON0 0xf000 #define RK3399_CORECFG_BASECLKFREQ 0xff00 @@ -118,7 +117,6 @@ static struct ofw_compat_data compat_data[] = { { "marvell,armada-380-sdhci", SDHCI_FDT_ARMADA38X }, - { "sdhci_generic", SDHCI_FDT_GENERIC }, { "qcom,sdhci-msm-v4", SDHCI_FDT_QUALCOMM }, { "rockchip,rk3399-sdhci-5.1", SDHCI_FDT_RK3399 }, { "xlnx,zy7_sdhci", SDHCI_FDT_XLNX_ZY7 }, @@ -516,9 +514,6 @@ sdhci_fdt_probe(device_t dev) sc->quirks = SDHCI_QUIRK_BROKEN_AUTO_STOP; device_set_desc(dev, "ARMADA38X SDHCI controller"); break; - case SDHCI_FDT_GENERIC: - device_set_desc(dev, "generic fdt SDHCI controller"); - break; case SDHCI_FDT_QUALCOMM: sc->quirks = SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_BROKEN_SDMA_BOUNDARY; From nobody Wed Oct 18 14:31:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFR6gKXz4x5yd; Wed, 18 Oct 2023 14:31: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 4S9YFR484Yz3Mt4; Wed, 18 Oct 2023 14:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a7oWxftNk2QtOnJ3trMS+W/3xD0xoFBrJa+VDvILBpM=; b=V2lZBJfEwdtDjoJXoVeYsG8KJY1Hg3JDgZMkGTDLh1sxeQqEkxNvyfG9XOaZwFIBMtS4k7 aIWbSYRoMOHWMOxByDRHdBR0A4MtPSsUq0AgUKf7bKtc5R1h8HqitSNUiuIm4qZxlSq5s1 DHf/jpe4N/e1KDjlUAzr+KXUmz1wfd0FXk/egl4Dsb74vbdgyLdlQvanNqG412WlJuv4BC v8XOXK4uPbdyQbImzmnnPl/6jdLnVRTQQ1Ft6XCAtQt0wLev0tnroC+JAQy2LbwHUGH9We aaccNctitLnl0ceYWUOESNTXDqNETN0MH/FkjLbIXB+nmnI0JC1U0dJxPoDqOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639499; a=rsa-sha256; cv=none; b=nmY9vhqZtOzRL1Ne74czrueL5gKLdytPVDLAcwsDUWjJQ9t8M6aET1fxWYJ79pYfAda/hJ rSX3Ri+8SQSwTxFJyA/GU/yobK5eeUmFYctXYptKpv0phwJy2CXdsxUUHgBoMpAMzkQKey 0uujtBS1erFaTE8WUGw9cirkyPpV7da7Df46eCWM6aslzhIFL8E/0O9UCYhJOwWTRwGk4h Kg7tAC1vrE1wiACels3fqfm7q1MpIN6WMc+d6C9TBCqkfo1qy7HjXh8m61lpH+XIJ94mWh UUFTGIG42Svcn6Etx7PNhFYW9G1N8215It3deZbWMHyn9OoLgPsvmTIvooKbrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a7oWxftNk2QtOnJ3trMS+W/3xD0xoFBrJa+VDvILBpM=; b=hT1OkwoB2W3LbLv4WIAUb3igJpmWIQ2kDzbqx4BHUxp31diV6nYXmLK0+aHF9iiOMvRoF5 gBMw9TXibdoNUBl5qZRq2HHXjBTNsASe432eezGH87zNZ+RAtU3g1UR3AAra5YKm57Lxlm D7uApqDrOPB9tGReCS4EypUHFbbi7nWT0e1e9eoXqkn1qLI7KUmuT8HFPnXRwB+8yH98MP OTc1cu4lB2feNXzr2i0TfbCOOVkaCS2b9yx/yVcO+MKjYeSkm+4sTm9zBEYpm+UOH4TLi2 fuvOu7b/oDQ0Ecnv4q025ihImIiggM4Z24NeIPxlXsTSeLtOEFOKbDOpxHRhGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFR3Ftyz18rP; Wed, 18 Oct 2023 14:31: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 39IEVdHw089161; Wed, 18 Oct 2023 14:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVdev089158; Wed, 18 Oct 2023 14:31:39 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:39 GMT Message-Id: <202310181431.39IEVdev089158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: d6a1d41df4fa - stable/14 - sdhci: fdt: Always enable clock for ZynqMP and RK3399 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d6a1d41df4faf10bb66e62a6bb2ecc5c3b3d43cd Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d6a1d41df4faf10bb66e62a6bb2ecc5c3b3d43cd commit d6a1d41df4faf10bb66e62a6bb2ecc5c3b3d43cd Author: Emmanuel Vadot AuthorDate: 2023-09-06 09:07:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:07 +0000 sdhci: fdt: Always enable clock for ZynqMP and RK3399 Those two (in fact all of the supported one in this driver except RK3568) always needs the clocks to be enabled. Reviewed-by: bz Differential Revision: https://reviews.freebsd.org/D41808 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 9377d7049c846d1e35c8fc8809c23e6413909fca) --- sys/dev/sdhci/sdhci_fdt.c | 59 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index 16748dd4982c..372b08a3b78a 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -268,13 +268,9 @@ sdhci_init_rk3399_emmccardclk(device_t dev) } static int -sdhci_init_rk3399(device_t dev) +sdhci_init_clocks(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); - struct syscon *grf = NULL; - phandle_t node; - uint64_t freq; - uint32_t mask, val; int error; /* Get and activate clocks */ @@ -288,11 +284,6 @@ sdhci_init_rk3399(device_t dev) device_printf(dev, "cannot enable xin clock\n"); return (ENXIO); } - error = clk_get_freq(sc->clk_xin, &freq); - if (error != 0) { - device_printf(dev, "cannot get xin clock frequency\n"); - return (ENXIO); - } error = clk_get_by_ofw_name(dev, 0, "clk_ahb", &sc->clk_ahb); if (error != 0) { device_printf(dev, "cannot get ahb clock\n"); @@ -304,6 +295,25 @@ sdhci_init_rk3399(device_t dev) return (ENXIO); } + return (0); +} + +static int +sdhci_init_rk3399(device_t dev) +{ + struct sdhci_fdt_softc *sc = device_get_softc(dev); + struct syscon *grf = NULL; + phandle_t node; + uint64_t freq; + uint32_t mask, val; + int error; + + error = clk_get_freq(sc->clk_xin, &freq); + if (error != 0) { + device_printf(dev, "cannot get xin clock frequency\n"); + return (ENXIO); + } + /* Register clock */ sdhci_init_rk3399_emmccardclk(dev); @@ -561,7 +571,7 @@ sdhci_fdt_attach(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); struct sdhci_slot *slot; - int err, slots, rid, i; + int err, slots, rid, i, compat; sc->dev = dev; @@ -574,24 +584,33 @@ sdhci_fdt_attach(device_t dev) return (ENOMEM); } - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == - SDHCI_FDT_RK3399) { - /* Initialize SDHCI */ - err = sdhci_init_rk3399(dev); + compat = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + switch (compat) { + case SDHCI_FDT_RK3399: + case SDHCI_FDT_XLNX_ZMP: + err = sdhci_init_clocks(dev); if (err != 0) { - device_printf(dev, "Cannot init RK3399 SDHCI\n"); + device_printf(dev, "Cannot init clocks\n"); return (err); } - } - - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == - SDHCI_FDT_RK3568) { + if (compat == SDHCI_FDT_RK3399) { + err = sdhci_init_rk3399(dev); + if (err != 0) { + device_printf(dev, "Cannot init RK3399 SDHCI\n"); + return (err); + } + } + break; + case SDHCI_FDT_RK3568: /* setup & enable clocks */ if (clk_get_by_ofw_name(dev, 0, "core", &sc->clk_core)) { device_printf(dev, "cannot get core clock\n"); return (ENXIO); } clk_enable(sc->clk_core); + break; + default: + break; } /* Scan all slots. */ From nobody Wed Oct 18 14:31:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFS67zLz4x63Q; Wed, 18 Oct 2023 14:31: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 4S9YFS5WKPz3MnW; Wed, 18 Oct 2023 14:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UhAqqv0xAwji2eEGobtES3EeU/TtQi7pe0swNlMWyVs=; b=o9X++XpXf2Obf0h3T6DkSeMzp51wkhJkVRoFNBeVuMI6Y3l4B29Mwd9nMGSEA9IbLf9i+2 UbrqLJmXeaBj35DnOUTYn/AM8r4PC9B6XqyNHCDR/ZYDqMl5WSO1Fb+Z5C0hBYLnR7bEjQ 98tsrt4iKvxdpelcAXxEh7QIsXhtdCjxso6RcCzS1P3EjHvlbC3a6jfrfPKsj9HOANDYcS xLjUBKgIdxyxDuy9loTSpIbrH1adyPhVtE5Vbi/M9L/1ot+4ixCIo/uDmaTANr3QbOOtR7 rPep02cxg8P2lftQeYRVc0YquQcvtiRc0jsUA7zIEefzUIslmP+hG3QJ9XWpFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639500; a=rsa-sha256; cv=none; b=l2ZLgstLhr/H4c5nNFSSyQuRAArE/v8fi8B/Qm0WzpCJyWM5YNRIbxrLVjudt8TD0Ksdjx fkwZNxMe1qxKDKFB0zHfl7+d8n3+HGP+QPFeI2tQ+RcB4tBfXTL71gWAFnhIJXjhOSf/TR 6MVj8MDyFXlpm9MSO2A2Z5mr10HwaTgn7SGppbh3mPtgT2qPBszC4jY0LldkRQY/k6EL+t j3keQVBIiSCm5yVEsXn4zw71wAZPOp3qLEipGY/oIDVaq3AAnnel5W+CU7FRc5o2OUsG6Z KC/WRWZ7q0U3skEQPSJyU9MP0+31C0yOXHMLV52tQtyrAUjI7jihIsmPPQ355g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UhAqqv0xAwji2eEGobtES3EeU/TtQi7pe0swNlMWyVs=; b=fgmPqBptYjuvxE6XiBrmXkhcEZmMmLv64J29OQqybV8XGYK6K71tpVJIrKJPzIt70a0wyi a6pWUbEw80Y8OolgB8u63oUN0bqjbyhIYzWem+FSQndpB8Fa0bZLXQ3E10XXzQBwXjgkdk RAlgHCrIFzkxJcvdiZ2X3agCL7SnpsCmIFYDOcPXK7EtuENGfH/+sioSamN5jLlw5OsDEj 3kUP1GrZp22K9cS+nKaSg4NRgRtJo6OwCIbKxudV9USZtqya4NfMdBKc03SC2KLFdoIE1I gohudMIU2OsE8CzY1Q4mCQN2QHYi1qGvMBxxDYtIrDZq6NcpMeqQMbt0dQeaow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFS4JMPz18tv; Wed, 18 Oct 2023 14:31: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 39IEVe8b089232; Wed, 18 Oct 2023 14:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVevt089229; Wed, 18 Oct 2023 14:31:40 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:40 GMT Message-Id: <202310181431.39IEVevt089229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 62b14a75310b - stable/14 - sdhci: fdt: Always try to get the phy and the syscon List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62b14a75310be97c13eafb236447bbf2ef54f357 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=62b14a75310be97c13eafb236447bbf2ef54f357 commit 62b14a75310be97c13eafb236447bbf2ef54f357 Author: Emmanuel Vadot AuthorDate: 2023-09-06 09:28:11 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:08 +0000 sdhci: fdt: Always try to get the phy and the syscon Per the bindings the phy and the syscon can always be present not just for RK3399. Reviewed-by: bz Differiential Revision: https://reviews.freebsd.org/D41809 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 0ee5d6fcfc63be48fd7c1b461917dfb880dc7f72) --- sys/dev/sdhci/sdhci_fdt.c | 75 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index 372b08a3b78a..f3a9b5091f6b 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -146,6 +146,8 @@ struct sdhci_fdt_softc { clk_t clk_ahb; /* ahb clock */ clk_t clk_core; /* core clock */ phy_t phy; /* phy to be used */ + + struct syscon *syscon; /* Handle to the syscon */ }; struct rk3399_emmccardclk_sc { @@ -299,54 +301,71 @@ sdhci_init_clocks(device_t dev) } static int -sdhci_init_rk3399(device_t dev) +sdhci_init_phy(struct sdhci_fdt_softc *sc) { - struct sdhci_fdt_softc *sc = device_get_softc(dev); - struct syscon *grf = NULL; - phandle_t node; - uint64_t freq; - uint32_t mask, val; int error; - error = clk_get_freq(sc->clk_xin, &freq); - if (error != 0) { - device_printf(dev, "cannot get xin clock frequency\n"); - return (ENXIO); - } - - /* Register clock */ - sdhci_init_rk3399_emmccardclk(dev); - /* Enable PHY */ - error = phy_get_by_ofw_name(dev, 0, "phy_arasan", &sc->phy); + error = phy_get_by_ofw_name(sc->dev, 0, "phy_arasan", &sc->phy); + if (error == ENOENT) + return (0); if (error != 0) { - device_printf(dev, "Could not get phy\n"); + device_printf(sc->dev, "Could not get phy\n"); return (ENXIO); } error = phy_enable(sc->phy); if (error != 0) { - device_printf(dev, "Could not enable phy\n"); + device_printf(sc->dev, "Could not enable phy\n"); return (ENXIO); } + + return (0); +} + +static int +sdhci_get_syscon(struct sdhci_fdt_softc *sc) +{ + phandle_t node; + /* Get syscon */ - node = ofw_bus_get_node(dev); + node = ofw_bus_get_node(sc->dev); if (OF_hasprop(node, "arasan,soc-ctl-syscon") && - syscon_get_by_ofw_property(dev, node, - "arasan,soc-ctl-syscon", &grf) != 0) { - device_printf(dev, "cannot get grf driver handle\n"); + syscon_get_by_ofw_property(sc->dev, node, + "arasan,soc-ctl-syscon", &sc->syscon) != 0) { + device_printf(sc->dev, "cannot get syscon handle\n"); return (ENXIO); } + return (0); +} + +static int +sdhci_init_rk3399(device_t dev) +{ + struct sdhci_fdt_softc *sc = device_get_softc(dev); + uint64_t freq; + uint32_t mask, val; + int error; + + error = clk_get_freq(sc->clk_xin, &freq); + if (error != 0) { + device_printf(dev, "cannot get xin clock frequency\n"); + return (ENXIO); + } + + /* Register clock */ + sdhci_init_rk3399_emmccardclk(dev); + /* Disable clock multiplier */ mask = RK3399_CORECFG_CLOCKMULTIPLIER; val = 0; - SYSCON_WRITE_4(grf, RK3399_GRF_EMMCCORE_CON11, (mask << 16) | val); + SYSCON_WRITE_4(sc->syscon, RK3399_GRF_EMMCCORE_CON11, (mask << 16) | val); /* Set base clock frequency */ mask = RK3399_CORECFG_BASECLKFREQ; val = SHIFTIN((freq + (1000000 / 2)) / 1000000, RK3399_CORECFG_BASECLKFREQ); - SYSCON_WRITE_4(grf, RK3399_GRF_EMMCCORE_CON0, (mask << 16) | val); + SYSCON_WRITE_4(sc->syscon, RK3399_GRF_EMMCCORE_CON0, (mask << 16) | val); return (0); } @@ -593,6 +612,14 @@ sdhci_fdt_attach(device_t dev) device_printf(dev, "Cannot init clocks\n"); return (err); } + if ((err = sdhci_init_phy(sc)) != 0) { + device_printf(dev, "Cannot init phy\n"); + return (err); + } + if ((err = sdhci_get_syscon(sc)) != 0) { + device_printf(dev, "Cannot get syscon handle\n"); + return (err); + } if (compat == SDHCI_FDT_RK3399) { err = sdhci_init_rk3399(dev); if (err != 0) { From nobody Wed Oct 18 14:31:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFV0Xvwz4x61M; Wed, 18 Oct 2023 14:31: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 4S9YFT6m1lz3N0s; Wed, 18 Oct 2023 14:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnsJqx6F+jUjRmm5nYiOraLeeObfg07Yj4sZY9Z81Qk=; b=X2JHUEQQoqGrui0HGKjk/uFtgdRUbfkxxxpCh/rmyPJlT7opFa8hoof+FiuDOo4Ja+8cnx fxn0spZCEXubfkyT3XoKaptGWmr3MrP6SNzgBT/f4HCXFbdVqK3V2n5XUh4hIOUx5p4ksL LnK5LnRCNl6G623xsawFtqKOA12MfqCBa+bCOwxv7xOGVKATgTb6JS+CFrAYJJ6IX9DKWg TNaLePD5PygqDFxYeeWzRYTZzXBjuIX6nFVisxXQQ+LkXq06d/Q4IZEd7RZQzaG6Z8hfFM PTPvXZi45ZZzvhYjXlAH/fsvWVoapStIe64ZNOMNEpI/2Z7/un2XHNGMpFlpuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639502; a=rsa-sha256; cv=none; b=cg6/1Mig2rwdAmKtrmL93u8AJij+v/jzpXW4ITU52n2POtTKnvvfzzOEMyMSX7zscIhHbD qHgqqPIF6ipAgz1AviMv0FWyCQI6YE63DI/kNPbTnPwhOk+G6OkKWrePOE4AGNxiWpEXjV MUPjlHfi6y71HjF1nM32crtkVklxbNmduLTZlCMASM5qggU8cDY664byqv8G4abZgC5KCy tsa9num93qNP4cEZhh/RnEaZhJnZ7oSw4gD9CJevZlDdJwfqlHUwPhA4S0j5otjE1H8I52 LJ3dqD0S/hA7F0MBGIkIuI+7IV2UcEWYX8zR8MsHU1j8NDFQ3reliyq7Qlqwyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnsJqx6F+jUjRmm5nYiOraLeeObfg07Yj4sZY9Z81Qk=; b=xgenPjE8i1lN4IImSzoiV5AT4K5UdU8a2q1rL/QHv5qOvkJGyUnreJQZx1GLdaSw3m45G2 zRvjiiHEV8FW+O8Ekj5ZAlHHLnmiJJFjYCvk+o1LBsO5ZdvRkeefCNnjMCOJloqvys3OWN MMGeU3jhbMfIKy6QxNyJp3W9B8HFnBGex8GbOb1CprTVLRuzyGht3VPQhj1U3+ZXPaPSXL 2w0fBHtq4BMw04zLSlHa4Ro+49eF/0LZ8RHEMmzhIKN1AbGP1W8jOwoCAqcW4MkyoPT9ON UGXVgITFIIFIexgypk8kNJRIVr4Hx+jyYofjElo9DRvYbFINdOiPRdnbLjFCXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFT57wyz19G0; Wed, 18 Oct 2023 14:31: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 39IEVfsM089283; Wed, 18 Oct 2023 14:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVf6m089280; Wed, 18 Oct 2023 14:31:41 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:41 GMT Message-Id: <202310181431.39IEVf6m089280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 0af2307d5926 - stable/14 - sdhci: fdt: Correctly export clock per the binding List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0af2307d592651ec4d020af9f20ae9e214d5bc9d Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0af2307d592651ec4d020af9f20ae9e214d5bc9d commit 0af2307d592651ec4d020af9f20ae9e214d5bc9d Author: Emmanuel Vadot AuthorDate: 2023-09-06 15:54:47 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:10 +0000 sdhci: fdt: Correctly export clock per the binding The binding says that we can have one or two clocks to export. The first one is the actual sdclock while the second is the sample clock. Both have the same parent, clk_xin. Correctly export the clocks for RK3399 and ZynqMP. No need to use a high ID as before, we have our own clock domain so use ids starting at 1 as all exported clocks should be. Reviewed-by: bz Differential Revision: https://reviews.freebsd.org/D41810 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 81a4fe38a6ce818bb7cba548bb2c697429fa9479) --- sys/dev/sdhci/sdhci_fdt.c | 92 ++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 57 deletions(-) diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index f3a9b5091f6b..0ed1b57e7dc8 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -113,8 +113,6 @@ #define LOWEST_SET_BIT(mask) ((((mask) - 1) & (mask)) ^ (mask)) #define SHIFTIN(x, mask) ((x) * LOWEST_SET_BIT(mask)) -#define EMMCCARDCLK_ID 1000 - static struct ofw_compat_data compat_data[] = { { "marvell,armada-380-sdhci", SDHCI_FDT_ARMADA38X }, { "qcom,sdhci-msm-v4", SDHCI_FDT_QUALCOMM }, @@ -150,37 +148,36 @@ struct sdhci_fdt_softc { struct syscon *syscon; /* Handle to the syscon */ }; -struct rk3399_emmccardclk_sc { +struct sdhci_exported_clocks_sc { device_t clkdev; - bus_addr_t reg; }; static int -rk3399_emmccardclk_init(struct clknode *clk, device_t dev) +sdhci_exported_clocks_init(struct clknode *clk, device_t dev) { clknode_init_parent_idx(clk, 0); return (0); } -static clknode_method_t rk3399_emmccardclk_clknode_methods[] = { +static clknode_method_t sdhci_exported_clocks_clknode_methods[] = { /* Device interface */ - CLKNODEMETHOD(clknode_init, rk3399_emmccardclk_init), + CLKNODEMETHOD(clknode_init, sdhci_exported_clocks_init), CLKNODEMETHOD_END }; -DEFINE_CLASS_1(rk3399_emmccardclk_clknode, rk3399_emmccardclk_clknode_class, - rk3399_emmccardclk_clknode_methods, sizeof(struct rk3399_emmccardclk_sc), +DEFINE_CLASS_1(sdhci_exported_clocks_clknode, sdhci_exported_clocks_clknode_class, + sdhci_exported_clocks_clknode_methods, sizeof(struct sdhci_exported_clocks_sc), clknode_class); static int -rk3399_ofw_map(struct clkdom *clkdom, uint32_t ncells, +sdhci_clock_ofw_map(struct clkdom *clkdom, uint32_t ncells, phandle_t *cells, struct clknode **clk) { + int id = 1; /* Our clock id starts at 1 */ - if (ncells == 0) - *clk = clknode_find_by_id(clkdom, EMMCCARDCLK_ID); - else - return (ERANGE); + if (ncells != 0) + id = cells[1]; + *clk = clknode_find_by_id(clkdom, id); if (*clk == NULL) return (ENXIO); @@ -188,30 +185,29 @@ rk3399_ofw_map(struct clkdom *clkdom, uint32_t ncells, } static void -sdhci_init_rk3399_emmccardclk(device_t dev) +sdhci_export_clocks(struct sdhci_fdt_softc *sc) { struct clknode_init_def def; - struct rk3399_emmccardclk_sc *sc; + struct sdhci_exported_clocks_sc *clksc; struct clkdom *clkdom; struct clknode *clk; - clk_t clk_parent; bus_addr_t paddr; bus_size_t psize; const char **clknames; phandle_t node; int i, nclocks, ncells, error; - node = ofw_bus_get_node(dev); + node = ofw_bus_get_node(sc->dev); if (ofw_reg_to_paddr(node, 0, &paddr, &psize, NULL) != 0) { - device_printf(dev, "cannot parse 'reg' property\n"); + device_printf(sc->dev, "cannot parse 'reg' property\n"); return; } error = ofw_bus_parse_xref_list_get_length(node, "clocks", "#clock-cells", &ncells); if (error != 0 || ncells != 2) { - device_printf(dev, "couldn't find parent clocks\n"); + device_printf(sc->dev, "couldn't find parent clocks\n"); return; } @@ -221,47 +217,31 @@ sdhci_init_rk3399_emmccardclk(device_t dev) if (nclocks <= 0) return; - if (nclocks != 1) { - device_printf(dev, "Having %d clock instead of 1, aborting\n", - nclocks); - return; - } + clkdom = clkdom_create(sc->dev); + clkdom_set_ofw_mapper(clkdom, sdhci_clock_ofw_map); + + for (i = 0; i < nclocks; i++) { + memset(&def, 0, sizeof(def)); + def.id = i + 1; /* Exported clock IDs starts at 1 */ + def.name = clknames[i]; + def.parent_names = malloc(sizeof(char *) * 1, M_OFWPROP, M_WAITOK); + def.parent_names[0] = clk_get_name(sc->clk_xin); + def.parent_cnt = 1; - clkdom = clkdom_create(dev); - clkdom_set_ofw_mapper(clkdom, rk3399_ofw_map); - - memset(&def, 0, sizeof(def)); - def.id = EMMCCARDCLK_ID; - def.name = clknames[0]; - def.parent_names = malloc(sizeof(char *) * ncells, M_OFWPROP, M_WAITOK); - for (i = 0; i < ncells; i++) { - error = clk_get_by_ofw_index(dev, 0, i, &clk_parent); - if (error != 0) { - device_printf(dev, "cannot get clock %d\n", error); + clk = clknode_create(clkdom, &sdhci_exported_clocks_clknode_class, &def); + if (clk == NULL) { + device_printf(sc->dev, "cannot create clknode\n"); return; } - def.parent_names[i] = clk_get_name(clk_parent); - if (bootverbose) - device_printf(dev, "clk parent: %s\n", - def.parent_names[i]); - clk_release(clk_parent); - } - def.parent_cnt = ncells; - - clk = clknode_create(clkdom, &rk3399_emmccardclk_clknode_class, &def); - if (clk == NULL) { - device_printf(dev, "cannot create clknode\n"); - return; - } - sc = clknode_get_softc(clk); - sc->reg = paddr; - sc->clkdev = device_get_parent(dev); + clksc = clknode_get_softc(clk); + clksc->clkdev = device_get_parent(sc->dev); - clknode_register(clkdom, clk); + clknode_register(clkdom, clk); + } if (clkdom_finit(clkdom) != 0) { - device_printf(dev, "cannot finalize clkdom initialization\n"); + device_printf(sc->dev, "cannot finalize clkdom initialization\n"); return; } @@ -353,9 +333,6 @@ sdhci_init_rk3399(device_t dev) return (ENXIO); } - /* Register clock */ - sdhci_init_rk3399_emmccardclk(dev); - /* Disable clock multiplier */ mask = RK3399_CORECFG_CLOCKMULTIPLIER; val = 0; @@ -612,6 +589,7 @@ sdhci_fdt_attach(device_t dev) device_printf(dev, "Cannot init clocks\n"); return (err); } + sdhci_export_clocks(sc); if ((err = sdhci_init_phy(sc)) != 0) { device_printf(dev, "Cannot init phy\n"); return (err); From nobody Wed Oct 18 14:31:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFW1dlkz4x5ys; Wed, 18 Oct 2023 14:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YFW0dc1z3Mxh; Wed, 18 Oct 2023 14:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GDShvnS1GsCRMXYOxXkhUdU9dQJhaBa9Xlq0UwK2R8=; b=CgqPL831SxDRzHa1962datgAYeMiCgoENwo0bSgegV0I5UJM2FFl9UQsIgHqLVs5nc4lO1 qLGCDjvtKQnbFjX1IrSvmNn2Jo6KxAT4z0ES1EAvsHbqmovX9Cx4BFwFGb273EcqbsnsL/ wosI/vZkJiOY8hP6P9H36EkHKoxdaWxe82Gjgm4kb5ZiYd7SeuDNfY8f3MNZNYeb5l75kS pMbHNOYv8vu4oGbuAEFNbxGxdHPhTEkD6MJCp+K+L5S5pnb5xaxhIP3xhyy9U4zL23S8hW Kph5u1Y71ry3IPrjihDMDo8OMIIUXSUW+lZjOLnL/23VrBCTp3sk3ZLN+zzzuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639503; a=rsa-sha256; cv=none; b=M7ByEqAmZZNciOhAi87UKbDMZ36mejt4tCrYNvuorqQh9lTfg3c0yCwRW91fT8LgCkNtc/ AHyNkayvxe0Nrq/2H09cuIZtNa+x8NVQvj982Ao7b1uBVHByiAw0XflnUbKrjGV9OpNq6A Ydgnrc9hTvOaYjpDpYdokNIYTLpVYpRDaZZtMiO8/nqqlmzou5BXTJr9Kuayr8prdi4/qL qVvRI2g2jQIEyRFDQzrhQgG/TWEcn1lxmLnDsuo3aO3Psbs/FoKV5lVLnEsgIQHeUFuonb L21pZ3hbCGcuD2dW/2qTda5dHqujxbROfSL8tViXm9BQD1e092lttscDZBOfbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GDShvnS1GsCRMXYOxXkhUdU9dQJhaBa9Xlq0UwK2R8=; b=P/0P2dg8eXrE4TzZdPQzjgQnYZwure1W6oIEne+bey41i3q18opdsnxOnXvPwVbqRD7uX/ S71BwpiXfqVMpTYA9RjqQDuuPHYufpcZMzsx1cltBAWfVYhIuNgrurAYpQCrktn9YiyfEH A/A3Tka/uLVXjFnwYFvPphWV3L5/InVfCmPH4LgZ+pKxPvin3F3YdN0U4maTYIDDeRD4WR Mn8yRNjg1DjWcTkn6BgS4ZSJnANtL3NZFOxOpQnnTyOR7IvbYOKssQPCBnSYKniSTPFyYo TSOFjmxY9k90sQSKvDELwBVbmyDy3MataFm0+bB+QTX/M4lpf4Ub7pjN+XBJGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFV6Rr2z18tx; Wed, 18 Oct 2023 14:31: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 39IEVgK4089338; Wed, 18 Oct 2023 14:31:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVgDY089335; Wed, 18 Oct 2023 14:31:42 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:42 GMT Message-Id: <202310181431.39IEVgDY089335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 770b790eabac - stable/14 - if_cgem: Cleanup compatible and add new ones List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 770b790eabac42e6c22886439d1d776cbf0ff455 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=770b790eabac42e6c22886439d1d776cbf0ff455 commit 770b790eabac42e6c22886439d1d776cbf0ff455 Author: Emmanuel Vadot AuthorDate: 2023-09-12 14:49:37 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:11 +0000 if_cgem: Cleanup compatible and add new ones - Remove cdns,gem, it's the generic binding but for all platform that include this one we need specific drivers setup so remove it. - Remove cdns,macb, it's the generic binding for Atmel AT91 which we don't suport - Remove cadence,gem, it's not an official binding and seems to be only used in some obscure ARM11 SoC. - Note that the cdns,zynq* are deprecated - Add the new Xilinx compatible for zynq and zynqmp Reviewed-by: mhorne Tested-by: skibo, Milan Obuch Differential Revision: https://reviews.freebsd.org/D41856 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit bdbbbbb32104569fccd786d9cc07d17f6231a713) --- sys/dev/cadence/if_cgem.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 1aa5d4955d93..43e35b2bf849 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -106,14 +106,13 @@ #define HWQUIRK_PCLK 8 static struct ofw_compat_data compat_data[] = { - { "cdns,zynq-gem", HWQUIRK_RXHANGWAR | HWQUIRK_TXCLK }, - { "cdns,zynqmp-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, + { "cdns,zynq-gem", HWQUIRK_RXHANGWAR | HWQUIRK_TXCLK }, /* Deprecated */ + { "cdns,zynqmp-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, /* Deprecated */ + { "xlnx,zynq-gem", HWQUIRK_RXHANGWAR | HWQUIRK_TXCLK }, + { "xlnx,zynqmp-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, { "microchip,mpfs-mss-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, { "sifive,fu540-c000-gem", HWQUIRK_PCLK }, { "sifive,fu740-c000-gem", HWQUIRK_PCLK }, - { "cdns,gem", HWQUIRK_NONE }, - { "cdns,macb", HWQUIRK_NONE }, - { "cadence,gem", HWQUIRK_NONE }, { NULL, 0 } }; From nobody Wed Oct 18 14:31:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YFX4RmNz4x6Kw; Wed, 18 Oct 2023 14:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YFX1K8Gz3NCs; Wed, 18 Oct 2023 14:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X6G0PHd1Jais2agfNrEaXATTqhNkoOxyuizjBHhzPQA=; b=df3PiThhAGR2ouDa6cDgvLy+0AO7gZA+xHNULDNm1q1LOGaiCjldskQrw0lFHN4Q9Lg69w fiNI3Owm6mV5KIR1RWZSs3IVY9qDNTBatUkkIDnsQZxhbAsIqVQVWCM/27cj3+ec+WmY9k TdXN4oOOqPHgjjFIMinUZvOnIa+fqbsRfjyAKt2LDaDKxtcOp4Y2hZPlJhgmnI5/01VSoL pMsBcswD8WryDh+kD9UIGX9icJccRYGo2C7oMpXre6zE5N/Tf9StfTaCP4TskVTzozt82Y OpS747REYb9sSIr8TQmEXAUc4W1Ie1hPJC2vfCf0PVFCfuOhwbaF/PyGKJiMOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639504; a=rsa-sha256; cv=none; b=UY2pwwlEomrezWsXFLxFuaTDzAaq5b9dQblVP9snupOVrgpwkTHhmcAAkH5n2UdqCmAJ7s Zlm0YOgZxj2cR02UhZae3DzEu7AsZeCWxDKGEHR/6GOz/wxKrBtO5kY78i7l6lhTn+RtTj CRfzO4ViFCXFreHwajO2XTYxaKR3TEISHjwhE/pJBpzYTt83LUwQBzYE1fj/0vALgG0FDW e7MFrDxV2inGrLryNuMHy5mEGvRicCGz8n4ZYrXQ74ycRSUPoPRiOhiO+C4KM6/tUppe+c sibeLNKAOiVgbb0xWkPf+XOADLSS0gzqL3OHIgs5ADUWI18fD8fEQP+fVpJ72w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X6G0PHd1Jais2agfNrEaXATTqhNkoOxyuizjBHhzPQA=; b=WKvORSENJ9PUP+NxL6ZbL3gw5liteRK9+Mw7ZljqgTSS9DqBGdPgT+WhosUAOlknGen0Wj qpXaAS0zSIDkPzlWKlYk4CYfNiNzuij8pH4JFXiAHo8oLxyntE8YrFh5VHRQbcLt2wk740 QOHXerFYfoD2ByO+f3stNQiDayS3u0UIKT1klTeJwMGSq+cgpuFnwHngCdLDx8MPDvlOD0 AnLE1UUEOnoLCfU/JW2dU5Byi9wM8rKd+v/fp2V5oKBbkSy/+ezYPCFC/s6r40RkysY54/ Cfe+6VonCBz1qcAbIeEpbaXyu/BgKkj83HNHi7D0bq/CF05/K08O/ERp1AHf2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YFX0RKqz18rT; Wed, 18 Oct 2023 14:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39IEVhRw089377; Wed, 18 Oct 2023 14:31:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEVhKJ089374; Wed, 18 Oct 2023 14:31:43 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:31:43 GMT Message-Id: <202310181431.39IEVhKJ089374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 1e685c7dd5c0 - stable/14 - if_cgem: Rewrite clock part List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e685c7dd5c01955d1aee233bf79b61fc1f0a8a3 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1e685c7dd5c01955d1aee233bf79b61fc1f0a8a3 commit 1e685c7dd5c01955d1aee233bf79b61fc1f0a8a3 Author: Emmanuel Vadot AuthorDate: 2023-09-14 08:57:19 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:31:13 +0000 if_cgem: Rewrite clock part - pclk and hclk are mandatory so always try to get them. Don't make it fatal if it fails as some platform (like Zynq) don't have a proper clock driver. - Always use pclk for the reference clock. - Try to get all the possible clocks and enable them. Reviewed-by: mhorne Tested-by: Milan Obuch Differential Revision: https://reviews.freebsd.org/D41857 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 4c52dde5bda099936d43820da84e569dccc6f475) --- sys/dev/cadence/if_cgem.c | 118 +++++++++++++++++++++++++++++++++------------- 1 file changed, 86 insertions(+), 32 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 43e35b2bf849..6e4a62f6e5ee 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -102,17 +102,15 @@ #define HWQUIRK_NONE 0 #define HWQUIRK_NEEDNULLQS 1 #define HWQUIRK_RXHANGWAR 2 -#define HWQUIRK_TXCLK 4 -#define HWQUIRK_PCLK 8 static struct ofw_compat_data compat_data[] = { - { "cdns,zynq-gem", HWQUIRK_RXHANGWAR | HWQUIRK_TXCLK }, /* Deprecated */ - { "cdns,zynqmp-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, /* Deprecated */ - { "xlnx,zynq-gem", HWQUIRK_RXHANGWAR | HWQUIRK_TXCLK }, - { "xlnx,zynqmp-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, - { "microchip,mpfs-mss-gem", HWQUIRK_NEEDNULLQS | HWQUIRK_TXCLK }, - { "sifive,fu540-c000-gem", HWQUIRK_PCLK }, - { "sifive,fu740-c000-gem", HWQUIRK_PCLK }, + { "cdns,zynq-gem", HWQUIRK_RXHANGWAR }, /* Deprecated */ + { "cdns,zynqmp-gem", HWQUIRK_NEEDNULLQS }, /* Deprecated */ + { "xlnx,zynq-gem", HWQUIRK_RXHANGWAR }, + { "xlnx,zynqmp-gem", HWQUIRK_NEEDNULLQS }, + { "microchip,mpfs-mss-gem", HWQUIRK_NEEDNULLQS }, + { "sifive,fu540-c000-gem", HWQUIRK_NONE }, + { "sifive,fu740-c000-gem", HWQUIRK_NONE }, { NULL, 0 } }; @@ -129,7 +127,11 @@ struct cgem_softc { struct callout tick_ch; uint32_t net_ctl_shadow; uint32_t net_cfg_shadow; - clk_t ref_clk; + clk_t clk_pclk; + clk_t clk_hclk; + clk_t clk_txclk; + clk_t clk_rxclk; + clk_t clk_tsuclk; int neednullqs; int phy_contype; @@ -1497,9 +1499,9 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) WR4(sc, CGEM_NET_CFG, sc->net_cfg_shadow); - if (sc->ref_clk != NULL) { + if (sc->clk_pclk != NULL) { CGEM_UNLOCK(sc); - if (clk_set_freq(sc->ref_clk, ref_clk_freq, 0)) + if (clk_set_freq(sc->clk_pclk, ref_clk_freq, 0)) device_printf(sc->dev, "could not set ref clk to %d\n", ref_clk_freq); CGEM_LOCK(sc); @@ -1744,19 +1746,47 @@ cgem_attach(device_t dev) sc->neednullqs = 1; if ((hwquirks & HWQUIRK_RXHANGWAR) != 0) sc->rxhangwar = 1; - if ((hwquirks & HWQUIRK_TXCLK) != 0) { - if (clk_get_by_ofw_name(dev, 0, "tx_clk", &sc->ref_clk) != 0) - device_printf(dev, - "could not retrieve reference clock.\n"); - else if (clk_enable(sc->ref_clk) != 0) - device_printf(dev, "could not enable clock.\n"); + /* + * Both pclk and hclk are mandatory but we don't have a proper + * clock driver for Zynq so don't make it fatal if we can't + * get them. + */ + if (clk_get_by_ofw_name(dev, 0, "pclk", &sc->clk_pclk) != 0) + device_printf(dev, + "could not retrieve pclk.\n"); + else { + if (clk_enable(sc->clk_pclk) != 0) + device_printf(dev, "could not enable pclk.\n"); + } + if (clk_get_by_ofw_name(dev, 0, "hclk", &sc->clk_hclk) != 0) + device_printf(dev, + "could not retrieve hclk.\n"); + else { + if (clk_enable(sc->clk_hclk) != 0) + device_printf(dev, "could not enable hclk.\n"); + } + + /* Optional clocks */ + if (clk_get_by_ofw_name(dev, 0, "tx_clk", &sc->clk_txclk) == 0) { + if (clk_enable(sc->clk_txclk) != 0) { + device_printf(dev, "could not enable tx_clk.\n"); + err = ENXIO; + goto err_pclk; + } + } + if (clk_get_by_ofw_name(dev, 0, "rx_clk", &sc->clk_rxclk) == 0) { + if (clk_enable(sc->clk_rxclk) != 0) { + device_printf(dev, "could not enable rx_clk.\n"); + err = ENXIO; + goto err_tx_clk; + } } - if ((hwquirks & HWQUIRK_PCLK) != 0) { - if (clk_get_by_ofw_name(dev, 0, "pclk", &sc->ref_clk) != 0) - device_printf(dev, - "could not retrieve reference clock.\n"); - else if (clk_enable(sc->ref_clk) != 0) - device_printf(dev, "could not enable clock.\n"); + if (clk_get_by_ofw_name(dev, 0, "tsu_clk", &sc->clk_tsuclk) == 0) { + if (clk_enable(sc->clk_tsuclk) != 0) { + device_printf(dev, "could not enable tsu_clk.\n"); + err = ENXIO; + goto err_rx_clk; + } } node = ofw_bus_get_node(dev); @@ -1768,7 +1798,8 @@ cgem_attach(device_t dev) RF_ACTIVE); if (sc->mem_res == NULL) { device_printf(dev, "could not allocate memory resources.\n"); - return (ENOMEM); + err = ENOMEM; + goto err_tsu_clk; } /* Get IRQ resource. */ @@ -1824,7 +1855,7 @@ cgem_attach(device_t dev) if (err) { device_printf(dev, "could not set up dma mem for descs.\n"); cgem_detach(dev); - return (ENOMEM); + goto err; } /* Get a MAC address. */ @@ -1841,12 +1872,29 @@ cgem_attach(device_t dev) device_printf(dev, "could not set interrupt handler.\n"); ether_ifdetach(ifp); cgem_detach(dev); - return (err); + goto err; } cgem_add_sysctls(dev); return (0); + +err_tsu_clk: + if (sc->clk_tsuclk) + clk_release(sc->clk_tsuclk); +err_rx_clk: + if (sc->clk_rxclk) + clk_release(sc->clk_rxclk); +err_tx_clk: + if (sc->clk_txclk) + clk_release(sc->clk_txclk); +err_pclk: + if (sc->clk_pclk) + clk_release(sc->clk_pclk); + if (sc->clk_hclk) + clk_release(sc->clk_hclk); +err: + return (err); } static int @@ -1923,13 +1971,19 @@ cgem_detach(device_t dev) sc->mbuf_dma_tag = NULL; } - if (sc->ref_clk != NULL) { - clk_release(sc->ref_clk); - sc->ref_clk = NULL; - } - bus_generic_detach(dev); + if (sc->clk_tsuclk) + clk_release(sc->clk_tsuclk); + if (sc->clk_rxclk) + clk_release(sc->clk_rxclk); + if (sc->clk_txclk) + clk_release(sc->clk_txclk); + if (sc->clk_pclk) + clk_release(sc->clk_pclk); + if (sc->clk_hclk) + clk_release(sc->clk_hclk); + CGEM_LOCK_DESTROY(sc); return (0); From nobody Wed Oct 18 14:32:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH00Ccxz4x6Ht; Wed, 18 Oct 2023 14:33: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 4S9YGz6qBHz3Q64; Wed, 18 Oct 2023 14:32:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opVYOKnGjkvWIJk9/OpnLOdijSEtY2PThfRONoVoGFw=; b=XM+LmRdUTqbIJryuySFFJ2QhE4ogAs1xlHbsEzZOTLNgSD1FO9qCm69GN7J5IRfYgRQsUZ mSyU3zs2rvJ9rB3LPHP2fc00DR3mFcm6wMWzYravWWCaknARikpxUq+LIXObKQozE+DX9m 68gznyZ4hqIktV7ZTBNJ+4QZ5ze8TJpS4/4mC7vxBlyaozIAovTdOULwylngaRRhWypiup BggyQNfKz/G7EWQCw8QOmppBOr9v5gBtG3oG5ZbmsyKpwUDCbvVVyJY6c1WKxv3ygn0JMX rNu7MVcp5BVtn8tjmWlYJudZ08nYPM4tdXuL6lJQyCnQhXgSKNnL6wuuRKyrIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639580; a=rsa-sha256; cv=none; b=X59O2B1LjQQP3KvLOQTGPabU2yBvMUsET9aCsXI4M07Z/XJtNcvHSF3p2bmF2KGVZ2+RWV tr4c7mocs0iMufVM6WnajfDDGE/wnhrdGvPM3iQgJZI03GfVGmDxWWfW0Qx+qOgH9TBu7Z SjRhwZtC1y/dGIv0uqnWywgy7NI0ayUBrlxw3A8Gg0xp0ylUKZR/398Cy07IpVu9AmVpYO x4JnjC8YA6TckDe1jSV8HuJ6q4hyW661jOe9h4oMo0RYFt4cfvMtqeUpiJUAZbYGIu/qa0 IdmlJ/Nk6ullXNE5/k5vOZn5zBZBGq6AQ4EY0rtCd0KQgq88Qfp693zEzbRbTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opVYOKnGjkvWIJk9/OpnLOdijSEtY2PThfRONoVoGFw=; b=fxV8oE345hZwpY/6zagQ5Tw2WcuIaFc7lQpx7J7smXdocVeN4e/zKU8el0sBPIboVVdTp2 D25UVcuQT1Wxi2w5C/2Xmz78NBezNTTNYp9OrgPac9xvNyY+a6mKk0LlU0HrJrYbc2SCn6 ZMZT7/sUqhCrbl/uC2hBRzLmEoKfvCyyqTvOYmtO+tYa2pHsJxgV6U/MMua53QcRi15S/R TGu4AGHyZUnAMd1qyvIB1puooEG/o932vslAvkEx0zDBOPacdw63ktKs7q4m3/p0XpfyN8 z2G0P5tCrBwvuByJUYeJKNBWw5hwTKtA94htd3L63mR1C95M2lblVdy6KO7dhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YGz5tdQz18xK; Wed, 18 Oct 2023 14:32: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 39IEWx1K091452; Wed, 18 Oct 2023 14:32:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEWxil091449; Wed, 18 Oct 2023 14:32:59 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:32:59 GMT Message-Id: <202310181432.39IEWxil091449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: a5b3cbe6cc68 - stable/14 - iicbus: Move twsi under a new controller subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a5b3cbe6cc68a42e8474f27fb9272c245c16bc67 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b3cbe6cc68a42e8474f27fb9272c245c16bc67 commit a5b3cbe6cc68a42e8474f27fb9272c245c16bc67 Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:43:37 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:05 +0000 iicbus: Move twsi under a new controller subdirectory The folder is a mess so start moving stuff into sub-directories. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41907 (cherry picked from commit 580d00f42fdd94ce43583cc45fe3f1d9fdff47d4) --- sys/arm/allwinner/files.allwinner | 2 +- sys/arm/mv/files.arm7 | 2 +- sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 6 +++--- sys/dev/iicbus/{ => controller}/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/mv_twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/twsi.h | 0 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/arm/allwinner/files.allwinner b/sys/arm/allwinner/files.allwinner index b5197809380d..cc609e50f2bd 100644 --- a/sys/arm/allwinner/files.allwinner +++ b/sys/arm/allwinner/files.allwinner @@ -22,7 +22,7 @@ arm/allwinner/axp81x.c optional axp81x arm/allwinner/if_awg.c optional awg syscon arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m optional a10_dmac | a31_dmac -dev/iicbus/twsi/a10_twsi.c optional twsi +dev/iicbus/controller/twsi/a10_twsi.c optional twsi dev/usb/controller/generic_ohci.c optional ohci dev/usb/controller/generic_usb_if.m optional ohci dev/usb/controller/generic_ehci.c optional ehci diff --git a/sys/arm/mv/files.arm7 b/sys/arm/mv/files.arm7 index 3eb18739532a..791046161151 100644 --- a/sys/arm/mv/files.arm7 +++ b/sys/arm/mv/files.arm7 @@ -22,7 +22,7 @@ arm/mv/rtc.c standard arm/mv/armadaxp/armadaxp_mp.c optional smp arm/mv/armadaxp/mptramp.S optional smp dev/cesa/cesa.c optional cesa -dev/iicbus/twsi/mv_twsi.c optional twsi +dev/iicbus/controller/twsi/mv_twsi.c optional twsi dev/mge/if_mge.c optional mge dev/neta/if_mvneta_fdt.c optional neta fdt dev/neta/if_mvneta.c optional neta mdio mii diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 3dc48e20b168..344dada420c9 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -93,7 +93,7 @@ dev/fdt/fdt_arm_platform.c optional platform fdt dev/video/crtc_if.m optional vt dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc -dev/iicbus/twsi/twsi.c optional twsi +dev/iicbus/controller/twsi/twsi.c optional twsi dev/ofw/ofw_pcib.c optional fdt pci dev/pci/pci_host_generic.c optional pci_host_generic pci dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index dc78840646bb..4df4f5c81bd1 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -337,9 +337,9 @@ ice_ddp.fw optional ice_ddp \ clean "ice_ddp.fw" dev/iicbus/sy8106a.c optional sy8106a fdt -dev/iicbus/twsi/mv_twsi.c optional twsi fdt -dev/iicbus/twsi/a10_twsi.c optional twsi fdt -dev/iicbus/twsi/twsi.c optional twsi fdt +dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt +dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt +dev/iicbus/controller/twsi/twsi.c optional twsi fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi diff --git a/sys/dev/iicbus/twsi/a10_twsi.c b/sys/dev/iicbus/controller/twsi/a10_twsi.c similarity index 98% rename from sys/dev/iicbus/twsi/a10_twsi.c rename to sys/dev/iicbus/controller/twsi/a10_twsi.c index 3b61d338e580..de3f6a92f44f 100644 --- a/sys/dev/iicbus/twsi/a10_twsi.c +++ b/sys/dev/iicbus/controller/twsi/a10_twsi.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/iicbus/twsi/mv_twsi.c b/sys/dev/iicbus/controller/twsi/mv_twsi.c similarity index 99% rename from sys/dev/iicbus/twsi/mv_twsi.c rename to sys/dev/iicbus/controller/twsi/mv_twsi.c index 3f50bb0c4968..35f5b0acc650 100644 --- a/sys/dev/iicbus/twsi/mv_twsi.c +++ b/sys/dev/iicbus/controller/twsi/mv_twsi.c @@ -63,7 +63,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/controller/twsi/twsi.c similarity index 99% rename from sys/dev/iicbus/twsi/twsi.c rename to sys/dev/iicbus/controller/twsi/twsi.c index 802110ed7f99..7031cce515ce 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/controller/twsi/twsi.c @@ -56,7 +56,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/controller/twsi/twsi.h similarity index 100% rename from sys/dev/iicbus/twsi/twsi.h rename to sys/dev/iicbus/controller/twsi/twsi.h From nobody Wed Oct 18 14:33:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH11STtz4x63p; Wed, 18 Oct 2023 14:33: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 4S9YH10ZGYz3QFM; Wed, 18 Oct 2023 14:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//+wYk9UUKRw2scKvKQ3JJjJancfv/etrw49LdR6h9E=; b=yPVk6DHXd/hUK/q93CB2oVHnYeS1TcHQ4EAUFfNYW8xjjWRf+HOXH/OQWZ4sV12h9vvHh7 QYdSzxSjrN0vkQmY3y0qUwFteapddUPkxpaB7QM2xGmNQFPpw8/vblqSzT51nbMG2rD6ZP kOrOc3WADgteJFXI15LX9wxHomW5xH9Ht+HpFGCLYzWjWty2mTUQseOlt22K9chh6DtRXT S6Druqnuy8j/X060DnpHvC1C2oUAitR01jliF+6xQmI15dd3kHrxVOzceRChnkJiht/MEt Gqaj2Pf+82qQ1XI5CHZmFPLO2N7TZgBDQ5F4YwmO9eyIZPhXypz20wqmLOJWtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639581; a=rsa-sha256; cv=none; b=KdGNycBZ35hJEAJ45b9zRcMeVxjId8Knze0bFNV9JSGsEFuUAO6phcxeuai14T6PSHS8Ti aUzrGIBYIQJabtAqtq2oeCSdECEPp2pS5kum1LRbjm6b4QF96YnVFiN3z947ZHop0Q3tyJ k8Oisvg91xOjyz22GgrkJN/FMMCEMpvoFjU9t4nuLjGHWzPqCQqLdz4rgVn7j1E5AKonGK OBCNo3qvEw30F0tR/MGQOL+sKO0ba11OiC1aq3Nwaf5S657FJ+2mmgOtKgISqxogzU+chi o0fISo5M5R7nG2NerSAH2rTG5DhkyQzwJ7MAzWBzQP62NCT11QijkH3Sw2S9Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//+wYk9UUKRw2scKvKQ3JJjJancfv/etrw49LdR6h9E=; b=RcqeJ4CPDB1eMFrZLCd1LNWdOUHzPY7Fii4EyWVdNWa+a4UaBu2PuEv0oPtSmiMLDLlcsd OtG+mxyejS2fhbZIcvrYR6r0bjNSOtc2T/9G+XkyNUCsWh8XdEPQgr77jPuy1Sgh5cdUZg ygFbqFDYJMfDxpONrsu6F7KIL2Xbo6Hnf9Jmo4cMcaV+RKl51HmB3dhfAcVcFiedfoWYwN lA02wx3Pv5LmtVPRShxxmJyR6oJaOQsq61qxE/4B5gtTsbpp1aKS0uc+qV9I8u1culcuNd 3EYmbeMJOuyPCjxUt9i+THoQk/rqih+qEgupsD/G/sHXZUMQBwHiDT+qBWWj4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH06k9Zz19GJ; Wed, 18 Oct 2023 14:33: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 39IEX0Kv091529; Wed, 18 Oct 2023 14:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX0WO091526; Wed, 18 Oct 2023 14:33:00 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:00 GMT Message-Id: <202310181433.39IEX0WO091526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 5e25c410bde7 - stable/14 - iicbus: Move remaining rtc driver into rtc subfolder List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e25c410bde7e7eadc9556d6eb1c97ea373b20ea Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5e25c410bde7e7eadc9556d6eb1c97ea373b20ea commit 5e25c410bde7e7eadc9556d6eb1c97ea373b20ea Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:49:45 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:07 +0000 iicbus: Move remaining rtc driver into rtc subfolder No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41908 (cherry picked from commit 2f16049c985a364e2bd2b256f5bef9af17e10c62) --- sys/conf/files | 16 ++++++++-------- sys/dev/iicbus/{ => rtc}/ds1307.c | 2 +- sys/dev/iicbus/{ => rtc}/ds1307reg.h | 0 sys/dev/iicbus/{ => rtc}/ds13rtc.c | 0 sys/dev/iicbus/{ => rtc}/ds1672.c | 0 sys/dev/iicbus/{ => rtc}/ds3231.c | 2 +- sys/dev/iicbus/{ => rtc}/ds3231reg.h | 0 sys/dev/iicbus/{ => rtc}/isl12xx.c | 0 sys/dev/iicbus/{ => rtc}/nxprtc.c | 0 sys/dev/iicbus/{ => rtc}/rtc8583.c | 0 sys/dev/iicbus/{ => rtc}/s35390a.c | 0 sys/modules/i2c/ds1307/Makefile | 2 +- sys/modules/i2c/ds13rtc/Makefile | 2 +- sys/modules/i2c/ds1672/Makefile | 2 +- sys/modules/i2c/ds3231/Makefile | 2 +- sys/modules/i2c/isl12xx/Makefile | 2 +- sys/modules/i2c/nxprtc/Makefile | 2 +- sys/modules/i2c/rtc8583/Makefile | 2 +- sys/modules/i2c/s35390a/Makefile | 2 +- 19 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 2b4bebaa6831..1fad62fd61f3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1794,10 +1794,6 @@ dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ads111x.c optional ads111x -dev/iicbus/ds1307.c optional ds1307 -dev/iicbus/ds13rtc.c optional ds13rtc | ds133x | ds1374 -dev/iicbus/ds1672.c optional ds1672 -dev/iicbus/ds3231.c optional ds3231 dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic @@ -1814,7 +1810,6 @@ dev/iicbus/iicsmb.c optional iicsmb \ dev/iicbus/iicoc.c optional iicoc dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci -dev/iicbus/isl12xx.c optional isl12xx dev/iicbus/lm75.c optional lm75 dev/iicbus/max44009.c optional max44009 dev/iicbus/mux/iicmux.c optional iicmux @@ -1822,15 +1817,20 @@ dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux -dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/pcf8591.c optional pcf8591 -dev/iicbus/rtc8583.c optional rtc8583 +dev/iicbus/rtc/ds1307.c optional ds1307 +dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 +dev/iicbus/rtc/ds1672.c optional ds1672 +dev/iicbus/rtc/ds3231.c optional ds3231 +dev/iicbus/rtc/isl12xx.c optional isl12xx +dev/iicbus/rtc/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt +dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt -dev/iicbus/s35390a.c optional s35390a +dev/iicbus/rtc/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a fdt dev/iicbus/syr827.c optional syr827 fdt dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio diff --git a/sys/dev/iicbus/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c similarity index 99% rename from sys/dev/iicbus/ds1307.c rename to sys/dev/iicbus/rtc/ds1307.c index 6522b3284bf3..e8d24880571c 100644 --- a/sys/dev/iicbus/ds1307.c +++ b/sys/dev/iicbus/rtc/ds1307.c @@ -48,7 +48,7 @@ #include #endif -#include +#include #include "clock_if.h" #include "iicbus_if.h" diff --git a/sys/dev/iicbus/ds1307reg.h b/sys/dev/iicbus/rtc/ds1307reg.h similarity index 100% rename from sys/dev/iicbus/ds1307reg.h rename to sys/dev/iicbus/rtc/ds1307reg.h diff --git a/sys/dev/iicbus/ds13rtc.c b/sys/dev/iicbus/rtc/ds13rtc.c similarity index 100% rename from sys/dev/iicbus/ds13rtc.c rename to sys/dev/iicbus/rtc/ds13rtc.c diff --git a/sys/dev/iicbus/ds1672.c b/sys/dev/iicbus/rtc/ds1672.c similarity index 100% rename from sys/dev/iicbus/ds1672.c rename to sys/dev/iicbus/rtc/ds1672.c diff --git a/sys/dev/iicbus/ds3231.c b/sys/dev/iicbus/rtc/ds3231.c similarity index 99% rename from sys/dev/iicbus/ds3231.c rename to sys/dev/iicbus/rtc/ds3231.c index eb45f6fcf6e6..23e88eb7ecd3 100644 --- a/sys/dev/iicbus/ds3231.c +++ b/sys/dev/iicbus/rtc/ds3231.c @@ -47,7 +47,7 @@ #include #endif -#include +#include #include "clock_if.h" #include "iicbus_if.h" diff --git a/sys/dev/iicbus/ds3231reg.h b/sys/dev/iicbus/rtc/ds3231reg.h similarity index 100% rename from sys/dev/iicbus/ds3231reg.h rename to sys/dev/iicbus/rtc/ds3231reg.h diff --git a/sys/dev/iicbus/isl12xx.c b/sys/dev/iicbus/rtc/isl12xx.c similarity index 100% rename from sys/dev/iicbus/isl12xx.c rename to sys/dev/iicbus/rtc/isl12xx.c diff --git a/sys/dev/iicbus/nxprtc.c b/sys/dev/iicbus/rtc/nxprtc.c similarity index 100% rename from sys/dev/iicbus/nxprtc.c rename to sys/dev/iicbus/rtc/nxprtc.c diff --git a/sys/dev/iicbus/rtc8583.c b/sys/dev/iicbus/rtc/rtc8583.c similarity index 100% rename from sys/dev/iicbus/rtc8583.c rename to sys/dev/iicbus/rtc/rtc8583.c diff --git a/sys/dev/iicbus/s35390a.c b/sys/dev/iicbus/rtc/s35390a.c similarity index 100% rename from sys/dev/iicbus/s35390a.c rename to sys/dev/iicbus/rtc/s35390a.c diff --git a/sys/modules/i2c/ds1307/Makefile b/sys/modules/i2c/ds1307/Makefile index 9699a1057dc3..363aa412cbdc 100644 --- a/sys/modules/i2c/ds1307/Makefile +++ b/sys/modules/i2c/ds1307/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1307 SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds13rtc/Makefile b/sys/modules/i2c/ds13rtc/Makefile index ffeab1c12dd7..a9616765b7a5 100644 --- a/sys/modules/i2c/ds13rtc/Makefile +++ b/sys/modules/i2c/ds13rtc/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds13rtc SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds1672/Makefile b/sys/modules/i2c/ds1672/Makefile index 1b1fd9ab038c..c160e317c36d 100644 --- a/sys/modules/i2c/ds1672/Makefile +++ b/sys/modules/i2c/ds1672/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1672 SRCS = ds1672.c diff --git a/sys/modules/i2c/ds3231/Makefile b/sys/modules/i2c/ds3231/Makefile index 7548f6ef8282..4c6a7241bf76 100644 --- a/sys/modules/i2c/ds3231/Makefile +++ b/sys/modules/i2c/ds3231/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds3231 SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/isl12xx/Makefile b/sys/modules/i2c/isl12xx/Makefile index 98411b78aae6..be0b409eeff2 100644 --- a/sys/modules/i2c/isl12xx/Makefile +++ b/sys/modules/i2c/isl12xx/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = isl12xx SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/nxprtc/Makefile b/sys/modules/i2c/nxprtc/Makefile index 23efdcfe7754..3501909f6ea4 100644 --- a/sys/modules/i2c/nxprtc/Makefile +++ b/sys/modules/i2c/nxprtc/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = nxprtc SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/rtc8583/Makefile b/sys/modules/i2c/rtc8583/Makefile index 23cb48afd33c..a474da20685e 100644 --- a/sys/modules/i2c/rtc8583/Makefile +++ b/sys/modules/i2c/rtc8583/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = rtc8583 SRCS = rtc8583.c diff --git a/sys/modules/i2c/s35390a/Makefile b/sys/modules/i2c/s35390a/Makefile index d1091db58abc..e12ddeece2ec 100644 --- a/sys/modules/i2c/s35390a/Makefile +++ b/sys/modules/i2c/s35390a/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = s35390a SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h From nobody Wed Oct 18 14:33:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH2229Xz4x6J0; Wed, 18 Oct 2023 14:33: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 4S9YH21L9mz3Q4r; Wed, 18 Oct 2023 14:33:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4+Qygt5d9ZS6iZTyLB0fmaC5DGzwlpjTyPedEdyfJw=; b=i+bWN6C3uDB+T8nN2/lUWWaS7p26sqUBlQbDik4qHilMHERtAhUcrcErJb+qlH001Ji+Gx 6O7MnVW8lKxGOiXxS9zOP7/kliDUHGjrGat1PZg5XRLCB5VcXNrGRFlVs4s7peCvDX5/FK fzfO94N6YfRX418x7XLBO/BxabK8qkSPljaqb+VVhL/FGIX38ojKcQlpUdMCkMFu1Pf7D0 ND5R8OGhJGSeYBFj3FYzXDqTR+zJJcT9Yp+GdMT0DhpvLHUVWJbL9sCUz8wgZ0R/r/0GiL Drzi1CjLhZTd6E7rgupFDNGRukgp3EgJe2j2/yOD6FJusRw1DWYzQlFZL2RMgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639582; a=rsa-sha256; cv=none; b=c08Xox1CsnBqYAF+WFXx10uiJ6q5LMiCarVkF5/iveK0U8QAF9yPkB5juKqZhAp2TZWm/5 Nuboamm0djbbeaKtX+3kHdbTPFw7d9LDbzt7iJ9RfjVUqpsPE04wzqO3Pdk2X3U7iSwnx/ Hn2dN2V9tvKwtoMFFS91sFI2GCoQxLCWMq3uaFR+HrcE9zyGKHn3ZihRpHkfGpuPCUMLTb f1xMy4WllacrqyRzR6Moe61SzmF28FD/fZbNgNkRWhAj7TleI58JSG8QSYHtjcdhbyfhWB wEFfiXkRKpy26SP0wb3rkfPcZe9RXLCApOGqcQtFA4i4AlKI2fLIjbG5WvZobA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4+Qygt5d9ZS6iZTyLB0fmaC5DGzwlpjTyPedEdyfJw=; b=bj4U5hF8ZkVtdA6l//PgZeVgiEFXRiU/ppXjcaaPRfT6CF71fhw2FOpCFBk5A0Enwst5RO Ejj1skcm1pl58qlWnxV2KhEIPOOHm94BJ5GxwIoxlKd/NXas308Z7YnmRpIs4rnVYrK88x sxiFKvHBSgzcl2X5iyESsopCDBqjRtvhtpEIdqRAEc6SKrfhkirIMr5pZJF0M+RnFRKOnR rlSifGLy0kDTLgfUMsfOSwUvNmDc8B7eE+DmjdeCdS443yQ4xClDfV6KFQjMnT7wpx2t3/ XHkCCRoxeu4yeinGpRtM4pRyYky6bg7eOUPS7easZtOKn2aWPsmsay9ZT/UgeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH20RGXz18bm; Wed, 18 Oct 2023 14:33: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 39IEX1SP091578; Wed, 18 Oct 2023 14:33:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX17T091575; Wed, 18 Oct 2023 14:33:01 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:01 GMT Message-Id: <202310181433.39IEX17T091575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8d715e2f4912 - stable/14 - iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d715e2f4912c7190853994aede086d81c66c481 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8d715e2f4912c7190853994aede086d81c66c481 commit 8d715e2f4912c7190853994aede086d81c66c481 Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:56:02 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:08 +0000 iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41909 (cherry picked from commit 062944cc4227e7bd002e4de2be48ec9b710bfaa5) --- sys/conf/files | 4 ++-- sys/conf/files.arm64 | 1 - sys/dev/iicbus/{ => pmic/silergy}/sy8106a.c | 0 sys/dev/iicbus/{ => pmic/silergy}/syr827.c | 0 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 1fad62fd61f3..9a8af0b97495 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1831,10 +1831,10 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a -dev/iicbus/sy8106a.c optional sy8106a fdt -dev/iicbus/syr827.c optional syr827 fdt dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt +dev/iicbus/pmic/silergy/sy8106a.c optional sy8106a fdt +dev/iicbus/pmic/silergy/syr827.c optional syr827 fdt dev/igc/if_igc.c optional igc iflib pci dev/igc/igc_api.c optional igc iflib pci dev/igc/igc_base.c optional igc iflib pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 4df4f5c81bd1..d8adc54763fc 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -336,7 +336,6 @@ ice_ddp.fw optional ice_ddp \ no-obj no-implicit-rule \ clean "ice_ddp.fw" -dev/iicbus/sy8106a.c optional sy8106a fdt dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt dev/iicbus/controller/twsi/twsi.c optional twsi fdt diff --git a/sys/dev/iicbus/sy8106a.c b/sys/dev/iicbus/pmic/silergy/sy8106a.c similarity index 100% rename from sys/dev/iicbus/sy8106a.c rename to sys/dev/iicbus/pmic/silergy/sy8106a.c diff --git a/sys/dev/iicbus/syr827.c b/sys/dev/iicbus/pmic/silergy/syr827.c similarity index 100% rename from sys/dev/iicbus/syr827.c rename to sys/dev/iicbus/pmic/silergy/syr827.c From nobody Wed Oct 18 14:33:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH3315hz4x63w; Wed, 18 Oct 2023 14:33: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 4S9YH326GPz3QQv; Wed, 18 Oct 2023 14:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az+89s/RqSL6mHbGqHVuw0YXmpxdXzLpw50Iu5wmv+E=; b=qNvJlREfWTqhwkpSRiZt3dCgRMQU/2Hpz3wzOqWFkqZWzhGTOI5dT94PZYAyXAETB30uZW BjiO3D/SdI7KkhRr5XbooaGbeIR5Cwj79HGE6xGbwS/PbtmVU17ObZSUvPZ5uwPfovFAUD 4nz53F6bBXHSSFnjbvS1Jd9CxZBv4L/E2WM8GdLQU8XCMiTRRIfSZIF+C95HHEtRsTWoY4 6gCTsT2oyvUWsyYUs/4ypwooo9ZZjMIbkDEgcUmve43PUr6vP9PJCyiRcWW5lSfxe4dXS9 EaRLNUZT63Ph8xwCWhPXWvUA3c6Ku4jVI7x6f7CJvqKaidk0sT4puV2SWsinJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639583; a=rsa-sha256; cv=none; b=Pvcufc5EYmEkyc7IDqqSFJ24ixuM16OjdJ9hbMBrxJu4g2+NCxahAuCzdKNqc5/FslB7rJ EjH1i1yja7iKxb8oCOjbPgL+iZ+5hzQvaPpfnupxg5gBG3O2xUogLr8wSlYeUc7dZb1QSi RBn+lJMvi2WdDMeyqzMExTtBe9YaTvHeSoZHxM/iPTGrQQ0IFKnoJ1HNZl6NtazWV80A4Q L2YJpPeAXcSYuXLDGiy250x6rh5b//yf9ofJtMKLsPaITDOg0T2oYFs4UfCfDy+HrGQQr+ fNbGt8qxh9KhutLTq/gJR/EANuII9Mn/jeQJ2XDjrQ96eyHlFDOiMpDgEb/UGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az+89s/RqSL6mHbGqHVuw0YXmpxdXzLpw50Iu5wmv+E=; b=giTeFaNEx47BEJheBf8GRqfmzgrGUNbF46xspLy/ZLCdziutcHpov+DrJ5tPA2eyMqkctt TDtfgOk5voG5r8ULAQgV7frbH3FXZQDqs48bzulaI+9RbJDP+g104xXCbn7JVIQ1d9kFPP ZY+OvVo/H17jsOHoWce6NIOdx2H2Q8ebVtHPZnxkkY51XlU4Fs7hTsQWblE0f14mUC+L2H NsNpZGL1QGGCS6dlhpVNzfBRpX4cJJ4OCbzqahAG6mITfZLW14JG+687bsJ+Q1KVfYqSFG /eqBO4ApiVeNUqjgLjdElc2nEmSw0ksBBCHdvh8iprlZMko4nkjsBDBQCuaNPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH31BRxz19GK; Wed, 18 Oct 2023 14:33: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 39IEX3A9091644; Wed, 18 Oct 2023 14:33:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX39C091641; Wed, 18 Oct 2023 14:33:03 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:03 GMT Message-Id: <202310181433.39IEX39C091641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 26dd10a4f31f - stable/14 - iicbus: Move adm1030 and adt746x to new pwm subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26dd10a4f31ffdcd242df0ca2c49c58105fb72b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=26dd10a4f31ffdcd242df0ca2c49c58105fb72b9 commit 26dd10a4f31ffdcd242df0ca2c49c58105fb72b9 Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:04:02 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:10 +0000 iicbus: Move adm1030 and adt746x to new pwm subdirectory Those are (mainly) pwm controller so move it under a new subdirectory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41910 (cherry picked from commit 22d7dd834bc5cd189810e414701e3ad1e98102e4) --- sys/conf/files.powerpc | 4 ++-- sys/dev/iicbus/{ => pwm}/adm1030.c | 0 sys/dev/iicbus/{ => pwm}/adt746x.c | 0 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 48251ab07d9e..0a05b1327689 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -41,13 +41,13 @@ dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac -dev/iicbus/adm1030.c optional powermac windtunnel | adm1030 powermac -dev/iicbus/adt746x.c optional adt746x powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim +dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac +dev/iicbus/pwm/adt746x.c optional adt746x powermac dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_opal.c optional powernv ipmi dev/ice/if_ice_iflib.c optional ice pci powerpc64 | ice pci powerpc64le \ diff --git a/sys/dev/iicbus/adm1030.c b/sys/dev/iicbus/pwm/adm1030.c similarity index 100% rename from sys/dev/iicbus/adm1030.c rename to sys/dev/iicbus/pwm/adm1030.c diff --git a/sys/dev/iicbus/adt746x.c b/sys/dev/iicbus/pwm/adt746x.c similarity index 100% rename from sys/dev/iicbus/adt746x.c rename to sys/dev/iicbus/pwm/adt746x.c From nobody Wed Oct 18 14:33:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH46KbZz4x6Np; Wed, 18 Oct 2023 14:33: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 4S9YH43bpkz3QZB; Wed, 18 Oct 2023 14:33:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5Rxl+XirRLnzdkC+ts8OXtQplDieXCyO5HyiKgbXy8=; b=fMHtvfNAzckO/SJaGggclwP9uFPZJ5MTRiIvvXtzVriigBGsXFbKva5vkqCOSsY756JXOu WiRR8YiO8etrKcppBmMi52WLNYf1BjWncA4lIconnn5tQ8pTngilmneGv5rWcv7dpjYzbi wiFqqr2TgiS+Ib8umET57juCyhTkCfA3ysZQ78bo6A9N0TI1oZ8udIVpJORWuyYVenNO72 LaddGtXpmsFrBR/j8dzdtqh/sd/0gSIZpyWxv4vynO6OCVteGvizf94HaMeAZJ8B6Bif3v 6nHPDNjlSmIxYs3Ivi1X3oHtAL3cFQ6AyFAwJgLsEXq6q2PdDvFo2lwjAeof2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639584; a=rsa-sha256; cv=none; b=qyjEwpzvOGhh2FtV8H4A4mBS47vlAtCb7ecCLO35HSGnuDzBXoW4fVWiidXE8UhVXWvpgm eBPfr/sM+jUa29F3HQPIZ29+LlSw+dI4rKSZDdm8M/zrVn/oBJkdDzbpxhUSuG/UNNcVBn ggG/F8L05mXpBZQck6pdgCLIcc7BYf9cnyS8RIbMuCRMLc3RRg+P+LHFW5U7g1gij0QTWS HdDbgRA8Ut66fSk2TM0IstvIlKu7EEp2TA2MJF5jUYM0rJZ0siFEwYjlrTtc9NzDUgAU3K P9L6d8KC2Mw2H0jHL0JwqnxVpm8H3mVtU+UTaeXnlz5mVzOH2yMvjuSbp8LiQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5Rxl+XirRLnzdkC+ts8OXtQplDieXCyO5HyiKgbXy8=; b=sljAnJlZstEF/24+U2wH3Ry/Rtxiy44Y5hsMXZ7W9vUScogovEgBFmbt+bIQic3zw5JCvX f8suC2Qdhy0YJe4lSoQuD9bF78Ws7RYZjSiCt77LdzuwZDmrBRcNKJV4t5HxH+ouBdiZJ1 +/+7wdcwamwjv2Ek2FsVgwJn7XOVLG7wEocTBYR3wpIj152S47SD2KrpHUPJaHQOK6Dj0i HVibWf2JZN5eGd/U3hAEXuNgYVoJvPL4ln/nupjN/uqb7cRJ9HA4Y3GWwuJZKIunQ0IHTK pSiQ44UrymDsRF0wuYT+bgqDvisAB0NHiusCggYOsA7JTdTrPNf0hdAm1WJhqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH42Vytz196r; Wed, 18 Oct 2023 14:33: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 39IEX4ZK091698; Wed, 18 Oct 2023 14:33:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX4ms091695; Wed, 18 Oct 2023 14:33:04 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:04 GMT Message-Id: <202310181433.39IEX4ms091695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: cd2f6226e793 - stable/14 - iicbus: Move ADC drivers into a new adc subfolder List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cd2f6226e793babb9f4a35223d3843daa0cf051f Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cd2f6226e793babb9f4a35223d3843daa0cf051f commit cd2f6226e793babb9f4a35223d3843daa0cf051f Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:38:19 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:11 +0000 iicbus: Move ADC drivers into a new adc subfolder No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41911 (cherry picked from commit 06589d6e029c6ff64a7816d743e0a508abe6193b) --- sys/conf/files | 6 +++--- sys/conf/files.powerpc | 2 +- sys/dev/iicbus/{ => adc}/ad7417.c | 0 sys/dev/iicbus/{ => adc}/ad7418.c | 0 sys/dev/iicbus/{ => adc}/ads111x.c | 0 sys/dev/iicbus/{ => adc}/pcf8591.c | 0 sys/modules/i2c/ads111x/Makefile | 2 +- sys/modules/i2c/pcf8591/Makefile | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 9a8af0b97495..87a82d61bd09 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1792,8 +1792,6 @@ dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi -dev/iicbus/ad7418.c optional ad7418 -dev/iicbus/ads111x.c optional ads111x dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic @@ -1812,6 +1810,9 @@ dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci dev/iicbus/lm75.c optional lm75 dev/iicbus/max44009.c optional max44009 +dev/iicbus/adc/ad7418.c optional ad7418 +dev/iicbus/adc/ads111x.c optional ads111x +dev/iicbus/adc/pcf8591.c optional pcf8591 dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt @@ -1820,7 +1821,6 @@ dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 -dev/iicbus/pcf8591.c optional pcf8591 dev/iicbus/rtc/ds1307.c optional ds1307 dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/rtc/ds1672.c optional ds1672 diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 0a05b1327689..76a0f4d707f3 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -40,10 +40,10 @@ dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc -dev/iicbus/ad7417.c optional ad7417 powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac +dev/iicbus/adc/ad7417.c optional ad7417 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac diff --git a/sys/dev/iicbus/ad7417.c b/sys/dev/iicbus/adc/ad7417.c similarity index 100% rename from sys/dev/iicbus/ad7417.c rename to sys/dev/iicbus/adc/ad7417.c diff --git a/sys/dev/iicbus/ad7418.c b/sys/dev/iicbus/adc/ad7418.c similarity index 100% rename from sys/dev/iicbus/ad7418.c rename to sys/dev/iicbus/adc/ad7418.c diff --git a/sys/dev/iicbus/ads111x.c b/sys/dev/iicbus/adc/ads111x.c similarity index 100% rename from sys/dev/iicbus/ads111x.c rename to sys/dev/iicbus/adc/ads111x.c diff --git a/sys/dev/iicbus/pcf8591.c b/sys/dev/iicbus/adc/pcf8591.c similarity index 100% rename from sys/dev/iicbus/pcf8591.c rename to sys/dev/iicbus/adc/pcf8591.c diff --git a/sys/modules/i2c/ads111x/Makefile b/sys/modules/i2c/ads111x/Makefile index 05e2d1c0da0e..d02cb704146c 100644 --- a/sys/modules/i2c/ads111x/Makefile +++ b/sys/modules/i2c/ads111x/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= ads111x SRCS= ads111x.c diff --git a/sys/modules/i2c/pcf8591/Makefile b/sys/modules/i2c/pcf8591/Makefile index c944a2c8c66d..8f17f3dc3ae1 100644 --- a/sys/modules/i2c/pcf8591/Makefile +++ b/sys/modules/i2c/pcf8591/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= pcf8591 SRCS= pcf8591.c From nobody Wed Oct 18 14:33:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH743G0z4x6Nq; Wed, 18 Oct 2023 14:33: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 4S9YH53z3Yz3QJv; Wed, 18 Oct 2023 14:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FPvoWPEBs0+6ZVd3jCTDNZPZUA0ef4o65F82wTsjcbU=; b=rOURK3SOQSa4K7pciOXcp2DRxSpkjCsJhEcbEFOPRxazAGAEjn+EhjOjFJaSiulyuz4xEn RIhlLJ1DMxOxJwyAxsYHdlkKukkRj1pf7XjPeoy/pVzSiCna172aVSnWQomPDEpcXpMwES 1no2adJBuyZRFVmHREUO+MkTyRJfbiFA6OeXEsHBlizMn06RWs5eoMMOHoekQr1pd8GoWd WraPe1lIgOMWwrVc0EsKx//pM6cZA4yni+cIzjBIgfZ6FoPt3U5hY+IUHbPsgBAdg3lZdu U3oZqKfj/F+JkdarF6a1MxHk9csRdh+BwtVs+JUeNBmdn2PNYkeZ2suqRuMMug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639585; a=rsa-sha256; cv=none; b=sjq5k/XPIZQW2ZOVdcLq4hJ+Wox/DxSm4xb/Me7pMI9fAUhVbC44gFDg+G3mmy6LFyxMWc GlRjEkG0BJ42vKfisHzVxRTSmFzF+HF2Jx6Ir6Dfjd+NORPz1GMI9x8wO/nkrEFIuO2uaE xa6FaPBRWibopM/9dqTAej8UKgPLEQl3/W0aHCHYRvOoofHFsoMUglXUheULkYYu33KjYT sqxkxCWubfgmVGJonorzepKkQuKerYdreUHsveWcq+/JYI1GjjpG7CeFnhKlbqgsJ7s0qd S+r7G4y+3prKTC+r0aZA/k50Aqiqwm3qiIHnJBGGH1RQ9LnUU7UgUGUyUXntCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FPvoWPEBs0+6ZVd3jCTDNZPZUA0ef4o65F82wTsjcbU=; b=XG+9inJlA4XovdgsyJwoEljVAK8EeyYfdxSrUBp78v+A2wH+xgPmdeYlvh6Hf3ZXjic4q8 wo7tEhXgAFNFBu334a4oVfclBqZk9pc6dzB5Ifh7IlVq6qSHdCkoY5yBntOGWYJTfUn+gX rUdIb5mov9Zx4FAS8+gkPx4OnzjrAxIGJeh8rH+8d+yZIBs/sSv/31aCJeDvqtVOyZquiR 6uUaqKOAXCzNw+71MEEqi/9ue+eD3gjk7mhAZJl9Rx0dnL2B4cczvPaieWf1sqm1aiX3S/ PQrrLKy4SKWp6ZIrzHCJeN8zBvAK6saOH2XhoEQS2u7QBxCmgjrI6T4Fz2scgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH534Rsz18xL; Wed, 18 Oct 2023 14:33: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 39IEX5Ha091748; Wed, 18 Oct 2023 14:33:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX5qd091745; Wed, 18 Oct 2023 14:33:05 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:05 GMT Message-Id: <202310181433.39IEX5qd091745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 83dcc494a7fa - stable/14 - iicbus: conf: Fix pcf8574 entry List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83dcc494a7fa20a0e5fa76c060422b47a02a1c99 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=83dcc494a7fa20a0e5fa76c060422b47a02a1c99 commit 83dcc494a7fa20a0e5fa76c060422b47a02a1c99 Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:39:26 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:12 +0000 iicbus: conf: Fix pcf8574 entry It lives in the gpio subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41912 (cherry picked from commit 918a10c9f792d2c2f78b75626f7bf2abc85a0fff) --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 87a82d61bd09..086143f3d93d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1820,7 +1820,6 @@ dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus -dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/rtc/ds1307.c optional ds1307 dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/rtc/ds1672.c optional ds1672 @@ -1831,6 +1830,7 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a +dev/iicbus/gpio/pcf8574.c optional pcf8574 dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt dev/iicbus/pmic/silergy/sy8106a.c optional sy8106a fdt From nobody Wed Oct 18 14:33:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH7489cz4x61s; Wed, 18 Oct 2023 14:33: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 4S9YH65wbKz3QRg; Wed, 18 Oct 2023 14:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1rAeRi/lo2JvYnXZCeQ6cSGTKeoV5U0DbuoqUaRjN8=; b=W7jdKLy1syuopdBHhvBD6JtdiuS9a0Ggo+pAGDwpuBoOe69eRDDJMqXmcpDBA5wugti0jf aLbPVxdrb0GEdciBrJ3xP1nU3gDFfQzsRUPhL0IEUOwwA7AQlLer4dROxoqdsY5n+fNkKW mta5pOM0RI3k/kqg8Wwcjz/4yauNeDk+mpstQtT9tvgRTZpOCbVuqwiiPWenmNBLVs4r0n 01W+cJ9ENDB/DKkKufxJ7+SrqM18IGsF+kVg4TvGWYeW42WVXpit/rwu/DYqF5WlX9bBpw RRjf4tH2LOrWeqrbkAuXkmXoQKl9Vk6MvlUskGNq3eSexHp6EOwbE4SIKlrG/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639586; a=rsa-sha256; cv=none; b=tT/CuDASL91wXYXAn45lzjiCtcxSpHWmCTnAs30XW/IFz3qBUDFpP/vlM6liTLreqNgHFE kO+AwwztCQXEgK6PwIikv1lE6NJTrsIf93bWEnArZ/mXQtIU7H4JTqDoRovE/9U74Hs6MN V219ynh66vO1lfqoGw6mh6wValxitSY9rKfnenf6bPd5YO79AvJDzE2ibYv/tOaT+74xB2 1cEmIFr4tN+PB/naToSW5Z0MWHTuRNxnDAHPAzyF41VHYzs3p7e4Yb3dE7FfYqA2Q+mthl /++oUxemVJ/y1D+iYAwvFXTiU/8PuCEKdr2SK1FTBq/4GKh27JjgjeIjWg+oQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1rAeRi/lo2JvYnXZCeQ6cSGTKeoV5U0DbuoqUaRjN8=; b=I6EXJ9+2rLJyPgaHU1B6TREBubY2Qu/03Zz/NX2QsxuwBmCXJAxDZVMnLlbBNH3uK4TPfk FNTngOahFZsWCyFMlF0SSvg0kqXzWVJgGVBjayBGzP4jos0+lWOMgkfTzLfYAAZNiuHccu HgsRt7b7TjngGQhBNkUr/COlosr2h7CyFPNdpV0KLXi/YiIOSkTWKy8pOGknrl74e8p7wJ X3Kt+hkWkKJQFB+iV8Wk70k6/Nno43M9FKN9alr6jrjMi+5l3s//tUQzKjhdYp2w/MNRND 1MVahTVkFnUe7E9wiBLKJCXfexjs8PXMab6IRnjlC/MD8NS8iq20O6zHt202HA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH646p3z19GL; Wed, 18 Oct 2023 14:33: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 39IEX6ol091803; Wed, 18 Oct 2023 14:33:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX6bi091800; Wed, 18 Oct 2023 14:33:06 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:06 GMT Message-Id: <202310181433.39IEX6bi091800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 96edbfe36b05 - stable/14 - iicbus: Move i2c sensors drivers into new sensor subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 96edbfe36b0534c94998f0ae0decf01bbc6bd756 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=96edbfe36b0534c94998f0ae0decf01bbc6bd756 commit 96edbfe36b0534c94998f0ae0decf01bbc6bd756 Author: Emmanuel Vadot AuthorDate: 2023-09-19 09:51:40 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:14 +0000 iicbus: Move i2c sensors drivers into new sensor subdirectory No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41913 (cherry picked from commit 7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074) --- sys/conf/files | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/dev/iicbus/{ => sensor}/ds1631.c | 0 sys/dev/iicbus/{ => sensor}/ds1775.c | 0 sys/dev/iicbus/{ => sensor}/htu21.c | 0 sys/dev/iicbus/{ => sensor}/lm75.c | 0 sys/dev/iicbus/{ => sensor}/max44009.c | 0 sys/dev/iicbus/{ => sensor}/max6690.c | 0 sys/dev/iicbus/{ => sensor}/tmp461.c | 0 sys/modules/i2c/htu21/Makefile | 2 +- sys/modules/i2c/max44009/Makefile | 2 +- sys/modules/i2c/tmp461/Makefile | 2 +- 12 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 086143f3d93d..44646cb8f6bf 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1792,7 +1792,6 @@ dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi -dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic @@ -1808,8 +1807,6 @@ dev/iicbus/iicsmb.c optional iicsmb \ dev/iicbus/iicoc.c optional iicoc dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci -dev/iicbus/lm75.c optional lm75 -dev/iicbus/max44009.c optional max44009 dev/iicbus/adc/ad7418.c optional ad7418 dev/iicbus/adc/ads111x.c optional ads111x dev/iicbus/adc/pcf8591.c optional pcf8591 @@ -1830,6 +1827,9 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a +dev/iicbus/sensor/htu21.c optional htu21 +dev/iicbus/sensor/lm75.c optional lm75 +dev/iicbus/sensor/max44009.c optional max44009 dev/iicbus/gpio/pcf8574.c optional pcf8574 dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 76a0f4d707f3..0293efd28fbe 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -40,14 +40,14 @@ dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc -dev/iicbus/ds1631.c optional ds1631 powermac -dev/iicbus/ds1775.c optional ds1775 powermac -dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/adc/ad7417.c optional ad7417 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac dev/iicbus/pwm/adt746x.c optional adt746x powermac +dev/iicbus/sensor/ds1631.c optional ds1631 powermac +dev/iicbus/sensor/ds1775.c optional ds1775 powermac +dev/iicbus/sensor/max6690.c optional max6690 powermac dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_opal.c optional powernv ipmi dev/ice/if_ice_iflib.c optional ice pci powerpc64 | ice pci powerpc64le \ diff --git a/sys/dev/iicbus/ds1631.c b/sys/dev/iicbus/sensor/ds1631.c similarity index 100% rename from sys/dev/iicbus/ds1631.c rename to sys/dev/iicbus/sensor/ds1631.c diff --git a/sys/dev/iicbus/ds1775.c b/sys/dev/iicbus/sensor/ds1775.c similarity index 100% rename from sys/dev/iicbus/ds1775.c rename to sys/dev/iicbus/sensor/ds1775.c diff --git a/sys/dev/iicbus/htu21.c b/sys/dev/iicbus/sensor/htu21.c similarity index 100% rename from sys/dev/iicbus/htu21.c rename to sys/dev/iicbus/sensor/htu21.c diff --git a/sys/dev/iicbus/lm75.c b/sys/dev/iicbus/sensor/lm75.c similarity index 100% rename from sys/dev/iicbus/lm75.c rename to sys/dev/iicbus/sensor/lm75.c diff --git a/sys/dev/iicbus/max44009.c b/sys/dev/iicbus/sensor/max44009.c similarity index 100% rename from sys/dev/iicbus/max44009.c rename to sys/dev/iicbus/sensor/max44009.c diff --git a/sys/dev/iicbus/max6690.c b/sys/dev/iicbus/sensor/max6690.c similarity index 100% rename from sys/dev/iicbus/max6690.c rename to sys/dev/iicbus/sensor/max6690.c diff --git a/sys/dev/iicbus/tmp461.c b/sys/dev/iicbus/sensor/tmp461.c similarity index 100% rename from sys/dev/iicbus/tmp461.c rename to sys/dev/iicbus/sensor/tmp461.c diff --git a/sys/modules/i2c/htu21/Makefile b/sys/modules/i2c/htu21/Makefile index a7108d62fd0b..e049139c20cf 100644 --- a/sys/modules/i2c/htu21/Makefile +++ b/sys/modules/i2c/htu21/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= htu21 SRCS= htu21.c diff --git a/sys/modules/i2c/max44009/Makefile b/sys/modules/i2c/max44009/Makefile index 42c96bbbf883..c4342b5819aa 100644 --- a/sys/modules/i2c/max44009/Makefile +++ b/sys/modules/i2c/max44009/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= max44009 SRCS= max44009.c diff --git a/sys/modules/i2c/tmp461/Makefile b/sys/modules/i2c/tmp461/Makefile index 4cd5be59fd18..9c4d6518d596 100644 --- a/sys/modules/i2c/tmp461/Makefile +++ b/sys/modules/i2c/tmp461/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD = tmp461 SRCS = tmp461.c bus_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h From nobody Wed Oct 18 14:33:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH83vxHz4x6Ns; Wed, 18 Oct 2023 14:33: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 4S9YH761x8z3Qcx; Wed, 18 Oct 2023 14:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8ZqiJ6vjaW6qH6ynI+9EvYunou8TdF+cpVvsHeOSRY=; b=x2+mlXzyAxflkqgJj1kImS4F/mYpsmsBFtPYINp0BKIhAUpsNjM602JSB+d/8fvnR0TwkK Zv+2ftEzLdBscbS53yjUugnGU+R5RS+8X4IbI3C+Lz6eOBGQYk2hympjB9jgqCOD5Dy2CG u0t/tsd69dOUxlbF6Enk8kytnVxKUITsgJKNY3xtPw9fcII4SFYWLoGyR5HL/ImbCrJveY vrIEXdEynLg81txz9ZxfizBdvSwZd8JzOdnqwh7oLJK/h6z4nrHhRa8jCfjSDlCCuaoeL/ BDA1GJNrgd00a5H6S6gm0HdQHw41KZ29QHYkHkZxBawyGlJn3+bV1QUaY2dkPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639587; a=rsa-sha256; cv=none; b=Io9ZdMMC6H2Xa/UbMuxvv2sRUTePsW/i5i6vi2KBJ+MF99rr//1sIhd0rwD3XCHa3A7TFn KJdS0xzO1yQEL14sKKkF4GGJfQjyJiWDMR7UUZ6a7BzW0379v82MHzZgp9lnQMyzILLCNR z4KL6mKd847om7zp0Ko0VppNrshXcJoj7XxKETfWBfDI9z1aeo7OscbsjBsoQY652Q4dDm L0wcdz48pUDVC8LyrFYr6uCaXiHofmekf/f49Hcc4aLLrEsxrfqwB8/X455le4RLgCj6gi 5swABFcJp8pVZ5hk8Vs6NRyJ0FtNxkJncSYAFYwBv+zSK0+HluIjmzlANt2tLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q8ZqiJ6vjaW6qH6ynI+9EvYunou8TdF+cpVvsHeOSRY=; b=iT0J72FEonaIhjOyAggQ3NOuy9O/dUIWIjqOtCd0Q2ZEVSih+4Wn7GS5SUe5nkn8jf9uSA W7+5p8FUmwaL0dhoju60V7a+7WxsbW9/WVuKb70tflZUloOeKi2usLi9NdlP7WVsKSN+JE saNRnAw1Gt0udETl/F5YIptuYoyPwbrZ79kzFingJVwlmAa3s1VinrdZ57bpSaFQ1fFvJr 9EkfdAqfDAkflv+i/8mPdiWzv2Hhl9ilPfEMMeYGLhw6OO9LbtMCIbXmyS892dIiVBP6FI y86sKubqDaf6GjXw9Tp0am4LPDnljlrEiJb4vrbj0qO5khXr2aof2kjCf+QZtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH757k6z18rr; Wed, 18 Oct 2023 14:33: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 39IEX7Fk091857; Wed, 18 Oct 2023 14:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX7Pf091854; Wed, 18 Oct 2023 14:33:07 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:07 GMT Message-Id: <202310181433.39IEX7Pf091854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: c1335891057c - stable/14 - iicbus: Move opencores i2c driver into controller subdirectory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c1335891057c90000ab185c1c1fbd893a809fa8b Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c1335891057c90000ab185c1c1fbd893a809fa8b commit c1335891057c90000ab185c1c1fbd893a809fa8b Author: Emmanuel Vadot AuthorDate: 2023-09-19 10:06:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:15 +0000 iicbus: Move opencores i2c driver into controller subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41914 (cherry picked from commit 125f5c5b48b1fdccf364b821ce48bfdbd9687ed1) --- sys/conf/files | 6 +++--- sys/dev/iicbus/{ => controller/opencores}/iicoc.c | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc.h | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc_fdt.c | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc_pci.c | 0 sys/modules/i2c/controllers/iicoc/Makefile | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 44646cb8f6bf..f113794ab68a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1804,12 +1804,12 @@ dev/iicbus/iichid.c optional iichid acpi hid iicbus dev/iicbus/iiconf.c optional iicbus | compat_linuxkpi dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" -dev/iicbus/iicoc.c optional iicoc -dev/iicbus/iicoc_fdt.c optional iicoc fdt -dev/iicbus/iicoc_pci.c optional iicoc pci dev/iicbus/adc/ad7418.c optional ad7418 dev/iicbus/adc/ads111x.c optional ads111x dev/iicbus/adc/pcf8591.c optional pcf8591 +dev/iicbus/controller/opencores/iicoc.c optional iicoc +dev/iicbus/controller/opencores/iicoc_fdt.c optional iicoc fdt +dev/iicbus/controller/opencores/iicoc_pci.c optional iicoc pci dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt diff --git a/sys/dev/iicbus/iicoc.c b/sys/dev/iicbus/controller/opencores/iicoc.c similarity index 100% rename from sys/dev/iicbus/iicoc.c rename to sys/dev/iicbus/controller/opencores/iicoc.c diff --git a/sys/dev/iicbus/iicoc.h b/sys/dev/iicbus/controller/opencores/iicoc.h similarity index 100% rename from sys/dev/iicbus/iicoc.h rename to sys/dev/iicbus/controller/opencores/iicoc.h diff --git a/sys/dev/iicbus/iicoc_fdt.c b/sys/dev/iicbus/controller/opencores/iicoc_fdt.c similarity index 100% rename from sys/dev/iicbus/iicoc_fdt.c rename to sys/dev/iicbus/controller/opencores/iicoc_fdt.c diff --git a/sys/dev/iicbus/iicoc_pci.c b/sys/dev/iicbus/controller/opencores/iicoc_pci.c similarity index 100% rename from sys/dev/iicbus/iicoc_pci.c rename to sys/dev/iicbus/controller/opencores/iicoc_pci.c diff --git a/sys/modules/i2c/controllers/iicoc/Makefile b/sys/modules/i2c/controllers/iicoc/Makefile index f6902f1f864a..f86a6513ad22 100644 --- a/sys/modules/i2c/controllers/iicoc/Makefile +++ b/sys/modules/i2c/controllers/iicoc/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/controller/opencores KMOD = iicoc SRCS = device_if.h bus_if.h iicbus_if.h \ From nobody Wed Oct 18 14:33:08 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YH92ld7z4x6Lf; Wed, 18 Oct 2023 14:33: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 4S9YH86pJcz3QRt; Wed, 18 Oct 2023 14:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nunIye2v7kiQehDi45DAS0BQQEPDQhgj2SlaKCRgvMo=; b=PAsdNZPisY6bKFoelccCdqEgahC00M1ezahBBItw/kJUu0J9FfRN5QgO/1vgKtg8G4UEnf NaszqZc4jDG+Q4GUIbMjvNbhfkdRj7TWkBKlTI5egkbKK5xb7LY1jij/5yBwQKcUXlw6q8 0/BJqDAIrGvvuBL0WKMF2qBUIuffsTtgvSOEHwFtUoiU2FACr89VrwFuXG09wn0WU3PgcX IchNrcWuYem1FQo4wO++mJF5HzLwEKh4h2upoNQcdFtuWayhq2B4WBbbt3wKvDCoqaXyaP ScNo0sOvlGP80CwR+/ZMtjvt83/1ZK6UgTpeHhTtowQM6Kdx4Nqvp6NnnBJcJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639588; a=rsa-sha256; cv=none; b=g8P4UHIKYgdeAlwxwKw1wv8Ut2maTxQ9+xiKaCHLZdH6lMe0dxwrOLq1SZemWB/uMwXTgy 4PpFnvLjEH5Jns5bFTyQxyv2IhezRVAU8vhodIrBus6gYZcdkRN2mA/z7Ph67xSEo3wH72 cb/8g9JY1Wg0TYIWZMjRDrIL8+ME6bWWLpCG2lhbXftK+yD5YrPH+O6eluJIGDHeZUn9jk QVFEWg0URcVUzR5qxFDoHfuiOhiJm2YbKQ9xqgsJelDK6zGn0jewoUJy0/ygrOAOh51wpA LrdmJNgb/9X8iokcQVQIsFaSu0xt/vMN+v6mgdLRrQ+CjL1LA1a94spjSJp/lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nunIye2v7kiQehDi45DAS0BQQEPDQhgj2SlaKCRgvMo=; b=W/9jrmsjEUmiHlyOphym56HwKzYisr/bflpYD37WQb5Ruyy9AUqGEoD8a057MpksH3ito8 +R64Y6C1SDvUvTT1haZiBdkdUwMa7cMbjC78idIxUV55O9k47nqXdpgNa7Kvz9d5Q5QJWv 4Y8TR45CMvTHTzq1fv36bQR4fqU1WEjYVsA/R8S7iBD5GLtDtEgn3s8YA21hn03sEdOluJ VPqrFQGi1bxAVG+z8IS9tz7H0JtQOIhFPrNH4PaNp7MkG+HiuhmMcT3sonotUpVqxkFAK7 qITBudxMYYJixFL2eZd15BUqDpEc6Uy0HI05oa/Xah7YXkhlpOLIKpEw3K9P2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH85rmzz19GM; Wed, 18 Oct 2023 14:33: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 39IEX8gG091909; Wed, 18 Oct 2023 14:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX8rw091906; Wed, 18 Oct 2023 14:33:08 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:08 GMT Message-Id: <202310181433.39IEX8rw091906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 7b824791e7a3 - stable/14 - i2c: Add cadence iic driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7b824791e7a3008aeab39186610da41d28fd8eaf Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7b824791e7a3008aeab39186610da41d28fd8eaf commit 7b824791e7a3008aeab39186610da41d28fd8eaf Author: Emmanuel Vadot AuthorDate: 2023-09-27 05:34:38 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:17 +0000 i2c: Add cadence iic driver This IP is found in Xilinx SoC, it only been tested on ZynqMP (arm64) so only enable it there for now. Differential Revision: https://reviews.freebsd.org/D41994 (cherry picked from commit 137b58e4d2044adc200d13c8989d3746a0a4bd7f) --- sys/arm64/conf/std.xilinx | 3 + sys/conf/files.arm64 | 1 + sys/dev/iicbus/controller/cadence/cdnc_i2c.c | 707 +++++++++++++++++++++++++++ 3 files changed, 711 insertions(+) diff --git a/sys/arm64/conf/std.xilinx b/sys/arm64/conf/std.xilinx index cc89e8575336..50ebf5ade53b 100644 --- a/sys/arm64/conf/std.xilinx +++ b/sys/arm64/conf/std.xilinx @@ -16,4 +16,7 @@ device cgem # Cadence GEM Gigabit Ethernet device # MMC/SD/SDIO Card slot support device sdhci +# IICBUS +device cdnc_i2c + options FDT diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index d8adc54763fc..baf8734fb38f 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -696,6 +696,7 @@ arm64/rockchip/clk/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 # Xilinx arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq fdt arm/xilinx/zy7_gpio.c optional gpio soc_xilinx_zynq fdt +dev/iicbus/controller/cadence/cdnc_i2c.c optional cdnc_i2c iicbus soc_xilinx_zynq fdt dev/usb/controller/xlnx_dwc3.c optional xhci soc_xilinx_zynq fdt dev/firmware/xilinx/zynqmp_firmware.c optional fdt soc_xilinx_zynq dev/firmware/xilinx/zynqmp_firmware_if.m optional fdt soc_xilinx_zynq diff --git a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c new file mode 100644 index 000000000000..dd525071caa2 --- /dev/null +++ b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c @@ -0,0 +1,707 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019-2020 Thomas Skibo + * + * 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. + */ + +/* Cadence / Zynq i2c driver. + * + * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual. + * (v1.12.2) July 1, 2018. Xilinx doc UG585. I2C Controller is documented + * in Chapter 20. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "iicbus_if.h" + +#ifdef I2CDEBUG +#define DPRINTF(...) do { printf(__VA_ARGS__); } while (0) +#else +#define DPRINTF(...) do { } while (0) +#endif + +#if 0 +#define HWTYPE_CDNS_R1P10 1 +#endif +#define HWTYPE_CDNS_R1P14 2 + +static struct ofw_compat_data compat_data[] = { +#if 0 + {"cdns,i2c-r1p10", HWTYPE_CDNS_R1P10}, +#endif + {"cdns,i2c-r1p14", HWTYPE_CDNS_R1P14}, + {NULL, 0} +}; + +struct cdnc_i2c_softc { + device_t dev; + device_t iicbus; + struct mtx sc_mtx; + struct resource *mem_res; + struct resource *irq_res; + void *intrhandle; + + uint16_t cfg_reg_shadow; + uint16_t istat; + clk_t ref_clk; + uint32_t ref_clock_freq; + uint32_t i2c_clock_freq; + + int hwtype; + int hold; + + /* sysctls */ + unsigned int i2c_clk_real_freq; + unsigned int interrupts; + unsigned int timeout_ints; +}; + +#define I2C_SC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define I2C_SC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define I2C_SC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), NULL, MTX_DEF) +#define I2C_SC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define I2C_SC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) + +#define RD2(sc, off) (bus_read_2((sc)->mem_res, (off))) +#define WR2(sc, off, val) (bus_write_2((sc)->mem_res, (off), (val))) +#define RD1(sc, off) (bus_read_1((sc)->mem_res, (off))) +#define WR1(sc, off, val) (bus_write_1((sc)->mem_res, (off), (val))) + +/* Cadence I2C controller device registers. */ +#define CDNC_I2C_CR 0x0000 /* Config register. */ +#define CDNC_I2C_CR_DIV_A_MASK (3 << 14) +#define CDNC_I2C_CR_DIV_A_SHIFT 14 +#define CDNC_I2C_CR_DIV_A(a) ((a) << 14) +#define CDNC_I2C_CR_DIV_A_MAX 3 +#define CDNC_I2C_CR_DIV_B_MASK (0x3f << 8) +#define CDNC_I2C_CR_DIV_B_SHIFT 8 +#define CDNC_I2C_CR_DIV_B(b) ((b) << 8) +#define CDNC_I2C_CR_DIV_B_MAX 63 +#define CDNC_I2C_CR_CLR_FIFO (1 << 6) +#define CDNC_I2C_CR_SLVMON_MODE (1 << 5) +#define CDNC_I2C_CR_HOLD (1 << 4) +#define CDNC_I2C_CR_ACKEN (1 << 3) +#define CDNC_I2C_CR_NEA (1 << 2) +#define CDNC_I2C_CR_MAST (1 << 1) +#define CDNC_I2C_CR_RNW (1 << 0) + +#define CDNC_I2C_SR 0x0004 /* Status register. */ +#define CDNC_I2C_SR_BUS_ACTIVE (1 << 8) +#define CDNC_I2C_SR_RX_OVF (1 << 7) +#define CDNC_I2C_SR_TX_VALID (1 << 6) +#define CDNC_I2C_SR_RX_VALID (1 << 5) +#define CDNC_I2C_SR_RXRW (1 << 3) + +#define CDNC_I2C_ADDR 0x0008 /* i2c address register. */ +#define CDNC_I2C_DATA 0x000C /* i2c data register. */ + +#define CDNC_I2C_ISR 0x0010 /* Int status register. */ +#define CDNC_I2C_ISR_ARB_LOST (1 << 9) +#define CDNC_I2C_ISR_RX_UNDF (1 << 7) +#define CDNC_I2C_ISR_TX_OVF (1 << 6) +#define CDNC_I2C_ISR_RX_OVF (1 << 5) +#define CDNC_I2C_ISR_SLV_RDY (1 << 4) +#define CDNC_I2C_ISR_XFER_TMOUT (1 << 3) +#define CDNC_I2C_ISR_XFER_NACK (1 << 2) +#define CDNC_I2C_ISR_XFER_DATA (1 << 1) +#define CDNC_I2C_ISR_XFER_DONE (1 << 0) +#define CDNC_I2C_ISR_ALL 0x2ff +#define CDNC_I2C_TRANS_SIZE 0x0014 /* Transfer size. */ +#define CDNC_I2C_PAUSE 0x0018 /* Slv Monitor Pause reg. */ +#define CDNC_I2C_TIME_OUT 0x001C /* Time-out register. */ +#define CDNC_I2C_TIME_OUT_MIN 31 +#define CDNC_I2C_TIME_OUT_MAX 255 +#define CDNC_I2C_IMR 0x0020 /* Int mask register. */ +#define CDNC_I2C_IER 0x0024 /* Int enable register. */ +#define CDNC_I2C_IDR 0x0028 /* Int disable register. */ + +#define CDNC_I2C_FIFO_SIZE 16 +#define CDNC_I2C_DEFAULT_I2C_CLOCK 400000 /* 400Khz default */ + +#define CDNC_I2C_ISR_ERRS (CDNC_I2C_ISR_ARB_LOST | CDNC_I2C_ISR_RX_UNDF | \ + CDNC_I2C_ISR_TX_OVF | CDNC_I2C_ISR_RX_OVF | CDNC_I2C_ISR_XFER_TMOUT | \ + CDNC_I2C_ISR_XFER_NACK) + +/* Configure clock dividers. */ +static int +cdnc_i2c_set_freq(struct cdnc_i2c_softc *sc) +{ + uint32_t div_a, div_b, err, clk_out; + uint32_t best_div_a, best_div_b, best_err; + + best_div_a = 0; + best_div_b = 0; + best_err = ~0U; + + /* + * The i2c controller has a two-stage clock divider to create + * the "clock enable" signal used to sample the incoming SCL and + * SDA signals. The Clock Enable signal is divided by 22 to create + * the outgoing SCL signal. + * + * Try all div_a values and pick best match. + */ + for (div_a = 0; div_a <= CDNC_I2C_CR_DIV_A_MAX; div_a++) { + div_b = sc->ref_clock_freq / (22 * sc->i2c_clock_freq * + (div_a + 1)); + if (div_b > CDNC_I2C_CR_DIV_B_MAX) + continue; + clk_out = sc->ref_clock_freq / (22 * (div_a + 1) * + (div_b + 1)); + err = clk_out > sc->i2c_clock_freq ? + clk_out - sc->i2c_clock_freq : + sc->i2c_clock_freq - clk_out; + if (err < best_err) { + best_err = err; + best_div_a = div_a; + best_div_b = div_b; + } + } + + if (best_err == ~0U) { + device_printf(sc->dev, "cannot configure clock divider.\n"); + return (EINVAL); /* out of range */ + } + + clk_out = sc->ref_clock_freq / (22 * (best_div_a + 1) * + (best_div_b + 1)); + + DPRINTF("%s: ref_clock_freq=%d i2c_clock_freq=%d\n", __func__, + sc->ref_clock_freq, sc->i2c_clock_freq); + DPRINTF("%s: div_a=%d div_b=%d real-freq=%d\n", __func__, best_div_a, + best_div_b, clk_out); + + sc->cfg_reg_shadow &= ~(CDNC_I2C_CR_DIV_A_MASK | + CDNC_I2C_CR_DIV_B_MASK); + sc->cfg_reg_shadow |= CDNC_I2C_CR_DIV_A(best_div_a) | + CDNC_I2C_CR_DIV_B(best_div_b); + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + + sc->i2c_clk_real_freq = clk_out; + + return (0); +} + +/* Initialize hardware. */ +static int +cdnc_i2c_init_hw(struct cdnc_i2c_softc *sc) +{ + + /* Reset config register and clear FIFO. */ + sc->cfg_reg_shadow = 0; + WR2(sc, CDNC_I2C_CR, CDNC_I2C_CR_CLR_FIFO); + sc->hold = 0; + + /* Clear and disable all interrupts. */ + WR2(sc, CDNC_I2C_ISR, CDNC_I2C_ISR_ALL); + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_ALL); + + /* Max out bogus time-out register. */ + WR1(sc, CDNC_I2C_TIME_OUT, CDNC_I2C_TIME_OUT_MAX); + + /* Set up clock dividers. */ + return (cdnc_i2c_set_freq(sc)); +} + +static int +cdnc_i2c_errs(struct cdnc_i2c_softc *sc, uint16_t istat) +{ + + DPRINTF("%s: istat=0x%x\n", __func__, istat); + + /* XXX: clean up after errors. */ + + /* Reset config register and clear FIFO. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 0; + + if (istat & CDNC_I2C_ISR_XFER_TMOUT) + return (IIC_ETIMEOUT); + else if (istat & CDNC_I2C_ISR_RX_UNDF) + return (IIC_EUNDERFLOW); + else if (istat & (CDNC_I2C_ISR_RX_OVF | CDNC_I2C_ISR_TX_OVF)) + return (IIC_EOVERFLOW); + else if (istat & CDNC_I2C_ISR_XFER_NACK) + return (IIC_ENOACK); + else if (istat & CDNC_I2C_ISR_ARB_LOST) + return (IIC_EBUSERR); /* XXX: ???? */ + else + /* Should not happen */ + return (IIC_NOERR); +} + +static int +cdnc_i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + int error; + + DPRINTF("%s: speed=%d addr=0x%x\n", __func__, speed, addr); + + I2C_SC_LOCK(sc); + + sc->i2c_clock_freq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); + + error = cdnc_i2c_init_hw(sc); + + I2C_SC_UNLOCK(sc); + + return (error ? IIC_ENOTSUPP : IIC_NOERR); +} + +static void +cdnc_i2c_intr(void *arg) +{ + struct cdnc_i2c_softc *sc = (struct cdnc_i2c_softc *)arg; + uint16_t status; + + I2C_SC_LOCK(sc); + + sc->interrupts++; + + /* Read active interrupts. */ + status = RD2(sc, CDNC_I2C_ISR) & ~RD2(sc, CDNC_I2C_IMR); + + /* Clear interrupts. */ + WR2(sc, CDNC_I2C_ISR, status); + + if (status & CDNC_I2C_ISR_XFER_TMOUT) + sc->timeout_ints++; + + sc->istat |= status; + + if (status) + wakeup(sc); + + I2C_SC_UNLOCK(sc); +} + +static int +cdnc_i2c_xfer_rd(struct cdnc_i2c_softc *sc, struct iic_msg *msg) +{ + int error = IIC_NOERR; + uint16_t flags = msg->flags; + uint16_t len = msg->len; + int idx = 0, nbytes, last, first = 1; + uint16_t statr; + + DPRINTF("%s: flags=0x%x len=%d\n", __func__, flags, len); + +#if 0 + if (sc->hwtype == HWTYPE_CDNS_R1P10 && (flags & IIC_M_NOSTOP)) + return (IIC_ENOTSUPP); +#endif + + I2C_SC_ASSERT_LOCKED(sc); + + /* Program config register. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + sc->cfg_reg_shadow |= CDNC_I2C_CR_HOLD | CDNC_I2C_CR_ACKEN | + CDNC_I2C_CR_NEA | CDNC_I2C_CR_MAST | CDNC_I2C_CR_RNW; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 1; + + while (len > 0) { + nbytes = MIN(CDNC_I2C_FIFO_SIZE - 2, len); + WR1(sc, CDNC_I2C_TRANS_SIZE, nbytes); + + last = nbytes == len && !(flags & IIC_M_NOSTOP); + if (last) { + /* Clear HOLD bit on last transfer. */ + sc->cfg_reg_shadow &= ~CDNC_I2C_CR_HOLD; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + sc->hold = 0; + } + + /* Writing slv address for a start or repeated start. */ + if (first && !(flags & IIC_M_NOSTART)) + WR2(sc, CDNC_I2C_ADDR, msg->slave >> 1); + first = 0; + + /* Enable FIFO interrupts and wait. */ + if (last) + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + else + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DATA | + CDNC_I2C_ISR_ERRS); + + error = mtx_sleep(sc, &sc->sc_mtx, 0, "cdi2c", hz); + + /* Disable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_XFER_DATA | + CDNC_I2C_ISR_XFER_DONE | CDNC_I2C_ISR_ERRS); + + if (error == EWOULDBLOCK) + error = cdnc_i2c_errs(sc, CDNC_I2C_ISR_XFER_TMOUT); + else if (sc->istat & CDNC_I2C_ISR_ERRS) + error = cdnc_i2c_errs(sc, sc->istat); + sc->istat = 0; + + if (error != IIC_NOERR) + break; + + /* Read nbytes from FIFO. */ + while (nbytes-- > 0) { + statr = RD2(sc, CDNC_I2C_SR); + if (!(statr & CDNC_I2C_SR_RX_VALID)) { + printf("%s: RX FIFO underflow?\n", __func__); + break; + } + msg->buf[idx++] = RD2(sc, CDNC_I2C_DATA); + len--; + } + } + + return (error); +} + +static int +cdnc_i2c_xfer_wr(struct cdnc_i2c_softc *sc, struct iic_msg *msg) +{ + int error = IIC_NOERR; + uint16_t flags = msg->flags; + uint16_t len = msg->len; + int idx = 0, nbytes, last, first = 1; + + DPRINTF("%s: flags=0x%x len=%d\n", __func__, flags, len); + + I2C_SC_ASSERT_LOCKED(sc); + + /* Program config register. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + sc->cfg_reg_shadow |= CDNC_I2C_CR_HOLD | CDNC_I2C_CR_ACKEN | + CDNC_I2C_CR_NEA | CDNC_I2C_CR_MAST; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 1; + + while (len > 0) { + /* Put as much data into fifo as you can. */ + nbytes = MIN(len, CDNC_I2C_FIFO_SIZE - + RD1(sc, CDNC_I2C_TRANS_SIZE) - 1); + len -= nbytes; + while (nbytes-- > 0) + WR2(sc, CDNC_I2C_DATA, msg->buf[idx++]); + + last = len == 0 && !(flags & IIC_M_NOSTOP); + if (last) { + /* Clear HOLD bit on last transfer. */ + sc->cfg_reg_shadow &= ~CDNC_I2C_CR_HOLD; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + sc->hold = 0; + } + + /* Perform START if this is start or repeated start. */ + if (first && !(flags & IIC_M_NOSTART)) + WR2(sc, CDNC_I2C_ADDR, msg->slave >> 1); + first = 0; + + /* Enable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + + /* Wait for end of data transfer. */ + error = mtx_sleep(sc, &sc->sc_mtx, 0, "cdi2c", hz); + + /* Disable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + + if (error == EWOULDBLOCK) + error = cdnc_i2c_errs(sc, CDNC_I2C_ISR_XFER_TMOUT); + else if (sc->istat & CDNC_I2C_ISR_ERRS) + error = cdnc_i2c_errs(sc, sc->istat); + sc->istat = 0; + if (error) + break; + } + + return (error); +} + +static int +cdnc_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + int i, error = IIC_NOERR; + + DPRINTF("%s: nmsgs=%d\n", __func__, nmsgs); + + I2C_SC_LOCK(sc); + + for (i = 0; i < nmsgs; i++) { + DPRINTF("%s: msg[%d]: hold=%d slv=0x%x flags=0x%x len=%d\n", + __func__, i, sc->hold, msgs[i].slave, msgs[i].flags, + msgs[i].len); + + if (!sc->hold && (msgs[i].flags & IIC_M_NOSTART)) + return (IIC_ENOTSUPP); + + if (msgs[i].flags & IIC_M_RD) { + error = cdnc_i2c_xfer_rd(sc, &msgs[i]); + if (error != IIC_NOERR) + break; + } else { + error = cdnc_i2c_xfer_wr(sc, &msgs[i]); + if (error != IIC_NOERR) + break; + } + } + + I2C_SC_UNLOCK(sc); + + return (error); +} + +static void +cdnc_i2c_add_sysctls(device_t dev) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child; + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "i2c_clk_real_freq", CTLFLAG_RD, + &sc->i2c_clk_real_freq, 0, "i2c clock real frequency"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_interrupts", CTLFLAG_RD, + &sc->interrupts, 0, "interrupt calls"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_timeouts", CTLFLAG_RD, + &sc->timeout_ints, 0, "hardware timeout interrupts"); +} + + +static int +cdnc_i2c_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Cadence I2C Controller"); + + return (BUS_PROBE_DEFAULT); +} + + +static int cdnc_i2c_detach(device_t); + +static int +cdnc_i2c_attach(device_t dev) +{ + struct cdnc_i2c_softc *sc; + int rid, err; + phandle_t node; + pcell_t cell; + uint64_t freq; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + + I2C_SC_LOCK_INIT(sc); + + /* Get ref-clock and i2c-clock properties. */ + node = ofw_bus_get_node(dev); + if (OF_getprop(node, "ref-clock", &cell, sizeof(cell)) > 0) + sc->ref_clock_freq = fdt32_to_cpu(cell); + else if (clk_get_by_ofw_index(dev, node, 0, &sc->ref_clk) == 0) { + if ((err = clk_enable(sc->ref_clk)) != 0) + device_printf(dev, "Cannot enable clock. err=%d\n", + err); + else if ((err = clk_get_freq(sc->ref_clk, &freq)) != 0) + device_printf(dev, + "Cannot get clock frequency. err=%d\n", err); + else + sc->ref_clock_freq = freq; + } + else { + device_printf(dev, "must have ref-clock property\n"); + return (ENXIO); + } + if (OF_getprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) + sc->i2c_clock_freq = fdt32_to_cpu(cell); + else + sc->i2c_clock_freq = CDNC_I2C_DEFAULT_I2C_CLOCK; + + /* Get memory resource. */ + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "could not allocate memory resources.\n"); + cdnc_i2c_detach(dev); + return (ENOMEM); + } + + /* Allocate IRQ. */ + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "could not allocate IRQ resource.\n"); + cdnc_i2c_detach(dev); + return (ENOMEM); + } + + /* Activate the interrupt. */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, cdnc_i2c_intr, sc, &sc->intrhandle); + if (err) { + device_printf(dev, "could not setup IRQ.\n"); + cdnc_i2c_detach(dev); + return (err); + } + + /* Configure the device. */ + err = cdnc_i2c_init_hw(sc); + if (err) { + cdnc_i2c_detach(dev); + return (err); + } + + sc->iicbus = device_add_child(dev, "iicbus", -1); + + cdnc_i2c_add_sysctls(dev); + + /* Probe and attach iicbus when interrupts work. */ + return (bus_delayed_attach_children(dev)); +} + +static int +cdnc_i2c_detach(device_t dev) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + + if (device_is_attached(dev)) + bus_generic_detach(dev); + + if (sc->ref_clk != NULL) { + clk_release(sc->ref_clk); + sc->ref_clk = NULL; + } + + /* Delete iic bus. */ + if (sc->iicbus) + device_delete_child(dev, sc->iicbus); + + /* Disable hardware. */ + if (sc->mem_res != NULL) { + sc->cfg_reg_shadow = 0; + WR2(sc, CDNC_I2C_CR, CDNC_I2C_CR_CLR_FIFO); + + /* Clear and disable all interrupts. */ + WR2(sc, CDNC_I2C_ISR, CDNC_I2C_ISR_ALL); + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_ALL); + } + + /* Teardown and release interrupt. */ + if (sc->irq_res != NULL) { + if (sc->intrhandle) + bus_teardown_intr(dev, sc->irq_res, sc->intrhandle); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->irq_res), sc->irq_res); + sc->irq_res = NULL; + } + + /* Release memory resource. */ + if (sc->mem_res != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + sc->mem_res = NULL; + } + + I2C_SC_LOCK_DESTROY(sc); + + return (0); +} + + +static phandle_t +cdnc_i2c_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + +static device_method_t cdnc_i2c_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, cdnc_i2c_probe), + DEVMETHOD(device_attach, cdnc_i2c_attach), + DEVMETHOD(device_detach, cdnc_i2c_detach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, cdnc_i2c_get_node), + + /* iicbus methods */ + DEVMETHOD(iicbus_callback, iicbus_null_callback), + DEVMETHOD(iicbus_reset, cdnc_i2c_reset), + DEVMETHOD(iicbus_transfer, cdnc_i2c_transfer), + + DEVMETHOD_END +}; + +static driver_t cdnc_i2c_driver = { + "cdnc_i2c", + cdnc_i2c_methods, + sizeof(struct cdnc_i2c_softc), +}; + +DRIVER_MODULE(cdnc_i2c, simplebus, cdnc_i2c_driver, NULL, NULL); +DRIVER_MODULE(ofw_iicbus, cdnc_i2c, ofw_iicbus_driver, NULL, NULL); +MODULE_DEPEND(cdnc_i2c, iicbus, 1, 1, 1); +MODULE_DEPEND(cdnc_i2c, ofw_iicbus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); From nobody Wed Oct 18 14:33:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YHB2PGrz4x6Lh; Wed, 18 Oct 2023 14:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YHB0Bsrz3Qgg; Wed, 18 Oct 2023 14:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4opqLC63kENw+BgmfYoIrdaVKH780KHNtfkbcd6uzO4=; b=WYmgB/fma9hgMnU92bENBelYXJGO1YYArZYr+/udiJOUAODo0egKe92bYhZwHsvE2ufFio 3GGd9yxYzzqX/wQ9/p0UkwW7P6MhsYLylGKNT2ejS31+e93DWemMuoW00YXNQ2Tk442dBO 3LfyGumE44YF1RnjhWbA+vJehf28z9mZ83u1yCaoBLS4Qul69/Vk/WXOniy6x9Qjy8u+hA m0nQrY9LMr1MKEG8VFBNObhb0yeSc+PBUK/OFrjO8BR3eB0KJgYTYgogDbWJD/Jbasq+ui X450wYIhgO4s1svoCUBiS2YRtX8aQICsP+mGCXPIhAPb3R3pkpE5eF1Qb+Pysg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639590; a=rsa-sha256; cv=none; b=YfB1IN8yd7qGCz23Hpu1S5s+dxiO4ZwJVeGeXFMUklYeWnzZdkSTWZzzdilD0olqqwLkUU KlRv2a4UUFSAmDlNa9S4j9yXLrsEpIQg9rUjQscl7MF1HxCiPtx4doZTkzkjbaVu9QSRj+ UK1uGSMOlrIjHfmerAjp/nU52xbHr3js5LHeF+PGFoQb9IUfSn/5OQiFHZ4WgueTNSM/VR /vCGyFxdHy0qbvTOLRkwRUEb7exbl/s/otOXyvPl9+NVM7+VWJNsDBJb7kc5E3C8iJx3bm aod9pIXvr3Fh7o+gmOJdLKN8YEQx6vaUnu4UeXp82KiOvYL7h8EuL/8IuO0fEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4opqLC63kENw+BgmfYoIrdaVKH780KHNtfkbcd6uzO4=; b=Q/7QkxtE41cz8iYw8kmRZLtjL6lYFFfNulMtsp2qLGNWe/HSGdEPb2O6OW7qdGxH+DZO3e iOFJ3EV3gfJ05fb6JihjnkSFoQEMxAPQJwy0DOqBZx/aSv8ZSA6UPqU6XB9JAb2eUOYE8N AiR24xuw4My7Mz7Q3XqFN4OtTy7OJX4MxEenxpZq1L89975iUrxgWkIDd6vVrq0ZzYex6O DZTlzM0yIJJ9Da69pT5TFfLQSoMjwIplvadT9UhKGlCFmnKkz6H0CwDbTdPLjFTpBNfPYL BLTRQxCdxXiYUW83zPkjoy2OzdZ+PB87BIiPE2iPOqNCzmy37KRgsSzG1a3Fjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YH96QZ2z18pD; Wed, 18 Oct 2023 14:33: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 39IEX9A5091956; Wed, 18 Oct 2023 14:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEX9MK091953; Wed, 18 Oct 2023 14:33:09 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:09 GMT Message-Id: <202310181433.39IEX9MK091953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: b4cd14485a8e - stable/14 - i2c: Add Microcrystal RV3032 RTC driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b4cd14485a8efaf98d497351e9b88ad0ccca8c97 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b4cd14485a8efaf98d497351e9b88ad0ccca8c97 commit b4cd14485a8efaf98d497351e9b88ad0ccca8c97 Author: Emmanuel Vadot AuthorDate: 2023-09-27 07:58:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:19 +0000 i2c: Add Microcrystal RV3032 RTC driver This is a simple RTC driver for the rv3032 from Microcrystal. Just the basic functionality is implemented (no timer, alarm etc ..). Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41995 (cherry picked from commit 1d6a6a524409662992ca96bc91ae69b2a2a5ff35) --- sys/conf/files | 1 + sys/dev/iicbus/rtc/rv3032.c | 455 ++++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 3 +- sys/modules/i2c/rv3032/Makefile | 13 ++ 4 files changed, 471 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index f113794ab68a..f2a31eb24f25 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1825,6 +1825,7 @@ dev/iicbus/rtc/isl12xx.c optional isl12xx dev/iicbus/rtc/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 +dev/iicbus/rtc/rv3032.c optional rv3032 iicbus fdt dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a dev/iicbus/sensor/htu21.c optional htu21 diff --git a/sys/dev/iicbus/rtc/rv3032.c b/sys/dev/iicbus/rtc/rv3032.c new file mode 100644 index 000000000000..67805dcb7939 --- /dev/null +++ b/sys/dev/iicbus/rtc/rv3032.c @@ -0,0 +1,455 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "clock_if.h" +#include "iicbus_if.h" + +/* Date registers */ +#define RV3032_SECS_100TH 0x00 +#define RV3032_SECS 0x01 +#define RV3032_MINS 0x02 +#define RV3032_HOURS 0x03 +#define RV3032_WEEKDAY 0x04 +#define RV3032_DATE 0x05 +#define RV3032_MONTH 0x06 +#define RV3032_YEAR 0x07 + +/* Alarm registers */ +#define RV3032_ALARM_MINUTES 0x08 +#define RV3032_ALARM_HOURS 0x09 +#define RV3032_ALARM_DATE 0x0A + +/* Periodic countdown timer registers */ +#define RV3032_TIMER_VALUE0 0x0B +#define RV3032_TIMER_VALUE1 0x0C + +/* Status register */ +#define RV3032_STATUS 0x0D +#define RV3032_STATUS_VLF (1 << 0) /* Voltage Low Flag */ +#define RV3032_STATUS_PORF (1 << 1) /* Power On Reset Flag */ +#define RV3032_STATUS_EVF (1 << 2) /* External eVent Flag */ +#define RV3032_STATUS_AF (1 << 3) /* Alarm Flag */ +#define RV3032_STATUS_TF (1 << 4) /* periodic countdown Timer Flag */ +#define RV3032_STATUS_UF (1 << 5) /* periodic time Update Flag */ +#define RV3032_STATUS_TLF (1 << 6) /* Temperature Low Flag */ +#define RV3032_STATUS_THF (1 << 7) /* Temperature High Flag */ + +/* Temperature registers */ +#define RV3032_TEMP_LSB 0x0E +#define RV3032_TEMP_LSB_BSF (1 << 0) +#define RV3032_TEMP_LSB_CLKF (1 << 1) +#define RV3032_TEMP_LSB_EEBUSY (1 << 2) +#define RV3032_TEMP_LSB_EEF (1 << 3) +#define RV3032_TEMP_LSB_MASK (0xF0) +#define RV3032_TEMP_LSB_SHIFT 4 + +#define RV3032_TEMP_MSB 0x0F + +#define TEMP_DIV 16 +#define TEMP_C_TO_K 273 + +/* Control registers */ +#define RV3032_CTRL1 0x10 +#define RV3032_CTRL1_TD_MASK 0x3 /* Timer clock frequency */ +#define RV3032_CTRL1_TD_SHIFT 0 +#define RV3032_CTRL1_TD_4096 0 +#define RV3032_CTRL1_TD_64 1 +#define RV3032_CTRL1_TD_1 2 +#define RV3032_CTRL1_TD_1_60 3 +#define RV3032_CTRL1_EERD (1 << 2) /* EEPROM memory refresh disable bit */ +#define RV3032_CTRL1_TE (1 << 3) /* Periodic countdown timer enable bit */ +#define RV3032_CTRL1_USEL (1 << 4) /* Update interrupt select bit */ +#define RV3032_CTRL1_GP0 (1 << 5) /* General Purpose bit 0 */ + +#define RV3032_CTRL2 0x11 +#define RV3032_CTRL2_STOP (1 << 0) /* Stop bit */ +#define RV3032_CTRL2_GP1 (1 << 1) /* General Purpose bit 1 */ +#define RV3032_CTRL2_EIE (1 << 2) /* External event interrupt enable bit */ +#define RV3032_CTRL2_AIE (1 << 3) /* Alarm interrupt enable bit */ +#define RV3032_CTRL2_TIE (1 << 4) /* Periodic countdown timer interrupt enable bit */ +#define RV3032_CTRL2_UIE (1 << 5) /* Periodic time update interrupt enable bit */ +#define RV3032_CTRL2_CLKIE (1 << 6) /* Interrupt Controlled Clock Output Enable bit */ +#define RV3032_CTRL3 0x12 +#define RV3032_CTRL3_TLIE (1 << 0) /* Temperature Low Interrupt Enable bit */ +#define RV3032_CTRL3_THIE (1 << 1) /* Temperature High Interrupt Enable bit */ +#define RV3032_CTRL3_TLE (1 << 2) /* Temperature Low Enable bit */ +#define RV3032_CTRL3_THE (1 << 3) /* Temperature High Enable bit */ +#define RV3032_CTRL3_BSIE (1 << 4) /* Backup Switchover Interrupt Enable bit */ + +/* EEPROM registers */ +#define RV3032_EEPROM_ADDRESS 0x3D +#define RV3032_EEPROM_DATA 0x3E +#define RV3032_EEPROM_COMMAND 0x3F +#define RV3032_EEPROM_CMD_UPDATE 0x11 +#define RV3032_EEPROM_CMD_REFRESH 0x12 +#define RV3032_EEPROM_CMD_WRITE_ONE 0x21 +#define RV3032_EEPROM_CMD_READ_ONE 0x22 + +/* PMU register */ +#define RV3032_EEPROM_PMU 0xC0 +#define RV3032_PMU_TCM_MASK 0x3 +#define RV3032_PMU_TCM_SHIFT 0 +#define RV3032_PMU_TCM_OFF 0 +#define RV3032_PMU_TCM_175V 1 +#define RV3032_PMU_TCM_30V 2 +#define RV3032_PMU_TCM_45V 3 +#define RV3032_PMU_TCR_MASK 0x3 +#define RV3032_PMU_TCR_SHIFT 2 +#define RV3032_PMU_TCR_06K 0 +#define RV3032_PMU_TCR_2K 1 +#define RV3032_PMU_TCR_7K 2 +#define RV3032_PMU_TCR_12K 3 +#define RV3032_PMU_BSM_MASK 0x3 +#define RV3032_PMU_BSM_SHIFT 4 +#define RV3032_PMU_BSM_OFF 0 +#define RV3032_PMU_BSM_DSM 1 +#define RV3032_PMU_BSM_LSM 2 +#define RV3032_PMU_BSM_OFF2 3 +#define RV3032_PMU_NCLKE (1 << 6) + +struct rv3032_softc { + device_t dev; + device_t busdev; + struct intr_config_hook init_hook; +}; + +struct rv3032_timeregs { + uint8_t secs; + uint8_t mins; + uint8_t hours; + uint8_t weekday; + uint8_t date; + uint8_t month; + uint8_t year; +}; + +static struct ofw_compat_data compat_data[] = { + {"microcrystal,rv3032", 1}, + {NULL, 0}, +}; + +static int +rv3032_update_register(struct rv3032_softc *sc, uint8_t reg, uint8_t value, uint8_t mask) +{ + int rv; + uint8_t data; + + if ((rv = iicdev_readfrom(sc->dev, reg, &data, 1, IIC_WAIT)) != 0) + return (rv); + data &= mask; + data |= value; + if ((rv = iicdev_writeto(sc->dev, reg, &data, 1, IIC_WAIT)) != 0) + return (rv); + return (0); +} + +static int +rv3032_eeprom_wait(struct rv3032_softc *sc) +{ + int rv, timeout; + uint8_t data; + + for (timeout = 1000; timeout > 0; timeout--) { + if ((rv = iicdev_readfrom(sc->dev, RV3032_TEMP_LSB, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + if ((data & RV3032_TEMP_LSB_EEBUSY) == 0) { + break; + } + } + if (timeout == 0) { + device_printf(sc->dev, "Timeout updating the eeprom\n"); + return (ETIMEDOUT); + } + /* Wait 1ms before allowing another eeprom access */ + DELAY(1000); + + return (0); +} + +static int +rv3032_eeprom_disable(struct rv3032_softc *sc) +{ + int rv; + + if ((rv = rv3032_update_register(sc, RV3032_CTRL1, RV3032_CTRL1_EERD, ~RV3032_CTRL1_EERD)) != 0) + return (rv); + /* Wait 1ms before checking EBUSY */ + DELAY(1000); + return (rv3032_eeprom_wait(sc)); +} + +static int +rv3032_eeprom_update(struct rv3032_softc *sc) +{ + int rv; + uint8_t data; + + data = RV3032_EEPROM_CMD_UPDATE; + if ((rv = iicdev_writeto(sc->dev, RV3032_EEPROM_COMMAND, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + /* Wait 1ms before checking EBUSY */ + DELAY(1000); + return (rv3032_eeprom_wait(sc)); +} + +static int +rv3032_eeprom_enable(struct rv3032_softc *sc) +{ + int rv; + + /* Restore eeprom refresh */ + if ((rv = rv3032_update_register(sc, RV3032_CTRL1, 0, ~RV3032_CTRL1_EERD)) != 0) + return (rv); + DELAY(1000); + + return (0); +} + +static int +rv3032_update_cfg(struct rv3032_softc *sc) +{ + int rv; + + if ((rv = rv3032_eeprom_disable(sc)) != 0) + return (rv); + + /* Save configuration in eeprom and re-enable it */ + if ((rv = rv3032_eeprom_update(sc)) != 0) + return (rv); + return (rv3032_eeprom_enable(sc)); +} + +static int +rv3032_temp_read(struct rv3032_softc *sc, int *temp) +{ + int rv, temp2; + uint8_t data[2]; + + if ((rv = iicdev_readfrom(sc->dev, RV3032_TEMP_LSB, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + + /* Wait for temp to be stable */ + *temp = (((data[0] & RV3032_TEMP_LSB_MASK) >> RV3032_TEMP_LSB_SHIFT) | + (data[1] << RV3032_TEMP_LSB_SHIFT)); + do { + temp2 = *temp; + *temp = (((data[0] & RV3032_TEMP_LSB_MASK) >> RV3032_TEMP_LSB_SHIFT) | + (data[1] << RV3032_TEMP_LSB_SHIFT)); + } while (temp2 != *temp); + *temp = (*temp / TEMP_DIV) + TEMP_C_TO_K; + return (0); +} + +static int +rv3032_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + int error, temp; + struct rv3032_softc *sc; + + sc = (struct rv3032_softc *)arg1; + if (rv3032_temp_read(sc, &temp) != 0) + return (EIO); + error = sysctl_handle_int(oidp, &temp, 0, req); + + return (error); +} + +static void +rv3032_init(void *arg) +{ + struct rv3032_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; + int rv; + + sc = (struct rv3032_softc*)arg; + config_intrhook_disestablish(&sc->init_hook); + + /* Set direct switching mode */ + rv3032_update_register(sc, + RV3032_EEPROM_PMU, + RV3032_PMU_BSM_DSM << RV3032_PMU_BSM_SHIFT, + RV3032_PMU_BSM_MASK); + if ((rv = rv3032_update_cfg(sc)) != 0) { + device_printf(sc->dev, "Cannot set to DSM mode (%d)\n", rv); + return; + } + + /* Register as clock source */ + clock_register_flags(sc->dev, 1000000, CLOCKF_SETTIME_NO_ADJ); + clock_schedule(sc->dev, 1); + + ctx = device_get_sysctl_ctx(sc->dev); + tree_node = device_get_sysctl_tree(sc->dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + rv3032_temp_sysctl, "IK0", "Current temperature"); + return; +} + +static int +rv3032_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Microcrystal RV3032"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +rv3032_attach(device_t dev) +{ + struct rv3032_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->busdev = device_get_parent(sc->dev); + + sc->init_hook.ich_func = rv3032_init; + sc->init_hook.ich_arg = sc; + if (config_intrhook_establish(&sc->init_hook) != 0) + return (ENOMEM); + + return (0); +} + +static int +rv3032_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + +static int +rv3032_gettime(device_t dev, struct timespec *ts) +{ + struct rv3032_softc *sc; + struct rv3032_timeregs time_regs; + struct clocktime ct; + uint8_t status; + int rv; + + sc = device_get_softc(dev); + + if ((rv = iicdev_readfrom(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + if (status & (RV3032_STATUS_PORF | RV3032_STATUS_VLF)) + return (EINVAL); + if ((rv = iicdev_readfrom(sc->dev, RV3032_SECS, &time_regs, sizeof(time_regs), IIC_WAIT)) != 0) + return (rv); + + bzero(&ct, sizeof(ct)); + ct.sec = FROMBCD(time_regs.secs & 0x7f); + ct.min = FROMBCD(time_regs.mins & 0x7f); + ct.hour = FROMBCD(time_regs.hours & 0x3f); + ct.day = FROMBCD(time_regs.date & 0x3f); + ct.mon = FROMBCD(time_regs.month & 0x1f) - 1; + ct.year = FROMBCD(time_regs.year) + 2000; + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +rv3032_settime(device_t dev, struct timespec *ts) +{ + struct rv3032_softc *sc; + struct rv3032_timeregs time_regs; + struct clocktime ct; + uint8_t status; + int rv; + + sc = device_get_softc(dev); + if ((rv = iicdev_readfrom(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + + clock_ts_to_ct(ts, &ct); + + time_regs.secs = TOBCD(ct.sec); + time_regs.mins = TOBCD(ct.min); + time_regs.hours = TOBCD(ct.hour); + time_regs.date = TOBCD(ct.day); + time_regs.month = TOBCD(ct.mon + 1); + time_regs.year = TOBCD(ct.year - 2000); + + if ((rv = iicdev_writeto(sc->dev, RV3032_SECS, &time_regs, sizeof(time_regs), IIC_WAIT)) != 0) + return (rv); + + /* Force a power on reset event so rv3032 reload the registers */ + status &= ~(RV3032_STATUS_PORF | RV3032_STATUS_VLF); + if ((rv = iicdev_writeto(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + return (0); +} + +static device_method_t rv3032_methods[] = { + /* device_if methods */ + DEVMETHOD(device_probe, rv3032_probe), + DEVMETHOD(device_attach, rv3032_attach), + DEVMETHOD(device_detach, rv3032_detach), + + /* clock_if methods */ + DEVMETHOD(clock_gettime, rv3032_gettime), + DEVMETHOD(clock_settime, rv3032_settime), + + DEVMETHOD_END, +}; + +static driver_t rv3032_driver = { + "rv3032", + rv3032_methods, + sizeof(struct rv3032_softc), +}; + +DRIVER_MODULE(rv3032, iicbus, rv3032_driver, NULL, NULL); +MODULE_VERSION(rv3032, 1); +MODULE_DEPEND(rv3032, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index b0b002b2309a..abbb390b0e07 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -28,7 +28,8 @@ SUBDIR = \ smbus \ .if !empty(OPT_FDT) -SUBDIR += rx8803 \ +SUBDIR += rv3032 \ + rx8803 \ tca64xx \ tmp461 .endif diff --git a/sys/modules/i2c/rv3032/Makefile b/sys/modules/i2c/rv3032/Makefile new file mode 100644 index 000000000000..7d3f8ac47aa6 --- /dev/null +++ b/sys/modules/i2c/rv3032/Makefile @@ -0,0 +1,13 @@ + +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc +KMOD= rv3032 +SRCS= rv3032.c + +SRCS+= bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + ofw_bus_if.h + +.include From nobody Wed Oct 18 14:33:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YHC2JZZz4x6JF; Wed, 18 Oct 2023 14:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YHC118mz3QSP; Wed, 18 Oct 2023 14:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aom9ZGSj1Oj1eddWcweSOIcyGKA2ivav8HVfT/P2aW8=; b=IklDoOfwrNLq0pwvl998NaKi4T7Nqu1eF3xNvLNVMOrawfej50FJhqOuaYpd5cSvz7g1Q0 00e5KO70YBSv/1QMah3nxD/Jt4TjVb16D6SLRXGD8hKY8oOPDs+N38ag9q78eT8hMLwsOt k9JqEhQaCcxMEJXRr39D8FLXoSf1pdEFE6vJJoeOmpv9oXrsy0rHzViv+ZEMCMH45T+9Nx 49yNvoNtbZ1glbvGL7YvRbYiP37HChL8ULKKYI3oc3+tgnEPMdfe3R/ozWfjdQdw/zYx74 YaFT/HFIXSyGeO8y2HIieYj0LHD1bcWkcb1PYd25rHcbiPl4QC6zTvC84J4OFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639591; a=rsa-sha256; cv=none; b=EDWNTVOkRmnDKn5RLDbroE/Ip4HqztXxK19A4y6g6bgIiYT7YTaF/qhBS7JvDZF++KHqDk tCnqtOE0glzPZId1uqSq9PSndb5wB58za1BYyl2FDKisHejs7awB1VCgBWo2neeQOrtoBx UBmgChtzT8U7lIVc8CTL5nd3xfQaymb4aMQ72P5hiLs0a7+WzsCDdWLIlganPWgXRFcAMP R+dfsk4ztDN2JmR/X2Pk2S+V39oregp/41xqyET/oxqpWOHOoXbmTeFvZvcLrWq1AgLc8V ixa6LjnlTo6hqtvyNLJ/SqiBgp2BGyp1PvMwhYx+hj3zC3JCrRbiCN5naoQ1+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aom9ZGSj1Oj1eddWcweSOIcyGKA2ivav8HVfT/P2aW8=; b=oqpwLSLjGC0pUDcCpJ5Lp4HXxa0d0DRagmbcKN91Y8fm2nFtqksuhupm/5tNpcTGGhuadn LNvW09dB6bZIiItz435Mput3GRDue9rmfB9TCWmGeJ8mgP1jj+QO607aaFQQAKVSGXVXZQ bFmZ4beGkHr5gaUgVZPH/+AhPQSQxkooLvaleEdlbAjtt01gfDz4Vk+sYyFmi6u3JeawHr rkmSfHxa8B9SSlXjawDwlmDe6S7CdCNLHC8NyVNjRZnfEyKLG6PXTo9SrZyRGWZ9+XNSSr R9fS1wRqjD30uEeOBN4VkOg3LqJNnh7P3EovKMR6v5cCFgnQP+KQMiQc01sFnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YHC078Xz18vH; Wed, 18 Oct 2023 14:33: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 39IEXA01092011; Wed, 18 Oct 2023 14:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEXAWm092007; Wed, 18 Oct 2023 14:33:10 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:33:10 GMT Message-Id: <202310181433.39IEXAWm092007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 26bf8fff64e5 - stable/14 - xilinx: reset: Remove debug printfs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26bf8fff64e5d4ede9c4772a698ca2540cffccab Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=26bf8fff64e5d4ede9c4772a698ca2540cffccab commit 26bf8fff64e5d4ede9c4772a698ca2540cffccab Author: Emmanuel Vadot AuthorDate: 2023-10-12 07:32:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:32:37 +0000 xilinx: reset: Remove debug printfs Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 257405d707d77bc55b38e7c2bb83b8a9247a86ae) --- sys/dev/clk/xilinx/zynqmp_reset.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/clk/xilinx/zynqmp_reset.c b/sys/dev/clk/xilinx/zynqmp_reset.c index 484f19c229c5..52074d4c62af 100644 --- a/sys/dev/clk/xilinx/zynqmp_reset.c +++ b/sys/dev/clk/xilinx/zynqmp_reset.c @@ -183,7 +183,6 @@ zynqmp_reset_assert(device_t dev, intptr_t id, bool reset) if (id > ZYNQMP_RESET_MAX) return (EINVAL); sc = device_get_softc(dev); - device_printf(dev, "%s called for id = %ld, reset =%d\n", __func__, id, reset); rv = ZYNQMP_FIRMWARE_RESET_ASSERT(sc->parent, id, reset); return (rv); } @@ -197,7 +196,6 @@ zynqmp_reset_is_asserted(device_t dev, intptr_t id, bool *reset) if (id > ZYNQMP_RESET_MAX) return (EINVAL); sc = device_get_softc(dev); - device_printf(dev, "%s called for id = %ld\n", __func__, id); rv = ZYNQMP_FIRMWARE_RESET_GET_STATUS(sc->parent, id, reset); return (rv); From nobody Wed Oct 18 14:34:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJX70x9z4x6JR; Wed, 18 Oct 2023 14:34: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 4S9YJX6Gzbz3TTh; Wed, 18 Oct 2023 14:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i1qrHWi6HHah0Yry6stdIDFaMibFncCenFGCbFf6BKg=; b=TSvz4cHVDjUn3pgZ+dhwVP8jqH6iT686Kktatq5Vs/CM2xQIOKqfkgdNnejMV4eksGyX9a uswtYQ96xq8aEtA/J/MX8Kzb8iomelX5uD2ktYRzL7Ya+rGoO7H8G4DK0RT/tUFYeQZALa gGG0ZX8S5vyZGkxS4TY1MtjPalAuLuElfKJaPX2og0tO+RhqtxmfFz06WlIrq/jeqisF1o u/1mwUIRlgSpvFQBWGqGYvJ9wBYApc7hnIwG2xZIgF0Dc1OxnRShWJmv1vi5a9+nG+VQ2B GKHJmhCjhtiiRj2IOqompauwg1YUGEeU2rqCcrEAtLIvmBeKFXFhcgJ77v54kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639660; a=rsa-sha256; cv=none; b=MdCnqVFZSMFCFqSXNQvEUlyG4310LMLvtUzNwpO1gRYbNP22AELWE+k2EUFkxtnCY4vIzg 1PpNkmqtQt0b2Jasn7LlsO6ulzGZmSouktX1R89+wINxeN+igfngjuM4LDYMdq0mf1x6wK Djd6rkDUej3qgE9PGfszBNTaR1weAeXhJTYor9nPRp1mp4SdiwJO7BOvVfDZh/AyEodJiW 4qAnI0S26Ctd67dhrAijkNnL/5m/EiqVk2L65cw0vDaNSaLlPE3Ok1qIU2q91YEOIi8q3g wffD2usXBVy/HlDIutnUvb1oo1io4Kxi7LBY6XAAdnS4eaLHylqRbrf8nbg78A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i1qrHWi6HHah0Yry6stdIDFaMibFncCenFGCbFf6BKg=; b=CXvCDEBVIq8QjifxAnyrLKhpvvtcHuDoAzjjnVW3L2yvT5s5bwLV4uaMeGHKD/+H7KERFL nwjq2i5vyhok0P0RxOgWFaV5T8gjPmQuOrjlD7VosbnEcbkDNBCB/PvAm0JdagoU2OAcoF Qvi5gflMYbrbw7oDd7//pq18f4q/N1hky7MZ8BXGuXRpzdV0xvJNL8OU7PAQns9IY1GgjM sGzQHqA9Z1ffpytpN63yVyJCssimEIVfXlsFyoHVX6YMxZWoHDnOPH/q3QFKPaYjFQUpsx Wsz9lDf3YXI0Jj9j+ztpaeN+Zu6dClTv2SvB+M6B4R1bntQdtf092vsgFSXHpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJX5M2Kz18rw; Wed, 18 Oct 2023 14:34: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 39IEYKQW092385; Wed, 18 Oct 2023 14:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYKMV092382; Wed, 18 Oct 2023 14:34:20 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:20 GMT Message-Id: <202310181434.39IEYKMV092382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: dda809fb31a7 - stable/14 - arm64: rockchip: clk: Define PLIST macro in rk_cru.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dda809fb31a7d4049aa5b1bc8adc1743a5ac92fb Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=dda809fb31a7d4049aa5b1bc8adc1743a5ac92fb commit dda809fb31a7d4049aa5b1bc8adc1743a5ac92fb Author: Emmanuel Vadot AuthorDate: 2023-09-19 15:59:34 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:25 +0000 arm64: rockchip: clk: Define PLIST macro in rk_cru.h We use it in all clock drivers so no need to define it everywhere (cherry picked from commit 8ae54db63970e9370d3d88f6eb57c102e085a128) --- sys/arm64/rockchip/clk/rk3288_cru.c | 1 - sys/arm64/rockchip/clk/rk3328_cru.c | 2 -- sys/arm64/rockchip/clk/rk3399_cru.c | 1 - sys/arm64/rockchip/clk/rk_cru.h | 4 ++++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3288_cru.c b/sys/arm64/rockchip/clk/rk3288_cru.c index cadb1f586a1a..e35481e94c13 100644 --- a/sys/arm64/rockchip/clk/rk3288_cru.c +++ b/sys/arm64/rockchip/clk/rk3288_cru.c @@ -525,7 +525,6 @@ static struct rk_clk_armclk_rates rk3288_armclk_rates[] = { }, \ } -#define PLIST(_name) static const char *_name[] PLIST(pll_src_p) = {"xin24m", "xin24m", "xin32k"}; PLIST(armclk_p)= {"apll_core", "gpll_core"}; PLIST(ddrphy_p) = {"dpll_ddr", "gpll_ddr"}; diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/arm64/rockchip/clk/rk3328_cru.c index f969c8d758a5..1f48ce6c23a2 100644 --- a/sys/arm64/rockchip/clk/rk3328_cru.c +++ b/sys/arm64/rockchip/clk/rk3328_cru.c @@ -636,8 +636,6 @@ static struct rk_clk_pll_rate rk3328_pll_frac_rates[] = { }; /* Clock parents */ -#define PLIST(_name) static const char *_name[] - PLIST(pll_src_p) = {"xin24m"}; PLIST(xin24m_rtc32k_p) = {"xin24m", "clk_rtc32k"}; diff --git a/sys/arm64/rockchip/clk/rk3399_cru.c b/sys/arm64/rockchip/clk/rk3399_cru.c index 3d43d832792f..3bff0e64ea34 100644 --- a/sys/arm64/rockchip/clk/rk3399_cru.c +++ b/sys/arm64/rockchip/clk/rk3399_cru.c @@ -695,7 +695,6 @@ static struct rk_clk_armclk_rates rk3399_cpu_b_rates[] = { }, \ } -#define PLIST(_name) static const char *_name[] PLIST(pll_src_p) = {"xin24m", "xin32k"}; PLIST(armclkl_p) = {"clk_core_l_lpll_src", "clk_core_l_bpll_src", diff --git a/sys/arm64/rockchip/clk/rk_cru.h b/sys/arm64/rockchip/clk/rk_cru.h index b00e987abcfa..55f230036199 100644 --- a/sys/arm64/rockchip/clk/rk_cru.h +++ b/sys/arm64/rockchip/clk/rk_cru.h @@ -42,6 +42,10 @@ #include /* Macro for defining various types of clocks. */ + +/* Parent list */ +#define PLIST(_name) static const char *_name[] + /* Pure gate */ #define GATE(_idx, _clkname, _pname, _o, _s) \ { \ From nobody Wed Oct 18 14:34:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJZ4V3Qz4x6Ls; Wed, 18 Oct 2023 14:34: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 4S9YJY73YLz3TMW; Wed, 18 Oct 2023 14:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3amgQ87tP+JtP7hge5qZwZ+0/bC9EBGwfN2s5bPXUfQ=; b=VaI/CO0R7wwNe5aXVG3V4Sfr9k6qP5d2bVd7feTCV2DWTKXeJ5SrTW8FdMLdts5xg5tRPz dA6xEKfZGLPwufoiR840mmXJdv1Rd7LnR1ZvyTn0yocJYDw2XjJcMdE8s/f2RmwIFBmULG D+E+Wltt/+SkQej27aNgCsIApV6weZyGMFn+om/GpQteuhackEslDKBpGnXJPJ8RmJVDxw 2LkXIQM0qN2mEpUVSdi+1zoNldm5fwq4TAWrsYtHgbHFRAtv8YwU3dnA0yFHn9enmXqTwS 2XBeOQXqkjV52FItrlxEpyCPUjjt/pUZ/SfY89+xXoiP7AC3TN/95cG7ixjiEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639662; a=rsa-sha256; cv=none; b=Pazl/wHIwJaDGGmDGsVNAW919U5+YFAM6TMyQh2J0GrjDBBrKlrB0iS07PuiU1K5H7mh31 iONulHxWiv0GYObuuqQAVJBrXpOYx1t8g2Ze5wVUXZLn0D158ccs//1RfdEieytSqlWejL b8LV2Zcm6YSdiMnnJP1ID4ZrKJErB6ET59l2RnQRKFZilFmz19XnRrpJgO9mvqlsCgHYEP 09Xb+VshGiTELv/DqAmkcDD4O7A27Qo3eD28Fzp95eNftRozdndOXyZhAxNnTAVypwAmEZ 2aUS6S4MbMI5cy2bT+HVc3FWCfMT3so6xJCny1e3eC0vxjdvFBiTEEixpaXQ4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3amgQ87tP+JtP7hge5qZwZ+0/bC9EBGwfN2s5bPXUfQ=; b=a9kC3HxiLZx/JQXoFvSMgSZs4AWLA0Ub8z2ZhRbEk7NJB2tLGWcE5A1XgpkAf23xO0GucP touYrXOSLo8qJn4LW6rIdeDbw+fm6/kV3N5gdZBU1sVT0vMe4b293+g4x1MY0gt+yP3wXp m0O/Vc6QCceSqJByVqv1Be0YBhSuRTwuH3lTWko4qaonMCOkJrc3F3lPhJ6PUvH/6gVsFe 190ZH+zzYXvLRYFmqCFRPQyzL7TBXGyLDZ2bxO5vrnqwrqhZNFNxNra7zmYapYM3tbFz8v 0R8gbX7YnsrCJrzZ01DOW2WZQe4oZHf0PEphZez0YO69gq3wpVNa6tWaI7576Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJY639Lz18vJ; Wed, 18 Oct 2023 14:34: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 39IEYLCA092424; Wed, 18 Oct 2023 14:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYLS4092422; Wed, 18 Oct 2023 14:34:21 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:21 GMT Message-Id: <202310181434.39IEYLS4092422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 90b135d8c292 - stable/14 - arm64: rockchip: rk3568_pmucru: Rewrite List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 90b135d8c2926254eea2a6e71a40590f728dbfc3 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=90b135d8c2926254eea2a6e71a40590f728dbfc3 commit 90b135d8c2926254eea2a6e71a40590f728dbfc3 Author: Emmanuel Vadot AuthorDate: 2023-08-15 10:16:57 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:26 +0000 arm64: rockchip: rk3568_pmucru: Rewrite Rewrite correctly the clocks for pmucru : - Export all clocks - Use names from the TRM - Respect clock topology Fixes: a48301a5e094 ("Add initial clocks support for Rockchip RK3568 SoC.") (cherry picked from commit 7b6ae431cf70cd8683270b3e315a14e61d666522) --- sys/arm64/rockchip/clk/rk3568_pmucru.c | 304 +++++++++++++-------------------- 1 file changed, 115 insertions(+), 189 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3568_pmucru.c b/sys/arm64/rockchip/clk/rk3568_pmucru.c index ee75a4c18927..f93864851e0a 100644 --- a/sys/arm64/rockchip/clk/rk3568_pmucru.c +++ b/sys/arm64/rockchip/clk/rk3568_pmucru.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2021, 2022 Soren Schmidt + * Copyright (c) 2023, Emmanuel Vadot * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -46,12 +47,11 @@ #include -#define RK3568_PLLSEL_CON(x) ((x) * 0x20) -#define RK3568_CLKSEL_CON(x) ((x) * 0x4 + 0x100) -#define RK3568_CLKGATE_CON(x) ((x) * 0x4 + 0x180) -#define RK3568_SOFTRST_CON(x) ((x) * 0x4 + 0x200) +#define CRU_PLLSEL_CON(x) ((x) * 0x20) +#define CRU_CLKSEL_CON(x) ((x) * 0x4 + 0x100) +#define CRU_CLKGATE_CON(x) ((x) * 0x4 + 0x180) -#define PNAME(_name) static const char *_name[] +#define PLIST(_name) static const char *_name[] /* PLL clock */ #define RK_PLL(_id, _name, _pnames, _off, _shift) \ @@ -63,131 +63,32 @@ .clkdef.parent_names = _pnames, \ .clkdef.parent_cnt = nitems(_pnames), \ .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .base_offset = RK3568_PLLSEL_CON(_off), \ + .base_offset = CRU_PLLSEL_CON(_off), \ .mode_reg = 0x80, \ .mode_shift = _shift, \ .rates = rk3568_pll_rates, \ }, \ } -/* Composite */ -#define RK_COMPOSITE(_id, _name, _pnames, _o, _ms, _mw, _ds, _dw, _go, _gw, _f)\ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .mux_shift = _ms, \ - .mux_width = _mw, \ - .div_shift = _ds, \ - .div_width = _dw, \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_COMPOSITE_HAVE_MUX | \ - RK_CLK_COMPOSITE_HAVE_GATE | _f, \ - }, \ -} - -/* Composite no mux */ -#define RK_COMPNOMUX(_id, _name, _pname, _o, _ds, _dw, _go, _gw, _f) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .div_shift = _ds, \ - .div_width = _dw, \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_COMPOSITE_HAVE_GATE | _f, \ - }, \ -} - -/* Fixed factor mux/div */ -#define RK_FACTOR(_id, _name, _pname, _mult, _div) \ -{ \ - .type = RK_CLK_FIXED, \ - .clk.fixed = &(struct clk_fixed_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .mult = _mult, \ - .div = _div, \ - }, \ -} - -/* Fractional */ -#define RK_FRACTION(_id, _name, _pname, _o, _go, _gw, _f) \ -{ \ - .type = RK_CLK_FRACT, \ - .clk.fract = &(struct rk_clk_fract_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = RK3568_CLKSEL_CON(_o), \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_FRACT_HAVE_GATE | _f, \ - }, \ -} - -/* Multiplexer */ -#define RK_MUX(_id, _name, _pnames, _o, _ms, _mw, _f) \ -{ \ - .type = RK_CLK_MUX, \ - .clk.mux = &(struct rk_clk_mux_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = RK3568_CLKSEL_CON(_o), \ - .shift = _ms, \ - .width = _mw, \ - .mux_flags = _f, \ - }, \ -} - -#define RK_GATE(_id, _name, _pname, _o, _s) \ -{ \ - .id = _id, \ - .name = _name, \ - .parent_name = _pname, \ - .offset = RK3568_CLKGATE_CON(_o), \ - .shift = _s, \ -} - extern struct rk_clk_pll_rate rk3568_pll_rates[]; /* Parent clock defines */ -PNAME(mux_pll_p) = { "xin24m" }; -PNAME(xin24m_32k_p) = { "xin24m", "clk_rtc_32k" }; -PNAME(sclk_uart0_p) = { "sclk_uart0_div", "sclk_uart0_frac", "xin24m" }; -PNAME(clk_rtc32k_pmu_p) = { "clk_32k_pvtm", "xin32k", "clk_rtc32k_frac" }; -PNAME(ppll_usb480m_cpll_gpll_p) = { "ppll", "usb480m", "cpll", "gpll"}; -PNAME(clk_usbphy0_ref_p) = { "clk_ref24m", "xin_osc0_usbphy0_g" }; -PNAME(clk_usbphy1_ref_p) = { "clk_ref24m", "xin_osc0_usbphy1_g" }; -PNAME(clk_mipidsiphy0_ref_p) = { "clk_ref24m", "xin_osc0_mipidsiphy0_g" }; -PNAME(clk_mipidsiphy1_ref_p) = { "clk_ref24m", "xin_osc0_mipidsiphy1_g" }; -PNAME(clk_wifi_p) = { "clk_wifi_osc0", "clk_wifi_div" }; -PNAME(clk_pciephy0_ref_p) = { "clk_pciephy0_osc0", "clk_pciephy0_div" }; -PNAME(clk_pciephy1_ref_p) = { "clk_pciephy1_osc0", "clk_pciephy1_div" }; -PNAME(clk_pciephy2_ref_p) = { "clk_pciephy2_osc0", "clk_pciephy2_div" }; -PNAME(clk_hdmi_ref_p) = { "hpll", "hpll_ph0" }; -PNAME(clk_pdpmu_p) = { "ppll", "gpll" }; -PNAME(clk_pwm0_p) = { "xin24m", "clk_pdpmu" }; +PLIST(mux_pll_p) = { "xin24m" }; +PLIST(xin24m_32k_p) = { "xin24m", "clk_rtc_32k" }; +PLIST(sclk_uart0_p) = { "sclk_uart0_div", "sclk_uart0_frac", "xin24m" }; +PLIST(sclk_uart0_div_p) = { "ppll", "usb480m", "cpll", "gpll" }; +PLIST(clk_rtc32k_pmu_p) = { "clk_32k_pvtm", "xin32k", "clk_osc0_div32k" }; +PLIST(clk_usbphy0_ref_p) = { "clk_ref24m", "xin_osc0_usbphy0_g" }; +PLIST(clk_usbphy1_ref_p) = { "clk_ref24m", "xin_osc0_usbphy1_g" }; +PLIST(clk_mipidsiphy0_ref_p) = { "clk_ref24m", "xin_osc0_mipidsiphy0_g" }; +PLIST(clk_mipidsiphy1_ref_p) = { "clk_ref24m", "xin_osc0_mipidsiphy1_g" }; +PLIST(clk_wifi_p) = { "clk_wifi_osc0", "clk_wifi_div" }; +PLIST(clk_pciephy0_ref_p) = { "clk_pciephy0_osc0", "clk_pciephy0_div" }; +PLIST(clk_pciephy1_ref_p) = { "clk_pciephy1_osc0", "clk_pciephy1_div" }; +PLIST(clk_pciephy2_ref_p) = { "clk_pciephy2_osc0", "clk_pciephy2_div" }; +PLIST(clk_hdmi_ref_p) = { "hpll", "hpll_ph0" }; +PLIST(clk_pdpmu_p) = { "ppll", "gpll" }; +PLIST(clk_pwm0_p) = { "xin24m", "clk_pdpmu" }; /* CLOCKS */ static struct rk_clk rk3568_clks[] = { @@ -198,83 +99,108 @@ static struct rk_clk rk3568_clks[] = { LINK("usb480m"), LINK("clk_32k_pvtm"), - /* SRC_CLK */ - RK_MUX(CLK_RTC_32K, "clk_rtc_32k", clk_rtc32k_pmu_p, 0, 6, 2, 0), - RK_MUX(0, "sclk_uart0_mux", sclk_uart0_p, 4, 10, 2, 0), + /* Fixed clocks */ + FFACT(0, "ppll_ph0", "ppll", 1, 2), + FFACT(0, "ppll_ph180", "ppll", 1, 2), + FFACT(0, "hpll_ph0", "hpll", 1, 2), /* PLL's */ RK_PLL(PLL_PPLL, "ppll", mux_pll_p, 0, 0), RK_PLL(PLL_HPLL, "hpll", mux_pll_p, 2, 2), - /* PD_PMU */ - RK_FACTOR(0, "ppll_ph0", "ppll", 1, 2), - RK_FACTOR(0, "ppll_ph180", "ppll", 1, 2), - RK_FACTOR(0, "hpll_ph0", "hpll", 1, 2), - RK_MUX(CLK_PDPMU, "clk_pdpmu", clk_pdpmu_p, 2, 15, 1, 0), - RK_COMPNOMUX(PCLK_PDPMU, "pclk_pdpmu", "clk_pdpmu", 2, 0, 5, 0, 2, 0), - RK_COMPNOMUX(CLK_I2C0, "clk_i2c0", "clk_pdpmu", 3, 0, 7, 1, 1, 0), - RK_FRACTION(CLK_RTC32K_FRAC, "clk_rtc32k_frac", "xin24m", 1, 0, 1, 0), - RK_COMPNOMUX(XIN_OSC0_DIV, "xin_osc0_div", "xin24m", 0, 0, 5, 0, 0, 0), - RK_COMPOSITE(CLK_UART0_DIV, "sclk_uart0_div", - ppll_usb480m_cpll_gpll_p, 4, 8, 2, 0, 7, 1, 3, 0), - RK_FRACTION(CLK_UART0_FRAC, "sclk_uart0_frac", - "sclk_uart0_div", 5, 1, 4, 0), - RK_MUX(DBCLK_GPIO0, "dbclk_gpio0_c", xin24m_32k_p, 6, 15, 1, 0), - RK_COMPOSITE(CLK_PWM0, "clk_pwm0", clk_pwm0_p, 6, 7, 1, 0, 7, 1, 7, 0), - RK_COMPNOMUX(CLK_REF24M, "clk_ref24m", "clk_pdpmu", 7, 0, 6, 2, 0, 0), - RK_MUX(CLK_USBPHY0_REF, "clk_usbphy0_ref", - clk_usbphy0_ref_p, 8, 0, 1, 0), - RK_MUX(CLK_USBPHY1_REF, "clk_usbphy1_ref", - clk_usbphy1_ref_p, 8, 1, 1, 0), - RK_MUX(CLK_MIPIDSIPHY0_REF, "clk_mipidsiphy0_ref", - clk_mipidsiphy0_ref_p, 8, 2, 1, 0), - RK_MUX(CLK_MIPIDSIPHY1_REF, "clk_mipidsiphy1_ref", - clk_mipidsiphy1_ref_p, 8, 3, 1, 0), - RK_COMPNOMUX(CLK_WIFI_DIV, "clk_wifi_div", - "clk_pdpmu", 8, 8, 6, 2, 5, 0), - RK_MUX(CLK_WIFI, "clk_wifi", clk_wifi_p, 8, 15, 1, 0), - RK_COMPNOMUX(CLK_PCIEPHY0_DIV, "clk_pciephy0_div", - "ppll_ph0", 9, 0, 3, 2, 7, 0), - RK_MUX(CLK_PCIEPHY0_REF, "clk_pciephy0_ref", - clk_pciephy0_ref_p, 9, 3, 1, 0), - RK_COMPNOMUX(CLK_PCIEPHY1_DIV, "clk_pciephy1_div", - "ppll_ph0", 9, 4, 3, 2, 9, 0), - RK_MUX(CLK_PCIEPHY1_REF, "clk_pciephy1_ref", - clk_pciephy1_ref_p, 9, 7, 1, 0), - RK_COMPNOMUX(CLK_PCIEPHY2_DIV, "clk_pciephy2_div", - "ppll_ph0", 9, 8, 3, 2, 11, 0), - RK_MUX(CLK_PCIEPHY2_REF, "clk_pciephy2_ref", - clk_pciephy2_ref_p, 9, 11, 1, 0), - RK_MUX(CLK_HDMI_REF, "clk_hdmi_ref", clk_hdmi_ref_p, 8, 7, 1, 0), + /* PMUCRU_PMUCLKSEL_CON00 */ + CDIV(0, "xin_osc0_div_div", "xin24m", 0, 0, 0, 5), + MUX(0, "clk_rtc_32k_mux", clk_rtc32k_pmu_p, 0, 0, 6, 2), + + /* PMUCRU_PMUCLKSEL_CON01 */ + FRACT(0, "clk_osc0_div32k", "xin24m", 0, 1), + + /* PMUCRU_PMUCLKSEL_CON02 */ + CDIV(0, "pclk_pdpmu_pre", "clk_pdpmu", 0, 2, 0, 5), + MUX(CLK_PDPMU, "clk_pdpmu", clk_pdpmu_p, 0, 2, 15, 1), + + /* PMUCRU_PMUCLKSEL_CON03 */ + CDIV(0, "clk_i2c0_div", "clk_pdpmu", 0, 3, 0, 7), + + /* PMUCRU_PMUCLKSEL_CON04 */ + CDIV(0, "sclk_uart0_div_div", "sclk_uart0_div_sel", 0, 4, 0, 7), + MUX(0, "sclk_uart0_div_sel", sclk_uart0_div_p, 0, 4, 8, 2), + MUX(0, "sclk_uart0_mux", sclk_uart0_p, 0, 4, 10, 2), + + /* PMUCRU_PMUCLKSEL_CON05 */ + FRACT(0, "sclk_uart0_frac_div", "sclk_uart0_div", 0, 5), + + /* PMUCRU_PMUCLKSEL_CON06 */ + CDIV(0, "clk_pwm0_div", "clk_pwm0_sel", 0, 6, 0, 7), + MUX(0, "clk_pwm0_sel", clk_pwm0_p, 0, 6, 7, 1), + MUX(0, "dbclk_gpio0_sel", xin24m_32k_p, 0, 6, 15, 1), + + /* PMUCRU_PMUCLKSEL_CON07 */ + CDIV(0, "clk_ref24m_div", "clk_pdpmu", 0, 7, 0, 6), + + /* PMUCRU_PMUCLKSEL_CON08 */ + MUX(CLK_USBPHY0_REF, "clk_usbphy0_ref", clk_usbphy0_ref_p, 0, 8, 0, 1), + MUX(CLK_USBPHY1_REF, "clk_usbphy1_ref", clk_usbphy1_ref_p, 0, 8, 1, 1), + MUX(CLK_MIPIDSIPHY0_REF, "clk_mipidsiphy0_ref", clk_mipidsiphy0_ref_p, 0, 8, 2, 1), + MUX(CLK_MIPIDSIPHY1_REF, "clk_mipidsiphy1_ref", clk_mipidsiphy1_ref_p, 0, 8, 3, 1), + MUX(CLK_HDMI_REF, "clk_hdmi_ref", clk_hdmi_ref_p, 0, 8, 7, 1), + CDIV(0, "clk_wifi_div_div", "clk_pdpmu", 0, 8, 8, 6), + MUX(CLK_WIFI, "clk_wifi", clk_wifi_p, 0, 8, 15, 1), + + /* PMUCRU_PMUCLKSEL_CON09 */ + CDIV(0, "clk_pciephy0_div_div", "ppll_ph0", 0, 9, 0, 3), + MUX(CLK_PCIEPHY0_REF, "clk_pciephy0_ref", + clk_pciephy0_ref_p, 0, 9, 3, 1), + CDIV(0, "clk_pciephy1_div_div", "ppll_ph0", 0, 9, 4, 3), + MUX(CLK_PCIEPHY1_REF, "clk_pciephy1_ref", + clk_pciephy1_ref_p, 0, 9, 7, 1), + CDIV(0, "clk_pciephy2_div_div", "ppll_ph0", 0, 9, 8, 3), + MUX(CLK_PCIEPHY2_REF, "clk_pciephy2_ref", + clk_pciephy2_ref_p, 0, 9, 11, 1), }; /* GATES */ static struct rk_cru_gate rk3568_gates[] = { - RK_GATE(PCLK_PMU, "pclk_pmu", "pclk_pdpmu", 0, 6), - RK_GATE(DBCLK_GPIO0, "dbclk_gpio0", "dbclk_gpio0_c", 1, 10), - RK_GATE(CLK_PMU, "clk_pmu", "xin24m", 0, 7), - RK_GATE(PCLK_I2C0, "pclk_i2c0", "pclk_pdpmu", 1, 0), - RK_GATE(PCLK_UART0, "pclk_uart0", "pclk_pdpmu", 1, 2), - RK_GATE(SCLK_UART0, "sclk_uart0", "sclk_uart0_mux", 1, 5), - RK_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_pdpmu", 1, 9), - RK_GATE(PCLK_PWM0, "pclk_pwm0", "pclk_pdpmu", 1, 6), - RK_GATE(CLK_CAPTURE_PWM0_NDFT, "clk_capture_pwm0_ndft", "xin24m", 1, 8), - RK_GATE(PCLK_PMUPVTM, "pclk_pmupvtm", "pclk_pdpmu", 1, 11), - RK_GATE(CLK_PMUPVTM, "clk_pmupvtm", "xin24m", 1, 12), - RK_GATE(CLK_CORE_PMUPVTM, "clk_core_pmupvtm", "xin24m", 1, 13), - RK_GATE(XIN_OSC0_USBPHY0_G, "xin_osc0_usbphy0_g", "xin24m", 2, 1), - RK_GATE(XIN_OSC0_USBPHY1_G, "xin_osc0_usbphy1_g", "xin24m", 2, 2), - RK_GATE(XIN_OSC0_MIPIDSIPHY0_G, "xin_osc0_mipidsiphy0_g", - "xin24m", 2, 3), - RK_GATE(XIN_OSC0_MIPIDSIPHY1_G, "xin_osc0_mipidsiphy1_g", - "xin24m", 2, 4), - RK_GATE(CLK_WIFI_OSC0, "clk_wifi_osc0", "xin24m", 2, 6), - RK_GATE(CLK_PCIEPHY0_OSC0, "clk_pciephy0_osc0", "xin24m", 2, 8), - RK_GATE(CLK_PCIEPHY1_OSC0, "clk_pciephy1_osc0", "xin24m", 2, 10), - RK_GATE(CLK_PCIEPHY2_OSC0, "clk_pciephy2_osc0", "xin24m", 2, 12), - RK_GATE(CLK_PCIE30PHY_REF_M, "clk_pcie30phy_ref_m", "ppll_ph0", 2, 13), - RK_GATE(CLK_PCIE30PHY_REF_N, "clk_pcie30phy_ref_n", "ppll_ph180", 2,14), - RK_GATE(XIN_OSC0_EDPPHY_G, "xin_osc0_edpphy_g", "xin24m", 2, 15), + /* PMUCRU_PMUGATE_CON00 */ + GATE(XIN_OSC0_DIV, "xin_osc0_div", "xin_osc0_div_div", 0, 0), + GATE(CLK_RTC_32K, "clk_rtc_32k", "clk_rtc_32k_mux", 0, 1), + GATE(PCLK_PDPMU, "pclk_pdpmu", "pclk_pdpmu_pre", 0, 2), + GATE(PCLK_PMU, "pclk_pmu", "pclk_pdpmu", 0, 6), + GATE(CLK_PMU, "clk_pmu", "xin24m", 0, 7), + + /* PMUCRU_PMUGATE_CON01 */ + GATE(PCLK_I2C0, "pclk_i2c0", "pclk_pdpmu", 1, 0), + GATE(CLK_I2C0, "clk_i2c0", "clk_i2c0_div", 1, 1), + GATE(PCLK_UART0, "pclk_uart0", "pclk_pdpmu", 1, 2), + GATE(CLK_UART0_DIV, "sclk_uart0_div", "sclk_uart0_div_div", 1, 3), + GATE(CLK_UART0_FRAC, "sclk_uart0_frac", "sclk_uart0_frac_div", 1, 4), + GATE(SCLK_UART0, "sclk_uart0", "sclk_uart0_mux", 1, 5), + GATE(PCLK_PWM0, "pclk_pwm0", "pclk_pdpmu", 1, 6), + GATE(CLK_PWM0, "clk_pwm0", "clk_pwm0_div", 1, 7), + GATE(CLK_CAPTURE_PWM0_NDFT, "clk_capture_pwm0_ndft", "xin24m", 1, 8), + GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_pdpmu", 1, 9), + GATE(DBCLK_GPIO0, "dbclk_gpio0", "dbclk_gpio0_sel", 1, 10), + GATE(PCLK_PMUPVTM, "pclk_pmupvtm", "pclk_pdpmu", 1, 11), + GATE(CLK_PMUPVTM, "clk_pmupvtm", "xin24m", 1, 12), + GATE(CLK_CORE_PMUPVTM, "clk_core_pmupvtm", "xin24m", 1, 13), + + /* PMUCRU_PMUGATE_CON02 */ + GATE(CLK_REF24M, "clk_ref24m", "clk_ref24m_div", 2, 0), + GATE(XIN_OSC0_USBPHY0_G, "xin_osc0_usbphy0_g", "xin24m", 2, 1), + GATE(XIN_OSC0_USBPHY1_G, "xin_osc0_usbphy1_g", "xin24m", 2, 2), + GATE(XIN_OSC0_MIPIDSIPHY0_G, "xin_osc0_mipidsiphy0_g", "xin24m", 2, 3), + GATE(XIN_OSC0_MIPIDSIPHY1_G, "xin_osc0_mipidsiphy1_g", "xin24m", 2, 4), + GATE(CLK_WIFI_DIV, "clk_wifi_div", "clk_wifi_div_div", 2, 5), + GATE(CLK_WIFI_OSC0, "clk_wifi_osc0", "xin24m", 2, 6), + GATE(CLK_PCIEPHY0_DIV, "clk_pciephy0_div", "clk_pciephy0_div_div", 2, 7), + GATE(CLK_PCIEPHY0_OSC0, "clk_pciephy0_osc0", "xin24m", 2, 8), + GATE(CLK_PCIEPHY1_DIV, "clk_pciephy1_div", "clk_pciephy1_div_div", 2, 9), + GATE(CLK_PCIEPHY1_OSC0, "clk_pciephy1_osc0", "xin24m", 2, 10), + GATE(CLK_PCIEPHY2_DIV, "clk_pciephy2_div", "clk_pciephy2_div_div", 2, 11), + GATE(CLK_PCIEPHY2_OSC0, "clk_pciephy2_osc0", "xin24m", 2, 12), + GATE(CLK_PCIE30PHY_REF_M, "clk_pcie30phy_ref_m", "ppll_ph0", 2, 13), + GATE(CLK_PCIE30PHY_REF_N, "clk_pcie30phy_ref_n", "ppll_ph180", 2, 14), + GATE(XIN_OSC0_EDPPHY_G, "xin_osc0_edpphy_g", "xin24m", 2, 15), }; static int From nobody Wed Oct 18 14:34:22 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJb0wN4z4x6Wx; Wed, 18 Oct 2023 14:34: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 4S9YJb0Z16z3TMp; Wed, 18 Oct 2023 14:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QFf5pjf4FuJhR6bWlTNB7a9RnMizasp8/DdBXu2EJiE=; b=FfCN6lql74XlTvOrHDQYUC9FqjjwmdgUG7zYVJxbAaZ81eEekCmUe2aGzkRdNJKNrwYkA4 m/Gbh1njPClzLBrJ2C84Tx0E71gzXBEKR15cpD4i+bRHlMuubMhPm786LO29Lt/kSKvFRf SMQeNAojEe36qStTRhE9nYPkI8iiYHGsvJh8SG6vS/imLELGoF8JysO7pccoGFCMUm4xLp XYba0bHhjjO42sNZ/jmkOZN0UF4nUsPfwKnIQZAD/rLm6QVvxUqJ4GCNROBg8bHlXR8/Mw 5sr1/keTi47i3Obgm9N+h9zAVIfcoQ7cE7b3HtLBKnef4lo780TxvYMp9925dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639663; a=rsa-sha256; cv=none; b=iFK195GsnUhTmSzQnXwbUGwo5W+IH2bMk3HKAarVx9aoStMKIz+VFLKSzIz4CiQgL12Gik WibdtRsrYmDTzClUfvEX57Lv6Rou1LDmAWak0ZQ2IoTODN6VeKSJNr3spJDgxByWtSx3qB vg2HglwTopX6Fy/vHN9HntpNz4jVXhYkqRUguy6++WS62efOJgJc7UPpA3pqHlfxmff/y0 z919/wOa5FKchs+PUtxJYKkQPd6zlHwRLoctkHhntNplD/ByVr3fRvhIodwSJyen7I4KbY eRyP76U+4MZ1+Q4SLAbHkAq0bLI053VCCql5IaQhD+PlNDfVPgfn00j6yrU/jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QFf5pjf4FuJhR6bWlTNB7a9RnMizasp8/DdBXu2EJiE=; b=byPv2XnLnvG7mTCk8uDe4+uior7Ta4QFHW6GmPwBEUfs/lJIctmZSiBvrlbOHdLw9gbbr6 g9rFaZDwdwpvSMWjvz1R5CQ549LI1k1Z+NBcN0YH0FDi30UqaXLTWVW5oKSWFqHCzHF0g2 ZQOFED8LUz0393UxhZGtqMjIUYmeCJBS+X6X5O4NO6pyk+KJSolgsIRxzeEM1eB0211rG6 tu5uCEXMcgYyrmdJF0ty50bXM16plW3ZSeyIA1dnRJt+Ax9a8y+xePxbhGKn1tZxAgfpTn VbUVmBlRGzPelJyaQB0EDzyQx+ZVBlIejcXSgGG0t/XvpB5UfW9Un7ZV2KRV8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJZ6jkwz18bn; Wed, 18 Oct 2023 14:34: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 39IEYMsg092463; Wed, 18 Oct 2023 14:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYMMP092460; Wed, 18 Oct 2023 14:34:22 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:22 GMT Message-Id: <202310181434.39IEYMMP092460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 4bb49357e094 - stable/14 - arm64: rockchip: rk3568_cru: Rewrite List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4bb49357e094afad2d616197e150c4788a9ab0ed Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4bb49357e094afad2d616197e150c4788a9ab0ed commit 4bb49357e094afad2d616197e150c4788a9ab0ed Author: Emmanuel Vadot AuthorDate: 2023-08-15 08:26:29 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:28 +0000 arm64: rockchip: rk3568_cru: Rewrite Rewrite correctly the clocks for cru : - Export all clocks - Use names from the TRM - Respect clock topology Fixes: a48301a5e094 ("Add initial clocks support for Rockchip RK3568 SoC.") (cherry picked from commit 50a0f1ce28b7f04fc23915fb06124242632a013c) --- sys/arm64/rockchip/clk/rk3568_cru.c | 1991 +++++++++++++++++++------------- sys/arm64/rockchip/clk/rk3568_pmucru.c | 2 - 2 files changed, 1184 insertions(+), 809 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3568_cru.c b/sys/arm64/rockchip/clk/rk3568_cru.c index 4b91e066dcf0..f5992323c3bd 100644 --- a/sys/arm64/rockchip/clk/rk3568_cru.c +++ b/sys/arm64/rockchip/clk/rk3568_cru.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2021, 2022 Soren Schmidt + * Copyright (c) 2023, Emmanuel Vadot * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -47,12 +48,10 @@ #define RK3568_PLLSEL_CON(x) ((x) * 0x20) -#define RK3568_CLKSEL_CON(x) ((x) * 0x4 + 0x100) -#define RK3568_CLKGATE_CON(x) ((x) * 0x4 + 0x300) +#define CRU_CLKSEL_CON(x) ((x) * 0x4 + 0x100) +#define CRU_CLKGATE_CON(x) ((x) * 0x4 + 0x300) #define RK3568_SOFTRST_CON(x) ((x) * 0x4 + 0x400) -#define PNAME(_name) static const char *_name[] - #define RK_PLLRATE(_hz, _ref, _fb, _post1, _post2, _dspd) \ { \ .freq = _hz, \ @@ -80,165 +79,6 @@ }, \ } -/* Clock for ARM core(s) */ -#define RK_ARMDIV(_id, _nm, _pn, _r, _off, _ds, _dw, _ms, _mw, _mp, _ap)\ -{ \ - .type = RK_CLK_ARMCLK, \ - .clk.armclk = &(struct rk_clk_armclk_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _nm, \ - .clkdef.parent_names = _pn, \ - .clkdef.parent_cnt = nitems(_pn), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_off), \ - .mux_shift = _ms, \ - .mux_width = _mw, \ - .div_shift = _ds, \ - .div_width = _dw, \ - .main_parent = _mp, \ - .alt_parent = _ap, \ - .rates = _r, \ - .nrates = nitems(_r), \ - }, \ -} - -/* Composite */ -#define RK_COMPOSITE(_id, _name, _pnames, _o, _ms, _mw, _ds, _dw, _go, _gw,_f)\ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .mux_shift = _ms, \ - .mux_width = _mw, \ - .div_shift = _ds, \ - .div_width = _dw, \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_COMPOSITE_HAVE_MUX | \ - RK_CLK_COMPOSITE_HAVE_GATE | _f, \ - }, \ -} - -/* Composite no mux */ -#define RK_COMPNOMUX(_id, _name, _pname, _o, _ds, _dw, _go, _gw, _f) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .div_shift = _ds, \ - .div_width = _dw, \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_COMPOSITE_HAVE_GATE | _f, \ - }, \ -} - -/* Composite no div */ -#define RK_COMPNODIV(_id, _name, _pnames, _o, _ms, _mw, _go, _gw, _f) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .mux_shift = _ms, \ - .mux_width = _mw, \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_COMPOSITE_HAVE_MUX | \ - RK_CLK_COMPOSITE_HAVE_GATE | _f, \ - }, \ -} - -/* Composite div only */ -#define RK_COMPDIV(_id, _name, _pname, _o, _ds, _dw, _f) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = RK3568_CLKSEL_CON(_o), \ - .div_shift = _ds, \ - .div_width = _dw, \ - .flags = _f, \ - }, \ -} - - -/* Fixed factor mux/div */ -#define RK_FACTOR(_id, _name, _pname, _mult, _div) \ -{ \ - .type = RK_CLK_FIXED, \ - .clk.fixed = &(struct clk_fixed_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .mult = _mult, \ - .div = _div, \ - }, \ -} - -/* Fractional */ -#define RK_FRACTION(_id, _name, _pname, _o, _go, _gw, _f) \ -{ \ - .type = RK_CLK_FRACT, \ - .clk.fract = &(struct rk_clk_fract_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = RK3568_CLKSEL_CON(_o), \ - .gate_offset = RK3568_CLKGATE_CON(_go), \ - .gate_shift = _gw, \ - .flags = RK_CLK_FRACT_HAVE_GATE | _f, \ - }, \ -} - -/* Multiplexer */ -#define RK_MUX(_id, _name, _pnames, _o, _ms, _mw, _f) \ -{ \ - .type = RK_CLK_MUX, \ - .clk.mux = &(struct rk_clk_mux_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = RK3568_CLKSEL_CON(_o), \ - .shift = _ms, \ - .width = _mw, \ - .mux_flags = _f, \ - }, \ -} - -#define RK_GATE(_id, _name, _pname, _o, _s) \ -{ \ - .id = _id, \ - .name = _name, \ - .parent_name = _pname, \ - .offset = RK3568_CLKGATE_CON(_o), \ - .shift = _s, \ -} - struct rk_clk_pll_rate rk3568_pll_rates[] = { /* _mhz, _refdiv, _fbdiv, _postdiv1, _postdiv2, _dsmpd */ RK_PLLRATE(2208000000, 1, 92, 1, 1, 1), @@ -322,113 +162,113 @@ static struct rk_clk_armclk_rates rk3568_armclk_rates[] = { }; /* Parent clock defines */ -PNAME(mux_pll_p) = { "xin24m" }; -PNAME(mux_usb480m_p) = { "xin24m", "usb480m_phy", "clk_rtc_32k" }; -PNAME(mux_armclk_p) = { "apll", "gpll" }; -PNAME(clk_i2s0_8ch_tx_p) = { "clk_i2s0_8ch_tx_src", "clk_i2s0_8ch_tx_frac", +PLIST(mux_pll_p) = { "xin24m" }; +PLIST(mux_usb480m_p) = { "xin24m", "usb480m_phy", "clk_rtc_32k" }; +PLIST(mux_armclk_p) = { "apll", "gpll" }; +PLIST(clk_i2s0_8ch_tx_p) = { "clk_i2s0_8ch_tx_src", "clk_i2s0_8ch_tx_frac", "i2s0_mclkin", "xin_osc0_half" }; -PNAME(clk_i2s0_8ch_rx_p) = { "clk_i2s0_8ch_rx_src", "clk_i2s0_8ch_rx_frac", +PLIST(clk_i2s0_8ch_rx_p) = { "clk_i2s0_8ch_rx_src", "clk_i2s0_8ch_rx_frac", "i2s0_mclkin", "xin_osc0_half" }; -PNAME(clk_i2s1_8ch_tx_p) = { "clk_i2s1_8ch_tx_src", "clk_i2s1_8ch_tx_frac", +PLIST(clk_i2s1_8ch_tx_p) = { "clk_i2s1_8ch_tx_src", "clk_i2s1_8ch_tx_frac", "i2s1_mclkin", "xin_osc0_half" }; -PNAME(clk_i2s1_8ch_rx_p) = { "clk_i2s1_8ch_rx_src", "clk_i2s1_8ch_rx_frac", +PLIST(clk_i2s1_8ch_rx_p) = { "clk_i2s1_8ch_rx_src", "clk_i2s1_8ch_rx_frac", "i2s1_mclkin", "xin_osc0_half" }; -PNAME(clk_i2s2_2ch_p) = { "clk_i2s2_2ch_src", "clk_i2s2_2ch_frac", +PLIST(clk_i2s2_2ch_p) = { "clk_i2s2_2ch_src", "clk_i2s2_2ch_frac", "i2s2_mclkin", "xin_osc0_half"}; -PNAME(clk_i2s3_2ch_tx_p) = { "clk_i2s3_2ch_tx_src", "clk_i2s3_2ch_tx_frac", +PLIST(clk_i2s3_2ch_tx_p) = { "clk_i2s3_2ch_tx_src", "clk_i2s3_2ch_tx_frac", "i2s3_mclkin", "xin_osc0_half" }; -PNAME(clk_i2s3_2ch_rx_p) = { "clk_i2s3_2ch_rx_src", "clk_i2s3_2ch_rx_frac", +PLIST(clk_i2s3_2ch_rx_p) = { "clk_i2s3_2ch_rx_src", "clk_i2s3_2ch_rx_frac", "i2s3_mclkin", "xin_osc0_half" }; -PNAME(mclk_spdif_8ch_p) = { "mclk_spdif_8ch_src", "mclk_spdif_8ch_frac" }; -PNAME(sclk_audpwm_p) = { "sclk_audpwm_src", "sclk_audpwm_frac" }; -PNAME(sclk_uart1_p) = { "clk_uart1_src", "clk_uart1_frac", "xin24m" }; -PNAME(sclk_uart2_p) = { "clk_uart2_src", "clk_uart2_frac", "xin24m" }; -PNAME(sclk_uart3_p) = { "clk_uart3_src", "clk_uart3_frac", "xin24m" }; -PNAME(sclk_uart4_p) = { "clk_uart4_src", "clk_uart4_frac", "xin24m" }; -PNAME(sclk_uart5_p) = { "clk_uart5_src", "clk_uart5_frac", "xin24m" }; -PNAME(sclk_uart6_p) = { "clk_uart6_src", "clk_uart6_frac", "xin24m" }; -PNAME(sclk_uart7_p) = { "clk_uart7_src", "clk_uart7_frac", "xin24m" }; -PNAME(sclk_uart8_p) = { "clk_uart8_src", "clk_uart8_frac", "xin24m" }; -PNAME(sclk_uart9_p) = { "clk_uart9_src", "clk_uart9_frac", "xin24m" }; -PNAME(mpll_gpll_cpll_npll_p) = { "mpll", "gpll", "cpll", "npll" }; -PNAME(gpll_cpll_npll_p) = { "gpll", "cpll", "npll" }; -PNAME(npll_gpll_p) = { "npll", "gpll" }; -PNAME(cpll_gpll_p) = { "cpll", "gpll" }; -PNAME(gpll_cpll_p) = { "gpll", "cpll" }; -PNAME(gpll_cpll_npll_vpll_p) = { "gpll", "cpll", "npll", "vpll" }; -PNAME(apll_gpll_npll_p) = { "apll", "gpll", "npll" }; -PNAME(sclk_core_pre_p) = { "sclk_core_src", "npll" }; -PNAME(gpll150_gpll100_gpll75_xin24m_p) = { "gpll_150m", "gpll_100m", "gpll_75m", +PLIST(mclk_spdif_8ch_p) = { "mclk_spdif_8ch_src", "mclk_spdif_8ch_frac" }; +PLIST(sclk_audpwm_p) = { "sclk_audpwm_src", "sclk_audpwm_frac" }; +PLIST(sclk_uart1_p) = { "clk_uart1_src", "clk_uart1_frac", "xin24m" }; +PLIST(sclk_uart2_p) = { "clk_uart2_src", "clk_uart2_frac", "xin24m" }; +PLIST(sclk_uart3_p) = { "clk_uart3_src", "clk_uart3_frac", "xin24m" }; +PLIST(sclk_uart4_p) = { "clk_uart4_src", "clk_uart4_frac", "xin24m" }; +PLIST(sclk_uart5_p) = { "clk_uart5_src", "clk_uart5_frac", "xin24m" }; +PLIST(sclk_uart6_p) = { "clk_uart6_src", "clk_uart6_frac", "xin24m" }; +PLIST(sclk_uart7_p) = { "clk_uart7_src", "clk_uart7_frac", "xin24m" }; +PLIST(sclk_uart8_p) = { "clk_uart8_src", "clk_uart8_frac", "xin24m" }; +PLIST(sclk_uart9_p) = { "clk_uart9_src", "clk_uart9_frac", "xin24m" }; +PLIST(mpll_gpll_cpll_npll_p) = { "mpll", "gpll", "cpll", "npll" }; +PLIST(gpll_cpll_npll_p) = { "gpll", "cpll", "npll" }; +PLIST(npll_gpll_p) = { "npll", "gpll" }; +PLIST(cpll_gpll_p) = { "cpll", "gpll" }; +PLIST(gpll_cpll_p) = { "gpll", "cpll" }; +PLIST(gpll_cpll_npll_vpll_p) = { "gpll", "cpll", "npll", "vpll" }; +PLIST(apll_gpll_npll_p) = { "apll", "gpll", "npll" }; +PLIST(sclk_core_pre_p) = { "sclk_core_src", "npll" }; +PLIST(gpll150_gpll100_gpll75_xin24m_p) = { "clk_gpll_div_150m", "clk_gpll_div_100m", "clk_gpll_div_75m", "xin24m" }; -PNAME(clk_gpu_pre_mux_p) = { "clk_gpu_src", "gpu_pvtpll_out" }; -PNAME(clk_npu_pre_ndft_p) = { "clk_npu_src", "dummy"}; -PNAME(clk_npu_p) = { "clk_npu_pre_ndft", "npu_pvtpll_out" }; -PNAME(dpll_gpll_cpll_p) = { "dpll", "gpll", "cpll" }; -PNAME(clk_ddr1x_p) = { "clk_ddrphy1x_src", "dpll" }; -PNAME(gpll200_gpll150_gpll100_xin24m_p) = { "gpll_200m", "gpll_150m", - "gpll_100m", "xin24m" }; -PNAME(gpll100_gpll75_gpll50_p) = { "gpll_100m", "gpll_75m", "cpll_50m" }; -PNAME(i2s0_mclkout_tx_p) = { "clk_i2s0_8ch_tx", "xin_osc0_half" }; -PNAME(i2s0_mclkout_rx_p) = { "clk_i2s0_8ch_rx", "xin_osc0_half" }; -PNAME(i2s1_mclkout_tx_p) = { "clk_i2s1_8ch_tx", "xin_osc0_half" }; -PNAME(i2s1_mclkout_rx_p) = { "clk_i2s1_8ch_rx", "xin_osc0_half" }; -PNAME(i2s2_mclkout_p) = { "clk_i2s2_2ch", "xin_osc0_half" }; -PNAME(i2s3_mclkout_tx_p) = { "clk_i2s3_2ch_tx", "xin_osc0_half" }; -PNAME(i2s3_mclkout_rx_p) = { "clk_i2s3_2ch_rx", "xin_osc0_half" }; -PNAME(mclk_pdm_p) = { "gpll_300m", "cpll_250m", "gpll_200m", "gpll_100m" }; -PNAME(clk_i2c_p) = { "gpll_200m", "gpll_100m", "xin24m", "cpll_100m" }; -PNAME(gpll200_gpll150_gpll100_p) = { "gpll_200m", "gpll_150m", "gpll_100m" }; -PNAME(gpll300_gpll200_gpll100_p) = { "gpll_300m", "gpll_200m", "gpll_100m" }; -PNAME(clk_nandc_p) = { "gpll_200m", "gpll_150m", "cpll_100m", "xin24m" }; -PNAME(sclk_sfc_p) = { "xin24m", "cpll_50m", "gpll_75m", "gpll_100m", - "cpll_125m", "gpll_150m" }; -PNAME(gpll200_gpll150_cpll125_p) = { "gpll_200m", "gpll_150m", "cpll_125m" }; -PNAME(cclk_emmc_p) = { "xin24m", "gpll_200m", "gpll_150m", "cpll_100m", - "cpll_50m", "clk_osc0_div_375k" }; -PNAME(aclk_pipe_p) = { "gpll_400m", "gpll_300m", "gpll_200m", "xin24m" }; -PNAME(gpll200_cpll125_p) = { "gpll_200m", "cpll_125m" }; -PNAME(gpll300_gpll200_gpll100_xin24m_p) = { "gpll_300m", "gpll_200m", - "gpll_100m", "xin24m" }; -PNAME(clk_sdmmc_p) = { "xin24m", "gpll_400m", "gpll_300m", "cpll_100m", - "cpll_50m", "clk_osc0_div_750k" }; -PNAME(cpll125_cpll50_cpll25_xin24m_p) = { "cpll_125m", "cpll_50m", "cpll_25m", +PLIST(clk_gpu_pre_mux_p) = { "clk_gpu_src", "gpu_pvtpll_out" }; +PLIST(clk_npu_pre_ndft_p) = { "clk_npu_src", "clk_npu_np5"}; +PLIST(clk_npu_p) = { "clk_npu_pre_ndft", "npu_pvtpll_out" }; +PLIST(dpll_gpll_cpll_p) = { "dpll", "gpll", "cpll" }; +PLIST(clk_ddr1x_p) = { "clk_ddrphy1x_src", "dpll" }; +PLIST(gpll200_gpll150_gpll100_xin24m_p) = { "clk_gpll_div_200m", "clk_gpll_div_150m", + "clk_gpll_div_100m", "xin24m" }; +PLIST(gpll100_gpll75_gpll50_p) = { "clk_gpll_div_100m", "clk_gpll_div_75m", "clk_cpll_div_50m" }; +PLIST(i2s0_mclkout_tx_p) = { "clk_i2s0_8ch_tx", "xin_osc0_half" }; +PLIST(i2s0_mclkout_rx_p) = { "clk_i2s0_8ch_rx", "xin_osc0_half" }; +PLIST(i2s1_mclkout_tx_p) = { "clk_i2s1_8ch_tx", "xin_osc0_half" }; +PLIST(i2s1_mclkout_rx_p) = { "clk_i2s1_8ch_rx", "xin_osc0_half" }; +PLIST(i2s2_mclkout_p) = { "clk_i2s2_2ch", "xin_osc0_half" }; +PLIST(i2s3_mclkout_tx_p) = { "clk_i2s3_2ch_tx", "xin_osc0_half" }; +PLIST(i2s3_mclkout_rx_p) = { "clk_i2s3_2ch_rx", "xin_osc0_half" }; +PLIST(mclk_pdm_p) = { "clk_gpll_div_300m", "clk_cpll_div_250m", "clk_gpll_div_200m", "clk_gpll_div_100m" }; +PLIST(clk_i2c_p) = { "clk_gpll_div_200m", "clk_gpll_div_100m", "xin24m", "clk_cpll_div_100m" }; +PLIST(gpll200_gpll150_gpll100_p) = { "clk_gpll_div_200m", "clk_gpll_div_150m", "clk_gpll_div_100m" }; +PLIST(gpll300_gpll200_gpll100_p) = { "clk_gpll_div_300m", "clk_gpll_div_200m", "clk_gpll_div_100m" }; +PLIST(clk_nandc_p) = { "clk_gpll_div_200m", "clk_gpll_div_150m", "clk_cpll_div_100m", "xin24m" }; +PLIST(sclk_sfc_p) = { "xin24m", "clk_cpll_div_50m", "clk_gpll_div_75m", "clk_gpll_div_100m", + "clk_cpll_div_125m", "clk_gpll_div_150m" }; +PLIST(gpll200_gpll150_cpll125_p) = { "clk_gpll_div_200m", "clk_gpll_div_150m", "clk_cpll_div_125m" }; +PLIST(cclk_emmc_p) = { "xin24m", "clk_gpll_div_200m", "clk_gpll_div_150m", "clk_cpll_div_100m", + "clk_cpll_div_50m", "clk_osc0_div_375k" }; +PLIST(aclk_pipe_p) = { "clk_gpll_div_400m", "clk_gpll_div_300m", "clk_gpll_div_200m", "xin24m" }; +PLIST(gpll200_cpll125_p) = { "clk_gpll_div_200m", "clk_cpll_div_125m" }; +PLIST(gpll300_gpll200_gpll100_xin24m_p) = { "clk_gpll_div_300m", "clk_gpll_div_200m", + "clk_gpll_div_100m", "xin24m" }; +PLIST(clk_sdmmc_p) = { "xin24m", "clk_gpll_div_400m", "clk_gpll_div_300m", "clk_cpll_div_100m", + "clk_cpll_div_50m", "clk_osc0_div_750k" }; +PLIST(cpll125_cpll50_cpll25_xin24m_p) = { "clk_cpll_div_125m", "clk_cpll_div_50m", "clk_cpll_div_25m", "xin24m" }; -PNAME(clk_gmac_ptp_p) = { "cpll_62p5", "gpll_100m", "cpll_50m", "xin24m" }; -PNAME(cpll333_gpll300_gpll200_p) = { "cpll_333m", "gpll_300m", "gpll_200m" }; -PNAME(cpll_gpll_hpll_p) = { "cpll", "gpll", "hpll" }; -PNAME(gpll_usb480m_xin24m_p) = { "gpll", "usb480m", "xin24m", "xin24m" }; -PNAME(gpll300_cpll250_gpll100_xin24m_p) = { "gpll_300m", "cpll_250m", - "gpll_100m", "xin24m" }; -PNAME(cpll_gpll_hpll_vpll_p) = { "cpll", "gpll", "hpll", "vpll" }; -PNAME(hpll_vpll_gpll_cpll_p) = { "hpll", "vpll", "gpll", "cpll" }; -PNAME(gpll400_cpll333_gpll200_p) = { "gpll_400m", "cpll_333m", "gpll_200m" }; -PNAME(gpll100_gpll75_cpll50_xin24m_p) = { "gpll_100m", "gpll_75m", "cpll_50m", +PLIST(clk_gmac_ptp_p) = { "clk_cpll_div_62P5m", "clk_gpll_div_100m", "clk_cpll_div_50m", "xin24m" }; +PLIST(cpll333_gpll300_gpll200_p) = { "clk_cpll_div_333m", "clk_gpll_div_300m", "clk_gpll_div_200m" }; +PLIST(cpll_gpll_hpll_p) = { "cpll", "gpll", "hpll" }; +PLIST(gpll_usb480m_xin24m_p) = { "gpll", "usb480m", "xin24m", "xin24m" }; +PLIST(gpll300_cpll250_gpll100_xin24m_p) = { "clk_gpll_div_300m", "clk_cpll_div_250m", + "clk_gpll_div_100m", "xin24m" }; +PLIST(cpll_gpll_hpll_vpll_p) = { "cpll", "gpll", "hpll", "vpll" }; +PLIST(hpll_vpll_gpll_cpll_p) = { "hpll", "vpll", "gpll", "cpll" }; +PLIST(gpll400_cpll333_gpll200_p) = { "clk_gpll_div_400m", "clk_cpll_div_333m", "clk_gpll_div_200m" }; +PLIST(gpll100_gpll75_cpll50_xin24m_p) = { "clk_gpll_div_100m", "clk_gpll_div_75m", "clk_cpll_div_50m", "xin24m" }; -PNAME(xin24m_gpll100_cpll100_p) = { "xin24m", "gpll_100m", "cpll_100m" }; -PNAME(gpll_cpll_usb480m_p) = { "gpll", "cpll", "usb480m" }; -PNAME(gpll100_xin24m_cpll100_p) = { "gpll_100m", "xin24m", "cpll_100m" }; -PNAME(gpll200_xin24m_cpll100_p) = { "gpll_200m", "xin24m", "cpll_100m" }; -PNAME(xin24m_32k_p) = { "xin24m", "clk_rtc_32k" }; -PNAME(cpll500_gpll400_gpll300_xin24m_p) = { "cpll_500m", "gpll_400m", - "gpll_300m", "xin24m" }; -PNAME(gpll400_gpll300_gpll200_xin24m_p) = { "gpll_400m", "gpll_300m", - "gpll_200m", "xin24m" }; -PNAME(xin24m_cpll100_p) = { "xin24m", "cpll_100m" }; -PNAME(mux_gmac0_p) = { "clk_mac0_2top", "gmac0_clkin" }; -PNAME(mux_gmac0_rgmii_speed_p) = { "clk_gmac0", "clk_gmac0", +PLIST(xin24m_gpll100_cpll100_p) = { "xin24m", "clk_gpll_div_100m", "clk_cpll_div_100m" }; +PLIST(gpll_cpll_usb480m_p) = { "gpll", "cpll", "usb480m" }; +PLIST(gpll100_xin24m_cpll100_p) = { "clk_gpll_div_100m", "xin24m", "clk_cpll_div_100m" }; +PLIST(gpll200_xin24m_cpll100_p) = { "clk_gpll_div_200m", "xin24m", "clk_cpll_div_100m" }; +PLIST(xin24m_32k_p) = { "xin24m", "clk_rtc_32k" }; +PLIST(cpll500_gpll400_gpll300_xin24m_p) = { "clk_cpll_div_500m", "clk_gpll_div_400m", + "clk_gpll_div_300m", "xin24m" }; +PLIST(gpll400_gpll300_gpll200_xin24m_p) = { "clk_gpll_div_400m", "clk_gpll_div_300m", + "clk_gpll_div_200m", "xin24m" }; +PLIST(xin24m_cpll100_p) = { "xin24m", "clk_cpll_div_100m" }; +PLIST(mux_gmac0_p) = { "clk_mac0_2top", "gmac0_clkin" }; +PLIST(mux_gmac0_rgmii_speed_p) = { "clk_gmac0", "clk_gmac0", "clk_gmac0_tx_div50", "clk_gmac0_tx_div5" }; -PNAME(mux_gmac0_rmii_speed_p) = { "clk_gmac0_rx_div20", "clk_gmac0_rx_div2" }; -PNAME(mux_gmac0_rx_tx_p) = { "clk_gmac0_rgmii_speed", "clk_gmac0_rmii_speed", +PLIST(mux_gmac0_rmii_speed_p) = { "clk_gmac0_rx_div20", "clk_gmac0_rx_div2" }; +PLIST(mux_gmac0_rx_tx_p) = { "clk_gmac0_rgmii_speed", "clk_gmac0_rmii_speed", "clk_gmac0_xpcs_mii" }; -PNAME(mux_gmac1_p) = { "clk_mac1_2top", "gmac1_clkin" }; -PNAME(mux_gmac1_rgmii_speed_p) = { "clk_gmac1", "clk_gmac1", +PLIST(mux_gmac1_p) = { "clk_mac1_2top", "gmac1_clkin" }; +PLIST(mux_gmac1_rgmii_speed_p) = { "clk_gmac1", "clk_gmac1", "clk_gmac1_tx_div50", "clk_gmac1_tx_div5" }; -PNAME(mux_gmac1_rmii_speed_p) = { "clk_gmac1_rx_div20", "clk_gmac1_rx_div2" }; -PNAME(mux_gmac1_rx_tx_p) = { "clk_gmac1_rgmii_speed", "clk_gmac1_rmii_speed", +PLIST(mux_gmac1_rmii_speed_p) = { "clk_gmac1_rx_div20", "clk_gmac1_rx_div2" }; +PLIST(mux_gmac1_rx_tx_p) = { "clk_gmac1_rgmii_speed", "clk_gmac1_rmii_speed", "clk_gmac1_xpcs_mii" }; -PNAME(clk_mac_2top_p) = { "cpll_125m", "cpll_50m", "cpll_25m", "ppll" }; -PNAME(aclk_rkvdec_pre_p) = { "gpll", "cpll" }; -PNAME(clk_rkvdec_core_p) = { "gpll", "cpll", "npll", "vpll" }; +PLIST(clk_mac_2top_p) = { "clk_cpll_div_125m", "clk_cpll_div_50m", "clk_cpll_div_25m", "ppll" }; +PLIST(aclk_rkvdec_pre_p) = { "gpll", "cpll" }; +PLIST(clk_rkvdec_core_p) = { "gpll", "cpll", "npll", "vpll" }; /* CLOCKS */ static struct rk_clk rk3568_clks[] = { @@ -436,7 +276,7 @@ static struct rk_clk rk3568_clks[] = { LINK("xin24m"), LINK("clk_rtc_32k"), LINK("usb480m_phy"), - LINK("mpll"), // SOS SCRU + LINK("mpll"), /* It lives in SCRU */ LINK("i2s0_mclkin"), LINK("i2s1_mclkin"), LINK("i2s2_mclkin"), @@ -456,563 +296,1100 @@ static struct rk_clk rk3568_clks[] = { RK_PLL(PLL_CPLL, "cpll", mux_pll_p, 3, 4), RK_PLL(PLL_NPLL, "npll", mux_pll_p, 4, 10), RK_PLL(PLL_VPLL, "vpll", mux_pll_p, 5, 12), - RK_ARMDIV(ARMCLK, "armclk", mux_armclk_p, rk3568_armclk_rates, 0, 0, 5, + ARMDIV(ARMCLK, "armclk", mux_armclk_p, rk3568_armclk_rates, 0, 0, 5, 6, 1, 0, 1), - RK_FACTOR(0, "clk_osc0_div_375k", "clk_osc0_div_750k", 1, 2), - RK_FACTOR(0, "xin_osc0_half", "xin24m", 1, 2), - RK_MUX(USB480M, "usb480m", mux_usb480m_p, -16, 14, 2, 0), + FFACT(0, "clk_osc0_div_375k", "clk_osc0_div_750k", 1, 2), + FFACT(0, "xin_osc0_half", "xin24m", 1, 2), + MUX(USB480M, "usb480m", mux_usb480m_p, 0, -16, 14, 2), /* Clocks */ - RK_COMPNOMUX(0, "gpll_400m", "gpll", 75, 0, 5, 35, 0, 0), - RK_COMPNOMUX(0, "gpll_300m", "gpll", 75, 8, 5, 35, 1, 0), - RK_COMPNOMUX(0, "gpll_200m", "gpll", 76, 0, 5, 35, 2, 0), - RK_COMPNOMUX(0, "gpll_150m", "gpll", 76, 8, 5, 35, 3, 0), - RK_COMPNOMUX(0, "gpll_100m", "gpll", 77, 0, 5, 35, 4, 0), - RK_COMPNOMUX(0, "gpll_75m", "gpll", 77, 8, 5, 35, 5, 0), - RK_COMPNOMUX(0, "gpll_20m", "gpll", 78, 0, 6, 35, 6, 0), - RK_COMPNOMUX(CPLL_500M, "cpll_500m", "cpll", 78, 8, 5, 35, 7, 0), - RK_COMPNOMUX(CPLL_333M, "cpll_333m", "cpll", 79, 0, 5, 35, 8, 0), - RK_COMPNOMUX(CPLL_250M, "cpll_250m", "cpll", 79, 8, 5, 35, 9, 0), - RK_COMPNOMUX(CPLL_125M, "cpll_125m", "cpll", 80, 0, 5, 35, 10, 0), - RK_COMPNOMUX(CPLL_100M, "cpll_100m", "cpll", 82, 0, 5, 35, 11, 0), - RK_COMPNOMUX(CPLL_62P5M, "cpll_62p5", "cpll", 80, 8, 5, 35, 12, 0), - RK_COMPNOMUX(CPLL_50M, "cpll_50m", "cpll", 81, 0, 5, 35, 13, 0), - RK_COMPNOMUX(CPLL_25M, "cpll_25m", "cpll", 81, 8, 6, 35, 14, 0), - RK_COMPNOMUX(0, "clk_osc0_div_750k", "xin24m", 82, 8, 6, 35, 15, 0), - RK_COMPOSITE(0, "sclk_core_src", apll_gpll_npll_p, 2, 8, 2, 0, 4, 0, - 5, 0), - RK_COMPNODIV(0, "sclk_core", sclk_core_pre_p, 2, 15, 1, 0, 7, 0), - RK_COMPNOMUX(0, "atclk_core", "armclk", 3, 0, 5, 0, 8, 0), - RK_COMPNOMUX(0, "gicclk_core", "armclk", 3, 8, 5, 0, 9, 0), - RK_COMPNOMUX(0, "pclk_core_pre", "armclk", 4, 0, 5, 0, 10, 0), - RK_COMPNOMUX(0, "periphclk_core_pre", "armclk", 4, 8, 5, 0, 11, 0), - RK_COMPNOMUX(0, "tsclk_core", "periphclk_core_pre", 5, 0, 4, 0, 14, 0), - RK_COMPNOMUX(0, "cntclk_core", "periphclk_core_pre", 5, 4, 4, 0, 15, 0), - RK_COMPNOMUX(0, "aclk_core", "sclk_core", 5, 8, 5, 1, 0, 0), - RK_COMPNODIV(ACLK_CORE_NIU2BUS, "aclk_core_niu2bus", - gpll150_gpll100_gpll75_xin24m_p, 5, 14, 2, 1, 2, 0), - RK_COMPOSITE(CLK_GPU_SRC, "clk_gpu_src", mpll_gpll_cpll_npll_p, 6, 6, 2, - 0, 4, 2, 0, 0), - RK_MUX(CLK_GPU_PRE_MUX, "clk_gpu_pre_mux", clk_gpu_pre_mux_p, 6, 11, - 1, 0), - RK_COMPDIV(ACLK_GPU_PRE, "aclk_gpu_pre", "clk_gpu_pre_mux", 6, 8, 2, 0), - RK_COMPDIV(PCLK_GPU_PRE, "pclk_gpu_pre", "clk_gpu_pre_mux", 6, 12, 4,0), - RK_COMPOSITE(CLK_NPU_SRC, "clk_npu_src", npll_gpll_p, 7, 6, 1, 0, 4, 3, - 0, 0), - RK_MUX(CLK_NPU_PRE_NDFT, "clk_npu_pre_ndft", clk_npu_pre_ndft_p, 7, 8, - 1, 0), - RK_MUX(CLK_NPU, "clk_npu", clk_npu_p, 7, 15, 1, 0), - RK_COMPNOMUX(HCLK_NPU_PRE, "hclk_npu_pre", "clk_npu", 8, 0, 4, 3, 2, 0), - RK_COMPNOMUX(PCLK_NPU_PRE, "pclk_npu_pre", "clk_npu", 8, 4, 4, 3, 3, 0), - RK_COMPOSITE(CLK_DDRPHY1X_SRC, "clk_ddrphy1x_src", dpll_gpll_cpll_p, 9, - 6, 2, 0, 5, 4, 0, 0), - RK_MUX(CLK_DDR1X, "clk_ddr1x", clk_ddr1x_p, 9, 15, 1, - RK_CLK_COMPOSITE_GRF), - RK_COMPNOMUX(CLK_MSCH, "clk_msch", "clk_ddr1x", 10, 0, 2, 4, 2, 0), - RK_COMPNODIV(ACLK_GIC_AUDIO, "aclk_gic_audio", - gpll200_gpll150_gpll100_xin24m_p, 10, 8, 2, 5, 0, 0), - RK_COMPNODIV(HCLK_GIC_AUDIO, "hclk_gic_audio", - gpll150_gpll100_gpll75_xin24m_p, 10, 10, 2, 5, 1, 0), - RK_COMPNODIV(DCLK_SDMMC_BUFFER, "dclk_sdmmc_buffer", - gpll100_gpll75_gpll50_p, 10, 12, 2, 5, 9, 0), - RK_COMPOSITE(CLK_I2S0_8CH_TX_SRC, "clk_i2s0_8ch_tx_src", - gpll_cpll_npll_p, 11, 8, 2, 0, 7, 6, 0, 0), - RK_MUX(CLK_I2S0_8CH_TX, "clk_i2s0_8ch_tx", clk_i2s0_8ch_tx_p, 11, 10, - 2, 0), - RK_FRACTION(CLK_I2S0_8CH_TX_FRAC, "clk_i2s0_8ch_tx_frac", - "clk_i2s0_8ch_tx_src", 12, 6, 1, 0), - RK_COMPNODIV(I2S0_MCLKOUT_TX, "i2s0_mclkout_tx", i2s0_mclkout_tx_p, 11, - 15, 1, 6, 3, 0), - RK_COMPOSITE(CLK_I2S0_8CH_RX_SRC, "clk_i2s0_8ch_rx_src", - gpll_cpll_npll_p, 13, 8, 2, 0, 7, 6, 4, 0), - RK_MUX(CLK_I2S0_8CH_RX, "clk_i2s0_8ch_rx", clk_i2s0_8ch_rx_p, 13, 10, - 2, 0), - RK_FRACTION(CLK_I2S0_8CH_RX_FRAC, "clk_i2s0_8ch_rx_frac", - "clk_i2s0_8ch_rx_src", 14, 6, 5, 0), - RK_COMPNODIV(I2S0_MCLKOUT_RX, "i2s0_mclkout_rx", i2s0_mclkout_rx_p, 13, - 15, 1, 6, 7, 0), - RK_COMPOSITE(CLK_I2S1_8CH_TX_SRC, "clk_i2s1_8ch_tx_src", - gpll_cpll_npll_p, 15, 8, 2, 0, 7, 6, 8, 0), - RK_MUX(CLK_I2S1_8CH_TX, "clk_i2s1_8ch_tx", clk_i2s1_8ch_tx_p, 15, 10, - 2, 0), - RK_FRACTION(CLK_I2S1_8CH_TX_FRAC, "clk_i2s1_8ch_tx_frac", - "clk_i2s1_8ch_tx_src", 16, 6, 9, 0), - RK_COMPNODIV(I2S1_MCLKOUT_TX, "i2s1_mclkout_tx", i2s1_mclkout_tx_p, 15, - 15, 1, 6, 11, 0), - RK_COMPOSITE(CLK_I2S1_8CH_RX_SRC, "clk_i2s1_8ch_rx_src", - gpll_cpll_npll_p, 17, 8, 2, 0, 7, 6, 12, 0), - RK_MUX(CLK_I2S1_8CH_RX, "clk_i2s1_8ch_rx", clk_i2s1_8ch_rx_p, 17, 10, - 2, 0), - RK_FRACTION(CLK_I2S1_8CH_RX_FRAC, "clk_i2s1_8ch_rx_frac", - "clk_i2s1_8ch_rx_src", 18, 6, 13, 0), - RK_COMPNODIV(I2S1_MCLKOUT_RX, "i2s1_mclkout_rx", i2s1_mclkout_rx_p, 17, - 15, 1, 6, 15, 0), - RK_COMPOSITE(CLK_I2S2_2CH_SRC, "clk_i2s2_2ch_src", gpll_cpll_npll_p, 19, - 8, 2, 0, 7, 7, 0, 0), - RK_MUX(CLK_I2S2_2CH, "clk_i2s2_2ch", clk_i2s2_2ch_p, 19, 10, 2, 0), - RK_FRACTION(CLK_I2S2_2CH_FRAC, "clk_i2s2_2ch_frac", "clk_i2s2_2ch_src", - 20, 7, 1, 0), - RK_COMPNODIV(I2S2_MCLKOUT, "i2s2_mclkout", i2s2_mclkout_p, 19, 15, 1, 7, - 3, 0), - RK_COMPOSITE(CLK_I2S3_2CH_TX_SRC, "clk_i2s3_2ch_tx_src", - gpll_cpll_npll_p, 21, 8, 2, 0, 7, 7, 4, 0), - RK_MUX(CLK_I2S3_2CH_TX, "clk_i2s3_2ch_tx", clk_i2s3_2ch_tx_p, 21, 10, - 2, 0), - RK_FRACTION(CLK_I2S3_2CH_TX_FRAC, "clk_i2s3_2ch_tx_frac", - "clk_i2s3_2ch_tx_src", 22, 7, 5, 0), - RK_COMPNODIV(I2S3_MCLKOUT_TX, "i2s3_mclkout_tx", i2s3_mclkout_tx_p, 21, - 15, 1, 7, 7, 0), - RK_COMPOSITE(CLK_I2S3_2CH_RX_SRC, "clk_i2s3_2ch_rx_src", - gpll_cpll_npll_p, 83, 8, 2, 0, 7, 7, 8, 0), - RK_MUX(CLK_I2S3_2CH_RX, "clk_i2s3_2ch_rx", clk_i2s3_2ch_rx_p, 83, 10, - 2, 0), - RK_FRACTION(CLK_I2S3_2CH_RX_FRAC, "clk_i2s3_2ch_rx_frac", - "clk_i2s3_2ch_rx_src", 84, 7, 9, 0), - RK_COMPNODIV(I2S3_MCLKOUT_RX, "i2s3_mclkout_rx", i2s3_mclkout_rx_p, 83, - 15, 1, 7, 11, 0), - RK_COMPNODIV(MCLK_PDM, "mclk_pdm", mclk_pdm_p, 23, 8, 2, 5, 15, 0), - RK_COMPOSITE(MCLK_SPDIF_8CH_SRC, "mclk_spdif_8ch_src", cpll_gpll_p, 23, - 14, 1, 0, 7, 7, 14, 0), - RK_MUX(MCLK_SPDIF_8CH, "mclk_spdif_8ch", mclk_spdif_8ch_p, 23, 15, 1,0), - RK_FRACTION(MCLK_SPDIF_8CH_FRAC, "mclk_spdif_8ch_frac", - "mclk_spdif_8ch_src", 24, 7, 15, 0), - RK_COMPOSITE(SCLK_AUDPWM_SRC, "sclk_audpwm_src", gpll_cpll_p, 25, 14, 1, - 0, 6, 8, 1, 0), - RK_MUX(SCLK_AUDPWM, "sclk_audpwm", sclk_audpwm_p, 25, 15, 1, 0), - RK_FRACTION(SCLK_AUDPWM_FRAC, "sclk_audpwm_frac", "sclk_audpwm_src", 26, - 8, 2, 0), - RK_COMPNODIV(CLK_ACDCDIG_I2C, "clk_acdcdig_i2c", clk_i2c_p, 23, 10, 2, - 8, 4, 0), - RK_COMPNODIV(ACLK_SECURE_FLASH, "aclk_secure_flash", - gpll200_gpll150_gpll100_xin24m_p, 27, 0, 2, 8, 7, 0), - RK_COMPNODIV(HCLK_SECURE_FLASH, "hclk_secure_flash", - gpll150_gpll100_gpll75_xin24m_p, 27, 2, 2, 8, 8, 0), - RK_COMPNODIV(CLK_CRYPTO_NS_CORE, "clk_crypto_ns_core", - gpll200_gpll150_gpll100_p, 27, 4, 2, 8, 13, 0), - RK_COMPNODIV(CLK_CRYPTO_NS_PKA, "clk_crypto_ns_pka", - gpll300_gpll200_gpll100_p, 27, 6, 2, 8, 14, 0), - RK_COMPNODIV(NCLK_NANDC, "nclk_nandc", clk_nandc_p, 28, 0, 2, 9, 1, 0), - RK_COMPNODIV(SCLK_SFC, "sclk_sfc", sclk_sfc_p, 28, 4, 3, 9, 4, 0), - RK_COMPNODIV(BCLK_EMMC, "bclk_emmc", gpll200_gpll150_cpll125_p, 28, 8, - 2, 9, 7, 0), - RK_COMPNODIV(CCLK_EMMC, "cclk_emmc", cclk_emmc_p, 28, 12, 3, 9, 8, 0), - RK_COMPNODIV(ACLK_PIPE, "aclk_pipe", aclk_pipe_p, 29, 0, 2, 10, 0, 0), - RK_COMPNOMUX(PCLK_PIPE, "pclk_pipe", "aclk_pipe", 29, 4, 4, 10, 1, 0), - RK_COMPNODIV(CLK_USB3OTG0_SUSPEND, "clk_usb3otg0_suspend", xin24m_32k_p, - 29, 8, 1, 10, 10, 0), - RK_COMPNODIV(CLK_USB3OTG1_SUSPEND, "clk_usb3otg1_suspend", xin24m_32k_p, - 29, 9, 1, 10, 14, 0), - RK_COMPNODIV(CLK_XPCS_EEE, "clk_xpcs_eee", gpll200_cpll125_p, 29, 13, 1, - 10, 4, 0), - RK_COMPNODIV(ACLK_PHP, "aclk_php", gpll300_gpll200_gpll100_xin24m_p, 30, - 0, 2, 14, 8, 0), - RK_COMPNODIV(HCLK_PHP, "hclk_php", gpll150_gpll100_gpll75_xin24m_p, 30, - 2, 2, 14, 9, 0), - RK_COMPNOMUX(PCLK_PHP, "pclk_php", "aclk_php", 30, 4, 4, 14, 10, 0), - RK_COMPNODIV(CLK_SDMMC0, "clk_sdmmc0", clk_sdmmc_p, 30, 8, 3, 15, 1, 0), - RK_COMPNODIV(CLK_SDMMC1, "clk_sdmmc1", clk_sdmmc_p, 30, 12, 3, 15, 3,0), - RK_COMPNODIV(CLK_MAC0_2TOP, "clk_mac0_2top", clk_mac_2top_p, 31, 8, 2, - 15, 7, 0), - RK_COMPNODIV(CLK_MAC0_OUT, "clk_mac0_out", - cpll125_cpll50_cpll25_xin24m_p, 31, 14, 2, 15, 8, 0), - RK_COMPNODIV(CLK_GMAC0_PTP_REF, "clk_gmac0_ptp_ref", clk_gmac_ptp_p, 31, - 12, 2, 15, 4, 0), - RK_MUX(SCLK_GMAC0, "clk_gmac0", mux_gmac0_p, 31, 2, 1, 0), - RK_FACTOR(0, "clk_gmac0_tx_div5", "clk_gmac0", 1, 5), - RK_FACTOR(0, "clk_gmac0_tx_div50", "clk_gmac0", 1, 50), - RK_FACTOR(0, "clk_gmac0_rx_div2", "clk_gmac0", 1, 2), - RK_FACTOR(0, "clk_gmac0_rx_div20", "clk_gmac0", 1, 20), - RK_MUX(SCLK_GMAC0_RGMII_SPEED, "clk_gmac0_rgmii_speed", - mux_gmac0_rgmii_speed_p, 31, 4, 2, 0), - RK_MUX(SCLK_GMAC0_RMII_SPEED, "clk_gmac0_rmii_speed", - mux_gmac0_rmii_speed_p, 31, 3, 1, 0), - RK_MUX(SCLK_GMAC0_RX_TX, "clk_gmac0_rx_tx", mux_gmac0_rx_tx_p, 31, 0, - 2, 0), - RK_COMPNODIV(ACLK_USB, "aclk_usb", gpll300_gpll200_gpll100_xin24m_p, 32, - 0, 2, 16, 0, 0), - RK_COMPNODIV(HCLK_USB, "hclk_usb", gpll150_gpll100_gpll75_xin24m_p, 32, - 2, 2, 16, 1, 0), - RK_COMPNOMUX(PCLK_USB, "pclk_usb", "aclk_usb", 32, 4, 4, 16, 2, 0), - RK_COMPNODIV(CLK_SDMMC2, "clk_sdmmc2", clk_sdmmc_p, 32, 8, 3, 17, 1, 0), - RK_COMPNODIV(CLK_MAC1_2TOP, "clk_mac1_2top", clk_mac_2top_p, 33, 8, 2, - 17, 5, 0), - RK_COMPNODIV(CLK_MAC1_OUT, "clk_mac1_out", - cpll125_cpll50_cpll25_xin24m_p, 33, 14, 2, 17, 6, 0), - RK_COMPNODIV(CLK_GMAC1_PTP_REF, "clk_gmac1_ptp_ref", clk_gmac_ptp_p, 33, - 12, 2, 17, 2, 0), - RK_MUX(SCLK_GMAC1, "clk_gmac1", mux_gmac1_p, 33, 2, 1, 0), - RK_FACTOR(0, "clk_gmac1_tx_div5", "clk_gmac1", 1, 5), - RK_FACTOR(0, "clk_gmac1_tx_div50", "clk_gmac1", 1, 50), - RK_FACTOR(0, "clk_gmac1_rx_div2", "clk_gmac1", 1, 2), - RK_FACTOR(0, "clk_gmac1_rx_div20", "clk_gmac1", 1, 20), - RK_MUX(SCLK_GMAC1_RGMII_SPEED, "clk_gmac1_rgmii_speed", - mux_gmac1_rgmii_speed_p, 33, 4, 2, 0), - RK_MUX(SCLK_GMAC1_RMII_SPEED, "clk_gmac1_rmii_speed", - mux_gmac1_rmii_speed_p, 33, 3, 1, 0), - RK_MUX(SCLK_GMAC1_RX_TX, "clk_gmac1_rx_tx", mux_gmac1_rx_tx_p, 33, 0, - 2, 0), - RK_COMPNODIV(ACLK_PERIMID, "aclk_perimid", - gpll300_gpll200_gpll100_xin24m_p, 10, 4, 2, 14, 0, 0), - RK_COMPNODIV(HCLK_PERIMID, "hclk_perimid", - gpll150_gpll100_gpll75_xin24m_p, 10, 6, 2, 14, 1, 0), - RK_COMPNODIV(ACLK_VI, "aclk_vi", gpll400_gpll300_gpll200_xin24m_p, 34, - 0, 2, 18, 0, 0), - RK_COMPNOMUX(HCLK_VI, "hclk_vi", "aclk_vi", 34, 4, 4, 18, 1, 0), - RK_COMPNOMUX(PCLK_VI, "pclk_vi", "aclk_vi", 34, 8, 4, 18, 2, 0), - RK_COMPNODIV(DCLK_VICAP, "dclk_vicap", cpll333_gpll300_gpll200_p, 34, - 14, 2, 18, 11, 0), - RK_COMPOSITE(CLK_ISP, "clk_isp", cpll_gpll_hpll_p, 35, 6, 2, 0, 5, 19, - 2, 0), - RK_COMPOSITE(CLK_CIF_OUT, "clk_cif_out", gpll_usb480m_xin24m_p, 35, 14, - 2, 8, 6, 19, 8, 0), - RK_COMPOSITE(CLK_CAM0_OUT, "clk_cam0_out", gpll_usb480m_xin24m_p, 36, 6, - 2, 0, 6, 19, 9, 0), - RK_COMPOSITE(CLK_CAM1_OUT, "clk_cam1_out", gpll_usb480m_xin24m_p, 36, - 14, 2, 8, 6, 19, 10, 0), - RK_COMPNODIV(ACLK_VO, "aclk_vo", gpll300_cpll250_gpll100_xin24m_p, 37, - 0, 2, 20, 0, 0), - RK_COMPNOMUX(HCLK_VO, "hclk_vo", "aclk_vo", 37, 8, 4, 20, 1, 0), - RK_COMPNOMUX(PCLK_VO, "pclk_vo", "aclk_vo", 37, 12, 4, 20, 2, 0), - RK_COMPOSITE(ACLK_VOP_PRE, "aclk_vop_pre", cpll_gpll_hpll_vpll_p, 38, 6, - 2, 0, 5, 20, 6, 0), - RK_COMPOSITE(DCLK_VOP0, "dclk_vop0", hpll_vpll_gpll_cpll_p, 39, 10, 2, - 0, 8, 20, 10, 0), - RK_COMPOSITE(DCLK_VOP1, "dclk_vop1", hpll_vpll_gpll_cpll_p, 40, 10, 2, - 0, 8, 20, 11, 0), - RK_COMPOSITE(DCLK_VOP2, "dclk_vop2", hpll_vpll_gpll_cpll_p, 41, 10, 2, - 0, 8, 20, 12, 0), - RK_COMPNODIV(CLK_EDP_200M, "clk_edp_200m", gpll200_gpll150_cpll125_p, - 38, 8, 2, 21, 9, 0), - RK_COMPOSITE(ACLK_VPU_PRE, "aclk_vpu_pre", gpll_cpll_p, 42, 7, 1, 0, 5, - 22, 0, 0), - RK_COMPNOMUX(HCLK_VPU_PRE, "hclk_vpu_pre", "aclk_vpu_pre", 42, 8, 4, 22, - 1, 0), - RK_COMPNODIV(ACLK_RGA_PRE, "aclk_rga_pre", - gpll300_cpll250_gpll100_xin24m_p, 43, 0, 2, 23, 0, 0), - RK_COMPNOMUX(HCLK_RGA_PRE, "hclk_rga_pre", "aclk_rga_pre", 43, 8, 4, 23, - 1, 0), - RK_COMPNOMUX(PCLK_RGA_PRE, "pclk_rga_pre", "aclk_rga_pre", 43, 12, 4, - 22, 12, 0), - RK_COMPNODIV(CLK_RGA_CORE, "clk_rga_core", gpll300_gpll200_gpll100_p, - 43, 2, 2, 23, 6, 0), - RK_COMPNODIV(CLK_IEP_CORE, "clk_iep_core", gpll300_gpll200_gpll100_p, - 43, 4, 2, 23, 9, 0), - RK_COMPNODIV(DCLK_EBC, "dclk_ebc", gpll400_cpll333_gpll200_p, 43, 6, 2, - 23, 11, 0), - RK_COMPOSITE(ACLK_RKVENC_PRE, "aclk_rkvenc_pre", gpll_cpll_npll_p, 44, - 6, 2, 0, 5, 24, 0, 0), - RK_COMPNOMUX(HCLK_RKVENC_PRE, "hclk_rkvenc_pre", "aclk_rkvenc_pre", 44, - 8, 4, 24, 1, 0), - RK_COMPOSITE(CLK_RKVENC_CORE, "clk_rkvenc_core", gpll_cpll_npll_vpll_p, - 45, 14, 2, 0, 5, 24, 8, 0), - RK_COMPOSITE(ACLK_RKVDEC_PRE, "aclk_rkvdec_pre", aclk_rkvdec_pre_p, 47, - 7, 1, 0, 5, 25, 0, 0), - RK_COMPNOMUX(HCLK_RKVDEC_PRE, "hclk_rkvdec_pre", "aclk_rkvdec_pre", 47, - 8, 4, 25, 1, 0), - RK_COMPOSITE(CLK_RKVDEC_CA, "clk_rkvdec_ca", gpll_cpll_npll_vpll_p, 48, - 6, 2, 0, 5, 25, 6, 0), - RK_COMPOSITE(CLK_RKVDEC_CORE, "clk_rkvdec_core", clk_rkvdec_core_p, 49, - 14, 2, 8, 5, 25, 7, 0), - RK_COMPOSITE(CLK_RKVDEC_HEVC_CA, "clk_rkvdec_hevc_ca", - gpll_cpll_npll_vpll_p, 49, 6, 2, 0, 5, 25, 8, 0), - RK_COMPNODIV(ACLK_BUS, "aclk_bus", gpll200_gpll150_gpll100_xin24m_p, 50, - 0, 2, 26, 0, 0), - RK_COMPNODIV(PCLK_BUS, "pclk_bus", gpll100_gpll75_cpll50_xin24m_p, 50, - 4, 2, 26, 1, 0), - RK_COMPOSITE(CLK_TSADC_TSEN, "clk_tsadc_tsen", xin24m_gpll100_cpll100_p, - 51, 4, 2, 0, 3, 26, 5, 0), - RK_COMPNOMUX(CLK_TSADC, "clk_tsadc", "clk_tsadc_tsen", 51, 8, 7, 26, - 6, 0), - RK_COMPOSITE(CLK_UART1_SRC, "clk_uart1_src", gpll_cpll_usb480m_p, 52, 8, - 2, 0, 7, 27, 13, 0), - RK_FRACTION(CLK_UART1_FRAC, "clk_uart1_frac", "clk_uart1_src", 53, 27, - 14, 0), - RK_MUX(0, "sclk_uart1_mux", sclk_uart1_p, 52, 12, 2, 0), - RK_COMPOSITE(CLK_UART2_SRC, "clk_uart2_src", gpll_cpll_usb480m_p, 54, 8, - 2, 0, 7, 28, 1, 0), - RK_FRACTION(CLK_UART2_FRAC, "clk_uart2_frac", "clk_uart2_src", 55, 28, - 2, 0), - RK_MUX(0, "sclk_uart2_mux", sclk_uart2_p, 54, 12, 2, 0), - RK_COMPOSITE(CLK_UART3_SRC, "clk_uart3_src", gpll_cpll_usb480m_p, 56, 8, - 2, 0, 7, 28, 5, 0), - RK_FRACTION(CLK_UART3_FRAC, "clk_uart3_frac", "clk_uart3_src", 57, 28, - 6, 0), - RK_MUX(0, "sclk_uart3_mux", sclk_uart3_p, 56, 12, 2, 0), - RK_COMPOSITE(CLK_UART4_SRC, "clk_uart4_src", gpll_cpll_usb480m_p, 58, 8, - 2, 0, 7, 28, 9, 0), - RK_FRACTION(CLK_UART4_FRAC, "clk_uart4_frac", "clk_uart4_src", 59, 28, - 10, 0), - RK_MUX(0, "sclk_uart4_mux", sclk_uart4_p, 58, 12, 2, 0), - RK_COMPOSITE(CLK_UART5_SRC, "clk_uart5_src", gpll_cpll_usb480m_p, 60, 8, - 2, 0, 7, 28, 13, 0), - RK_FRACTION(CLK_UART5_FRAC, "clk_uart5_frac", "clk_uart5_src", 61, 28, - 14, 0), - RK_MUX(0, "sclk_uart5_mux", sclk_uart5_p, 60, 12, 2, 0), - RK_COMPOSITE(CLK_UART6_SRC, "clk_uart6_src", gpll_cpll_usb480m_p, 62, 8, - 2, 0, 7, 29, 1, 0), - RK_FRACTION(CLK_UART6_FRAC, "clk_uart6_frac", "clk_uart6_src", 63, 29, - 2, 0), - RK_MUX(0, "sclk_uart6_mux", sclk_uart6_p, 62, 12, 2, 0), - RK_COMPOSITE(CLK_UART7_SRC, "clk_uart7_src", gpll_cpll_usb480m_p, 64, 8, - 2, 0, 7, 29, 5, 0), - RK_FRACTION(CLK_UART7_FRAC, "clk_uart7_frac", "clk_uart7_src", 65, 29, - 6, 0), - RK_MUX(0, "sclk_uart7_mux", sclk_uart7_p, 64, 12, 2, 0), - RK_COMPOSITE(CLK_UART8_SRC, "clk_uart8_src", gpll_cpll_usb480m_p, 66, 8, - 2, 0, 7, 29, 9, 0), - RK_FRACTION(CLK_UART8_FRAC, "clk_uart8_frac", "clk_uart8_src", 67, 29, - 10, 0), - RK_MUX(0, "sclk_uart8_mux", sclk_uart8_p, 66, 12, 2, 0), - RK_COMPOSITE(CLK_UART9_SRC, "clk_uart9_src", gpll_cpll_usb480m_p, 68, 8, - 2, 0, 7, 29, 13, 0), - RK_FRACTION(CLK_UART9_FRAC, "clk_uart9_frac", "clk_uart9_src", 69, 29, - 14, 0), - RK_MUX(0, "sclk_uart9_mux", sclk_uart9_p, 68, 12, 2, 0), - RK_COMPOSITE(CLK_CAN0, "clk_can0", gpll_cpll_p, 70, 7, 1, 0, 5, 27, - 6, 0), - RK_COMPOSITE(CLK_CAN1, "clk_can1", gpll_cpll_p, 70, 15, 1, 8, 5, 27, - 8, 0), - RK_COMPOSITE(CLK_CAN2, "clk_can2", gpll_cpll_p, 71, 7, 1, 0, 5, 27, - 10, 0), - RK_COMPNODIV(CLK_I2C, "clk_i2c", clk_i2c_p, 71, 8, 2, 32, 10, 0), - RK_COMPNODIV(CLK_SPI0, "clk_spi0", gpll200_xin24m_cpll100_p, 72, 0, 1, - 30, 11, 0), - RK_COMPNODIV(CLK_SPI1, "clk_spi1", gpll200_xin24m_cpll100_p, 72, 2, 1, - 30, 13, 0), - RK_COMPNODIV(CLK_SPI2, "clk_spi2", gpll200_xin24m_cpll100_p, 72, 4, 1, - 30, 15, 0), - RK_COMPNODIV(CLK_SPI3, "clk_spi3", gpll200_xin24m_cpll100_p, 72, 6, 1, - 31, 1, 0), - RK_COMPNODIV(CLK_PWM1, "clk_pwm1", gpll100_xin24m_cpll100_p, 72, 8, 1, - 31, 11, 0), - RK_COMPNODIV(CLK_PWM2, "clk_pwm2", gpll100_xin24m_cpll100_p, 72, 10, 1, - 31, 14, 0), - RK_COMPNODIV(CLK_PWM3, "clk_pwm3", gpll100_xin24m_cpll100_p, 72, 12, 1, - 32, 1, 0), - RK_COMPNODIV(DBCLK_GPIO, "dbclk_gpio", xin24m_32k_p, 72, 14, 1, 32, - 11, 0), - RK_COMPNODIV(ACLK_TOP_HIGH, "aclk_top_high", - cpll500_gpll400_gpll300_xin24m_p, 73, 0, 2, 33, 0, 0), - RK_COMPNODIV(ACLK_TOP_LOW, "aclk_top_low", - gpll400_gpll300_gpll200_xin24m_p, 73, 4, 2, 33, 1, 0), - RK_COMPNODIV(HCLK_TOP, "hclk_top", gpll150_gpll100_gpll75_xin24m_p, 73, - 8, 2, 33, 2, 0), - RK_COMPNODIV(PCLK_TOP, "pclk_top", gpll100_gpll75_cpll50_xin24m_p, 73, - 12, 2, 33, 3, 0), - RK_COMPNODIV(CLK_OPTC_ARB, "clk_optc_arb", xin24m_cpll100_p, 73, 15, 1, - 33, 9, 0), + + /* CRU_CLKSEL_CON00 */ + /* 0:4 clk_core0_div DIV */ + /* 5 Reserved */ + /* 6 clk_core_i_sel MUX */ + /* 7 clk_core_ndft_sel MUX */ + /* 8:12 clk_core1_div DIV */ + /* 13:14 Reserved */ + /* 15 clk_core_ndft_mux_sel MUX */ + + /* CRU_CLKSEL_CON01 */ + /* 0:4 clk_core2_div DIV */ + /* 5:7 Reserved */ + /* 8:12 clk_core3_div DIV */ + /* 13:15 Reserved */ + + /* CRU_CLKSEL_CON02 */ + COMP(0, "sclk_core_src_c", apll_gpll_npll_p, 0, 2, 0, 4, 8, 2), + /* 4:7 Reserved */ + /* 10:14 Reserved */ + MUX(0, "sclk_core_pre_sel", sclk_core_pre_p, 0, 2, 15, 1), + + /* CRU_CLKSEL_CON03 */ + CDIV(0, "atclk_core_div", "armclk", 0, 3, 0, 5), + /* 5:7 Reserved */ + CDIV(0, "gicclk_core_div", "armclk", 0, 3, 8, 5), + /* 13:15 Reserved */ + + /* CRU_CLKSEL_CON04 */ + CDIV(0, "pclk_core_pre_div", "armclk", 0, 4, 0, 5), + /* 5:7 Reserved */ + CDIV(0, "periphclk_core_pre_div", "armclk", 0, 4, 8, 5), + /* 13:15 Reserved */ + + /* CRU_CLKSEL_CON05 */ + /* 0:7 Reserved */ + /* 8:12 aclk_core_ndft_div DIV */ + /* 13 Reserved */ + /* 14:15 aclk_core_biu2bus_sel MUX */ + + /* CRU_CLKSEL_CON06 */ + COMP(0, "clk_gpu_pre_c", mpll_gpll_cpll_npll_p, 0, 6, 0, 4, 6, 2), + /* 4:5 Reserved */ + CDIV(0, "aclk_gpu_pre_div", "clk_gpu_pre_c", 0, 6, 8, 2), + /* 10 Reserved */ + MUX(CLK_GPU_PRE_MUX, "clk_gpu_pre_mux_sel", clk_gpu_pre_mux_p, 0, 6, 11, 1), + CDIV(0, "pclk_gpu_pre_div", "clk_gpu_pre_c", 0, 6, 12, 4), + + /* CRU_CLKSEL_CON07 */ + COMP(0, "clk_npu_src_c", npll_gpll_p, 0, 7, 0, 4, 6, 1), + COMP(0, "clk_npu_np5_c", npll_gpll_p, 0, 7, 4, 2, 7, 1), + MUX(CLK_NPU_PRE_NDFT, "clk_npu_pre_ndft", clk_npu_pre_ndft_p, 0, 7, + 8, 1), + /* 9:14 Reserved */ + MUX(CLK_NPU, "clk_npu", clk_npu_p, 0, 7, 15, 1), + + /* CRU_CLKSEL_CON08 */ + CDIV(0, "hclk_npu_pre_div", "clk_npu", 0, 8, 0, 4), + CDIV(0, "pclk_npu_pre_div", "clk_npu", 0, 8, 4, 4), + /* 8:15 Reserved */ + + /* CRU_CLKSEL_CON09 */ + COMP(0, "clk_ddrphy1x_src_c", dpll_gpll_cpll_p, 0, 9, 0, 5, 6, 2), + /* 5 Reserved */ + /* 8:14 Reserved */ + MUX(CLK_DDR1X, "clk_ddr1x", clk_ddr1x_p, RK_CLK_COMPOSITE_GRF, 9, + 15, 1), + + /* CRU_CLKSEL_CON10 */ + CDIV(0, "clk_msch_div", "clk_ddr1x", 0, 10, 0, 2), + MUX(0, "aclk_perimid_sel", gpll300_gpll200_gpll100_xin24m_p, 0, 10, 4, 2), + MUX(0, "hclk_perimid_sel", gpll150_gpll100_gpll75_xin24m_p, 0, 10, 6, 2), + MUX(0, "aclk_gic_audio_sel", gpll200_gpll150_gpll100_xin24m_p, 0, 10, 8, 2), + MUX(0, "hclk_gic_audio_sel", gpll150_gpll100_gpll75_xin24m_p, 0, 10, 10, 2), + MUX(0, "dclk_sdmmc_buffer_sel", gpll100_gpll75_gpll50_p, 0, 10, 12, 2), + /* 14:15 Reserved */ + + /* CRU_CLKSEL_CON11 */ + COMP(0, "clk_i2s0_8ch_tx_src_c", gpll_cpll_npll_p, 0, 11, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S0_8CH_TX, "clk_i2s0_8ch_tx", clk_i2s0_8ch_tx_p, 0, 11, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s0_mclkout_tx_sel", i2s0_mclkout_tx_p, 0, 11, 15, 1), + + /* CRU_CLKSEL_CON12 */ + FRACT(0, "clk_i2s0_8ch_tx_frac_div", "clk_i2s0_8ch_tx_src", 0, 12), + + /* CRU_CLKSEL_CON13 */ + COMP(0, "clk_i2s0_8ch_rx_src_c", gpll_cpll_npll_p, 0, 13, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S0_8CH_RX, "clk_i2s0_8ch_rx", clk_i2s0_8ch_rx_p, 0, 13, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s0_mclkout_rx_sel", i2s0_mclkout_rx_p, 0, 13, 15, 1), + + /* CRU_CLKSEL_CON14 */ + FRACT(0, "clk_i2s0_8ch_rx_frac_div", "clk_i2s0_8ch_rx_src", 0, 14), + + /* CRU_CLKSEL_CON15 */ + COMP(0, "clk_i2s1_8ch_tx_src_c", gpll_cpll_npll_p, 0, 15, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S1_8CH_TX, "clk_i2s1_8ch_tx", clk_i2s1_8ch_tx_p, 0, 15, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s1_mclkout_tx_sel", i2s1_mclkout_tx_p, 0, 11, 15, 1), + + /* CRU_CLKSEL_CON16 */ + FRACT(0, "clk_i2s1_8ch_tx_frac_div", "clk_i2s1_8ch_tx_src", 0, 16), + + /* CRU_CLKSEL_CON17 */ + COMP(0, "clk_i2s1_8ch_rx_src_c", gpll_cpll_npll_p, 0, 17, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S1_8CH_RX, "clk_i2s1_8ch_rx", clk_i2s1_8ch_rx_p, 0, 17, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s1_mclkout_rx_sel", i2s1_mclkout_rx_p, 0, 17, 15, 1), + + /* CRU_CLKSEL_CON18 */ + FRACT(0, "clk_i2s1_8ch_rx_frac_div", "clk_i2s1_8ch_rx_src", 0, 18), + + /* CRU_CLKSEL_CON19 */ + COMP(0, "clk_i2s2_2ch_src_c", gpll_cpll_npll_p, 0, 19, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S2_2CH, "clk_i2s2_2ch", clk_i2s2_2ch_p, 0, 19, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s2_mclkout_sel", i2s2_mclkout_p, 0, 19, 15, 1), + + /* CRU_CLKSEL_CON20 */ + FRACT(0, "clk_i2s2_2ch_frac_div", "clk_i2s2_2ch_src", 0, 20), + + /* CRU_CLKSEL_CON21 */ + COMP(0, "clk_i2s3_2ch_tx_src_c", gpll_cpll_npll_p, 0, 21, 0, 7, 8, 2), + /* 7 Reserved */ + MUX(CLK_I2S3_2CH_TX, "clk_i2s3_2ch_tx", clk_i2s3_2ch_tx_p, 0, 21, 10, + 2), + /* 12:14 Reserved */ + MUX(0, "i2s3_mclkout_tx_sel", i2s3_mclkout_tx_p, 0, 21, 15, 1), + + /* CRU_CLKSEL_CON22 */ + FRACT(0, "clk_i2s3_2ch_tx_frac_div", "clk_i2s3_2ch_tx_src", 0, 22), + + /* CRU_CLKSEL_CON23 */ + COMP(0, "mclk_spdif_8ch_src_c", cpll_gpll_p, 0, 23, 0, 7, 14, 1), + /* 7 Reserved */ + MUX(0, "mclk_pdm_sel", mclk_pdm_p, 0, 23, 8, 2), + MUX(0, "clk_acdcdig_i2c_sel", clk_i2c_p, 0, 23, 10, 2), + /* 12:13 Reserved */ + MUX(MCLK_SPDIF_8CH, "mclk_spdif_8ch", mclk_spdif_8ch_p, 0, 23, 15, + 1), + + /* CRU_CLKSEL_CON24 */ + FRACT(0, "mclk_spdif_8ch_frac_div", "mclk_spdif_8ch_src", 0, 24), + + /* CRU_CLKSEL_CON25 */ + COMP(0, "sclk_audpwm_src_c", gpll_cpll_p, 0, 25, 0, 5, 14, 1), + /* 6:13 Reserved */ + MUX(SCLK_AUDPWM, "sck_audpwm_sel", sclk_audpwm_p, 0, 25, 15, 1), + + /* CRU_CLKSEL_CON26 */ + FRACT(0, "sclk_audpwm_frac_frac", "sclk_audpwm_src", 0, 26), + + /* CRU_CLKSEL_CON27 */ + MUX(0, "aclk_secure_flash_sel", gpll200_gpll150_gpll100_xin24m_p, 0, 27, 0, 2), + MUX(0, "hclk_secure_flash_sel", gpll150_gpll100_gpll75_xin24m_p, 0, 27, 2, 2), + MUX(0, "clk_crypto_ns_core_sel", gpll200_gpll150_gpll100_p, 0, 27, 4, 2), + MUX(0, "clk_crypto_ns_pka_sel", gpll300_gpll200_gpll100_p, 0, 27, 6, 2), + /* 8:15 Reserved */ + + /* CRU_CLKSEL_CON28 */ + MUX(0, "nclk_nandc_sel", clk_nandc_p, 0, 28, 0, 2), + /* 2:3 Reserved */ + MUX(0, "sclk_sfc_sel", sclk_sfc_p, 0, 28, 4, 3), + /* 7 Reserved */ + MUX(0, "bclk_emmc_sel", gpll200_gpll150_cpll125_p, 0, 28, 8, 2), + /* 10:11 Reserved */ + MUX(0, "cclk_emmc_sel", cclk_emmc_p, 0, 28, 12, 3), + /* 15 Reserved */ + + /* CRU_CLKSEL_CON29 */ + MUX(0, "aclk_pipe_sel", aclk_pipe_p, 0, 29, 0, 2), + /* 2:3 Reserved */ + CDIV(0, "pclk_pipe_div", "aclk_pipe", 0, 29, 4, 4), + MUX(0, "clk_usb3otg0_suspend_sel", xin24m_32k_p, 0, 29, 8, 1), + MUX(0, "clk_usb3otg1_suspend_sel", xin24m_32k_p, 0, 29, 9, 1), + /* 10:12 Reserved */ + MUX(0, "clk_xpcs_eee_sel", gpll200_cpll125_p, 0, 29, 13, 1), + /* 14:15 Reserved */ + + /* CRU_CLKSEL_CON30 */ + MUX(0, "aclk_php_sel", gpll300_gpll200_gpll100_xin24m_p, 0, 30, 0, 2), + MUX(0, "hclk_php_sel", gpll150_gpll100_gpll75_xin24m_p, 0, 30, 2, 2), + CDIV(0, "pclk_php_div", "aclk_php", 0, 30, 4, 4), + MUX(0, "clk_sdmmc0_sel", clk_sdmmc_p, 0, 30, 8, 3), + /* 11 Reserved */ + MUX(0, "clk_sdmmc1_sel", clk_sdmmc_p, 0, 30, 12, 3), + /* 15 Reserved */ + + /* CRU_CLKSEL_CON31 */ *** 1111 LINES SKIPPED *** From nobody Wed Oct 18 14:34:24 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJc28m2z4x6M0; Wed, 18 Oct 2023 14:34: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 4S9YJc1gV9z3Tk3; Wed, 18 Oct 2023 14:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M2uKKXuZUhYQChBPP3kb2i8lGXU3I39zJoZbe0vWxc=; b=rTkhCfLPT9ieWW04KmMCjGd7jqgPNGb3npr7CQOKLYjsWervk8jNy6+6x4qKtcWTANd7mc e/HJcRE4VZnpdED/lA1FJSAqPGZKeIl4Jkctqmi/7ARgqO7uHPOSFdl/Vb8VFRQ3HMmKSJ 53AVnOARa5GcPwEUfHiFRmIdhQKsbCovGXUPnf1eDWbOGBLRaN9vVQE5FIGuwX+ygrxFt2 KoKPwDYxrsVBRfOuBF36upoVMv0FhbIZ2xZ/FJUlWJJ55ZHx7pn8ooNSUNE1OJtJP/2EVd N1gWduWOkuekVvthLZxKxI3zwjraIdZaFHh/lmp/O9UuiD2QDadMi+03ZCw8pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639664; a=rsa-sha256; cv=none; b=lmkEdAeSSVutXXQSeW7SRfUuWcryGoSgo0v7tW/RMkM782D+sZsmlcFz1C2AXYKztwq0GJ OCNjXlyGSeUn9LbSAmYSFh4uQoOo0FhculZKo2x6gu2Fo2QiC+iQBvc1k+pMRhbnzAXjFf hftH7h2NBAIJWtyELymWu4Ov2pRF3X5WVXovdonSVjhYx4VkXQ/qX4PwYluxYsAhzsOoLL HQJ6j+9QrtyqXlpwr8gsjH56DSjaLcdNeeSIb4u9pUP0K7RbuOYQK22gEkvHlMvLq8oNPo J11w+qKCQ7WucOvTkC7vtC9zN12cd6RaZKANtAFkuz+HIXihLBvwnt6zwMjlZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M2uKKXuZUhYQChBPP3kb2i8lGXU3I39zJoZbe0vWxc=; b=gx+pNngH8tVsoKrw/PWOahwuWQFJ5DeixpXDGH6dNCIXa38VfEHj1T4vXPxsbuyikXXP7z kGvIyi2o9bfaIpiBQJ6OQRexEhpPo4Teic58A2+gJMSY1bXCjv7MXldRS27AuEvhFvbr18 98HL1vzW5Y2+ejvCX342oHrCmEbvYxU5YfT8OoK9o8ODvwPD2aIbSZFL4knMA0VbYREgVe X+oWoo6Xat0gmiVvJc7wJ29ge5hzsCubeC+YOt7K9OrJ1FP8VwgmqSAVAJPhUt7QHcJf/x vYcq5chB470t4/w/M0Vi/0MHTCQmk/qGo+ty9N/oS1fA/qwDIF6d7BiNW8EdnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJc0ZNzz18vK; Wed, 18 Oct 2023 14:34: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 39IEYOgo092508; Wed, 18 Oct 2023 14:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYO69092505; Wed, 18 Oct 2023 14:34:24 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:24 GMT Message-Id: <202310181434.39IEYO69092505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 14652ce3f542 - stable/14 - arm64: rockchip: rk3328_cru: Use GATE macro List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 14652ce3f5427daffd5dc4db910db95325d5e06f Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=14652ce3f5427daffd5dc4db910db95325d5e06f commit 14652ce3f5427daffd5dc4db910db95325d5e06f Author: Emmanuel Vadot AuthorDate: 2023-09-21 10:55:31 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:29 +0000 arm64: rockchip: rk3328_cru: Use GATE macro It make it easier to read the code and the register number (cherry picked from commit 7c6c426f29831799d1eae1ca5d4036a219b52fca) --- sys/arm64/rockchip/clk/rk3328_cru.c | 389 ++++++++++++++++++------------------ 1 file changed, 195 insertions(+), 194 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/arm64/rockchip/clk/rk3328_cru.c index 1f48ce6c23a2..cde5bb3f55b6 100644 --- a/sys/arm64/rockchip/clk/rk3328_cru.c +++ b/sys/arm64/rockchip/clk/rk3328_cru.c @@ -46,6 +46,7 @@ #include #define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) +#define CRU_CLKGATE_CON(x) (0x200 + (x) * 0x4) /* Registers */ #define RK3328_GRF_SOC_CON4 0x410 @@ -250,100 +251,100 @@ static struct rk_cru_gate rk3328_gates[] = { /* CRU_CLKGATE_CON0 */ - CRU_GATE(0, "core_apll_clk", "apll", 0x200, 0) - CRU_GATE(0, "core_dpll_clk", "dpll", 0x200, 1) - CRU_GATE(0, "core_gpll_clk", "gpll", 0x200, 2) + GATE(0, "core_apll_clk", "apll", 0, 0), + GATE(0, "core_dpll_clk", "dpll", 0, 1), + GATE(0, "core_gpll_clk", "gpll", 0, 2), /* Bit 3 bus_src_clk_en */ /* Bit 4 clk_ddrphy_src_en */ /* Bit 5 clk_ddrpd_src_en */ /* Bit 6 clk_ddrmon_en */ /* Bit 7-8 unused */ /* Bit 9 testclk_en */ - CRU_GATE(SCLK_WIFI, "sclk_wifi", "sclk_wifi_c", 0x200, 10) - CRU_GATE(SCLK_RTC32K, "clk_rtc32k", "clk_rtc32k_c", 0x200, 11) - CRU_GATE(0, "core_npll_clk", "npll", 0x200, 12) + GATE(SCLK_WIFI, "sclk_wifi", "sclk_wifi_c", 0, 10), + GATE(SCLK_RTC32K, "clk_rtc32k", "clk_rtc32k_c", 0, 11), + GATE(0, "core_npll_clk", "npll", 0, 12), /* Bit 13-15 unused */ /* CRU_CLKGATE_CON1 */ /* Bit 0 unused */ - CRU_GATE(0, "clk_i2s0_div", "clk_i2s0_div_c", 0x204, 1) - CRU_GATE(0, "clk_i2s0_frac", "clk_i2s0_frac_f", 0x204, 2) - CRU_GATE(SCLK_I2S0, "clk_i2s0", "clk_i2s0_mux", 0x204, 3) - CRU_GATE(0, "clk_i2s1_div", "clk_i2s1_div_c", 0x204, 4) - CRU_GATE(0, "clk_i2s1_frac", "clk_i2s1_frac_f", 0x204, 5) - CRU_GATE(SCLK_I2S1, "clk_i2s1", "clk_i2s1_mux", 0x204, 6) - CRU_GATE(0, "clk_i2s1_out", "clk_i2s1_mux", 0x204, 7) - CRU_GATE(0, "clk_i2s2_div", "clk_i2s2_div_c", 0x204, 8) - CRU_GATE(0, "clk_i2s2_frac", "clk_i2s2_frac_f", 0x204, 9) - CRU_GATE(SCLK_I2S2, "clk_i2s2", "clk_i2s2_mux", 0x204, 10) - CRU_GATE(0, "clk_i2s2_out", "clk_i2s2_mux", 0x204, 11) - CRU_GATE(0, "clk_spdif_div", "clk_spdif_div_c", 0x204, 12) - CRU_GATE(0, "clk_spdif_frac", "clk_spdif_frac_f", 0x204, 13) - CRU_GATE(0, "clk_uart0_div", "clk_uart0_div_c", 0x204, 14) - CRU_GATE(0, "clk_uart0_frac", "clk_uart0_frac_f", 0x204, 15) + GATE(0, "clk_i2s0_div", "clk_i2s0_div_c", 1, 1), + GATE(0, "clk_i2s0_frac", "clk_i2s0_frac_f", 1, 2), + GATE(SCLK_I2S0, "clk_i2s0", "clk_i2s0_mux", 1, 3), + GATE(0, "clk_i2s1_div", "clk_i2s1_div_c", 1, 4), + GATE(0, "clk_i2s1_frac", "clk_i2s1_frac_f", 1, 5), + GATE(SCLK_I2S1, "clk_i2s1", "clk_i2s1_mux", 1, 6), + GATE(0, "clk_i2s1_out", "clk_i2s1_mux", 1, 7), + GATE(0, "clk_i2s2_div", "clk_i2s2_div_c", 1, 8), + GATE(0, "clk_i2s2_frac", "clk_i2s2_frac_f", 1, 9), + GATE(SCLK_I2S2, "clk_i2s2", "clk_i2s2_mux", 1, 10), + GATE(0, "clk_i2s2_out", "clk_i2s2_mux", 1, 11), + GATE(0, "clk_spdif_div", "clk_spdif_div_c", 1, 12), + GATE(0, "clk_spdif_frac", "clk_spdif_frac_f", 1, 13), + GATE(0, "clk_uart0_div", "clk_uart0_div_c", 1, 14), + GATE(0, "clk_uart0_frac", "clk_uart0_frac_f", 1, 15), /* CRU_CLKGATE_CON2 */ - CRU_GATE(0, "clk_uart1_div", "clk_uart1_div_c", 0x208, 0) - CRU_GATE(0, "clk_uart1_frac", "clk_uart1_frac_f", 0x208, 1) - CRU_GATE(0, "clk_uart2_div", "clk_uart2_div_c", 0x208, 2) - CRU_GATE(0, "clk_uart2_frac", "clk_uart2_frac_f", 0x208, 3) - CRU_GATE(SCLK_CRYPTO, "clk_crypto", "clk_crypto_c", 0x208, 4) - CRU_GATE(SCLK_TSP, "clk_tsp", "clk_tsp_c", 0x208, 5) - CRU_GATE(SCLK_TSADC, "clk_tsadc_src", "clk_tsadc_c", 0x208, 6) - CRU_GATE(SCLK_SPI, "clk_spi", "clk_spi_c", 0x208, 7) - CRU_GATE(SCLK_PWM, "clk_pwm", "clk_pwm_c", 0x208, 8) - CRU_GATE(SCLK_I2C0, "clk_i2c0_src", "clk_i2c0_c", 0x208, 9) - CRU_GATE(SCLK_I2C1, "clk_i2c1_src", "clk_i2c1_c", 0x208, 10) - CRU_GATE(SCLK_I2C2, "clk_i2c2_src", "clk_i2c2_c", 0x208, 11) - CRU_GATE(SCLK_I2C3, "clk_i2c3_src", "clk_i2c3_c", 0x208, 12) - CRU_GATE(SCLK_EFUSE, "clk_efuse", "clk_efuse_c", 0x208, 13) - CRU_GATE(SCLK_SARADC, "clk_saradc", "clk_saradc_c", 0x208, 14) - CRU_GATE(SCLK_PDM, "clk_pdm", "clk_pdm_c", 0x208, 15) + GATE(0, "clk_uart1_div", "clk_uart1_div_c", 2, 0), + GATE(0, "clk_uart1_frac", "clk_uart1_frac_f", 2, 1), + GATE(0, "clk_uart2_div", "clk_uart2_div_c", 2, 2), + GATE(0, "clk_uart2_frac", "clk_uart2_frac_f", 2, 3), + GATE(SCLK_CRYPTO, "clk_crypto", "clk_crypto_c", 2, 4), + GATE(SCLK_TSP, "clk_tsp", "clk_tsp_c", 2, 5), + GATE(SCLK_TSADC, "clk_tsadc_src", "clk_tsadc_c", 2, 6), + GATE(SCLK_SPI, "clk_spi", "clk_spi_c", 2, 7), + GATE(SCLK_PWM, "clk_pwm", "clk_pwm_c", 2, 8), + GATE(SCLK_I2C0, "clk_i2c0_src", "clk_i2c0_c", 2, 9), + GATE(SCLK_I2C1, "clk_i2c1_src", "clk_i2c1_c", 2, 10), + GATE(SCLK_I2C2, "clk_i2c2_src", "clk_i2c2_c", 2, 11), + GATE(SCLK_I2C3, "clk_i2c3_src", "clk_i2c3_c", 2, 12), + GATE(SCLK_EFUSE, "clk_efuse", "clk_efuse_c", 2, 13), + GATE(SCLK_SARADC, "clk_saradc", "clk_saradc_c", 2, 14), + GATE(SCLK_PDM, "clk_pdm", "clk_pdm_c", 2, 15), /* CRU_CLKGATE_CON3 */ - CRU_GATE(SCLK_MAC2PHY_SRC, "clk_mac2phy_src", "clk_mac2phy_src_c", 0x20c, 0) - CRU_GATE(SCLK_MAC2IO_SRC, "clk_mac2io_src", "clk_mac2io_src_c", 0x20c, 1) - CRU_GATE(ACLK_GMAC, "aclk_gmac", "aclk_gmac_c", 0x20c, 2) + GATE(SCLK_MAC2PHY_SRC, "clk_mac2phy_src", "clk_mac2phy_src_c", 3, 0), + GATE(SCLK_MAC2IO_SRC, "clk_mac2io_src", "clk_mac2io_src_c", 3, 1), + GATE(ACLK_GMAC, "aclk_gmac", "aclk_gmac_c", 3, 2), /* Bit 3 gmac_gpll_src_en Unused ? */ /* Bit 4 gmac_vpll_src_en Unused ? */ - CRU_GATE(SCLK_MAC2IO_OUT, "clk_mac2io_out", "clk_mac2io_out_c", 0x20c, 5) + GATE(SCLK_MAC2IO_OUT, "clk_mac2io_out", "clk_mac2io_out_c", 3, 5), /* Bit 6-7 unused */ - CRU_GATE(SCLK_OTP, "clk_otp", "clk_otp_c", 0x20c, 8) + GATE(SCLK_OTP, "clk_otp", "clk_otp_c", 3, 8), /* Bit 9-15 unused */ /* CRU_CLKGATE_CON4 */ - CRU_GATE(0, "periph_gclk_src", "gpll", 0x210, 0) - CRU_GATE(0, "periph_cclk_src", "cpll", 0x210, 1) - CRU_GATE(0, "hdmiphy_peri", "hdmiphy", 0x210, 2) - CRU_GATE(SCLK_SDMMC, "clk_mmc0_src", "clk_sdmmc_c", 0x210, 3) - CRU_GATE(SCLK_SDIO, "clk_sdio_src", "clk_sdio_c", 0x210, 4) - CRU_GATE(SCLK_EMMC, "clk_emmc_src", "clk_emmc_c", 0x210, 5) - CRU_GATE(SCLK_REF_USB3OTG_SRC, "clk_ref_usb3otg_src", "clk_ref_usb3otg_src_c", 0x210, 6) - CRU_GATE(SCLK_USB3OTG_REF, "clk_usb3_otg0_ref", "xin24m", 0x210, 7) - CRU_GATE(SCLK_USB3OTG_SUSPEND, "clk_usb3otg_suspend", "clk_usb3otg_suspend_c", 0x210, 8) + GATE(0, "periph_gclk_src", "gpll", 4, 0), + GATE(0, "periph_cclk_src", "cpll", 4, 1), + GATE(0, "hdmiphy_peri", "hdmiphy", 4, 2), + GATE(SCLK_SDMMC, "clk_mmc0_src", "clk_sdmmc_c", 4, 3), + GATE(SCLK_SDIO, "clk_sdio_src", "clk_sdio_c", 4, 4), + GATE(SCLK_EMMC, "clk_emmc_src", "clk_emmc_c", 4, 5), + GATE(SCLK_REF_USB3OTG_SRC, "clk_ref_usb3otg_src", "clk_ref_usb3otg_src_c", 4, 6), + GATE(SCLK_USB3OTG_REF, "clk_usb3_otg0_ref", "xin24m", 4, 7), + GATE(SCLK_USB3OTG_SUSPEND, "clk_usb3otg_suspend", "clk_usb3otg_suspend_c", 4, 8), /* Bit 9 clk_usb3phy_ref_25m_en */ - CRU_GATE(SCLK_SDMMC_EXT, "clk_sdmmc_ext", "clk_sdmmc_ext_c", 0x210, 10) + GATE(SCLK_SDMMC_EXT, "clk_sdmmc_ext", "clk_sdmmc_ext_c", 4, 10), /* Bit 11-15 unused */ /* CRU_CLKGATE_CON5 */ - CRU_GATE(ACLK_RGA_PRE, "aclk_rga_pre", "aclk_rga_pre_c", 0x214, 0) - CRU_GATE(SCLK_RGA, "sclk_rga", "sclk_rga_c", 0x214, 0) - CRU_GATE(ACLK_VIO_PRE, "aclk_vio_pre", "aclk_vio_pre_c", 0x214, 2) - CRU_GATE(SCLK_CIF_OUT, "clk_cif_src", "clk_cif_src_c", 0x214, 3) - CRU_GATE(SCLK_HDMI_SFC, "clk_hdmi_sfc", "xin24m", 0x214, 4) - CRU_GATE(ACLK_VOP_PRE, "aclk_vop_pre", "aclk_vop_pre_c", 0x214, 5) - CRU_GATE(DCLK_LCDC_SRC, "vop_dclk_src", "vop_dclk_src_c", 0x214, 6) + GATE(ACLK_RGA_PRE, "aclk_rga_pre", "aclk_rga_pre_c", 5, 0), + GATE(SCLK_RGA, "sclk_rga", "sclk_rga_c", 5, 0), + GATE(ACLK_VIO_PRE, "aclk_vio_pre", "aclk_vio_pre_c", 5, 2), + GATE(SCLK_CIF_OUT, "clk_cif_src", "clk_cif_src_c", 5, 3), + GATE(SCLK_HDMI_SFC, "clk_hdmi_sfc", "xin24m", 5, 4), + GATE(ACLK_VOP_PRE, "aclk_vop_pre", "aclk_vop_pre_c", 5, 5), + GATE(DCLK_LCDC_SRC, "vop_dclk_src", "vop_dclk_src_c", 5, 6), /* Bit 7-15 unused */ /* CRU_CLKGATE_CON6 */ - CRU_GATE(ACLK_RKVDEC_PRE, "aclk_rkvdec_pre", "aclk_rkvdec_c", 0x218, 0) - CRU_GATE(SCLK_VDEC_CABAC, "sclk_cabac", "sclk_cabac_c", 0x218, 1) - CRU_GATE(SCLK_VDEC_CORE, "sclk_vdec_core", "sclk_vdec_core_c", 0x218, 2) - CRU_GATE(ACLK_RKVENC, "aclk_rkvenc", "aclk_rkvenc_c", 0x218, 3) - CRU_GATE(SCLK_VENC_CORE, "sclk_venc", "sclk_venc_c", 0x218, 4) - CRU_GATE(ACLK_VPU_PRE, "aclk_vpu_pre", "aclk_vpu_pre_c", 0x218, 5) - CRU_GATE(0, "aclk_gpu_pre", "aclk_gpu_pre_c", 0x218, 6) - CRU_GATE(SCLK_VENC_DSP, "sclk_venc_dsp", "sclk_venc_dsp_c", 0x218, 7) + GATE(ACLK_RKVDEC_PRE, "aclk_rkvdec_pre", "aclk_rkvdec_c", 6, 0), + GATE(SCLK_VDEC_CABAC, "sclk_cabac", "sclk_cabac_c", 6, 1), + GATE(SCLK_VDEC_CORE, "sclk_vdec_core", "sclk_vdec_core_c", 6, 2), + GATE(ACLK_RKVENC, "aclk_rkvenc", "aclk_rkvenc_c", 6, 3), + GATE(SCLK_VENC_CORE, "sclk_venc", "sclk_venc_c", 6, 4), + GATE(ACLK_VPU_PRE, "aclk_vpu_pre", "aclk_vpu_pre_c", 6, 5), + GATE(0, "aclk_gpu_pre", "aclk_gpu_pre_c", 6, 6), + GATE(SCLK_VENC_DSP, "sclk_venc_dsp", "sclk_venc_dsp_c", 6, 7), /* Bit 8-15 unused */ /* CRU_CLKGATE_CON7 */ @@ -355,42 +356,42 @@ static struct rk_cru_gate rk3328_gates[] = { /* Bit 5-15 unused */ /* CRU_CLKGATE_CON8 */ - CRU_GATE(ACLK_BUS_PRE, "aclk_bus_pre", "aclk_bus_pre_c", 0x220, 0) - CRU_GATE(HCLK_BUS_PRE, "hclk_bus_pre", "hclk_bus_pre_c", 0x220, 1) - CRU_GATE(PCLK_BUS_PRE, "pclk_bus_pre", "pclk_bus_pre_c", 0x220, 2) - CRU_GATE(0, "pclk_bus", "pclk_bus_pre", 0x220, 3) - CRU_GATE(0, "pclk_phy", "pclk_bus_pre", 0x220, 4) - CRU_GATE(SCLK_TIMER0, "sclk_timer0", "xin24m", 0x220, 5) - CRU_GATE(SCLK_TIMER1, "sclk_timer1", "xin24m", 0x220, 6) - CRU_GATE(SCLK_TIMER2, "sclk_timer2", "xin24m", 0x220, 7) - CRU_GATE(SCLK_TIMER3, "sclk_timer3", "xin24m", 0x220, 8) - CRU_GATE(SCLK_TIMER4, "sclk_timer4", "xin24m", 0x220, 9) - CRU_GATE(SCLK_TIMER5, "sclk_timer5", "xin24m", 0x220, 10) + GATE(ACLK_BUS_PRE, "aclk_bus_pre", "aclk_bus_pre_c", 8, 0), + GATE(HCLK_BUS_PRE, "hclk_bus_pre", "hclk_bus_pre_c", 8, 1), + GATE(PCLK_BUS_PRE, "pclk_bus_pre", "pclk_bus_pre_c", 8, 2), + GATE(0, "pclk_bus", "pclk_bus_pre", 8, 3), + GATE(0, "pclk_phy", "pclk_bus_pre", 8, 4), + GATE(SCLK_TIMER0, "sclk_timer0", "xin24m", 8, 5), + GATE(SCLK_TIMER1, "sclk_timer1", "xin24m", 8, 6), + GATE(SCLK_TIMER2, "sclk_timer2", "xin24m", 8, 7), + GATE(SCLK_TIMER3, "sclk_timer3", "xin24m", 8, 8), + GATE(SCLK_TIMER4, "sclk_timer4", "xin24m", 8, 9), + GATE(SCLK_TIMER5, "sclk_timer5", "xin24m", 8, 10), /* Bit 11-15 unused */ /* CRU_CLKGATE_CON9 */ - CRU_GATE(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0x224, 0) - CRU_GATE(SCLK_MAC2PHY_RXTX, "clk_gmac2phy_rx", "clk_mac2phy", 0x224, 1) - CRU_GATE(SCLK_MAC2PHY_OUT, "clk_mac2phy_out", "clk_mac2phy_out_c", 0x224, 2) - CRU_GATE(SCLK_MAC2PHY_REF, "clk_gmac2phy_ref", "clk_mac2phy", 0x224, 3) - CRU_GATE(SCLK_MAC2IO_RX, "clk_gmac2io_rx", "clk_mac2io", 0x224, 4) - CRU_GATE(SCLK_MAC2IO_TX, "clk_gmac2io_tx", "clk_mac2io", 0x224, 5) - CRU_GATE(SCLK_MAC2IO_REFOUT, "clk_gmac2io_refout", "clk_mac2io", 0x224, 6) - CRU_GATE(SCLK_MAC2IO_REF, "clk_gmac2io_ref", "clk_mac2io", 0x224, 7) + GATE(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 9, 0), + GATE(SCLK_MAC2PHY_RXTX, "clk_gmac2phy_rx", "clk_mac2phy", 9, 1), + GATE(SCLK_MAC2PHY_OUT, "clk_mac2phy_out", "clk_mac2phy_out_c", 9, 2), + GATE(SCLK_MAC2PHY_REF, "clk_gmac2phy_ref", "clk_mac2phy", 9, 3), + GATE(SCLK_MAC2IO_RX, "clk_gmac2io_rx", "clk_mac2io", 9, 4), + GATE(SCLK_MAC2IO_TX, "clk_gmac2io_tx", "clk_mac2io", 9, 5), + GATE(SCLK_MAC2IO_REFOUT, "clk_gmac2io_refout", "clk_mac2io", 9, 6), + GATE(SCLK_MAC2IO_REF, "clk_gmac2io_ref", "clk_mac2io", 9, 7), /* Bit 8-15 unused */ /* CRU_CLKGATE_CON10 */ - CRU_GATE(ACLK_PERI, "aclk_peri", "aclk_peri_pre", 0x228, 0) - CRU_GATE(HCLK_PERI, "hclk_peri", "hclk_peri_c", 0x228, 1) - CRU_GATE(PCLK_PERI, "pclk_peri", "pclk_peri_c", 0x228, 2) + GATE(ACLK_PERI, "aclk_peri", "aclk_peri_pre", 10, 0), + GATE(HCLK_PERI, "hclk_peri", "hclk_peri_c", 10, 1), + GATE(PCLK_PERI, "pclk_peri", "pclk_peri_c", 10, 2), /* Bit 3-15 unused */ /* CRU_CLKGATE_CON11 */ - CRU_GATE(HCLK_RKVDEC_PRE, "hclk_rkvdec_pre", "aclk_rkvdec_pre", 0x22C, 0) + GATE(HCLK_RKVDEC_PRE, "hclk_rkvdec_pre", "aclk_rkvdec_pre", 11, 0), /* Bit 1-3 unused */ - CRU_GATE(HCLK_RKVENC, "hclk_rkvenc", "aclk_rkvenc", 0x22C, 4) + GATE(HCLK_RKVENC, "hclk_rkvenc", "aclk_rkvenc", 11, 4), /* Bit 5-7 unused */ - CRU_GATE(HCLK_VPU_PRE, "hclk_vpu_pre", "aclk_vpu_pre", 0x22C, 8) + GATE(HCLK_VPU_PRE, "hclk_vpu_pre", "aclk_vpu_pre", 11, 8), /* Bit 9-15 unused */ /* CRU_CLKGATE_CON12 */ @@ -402,64 +403,64 @@ static struct rk_cru_gate rk3328_gates[] = { /* Bit 2-15 unused */ /* CRU_CLKGATE_CON14 */ - CRU_GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_pre", 0x238, 0) - CRU_GATE(0, "aclk_gpu_niu", "aclk_gpu_pre", 0x238, 1) + GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_pre", 14, 0), + GATE(0, "aclk_gpu_niu", "aclk_gpu_pre", 14, 1), /* Bit 2-15 unused */ /* CRU_CLKGATE_CON15*/ /* Bit 0 aclk_intmem_en Unused */ /* Bit 1 aclk_dmac_bus_en Unused */ /* Bit 2 hclk_rom_en Unused */ - CRU_GATE(HCLK_I2S0_8CH, "hclk_i2s0_8ch", "hclk_bus_pre", 0x23C, 3) - CRU_GATE(HCLK_I2S1_8CH, "hclk_i2s1_8ch", "hclk_bus_pre", 0x23C, 4) - CRU_GATE(HCLK_I2S2_2CH, "hclk_i2s2_2ch", "hclk_bus_pre", 0x23C, 5) - CRU_GATE(HCLK_SPDIF_8CH, "hclk_spdif_8ch", "hclk_bus_pre", 0x23C, 6) - CRU_GATE(HCLK_CRYPTO_MST, "hclk_crypto_mst", "hclk_bus_pre", 0x23C, 7) - CRU_GATE(HCLK_CRYPTO_SLV, "hclk_crypto_slv", "hclk_bus_pre", 0x23C, 8) - CRU_GATE(0, "pclk_efuse", "pclk_bus", 0x23C, 9) - CRU_GATE(PCLK_I2C0, "pclk_i2c0", "pclk_bus", 0x23C, 10) - CRU_GATE(ACLK_DCF, "aclk_dcf", "aclk_bus_pre", 0x23C, 11) - CRU_GATE(0, "aclk_bus_niu", "aclk_bus_pre", 0x23C, 12) - CRU_GATE(0, "hclk_bus_niu", "hclk_bus_pre", 0x23C, 13) - CRU_GATE(0, "pclk_bus_niu", "pclk_bus_pre", 0x23C, 14) - CRU_GATE(0, "pclk_phy_niu", "pclk_phy", 0x23C, 14) + GATE(HCLK_I2S0_8CH, "hclk_i2s0_8ch", "hclk_bus_pre", 15, 3), + GATE(HCLK_I2S1_8CH, "hclk_i2s1_8ch", "hclk_bus_pre", 15, 4), + GATE(HCLK_I2S2_2CH, "hclk_i2s2_2ch", "hclk_bus_pre", 15, 5), + GATE(HCLK_SPDIF_8CH, "hclk_spdif_8ch", "hclk_bus_pre", 15, 6), + GATE(HCLK_CRYPTO_MST, "hclk_crypto_mst", "hclk_bus_pre", 15, 7), + GATE(HCLK_CRYPTO_SLV, "hclk_crypto_slv", "hclk_bus_pre", 15, 8), + GATE(0, "pclk_efuse", "pclk_bus", 15, 9), + GATE(PCLK_I2C0, "pclk_i2c0", "pclk_bus", 15, 10), + GATE(ACLK_DCF, "aclk_dcf", "aclk_bus_pre", 15, 11), + GATE(0, "aclk_bus_niu", "aclk_bus_pre", 15, 12), + GATE(0, "hclk_bus_niu", "hclk_bus_pre", 15, 13), + GATE(0, "pclk_bus_niu", "pclk_bus_pre", 15, 14), + GATE(0, "pclk_phy_niu", "pclk_phy", 15, 14), /* Bit 15 pclk_phy_niu_en */ /* CRU_CLKGATE_CON16 */ - CRU_GATE(PCLK_I2C1, "pclk_i2c1", "pclk_bus", 0x240, 0) - CRU_GATE(PCLK_I2C2, "pclk_i2c2", "pclk_bus", 0x240, 1) - CRU_GATE(PCLK_I2C3, "pclk_i2c3", "pclk_bus", 0x240, 2) - CRU_GATE(PCLK_TIMER, "pclk_timer0", "pclk_bus", 0x240, 3) - CRU_GATE(0, "pclk_stimer", "pclk_bus", 0x240, 4) - CRU_GATE(PCLK_SPI, "pclk_spi", "pclk_bus", 0x240, 5) - CRU_GATE(PCLK_PWM, "pclk_pwm", "pclk_bus", 0x240, 6) - CRU_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 0x240, 7) - CRU_GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 0x240, 8) - CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9) - CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_bus", 0x240, 10) - CRU_GATE(PCLK_UART0, "pclk_uart0", "pclk_bus", 0x240, 11) - CRU_GATE(PCLK_UART1, "pclk_uart1", "pclk_bus", 0x240, 12) - CRU_GATE(PCLK_UART2, "pclk_uart2", "pclk_bus", 0x240, 13) - CRU_GATE(PCLK_TSADC, "pclk_tsadc", "pclk_bus", 0x240, 14) - CRU_GATE(PCLK_DCF, "pclk_dcf", "pclk_bus", 0x240, 15) + GATE(PCLK_I2C1, "pclk_i2c1", "pclk_bus", 16, 0), + GATE(PCLK_I2C2, "pclk_i2c2", "pclk_bus", 16, 1), + GATE(PCLK_I2C3, "pclk_i2c3", "pclk_bus", 16, 2), + GATE(PCLK_TIMER, "pclk_timer0", "pclk_bus", 16, 3), + GATE(0, "pclk_stimer", "pclk_bus", 16, 4), + GATE(PCLK_SPI, "pclk_spi", "pclk_bus", 16, 5), + GATE(PCLK_PWM, "pclk_pwm", "pclk_bus", 16, 6), + GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 16, 7), + GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 16, 8), + GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 16, 9), + GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_bus", 16, 10), + GATE(PCLK_UART0, "pclk_uart0", "pclk_bus", 16, 11), + GATE(PCLK_UART1, "pclk_uart1", "pclk_bus", 16, 12), + GATE(PCLK_UART2, "pclk_uart2", "pclk_bus", 16, 13), + GATE(PCLK_TSADC, "pclk_tsadc", "pclk_bus", 16, 14), + GATE(PCLK_DCF, "pclk_dcf", "pclk_bus", 16, 15), /* CRU_CLKGATE_CON17 */ - CRU_GATE(PCLK_GRF, "pclk_grf", "pclk_bus", 0x244, 0) + GATE(PCLK_GRF, "pclk_grf", "pclk_bus", 17, 0), /* Bit 1 unused */ - CRU_GATE(PCLK_USB3_GRF, "pclk_usb3grf", "pclk_phy", 0x244, 2) - CRU_GATE(0, "pclk_ddrphy", "pclk_phy", 0x244, 3) - CRU_GATE(0, "pclk_cru", "pclk_bus", 0x244, 4) - CRU_GATE(PCLK_ACODECPHY, "pclk_acodecphy", "pclk_phy", 0x244, 5) - CRU_GATE(0, "pclk_sgrf", "pclk_bus", 0x244, 6) - CRU_GATE(PCLK_HDMIPHY, "pclk_hdmiphy", "pclk_phy", 0x244, 7) - CRU_GATE(0, "pclk_vdacphy", "pclk_bus", 0x244, 8) + GATE(PCLK_USB3_GRF, "pclk_usb3grf", "pclk_phy", 17, 2), + GATE(0, "pclk_ddrphy", "pclk_phy", 17, 3), + GATE(0, "pclk_cru", "pclk_bus", 17, 4), + GATE(PCLK_ACODECPHY, "pclk_acodecphy", "pclk_phy", 17, 5), + GATE(0, "pclk_sgrf", "pclk_bus", 17, 6), + GATE(PCLK_HDMIPHY, "pclk_hdmiphy", "pclk_phy", 17, 7), + GATE(0, "pclk_vdacphy", "pclk_bus", 17, 8), /* Bit 9 unused */ - CRU_GATE(0, "pclk_sim", "pclk_bus", 0x244, 10) - CRU_GATE(HCLK_TSP, "hclk_tsp", "hclk_bus_pre", 0x244, 11) - CRU_GATE(ACLK_TSP, "aclk_tsp", "aclk_bus_pre", 0x244, 12) + GATE(0, "pclk_sim", "pclk_bus", 17, 10), + GATE(HCLK_TSP, "hclk_tsp", "hclk_bus_pre", 17, 11), + GATE(ACLK_TSP, "aclk_tsp", "aclk_bus_pre", 17, 12), /* Bit 13 clk_hsadc_0_tsp_en Depend on a gpio clock ? */ - CRU_GATE(PCLK_USB2_GRF, "pclk_usb2grf", "pclk_phy", 0x244, 14) - CRU_GATE(PCLK_SARADC, "pclk_saradc", "pclk_bus", 0x244, 15) + GATE(PCLK_USB2_GRF, "pclk_usb2grf", "pclk_phy", 17, 14), + GATE(PCLK_SARADC, "pclk_saradc", "pclk_bus", 17, 15), /* CRU_CLKGATE_CON18 */ /* Bit 0 unused */ @@ -473,81 +474,81 @@ static struct rk_cru_gate rk3328_gates[] = { /* Bit 8-15 unused */ /* CRU_CLKGATE_CON19 */ - CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 0) - CRU_GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0x24C, 1) - CRU_GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0x24C, 2) + GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 19, 0), + GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 19, 1), + GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 19, 2), /* Bit 3-5 unused */ - CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_peri", 0x24C, 6) - CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arg", "hclk_peri", 0x24C, 7) - CRU_GATE(HCLK_OTG, "hclk_otg", "hclk_peri", 0x24C, 8) - CRU_GATE(HCLK_OTG_PMU, "hclk_otg_pmu", "hclk_peri", 0x24C, 9) + GATE(HCLK_HOST0, "hclk_host0", "hclk_peri", 19, 6), + GATE(HCLK_HOST0_ARB, "hclk_host0_arg", "hclk_peri", 19, 7), + GATE(HCLK_OTG, "hclk_otg", "hclk_peri", 19, 8), + GATE(HCLK_OTG_PMU, "hclk_otg_pmu", "hclk_peri", 19, 9), /* Bit 10 unused */ - CRU_GATE(0, "aclk_peri_niu", "aclk_peri", 0x24C, 11) - CRU_GATE(0, "hclk_peri_niu", "hclk_peri", 0x24C, 12) - CRU_GATE(0, "pclk_peri_niu", "hclk_peri", 0x24C, 13) - CRU_GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0x24C, 14) - CRU_GATE(HCLK_SDMMC_EXT, "hclk_sdmmc_ext", "hclk_peri", 0x24C, 15) + GATE(0, "aclk_peri_niu", "aclk_peri", 19, 11), + GATE(0, "hclk_peri_niu", "hclk_peri", 19, 12), + GATE(0, "pclk_peri_niu", "hclk_peri", 19, 13), + GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 19, 14), + GATE(HCLK_SDMMC_EXT, "hclk_sdmmc_ext", "hclk_peri", 19, 15), /* CRU_CLKGATE_CON20 */ /* unused */ /* CRU_CLKGATE_CON21 */ /* Bit 0-1 unused */ - CRU_GATE(ACLK_VOP, "aclk_vop", "aclk_vop_pre", 0x254, 2) - CRU_GATE(HCLK_VOP, "hclk_vop", "hclk_vio_pre", 0x254, 3) - CRU_GATE(0, "aclk_vop_niu", "aclk_vop_pre", 0x254, 4) - CRU_GATE(0, "hclk_vop_niu", "hclk_vio_pre", 0x254, 5) - CRU_GATE(ACLK_IEP, "aclk_iep", "aclk_vio_pre", 0x254, 6) - CRU_GATE(HCLK_IEP, "hclk_iep", "hclk_vio_pre", 0x254, 7) - CRU_GATE(ACLK_CIF, "aclk_cif", "aclk_vio_pre", 0x254, 8) - CRU_GATE(HCLK_CIF, "hclk_cif", "hclk_vio_pre", 0x254, 9) - CRU_GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 0x254, 10) - CRU_GATE(HCLK_RGA, "hclk_rga", "hclk_vio_pre", 0x254, 11) - CRU_GATE(0, "hclk_ahb1tom", "hclk_vio_pre", 0x254, 12) - CRU_GATE(0, "pclk_vio_h2p", "hclk_vio_pre", 0x254, 13) - CRU_GATE(0, "hclk_vio_h2p", "hclk_vio_pre", 0x254, 14) - CRU_GATE(ACLK_HDCP, "aclk_hdcp", "aclk_vio_pre", 0x254, 15) + GATE(ACLK_VOP, "aclk_vop", "aclk_vop_pre", 21, 2), + GATE(HCLK_VOP, "hclk_vop", "hclk_vio_pre", 21, 3), + GATE(0, "aclk_vop_niu", "aclk_vop_pre", 21, 4), + GATE(0, "hclk_vop_niu", "hclk_vio_pre", 21, 5), + GATE(ACLK_IEP, "aclk_iep", "aclk_vio_pre", 21, 6), + GATE(HCLK_IEP, "hclk_iep", "hclk_vio_pre", 21, 7), + GATE(ACLK_CIF, "aclk_cif", "aclk_vio_pre", 21, 8), + GATE(HCLK_CIF, "hclk_cif", "hclk_vio_pre", 21, 9), + GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 21, 10), + GATE(HCLK_RGA, "hclk_rga", "hclk_vio_pre", 21, 11), + GATE(0, "hclk_ahb1tom", "hclk_vio_pre", 21, 12), + GATE(0, "pclk_vio_h2p", "hclk_vio_pre", 21, 13), + GATE(0, "hclk_vio_h2p", "hclk_vio_pre", 21, 14), + GATE(ACLK_HDCP, "aclk_hdcp", "aclk_vio_pre", 21, 15), /* CRU_CLKGATE_CON22 */ - CRU_GATE(HCLK_HDCP, "hclk_hdcp", "hclk_vio_pre", 0x258, 0) - CRU_GATE(0, "hclk_vio_niu", "hclk_vio_pre", 0x258, 1) - CRU_GATE(0, "aclk_vio_niu", "aclk_vio_pre", 0x258, 2) - CRU_GATE(0, "aclk_rga_niu", "aclk_rga_pre", 0x258, 3) - CRU_GATE(PCLK_HDMI, "pclk_hdmi", "hclk_vio_pre", 0x258, 4) - CRU_GATE(PCLK_HDCP, "pclk_hdcp", "hclk_vio_pre", 0x258, 5) + GATE(HCLK_HDCP, "hclk_hdcp", "hclk_vio_pre", 22, 0), + GATE(0, "hclk_vio_niu", "hclk_vio_pre", 22, 1), + GATE(0, "aclk_vio_niu", "aclk_vio_pre", 22, 2), + GATE(0, "aclk_rga_niu", "aclk_rga_pre", 22, 3), + GATE(PCLK_HDMI, "pclk_hdmi", "hclk_vio_pre", 22, 4), + GATE(PCLK_HDCP, "pclk_hdcp", "hclk_vio_pre", 22, 5), /* Bit 6-15 unused */ /* CRU_CLKGATE_CON23 */ - CRU_GATE(ACLK_VPU, "aclk_vpu", "aclk_vpu_pre", 0x25C, 0) - CRU_GATE(HCLK_VPU, "hclk_vpu", "hclk_vpu_pre", 0x25C, 1) - CRU_GATE(0, "aclk_vpu_niu", "aclk_vpu_pre", 0x25C, 2) - CRU_GATE(0, "hclk_vpu_niu", "hclk_vpu_pre", 0x25C, 3) + GATE(ACLK_VPU, "aclk_vpu", "aclk_vpu_pre", 23, 0), + GATE(HCLK_VPU, "hclk_vpu", "hclk_vpu_pre", 23, 1), + GATE(0, "aclk_vpu_niu", "aclk_vpu_pre", 23, 2), + GATE(0, "hclk_vpu_niu", "hclk_vpu_pre", 23, 3), /* Bit 4-15 unused */ /* CRU_CLKGATE_CON24 */ - CRU_GATE(ACLK_RKVDEC, "aclk_rkvdec", "aclk_rkvdec_pre", 0x260, 0) - CRU_GATE(HCLK_RKVDEC, "hclk_rkvdec", "hclk_rkvdec_pre", 0x260, 1) - CRU_GATE(0, "aclk_rkvdec_niu", "aclk_rkvdec_pre", 0x260, 2) - CRU_GATE(0, "hclk_rkvdec_niu", "hclk_rkvdec_pre", 0x260, 3) + GATE(ACLK_RKVDEC, "aclk_rkvdec", "aclk_rkvdec_pre", 24, 0), + GATE(HCLK_RKVDEC, "hclk_rkvdec", "hclk_rkvdec_pre", 24, 1), + GATE(0, "aclk_rkvdec_niu", "aclk_rkvdec_pre", 24, 2), + GATE(0, "hclk_rkvdec_niu", "hclk_rkvdec_pre", 24, 3), /* Bit 4-15 unused */ /* CRU_CLKGATE_CON25 */ - CRU_GATE(0, "aclk_rkvenc_niu", "aclk_rkvenc", 0x264, 0) - CRU_GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", 0x264, 1) - CRU_GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 0x264, 2) - CRU_GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 0x264, 3) - CRU_GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 0x264, 4) - CRU_GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 0x264, 5) - CRU_GATE(0, "aclk_axisram", "hclk_rkvenc", 0x264, 6) + GATE(0, "aclk_rkvenc_niu", "aclk_rkvenc", 25, 0), + GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", 25, 1), + GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 25, 2), + GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 25, 3), + GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 25, 4), + GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 25, 5), + GATE(0, "aclk_axisram", "hclk_rkvenc", 25, 6), /* Bit 7-15 unused */ /* CRU_CLKGATE_CON26 */ - CRU_GATE(ACLK_MAC2PHY, "aclk_gmac2phy", "aclk_gmac", 0x268, 0) - CRU_GATE(PCLK_MAC2PHY, "pclk_gmac2phy", "pclk_gmac", 0x268, 1) - CRU_GATE(ACLK_MAC2IO, "aclk_gmac2io", "aclk_gmac", 0x268, 2) - CRU_GATE(PCLK_MAC2IO, "pclk_gmac2io", "pclk_gmac", 0x268, 3) - CRU_GATE(0, "aclk_gmac_niu", "aclk_gmac", 0x268, 4) - CRU_GATE(0, "pclk_gmac_niu", "pclk_gmac", 0x268, 5) + GATE(ACLK_MAC2PHY, "aclk_gmac2phy", "aclk_gmac", 26, 0), + GATE(PCLK_MAC2PHY, "pclk_gmac2phy", "pclk_gmac", 26, 1), + GATE(ACLK_MAC2IO, "aclk_gmac2io", "aclk_gmac", 26, 2), + GATE(PCLK_MAC2IO, "pclk_gmac2io", "pclk_gmac", 26, 3), + GATE(0, "aclk_gmac_niu", "aclk_gmac", 26, 4), + GATE(0, "pclk_gmac_niu", "pclk_gmac", 26, 5), /* Bit 6-15 unused */ /* CRU_CLKGATE_CON27 */ @@ -555,11 +556,11 @@ static struct rk_cru_gate rk3328_gates[] = { /* Bit 1 clk4x_ddrphy_en */ /* CRU_CLKGATE_CON28 */ - CRU_GATE(HCLK_PDM, "hclk_pdm", "hclk_bus_pre", 0x270, 0) - CRU_GATE(PCLK_USB3PHY_OTG, "pclk_usb3phy_otg", "pclk_phy", 0x270, 1) - CRU_GATE(PCLK_USB3PHY_PIPE, "pclk_usb3phy_pipe", "pclk_phy", 0x270, 2) - CRU_GATE(0, "pclk_pmu", "pclk_bus", 0x270, 3) - CRU_GATE(0, "pclk_otp", "pclk_bus", 0x270, 4) + GATE(HCLK_PDM, "hclk_pdm", "hclk_bus_pre", 28, 0), + GATE(PCLK_USB3PHY_OTG, "pclk_usb3phy_otg", "pclk_phy", 28, 1), + GATE(PCLK_USB3PHY_PIPE, "pclk_usb3phy_pipe", "pclk_phy", 28, 2), + GATE(0, "pclk_pmu", "pclk_bus", 28, 3), + GATE(0, "pclk_otp", "pclk_bus", 28, 4) /* Bit 5-15 unused */ }; From nobody Wed Oct 18 14:34:25 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJd4MHsz4x6Tx; Wed, 18 Oct 2023 14:34: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 4S9YJd2vcZz3Tkj; Wed, 18 Oct 2023 14:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFsh0/9LqS8Db+KmDd4TrBYhK+R6yiFQdtZ3Xmj751U=; b=pLXWIKRFY8BRurm6OdOlzmXEoBQTrrN7HZp9V1BuBKFXKPwko7URkp6pXjWBW+vjkNKVpQ NK5cUxHAXeQ+AbDAFf17TPXRnTvW6cryd0JO2IjsXd3VHUPhnhJLvZxuTBt36EC5FOW/hy jVYMY2oMSw0WPrWklPR/Ye/+nfLNAOsK+HrzEZd6bQJLn7k+UaIe5flF/ooHiVby1JSWgI /OCW4HdOrtbxeeYYqq5CBNslX10IGVImiQ1TyKi++huIxR8yz1xVYIvS6vZBa6ph7cHbzu gIi8xSHEKF5JFIj3WPJUIlE90Hxa4HEg6VV8V4du8AlG/rm+gUDIY73VSgwDYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639665; a=rsa-sha256; cv=none; b=VSG1ZAO5Ff/iWGnURX5Nii22nvIzaGsj1cMny4HTnOtCNTwAy1aIrSryaudxw9g6pWZidx ouUtKXq7Sf9HdbCAJdpLDpuXYz5tEfjSOnpKEwVRZjhFpwQ8WbAwaLFFW9S0mzbWjsfY5O wiWefbVYMm2KcUlCDOivYoIu2dqGnKfNfiDQRdnbRjEBOLuKdAdFoy3qRqEkUtanAlS6hz QZ2X9GSr3qZuMIClcHs52w3jfsok9iJP+K5d97SZNZMC4ACBDISqU+uMXc4J7F9pa0Yqx7 w8XVH2F/ZuR4tkGvy3XEvn9v7oHQAeUwh2Mvt6VYtfNowbKYUkbAIlHdy+OdyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFsh0/9LqS8Db+KmDd4TrBYhK+R6yiFQdtZ3Xmj751U=; b=hXm5V77O+VRIjnBE20K7LN/XtIuZvF0LE1Pnrl0UwykUl0giGUrcF+aXAG6va72TiDMFg6 n4gj+FXXxZe9DAGnppyzpaKXKrP8idwCw+VFM2zXJNnPqvtPXtP0tr5thqoZ2MMrfGFEGG +cgPmpi0s0Hr/6H5FdBFLMp0mljq7TDP/RyDILQRjIq4OlnVlRl9WI8kjMZbKTKcuqilSb byZmaxROunsKKtgTe+KCwkmGhSey0VUe9j+/RXymt10GWOwbcBti4HA67rifPDGblgtQC8 YTcd2JzlCO/Y6sSbrbjQSUQZW4Gc2ctXOY2LI3T6dnZPqAA7tBmxDYvm1uZlZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJd1YJmz19GP; Wed, 18 Oct 2023 14:34: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 39IEYPwx092560; Wed, 18 Oct 2023 14:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYPuY092557; Wed, 18 Oct 2023 14:34:25 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:25 GMT Message-Id: <202310181434.39IEYPuY092557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 1469218c9ca2 - stable/14 - arm64: rockchip: rk3399_pmucru: Use GATE macro List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1469218c9ca2bd137ae978d5ae93ebbedefc52bb Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1469218c9ca2bd137ae978d5ae93ebbedefc52bb commit 1469218c9ca2bd137ae978d5ae93ebbedefc52bb Author: Emmanuel Vadot AuthorDate: 2023-09-21 10:58:48 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:31 +0000 arm64: rockchip: rk3399_pmucru: Use GATE macro It make it easier to read the code and the register number (cherry picked from commit 3d2ccc352db54b9fb11c4c1373a577e3e9d25114) --- sys/arm64/rockchip/clk/rk3399_pmucru.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3399_pmucru.c b/sys/arm64/rockchip/clk/rk3399_pmucru.c index 64df47468efd..9af438254a02 100644 --- a/sys/arm64/rockchip/clk/rk3399_pmucru.c +++ b/sys/arm64/rockchip/clk/rk3399_pmucru.c @@ -46,6 +46,8 @@ #include +#define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4) + /* GATES */ #define PCLK_PMU 20 @@ -58,13 +60,13 @@ static struct rk_cru_gate rk3399_pmu_gates[] = { /* PMUCRU_CLKGATE_CON1 */ - CRU_GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 0x104, 0) - CRU_GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 0x104, 3) - CRU_GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 0x104, 4) - CRU_GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 0x104, 7) - CRU_GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 0x104, 8) - CRU_GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 0x104, 9) - CRU_GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 0x104, 10) + GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 1, 0), + GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 1, 3), + GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 1, 4), + GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 1, 7), + GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 1, 8), + GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 1, 9), + GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 1, 10) }; /* From nobody Wed Oct 18 14:34:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJf4RSwz4x6R9; Wed, 18 Oct 2023 14:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YJf3TfZz3Tds; Wed, 18 Oct 2023 14:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5umgWnP531/SgNhty6Wfz0pmA6bjFKQJWpLoEOblvcQ=; b=ssqFRxvpMNKMLs9B6oCpTp3laBpRyWqiN5AAtcVCCIsTpclbN3XRbCtVkLydJtWko92DVl OBheifoI/MM4VRZo4SvoTj6d7FeiMKEDknw4Q4aIImbdqMRHwR79xUcXPWPhvczgeVzKub RWu6IQCJuPMbQO9ahuaWZGRSWEu6aHiPflEv8ZH4T9dm6AQfF5clPIC2QyPnFzZvYs/w8o Ar1UJrcLTdqoMIB5dts7t9ySXgJuMcbpNzjj6EMEnzt4bM4vkalPc+kN+m5VEyq3/Q9wvm 3KSl3up78+maE0XCExjM8ZM/VmT+9r5ow4R/6wFbsPNnIqkhe6XiFuGJqvjnpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639666; a=rsa-sha256; cv=none; b=P2aYaoViAxu86hSnCc56OV3SF3DLnlAxO0BmnWAhXuMXVOah4sjFwxtLlS8BIKHGrIiacA IRuPV0sUIn7ZV+YaQB7J2GwS5TTjgyhDdBWvhLxne253aeVl0nJ8UGMB5nxLlf0YJlG0i0 Fv89LPONoNpe/rFMhz/Y6dliVtPHZigYq+2Cr+Xq0/bgh96553NzY1+nzDGu6kiKFLBPVL s+W7Ss+mW38N9va2Ohzn3ylKIQ8OHGRxi2A7MlzpG2QL19Xw0D3zsj+wkhc5zzPpw/X1p3 MhtRHu0jH8M/4pFDuqVyZNfvzht+JJjTTydgX7f5K6bq8GG1z2GrH1qQg+2ffg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5umgWnP531/SgNhty6Wfz0pmA6bjFKQJWpLoEOblvcQ=; b=TVw1l1TzcVV7rS1GUdBN/Ltt6eWTcihIP8GLkK6NDoPbo9p97AoDhQo1jkSoN7AUgnBQq5 RvzCOcSo0uQCzb7d4/WOUWSovN34DNUUKscTnrEGwhZwG92UFmfEO9bDjAYid0Ojsqv4ML VWh6iEvCdvwrYPiwvBNQ4yp+cdyIvSeysE8SIAMaMoMSdJVxNWyinwLUSMgTWooxmQI/2b b0poYS/bdMHDMOYA3RhCMUL7tNnNlHZGFDT59c2Xw0Ql91uO295D5QalfA+125oohUCzFo saWqFvSLPWkwv+QR+83S57VyniRlxLysygP5FhsfHyPouYQrsS9HUYCZ6UoRFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJf2Q0kz18pF; Wed, 18 Oct 2023 14:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39IEYQKV092602; Wed, 18 Oct 2023 14:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYQEn092599; Wed, 18 Oct 2023 14:34:26 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:26 GMT Message-Id: <202310181434.39IEYQEn092599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 66765585ab7b - stable/14 - arm64: rockchip: Remove CRU_GATE macro List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 66765585ab7bbd70c5f39906fedca472b348629a Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=66765585ab7bbd70c5f39906fedca472b348629a commit 66765585ab7bbd70c5f39906fedca472b348629a Author: Emmanuel Vadot AuthorDate: 2023-09-21 10:59:26 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:32 +0000 arm64: rockchip: Remove CRU_GATE macro It's unused now (cherry picked from commit 5b7fe78032a0d07995c1c1c005d82c3a1fe8a056) --- sys/arm64/rockchip/clk/rk_cru.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk_cru.h b/sys/arm64/rockchip/clk/rk_cru.h index 55f230036199..5d45dc6ab859 100644 --- a/sys/arm64/rockchip/clk/rk_cru.h +++ b/sys/arm64/rockchip/clk/rk_cru.h @@ -216,15 +216,6 @@ struct rk_cru_gate { uint32_t shift; }; -#define CRU_GATE(idx, clkname, pname, o, s) \ - { \ - .id = idx, \ - .name = clkname, \ - .parent_name = pname, \ - .offset = o, \ - .shift = s, \ - }, - enum rk_clk_type { RK_CLK_UNDEFINED = 0, RK3066_CLK_PLL, From nobody Wed Oct 18 14:34:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJh2l82z4x6V9; Wed, 18 Oct 2023 14:34: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 4S9YJg4B6Bz3Tsc; Wed, 18 Oct 2023 14:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8/3PCloyOJE7Il3bGfEFABLqxfnguKrB7A+XKs6aqM=; b=VqtAuQZerV5uBW3Q8vsV9lGpBrYSmtJrXXywDWTjjdqkBDMuX0B4NULhhnuyJHbWQyFumB 56VVDKEw65YgTiRjYq3sJ2Jpajuc1QLapI4J/ASsQp9iy4q4UC13iasqVs+DenGx/ZHEd/ /0v3PH360f1KumnNIJZTS/e+qdS9PPQ+YbNZaCTrGMeXmx4OK8KSHoSLeBfhfx5rz5Fmvd VNuJn/1i/K+RvQxSozoGeOr1T3rh+9oFf71GXnN75A7LvUlNyWoFulmVkgbcWK3IV73zNJ RfhQ19JSE64ptuF3E7H5V35DlemaLuFAcIQcw8nyHGbgx8N2C1QyiutCjTyUHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639667; a=rsa-sha256; cv=none; b=vEa2ZUQpdINjdd6qZySYtPwCXQY3hnrnX30coE46XiZAHav0zLz+kdQlqpu1eYGEkE1fhV qwDm52CNA2zvQEodPT1KtYqnAbIrbX555jlNIIcV+kLfHxEO75XxXAntOfAz12QkD5zueO sjG5DHpTfCuXf9lQaNCO0Hn4XMnchSWf7sGJCCioTccP+rj2LyWNbm/ErV8zUziKM4AaV7 bRMYie5NfXbVCCwsSkR3O8NJdFhDVXYRDYHWCp7nH9/wgeHdWok3zMjM9xDUQDmSbjEIWP pQV2buwH1OFVG0cTsZ0V9weYmoJomrYa6h2+4bCB8vjhEHNz0ZK27FElQDBrfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8/3PCloyOJE7Il3bGfEFABLqxfnguKrB7A+XKs6aqM=; b=aMhbrqjxiob9Fyi/VsYYaQnYnZBPF4XWsPFAKlzN196klwbXdguR/OYu+vTzn4IzEHSF6P S/dIj9/QtSEuYJGk3WaCv8NOxwsJaMCxRqh4ArzOcIQVJQDQLNztQ71cMZ7Gn8NoDWJbKY 9Cg4GXjsFv/KZdXfrhAMz3DlCjYCskzMYZlRX7ojLKWPsGUeDm5v45qyCaKTVKIXSaWU3z ZGmtsZM226wGbru9JTXhPxnHO1twgteRkULbC93gmiZd/p6+pBkzCFUqh6PcFKHVL3i+0s 5DvvdyToBUIqRdWbCeWcUufuCeiXW0i/o6OQO8bC7pj8we/7tLNWHESk6rFRgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJg3HShz19GQ; Wed, 18 Oct 2023 14:34: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 39IEYRl3092653; Wed, 18 Oct 2023 14:34:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYRRw092650; Wed, 18 Oct 2023 14:34:27 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:27 GMT Message-Id: <202310181434.39IEYRRw092650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 57209137eb7e - stable/14 - arm64: rockchip: rk3399_pmucru: Finish exporting all clocks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 57209137eb7e57b3f820655431d4d42fb8c6464e Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=57209137eb7e57b3f820655431d4d42fb8c6464e commit 57209137eb7e57b3f820655431d4d42fb8c6464e Author: Emmanuel Vadot AuthorDate: 2023-09-21 14:49:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:33 +0000 arm64: rockchip: rk3399_pmucru: Finish exporting all clocks - All used clocks are now exported. - Use the macros from rk_cru.h so code is similar to other rk clock drivers. (cherry picked from commit 829b06ad8f6f3317777c2395a090a898fdcd550c) --- sys/arm64/rockchip/clk/rk3399_pmucru.c | 211 +++++++++++++++++---------------- 1 file changed, 110 insertions(+), 101 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3399_pmucru.c b/sys/arm64/rockchip/clk/rk3399_pmucru.c index 9af438254a02..276905ae4561 100644 --- a/sys/arm64/rockchip/clk/rk3399_pmucru.c +++ b/sys/arm64/rockchip/clk/rk3399_pmucru.c @@ -46,35 +46,96 @@ #include +#define CRU_CLKSEL_CON(x) (0x80 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4) -/* GATES */ - +#define PLL_PPLL 1 +#define SCLK_32K_SUSPEND_PMU 2 +#define SCLK_SPI3_PMU 3 +#define SCLK_TIMER12_PMU 4 +#define SCLK_TIMER13_PMU 5 +#define SCLK_UART4_PMU 6 +#define SCLK_PVTM_PMU 7 +#define SCLK_WIFI_PMU 8 +#define SCLK_I2C0_PMU 9 +#define SCLK_I2C4_PMU 10 +#define SCLK_I2C8_PMU 11 + +#define PCLK_PMU_SRC 19 #define PCLK_PMU 20 +#define PCLK_PMUGRF_PMU 21 +#define PCLK_INTMEM1_PMU 22 #define PCLK_GPIO0_PMU 23 #define PCLK_GPIO1_PMU 24 +#define PCLK_SGRF_PMU 25 +#define PCLK_NOC_PMU 26 #define PCLK_I2C0_PMU 27 #define PCLK_I2C4_PMU 28 #define PCLK_I2C8_PMU 29 #define PCLK_RKPWM_PMU 30 +#define PCLK_SPI3_PMU 31 +#define PCLK_TIMER_PMU 32 +#define PCLK_MAILBOX_PMU 33 +#define PCLK_UART4_PMU 34 +#define PCLK_WDT_M0_PMU 35 + +#define FCLK_CM0S_SRC_PMU 44 +#define FCLK_CM0S_PMU 45 +#define SCLK_CM0S_PMU 46 +#define HCLK_CM0S_PMU 47 +#define DCLK_CM0S_PMU 48 +#define PCLK_INTR_ARB_PMU 49 +#define HCLK_NOC_PMU 50 +/* GATES */ static struct rk_cru_gate rk3399_pmu_gates[] = { + /* PMUCRU_CLKGATE_CON0 */ + /* 0 Reserved */ + /* 1 fclk_cm0s_pmu_ppll_src_en */ + GATE(SCLK_SPI3_PMU, "clk_spi3_pmu", "clk_spi3_c", 0, 2), + GATE(SCLK_TIMER12_PMU, "clk_timer0_pmu", "clk_timer_sel", 0, 3), + GATE(SCLK_TIMER13_PMU, "clk_timer1_pmu", "clk_timer_sel", 0, 4), + GATE(SCLK_UART4_PMU, "clk_uart4_pmu", "clk_uart4_sel", 0, 5), + GATE(0, "clk_uart4_frac", "clk_uart4_frac_frac", 0, 6), + /* 7 clk_pvtm_pmu_en */ + GATE(SCLK_WIFI_PMU, "clk_wifi_pmu", "clk_wifi_sel", 0, 8), + GATE(SCLK_I2C0_PMU, "clk_i2c0_src", "clk_i2c0_div", 0, 9), + GATE(SCLK_I2C4_PMU, "clk_i2c4_src", "clk_i2c4_div", 0, 10), + GATE(SCLK_I2C8_PMU, "clk_i2c8_src", "clk_i2c8_div", 0, 11), + /* 12:15 Reserved */ + /* PMUCRU_CLKGATE_CON1 */ GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 1, 0), + /* 1 pclk_pmugrf_en */ + /* 2 pclk_intmem1_en */ GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 1, 3), GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 1, 4), + /* 5 pclk_sgrf_en */ + /* 6 pclk_noc_pmu_en */ GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 1, 7), GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 1, 8), GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 1, 9), - GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 1, 10) + GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 1, 10), + GATE(PCLK_SPI3_PMU, "pclk_spi3_pmu", "pclk_pmu_src", 1, 11), + GATE(PCLK_TIMER_PMU, "pclk_timer_pmu", "pclk_pmu_src", 1, 12), + GATE(PCLK_MAILBOX_PMU, "pclk_mailbox_pmu", "pclk_pmu_src", 1, 13), + /* 14 pclk_uartm0_en */ + /* 15 pclk_wdt_m0_pmu_en */ + + /* PMUCRU_CLKGATE_CON2 */ + /* 0 fclk_cm0s_en */ + /* 1 sclk_cm0s_en */ + /* 2 hclk_cm0s_en */ + /* 3 dclk_cm0s_en */ + /* 4 Reserved */ + /* 5 hclk_noc_pmu_en */ + /* 6:15 Reserved */ }; /* * PLLs */ -#define PLL_PPLL 1 - static struct rk_clk_pll_rate rk3399_pll_rates[] = { { .freq = 2208000000, @@ -695,124 +756,72 @@ static struct rk_clk_pll_rate rk3399_pll_rates[] = { {}, }; -static const char *pll_parents[] = {"xin24m"}; +PLIST(xin24m_p) = {"xin24m"}; +PLIST(xin24m_xin32k_p) = {"xin24m", "xin32k"}; +PLIST(xin24m_ppll_p) = {"xin24m", "ppll"}; +PLIST(uart4_p) = {"clk_uart4_c", "clk_uart4_frac", "xin24m"}; +PLIST(wifi_p) = {"clk_wifi_c", "clk_wifi_frac"}; static struct rk_clk_pll_def ppll = { .clkdef = { .id = PLL_PPLL, .name = "ppll", - .parent_names = pll_parents, - .parent_cnt = nitems(pll_parents), + .parent_names = xin24m_p, + .parent_cnt = nitems(xin24m_p), }, .base_offset = 0x00, .rates = rk3399_pll_rates, }; -static const char *pmu_parents[] = {"ppll"}; - -#define PCLK_PMU_SRC 19 - -static struct rk_clk_composite_def pclk_pmu_src = { - .clkdef = { - .id = PCLK_PMU_SRC, - .name = "pclk_pmu_src", - .parent_names = pmu_parents, - .parent_cnt = nitems(pmu_parents), - }, - /* PMUCRU_CLKSEL_CON0 */ - .muxdiv_offset = 0x80, - - .div_shift = 0, - .div_width = 5, -}; - -#define SCLK_I2C0_PMU 9 -#define SCLK_I2C4_PMU 10 -#define SCLK_I2C8_PMU 11 +static struct rk_clk rk3399_pmu_clks[] = { + /* Linked clocks */ + LINK("xin32k"), -static struct rk_clk_composite_def i2c0 = { - .clkdef = { - .id = SCLK_I2C0_PMU, - .name = "clk_i2c0_pmu", - .parent_names = pmu_parents, - .parent_cnt = nitems(pmu_parents), + { + .type = RK3399_CLK_PLL, + .clk.pll = &ppll }, - /* PMUCRU_CLKSEL_CON2 */ - .muxdiv_offset = 0x88, - - .div_shift = 0, - .div_width = 7, - - /* PMUCRU_CLKGATE_CON0 */ - .gate_offset = 0x100, - .gate_shift = 9, - .flags = RK_CLK_COMPOSITE_HAVE_GATE, -}; + /* PMUCRU_CLKSEL_CON0 */ + CDIV(PCLK_PMU_SRC, "pclk_pmu_src", "ppll", 0, 0, 0, 5), + /* 5:7 Reserved */ + /* 8:12 cm0s_div */ + /* 13:14 Reserved */ + /* 15 cm0s_clk_pll_sel */ + + /* PMUCRU_CLKSEL_CON1 */ + COMP(0, "clk_spi3_c", xin24m_ppll_p, 0, 1, 0, 7, 7, 1), + COMP(0, "clk_wifi_c", xin24m_ppll_p, 0, 1, 8, 5, 13, 1), + MUX(0, "clk_wifi_sel", wifi_p, 0, 1, 14, 1), + MUX(0, "clk_timer_sel", xin24m_xin32k_p, 0, 1, 15, 1), -static struct rk_clk_composite_def i2c8 = { - .clkdef = { - .id = SCLK_I2C8_PMU, - .name = "clk_i2c8_pmu", - .parent_names = pmu_parents, - .parent_cnt = nitems(pmu_parents), - }, /* PMUCRU_CLKSEL_CON2 */ - .muxdiv_offset = 0x88, - - .div_shift = 8, - .div_width = 7, - - /* PMUCRU_CLKGATE_CON0 */ - .gate_offset = 0x100, - .gate_shift = 11, - - .flags = RK_CLK_COMPOSITE_HAVE_GATE, -}; + CDIV(0, "clk_i2c0_div", "ppll", 0, 2, 0, 7), + /* 7 Reserved */ + CDIV(0, "clk_i2c8_div", "ppll", 0, 2, 8, 7), + /* 15 Reserved */ -static struct rk_clk_composite_def i2c4 = { - .clkdef = { - .id = SCLK_I2C4_PMU, - .name = "clk_i2c4_pmu", - .parent_names = pmu_parents, - .parent_cnt = nitems(pmu_parents), - }, /* PMUCRU_CLKSEL_CON3 */ - .muxdiv_offset = 0x8c, + CDIV(0, "clk_i2c4_div", "ppll", 0, 3, 0, 7), + /* 7:15 Reserved */ - .div_shift = 0, - .div_width = 7, + /* PMUCRU_CLKSEL_CON4 */ + /* 0:9 clk_32k_suspend_div */ + /* 10:14 Reserved */ + /* 15 clk_32k_suspend_sel */ - /* PMUCRU_CLKGATE_CON0 */ - .gate_offset = 0x100, - .gate_shift = 10, + /* PMUCRU_CLKSEL_CON5 */ + COMP(0, "clk_uart4_c", xin24m_ppll_p, 0, 5, 0, 7, 10, 1), + /* 7 Reserved */ + MUX(0, "clk_uart4_sel", uart4_p, 0, 5, 8, 2), + /* 11:15 Reserved */ - .flags = RK_CLK_COMPOSITE_HAVE_GATE, -}; + /* PMUCRU_CLKFRAC_CON0 / PMUCRU_CLKSEL_CON6 */ + FRACT(0, "clk_uart4_frac_frac", "clk_uart4_sel", 0, 6), -static struct rk_clk rk3399_pmu_clks[] = { - { - .type = RK3399_CLK_PLL, - .clk.pll = &ppll - }, - - { - .type = RK_CLK_COMPOSITE, - .clk.composite = &pclk_pmu_src - }, - { - .type = RK_CLK_COMPOSITE, - .clk.composite = &i2c0 - }, - { - .type = RK_CLK_COMPOSITE, - .clk.composite = &i2c4 - }, - { - .type = RK_CLK_COMPOSITE, - .clk.composite = &i2c8 - }, + /* PMUCRU_CLKFRAC_CON1 / PMUCRU_CLKSEL_CON7 */ + FRACT(0, "clk_wifi_frac", "clk_wifi_c", 0, 7), }; static int From nobody Wed Oct 18 14:34:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJh6VsPz4x64p; Wed, 18 Oct 2023 14:34: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 4S9YJh5Ckbz3TfV; Wed, 18 Oct 2023 14:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fhvd4aYWEcLxjql0hGKC1BlwZ5XGtaIOt1LXzQi7trU=; b=mtgbg6GdImT3A4BBX+I5j5SSLT+ldEKq6eo2vvAbNgNz70oPJdRxUKnz228S8i2pizIr+7 Upw5jE4DY84x+fPxotSn7oKCeHITuW1jHO/K9fIZ8hnXcc3o8eD0Tq7q3/YXO1UXsJjsks kfddPzW/Dk/yOdjUhk4wt5S8WBeJSKyfGLHB+IFtq5aUoftX7bYncYKzEKm/0bhQ31667/ HtWQzwwu3gY2nnf3yLfu+MeHD/4JWttb+FXBq91oYtqy/MwZ45E4Uy09HUDiO8Dv1K2nj4 0ojNnzilOaEe6sEAUrTTX53FUJ7VXCAQAqnCbtwCwIuR2VeLBVUqkn4Yk4KLdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639668; a=rsa-sha256; cv=none; b=mLcWwJpOpz22CyRdn7t6180QBJuEjGokuMYvho+ViY8mFv6zZ/sZQnQrx0YdgV714Au0CB lZzIwM4X27uF2iZK8sgiALngvaZQomj+MTU/bEnsjdJKvyqhwfljmqi4PvQdF5NqpjSBDp BzbEAuxlE8nrnWCamAvO3YLe/k54Y8WUDFH+ydWpjUTIIiZ3QtGkufYwyeuL4e4wresBcv 1StyuXXqEjhvFo6i7tRHnuEhWKinQJnpMZmFfifQc+MmoVpUCnjpg8rv9qmLnNOPoIxMzJ Xqt2w6rgLVOxSp6/3SMzvPZe4AOkIE4zJ4q3MXkuYSxIRzXkk/R46C8Yb3Tb3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fhvd4aYWEcLxjql0hGKC1BlwZ5XGtaIOt1LXzQi7trU=; b=qhHP2u9xhdVl9LG+HoyqcNEI43VnGdtP2Uj+MHUeuyW/3nUBHRpW28kmMigtm3dfd1DAF6 usdu9Xb9c6xAKbQ7c4F8z46Z5+lYMvAHQtYp0V0cN3xobsIk4pvfiK65f0Fb1+sEYkFAKI Xus7TNTQSu/Koy9MPQ35Mu55YSvDCoQkXOim9skzZca9x+JcXEqQ9A8BF7pf+6QUCGB/KA 1A1jYKHI3+d9dk0irTaMCdAsmspM6N9qgdaQdaUOKQH8cjOn0x3t0ldj+T6PgTsvGKKdOU u+5KYgfH4IDhBk06m7WYDFVcLzltMnXpBNJzhkOPafeZs0uhz8IfVA/PMD2lLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJh4KCWz18xM; Wed, 18 Oct 2023 14:34: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 39IEYSbR092699; Wed, 18 Oct 2023 14:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYSou092696; Wed, 18 Oct 2023 14:34:28 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:28 GMT Message-Id: <202310181434.39IEYSou092696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: fd4760cbda85 - stable/14 - arm64: rockchip: rk_clk_composite: Remove gate code List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fd4760cbda85016b1bc551458f09c5f51814e586 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fd4760cbda85016b1bc551458f09c5f51814e586 commit fd4760cbda85016b1bc551458f09c5f51814e586 Author: Emmanuel Vadot AuthorDate: 2023-09-21 14:56:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:35 +0000 arm64: rockchip: rk_clk_composite: Remove gate code It was a bad idea to have composite clock directly managing gates. All clocks drivers have been rewrite to not use this functionality and directly export the gate. We can now remove this code. (cherry picked from commit db34f02028f30bbf099bf1bce7ce66184f51b332) --- sys/arm64/rockchip/clk/rk_clk_composite.c | 31 ------------------------------- sys/arm64/rockchip/clk/rk_clk_composite.h | 8 ++------ 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.c b/sys/arm64/rockchip/clk/rk_clk_composite.c index a04b3aa2193c..a30dadbaf811 100644 --- a/sys/arm64/rockchip/clk/rk_clk_composite.c +++ b/sys/arm64/rockchip/clk/rk_clk_composite.c @@ -48,9 +48,6 @@ struct rk_clk_composite_sc { uint32_t div_width; uint32_t div_mask; - uint32_t gate_offset; - uint32_t gate_shift; - uint32_t flags; struct syscon *grf; @@ -145,30 +142,6 @@ rk_clk_composite_init(struct clknode *clk, device_t dev) return (0); } -static int -rk_clk_composite_set_gate(struct clknode *clk, bool enable) -{ - struct rk_clk_composite_sc *sc; - uint32_t val = 0; - - sc = clknode_get_softc(clk); - - if ((sc->flags & RK_CLK_COMPOSITE_HAVE_GATE) == 0) - return (0); - - dprintf("%sabling gate\n", enable ? "En" : "Dis"); - if (!enable) - val |= 1 << sc->gate_shift; - dprintf("sc->gate_shift: %x\n", sc->gate_shift); - val |= (1 << sc->gate_shift) << RK_CLK_COMPOSITE_MASK_SHIFT; - dprintf("Write: gate_offset=%x, val=%x\n", sc->gate_offset, val); - DEVICE_LOCK(clk); - WRITE4(clk, sc->gate_offset, val); - DEVICE_UNLOCK(clk); - - return (0); -} - static int rk_clk_composite_set_mux(struct clknode *clk, int index) { @@ -320,7 +293,6 @@ rk_clk_composite_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, static clknode_method_t rk_clk_composite_clknode_methods[] = { /* Device interface */ CLKNODEMETHOD(clknode_init, rk_clk_composite_init), - CLKNODEMETHOD(clknode_set_gate, rk_clk_composite_set_gate), CLKNODEMETHOD(clknode_set_mux, rk_clk_composite_set_mux), CLKNODEMETHOD(clknode_recalc_freq, rk_clk_composite_recalc), CLKNODEMETHOD(clknode_set_freq, rk_clk_composite_set_freq), @@ -355,9 +327,6 @@ rk_clk_composite_register(struct clkdom *clkdom, sc->div_width = clkdef->div_width; sc->div_mask = ((1 << clkdef->div_width) - 1) << sc->div_shift; - sc->gate_offset = clkdef->gate_offset; - sc->gate_shift = clkdef->gate_shift; - sc->flags = clkdef->flags; clknode_register(clkdom, clk); diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.h b/sys/arm64/rockchip/clk/rk_clk_composite.h index 79cd3777c84b..22a052da22c2 100644 --- a/sys/arm64/rockchip/clk/rk_clk_composite.h +++ b/sys/arm64/rockchip/clk/rk_clk_composite.h @@ -41,17 +41,13 @@ struct rk_clk_composite_def { uint32_t div_shift; uint32_t div_width; - uint32_t gate_offset; - uint32_t gate_shift; - uint32_t flags; }; #define RK_CLK_COMPOSITE_HAVE_MUX 0x0001 -#define RK_CLK_COMPOSITE_HAVE_GATE 0x0002 -#define RK_CLK_COMPOSITE_DIV_EXP 0x0004 /* Register 0, 1, 2, 2, ... */ +#define RK_CLK_COMPOSITE_DIV_EXP 0x0002 /* Register 0, 1, 2, 2, ... */ /* Divider 1, 2, 4, 8, ... */ -#define RK_CLK_COMPOSITE_GRF 0x0008 /* Use syscon registers instead of CRU's */ +#define RK_CLK_COMPOSITE_GRF 0x0004 /* Use syscon registers instead of CRU's */ int rk_clk_composite_register(struct clkdom *clkdom, struct rk_clk_composite_def *clkdef); From nobody Wed Oct 18 14:34:29 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJk02zHz4x6Jd; Wed, 18 Oct 2023 14:34: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 4S9YJj66m2z3Tfv; Wed, 18 Oct 2023 14:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU/uO0Is/dhni1PePKv0Kumgbos+xDsfpRznjvp4PdY=; b=h8ZSTUsFgT7B7wvI8Hj1Si3BrDTugHgszN/iimyF9V6TWE2CKD/TuxN6d9F4/XL9e8Bfpl GnAOMEbxTepZOk2b4VcLtZDz17okO0yAzygWeZ3t4MyltSMp+j0HqXTNClgGklLKQbZBBd C/RUSkQ8TAOuP5LuNLqKq30CjVpBqicF+tiVE2CdwZeB+aYNp2Uv6VDgkyz4l+kmVx89qJ 1WbfMV0qtoKVIKcxC/+OkJvAXVdk8vWwaWqwu+kFzd3kEfq3OKXK5ogjzZWA/WyydF13ax VC++CDjuzGczrz+54foyE5VMJdVkmpep+RTfGLHW1BL7FpjC5YOcTEYhUPOXyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639669; a=rsa-sha256; cv=none; b=Oa1GjM5+hxDShHJHqPRPe/KKLyaQ/F1/8SRUBXrHmUzqvzpWT7Orm0FpZzU51pJKpiY+9+ gAyj6g/bpM4oLK3w5MiQaSLcVncVOXmLhNp3WX+UjmlK+8i+GF/pB0PQsV0tfUUCLTjcLJ Ll0/5ausldlLM6KHHaeFZhF/66liJ/xpsETFMAYCh4SqOutsRzI676tYeBtOSkU5VCU3VP wclLI/NTGnTn0PS0+ASPW/6JD2Y/AUmccKeFPq5DorkLYafCNKpHkpOarI2X5HC61RT7qY xhUbcfruuJPlZymxUaD6R7Iu5ptjivFnSuqFscU5aLjWoAldD9JlST/0WXn1kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU/uO0Is/dhni1PePKv0Kumgbos+xDsfpRznjvp4PdY=; b=jpLzICCdvdMPzBdB4QkA83/zB/A3LkvGBoWQ2BsLoBoaMgHjqOj/K6Uwgtr2hbWNNfE1tz gYk6/DKCXZkB1wFamWMKfTeb19UslE8CqH3bTorO0BEloz+oZgK0jVd8+LhvqqRGW7hfLY 4JzuwxmOig2hAUgA+r7flPRyBiz/urdXyrS+4TIlc75QJ11+4sRWlENG+zsayJ+SSDpE9s YNzGLQcumjACBz63aqI2tStemwkm1cgRum0HFNbTCjr07yAnpIbRlQENPVOr0K6c4tbMHH /PZ2l1yxi/XfQ9z4v3obsWVGBD1vaakJOhd0vccGN9PI0kOPicm17DoF7RhOOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJj5708z19GR; Wed, 18 Oct 2023 14:34: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 39IEYT2E092747; Wed, 18 Oct 2023 14:34:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYTtJ092744; Wed, 18 Oct 2023 14:34:29 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:29 GMT Message-Id: <202310181434.39IEYTtJ092744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: d10e2facd6de - stable/14 - arm64: dtb: Add rk3566-quartz64-a.dts to the build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d10e2facd6deb9bbb0d6dfd22a91e0891c3855fb Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d10e2facd6deb9bbb0d6dfd22a91e0891c3855fb commit d10e2facd6deb9bbb0d6dfd22a91e0891c3855fb Author: Emmanuel Vadot AuthorDate: 2023-08-15 05:58:05 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:37 +0000 arm64: dtb: Add rk3566-quartz64-a.dts to the build We can boot on this board. (cherry picked from commit 2303980cfcb1e709c17b108ce66a25a8e7eea337) --- sys/modules/dtb/rockchip/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile index 79ce7f2c7407..8f747738e6b1 100644 --- a/sys/modules/dtb/rockchip/Makefile +++ b/sys/modules/dtb/rockchip/Makefile @@ -16,7 +16,8 @@ DTS= \ rockchip/rk3328-rock-pi-e.dts \ rockchip/rk3328-rock64.dts \ rockchip/rk3399-firefly.dts \ - rockchip/rk3399-rockpro64.dts + rockchip/rk3399-rockpro64.dts \ + rockchip/rk3566-quartz64-a.dts DTSO= rk3328-analog-sound.dtso \ rk3328-i2c0.dtso \ From nobody Wed Oct 18 14:34:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJl11Y2z4x6VN; Wed, 18 Oct 2023 14:34: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 4S9YJl0Jwdz3V27; Wed, 18 Oct 2023 14:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KOXp8FZpuM+p81ib5VDult5dlAE2GDASJ8nGCKnGBps=; b=KqdymkWimwB8e5rj2yDmq+IMUZS089ag1OfQiNQab2QYzvyZFvfleMzHu7ssdOjfElyADU I1qOLyWxhcvW8PWVu0/rO03sYs4z5ym2MARTjXpPE4WpBe7Br4LgionInaU+9pLm2BtNSd N9v94s3X6/CUWGvx9VbsALH6BQE6GQ9zVlIBO1Y8JGblzlnHymsU1AVzmcKcoufLl5CTYy dTDuN4fE0NFoJ0obFSL18PAFvzlDvdLsISEm1XB6xjIuaAd9TTNaoF0v20BR3c8bdaZILN P7Qh1KIsft+tgJNSVTeGBUXnGfvNeBiKalkWit7kiKd1Iq1q750QqfyefD4M+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639671; a=rsa-sha256; cv=none; b=nwD8qy9Txu5Aj7TBFZqfsmey13yfcEXIyd5foAYnVJAEnglYtk3ER4ZiWKyfz76FOvn60m IrbgxBFygc0mXStaFJtvRlp73Gm8s3GhWDOhF35gcraT1wEcx2rp8xlAfonen5suGpyMBl xr5Ol7/vsMN0EMx/7ScmobS5DrwJlJp67nXoWV7h1H7X0UqemZLXvRhDifA7be1i6W59Nc nbNBNfxS14bzq4kDQgjf3t9/dbOgceFVgw9sehKymQOOGfqhqtSSKjoBre8FD2WzvGi1x/ E9FMZ6tUHWUt/wU8mSs55qHPechwlxHEOqlsOfcxIwzMmrDg2CqY0VVQnqR8EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KOXp8FZpuM+p81ib5VDult5dlAE2GDASJ8nGCKnGBps=; b=App12hwyYJxHQQeRmD4PcOF3xcwb+tO4fQzs2Rj63TSllRK06fAGNtMLZb+oz1hpWBPc3B xL+AEhEDv018k8GzoXsIdGnMPFaadS+IH9I97trmktnuZHGuCWSQh1jGp+TJv/09fcjImn P928KPJ7qY9ZSMSYGYtfcD5Y5x9w56zWBb/X/AdzcM0yxqhqUUE4rKb2EsKDVPTcH+tVuV VgfDeBH2RtXqAWUReymqMGqa76UCKmJkLXrSqX5wIaL9NRtTXvUOw+JDQv8tAeIAFvEy6z gH8pBMwIB3G46oVBRQywR9YC25VtXxJ3iLd5voHg5TaGY2c1UabI7erQbUdHyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJk64chz18pG; Wed, 18 Oct 2023 14:34: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 39IEYUIa092805; Wed, 18 Oct 2023 14:34:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYUAh092802; Wed, 18 Oct 2023 14:34:30 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:30 GMT Message-Id: <202310181434.39IEYUAh092802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: d7d51aad8fc6 - stable/14 - iicbus: pmic: rk8xx: Fix logic in clock-output-names detection List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d7d51aad8fc6b8428c8de442faab4a49e5f4c5b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d7d51aad8fc6b8428c8de442faab4a49e5f4c5b9 commit d7d51aad8fc6b8428c8de442faab4a49e5f4c5b9 Author: Emmanuel Vadot AuthorDate: 2023-09-22 16:47:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:38 +0000 iicbus: pmic: rk8xx: Fix logic in clock-output-names detection Pointy hat to: manu (probably) (cherry picked from commit 66946511380bf088c96a7517ba9b018c943655c6) --- sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c b/sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c index a51937da0060..a2ea1e5bb4ba 100644 --- a/sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c +++ b/sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c @@ -112,7 +112,7 @@ rk8xx_attach_clocks(struct rk8xx_softc *sc) memset(&clkidef, 0, sizeof(clkidef)); clkidef.id = 0; - clkidef.name = (nclks = 2) ? clknames[0] : "clk32kout1"; + clkidef.name = (nclks == 2) ? clknames[0] : "clk32kout1"; clk = clknode_create(clkdom, &rk8xx_clk_clknode_class_0, &clkidef); if (clk == NULL) { device_printf(sc->dev, "Cannot create '%s'.\n", clkidef.name); @@ -124,7 +124,7 @@ rk8xx_attach_clocks(struct rk8xx_softc *sc) memset(&clkidef, 0, sizeof(clkidef)); clkidef.id = 1; - clkidef.name = (nclks = 2) ? clknames[1] : "clk32kout2"; + clkidef.name = (nclks == 2) ? clknames[1] : "clk32kout2"; clk = clknode_create(clkdom, &rk8xx_clk_clknode_class_1, &clkidef); if (clk == NULL) { device_printf(sc->dev, "Cannot create '%s'.\n", clkidef.name); From nobody Wed Oct 18 14:34:31 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJm3rKrz4x6XG; Wed, 18 Oct 2023 14:34: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 4S9YJm14MTz3V13; Wed, 18 Oct 2023 14:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8bKSGCbph7xAupBO0+o+CrXlYF6m0LIvOclKcDSSqGE=; b=YJaJM1MHSg0DDkVczjKdSSR6lWgE+Xj0GzvG4Z3n/vEzOgLT32UUg5sNDZksD2nwZfKE2z /DIuUN9XHuJSeePd9VRfIMfVPCbaWIU5JEwbA8R0tOw1p9Y1v6XeIt76j1ipsvXHmw0oG6 u9VlDBaQBMd+nouXVQjX2uhpgjQMHI81JR283OI035SZheT1/8je8CL4FtAby64LDt5+S8 sqPetJ+iEjVDZuS4oM/dRzJCwlqwWXtJ0GQuiM/1VezHjRNwD9f156hi3jZbhqoidXkIvv tNMw3KFZcA8ZaHplxtnoh+btREv9+NX3oF7B+6DWWUYW9WC8adks8I/WwbZfxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639672; a=rsa-sha256; cv=none; b=Bu+Y30XiaaGzaWtLhfks5Bwt2I/HDdvoBhJ7NIpgwklDiwrOa1c9uOIU2if63kgGbSeEL/ SDteTPczmvzzOe7GwC5ivRoFdXJxV2u1cM8n3Vbzo142buFsrHgTg7e6YGsZt1iCbVJDJu wDzu8cUJcmc4ZoAFWdtTY1S/F0vctqLcDXm1YH0PHdxnaY94bemXp2IiBmP4ObriHtzsR8 ibe+2qAJXa5QwWtyh5EeH0QJ7DmoVc3F+1eKVhOAtA7I4lF1M/bkNEG0xQTh8nbAktezDH hfCMgYzJQmCSjCGikvsXyY7MPLUiz4HgZL5FgisC7xdCbZK7UiebtY53j/3oUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8bKSGCbph7xAupBO0+o+CrXlYF6m0LIvOclKcDSSqGE=; b=Ce6jmcYcV6RaNnXx0rgA4HgBhezQH8Sna5ORxlgbEBbumYyeu4/OWkmjlecmcwou9LY2j1 hPqYmB1ejwGJYYgZZqP6/QwKP2Pr7AzHXj0zbKAHucW5F1m/BsRjyG0EJGYNigxBqm1PS1 j6s+Tulnm3dGHC+AlFcultRut+9erxqdGzLNSS0TvqaKKl7ovyUKBQxupZb23oZ/wX3NjQ pfrY8dL0ssHd19qMW0jI3nXYqw31yAKiV3x7WSlGZAhbwSnLR0VG1nwCqs47PdAaEq/bUv 1yu2vk7KiojuX2WHl5JCK59qUYOhvabJAbdxC0GMLnA9rkBVot5tH51MATcCNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJm05Gdz18rx; Wed, 18 Oct 2023 14:34: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 39IEYVKV092857; Wed, 18 Oct 2023 14:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYV3f092854; Wed, 18 Oct 2023 14:34:31 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:31 GMT Message-Id: <202310181434.39IEYV3f092854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8cb78c56a6bb - stable/14 - arm64: dtb: Add rk3568-nanopi-r5s.dts to the build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8cb78c56a6bbf6b7ad0611ba6131ae208c3889c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8cb78c56a6bbf6b7ad0611ba6131ae208c3889c4 commit 8cb78c56a6bbf6b7ad0611ba6131ae208c3889c4 Author: Emmanuel Vadot AuthorDate: 2023-09-22 16:50:31 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:40 +0000 arm64: dtb: Add rk3568-nanopi-r5s.dts to the build We can boot on this board. (cherry picked from commit f9e26e7853399e7b80ea033fa7fd72e8afe6d061) --- sys/modules/dtb/rockchip/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile index 8f747738e6b1..f8796ebb17af 100644 --- a/sys/modules/dtb/rockchip/Makefile +++ b/sys/modules/dtb/rockchip/Makefile @@ -17,7 +17,8 @@ DTS= \ rockchip/rk3328-rock64.dts \ rockchip/rk3399-firefly.dts \ rockchip/rk3399-rockpro64.dts \ - rockchip/rk3566-quartz64-a.dts + rockchip/rk3566-quartz64-a.dts \ + rockchip/rk3568-nanopi-r5s.dts DTSO= rk3328-analog-sound.dtso \ rk3328-i2c0.dtso \ From nobody Wed Oct 18 14:34:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YJn3hvlz4x6VT; Wed, 18 Oct 2023 14:34: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 4S9YJn2bf6z3V2Y; Wed, 18 Oct 2023 14:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74dfhVTdlJhej0GFDSAamd+E9l9HjjWsljRPV8MLqEw=; b=USqrlyCP4JuoR0sRUF3d9c/xlkzfBDsdTzCQlkMeyweIHg8wwdtI8bGZ6AWLR+VmfJG0uw vBwZHe8p29rKfyZ3LVNn9Ww7mt3pvmKrXzRHAEHm/lqV4zSuSJL0SgSlqGBtEyIgW567JW VuB2l22JPmq9exNgyunLVc91yq2kHukrBK37PSONSAWNTb8MZ+ULLmbCBiajxwszwrERMA wdeK50gD0A6El6PUcFh4H9gAqmBdGZnHXQP+fxdXynJJEWOkhVOyeqMpEDBCu5l5r/+f6I 5E8N8e5WLk4aOTG70X6LloF0HSr3HrG4QTnz+U9J5t87v+RQDZnTZ7c3OzxstQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639673; a=rsa-sha256; cv=none; b=wixWJru9slurYJTkbV322X8jHdbyA741AtIPOqrtOU+SGaoQgw8g4tFjXZRe0pRfLfFsiT eH9Sn5lH0iZb1CQDl1XF7LJQZXsMYycm7vNjjLd/pMiNGH+kelKj63THjSUggCUNXOIV3q Jbzm4GFJItyue1XTFMrB3/dCv5k+zya3EihYjzQN+OJj8zmyqpYGTsorDN70RQJA/CNy12 RhjGUyNOVTrFZ44WqhR9t4el0uvrHzWVM1ivl5CnXekOzjvechB7Dw9Ee48iMVpCYytAKw FTDXl4+NF8qZHmfwy0j56Y7mERketfJKSw900XBxMWrM/Knf/62ve/HgNykMcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74dfhVTdlJhej0GFDSAamd+E9l9HjjWsljRPV8MLqEw=; b=AP3rMn/mncSu+DSg6WqMQ4lh3uHBLxTVowrUGNH0LQUR2sWUBc5Fzkl9DjwrdNaC3hu3fY 7VDuLYV+3i/7PidjzjHvzDNs5B7KGcu+jC8yr6P1FfuhyZoOqQ3QcJTz11+z4n3A+PJipk 53T+FNcpWz6pIeO/3do0QBLhSiE51FXstWT2+ymN+vZJd+nPoEA8kJV9mFPXngNMHJFIU0 xnC8jDA77S0/9q9e0p+aGt6whtTO2n9ecf03cHB/6jCw2FTuJoSrHfo+tGgr9LnyINGXX6 PZjyks6/SpYLu5KaOOZaaSsc0CHrKyB5oEoCHei8XoQ+X0TKh48108Ds7gyS0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YJn0slJz18ry; Wed, 18 Oct 2023 14:34: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 39IEYXTm092905; Wed, 18 Oct 2023 14:34:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYX71092902; Wed, 18 Oct 2023 14:34:33 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:33 GMT Message-Id: <202310181434.39IEYX71092902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: e8d7fd8991bf - stable/14 - i2c: rtc: Add module for hym8563 driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e8d7fd8991bf5de5d2526a21ae8924315ecca563 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e8d7fd8991bf5de5d2526a21ae8924315ecca563 commit e8d7fd8991bf5de5d2526a21ae8924315ecca563 Author: Emmanuel Vadot AuthorDate: 2023-10-06 19:20:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:53 +0000 i2c: rtc: Add module for hym8563 driver It's used in the nanopi-r5s (cherry picked from commit 03205a8cd57feb95752142d899d026ff8f45f3e6) --- sys/modules/i2c/Makefile | 3 ++- sys/modules/i2c/hym8563/Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index abbb390b0e07..6c976e9303f1 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -28,7 +28,8 @@ SUBDIR = \ smbus \ .if !empty(OPT_FDT) -SUBDIR += rv3032 \ +SUBDIR += hym8563 \ + rv3032 \ rx8803 \ tca64xx \ tmp461 diff --git a/sys/modules/i2c/hym8563/Makefile b/sys/modules/i2c/hym8563/Makefile new file mode 100644 index 000000000000..e64190887610 --- /dev/null +++ b/sys/modules/i2c/hym8563/Makefile @@ -0,0 +1,13 @@ + +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc +KMOD= hym8563 +SRCS= hym8563.c + +SRCS+= bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + ofw_bus_if.h + +.include From nobody Wed Oct 18 14:36:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YLk1flcz4x6fK; Wed, 18 Oct 2023 14:36: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 4S9YLk19Jtz3XMJ; Wed, 18 Oct 2023 14:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBUcYvBoo6zL1G9H6qpOTxC9VQEk1DPyGhzt7/H7YRQ=; b=wG2DNjvJgM4WTrUh85e0oAgmsaiehPE64P3dtPZ5HZ7NRXbj5F7S1f0jbW5HgjqKxZTxis W82FcB6u5Ca+1Vf01381OHaFoMEgv6jTBioeb0wmnyBVRyCRoTvscS4niTnFblE1Br81CI jZNrjT/E0aDEGGIA7k8qcvsU87bdp78zlzZViFpr/dsQE6yBbBnnumSMJjOdZZ/cL3mIge Pl4FhsQAd4xq3bpdl1j6dx2a67B2+1JGRZIO7sqVc9jSGvzz8o9JLKI3dc+JVNKjc0xUd1 deEc3V4n0jaj9hfONTkX3WI5Q6SOvy/IaMxnMac+IdaZc2uPf5yIBMnZafTPrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639774; a=rsa-sha256; cv=none; b=Zjla1S7Orh4IuwMmrY9dI1cVkdYY5o/znJdk2kmA7F8w7/VhLmpiszT8qpgua27GkhOGc3 YI7JNaQPSsvO2H+VhKwl2CabrWNXCZ9a8lYU0iszpkQ+D5BIzvEhc19fHKuctfPMOSfs/R dh+7SSHvfhfR5Wt0oMvxRQGGpv815Pt3WaQxyY9i1oPVAxzSoNKGYAD8AHbnm5SNbYn84L RLA9mV3u95lCzMKBDeBuJGwqgsz5NSNxw0S8YXfuDWY8R5+xXit6Zd/eQAUjUf3wqasn4F Of2/3ko2TP00dA729MUhZCEn/ok3fpcyHYrdOmtiL3hgFx+F7HW/Mi+LdCh4QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBUcYvBoo6zL1G9H6qpOTxC9VQEk1DPyGhzt7/H7YRQ=; b=F2dFthSpI3gecUEh9LYS1M9xlh/1rrsFYINW4Zm2bApjeXWd3BGCM02vsSoz1KGr19TaVT lnCGaSjvRMK9voma0lczJ0DmsT02sIXmQAzkDXTY20u5jJSYw9JPxbBhjvHU1jYvjyfMnM ZqPCLUDmhLkZ/zC1r3mux3EPDImTOS1z+1P8eU7LEeY2jVOag5hOZuzhYqE5+KX+bLZUjA Pg+nk4BOzbl31e7UPFur6gcRXl+pM4PP+TGz29HDH0twlLwUPV4GkbhPU/lLfdKR/h/tVb hQQaDGia6qVzR7ChZqU+eOwtsjhWoA8Zoc7yxEDokpx2Epu4/cqAEoAnA+T2pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YLk0GZZz19GV; Wed, 18 Oct 2023 14:36: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 39IEaDFJ093333; Wed, 18 Oct 2023 14:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEaDKb093330; Wed, 18 Oct 2023 14:36:13 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:36:13 GMT Message-Id: <202310181436.39IEaDKb093330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 23ddec9e8f6b - stable/14 - mtree: Add missing sound entry for /usr/examples List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 23ddec9e8f6bde711ff65e48b7345757516189d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=23ddec9e8f6bde711ff65e48b7345757516189d8 commit 23ddec9e8f6bde711ff65e48b7345757516189d8 Author: Emmanuel Vadot AuthorDate: 2023-10-09 09:21:53 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:35:56 +0000 mtree: Add missing sound entry for /usr/examples Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit af5e348c61dac360de7774fc0ecbf53ae056177c) mtree: Fix entry Fixes: af5e348c61da ("mtree: Add missing sound entry for /usr/examples") (cherry picked from commit fee14577d59013f2277a4b0f4b2f4108e417e7c3) --- etc/mtree/BSD.usr.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index f434946e4b4f..396afdb2aec1 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -350,6 +350,8 @@ print .. .. + sound + .. sunrpc dir .. From nobody Wed Oct 18 14:36:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YMF2zmpz4x6h5; Wed, 18 Oct 2023 14:36: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 4S9YMF2RZqz3XqF; Wed, 18 Oct 2023 14:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2ulWq3sOhL2j122wKJ5TFgVz6eZw3gCCqHnskO45pw=; b=XMfRkE3+rK/wrpf+EUdILKIgKF/1d1xjrg8c8QAmCGwPuWETljNL1hH9Vp5vDjN2m9ogNf ddNgMTGwdL8z3XOndt7tcROTSxZnCS7sTMpTOXQLTfW05On2UPcd8Zyqsb8rEo0MDGnEDc ccJuTjgKQrQ+eG6Mx7PmVYm1ViVPYrZpzCxaeOaH8QN6pRHnFQ9EVlfV4HKs8eXc8NFGnh HYVMXe0GrCDGGFvWgPKAJO23JrVaxNNNSfanRMLs9Tx8dhIfg2bbulIxedZ2uOVe5EvQ3B xi7vEY2M/rI0M4+7n/rXDghnPkTtkU8INEtNeyYw9uMyIe4/e9MQWtxRT80aBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639801; a=rsa-sha256; cv=none; b=f5W5jtnQy9msbXyhUciYyBNxfvBGpP/j8/h6sC6JC3GjftoJBszFtHEau/hnV2nhbCNIpR rKJsM5JIa3/Y+uK4SSg7Y3Z07wMKmnpbLdRp4dgn2GjwqCyx5gKImqUlsRwp0BYqdMZJXb go7YtkQhi5ZpzZ7tGv5EyRF61nPiNnBXvgXNziW+ADgssTj81jXFwazlEh9DvGNr9sLiWR vopHaHPCn65QoGZrKfhLiVtjbAIUyixaeD9fXuR0pOcWjdmRQwZavkOH+3L4FJzfKhGpeM IvfdDoSH1v6lkOOWHK5urIs+rUaaB2MeIf3Da8nci+UH0UHdQwhJlOeVInqCBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2ulWq3sOhL2j122wKJ5TFgVz6eZw3gCCqHnskO45pw=; b=iqO/uwjPd4EydpAsX3Rrdh3ZSUWw6EIFsyWNNZWG6IBHlFxBzwzkZ26YgiIRCxeJL8F+SH D0+pytBYdWeMqqVTVBxR60KnoPXiEqJK8sPkTeBgRkF+Z3NMlgzUTiDilXPRy7dPsI4Lge Yu9EGDTMBzM+kIdjUe8DamnB8ji8OTpQRqumtE65OwyVwTpNSkLSvkzLcOoHEvXJwzaxsY X/SHJvW67WMzn6EGaxytGHVo0L9XJd4rjo5hJ4jsguOdAu/p0rn0xDGNuNjviKhH8M4PQR mLqRMAMerQHF6BSnsvHQH1/a4x9IeQiamPzas090h01/Q2BnVmehsIncWFfSmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YMF18Sxz18YR; Wed, 18 Oct 2023 14:36: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 39IEafdr093551; Wed, 18 Oct 2023 14:36:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEafJ3093548; Wed, 18 Oct 2023 14:36:41 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:36:41 GMT Message-Id: <202310181436.39IEafJ3093548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: a01e703e5018 - stable/14 - pkgbase: Move blacklist utilities to a new package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a01e703e50185cf30f9b7d0566656c7d08e55a67 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a01e703e50185cf30f9b7d0566656c7d08e55a67 commit a01e703e50185cf30f9b7d0566656c7d08e55a67 Author: Emmanuel Vadot AuthorDate: 2023-10-10 14:41:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:36:27 +0000 pkgbase: Move blacklist utilities to a new package Unbloat a bit FreeBSD-utilities. The only package that will depends on this new one is FreeBSD-ssh which not anyone have in some setup. And this will allow to have small pkgbase setup with ssh without having to bring the bloated FreeBSD-utilities package Name the package blocklist to reflect upstream futur changes. Sponsored by: Beckhoff Automation GmbH & Co. KG Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42148 (cherry picked from commit 0983e80a9addbd65603a430e186d2a50b4e15e29) --- lib/libblacklist/Makefile | 1 + release/packages/Makefile.package | 2 ++ usr.sbin/blacklistctl/Makefile | 2 ++ usr.sbin/blacklistd/Makefile | 2 ++ 4 files changed, 7 insertions(+) diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index e8d25ac7f1b8..932e186e3172 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -3,6 +3,7 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/lib ${BLACKLIST_DIR}/include +PACKAGE= blocklist LIB= blacklist SHLIB_MAJOR= 0 diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index cf91873fd8cf..255ef648329d 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -17,6 +17,8 @@ bhyve_COMMENT= Bhyve Utilities bhyve_DESC= Bhyve Utilities binutils_COMMENT= Binutils binutils_DESC= Binutils +blocklist_COMMENT= Blocklist Utilities +blocklist_DESC= Blocklist Utilities bluetooth_COMMENT= Bluetooth Utilities bluetooth_DESC= Bluetooth Utilities bootloader_COMMENT= Bootloader diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile index effba6761154..1e4778bf0953 100644 --- a/usr.sbin/blacklistctl/Makefile +++ b/usr.sbin/blacklistctl/Makefile @@ -2,6 +2,8 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +PACKAGE= blocklist + PROG= blacklistctl SRCS= blacklistctl.c conf.c state.c support.c internal.c \ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile index a33ea1d285b1..b6d1e236911e 100644 --- a/usr.sbin/blacklistd/Makefile +++ b/usr.sbin/blacklistd/Makefile @@ -2,6 +2,8 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +PACKAGE= blocklist + CONFS= blacklistd.conf PROG= blacklistd SRCS= blacklistd.c conf.c run.c state.c support.c internal.c \ From nobody Wed Oct 18 14:36:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YMG5qCmz4x6Xy; Wed, 18 Oct 2023 14:36: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 4S9YMG3My1z3XhX; Wed, 18 Oct 2023 14:36:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2TQgtysWqvQFHp5oTqV6jLQHzxB/3S1wt0ckBYkMxRU=; b=CsPfunEy75OH6TeCj4tx6kEYwqs4EpqehGSQERE3vvLUwCbL7S0zs2uXl9q+flYAlHQkrU 9TMdlu95U7ML+wVaiXtK2XwTsM0biVFIDUPT+j6F6RSTiBKb2jkJycn9b8sFLvbkI0raZM RK79q9cKUqeeGh2IXFVObEgi4M88m/pdDoZUmU56L8Xt6VMip3Af8bozwhJpUbeotvsLDC HMbQeKQeMqBJhfgcYtz7ZTJx2HoRmNMNqMsdMsJ+AGI8qXDwCmbsrxndosCL5j1ma7enKH 3HI1H2bKuEvGlYxz4sonHLrG0IsKQu54CY1pKFYiw6sdrjC3Z6GMJOFBrQ/oMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639802; a=rsa-sha256; cv=none; b=RKua6c7awOlbvg1B5nad84jtzEQqO6Vz6XE2CnvJEsOKemCafDxlBsamyv8VBBWojtFFZ4 T/C2yuovQLWsv092sOX+15rS5nW6FfwZqJ+D93Rxfjtcn5N4mNWdKhsq4/jpxlxjWpFn/s acEEFXPahBygmw2Luii8AFF/YvenHtEYWU+VW5vHysOGF1+O2PwXp4AaPYOjkPb1cuvU5s 2xn1a6F+iE+1aQT6+/sefNQAiFjAEe0XWLKN3D3zyHHm6KuX2hZv1xSvz1ekLGUPhbATpJ zn62YiaLcDiXUQX8YgfLKlzMrO5/xzc9Y6AUGIgvge96S7K1M7nCJL0jqxaT+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2TQgtysWqvQFHp5oTqV6jLQHzxB/3S1wt0ckBYkMxRU=; b=Z/Mlh+8pGt0lxWX/7L1C1YWVMObnOYLJbExOcLKMVGVK3i/fT44iBQxBt0Gh83IhG84rWH ycrwDkxfZVrvnjFC+W1qU82ltGZ/gPNfhdNRM9YEqiNkdwUBMEwmN/wKNE1+JF4q1IG6va k0KHOJYqCZEETR25d6Bem8D3gY9NMZZmizWuRTQIkGKYCqEVqKHRVbSecwrBNKFlLQ7gL3 Rr3h9s2n48IZ/UjXugvRurnMdykxShC4wdWBNuhQ2lu9GL8wC6Bo2ul19wulkRzZy0ZlK7 8oIBpNC4MkIqZuPg2LvcYdJpabvA98A0YO9wIc0WuivAbnN4hc05VwifAevDcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YMG2QYWz18vV; Wed, 18 Oct 2023 14:36: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 39IEagik093597; Wed, 18 Oct 2023 14:36:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEagNG093594; Wed, 18 Oct 2023 14:36:42 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:36:42 GMT Message-Id: <202310181436.39IEagNG093594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 08e6279a9f6f - stable/14 - pkgbase: Move uuidgen to runtime package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 08e6279a9f6f5a41fbeaeb3cc3ff93dc0a4d7d38 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=08e6279a9f6f5a41fbeaeb3cc3ff93dc0a4d7d38 commit 08e6279a9f6f5a41fbeaeb3cc3ff93dc0a4d7d38 Author: Emmanuel Vadot AuthorDate: 2023-10-10 16:56:20 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:36:30 +0000 pkgbase: Move uuidgen to runtime package This is useful to have a valid /etc/hostid and /etc/machine-id for small mfsroot based setup and not needing to install FreeBSD-utilities Sponsored by: Beckhoff Automation GmbH & Co. KG Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42149 (cherry picked from commit 6a804af4c0e3ce3574e23695f587c11f5958bcbb) --- bin/uuidgen/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/uuidgen/Makefile b/bin/uuidgen/Makefile index f0c4ce2e3538..234ee20300eb 100644 --- a/bin/uuidgen/Makefile +++ b/bin/uuidgen/Makefile @@ -1,4 +1,5 @@ +PACKAGE= runtime PROG= uuidgen .include From nobody Wed Oct 18 14:36:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YMH4vrwz4x6Y0; Wed, 18 Oct 2023 14:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9YMH4KZ3z3Xfj; Wed, 18 Oct 2023 14:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8p6KO+W5l2RDVmD+WU2ZBlPZ1qWaOlvZMpWQ3kHbMc=; b=VFLWof9CD7MOePLP6HzasvY9BiZ3hZYu8ve2j2wa2nG1WpOF0ZmWOCF2nUHL5eWQadgis7 ZOFrP83R7oQSh92NwlPG7IFsl2Z3mHjLrqop4kqjec4LYTVCYHA4f/oV08XyEyPkaQB2q5 S4j5r0bChRlGZSgCutLwhrtzmOdF7pCU3UD2UxXdeYjsy2p5suyFbK4Cu+6oXCKjR1Fto5 DoS+C0MVBClti7SU3uuV6XuH8i8jfyWBN/7uVhCb+91p1DrGuh0xtV8v0vCnzq4G5X1JYy NsSXDqRCYMHHTWTpkl+V9HBB55D81ranXN9FN7Wet8dLuH1BV2W23poPut8qoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639803; a=rsa-sha256; cv=none; b=lj2ewFDlbL240ZwmhUW2p9S5aXhMJc7CtZcdhLa7qy4Fwmn9v52bOm7Hx98jLxkYy3U2u5 8MtAJrrqOSFnS0B/jZLt1Ix+3YS2UeR92KmDICwHglBUevUxeEm7xuG1ZZi//Yn4o80oWc BjycSgN4QrUAdh+f16uxyvE9dp1Zrqz6QPIiidx+JHTeRXCicNvBubv25Gu2QxlPb/YuKR omHiIFjgduyCcjYsU04wgGzZaItWo1GTZ3icrucFeDjVGhu+RyEz+nqY3uSGRdjJEIFmP6 D7Dewo8BdoqKTZpWCAQvE6GB/5E5hwfgyAFAKpyd77uo+gCLc0KFuTzDtzR5Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8p6KO+W5l2RDVmD+WU2ZBlPZ1qWaOlvZMpWQ3kHbMc=; b=huj2ixGgFmTCIXZg3TX3nQmTkh7XcaFFleSppvHXgCQyO+k0mfoAimaG2jq3i2C2NrDuEE vC2+ydDy2PgGxF9GeGtp7TNHwv8h6vTbJbUHfvoBV0ayNLNVmM5su82fF+L/3Sl6nH4CDN XoN79KgXzrHCBa8RtkYmJ/v69cML2YR4c0o3PfguXu6z1pJVuYnUFMtqlouyKLmbpDumJG 96cDISncvLAYznSIpw2m4shNqFWzEAqD2l7diIzRtGr+2ncazPt+uTUM70cQuIfL/mqiEm yt6HawgR0jvrvlS2kSVCvvTHSvUVjGEsSdw4xqh5JxZHTstYgTLyqxLdBx+aNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YMH3QQtz18vW; Wed, 18 Oct 2023 14:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39IEahXI093649; Wed, 18 Oct 2023 14:36:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEahnw093646; Wed, 18 Oct 2023 14:36:43 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:36:43 GMT Message-Id: <202310181436.39IEahnw093646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 3469786f2035 - stable/14 - pkgbase: Put atf_python files in FreeBSD-tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3469786f20357f45a0e07878f5e4623d139d6e0f Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3469786f20357f45a0e07878f5e4623d139d6e0f commit 3469786f20357f45a0e07878f5e4623d139d6e0f Author: Emmanuel Vadot AuthorDate: 2023-10-12 17:41:38 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:36:31 +0000 pkgbase: Put atf_python files in FreeBSD-tests Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 944223076fbcb681a8eb3e118ddafab79b21ac3d) --- tests/atf_python/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/atf_python/Makefile b/tests/atf_python/Makefile index 889cdcdf9592..6b7c39948b0a 100644 --- a/tests/atf_python/Makefile +++ b/tests/atf_python/Makefile @@ -2,6 +2,8 @@ .PATH: ${.CURDIR} +PACKAGE= tests + FILES= __init__.py atf_pytest.py ktest.py utils.py SUBDIR= sys From nobody Wed Oct 18 14:37:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YNj4rvVz4x6hW; Wed, 18 Oct 2023 14:37: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 4S9YNj4CMdz3YZ3; Wed, 18 Oct 2023 14:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uHDMdcoOoPmHOvz1QE+klaZxYUyH03+PGl77QAy8HOI=; b=mQ3InmqySZWbkrjEgFIT/uogFn6fTem2eMUIOTd9W9oNtxI4y7XaeubPYgMdeQXVJG1l8r d7nZzDFI0KtubmwJ1SyWXTZ+SMAmodNwO9OT8QFF397VHdc6i9fq9NN4Un1v1/uZ9o84fJ 36QQE5JVVuLE3Q5/oh/3luqK6XbP01k7lUmQLH9D+nxdVjsmgKLbCk0m4Qf/1aGzEVG5GP 2/wAtWBEb0ZUv8CURlcb3S0BELWftjxp/gjVTCwyTAjLztQxnixQHYW71gtLiVTUt7VPxi vyvOfR81DDo0LpOj/PWQz5PJ5zZrTZPxV85aeJzcYZy39mf2bF9+xHmi/Oje4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639877; a=rsa-sha256; cv=none; b=lJvqllxuaoD8BqerCHoZa49zxhAvyCZV0Z5QKJA31BMIdTHMZLaczlyt/KNk2FxKSDjMUo yE8rAGSNeuiUTNDdxNMMvN16F/QfR588CCMKunqGGgrw+JLroGh3eV9HUwzexolj9P0WWm pdJkjrV2oSu+DgMefp9smL3OLgAedzEWTmmpwM9ZBgn6cPlQVzcYABvNPiRbpwZcXWDXfL 68CZEsKjCtiL2KAR9JmN5nZwW0Xbk/BM3oTyxCH+0IHH3ANHRuP1X7t9o7X68dMFyB3ro0 FrhSASyk+XWfjmua/4VyxM1+Vnlh6mZMnVn9Db2ZgkqUUA1g/W8OmozoiAOePw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uHDMdcoOoPmHOvz1QE+klaZxYUyH03+PGl77QAy8HOI=; b=jzFMBeqyflBcOUhPzhzHyiKNeyfsAkH+RpL4oxQ4roUW58Hukg8RtvUhlopRcnaAZm9fHl MSP0it08+rMpUNDA6G+hauEA8+jdCp33zQJ5l3rCyaX1DeB/v1OAFur6V/jYsrjVpkXdjs BfMZ1Dnwqx3MUWPizwEsv20iul2AXfOHdb8Tnu8hb94Q4QIi0d9amRXUyX0O4yfgcwh7cf kEc4DxMSU2oDEIfEfOoxdzsvJK0fxbR69Q6wG7qg4UzO6HOAXN/7/JDemBmGxEhCs7KEIr gZ6JP9dkoziN0blXTWM+R7Q6Aw5QOoG0ZVb7MidZM1uNQNG4oc8okpvYsv2slQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YNj3C0Qz18YT; Wed, 18 Oct 2023 14:37: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 39IEbvYM093952; Wed, 18 Oct 2023 14:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEbvcb093949; Wed, 18 Oct 2023 14:37:57 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:37:57 GMT Message-Id: <202310181437.39IEbvcb093949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 141fe209e367 - stable/14 - arm/allwinner: fix variables initialization in clkng List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 141fe209e367de8a1c251e9ec34e10ee64ef8263 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=141fe209e367de8a1c251e9ec34e10ee64ef8263 commit 141fe209e367de8a1c251e9ec34e10ee64ef8263 Author: Nicolas Provost AuthorDate: 2023-09-20 08:49:31 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:37:35 +0000 arm/allwinner: fix variables initialization in clkng Signed-off-by: Nicolas Provost Pull-Request: https://github.com/freebsd/freebsd-src/pull/849 (cherry picked from commit e39e6bef6725bde54f94aac7f0cda47c2170dc48) --- sys/arm/allwinner/clkng/aw_clk_m.c | 2 +- sys/arm/allwinner/clkng/aw_clk_nm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/allwinner/clkng/aw_clk_m.c b/sys/arm/allwinner/clkng/aw_clk_m.c index 1d3d5a9878f7..2728ff230a9f 100644 --- a/sys/arm/allwinner/clkng/aw_clk_m.c +++ b/sys/arm/allwinner/clkng/aw_clk_m.c @@ -135,7 +135,7 @@ static uint64_t aw_clk_m_find_best(struct aw_clk_m_sc *sc, uint64_t fparent, uint64_t *fout, uint32_t *factor_m) { - uint64_t cur, best; + uint64_t cur, best = 0; uint32_t m, max_m, min_m; *factor_m = 0; diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.c b/sys/arm/allwinner/clkng/aw_clk_nm.c index a1cba2db5f76..61592eb04de1 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nm.c +++ b/sys/arm/allwinner/clkng/aw_clk_nm.c @@ -136,7 +136,7 @@ static uint64_t aw_clk_nm_find_best(struct aw_clk_nm_sc *sc, uint64_t fparent, uint64_t *fout, uint32_t *factor_n, uint32_t *factor_m) { - uint64_t cur, best; + uint64_t cur, best = 0; uint32_t m, n, max_m, max_n, min_m, min_n; *factor_n = *factor_m = 0; From nobody Wed Oct 18 14:38:25 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9YPF3qGJz4x6bZ; Wed, 18 Oct 2023 14:38: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 4S9YPF3GMtz3YdT; Wed, 18 Oct 2023 14:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXA4UhNJ2sCmOCNv7yul6vuvSGQkWsfdAuMNyyCmx74=; b=i+JYsChQ3PLand5bt7QAu7pbVy9srU5pRkvHvvbEWt3d9swKPoh0H0P6mHRUdgbojyKVfz +HHyqNus7HMgyz+FWAUhiP5nbKeUAFCHwvczsGdEBX/s2/ocVfsxYhH7pULadX6C87SJco luTA216fPOi/1xV0BAuyJBrHxIq65hZl7Z3QxBksNTT1CYQLysocrfpHc5DwNVsMktA5jl UH9j62E7xKEP5EqSEXc1KVPYYkojBG3zqjMQMJMhSOwOHJfgj0jwEo04ts5eTBLsEFtGzK iy6EhFGqbDoogOsITItonPIzfF2DgXgOxG+ux8v8X1VDdqSXhduyTq/4qFuWZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639905; a=rsa-sha256; cv=none; b=a8xem96dhJNCrNANeNiNVBF/31UYZkXPZGW8cmf2DTmX8B7lPwDjQvB6xDAttt8ivOYaUg mj1RRbO6yFnO150a/zX/tqyIgMHCltP3T12F2q86lUiHQnYm3L2apCAlpeOhKWp8On2xtL LFbWBdsqhqitV0Iv+1IgBYq9tM7jmqbGKUYhghjg2VAEzA9jeVN7mUGw6zEuIO2pGn7M9X TkKSdxHRJU6ZPbORjV9J+SUxC4mHbemPGpXTdLFXqZB/sm+6tHfkgz8meQTOgnaO1eOJwo syde9LNniiNcvKIyxuDMZdgEHSfXTh3INqmQgAWvtbQvWBMaSG3/uNNdkw/BVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXA4UhNJ2sCmOCNv7yul6vuvSGQkWsfdAuMNyyCmx74=; b=UuAzWAVFOMmMXZgRJ0nPIDI8/41fNEPQoIpiKM5S3V6IMwBYXMsDgK+xPC5d3quMcWGxAX p5Wb9oY+oA3LUMrpQP2Xy5479q1D6vaoHH+YEnAj/VI7kFLWgZIbv9LmM35EfvaY7s3RyX D2+ByW81B95Cs5T1pc0b6aF7TgSfCPvSbvRZ17L5FWH3sv5M+nHQWrod8/RGTuQ19ryXcT OQDdBS2qh1hSTpAJpy82HEG61X7CA+CUzBfsK0VGLHDOoCucV2K14t+3n4lL2gFw13XKUv KZmGAGTIksuYmRLCB+8N/SNQoOJMU+h3pfpXuafaAMFxVMIot8iGiqJwM/4OxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9YPF2Cnyz18s4; Wed, 18 Oct 2023 14:38: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 39IEcPP1094135; Wed, 18 Oct 2023 14:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEcPac094132; Wed, 18 Oct 2023 14:38:25 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:38:25 GMT Message-Id: <202310181438.39IEcPac094132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 03ef42bbe15a - stable/14 - pkgbase: Fix ucl for libcompiler_rt List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 03ef42bbe15aed9226939daf2f3b0e10183dea7e Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=03ef42bbe15aed9226939daf2f3b0e10183dea7e commit 03ef42bbe15aed9226939daf2f3b0e10183dea7e Author: Mikaël Urankar AuthorDate: 2023-09-22 09:41:09 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:38:10 +0000 pkgbase: Fix ucl for libcompiler_rt It's only a -dev package now so add it to the list of -dev package that don't have non-dev package. PR: 273859 (cherry picked from commit 36468371ce9565bf8989ad8e561e041bfe9cb80f) --- release/packages/generate-ucl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index de3fec3f0ca7..aef08e50c037 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -47,11 +47,11 @@ main() { # -dev packages that have no corresponding non-dev package # as a dependency. - libcompat-dev|liby-dev) + libcompat-dev|libcompiler_rt-dev|liby-dev) outname=${outname%%-dev} _descr="Development Files" ;; - libcompat-lib32_dev|liby-lib32_dev) + libcompat-lib32_dev|libcompiler_rt-lib32_dev|liby-lib32_dev) outname=${outname%%-lib32_dev} _descr="32-bit Libraries, Development Files" ;; From nobody Wed Oct 18 15:29:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9ZWg4srhz4x9b9; Wed, 18 Oct 2023 15:29: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 4S9ZWg4LLDz4BNd; Wed, 18 Oct 2023 15:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+a0+vFCJz9Z5CwqZKHSeKuyNVnlvrhwXFZ+7AyP/t8=; b=oqw2loUqLQ137QlLIcBhATwZy0g3xoS6Bg38XbZ9jWQn4vb5/QdmUTigbCXNGeOeyCRVTv x+EI9V90k0MOMVd5bym1tco6/D/qYWvhDJKzXr5JS0gTxApBmoKQUAV38vX5vZS5KUTfmS k4cPPXA1XYKFrCwgNJNE+m+3ONhGKrU781ZXuE8OsEjIRrbeCyUwK+zQ8zvRGrMaZtNZ4g fAkP1SNW8GyeuLAA1jGgcE1134VFnjrqxK6C8Gd+NOh288WvxN0GPgvknnXtLsPczqS+c3 QmMSJfY3fZA6uti0TPkeINFuS/YiqaRrSM4n0vEedJDqwLpuklqYPKijibOp7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697642943; a=rsa-sha256; cv=none; b=dBlVT75HGqJj8SRuCwAz0lw1nQBOYchWziI/zJduMXz5C56LK47ewuDnmyVzsnlvxmzlgD hf41ZzT4JX4XcYKqS37xEkWXTwP44ZzEwEpMpi9JOFjQRM54WZaRzt42J7jGPzm1E5AC5+ 8KW7sTAuTctR0hd0uU3HlFfT434S/NlXLTKhodDhi0IkDPOzaX7BQbElb8RFlGyPNtxDMV qIGv2si9VWDvLfx8C0RTvsNQVwtvy6J3zZsSoDW8uieGEHOHSocwHoog5HnTwCdEqGYWo5 JX9UAyWVpeJrw+l6AJR7BOEN7lQ6341e5MQB0z9Ff8FJjoBEmkXVwIqo7ExRIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+a0+vFCJz9Z5CwqZKHSeKuyNVnlvrhwXFZ+7AyP/t8=; b=Y0tvcB8rIx9cfGaZ6o9OeDwlAb6tqvfrI9COrcy46nmxtaU6r2/eZzoHIT4y+E80d8bPX3 ChDHx5VVQ0SiiAjKzZGf4/xhdN3WkXfq/ImIbmuQCeDiRaiiTNwjhNEq23Ge9BPfCSeyhe wIKz+x1qDJTm7t9ciVBrtcmhadXh7oLRmP1rAMNoZ0jHY4HQv9tJa0fAWNIfPWE4POXyKe ky7zdnyy4ggUg74Ir96sro5KTHlJmqLSWu92Pqyd1YxXL8jSWmSE/iX2VIrZB13vdr2KwK pxeyhXa+th4+XME1cgigxSap7wKrCwipZaPHAbXR2lGcgtyyT5kuY43H0vbtkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9ZWg3NhWz1BVj; Wed, 18 Oct 2023 15:29: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 39IFT3hT078240; Wed, 18 Oct 2023 15:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IFT3kK078237; Wed, 18 Oct 2023 15:29:03 GMT (envelope-from git) Date: Wed, 18 Oct 2023 15:29:03 GMT Message-Id: <202310181529.39IFT3kK078237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5401ebd33cf5 - stable/14 - mkimg: Ensure GPT Entry Array is at least 16k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5401ebd33cf5073e8c0f095527504d38f74a926b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5401ebd33cf5073e8c0f095527504d38f74a926b commit 5401ebd33cf5073e8c0f095527504d38f74a926b Author: Warner Losh AuthorDate: 2023-10-18 15:23:40 +0000 Commit: Warner Losh CommitDate: 2023-10-18 15:23:40 +0000 mkimg: Ensure GPT Entry Array is at least 16k UEFI v2.10 Section 5.3 documentes that the minimum reserved space after the GPT header be at least 16kB. Enforce this minimum. Before, we'd only set the number of entries to be the unpadded size. gpart's selective enforcement of aspects of the GPT standard meant that these images would work, but couldn't be changed (to add a partition or grow the size of a partition). This ensures that gpart's overly picky standards don't cause problems for people wishing to, for example, resize release images. MFC after: 1 day (we want this in 14.0) PR: 274312 Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42245 (cherry picked from commit 9b42d3e12ffc6896fcb4e60c1b239ddf60705831) --- sys/sys/disk/gpt.h | 7 +++++++ usr.bin/mkimg/gpt.c | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/sys/disk/gpt.h b/sys/sys/disk/gpt.h index e48b13684814..596a5cba1681 100644 --- a/sys/sys/disk/gpt.h +++ b/sys/sys/disk/gpt.h @@ -82,6 +82,13 @@ struct gpt_hdr { CTASSERT(offsetof(struct gpt_hdr, padding) == 92); #endif +/* + * The GPT standard (section 5.3 of UEFI standard version 2.10) requires + * we reserve at least 16k after the PMBR and the GPT header for the GPT + * Array Entries. + */ +#define GPT_MIN_RESERVED 16384 + struct gpt_ent { gpt_uuid_t ent_type; gpt_uuid_t ent_uuid; diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index 59c51a6a177b..ed3f008c394f 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -#include +#include #include #include #include @@ -124,13 +124,21 @@ crc32(const void *buf, size_t sz) return (crc ^ ~0U); } +/* + * Return the number of sectors needed to store the partition table. + */ static u_int gpt_tblsz(void) { - u_int ents; + u_int eps; /* Entries per Sector */ - ents = secsz / sizeof(struct gpt_ent); - return ((nparts + ents - 1) / ents); + /* + * Count the number of sectors needed for the GPT Entry Array to store + * the number of partitions defined for this image. Enforce the 16kB + * minimum space for the GPT Entry Array per UEFI v2.10 Section 5.3. + */ + eps = secsz / sizeof(struct gpt_ent); + return (MAX(howmany(GPT_MIN_RESERVED, secsz), howmany(nparts, eps))); } static lba_t From nobody Wed Oct 18 15:29:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9ZWh5mKgz4x9bF; Wed, 18 Oct 2023 15:29: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 4S9ZWh5X0jz3gqX; Wed, 18 Oct 2023 15:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maqRrSEnfDUz3K4/PYg0oLzhlRx8Qvk8uKab7rwLjNI=; b=jA8f7lrcx61HtCRsJX+O77Rf2xGZW4cSiHHiNjUdlR0JVtbPvWjXSYcmwkyUCu56/dD9Qp Ds28IB8Y3m13lNo2g0Zi6vwoZ71gsaeW9eEvxrjZvNp3U+TuGHefhz0XY9AFD5oDkuvJzG 82hxHZJd1NnPaArrQFg5meaQMSnj/LLNGyVPjgx5TzZPsqsV+UlvtnIMJ1pvVsVscXJA+V 4Uj6heJRON3O6xhB3qyGDULwq+5yojb4svL8+UF+7YRPwxVwO7dLQWfdVwCnHCgA8W622E GRlICH5b1iK/qIHNQbH+mu2ZLx1dnj//GxUBG0nKi4Sh6TWurLKyv1iQx26yvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697642944; a=rsa-sha256; cv=none; b=xmmp66Kvfuw1X3UedT8w8jHznGsIgJ/hdLU6krtu5eIRAW/RjL0uqVSQjKFO5D5QNzQ0Yj a67rit2dly+zk9iMMMC0kE+CXOa6DSITWd1DLDmFYpL5wW91bWitsHlgbVIqga8C4abDRA 6Vgq52YD9HAu0+PaLR/5af5JXs5h9SowaLE6A1d77iskvjBNwOBW+3+FdFYzEJ3x3Q4W4Y 3PWssKpuwI2AaUjMheU27YwFeKs1tszDVVXaCPjGIJZ6vzbvhhNpvZXrUBCArGnGDU2x2q Gsd0MMEmc9m85HlR/faCHM2zq3JH5o/mHRrOXTeWlu3KKHvriBdNnb4hqGjjng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maqRrSEnfDUz3K4/PYg0oLzhlRx8Qvk8uKab7rwLjNI=; b=EeFBtU8tckMkHkcN1/LIsKU4FAgmJjDkLepO06TcJAsbRYNLireNFCaj4IQL2GTqG9UbuA 8Rh6rQOTh9QVI5uQdzyDACeyWjXNOokO515nCmx/iVuCoc7nL2d/nTuxDaGjmrYApF1/J7 lyJP1iuDouGsIe4C/abHzERHGAhBw2kU2xeMnO5//SJ+zKbm6ohbxwxl/pWsVvWMGrRv4V pZ9xoLBmxq6R5wT3nZE3E3Nl4vjzvyKYS+WnTWWfVm4f4u+RRTyYUcv4ddPe+gqFB6nPDX sq1WOVTgzIocRk4poWBy2663/VoyUls1GM05usyuatXJ0yE236PDl6YszkhimA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9ZWh4bTlz1B7f; Wed, 18 Oct 2023 15:29: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 39IFT469078288; Wed, 18 Oct 2023 15:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IFT49w078285; Wed, 18 Oct 2023 15:29:04 GMT (envelope-from git) Date: Wed, 18 Oct 2023 15:29:04 GMT Message-Id: <202310181529.39IFT49w078285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4a3cdf416895 - stable/14 - mkimg_test: remove vtoc8 images, they aren't needed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a3cdf4168953c01b8b0e6a9ca72804ef2860309 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4a3cdf4168953c01b8b0e6a9ca72804ef2860309 commit 4a3cdf4168953c01b8b0e6a9ca72804ef2860309 Author: Warner Losh AuthorDate: 2023-10-18 15:23:41 +0000 Commit: Warner Losh CommitDate: 2023-10-18 15:23:41 +0000 mkimg_test: remove vtoc8 images, they aren't needed vtoc8 support expired with sparc64 removal, so remove them all. Sponsored by: Netflix (cherry picked from commit 83bd5a833c3a14b74736e7b3fa0be66252a5a3dc) --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex | 544 -------------------- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex | 72 --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex | 20 - usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex | 52 -- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex | 28 -- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex | 71 --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex | 314 ------------ usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex | 544 -------------------- usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex | 72 --- usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex | 20 - usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex | 52 -- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex | 28 -- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex | 71 --- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex | 314 ------------ usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex | 550 --------------------- .../mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex | 77 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex | 22 - usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex | 59 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex | 30 -- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex | 73 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex | 324 ------------ usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex | 550 --------------------- usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex | 77 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex | 22 - usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex | 59 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex | 30 -- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex | 73 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex | 324 ------------ 28 files changed, 4472 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex deleted file mode 100644 index 93afee83d903..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex +++ /dev/null @@ -1,544 +0,0 @@ -00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 10 00 |.............B..| -00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00001000 00 00 00 00 00 00 20 00 00 00 00 00 00 00 30 00 |...... .......0.| -00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| -00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| -00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| -00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| -00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| -00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| -00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| -00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| -00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| -00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| -00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| -000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| -000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| -000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| -000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| -000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| -000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| -00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| -00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| -00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| -00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| -00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| -00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| -00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| -00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| -00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| -00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| -000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| -000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| -000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| -000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| -000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| -000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| -00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| -00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| -00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| -00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| -00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| -00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| -00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| -00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| -00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| -00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| -000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| -000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| -000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| -000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| -000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| -000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| -00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| -00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| -00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| -00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| -00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| -00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| -00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| -00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| -00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| -00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| -000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| -000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| -000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| -000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| -000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| -000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| -00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| -00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| -00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| -00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| -00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| -00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| -00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| -00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| -00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| -00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| -000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| -000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| -000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| -000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| -000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| -000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| -00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| -00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| -00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| -00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| -00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| -00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| -00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| -00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| -00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| -00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| -000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| -000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| -000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| -000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| -000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| -000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| -00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| -00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| -00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| -00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| -00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| -00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| -00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| -00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| -00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| -00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| -000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| -000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| -000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| -000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| -000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| -000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| -00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| -00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| -00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| -00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| -00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| -00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| -00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| -00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| -00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| -00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| -000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| -000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| -000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| -000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| -000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| -000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| -00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| -00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| -00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| -00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| -00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| -00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| -00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| -00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| -00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| -00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| -000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| -000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| -000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| -000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| -000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| -000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| -00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| -00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| -00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| -00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| -00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| -00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| -00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| -00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| -00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| -00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| -000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| -000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| -000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| -000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| -000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| -000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| -00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| -00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| -00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| -00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| -00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| -00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| -00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| -00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| -00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| -00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| -00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| -00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| -00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| -00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| -00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| -00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| -00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| -00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| -00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| -00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| -00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| -00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| -00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| -00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| -00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| -00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| -00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| -00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| -00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| -00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| -00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| -00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| -00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| -00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| -00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| -00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| -00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| -00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| -00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| -00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| -00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| -00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| -00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| -00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| -00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| -00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| -00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| -00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| -00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| -00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| -00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| -00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| -00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| -00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| -00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| -00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| -00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| -00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| -00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| -00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| -00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| -00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| -00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| -00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| -00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| -00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| -00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| -00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| -00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| -00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| -00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| -00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| -00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| -00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| -00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| -00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| -00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| -00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| -00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| -00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| -00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| -00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| -00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| -00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| -00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| -00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| -00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| -00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| -00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| -00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| -00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| -00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| -00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| -00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| -00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| -00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| -00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| -00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| -00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| -00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| -00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| -00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| -00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| -00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| -00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| -00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| -000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| -000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| -000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| -000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| -000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| -000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| -00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| -00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| -00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| -00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| -00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| -00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| -00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| -00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| -00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| -00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| -000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| -000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| -000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| -000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| -000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| -000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| -00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| -00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| -00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| -00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| -00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| -00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| -00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| -00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| -00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| -00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| -000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| -000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| -000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| -000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| -000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| -000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| -00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| -00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| -00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| -00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| -00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| -00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| -00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| -00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| -00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| -00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| -000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| -000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| -000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| -000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| -000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| -000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| -00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| -00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| -00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| -00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| -00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| -00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| -00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| -00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| -00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| -00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| -000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| -000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| -000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| -000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| -000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| -000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| -00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| -00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| -00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| -00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| -00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| -00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| -00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| -00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| -00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| -00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| -000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| -000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| -000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| -000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| -000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| -000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| -00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| -00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| -00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| -00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| -00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| -00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| -00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| -00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| -00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| -00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| -000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| -000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| -000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| -000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| -000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| -000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| -00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| -00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| -00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| -00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| -00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| -00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| -00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| -00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| -00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| -00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| -000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| -000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| -000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| -000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| -000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| -000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| -00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| -00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| -00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| -00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| -00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| -00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| -00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| -00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| -00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| -00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| -000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| -000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| -000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| -000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| -000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| -000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| -00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| -00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| -00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| -00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| -00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| -00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| -00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| -00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| -00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| -00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| -000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| -000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| -000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| -000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| -000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| -000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| -00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| -00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| -00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| -00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| -00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| -00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| -00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| -00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| -00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| -00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| -00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| -00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| -00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| -00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| -00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| -00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| -00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| -00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| -00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| -00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| -00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| -00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| -00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| -00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| -00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| -00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| -00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| -00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| -00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| -00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| -00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| -00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| -00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| -00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| -00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| -00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| -00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| -00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| -00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| -00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| -00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| -00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| -00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| -00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| -00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| -00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| -00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| -00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| -00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| -00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| -00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| -00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| -00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| -00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| -00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| -00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| -00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| -00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| -00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| -00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| -00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| -00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| -00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| -00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| -00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| -00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| -00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| -00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| -00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| -00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| -00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| -00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| -00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| -00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| -00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| -00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| -00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| -00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| -00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| -00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| -00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| -00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| -00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| -00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| -00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00005000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00005010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00005080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00005090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000050a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000050b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000050c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000051a0 00 00 00 00 0e 10 21 08 00 00 00 00 00 00 00 00 |......!.........| -000051b0 21 08 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000051c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000051d0 00 00 21 08 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000051e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000051f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 3f |.............."?| -00005200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00405200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00406000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex deleted file mode 100644 index dba435854881..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex +++ /dev/null @@ -1,72 +0,0 @@ -00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| -00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| -00000030 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 |................| -00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010000 80 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 |................| -00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020000 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 |................| -00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00030000 80 00 00 00 00 05 00 00 80 00 00 00 00 06 00 00 |................| -00030010 80 00 00 00 00 07 00 00 80 00 00 00 00 08 00 00 |................| -00030020 80 00 00 00 00 09 00 00 80 00 00 00 00 0a 00 00 |................| -00030030 80 00 00 00 00 0b 00 00 80 00 00 00 00 0c 00 00 |................| -00030040 80 00 00 00 00 0d 00 00 80 00 00 00 00 0e 00 00 |................| -00030050 80 00 00 00 00 0f 00 00 80 00 00 00 00 10 00 00 |................| -00030060 80 00 00 00 00 11 00 00 80 00 00 00 00 12 00 00 |................| -00030070 80 00 00 00 00 13 00 00 80 00 00 00 00 14 00 00 |................| -00030080 80 00 00 00 00 15 00 00 80 00 00 00 00 16 00 00 |................| -00030090 80 00 00 00 00 17 00 00 80 00 00 00 00 18 00 00 |................| -000300a0 80 00 00 00 00 19 00 00 80 00 00 00 00 1a 00 00 |................| -000300b0 80 00 00 00 00 1b 00 00 80 00 00 00 00 1c 00 00 |................| -000300c0 80 00 00 00 00 1d 00 00 80 00 00 00 00 1e 00 00 |................| -000300d0 80 00 00 00 00 1f 00 00 80 00 00 00 00 20 00 00 |............. ..| -000300e0 80 00 00 00 00 21 00 00 80 00 00 00 00 22 00 00 |.....!......."..| -000300f0 80 00 00 00 00 23 00 00 80 00 00 00 00 24 00 00 |.....#.......$..| -00030100 80 00 00 00 00 25 00 00 80 00 00 00 00 26 00 00 |.....%.......&..| -00030110 80 00 00 00 00 27 00 00 80 00 00 00 00 28 00 00 |.....'.......(..| -00030120 80 00 00 00 00 29 00 00 80 00 00 00 00 2a 00 00 |.....).......*..| -00030130 80 00 00 00 00 2b 00 00 80 00 00 00 00 2c 00 00 |.....+.......,..| -00030140 80 00 00 00 00 2d 00 00 80 00 00 00 00 2e 00 00 |.....-..........| -00030150 80 00 00 00 00 2f 00 00 80 00 00 00 00 30 00 00 |...../.......0..| -00030160 80 00 00 00 00 31 00 00 80 00 00 00 00 32 00 00 |.....1.......2..| -00030170 80 00 00 00 00 33 00 00 80 00 00 00 00 34 00 00 |.....3.......4..| -00030180 80 00 00 00 00 35 00 00 80 00 00 00 00 36 00 00 |.....5.......6..| -00030190 80 00 00 00 00 37 00 00 80 00 00 00 00 38 00 00 |.....7.......8..| -000301a0 80 00 00 00 00 39 00 00 80 00 00 00 00 3a 00 00 |.....9.......:..| -000301b0 80 00 00 00 00 3b 00 00 80 00 00 00 00 3c 00 00 |.....;.......<..| -000301c0 80 00 00 00 00 3d 00 00 80 00 00 00 00 3e 00 00 |.....=.......>..| -000301d0 80 00 00 00 00 3f 00 00 80 00 00 00 00 40 00 00 |.....?.......@..| -000301e0 80 00 00 00 00 41 00 00 80 00 00 00 00 42 00 00 |.....A.......B..| -000301f0 80 00 00 00 00 43 00 00 80 00 00 00 00 44 00 00 |.....C.......D..| -00030200 80 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 |.....E..........| -00030210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00040000 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 |................| -* -00040080 00 01 00 01 00 01 00 01 00 01 00 01 00 00 00 00 |................| -00040090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00050000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00050010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00050080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00050090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000500a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000500b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000500c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000501a0 00 00 00 00 0e 10 21 80 00 00 00 00 00 00 00 00 |......!.........| -000501b0 21 80 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000501c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000501d0 00 00 21 80 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000501e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000501f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 b7 |..............".| -00050200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00450200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00460000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex deleted file mode 100644 index ffa27d117070..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex +++ /dev/null @@ -1,20 +0,0 @@ -00000000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000001a0 00 00 00 00 0e 10 21 01 00 00 00 00 00 00 00 00 |......!.........| -000001b0 21 01 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000001d0 00 00 21 01 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 36 |.............."6| -00000200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00420200 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex deleted file mode 100644 index 00828a72a331..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex +++ /dev/null @@ -1,52 +0,0 @@ -00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| -00000030 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| -00000040 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00000050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000200 63 78 73 70 61 72 73 65 ff ff ff ff ff ff ff ff |cxsparse........| -00000210 00 00 00 00 00 00 06 00 00 01 00 00 00 00 00 03 |................| -00000220 00 20 00 00 ff ff f4 74 00 00 00 00 00 00 00 00 |. .....t........| -00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000600 00 00 00 04 00 00 10 05 00 00 20 06 ff ff ff ff |.......... .....| -00000610 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00000a00 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00000a10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000a80 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000a90 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000aa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000ab0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -00000ac0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000ba0 00 00 00 00 0e 10 21 34 00 00 00 00 00 00 00 00 |......!4........| -00000bb0 21 34 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!4..............| -00000bc0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -00000bd0 00 00 21 34 00 00 00 00 00 00 00 00 00 00 00 00 |..!4............| -00000be0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000bf0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 03 |..............".| -00000c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00200a00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00200c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400c00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00400e00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00600e00 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00600e10 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00600e20 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| -00600e30 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| -00600e40 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00600e50 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00600e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00601000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex deleted file mode 100644 index d55109faaec5..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex +++ /dev/null @@ -1,28 +0,0 @@ -00000000 46 72 65 65 42 53 44 35 4d 00 00 00 00 00 00 00 |FreeBSD5M.......| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000001a0 00 00 00 00 0e 10 28 00 00 00 00 00 00 00 00 00 |......(.........| -000001b0 28 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |(...............| -000001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000001d0 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 |..(.............| -000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 2b 36 |..............+6| -00000200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00500000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00500010 ff ff ff ff ff ff ff ff 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00500020 00 02 00 00 57 69 32 6b 00 00 00 00 00 50 00 00 |....Wi2k.....P..| -00500030 00 00 00 00 00 50 00 00 00 96 04 11 00 00 00 02 |.....P..........| -00500040 ff ff ef b4 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00500050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00500060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00500200 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex deleted file mode 100644 index 76c4d5313850..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex +++ /dev/null @@ -1,71 +0,0 @@ -00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| -00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| -00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| -00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| -00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| -00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| -00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| -00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| -00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| -00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| -00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| -00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| -00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| -00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| -00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| -00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| -00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| -00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| -00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| -00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| -00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| -00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| -00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| -002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| -002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| -002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| -00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| -00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| -00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| -00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -004001a0 00 00 00 00 0e 10 80 00 00 00 00 00 00 00 00 00 |................| -004001b0 80 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |................| -004001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -004001d0 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be f8 7f |................| -00400200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00800200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -01400000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex deleted file mode 100644 index 865769bcea7e..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex +++ /dev/null @@ -1,314 +0,0 @@ -00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| -00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| -00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| -00000030 0b 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................| -00000040 20 00 00 00 00 00 00 00 00 0a 20 0d 0a 00 00 00 | ......... .....| -00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000200 23 20 44 69 73 6b 20 44 65 73 63 72 69 70 74 6f |# Disk Descripto| -00000210 72 46 69 6c 65 0a 76 65 72 73 69 6f 6e 3d 31 0a |rFile.version=1.| -00000220 43 49 44 3d 30 30 30 30 30 30 30 30 0a 70 61 72 |CID=00000000.par| -00000230 65 6e 74 43 49 44 3d 66 66 66 66 66 66 66 66 0a |entCID=ffffffff.| -00000240 63 72 65 61 74 65 54 79 70 65 3d 22 6d 6f 6e 6f |createType="mono| -00000250 6c 69 74 68 69 63 53 70 61 72 73 65 22 0a 23 20 |lithicSparse".# | -00000260 45 78 74 65 6e 74 20 64 65 73 63 72 69 70 74 69 |Extent descripti| -00000270 6f 6e 0a 52 57 20 31 30 32 34 30 20 53 50 41 52 |on.RW 10240 SPAR| -00000280 53 45 20 22 22 0a 23 20 54 68 65 20 44 69 73 6b |SE "".# The Disk| -00000290 20 44 61 74 61 20 42 61 73 65 0a 23 44 44 42 0a | Data Base.#DDB.| -000002a0 64 64 62 2e 61 64 61 70 74 65 72 54 79 70 65 20 |ddb.adapterType | -000002b0 3d 20 22 69 64 65 22 0a 64 64 62 2e 67 65 6f 6d |= "ide".ddb.geom| -000002c0 65 74 72 79 2e 63 79 6c 69 6e 64 65 72 73 20 3d |etry.cylinders =| -000002d0 20 22 31 30 32 34 30 22 0a 64 64 62 2e 67 65 6f | "10240".ddb.geo| -000002e0 6d 65 74 72 79 2e 68 65 61 64 73 20 3d 20 22 31 |metry.heads = "1| -000002f0 22 0a 64 64 62 2e 67 65 6f 6d 65 74 72 79 2e 73 |".ddb.geometry.s| -00000300 65 63 74 6f 72 73 20 3d 20 22 31 22 0a 00 00 00 |ectors = "1"....| -00000310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000400 03 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 |................| -00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000600 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| -00000610 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| -00000620 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| -00000630 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| -00000640 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| -00000650 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| -00000660 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| -00000670 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| -00000680 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| -00000690 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| -000006a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| -000006b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| -000006c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| -000006d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| -000006e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| -000006f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| -00000700 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| -00000710 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| -00000720 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| -00000730 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| -00000740 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| -00000750 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| -00000760 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| -00000770 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| -00000780 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| -00000790 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| -000007a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| -000007b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| -000007c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| -000007d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| -000007e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| -000007f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| -00000800 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| -00000810 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| -00000820 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| -00000830 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| -00000840 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| -00000850 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| -00000860 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| -00000870 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| -00000880 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| -00000890 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| -000008a0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| -000008b0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| -000008c0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| -000008d0 60 0b 00 00 70 0b 00 00 80 0b 00 00 90 0b 00 00 |`...p...........| -000008e0 a0 0b 00 00 b0 0b 00 00 c0 0b 00 00 d0 0b 00 00 |................| -000008f0 e0 0b 00 00 f0 0b 00 00 00 0c 00 00 10 0c 00 00 |................| -00000900 20 0c 00 00 30 0c 00 00 40 0c 00 00 50 0c 00 00 | ...0...@...P...| -00000910 60 0c 00 00 70 0c 00 00 80 0c 00 00 90 0c 00 00 |`...p...........| -00000920 a0 0c 00 00 b0 0c 00 00 c0 0c 00 00 d0 0c 00 00 |................| -00000930 e0 0c 00 00 f0 0c 00 00 00 0d 00 00 10 0d 00 00 |................| -00000940 20 0d 00 00 30 0d 00 00 40 0d 00 00 50 0d 00 00 | ...0...@...P...| -00000950 60 0d 00 00 70 0d 00 00 80 0d 00 00 90 0d 00 00 |`...p...........| -00000960 a0 0d 00 00 b0 0d 00 00 c0 0d 00 00 d0 0d 00 00 |................| -00000970 e0 0d 00 00 f0 0d 00 00 00 0e 00 00 10 0e 00 00 |................| -00000980 20 0e 00 00 30 0e 00 00 40 0e 00 00 50 0e 00 00 | ...0...@...P...| -00000990 60 0e 00 00 70 0e 00 00 80 0e 00 00 90 0e 00 00 |`...p...........| -000009a0 a0 0e 00 00 b0 0e 00 00 c0 0e 00 00 d0 0e 00 00 |................| -000009b0 e0 0e 00 00 f0 0e 00 00 00 0f 00 00 10 0f 00 00 |................| -000009c0 20 0f 00 00 30 0f 00 00 40 0f 00 00 50 0f 00 00 | ...0...@...P...| -000009d0 60 0f 00 00 70 0f 00 00 80 0f 00 00 90 0f 00 00 |`...p...........| -000009e0 a0 0f 00 00 b0 0f 00 00 c0 0f 00 00 d0 0f 00 00 |................| -000009f0 e0 0f 00 00 f0 0f 00 00 00 10 00 00 10 10 00 00 |................| -00000a00 20 10 00 00 30 10 00 00 40 10 00 00 50 10 00 00 | ...0...@...P...| -00000a10 60 10 00 00 70 10 00 00 80 10 00 00 90 10 00 00 |`...p...........| -00000a20 a0 10 00 00 b0 10 00 00 c0 10 00 00 d0 10 00 00 |................| -00000a30 e0 10 00 00 f0 10 00 00 00 11 00 00 10 11 00 00 |................| -00000a40 20 11 00 00 30 11 00 00 40 11 00 00 50 11 00 00 | ...0...@...P...| -00000a50 60 11 00 00 70 11 00 00 80 11 00 00 90 11 00 00 |`...p...........| -00000a60 a0 11 00 00 b0 11 00 00 c0 11 00 00 d0 11 00 00 |................| -00000a70 e0 11 00 00 f0 11 00 00 00 12 00 00 10 12 00 00 |................| -00000a80 20 12 00 00 30 12 00 00 40 12 00 00 50 12 00 00 | ...0...@...P...| -00000a90 60 12 00 00 70 12 00 00 80 12 00 00 90 12 00 00 |`...p...........| -00000aa0 a0 12 00 00 b0 12 00 00 c0 12 00 00 d0 12 00 00 |................| -00000ab0 e0 12 00 00 f0 12 00 00 00 13 00 00 10 13 00 00 |................| -00000ac0 20 13 00 00 30 13 00 00 40 13 00 00 50 13 00 00 | ...0...@...P...| -00000ad0 60 13 00 00 70 13 00 00 80 13 00 00 90 13 00 00 |`...p...........| -00000ae0 a0 13 00 00 b0 13 00 00 c0 13 00 00 d0 13 00 00 |................| -00000af0 e0 13 00 00 f0 13 00 00 00 14 00 00 10 14 00 00 |................| *** 3702 LINES SKIPPED *** From nobody Wed Oct 18 15:29:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9ZWk12gqz4x9jy; Wed, 18 Oct 2023 15: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 4S9ZWk06VMz3gv6; Wed, 18 Oct 2023 15: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=1697642946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6RawHyDlI1sng+hq0HEzOUMUNb6ufO3BWy5RiUw1ys=; b=UjVlS0GtpTNfKC+bQgQVEEapqP8RIkS1C+d5FX073waQLfy+PHzPJzfEmdMo0+Wc1Wukz1 dVuFoZ+QKU1lPUSvMHDbuUlwPqZ17bIJAAn0DplWIRr0pt+eneJ1+iLuT825G3f3T4NZZi BiMQEtFklbSlwnm0vLnXu3Kc0uc5PTFjgZ39B2Bm/mD2OnR4rTJ7Xs43DR02wgLhQa7iX9 9qhp8LDLqZxSaLb9ycnZYDOrANq+5P/H6v6xTVaKE5yuSBdhomdFw9UKgDeXAo7bXze086 VaCLPUfMmNtwB9mg6nbW5aP49xeXdWJRrVoyp7Ur5aKGVv96Tif8vXDYwq/PUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697642946; a=rsa-sha256; cv=none; b=Ttn+5u/p42ci+qQJfLXggCLuqlf4wlMrIh+d1c4jlgWJ4OaR2qQ5NZE/lO/A4bczK83wcy 8mfVnpU8BH8+VK2AZ1fPKr6Z++OH6ivRetd34IpSm4V1B3vtjUWerGGdTr4EJ4r6Y0Zjvl dolMthZP5GIr+EWRQcIDdnm2NOqHXXelKvgL9C2WtsEAn3obYu06Zy6i0OMP9nEAeg7fP2 FAP3Z1O/Uh35vWQA40ZCsBgVORPHjOC/UrvYKhp65W92GAb6DH34lggbx3aUGeaWvqbHH3 DWFhpvD9onDaC+K+XYtYYFqLbk4qtF4hWjFWgfBo2ujMkd+MH/HaLBOtQ3c4Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6RawHyDlI1sng+hq0HEzOUMUNb6ufO3BWy5RiUw1ys=; b=EHHwsb8+ipJfqwA327/PsLDgA+2zS6QQDDFEuEsd1ztpb2HkUddcRLg30S+MtUIULB90gp bRR8Ojp86PdXQmA1WDyVPuoUWSXihE1tE6Mw8ZH1TG4TxQk1X83JDdsaHLYRl/TD9RVcdM 2u0tk3Emz4r6uYRyAu06UZWA0/PUxFK6ID/qY4/1yO7TVzkn4QLFT+ayGdB5FRaKP6xESt MULpW94dOcdGEQhAIGnaproks07agA+p5TxyUAAbKkB6LzubC2FMQwx+Hg9v5bTm7O4yxf YMcjlQcBK4u6qnUX3ieZGXNvcl8+HHvpi6alVriPKxDwCAQDSY9E/wMHP47Ftw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9ZWj6JSKz1BV9; Wed, 18 Oct 2023 15:29: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 39IFT5cG078343; Wed, 18 Oct 2023 15:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IFT5rb078340; Wed, 18 Oct 2023 15:29:05 GMT (envelope-from git) Date: Wed, 18 Oct 2023 15:29:05 GMT Message-Id: <202310181529.39IFT5rb078340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 524225dde0b5 - stable/14 - mkimg: Regenerate all the tests for gpt List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 524225dde0b5a4f346644670f22fcd11fe13c1f2 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=524225dde0b5a4f346644670f22fcd11fe13c1f2 commit 524225dde0b5a4f346644670f22fcd11fe13c1f2 Author: Warner Losh AuthorDate: 2023-10-18 15:23:41 +0000 Commit: Warner Losh CommitDate: 2023-10-18 15:23:41 +0000 mkimg: Regenerate all the tests for gpt Recent changes to mkimg has changed the generated GPT images to be more correct. Use make rebase to regenerate the baseline. Sponsored by: Netflix (cherry picked from commit d2abbfede5342b19f3e5994140cdb6622c95ef66) --- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex | 1085 ++++++++++---------- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex | 61 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex | 1089 +++++++++++---------- usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex | 61 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex | 1085 ++++++++++---------- usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex | 1089 +++++++++++---------- usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex | 569 +++++------ 28 files changed, 3798 insertions(+), 3754 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex index a974400ad2e8..ae764c000ae7 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex @@ -1,5 +1,6 @@ +# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 20 00 |.............B .| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * @@ -7,569 +8,573 @@ 00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| 00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * -00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| -00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| -00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| -00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| -00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| -00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| -00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| -00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| -00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| -00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| -000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| -000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| -000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| -000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| -000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| -000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| -00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| -00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| -00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| -00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| -00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| -00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| -00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| -00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| -00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| -00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| -000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| -000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| -000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| -000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| -000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| -000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| -00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| -00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| -00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| -00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| -00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| -00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| -00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| -00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| -00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| -00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| -000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| -000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| -000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| -000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| -000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| -000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| -00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| -00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| -00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| -00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| -00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| -00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| -00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| -00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| -00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| -00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| -000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| -000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| -000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| -000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| -000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| -000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| -00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| -00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| -00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| -00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| -00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| -00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| -00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| -00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| -00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| -00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| -000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| -000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| -000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| -000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| -000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| -000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| -00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| -00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| -00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| -00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| -00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| -00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| -00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| -00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| -00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| -00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| -000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| -000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| -000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| -000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| -000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| -000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| -00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| -00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| -00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| -00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| -00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| -00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| -00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| -00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| -00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| -00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| -000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| -000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| -000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| -000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| -000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| -000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| -00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| -00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| -00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| -00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| -00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| -00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| -00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| -00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| -00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| -00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| -000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| -000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| -000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| -000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| -000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| -000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| -00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| -00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| -00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| -00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| -00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| -00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| -00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| -00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| -00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| -00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| -000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| -000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| -000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| -000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| -000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| -000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| -00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| -00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| -00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| -00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| -00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| -00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| -00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| -00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| -00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| -00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| -000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| -000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| -000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| -000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| -000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| -000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| -00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| -00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| -00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| -00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| -00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| -00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| -00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| -00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| -00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| -00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| -00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| -00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| -00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| -00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| -00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| -00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| -00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| -00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| -00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| -00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| -00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| -00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| -00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| -00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| -00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| -00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| -00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| -00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| -00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| -00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| -00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| -00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| -00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| -00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| -00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| -00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| -00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| -00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| -00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| -00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| -00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| -00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| -00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| -00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| -00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| -00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| -00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| -00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| -00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| -00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| -00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| -00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| -00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| -00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| -00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| -00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| -00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| -00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| -00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| -00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| -00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| -00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| -00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| -00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| -00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| -00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| -00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| -00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| -00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| -00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| -00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| -00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| -00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| -00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| -00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| -00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| -00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| -00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| -00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| -00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| -00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| -00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| -00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| -00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| -00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| -00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| -00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| -00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| -00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| -00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| -00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| -00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| -00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| -00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| -00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| -00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| -00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| -00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| -00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| -00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| -00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| -00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| -00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| -00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| -00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| -00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| -000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| -000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| -000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| -000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| -000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| -000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| -00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| -00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| -00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| -00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| -00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| -00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| -00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| -00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| -00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| -00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| -000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| -000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| -000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| -000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| -000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| -000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| -00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| -00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| -00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| -00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| -00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| -00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| -00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| -00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| -00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| -00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| -000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| -000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| -000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| -000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| -000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| -000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| -00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| -00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| -00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| -00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| -00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| -00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| -00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| -00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| -00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| -00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| -000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| -000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| -000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| -000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| -000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| -000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| -00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| -00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| -00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| -00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| -00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| -00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| -00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| -00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| -00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| -00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| -000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| -000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| -000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| -000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| -000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| -000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| -00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| -00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| -00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| -00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| -00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| -00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| -00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| -00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| -00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| -00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| -000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| -000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| -000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| -000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| -000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| -000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| -00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| -00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| -00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| -00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| -00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| -00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| -00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| -00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| -00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| -00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| -000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| -000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| -000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| -000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| -000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| -000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| -00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| -00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| -00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| -00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| -00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| -00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| -00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| -00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| -00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| -00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| -000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| -000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| -000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| -000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| -000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| -000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| -00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| -00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| -00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| -00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| -00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| -00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| -00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| -00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| -00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| -00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| -000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| -000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| -000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| -000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| -000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| -000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| -00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| -00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| -00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| -00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| -00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| -00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| -00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| -00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| -00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| -00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| -000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| -000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| -000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| -000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| -000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| -000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| -00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| -00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| -00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| -00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| -00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| -00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| -00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| -00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| -00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| -00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| -00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| -00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| -00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| -00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| -00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| -00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| -00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| -00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| -00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| -00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| -00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| -00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| -00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| -00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| -00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| -00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| -00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| -00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| -00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| -00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| -00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| -00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| -00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| -00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| -00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| -00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| -00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| -00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| -00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| -00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| -00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| -00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| -00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| -00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| -00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| -00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| -00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| -00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| -00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| -00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| -00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| -00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| -00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| -00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| -00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| -00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| -00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| -00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| -00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| -00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| -00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| -00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| -00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| -00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| -00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| -00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| -00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| -00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| -00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| -00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| -00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| -00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| -00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| -00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| -00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| -00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| -00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| -00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| -00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| -00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| -00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| -00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| -00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| -00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| -00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 00 00 |......P.........| +00002010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00002020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 |..............`.| +00002030 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| +00002040 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| +00002050 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| +00002060 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| +00002070 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| +00002080 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| +00002090 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| +000020a0 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| +000020b0 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| +000020c0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| +000020d0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| +000020e0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| +000020f0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| +00002100 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| +00002110 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| +00002120 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| +00002130 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| +00002140 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| +00002150 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| +00002160 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| +00002170 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| +00002180 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| +00002190 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| +000021a0 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| +000021b0 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| +000021c0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| +000021d0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| +000021e0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| +000021f0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| +00002200 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| +00002210 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| +00002220 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| +00002230 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| +00002240 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| +00002250 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| +00002260 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| +00002270 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| +00002280 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| +00002290 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| +000022a0 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| +000022b0 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| +000022c0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| +000022d0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| +000022e0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| +000022f0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| +00002300 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| +00002310 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| +00002320 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| +00002330 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| +00002340 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| +00002350 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| +00002360 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| +00002370 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| +00002380 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| +00002390 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| +000023a0 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| +000023b0 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| +000023c0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| +000023d0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| +000023e0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| +000023f0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| +00002400 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| +00002410 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| +00002420 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| +00002430 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| +00002440 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| +00002450 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| +00002460 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| +00002470 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| +00002480 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| +00002490 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| +000024a0 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| +000024b0 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| +000024c0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| +000024d0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| +000024e0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| +000024f0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| +00002500 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| +00002510 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| +00002520 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| +00002530 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| +00002540 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| +00002550 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| +00002560 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| +00002570 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| +00002580 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| +00002590 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| +000025a0 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| +000025b0 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| +000025c0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| +000025d0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| +000025e0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| +000025f0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| +00002600 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| +00002610 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| +00002620 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| +00002630 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| +00002640 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| +00002650 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| +00002660 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| +00002670 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| +00002680 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| +00002690 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| +000026a0 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| +000026b0 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| +000026c0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| +000026d0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| +000026e0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| +000026f0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| +00002700 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| +00002710 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| +00002720 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| +00002730 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| +00002740 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| +00002750 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| +00002760 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| +00002770 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| +00002780 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| +00002790 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| +000027a0 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| +000027b0 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| +000027c0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| +000027d0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| +000027e0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| +000027f0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| +00002800 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| +00002810 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| +00002820 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| +00002830 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| +00002840 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| +00002850 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| +00002860 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| +00002870 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| +00002880 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| +00002890 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| +000028a0 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| +000028b0 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| +000028c0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| +000028d0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| +000028e0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| +000028f0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| +00002900 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| +00002910 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| +00002920 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| +00002930 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| +00002940 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| +00002950 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| +00002960 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| +00002970 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| +00002980 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| +00002990 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| +000029a0 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| +000029b0 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| +000029c0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| +000029d0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| +000029e0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| +000029f0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| +00002a00 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| +00002a10 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| +00002a20 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| +00002a30 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| +00002a40 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| +00002a50 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| +00002a60 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| +00002a70 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| +00002a80 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| +00002a90 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| +00002aa0 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| +00002ab0 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| +00002ac0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| +00002ad0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| +00002ae0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| +00002af0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| +00002b00 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| +00002b10 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| +00002b20 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| +00002b30 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| +00002b40 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| +00002b50 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| +00002b60 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| +00002b70 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| +00002b80 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| +00002b90 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| +00002ba0 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| +00002bb0 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| +00002bc0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| +00002bd0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| +00002be0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| +00002bf0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| +00002c00 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| +00002c10 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| +00002c20 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| +00002c30 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| +00002c40 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| +00002c50 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| +00002c60 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| +00002c70 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| +00002c80 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| +00002c90 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| +00002ca0 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| +00002cb0 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| +00002cc0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| +00002cd0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| +00002ce0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| +00002cf0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| +00002d00 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| +00002d10 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| +00002d20 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| +00002d30 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| +00002d40 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| +00002d50 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| +00002d60 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| +00002d70 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| +00002d80 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| +00002d90 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| +00002da0 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| +00002db0 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| +00002dc0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| +00002dd0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| +00002de0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| +00002df0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| +00002e00 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| +00002e10 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| +00002e20 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| +00002e30 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| +00002e40 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| +00002e50 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| +00002e60 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| +00002e70 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| +00002e80 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| +00002e90 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| +00002ea0 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| +00002eb0 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| +00002ec0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| +00002ed0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| +00002ee0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| +00002ef0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| +00002f00 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| +00002f10 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| +00002f20 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| +00002f30 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| +00002f40 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| +00002f50 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| +00002f60 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| +00002f70 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| +00002f80 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| +00002f90 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| +00002fa0 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| +00002fb0 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| +00002fc0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| +00002fd0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| +00002fe0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| +00002ff0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| +00003000 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| +00003010 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| +00003020 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| +00003030 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| +00003040 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| +00003050 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| +00003060 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| +00003070 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| +00003080 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| +00003090 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| +000030a0 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| +000030b0 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| +000030c0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| +000030d0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| +000030e0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| +000030f0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| +00003100 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| +00003110 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| +00003120 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| +00003130 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| +00003140 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| +00003150 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| +00003160 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| +00003170 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| +00003180 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| +00003190 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| +000031a0 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| +000031b0 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| +000031c0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| +000031d0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| +000031e0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| +000031f0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| +00003200 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| +00003210 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| +00003220 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| +00003230 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| +00003240 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| +00003250 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| +00003260 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| +00003270 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| +00003280 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| +00003290 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| +000032a0 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| +000032b0 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| +000032c0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| +000032d0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| +000032e0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| +000032f0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| +00003300 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| +00003310 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| +00003320 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| +00003330 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| +00003340 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| +00003350 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| +00003360 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| +00003370 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| +00003380 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| +00003390 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| +000033a0 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| +000033b0 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| +000033c0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| +000033d0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| +000033e0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| +000033f0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| +00003400 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| +00003410 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| +00003420 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| +00003430 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| +00003440 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| +00003450 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| +00003460 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| +00003470 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| +00003480 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| +00003490 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| +000034a0 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| +000034b0 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| +000034c0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| +000034d0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| +000034e0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| +000034f0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| +00003500 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| +00003510 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| +00003520 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| +00003530 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| +00003540 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| +00003550 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| +00003560 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| +00003570 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| +00003580 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| +00003590 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| +000035a0 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| +000035b0 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| +000035c0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| +000035d0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| +000035e0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| +000035f0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| +00003600 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| +00003610 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| +00003620 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| +00003630 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| +00003640 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| +00003650 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| +00003660 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| +00003670 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| +00003680 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| +00003690 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| +000036a0 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| +000036b0 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| +000036c0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| +000036d0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| +000036e0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| +000036f0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| +00003700 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| +00003710 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| +00003720 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| +00003730 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| +00003740 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| +00003750 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| +00003760 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| +00003770 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| +00003780 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| +00003790 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| +000037a0 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| +000037b0 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| +000037c0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| +000037d0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| +000037e0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| +000037f0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| +00003800 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| +00003810 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| +00003820 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| +00003830 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| +00003840 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| +00003850 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| +00003860 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| +00003870 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| +00003880 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| +00003890 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| +000038a0 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| +000038b0 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| +000038c0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| +000038d0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| +000038e0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| +000038f0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| +00003900 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| +00003910 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| +00003920 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| +00003930 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| +00003940 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| +00003950 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| +00003960 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| *** 7603 LINES SKIPPED *** From nobody Wed Oct 18 15:29:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9ZWl3xBhz4x9Q4; Wed, 18 Oct 2023 15:29: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 4S9ZWl1bsRz4D2f; Wed, 18 Oct 2023 15:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1zGolTNNVuB9h6ba0/lV13MtqnpSEK6fIjxhYM6al3M=; b=uAFEY2Obzc661r4WzoWa4emoLvuylCyyD01TLtU7TLc9JrXm4qcUpTJXlXd9GrajQFpRW5 kIZx1BLWVZwZl0w1s0AGJ3u7Y4AQpAN3jZWZSVbZ681UKPN21fhKGthoT+ZQp3UDpXZOrG a08//+0TQrS0nYkMaR4HFad1+8hWjGfCzKLlxQK9oyRAVA5CXDQKMLz/nI/pkcQVURw2+c Y169UVjiyk/v5384NhQbSX3Nhnh2RIfZTMBLuSxlw5SUnSiZ/B0segB2IbEPtaAAck+j0a 7fWxbInnWwbM3BxR+ggT6hGVmfH27ub2lyH9LgSKr0e1IP7lnqcmn8RTjfvETw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697642947; a=rsa-sha256; cv=none; b=Nt17fvVnorZuxqZVuwWc2FjVQD8aiL5htsm4YEQYDgajHxayzVU2OSqFxJ90YTr2aZCUyE t2yhv1uiQNOslaqTZnGCqg7RQgMGETNQZk44y/QJPgT9hI01OlReJlKLTcs8Y701nNxLHR zHMyDrnM/BQy8zmr/P2GT6tC1I1HLRv8olRiKOlM3n776AmoaJEoHgOmT+DySvNbI+LOuQ mmNf4/cY1GSqTrj/EgJrm/kMtvla+sSBoR9U4H11biyiezFZrkbDq9s6VssJLz0OJpa/e6 BKo6ydbhZAATjcPug7XVyezSUo1RqQihpn2DcA0CSK+EufS0tl1M+KByzx8lGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697642947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1zGolTNNVuB9h6ba0/lV13MtqnpSEK6fIjxhYM6al3M=; b=PW10adH33qyLqcuEUDkiBCZep278/ce4uw58xaSLUB3Tetr/TzDGLBaRdI0gna2ZbTduDT z2LEgh20q1CXfQws9Wgz4BA0JCzle7L5EPyXz+TYZqgA7FN+azUXMoZELVIoqFWtUoiU9q ooHquHLWYFMe/E8Lzn8ruOaZ8X0t3Ai2XHtHjdzMPMKAkBXphdnPeBw5NvnqwR574bYz0y zMZ04q5w3SHSJ2gtuqQUNqMeOfaozEc0NiyMaqU7WvIjDY+4Td4edi9cxPoFK9HP1AyE/K ham9VEivC2luPOqpIJXGuhnieabVy3NJjU8EtCKxYe0l2bR1SO7x/sy7EBtMIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9ZWk72LVz19j3; Wed, 18 Oct 2023 15: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 39IFT6UW078385; Wed, 18 Oct 2023 15: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 39IFT6ad078382; Wed, 18 Oct 2023 15:29:06 GMT (envelope-from git) Date: Wed, 18 Oct 2023 15:29:06 GMT Message-Id: <202310181529.39IFT6ad078382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 9ed4f43bc4c3 - stable/14 - Remove $FreeBSD$: one line sh-pattern List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9ed4f43bc4c39dc5ed2ce1bf6003e4dcb4160bfc Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9ed4f43bc4c39dc5ed2ce1bf6003e4dcb4160bfc commit 9ed4f43bc4c39dc5ed2ce1bf6003e4dcb4160bfc Author: Jose Luis Duran AuthorDate: 2023-10-18 15:24:00 +0000 Commit: Warner Losh CommitDate: 2023-10-18 15:24:00 +0000 Remove $FreeBSD$: one line sh-pattern Remove the $FreeBSD$ pattern added to the tests, as well as fixing the mkimg_test.sh script to stop adding it when we rebase the tests. Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/870 (cherry picked from commit 3b5c9845727a1b95098379f66223525e85e8a73f) --- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/mkimg_test.sh | 4 +--- 29 files changed, 1 insertion(+), 31 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex index ae764c000ae7..ab899b3e5ec2 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex index 7f79015b561f..a2d342d06a42 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex index 32fb00bc17cb..dae6b78a65f8 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex index 01ceaae1963c..0de167c0e198 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 f0 00 |....Wi2k.....B..| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex index 25e961888b80..bd8601eccc50 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex index aadd5841a58e..4d4542d9a686 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex index 1ff8880a897b..35b354c7310b 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex index 69bed4ff417c..510bbf80e208 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 90 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex index 7605a6561ee2..9a12f90cb5af 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex index 0d69daf7d37a..b464168daaa4 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex index 857c7ea3e4f0..796166f430ee 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 f0 00 |....Wi2k.....B..| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex index 76e76c3155c9..93b291550be0 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex index cde7a4953009..1aef760fa90a 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex index 044e0bc66181..51da710db535 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex index ae764c000ae7..ab899b3e5ec2 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex index 7f79015b561f..a2d342d06a42 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex index 32fb00bc17cb..dae6b78a65f8 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex index c3b9496e2870..0103906c9fa2 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 7d 82 00 |....Wi2k.....}..| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex index 6b4ec6c575d6..36210d5dd44d 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex index aadd5841a58e..4d4542d9a686 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex index 2a44596b10fe..bf6ba8b9560e 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex index 69bed4ff417c..510bbf80e208 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 90 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex index 7605a6561ee2..9a12f90cb5af 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex index 0d69daf7d37a..b464168daaa4 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex index 31451cfb320e..94fbb99cbdb9 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 7d 82 00 |....Wi2k.....}..| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex index dbaed6ce1606..3ee432909549 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex index cde7a4953009..1aef760fa90a 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex index 2ec42edb497d..8311d98ee9c0 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/mkimg_test.sh b/usr.bin/mkimg/tests/mkimg_test.sh index 74680c5d2be7..7c6593b219ef 100755 --- a/usr.bin/mkimg/tests/mkimg_test.sh +++ b/usr.bin/mkimg/tests/mkimg_test.sh @@ -86,9 +86,7 @@ mkimg_rebase() fi if test $update = yes; then - # Prevent keyword expansion when writing the keyword. - (echo -n '# $'; echo -n FreeBSD; echo '$') > $baseline - cat $result >> $baseline + cat $result > $baseline fi rm $image $result _tmp-* From nobody Wed Oct 18 16:29:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9bsv2Hn5z4xF5D; Wed, 18 Oct 2023 16:29: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 4S9bsv1mj4z4NPH; Wed, 18 Oct 2023 16:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697646595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0L8xJtFgX6Wy8HL4+7+X6dzg3NaK/xNsTrq10GJOIo=; b=ukZVgnzT7eXDvWDO1+yT9CLQTXyS72bB1WXhNY7yh990+yTUIiR2N0hYX3ZF3r9YVBRmRU WfgwwnWs4pBqx7TEdI/F/vu9+IbFt9jvVRjPdhXxMDX0mXTm15c27WQoUom2Uqq3m230oJ XMgjksIf/6HB+o5xfmo61Q79XFgOYVnHhOO/Q6NnsrfYCXBUe1uoBv1hMJyvGBB7myLCBK njPp9OSi22SURb8ukiEnzcy2yoljLwAx3AfN2YrKESAVq8hy3XR9cadfa/VoKrBvn1xVlr Zu7WVa9lgOhUkp9lfjdhxQvyLTRWOYgTPG2zjVH5s3o9awpeCA1M8n059pPPHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697646595; a=rsa-sha256; cv=none; b=Xyox5IxpEEry1yT7Xs+bMBazF26G4xZ6EwQSZBkcGpDZnbh62XjNX9LeKepm3nw5yfIKze EcVQKEKp/laCUPIzFiAxXe5OE1Xh5AA/RPwzqRDan3CVeQJ7Iwi8+ggIAvuwUqjluIr8pd uTWli08nnyq2mm7qvyeZGVD45Jx2UiKcvG2t1aT07cZoSzhmYTBLpAlioV0pwfJLkJdIpT a4mmVOdnaS/iQUOFz/n/kJsV0Kx72iP6mryHDgQt9bz/dhSKT4LW1sID7nrk6tO6qx0vrt 2KFpmXqx+Du2pgl7iVONLDNcaM7HfarmoZy79q03o+TR9rPFBRw30ckDvHCLJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697646595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0L8xJtFgX6Wy8HL4+7+X6dzg3NaK/xNsTrq10GJOIo=; b=PJlQeswxJXXeZ02yWwPfGNR3jMh1ijtfb3bMSXv1/LbyUY67KwnyrbcPyv+nM/XHjGwf02 RrhY2I+Hq65NBHx0NRmxL1o2nUU6IyDbZZxfrhnPnWMUY9Q/vcqgQESGTOjML0T/E2pmXa wgt/AYT9eP1+DjrOOdv8ewWe4m1iw+f2WPyAjaQ8nF8CIz1ztHrO9A9rQSe+VFJkmgL02q XIVypygGB9FdBZyO9lcYEG69+K53ILwuUsJZzaZQG2XZixobRApKSuAgIqVK4/zr50mY2P +Gt3SP5mGKeYmmXrHgQguuohyJ0VGv2h+/7TxsXgRkPCCbUqWqmCLq38xiLzrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9bsv0XVRz1Cst; Wed, 18 Oct 2023 16:29: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 39IGTso6078066; Wed, 18 Oct 2023 16:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IGTsBY078063; Wed, 18 Oct 2023 16:29:54 GMT (envelope-from git) Date: Wed, 18 Oct 2023 16:29:54 GMT Message-Id: <202310181629.39IGTsBY078063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 07c60e63237e - stable/14 - Make cr_bsd_visible()'s sub-functions internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 07c60e63237e1d4657cfbd6b03116c4913827e8c Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=07c60e63237e1d4657cfbd6b03116c4913827e8c commit 07c60e63237e1d4657cfbd6b03116c4913827e8c Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 16:24:48 +0000 Make cr_bsd_visible()'s sub-functions internal cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() should not be used directly now. cr_bsd_visible() has to be called instead. Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40629 (cherry picked from commit 91e9d669b475d1900e8dc01a49ad90a621c4a068) --- sys/kern/kern_prot.c | 10 +++++++--- sys/sys/proc.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 14b19837d5dc..00eb2fccdeef 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -91,6 +91,10 @@ static void crfree_final(struct ucred *cr); static void crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups); +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; @@ -1371,7 +1375,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_uids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { @@ -1401,7 +1405,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { if (!see_other_gids) { @@ -1440,7 +1444,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { if (see_jail_proc || /* Policy deactivated. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 8609bbd124ad..0b91b2a1a0b5 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1166,9 +1166,6 @@ struct thread *choosethread(void); int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeothergids(struct ucred *u1, struct ucred *u2); -int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); -int cr_canseejailproc(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); From nobody Wed Oct 18 18:03:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dy43LDJz4xL1k; Wed, 18 Oct 2023 18:03: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 4S9dy42kVBz4WlQ; Wed, 18 Oct 2023 18:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5Mmdtz+xO17AXLm8f5rWGl9568tdRHuMQzQt1RTu3Q=; b=NroT/QUYReyUWPCjHCorZrzliqgtK68C8xq29n5ewA1Yzbaa/l80cU658TZ8NbE6v9D6yi 0Nae0c90M/m2n6x/K4HgpOPCEh0INuONZ4nqtFgnoXcz+IaTSlIeZ+aFD5BVl0iO6ELox6 m2Ks5JdfCZEGroGrZcQqH4SLXi/FleIBaGIDQYGGZlfcp7amGZF1L62u6yLPSkMsiG2cwB 2UhYE9OfV1cC/Zy7C6RNO3hsnXZK96xIW/5mgRNIUngAk6vul4uVKQti4K8XJsEXSEuOln JOf2ypbQ2LIjEMvw515RChLDCsbKd4rXhbGGvwIkKOMlcj+DkzIfBq3IkSumiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652220; a=rsa-sha256; cv=none; b=DCoxlIMARBctyn7s8IsuKhyQS1JOW28/nuJkf/2iLTvZNQAY6aC7qrLt9IixzVavit0T3t vYWl4ieeRiyTT0nBe9GZFbjD5Hjf1Yyo+ekoKYTyBLi2TlUh8qCmhFTr/bj3YLVLZ6eJBu OjmpwlXYM98GJzQaY8mDvsnDBouIQAALNesVN0osaWoNWqN1ZOoYOf7h63FmTO4CsYMLDE Yg+oqCR48O233+SQcEU1BczxcDWDOnXUhA8Tpt9wC7xVnvkuv9udxSkkeFiSuT6AW8QMBM iDztA5+7uaSPz6QycuxPn6TJ0P+rtoJiAMiulQc9CI2b7ak80/dGpZWpy8Ob6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J5Mmdtz+xO17AXLm8f5rWGl9568tdRHuMQzQt1RTu3Q=; b=koPwpZ6q7ekDptv9w3uq6O/D1EFY71mp0RaGHi6eQYzGWSUtoKoqA4ULXbmsBEdnjCtYh3 ti67YjSH/OAUgsW82tQndbxdPUuT1kRlvBU+SGDZ8hNAAIv1sBmvJjPgtCw6C4vlUox6ZV Iy7ssBVXHZESznwtevECNs9z6JQNAQcublu2A4jvieHhQ4hBYY35lfQK9+UPclFkkMfDkK RyZ2Zch5vs2yD3E2zomfCr4xjUrg7RefEIYknPN5oIWHvWmE0UTYjXHf3UqvIEm3SXwv/+ oRGQA2GceJ4+wEAG5EfhI0aHnqh5ES8GEjrpBdvoKW9B7kNvXlbuW0ZraA75og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dy41p6mz24m; Wed, 18 Oct 2023 18:03: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 39II3eJC044314; Wed, 18 Oct 2023 18:03:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3eRl044311; Wed, 18 Oct 2023 18:03:40 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:40 GMT Message-Id: <202310181803.39II3eRl044311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 63c01c18a8d3 - releng/14.0 - cr_canseejailproc(): New privilege, no direct check for UID 0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 63c01c18a8d3feb957a4f91171aaac1f92ce5955 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=63c01c18a8d3feb957a4f91171aaac1f92ce5955 commit 63c01c18a8d3feb957a4f91171aaac1f92ce5955 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:37 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 17:59:09 +0000 cr_canseejailproc(): New privilege, no direct check for UID 0 Use priv_check_cred() with a new privilege (PRIV_SEEJAILPROC) instead of explicitly testing for UID 0 (the former has been the rule for almost 20 years). As a consequence, cr_canseejailproc() now abides by the 'security.bsd.suser_enabled' sysctl and MAC policies. Update the MAC policies Biba and LOMAC, and prison_priv_check() so that they don't deny this privilege. This preserves the existing behavior (the 'root' user is not restricted, even when jailed, unless 'security.bsd.suser_enabled' is not 0) and is consistent with what is done for the related policies/privileges (PRIV_SEEOTHERGIDS, PRIV_SEEOTHERUIDS). Approved by: re (gjb) Reviewed by: emaste (earlier version), mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40626 (cherry picked from commit 7974ca1cdbee949f5e453eea112be265b425c407) (cherry picked from commit bedaf8af51c96cef025c13c41ba420163824e8cb) --- sys/kern/kern_jail.c | 1 + sys/kern/kern_prot.c | 7 +++++-- sys/security/mac_biba/mac_biba.c | 1 + sys/security/mac_lomac/mac_lomac.c | 1 + sys/sys/priv.h | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 39bdcaf5ef0e..57e6024a9939 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3938,6 +3938,7 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: /* * Jail implements inter-process debugging limits already, so diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 19e0b78c6709..ed15cb566499 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1426,9 +1426,12 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { - if (u1->cr_uid == 0) + if (see_jail_proc || /* Policy deactivated. */ + u1->cr_prison == u2->cr_prison || /* Same jail. */ + priv_check_cred(u1, PRIV_SEEJAILPROC) == 0) /* Privileged. */ return (0); - return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0); + + return (ESRCH); } /*- diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 6948548503e1..5d66e2fd4b9b 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1924,6 +1924,7 @@ biba_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 05bd0da06960..aa9abf458721 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -1702,6 +1702,7 @@ lomac_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 45cb5bab4275..a61de8d32fe0 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -105,6 +105,7 @@ #define PRIV_CRED_SETRESGID 58 /* setresgid. */ #define PRIV_SEEOTHERGIDS 59 /* Exempt bsd.seeothergids. */ #define PRIV_SEEOTHERUIDS 60 /* Exempt bsd.seeotheruids. */ +#define PRIV_SEEJAILPROC 61 /* Exempt from bsd.see_jail_proc. */ /* * Debugging privileges. From nobody Wed Oct 18 18:03:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dy55KRRz4xKhF; Wed, 18 Oct 2023 18:03: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 4S9dy54Jcqz4X9Z; Wed, 18 Oct 2023 18:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1V6Jx9+9LDWAlwx/qsSy4X6v0sqNujcc2lZr2m54ls=; b=kIjs/fwPpg8vQ1+Hd9GhP0GqhlHXYg7EqJ/LJ3nEPOAa7/51lw6NSV/YD+FcaMU9vx8iCY emakbQbZqmx2RemO54FHWYEVJr1VSg9A3u+lc7drjdNlbQgViqEQfLgRjz+/5CT2Kset+U gj2zzh3oUUV6QQe5mb3elhx2g6hVreiKU1KgsDXoWIleDSjzGSCHpMM7ow1Q2IXKfh9vXH JUvZxwmk/yOS9gRxGF7z71bxXkey7D2p5Ui4iAYBCp2YFU5mMhvmdzTaJwz6Oi89yYJ7YF hy1Tlac8vCZo30XTPmTsPVuo7PMh6IjAOwbg9Y9/Dsh8/hCkXMJt9NKJvoMOug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652221; a=rsa-sha256; cv=none; b=GZa4ZpzQ4rqcYIUxB0yCAuYoSP7DrpUjzfEO7nvhBjPDAzbMb5voKGfBGIqDRctUvjZ3Av KDNddg6bIk9Vo3e1SJb15a4grrc1lTwJfiMfwCmBnGcc1zYeA7Xkw1IR4jypNHvcd/YOEe 9zb/qno5CJVGExwqVBFoJMM8HRXWWAoZ/8VcWdpp41jk7N4/2MrlpkFR9WIB8D1Oo4KJdm mqoh1O1v9K2/iMf9HcmM09DkktsmSWtTyshuIc5lLq7TZNNTnRKiTif0CnEuoy7iYnEMJV djUWdiGQw53kMBZJqrTSKycJfQyF9zV2nsJvrlAZWVRgd7HhIP0xDlFKem97Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1V6Jx9+9LDWAlwx/qsSy4X6v0sqNujcc2lZr2m54ls=; b=DgF99RNbbXtWvLXiYH/mLr8e4yzkx+HMjlB9mgTmR10okF5nIayLSVWpgtEdZMUfkD29Bm qivLBeK1qwEZAuJojN6JJ4TRLhfrhia4VRcL/3H5wNvyUHykz5x3FNDNBuS1FBiefo6pnP vDxL9ZaHitYJcDlGlPnXC3xukELGROWcrG3raUJsWiVUHFyM5FNM12RraPeLRu34d8WDat D3rQCMnYimaLOc0rDv8oDaxXyr2nwEFk+ec9ROexs12cHGxEmyzBuZPdOVllnt8SlrN8jv KCWLgP00OrPVGofr+yvcZPRIDUYsRkQhfqh+UhnJMBh/u9E9/G7e5uxyS/kR/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 4S9dy52qp5z2RB; Wed, 18 Oct 2023 18:03: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 39II3fls044365; Wed, 18 Oct 2023 18:03:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3fl0044362; Wed, 18 Oct 2023 18:03:41 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:41 GMT Message-Id: <202310181803.39II3fl0044362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 768fe2300987 - releng/14.0 - New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 768fe23009877b42a9f45b0ca9e9c05f9db76649 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=768fe23009877b42a9f45b0ca9e9c05f9db76649 commit 768fe23009877b42a9f45b0ca9e9c05f9db76649 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 17:59:34 +0000 New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects This is a new helper function that leverages existing code: It calls successively cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() (as long as the previous didn't deny access). Will be used in a subsequent commit. Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40627 (cherry picked from commit e4a7b4f99cfd4931468c0866da4ae8b49cf5badb) (cherry picked from commit 4a78431a52e9e65c6181a943bca2430633350db1) --- sys/kern/kern_prot.c | 19 +++++++++++++++++++ sys/sys/proc.h | 1 + 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ed15cb566499..1e6073b554e4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1434,6 +1434,25 @@ cr_canseejailproc(struct ucred *u1, struct ucred *u2) return (ESRCH); } +/* + * Helper for cr_cansee*() functions to abide by system-wide security.bsd.see_* + * policies. Determines if u1 "can see" u2 according to these policies. + * Returns: 0 for permitted, ESRCH otherwise + */ +int +cr_bsd_visible(struct ucred *u1, struct ucred *u2) +{ + int error; + + if ((error = cr_canseeotheruids(u1, u2))) + return (error); + if ((error = cr_canseeothergids(u1, u2))) + return (error); + if ((error = cr_canseejailproc(u1, u2))) + return (error); + return (0); +} + /*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 3102cae7add0..8609bbd124ad 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1163,6 +1163,7 @@ void ast_sched(struct thread *td, int tda); void ast_unsched_locked(struct thread *td, int tda); struct thread *choosethread(void); +int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeothergids(struct ucred *u1, struct ucred *u2); From nobody Wed Oct 18 18:03:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dy70RBfz4xL1q; Wed, 18 Oct 2023 18:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9dy64kLfz4Wx4; Wed, 18 Oct 2023 18:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9mmNYfBFsf7+xfnN5tMKK8esNZ3YEUzCd1GxBJvV2q8=; b=KIZBwroBDXWleFOpInEFMVCUVbsozNVWTJyXlkOWoCFIIJP1LbNdTaWYE8oz/lCcEhsMZ4 yEwO6UXK5GUED4oVxoQ2AamvesKBD/ITyFtGqRBUn3FO5fZMqz0K36bti+Ej9s9bJrBXap J2nZAvNZRRQ9ve7Psjt4Rvs0SiUu0FMShUpX6Qq3PVvrqmmuXK3Nl5LkbZLnfuiLb2jkIS m7Q0n3tUqRnxVE6A5ajxpGmrB5nTR9pYfQaQgc7OFzRDvtWNjpdPl+z04b13VtUuV6j0jn 1VxyeU5HVYPz2lHkbdRBKmeHfWujBLy7I6+NMQZNcWVY8SWXW0XyB4Vbod8tyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652222; a=rsa-sha256; cv=none; b=WbndPBb80+170aeGGANUAcasVlsBcahd4++j/ju+qf1cqDS5iXcGC2jUAeFUMkXAnAI+gV 3YaEdwN3UbygNzdHGqmOBL/XbqAQiUZQCLW9x6xCMOnmeXEpDsSZyEczgxZDHwx8Ajx7JE XtY8o/dpTEBtB8wMp/CfV1KlZU1/9ryr49etRrNpAcOxBoIsYM++NuHRGVPHloPJWhIkv8 IkvW0/YjMuuvBjsufslMZfat2o2zun232WI+ld0kcFsZv8268WAWqo2QvZ5SQMszzKCUdS Q4vZhBhFwjU8LbuYIieReE/zN/jZsAsUN6IDdUsZaflCaLelGvkHn/IdVp9kww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9mmNYfBFsf7+xfnN5tMKK8esNZ3YEUzCd1GxBJvV2q8=; b=vkTh9uazi9zaizXIsMo8CP6UImXt1nnk0JrqjaNmgKUpCDqn2BUXCTNVQae3C8+/xEs3Uo 8jBbQyO496Y9C6m74dhVpzptX8Zs6qubWPT7Sap5pUm6LvL+LfA8WOJDDwlj/PQ+c8Nl6c PAxVN5mUdBaxt8HnXB4ox/EOzjUSrnVZFHJZDVpEfaf/CKazT5Yz6zaayJbgv5ocU8IdVm Dqyl9weOorTbXeayXu/cxJRi9J4QKKQa1qVjnOA54bXbNSWEJDeJlO9CE297mWaAQEc1d/ qFjSZl/Szpgpn2IH8kUYe4h7Z0nXmkZhiHvF4Pi4ovD+jN3s4fnNRbiAM39yog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dy63qBcz27H; Wed, 18 Oct 2023 18:03: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 39II3g36044413; Wed, 18 Oct 2023 18:03:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3g3a044410; Wed, 18 Oct 2023 18:03:42 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:42 GMT Message-Id: <202310181803.39II3g3a044410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7e21c691f295 - releng/14.0 - Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7e21c691f295b3babc8c57c0aeafa19faf1371b6 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7e21c691f295b3babc8c57c0aeafa19faf1371b6 commit 7e21c691f295b3babc8c57c0aeafa19faf1371b6 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 17:59:51 +0000 Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() As implemented, this security policy would only prevent seeing processes in sub-jails, but would not prevent sending signals to, changing priority of or debugging processes in these, enabling attacks where unprivileged users could tamper with random processes in sub-jails in particular circumstances (conflated UIDs) despite the policy being enforced. Approved by: re (gjb) PR: 272092 Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40628 (cherry picked from commit 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18) (cherry picked from commit abfcae344feb89c635616769d12150f84c96c003) --- sys/kern/kern_prot.c | 25 +++++++------------------ sys/netinet/in_prot.c | 4 +--- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1e6073b554e4..648c067dc528 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1471,11 +1471,7 @@ cr_cansee(struct ucred *u1, struct ucred *u2) if ((error = mac_cred_check_visible(u1, u2))) return (error); #endif - if ((error = cr_canseeotheruids(u1, u2))) - return (error); - if ((error = cr_canseeothergids(u1, u2))) - return (error); - if ((error = cr_canseejailproc(u1, u2))) + if ((error = cr_bsd_visible(u1, u2))) return (error); return (0); } @@ -1536,9 +1532,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, int signum) if ((error = mac_proc_check_signal(cred, proc, signum))) return (error); #endif - if ((error = cr_canseeotheruids(cred, proc->p_ucred))) - return (error); - if ((error = cr_canseeothergids(cred, proc->p_ucred))) + if ((error = cr_bsd_visible(cred, proc->p_ucred))) return (error); /* @@ -1653,10 +1647,9 @@ p_cansched(struct thread *td, struct proc *p) if ((error = mac_proc_check_sched(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); + if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid && td->td_ucred->cr_uid != p->p_ucred->cr_ruid) { error = priv_check(td, PRIV_SCHED_DIFFCRED); @@ -1723,9 +1716,7 @@ p_candebug(struct thread *td, struct proc *p) if ((error = mac_proc_check_debug(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); /* @@ -1815,9 +1806,7 @@ cr_canseesocket(struct ucred *cred, struct socket *so) if (error) return (error); #endif - if (cr_canseeotheruids(cred, so->so_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, so->so_cred)) + if (cr_bsd_visible(cred, so->so_cred)) return (ENOENT); return (0); @@ -1847,7 +1836,7 @@ p_canwait(struct thread *td, struct proc *p) #endif #if 0 /* XXXMAC: This could have odd effects on some shells. */ - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); #endif diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c index 222e39c6bcd2..204f4f60456e 100644 --- a/sys/netinet/in_prot.c +++ b/sys/netinet/in_prot.c @@ -67,9 +67,7 @@ cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) if (error) return (error); #endif - if (cr_canseeotheruids(cred, inp->inp_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, inp->inp_cred)) + if (cr_bsd_visible(cred, inp->inp_cred)) return (ENOENT); return (0); From nobody Wed Oct 18 18:03:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dy76FvJz4xKdh; Wed, 18 Oct 2023 18:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9dy75cV9z4WxK; Wed, 18 Oct 2023 18:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiuR+23CAmKL0Vdge64pw/H3rhpiUpypd6zE5mfoVqM=; b=ho3lJk/FH2kUh813LLeBxQLpKvVo4ouHB805wvs38R4W3cTTM75ufAHj8+j1uPHrGwqsYA LmImZJyBk9GjfqKYzlYiAmHNXXVsyiKlCBCNWCSyxl579IizA7n6gg4x1hzJdVyRkk6K8U DMmg6szmIs+7+zcb+M/Tn+UNx0axy0U3dr35LZjAB9ZXPjmxnJmJrKoNvffbsEAZpCpnAS AfFWk9NdJYykx6TTpZjc+bEnrzNXTRUbnvUurQhHkvn18VLOrE+W24BS2G20tXv3bO6YKO +yifztl058DuQ1XU6Fen19x4dBdWrE6vPKMVvUg2H/jbpZiIVWd1tpIuseoByw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652223; a=rsa-sha256; cv=none; b=YonA+d1GMuclN8P/Y8WEIWwBYBPElIOUqr7qzve436r60Y0WN7Zo0Mt47grHct0MYfvTMQ 8ZSsoVqTO8sQx25UblAniq5enoNyiclhQ/sI51vVKYGsCJJtjZCHMC5QPP1MNgtgqotgrm GL7QeOs+bGDmAasLIUeLWemrLeoCrLsBRjwy0wit/vlTg8Crjq3YyGDEsFEfo+xpEkt2a9 W3ctN4XM4vxLHRBbgFPl3zW3t3ngkrbV370D56Tb0PT0fnUyjLmgL3DetgRgTcrjq/WofX Uy8Fh51JREdDomW9CvfQ1vaxA+LaZ16h7GZvNk6SlRibNO4cq8mT5M100wcs8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DiuR+23CAmKL0Vdge64pw/H3rhpiUpypd6zE5mfoVqM=; b=NgRPmf1OxZsC3YRG7b2hMD1PTLxEQarnxNGE//G2jP+lwki/pSXwYOVNh+im+YgxP1U6/Q MXDIt7fhom0Rmb5ApM7aY7N/+jnZcwov16mEGZpplneW3lI0N1b5/WVW/0avTPyPLzbfpP AgQid4frmVRtykHs2UcpvfMpikA8bf+BEt00DRedAumB03UW/AcFOFbJDPe7egqKTxp6CL Qu6jj+DnktnSCte7uxmLLFX00MwN7yV6GHXYWm2PNXkx2ZTX1j2f2MDcpMjXkHLYrP+DX5 qLUsWvXge6tdMH11Bn6ilJvlwK+I43sH+ULwNv9MpoNtzdl62T2wTQw3xj5EFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dy74jqXz1tR; Wed, 18 Oct 2023 18:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39II3hZb044465; Wed, 18 Oct 2023 18:03:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3h63044462; Wed, 18 Oct 2023 18:03:43 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:43 GMT Message-Id: <202310181803.39II3h63044462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 0f353091c3f9 - releng/14.0 - cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0f353091c3f9190ba282ea57d5dd2dd87fccf6bd Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0f353091c3f9190ba282ea57d5dd2dd87fccf6bd commit 0f353091c3f9190ba282ea57d5dd2dd87fccf6bd Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 17:59:59 +0000 cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename When these functions were renamed 7 years ago, their man pages were not. Rename the latter in accordance and fix the names inside them. Fix references to them as well. Add the old man pages to the list of obsolete files. Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40630 (cherry picked from commit c59ab75c04fa32bc6d292596ff5e4593a05a6b1b) (cherry picked from commit 50cb6641921f9bab29b8404af2c86da79ff0e451) --- ObsoleteFiles.inc | 4 ++++ share/man/man9/Makefile | 4 ++-- share/man/man9/cr_cansee.9 | 8 ++++---- share/man/man9/{cr_seeothergids.9 => cr_canseeothergids.9} | 8 ++++---- share/man/man9/{cr_seeotheruids.9 => cr_canseeotheruids.9} | 8 ++++---- share/man/man9/p_candebug.9 | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 589f6b968e9d..cff13e3d7478 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20231013: Man pages renamed to match the actual functions +OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz +OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz + # 20230906: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/E-Tugra_Certification_Authority.pem OLD_FILES+=usr/share/certs/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index eb670c924077..08ad811fa901 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,9 +69,9 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseeothergids.9 \ + cr_canseeotheruids.9 \ critical_enter.9 \ - cr_seeothergids.9 \ - cr_seeotheruids.9 \ crypto.9 \ crypto_buffer.9 \ crypto_driver.9 \ diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 8e058eb4e3e5..4824a231170b 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -50,9 +50,9 @@ variables and .Va security.bsd.see_other_uids , as per the description in -.Xr cr_seeothergids 9 +.Xr cr_canseeothergids 9 and -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 respectively. .Sh RETURN VALUES This function returns zero if the object with credential @@ -84,7 +84,7 @@ does not belong to the same jail as The MAC subsystem denied visibility. .El .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 diff --git a/share/man/man9/cr_seeothergids.9 b/share/man/man9/cr_canseeothergids.9 similarity index 94% rename from share/man/man9/cr_seeothergids.9 rename to share/man/man9/cr_canseeothergids.9 index bd8eb5d2e9d9..79269533ae5c 100644 --- a/share/man/man9/cr_seeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERGIDS 9 +.Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME -.Nm cr_seeothergids +.Nm cr_canseeothergids .Nd determine visibility of objects given their group memberships .Sh SYNOPSIS .Ft int -.Fn cr_seeothergids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the group IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeotheruids 9 , +.Xr cr_canseeotheruids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/cr_seeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 similarity index 94% rename from share/man/man9/cr_seeotheruids.9 rename to share/man/man9/cr_canseeotheruids.9 index 2cefd0f9dc8e..80acc2d7a6ca 100644 --- a/share/man/man9/cr_seeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERUIDS 9 +.Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME -.Nm cr_seeotheruids +.Nm cr_canseeotheruids .Nd determine visibility of objects given their user credentials .Sh SYNOPSIS .Ft int -.Fn cr_seeotheruids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the real user IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeothergids 9 , +.Xr cr_canseeothergids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index ffa4fedb6172..e80d313de55c 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -113,9 +113,9 @@ Process is not visible to thread .Fa td as determined by -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 or -.Xr cr_seeothergids 9 . +.Xr cr_canseeothergids 9 . .It Bq Er ESRCH Thread .Fa td @@ -129,8 +129,8 @@ The MAC subsystem denied debuggability. .Sh SEE ALSO .Xr jail 2 , .Xr sysctl 8 , -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 , .Xr prison_check 9 From nobody Wed Oct 18 18:03:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dy86w3bz4xKm3; Wed, 18 Oct 2023 18:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9dy86MNmz4XHD; Wed, 18 Oct 2023 18:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bTxSVcIZGMPeNw34d6JyYP1SsFRR+CWwvgiKYX6Z48=; b=jkBJBADqLL0CloTOaE7l+J+7+Hyby0vzipcLf3zsJXaI9qOtgitGs8MvsB/zmZCwKZhhgf //LCNdhuLFj7L2hQNSUgyF6zs/uNMYT+By45M5XGSF5sFMpbt7EzOVo7UOyb3MEM9g2Ci/ xNqL6BNIZUFr//e+7lU40FKJ3rodRqhOtIL9hH4Iw58p2/vMb4mFL+0Nh/hBNaU5UVRYMn 4lbmpKCgpqg2NWT1o7ShDt6VeY3ml+A/Y9kTSUprZ/fdf9Sdk6NR/uqx4loAIrtqOnF1fG c3WP3ynrEqwFa2aWbx/0xccsoTD9uB1umW0z4ls7Gw1UtYwdHOUteFP9XLAMuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652224; a=rsa-sha256; cv=none; b=BoEYvtp15KSCVL9BDSGKDqSdOw5UvMbIAk/QXtDlJ16MmWuSqaECOBbKT2phGPGUnFKQNB 7SMNg39nXrzRmR+tDE9qipZGn80jq76J0mXY/srqugBJeBYe191amF8lO510FFZtdmt4xs PP0F5lFwz3olEuRiz45hSWBoExio6x/GrRnJvchBMIYaTP4ha3uD3IUEa6vxangI4Tr4jp Ap5A8zK9PXMJoMtBAEk3/zoFdVKriu9kzk+NE4AlUlIkyYpqHsBHxedKsSq/Rw+xv5dnrr VKSzkjqsCtlvVZKgGdunDnDkcSuhcjRhQydEDYuGduFcoOzKWnbhAQOQEWwCTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bTxSVcIZGMPeNw34d6JyYP1SsFRR+CWwvgiKYX6Z48=; b=s5i9xE8/WblhyyHc6ltGbQQ8X6/VIeBJRv6Yc/8SI+P8c0FRuCiklRe05elGvJgdnTgBCK xuvqEgFKfk3Q+EfidE+Mrvgz9CZivSHdz336V7ljaQt2bv14ruWh7XTyy5/CU4wN4V8b9o hh2DsS+od3JziBLHfA7WRHI36AlwdOsaQh6KkLGLka/1GMDc2GGHg3QefaAacdYKqkQaFL BoFMUuWB9DillX7vEYkAkTdWgk1p72qKHzAsw9b02fp7KEB7cCEwgtu/V2273+lOlKhm1F x9xmYfgqrLWdpNb/0/Y5CDQpIJtdXCS6a26wt9Bb44r1+RWoAUfSm2E++AhJbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dy85Ssfz1nd; Wed, 18 Oct 2023 18:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39II3iHM044504; Wed, 18 Oct 2023 18:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3iVC044501; Wed, 18 Oct 2023 18:03:44 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:44 GMT Message-Id: <202310181803.39II3iVC044501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7b1a21deb3d3 - releng/14.0 - cr_canseejailproc(9): New man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7b1a21deb3d39281c05b14363e8528ee09680689 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7b1a21deb3d39281c05b14363e8528ee09680689 commit 7b1a21deb3d39281c05b14363e8528ee09680689 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:00:05 +0000 cr_canseejailproc(9): New man page Approved by: re (gjb) Reviewed by: pauamma_gundo.com, mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40631 (cherry picked from commit 29d863bb7ffc692998f21fa3e7a91afa1151cf1c) (cherry picked from commit 66eb6431479d1de3764228104ddd7a5f15ebf377) --- share/man/man9/Makefile | 1 + share/man/man9/cr_canseejailproc.9 | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 08ad811fa901..71a11a7cc6c0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,6 +69,7 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseejailproc.9 \ cr_canseeothergids.9 \ cr_canseeotheruids.9 \ critical_enter.9 \ diff --git a/share/man/man9/cr_canseejailproc.9 b/share/man/man9/cr_canseejailproc.9 new file mode 100644 index 000000000000..775c76722b05 --- /dev/null +++ b/share/man/man9/cr_canseejailproc.9 @@ -0,0 +1,81 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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 August 18, 2023 +.Dt CR_CANSEEJAILPROC 9 +.Os +.Sh NAME +.Nm cr_canseejailproc +.Nd determine if subjects may see entities in sub-jails +.Sh SYNOPSIS +.Ft int +.Fn cr_canseejailproc "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials +.Fa u1 +is denied seeing a subject or object associated to credentials +.Fa u2 +by a policy that requires both credentials to be associated to the same jail. +This is a restriction to the baseline jail policy that a subject can see +subjects or objects in its own jail or any sub-jail of it. +.Pp +This policy is active if and only if the +.Xr sysctl 8 +variable +.Va security.bsd.see_jail_proc +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Sh RETURN VALUES +The +.Fn cr_canseejailproc +function returns 0 if the policy is disabled, both credentials are associated to +the same jail, or if +.Fa u1 +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . +.Sh SEE ALSO +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This manual page was written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Wed Oct 18 18:03:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyB14Wxz4xKyD; Wed, 18 Oct 2023 18:03: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 4S9dyB0VkKz4XQ6; Wed, 18 Oct 2023 18:03:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zt/h0B3ri+IXH9PGSMYS3rlear8QNo/t6LF5+D5VCpA=; b=H0bWak0OdLXqT87+uzaioClXzz9C1Tx0eSpdjClbnyefjorTOIbsyRrH1CHPvqC36eXBAI fprCsI5q/JrcM3y/kTSNuXmckmpLR1bXKIRh39RReBLxSbL+gZ5vtAlzgdtQBEr3mzUDq9 3mnFwNqQMLxNG5IlUUpE2TC/woNcRdQIdD28h3QnyMjCfhaEPrJItl8DBjxs+jlTgq5R1P e2K0ArjQWKHc/3xcOGpzCKcBz5XvDDrIkOsGY2o+Hf8XHU7n2qgR2LA4QbpIqIbNArje+K R31Z125MCrV77Ef78k6jSowkDhZkdmJDvjGACaEh3aUPTvtprw1GPiCyt9m8ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652226; a=rsa-sha256; cv=none; b=wxLHNbUWxSKUNonNrkKfD2q8VR+Jhm9ZXl194p1dIpHRf2bpAx8uH6KsMeqwD0JMZagsRd 3UfBCIqxX+hqepr3hciv/S0N75MH/o5176hX+3WlqprjCB2DQRCbByioZuTTw/L3S0UotU oSGMkl5q5Kz0K5SfcjNvBPZrgBJMpWdJoQ7HxQdUqIEjY5ZYM1AOFpFZOpDJBYl5TjGWVr KU5BQsbVtt47wl9wyJKJJ334LVC0KuBDFJ6mB0yhGGKX1TJX078bVXc+d2TCjwzkbMKdEr aXnkeTsFo10zXyUme15oT8POU4S/gZtn6HHu01VDhNR9cXwWcLGYIXpBotC1pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zt/h0B3ri+IXH9PGSMYS3rlear8QNo/t6LF5+D5VCpA=; b=Pd4lHPol8t4z41KozRdsYIsk2pAKKjPQqrsHCVLWoanUd+dan63+tcWPlN2FlXmY2PWkoH t1mp39iLT+FjTCaHXmw08T0Vee7dzVvxHCISQV4b/PY5odqGi1ddBJpLd3R0a7co6Q7uff ggkbWiFioBCb0ddnE9ZQzbvmwO8747Lh6lzZkFZZcj4zBDzjKR6O6VOu0z8tJArkb4JNiG cAvtLZgjTwMade3WYTk14IejHG+tnBHAyfWbNKqRwU02vmzxUSPrgZ428f6EPz9NQkL8vX hIB49tVmtGV8BJYCLl7W9GkkRiwBTMNvC++2KMhH1bTWg/7ia3quxN8K5sI+gA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dy96jNlz2RC; Wed, 18 Oct 2023 18:03:45 +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 39II3jTS044543; Wed, 18 Oct 2023 18:03:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3jQF044540; Wed, 18 Oct 2023 18:03:45 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:45 GMT Message-Id: <202310181803.39II3jQF044540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 789e43a68797 - releng/14.0 - cr_bsd_visible(9): New man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 789e43a68797f6feb478722d7c63f03a30110c4a Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=789e43a68797f6feb478722d7c63f03a30110c4a commit 789e43a68797f6feb478722d7c63f03a30110c4a Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:00:11 +0000 cr_bsd_visible(9): New man page Approved by: re (gjb) Reviewed by: bcr, pauamma_gundo.com Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40632 (cherry picked from commit 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f) (cherry picked from commit 3fa9a2a9177c5b4d8af7afecf0d74f345534a82c) --- share/man/man9/Makefile | 1 + share/man/man9/cr_bsd_visible.9 | 117 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 71a11a7cc6c0..c3c81719b7d2 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -68,6 +68,7 @@ MAN= accept_filter.9 \ copy.9 \ counter.9 \ cpuset.9 \ + cr_bsd_visible.9 \ cr_cansee.9 \ cr_canseejailproc.9 \ cr_canseeothergids.9 \ diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 new file mode 100644 index 000000000000..bd676e6f5705 --- /dev/null +++ b/share/man/man9/cr_bsd_visible.9 @@ -0,0 +1,117 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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 August 18, 2023 +.Dt CR_BSD_VISIBLE 9 +.Os +.Sh NAME +.Nm cr_bsd_visible +.Nd determine if subjects may see entities according to BSD security policies +.Sh SYNOPSIS +.In sys/proc.h +.Ft int +.Fn cr_bsd_visible "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +This function determines if a subject with credentials +.Fa u1 +is denied seeing an object or subject associated to credentials +.Fa u2 +by the following policies and associated +.Xr sysctl 8 +knobs: +.Bl -tag -width indent +.It Va security.bsd.seeotheruids +If set to 0, subjects cannot see other subjects or objects if they are not +associated with the same real user ID. +The corresponding internal function is +.Xr cr_canseeotheruids 9 . +.It Va security.bsd.seeothergids +If set to 0, subjects cannot see other subjects or objects if they are not both +a member of at least one common group. +The corresponding internal function is +.Xr cr_canseeothergids 9 . +.It Va security.bsd.see_jail_proc +If set to 0, subjects cannot see other subjects or objects that are not +associated with the same jail as they are. +The corresponding internal function is +.Xr cr_canseejailproc 9 . +.El +.Pp +As usual, the superuser (effective user ID 0) is exempt from any of these +policies provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Pp +This function is intended to be used as a helper to implement +.Xr cr_cansee 9 +and similar functions. +.Sh RETURN VALUES +This function returns zero if a subject with credentials +.Fa u1 +may see a subject or object with credentials +.Fa u2 +by the active above-mentioned policies, or +.Er ESRCH +otherwise. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +do not have the same real user ID. +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not members of any common group +.Po +as determined by +.Xr groupmember 9 +.Pc . +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not in the same jail. +.El +.Sh SEE ALSO +.Xr cr_canseeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseejailproc 9 , +.Xr priv_check_cred 9 , +.Xr cr_cansee 9 +.Sh AUTHORS +This function and its manual page were written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Wed Oct 18 18:03:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyC52Qmz4xKhR; Wed, 18 Oct 2023 18:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9dyC1XDYz4XNJ; Wed, 18 Oct 2023 18:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDZFRZIVZbH2tBUn7To4WT5d3z4j/C33sOJ0tLsBfec=; b=eVX/H4wZ5A7Ew5gAKh1fi9ZEM3iK82amG/rzFLjdKpaTduCxUtgD+MgXu5/rwjyjbgNYqv /5g7Sz992FdJMgfKPnQlsRjIztWlurklVl2EEPm6l4QsXZ2IcPYJnTaxZy0GApZLOG4Yfy pm34fwrWADUXOBRjh9L/Eo05L2Uep0BBKOMgLlNBUYO9IwrPKex2Z2tm6651s05AUwiIuD NQm4bEK+JrgWx09H0as9C7fVJG9FNFfJSbYMFhCbi/GkYyyJ+pTJ1fVQ3xOrgNEDixNQNo 4RroMwj6KhWUeoTNHA1paJpbEZ1nZ706w/3zKG6GC3F2udkWhttiy3WlxtwYrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652227; a=rsa-sha256; cv=none; b=yuZCRj4QgzKS8Id0sbgAKNQmE9utyi2BU+2ty1Nhn/6uZrAP5sHwqVpLvO2fF1k0+3NKZY JxgJg6VjTTAByIarSh+VkkDOP5q8Dx2R9ov9u1ILFk+pRm1I2pVhA329G9lm5fQXU2eF5o 5uEEK9E7cZHdBRq0Gy63l086x8Tz4BDmvvFQbEdnteeEwQZGNnczUM1idcJnR3vY/MJU9E 7cCzZ8kN2wrUXYsevcTL1NIjj37D08KGpH3G9A4SfkIuxFIoaWFaVSF/U0PsDJ7loBs+5o vOt1IgmzKaz8Upyqj87OzSQ85APM1465Dbvnt3xcEQcH850ouCwt8/xEcn6SwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDZFRZIVZbH2tBUn7To4WT5d3z4j/C33sOJ0tLsBfec=; b=XqCJgMNKzhTz2gpq9HSeiDNryUHA99HqmOiMACzqhPJPcEbbWXOlsKEhminzqiv9UoLfvn 0UqLlpdTeSCgUqYG17zxZRS2E1Mk+ejDsE/mFQ7hEEFRA1jnh1rg8LeGnLnboaHtG0JnTD DnA1EX2x24rWOkWsdV7dZXAeOVJMpHpXqp9oxheZiJVMo1u83jrNlSSk26VvO7Mq8ETt2e d+sBvSuj37WsereJkL2K9D1mhZARH5AhQqVQzvmzeC8c4ZBvfR8Xji/K66JaFe9/TD1gvl /2LXecKfjGIArNj3OK+W80qJqu2QPxO22+xT8Sbso0kLr5qms56iPaFmnoU+qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyC0c38z24n; Wed, 18 Oct 2023 18:03:47 +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 39II3kAb044588; Wed, 18 Oct 2023 18:03:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3kxE044585; Wed, 18 Oct 2023 18:03:46 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:46 GMT Message-Id: <202310181803.39II3kxE044585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b6b628ed96b3 - releng/14.0 - cr_canseeothergids(9): Revamp, mark as internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: b6b628ed96b3e829cff0cedc77f16e9277a99a96 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b6b628ed96b3e829cff0cedc77f16e9277a99a96 commit b6b628ed96b3e829cff0cedc77f16e9277a99a96 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:00:19 +0000 cr_canseeothergids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeotheruids(9) by ones to cr_bsd_visible(9). Approved by: re (gjb) Reviewed by: pauamma_gundo.com, mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40633 (cherry picked from commit 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e) (cherry picked from commit 15d2ead9623dc2b0a560fc0fd6ba89ca16715597) --- share/man/man9/cr_canseeothergids.9 | 77 +++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index 79269533ae5c..f0c1e5c4e726 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,58 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME .Nm cr_canseeothergids -.Nd determine visibility of objects given their group memberships +.Nd determine if subjects may see entities in a disjoint group set .Sh SYNOPSIS .Ft int .Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the group IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have at least one group in common. +For this determination, the effective and supplementary group IDs are used, but +not the real group IDs, as per +.Xr groupmember 9 . .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_gids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their group membership. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if at least one of -.Fa u1 Ns 's -group IDs is present in -.Fa u2 Ns 's -group set. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_gids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_gids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeothergids +function returns 0 if the policy is disabled, the credentials share at least one +common group, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeotheruids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr groupmember 9 , +.Xr priv_check_cred 9 From nobody Wed Oct 18 18:03:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyD3NTQz4xKk2; Wed, 18 Oct 2023 18:03: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 4S9dyD2Vysz4XCd; Wed, 18 Oct 2023 18:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v6HHhb1VdSmVWdIVkbCVsFvsulmWtJTUHTiERJWxbA4=; b=SJS7dEjts2kJXgO2H5UXutBVrwVCrRSasTfIaOvodnT5XqdUx/AJcuh8/m+VSVhz/yAR2y crCz+6jvEdjlFAmHIYxIZxcLTR2PtIcRijr3ksBpHzxLGMTgA1SA+aJzgIQlh+YLurJ3kc Q3O0qWbJWtAMV44TNoC4bYlhIXCP5Kv+7VRqMoL8rmHIi6K4yvwtHYKpTEecx4RpFvzRie z//rgPy4MtolbFBpgiMXgz+GqAm5KpSL/EXPicX46wr72lO2laDBaBBMn6p8AOIBJgFa/7 Db/Sj9l9xLWiPY924nMl2FyWUEm1HYI2qsS2u0sdNyLv24J/voqEGaGxzkS6Vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652228; a=rsa-sha256; cv=none; b=E+yIph3Idpus3BMb6rrrjGuKNNIxS56n2exYXhwLFZTAZpZjRQPmfk5x9OUbIvq847SnIO tcsdQggM1KPwMZ4CgF3/5EVyrjRhhvTgtg6Ir6WprIi8U+99ZuxcgJLwVArhwGBVBHoHak XTTyyZx2y+qWZA2pz9jeztCITxL29I8vJXizWLTfdZBG8x05boSS6f8HblkmqfV21DCTRR 0rg0uhUEh9H33MHmUF3yCTqQ6BBqH/4phVYE6AFUv8ddqoVE5wN2ib7llJ9K3G16+4/CQL x65q+wg3ltvj5vpohZc2qo/vJRHMUWYEn6hni+fKUkSVRfq8Yhnsb6M0AWpg9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v6HHhb1VdSmVWdIVkbCVsFvsulmWtJTUHTiERJWxbA4=; b=IBZPExLkcsnQHK4VKZufm80mWHVIARP+Dpn/vnhuyWKLAzU+41/VEvI7sREIcjtVuEqjGf 7e7+jbA6PIPP4o0d6Qb56UB8Um2Ro8X9IWM8BlV4fIyNpX7qAfnby69evpHfIALc7EOVec Uw5GVDFEXjMwp6Zv809XZl/iSv6OIZvaPMMHe0fV04oazdGD94w4tUoJJqmoNfHcH2Cnwl jgONAXo0/7IAoFOY0amwwBVaZuEQCz3bLPLyolFFp33amPvwg7Hg72mbmIjABdRiBWBY5Y 9TJL2nXJDKdzle7pjo0mDy3GRnhx3mFKMBOabUROsC453zDOY4N3PM8BeH+i9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyD1cCmz1tS; Wed, 18 Oct 2023 18:03: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 39II3m7L044637; Wed, 18 Oct 2023 18:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3mdL044633; Wed, 18 Oct 2023 18:03:48 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:48 GMT Message-Id: <202310181803.39II3mdL044633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7dd1f9f9c949 - releng/14.0 - groupmember(9): Detail which groups are considered, simplify List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7dd1f9f9c949bb16c7897374cf7051c3ced7c16e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7dd1f9f9c949bb16c7897374cf7051c3ced7c16e commit 7dd1f9f9c949bb16c7897374cf7051c3ced7c16e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:00:23 +0000 groupmember(9): Detail which groups are considered, simplify Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 (cherry picked from commit 75a45ca3b34062fe793ae326ad9da614a1a06df1) (cherry picked from commit d4cb91af0c93055740f33566c5f97f9dc1ec8e5d) --- share/man/man9/groupmember.9 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index d447bf64c482..3a516622efce 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (C) 2023 Olivier Certner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 9, 2001 +.Dd August 18, 2023 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h @@ -38,21 +39,26 @@ .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Sh RETURN VALUES If the .Fa gid -is found, 1 is returned; otherwise, 0 is returned. +is found, 1 is returned, otherwise 0. +.Sh SEE ALSO +.Xr getgroups 2 +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Wed Oct 18 18:03:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyF3X3sz4xKm8; Wed, 18 Oct 2023 18:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9dyF2rGRz4XRZ; Wed, 18 Oct 2023 18:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rDt1mUoydXI4DPEBjIHmzV3BYUwV6cDoie6XiGBSH+Q=; b=I4IswAgHBQNrECYmZ/srv6nSC07Ik41rCWcuIqvfM8ATT70sgZgWqtHAz2KwmUMBnI3Uds 598X8KZhMwKcNpLjC9K39Qe7N7JXmnlkGbEPAwOM+MSpd6q8jPS+rtIfyitQSL5fhogkVB DmVH2YT2/+UT4G042q3W9bCbFqOo3eaZrVX4cunaIGwE1wrPAhX0kCf99Jr/c8jphPfQL1 KImUZmGbV3snlc4yIWINsim5pDmKcmevh0KiE2vGsyqeUNlERo6dAdWDQrg1wAIy5SRdbS zNgMdqTSc8HNUkRbGvTiE6jyUn0ftAsV/UdFstQshwnbx1J1CvPHhYQLceFkgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652229; a=rsa-sha256; cv=none; b=oHRNeXj4I8lIw9p+QvkGI9X2pjZxrp4fqyzzvSWA6gGsfMvMQrci9PJ6hvoRz4seGPuncN 9cT+kNntdFiEATV+MroLKtXX4nXR+yCy3t8IGa/IV3HH+6+JaLNjkeEZAD96+8z5L/lyOh BN9kJ5/O/NrsX/uWqQ0Ubpw6pVyIvlHblGbDM95HLWP3OC5B337muIIIDC2C8dRBdme9xl zcKQ+7jAIYfkJdBzgfScrSybzDNVtp6e37iGyvterK8btwxdkO1NnVK8kXCHCzAoa+kDJV SR0DIxBYkSm6SdWo8WnKaUSLb2wOtdEdweMirPewI6g34/Pj2KvFQvjjaF4Deg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rDt1mUoydXI4DPEBjIHmzV3BYUwV6cDoie6XiGBSH+Q=; b=VyNA4L6cruGvPuvkW+YStVXB8un/yhLkS0u+jY/8ny4z7q2oQ0tIK5I2WS9+MLM+RdNMmh AQ8gPXVFFDIBrGoaOT+OfrhZD8UfY1OoHiVibavsSab/q4jA6rajH9xVob6uH+4l42fFV0 UNNEJoOoL2hYKc8iRxqp3uEFZTLApNkqrKS+cN5gIChQAPrHyd7ollwroPPGrl+pwoB74S ZjN0KIbnc25SW4jLpeHukVDmAusHxeaLeUWj190smrf8/4U9sWw1MFqdyINmF6pu6ccdwG U8C/53+hau4YpBEvplu1YO2pggBFoHpn1fxL36rP+4KDjf5nRZ2QcixeuIyzLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyF1xZ9z2Rw; Wed, 18 Oct 2023 18:03: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 39II3nPc044684; Wed, 18 Oct 2023 18:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3nKO044681; Wed, 18 Oct 2023 18:03:49 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:49 GMT Message-Id: <202310181803.39II3nKO044681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e0180be23e62 - releng/14.0 - cr_canseeotheruids(9): Revamp, mark as internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e0180be23e62ee92bb15db22dc6bdc00886d8ecd Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e0180be23e62ee92bb15db22dc6bdc00886d8ecd commit e0180be23e62ee92bb15db22dc6bdc00886d8ecd Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:09 +0000 cr_canseeotheruids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeothergids(9) by ones to cr_bsd_visible(9). Approved by: re (gjb) Reviewed by: bcr, mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40635 (cherry picked from commit 4ddd253b38dff8725555355cc1b5238b1bbfd380) (cherry picked from commit d05ed9a37b84f277cbc06447b322930fe678b00e) --- share/man/man9/cr_canseeotheruids.9 | 73 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 index 80acc2d7a6ca..230c5ea59b78 100644 --- a/share/man/man9/cr_canseeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,54 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME .Nm cr_canseeotheruids -.Nd determine visibility of objects given their user credentials +.Nd determine if subjects may see entities with differing user ID .Sh SYNOPSIS .Ft int .Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have the same real user ID. .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_uids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their user IDs. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if -.Fa u1 -and -.Fa u2 -have the same real user ID. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_uids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_uids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeotheruids +function returns 0 if the policy is disabled, both credentials have the same +real user ID, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 From nobody Wed Oct 18 18:03:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyG4nRXz4xLBk; Wed, 18 Oct 2023 18:03: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 4S9dyG4B8fz4XZs; Wed, 18 Oct 2023 18:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1BcFiZ+sPfTPiDVV+5EXG1eSGov00fwNbe92wuQbNU=; b=Kjm77lOc3rLl13QkB8XGz72vwxkPAViFjJkGVN3ofMMsW7YShH+SGnyayJ/zeu5VfH8J60 muj0cNDOmSPKRSdaI3BJ7wMEvokLZRKy45xRfhmJ8cvL5dqgN3Ib2d0Tyclw8ISO5CF7zD UBE4KKKbE717ILBaQFN2dt6dU9ClVPO3avUXJxVGl27oX8omczVUew50k/K4LJlpv9rSK6 fOz6dLf9IfpfHg6TRNVE8ET8EeTEve85jQJmI+Ta+/Ltk9VGdTne0bRRQNPguHwIE4mF9a yEhhjsq695vS5DeEQxmnm8yYEfCtgvq1+/qFJ7EcYs9gQ2Dy9fdvsU/0EiOlrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652230; a=rsa-sha256; cv=none; b=KPqXBCbs8ks1ICd6FmkTcKjSU0gjOBvY/31QB3t4JP6FKvaoHxqkTpekruqOBJMJGuxKmm Newi8xJx6/aFCo0yA18qoUxNExOsr+udtj5sfSWkN2p7Uxw6VOthsfXJA+WUf5GNyln/g3 YuV6Z2DFBPx21jWRVDMoZWZx+DmH7gsrDeHo7c/KPF27CWZg8jDmXLIBlLvb3RPgTCqOTK Nm6+VfnlMBK6yayoH93Co58zvBBakuekMR6Idq0iLvA6qnKXbp5KUio2qnlf8fWLMc7jxH 03XCuQfGFtO36rTST+m3bVCpYKhE1Mg1EvSOA5ruh1mfnXZgd9dYeauOGrkIlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1BcFiZ+sPfTPiDVV+5EXG1eSGov00fwNbe92wuQbNU=; b=BTSN0uwn/ONjbOgqtJcjQk7yPqJ3UOkZyyS4saCI/mmVhr4q6+5l8txbJeBIm4TeNWr62/ 231l0B9bNhWSr3ylYSLPD+C2NYDp9F9IsbXgX95WlaV01XcsUYg+m29pf9wuWnfXRhI5dF nJEZi7BRHIwFoQpgV0tLKNKCRNw5pfgYKTvqLRR1TZFFS4glYi1r/a/f0Ib4yztMXjunfO I/v/JFu4mwcCzibyG0dK/V82WCSA4O7Bwm4OLmBl3HYt6Kx/LFKyMuG39GjXyGZbFQLooz ePNMldUYcKiS23ya7pxFccHTGUbbCGdKJr67D/gjk+QWTTsfU8YUJ5xUeo15eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyG3875z2L1; Wed, 18 Oct 2023 18:03: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 39II3o0v044733; Wed, 18 Oct 2023 18:03:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3oiW044730; Wed, 18 Oct 2023 18:03:50 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:50 GMT Message-Id: <202310181803.39II3oiW044730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f7cee2431fb2 - releng/14.0 - cr_cansee(9): cr_bsd_visible() impacts, simplifications List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f7cee2431fb2c195250cfedc9f4efaca07afd223 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f7cee2431fb2c195250cfedc9f4efaca07afd223 commit f7cee2431fb2c195250cfedc9f4efaca07afd223 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:16 +0000 cr_cansee(9): cr_bsd_visible() impacts, simplifications Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9). Defer to cr_bsd_visible() for controlling sysctl(8) variables. Approved by: re (gjb) Reviewed by: bcr, mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40636 (cherry picked from commit 82f9bc9ea8ed660c61050ad1d92f1a64108c7004) (cherry picked from commit 0d8de5b2dd61ad550afa86688e61cf546507dca6) --- share/man/man9/cr_cansee.9 | 61 ++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 4824a231170b..d5cdfdd6f8e5 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2006 Ceri Davies +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -23,43 +24,39 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt CR_CANSEE 9 .Os .Sh NAME .Nm cr_cansee .Nd "determine visibility of objects given their user credentials" .Sh SYNOPSIS -.In sys/param.h -.In sys/systm.h -.In sys/ucred.h +.In sys/proc.h .Ft int .Fn cr_cansee "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs and group IDs in the credentials +This function determines if a subject with credential .Fa u1 -and -.Fa u2 -associated with them. +can see a subject or object associated to credential +.Fa u2 . .Pp -The visibility of objects is influenced by the +Specific types of subjects may need to submit to additional or different +restrictions. +As an example, for processes, see +.Xr p_cansee 9 , +which calls this function. +.Pp +The implementation relies on +.Xr cr_bsd_visible 9 +and consequently the .Xr sysctl 8 -variables -.Va security.bsd.see_other_gids -and -.Va security.bsd.see_other_uids , -as per the description in -.Xr cr_canseeothergids 9 -and -.Xr cr_canseeotheruids 9 -respectively. +variables referenced in its manual page influence the result. .Sh RETURN VALUES -This function returns zero if the object with credential +This function returns zero if the subject with credential .Fa u1 can .Dq see -the object with credential +the subject or object with credential .Fa u2 , or .Er ESRCH @@ -67,24 +64,20 @@ otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -The object with credential -.Fa u1 -cannot -.Dq see -the object with credential -.Fa u2 . -.It Bq Er ESRCH -The object with credential +The subject with credential .Fa u1 -has been jailed and the object with credential +has been jailed and the subject or object with credential .Fa u2 -does not belong to the same jail as -.Fa u1 . +does not belong to the same jail or one of its sub-jails, as determined by +.Xr prison_check 9 . .It Bq Er ESRCH The MAC subsystem denied visibility. +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .El .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , +.Xr cr_bsd_visible 9 , .Xr p_cansee 9 From nobody Wed Oct 18 18:03:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyH5tyXz4xLBr; Wed, 18 Oct 2023 18:03: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 4S9dyH5P8lz4Xj7; Wed, 18 Oct 2023 18:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FD4H3I6eTrFW1yTak2Fvlr2lJEZZ3uH6CJo1cOooZUA=; b=BBT7AcDSIbaL2uNAuIsBqH9iYgfgV2dVd8be15GKaq6wqSHBRwsZg82vnkaLp+r/k5FMip v+j5Bx1bqg+pqTQhNRVwDLywJHqfnvaUhESeBlENc9yhHVR107xB7antuodl+WdKtWutHP YKDyA6rx9kJy+gWtqnVSe1SClC06HpilzFNU79C3ZlS9BwPC2xkeeNMiME13Jjj5ShBz16 Znaa/1IFqMut8TW/BlJcYfPz2/HvOh72zoVtKDKrkJqVDfuqt/BkmB9b0zMT0jHQoJk/6I dX6cs1/7XsgKBEm+//XRGCLDxidWpMpH2h1JbgIryy29k1TAemTmnerGOqTmUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652231; a=rsa-sha256; cv=none; b=sG3I+72eGs2uvLLVZgVETF1kKVC9RfNDhmxYVKSf6EAjgpAAZZdAQTZb2xNY6J0kGoWR6T BXOeT4C9bSGYzwez2+a/4cmdF50APNzxPPOVLKbbK9xBebXcHyrwg+5VMEZu1SAszusZOP fPv0YJIaKy7CEVJyEJnSimWNT6IDBjrE6LsloiQYwujP0vvtVrkrfrPITWx2HBxX0K1ihl UJojVSXbS0f1bpgW0rEg6W0xmDIEuZECPFzNqSL3LrYbXEp6QGjcgXyzO7+oGhLOVKmNkt co9BgOeNjNZF+iGewgxGM1Bz0GukMIKtGdvJ2Y51UCLjSYNhDgSqtIdlnB5fnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FD4H3I6eTrFW1yTak2Fvlr2lJEZZ3uH6CJo1cOooZUA=; b=OYI1XJgw80ZDqgEQm8vBKAHWNyUmQvKtYZAhwL/dSXjrmZ+1/G6yVKCtHOyeGgvcSz7IlB 5HLtWPmAfw7RSFBZkSUDC2iNfFmP0K2jK3xFuoDQoSM+M141shMrvD6WFd8c2k5IrSQ8qg t/k0uAqKX36o6oTl/QCZ6isxOhMFApVdusQeIidAj13nN49THxZ9PD0FU8Ar5KV1pGkOxQ fyjOncmojT2kXB4th1w4bHkG2/JoC8Nm39/59ftfH1U+ugfPKkME8GtJJkuCkN8D7Esfe2 jFWHK20coDyakaj2W3J8q64yQ3Y3L4p3uaXnmZKsORHuLzXbmjsPJTSLRvgTOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyH4Bw1z2RD; Wed, 18 Oct 2023 18:03: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 39II3pN5044776; Wed, 18 Oct 2023 18:03:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3pkA044773; Wed, 18 Oct 2023 18:03:51 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:51 GMT Message-Id: <202310181803.39II3pkA044773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: a8afbde0e81b - releng/14.0 - p_cansee(9): Bring up-to-date, misc fixes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a8afbde0e81b27a7a3f50157d7b3a6c8de578a26 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a8afbde0e81b27a7a3f50157d7b3a6c8de578a26 commit a8afbde0e81b27a7a3f50157d7b3a6c8de578a26 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:20 +0000 p_cansee(9): Bring up-to-date, misc fixes Essentially defer to cr_cansee(9), except for the specifics. Be more specific on the return codes. Approved by: re (gjb) Reviewed by: bcr, pauamma_gundo.com Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40637 (cherry picked from commit 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b) (cherry picked from commit 57d0cc50cd2878fcca8a9a4bf931abee0260b48d) --- share/man/man9/p_cansee.9 | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9 index 84287dac951b..9fdce460dfea 100644 --- a/share/man/man9/p_cansee.9 +++ b/share/man/man9/p_cansee.9 @@ -24,19 +24,18 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANSEE 9 .Os .Sh NAME .Nm p_cansee .Nd determine visibility of a process .Sh SYNOPSIS -.In sys/param.h .In sys/proc.h .Ft int .Fn p_cansee "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p is visible to the thread .Fa td , @@ -45,13 +44,14 @@ where the notion of may be read as .Dq "awareness of existence" . .Pp -The function is implemented using -.Xr cr_cansee 9 , -and the dependencies on -.Xr sysctl 8 -variables documented in the -.Xr cr_cansee 9 -manual page apply. +This function explicitly allows a thread to always see its own process, +even with pending credentials changes +.Po +see +.Xr ucred 9 +.Pc . +Otherwise, it simply defers to +.Xr cr_cansee 9 . .Sh RETURN VALUES The .Fn p_cansee @@ -62,30 +62,18 @@ if the process denoted by .Fa p is visible by thread .Fa td , -or a non-zero error return value otherwise. +or ESRCH otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -Process -.Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_cansee 9 . -.It Bq Er ESRCH Thread .Fa td -has been jailed and process +is not part of process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied visibility. +and cannot see it as determined by +.Xr cr_cansee 9 . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , +.Xr ucred 9 , .Xr cr_cansee 9 , -.Xr mac 9 , -.Xr p_candebug 9 , -.Xr prison_check 9 +.Xr p_candebug 9 From nobody Wed Oct 18 18:03:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyK1FC7z4xKyQ; Wed, 18 Oct 2023 18:03: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 4S9dyJ5kVyz4Xdm; Wed, 18 Oct 2023 18:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aTdETYJsSVgzVjtMcwERNCaXXLm/A/NZDmhK1MzoPlg=; b=YiArP/M/1NqbT+2hcjrzH8Wl8upJ5QKtcpGZMut9MZYq+oVAjoX7vgcPrLZSaVHHFrDcdN Cv/R0bu4hrAezNnVZb8zRcTDPJxOBYcHIUKlNylGk5y90e6zgVXFJmBJD1YpXpRCGbCALj 1dfiqnk6csotil4pDwiQbyR722u+NKgebJ7ku5SMX2OzUofJj6DU0wyqIpPzkLHlkesIry IOwT7R/mSz6RMg5AZ3lf2MRTDrtP/AIPwlY/fawo1Btm/Wih0p/Ho1RcMkEyaNIEUJcV8A bRnXDc4csZ9dDfuFoblIm8vm3y2svoiGtD4S+EY0o67BsunaeJvqp3X2tTRbOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652232; a=rsa-sha256; cv=none; b=PUlpOYlPw7Phj4vZjCRZT0Ka9ieZA1n5VvBksqtJToaEKG65e1AzFHbsmdAySt66uPp1N5 WvgQMFVYNyCmjrgGK6Lzp0hPFygnD3xvTYiv5e3DEntpJ1YPqyKZwXtNO9Y4W0hh+BsrK8 b7YeQOKa1fiBp/sCVcBLSjgV/PJ2GURQoFP7Z7WtRiZ5wanUhWzBDvEhJRa2rfpdJ3L+qd uWcI+q/XJZR4wNiXFnZfMHWar8sKE3rZVMwtVE6Mx2JoheleFbobnb9wbgmZLq0xHr5YaZ AKlUOIysL/pzOPfKhK8oBLTeLx154/Fa6t0Afn/qoO9jv/cN1kwvyC5pUTB1Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aTdETYJsSVgzVjtMcwERNCaXXLm/A/NZDmhK1MzoPlg=; b=U8xgwhYtlNTtU73KYoJWbU5TH1+nqtLkkkHf5VcHKndwTxNnC5399EwTS68WYJ/Eke5T/X w0XmJaiLf741SjQ7I0ViNdloDbTSyU+UfsuTjF0LjtNGWc12V/88JjQa8Om03+iaezR/AP 91jYepTCKZCwsvaVI1jdTfdng4HEaTLpUw6vcK9/j/rKPnAIV2UT5LTvaMXUmX4nPdXiFS 9YVlyMj6N5GwjFiRU2fqiOpN/QfwT16S2NN/YzBREp2PVDgxxMkmXOTxKY4s9c3Er8jVb3 paRNecjRYEUYFRUo9nyGacyqb5WFLx6HYckfaqZhcpHNqVp0Wm+MV8bpBD4gqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyJ4qn2z2RF; Wed, 18 Oct 2023 18:03: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 39II3qqR044818; Wed, 18 Oct 2023 18:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3qFo044815; Wed, 18 Oct 2023 18:03:52 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:52 GMT Message-Id: <202310181803.39II3qFo044815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: daf8ad192942 - releng/14.0 - p_candebug(9): cr_bsd_visible() impacts, misc fixes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: daf8ad192942f6d9da1affca6a0ea9d3da42101f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=daf8ad192942f6d9da1affca6a0ea9d3da42101f commit daf8ad192942f6d9da1affca6a0ea9d3da42101f Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:26 +0000 p_candebug(9): cr_bsd_visible() impacts, misc fixes Mention cr_bsd_visible(9). Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9), as well as indirect references not immediately useful. Fix description of credentials checks to match reality. Re-order errors to match code's check order. Approved by: re (gjb) Reviewed by: bcr, pauamma_gundo.com Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40638 (cherry picked from commit eb94f24fab4b44f13ca045370d9fcf12ca8835f2) (cherry picked from commit c29ee9e238b36ef8a7c4508582d4512cda885192) --- share/man/man9/p_candebug.9 | 103 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index e80d313de55c..c824db974154 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 19, 2006 +.Dd August 18, 2023 .Dt P_CANDEBUG 9 .Os .Sh NAME @@ -37,24 +38,27 @@ .Ft int .Fn p_candebug "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p -is debuggable by the thread +is debuggable by some thread .Fa td . -.Sh SYSCTL VARIABLES +.Pp The following .Xr sysctl 8 variables directly influence the behaviour of .Fn p_candebug : .Bl -tag -width indent +.It Va security.bsd.unprivileged_proc_debug +Must be set to a non-zero value to allow unprivileged processes +access to the kernel's debug facilities. .It Va kern.securelevel Debugging of the init process is not allowed if this variable is .Li 1 or greater. -.It Va security.bsd.unprivileged_proc_debug -Must be set to a non-zero value to allow unprivileged processes -access to the kernel's debug facilities. .El +.Pp +Other such variables indirectly influence it; see +.Xr cr_bsd_visible 9 . .Sh RETURN VALUES The .Fn p_candebug @@ -68,35 +72,45 @@ is debuggable by thread or a non-zero error return value otherwise. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EACCESS -The MAC subsystem denied debuggability. -.It Bq Er EAGAIN -Process -.Fa p -is in the process of being -.Fn exec Ns 'ed. .It Bq Er EPERM +An unprivileged process attempted to debug another process but the system is +configured to deny it +.Po +see +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_proc_debug +above +.Pc . +.It Bq Er ESRCH Thread .Fa td -lacks super-user credentials and process -.Fa p -is executing a set-user-ID or set-group-ID executable. +has been jailed and the process to debug does not belong to the same jail or one +of its sub-jails, as determined by +.Xr prison_check 9 . +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process +lacks superuser credentials and its (effective) group set is not a superset of +process .Fa p Ns 's -group set is not a subset of -.Fa td Ns 's -effective group set. +whole group set +.Pq "including real, effective and saved group IDs" . .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process -.Fa p Ns 's -user IDs do not match thread -.Fa td Ns 's -effective user ID. +lacks superuser credentials and its (effective) user ID does not match all user +IDs of process +.Fa p . +.It Bq Er EPERM +Thread +.Fa td +lacks superuser credentials and process +.Fa p +is executing a set-user-ID or set-group-ID executable. .It Bq Er EPERM Process .Fa p @@ -107,30 +121,25 @@ and the variable .Va kern.securelevel is greater than zero. -.It Bq Er ESRCH +.It Bq Er EBUSY Process .Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_canseeotheruids 9 -or -.Xr cr_canseeothergids 9 . -.It Bq Er ESRCH -Thread -.Fa td -has been jailed and process +is in the process of being +.Fn exec Ns 'ed. +.It Bq Er EPERM +Process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied debuggability. +denied debuggability +.Po +see +.Xr procctl 2 , +command +.Dv PROC_TRACE_CTL +.Pc . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , -.Xr p_cansee 9 , -.Xr prison_check 9 +.Xr cr_bsd_visible 9 , +.Xr procctl 2 , +.Xr p_cansee 9 From nobody Wed Oct 18 18:03:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyL0lGFz4xLC0; Wed, 18 Oct 2023 18:03: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 4S9dyL0CVbz4XmJ; Wed, 18 Oct 2023 18:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xThS009oNuNpA49MRyndRLpeu39lWS8vrGyBoIRwYOQ=; b=uhZRzDXRKWJe1USMzcDv57TDTvQdKJHGkc7//NyiBEjN2xnEJINgYLWdTFW+xRmRabp8aI DeHZkyaSsld5kNt/XVpywT99B2kpKLrptNz5Txvr9sgyliO8Vg7b7wSFbCo8Ix19Ecb18t Alq5wgPW1iIe5aLlnTohe7fKRsWdPG9WwFBbEdOLUr9phSDWMnbt2jOE8KM3MAYcXi4CNv NXqJR5GDlTepjUJVOYMjZKoKe0jhJuAchKOAmA6ZtSN6g6uj/Qzlkju+J7HsFJ9GaijJQ6 RLQsKQDfc37E8TUkahfspraSOFwVVyFcR+zRkRX7Obrxs1SV1afYtdH73FJpOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652234; a=rsa-sha256; cv=none; b=cpoTnprxDma1vCkIUW4DWMgDNW/B0X/BPirnSr6JNiQZgY+ahFbYhaYLxFKIlbDYS3uhUT nb32THlS1bLo9jlbaVn2RlrMCXhP5ngiF3zedbNu7nDX3WHJ7BZIWaTQNsfKcBk4431uoI STd/T0UwDV2uSbJPr+TIFnCTY85IOrmMLGwEGiykaYiVuMABVdj3oOfG07GikdUlaUxgjc UdDkm0R+9bTarmkrJhvab5TSTzur3QUMpuSexiRDeUX6NbvyPrwg92ZWisA3ZP/grHxrcv w3Ju8Ynbb5ipk3qlnxyNkH+/Hy+h2GmxDASkkMEYKDrDlorDHaXIb1dRqbz8Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xThS009oNuNpA49MRyndRLpeu39lWS8vrGyBoIRwYOQ=; b=Nm9vv6Rox8ruzr9NHW1mv2FowAZgpx7LEShuik+v0Akpo/xxcf2CXsRSdtI9IWLJwjasAF 1vIE/bgE5XZfFBqK6omsdOgMfqgVpK1m3Utm2ms3O9A09Rtkb97jKg19m3X2phZP6Hc4Ed YRIGXlda7OyXl3EFodESeg2FdI0hiJXASiURNPu4G/8pxxF+dsS4TbqDlOuEu9ee4QufvY ig163Mgo/VYnouW4hQoFuErbeedM7a4SUBSQ3t77Ly4RRUqEtEEX73MwIUN5cuxMVpeW8Z vKRYC/8EZsAe59ZryDNGkYLbJuX8fqa2KI2l6+VwNhB0aTLy3PitEhAWhCcM8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyK6FGwz2RG; Wed, 18 Oct 2023 18:03: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 39II3rOZ044864; Wed, 18 Oct 2023 18:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3rBO044860; Wed, 18 Oct 2023 18:03:53 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:53 GMT Message-Id: <202310181803.39II3rBO044860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 67d1f6f40a55 - releng/14.0 - prison_check(9): Bring up-to-date with hierarchical jails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 67d1f6f40a555b7099034283da481a92c53f4f3f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=67d1f6f40a555b7099034283da481a92c53f4f3f commit 67d1f6f40a555b7099034283da481a92c53f4f3f Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:33 +0000 prison_check(9): Bring up-to-date with hierarchical jails Approved by: re (gjb) Reviewed by: bcr, emaste, pauamma_gundo.com, mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40639 (cherry picked from commit e9fdd494537ca45b14e0917e8bb1595b6460f3a3) (cherry picked from commit a2d43cef988b9f2cf3d0edf6608a0dd5f2e2b9bc) --- share/man/man9/prison_check.9 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/share/man/man9/prison_check.9 b/share/man/man9/prison_check.9 index b3bdcf6b4571..7f174e3ceb2e 100644 --- a/share/man/man9/prison_check.9 +++ b/share/man/man9/prison_check.9 @@ -25,22 +25,23 @@ .\" (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 11, 2003 +.Dd August 18, 2023 .Dt PRISON_CHECK 9 .Os .Sh NAME .Nm prison_check -.Nd determine if two credentials belong to the same jail +.Nd determine if subjects may see entities according to jail restrictions .Sh SYNOPSIS .In sys/jail.h .Ft int .Fn prison_check "struct ucred *cred1" "struct ucred *cred2" .Sh DESCRIPTION -This function can be used to determine if the two credentials +This function determines if a subject with credentials .Fa cred1 -and +is denied access to subjects or objects with credentials .Fa cred2 -belong to the same jail. +according to the policy that a subject can see subjects or objects in its own +jail or any sub-jail of it. .Sh RETURN VALUES The .Fn prison_check @@ -48,12 +49,9 @@ function returns .Er ESRCH if -.Fa cred1 -has been jailed, and -.Fa cred1 -and .Fa cred2 -do not belong to the same jail. +is not in the same jail or a sub-jail of that of +.Fa cred1 . In all other cases, .Fn prison_check returns zero. From nobody Wed Oct 18 18:03:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyM1xjtz4xKmK; Wed, 18 Oct 2023 18:03: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 4S9dyM1WxKz4Xxf; Wed, 18 Oct 2023 18:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxdrLAPIjgtXEZcrULPDyTxm9oEAAyEH2rd0aSDDKyQ=; b=Ys8GPl7cyX0gBwUoGn+IiqR0cV6bO7TBWbWkmMzAhsp++0+6UyP2WwD1rRGXLs80RKc+JV 9JaIG4YRtPoZKeaZWJkt/bQjSvTgHi/nyuQW/wPc7zA4waTPM64ocS5/FW23AHkapzBQp3 PFME5FIkVSb6QsrVyc2FedTZ+7sh6JPGJzhEnRBieo9GL3CKX0J+/uNnOcS2+9bmOZC+3H NgL2A6DTaZyIyyF9RCYCqqeK2dyFcQSvrlhmKcCVSLrAjOA7PmCwTZ6icACOAE0/k3RxmO /drF322sYQELtPsFEg9LH3SxOnOcqXIHyZjtldKwk+xJ8UqC0f4wITI6WzZxGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652235; a=rsa-sha256; cv=none; b=d04wu7ngOPdWOikx/bc6lsdRI4pGeivZcUEyXk176AhfPFPSddx44qQmJQMJ7wrC8+wWbT bVMP1TdvXRqn4rF6y1FZpOogF33968a19Z8W1PJZlR0rkEudyBI2vE0jSMWD3gMmIiHe7g TTITw4HgfFh75R5ZXJ6Jyi3+xZbSjbiEVk/6htARhk9fdRqf8YUpr2TdpXq4N3KnQaNU5V l7RKEOIA0fzW/NFFsCyG9QKWWdESHUo5K/32dBGf6THS/f5ke2anedgtnJZahuJiY4wl80 Ta7ujaoe2lAl3gRlcHeBLzvKpOptS8duldv2pDD2TSYmPC/m/Qmqaba4tarafg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxdrLAPIjgtXEZcrULPDyTxm9oEAAyEH2rd0aSDDKyQ=; b=C7/dqwcFNRzwr8WyUpPA5cMy1m+aOb+u/Xi/GZ6Rl/k+c+fV1I0shbjciWcgB+Zc80rrIr PXamsuas4wupFdrmcLboS8zAq5KZq8hgl5ELgzBUjPkJf0KHV43USZhHOUgsBzZ1vCC9r2 TytHhO335C6MtxQbv3j52a8iMGvOCr7rlMc89RvIjKD6zM4+2orSA071MJSxG2RC+mtZ5W tRQiiUwg9Ea7Xnw6Ujj35NNzg1tE+EbiGbLDezyQgqAwveoDHwFNQWj2Tpf62BJdjDBnjB lLg7ivYmOskGvzni0SWwgpMBkS7Sri3RthOuU617rBHwUTaKmycstfz5FNkRmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyM0Ftsz1nf; Wed, 18 Oct 2023 18:03: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 39II3sx4044926; Wed, 18 Oct 2023 18:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3s0E044923; Wed, 18 Oct 2023 18:03:54 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:54 GMT Message-Id: <202310181803.39II3s0E044923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: f373119badd8 - releng/14.0 - groupmember(): Extract the supplementary group search in a separate function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f373119badd89f81401c8599869749d4a0fd4a8e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f373119badd89f81401c8599869749d4a0fd4a8e commit f373119badd89f81401c8599869749d4a0fd4a8e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:38 +0000 groupmember(): Extract the supplementary group search in a separate function This is in preparation for the introduction of the new realgroupmember() function, which does the same search into supplementary groups as groupmember(). Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40640 (cherry picked from commit b725f232f3b09b4bcbc426854fe1545234c66965) (cherry picked from commit 9fc5dbab5163b1e18776ac216691cc7eb8566a6f) --- sys/kern/kern_prot.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 648c067dc528..21f5e5d3bc16 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1273,36 +1273,43 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) } /* - * Check if gid is a member of the group set. + * Returns whether gid designates a supplementary group in cred. */ -int -groupmember(gid_t gid, struct ucred *cred) +static int +supplementary_group_member(gid_t gid, struct ucred *cred) { - int l; - int h; - int m; - - if (cred->cr_groups[0] == gid) - return(1); + int l, h, m; /* - * If gid was not our primary group, perform a binary search - * of the supplemental groups. This is possible because we - * sort the groups in crsetgroups(). + * Perform a binary search of the supplemental groups. This is possible + * because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; + while (l < h) { - m = l + ((h - l) / 2); + m = l + (h - l) / 2; if (cred->cr_groups[m] < gid) - l = m + 1; + l = m + 1; else - h = m; + h = m; } - if ((l < cred->cr_ngroups) && (cred->cr_groups[l] == gid)) + + return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); +} + +/* + * Check if gid is a member of the (effective) group set (i.e., effective and + * supplementary groups). + */ +int +groupmember(gid_t gid, struct ucred *cred) +{ + + if (cred->cr_groups[0] == gid) return (1); - return (0); + return (supplementary_group_member(gid, cred)); } /* From nobody Wed Oct 18 18:03:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyN2q93z4xKkG; Wed, 18 Oct 2023 18:03: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 4S9dyN2KlHz4Y1M; Wed, 18 Oct 2023 18:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y3RgR83c265FGGrmXnHEZADkYK59WfmeyAw35w5+TRU=; b=vA3S4eeqMl4nRxHmLXadSPv58tuDc2UuxAQAgrV7c03YKvGgiu8MF3y9s9L+I0d3/YUVM4 Tv+VLasR39CRDh6N/vA3BTErMHaoxMfcqXlqyk+cDFONWVvM0ZI3z/z7OW889qUTnliU4W NRRBmC2JaeSshKOa1CjbqIsZ5h3/wul0vhMu6scnjJeNphrbwl3Nm7zfq6EJP4qs+LW2Ip 8SOLMQty5kGSDRVGBip3bQ84NezJSxtYy8wXQ4yNRac+0yzDJvBXEVy2HuE0a5TCD4Jcho qypBraF+j+H1vgMkzpjUbZ5sxVdv7CjUwEj89UcX3keree7xZxys9k9kFlzWSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652236; a=rsa-sha256; cv=none; b=g/+pd3bFrvWmG1BALj6dRFfYRhPpXp43tYpSvRFogGlfWRFAavT180E1+7F4Epcj026BQc sKHfbSvykBLZkzM1YiYaLGvh3EvwzOTEskgKU9THps7MW28qdrIKzIkWRZqJwNJjn09LTT GukGWXFTswMu/M6cRuxEHIv23GQjitTeSKQoaMnhIoK36+ZCgmfPhvNzOlU9bcKqT08Mg/ /YTJEhFuxqJp8b804u3ZTf60CE7RYmbKEwiJds2CFd2e8m3T3hSoQgTBU3qC4CaSnQT+k+ stNSOA4iaobeYEjKTaedFMufYJcWEzDFoylUhEp4Oq2Ft4W3KA1YyDdV7/U/nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y3RgR83c265FGGrmXnHEZADkYK59WfmeyAw35w5+TRU=; b=u17aSqaxNndNT33UJiKICdEuCb7Wlwxx3m78ENiJMK5W2QsrhrbjS2WxixmwH+oNpezCnZ NEhv+8oq9WQO0C/nUXsBsMQk6w16vHN2oTYAPT30twixVOlxvSedM5OPQTYaafryZ6dmQX 8QW7b8qIde4PykOZnooZdUifpcrDKz1t6bMX3CkBYDsdpgBA6prj/Xin84CryxaycVWifF M0rjsZBxjxL6/1iIE5cCT3Aeum1jsH0df1LwVjtXtMzM72S3ygBF1YgwPUnW3jEM4yQFn5 g80H7QfAEretWH0YKjw2+KOoG15K0hhA4MPjbSxKD5VWx/On2Fwzs8fDKEo4hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyN1JSLz24p; Wed, 18 Oct 2023 18:03: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 39II3uiH044959; Wed, 18 Oct 2023 18:03:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II3uSv044956; Wed, 18 Oct 2023 18:03:56 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:56 GMT Message-Id: <202310181803.39II3uSv044956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 4750f117a060 - releng/14.0 - New realgroupmember() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4750f117a060c835c327aebf8e76ba6abeef16e5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4750f117a060c835c327aebf8e76ba6abeef16e5 commit 4750f117a060c835c327aebf8e76ba6abeef16e5 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:44 +0000 New realgroupmember() Like groupmember(), but taking into account the real group instead of the effective group. Leverages the new supplementary_group_member() function. Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40641 Differential Revision: https://reviews.freebsd.org/D40643 (cherry picked from commit 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559) (cherry picked from commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833) (cherry picked from commit cbe88592ab88c3940bedc3b2a651eb4556f4bbd8) --- share/man/man9/Makefile | 1 + share/man/man9/groupmember.9 | 7 +++++++ sys/kern/kern_prot.c | 13 +++++++++++++ sys/sys/ucred.h | 1 + 4 files changed, 22 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index c3c81719b7d2..2122f8d6ea8c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1157,6 +1157,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \ g_provider.9 g_error_provider.9 \ g_provider.9 g_new_providerf.9 MLINKS+=gone_in.9 gone_in_dev.9 +MLINKS+=groupmember.9 realgroupmember.9 MLINKS+=hash.9 hash32.9 \ hash.9 hash32_buf.9 \ hash.9 hash32_str.9 \ diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index 3a516622efce..ae7ccd477955 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -36,6 +36,8 @@ .In sys/ucred.h .Ft int .Fn groupmember "gid_t gid" "struct ucred *cred" +.Ft int +.Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember @@ -49,6 +51,11 @@ Considered groups in .Fa cred are the effective and supplementary groups. The real group is not taken into account. +.Pp +Function +.Fn realgroupmember +works the same except that it considers instead the real and supplementary +groups, and not the effective one. .Sh RETURN VALUES If the .Fa gid diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 21f5e5d3bc16..23bd2009582b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1312,6 +1312,19 @@ groupmember(gid_t gid, struct ucred *cred) return (supplementary_group_member(gid, cred)); } +/* + * Check if gid is a member of the real group set (i.e., real and supplementary + * groups). + */ +int +realgroupmember(gid_t gid, struct ucred *cred) +{ + if (gid == cred->cr_rgid) + return (1); + + return (supplementary_group_member(gid, cred)); +} + /* * Test the active securelevel against a given level. securelevel_gt() * implements (securelevel > level). securelevel_ge() implements diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index eb92776c158a..633bf436fcd4 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -159,6 +159,7 @@ void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred); +int realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Wed Oct 18 18:03:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyP5w4Gz4xL3T; Wed, 18 Oct 2023 18:03: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 4S9dyP3Pr0z4Y1n; Wed, 18 Oct 2023 18: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=1697652237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yv7kSF23FuxMUuHqsWea3AD1a634NxiqpxtSBL64gzg=; b=E6ixf48i7hwr4SxjV6y+UzLEu+Bga9hSsW7FM87V0hReDZlq+xu+iRNDsI7Gnd/6YW8Ujf CQ12DME5k2MJL7FlMDXo68YyISRZFU/4iImzIbqMhagLnqm2K5uWXj+7V1cjNM2xP8WSC+ YKf7iT5sxJ3OFdG65t2WAt6/+0lMhtLpjwYTuaUcx1wbbrAMgEl7sriWJBJOOUGdbIq3f9 jmrU1Ibw7nCFIzqVHhWgu87Zz+ttYjsD/Vmt6QW1M1YCfOHXP5r3Uzld1Sgu/mNSL/Bj/T fFP4EEk/zKxL+I5x5zxEhf7c+hyDa+4isgtXH49DJlJmaojnMteB1JcuRQNl4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652237; a=rsa-sha256; cv=none; b=ciCrGkU+L/f/eTPivendQtrlzPNHB5jdA2je+iVcKduqSX9kgq40IwPLUlVoruzhExkNPg we4rU7TtNQAtxR13SS6UAdcA2bV2K9TSW5JnBGgr29Kj6nIB1YyZ6N6u8OGOtsPLWibTB9 6yTi/Q1v0Od4/CyYQiJtbWVIgHA2bGRUpEBivhZlC+XPTbXKwRKytNgGtMvyZgm5WNSPfl AR1JtF2fApFSVtzwmJE0avEOdevO4z2yePIlk39WNJfHIOBVfFB0fC4sUOcyF8HdTCxfWC kD6ZVlced45prVNAoS/Ugq5I556d9hJGkQ3fcwkM392VG5KK/Mgwi6XRxv0Knw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yv7kSF23FuxMUuHqsWea3AD1a634NxiqpxtSBL64gzg=; b=YeCea29tTcwKnOcYqT7l3YpZlGJOHbZklz31haQBMkZgLruuVgDosDoAXGLcF7Wlll0sq7 Qh9ZNLkoAPpqgz78w1gosIL4630VUw51GzkDkcRT47BL5Y4kq3Svo2z8eI7CEFr0LTjb2N 6MJM9dxwRjRbc26sO3YbMELLHpD8ZVQu/0SNO9IXHvcHiJ/gsxyVk7vcCZrnfZeOvDSKII 4RLm6gmNTXRLoQRoiulZnCI14kQ/z3TBza9uL9zvGaf99ZA7tLCn4O2ZhMj0lEOID/8wA1 r7ysnoud2942m3L6v46co7qBRYjZpegxC8u0XD4CC8CcWOQNCxt6vtc+o92wgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyP2T1pz27J; Wed, 18 Oct 2023 18: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 39II3vRS045012; Wed, 18 Oct 2023 18: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 39II3vrm045009; Wed, 18 Oct 2023 18:03:57 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:57 GMT Message-Id: <202310181803.39II3vrm045009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 26ff4836c888 - releng/14.0 - cr_canseeothergids(): Use real instead of effective group membership List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 26ff4836c88812b9ee03c4cc127ba2b467173a0e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=26ff4836c88812b9ee03c4cc127ba2b467173a0e commit 26ff4836c88812b9ee03c4cc127ba2b467173a0e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:49 +0000 cr_canseeothergids(): Use real instead of effective group membership Using the effective group and not the real one when testing membership has the consequence that unprivileged processes cannot see setuid commands they launch until these have relinquished their privileges. This is also in contradiction with how the similar cr_canseeotheruids() works, i.e., by taking into account real user IDs. Fix this by substituting groupmember() with realgroupmember(). While here, simplify the code. Approved by: re (gjb) PR: 272093 Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 Differential Revision: https://reviews.freebsd.org/D40644 (cherry picked from commit 91658080f1a598ddda03943a783c9a941199f7d2) (cherry picked from commit 0452dd841336cea7cd979b13ef12b6ea5e992eff) (cherry picked from commit 4e7cea61051abc476c64e4a996397235f5a881bc) --- share/man/man9/cr_bsd_visible.9 | 2 +- share/man/man9/cr_canseeothergids.9 | 8 ++++---- sys/kern/kern_prot.c | 23 ++++++++++------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 index bd676e6f5705..f2d42f3835dc 100644 --- a/share/man/man9/cr_bsd_visible.9 +++ b/share/man/man9/cr_bsd_visible.9 @@ -97,7 +97,7 @@ and are not members of any common group .Po as determined by -.Xr groupmember 9 +.Xr realgroupmember 9 .Pc . .It Bq Er ESRCH Credentials diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index f0c1e5c4e726..109d41a8545d 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -48,9 +48,9 @@ This function checks if a subject associated to credentials is denied seeing a subject or object associated to credentials .Fa u2 by a policy that requires both credentials to have at least one group in common. -For this determination, the effective and supplementary group IDs are used, but -not the real group IDs, as per -.Xr groupmember 9 . +For this determination, the real and supplementary group IDs are used, but +not the effective group IDs, as per +.Xr realgroupmember 9 . .Pp This policy is active if and only if the .Xr sysctl 8 @@ -79,5 +79,5 @@ Otherwise, it returns .Er ESRCH . .Sh SEE ALSO .Xr cr_bsd_visible 9 , -.Xr groupmember 9 , +.Xr realgroupmember 9 , .Xr priv_check_cred 9 diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 23bd2009582b..43fc3100bfa7 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1404,21 +1404,18 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { - int i, match; - if (!see_other_gids) { - match = 0; - for (i = 0; i < u1->cr_ngroups; i++) { - if (groupmember(u1->cr_groups[i], u2)) - match = 1; - if (match) - break; - } - if (!match) { - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) - return (ESRCH); - } + if (realgroupmember(u1->cr_rgid, u2)) + return (0); + + for (int i = 1; i < u1->cr_ngroups; i++) + if (realgroupmember(u1->cr_groups[i], u2)) + return (0); + + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) + return (ESRCH); } + return (0); } From nobody Wed Oct 18 18:03:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyQ57n5z4xL3X; Wed, 18 Oct 2023 18: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 4S9dyQ4ZNYz4Xr4; Wed, 18 Oct 2023 18:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xCSh6wqlJHqgmMU81Lkn8l57ruQhzY3DdRqm4b+17SA=; b=q8mb+sYn8OH1w/XWx0gddSLyU+HATR+PKmkMEx4tONsgbznbp5W8hbzxVbbOARz27+wC/p W9rynX4GKQ805UZZBaW8Mlewibv/PVVxBij5fX+L4rfUanAUxHhIgZXf7V46Sn4RdvFjsY PxALZ3V2WZQaeCZcqvm79z/Xakel16WpKaynPJRC6JnVmWJhvzqH+Fu6ZPf0Rxly2ZehlT 7Qt7EZeXqZzfeHGrIF8YeuMXZvgx5vKjtpxKAQUcENj08GyD2ObPQQW4EeLfx1a4iOR+ly 64zjozfmDfYVYT3t+G+TZxsMhiOMX6Sh8MJgYXkQZ2Q9opb21/WkHSIfUmfvIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652238; a=rsa-sha256; cv=none; b=Nu5UidYSywY25cF5IvAw3pb+EYUXtv3uN6ndHjlJ1dvE5bgfblnoHGty9k1hn/9yaEKyb4 pvKargu+iEzP74VziGwpfROZDlroD2REV6B8VNqaBlVExSMUEu6at8Debc56xGDRIRgwHs 5eLKBP+K7mJjx75Ruovu7nkZMs4cBHO5dMZukc/uXTIesxFgwtQpN+vV0Wr/AVvcNyC9S5 OE7nv46wQ8leZ9xIp0TtIZOTVcOoKctrCnApeOjuLErGoIBpDsUGKqTKbp3UVc8lxUmGMS lNZUZmlHJQFpwwhDb3cbfViXZodsENaSWwI2kONLuZo5Y/i8Vu8ZQ6t1FZyH5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xCSh6wqlJHqgmMU81Lkn8l57ruQhzY3DdRqm4b+17SA=; b=iiiFDv6ExaEdcup6jkT0gv7eSAQ7//DJLF4ji+O/G34/ra9ikMGi4O/l24b+SlJpExkn4S EYeBzGGM7dIkIwy+dY4BV6/hOjCQ5Ne/vQdLAyGP7v/fWVixYBD1EsJDZ38N8D7a8vWOJV LfbnioxBqKedSeUyo80XivXWZ1Dhl27FIjbem1FKC5QckFiiY+bCvi6QM45hB4onQW0xbt QwrkgijtqhOPDeYBwhWUdiB73qOJaykcTt0Ok7CtTsvdzya1VX2s6xK4u00MGKbkVeCTgS TZroVbWl4uqLdnsgHgGQzeZD9qK+ZIf9Aaop1C1p59GPVlY4zyKGGlHDHYj+Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyQ3gdcz1qX; Wed, 18 Oct 2023 18: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 39II3wNF045066; Wed, 18 Oct 2023 18: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 39II3wjE045063; Wed, 18 Oct 2023 18:03:58 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:58 GMT Message-Id: <202310181803.39II3wjE045063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 007d864f061d - releng/14.0 - groupmember(), realgroupmember(): Return a bool instead of an int List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 007d864f061deef350f337ad835050526c68d4a7 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=007d864f061deef350f337ad835050526c68d4a7 commit 007d864f061deef350f337ad835050526c68d4a7 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:01:57 +0000 groupmember(), realgroupmember(): Return a bool instead of an int Approved by: re (gjb) Requested by: mhorne Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40958 Differential Revision: https://reviews.freebsd.org/D40959 (cherry picked from commit ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6) (cherry picked from commit 845b7c80887ac84c82ee776836ef86d68ea71c94) (cherry picked from commit 8cfce55f8f949869378c06279e4409beeddbea4e) --- share/man/man9/groupmember.9 | 18 +++++++++++++----- sys/kern/kern_prot.c | 12 ++++++------ sys/sys/ucred.h | 4 ++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..b7865a35fdc9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -34,9 +34,9 @@ .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h -.Ft int +.Ft bool .Fn groupmember "gid_t gid" "struct ucred *cred" -.Ft int +.Ft bool .Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The @@ -57,9 +57,17 @@ Function works the same except that it considers instead the real and supplementary groups, and not the effective one. .Sh RETURN VALUES -If the -.Fa gid -is found, 1 is returned, otherwise 0. +The +.Fn groupmember +and +.Fn realgroupmember +functions return +.Dv true +if the given credentials indicate membership of the group +.Fa gid , +or +.Dv false +otherwise. .Sh SEE ALSO .Xr getgroups 2 .Xr setgroups 2 diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 43fc3100bfa7..14b19837d5dc 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1275,7 +1275,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static int +static bool supplementary_group_member(gid_t gid, struct ucred *cred) { int l, h, m; @@ -1302,12 +1302,12 @@ supplementary_group_member(gid_t gid, struct ucred *cred) * Check if gid is a member of the (effective) group set (i.e., effective and * supplementary groups). */ -int +bool groupmember(gid_t gid, struct ucred *cred) { - if (cred->cr_groups[0] == gid) - return (1); + if (gid == cred->cr_groups[0]) + return (true); return (supplementary_group_member(gid, cred)); } @@ -1316,11 +1316,11 @@ groupmember(gid_t gid, struct ucred *cred) * Check if gid is a member of the real group set (i.e., real and supplementary * groups). */ -int +bool realgroupmember(gid_t gid, struct ucred *cred) { if (gid == cred->cr_rgid) - return (1); + return (true); return (supplementary_group_member(gid, cred)); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 633bf436fcd4..7c9e46e47774 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +bool groupmember(gid_t gid, struct ucred *cred); +bool realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Wed Oct 18 18:03:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyR6bNGz4xL3l; Wed, 18 Oct 2023 18: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 4S9dyR5mjtz4Y4X; Wed, 18 Oct 2023 18: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=1697652239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cvoHkJnVr+KDmWqMfgsCYtft80MZj1I6RsPij63FPFI=; b=qliiviOCpbSRCPINJG75FMdL82CJfCNNoWdAAUXQlPARW6Sb3CZaRek3eUT1qEuCO4QKRz 1yQ4zR4MXZn6C1S4Q6U1cJ0U2R2LyRFONAJfoagVTThdoR1/2c5+s3k4aaoLoQ/x1m8qsh cdFvbEguDI+wq3XgPjVyL7v4oMffZ3+h1TpiJV+GxC4S7fs4mgXNKgOaMwGqS1YlfMDlGE HzMDQltNVimqiRN58ygsXR70QhKe+uM2P+fTkF9vIRE0i74+wJ0IlzOxBa1mGv2bXJGaY8 NncGhspAVkACOB5V2R+cvoERmsdVj+BTCWcd7gP3DhVAcjxoC0qpU1wZq8/wUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652239; a=rsa-sha256; cv=none; b=BuQAOMtyvY4JzC79MNhr3DTW/dnPmBrFwTT7I4R5i+4sSD4rUps4UDcdMm5h2SEsG0qbMv cGx7e6WTqsI2OtQzW4+TQeCjMKZ43L8kyn5A0oUVzXv8duZ7CPKPjcUza2uZZrMWBbkOhu zh5NNd1hY4wkIT72ty0NQasSXRtifZvRPkK12KHZERjEA672xJb6E1NDbIta0MNroH/Jin V5M+M/OC9CW/rbKw1/JCyJsHxzDUQpREMWd8U/22dEXClRwlelwWNvDlZLjWgDlkzEsRD3 0nK8XKm0R2re8aWV+nV6INm8/pCJHRPb90mtASXLvEGtVWqfH2DwTFmW6zhohw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cvoHkJnVr+KDmWqMfgsCYtft80MZj1I6RsPij63FPFI=; b=LDhN6H7LwJBM+rK6mJvD0QouDv3NEZYXv5KWqPDecnok/blAMBa0MKyVCr/NGKklM9EZmQ qiGQTHmqhwwi+FSQt4Z8+y5lS8Elukc73SIUhy4H0sUO8FIWWJMkgc6LHZxa/x56IIcwjr yofdRmKgsvneIposhueP616WHmcAf3smsKtrmgTzUEJSz57YIk1u8++OmTlJ0Lfz3PI2Ly g1O5CEndERGr+fCDz1ge/ciSAy2GbQtNZMPk2upr/6VepSuLwTxfiQ23rSdI2u6bhLawfz Q1C38f3piXJmEJ6t7PF6BRlgy9TuMFzVs1z9j+dfvB3l1RCzBK3+aebD7PUJ6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyR4r83z27K; Wed, 18 Oct 2023 18:03: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 39II3xYD045112; Wed, 18 Oct 2023 18: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 39II3xGd045108; Wed, 18 Oct 2023 18:03:59 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:03:59 GMT Message-Id: <202310181803.39II3xGd045108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 22e1db5995e6 - releng/14.0 - security(7): security.bsd.see*: Be more accurate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 22e1db5995e605f8b99eba6779ae153e49557b5d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=22e1db5995e605f8b99eba6779ae153e49557b5d commit 22e1db5995e605f8b99eba6779ae153e49557b5d Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:02:07 +0000 security(7): security.bsd.see*: Be more accurate Approved by: re (gjb) Reviewed by: mhorne, pauamma_gundo.com Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41108 (cherry picked from commit 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66) (cherry picked from commit 74f2fb1778e815bfd982ca8a09f5b31dd93ccd0f) --- share/man/man7/security.7 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index ebe5e66e22af..a48e3607f0e5 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -959,16 +959,18 @@ Backwards compatibility shims for the interim sysctls under will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.see_other_uids -Controls visibility of processes owned by different uid. +Controls visibility and reachability of subjects (e.g., processes) and objects +(e.g., sockets) owned by a different uid. The knob directly affects the .Dv kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . .It Dv security.bsd.see_other_gids -Same, for processes owned by different gid. +Same, for subjects and objects owned by a different gid. .It Dv security.bsd.see_jail_proc -Same, for processes belonging to a jail. +Same, for subjects and objects belonging to a different jail, including +sub-jails. .It Dv security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like From nobody Wed Oct 18 18:04:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyT0q2Gz4xLC7; Wed, 18 Oct 2023 18: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 4S9dyT0JZYz4Y0G; Wed, 18 Oct 2023 18: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=1697652241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2rQCzdHqXwcKr90nmBV8ELgB711fRZD7ck4laxJLyw=; b=YiKhyulHJAHotLXU9ChMzqlg69xulYjbcdVk4Ap6xTfI8kkDZV4BvZC1R9RwxFmISYtq9o UmWceTiaTxMm61k1n5eVW4uvO/XmShoTd8KxxljMDbuUTSmveKXuXeqir1SjfpWLiOBDIn 0WxDg+C2Hl/uUUGadxULsHD9HOv1zTmD7gsocRyiNRqoK/qBKb8RpuPH4wmsn3oQds7sAK 73gj/HSjDrWb7jXcJIIjdbqGocD+ZD/hOq+e/LsvJPwBnRp5k4OeMAOKm96HG8YkoeAvCh WFMak2S9zw5L7+5q24fo5fzv0oGDVRl/5So/z6kilk5jztdOwEEwhTmGFg9q+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652241; a=rsa-sha256; cv=none; b=m+4XMGkf3CNqndjWEWvXbIv9BmIvZ/yq8sHqVwkLCeIhCaWfJPq5mQEMqwy6VDQD+0Mzta RgvABjfWH+H+XYhuoppPxp5XKCD+VpM4IQBXYQpRUl/mj5aeNavNFoFu5xVmurvGk5pz74 kcLkUIIiqnlkPb8ErJLTxxeE4FI6cRS3ibUE4atccsE/y/FLYEzemKPXKB4UNMqJ8+HawW gaUoybLnNqcnJ7XfJJNEc4YvCxAVmTc3unaNaHKKKUDlFSv7PEL2PtzBsBihEUyUkMTZv2 VVFr1hdZXA13zWOy+itgWh/vJFQoEikOCnIpR+RknxPwpiW7oEaW7sNN0oGK1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2rQCzdHqXwcKr90nmBV8ELgB711fRZD7ck4laxJLyw=; b=Z3Prd3hW9B5WxbbIEPd39VAw+UmocflQyIuYA/e3lGTvOtz9+Dex3bmkSo8B66en0BNvtp r++8XY6ThE+8exTSUypz4xUfJpXxpgZ+SLj76U7wGAXoTp9cAsuJPyRXDJ8hKKbsgnkPae Zsy6w9UFnVGLmuYTnmq++Tv/oyUV+ypbgQk0B6f2TNYNqADPQL9VOFkdtuMH5t9ZR7TAXV BFB75AQcs9tHOhl9Hzvyp5EkYB+Cme9xX3szM2z56+8n5t9gpPYW4pCWVkrvZy5Z4hwrt2 DrQk9+IqRUxoYxvlCnt5/WbI4Hh7+nGcO8Y4mSoUDt2NcCa4tp7rGf36ycL8/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 4S9dyS63Xxz1tT; Wed, 18 Oct 2023 18: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 39II40GO045166; Wed, 18 Oct 2023 18:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39II40nQ045163; Wed, 18 Oct 2023 18:04:00 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:04:00 GMT Message-Id: <202310181804.39II40nQ045163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 664a0fc4aa9e - releng/14.0 - ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 664a0fc4aa9e8ee861fbb6de167bdf480b308bde Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=664a0fc4aa9e8ee861fbb6de167bdf480b308bde commit 664a0fc4aa9e8ee861fbb6de167bdf480b308bde Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:02:12 +0000 ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc Approved by: re (gjb) Reviewed by: mhorne, emaste, pauamma_gundo.com Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41109 (cherry picked from commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87) (cherry picked from commit 7c069dbe8e561436b4b2a0d6cf2c2483bd4e0fa3) --- lib/libc/sys/ptrace.2 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index d7d244b1d84a..ae1770315aa5 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd December 15, 2022 +.Dd August 18, 2023 .Dt PTRACE 2 .Os .Sh NAME @@ -149,31 +149,37 @@ its scope. The following controls are provided for this: .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.allow_ptrace -Setting this sysctl to zero value makes +Setting this sysctl to zero makes .Nm return .Er ENOSYS always as if the syscall is not implemented by the kernel. .It Dv security.bsd.unprivileged_proc_debug -Setting this sysctl to zero disallows use of +Setting this sysctl to zero disallows the use of .Fn ptrace by unprivileged processes. .It Dv security.bsd.see_other_uids -Setting this sysctl to zero value disallows +Setting this sysctl to zero prevents .Fn ptrace -requests from targeting processes with the real user identifier different -from the real user identifier of the caller. -The requests return -.Er ESRCH -if policy is not met. +requests from targeting processes with a real user identifier different +from the caller's. +These requests will fail with error +.Er ESRCH . .It Dv security.bsd.see_other_gids -Setting this sysctl to zero value disallows +Setting this sysctl to zero disallows .Fn ptrace -requests from process belonging to a group that is not also one of -the group of the target process. -The requests return -.Er ESRCH -if policy is not met. +requests from processes that have no groups in common with the target process, +considering their sets of real and supplementary groups. +These requests will fail with error +.Er ESRCH . +.It Dv security.bsd.see_jail_proc +Setting this sysctl to zero disallows +.Fn ptrace +requests from processes belonging to a different jail than that of the target +process, even if the requesting process' jail is an ancestor of the target +process'. +These requests will fail with error +.Er ESRCH . .It Dv securelevel and init The .Xr init 1 From nobody Wed Oct 18 18:04:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyV2ZmNz4xL8R; Wed, 18 Oct 2023 18: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 4S9dyV15Mkz4Y0p; Wed, 18 Oct 2023 18: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=1697652242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fENJ+K4zbYypa1pXaSBS9gUTSahQwHsedxA1St9uzAA=; b=jEb3LNL/zBTjhUK800Upgvn2+h+7Er20fkd1Mq2D8GLI3WuNhiDshGZovdMD20IQYPqDSD NBjiXjrBMqFHVW+i9aONL452z3NWmE6w0/ZAVzg/gOctEEykl6zKiUnvgeJaS1ymie7TR1 ueBFIXc2feXfReRkazP2Z9TrvaMQ/sz+xVexf8W/nXPzh6s5MP6SC0MohmKpBMnl3iyE2V Zd8kAtc1hAHqkg+Rx3pWBdyxnZHnpdUWa5Iv5nRc94Z/skL6eRLBuI4GC6tYL2LwGwKVVl P9aecAC4XkvLqv70w6CATn1MpeStwKbTOhQrfvt7YjVH7DOtzCrtgy7zNEHrsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652242; a=rsa-sha256; cv=none; b=Xz6qcnaDD/4aE0UzWXJph0zdQ+N+vwJ6Po3I9mf0ZdK21NzmzRIPX2Y1gNCtSVylSPcTKz hF3v9GYW24RwFKICnWDs/QcuZfVmI9KR3wCULs2IRSdA1NXoY5GXVQ/9C3lhXoElhFtoGc UhP+lkMmJiEJJdx8I7C4/SicQwq5oEsrps+PW0LxFCQXq9K7YlmhHe4oxSajfOYM7PWGkj E20fPqYdnT52UX9rQZ3sCzH323ZWije+axhPA/i+cexv4TmJWzBrkq9SQP2R8oLsd13Vnl f3/NKpm9A0AODOKwvLFwrOwEm+8l/WEvjr/N0CRNRCKc2vZhA/gGf6eKGQkw6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fENJ+K4zbYypa1pXaSBS9gUTSahQwHsedxA1St9uzAA=; b=Dg5Vg405j0PUEiqz1NCd7wcdl9flDObi+ZlLi7HebPbgNS5MbcGg58NBK5lB4gsc1BAls3 CrT3Tr3pDpC1ARST3HaWOB4ltKuQOL94ewleTJnb0Ufi+u0v16D/GK5r7znhgmSgvX8H/H QzmhYznl++0uF+QUC4jDZb+81ytM6ozXZXJmZQcPxO5q23RgZYyrfUH2hdLpJstUmU2jVk +CEdeO3jmPvId/3kf9KUfO92PtiEzVC+WEq/+oxJDV1H3SGz1vIXEbtj68p6JhSq1szgYH ScizbG/Ktx5lmtIYHjyNTn3eLSCewdj2X2rfaZlQv9AXWgklpnBPO4dhzdkZoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyV08r4z2RH; Wed, 18 Oct 2023 18: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 39II41nv045217; Wed, 18 Oct 2023 18: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 39II41Nx045214; Wed, 18 Oct 2023 18:04:01 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:04:01 GMT Message-Id: <202310181804.39II41Nx045214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b0a30eed2426 - releng/14.0 - sysctl(8): Mention more security.bsd knobs; Refer to security(7) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: b0a30eed2426188697a6096f2c78686d90aa6225 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b0a30eed2426188697a6096f2c78686d90aa6225 commit b0a30eed2426188697a6096f2c78686d90aa6225 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:49 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:02:20 +0000 sysctl(8): Mention more security.bsd knobs; Refer to security(7) Approved by: re (gjb) Reviewed by: mhorne, pauamma_gundo.com, emaste Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41113 (cherry picked from commit 8d7a48d367ffde2a29419ef943c4099984e3af4d) (cherry picked from commit 0e480eda041122ec8571d14ed1ebe8787a384972) --- sbin/sysctl/sysctl.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 3e995e40131b..ed768510eb6c 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 24, 2022 +.Dd August 18, 2023 .Dt SYSCTL 8 .Os .Sh NAME @@ -194,7 +194,9 @@ for more information on which tunables are available and how to set them. .Pp The string and integer information is summarized below. For a detailed description of these variables see -.Xr sysctl 3 . +.Xr sysctl 3 +and +.Xr security 7 . .Pp The changeable column indicates whether a process with appropriate privilege can change the value. @@ -231,6 +233,8 @@ String and integer values can be set using .It "kern.logsigexit integer yes" .It "security.bsd.suser_enabled integer yes" .It "security.bsd.see_other_uids integer yes" +.It "security.bsd.see_other_gids integer yes" +.It "security.bsd.see_jail_proc integer yes" .It "security.bsd.unprivileged_proc_debug integer yes" .It "security.bsd.unprivileged_read_msgbuf integer yes" .It "vm.loadavg struct no" @@ -320,6 +324,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , +.Xr security 7, .Xr loader 8 .Sh HISTORY A From nobody Wed Oct 18 18:04:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9dyW4CBqz4xL8S; Wed, 18 Oct 2023 18: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 4S9dyW23Drz4Y5h; Wed, 18 Oct 2023 18: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=1697652243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOUuaJqnOtI36tgmtwO8UDoZt9ar123t1mkyoQePzOk=; b=UJqiaLiTHDOezPTYpuljmDuyOsufH9F9O6P7GtNaSHo2z2ovSVEfZ3Zq71/61/IlQwT3O7 jA+oUC53aoELQ+vs3bjlXCr5CR22U/Zxi8QFNZD86nr+NRVzG1lJbU4akfvlN4YfTsJO8r Jr5jevqai+u5iLKxaFSVjG3y5LlCHLvPSdLxGgNCQzCB3FufRGickkW5dr7XKGLVoflM0t swLhYBeINdjttuNO6vayO+gvOxXJenODHmN21alHcYdWR1F5oUJ+HxQ2Iq6Z4dyS7XTz4K MCRSc5f5u4Ds+BIAQE0iO8qEwkPqCbHXIineWpHedvtMtois99aSqXZGHGX9Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697652243; a=rsa-sha256; cv=none; b=dhnwIYXoGVXc/DLym+VaXn4iQ5cDbyIIV/0fM30CTAirVLougx2N6zHMdTVHpYdGEeIMbq Bh54rYe0MBsf3lgPeZxkAvnsaDkdy87qZB3x/1IZKHSvi7GGgjyjn+bYv44O2XM7gJ6mi3 oSuwH+jrxNPQ0E0d0J8vIIxgLYmuvsHMEWZFYbObIFbzLx7rCKFumwmRkXb6bBqKq+NTTl a6ZQ6wr3J4LxJe1eBCiB42ohKGNluAtYSpKUxzxnKV90J51OScuV74TzydF5gSsVgjW2FI Q5KDAfuTZO6gcYZRLorIidHm230+4FX4YVsDS9UYwvHE74+4H5jzQugDfnR5mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697652243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOUuaJqnOtI36tgmtwO8UDoZt9ar123t1mkyoQePzOk=; b=w/yvcMii19AvJCZ1Dh7/TMrK9k6p9dticuWZEMFs03CJNvXGHRs7pqYSF5vj9g8wRaYlhb BtNSc0+IuwrsLe+Skqa53yOUXlBElMDwsMEJJGrYK64cMy9U6XKQyqqA1msp4CZrb3uSaw qgqqlfPzHyTmJuWro6Fbt2n1vNpRlnSesjtUOSmTgvglsLEs7Dyol2674OCFZqY1KXoTfi iP+pHvN7nPm5n48L66tD0F4wS9WeCmjlVNXHt5shNwV7GQ1H4xwEy/j3RW4QjB4uBaogIi DhJeHn4JLTWFmwjHOzvopJWazBv8MU0XsiLybhlK5HrUsVrZmUy/qA4emhWsJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9dyW19B6z2Rx; Wed, 18 Oct 2023 18: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 39II430d045260; Wed, 18 Oct 2023 18: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 39II43VY045257; Wed, 18 Oct 2023 18:04:03 GMT (envelope-from git) Date: Wed, 18 Oct 2023 18:04:03 GMT Message-Id: <202310181804.39II43VY045257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 3b14e215dd68 - releng/14.0 - Make cr_bsd_visible()'s sub-functions internal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 3b14e215dd6805544afeb336352e8724b0ceff51 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3b14e215dd6805544afeb336352e8724b0ceff51 commit 3b14e215dd6805544afeb336352e8724b0ceff51 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-10-18 18:02:25 +0000 Make cr_bsd_visible()'s sub-functions internal cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() should not be used directly now. cr_bsd_visible() has to be called instead. Approved by: re (gjb) Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40629 (cherry picked from commit 91e9d669b475d1900e8dc01a49ad90a621c4a068) (cherry picked from commit 07c60e63237e1d4657cfbd6b03116c4913827e8c) --- sys/kern/kern_prot.c | 10 +++++++--- sys/sys/proc.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 14b19837d5dc..00eb2fccdeef 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -91,6 +91,10 @@ static void crfree_final(struct ucred *cr); static void crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups); +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; @@ -1371,7 +1375,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_uids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { @@ -1401,7 +1405,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { if (!see_other_gids) { @@ -1440,7 +1444,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { if (see_jail_proc || /* Policy deactivated. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 8609bbd124ad..0b91b2a1a0b5 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1166,9 +1166,6 @@ struct thread *choosethread(void); int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeothergids(struct ucred *u1, struct ucred *u2); -int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); -int cr_canseejailproc(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); From nobody Wed Oct 18 19:01:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9gDX0gjDz4xP74; Wed, 18 Oct 2023 19:01: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 4S9gDX0Bk9z4mJ2; Wed, 18 Oct 2023 19:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697655676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ySasaTL5Gx5ZebjeaAYH87Y0EgEgQHsrAVsORRHiVk=; b=TsLRGwBVQjgkuXcnk7ERdEZmEA7Ieet0gPLPTkggXkYqjXJ2jPxQx5+Ub6C8+WBTx7ZWGw lFCCXOQ2Xsji5AZSRSMnKOtyTCgAbutEIJxwfNU/X6cqOXoMD0HQuflh9JwDGqVrii9Rom s87nzceEtSaGhPD2GdqdfNE6jKJD4kVpGn+w8PG7aKVmv4BqPVKGxIEM4MguQCtxqmGPaZ sahmiwXfJPmxKleoSxjqRSPITWR/WNZBkfviUozpmf7BcKCFP50u6XmgSkScfxGdrLNgZ9 IDcPbf+mOLEPo4xj9CNNWVrEWUPtwEvf4TTQB+eeqa4mxfTuNkdi46U1XlA0cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697655676; a=rsa-sha256; cv=none; b=FI6aIenP2fuZ9OF9EW4U/OE2KNNhI0+/82SAET1CUbHMSSqicXzr1Ew5v/ubOCs9pG7D16 w4DLi0qSorlk4akn98ZmpSNRfWO/DZ6yN8eCjCOhF1i7+TQ4fwnT7gwKQcPd1zpONlAy42 30dSPHY9g3Hnv8RWvUHGgo91yjMt6hOZtEQgtsJVa7K6E6kug4YxPJRT9LNSyPov/NXcJv BrOfVqmJYD8fbNUteNQ0usMPVqyKDOAmt3jrcgICDBpihyD3sKB+zew7n6noLTFUj80ibP IlEWVaYsjk5aciWWxQOnpqZBAsJG5uyTWPEfH/VDoaVfY8MmySLHrWSPNRq19w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697655676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ySasaTL5Gx5ZebjeaAYH87Y0EgEgQHsrAVsORRHiVk=; b=O3CvUUjf+iYmY4momA2BbAqP1A5n4UDbWF6kuoEgigkuHmfh5Xfqh1xZ5yv3cRgcprRBBX 8LVdM3v+RgpcAXlJhWNoIu68EVOPd79Yovu1eh9qcHJn7bXdnWnSCB9BUOwpNVBqTH+US2 B6ntBjG57FTXaII9HfgG2qd7cKdzFk/hBI7QeVnNU2ybAf/EpuSbHkiZl70sGaQUP1jO0J O/SvFTlmaY+ihYgoTxpIGQmOIZ4dFBMoZqGKofELM1I8sY01EuAkAl9dg0O8tWqyimlkfz LIwEhmACT6MrCQGm2Gg9pUUncLrE4BppiYqUoB3lLyBjunaAqtx2r7tLkTd9UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9gDW6Ml1z3vn; Wed, 18 Oct 2023 19:01: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 39IJ1FZm041532; Wed, 18 Oct 2023 19:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IJ1FTv041529; Wed, 18 Oct 2023 19:01:15 GMT (envelope-from git) Date: Wed, 18 Oct 2023 19:01:15 GMT Message-Id: <202310181901.39IJ1FTv041529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 1abb9270dd81 - releng/14.0 - Revert "release: force PKGCONFBRANCH to use 'latest' to fix BETA1 builds" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1abb9270dd81a77490bab9a885c59fbf8701b8ab Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=1abb9270dd81a77490bab9a885c59fbf8701b8ab commit 1abb9270dd81a77490bab9a885c59fbf8701b8ab Author: Glen Barber AuthorDate: 2023-10-18 18:53:15 +0000 Commit: Glen Barber CommitDate: 2023-10-18 19:00:54 +0000 Revert "release: force PKGCONFBRANCH to use 'latest' to fix BETA1 builds" This reverts commit 4e027ca1514fc5c8d4720bec5a1ac6c71888aa38. Approved by: re (kib) --- usr.sbin/pkg/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile index 07a6012d9721..3e0e047382ca 100644 --- a/usr.sbin/pkg/Makefile +++ b/usr.sbin/pkg/Makefile @@ -16,7 +16,6 @@ PKGCONFBRANCH?= latest . endif . endif .endif -PKGCONFBRANCH= latest PKGCONF?= FreeBSD.conf.${PKGCONFBRANCH} CONFS= ${PKGCONF} CONFSNAME_${PKGCONF}= ${PKGCONF:C/\.conf.+$/.conf/} From nobody Wed Oct 18 19:17:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9gbj4XfVz4xQ1s; Wed, 18 Oct 2023 19:17: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 4S9gbj3kG8z4p6H; Wed, 18 Oct 2023 19: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=1697656673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXBX/5EEmvkYanv3LndfMT0HWaduR3TGXn0h7deeiT0=; b=h8WqXwJFRmvbVURamTU7j4jWBwMa2ufvEnnGOptRM54XDbjFe7xf/157j2viOJpP2YSzsM jHSRnYJR0TvwyWRj6m9bY6Fua2JfFJRj9JQ7/ccjUC2zK2tWyRswBBbq3wuXLRcyoZPr/v YsK8HxTalbHNRxtpSltHyoTNQ/3LN6Om7YHgA0oNBdSWUt1hAmbzkSS9qGU6WRI8tiJwML LH1lXc34S2x75pp1OnD0GRfWpE0Ng+1HE5YKFJaDGHw8sszEvuTmdsAOuM48ZFiZWhDldN 5KspS6AxIzgQlEJBJyxqU1SkbC5k32YOivCyVNyWSmL8mJeJHyAYJ0Zqxrr8KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697656673; a=rsa-sha256; cv=none; b=NDQAJafB3LX7m6lnigoI0DPOQj1yab/ixq5NIy+wV8FqsHtGuyfEatbCHky+v4f9bTfbkp 2qNuBLP3xy9Y/jcT8EN0OIWxmz1gz58GtwXa+K34Iq5R0Ffl/Erfd8zjo9zSM8mBtjDhO6 bbQKhk5Gl8YXa9dlzvBBsp0OVucAWx7xbwKjfLPcvB06leb2V0Ff9ycgkEOyt0wMFJaY6U O667KIjzfod02KAKZCJZ1Qsm34IKRIJ5bvrTpF2nAewa/69fX6lpD8gbNJvlRmaz2i/xzU wgSnA5iEAxk//q/VWwc0Y1R7A/Y+an9DLzs+sTfeUppzVgbPi0uPwhbxJVXIUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXBX/5EEmvkYanv3LndfMT0HWaduR3TGXn0h7deeiT0=; b=bUPQSbU+oXzi3NKLM56VTLIPWMreDEUY8yU1ffVz6cU+neQS7HLRv8XiyVUSZl6BMXSyHA kfkQr/Ayn39Bw5UDB4pWWzW0Sbst29hlbpE7d84smnIPNW25C4qi7OutO8nevhTMWSXFg4 Mgje/qYOv1P7IznZyvM28trTq91x+1FmwXB9AW01zuGVLOhR1ZmUmdo0wvFAauLEpv9Ony GJhQ1XdXfF8cBmjRMVYq+Bp1msm8IrsZiYVnVImLSNXrY3dUlFAjscfCO3YW84Ox2ppF+t HeXwJ4ca9MIlU7Unl92Gax/mfGgYIuSq0yf/85JgBBQv6kUC0l81nQLcF43BiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9gbj2q1Nz4B5; Wed, 18 Oct 2023 19: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 39IJHr7q062846; Wed, 18 Oct 2023 19: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 39IJHrxi062843; Wed, 18 Oct 2023 19:17:53 GMT (envelope-from git) Date: Wed, 18 Oct 2023 19:17:53 GMT Message-Id: <202310181917.39IJHrxi062843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 754340732b9a - releng/14.0 - releng-azure: Use port name to install Azure CLI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 754340732b9af3779be8fd54d3ffdf54b7def20b Auto-Submitted: auto-generated The branch releng/14.0 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=754340732b9af3779be8fd54d3ffdf54b7def20b commit 754340732b9af3779be8fd54d3ffdf54b7def20b Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:39:11 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-18 19:17:25 +0000 releng-azure: Use port name to install Azure CLI To overcome package name changing on default Python version updates. Approved by: gjb (re), delphij (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41453 (cherry picked from commit 0fe6998d8ad0bf54c237c8f513bf00cab547b561) (cherry picked from commit 80496f42b6a9c13664f6228602fd21bf7a4500a5) --- release/Makefile.azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index ba996bc15ac6..528371ad076e 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -38,7 +38,7 @@ azure-check-depends: . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf . endif - env ASSUME_ALWAYS_YES=yes pkg install -y py38-azure-cli + env ASSUME_ALWAYS_YES=yes pkg install -y sysutils/py-azure-cli . else env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/sysutils/py-azure-cli BATCH=1 all install clean . endif From nobody Wed Oct 18 19:17:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9gbk68djz4xQ82; Wed, 18 Oct 2023 19: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 4S9gbk5Yx0z4nvy; Wed, 18 Oct 2023 19:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9gBP4qoeMFHNimjwyeB29eV6aqV3bzfugUQuMKfpYc=; b=W/16vAnW/smBgnZl7ODLzS1s8GoV/a+nrjpMle5DOh7oJtYsY/gEo7Bc0PVAOHFTe8i02g 85p9yYfqiCNPo10xysz2treOQdPgyon4tpy8HQLkICEywtGb2kj3gsJlbRYmWBSN1Efzkg sm6KBfid6umolBGb6QM4JDkj0lOJs6ssHiTD2WWkNB/bj4p59x2M7KPf19Uu/rT0nXO17p 6P5dhtURK+dtByZhdj8drekrg9Tab2N1fSAY8ni672e8ARYtcDFZAsWEBwptaz3pGd0n+v vMHs5pcVDirco0bvS0pz/UZRNUGwMd6vgSs77Y8II+jGJ7GCkep5QZ/1m5Lapg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697656674; a=rsa-sha256; cv=none; b=cb/GJImBe8WyxojJNpE+5WLoRjCVRdZL2Wt4X7jpAP5wYIhSaNexCrrGiE6FOmzcuW3UWo p4REVeY6f8l9Aa1ipj0GyLK9zEI4KMfupuouYNl92C/3SnqI3GImXNqFe15aKUkBIqCNuv JwQiEBdH6ixNVHDWzVhDbXk91V14cF4EN221GZ3q1Y6+wllGuS1JeCmVPvHpwRzvfz67Br c8AyxwxIcrK+uhDVP4EAfpCLXA4Eb9UhrzsyKpq6IKwAX0dCYq3lnaEoVXQGNeH9E5dlKS EY3GJXY/HJlmRjnZKN9/b4I3ihopFcsJv1Gzn49TUETIEeVJxyDpzHuJDZRL5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9gBP4qoeMFHNimjwyeB29eV6aqV3bzfugUQuMKfpYc=; b=yEhzcIp9wV1xhHGcQI9mq/bD1/2pF+/87gSjqrB/feTCj8t798S9hLFKMOd0g8k3UHIB5b gCNWqI7Ewxqyd/g2xER16Wsg5Ghlgft4I2aLkziDmHZ3LBtRmzkLJMPWcLsoz4KEZPlpk7 GSNvHdamog+yCDFCVVTmGHVgNe4daf7ajLlznrwa34KcYs7SNPyvFSS+EaDmZ1I7xLLrCr KfhKPOk+1Zi+vGghIlAVQEAN92ByY7ouYM0htP4P/pQJPviq+9pWQeqpZ+e7Dw/8hEdovL StlFrpSScg8m+fvNBQD0AUfX8zTmSVyJTa+ae9BxQ2f7jpVw2q2Lrr4uN1nAaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9gbk42jSz45P; Wed, 18 Oct 2023 19:17: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 39IJHsYq062910; Wed, 18 Oct 2023 19:17:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IJHsQu062907; Wed, 18 Oct 2023 19:17:54 GMT (envelope-from git) Date: Wed, 18 Oct 2023 19:17:54 GMT Message-Id: <202310181917.39IJHsQu062907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 96e76036949f - releng/14.0 - releng-azure: Add ZFS support to Azure image buliding and uploading List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 96e76036949fffb7f02a423cca6589873966b503 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=96e76036949fffb7f02a423cca6589873966b503 commit 96e76036949fffb7f02a423cca6589873966b503 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:40:39 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-18 19:17:25 +0000 releng-azure: Add ZFS support to Azure image buliding and uploading Approved by: gjb (re), delphij (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41454 (cherry picked from commit 78f901dcbd84ccad3849a8029f2320cf97079856) (cherry picked from commit 1e7218e33974089234841420bb69777a29a91c61) --- release/Makefile.azure | 18 +++++++++++------- release/Makefile.vm | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 528371ad076e..a8f59282a09c 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -4,7 +4,6 @@ # Makefile for uploading Microsoft Azure disk images. # -AZURE_IMG?= ${.OBJDIR}/azure.vhdf AZURE_UPLOAD_TGTS= azure-check-depends \ azure-do-upload CLEANFILES+= ${AZURE_UPLOAD_TGTS} @@ -19,8 +18,6 @@ AZURE${VAR}!= grep -E '^AZURE${VAR}' ${AZURE_UPLOAD_CONF} | awk -F ' ' '{print $ SNAPSHOT_DATE!= date +-${BUILDDATE} .endif -AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} - START_DATE!= date -v-1d -I -u EXPIRY_DATE!= date -v+1m -I -u @@ -44,14 +41,18 @@ azure-check-depends: . endif .endif -azure-do-upload: +.for _FS in ${AZURE_FSLIST} +AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf +AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE} + +azure-do-upload-${_FS}: /usr/local/bin/az storage blob upload \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --container-name ${AZURE_STORAGE} --type page \ - --file ${AZURE_IMG} --name ${AZURE_TARGET}.vhd + --file ${AZURE_IMG_${_FS}} --name ${AZURE_TARGET_${_FS}}.vhd @echo "The disk access URL with shared access signature is:" @echo - @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET}.vhd? + @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET_${_FS}}.vhd? @/usr/local/bin/az storage container generate-sas \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --name ${AZURE_STORAGE} \ @@ -67,5 +68,8 @@ azure-do-upload: @echo @echo /usr/local/bin/az storage blob delete \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ - --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET}.vhd + --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET_${_FS}}.vhd @echo +.endfor + +azure-do-upload: azure-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index 09e31e3c0b6f..e1bba5271a4c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -23,7 +23,7 @@ CLOUDWARE_TYPES?= BASIC-CI \ OCI \ VAGRANT AZURE_FORMAT= vhdf -AZURE_FSLIST= ufs +AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs From nobody Wed Oct 18 19:17:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9gbl6PGHz4xQBS; Wed, 18 Oct 2023 19:17: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 4S9gbl5ySfz4pB0; Wed, 18 Oct 2023 19:17:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiWuHQkaxk3AAUo/MmNt+4upmB+Q1w2hwuOisI8PqFE=; b=vH8vOkE34I1zY9af6LQo4EfJAvnbDYmcV0SL/J6zNLRQC2IBXrXmDXRWLj7APH+TWtRvPe 8y98QjTqGZDOeskQ1OcGsvI5t27Uqh0Mq54/aS6kzrpFPsWPvu8bC5rdQVr8IGiSepBKBY JYKeGH9lsgzyID7SrZMHj2USHcn21WKXjXlsG03gASGFMLMgZwOIngZ89+KGCDVk6BQDNH LdYY6z+5EAiv3EyPH5etfMWMNRX5BqCYjPOeNH2qsLAwogMB4WEIZ4S0+K2URXDYhGXEwA EPGnMzZrLeHAj7v/kD0uwUFC8AGwyk5Rqj5lsAoqtcQcvVekd9tgOpbUFW+AuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697656675; a=rsa-sha256; cv=none; b=JRHXqoZFoPb3lDSmpd4JuuMPG9jxTse7dm+Y/vQlbTWBZst9Aj5twsLiGW3M1FU+2+mJ5K 8htx3vWKCklQEz5itNi7FIUvC6v/bbsXpQufBYkp8aDdywGcsWfAr6YIisWvc5CB7ioYSz uTiNwoLdbtve0CRcugcTYf8h12JK8wGFU19TxwyaG8tf2mZlUya/Du7K33baSAXck69XyJ yCgSOJMRvRf0TVcVWgzGJLFXwE62ZuAW3Xp09tlBQFkImnEnltxFi7moJ475GMfgR9Eeov m7YCPD7HNCLh41FRx+At79TeJj3/7JwJFsMBGfpOk8Sf9jKyqrwH0P+RFvKtAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiWuHQkaxk3AAUo/MmNt+4upmB+Q1w2hwuOisI8PqFE=; b=Gq8TEeaoHQ3Kq3o5fMrU5iQPOBgp/p6JohSRj8FKJSCk8eisWYAmY3TLRJ2xgYV5kmJdg9 laGzQCQxtUbQ1/3hoqkgA8Z7DnGS8hqmoWrl59/9BUAIspcUhVuwbtYS8VeukJjeay/ayk KGph9Cpb6/wsvqHcGAoyjL8fStRkJlKYqeuwr4cfpd0qfvTwTD1kzEV/9wMpZHT07yi3LD hOID45kWFTKvInHnZhhBKevn48YBQjTkBwv1eeSIMBo1Q4KQjdRWaRG8hrH2N+b+/dNFfr n8FwXFfrj0Ivtfmu1/FQuf8D2LKIXoOEm3FqOmHRbxa+3OOSU/tt+hYaxyQWIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9gbl54Znz4B6; Wed, 18 Oct 2023 19:17: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 39IJHtcg062967; Wed, 18 Oct 2023 19:17:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IJHtRF062964; Wed, 18 Oct 2023 19:17:55 GMT (envelope-from git) Date: Wed, 18 Oct 2023 19:17:55 GMT Message-Id: <202310181917.39IJHtRF062964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 9103c2f0ce27 - releng/14.0 - releng-gce: Add ZFS support to GCE image buliding and uploading List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 9103c2f0ce273343391a1fdf53cdee92147d2e73 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=9103c2f0ce273343391a1fdf53cdee92147d2e73 commit 9103c2f0ce273343391a1fdf53cdee92147d2e73 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:41:43 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-18 19:17:26 +0000 releng-gce: Add ZFS support to GCE image buliding and uploading Approved by: delphij (re), gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41527 (cherry picked from commit 1b10bdf0e2fa80a485980b783469687623d3f1c3) (cherry picked from commit c892a9af7187e94f8dd6f720609e84d79c9e7d1f) --- release/Makefile.gce | 38 +++++++++++++++++++++----------------- release/Makefile.vm | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index bdf7b31ba302..f7fb0d8dc419 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -4,7 +4,6 @@ # Makefile for uploading Google Compute Engine disk images. # -GCE_IMG?= ${.OBJDIR}/gce.raw GCE_UPLOAD_TGTS= gce-check-depends \ gce-do-package \ gce-do-upload @@ -27,10 +26,6 @@ SNAPSHOT_DATE= -v${BUILDDATE} GCE_FAMILY_SUFX= -snap .endif -# Really? Uppercase characters are not allowed? Sigh... -# And don't even get me started on the '.'. -GCE_TARGET:= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}${SNAPSHOT_DATE} - gce-upload: ${GCE_UPLOAD_TGTS} gce-check-depends: @@ -53,25 +48,34 @@ gce-check-depends: . endif .endif -gce-do-package: - @# Yes, really... Sigh. - cd ${.OBJDIR} && mv gce.raw disk.raw - cd ${.OBJDIR} && tar --format=gnutar -zcf \ - ${GCE_TARGET:S,${.OBJDIR}/,,}.tar.gz disk.raw - cd ${.OBJDIR} && mv disk.raw gce.raw - touch ${.OBJDIR}/${.TARGET} - gce-do-login: @echo "This requires human interaction, which is not yet supported." @true -gce-do-upload: +.for _FS in ${GCE_FSLIST} +GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +# Really? Uppercase characters are not allowed? Sigh... +# And don't even get me started on the '.'. +GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} + +gce-do-package-${_FS}: + @# Yes, really... Sigh. + cd ${.OBJDIR} && mv ${GCE_IMG_${_FS}} disk.raw + cd ${.OBJDIR} && tar --format=gnutar -zcf \ + ${GCE_TARGET_${_FS}:S,${.OBJDIR}/,,}.tar.gz disk.raw + cd ${.OBJDIR} && mv disk.raw ${GCE_IMG_${_FS}} + touch ${.OBJDIR}/${.TARGET} + +gce-do-upload-${_FS}: @# Fallthrough in case the bucket already exists. /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true - /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ + /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ - --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} +.endfor +gce-do-package: gce-do-package-${VMFS} +gce-do-upload: gce-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index e1bba5271a4c..1a58a548b9f4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -34,7 +34,7 @@ EC2_FLAVOURS= BASE CLOUD-INIT EC2-BASE_DESC= Amazon EC2 image EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw -GCE_FSLIST= ufs +GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image OCI_FORMAT= qcow2 OCI_FSLIST= ufs From nobody Thu Oct 19 08:51:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB1fX3g11z4y8pN; Thu, 19 Oct 2023 08:51: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 4SB1fX3Cd9z3Q8W; Thu, 19 Oct 2023 08:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697705492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaH71qyDL+SvNHjguFlVyeAFO9DHPGqBZiJkzaqNXgY=; b=BrIULkzt/a+gw52UQI21OegxCwTL8MIkZbX7+m3ITbYi4DxIFJz11mnQotefU2LbkfLqNT uBlhHHYgd3Wc2CuMoKyJgABTGdTD16lDGxuSptd0QW2xTU1YuQJ7z0Og5f5RMEfZAJ6hTi udlrBvo/e0h1lPaPaxsmlURlDbMLak2E+aRmV0Xl7goXQPN3SFs/8E9WNivqhBVv+9UsEt 0zysEacGY4p7n6UnUi+G5M4qSKIzduiTru+nQL+R3SKWM/NaEKGklAD4+QdOZmE0DQnQQa cjhsdj/tH2Au7Jc0ofEt3+B7DeRBlSjzbp7dYuU5sPjOtUdYKFNoNnUhwm8HiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697705492; a=rsa-sha256; cv=none; b=PRg/QwasYkAzWdSNC1ThuFRCDrl7GMhFzOZ8lDFYSE8/+7kmzJLLkQWYepyJaJOgaVEWSL J9PSQVzkX2xjTYs03WkcwNV29TQlXxVmOjlzuugjjWqY/+diJtsaYwvpLwDcntJjBa4TKH aYvJYwlkgAufXcx2kC4zI7KN1r7FrGchMUH8h/fZT5CyxCtpU50WSjTKKDENi/5eqBoA2O ePCq+H1HQkSuINwHpF6FZXmsM258NiI9Q2loQRw/YKtxS7h33BdXTfzZbq8BOPVWo2MITJ zTiUl0Ym/Hfvg75dSg2qoOXs8teCGHt3wQdlfp89pKWCCoTzuI7E/gVhoYQ0Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697705492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaH71qyDL+SvNHjguFlVyeAFO9DHPGqBZiJkzaqNXgY=; b=wNA/iCYCX1N7LY5LhYsvAWkm2BCiIpc9vLHTIuOiKJveiHlrx+bkOV4T0M5rEKXMtmXBVM E++LbSt/PrR5KcDxCqJJrRxxjhyXedCYRr3dfx44C8qfLQkVKLznLEhFsF9FAJ12mt+IfK 3HcrQBDvhY3lIs4Uqf+mNwptJGT4UMaqqafysPRVWhcmbUPh1YZJwAF8kgqra58NoUU1VK pSs0QgbhXnIWC9b8O/N2FvjTBai4CeOCYdgwKlM7DYtcnbZiF8YhFy+vR1PmYKa962j9gd 2s+DVHTyDe8/C0euNYNPlR1vMPp12b6J2wLgwkaCZEDuGZFqWKpDNv18g7WSGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB1fX2GKZzjr4; Thu, 19 Oct 2023 08:51: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 39J8pWhm025523; Thu, 19 Oct 2023 08:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39J8pW1X025520; Thu, 19 Oct 2023 08:51:32 GMT (envelope-from git) Date: Thu, 19 Oct 2023 08:51:32 GMT Message-Id: <202310190851.39J8pW1X025520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 68513b4102dc - stable/14 - pf: Free pf_rule_items when state is not created List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 68513b4102dc75a9f4ca49692f97be721e407f0c Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=68513b4102dc75a9f4ca49692f97be721e407f0c commit 68513b4102dc75a9f4ca49692f97be721e407f0c Author: Kajetan Staszkiewicz AuthorDate: 2023-10-12 17:43:04 +0000 Commit: Kristof Provost CommitDate: 2023-10-19 07:29:05 +0000 pf: Free pf_rule_items when state is not created This addresses the issues of pf_rule_times leaking in case of stateless rules and in case of state creation failures, like hitting the state limit. Reviewed by: kp MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D42169 (cherry picked from commit 4d19eceaefb7106d761bc9504bb0da737ae0d674) --- sys/netpfil/pf/pf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3dddfdd0b1a4..39d240f49dbd 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4731,6 +4731,11 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, return (action); } } else { + while ((ri = SLIST_FIRST(&match_rules))) { + SLIST_REMOVE_HEAD(&match_rules, entry); + free(ri, M_PF_RULE_ITEM); + } + uma_zfree(V_pf_state_key_z, sk); uma_zfree(V_pf_state_key_z, nk); } @@ -4776,6 +4781,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, struct tcphdr *th = &pd->hdr.tcp; u_int16_t mss = V_tcp_mssdflt; u_short reason, sn_reason; + struct pf_krule_item *ri; /* check maximums */ if (r->max_states && @@ -4986,6 +4992,11 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, return (PF_PASS); csfailed: + while ((ri = SLIST_FIRST(match_rules))) { + SLIST_REMOVE_HEAD(match_rules, entry); + free(ri, M_PF_RULE_ITEM); + } + uma_zfree(V_pf_state_key_z, sk); uma_zfree(V_pf_state_key_z, nk); From nobody Thu Oct 19 12:31:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB6Xv4v88z4xP1Z; Thu, 19 Oct 2023 12:31: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 4SB6Xv4Snnz4Hpt; Thu, 19 Oct 2023 12:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697718719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L6dsKKULn1chbLU2FbxEXvmmRodMKTF502fN2pEML+E=; b=l9xzA+f0/LnR68MoL6lMoCrfsciNAJmqk6Tq3Ht9ykA8stbDWdiHuYP4Uq9PlR30in5fSm h1JvLY86pS3OznEQKGn1ZlRULXx1mK0QbVX3pGviZ21Xx9MDnUQnrM9Llt6DrZzkFRnJP9 qxO4QHOIa+hF3GQWLEgknY4rrSkvJszXbPGpxV1PaGkRscWCrbquB+5CL4M9OwXmLSkxBw F3KNvkjjHz6sZYRqUAfqFqfPnYWONiCe0ZLKe0f8+LyOlQH81EIvGsBxgYejW3tJ80ck6t +XHFnLPvduzSC2uQgW0Hod7cSsYxhvXFA5RyY+G3/mzpga4tl18ncb/rlglImg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697718719; a=rsa-sha256; cv=none; b=b24gsa8vN9IdPrYz3fIURvahTHIV/5dDQUSqH8TO6WzdVuzXCvDJ3cqERlTlRaw9VnUBxS WBOOI4ScrmQHyFKkeZoFH4n/FI1Qw7oTG6/8viLzZK+kvi1BbUE28FdFLcxy5aQtxnlGrk JzctalPhVqJRz8CQujmZZ9QhNEYNsau4OaByaxm9zNVZVzNSRpsjmXPOED4LFLMT9ZeMKZ 5Aa1OX5h3C5CW0rT2n8AK//TAcHLKNdGVuIXrVo83FtMvTKQUN7Zf/OZSwEkRgf4APGKVK y4NLgBC2zjJVPWZku39vP4kCaaAaIqNZMbo6MIfW4KG0Cs9Q+i8MddJLv9Yf8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697718719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L6dsKKULn1chbLU2FbxEXvmmRodMKTF502fN2pEML+E=; b=TBuSnba7SC2Mg09oUReiMZo83dxDxI6DZsCa26bKx7Zwx7yxoZvsAn21Pz+mSi9A+u8k19 DcRZHcdmQgOX5UxtV+1FiHHOY/IBJLLMlqger6mTvOeXzBibr7aVnple0XBg2WF7wqn3Fl Spr6lrqE1O29xF79L4YruWeTufp8hOZjeWig3bRj7NVOr6m7LsmPsiSAOkt1dtttkclx+Q ePntqlrDsTyPVw9lXM5IVdq6TEXdx2ePfJ4M+9KfmcYVN7Guk9EPwv/alJB5R00vPf7Tc8 fNapZhtqfO6OLnWakutrwfIMkE6x7RVUbXAQQ2TKUy2muj6nRKWL4mnBQhvVSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB6Xv3X5mzpym; Thu, 19 Oct 2023 12:31: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 39JCVx0q092661; Thu, 19 Oct 2023 12:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JCVx78092658; Thu, 19 Oct 2023 12:31:59 GMT (envelope-from git) Date: Thu, 19 Oct 2023 12:31:59 GMT Message-Id: <202310191231.39JCVx78092658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 1016db078351 - releng/14.0 - ifconfig: add static bridge addresses for vlan 0, not 1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1016db0783516d8ff11e1a1b580ef0799d6d9c87 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1016db0783516d8ff11e1a1b580ef0799d6d9c87 commit 1016db0783516d8ff11e1a1b580ef0799d6d9c87 Author: Kristof Provost AuthorDate: 2023-10-13 10:34:06 +0000 Commit: Kristof Provost CommitDate: 2023-10-19 12:31:34 +0000 ifconfig: add static bridge addresses for vlan 0, not 1 Since fd7edfcdc3 ("bridge: fix lookup for untagged packets in bridge_transmit()") and b0e38a1373 ("bridge: distinguish no vlan and vlan 1") we do a better job of distinguishing between untagged and VLAN 1 traffic. However, ifconfig still defaulted to adding addresses for VLAN 1, rather than for untagged traffic. Change this to be the most common (i.e. untagged) option. Approved by: re (kib) Reviewed by: zlei, philip MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42188 (cherry picked from commit 6ace92326f3cc4bbee9b74f6b656cb13699a78a2) (cherry picked from commit ce3ab9dfee304d335b4307c35e77407771d6cc3f) --- sbin/ifconfig/ifbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index 3a97a5af3931..57ab0c6ae81c 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -407,7 +407,7 @@ setbridge_static(if_ctx *ctx, const char *val, const char *mac) memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst)); req.ifba_flags = IFBAF_STATIC; - req.ifba_vlan = 1; /* XXX allow user to specify */ + req.ifba_vlan = 0; /* XXX allow user to specify */ if (do_cmd(ctx, BRDGSADDR, &req, sizeof(req), 1) < 0) err(1, "BRDGSADDR %s", val); From nobody Thu Oct 19 14:02:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8Yg040Pz4xTGb; Thu, 19 Oct 2023 14:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SB8Yf6S54z4RrV; Thu, 19 Oct 2023 14:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vLB0iRUerOkcK3BbPMk/46ES3MLZgzduEQzRfn2p2Bs=; b=ItoHUWRyI5dFIRcWdWaz0Sc5XtEuYyqLIVZaseZmetGknZ3Hmsl9u092qEmsl0gB/gzyc2 EVvqkUVZoJ1QQ4NvnYdQXvOToWh9cNmmEqRhm55RIcUgxuBqLFXAvcedFl5Fbu3m9cZPNG uJAdjeVW6syI50azw4qRzmwXlUIIHrNrm+DEmPc/iScQyfBSejfIIFL9UB1eEWy9KWLGCE sLvERobpKe2QAW/GYDbudpvziT2fHz+45KTv/tW3+1JBsXy0pf/tcLlgOmnQFo+2LieBvG TW5/MFfsrN7O67I25jr8bjvykZQL6GBoIaejVLVZiNK2Y5xKQ7hyc2BS4zrTdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697724166; a=rsa-sha256; cv=none; b=Bmtm9xgDB59hXYfXv0pd9Gh/r6J5j1a3YhkeFEVNxyHBujkVANayzF7j9HE+s4W3RXnGmc t1D14J8ed3S+0Hq+zjE6XjhQWLGRU4Ed+GRIhTC3bs7S5K5fcTuNPjRZ6G5MPJsvt+pexT ttk1iKtaQLJWTI/+rV1+P9h3kPuC27xVvAy1eZLZKr6oGsfOhcLJs6q04faZhv3D3mHWWU wC7ckmZgKS0TpNt41hxO0n2f9wAvFvFxsUi0WpXsyopN/fhMORbETzb5w/vMZfcWJD9p1e lvpLCx24J/y4VkaSsY+ZePBPv068zx42AjoDpgIaI3UwpPwc5ZSV6NJEBW1G7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vLB0iRUerOkcK3BbPMk/46ES3MLZgzduEQzRfn2p2Bs=; b=e3gecCuD3woP/4qXjEcJsYKoHOHytNleqG61EvcQSZEqni9deY/PyO8c6qbT6cJGeX/Ffr JR3UYi+Kzbmizbf06nEp+WyQI5ZshOD8heRRTXHXqi/hA8a0vkf+VpZlzYVaMmp+87bMsV MOsGvxieKYlYEolOQKhOzs7id70xCtOV8okVAizoV4IdjoRVZzLqskEfV9brSV3YSAkoNi dL77IYSMrwmthlRTeZx6NXL2X4fJFy9xPTGWNOg9hRoAcnPrGOJfcz4xjcdEFzoze/Ij0X dEwBTcvS2PcDyz4rHkmwm2UUOjHwu6kWawrZziLuEvbDGGZWyX19H151xmFTfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8Yf5WfmzsR7; Thu, 19 Oct 2023 14:02: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 39JE2kjN044746; Thu, 19 Oct 2023 14:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JE2kGh044743; Thu, 19 Oct 2023 14:02:46 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:02:46 GMT Message-Id: <202310191402.39JE2kGh044743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c525ec74b44f - stable/14 - boottrace: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c525ec74b44f471261b0e67eaa254e05fdef3d05 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c525ec74b44f471261b0e67eaa254e05fdef3d05 commit c525ec74b44f471261b0e67eaa254e05fdef3d05 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:00:50 +0000 boottrace: Add corresponding sysctl knob for loader tunable The loader tunable 'kern.boottrace.table_size' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit 51dc362d1a148362dc4cfacaa3629db928523204) --- sys/kern/kern_boottrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c index cb013d4e8be1..86fee4f47fbe 100644 --- a/sys/kern/kern_boottrace.c +++ b/sys/kern/kern_boottrace.c @@ -158,6 +158,10 @@ SYSCTL_INT(_kern_boottrace, OID_AUTO, shutdown_trace_threshold, CTLFLAG_RWTUN, &shutdown_trace_threshold, 0, "Tracing threshold (ms) below which tracing is ignored"); +SYSCTL_UINT(_kern_boottrace, OID_AUTO, table_size, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &bt.size, 0, + "Boot-time tracing table size"); + /* * Dump a trace to buffer or if buffer is NULL to console. * From nobody Thu Oct 19 14:02:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8Yh158wz4xTgY; Thu, 19 Oct 2023 14:02: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 4SB8Yh0Hspz4Rs9; Thu, 19 Oct 2023 14:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWfeeH9iiSfY556+aEo8GF8K9q6QRI0iSIxi7GsMxPM=; b=BVIHCGn4kUrNzauAqEpDqkTAsBvCI//TfzSN5V5uZVqUgEpcdRG3DW5tAdHvOnv9t/D7Bn XZxtizq2dVz8vkjVAeAEfS+RBgIel5xgvIws/GdgdfhJGMD2xWM2qVNVgzPQJXPhCUO2Mf 65+i3tSYv5TBYd6/3Z6iZp+nHav8CskVytS5RTp0T/nYjiBVrCGzAbyHdgQvSEDdD90AoO PGrXx+YakvVzumFdD4FZTmXQd52F6j3/iUDdYDEUvcNe0dHc/Qzr61olbktYmA0ngw9uK+ iL82rYLoDz4rPhcCcP8FCA3WzdD9+/8btKfTLDf/xrr9nUACjFpDAizQBrz2Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697724168; a=rsa-sha256; cv=none; b=AgX5pch244pLbN3XX6MmiYO2VLtW2gvY+R62bnRDnh8r+ikBIeT6GXL9GLHLUZzQFmdkK1 EsGsOUEggBvygSLCmB+89QTf/k7FHHZJgFtASHDdq3AMlgUxvhIO+BlcY+Z5acQb/XEwPv f0/bBf3lmzlSq7mdvGXol849LpwO7Au90Qrg1cX8E3d4A/LyRxBRHZvTNs7cDtw2USFmyZ 4+Grkj8cERuiq5MIlzTEp2QYnvk3gGUYlKC/RZmLTKoS55oRJwYMCCYeIsK9puEDo9gJvf cstA7Iu6hGnA9kKxoOzH49VbqoG3iIYw+rp9Iu4E8sVFmV9JRJ1JyALR1t7LcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWfeeH9iiSfY556+aEo8GF8K9q6QRI0iSIxi7GsMxPM=; b=pNYw3jCB+CuOYGdcz5v4zlPKmUSnIYoffLjk6TI+1tRKzXmzXbkUIzxqkb7T18LY5sf4tm jL3mqBmlGufxYh4M9PTSIwMd6iqdgRB36OvLLakNC50czCM08Jhm53dOFSju9AdFT4K8YW t93YlyZPKmhtYSffj91RHIqh3C+G7adk1v0EOVFz0CPnZ5tnVdzZpmqnjd/PccTwNFKXwa 8Z3joW2WBv0scPhGjPC3wCE/TxGcuhHuxnE8WZwmYwwie/SEk/2mee9qPJJYVISFKbz+oz RXHbl06VfBwcifeIKBgSYll4skJpZbLNztCv9GcNr2rpBWY2LDD8CE5DWRGQlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8Yg6GFBzsc3; Thu, 19 Oct 2023 14:02:47 +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 39JE2lLN044804; Thu, 19 Oct 2023 14:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JE2lMH044801; Thu, 19 Oct 2023 14:02:47 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:02:47 GMT Message-Id: <202310191402.39JE2lMH044801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6f8ef4d6e44e - stable/14 - kasan: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f8ef4d6e44ee27a08c14ab6a892ffccf332bcf7 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6f8ef4d6e44ee27a08c14ab6a892ffccf332bcf7 commit 6f8ef4d6e44ee27a08c14ab6a892ffccf332bcf7 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:00:56 +0000 kasan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kasan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit db5d0bc868be669ed6588ebeccf8c02e76aabc41) --- sys/kern/subr_asan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 44c96435a499..c3664d9cf6c2 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -92,7 +92,10 @@ SYSCTL_INT(_debug_kasan, OID_AUTO, panic_on_violation, CTLFLAG_RDTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); -static bool kasan_enabled __read_mostly = false; +#define kasan_enabled (!kasan_disabled) +static bool kasan_disabled __read_mostly = true; +SYSCTL_BOOL(_debug_kasan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kasan_disabled, 0, "KASAN is disabled"); /* -------------------------------------------------------------------------- */ @@ -136,7 +139,7 @@ kasan_init(void) kasan_md_init(); /* Now officially enabled. */ - kasan_enabled = true; + kasan_disabled = false; } void @@ -180,7 +183,7 @@ kasan_code_name(uint8_t code) #define REPORT(f, ...) do { \ if (panic_on_violation) { \ - kasan_enabled = false; \ + kasan_disabled = true; \ panic(f, __VA_ARGS__); \ } else { \ struct stack st; \ From nobody Thu Oct 19 14:02:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8Yj4XL5z4xT7R; Thu, 19 Oct 2023 14:02: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 4SB8Yj12qyz4Ryj; Thu, 19 Oct 2023 14:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuoGWudm8vV1CwfvkAldB+e98TXHAZgf0rXrvnso+84=; b=KnmiNvGPO70yFhit/GpswXcPuCEq0CGgZFlgpC2BeoURI33DnqdKNoz6JnGUja/MqyhkQz v0hz56ZMK2Dr7Tv0TpwVtNicZVHZdutH42uYHjPrtQ0NofHOV9sQ7o6OfisAx0Cd3sDlhw V9V82jg/hkbxhThD+oloxqzjL4Gv2+17eqMOHMApH50lSVXQ8pDehdkI0vRvCRIuTRi3A9 z2zW0Uwh1kufqssWaZt22K5CzqHP3KVLPsaV9vVMxhYcKQMtkluDzfW27GUgJJ/y/1LxB4 rLTQvFjRZe0rT8SHPcuVSFEHAIQ0qm5Jk8mcBzHXWSCUfKoKsZR8C4Po5Vl32A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697724169; a=rsa-sha256; cv=none; b=NX3pFPQbWhmUvm5NzQezUaMl/XXNqwMKQRsn/5FfUky9FZsWfZlbUFmpUWIhdAbDQMo0kv lR8AtxRGs1yrOrIxoDqhfcnd/Ooy6T3d5zy4u+Q++YKaw+F5Th7JyzUy8zc8RM1CphLdfG 6Ted4TvI7wq7aHIUUvxPiodwTEhjUMNMQFQS4z82iMLtWB06uWOACS6LOuCDrW3r1M307M 1EHhWlC3y38bM/r3PhqEj6QSa0tTLtSp1KvEQbiDdxkR9kqYY2wDeGrI4YuQDAm8JSWuzb 2SmYSHrmgVlfLJcD343JoNJGKD9OXWq+XVjJiU1f6gfTvf8ppowxfXWP7QIKlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuoGWudm8vV1CwfvkAldB+e98TXHAZgf0rXrvnso+84=; b=nZ7i1IzOvnz9Y5N5p4XML2QrM2/swKIP2r5jxGhY/i3crki1ODG7H2ijP8+zb4Br1VllZU /73tOGar6C5ahdDmXXlnhxVlNMn4Hmv8iJi1wZaVhs2funHbVbekq0GW1d0SUkghAzmMRR UXNKQZ3ZjnE95rdpPEanx3SndGKwvpApy813KaxxDbwL2iXzS3SEZEAKEzZbnUz/RL3cGt 6FHFlpDng0Jep/Zeehjo8BqjT/bhOnK2/7ogdzxPEics0A3phcwBj+7AH9G2BpaaKZEZ7I N88YaKp3KkmIkc7MWoViA9qgPGAdjihX5nifgSLeH+b5iCJezrUZj4JDv1vteg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8Yh74kNzsTg; Thu, 19 Oct 2023 14:02: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 39JE2mcb044859; Thu, 19 Oct 2023 14:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JE2mqN044856; Thu, 19 Oct 2023 14:02:48 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:02:48 GMT Message-Id: <202310191402.39JE2mqN044856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1b289728e93d - stable/14 - kmsan: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1b289728e93d1000e6ca03354c8bc4209ea8da51 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1b289728e93d1000e6ca03354c8bc4209ea8da51 commit 1b289728e93d1000e6ca03354c8bc4209ea8da51 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:00:56 +0000 kmsan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kmsan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit 1d2b743784f7527a6840fe35ddb7e34cd41bc17a) --- sys/kern/subr_msan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index 57caeb454b42..54948370a14a 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -108,15 +108,13 @@ static uint8_t msan_dummy_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_write_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_orig[PAGE_SIZE] __aligned(PAGE_SIZE); static msan_td_t msan_thread0; -static bool kmsan_enabled __read_mostly; - static bool kmsan_reporting = false; /* * Avoid clobbering any thread-local state before we panic. */ #define kmsan_panic(f, ...) do { \ - kmsan_enabled = false; \ + kmsan_disabled = true; \ panic(f, __VA_ARGS__); \ } while (0) @@ -142,6 +140,11 @@ SYSCTL_BOOL(_debug_kmsan, OID_AUTO, panic_on_violation, CTLFLAG_RWTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); +static bool kmsan_disabled __read_mostly = true; +#define kmsan_enabled (!kmsan_disabled) +SYSCTL_BOOL(_debug_kmsan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kmsan_disabled, 0, "KMSAN is disabled"); + static MALLOC_DEFINE(M_KMSAN, "kmsan", "Kernel memory sanitizer"); /* -------------------------------------------------------------------------- */ @@ -599,7 +602,7 @@ kmsan_init(void) thread0.td_kmsan = &msan_thread0; /* Now officially enabled. */ - kmsan_enabled = true; + kmsan_disabled = false; } /* -------------------------------------------------------------------------- */ From nobody Thu Oct 19 14:02:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8Yk22Rzz4xT7T; Thu, 19 Oct 2023 14:02: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 4SB8Yk1Y3cz4S8Z; Thu, 19 Oct 2023 14:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+auakrWNKwX766Y057MUEai3QqulBkNZE1mjJpQ420=; b=eVJODSSquDYd4m5uk0xyzmGFkExGDPuxIyP1RyTnb30pDbAxEUlv3+ZznjH6UkXJ2eK64G DsAouAzkShwCJNZY4sDt3VrSYNdLV/7fsggeMjchyEbvbEgMHaQ4F1281npW3Ao3fF6UrE qRsaGTwstkBjKXaN9KKSjZF0AGEbZ9shn/nHfDJedudTCYZg0GnhFjjxLjbun0EtzQHXXr SRk4lB721gWvf9jtZt8qq69xl7fFi6sZxDNgkx5F/ztTWK+E2z1JDICsnoPMvCoLeuXLU/ znC3ApHqCgOFKhWQ4E2GPrWKj5/Yfne56UNRDCi+u9aN4J3PxdGzk7JAjDuLLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697724170; a=rsa-sha256; cv=none; b=jetQ2UdE9mEi6w0dhnDgl0itUxbJ0/GlSuVtPPv8TTpbGRj3NjTVhM+8TftjolJQTPoiTj M8cHXA3yiQoDu1iUrulGJmiZGo7YWyq94mftapMUDkwxKbmPbMB66x6tNIcC935C2LfTXm HTls8U1r5uZ/AZdAu86tuOaTJsUXvl+nUM2Sy8GvZTlBn42FOZzTfcu99cny+Ti4GZMqvs +5Z+yDvXdKhQ/B42LLn3tK7OZQmTo7upizpNLkIUpDhSZPqX0kuOU9PHopuMYCxQUfubN1 Z+i/e6aVwlHPgmqnAItmp9fPcc8ktyv7cTbavEfhiu8qRcO/cpBXh5vAKui+MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+auakrWNKwX766Y057MUEai3QqulBkNZE1mjJpQ420=; b=Dt1nw6KWmZCkx1MVJjn61Uw/oZpDcafAfiwUOOGlPz+Bgq30niHudr9ETiMoCEGi3aRMS6 MfMcSHHXl/og8eLMAqRGhCY5hTRrTZHzTPXnzQMPu4ntE5K8/pfunLI6FB0usM0OwhxZcv BrWvhUmpIvhe3xiBIVB6ElkWm5uwgDB3Zz83csZ/Zxl3ZA+107p5psB7gqGGuE5FjQB4R1 SM2iTlJUphIo15KeMS4+UyLCNKFFwYqT8zls5Tcz0wuAxnzfEmXF1kAaVEPGaiFLGmlzZQ +9UVgv5pLR+bqJqSp4p4Hi+YFQWxL2UUc9J6uajq6dp9Etzixo5Jd+GsI65Ntw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8Yk0djGzsc4; Thu, 19 Oct 2023 14:02: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 39JE2nna044911; Thu, 19 Oct 2023 14:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JE2nRJ044908; Thu, 19 Oct 2023 14:02:49 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:02:49 GMT Message-Id: <202310191402.39JE2nRJ044908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: cb5bc8a748df - stable/14 - vm_page: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb5bc8a748dfefc68e3905e8fdf17e0484844383 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=cb5bc8a748dfefc68e3905e8fdf17e0484844383 commit cb5bc8a748dfefc68e3905e8fdf17e0484844383 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:00:57 +0000 vm_page: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.pgcache_zone_max_pcpu' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit a55fbda874db31b804490567c69502c891b6ff61) --- sys/vm/vm_page.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4f3c4ba2d4d7..8496a39154de 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -198,6 +198,11 @@ vm_page_init(void *dummy) bogus_page = vm_page_alloc_noobj(VM_ALLOC_WIRED); } +static int pgcache_zone_max_pcpu; +SYSCTL_INT(_vm, OID_AUTO, pgcache_zone_max_pcpu, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pgcache_zone_max_pcpu, 0, + "Per-CPU page cache size"); + /* * The cache page zone is initialized later since we need to be able to allocate * pages before UMA is fully initialized. @@ -209,9 +214,8 @@ vm_page_init_cache_zones(void *dummy __unused) struct vm_pgcache *pgcache; int cache, domain, maxcache, pool; - maxcache = 0; - TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &maxcache); - maxcache *= mp_ncpus; + TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &pgcache_zone_max_pcpu); + maxcache = pgcache_zone_max_pcpu * mp_ncpus; for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { From nobody Thu Oct 19 14:02:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8Yl34cSz4xTWR; Thu, 19 Oct 2023 14:02: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 4SB8Yl2bQBz4SCn; Thu, 19 Oct 2023 14:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJ+Eu5UrtqpkEoI7ERuVY89yMFwYnFUcQZx0liz+g1I=; b=hEqg/QoaBcqKY3L0EOoTrEzvfm1IrkPeGEtRUaoEjtS5VN5YrKsqOCvldTGcJyqjSXRw5s lGMDkUd92MJl7VR+2djp1iM1tsVLmOmnBFjE310rIUbwGClI51qFh4BiVDaK5OC4EKLuaT Qnuz9/7DuoduxsmPnzZUrItoirRfJVzpIrCA6pMeZSPxqClk4X1T+eliOO23yW6C2mEcVX +5RCX5fk5G+xF5TSuNeuDY4QvSxh8bGEutVmU0F/0uqxGpdTvl52YThR9jKIoQbZjGf/Fk 08jZ5DDjPTiihwQVCUPp89UA/iSgBtnMuQIoXmKKDnjFCRCh3W9zdWixm8RZwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697724171; a=rsa-sha256; cv=none; b=WH4jol9TvfIFZygR2/GJldrVfoMYMiysLJV3NM/UkjBv9yzrvMhxfhsmnLgaOIkkYg/QZS e14FCFTQHPfA5ytiWhlKXjwawIOuGqIe1B0J2e+19XVvTPOcQM3kzNlVWX/1EdUUlDIBPP XeB6dmNJlIPoRrwMHo2SFsS+2PKEFwEJRVeS38HVoycbw0bhUZ4mC33Ar+CEcNTBkSG+o6 kSoYUUoh6q1J4ensWCqhjek8mIDng+G0qWHAoHK0MNbvaWgvkVZLabOHFwcGTeXjmnHMpM XBA1palSZ5jdJ/sZRJMhRXSoLGvOGqaVMay3PKOS/D7Jr2qzNh58clYR8aKn0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697724171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJ+Eu5UrtqpkEoI7ERuVY89yMFwYnFUcQZx0liz+g1I=; b=P6WShYIkfD81/a2xg7ApjN+jj4di30mP1WTdWJyGKD21NPytWDvAsDHTw6NRBnMGB1E9ur djFKf5gbr85GGfWF5RWfFKQ1lEx+D6VmM44HpIkfXdW0yCZhBKLXOTAMgVFPRDURR1LBXI /ewYisTDlLM0hyED7GgTGdEN3BsET+p0340EO4/L81ZiA2VTRVko5V0yra7rpBG7pTLvem UMW42NHpZW0uWokDAG171sejeAeHqZzNHFsOxPoRlFhr0LsC3OKjw+iqFOD5F4djL55OpB OxBXTInrP7SlqvTgf32Lg6zeXTtJzQXZpe5KTuZaU8Jy7psMhBjWgc+B8C+J/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8Yl1hXbzsfm; Thu, 19 Oct 2023 14:02: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 39JE2pBo044962; Thu, 19 Oct 2023 14:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JE2poN044959; Thu, 19 Oct 2023 14:02:51 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:02:51 GMT Message-Id: <202310191402.39JE2poN044959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e26b7e8d02f6 - stable/14 - vm_phys: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e26b7e8d02f648623ad343016533487634a16698 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e26b7e8d02f648623ad343016533487634a16698 commit e26b7e8d02f648623ad343016533487634a16698 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:00:57 +0000 vm_phys: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.numa.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit c415cfc8be1b732a80f1ada6d52091e08eeb9ab5) --- sys/vm/vm_phys.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 108297caac49..bc992bdfc58b 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -76,6 +76,12 @@ _Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; int __read_mostly *mem_locality; + +static int numa_disabled; +static SYSCTL_NODE(_vm, OID_AUTO, numa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "NUMA options"); +SYSCTL_INT(_vm_numa, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &numa_disabled, 0, "NUMA-awareness in the allocators is disabled"); #endif int __read_mostly vm_ndomains = 1; @@ -627,15 +633,14 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality) { #ifdef NUMA - int d, i; + int i; /* * For now the only override value that we support is 1, which * effectively disables NUMA-awareness in the allocators. */ - d = 0; - TUNABLE_INT_FETCH("vm.numa.disabled", &d); - if (d) + TUNABLE_INT_FETCH("vm.numa.disabled", &numa_disabled); + if (numa_disabled) ndomains = 1; if (ndomains > 1) { From nobody Thu Oct 19 14:19:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8x03Gssz4xVHQ; Thu, 19 Oct 2023 14:19: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 4SB8x02K2wz4Twp; Thu, 19 Oct 2023 14:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKtblULYOSTB8e/1tf52Hti3WCYShLJQQkvIG4akkNs=; b=C7Li1yudK04Uh+YHxbNAmF8hHqm2eE8dm/5HYBrn5tq5WpYFiLtq0w3G6Qb/PCsWYckzin J3wFONocrOgABV2onJHyyHpUGw+AEzZhcH5RVGJM0p2bYt+0s7yDvTiGXYr4MGb5JcE6lG Ba9yxrXgVwsPDwHCA/TsJpqriWoXxgHeje/S16K6noIeVOsXX2dnKR8Qn50Knsndd1CxJ1 duw8MoN7U7qyW6XmA8jS8FEoyh18gIooIn5wqLO4x0BdW0DsJaTo4cCV8Ke6hIo6vFJUa0 Zc+EtjEpBQR3dO9qt/BgO9ejqP4Uoi/aGbNrYloXrVwsxO8VyIQu4CZUxrepEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697725172; a=rsa-sha256; cv=none; b=q5MZaSwNjqgbZAz7QRnAeLbOD4oVjUM2FFt+9UprboXqloeIMOaNv8SE0w36CbE6cXIM+D CHVWm/54SZVUU/H/KXrdlFK3cMmBh08AmJGL+IpC0P2Zhc2zINlfnxJrL9S35pkCLpXfRd meczEzUfPXCWdHg8T9qGaOX9TCi50hFsW5SK+U3ZyukdDYkUK/ErjgjLSv7cedszbjtdBD 3HB2eC3FwZcMtt5UJjNYiTeAyIKi0YxoGSX0yANestjmFxCLydrImMsa5FpJh7VYfSyZ+N IP5/UzAxrdSAt/6KGOaGCeNcNrKnL4U5KSffUETsvD0HIbUrcmzA1L6mIiiCnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKtblULYOSTB8e/1tf52Hti3WCYShLJQQkvIG4akkNs=; b=t6+4qIKE/qfk+l6c0sf58niYJo6/7IPhuzN7dGMwnN1Zak83x3GLIeEcmpdC9iXRbrcdol Bvs3sTBARPaU8JupI70rSPiDgGQoja6i7UGEFIzecYQifvjq7T7R3rOlU3xVDUvOo+9fvP W/mZ5yvXwygS1EXFbBvMTtjb8X5+kPib5sK5X4ZnABH9VlEkShz7D1ntloPsTowr5/Ebz+ 4gdJ2hTTMQol1MPN6uxih9KEgI5LbISK8BqYPChA1ZLH9I97npr0XEOZDuRw1txuETi4lA spS7OZOr6MHgkliHgS50NJx0lhC1NT2SRNNfH2hyyFbMxJl3hDNVEHxJxJqb8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8x01NNjzsxd; Thu, 19 Oct 2023 14:19: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 39JEJWCp062258; Thu, 19 Oct 2023 14:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JEJWvK062255; Thu, 19 Oct 2023 14:19:32 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:19:32 GMT Message-Id: <202310191419.39JEJWvK062255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c2be2c87dc21 - stable/13 - kasan: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c2be2c87dc2100b107a20ddd918ed9d74b8533e3 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c2be2c87dc2100b107a20ddd918ed9d74b8533e3 commit c2be2c87dc2100b107a20ddd918ed9d74b8533e3 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:17:29 +0000 kasan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kasan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit db5d0bc868be669ed6588ebeccf8c02e76aabc41) (cherry picked from commit 6f8ef4d6e44ee27a08c14ab6a892ffccf332bcf7) --- sys/kern/subr_asan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 1b8c52c0eb8d..9c33d0187a6d 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -92,7 +92,10 @@ SYSCTL_INT(_debug_kasan, OID_AUTO, panic_on_violation, CTLFLAG_RDTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); -static bool kasan_enabled __read_mostly = false; +#define kasan_enabled (!kasan_disabled) +static bool kasan_disabled __read_mostly = true; +SYSCTL_BOOL(_debug_kasan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kasan_disabled, 0, "KASAN is disabled"); /* -------------------------------------------------------------------------- */ @@ -136,7 +139,7 @@ kasan_init(void) kasan_md_init(); /* Now officially enabled. */ - kasan_enabled = true; + kasan_disabled = false; } static inline const char * @@ -174,7 +177,7 @@ kasan_code_name(uint8_t code) #define REPORT(f, ...) do { \ if (panic_on_violation) { \ - kasan_enabled = false; \ + kasan_disabled = true; \ panic(f, __VA_ARGS__); \ } else { \ struct stack st; \ From nobody Thu Oct 19 14:19:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8x142Ggz4xVMZ; Thu, 19 Oct 2023 14:19: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 4SB8x13NSyz4V73; Thu, 19 Oct 2023 14:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rB8X6eWBzNB5PW2Ek7ViSY6UyAmHWgKbM883Yir2FYo=; b=uiI2mOu1XYpDC7tNL1LNjyElHMOhdp56ZjxrT5yDaOXOkKh54lCdshTXf8F4byH8RWrZ+p hrf5KtsL/vse7Puux+So+zTqPvLXuupovTYTy57quOleewelrNI0N0khQwvZ/rJ0nO4cgh HnXziaA0/9NYWnR7EeNa1h8Bff3M7ix9G2Fxp3FlVpYRsdN0uvSBeEb2hbQ015aAdbJSJA p2LnWuzhp6D8cIGhJjgzTNDIsLLcprRMEtZYug3cp+P0dt23du+/BQzZVpw9U3SBRdL6KP fOZw2OEFvRbRoq0wrsOROGGcsGnltteF7w+NUI2Qi27md0heVSfCmtPU92yRKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697725173; a=rsa-sha256; cv=none; b=BJACmhAySUNkkwDSdxa6Ee7PIRjjmHJRM+GsCS5UoxT2HZEpOcUQMsWZkg8aiS9ijqlGsG +3bmOz7vvCV3QNZqxcRtb6rD3eTPFya4hEYOt6XBDA9AtSSRkZhEG4fOmpG8EInNGP4xKL JWa5gxVHyQFefFURlQKGD4v0PMuDQ/gYDh2r9HLvNSbGwfjsRDev12UVg32fwtgzc6K2ur H6l/6mXNVbgoAjqRSmviJgpJivsuIVJAmjpJOqhr/5dSn74/y2MX6XWXhknhin9x3LR66g 0adz1y9yxaqS6No6Kps/UKVkCltAKFkpZWaNOFpgLa/VLdL6gMfF9YqOkT5UrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rB8X6eWBzNB5PW2Ek7ViSY6UyAmHWgKbM883Yir2FYo=; b=cbVxDBqpRRa7EGupDg1priw0WoKiUCnMZkcZ/MPssD7rZ0NZ9ZvEfafTCQZHAW1MqsQY7D gJgsnI95Ja+KSAV/55XL8ugIMvFBYyXrHyqfO/SGkmgifZ8LyErj+5bKp2qC1Lhqpl3D5D tqpszCKpTPnYBAdn5sc2FfiqBNaLFw3xQiGMsrLs9DjLtVCMaGAvqCTncB84ogyPgWcert KjdTC8jc1cLrOzEJn0e2ZzPZ2ro1sdTt1hkRU77waQ7W8PTZS4Tzo6e1vp/YThkXOg3ECi SQ6S46b8MrIkDJmPzvJVy4NejMMBbd/dYUF1O8hyvia2iKbnglsdszeIvVYgRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8x12QFwzt5j; Thu, 19 Oct 2023 14:19: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 39JEJXgY062309; Thu, 19 Oct 2023 14:19:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JEJXSw062306; Thu, 19 Oct 2023 14:19:33 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:19:33 GMT Message-Id: <202310191419.39JEJXSw062306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: de2b262fde2f - stable/13 - vm_page: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de2b262fde2f0955cff5cade6cca58b06fbdd37f Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=de2b262fde2f0955cff5cade6cca58b06fbdd37f commit de2b262fde2f0955cff5cade6cca58b06fbdd37f Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:17:29 +0000 vm_page: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.pgcache_zone_max_pcpu' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit a55fbda874db31b804490567c69502c891b6ff61) (cherry picked from commit cb5bc8a748dfefc68e3905e8fdf17e0484844383) --- sys/vm/vm_page.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 76c50ba676c2..d21022930396 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -198,6 +198,11 @@ vm_page_init(void *dummy) bogus_page = vm_page_alloc_noobj(VM_ALLOC_WIRED); } +static int pgcache_zone_max_pcpu; +SYSCTL_INT(_vm, OID_AUTO, pgcache_zone_max_pcpu, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pgcache_zone_max_pcpu, 0, + "Per-CPU page cache size"); + /* * The cache page zone is initialized later since we need to be able to allocate * pages before UMA is fully initialized. @@ -209,9 +214,8 @@ vm_page_init_cache_zones(void *dummy __unused) struct vm_pgcache *pgcache; int cache, domain, maxcache, pool; - maxcache = 0; - TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &maxcache); - maxcache *= mp_ncpus; + TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &pgcache_zone_max_pcpu); + maxcache = pgcache_zone_max_pcpu * mp_ncpus; for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { From nobody Thu Oct 19 14:19:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB8x24zfwz4xTxG; Thu, 19 Oct 2023 14:19: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 4SB8x24RB5z4VB3; Thu, 19 Oct 2023 14:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOO+h4ehi+LumZFTE3GVmX5JkK37BQ0wYps68XFOEKs=; b=ihTmQwWArcMF/GWFh30gr743SvNP05rSYjf9tiN0M1pQRKWRVyh19GCrCCZOaQbeV5rbzb nkppsmTASFEUw2mMbSS0lkYlihAukrNTF4uKT+szi2eBiG2AIZcBN+YCqEHVuLkQa5mKb1 1Im4TocGh2Uls1vcpBWWcwh6ppRX41a0a5o1rqNIauj+XB60t4x3n0E6W3NogbtQ/0Bq/I cHIi9N/ECOgFCiYVErytaQvnrubpar8ygwimqzZeJUOTHMSZpcO6cPrejzBpXSs5LERS+5 8lnxeMBSRbwl/D8mTBoEFkWK2LPM61yEBDcQP8YdL3si+2N1Lz6JwvzxylvKTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697725174; a=rsa-sha256; cv=none; b=FQ5LLlHqYtRzqtEPUmaIkJyU4fEYCh9EaKyqNlhKHDRQLdz49dpu3bqyoQ6l7fh3U5nHGV i03W+A4PG3pmi2PMeTUsxiir+8Rc3rx0ao9EFpJv/L8JJwV/EV/Vha1UQZ3yCw7cJlSc83 Ia7K2U8MlcchBxCEwbqctr8M6z6/Zwup25xtAK0ZP+ZHxy9ov5LlgM0UvUPZlPCRGRLwpI Ba4Y8yvCx+i5JEZHFDsCdo5cHnmGQ6JQe+fj9Rt0O0Q7fPv2jyqK5NtrmOo+rCGp8Z3fvk SXNGI9BtKnC+4XVkxV3Lw+NrVzKZxHgxsD8+9Q0aqjy/hDV/hvdsMo7sNql95Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOO+h4ehi+LumZFTE3GVmX5JkK37BQ0wYps68XFOEKs=; b=C+kjUzu4d509VnSd8E0I/gpVAvyGBSG/lvLgpYiGodRuvTv6BVuqXj2gtvnUs5BrnUoaVY WzAWAw8jiaFhUseeWpjMFkV4bfQIurmdKBH7ISF9k+d+YogdmnL/tpL8H2WYSY/9gU3nQz Ekrwth8sHZhSgVb3/bV+MG19MVx7rNJ+TtfXjxhoHwtFv51SrTFNIpZHK/lGhJ+RY/t+P+ 32WEJK7nZVA3EBn0wclzltPGjiV+gOEdTj/tMWYL/ziQ/Noy2Omh4iOgple1i13iFGw+ek WCKU4vAlAPV7WBLKl+0UzLAuWumpopBgHiSNToTh5DX35pS7jdQJXzpCSJrm7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB8x23Rv9zsq0; Thu, 19 Oct 2023 14:19: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 39JEJYd5062360; Thu, 19 Oct 2023 14:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JEJYgC062357; Thu, 19 Oct 2023 14:19:34 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:19:34 GMT Message-Id: <202310191419.39JEJYgC062357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: b180f0040f95 - stable/13 - vm_phys: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b180f0040f95973a30fa26f5435e4bbab1197e80 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b180f0040f95973a30fa26f5435e4bbab1197e80 commit b180f0040f95973a30fa26f5435e4bbab1197e80 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:17:30 +0000 vm_phys: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.numa.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit c415cfc8be1b732a80f1ada6d52091e08eeb9ab5) (cherry picked from commit e26b7e8d02f648623ad343016533487634a16698) --- sys/vm/vm_phys.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 0c51bfc3e5c2..6894040cbefd 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -74,6 +74,12 @@ _Static_assert(sizeof(long) * NBBY >= VM_PHYSSEG_MAX, #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; int __read_mostly *mem_locality; + +static int numa_disabled; +static SYSCTL_NODE(_vm, OID_AUTO, numa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "NUMA options"); +SYSCTL_INT(_vm_numa, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &numa_disabled, 0, "NUMA-awareness in the allocators is disabled"); #endif int __read_mostly vm_ndomains = 1; @@ -622,15 +628,14 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality) { #ifdef NUMA - int d, i; + int i; /* * For now the only override value that we support is 1, which * effectively disables NUMA-awareness in the allocators. */ - d = 0; - TUNABLE_INT_FETCH("vm.numa.disabled", &d); - if (d) + TUNABLE_INT_FETCH("vm.numa.disabled", &numa_disabled); + if (numa_disabled) ndomains = 1; if (ndomains > 1) { From nobody Thu Oct 19 14:27:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SB96L6lpXz4xVRr; Thu, 19 Oct 2023 14:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SB96L6FzNz4Wq1; Thu, 19 Oct 2023 14:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EX+RtpNtSRSOYpby76WWuXzMVB5Fof19sdrIod3Al7k=; b=jHjqk8nVL9nvaZOcn3tbHwpkHbS19o+8AkP2+0HV++KIEJ7pNTXQnRm/PeEI3S+rkJowjy qi2z2y6faLAjuLZSbbb20LAb3nlOxOAUzDqAJBiVy+2y2H2OfRtscWVnh/vLpfsXPls4Zx rbHlirYGVAjiZij+CtUe8PSiSy+Z/VL8EVnTo0Jj8SqSJcZo5mwpfiOtN3zbdZ7qUqzMnG bCpWoG8QtCQUz++YVpcoZhXvvJVhJIxPvEmoj4QM8lhMPj+eyH7pV8jCyVWtnHIWpHe+aC XiBGo7xffOhHHY8Ss1nF84HN8Lll0KVJ9RhIpalYSwLvlGYQSwnCgOwVES5uuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697725658; a=rsa-sha256; cv=none; b=SibXk4TxCpwgOhnDHoKMprOj3DiZu23MpFzLPnvAKnHpmjAFn0ls3rK0J7RuclBwuueCFt HkyxpvyWI8sETwdPT+UraK6vHWp+jNNL6jJv1V0JknB9JAkXxeODoIPnkJuYwPn7z4JzPG nUKDasMVmflOa9n2OO7mXt4Emm6YcV4AcQ/3QNr5P1534GgRejswAXHF2RTTTdwNCYEb/a vPEDEUMi32uC/k7gIIvs6YTNEBPyAFnUHo4SzWPYz5xjt4hzZr67TfDZuLmFqcF1l5xBXE Zih4ToQVhJK3K5iXDsxzFZ2KjlwmICv/Ok4Fn7etOW4KNFd6JCnRFe6b0f5TBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697725658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EX+RtpNtSRSOYpby76WWuXzMVB5Fof19sdrIod3Al7k=; b=jFZ8pGxzn3xAI6u4ZgKQbk88IyQGlMCKTAOnbFKykY7KjySn7idd+IJpfhqmFLJEZ590FJ 3ciS07OmYPihzErD7ZjDV1uPdjKr6s4bxsH9HbjiS8Np2HDKAvt2PBdV7/3SK0WiK8Xbkd iCjO8GQmu9mBtmjf644Gaj74qaBnNR8vtqNqVI10/4zXMzVdSejBKjitAqUxrF8Fw/A+9U UKgK1idEsW86Bd43IjLJNcJLlYEaz5LQ/b4dA7EfmMoJJdoTFaPtZbNTPVdVNc7I1mx2Nf e8Rbupegdgzk1MVibGjHjuDWLWZPtEXfWuBugVezpdcDiXWBxXb52G9PoD6RtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SB96L5C8pzshK; Thu, 19 Oct 2023 14:27: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 39JERcV5078876; Thu, 19 Oct 2023 14:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JERcvU078873; Thu, 19 Oct 2023 14:27:38 GMT (envelope-from git) Date: Thu, 19 Oct 2023 14:27:38 GMT Message-Id: <202310191427.39JERcvU078873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9aeb24e214c1 - stable/12 - vm_phys: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9aeb24e214c19743bec202e66114aaba37896741 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9aeb24e214c19743bec202e66114aaba37896741 commit 9aeb24e214c19743bec202e66114aaba37896741 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-19 14:26:18 +0000 vm_phys: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.numa.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit c415cfc8be1b732a80f1ada6d52091e08eeb9ab5) (cherry picked from commit e26b7e8d02f648623ad343016533487634a16698) (cherry picked from commit b180f0040f95973a30fa26f5435e4bbab1197e80) --- sys/vm/vm_phys.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 7fb92cb06220..d4e51936222c 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -76,6 +76,12 @@ _Static_assert(sizeof(long) * NBBY >= VM_PHYSSEG_MAX, #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; int __read_mostly *mem_locality; + +static int numa_disabled; +static SYSCTL_NODE(_vm, OID_AUTO, numa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "NUMA options"); +SYSCTL_INT(_vm_numa, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &numa_disabled, 0, "NUMA-awareness in the allocators is disabled"); #endif int __read_mostly vm_ndomains = 1; @@ -604,15 +610,14 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality) { #ifdef NUMA - int d, i; + int i; /* * For now the only override value that we support is 1, which * effectively disables NUMA-awareness in the allocators. */ - d = 0; - TUNABLE_INT_FETCH("vm.numa.disabled", &d); - if (d) + TUNABLE_INT_FETCH("vm.numa.disabled", &numa_disabled); + if (numa_disabled) ndomains = 1; if (ndomains > 1) { From nobody Thu Oct 19 19:23:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBHgB5WY8z4xnBb; Thu, 19 Oct 2023 19:23: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 4SBHgB52Czz3cBy; Thu, 19 Oct 2023 19:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlgIspg85XvTMjJe2tPnvsL36pQX9e+4ZH/mTycK3U4=; b=JUE4Hx/kg7KNxrXTAyN0tR831lPiyscZCbE9b/Z0hWvo5Lrlw26SBX7JPNuC0XgBAKzzOj AdYmrQIkbI07wp9GGsEkZEG8NTRhFJ8GXi6h8JQHZUZdr1PHBEDNldkuY1fvEe1EPG/tLg 9sJ8rjjfhRXBT59dpQjn2VDqk6Qhmw6pJXkXkDYoa+H7ZFVMk8IyjOLtCpft/jZvZfcpsx jdlQ4bajLHcZ1PyudcfhgA9HlPftYDHt8aEs3FgO96uDie+ftZ9cBVn++67mxtjWbyoucQ uypbR5Pi5nFLC6fT0GwT00hA1IZZXJAM+CT3pFrDYfsb4aJCn0h2ap3kBxSjeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697743382; a=rsa-sha256; cv=none; b=eoLc18N+FVpsyhohLYBortqQq8ExvXzC3+UJGIH4i0FlHIxvHggGg7YPVJckSUTXlbnImX eJzo3Bd4+9p5HOt1Vfl4co7Q4xSYEQY5OCawrAiz3DI42NB8Xr0VFze9n5U2tKvGz3Fkzz z0doYL8gcE2fqqyIC8BBAFhHOqQtEb4pGhi3ZnTLigSb+76JGrsK016LHA7jqVrJm5HnDG CCRkWtber2yahPirivFxpXNxRnqy2S8sbMTyEWsUoLTu9s1T3NXvcQWzyo2kLTEwi7v0BK lERLcBbjl1op1vYTals67Byj1VqdURiUkIxluXAhHEpV0auqs9XNCm14PfP6jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlgIspg85XvTMjJe2tPnvsL36pQX9e+4ZH/mTycK3U4=; b=MNAliUbbulBZZXN2+iVz56zfdpFliBParSUIVFtFPprXa91lAMzqmoaQ9ATsKtPaLfJw/5 v3YF5GjXLOCCmbBsmK02Lcmq+sCXKbgyDQd6DZE6D1uRz6lglorRaSubZj6qbZIiVud1tw tC0lApbWXcWizneRVT3iB5PataiNUPPR8bdNQ2IF8KVI/PUhMAgZruNjv4PDqRl/el43pJ 2Xe6JRAOviv8jMfII8bg3Lmtmp9sAsDe3Be64ge4S2HHsAnIZzYgU0mb1E0gGh1OaAv4MG eUmNp4o64bVjMpGk0hDFSfHD0didF3IADceWn4oT+nwV3I4tXkxjicR0gMqVeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBHgB44jgz12mk; Thu, 19 Oct 2023 19:23: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 39JJN2sn076635; Thu, 19 Oct 2023 19:23:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JJN2HZ076632; Thu, 19 Oct 2023 19:23:02 GMT (envelope-from git) Date: Thu, 19 Oct 2023 19:23:02 GMT Message-Id: <202310191923.39JJN2HZ076632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: d99f6566d53d - releng/14.0 - mkimg: Ensure GPT Entry Array is at least 16k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d99f6566d53d86e4ec1854e0c602ea7ed7ded48d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d99f6566d53d86e4ec1854e0c602ea7ed7ded48d commit d99f6566d53d86e4ec1854e0c602ea7ed7ded48d Author: Warner Losh AuthorDate: 2023-10-18 15:23:40 +0000 Commit: Warner Losh CommitDate: 2023-10-19 18:37:44 +0000 mkimg: Ensure GPT Entry Array is at least 16k UEFI v2.10 Section 5.3 documentes that the minimum reserved space after the GPT header be at least 16kB. Enforce this minimum. Before, we'd only set the number of entries to be the unpadded size. gpart's selective enforcement of aspects of the GPT standard meant that these images would work, but couldn't be changed (to add a partition or grow the size of a partition). This ensures that gpart's overly picky standards don't cause problems for people wishing to, for example, resize release images. MFC after: 1 day (we want this in 14.0) PR: 274312 Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42245 (cherry picked from commit 9b42d3e12ffc6896fcb4e60c1b239ddf60705831) (cherry picked from commit 5401ebd33cf5073e8c0f095527504d38f74a926b) Approved-by: re (cperciva) --- sys/sys/disk/gpt.h | 7 +++++++ usr.bin/mkimg/gpt.c | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/sys/disk/gpt.h b/sys/sys/disk/gpt.h index e48b13684814..596a5cba1681 100644 --- a/sys/sys/disk/gpt.h +++ b/sys/sys/disk/gpt.h @@ -82,6 +82,13 @@ struct gpt_hdr { CTASSERT(offsetof(struct gpt_hdr, padding) == 92); #endif +/* + * The GPT standard (section 5.3 of UEFI standard version 2.10) requires + * we reserve at least 16k after the PMBR and the GPT header for the GPT + * Array Entries. + */ +#define GPT_MIN_RESERVED 16384 + struct gpt_ent { gpt_uuid_t ent_type; gpt_uuid_t ent_uuid; diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index 59c51a6a177b..ed3f008c394f 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -#include +#include #include #include #include @@ -124,13 +124,21 @@ crc32(const void *buf, size_t sz) return (crc ^ ~0U); } +/* + * Return the number of sectors needed to store the partition table. + */ static u_int gpt_tblsz(void) { - u_int ents; + u_int eps; /* Entries per Sector */ - ents = secsz / sizeof(struct gpt_ent); - return ((nparts + ents - 1) / ents); + /* + * Count the number of sectors needed for the GPT Entry Array to store + * the number of partitions defined for this image. Enforce the 16kB + * minimum space for the GPT Entry Array per UEFI v2.10 Section 5.3. + */ + eps = secsz / sizeof(struct gpt_ent); + return (MAX(howmany(GPT_MIN_RESERVED, secsz), howmany(nparts, eps))); } static lba_t From nobody Thu Oct 19 19:23:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBHgC6nSVz4xn1B; Thu, 19 Oct 2023 19:23: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 4SBHgC6FLvz3cKw; Thu, 19 Oct 2023 19:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZ7fQcNDTwpHed5Yq3FA6lUyAzTeuSELVsxoR0XpYXA=; b=sahJNLv8cscnygdGNrjGTJUyOLe2SUQISmaK5Uk0D3K8EF7NLxySR0x/A5k1ZHgr2tztWd 6EDJlQTa1N4o2i9HvBM69X2qSWE3PYOdpKVC/3+iRR5OTvnPed/A4ntYeUeKx3CGhB3c7A 9nBu7+fz+hSKGy90T2djGzs1dKLraeNwlbTKrhWfxZZKox5aEAsWHTE/pTJWtJFR8fdzRU sF0yZ+WJ98n8XXsCH1soy5kw59bPVe5NpuNWtCc3sqAIdr5GC9ZIPFPXDlqoLpES1Z0g6I GMJgubk/wXOT/HCqMwKk/+55zZzjPiInIo9OULNfkKUf3ky/odwajYhIYjtvmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697743383; a=rsa-sha256; cv=none; b=SSEbfIkauPtw+H+Pi849tPTmWGlsl94RENjky2KzONyIxQ/hVfu4FUiGYZEBusCi3ID+QH 63NzLXMntqt2fGcydiFp+Zf1s51nzdlVPhqE6lyNgP1joL2l4c2iPI+am1sTLrQRjeFTu2 p7MGNSL07jMySGztfwFOliGv2Puty2xGbRZ2xM0XIjQEB9sfM1JWZsats7Ds/0EWVTpD4G nXoiUMIra5dTNi+7BYJ3Y3K68eQ5aTsud1775LCRaT+h7FsNIORs9Lzdd9vfs1aZCP1uV8 PTpfiJ99OYI501FalhbJZRwzYFFbM762U6G4Njj1RAKdfRjr9DzjofAnV6j8Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZ7fQcNDTwpHed5Yq3FA6lUyAzTeuSELVsxoR0XpYXA=; b=ID6oQElZY4bRPA2slb0LYdEW4silGndEqzPb3AI5OFdqVh/nxKKMGmoYtgFQEOmFEe3c49 1YZB7TiVk3eJyxhLY2T/N12vSm3XdsAbpprpp/YlV/7UL3q6W/NT4DLzBuxW/Z13YjmEfe 9x/p/51fzv2ft7bbjWn6SibP6tatBQnQtr4veX9OHXX0UJQ9sSOAmcPDDRNnluPeuJ7iSm Cm9ptxiGMN7cZP3hnkToBV8hXp1bpn5kLUaN1ESgM2y8CS45hNFhKo0+T+7budtHySNoWf OoxjTZdJeFVpxVuzk48PbNqnOt2nc76l3bQUeZtD3oiwETjvdiwgSaeYyjcLYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBHgC5L0cz12ml; Thu, 19 Oct 2023 19:23: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 39JJN3OM076686; Thu, 19 Oct 2023 19:23:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JJN365076683; Thu, 19 Oct 2023 19:23:03 GMT (envelope-from git) Date: Thu, 19 Oct 2023 19:23:03 GMT Message-Id: <202310191923.39JJN365076683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 16fda43f8423 - releng/14.0 - mkimg_test: remove vtoc8 images, they aren't needed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 16fda43f84239af05728d60795e441145c48398d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=16fda43f84239af05728d60795e441145c48398d commit 16fda43f84239af05728d60795e441145c48398d Author: Warner Losh AuthorDate: 2023-10-18 15:23:41 +0000 Commit: Warner Losh CommitDate: 2023-10-19 18:37:47 +0000 mkimg_test: remove vtoc8 images, they aren't needed vtoc8 support expired with sparc64 removal, so remove them all. Sponsored by: Netflix (cherry picked from commit 83bd5a833c3a14b74736e7b3fa0be66252a5a3dc) (cherry picked from commit 4a3cdf4168953c01b8b0e6a9ca72804ef2860309) Approved-by: re (cperciva) --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex | 544 -------------------- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex | 72 --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex | 20 - usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex | 52 -- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex | 28 -- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex | 71 --- usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex | 314 ------------ usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex | 544 -------------------- usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex | 72 --- usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex | 20 - usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex | 52 -- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex | 28 -- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex | 71 --- usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex | 314 ------------ usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex | 550 --------------------- .../mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex | 77 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex | 22 - usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex | 59 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex | 30 -- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex | 73 --- usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex | 324 ------------ usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex | 550 --------------------- usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex | 77 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex | 22 - usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex | 59 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex | 30 -- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex | 73 --- usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex | 324 ------------ 28 files changed, 4472 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex deleted file mode 100644 index 93afee83d903..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex +++ /dev/null @@ -1,544 +0,0 @@ -00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 10 00 |.............B..| -00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00001000 00 00 00 00 00 00 20 00 00 00 00 00 00 00 30 00 |...... .......0.| -00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| -00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| -00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| -00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| -00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| -00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| -00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| -00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| -00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| -00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| -00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| -000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| -000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| -000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| -000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| -000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| -000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| -00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| -00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| -00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| -00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| -00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| -00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| -00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| -00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| -00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| -00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| -000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| -000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| -000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| -000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| -000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| -000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| -00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| -00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| -00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| -00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| -00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| -00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| -00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| -00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| -00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| -00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| -000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| -000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| -000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| -000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| -000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| -000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| -00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| -00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| -00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| -00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| -00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| -00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| -00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| -00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| -00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| -00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| -000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| -000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| -000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| -000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| -000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| -000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| -00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| -00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| -00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| -00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| -00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| -00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| -00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| -00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| -00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| -00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| -000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| -000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| -000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| -000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| -000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| -000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| -00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| -00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| -00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| -00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| -00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| -00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| -00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| -00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| -00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| -00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| -000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| -000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| -000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| -000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| -000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| -000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| -00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| -00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| -00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| -00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| -00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| -00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| -00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| -00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| -00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| -00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| -000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| -000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| -000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| -000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| -000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| -000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| -00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| -00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| -00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| -00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| -00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| -00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| -00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| -00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| -00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| -00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| -000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| -000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| -000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| -000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| -000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| -000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| -00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| -00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| -00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| -00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| -00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| -00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| -00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| -00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| -00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| -00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| -000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| -000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| -000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| -000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| -000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| -000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| -00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| -00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| -00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| -00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| -00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| -00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| -00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| -00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| -00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| -00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| -000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| -000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| -000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| -000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| -000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| -000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| -00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| -00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| -00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| -00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| -00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| -00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| -00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| -00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| -00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| -00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| -00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| -00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| -00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| -00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| -00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| -00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| -00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| -00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| -00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| -00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| -00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| -00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| -00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| -00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| -00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| -00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| -00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| -00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| -00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| -00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| -00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| -00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| -00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| -00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| -00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| -00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| -00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| -00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| -00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| -00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| -00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| -00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| -00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| -00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| -00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| -00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| -00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| -00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| -00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| -00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| -00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| -00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| -00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| -00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| -00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| -00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| -00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| -00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| -00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| -00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| -00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| -00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| -00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| -00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| -00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| -00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| -00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| -00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| -00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| -00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| -00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| -00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| -00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| -00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| -00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| -00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| -00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| -00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| -00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| -00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| -00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| -00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| -00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| -00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| -00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| -00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| -00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| -00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| -00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| -00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| -00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| -00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| -00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| -00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| -00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| -00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| -00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| -00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| -00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| -00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| -00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| -00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| -00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| -00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| -00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| -00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| -000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| -000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| -000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| -000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| -000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| -000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| -00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| -00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| -00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| -00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| -00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| -00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| -00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| -00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| -00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| -00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| -000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| -000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| -000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| -000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| -000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| -000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| -00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| -00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| -00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| -00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| -00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| -00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| -00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| -00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| -00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| -00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| -000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| -000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| -000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| -000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| -000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| -000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| -00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| -00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| -00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| -00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| -00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| -00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| -00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| -00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| -00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| -00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| -000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| -000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| -000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| -000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| -000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| -000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| -00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| -00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| -00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| -00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| -00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| -00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| -00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| -00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| -00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| -00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| -000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| -000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| -000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| -000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| -000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| -000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| -00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| -00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| -00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| -00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| -00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| -00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| -00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| -00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| -00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| -00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| -000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| -000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| -000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| -000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| -000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| -000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| -00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| -00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| -00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| -00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| -00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| -00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| -00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| -00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| -00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| -00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| -000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| -000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| -000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| -000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| -000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| -000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| -00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| -00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| -00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| -00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| -00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| -00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| -00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| -00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| -00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| -00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| -000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| -000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| -000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| -000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| -000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| -000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| -00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| -00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| -00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| -00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| -00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| -00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| -00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| -00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| -00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| -00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| -000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| -000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| -000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| -000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| -000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| -000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| -00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| -00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| -00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| -00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| -00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| -00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| -00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| -00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| -00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| -00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| -000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| -000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| -000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| -000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| -000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| -000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| -00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| -00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| -00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| -00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| -00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| -00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| -00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| -00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| -00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| -00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| -00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| -00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| -00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| -00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| -00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| -00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| -00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| -00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| -00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| -00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| -00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| -00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| -00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| -00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| -00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| -00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| -00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| -00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| -00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| -00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| -00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| -00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| -00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| -00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| -00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| -00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| -00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| -00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| -00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| -00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| -00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| -00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| -00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| -00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| -00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| -00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| -00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| -00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| -00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| -00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| -00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| -00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| -00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| -00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| -00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| -00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| -00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| -00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| -00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| -00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| -00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| -00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| -00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| -00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| -00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| -00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| -00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| -00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| -00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| -00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| -00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| -00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| -00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| -00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| -00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| -00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| -00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| -00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| -00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| -00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| -00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| -00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| -00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| -00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| -00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00005000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00005010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00005080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00005090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000050a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000050b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000050c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000051a0 00 00 00 00 0e 10 21 08 00 00 00 00 00 00 00 00 |......!.........| -000051b0 21 08 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000051c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000051d0 00 00 21 08 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000051e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000051f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 3f |.............."?| -00005200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00405200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00406000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex deleted file mode 100644 index dba435854881..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex +++ /dev/null @@ -1,72 +0,0 @@ -00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| -00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| -00000030 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 |................| -00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010000 80 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 |................| -00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020000 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 |................| -00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00030000 80 00 00 00 00 05 00 00 80 00 00 00 00 06 00 00 |................| -00030010 80 00 00 00 00 07 00 00 80 00 00 00 00 08 00 00 |................| -00030020 80 00 00 00 00 09 00 00 80 00 00 00 00 0a 00 00 |................| -00030030 80 00 00 00 00 0b 00 00 80 00 00 00 00 0c 00 00 |................| -00030040 80 00 00 00 00 0d 00 00 80 00 00 00 00 0e 00 00 |................| -00030050 80 00 00 00 00 0f 00 00 80 00 00 00 00 10 00 00 |................| -00030060 80 00 00 00 00 11 00 00 80 00 00 00 00 12 00 00 |................| -00030070 80 00 00 00 00 13 00 00 80 00 00 00 00 14 00 00 |................| -00030080 80 00 00 00 00 15 00 00 80 00 00 00 00 16 00 00 |................| -00030090 80 00 00 00 00 17 00 00 80 00 00 00 00 18 00 00 |................| -000300a0 80 00 00 00 00 19 00 00 80 00 00 00 00 1a 00 00 |................| -000300b0 80 00 00 00 00 1b 00 00 80 00 00 00 00 1c 00 00 |................| -000300c0 80 00 00 00 00 1d 00 00 80 00 00 00 00 1e 00 00 |................| -000300d0 80 00 00 00 00 1f 00 00 80 00 00 00 00 20 00 00 |............. ..| -000300e0 80 00 00 00 00 21 00 00 80 00 00 00 00 22 00 00 |.....!......."..| -000300f0 80 00 00 00 00 23 00 00 80 00 00 00 00 24 00 00 |.....#.......$..| -00030100 80 00 00 00 00 25 00 00 80 00 00 00 00 26 00 00 |.....%.......&..| -00030110 80 00 00 00 00 27 00 00 80 00 00 00 00 28 00 00 |.....'.......(..| -00030120 80 00 00 00 00 29 00 00 80 00 00 00 00 2a 00 00 |.....).......*..| -00030130 80 00 00 00 00 2b 00 00 80 00 00 00 00 2c 00 00 |.....+.......,..| -00030140 80 00 00 00 00 2d 00 00 80 00 00 00 00 2e 00 00 |.....-..........| -00030150 80 00 00 00 00 2f 00 00 80 00 00 00 00 30 00 00 |...../.......0..| -00030160 80 00 00 00 00 31 00 00 80 00 00 00 00 32 00 00 |.....1.......2..| -00030170 80 00 00 00 00 33 00 00 80 00 00 00 00 34 00 00 |.....3.......4..| -00030180 80 00 00 00 00 35 00 00 80 00 00 00 00 36 00 00 |.....5.......6..| -00030190 80 00 00 00 00 37 00 00 80 00 00 00 00 38 00 00 |.....7.......8..| -000301a0 80 00 00 00 00 39 00 00 80 00 00 00 00 3a 00 00 |.....9.......:..| -000301b0 80 00 00 00 00 3b 00 00 80 00 00 00 00 3c 00 00 |.....;.......<..| -000301c0 80 00 00 00 00 3d 00 00 80 00 00 00 00 3e 00 00 |.....=.......>..| -000301d0 80 00 00 00 00 3f 00 00 80 00 00 00 00 40 00 00 |.....?.......@..| -000301e0 80 00 00 00 00 41 00 00 80 00 00 00 00 42 00 00 |.....A.......B..| -000301f0 80 00 00 00 00 43 00 00 80 00 00 00 00 44 00 00 |.....C.......D..| -00030200 80 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 |.....E..........| -00030210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00040000 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 |................| -* -00040080 00 01 00 01 00 01 00 01 00 01 00 01 00 00 00 00 |................| -00040090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00050000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00050010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00050080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00050090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000500a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000500b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000500c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000501a0 00 00 00 00 0e 10 21 80 00 00 00 00 00 00 00 00 |......!.........| -000501b0 21 80 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000501c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000501d0 00 00 21 80 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000501e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000501f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 b7 |..............".| -00050200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00450200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00460000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex deleted file mode 100644 index ffa27d117070..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex +++ /dev/null @@ -1,20 +0,0 @@ -00000000 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000001a0 00 00 00 00 0e 10 21 01 00 00 00 00 00 00 00 00 |......!.........| -000001b0 21 01 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!...............| -000001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000001d0 00 00 21 01 00 00 00 00 00 00 00 00 00 00 00 00 |..!.............| -000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 36 |.............."6| -00000200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00420200 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex deleted file mode 100644 index 00828a72a331..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex +++ /dev/null @@ -1,52 +0,0 @@ -00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| -00000030 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| -00000040 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00000050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000200 63 78 73 70 61 72 73 65 ff ff ff ff ff ff ff ff |cxsparse........| -00000210 00 00 00 00 00 00 06 00 00 01 00 00 00 00 00 03 |................| -00000220 00 20 00 00 ff ff f4 74 00 00 00 00 00 00 00 00 |. .....t........| -00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000600 00 00 00 04 00 00 10 05 00 00 20 06 ff ff ff ff |.......... .....| -00000610 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00000a00 46 72 65 65 42 53 44 34 4d 00 00 00 00 00 00 00 |FreeBSD4M.......| -00000a10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000a80 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000a90 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000aa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000ab0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -00000ac0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000ba0 00 00 00 00 0e 10 21 34 00 00 00 00 00 00 00 00 |......!4........| -00000bb0 21 34 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |!4..............| -00000bc0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -00000bd0 00 00 21 34 00 00 00 00 00 00 00 00 00 00 00 00 |..!4............| -00000be0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00000bf0 00 00 00 00 00 00 00 00 00 00 00 00 da be 22 03 |..............".| -00000c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00200a00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00200c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400c00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| -* -00400e00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00600e00 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00600e10 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00600e20 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| -00600e30 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| -00600e40 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00600e50 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00600e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00601000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex deleted file mode 100644 index d55109faaec5..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex +++ /dev/null @@ -1,28 +0,0 @@ -00000000 46 72 65 65 42 53 44 35 4d 00 00 00 00 00 00 00 |FreeBSD5M.......| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00000090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -000000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000001a0 00 00 00 00 0e 10 28 00 00 00 00 00 00 00 00 00 |......(.........| -000001b0 28 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |(...............| -000001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -000001d0 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 |..(.............| -000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -000001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be 2b 36 |..............+6| -00000200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00400200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00500000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| -00500010 ff ff ff ff ff ff ff ff 01 23 45 67 2a 69 6d 67 |.........#Eg*img| -00500020 00 02 00 00 57 69 32 6b 00 00 00 00 00 50 00 00 |....Wi2k.....P..| -00500030 00 00 00 00 00 50 00 00 00 96 04 11 00 00 00 02 |.....P..........| -00500040 ff ff ef b4 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00500050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00500060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00500200 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex deleted file mode 100644 index 76c4d5313850..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex +++ /dev/null @@ -1,71 +0,0 @@ -00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| -00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| -00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| -00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| -00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| -00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| -00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| -00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| -00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| -00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| -00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| -00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| -00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| -00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| -00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| -00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| -00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| -00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| -00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| -00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| -00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| -00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| -00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| -002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| -002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| -002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| -00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| -00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| -00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| -00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| -00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| -00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| -004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -004001a0 00 00 00 00 0e 10 80 00 00 00 00 00 00 00 00 00 |................| -004001b0 80 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |................| -004001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| -004001d0 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -004001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be f8 7f |................| -00400200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| -* -00800200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -01400000 diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex deleted file mode 100644 index 865769bcea7e..000000000000 --- a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex +++ /dev/null @@ -1,314 +0,0 @@ -00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| -00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| -00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| -00000030 0b 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................| -00000040 20 00 00 00 00 00 00 00 00 0a 20 0d 0a 00 00 00 | ......... .....| -00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000200 23 20 44 69 73 6b 20 44 65 73 63 72 69 70 74 6f |# Disk Descripto| -00000210 72 46 69 6c 65 0a 76 65 72 73 69 6f 6e 3d 31 0a |rFile.version=1.| -00000220 43 49 44 3d 30 30 30 30 30 30 30 30 0a 70 61 72 |CID=00000000.par| -00000230 65 6e 74 43 49 44 3d 66 66 66 66 66 66 66 66 0a |entCID=ffffffff.| -00000240 63 72 65 61 74 65 54 79 70 65 3d 22 6d 6f 6e 6f |createType="mono| -00000250 6c 69 74 68 69 63 53 70 61 72 73 65 22 0a 23 20 |lithicSparse".# | -00000260 45 78 74 65 6e 74 20 64 65 73 63 72 69 70 74 69 |Extent descripti| -00000270 6f 6e 0a 52 57 20 31 30 32 34 30 20 53 50 41 52 |on.RW 10240 SPAR| -00000280 53 45 20 22 22 0a 23 20 54 68 65 20 44 69 73 6b |SE "".# The Disk| -00000290 20 44 61 74 61 20 42 61 73 65 0a 23 44 44 42 0a | Data Base.#DDB.| -000002a0 64 64 62 2e 61 64 61 70 74 65 72 54 79 70 65 20 |ddb.adapterType | -000002b0 3d 20 22 69 64 65 22 0a 64 64 62 2e 67 65 6f 6d |= "ide".ddb.geom| -000002c0 65 74 72 79 2e 63 79 6c 69 6e 64 65 72 73 20 3d |etry.cylinders =| -000002d0 20 22 31 30 32 34 30 22 0a 64 64 62 2e 67 65 6f | "10240".ddb.geo| -000002e0 6d 65 74 72 79 2e 68 65 61 64 73 20 3d 20 22 31 |metry.heads = "1| -000002f0 22 0a 64 64 62 2e 67 65 6f 6d 65 74 72 79 2e 73 |".ddb.geometry.s| -00000300 65 63 74 6f 72 73 20 3d 20 22 31 22 0a 00 00 00 |ectors = "1"....| -00000310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000400 03 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 |................| -00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00000600 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| -00000610 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| -00000620 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| -00000630 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| -00000640 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| -00000650 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| -00000660 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| -00000670 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| -00000680 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| -00000690 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| -000006a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| -000006b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| -000006c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| -000006d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| -000006e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| -000006f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| -00000700 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| -00000710 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| -00000720 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| -00000730 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| -00000740 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| -00000750 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| -00000760 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| -00000770 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| -00000780 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| -00000790 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| -000007a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| -000007b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| -000007c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| -000007d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| -000007e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| -000007f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| -00000800 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| -00000810 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| -00000820 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| -00000830 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| -00000840 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| -00000850 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| -00000860 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| -00000870 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| -00000880 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| -00000890 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| -000008a0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| -000008b0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| -000008c0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| -000008d0 60 0b 00 00 70 0b 00 00 80 0b 00 00 90 0b 00 00 |`...p...........| -000008e0 a0 0b 00 00 b0 0b 00 00 c0 0b 00 00 d0 0b 00 00 |................| -000008f0 e0 0b 00 00 f0 0b 00 00 00 0c 00 00 10 0c 00 00 |................| -00000900 20 0c 00 00 30 0c 00 00 40 0c 00 00 50 0c 00 00 | ...0...@...P...| -00000910 60 0c 00 00 70 0c 00 00 80 0c 00 00 90 0c 00 00 |`...p...........| -00000920 a0 0c 00 00 b0 0c 00 00 c0 0c 00 00 d0 0c 00 00 |................| -00000930 e0 0c 00 00 f0 0c 00 00 00 0d 00 00 10 0d 00 00 |................| -00000940 20 0d 00 00 30 0d 00 00 40 0d 00 00 50 0d 00 00 | ...0...@...P...| -00000950 60 0d 00 00 70 0d 00 00 80 0d 00 00 90 0d 00 00 |`...p...........| -00000960 a0 0d 00 00 b0 0d 00 00 c0 0d 00 00 d0 0d 00 00 |................| -00000970 e0 0d 00 00 f0 0d 00 00 00 0e 00 00 10 0e 00 00 |................| -00000980 20 0e 00 00 30 0e 00 00 40 0e 00 00 50 0e 00 00 | ...0...@...P...| -00000990 60 0e 00 00 70 0e 00 00 80 0e 00 00 90 0e 00 00 |`...p...........| -000009a0 a0 0e 00 00 b0 0e 00 00 c0 0e 00 00 d0 0e 00 00 |................| -000009b0 e0 0e 00 00 f0 0e 00 00 00 0f 00 00 10 0f 00 00 |................| -000009c0 20 0f 00 00 30 0f 00 00 40 0f 00 00 50 0f 00 00 | ...0...@...P...| -000009d0 60 0f 00 00 70 0f 00 00 80 0f 00 00 90 0f 00 00 |`...p...........| -000009e0 a0 0f 00 00 b0 0f 00 00 c0 0f 00 00 d0 0f 00 00 |................| -000009f0 e0 0f 00 00 f0 0f 00 00 00 10 00 00 10 10 00 00 |................| -00000a00 20 10 00 00 30 10 00 00 40 10 00 00 50 10 00 00 | ...0...@...P...| -00000a10 60 10 00 00 70 10 00 00 80 10 00 00 90 10 00 00 |`...p...........| -00000a20 a0 10 00 00 b0 10 00 00 c0 10 00 00 d0 10 00 00 |................| -00000a30 e0 10 00 00 f0 10 00 00 00 11 00 00 10 11 00 00 |................| -00000a40 20 11 00 00 30 11 00 00 40 11 00 00 50 11 00 00 | ...0...@...P...| -00000a50 60 11 00 00 70 11 00 00 80 11 00 00 90 11 00 00 |`...p...........| -00000a60 a0 11 00 00 b0 11 00 00 c0 11 00 00 d0 11 00 00 |................| -00000a70 e0 11 00 00 f0 11 00 00 00 12 00 00 10 12 00 00 |................| -00000a80 20 12 00 00 30 12 00 00 40 12 00 00 50 12 00 00 | ...0...@...P...| -00000a90 60 12 00 00 70 12 00 00 80 12 00 00 90 12 00 00 |`...p...........| -00000aa0 a0 12 00 00 b0 12 00 00 c0 12 00 00 d0 12 00 00 |................| -00000ab0 e0 12 00 00 f0 12 00 00 00 13 00 00 10 13 00 00 |................| -00000ac0 20 13 00 00 30 13 00 00 40 13 00 00 50 13 00 00 | ...0...@...P...| -00000ad0 60 13 00 00 70 13 00 00 80 13 00 00 90 13 00 00 |`...p...........| *** 3704 LINES SKIPPED *** From nobody Thu Oct 19 19:23:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBHgF1DqKz4xn8W; Thu, 19 Oct 2023 19:23: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 4SBHgF0dB8z3cGK; Thu, 19 Oct 2023 19:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m8elSFZJ2t/clPr673sOSuw+VdWw3fo5OXyjncdFxr4=; b=LDrQHnaXr1pMyoXNdIQM8+nXySkGzTH7wC8ApAFG67ljyGjy3HIJRSuBd3JsLAr5CY0sqZ 8Vc/hd8DKaIXFZtGEiIhnH8D/P5S6uWPF00eVl6P0EeECKTzDOj1djHwRLK0FsS+Xgas8P Ig5/735omHNp9Buva2lAkk5ZJ6wD8jUIw6X5xYcGAR7qVQwYALGacr3kcqRgisG4hnWqWQ IR58QdVoq8dbCVL49id/mqrveS2oIRNDXpKmiO3HZH7cKZRp00iEKr0KTh2/TPlhgAD9UF lUmDiq5FfIS3H3acF5oUV0jidvKy3xHA18VnPSLIyfnAvgS4V6FX/ac3/sqJ9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697743385; a=rsa-sha256; cv=none; b=v+cGcN1i8EDJmWAk0CJ08SfcCoexKutorcFkbar/hSbeP67cCw7PgBPVe2vO2ln1cYhx0o +ooyCaTesHL9mygCi5PuJydZYu9rc90kjORH0N5R6/GOiLnF5iFIu97UPvRLANHBSeiYxw 9o5iKZgUdjtiezz/ch7WN7e/cAYB1RSMO9m3oxbOHVrMNgEKTI1Ulj3/AFys/K4PyNbH1l ueFF4Y6ekb+n9M7eQiAQuwEoWYm9Uow/a2U39+YYVoLiIwepVjEmGXxwqNmMnSTsk7sz/L KzcjYc7+fEak7lUcKKWc44wfFoXDBKnALcX49W7zlzX7FxnNLQi5WAFhgIk/eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m8elSFZJ2t/clPr673sOSuw+VdWw3fo5OXyjncdFxr4=; b=W30qfV2HnSsu/VvZOkjv3964bhB4rfMnvELwAshUZPUT1TFnWkAmxUgnvFyc8iXUiKJkoV HMVymXP/UfhTOQnJtlqYBd8V6pFu+LnLkPke1XIM1XGFx3P3v37E1isCmRWDmHFVoydnQ0 nTadGWyqQn1HZpEzhPext7bUTfc+fb+aGce2h/HQyi4f/dS/5gZtJ52ETOGlGhmlNyTPM8 XjIB65xm4uIf+10fUs3qYVjRfhbAbtX1bZLjf2UPw++THJStLNVs9S8GgVtDR2jv9PLdfl itQhZTXa3G3FIftVmcLWPUFPrQpELDgupyo1B4NHwIDW3kSkb1eqFrVOCE6Lmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBHgD6pFnz12MT; Thu, 19 Oct 2023 19:23: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 39JJN4xN076741; Thu, 19 Oct 2023 19:23:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JJN4mh076738; Thu, 19 Oct 2023 19:23:04 GMT (envelope-from git) Date: Thu, 19 Oct 2023 19:23:04 GMT Message-Id: <202310191923.39JJN4mh076738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 18bce76c334d - releng/14.0 - mkimg: Regenerate all the tests for gpt List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 18bce76c334d47ba229964c70faf252f4e5c20a1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=18bce76c334d47ba229964c70faf252f4e5c20a1 commit 18bce76c334d47ba229964c70faf252f4e5c20a1 Author: Warner Losh AuthorDate: 2023-10-18 15:23:41 +0000 Commit: Warner Losh CommitDate: 2023-10-19 18:37:49 +0000 mkimg: Regenerate all the tests for gpt Recent changes to mkimg has changed the generated GPT images to be more correct. Use make rebase to regenerate the baseline. Sponsored by: Netflix (cherry picked from commit d2abbfede5342b19f3e5994140cdb6622c95ef66) (cherry picked from commit 524225dde0b5a4f346644670f22fcd11fe13c1f2) Approved-by: re (cperciva) --- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex | 1085 ++++++++++---------- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex | 61 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex | 1089 +++++++++++---------- usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex | 61 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex | 1085 ++++++++++---------- usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex | 569 +++++------ usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex | 1089 +++++++++++---------- usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex | 51 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex | 43 +- usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex | 569 +++++------ 28 files changed, 3798 insertions(+), 3754 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex index a974400ad2e8..ae764c000ae7 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex @@ -1,5 +1,6 @@ +# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 20 00 |.............B .| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * @@ -7,569 +8,573 @@ 00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| 00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * -00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| -00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| -00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| -00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| -00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| -00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| -00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| -00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| -00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| -00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| -000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| -000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| -000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| -000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| -000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| -000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| -00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| -00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| -00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| -00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| -00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| -00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| -00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| -00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| -00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| -00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| -000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| -000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| -000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| -000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| -000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| -000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| -00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| -00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| -00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| -00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| -00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| -00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| -00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| -00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| -00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| -00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| -000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| -000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| -000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| -000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| -000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| -000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| -00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| -00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| -00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| -00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| -00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| -00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| -00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| -00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| -00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| -00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| -000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| -000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| -000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| -000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| -000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| -000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| -00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| -00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| -00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| -00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| -00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| -00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| -00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| -00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| -00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| -00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| -000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| -000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| -000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| -000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| -000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| -000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| -00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| -00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| -00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| -00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| -00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| -00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| -00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| -00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| -00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| -00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| -000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| -000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| -000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| -000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| -000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| -000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| -00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| -00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| -00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| -00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| -00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| -00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| -00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| -00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| -00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| -00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| -000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| -000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| -000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| -000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| -000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| -000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| -00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| -00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| -00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| -00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| -00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| -00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| -00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| -00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| -00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| -00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| -000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| -000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| -000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| -000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| -000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| -000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| -00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| -00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| -00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| -00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| -00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| -00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| -00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| -00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| -00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| -00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| -000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| -000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| -000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| -000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| -000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| -000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| -00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| -00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| -00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| -00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| -00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| -00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| -00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| -00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| -00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| -00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| -000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| -000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| -000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| -000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| -000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| -000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| -00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| -00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| -00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| -00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| -00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| -00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| -00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| -00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| -00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| -00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| -00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| -00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| -00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| -00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| -00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| -00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| -00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| -00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| -00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| -00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| -00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| -00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| -00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| -00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| -00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| -00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| -00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| -00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| -00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| -00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| -00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| -00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| -00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| -00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| -00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| -00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| -00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| -00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| -00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| -00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| -00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| -00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| -00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| -00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| -00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| -00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| -00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| -00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| -00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| -00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| -00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| -00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| -00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| -00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| -00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| -00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| -00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| -00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| -00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| -00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| -00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| -00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| -00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| -00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| -00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| -00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| -00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| -00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| -00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| -00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| -00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| -00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| -00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| -00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| -00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| -00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| -00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| -00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| -00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| -00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| -00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| -00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| -00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| -00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| -00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| -00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| -00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| -00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| -00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| -00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| -00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| -00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| -00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| -00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| -00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| -00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| -00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| -00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| -00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| -00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| -00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| -00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| -00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| -00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| -00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| -00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| -000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| -000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| -000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| -000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| -000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| -000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| -00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| -00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| -00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| -00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| -00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| -00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| -00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| -00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| -00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| -00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| -000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| -000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| -000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| -000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| -000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| -000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| -00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| -00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| -00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| -00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| -00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| -00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| -00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| -00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| -00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| -00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| -000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| -000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| -000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| -000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| -000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| -000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| -00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| -00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| -00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| -00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| -00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| -00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| -00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| -00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| -00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| -00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| -000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| -000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| -000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| -000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| -000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| -000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| -00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| -00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| -00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| -00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| -00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| -00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| -00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| -00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| -00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| -00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| -000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| -000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| -000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| -000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| -000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| -000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| -00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| -00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| -00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| -00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| -00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| -00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| -00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| -00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| -00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| -00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| -000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| -000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| -000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| -000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| -000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| -000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| -00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| -00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| -00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| -00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| -00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| -00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| -00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| -00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| -00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| -00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| -000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| -000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| -000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| -000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| -000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| -000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| -00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| -00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| -00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| -00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| -00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| -00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| -00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| -00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| -00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| -00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| -000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| -000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| -000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| -000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| -000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| -000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| -00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| -00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| -00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| -00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| -00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| -00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| -00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| -00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| -00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| -00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| -000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| -000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| -000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| -000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| -000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| -000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| -00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| -00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| -00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| -00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| -00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| -00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| -00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| -00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| -00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| -00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| -000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| -000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| -000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| -000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| -000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| -000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| -00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| -00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| -00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| -00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| -00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| -00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| -00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| -00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| -00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| -00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| -00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| -00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| -00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| -00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| -00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| -00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| -00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| -00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| -00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| -00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| -00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| -00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| -00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| -00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| -00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| -00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| -00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| -00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| -00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| -00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| -00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| -00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| -00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| -00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| -00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| -00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| -00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| -00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| -00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| -00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| -00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| -00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| -00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| -00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| -00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| -00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| -00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| -00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| -00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| -00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| -00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| -00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| -00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| -00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| -00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| -00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| -00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| -00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| -00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| -00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| -00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| -00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| -00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| -00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| -00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| -00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| -00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| -00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| -00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| -00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| -00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| -00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| -00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| -00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| -00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| -00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| -00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| -00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| -00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| -00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| -00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| -00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| -00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| -00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| -00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 00 00 |......P.........| +00002010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00002020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 |..............`.| +00002030 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| +00002040 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| +00002050 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| +00002060 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| +00002070 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| +00002080 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| +00002090 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| +000020a0 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| +000020b0 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| +000020c0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| +000020d0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| +000020e0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| +000020f0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| +00002100 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| +00002110 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| +00002120 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| +00002130 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| +00002140 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| +00002150 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| +00002160 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| +00002170 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| +00002180 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| +00002190 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| +000021a0 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| +000021b0 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| +000021c0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| +000021d0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| +000021e0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| +000021f0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| +00002200 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| +00002210 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| +00002220 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| +00002230 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| +00002240 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| +00002250 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| +00002260 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| +00002270 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| +00002280 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| +00002290 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| +000022a0 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| +000022b0 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| +000022c0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| +000022d0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| +000022e0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| +000022f0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| +00002300 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| +00002310 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| +00002320 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| +00002330 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| +00002340 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| +00002350 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| +00002360 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| +00002370 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| +00002380 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| +00002390 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| +000023a0 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| +000023b0 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| +000023c0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| +000023d0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| +000023e0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| +000023f0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| +00002400 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| +00002410 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| +00002420 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| +00002430 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| +00002440 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| +00002450 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| +00002460 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| +00002470 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| +00002480 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| +00002490 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| +000024a0 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| +000024b0 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| +000024c0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| +000024d0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| +000024e0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| +000024f0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| +00002500 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| +00002510 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| +00002520 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| +00002530 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| +00002540 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| +00002550 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| +00002560 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| +00002570 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| +00002580 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| +00002590 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| +000025a0 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| +000025b0 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| +000025c0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| +000025d0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| +000025e0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| +000025f0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| +00002600 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| +00002610 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| +00002620 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| +00002630 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| +00002640 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| +00002650 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| +00002660 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| +00002670 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| +00002680 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| +00002690 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| +000026a0 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| +000026b0 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| +000026c0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| +000026d0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| +000026e0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| +000026f0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| +00002700 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| +00002710 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| +00002720 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| +00002730 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| +00002740 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| +00002750 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| +00002760 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| +00002770 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| +00002780 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| +00002790 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| +000027a0 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| +000027b0 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| +000027c0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| +000027d0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| +000027e0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| +000027f0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| +00002800 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| +00002810 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| +00002820 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| +00002830 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| +00002840 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| +00002850 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| +00002860 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| +00002870 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| +00002880 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| +00002890 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| +000028a0 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| +000028b0 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| +000028c0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| +000028d0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| +000028e0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| +000028f0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| +00002900 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| +00002910 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| +00002920 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| +00002930 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| +00002940 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| +00002950 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| +00002960 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| +00002970 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| +00002980 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| +00002990 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| +000029a0 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| +000029b0 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| +000029c0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| +000029d0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| +000029e0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| +000029f0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| +00002a00 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| +00002a10 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| +00002a20 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| +00002a30 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| +00002a40 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| +00002a50 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| +00002a60 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| +00002a70 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| +00002a80 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| +00002a90 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| +00002aa0 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| +00002ab0 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| +00002ac0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| +00002ad0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| +00002ae0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| +00002af0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| +00002b00 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| +00002b10 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| +00002b20 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| +00002b30 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| +00002b40 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| +00002b50 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| +00002b60 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| +00002b70 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| +00002b80 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| +00002b90 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| +00002ba0 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| +00002bb0 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| +00002bc0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| +00002bd0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| +00002be0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| +00002bf0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| +00002c00 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| +00002c10 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| +00002c20 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| +00002c30 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| +00002c40 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| +00002c50 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| +00002c60 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| +00002c70 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| +00002c80 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| +00002c90 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| +00002ca0 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| +00002cb0 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| +00002cc0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| +00002cd0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| +00002ce0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| +00002cf0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| +00002d00 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| +00002d10 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| +00002d20 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| +00002d30 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| +00002d40 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| +00002d50 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| +00002d60 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| +00002d70 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| +00002d80 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| +00002d90 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| +00002da0 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| +00002db0 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| +00002dc0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| +00002dd0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| +00002de0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| +00002df0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| +00002e00 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| +00002e10 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| +00002e20 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| +00002e30 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| +00002e40 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| +00002e50 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| +00002e60 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| +00002e70 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| +00002e80 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| +00002e90 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| +00002ea0 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| +00002eb0 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| +00002ec0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| +00002ed0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| +00002ee0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| +00002ef0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| +00002f00 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| +00002f10 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| +00002f20 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| +00002f30 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| +00002f40 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| +00002f50 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| +00002f60 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| +00002f70 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| +00002f80 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| +00002f90 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| +00002fa0 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| +00002fb0 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| +00002fc0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| +00002fd0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| +00002fe0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| +00002ff0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| +00003000 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| +00003010 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| +00003020 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| +00003030 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| +00003040 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| +00003050 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| +00003060 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| +00003070 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| +00003080 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| +00003090 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| +000030a0 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| +000030b0 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| +000030c0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| +000030d0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| +000030e0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| +000030f0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| +00003100 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| +00003110 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| +00003120 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| +00003130 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| +00003140 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| +00003150 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| +00003160 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| +00003170 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| +00003180 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| +00003190 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| +000031a0 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| +000031b0 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| +000031c0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| +000031d0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| +000031e0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| +000031f0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| +00003200 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| +00003210 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| +00003220 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| +00003230 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| +00003240 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| +00003250 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| +00003260 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| +00003270 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| +00003280 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| +00003290 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| +000032a0 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| +000032b0 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| +000032c0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| +000032d0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| +000032e0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| +000032f0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| +00003300 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| +00003310 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| +00003320 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| +00003330 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| +00003340 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| +00003350 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| +00003360 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| +00003370 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| +00003380 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| +00003390 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| +000033a0 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| +000033b0 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| +000033c0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| +000033d0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| +000033e0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| +000033f0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| +00003400 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| +00003410 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| +00003420 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| +00003430 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| +00003440 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| +00003450 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| +00003460 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| +00003470 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| +00003480 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| +00003490 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| +000034a0 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| +000034b0 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| +000034c0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| +000034d0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| +000034e0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| +000034f0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| +00003500 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| +00003510 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| +00003520 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| +00003530 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| +00003540 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| +00003550 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| +00003560 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| +00003570 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| +00003580 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| +00003590 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| +000035a0 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| +000035b0 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| +000035c0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| +000035d0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| +000035e0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| +000035f0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| +00003600 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| +00003610 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| +00003620 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| +00003630 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| +00003640 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| +00003650 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| +00003660 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| +00003670 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| +00003680 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| +00003690 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| +000036a0 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| +000036b0 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| +000036c0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| +000036d0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| +000036e0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| +000036f0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| +00003700 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| +00003710 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| +00003720 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| +00003730 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| +00003740 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| +00003750 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| +00003760 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| +00003770 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| +00003780 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| +00003790 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| +000037a0 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| +000037b0 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| +000037c0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| +000037d0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| +000037e0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| +000037f0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| +00003800 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| +00003810 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| +00003820 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| +00003830 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| +00003840 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| +00003850 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| +00003860 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| +00003870 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| +00003880 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| +00003890 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| +000038a0 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| +000038b0 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| +000038c0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| +000038d0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| +000038e0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| +000038f0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| +00003900 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| +00003910 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| +00003920 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| +00003930 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| +00003940 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| *** 7605 LINES SKIPPED *** From nobody Thu Oct 19 19:23:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBHgG4hT4z4xnBj; Thu, 19 Oct 2023 19:23: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 4SBHgG1Z9Mz3cjl; Thu, 19 Oct 2023 19:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvyfNBDH/9gTFemfqzMs1rzUkCMlHVvHIoAQSQFoU18=; b=FE1JgsJBqQGyT01MqvWANRi10duhjORYp+S1cTavd9Y7g9aTHs6QA96TwCUXGD7rqz7rmB C3NGwzJF/yAf6cPJA7nA42Mw/n3R5GofsNsZr5Jhui0du0lIgykkj3OlD2NWn41SZsgFJ0 K6ymZtwHISfWavnryMO31RmRYoxhPnhYNRLsjEWo9WDw5/98HDD12NGeuCugryGZ2N2U9A U3fjw/2LUlfpqeDpnTocXYuQGwNaXlFzI0maMDHe6RmCKmKTPMJM1MFpKGHQv0GtOqKW5r Z4k9N8x0WjuMwqDKAM8lFaOnLKfebg0GxTIGsDQO8lwAEVVbgrv1n6SYstGzxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697743386; a=rsa-sha256; cv=none; b=AU9SXGR5CAw2n563geII1/x351uJ+XKiYK42J7WELrvVIbSpuhaPZ3KyJ5l4cRqryxUgrY JJ/jq3qZrFMQm4jcSmE+ibbJwKbs6eQWPnpLKjc0id2hv+D03XaBsL9uCXD7yArz5HKpGp YbNMnuB+pVp5TsLINRYHbDQ80SjCg4gZEl0jB/+sQjXKii1qNNAN4JXxZ5HnW5NYPMH9Sv +dBhy7/9YpqTfcuP3mt7tUkw5D/0Fr/0BLuPBE8aJTw3LeJL4MdUjx06tH9kuKDbfdH1+U 0ha35NvzTlPP7lJkHKfNdGYPhrQ0TbUdpztFaDpZXpoqKx04YAxyYX+Su38izA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697743386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvyfNBDH/9gTFemfqzMs1rzUkCMlHVvHIoAQSQFoU18=; b=GaqSdcy/+bRCVJY95C9NUbtwIRvpTt68WSzo41bdo2I7oxuRZ+4tWPAAinDbM+Hg1uvBtk YGPLVRpVp4mmUzRTvnbn4ec3JNBHekvVE+RMPFMVKMED5P2Exi1gBnht4JufyKAmmQvhpm Z/s8RKb0+8ibX7ginXFqkbCqzUqwU/S3uNskQhkF3th7UU9+2wOwk1BScDLDkiI8WbLLwt GAOoxceOMV+ABNcE9eh44FoNmAMYDogmdftUivdqdXf7l7TC+TRM4C/C/KJj+CL8Y4kDOo fOLdqP6yhFDEGkKTmgcj+2TixL+Z7F5kZ1zmuvreIDs80d16fxwSle6K5IScAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBHgG0RBWz12bh; Thu, 19 Oct 2023 19:23: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 39JJN65C076783; Thu, 19 Oct 2023 19:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JJN5HL076780; Thu, 19 Oct 2023 19:23:05 GMT (envelope-from git) Date: Thu, 19 Oct 2023 19:23:05 GMT Message-Id: <202310191923.39JJN5HL076780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 84b71a48ea41 - releng/14.0 - Remove $FreeBSD$: one line sh-pattern List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 84b71a48ea415e35aad3bbc8c20f137ed4d0dd79 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=84b71a48ea415e35aad3bbc8c20f137ed4d0dd79 commit 84b71a48ea415e35aad3bbc8c20f137ed4d0dd79 Author: Jose Luis Duran AuthorDate: 2023-10-18 15:24:00 +0000 Commit: Warner Losh CommitDate: 2023-10-19 18:37:52 +0000 Remove $FreeBSD$: one line sh-pattern Remove the $FreeBSD$ pattern added to the tests, as well as fixing the mkimg_test.sh script to stop adding it when we rebase the tests. Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/870 (cherry picked from commit 3b5c9845727a1b95098379f66223525e85e8a73f) (cherry picked from commit 9ed4f43bc4c39dc5ed2ce1bf6003e4dcb4160bfc) Approved-by: re (cperciva) --- usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex | 1 - usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex | 1 - usr.bin/mkimg/tests/mkimg_test.sh | 4 +--- 29 files changed, 1 insertion(+), 31 deletions(-) diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex index ae764c000ae7..ab899b3e5ec2 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex index 7f79015b561f..a2d342d06a42 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex index 32fb00bc17cb..dae6b78a65f8 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex index 01ceaae1963c..0de167c0e198 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 f0 00 |....Wi2k.....B..| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex index 25e961888b80..bd8601eccc50 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex index aadd5841a58e..4d4542d9a686 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex index 1ff8880a897b..35b354c7310b 100644 --- a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex index 69bed4ff417c..510bbf80e208 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 90 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex index 7605a6561ee2..9a12f90cb5af 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex index 0d69daf7d37a..b464168daaa4 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex index 857c7ea3e4f0..796166f430ee 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 f0 00 |....Wi2k.....B..| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex index 76e76c3155c9..93b291550be0 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex index cde7a4953009..1aef760fa90a 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex index 044e0bc66181..51da710db535 100644 --- a/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex index ae764c000ae7..ab899b3e5ec2 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 a0 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex index 7f79015b561f..a2d342d06a42 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex index 32fb00bc17cb..dae6b78a65f8 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex index c3b9496e2870..0103906c9fa2 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 7d 82 00 |....Wi2k.....}..| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex index 6b4ec6c575d6..36210d5dd44d 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex index aadd5841a58e..4d4542d9a686 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex index 2a44596b10fe..bf6ba8b9560e 100644 --- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex index 69bed4ff417c..510bbf80e208 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 90 00 |.............B..| 00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex index 7605a6561ee2..9a12f90cb5af 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| 00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex index 0d69daf7d37a..b464168daaa4 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex index 31451cfb320e..94fbb99cbdb9 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| 00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| 00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 7d 82 00 |....Wi2k.....}..| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex index dbaed6ce1606..3ee432909549 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| * 000001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex index cde7a4953009..1aef760fa90a 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex index 2ec42edb497d..8311d98ee9c0 100644 --- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex +++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex @@ -1,4 +1,3 @@ -# $FreeBSD$ 00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| 00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| 00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| diff --git a/usr.bin/mkimg/tests/mkimg_test.sh b/usr.bin/mkimg/tests/mkimg_test.sh index 74680c5d2be7..7c6593b219ef 100755 --- a/usr.bin/mkimg/tests/mkimg_test.sh +++ b/usr.bin/mkimg/tests/mkimg_test.sh @@ -86,9 +86,7 @@ mkimg_rebase() fi if test $update = yes; then - # Prevent keyword expansion when writing the keyword. - (echo -n '# $'; echo -n FreeBSD; echo '$') > $baseline - cat $result >> $baseline + cat $result > $baseline fi rm $image $result _tmp-* From nobody Thu Oct 19 19:47:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBJCl4952z4xpPk; Thu, 19 Oct 2023 19:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBJCl2bxRz3g9m; Thu, 19 Oct 2023 19:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697744867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrvjqynIbY7Vudax4LNCNQTNTImLYBJjLma8ezEmq1s=; b=nCcMaJrx/CbR8ihsAKztTEnXa1bkXEXvCqVv5wt8BhXQTX+G1VnRMe65dlSesFSH1xZ7Ao QG7d5wrK1Ak30fHEL0Qj8SccHO9UKcpQaZv7xtzuXv96PXb4Iz4yJRp0KP4WPuV9Lx1MQA g53loyinN0HN+90qdcpZylLEXA1vnk36/1Cngo54WJALmz0O+t71wAF9gytR7/pgOMNbfp zsDWhHZDGQnZZ6gELSxjXi8qTPk1O9idR0fgAsDP0CL+ANUEsb5/hMSYFKsNGVaGLf9cCC JvJ78NebyWmwSjjW4VU3evdt/BH3Ss/xzse0zBBUF7R3YceNjSSeC/L0Mbuj0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697744867; a=rsa-sha256; cv=none; b=YANlBSiN+OYEpdZEkwpkM2Ew/NvNvBMGD7qTn2OkSHV9Vy/04srBuBZoIRD9+0T7chlh1y Iq/0FL90OB8l6aXyjzwvgHpMwjk2UQ6u69DurqrXUmza4DseeRqJk6/9NkaiL8IXCH+mgC TamI1AiWmzLHzTYkwKLPM31XBbiIvVurWekZsO41+gyCpSPy1d8Ouzi+So1WypoCl7C/w8 IabRi+9Q4Jjyfr2Z9s0/VAx2p2I7JANcBZlpdLqZwdtWQ+SlqRpWv5YT8IBhwCMvIWP+Fo j2cKneQnvsE4amUYT8a3EJgM21zk/JXKp1GrAQwF63Qa3jFINikygmKIJj0uEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697744867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrvjqynIbY7Vudax4LNCNQTNTImLYBJjLma8ezEmq1s=; b=aq9UlQxBSZWv4mM7OSXDp3pl9tqc29sLS4+vbXhkHuUm9WLnv5XDCIhHIjw7DDdniW9c45 ktF7NzyhE6jTjcI8lYGtaUbNQk0STO6PQnnrohUIJrWvIXuOtxzoB04Z7A1BMdTia6MzmA mGLyotnjCEtVTMXdSZGowbBGRBywXxREg4qcSifWtv6L8M3FHD1ssO8QdEbnwwI81goefa MJ6wULktKlIRwG0buCkAsexml6OJ9id95NsMcNeW1DzWHptSXBUIqv4iqdYp52rSfkUUqU vu5Yv5ho9TdNvNMFaeBLeCnHwQwGkmCQm+mu47YR54RwXFaJb+p+544bK/LYSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBJCl1V3Sz131f; Thu, 19 Oct 2023 19:47:47 +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 39JJllFm010876; Thu, 19 Oct 2023 19:47:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JJllgc010873; Thu, 19 Oct 2023 19:47:47 GMT (envelope-from git) Date: Thu, 19 Oct 2023 19:47:47 GMT Message-Id: <202310191947.39JJllgc010873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bfbb28f3b1b6 - stable/14 - bsdinstall partedit: Apply changes from scripted installs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bfbb28f3b1b659805364eea580033b4b3afcc0eb Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfbb28f3b1b659805364eea580033b4b3afcc0eb commit bfbb28f3b1b659805364eea580033b4b3afcc0eb Author: John Baldwin AuthorDate: 2023-10-16 22:13:31 +0000 Commit: John Baldwin CommitDate: 2023-10-19 18:59:57 +0000 bsdinstall partedit: Apply changes from scripted installs I got a check inverted in a previous cleanup commit and as a result partedit was only applying GEOM changes (and generating an /etc/fstab) if it got an error reading the current GEOM mesh. Instead, it needed to do those actions if it succeeded in reading the mesh. The lack of /etc/fstab meant that bsdinstall mount didn't mount anything in a scripted install. PR: 273723 Reported by: Andrey Fesenko Reported by: Michal Nowak Reviewed by: cognet, brooks Fixes: 230990991965 bsdinstall: Handle errors from geom_gettree. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42236 (cherry picked from commit 5307bbcc038f878b4b3714f03a2c824a0caeba4f) --- usr.sbin/bsdinstall/partedit/partedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 6579c22f6068..3c5f552a935c 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -215,7 +215,7 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (error != 0) { + if (error == 0) { if (validate_setup()) { error = apply_changes(&mesh); } else { From nobody Thu Oct 19 20:43:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBKRZ48Tvz4xrmf; Thu, 19 Oct 2023 20:43: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 4SBKRZ3d0Yz4Hf9; Thu, 19 Oct 2023 20:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697748186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hlpmzCo2EplzHATMqhVqTohJTPg7kabeiXltyWkutg=; b=BDxaDwVa68hSXVjLL9zaT8OPs+SltakSmOMEkSJphSGrb8FjO97aIidP51Uu6D5ipcP9gT gcSElDqGWNKct2eGnw4Q5tsjwrjHto+t9n+vCZESSriT50fYBkEu7MvELDAyr/7YoMR8fO 5AHmg4Oq+tBrUgEjWXu7xI7+EX+5FH96sNo4ZBxFYHj2u0Szf51NJSfVucMAC7f0DogGhp 6lefN/wtU1M7xolRZX84x5WQsF/gIVDPbURY3q5IPgDWUD5qEuz8xyRGmgv7t1B5yT84zX fQlQq2cgsdVTSG15CPAh4EWds6x9efKDSoleE91iXpiqBkxKUvsSRVIMZMCDxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697748186; a=rsa-sha256; cv=none; b=vB18YPA/oz5W9Kw+KK+J6SSU39Y1/MX9nq181rB+ELgwpVZDoUOUkaLT8jnxuH0ce8FT7l W1V3tfKBhWK85v69VO4ndyIJyqMFrvY40DC7rF5GsmppFlL8nGp4A+mYkDzKpcaalFOGFl FOiWWlY7GPjd/5fQ5OKCXOKliNE3ictLVYJF3i2wRACX8w9Oc0E+SO9p/Qn6UDlk9G31+0 uYq96VIdSsUBVm+mcNQ+LAuzV4rnf9qc4s2T0jcOtIKe6ZE/AixNBWSeldObcEPCdfDE9I 05pYGpu2Pb3u4sv25+0VREFLLg+oGTfZrER0gX9RVSyQr6EJbK9JMFKNcXhT6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697748186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hlpmzCo2EplzHATMqhVqTohJTPg7kabeiXltyWkutg=; b=vpXO0yTxo7C5TmfEVpAUpCg5sQsFWNXxU8Go4FetjkAuBLgNbPD6OWMpJbm52769nOfCV5 +ZDZ/+S+1eil+DQP9qN3U3vf4xVh+3AIKkfeIX6zY9SltsQeP9rK3h8o1tmVqDLuZ6VA2W i6bYSUHT/3QoZzJzO8CVtTaQ8jRb3ZFBvmvEn5k+OBTGhHbgDlw+4y7pPF9iS2Bn9T92qm 6pzrTeFNEV50D1ZaRxNSNOZBMPrQeNVZZEumJ44EqiY6erR5/RFD91Hz2vHznyUjsm6ZDz QVJgE/0v0aDcOJ2VwLzGahYHlGSuEDtOyI/F/57iBm1rnPwh7jjCcyEVbcwEFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBKRZ2kMXz14bJ; Thu, 19 Oct 2023 20:43: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 39JKh6PD009389; Thu, 19 Oct 2023 20:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JKh6mq009386; Thu, 19 Oct 2023 20:43:06 GMT (envelope-from git) Date: Thu, 19 Oct 2023 20:43:06 GMT Message-Id: <202310192043.39JKh6mq009386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 929e4723c3f5 - releng/14.0 - bsdinstall partedit: Apply changes from scripted installs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5 commit 929e4723c3f5e66dd98fe3f342c6ec393c8eb9a5 Author: John Baldwin AuthorDate: 2023-10-16 22:13:31 +0000 Commit: John Baldwin CommitDate: 2023-10-19 20:42:35 +0000 bsdinstall partedit: Apply changes from scripted installs I got a check inverted in a previous cleanup commit and as a result partedit was only applying GEOM changes (and generating an /etc/fstab) if it got an error reading the current GEOM mesh. Instead, it needed to do those actions if it succeeded in reading the mesh. The lack of /etc/fstab meant that bsdinstall mount didn't mount anything in a scripted install. PR: 273723 Reported by: Andrey Fesenko Reported by: Michal Nowak Reviewed by: cognet, brooks Fixes: 230990991965 bsdinstall: Handle errors from geom_gettree. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42236 (cherry picked from commit 5307bbcc038f878b4b3714f03a2c824a0caeba4f) (cherry picked from commit bfbb28f3b1b659805364eea580033b4b3afcc0eb) Approved by: re (gjb) --- usr.sbin/bsdinstall/partedit/partedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 6579c22f6068..3c5f552a935c 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -215,7 +215,7 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (error != 0) { + if (error == 0) { if (validate_setup()) { error = apply_changes(&mesh); } else { From nobody Thu Oct 19 21:24:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLLp6vr2z4xtkF; Thu, 19 Oct 2023 21:24: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 4SBLLp6Lwdz4Lbd; Thu, 19 Oct 2023 21:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uS0lEeP0wGPVKiVWjQcWRetVU2rBPManr4Td6XmcxIA=; b=DB76ZD9ex2V8j4+wfnCG3YuAS9g8vaDl+13e/+zbfdVp4FRd54S+6b1L0dSgqxXg8Ndfc8 VjqnWWLS44j4FDzlGuA1vLt3ulmApi0Gk/sKtHkcWdNJI76xtgwTQkDQxRXT82HGpBrQT/ /7yf1fT3Cx5f6fotSY5tMutIS0hqU1J8gMhGAobk36p5mp4sxLS4F+Gx/og8jMMS4k2LUJ 2fHnBKKsuzLpEvsK3bawBSg6RPJX0P9r1n6l4NJCXwGY0alB5PGyKd4ZG0TsweW0rfmEAn Xjz+ONc1Y/6hoJ1TDOIWO2xuOuBMHWDAIUn3Mwx82RyZsCDVRODviQfAMjoF4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697750642; a=rsa-sha256; cv=none; b=baTvbx7CS/sEUXJqRmGgTUo/EL7Ysl+PLzO7pLT34lbxpAdnDlvRuuFGFWngmcZdHxOa5F 5a6EdfmBGxsVV26hI/pIQdo04CPTd/KqnQR01YQtilDRNQGayBImbXkGOVqDOOAxlJbBS8 PXY9edZc2uAvZ9svMP9NkGJjUU5ZZC6nkGIO1ld7+5Xqy9z2DdMtvuLSS5/wCbfUcWXa9m 3jXhUku2h22FxXPSOgP5K/5VuGDvchl6anJZoaI8jO4w2dCOrABlR6oXhA6oPpxCg/5R3r RvVL32bNycLkoHzbuTh7GYiHaV88qfwFPxjEJQfw9ZPLTluZAZrDDUtXEY2X9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uS0lEeP0wGPVKiVWjQcWRetVU2rBPManr4Td6XmcxIA=; b=CgPSLOfj+IlmvlT7WRE5rMwMdJOFjv+ozAuTqlan3keYCDE4g5eAMEPFq/wv/dvR1Jypdh 9yqIxa9cyOjZMuA/lZ8pwgTGfziv/TFcbLphvXWi29DlLk8ZcREUxiOmyatXWXZrH+TKAf 4WyCtUxjmswfol/32BtoPm3ogdCOrK4IZ9SKdevtfpGYeUkbYCgq7tmmFg7XaMrnt+rlPl bIhdH1OhZTSzIFbx/ShAb5Nw+ppO3ktCxHzggKc+QVbp/IQyfb8hzapx9EO4du9sq3dgui /5mODOUnxRrKLKAvQBkmoT7dd45Zk3Efvl5xW1y6ymG4MdaK8l3yRc6bzbeuQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLLp5PHkz14dX; Thu, 19 Oct 2023 21:24: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 39JLO2fY076695; Thu, 19 Oct 2023 21:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLO22g076692; Thu, 19 Oct 2023 21:24:02 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:24:02 GMT Message-Id: <202310192124.39JLO22g076692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 1ad148a68ae7 - stable/14 - smartpqi: Drop spinlock before freeing memory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ad148a68ae74f3372b12b6e66fadf5ade384144 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad148a68ae74f3372b12b6e66fadf5ade384144 commit 1ad148a68ae74f3372b12b6e66fadf5ade384144 Author: John F. Carr AuthorDate: 2023-10-19 03:25:31 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:21:11 +0000 smartpqi: Drop spinlock before freeing memory pqisrc_free_device frees the device softc with the os spinlock held. This causes crashes when devices are removed because the memory free might sleep (which is prohibited with spin locks held). Drop the spinlock before releasing the memory. MFC After: 2 days PR: 273289 Reviewed by: imp (cherry picked from commit b064a4c9eed5b1dd2a40fc4fd2cb7e738b681547) --- sys/dev/smartpqi/smartpqi_discovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index 7e084a81cd89..ac37c2233762 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1671,11 +1671,11 @@ pqisrc_free_device(pqisrc_softstate_t * softs, pqi_scsi_dev_t *device) pqisrc_delete_softs_entry(softs, device); DBG_NOTE("Removed memory for device : B %d: T %d: L %d\n", device->bus, device->target, device->lun); + OS_RELEASE_SPINLOCK(&softs->devlist_lock); pqisrc_device_mem_free(softs, device); + } else { + OS_RELEASE_SPINLOCK(&softs->devlist_lock); } - - OS_RELEASE_SPINLOCK(&softs->devlist_lock); - } From nobody Thu Oct 19 21:24:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLLr1mcjz4xt36; Thu, 19 Oct 2023 21:24: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 4SBLLr0Cn2z4LW9; Thu, 19 Oct 2023 21:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wqVbkE9GX95KNC4cr0kPjlWALYCCFDOQJWqpOAZWr0=; b=qM0IIEO4gCcUbP69p+5DCsJmiXqr0FEHYf+n/YJJ68+ucu+MOz+FoSeT7xNL1wTRwWta3E V8Jdj1AkacNm6ImPIV5U+oGXifHRdHZrGmpOskFVUf15xM2wkwSTsJKGoX/lcPEoqs0q9Y HUVe/VdVVjQ4WZ7A2uST2IQoE//UK/l49iTbBDhrNhH+Ehx+6iMnsKLB8i49eWbk2ByFMk rEVtina2CpEDyD+J+4nfHj8Eq4XkR822+zf4Jp95RB7eV3jAEK/TU+X+HJrUdpYvVQ7j63 E6c6HbGxfPe0wJz8Ccpj0xIEb5e3kxVXY+fz25zFfRv74aV8Q3zxEY3HK2yHVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697750644; a=rsa-sha256; cv=none; b=o9R8IwdFgJ+7BBsNES63CaXpqOy2xlEnY/nf2uNGayzTM5+5F4jwcz74juwuv1G7td1aP6 tZvVf7cNcXi2drRXI6F9FY4okDmji8XOhGjAAW2JE+obVshTVw8OjSV9hU1yfpKkU+F9vM lGUcDjRbT3Qqwn0C9FE5dIxoV6xAfyIBP4Kb3dv3lCKdI3J8hJ439JntbTEqUenx+Iv/AX iONGVD5Hup/AwU2G5d8SOdgXWkxFFBbP0yReIrAJtRLY9g5ajM64gs9kNxe6Si18/5ZwRa APegXzjV8YWz7x8C2eKtENgL/JgGpqMwZcd4b3LO//BzutWBybViRJi87OGJUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wqVbkE9GX95KNC4cr0kPjlWALYCCFDOQJWqpOAZWr0=; b=RPPo5IKMzB2PvKvnbRAy5D0ehkOxwIpKanqkERnkr5G1tQ/g0dhqs6lNQqcMhyXX7qU+U2 0MREBekgYemYSq2cRQmOIPN+B6o8rPzKxpzQGkzjI877AV0RXZkRyGGG5h6TXYxO/BfUFp NnWl9UZREScC5su0pwYLjY4470yKoyrhdoiyfRVPWNqYFPxNMdnqlBkDcpwYK03zxDgBoG shKt5JN9FhRhFbJp47goy5aBgzUlEKxAykDh+0YL6E48UUcRMcaD6BhEZah/0ui7I9d7BQ jlq79Epi0OZe8dIsHrWW3BrXN3hekcriCK/ec02/0KTQ7nXBoI4HkNcY6TXWpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLLq6PQyz15f3; Thu, 19 Oct 2023 21:24: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 39JLO3IP076740; Thu, 19 Oct 2023 21:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLO3bK076737; Thu, 19 Oct 2023 21:24:03 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:24:03 GMT Message-Id: <202310192124.39JLO3bK076737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 01619a8fafcf - stable/14 - smartpqi: Change alignment for dma tags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 01619a8fafcfd99d1811b2c14a92bac1a48c6d31 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=01619a8fafcfd99d1811b2c14a92bac1a48c6d31 commit 01619a8fafcfd99d1811b2c14a92bac1a48c6d31 Author: John Hall AuthorDate: 2023-10-19 03:25:32 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:21:11 +0000 smartpqi: Change alignment for dma tags Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash. Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert. Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions. Risk: Medium Exposure: This reverts a change first made to support NVMe drives on Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case. PR: 259541 Reported by: Ka Ho Ng Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41619 (cherry picked from commit f07b267d8cc87e88be3c78aa69504b5ebc6571ee) --- sys/dev/smartpqi/smartpqi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index e79a6f0a173f..402841bbf4d6 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -629,8 +629,8 @@ smartpqi_attach(device_t dev) * Create DMA tag for mapping buffers into controller-addressable space. */ if (bus_dma_tag_create(softs->os_specific.pqi_parent_dmat,/* parent */ - PAGE_SIZE, 0, /* algnmnt, boundary */ - BUS_SPACE_MAXADDR,/* lowaddr */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ (bus_size_t)softs->pqi_cap.max_sg_elem*PAGE_SIZE,/* maxsize */ From nobody Thu Oct 19 21:24:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLLs1vfRz4xtkV; Thu, 19 Oct 2023 21:24: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 4SBLLs167Cz4LyF; Thu, 19 Oct 2023 21:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqc8nJi+rcAucZ10vCGyx8YY8dcZm1CJBMa1B8ac/c=; b=s0cIvU6gZAEN1h95XgSffeDyl2bioVa4nzAvVUsdQP7ZEG+GRtQerXx5PMkkqPExrH6QMG xnWzzeHbmznkbyPTNY1PHiM+8SZj5LIKxHrB55lmhgsWp0a6RzHSR1tuGk5SEk3GZtqgkU cEJYk8PEU1vi9vYWO6Q/szmeiXn42vc7pnq2ZgJ4/eu6aLdxa0yk4R79R4IOZlVLA8s+r/ C/XSqGW8RsMvqBhthoeHyLskeKRh/gGoYWE+V1a+ekJlZpVfnLdu/Wb7rHE2nBMAwOIcfE RCgUOQ+8zzIsQlB6GMbRn+vnCV+MgoTCoVpPGasmwI7LU1yDrL1JlacmLvyo6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697750645; a=rsa-sha256; cv=none; b=Ip5KhD66pnJyB1URxhlXFHgmyakKkLT+hwBXZincNSa9WiOU8Zi51qgxiTDJspvp+zAaau NbuQ26wkWgGP+fhqmamnbCTFfy+bxh8doctSX/gdN3m8x+rdtfGbWNOrJryuLANnv9fusN w4AroU+cZkATCVMC6zqba/gQW/XjSgcxecLnR74j2aYBZ8UM1KtTL107vCEScgrXbgZRUn 8dlArTzwONH38gNtuIhp0KkEL53BtT4a2rBQXimi78l0XZzO8Tfz7PceL/4NzV3oXRPAHA z2Lo0zZlSjqzj3asfE/4vbt+y8Np+eCfFrHeEhdFFAr1bc0Cke8DUKw/pEKDAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqc8nJi+rcAucZ10vCGyx8YY8dcZm1CJBMa1B8ac/c=; b=U4i7fIdG24Gct874c0cRbjLOgczhysqA0qfAs4u45vpAKSsVuhQpFqVgfPvggz3iB4hct7 YK7gOiaUl+ZEDa2qitVQNTFbmmG2JxFSLEI96au69k33uclKornmR5lG7bugPqYvxae7pq hSZJcP6zxWUhZ6t73ExkaJB1Zk6CylCXYX91lguyyJ4mYeHw2rAIqhgoFp6L5FXIRQayio XGAsiLU+wgkgqF6i2MvhrALNfeuvakO8dngKKKVpRcH8Dt2nROue5YC9x+QxAOJztDYvUA oGB40rLjJliYfWMnrTQXnMd47zNy9RNKwEfwVdeI6jYy3mVtcz1NUJY8QrfsCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLLs059qz15f4; Thu, 19 Oct 2023 21:24: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 39JLO4xH076794; Thu, 19 Oct 2023 21:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLO4OL076791; Thu, 19 Oct 2023 21:24:04 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:24:04 GMT Message-Id: <202310192124.39JLO4OL076791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 10bbea2e25ef - stable/14 - mpi3mr: Move creation of watchdog to interupt config hook List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 10bbea2e25ef95936619b6522bbdeea2317e76a5 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=10bbea2e25ef95936619b6522bbdeea2317e76a5 commit 10bbea2e25ef95936619b6522bbdeea2317e76a5 Author: Sumit Saxena AuthorDate: 2023-10-19 21:15:50 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:21:12 +0000 mpi3mr: Move creation of watchdog to interupt config hook Move creation of watchdog process from just before we configure the interrupt config hook to into the config hook itself. This prevents it from racing the config intr hook and doing an extra reset of the card. This extra reset is usually harmless, but sometimes it can prevent discovery of devices if done at just the wrong time. This can lead to no disks being registered in a box full of disks, for example. Starting it later eliminates this race, making discovery reliable. Reviewed by: imp (cherry picked from commit 7e02c7074c4c6df77b860e0dbcd032a2ea04b98b) --- sys/dev/mpi3mr/mpi3mr_pci.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr_pci.c b/sys/dev/mpi3mr/mpi3mr_pci.c index d7278e5549e7..4935ac0d519c 100644 --- a/sys/dev/mpi3mr/mpi3mr_pci.c +++ b/sys/dev/mpi3mr/mpi3mr_pci.c @@ -307,6 +307,7 @@ static void mpi3mr_ich_startup(void *arg) { struct mpi3mr_softc *sc; + int error; sc = (struct mpi3mr_softc *)arg; mpi3mr_dprint(sc, MPI3MR_XINFO, "%s entry\n", __func__); @@ -314,8 +315,16 @@ mpi3mr_ich_startup(void *arg) mtx_lock(&sc->mpi3mr_mtx); mpi3mr_startup(sc); + mtx_unlock(&sc->mpi3mr_mtx); + error = mpi3mr_kproc_create(mpi3mr_watchdog_thread, sc, + &sc->watchdog_thread, 0, 0, "mpi3mr_watchdog%d", + device_get_unit(sc->mpi3mr_dev)); + + if (error) + device_printf(sc->mpi3mr_dev, "Error %d starting OCR thread\n", error); + mpi3mr_dprint(sc, MPI3MR_XINFO, "disestablish config intrhook\n"); config_intrhook_disestablish(&sc->mpi3mr_ich); sc->mpi3mr_ich.ich_arg = NULL; @@ -443,14 +452,6 @@ mpi3mr_pci_attach(device_t dev) goto load_failed; } - error = mpi3mr_kproc_create(mpi3mr_watchdog_thread, sc, - &sc->watchdog_thread, 0, 0, "mpi3mr_watchdog%d", - device_get_unit(sc->mpi3mr_dev)); - if (error) { - device_printf(sc->mpi3mr_dev, "Error %d starting OCR thread\n", error); - goto load_failed; - } - sc->mpi3mr_ich.ich_func = mpi3mr_ich_startup; sc->mpi3mr_ich.ich_arg = sc; if (config_intrhook_establish(&sc->mpi3mr_ich) != 0) { From nobody Thu Oct 19 21:41:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLkN5svjz4xvWw; Thu, 19 Oct 2023 21:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBLkN5MQYz4Q08; Thu, 19 Oct 2023 21:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIJlqx4jEqZ2JQcY8Vmbl+xM8h4us3hwkJSFQz1DO8o=; b=Ecd0ME2IUshRSpBf7MgUcYe+Q+Ji1ProqWqNoyjzqqdU4MyIs+TaYQw+r1vZQ92UY5pRw7 //ZwmGqv1fPudpWODnU85ndvv1FSDlRLp+lO9mcy/2AKrol4Q99wqWtVfeLrY2hlKwZE+j N2R5gwfYx03e0JpL7X3/noYXVIxJGLS1nCGv/SOE75qfVWdOsVyCfoAdQNpYMSuPIHzdkd H5cRXNWYKp6GXI0q79/YZuASpIkqbDrwqREj/VYnT8xA0LdQ7vZbRcLVawspaYRws6DSVL 2zMEpcZbX6/XyPhI9g+YUyxr3hYzeeeGimKE/FN/JPDj0gWbmJv4c16ZM4WIjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697751660; a=rsa-sha256; cv=none; b=rPxPmZwbKlJMJk94GjxgBG/7ATbBDmqX3LaT0SPtjP1hNOnjQ/jBeztIubp9R9bxOL0h+V FicKuzKz+oj7j+02jNiqlNPiL81eoZeJiL07+ynJ5bXyrwYYZ6iA/sWAv5pkNW0771glOo mSwhwD7csR9HVxEa5msBHBNBYji/jf2QvL9JC7TncJnundNwjhYzcUMIXLCLCHBFilo9GQ FaCJbaFSuLV9VacjWkIXBQ/BYv6SwhyoPYKjpYA2rZijDpzrDHzwY/UPNQJisvhApXQbOf O+kuo2w3zemiCMCIPnfNO3YoQk1rdncmxxgDDWoajafG4CJ35LDWdTt41Scxag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIJlqx4jEqZ2JQcY8Vmbl+xM8h4us3hwkJSFQz1DO8o=; b=Anmu+o9XjsySDWds6neEJ5BFhm7VnG7FG3YB8XvjykZQPVFnqND3OW328T2SEMoqaR5ZUA 9mAGuh8pKC//o3kFGXh0FIDj8qpI3wFOIfBchSNqTOr1/E6M5dkHdk1V4M+8DoTnweh+SK siOwtJjNliDqQR7qmCN5metbH7qpGnM8eDn3pWQtVgWJYwEQVZf1z11C+O7LmlzUPZPi8+ C0g9WxXHJEiQF71951tW+qjg/xxGy2DGK5KSiuo5CMnJ3ujziraI1plpEmcGzLrR3aNQwM R9eIw7G3sgftEx5X72tZym3PQAMje+URaZWDfsTL/5C9A4eYkrBzRjEGg0FvBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLkN4RHJz15xQ; Thu, 19 Oct 2023 21:41: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 39JLf0Xw002595; Thu, 19 Oct 2023 21:41:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLf0Ox002592; Thu, 19 Oct 2023 21:41:00 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:41:00 GMT Message-Id: <202310192141.39JLf0Ox002592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 8fe059425a09 - releng/14.0 - smartpqi: Drop spinlock before freeing memory List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 8fe059425a0919274e2c5b25a6af0568d147518d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fe059425a0919274e2c5b25a6af0568d147518d commit 8fe059425a0919274e2c5b25a6af0568d147518d Author: John F. Carr AuthorDate: 2023-10-19 03:25:31 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:37:29 +0000 smartpqi: Drop spinlock before freeing memory pqisrc_free_device frees the device softc with the os spinlock held. This causes crashes when devices are removed because the memory free might sleep (which is prohibited with spin locks held). Drop the spinlock before releasing the memory. MFC After: 2 days PR: 273289 Reviewed by: imp (cherry picked from commit b064a4c9eed5b1dd2a40fc4fd2cb7e738b681547) (cherry picked from commit 1ad148a68ae74f3372b12b6e66fadf5ade384144) Approved-by: re (gjb) --- sys/dev/smartpqi/smartpqi_discovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index 7e084a81cd89..ac37c2233762 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1671,11 +1671,11 @@ pqisrc_free_device(pqisrc_softstate_t * softs, pqi_scsi_dev_t *device) pqisrc_delete_softs_entry(softs, device); DBG_NOTE("Removed memory for device : B %d: T %d: L %d\n", device->bus, device->target, device->lun); + OS_RELEASE_SPINLOCK(&softs->devlist_lock); pqisrc_device_mem_free(softs, device); + } else { + OS_RELEASE_SPINLOCK(&softs->devlist_lock); } - - OS_RELEASE_SPINLOCK(&softs->devlist_lock); - } From nobody Thu Oct 19 21:41:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLkQ0nk8z4xvLn; Thu, 19 Oct 2023 21:41: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 4SBLkP64bkz4Q0T; Thu, 19 Oct 2023 21:41:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KC6pOcXaRG96ck0lDX2/7aZC3GX6tEth/FjEg4lcSww=; b=NGsfIL0K3QTii0cKf1kOMmdkfgf2fG1uZvG7cIvybNJODPDAHhqYqpmyjFuSbMEAp6cyye oX798Um7QE+7mSNj8RbjW2PGrpv5ZEnfvbFJ4begkqBHU9zVQhIfS9nekN0qRVOE0PQiY1 yU7TF995OIzIUb9/BstofXqUrf9/iJw0hju2xKtUljAJYt/dnITOHQ4F62Y7h579uhxsl6 2etYgqtASp33vifBRok16Rty0OEfYEqCcZLGDbBZc3VsZYX7dBEeBw5vTvuXwbdeCyqDj4 JST2F+1OQE8QYoKS0EWwPdvviGKrMbZK2IaQAdotS4hOc5uCgPTlFLydrvciBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697751661; a=rsa-sha256; cv=none; b=wQ359VjzsWTkBSd82adRshmmonoOtFVi3xWIi/pfbBoqNkh+1kKIZTT+GuRNoFYSRy6aub 5OgVf+RZ3N5cCoMfQmJbksHnHZXKhUHFj5BoCnLITwGS814mfp7NkhcC7mWIh/1E0bLHRo 5qn+yU7Xlo69mDhk75O7PNiZP5clH1IZEmnIcdpASUizOmaj6EzOzusxzR2n9GwyA/vBvR a2cfT4T2UjlS4vJO/BqpPAcR4LJ64rrlMxt7x9ffVwd7g/yD2LVZzkRG9rRwZuH0U4znMF a2wBIy+ZhukpiKWw75/spVYBy9VcEHlDpVt1Xi5YaqjiZHQi/54onOXBiniKGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KC6pOcXaRG96ck0lDX2/7aZC3GX6tEth/FjEg4lcSww=; b=kQmoB1q96BA0XMJzmjEcZK4B69sAGBg/YcdCCUZJgITe9wzBc1cE3/yXl9XgkNMrfrfZPK srWVDGAomSeCMkI8qdYFEHJd8kRemiuyX8yKQkUNQDgi/D0ObbuXilTkKmyzZD4PBrhRzU OfipyFKwZP7Oe9XB1f4KF+s3gGUCJFNk/M/4bdnMuBgu6hlKvidbw0X1ivVK/Y5zjztyHj Ur7+Xv2gbnYudrR7s9UfTl7azwOIjGPmAK3OcWjxtedoAoLmF/LmmYJZiO6bLlVvoX1HSi VkJG1jaHUHxePIXsbaRM6gc/E1QJJ27uPIHX9TP27Ry9VshpfTGBFi7S3p3J0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLkP58Pbz15tH; Thu, 19 Oct 2023 21:41: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 39JLf1U1002640; Thu, 19 Oct 2023 21:41:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLf1sY002637; Thu, 19 Oct 2023 21:41:01 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:41:01 GMT Message-Id: <202310192141.39JLf1sY002637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 0efd0d6fa7e0 - releng/14.0 - smartpqi: Change alignment for dma tags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0efd0d6fa7e0d713ea7e4e9a3e3ac7858475f707 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0efd0d6fa7e0d713ea7e4e9a3e3ac7858475f707 commit 0efd0d6fa7e0d713ea7e4e9a3e3ac7858475f707 Author: John Hall AuthorDate: 2023-10-19 03:25:32 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:37:33 +0000 smartpqi: Change alignment for dma tags Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash. Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert. Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions. Risk: Medium Exposure: This reverts a change first made to support NVMe drives on Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case. PR: 259541 Reported by: Ka Ho Ng Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41619 (cherry picked from commit f07b267d8cc87e88be3c78aa69504b5ebc6571ee) (cherry picked from commit 01619a8fafcfd99d1811b2c14a92bac1a48c6d31) Approved-by: re (gjb) --- sys/dev/smartpqi/smartpqi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index e79a6f0a173f..402841bbf4d6 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -629,8 +629,8 @@ smartpqi_attach(device_t dev) * Create DMA tag for mapping buffers into controller-addressable space. */ if (bus_dma_tag_create(softs->os_specific.pqi_parent_dmat,/* parent */ - PAGE_SIZE, 0, /* algnmnt, boundary */ - BUS_SPACE_MAXADDR,/* lowaddr */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ (bus_size_t)softs->pqi_cap.max_sg_elem*PAGE_SIZE,/* maxsize */ From nobody Thu Oct 19 21:41:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBLkR1nWZz4xv40; Thu, 19 Oct 2023 21:41: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 4SBLkR0CXgz4Q97; Thu, 19 Oct 2023 21:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgarciCD37Vz+U0z75ErZ4lQHWnkSCo/HNn8H4JEsx8=; b=potONWHi/wdpbgmpSCWgr/qRBR/aZIoZzGl6hDJdDhpBgVvqZ6CDLAWB68IxavlWIz9JS3 RMnrXO5PSoiE6tHcMefjfNYAtLaT9h1f2xwt7wrYYjvrDPv5eiSBxlZ8UTOVM8UI6TzKfO eXF3BkiNY4WUaPPVmVZ+izyj43CFcgKJj9OQ2dnhkl3p8MCZh5aWllM28XXDp3afQjXqRz quL7ylk1lwWxMS/MWxhgn6zOfiDXBywKD+1gmdF679Ae8/MVoLzwpN4xs1HHyE/bpRTyxO 1GvdF2EOpW69AclaWwkr3oHw8yrqjRQKkcF7P9I5D0cCZMFBc7l+Fe9PvSDN/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697751663; a=rsa-sha256; cv=none; b=P8i3xN+Whj59lIgDfCiNyG3QgmaYP0deJS1klVt3dmn+zSHa1/oP+3x9P03ndYwieq5E5b 92I3pzp10oL4LXzpiF3DUEnXV71gJZXEQ4wDTjmP5XC+TH6XL4+zO+0klV5tImY+X1jHvW weQD/QhxLeKQ8tYHCUykURE+fvRy55jpTSI5LbiKijLFV4G0qglFDYi2m5QDQhPBAiKfom tSNP02m+gLRmsp8/VSG6vIlFm3leycgUuFLCqX7U812ML4V5ix39xzxoHopegYfq8/RswW JdU9OstBtu66fVUYzvE0EnepSE2o6WlhiDEYgYLkXFRzSxcjo2Ti6/cTeiPtnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697751663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgarciCD37Vz+U0z75ErZ4lQHWnkSCo/HNn8H4JEsx8=; b=st3cKy5jzrLGWeVxde9E03VhjiPSsyNDUmRPpZby09qU8dS4MgrGIcY1Y5DyyDDi5+xd00 BG07h7pj9PwHiAnZKclIlMs1ZxZcYjtKIq0UjHiYmf8gl/BAldwgBC496lESveRzF/SZHG qsMfi8nLstsauomRTD7iKCdorl5vhUAbU9u6GfVvsofthhYzq0ALgigsbRKrIYqJmiwWa1 kdFVUYLM6VCQbKos/5bN1/+Kxg6Jo2h0+6GN8JgfpqFJIgMvNameprIotS94fjohM/xggD al1dDkuuOQcJ9py0d2opwEzIpKaYm5Z1gr7EbjOe/yBwoau3rMi3lfbDeYEhwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBLkQ6Qllz15tJ; Thu, 19 Oct 2023 21:41: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 39JLf2U6002698; Thu, 19 Oct 2023 21:41:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLf2fv002696; Thu, 19 Oct 2023 21:41:02 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:41:02 GMT Message-Id: <202310192141.39JLf2fv002696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4c1b67934589 - releng/14.0 - mpi3mr: Move creation of watchdog to interupt config hook List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4c1b679345899a5ba988497bda7585ca15326b60 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c1b679345899a5ba988497bda7585ca15326b60 commit 4c1b679345899a5ba988497bda7585ca15326b60 Author: Sumit Saxena AuthorDate: 2023-10-19 21:15:50 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:38:06 +0000 mpi3mr: Move creation of watchdog to interupt config hook Move creation of watchdog process from just before we configure the interrupt config hook to into the config hook itself. This prevents it from racing the config intr hook and doing an extra reset of the card. This extra reset is usually harmless, but sometimes it can prevent discovery of devices if done at just the wrong time. This can lead to no disks being registered in a box full of disks, for example. Starting it later eliminates this race, making discovery reliable. Reviewed by: imp (cherry picked from commit 7e02c7074c4c6df77b860e0dbcd032a2ea04b98b) (cherry picked from commit 10bbea2e25ef95936619b6522bbdeea2317e76a5) Approved-by: re (gjb) --- sys/dev/mpi3mr/mpi3mr_pci.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr_pci.c b/sys/dev/mpi3mr/mpi3mr_pci.c index d7278e5549e7..4935ac0d519c 100644 --- a/sys/dev/mpi3mr/mpi3mr_pci.c +++ b/sys/dev/mpi3mr/mpi3mr_pci.c @@ -307,6 +307,7 @@ static void mpi3mr_ich_startup(void *arg) { struct mpi3mr_softc *sc; + int error; sc = (struct mpi3mr_softc *)arg; mpi3mr_dprint(sc, MPI3MR_XINFO, "%s entry\n", __func__); @@ -314,8 +315,16 @@ mpi3mr_ich_startup(void *arg) mtx_lock(&sc->mpi3mr_mtx); mpi3mr_startup(sc); + mtx_unlock(&sc->mpi3mr_mtx); + error = mpi3mr_kproc_create(mpi3mr_watchdog_thread, sc, + &sc->watchdog_thread, 0, 0, "mpi3mr_watchdog%d", + device_get_unit(sc->mpi3mr_dev)); + + if (error) + device_printf(sc->mpi3mr_dev, "Error %d starting OCR thread\n", error); + mpi3mr_dprint(sc, MPI3MR_XINFO, "disestablish config intrhook\n"); config_intrhook_disestablish(&sc->mpi3mr_ich); sc->mpi3mr_ich.ich_arg = NULL; @@ -443,14 +452,6 @@ mpi3mr_pci_attach(device_t dev) goto load_failed; } - error = mpi3mr_kproc_create(mpi3mr_watchdog_thread, sc, - &sc->watchdog_thread, 0, 0, "mpi3mr_watchdog%d", - device_get_unit(sc->mpi3mr_dev)); - if (error) { - device_printf(sc->mpi3mr_dev, "Error %d starting OCR thread\n", error); - goto load_failed; - } - sc->mpi3mr_ich.ich_func = mpi3mr_ich_startup; sc->mpi3mr_ich.ich_arg = sc; if (config_intrhook_establish(&sc->mpi3mr_ich) != 0) { From nobody Thu Oct 19 22:45:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBN943yHLz4xy3t; Thu, 19 Oct 2023 22:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBN943Bvrz4WMq; Thu, 19 Oct 2023 22:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697755544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuiWdaGui5m2as3dXRRZ1wBZ61FPRihALv5FWmAdzBw=; b=Xob7CfAVjzJc3SU9yF+fWrp0Kvikk5VHKNDmwKQ4S7dm5ixGycwfk+97f01IpHw0/CQKph 9njyGvpbzkFAGSyBim8VS8Rmd9GFE8gJh28BzxziI3s5lBr7u3cuAd2pQwjVc77N4evwyl xg/gPXnWtkqyG18pYbzTbFX8G91PlE41mTkkfGbhd43KrFmazeOL5WExy7quG5K30lEql0 VeChLLzHh7vVMm9zhK46IFlzSRl4M2J90pBDKvnqed5aQsdxRV7zCp/JxDosIKD2nmut4D 7o9tJ8cMry3Qz/gEnW9wsXljBtVbFz8TausJOTKtCYs5wd4WEBArEG8XS4PwJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697755544; a=rsa-sha256; cv=none; b=pHWcwLfeyPbOOdamWcH8wp9siaeO+DaI5mUbXIfeBSjf53sHMJb6CynJe1o8RBAXLJQma7 D0AXCkB0ur3gUn9SWtHUTNxEW3QDBIcQDtCYejaEDJUBGMi2C9artFdHueS5Q6ELDSGwJ9 S/Yv9fLjXu/7Kf/IBDTPLjrrrJchWgdw+PPxf+I+uISu/aezacKDE0CnpJHeKVGiDqM4Lw e8HLQraYGize/bKUzAZ9eSOvmy/URXoo2G97SHyMs3z9zg7E9TgMpTmdOMkD4HXIzbq6Kz aFULNc/tRBiIS9Mhuz9d/HhsVNjVD3nlLu8JIQXAYuUKtXG4KMstv4Mf2HgxJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697755544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuiWdaGui5m2as3dXRRZ1wBZ61FPRihALv5FWmAdzBw=; b=B4jeZ9ZKXfYluFoRGNoMCUurpurjbAlb6sKML/BXt/Mx6G7vbxTSSCVXeSpvU6U9roBKle H6JWkqtDV5jp4KHjaQ07w3skONs3VERg3bWev2Y3+XZ5oro8m+cXms0REbC+kekyP0qPLt Nhb++nWdrR4qm7mgF1NOTibnm61RG5mjunoOaYlYiosILYs94kdlil1vO356r6k32U2nwI QsoWkdtFat3gk6hIKaicFFCvevS52BzUiNMAhmVZ+ie0F+86WxBLgfVwTUWrVJ5Q35y5OS cwrLROOL69yLAIeGpZzlyVrG5Kjy4E7n0rqJ8IAILPeOdJO0FIMw1jU7UZ5SsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBN942Fzlz170t; Thu, 19 Oct 2023 22:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39JMji5x010292; Thu, 19 Oct 2023 22:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JMjiZ0010289; Thu, 19 Oct 2023 22:45:44 GMT (envelope-from git) Date: Thu, 19 Oct 2023 22:45:44 GMT Message-Id: <202310192245.39JMjiZ0010289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 0e0a03c79254 - stable/14 - arm64/compat32: Fix handling of 32bits FP registers. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e0a03c792542a2509702378559622efafc86548 Auto-Submitted: auto-generated The branch stable/14 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=0e0a03c792542a2509702378559622efafc86548 commit 0e0a03c792542a2509702378559622efafc86548 Author: Olivier Houchard AuthorDate: 2023-10-16 20:18:24 +0000 Commit: Glen Barber CommitDate: 2023-10-19 22:45:17 +0000 arm64/compat32: Fix handling of 32bits FP registers. We must consider the aarch32 FP registers as 16 128bits registers, and store that as the first 16 aarch64 FP registers. PR: 267788 (cherry picked from commit ccd0f34d8585cba727dd17a381309855af655b82) --- sys/arm64/arm64/freebsd32_machdep.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index e19d845ca66e..1cf8403e0a0e 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -151,8 +151,12 @@ get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) ("Called get_fpcontext32 while the kernel is using the VFP")); KASSERT((pcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, ("Non-userspace FPU flags set in get_fpcontext32")); - for (i = 0; i < 32; i++) - mcp->mcv_reg[i] = (uint64_t)pcb->pcb_fpustate.vfp_regs[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + mcp->mcv_reg[i * 2] = tmpreg[0]; + mcp->mcv_reg[i * 2 + 1] = tmpreg[1]; + } mcp->mcv_fpscr = VFP_FPSCR_FROM_SRCR(pcb->pcb_fpustate.vfp_fpcr, pcb->pcb_fpustate.vfp_fpsr); } @@ -168,8 +172,12 @@ set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) pcb = td->td_pcb; if (td == curthread) vfp_discard(td); - for (i = 0; i < 32; i++) - pcb->pcb_fpustate.vfp_regs[i] = mcp->mcv_reg[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + tmpreg[0] = mcp->mcv_reg[i * 2]; + tmpreg[1] = mcp->mcv_reg[i * 2 + 1]; + } pcb->pcb_fpustate.vfp_fpsr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); pcb->pcb_fpustate.vfp_fpcr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); critical_exit(); From nobody Thu Oct 19 22:57:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBNQt3q1vz4y04K; Thu, 19 Oct 2023 22:57: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 4SBNQt3Ghlz4Xdy; Thu, 19 Oct 2023 22:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QcftZfApdPaU9b/p2z4YYZXL5X4H5Z45GGbZzJY5VE=; b=c2ijINb2PCbHl7MhbJGsLmJDF/AUxm1kg3aOroMYd6/541QdSi92bY/Z97Y3Y/Zea+8Rne diInqzLrqbh7yVHBjkbA6aeHwcHr5ed4R8Aro7V7Yzr3mD7iD3gwy8PTA8bchl1Oz/HCnl ffO+lIfZQpe1i5sfjCK2l/7ycqwWnuVD6iPzpPF1ignAfl+Jzl+AZcdQ/PzTMe1mkEMAhi 1qRfvB1NEK8HY3TZZ4s2f6rGLzDUg9czHbG+q/eB+89HfGjJhf8PYOLc0hGWh3Z2aOZKKq NI6s+Iz+EEgOhbXLWwS6lyk59iDiNHmAjftdj8ZplVcE8aAlsqNFI7xEDiMbjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697756262; a=rsa-sha256; cv=none; b=s39ToMBG2dzRmkXTRE+mJKdboiQ+Zi4aFwHkL2xVsXZv9iHwn5iKPjRet1MvUljN+VMy3C I9+gWKKK+TR/RSXIrnhdN9XBHFEAejMvza8lHhM9+nG7vAJrSXNBmrVbwNIefNpu8yi/Jr PXvtmCqCbLQsYEr70/Gnjv0GaiFmwvRuHfyBaeNtIVC6L6qtpdywZ2pbkyEudxlyBdw96w XthW7sryo0kaKuoIgVQ5tL4ef6YtTZfihOxFg86kraeTOJ8sFgJNUOS0QymDiifqsc5C9M kvV3lJU1g2gAwdSx3+956KeHQpRxaax6UMMrUAhvwxymK7Jr5ZCw9HQxknCTpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QcftZfApdPaU9b/p2z4YYZXL5X4H5Z45GGbZzJY5VE=; b=VmCue/dH4lO2cYQ26ERZyunyGAU7gbndPtb17hKqKuedbFZRmcmYvqIzKTnxJXIC8/7tag fVj7O/sUewUfhvPcKPm4P8/9X4F5NTs32bXFUSyh7DZX/Y4dNkkfEEJrOSQra27rPrmj3Z tNPiIBeq5CVTkoAyzEQOpp75YC//F0SsgZct5dOj+GH44IA8fsSd9U21/HKgSIMj2Ht4r2 byo3gFx2YrsP7i6ggTeRHf2cm238oOSqawi3gH+zx1dTGPZtRVabeoURqBoVM6cqtaSn8Q FWTkL7qumYSd6T0C8Iw6qiHEaPENtSnZCeLFV7AIELEvDNp4agubCUj9MIwXSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBNQt2J7mz17vt; Thu, 19 Oct 2023 22:57: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 39JMvgNq027079; Thu, 19 Oct 2023 22:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JMvgtt027076; Thu, 19 Oct 2023 22:57:42 GMT (envelope-from git) Date: Thu, 19 Oct 2023 22:57:42 GMT Message-Id: <202310192257.39JMvgtt027076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 394e87e634bc - stable/14 - releng-gce: Add missing _ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 394e87e634bc0f5f34d6bde28794746a07f702ec Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=394e87e634bc0f5f34d6bde28794746a07f702ec commit 394e87e634bc0f5f34d6bde28794746a07f702ec Author: Colin Percival AuthorDate: 2023-10-19 22:46:59 +0000 Commit: Colin Percival CommitDate: 2023-10-19 22:57:29 +0000 releng-gce: Add missing _ Fixes: 1b10bdf0e2fa8 "releng-gce: Add ZFS support to GCE" MFC after: 3 days (cherry picked from commit a959ae1c503d104f1e28033522362e5054f52c94) --- release/Makefile.gce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index f7fb0d8dc419..e84b2df809a9 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -53,7 +53,7 @@ gce-do-login: @true .for _FS in ${GCE_FSLIST} -GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +GCE_IMG_${_FS}= ${.OBJDIR}/gce.${_FS}.raw # Really? Uppercase characters are not allowed? Sigh... # And don't even get me started on the '.'. GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} From nobody Thu Oct 19 22:58:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBNSK2Vy9z4xyws; Thu, 19 Oct 2023 22:58: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 4SBNSK1yBpz4Xsm; Thu, 19 Oct 2023 22:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hL6NCuNc49xAnCRoBPfat43QiashMPqih1Mn0EtcNE=; b=LYyPGC9hOGRJ3p6LRR0voAUFYSeq55sFuktlsaKyzYBTKskMGzKRti5BKYmFqdLazEzMiJ JoeKy2ULg6mluBCJTDi4ncnX3jcrHqHdZPEpthAhxi32Fp+xCF4grRw93OSTx0ZW9iM5CB ZlzjXlWSbwwpz+78Kyqd77dJRnR+C//NkAXDrNdMdzuoOj0rvy/vmU8e9pljCSEXUlPG9o K5jdYIGOM4QR6klp+EidbA+MWy+32+a6DICNnt1njQSdLU9BHoSYX+l0e9dPij2kmRO9YH 62WVYvwHb1Cs1G0TRUgTP8OYcUtDclZKYJ4CMXjBRlVDgTvhVWoFgnO7is1nCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697756337; a=rsa-sha256; cv=none; b=lroUSmtZ1nSoqrEejSXCWPx83Ja7VRLQRwzIlALbL+Vnx9MVV8izgmL0TS0CytDMTy8ykk RdIJcF19RhQvq+aoHKH49QyInW04hxXCT3dA+M2utSX2rcKWRyI/Khk6ILZnB/DGVc1rOe V8XQVzbplXjGSC7bn6B6tYxS9n37ISuTViWoUDlJMs0gcX1wLueCmj9DStQ88nO213ZeQf RWjy9nH7e2pxefLC5Hn0pyyr13H0bvKoPxAO+gbtOTwbBhQHf5xg0mhwYb/fwtbaUkL5sG whAUbIVg7akRu4ArXKw2s2YqYDoh+4EKcjhQ+JRCVLIZ4h6wo6xJezYPojJ7IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hL6NCuNc49xAnCRoBPfat43QiashMPqih1Mn0EtcNE=; b=RFG1RVuc1xO1UmIe3H8cVG+HEnuhXicFAylAfgwSPUzWRA+S3eInd/6gQZRow59JibA8ZN Hw3vWuBYUry3LdpYRxna3Ofkb+G0OlEU62gIX1YPvn7pIFmpDkFVi7jGUoHLYrA9Cjsixw ePAgYI2qqRQqg5KkjSammClQC2RPQkng8x3UL5E0bbUja5C5ayGZ/Frk8iALV3Z+hHjjeQ FaFpy3XRV1y58uBn2IcFLh2Ylo0N7FFnkCwd/EN9iKnKHdmhqUSGegvGmas6X5U532Cv0m +k3GBS895fINW1NiRQ9pY1eMj0uwUVw+NRGiuc2anFFjERMazg6MJCMtrGxrdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBNSK11bJz17wy; Thu, 19 Oct 2023 22:58: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 39JMwvmI027366; Thu, 19 Oct 2023 22:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JMwv50027363; Thu, 19 Oct 2023 22:58:57 GMT (envelope-from git) Date: Thu, 19 Oct 2023 22:58:57 GMT Message-Id: <202310192258.39JMwv50027363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 5a1dbfb5b644 - releng/14.0 - releng-gce: Add missing _ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5a1dbfb5b644541886b332f1378c39bae8da9d38 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5a1dbfb5b644541886b332f1378c39bae8da9d38 commit 5a1dbfb5b644541886b332f1378c39bae8da9d38 Author: Colin Percival AuthorDate: 2023-10-19 22:46:59 +0000 Commit: Colin Percival CommitDate: 2023-10-19 22:58:37 +0000 releng-gce: Add missing _ Fixes: 1b10bdf0e2fa8 "releng-gce: Add ZFS support to GCE" Approved by: re (gjb) (cherry picked from commit a959ae1c503d104f1e28033522362e5054f52c94) (cherry picked from commit 394e87e634bc0f5f34d6bde28794746a07f702ec) --- release/Makefile.gce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index f7fb0d8dc419..e84b2df809a9 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -53,7 +53,7 @@ gce-do-login: @true .for _FS in ${GCE_FSLIST} -GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +GCE_IMG_${_FS}= ${.OBJDIR}/gce.${_FS}.raw # Really? Uppercase characters are not allowed? Sigh... # And don't even get me started on the '.'. GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} From nobody Thu Oct 19 23:05:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBNbX4kHFz4y0Mn; Thu, 19 Oct 2023 23:05: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 4SBNbX42wDz4YQJ; Thu, 19 Oct 2023 23: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=1697756712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpnEs8PMwEirL5+xtRpMmYzJoG4v2heAbFEpbMcZ3n8=; b=wAGVYU0IxlJ1hm333Y0bO1pTGy2ZADS2w3PWbBblA2yuf0dceI36Vrfs1O8RsaJTnywM3s yWM8mWYbLMSlImyUY+X31GndyXrGRwruKKQwQvSIiX+MXDIrm1TxVzQcOKVHSYJpf6tNMR 8pGJyrUBLTSR7yPJSQGKyDwfSg8vOnVQMK/uMu8iSJRMm8fg3HkUPLZhLa8OLT2Y1Fqca0 IzrfUCL9r/W2J8s+pXgAEHCSMTA+LIFuZftI+5l3zQR0gJh794VMN9P+uOwe/6ELw0B+JU 1/Ff38ZKRdMwJ4XXqxmPOYYsD3BEEHq2pLgkg1JSLJmc3jeXcLDv7wj0Fq/TEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697756712; a=rsa-sha256; cv=none; b=JUjs5pTOPdzDhWvt3A0aA0FrFQixcHyenzDoqO4nZl3Uz+f7whuQqVxzcZodNvXk4Y6YQH gMSlScT0tBcBrfwfG57UeSYCwmRaI2cWbLxexvpC0xmVvTSbcxK3+ly+X17Vq1+PSRtT7F ac0qWXD/KbOJDqO6lelZMXwjE2XQWF5Si5MihRpALKDWJWrmdvT8u0xBs8G9+kuHA40KsZ PUpyZpr3injJiU50AXjOo5dziKC1VL5i2r9vYnqOUZEMmLAUsMPNepjtUHhHComHvX8DN1 GbV83JcTAIP7x4psDS9Gg1wa2IfEkAGdyp5MbaTXnFBWED7Kb9ZxI4JbP5XCzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpnEs8PMwEirL5+xtRpMmYzJoG4v2heAbFEpbMcZ3n8=; b=Tk19zfFFMMTvyzi2VXke1PeOTNfQnr8IYF62frdpT33kn9fq0af0W8LO/1sCug36tuhYfH gzw3yKwkHQkUonr0z0pip1pzvaOMdYV1GHaU/OZRgAPzEW65DAMJM4zGAFUT/JloIubqNM cvsXuoxdvdFS2iMhwhLVyJplC35Sv3pRpG8VXQ948Cv/Q+ESZrXPU3GHqeuETkqwpOb3Dm RHczuyiVV5luD6ZLqIPF45p4g7WLNTr+izxWb1vYC61ldgnmtUw8US7GQEC5ApipOx9B3t 5d6+qiDbxGLyYwCeUvTLk0BcQudTCqC4YvDKnDikZKNQSgVMtFresHW1jq9DTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBNbX2wZyz17xg; Thu, 19 Oct 2023 23: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 39JN5CpJ044634; Thu, 19 Oct 2023 23: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 39JN5Cbv044631; Thu, 19 Oct 2023 23:05:12 GMT (envelope-from git) Date: Thu, 19 Oct 2023 23:05:12 GMT Message-Id: <202310192305.39JN5Cbv044631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Houchard Subject: git: 665838d939f3 - releng/14.0 - arm64/compat32: Fix handling of 32bits FP registers. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 665838d939f3d32ca851e815506989d80a207f52 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=665838d939f3d32ca851e815506989d80a207f52 commit 665838d939f3d32ca851e815506989d80a207f52 Author: Olivier Houchard AuthorDate: 2023-10-16 20:18:24 +0000 Commit: Olivier Houchard CommitDate: 2023-10-19 23:04:16 +0000 arm64/compat32: Fix handling of 32bits FP registers. We must consider the aarch32 FP registers as 16 128bits registers, and store that as the first 16 aarch64 FP registers. PR: 267788 (cherry picked from commit ccd0f34d8585cba727dd17a381309855af655b82) (cherry picked from commit 0e0a03c792542a2509702378559622efafc86548) Approved by: re (cperciva) --- sys/arm64/arm64/freebsd32_machdep.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index e19d845ca66e..1cf8403e0a0e 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -151,8 +151,12 @@ get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) ("Called get_fpcontext32 while the kernel is using the VFP")); KASSERT((pcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, ("Non-userspace FPU flags set in get_fpcontext32")); - for (i = 0; i < 32; i++) - mcp->mcv_reg[i] = (uint64_t)pcb->pcb_fpustate.vfp_regs[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + mcp->mcv_reg[i * 2] = tmpreg[0]; + mcp->mcv_reg[i * 2 + 1] = tmpreg[1]; + } mcp->mcv_fpscr = VFP_FPSCR_FROM_SRCR(pcb->pcb_fpustate.vfp_fpcr, pcb->pcb_fpustate.vfp_fpsr); } @@ -168,8 +172,12 @@ set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) pcb = td->td_pcb; if (td == curthread) vfp_discard(td); - for (i = 0; i < 32; i++) - pcb->pcb_fpustate.vfp_regs[i] = mcp->mcv_reg[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + tmpreg[0] = mcp->mcv_reg[i * 2]; + tmpreg[1] = mcp->mcv_reg[i * 2 + 1]; + } pcb->pcb_fpustate.vfp_fpsr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); pcb->pcb_fpustate.vfp_fpcr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); critical_exit(); From nobody Thu Oct 19 23:05:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBNby3VRGz4y01c; Thu, 19 Oct 2023 23:05: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 4SBNby2cT7z4YpY; Thu, 19 Oct 2023 23:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CuPnctkwi/UWzFMHH5LBFCckO5XVGORb6fTA6iDkRi8=; b=wM5Qdd3aITrU9bTwHhMG5Np0f84/GqmR2HJMRlqMf5MO4DiXIjXaMlZ5UKAEbajN0I9nlE 1OuCdBSuyQuwBBlDhBXw9VEnoRmuxy5hjY9uRDnPIh/voijoCK+p/cp+B+IiScQBIHwq3h WA5zNtZyrWey1VRj3E8MmiLqf1K6i3TH2JEnnAkocbJuwXLmG4+1DNeCRYw1Ogs/yGT/ob jgicSC2uClejt26DTEoTEvRtweW38tm4mTunBY2pGfCf7wEVpIbfNkEyZULafvFxJL5vnv T0aDnfCz0U8oV/L78SpAaKD4jYcLDwX1SOyqr7Q8UA5+2rsSAbI+UmGdEFb9ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697756734; a=rsa-sha256; cv=none; b=nUUl0CIp9IqUxF/FB/dKt9aoDObIkanIYIo0t+/nm0SwhXzYV6CD6MfTM/GvehCPY5Yig0 OfSV1cZZwRbvSaPmA3yQA15NbZ7m2bCt1v1YX2ecDb14s4kCRJHVvYKq47ueRO/cq24ONf YhJN8EnYGUDr5ybHcJT5zn+WyE+8C6F5MDOhB2rjMLh/UpY5zy6POv3LXmmx+pYVGOnnVI OhdvoNByd9RcbXwBd6UbZ8BBKWEu9EM6ZMg5i1vbTadl3tLjEthcMWgKBIzLBWDaoB0X/S IWAcA7Z/1gfV1mhATWvjDHGsOQkxuodwt/EfoceyzsZFXr6ubNSt1sQz9DLCTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697756734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CuPnctkwi/UWzFMHH5LBFCckO5XVGORb6fTA6iDkRi8=; b=rvRZyx4heIgPM9nMgy8Hef33gA4s+yOEBmdut2gEWkKYwWvJLa9PNKonJpXkkODKA6fLsP Rb1F9z4GKt4UzKAMvn+xnRr8+NLkmj9wXBZjB3R9oIv+A++H3KcRtiOw9toH53+8KYiGbd bVsPe2Dgr9gubESEqwdqR+BptNNJz3oLu8396PFA0mbj0bbof4LyR87I5+hYAty1/B3obk o35pbpRsXxMNKzmQSOCA71DcZHpgS8jqx7XyVyPZnmtqTXSWgZqFC76reiQYl3LwSFhbv4 nS18FxfjTBMgRCmALPkXLaZl4Y16krfdnDPB8oygk4IUG1MXDXkyNa1lxouBaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBNby1gpQz17gH; Thu, 19 Oct 2023 23:05: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 39JN5YAT044820; Thu, 19 Oct 2023 23:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JN5YcO044817; Thu, 19 Oct 2023 23:05:34 GMT (envelope-from git) Date: Thu, 19 Oct 2023 23:05:34 GMT Message-Id: <202310192305.39JN5YcO044817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Houchard Subject: git: 51be8675416d - stable/13 - arm64/compat32: Fix handling of 32bits FP registers. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 51be8675416df4aa066e823fec37ea6667494e63 Auto-Submitted: auto-generated The branch stable/13 has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=51be8675416df4aa066e823fec37ea6667494e63 commit 51be8675416df4aa066e823fec37ea6667494e63 Author: Olivier Houchard AuthorDate: 2023-10-16 20:18:24 +0000 Commit: Olivier Houchard CommitDate: 2023-10-19 23:05:26 +0000 arm64/compat32: Fix handling of 32bits FP registers. We must consider the aarch32 FP registers as 16 128bits registers, and store that as the first 16 aarch64 FP registers. PR: 267788 (cherry picked from commit ccd0f34d8585cba727dd17a381309855af655b82) (cherry picked from commit 0e0a03c792542a2509702378559622efafc86548) --- sys/arm64/arm64/freebsd32_machdep.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index 731ce8e6d4be..00c9878deb7c 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -142,8 +142,12 @@ get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) ("Called get_fpcontext32 while the kernel is using the VFP")); KASSERT((pcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, ("Non-userspace FPU flags set in get_fpcontext32")); - for (i = 0; i < 32; i++) - mcp->mcv_reg[i] = (uint64_t)pcb->pcb_fpustate.vfp_regs[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + mcp->mcv_reg[i * 2] = tmpreg[0]; + mcp->mcv_reg[i * 2 + 1] = tmpreg[1]; + } mcp->mcv_fpscr = VFP_FPSCR_FROM_SRCR(pcb->pcb_fpustate.vfp_fpcr, pcb->pcb_fpustate.vfp_fpsr); } @@ -159,8 +163,12 @@ set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) pcb = td->td_pcb; if (td == curthread) vfp_discard(td); - for (i = 0; i < 32; i++) - pcb->pcb_fpustate.vfp_regs[i] = mcp->mcv_reg[i]; + for (i = 0; i < 16; i++) { + uint64_t *tmpreg = (uint64_t *)&pcb->pcb_fpustate.vfp_regs[i]; + + tmpreg[0] = mcp->mcv_reg[i * 2]; + tmpreg[1] = mcp->mcv_reg[i * 2 + 1]; + } pcb->pcb_fpustate.vfp_fpsr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); pcb->pcb_fpustate.vfp_fpcr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); critical_exit(); From nobody Fri Oct 20 00:09:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBQ1F0hVXz4y2Z0; Fri, 20 Oct 2023 00:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBQ1F0B0yz4fJd; Fri, 20 Oct 2023 00:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697760545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7V2oDOLeXtqVUiItSSzLfwHaeeR3KffWCHkXZTrM/M=; b=NlXE00Qdmy0xv5VIu0gZqoaR+U5iqOCMG6/HMPI3jBTLHqi9dW19trxfHTrey2Asl3Xnfn KVJFXdiu1cnUikMHQiD6CivVENLFljvwLzL6v4P+IP0I3IHYLLLj7P8YrjMFEDQ8W1jzBp zEVFOhXW4SB2lutnqgrhTeeToP7ibreZM4HECbGrhmZXbJAWO9boZoYtUUupc/cR25N6Qt oefKgGIU35869xAYIsG6D/8b0bSX7WGNfymqYYpnP1IDNTCozmn5W6afw18ye9iBanEx0t QXaT7hRme0GBtZs0y810GqoU4uU1qwSErBgFXbU3EIHcUeMPybTdnHfCDIFNCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697760545; a=rsa-sha256; cv=none; b=SvK9h6Q5fNAAthwybvQ0wD2biEuEhL8uJsjyUr5PzrsWu+sz4HAbYQj64m4J6tseRvKh12 XoCVlSN7V2XTLQyAdzwXRS19JEpaO/YeAtxIrlAfMH21BUEBiEX6RbGKIiVXYjhr4ZyZ7n TERe5xOJOsXcoR9Ac3LKiHzNfg3K6PiU+mqhFNnBkiNG1WYgDhmu0VQ+C9QIoUlf+kK1bW pQ3mVEYbLtqpKl2dF5hk5pfyGJ7hoInGJ6EmMoq27mov+oheZG0XoVevXr3/iROz82FYHC 3eH9d0Yo4E7g9AgVmwWiXM2xWieu5eCq7mgObI7eMB4AcNG9Y3fjyHmbGdeqwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697760545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7V2oDOLeXtqVUiItSSzLfwHaeeR3KffWCHkXZTrM/M=; b=YR40am325RpCj2Ez4f5U7BAl3XKCgW0EMc+d2sl756NFLy6tL1M0XmZmQxgHUP+PByT7kl BSmJ/skkSLwaWPx/tJctkdgzf3D4Q7ccEgU+6bC0MWT0+OypOha3xGyC1tRNO501n78Nlw w1s0LWXV4alRnytdhA4a8RPBx9BYvm3o6EQVIa2sfcMj9H0oPpTfypyIJQaYyCZXdlbtJw as5uzkBwMeZfZdQtpDr7vxU691Pk7o6eupzkJNs2lrmYSwA8nsO6Pa2jVnO0SQaWjwaB4K QdGm4XyWiLV9ws/FryunLEGJJ47HETEPcIXa7UDymnKfD1ZQmYWL0Wtv+8KdNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBQ1D6G62z19G5; Fri, 20 Oct 2023 00:09: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 39K094fo044918; Fri, 20 Oct 2023 00:09:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39K0944x044915; Fri, 20 Oct 2023 00:09:04 GMT (envelope-from git) Date: Fri, 20 Oct 2023 00:09:04 GMT Message-Id: <202310200009.39K0944x044915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 1d2ff5639925 - releng/14.0 - release: update releng/14.0 to RC2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1d2ff56399256c657dd77381d9fabc60259e4ba3 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=1d2ff56399256c657dd77381d9fabc60259e4ba3 commit 1d2ff56399256c657dd77381d9fabc60259e4ba3 Author: Glen Barber AuthorDate: 2023-10-20 00:08:43 +0000 Commit: Glen Barber CommitDate: 2023-10-20 00:08:43 +0000 release: update releng/14.0 to RC2 Approved by: re (implicit) Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index a876fe20ec49..b2bd54bb1ee9 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Oct 20 08:23:52 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBd085t60z4xVff; Fri, 20 Oct 2023 08:23: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 4SBd085CR0z4D92; Fri, 20 Oct 2023 08:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697790232; h=from:from:reply-to:subject:subject: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+yo4z8TyPreV0AY+HtIDfL0OFY4c3qHWF3XdzcQNBs=; b=FtJSnSOCUZr/6qy+HylNwc9E/P2yo+nqSatP/fmiBwzeWYTVUfyE13h21rtHv/HtMeg5Mx ueWhMD8N4X18DxL0cF/xAalQGVjmwSKSCOumifACbXLLA2zKldnQn/dT+P/zXty2ZL5s1o Kk57DG3GS0VBj68+XP8n9nxF5f8RUsBa7l/hU1tWZSzRBhvS4I8Wil5AlonaQ2HYmuGHSB +3Tl9wNcRfEEUM5wzCEElIDr2Ye4o9KFnV5uX24q7wgISvRnAH6NY6Z92VdDRiclho9KI4 OYZ7JU2kj7rh8poMz0InfqXMYehZxoPIlLOSeR5xLdvzla8UxDijqxtsKAkaYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697790232; a=rsa-sha256; cv=none; b=WcqHSrhnKT8+g+fcKQH9zfDAig0hxSW+AMYdgZoZQYgx1v5/Pz25Je2KctlxWGdDXC6uod ryDjfjFzYyvOVElOh+229EAYra+8NFn7VSKW3LVRoYroRMFcJ1uw2qWb4EcGYItoiTmYrr Fuxa9Pmgvq57ncW4wruG5wK3cGo7U24G8dm1uEZ3QL6MCDwlF3cSgXb/sweY/9nwJLz78X qEjWE+wy/4CitdrxMW0ncXwZ7mWPDALuPJRYaxsoZdJ7+GylXrLwcx4PjlDxMrTK7NfLxJ BJDLKtszy63Y/1MBz8DXDqNufJ5nbms5GQhbFKL/byA7CG7WS8rYwfjIPaPW1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697790232; h=from:from:reply-to:subject:subject: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+yo4z8TyPreV0AY+HtIDfL0OFY4c3qHWF3XdzcQNBs=; b=yj17uxsyGzLE20C7qePfzwC41ngpraWkYpFduYxzcqoYTCyeGq5QO/Cm0TX6OST/f4msJI J691yAX+RwPNI3Yp8ZVz/yThZ09D5L5DFHvvtuub6L1tyZiA2BmRY4HOw1QxyrXG3QWsVo rwrbObakBNc4O7UOy1e64lezXDsspb72uOWf2zTQoqJpuW36BA5N0ZG7kqcKhi+aqZkygZ 2jcIdz0Nbt/btIcOqcbX4kCZvyEqMPlL7ZYHfaXaLY3xs9cIutJ3kCRHJycKlw+9iylTkI XExqdO3IemlNARNEv5XiqsJUPCXm9VnibZGInfHDjEHSiOQV/BBB9ZlqV7EoWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBd084GWSz9v6; Fri, 20 Oct 2023 08:23: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 39K8NqbT072905; Fri, 20 Oct 2023 08:23:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39K8NqoJ072902; Fri, 20 Oct 2023 08:23:52 GMT (envelope-from git) Date: Fri, 20 Oct 2023 08:23:52 GMT Message-Id: <202310200823.39K8NqoJ072902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6134250f777b - stable/14 - pfsync: Provide documentation regarding message version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6134250f777bb4c32813eb056d4c0775f5f43986 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6134250f777bb4c32813eb056d4c0775f5f43986 commit 6134250f777bb4c32813eb056d4c0775f5f43986 Author: Kajetan Staszkiewicz AuthorDate: 2023-10-17 04:38:47 +0000 Commit: Kristof Provost CommitDate: 2023-10-20 08:23:41 +0000 pfsync: Provide documentation regarding message version Reviewed by: kp MFC after: 3 days Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D42235 (cherry picked from commit 18be782c4e5fcbe4d37a951a6c77c13b3c11b8be) --- sbin/ifconfig/ifconfig.8 | 7 ++++++- share/man/man4/pfsync.4 | 28 +++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 1dc4c2e1b56d..bd6cbd05210e 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd June 20, 2023 +.Dd October 17, 2023 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2886,6 +2886,11 @@ acknowledged that the associated state has been inserted. .It Fl defer Do not defer the first packet in a state. This is the default. +.It Fl version Ar n +Configure message format for compatibility with older versions of FreeBSD. +Refer to +.Xr pfsync 4 +for details. .El .Ss VLAN Parameters The following parameters are specific to diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index 5a1d576824e6..4decb50feb7b 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 6, 2018 +.Dd October 17, 2023 .Dt PFSYNC 4 .Os .Sh NAME @@ -113,6 +113,32 @@ dedicated to pfsync messages such as a crossover cable between two firewalls, or specify a peer address and protect the traffic with .Xr ipsec 4 . .Pp +When new features are introduced to +.Xr pf 4 +the format of messages used by +.Nm +might change. +.Nm +will by default use the latest format. +If synchronization with a peer running an older version of FreeBSD is needed the +.Ar version +parameter can be used. +E.g.: +.Bd -literal -offset indent +# ifconfig pfsync0 version 1301 +.Ed +.Pp +.Bd +Currently the following versions are supported: +.Bl -tag -width indent +.It Cm 1301 +FreeBSD releases 13.2 and older. +Compatibility with FreeBSD 13.1 has been verified. +.It Cm 1400 +FreeBSD release 14.0. +.El +.Ed +.Pp .Nm has the following .Xr sysctl 8 From nobody Fri Oct 20 10:20:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBgZj1TgNz4xcBX; Fri, 20 Oct 2023 10:20: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 4SBgZj11YLz4R5D; Fri, 20 Oct 2023 10:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697797229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97uC4cZ7p/nvx1NMZ84240BmMyHthFUMGB48eaS5sQ=; b=RSqZV9LtNratVO4VIKmLh4vC3oT+uSomxLPojIyUH/94ygsBnF/9LAqeQtOhILsJpOMMZ7 evdx3miWbhI7tqVAwrOdCoVRe8xNeYyG3XZHI9goORbDXhqg+WZQfrpd2SEHXxwFoKd9Ku pQYDdABirmeicw4GxEQgSd5T28XGoqdujslv3+j/MYVjweA0DGQX4HY9s5xyt7uA7Sp0i4 2/YOAWDKpieUiEaLynyTnpXJYK39Ct+onKSwUjz4vbySp4toGtGA/C7XiH+QA92E+D3MKk nMiYMm0fF0bKKvtP4XnvDoWo1rKg2ENNf26Rt0mjIrXZFN9gsc9Zc18hW/IVDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697797229; a=rsa-sha256; cv=none; b=DtOCpGs2rbIFMwvVfDujQblEh27ZXvx993V3FBLH3rtZC5jmp6qRoO8pwqWxlb/WQbod+g 3NqYvC8VkPkoHhgyQk7fn+28WgtBT10QU7YnVrZJN/Cuf6BkRd6rA4xeWbjm5bjhqxSFXE 1Ekhg6A1pmgBbaHks713/JAcDnRoOsRJDp3fmBRFNpxSZIKTJxpiJFhxsV6gi9Eh2eowRA hkaB3aqZ0Fgt4+6ILolYYEiiStPmfbOCKTEsfbicRdcJckfByQnRX1yz5buTCeb2tH172O tadfpirdWxllV9QpTXMGV9pfxqaRrVe7rumEBZ5aAY7Di201BwF3T+EOj+Lydw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697797229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i97uC4cZ7p/nvx1NMZ84240BmMyHthFUMGB48eaS5sQ=; b=FY2wwqo8aJjymHVAGX6tEVQ+anXwxUo3A7DcYaN/btq8ODOenfvTXtK5TcPhIbMXHOyJCr 7uUuvi3ky91+bT6aB2TpRKG5A3vbyZTZS4dI6tg7TAdoFneVKp49wd07W2D20EsFUCREma KULLV5oh528MGxBm3l04YHMp/vkaVF2ltRFEo9RMPmog4p4ytjRhKj0pr3FrsR0jzk627y paLsslpicfNV/RTpFtXCMhcTmF9j0KnwYFVXErnuX0c7YfPIhdKrDSgn9wzr4kBkbMDTXI ippcqoDc2vDOW+8NUizPm8maIadxDFQgxVQIlvcCXkYOJeULCrznQTDuzdVlkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBgZj03rwzDW3; Fri, 20 Oct 2023 10:20: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 39KAKSLo065522; Fri, 20 Oct 2023 10:20:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KAKSjb065519; Fri, 20 Oct 2023 10:20:28 GMT (envelope-from git) Date: Fri, 20 Oct 2023 10:20:28 GMT Message-Id: <202310201020.39KAKSjb065519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: c81166b018ac - stable/14 - Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c81166b018acfbe521f52415ff37b8c2696d77c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=c81166b018acfbe521f52415ff37b8c2696d77c6 commit c81166b018acfbe521f52415ff37b8c2696d77c6 Author: Wei Hu AuthorDate: 2023-10-20 08:58:20 +0000 Commit: Wei Hu CommitDate: 2023-10-20 10:03:35 +0000 Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read It is observed that netvsc's send rings could stall on the latest Azure Boost platforms. This is due to vmbus_rxbr_read() routine doesn't check if host is waiting for more room to put data, which leads to host side sleeping forever on this vmbus channel. The problem was only observed on the latest platform because the host requests larger buffer ring room to be available, which causes the issue to happen much more easily. Fix this by adding check in the vmbus_rxbr_read call and signaling the host in the callers if check returns positively. Reported by: NetApp Tested by: whu Sponsored by: Microsoft (cherry picked from commit 49fa9a64372b087cfd66459a20f4ffd25464b6a3) --- sys/dev/hyperv/vmbus/vmbus_br.c | 9 ++++++++- sys/dev/hyperv/vmbus/vmbus_brvar.h | 2 +- sys/dev/hyperv/vmbus/vmbus_chan.c | 12 ++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus_br.c b/sys/dev/hyperv/vmbus/vmbus_br.c index 27adf71fd6ea..f663bb7c2ba5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_br.c +++ b/sys/dev/hyperv/vmbus/vmbus_br.c @@ -684,7 +684,8 @@ vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, * We assume (dlen + skip) == sizeof(channel packet). */ int -vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip, + boolean_t *need_sig) { uint32_t rindex, br_dsize = rbr->rxbr_dsize; @@ -717,5 +718,11 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) mtx_unlock_spin(&rbr->rxbr_lock); + if (need_sig) { + *need_sig = + vmbus_rxbr_need_signal(rbr, + dlen + skip + sizeof(uint64_t)); + } + return (0); } diff --git a/sys/dev/hyperv/vmbus/vmbus_brvar.h b/sys/dev/hyperv/vmbus/vmbus_brvar.h index 8593c1886b0f..a04169f3291c 100644 --- a/sys/dev/hyperv/vmbus/vmbus_brvar.h +++ b/sys/dev/hyperv/vmbus/vmbus_brvar.h @@ -129,7 +129,7 @@ void vmbus_rxbr_deinit(struct vmbus_rxbr *rbr); void vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen); int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen); int vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, - uint32_t skip); + uint32_t skip, boolean_t *need_sig); int vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, boolean_t *need_sig); int vmbus_rxbr_idxadv_peek(struct vmbus_rxbr *rbr, void *data, diff --git a/sys/dev/hyperv/vmbus/vmbus_chan.c b/sys/dev/hyperv/vmbus/vmbus_chan.c index d5c4d357e9ec..ecb2e947c953 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chan.c +++ b/sys/dev/hyperv/vmbus/vmbus_chan.c @@ -1205,6 +1205,7 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, { struct vmbus_chanpkt_hdr pkt; int error, dlen, hlen; + boolean_t sig_event; error = vmbus_rxbr_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); if (error) @@ -1235,9 +1236,12 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, *dlen0 = dlen; /* Skip packet header */ - error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen); + error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } @@ -1246,6 +1250,7 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, struct vmbus_chanpkt_hdr *pkt, int *pktlen0) { int error, pktlen, pkt_hlen; + boolean_t sig_event; pkt_hlen = sizeof(*pkt); error = vmbus_rxbr_peek(&chan->ch_rxbr, pkt, pkt_hlen); @@ -1277,9 +1282,12 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, * by the above vmbus_rxbr_peek(). */ error = vmbus_rxbr_read(&chan->ch_rxbr, pkt + 1, - pktlen - pkt_hlen, pkt_hlen); + pktlen - pkt_hlen, pkt_hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } From nobody Fri Oct 20 10:34:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBgv21fRzz4xd2C; Fri, 20 Oct 2023 10:34: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 4SBgv20cfNz4Syp; Fri, 20 Oct 2023 10:34:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697798078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8J6umyz+MG71yhfXVIx8yZElTweAETjrew/FJOA5rZg=; b=rSYaVajhzqgYe8r+0FVRh1Y/DWB/oMojsJs19/AGwrl3mUJp5SmsPy6kaaKXH0YgC2r0k9 J+jTCM3guLGXkh+2f6NDbONqxfiRH4vjbWeI9iRUk7IKAbWobAjZsbp5dsqrK+GSGKsj+x FahW6lvw2vYwLyyisaM3XiCD01RZToVJMNJqSyW2eeaaZ4xRU57NsfOVT9QTETOJPHn3dS Hgirt6CmrfxCwUGU5iqxwO9U3cgWEVSZluDbjWOUXqiCcbKg/vwnsNQk45zqw+CA2s2oa2 XfO+wXCZkHr5ecUX+coHvql56qlsrpK2E17fFCQCD0pV7rL7hFQvNhY2ZKokFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697798078; a=rsa-sha256; cv=none; b=G16gYi1TrBeFMB97UTvmOCZtiVAf1hHsvsYLGnT+30fuUo/w1WDGFqg/TXRa+tEOUY95u3 44U67YeS0liZq43sulNNr8aGclNbju85OppCLyNDE92kf1VAE3/v6RlvXe91hfWgd1qvgt kSz09XOcU1DLVVMkOxAx1XNynpH1mBCHQdA6g9jY2SuOmzAls966t63j7gD6dfv/2zW1iT Q4d6dfGx/3nPi/o1IEg5NPYUmdZEDbM6f6v3pzetbNdbw49yoQbBscCUa/yZisFhOxD2ox N4J8VsgqX4i6M6OACdfkWPxqVNV4Pr+Mirhtmd8feo70G2rJTyVXIQFm2+GGUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697798078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8J6umyz+MG71yhfXVIx8yZElTweAETjrew/FJOA5rZg=; b=PEQ0PlVXm/MJWcvzVxWdn/zYmmIYpNSpiQPEKi8wN/BHAaP0Im3aglD2IIySwamgl1ofuK 3/IobiVVbGOgNfoNUU+IY68qDch/c/Mw1wHcHEXzGy7Oek/ZaWc6148yboO6a/XCGWiXKi lfX+/L+FWPbfY04obh7dP7zaZEdMWXntIdHJBmTQztT4QkpK1FyNUkGVuJ/CoYrVKgUfI0 ABsvj2u0T0caaBVcOXCJfabUXfoqkJO8G1p7HhiTpRBZnQziIajVgIZDnYZUSMTR3Ys/mc JJ5tB/htRPPlJJ/Zq0+kfNuEeBgWrLPP3RWWJ9oY3MOlSsNvAdgws/lGvHOy3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBgv16gFYzVMd; Fri, 20 Oct 2023 10:34: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 39KAYbPS089839; Fri, 20 Oct 2023 10:34:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KAYbHL089837; Fri, 20 Oct 2023 10:34:37 GMT (envelope-from git) Date: Fri, 20 Oct 2023 10:34:37 GMT Message-Id: <202310201034.39KAYbHL089837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: d0891e9cae62 - stable/13 - Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d0891e9cae629afebe1997c8912b79375221d9ac Auto-Submitted: auto-generated The branch stable/13 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=d0891e9cae629afebe1997c8912b79375221d9ac commit d0891e9cae629afebe1997c8912b79375221d9ac Author: Wei Hu AuthorDate: 2023-10-20 08:58:20 +0000 Commit: Wei Hu CommitDate: 2023-10-20 10:22:55 +0000 Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read It is observed that netvsc's send rings could stall on the latest Azure Boost platforms. This is due to vmbus_rxbr_read() routine doesn't check if host is waiting for more room to put data, which leads to host side sleeping forever on this vmbus channel. The problem was only observed on the latest platform because the host requests larger buffer ring room to be available, which causes the issue to happen much more easily. Fix this by adding check in the vmbus_rxbr_read call and signaling the host in the callers if check returns positively. Reported by: NetApp Tested by: whu Sponsored by: Microsoft (cherry picked from commit 49fa9a64372b087cfd66459a20f4ffd25464b6a3) --- sys/dev/hyperv/vmbus/vmbus_br.c | 9 ++++++++- sys/dev/hyperv/vmbus/vmbus_brvar.h | 2 +- sys/dev/hyperv/vmbus/vmbus_chan.c | 12 ++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus_br.c b/sys/dev/hyperv/vmbus/vmbus_br.c index 997a5de1b230..6418f8e59cf8 100644 --- a/sys/dev/hyperv/vmbus/vmbus_br.c +++ b/sys/dev/hyperv/vmbus/vmbus_br.c @@ -682,7 +682,8 @@ vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, * We assume (dlen + skip) == sizeof(channel packet). */ int -vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip, + boolean_t *need_sig) { uint32_t rindex, br_dsize = rbr->rxbr_dsize; @@ -714,5 +715,11 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) mtx_unlock_spin(&rbr->rxbr_lock); + if (need_sig) { + *need_sig = + vmbus_rxbr_need_signal(rbr, + dlen + skip + sizeof(uint64_t)); + } + return (0); } diff --git a/sys/dev/hyperv/vmbus/vmbus_brvar.h b/sys/dev/hyperv/vmbus/vmbus_brvar.h index 883b74e92d95..97bdc12d80cb 100644 --- a/sys/dev/hyperv/vmbus/vmbus_brvar.h +++ b/sys/dev/hyperv/vmbus/vmbus_brvar.h @@ -127,7 +127,7 @@ void vmbus_rxbr_deinit(struct vmbus_rxbr *rbr); void vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen); int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen); int vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, - uint32_t skip); + uint32_t skip, boolean_t *need_sig); int vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, boolean_t *need_sig); int vmbus_rxbr_idxadv_peek(struct vmbus_rxbr *rbr, void *data, diff --git a/sys/dev/hyperv/vmbus/vmbus_chan.c b/sys/dev/hyperv/vmbus/vmbus_chan.c index 85f87a5dbf99..ff42f75a883f 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chan.c +++ b/sys/dev/hyperv/vmbus/vmbus_chan.c @@ -1201,6 +1201,7 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, { struct vmbus_chanpkt_hdr pkt; int error, dlen, hlen; + boolean_t sig_event; error = vmbus_rxbr_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); if (error) @@ -1231,9 +1232,12 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, *dlen0 = dlen; /* Skip packet header */ - error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen); + error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } @@ -1242,6 +1246,7 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, struct vmbus_chanpkt_hdr *pkt, int *pktlen0) { int error, pktlen, pkt_hlen; + boolean_t sig_event; pkt_hlen = sizeof(*pkt); error = vmbus_rxbr_peek(&chan->ch_rxbr, pkt, pkt_hlen); @@ -1273,9 +1278,12 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, * by the above vmbus_rxbr_peek(). */ error = vmbus_rxbr_read(&chan->ch_rxbr, pkt + 1, - pktlen - pkt_hlen, pkt_hlen); + pktlen - pkt_hlen, pkt_hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } From nobody Fri Oct 20 14:14:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBmmP5rtBz4xqHX; Fri, 20 Oct 2023 14:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBmmP5Ks1z4mMP; Fri, 20 Oct 2023 14:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6QS9VnA1lCWOBcC468GXTQiEYH14OgHiDyAKr/L6iI=; b=ArqoaXuuA7aFCsMbAtxlTEqvoEJSK2gzfMCdTukhohMmeBIIMhpXNKzU4e/eToOHv7Wx0t UvvRbLjKDO8hLIMt72meI8V7MZFdAcvCldOi2u7cKYEPRZdQEnhExLCjBu7HeRN+VTM/ZF nORc225qMtFnuobYHc/PWv7CGCPyv3avLgCPqXUKsCbmOZozkOBQIgAYAFFewXdHEKYx6e PyNJKRoqCnjq8qjYCHCqnvE1M5oe+/VHZFUrjAeLaQ2xNv9dNttuy8ozIH+n+sLPTgfGTc jSnenef1EQtvKGvcFyxyxgSoOdd2rd57ZmAVoddtFgij9fWyHGetUlZNZgdtyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697811253; a=rsa-sha256; cv=none; b=kCPLs5rBqGpfffyPXVl7K0r04F9NpW7xK9BGiUs+BVEaAgpolIR/PFq06tRA7umTRt+QvJ j9yqyz2hpvLjAb61ewjFyGnCi+KsKajCD60vDASdN/IQfWi3Jh975yHeLIfU9VAy+j0UMo UNaaNY5FQ2WarzCRr1Lgqf09zQHPPZoM+xUBAE9nnKJy2Mjl6atIoSDNFLLBsciFjlvi6s AjlXGvTAlXQ5buuBi4q2kH1KHFYT78h1O1/GsDsSLl6DqAAwfaUpZ6mCZEsnuTPk+RlWRE CIddVfr7ier675d430C3WzA91zNaV/K3TvkbORYz/HNOvF3k7CPBeHGDc69Ubg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6QS9VnA1lCWOBcC468GXTQiEYH14OgHiDyAKr/L6iI=; b=bzHOfWQBQzdhJ+k56fERbI5HIRf5NFbUC4eQCvwJZfEnAgr1mh3rpy7iq15dpigf7aj0ya fRGX2lsu1+ESzEWcUaWFGNBPQ3LjKLu1Dhp6UbwvXDuneB9Oqygm27PXfH5EcNnAHeIU7K 5GpUPH6/8dvhNPN6exY5DW7uKkhz9WoHMkb9NG+oEg9OXWvKLJfx/9qiUHzhu6UJbgWyPZ 5Dp6iVYCm6ue+PjB/BcRPV1vEUMi76dAtEBBL6ypnBvx1OwTyIhHz8msVVvUKGP/xPjo1w gb5tckqzt0aIbDSJvHDmM5EmHn2+6Q016/mqcKaBF7zEtPzvUtf9XsohEkALhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBmmP4PK4zbMk; Fri, 20 Oct 2023 14:14: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 39KEEDau055057; Fri, 20 Oct 2023 14:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KEEDFZ055054; Fri, 20 Oct 2023 14:14:13 GMT (envelope-from git) Date: Fri, 20 Oct 2023 14:14:13 GMT Message-Id: <202310201414.39KEEDFZ055054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 8015c5477bd9 - stable/14 - pkgbase: put library links and symlinks in the -dev package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8015c5477bd9a110f12c77ab9d2bd98a15258ec2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=8015c5477bd9a110f12c77ab9d2bd98a15258ec2 commit 8015c5477bd9a110f12c77ab9d2bd98a15258ec2 Author: Doug Rabson AuthorDate: 2023-09-13 10:18:09 +0000 Commit: Doug Rabson CommitDate: 2023-10-20 12:16:47 +0000 pkgbase: put library links and symlinks in the -dev package Some libraries (e.g. ncurses) install links to the main library for backwards compatibilty. This change ensures that those links are in the dev package since the files being linked to are in that package. PR: 249143 MFC after: 1 week Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D41841 (cherry picked from commit 4e899378bf5d89c20430d32982d2635657f34c04) --- share/mk/bsd.lib.mk | 1 + share/mk/bsd.links.mk | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 3099c8e205b1..5f328d5378ca 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -568,6 +568,7 @@ LINKGRP?= ${LIBGRP} LINKMODE?= ${LIBMODE} SYMLINKOWN?= ${LIBOWN} SYMLINKGRP?= ${LIBGRP} +LINKTAGS= dev .include .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) diff --git a/share/mk/bsd.links.mk b/share/mk/bsd.links.mk index 990c4cb65a29..6070979612bf 100644 --- a/share/mk/bsd.links.mk +++ b/share/mk/bsd.links.mk @@ -14,8 +14,16 @@ afterinstall: _installlinks .ORDER: realinstall _installlinks _installlinks: .for s t in ${LINKS} +.if defined(LINKTAGS) + ${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},${LINKTAGS}} ${DESTDIR}${s} ${DESTDIR}${t} +.else ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${s} ${DESTDIR}${t} +.endif .endfor .for s t in ${SYMLINKS} +.if defined(LINKTAGS) + ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},${LINKTAGS}} ${s} ${DESTDIR}${t} +.else ${INSTALL_SYMLINK} ${TAG_ARGS} ${s} ${DESTDIR}${t} +.endif .endfor From nobody Fri Oct 20 14:14:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBmmQ6lcgz4xqYC; Fri, 20 Oct 2023 14:14: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 4SBmmQ63CSz4mvW; Fri, 20 Oct 2023 14:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCeFAN3t4K3bwf4/FC2NbJVHki7Bx0CKUVAQBvfWx5Y=; b=IseSEosbVd96tT9CXOE1cbRltbohoJNL3WGpVD3fU4liEuiWrHOkcSSvD5VWMHR7q6lIkp T5LwvswTX8E1lL53lEqnXo8cKDtNkxqB7joj5QrI7PW5QhKIpJtw6tDly//44bjg7tD7Ig NDJWkfOeoLpU3cmG2p6I//pNhZbJIzYFMFV6vgWkfrF/C0p6sTte9DS8k/KL1U1+46KrvX DlAOwbxxrYdofaNqxfFS7+GMKXDyOkBJBVTIf8RU8XY4342UkKOs7AfZamXGxQ0sWFpQsL NstPm3YPk6K288uqwLWb7e7bDYqRQwCA09fznoh/nBLid4fC+qSgagkceCgA0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697811254; a=rsa-sha256; cv=none; b=kaKORZ04KBVaq3uRB2YZaYg11xmmpcUAKPWAn3yZCyftO+/Dk3JObqMYEgYEFd/dhmhvkg 85FHSWktvMWaaTTXRqG7nQ6GZx/E0P1EZIaFnTEM314W4JvncdhxA8qkKrnXCOJ2E5gqrF 9DBaQPZbJkeHL5qYOf/EAlYnwesC+0PGBXzGOCkp3eTwrgyG6Kx7mbo4K4RIH74rE3htnT 5T2ZYp4zMCd45Uryt1LIQCKioSD9MZJRQETagTWwABtZZENs4QwOrMenHyOfV5k0fTfC8W Bwp/9bJNPGZ3Hqa6cdpYjTNjxg288xxBRO43Fzq4MI51YdA9slpU18p9Rc1JYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCeFAN3t4K3bwf4/FC2NbJVHki7Bx0CKUVAQBvfWx5Y=; b=Ru2JUPbtaKFDpP6/DFS6BoaHjJ/0zIVyCe2S+cuuHMo0TpgrLuvhpHEpOLxKJcqIlk4oSE z743ZiuEt9IXQd87cIvv5XpbDEqYLbR6C+z1DUaOWa0Pkj5dDNXWodAJm92VbaSDoEVemO e5g6U68ILn6L7vxF9AujTvynFRLjBXT6lEBMnLVCEwHWS+pPx5YGEzSS+oJSpVVOLY+q1o rIhUrAtb8zEJgO7H+oJJALdS8pU2MsY758WflfWlxr1DsOmcWLJCMj11T1EtOlYsqqUbDy cfTE/C6ylYPAH3DMzeMKCQiiJCsp68UGQ0O+wCkzTwqTzdpTqAQy87GIlHCqcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBmmQ58s7zc8n; Fri, 20 Oct 2023 14:14: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 39KEEER0055105; Fri, 20 Oct 2023 14:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KEEEq5055102; Fri, 20 Oct 2023 14:14:14 GMT (envelope-from git) Date: Fri, 20 Oct 2023 14:14:14 GMT Message-Id: <202310201414.39KEEEq5055102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 2eab6bc3c08f - stable/14 - pkgbase: Add instructions for upgrading past 78847e1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2eab6bc3c08f8f2238a24df336fcaa019592dca0 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=2eab6bc3c08f8f2238a24df336fcaa019592dca0 commit 2eab6bc3c08f8f2238a24df336fcaa019592dca0 Author: Doug Rabson AuthorDate: 2023-09-17 10:06:01 +0000 Commit: Doug Rabson CommitDate: 2023-10-20 12:16:47 +0000 pkgbase: Add instructions for upgrading past 78847e1 The pkg solver gets confused by the file moves and refuses to upgrade without manually upgrading FreeBSD-utilities and FreeBSD-utilities-dev first. PR: 254173, 273859 MFC after: 1 week Reviewed by: Mina Galić Differential Revision: https://reviews.freebsd.org/D41892 (cherry picked from commit 4ff9d270893af757b4348398c887e630d71edf6e) --- UPDATING | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UPDATING b/UPDATING index fe80f259cb12..4a8ce04b94e9 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,16 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20230924: + Move standard include files to the clibs-dev package and move clang + internal libraries and headers to clang and clang-dev. Upgrading systems + installed using pkgbase past this change involves extra steps to allow + for these file moves: + + pkg upgrade -y FreeBSD-utilities + pkg upgrade -y FreeBSD-utilities-dev + pkg upgrade -y + 20230824: __FreeBSD_version 1400097 after the branching stable/14 from main. From nobody Fri Oct 20 14:14:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBmmS0kkKz4xqQH; Fri, 20 Oct 2023 14:14: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 4SBmmS0C5Rz4mqQ; Fri, 20 Oct 2023 14:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZA+Ve7D9fDwxve3WA4EwZEg9ymXm9a4N7D0mVrPIMU=; b=kO0gsZE6UMIo+SzPvmDIYX0hCiOEmai84aM0dRxvmfcK4bxiQKtQUMAFhK4P20rqfBW2wI YV7TsIXWv2EiaFg6oxMrIT3kX8XMFp+vEOAT49j0GDNZ2VcLmact2Y5NkwI1cz1+DElchO YVxUXRbFuZEMwsqgxQThQcE7cD0OiXj9U837PzZTGS9eA7DeMm/V+93l8iEy+2xAhw7OxP Ur40rqKSqAUtWGiMT3Aua1/AFDfFbCzhA8VvQSFu/dEsyRWFC4LIMQHPZPtczBG0HxKq7s PmjuXlGUeDyZ3s0RnLsSzUeCN2clCZ0nL0LjeYgbY3punvl5DGNLpPv+WOUbGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697811256; a=rsa-sha256; cv=none; b=XEJxvRw4A753yC14qzPDg4IKTrfqOf5spGKKsKXf9yg4/vq6JtmdclwLyljDrZh3MovJJI oe0pOMOR3fxXy8ytC8TP4i4UrLAYfdxjB4nxxNuK+QAwypKflK8cxL+eJgZmQ5FJd6yjW6 99qAcV5Mq6LCnbsENLg8i2C1X46dlvPjhYFnM8tFCiqaU71jkLrx+EMNaGhedEJGE+f8aZ JaZmuq9y2ypOWP2DCrZSBjlUD3/YBIqiJIDGL2e9t3ukyEJPLEkwora5+1E0ObJU7aPRj2 fUTSSj/2aQqlAr0GdC2/OYvMCkVHWBZZvmGwIdoJF7FU/QRH+0N2qxpoUJLwmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697811256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZA+Ve7D9fDwxve3WA4EwZEg9ymXm9a4N7D0mVrPIMU=; b=uO8O0Qp5gO0K+jy+si0LS5C7oU1Nf0T2SvpEElKzjXLsKecG0oBEqsmJPJLUI5/jriytri vfdF5QHjIBND93DUiyxTsjbQTkC5cv97sKr6ebBsUyjlZUW1schN0ZJrAY1KRN20sa31vO R/usV7/jP7UlWlujBubk18eEwyfimSg4hvw/k6WImgQvIagaIRYt90u9KatckHJttFC1D3 jxmVHvXfvtjPlIXReO5Bu51f0RqKAbUhgfRHbWMJAzsDULxTbd6U+Qln9oL7YkhbO6Abgv CBHON/RWw+JNBkUy4v93kPI6aapto1ujhTqTY+9dviAbFKxbTAzg+tzLgUrF3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBmmR6QmmzbMl; Fri, 20 Oct 2023 14:14: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 39KEEF44055156; Fri, 20 Oct 2023 14:14:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KEEFbc055153; Fri, 20 Oct 2023 14:14:15 GMT (envelope-from git) Date: Fri, 20 Oct 2023 14:14:15 GMT Message-Id: <202310201414.39KEEFbc055153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 254f85f060d6 - stable/14 - pkgbase: Split out manpages by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 254f85f060d6542bfcb5fafad9a0e0b7d76abc4b Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=254f85f060d6542bfcb5fafad9a0e0b7d76abc4b commit 254f85f060d6542bfcb5fafad9a0e0b7d76abc4b Author: Doug Rabson AuthorDate: 2023-09-14 14:38:07 +0000 Commit: Doug Rabson CommitDate: 2023-10-20 12:16:47 +0000 pkgbase: Split out manpages by default This helps with building small container images using pkgbase. Reviewed by: manu bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41861 (cherry picked from commit 74da9c39c3460213750477204979989b5c39cbcd) --- UPDATING | 5 +++++ share/man/man5/src.conf.5 | 4 ++-- share/mk/bsd.opts.mk | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/UPDATING b/UPDATING index 4a8ce04b94e9..9858822f4071 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20230924: + Enable splitting out pkgbase manpages into separate packages by + default. To disable this, set WITHOUT_MANSPLITPKG=yes in src.conf. + + 20230924: Move standard include files to the clibs-dev package and move clang internal libraries and headers to clang and clang-dev. Upgrading systems diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 82c8752722a1..b31d44abde9f 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1157,8 +1157,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Do not install compressed man pages. Only the uncompressed versions will be installed. -.It Va WITH_MANSPLITPKG -Split man pages into their own packages during make package. +.It Va WITHOUT_MANSPLITPKG +Do not split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Do not build utilities for manual pages, .Xr apropos 1 , diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index bb9fba38e5a6..b4761333d8c5 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -60,6 +60,7 @@ __DEFAULT_YES_OPTIONS = \ MAKE_CHECK_USE_SANDBOX \ MAN \ MANCOMPRESS \ + MANSPLITPKG \ NIS \ NLS \ OPENSSH \ @@ -78,7 +79,6 @@ __DEFAULT_NO_OPTIONS = \ INIT_ALL_PATTERN \ INIT_ALL_ZERO \ INSTALL_AS_USER \ - MANSPLITPKG \ PROFILE \ RETPOLINE \ STALE_STAGED \ From nobody Fri Oct 20 15:56:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq225bVhz4xw8s; Fri, 20 Oct 2023 15:56: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 4SBq224xkXz3DwV; Fri, 20 Oct 2023 15:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2cBBTEv13yjQXoWhDnCbuLgn8baROzlGN25i/vHWO0=; b=fqJFPywCu+Y/M67fDZfg68AG8gynKjHqCzbck+QrAZ+GWZUtYby1OvTei9Ebl0bNuRP/xI /zgA3zRrx5geGvl0w0nwNGsRxzQyTjfjTasHzEtz8vm3cWf3UPNDwr0bwFQgloBsfQMzt+ S2B5S9/dJlKOVNAz/ghvLgsoZxnvv2lrf05GSvm9WauaNoLD5zFTYIpZVqDh6g79Cuh43d 532LLM0Un0qGUULJ7YF8yECO6KvKhEPLV4gsUmus3EeRXTCyDoH2uMCTkXy6YxIM6Z1L8b Nsopnv418RwTkMUWGbwAeqHLjuHniFf3RB/6bOpzmuDO2ADuhAGGB/TOQN0Gfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817370; a=rsa-sha256; cv=none; b=uHigjVwqnPKJEghsT3Wf9d/y4Uwn5VkbR9a/9gV1fkDpd9VsGZ2gz4YoH/MILqWqeNhOOq jfCFIdLWtRv3uIr5PvrblY2hpDHlqc18OShi98+5qSm6qhjX92F8YEdiVTJ1w5/we4xm0D zy9NEv9YvZtSjQmjsl4EgL/W/5m2eHvsZsqJGR89U+ybtFdWP8OG40T783/yGa4f89zCiC 1v+RmtRqO7hdRly2T0NJDdwXAbV1WUWVpeR1bAR+H8vIFjwXXprMBz1pUtbC7SsU1r79eT KoP86NZuQa8rJAcwu/5q52h3Oe1kBAHvjD123ebI121MZsxKilRjqYUxSN9t0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2cBBTEv13yjQXoWhDnCbuLgn8baROzlGN25i/vHWO0=; b=CrxfA3XLiiCzsz7IWoNIZ2LzxnSasQUT6bfZFfkpCopc35xqNqdLh1ZYqYbUO0MsLdoCrE RijsiVqqUY9Xat6w2Q8VCYiyNh0vl9461qHaL61xlHrKyQo+WaR/99pEgafuYJsq7vYNXH r6kA4oXDzgaa+olTS0UTcIaQ1EtPpSUGDMVLBjbVS3tb6w40XqYRxGdkkYgTNJtRBvZ9fJ OcY7x6JW6g3qRdVSMIUwuRftp6Da10Tfw1KuwSLP0voz73lSenCHZ3/1cTlgMo8X18WorK /HFXa42W6ayDBv1k5ccRjxTD9nb3w1ET4SV9OMdFhU99qxS3ggRNA7C8denOaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq223zNGzfgR; Fri, 20 Oct 2023 15:56: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 39KFuA7K021521; Fri, 20 Oct 2023 15:56:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KFuATs021518; Fri, 20 Oct 2023 15:56:10 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:56:10 GMT Message-Id: <202310201556.39KFuATs021518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e857fe22279b - stable/14 - arm64 locore.S: fix typos List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e857fe22279b384322faa9d0dafd7896cef871ca Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e857fe22279b384322faa9d0dafd7896cef871ca commit e857fe22279b384322faa9d0dafd7896cef871ca Author: Konstantin Belousov AuthorDate: 2023-10-09 23:55:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:55:44 +0000 arm64 locore.S: fix typos (cherry picked from commit 4095e0bcb9e8fac51eedad89211a5b16af7f55ad) --- sys/arm64/arm64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 0ceb01eda5c0..d3dfbdf8a76f 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -134,7 +134,7 @@ virtdone: sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp - /* Degate the delda so it is VA -> PA */ + /* Negate the delta so it is VA -> PA */ neg x29, x29 str x1, [x0, #BP_MODULEP] From nobody Fri Oct 20 15:56:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq236DQtz4xw19; Fri, 20 Oct 2023 15: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 4SBq235qGXz3DxH; Fri, 20 Oct 2023 15: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=1697817371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZiHgBVxH5GiL5rBZOi0kHyIHavvEiZYt4LqzY9G30k=; b=azV91ZiLGpwyN2Rn7VTezy3nzVnMzeD5AAl6dRlKTFTFWlyLf45pPl+aYZcj/+vyrDuIxd ZAJZwxLQ192uF3b+NcqmQF3kzmSFqj4KCLmaFA7jDMgM4lbzuXhkXZ//085h4tqVbblneV owAvmPVQ8DcQwTpn14lXc8i81NMDy8yTKB9lYCRVbnjVsDfxOKvhOt2hHz6YUIV08RPqp/ xKB3ZJ+/C7xR8tBWMAC222a+kfKfEjTPL2xk+q0SvWt+bL6TSloyfRov5Vo45gvXPAwG2C o2jv20/wUkHBI7oXV/FJNH3tyAhMgh0C6V+lE5DtZDZYb9l+64+Lli2bC7MVbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817371; a=rsa-sha256; cv=none; b=CC7weM08H+Yq1jXxIBolXaFzTbIdARviTmGu7bZYKSLEg3PnoNomYYe9/+OOyggOM021zs dVjsFL2KH/1ZPYETqQdVu8pz8IlErRuCxpziZfrlWRAks55bG3aBsBBsaz6vVEX4yHytZp iX7z2KZUlchpvlaZulWVhpdN5qfeE5PJd7ipoY0gqdP/xbwc+Kp2T25QFDU2N1XJBkyuHr DTuWVLNtep13lyx5DwnAFJMqHJ+4Qx36MTvcuPrRXgsuT+VDHJJJEPDZhEnsmoP161SRfC xG0gbQwXnQMlLMxPw0HTfC3NceZD0eZ55cecN0qq9ozD9kU38tSJSGHT3CkfEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZiHgBVxH5GiL5rBZOi0kHyIHavvEiZYt4LqzY9G30k=; b=uLCfwQJUBhG3bnZksked0A1zIlRhImF9Rp9lbhM11vk6GbCzcMUrI8VQuLDKpE1Iwv95ed lFQVmWYmJxFWSHbrlFrrKV4yTD2+XjUXcRCCF8p8bvdO6aXjltyUoA554aU3OaAn1Odal5 VcDkroToF1UneZqLfw1VBDyL6EUSJBINTXeBcrKLW2EjsxCAuf6URxbOheg9P3XWMX+zls 2JuXZKeM1TklCFXygT1P/PTjZSoA/eTRkLcF92N+gEXIi/64yKHv8/YyQuy0yquMita0AJ wiKir8akm1g2ZL0HdsHzJdk1ie/20snP3W5DcuC4d5osvMbisGjUMVn3aA0Elw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq234tWvzfM6; Fri, 20 Oct 2023 15: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 39KFuB2I021581; Fri, 20 Oct 2023 15: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 39KFuB8Y021578; Fri, 20 Oct 2023 15:56:11 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:56:11 GMT Message-Id: <202310201556.39KFuB8Y021578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3f5b4dd6cd35 - stable/14 - arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f5b4dd6cd35e00544c332422918c296ca853162 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f5b4dd6cd35e00544c332422918c296ca853162 commit 3f5b4dd6cd35e00544c332422918c296ca853162 Author: Konstantin Belousov AuthorDate: 2023-10-09 23:56:37 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:55:45 +0000 arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator (cherry picked from commit ac63f7534d0102352bf993ebe2c748ce2ffd432e) --- sys/arm64/arm64/machdep.c | 3 ++- sys/riscv/riscv/machdep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 4bfbfcaa91bd..8aa45a86fef4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -26,6 +26,7 @@ */ #include "opt_acpi.h" +#include "opt_kstack_pages.h" #include "opt_platform.h" #include "opt_ddb.h" @@ -380,7 +381,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 6bc0b996948a..261dc8d6d840 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include "opt_kstack_pages.h" #include "opt_platform.h" #include @@ -286,7 +287,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; thread0.td_pcb = (struct pcb *)(thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE) - 1; thread0.td_pcb->pcb_fpflags = 0; From nobody Fri Oct 20 15:56:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq247464z4xwKh; Fri, 20 Oct 2023 15: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 4SBq246VXxz3Dy7; Fri, 20 Oct 2023 15: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=1697817372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St9DdKc3KElN5BamUSG/EKWnKqxJ6ho8K5POonEw1rg=; b=rLMiHD7SgPVCl16I7hk5WgVACVk6VNCGXmPatDWB0OSbT4KLD/51giadAixu9uhuDb+h7P lwM6JuPkrpd+Fpbw+DJo0W5t/jaahc0+R3czRAZbzQ1HbcIojuYjy7BLZnqa65o0ry/RHR RuEPtztTiTtSxg8COho91kLCw5v8BDCdYa4PNn0ZAF1OYTuQztCo+hrFQZfOLB4wMwuC1d QmeYha2J2nLn/TWq++LuPHWRlzWZiZwRMZVKM+kAqZuxHuQxw7NZqnT0Kqta5TC3dAMndQ RZgUH+GwOXzWJ6ZdckNsVkyH617tYNVA3J8JFupDtwg4WBvMnxfPRhVnjxVWOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817372; a=rsa-sha256; cv=none; b=JTsJ0XpRKa18rm1TG8bj1VqHw+BHMhXapoT08/8995L2pAJ0X0RJsTF59LeGNVvQEcbqT4 50zOcXxpJzGw7l8Pv3Nc/nWvrzBBBAtHSpcfBE465wW4yEPN0pESqw6ElB0/rL87SF+vw7 9t+n7ubXtAEXMjnwo5E9jezKT6wd18ugYhozib8qSZkwmBMcELqYDWSBL3Hlrinqy0Xtt2 5dwp22g7U3UHEV3LO2yQE1tE7Dbahbp6aUk3o3NUoTcWIw5nHl1e/BgXNcYanw05Zz7FGu u4+aYSh2XEagQOGQkU787jafAL00r1srnX6tuub44nX86RK7IW2ynllLyFYvlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=St9DdKc3KElN5BamUSG/EKWnKqxJ6ho8K5POonEw1rg=; b=UT6QADQOdDkax4oyue8kGkMpwgV54zDPiUIooQtRPhV/rA7DdpkvotGJR3WOy2x0LiUJQV vtT+o6HdnB8nmw6kLRyegSQrKig1lD4vbUm7aw3zVSMNMlIzWrqgLZw8CYdYvAirmd5qsH ZHllShKVSdKXFKbyUaDQF367HnJc67kOwSeqJf4UlpxeHeJa0o0DB57dFmvKWGyIIp4wPK bl8JsndtM3INl7cS0kfkpQayt+dlnShF5SaqXsVUPB9kwJtscKtn/3OWeNaFXvPzcR970Z I9vxg8fpCE8sMJjs76i3u5Hw+AjzQsPB0R/Nw9DLyYuRQMZdN9VP8UKAFaX3Dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq245Vgtzdh6; Fri, 20 Oct 2023 15: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 39KFuCjJ021645; Fri, 20 Oct 2023 15: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 39KFuCi9021642; Fri, 20 Oct 2023 15:56:12 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:56:12 GMT Message-Id: <202310201556.39KFuCi9021642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d4ee047036ce - stable/14 - arm64: do not disable the kern.kstack_pages tunable on arm64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d4ee047036cea25334da2157171fecc26f6cb13c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d4ee047036cea25334da2157171fecc26f6cb13c commit d4ee047036cea25334da2157171fecc26f6cb13c Author: Konstantin Belousov AuthorDate: 2023-10-10 00:02:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:55:45 +0000 arm64: do not disable the kern.kstack_pages tunable on arm64 (cherry picked from commit 39cddbd7a07c182c4f121bea5a6effa36862fc63) --- sys/kern/subr_param.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index f7d6cf848424..b7dbf606f492 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -170,9 +170,13 @@ init_param1(void) { TSENTER(); -#if !defined(__arm64__) + + /* + * arm64 and riscv currently hard-code the thread0 kstack size + * to KSTACK_PAGES, ignoring the tunable. + */ TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); -#endif + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); if (hz == -1) From nobody Fri Oct 20 15:56:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq261gpfz4xwCT; Fri, 20 Oct 2023 15: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 4SBq260Ccvz3FBn; Fri, 20 Oct 2023 15: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=1697817374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=isLGar7BMNzqFaALeiePwRY5bOxldbbq5P68f8Z2XjM=; b=qDGn1jP9gpHO5Vnhy6rHJ0iKsFeU1TDf0YJXnZPf4eE73Wjj1XzKNg7Q1STKXsk28+YdcS 9oJnHNKJlHqqffRBG1LIWMu6s61QGxKyeiv5Ow90VNoN80J4wUjn9GS6HHRpOi+V87QTPv nbog5MoOXUtnhbuT0WHMqYUlpa7kKZdv2Rel6/nB+5GIM9q6PAFm0BAC6wYaVg1ZjlXpT0 a15mLPoksyQul2ot+ELLmbCS3mrg3Wzmi8aTsxGMXVuCUu9HnXgv+J0TFYqqE7lPL61OSo tGxXJGtw7bjQoOGD5Ipg7TbLGkhRyzeSzDSmIadU1R481gMfnTNBwJyDuvJpQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817374; a=rsa-sha256; cv=none; b=B7++aYwm2TZXes08CSwaQTdalSF2FdSiJSXuwcQgaFfCsqIlkY6FjgyZ1rX6S/Gj5yvmdA Dmg9mVVoe1MPy/On7ycunn6SyVapcSJNI3c3ebvtBaOQ1vJ/WC8twv3VsgUMM6qKFGSC1d x0uc8FxTn1lGVVf9C0e3CYXtNbquV9gfcJGr/TCpuUdUTry1O9ptqPcMsE11AQKiCT9NIs GjtlcxRB9OoNCCCxy4O/j7Mh7WLhMtn1GfXd4kVyVfPrwV1Jf7Esmw/LXMlhe2g3Qna1Ed C9Vt0XUzZxyL/Scj2FZinfxNRdmXVa1wBMQSEnHi1HPF0R+HFbpHz3UOvP2fjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=isLGar7BMNzqFaALeiePwRY5bOxldbbq5P68f8Z2XjM=; b=Fmcr24/W4w+FmGVHZwxqtTWcmfZAdorpqoJQG17xf6jIUGryFvL4p+5xz85FXmUUMrmWJT llRQIB5QHiCvcu663DxJVaZptMw1Cfrlzs9mS11DvGcvtXZ3DUcLXj+XiEMCEO7TRBUFN9 JherT9dgSkLaF0HUiQiw6mCFpkxG6UDHivryQsB3lqIKzWNZBJsPw1Hl+sLeUnJfd3mmzx Qr43sb9cPTEDdaoDkiPe5dvwR4QmasQc+6/pgQ1myEaGmlpHvTXTJkCNbMIHW0jIVFVNsE NfPQahbkBqO22XjJjxsSd9LRacCapLcmBzRG7P2rLitu4OMks5G2s9Bkt56juA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq256QtXzfGC; Fri, 20 Oct 2023 15:56: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 39KFuDJP021697; Fri, 20 Oct 2023 15: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 39KFuDls021694; Fri, 20 Oct 2023 15:56:13 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:56:13 GMT Message-Id: <202310201556.39KFuDls021694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1c02fbf2305a - stable/14 - arm64, risvc: warn about ignored kstack_pages for thread0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1c02fbf2305ac0f058c42f9b81de8543c6e19ff4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c02fbf2305ac0f058c42f9b81de8543c6e19ff4 commit 1c02fbf2305ac0f058c42f9b81de8543c6e19ff4 Author: Konstantin Belousov AuthorDate: 2023-10-11 18:56:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:55:45 +0000 arm64, risvc: warn about ignored kstack_pages for thread0 (cherry picked from commit 6aa641b71d0dd1b26674f0b6dba086410f643595) --- sys/arm64/arm64/machdep.c | 4 ++++ sys/riscv/riscv/machdep.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 8aa45a86fef4..bb7689c19101 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -1049,6 +1049,10 @@ initarm(struct arm64_bootparams *abp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 261dc8d6d840..d5767e240c7e 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -596,5 +596,9 @@ initriscv(struct riscv_bootparams *rvbp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } From nobody Fri Oct 20 15:58:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq521bzgz4xwHN; Fri, 20 Oct 2023 15:58: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 4SBq5211gKz3Fwb; Fri, 20 Oct 2023 15:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckWEr9Is+rJLhFVDlFykXBBz4VmeNHaHesOFI6atAbw=; b=kftDo79hu6VL9F8g+NP0YoFnvclbOV2MVcwqr6MjAgaQ41MLAi1KxnxauT/GVcvRNV3fRw Hm23Mg7KWUAcWuJXQc846Q5cQlEOuaczrz6zzLx6Uzvuty1zcodAaW4tghc325/crOAgNT cLxxSpwiGKHFB6rEvDeU51JXsU3pmrq4s3MAhE8Kj6C4mdfYmPrNOo5fGw3AzrSIVXfqrg yGxVOKg8WZselA7KDPgLwy+YNpA8ix5H+9Y0UhrXGZX/qnGdZ41EeMAzgzrESeNViFuVZ8 8FDFVVBCox3Wt3Mg4igqkVrleHAEpcgfRYr9BfdkJ3ULf154KqcvCcPylb4QPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817526; a=rsa-sha256; cv=none; b=va7YD0qBKT4zgWrDZvGy1Qy1btrg0IUiCe6px4MMxBtXMAljgI5KGLTKGSKW0VPwTJQOdM fzFjmJj8P9MNR39dHfvvqg7GUg80HbJVg6JtG+IqTqWegORV7i+SDowIOgH0Lp6BuX34ri LVPE43L0OB7FMFWBXgE3RpMG7Z/PQz5pDT0miOK9fqVXxqxfaNNbnrLZVcn+IgE0IJXA4M uL5l89FDCRMfwLbjybG8Zsi2AUgyuf14Y3Vdsi5aG1aFRe2srHSLe6hwE8SbLPVJvx2rrW Q5AzyRdY3e4/LpbKmi09wP1KVjjlRu3qntRM5r+ANDGhOfX9p8RFe6U5k3rHNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckWEr9Is+rJLhFVDlFykXBBz4VmeNHaHesOFI6atAbw=; b=jVo1DX4crSMYqrLMOs+/vcYRz+PMkc8Am7jDZckNQsl1nnAIHoDomyGbOe9/ITtLw7fRIx i7Dhf65RRxy0y65Bf99JPI0TgxYptlKf5Kv+avMVmoKLCdVbcy3ln9gdhExwAGVUB/P4Qf RO4PMDjFMYuA0vZIRMti6WfzxxbDgYqKzi/DIvSKTn1OUjdKhUIwJyYPMoWp6Q/YffpBJ8 +/fbnWlpqkJm5j6wR1VYl4ja7DZREe0YJu946aespeNyLrSnqiX+kp+ad143XqmP1elHqt C7wvINaVxZtU9qoj7bZttZHoC8wZ6QAUal/daBFs2Uc366VspFYeH74x6I52Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq5205SszfM7; Fri, 20 Oct 2023 15:58: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 39KFwjgl022204; Fri, 20 Oct 2023 15:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KFwjE1022201; Fri, 20 Oct 2023 15:58:45 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:58:45 GMT Message-Id: <202310201558.39KFwjE1022201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3676f1a422fa - stable/13 - arm64 locore.S: fix typos List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3676f1a422faeff4fabaf2d45b3fbc04d9b01d9f Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3676f1a422faeff4fabaf2d45b3fbc04d9b01d9f commit 3676f1a422faeff4fabaf2d45b3fbc04d9b01d9f Author: Konstantin Belousov AuthorDate: 2023-10-09 23:55:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:58:14 +0000 arm64 locore.S: fix typos (cherry picked from commit 4095e0bcb9e8fac51eedad89211a5b16af7f55ad) --- sys/arm64/arm64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index cde28116ff97..4712f8591b8b 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -130,7 +130,7 @@ virtdone: sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp - /* Degate the delda so it is VA -> PA */ + /* Negate the delta so it is VA -> PA */ neg x29, x29 str x1, [x0, #BP_MODULEP] From nobody Fri Oct 20 15:58:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq532PJrz4xwKy; Fri, 20 Oct 2023 15:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBq531lvXz3FvC; Fri, 20 Oct 2023 15:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sa+G/c0wcg9IWkWTus+rFhjGoRhoI1OfTjK1GLGxvJc=; b=gQ0WcglnCBFhGNwhw/Abk/1K9SGgrn7PbYvOSySEzWDiBFzEi8mwi03yaum2FL6jFdZPgG /+x5+RtayUtYNApsgrjUbsZW2TNvm0u3y6fA0PrtJzFBI+W3SdA2DTbaCX57nhiKN97aSO u9foJW8xYd1AmvhbMoMvfoFubb+H3LY03aoQG+TeHUm2VRUP5YFGIt6HE9HUMazHdH2WZ9 ve5JuFeuyo0cFOjLl7l7h+rEcdY4g2JCzMeKsv9q5EmBl9SBB1Fb8nO8zJG0Ux/usTDIsr Qx+WeoxtbuMmFg7qplTs40S1NlEIfUOPWQBxELrEdA14sTr4TGlrOYrDRgPRVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817527; a=rsa-sha256; cv=none; b=iLbiLwY02YQy//ZqgArdj554XUUuOLy/pGWpF8T30sSGvqwDIz1TxkmeH/FhadL8wE/orW eZhI3t9tEU7CGVRFJnQTHNmfgeQWjlb4A5LZk3Z0lX5petirpMrBGb1x+5dJk2dY1wJ7Uj yCXKqI74KcCKspHW1qKFrtTo/g1CaEzvmZPzHIoBE8arOrCrZJbtVx1ZpXDCqFvskc6jFL dE2YEmXX3rHZJ7jVcWZvOh5ncSHRDaiD8iy0prLmPC4vpk4pc6N7b1EI8KknA+njGukJYN lpkeXdKT4xjEjKf6Y1h1RGAQr6sRmBD8lmoMhNXykGfZny6VB157skF2DDjb2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sa+G/c0wcg9IWkWTus+rFhjGoRhoI1OfTjK1GLGxvJc=; b=Ga5uHIhHBbQWWS6kIEBBDt55f6hWlsrI1Jhhwjwx0ttdfIvVowgiMCZcdfJ3YOiP3o4MU+ wPP7Dm+a5jomBpEVwSZsgd7LLDByqImzBFx7NycsyBcpceXYTtfsHSXmS/ojMuTErRcNGO h2cztWLo+QjDShGslqluEUqcJcjlcXFu8O0YIjk5wZARm9m7TAbGJHLRZi8EhonZxcxvRK TeSjBP9RneEU1C5lZpD70ervd0yPq4emF+eaHT1j50p1MWuKQIweYqc0YxgHhTcqCdGWhT Gowq8bnlY8RiWX8Wx1XAqtUgX0y9/AQ4+HbjgPPKhffaR02lTkMXyv0McoZ9cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq530pbjzfdD; Fri, 20 Oct 2023 15:58:47 +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 39KFwlul022263; Fri, 20 Oct 2023 15:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KFwlmw022260; Fri, 20 Oct 2023 15:58:47 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:58:47 GMT Message-Id: <202310201558.39KFwlmw022260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7dd8fb3cd9fc - stable/13 - arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7dd8fb3cd9fccd11082cc82eba68de4c6114e48d Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7dd8fb3cd9fccd11082cc82eba68de4c6114e48d commit 7dd8fb3cd9fccd11082cc82eba68de4c6114e48d Author: Konstantin Belousov AuthorDate: 2023-10-09 23:56:37 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:58:14 +0000 arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator (cherry picked from commit ac63f7534d0102352bf993ebe2c748ce2ffd432e) --- sys/arm64/arm64/machdep.c | 3 ++- sys/riscv/riscv/machdep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 0c64160596be..a575ca5eb818 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -26,6 +26,7 @@ */ #include "opt_acpi.h" +#include "opt_kstack_pages.h" #include "opt_platform.h" #include "opt_ddb.h" @@ -363,7 +364,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 9aeeb4f1252c..b8a60d3a2bff 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include "opt_kstack_pages.h" #include "opt_platform.h" #include @@ -289,7 +290,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; thread0.td_pcb = (struct pcb *)(thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE) - 1; thread0.td_pcb->pcb_fpflags = 0; From nobody Fri Oct 20 15:58:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq543HF9z4xwbn; Fri, 20 Oct 2023 15:58: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 4SBq542mz6z3GM7; Fri, 20 Oct 2023 15:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiiKQap9yxyqWObZydv89IGvVCxcyyfbm+gQSSGtYEY=; b=ypeSt9bhJr4fMAx4NUF/L9MiCWbkfzRUOa8gk67iO7xYz8qyC4GsbkG3L8uz4qg2XGQhpt 11eASXW9lUpP8/8EidYNiRMUlgvPLPM7UtO70QNtDOKtZi0g01cj9k305XEyyqLAIoQ7Gy FPaRZp9qZg+8odDfz/FNSedJHi61Ol+n6PUiAprADuEWWMB1SdMHMRwaMStlg6XPaeMure 6MM7Z1ItvHL/xwZxxZ7EhipYGogAySTCZa6pJyGqlgENPrOSN9ouW60dx8be6Zkgc3mNML sHp8q99JydGZoqivy4NT514zG5A7C2g0jfwETPWOx/jx50AEjV1keg2Y0jPFnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817528; a=rsa-sha256; cv=none; b=xVbbeB5AwFjoJ3dRvmfDgzYLApfV0w99cQj33wbN6Vi0xWrF4cYhBBG6huwCPTTuiVOQAv +S5DFcjTyaEhmISLCVOr3CkMWGvFKxWMqnmY9vsy49+jEvls7Lk4wVJ/+myG00COWU322v TGPdj0pUqE/e2PH4ruZ7uPAoiToFn4yHYfZaUJaxeDomxAg5Eyt0mod6EggZsinWbjfoTv 1oM/Xpha+W9t3kRU3yJD4G6HUAgiTRPGRBCrVlE4LowcQzyghT5qP0JCz94DMZI4I/ApE2 2S7cr8nJaT1mDJVrSaIgXju3A1d5/f2VXpW0hFe0GC65yYTU4AEBlgbdL21W7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiiKQap9yxyqWObZydv89IGvVCxcyyfbm+gQSSGtYEY=; b=asoQg+lFwklwFC1JEssPwoFSDgwzVIWwn7J7soWW02Zs0Tl4XdpYBd8GGj31CRIA/EDdIN U53DnnV/A3G/q68/DTLk4fX8CUNKIXpH55C8lonYnNbxh1iY9g/VpAsu/S+PKxiAkvaFvg bTxjEY8szP9enq4YA9Fgu003DD1Vcxm3uUgTpsSF/Q7tiH2xH3w5mSY3iFNynl4to42FO6 IjzE4mOcgEoFVHG/KlwaTINJGxNMr8nHYrW+s+jxpnvG5jiEhpALVGFyWoNV77hO6yVg/R XgvNJqpV5AJdNzhxfsA1/FvjU9PBEILefrw4k382n5NokqL/KXv7bFxOOkFSfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq541qyNzdh8; Fri, 20 Oct 2023 15:58: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 39KFwmg8022317; Fri, 20 Oct 2023 15:58:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KFwmgX022314; Fri, 20 Oct 2023 15:58:48 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:58:48 GMT Message-Id: <202310201558.39KFwmgX022314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1562a8f4b72f - stable/13 - arm64: do not disable the kern.kstack_pages tunable on arm64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1562a8f4b72ff44eef090d07624b9dfce1b02bf8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1562a8f4b72ff44eef090d07624b9dfce1b02bf8 commit 1562a8f4b72ff44eef090d07624b9dfce1b02bf8 Author: Konstantin Belousov AuthorDate: 2023-10-10 00:02:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:58:14 +0000 arm64: do not disable the kern.kstack_pages tunable on arm64 (cherry picked from commit 39cddbd7a07c182c4f121bea5a6effa36862fc63) --- sys/kern/subr_param.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index d26a1902f16c..c2672d98ba8d 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -173,9 +173,16 @@ void init_param1(void) { -#if !defined(__mips__) && !defined(__arm64__) + TSENTER(); + + /* + * arm64 and riscv currently hard-code the thread0 kstack size + * to KSTACK_PAGES, ignoring the tunable. + */ +#if !defined(__mips__) TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); #endif + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); if (hz == -1) From nobody Fri Oct 20 15:58:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq556jVlz4xwbs; Fri, 20 Oct 2023 15:58: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 4SBq553Wd6z3GDL; Fri, 20 Oct 2023 15:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDfTMSA0HQd5pPZXLDsOtGtOpPXjSCS0UG4kS8X4H9I=; b=e9DAQXexciDRB8NIZTx+gp9koFyXC9ydUIQ6v3bTWlm14wJPpXatH3gynI5T1ldVG+2wzK II++bXUkQcizP5j1h8bNCX8wbM69adqKYzruhPYspc9EbFUUiq7OQm16P0hDvkzBkbNxTT IpdCJ0EKFapMl1Dwk7mYWWQhDkUEcj8ghX1Tl0JjMbhMIx9klCnfdB8DnyUOb7VWOf+wMz Fz6MXBFbh5OG2rGnDLcmRz3B+Cc16Zhm3OZ8gZY23TnN6M/L93MV+Yogig3HXNz5rfsZCn ILuGLiN9Eo/1jXDwjxsh1q91gNbfL+yU7DXtB0pYfbQx+9Z1vipbfWEOH1vBow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817529; a=rsa-sha256; cv=none; b=atyN67L/PY+/g/5VXBW2W6MnEdcHGAlMbKtGQ6zMtgtcks0UfxfmdKdVl/B/nX0r7zX04/ pn8Fk6hFoIRZ7bnqN0eDfE8Qe6z4tSlcclIhmNOwluFpMrmr6GBXMze+tIkxUvRcpweMRX s43YnHIKdAzx+sJxVGbmeapZuEj33EGeJJ0hF1IhprcncLfQAEbcgKTq0uDiDz/lnJstfy cxIAAYNfv8UJD//cwJHdnQmvgkzcGeapJ1MiWBgEcO+2o+EwDBLwQ2d7V+tFZqTu4bxOKy p/jsCq+B5NyssQrgUdldxyxJ+IqUkrVTm22gmuMyH9Y69y4vOHdYcLdbDrj7Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDfTMSA0HQd5pPZXLDsOtGtOpPXjSCS0UG4kS8X4H9I=; b=fqiqIX808latXVBN3zSxuv3lT6eiWwAjI1739oxufCTvzVQD9fQzozL+OLje+eHpi+8VtV n6QD82riKY4kEl67Kp80cumjdZ2j4MtyP/TUJ5CJlZyw9rWOgcVBZbd+sOppDHu9sgYMDu 5rIhH5AvtMk+U2WwJFwaNJgM6nrJw0/4KXmWmVO2HXdMYKshsXSuSVIHVkpi553oTl/Gaf PWrn3zy/4QyjFd6b5jbeq3xrDHpxrvULa2mswqI0CLh7eEyaZLyf0oDNDgImOsjhLuATEK kfbCHGuG3to4dIP7eSV7YenIwcBZgYmCAeJh/vmuCnCBKrO9PohF9KnSAEH0Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq552cynzfk0; Fri, 20 Oct 2023 15:58: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 39KFwnAT022368; Fri, 20 Oct 2023 15:58:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KFwnDY022365; Fri, 20 Oct 2023 15:58:49 GMT (envelope-from git) Date: Fri, 20 Oct 2023 15:58:49 GMT Message-Id: <202310201558.39KFwnDY022365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7daf9fd3f4eb - stable/13 - arm64, risvc: warn about ignored kstack_pages for thread0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7daf9fd3f4eb7936fa5bdf238bd7b466e13c0e3a Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7daf9fd3f4eb7936fa5bdf238bd7b466e13c0e3a commit 7daf9fd3f4eb7936fa5bdf238bd7b466e13c0e3a Author: Konstantin Belousov AuthorDate: 2023-10-11 18:56:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-20 15:58:14 +0000 arm64, risvc: warn about ignored kstack_pages for thread0 (cherry picked from commit 6aa641b71d0dd1b26674f0b6dba086410f643595) --- sys/arm64/arm64/machdep.c | 4 ++++ sys/riscv/riscv/machdep.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index a575ca5eb818..5c786a58f046 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -895,6 +895,10 @@ initarm(struct arm64_bootparams *abp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index b8a60d3a2bff..79305cbc29d8 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -599,6 +599,10 @@ initriscv(struct riscv_bootparams *rvbp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } From nobody Fri Oct 20 16:01:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq8f2w07z4xxFT; Fri, 20 Oct 2023 16:01: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 4SBq8f2SWHz3H5G; Fri, 20 Oct 2023 16:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h5V8y86895L5PW619sQ9XDTUVGvQ3P8M6CuxjQQAOP4=; b=BSpp8c3DPSQe5mXRFu8EEquf2kvVGu7GeW+SF9eDrDzdwlPtEDc6KIeBVtUwBm7LBxdOjH p0/OWztmw81U+ojHKsH6bIUqWr/zp+kadSV5H3cPXpPYVCCNZeiWuRXt5bWvRDAq0qkQWQ qbebde9cd7wf+Bk6gab3TzvuMxMS1j25vc8CHoH/7zGFGzB1+Bvocn6i6+hCiPJML0J34k 0KSwaftgGJxc9R4q82skaAT/lPKxhbH8vui9Kv2VxiANZGD1NLLKpDmYrcTwlR7r/piAfR 1uLTlSWbT7MgDOjBDPEwDYokhiOKVx0CFPmR34I9coNLXlgRtonY22MNwGoPXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817714; a=rsa-sha256; cv=none; b=x8Y1FUpkRxJ29BoAckrfLVYVKiHIEtxcWy+EId6rDXwLzHwpvBAK4Wjil5EdMlNQ4L1L/2 F6jxHZkd6riRxxXw0cf9rpeGf6hKLK05guSts/o7MwCcIsxwiR38N436aQPpjHs2vvXIRA QyPzk+JIoKndJdzd7ne6LSGnMVLOXe19KxvP1OCmqWyQg4SJ744ASifahtvYkx4pZXihy/ VAWI2pTpWVXWgN95qCMbQESlgZv1JexI40X40kNPl8VaL/N1CEPlSJcR+PMn68c1Dn08Jj BErn4f1Yxq+JjMP51LMa25tQNfKyQ/z4PY+PfakWCiqjEuqzbxzlPVlb7zAFwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h5V8y86895L5PW619sQ9XDTUVGvQ3P8M6CuxjQQAOP4=; b=iAJixXRXW0VJaS0fms8/5OeDFxTgOaQKmHS+37uaNb6Wj1lLXx9GXZu2wiE0uevlOk5EUP iNO8w8A8xeVrIxXuZa/nmW4Cim2wasL/TYCmub57t3ZzXmw1z5BT67mTN0nHM1/5TE60SO xC46b0wkXxd16ofUG6pz+IWg+D1yrzVgm+fKtowjsPJd/Fr8MfEXFLMnVKGZlhRzSdtRAj yqQTKyX1GcgjPJb0sZlkjePB51fOwtGlgiybSXptZrtMs1ny2hyiEYfDb39VdGym255WzH /YcZCrahDl7H8KGT70w4ngyM93BEgrUu+FdT6T3+1LkQT1M4mFBq8+ZdXyG0Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq8f1Xbczfkj; Fri, 20 Oct 2023 16:01: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 39KG1st0037806; Fri, 20 Oct 2023 16:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KG1sVM037803; Fri, 20 Oct 2023 16:01:54 GMT (envelope-from git) Date: Fri, 20 Oct 2023 16:01:54 GMT Message-Id: <202310201601.39KG1sVM037803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a861521ac98f - stable/13 - ktrace: Handle uio_resid underflow via MSG_TRUNC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a861521ac98fbcb3ea3c9d21aa06ce5ec1d06b17 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a861521ac98fbcb3ea3c9d21aa06ce5ec1d06b17 commit a861521ac98fbcb3ea3c9d21aa06ce5ec1d06b17 Author: Mark Johnston AuthorDate: 2023-10-16 20:11:55 +0000 Commit: Mark Johnston CommitDate: 2023-10-20 16:01:47 +0000 ktrace: Handle uio_resid underflow via MSG_TRUNC When recvmsg(2) is used with MSG_TRUNC on an atomic socket type (DGRAM or SEQPACKET), soreceive_generic() and uipc_peek_dgram() may intentionally underflow uio_resid so that userspace can find out how many bytes it should have asked for. If this happens, and KTR_GENIO is enabled, ktrgenio() will attempt to copy in beyond the end of the output buffer's iovec. In general this will silently cause the ktrace operation to fail since it'll result in EFAULT from uiomove(). Let's be more careful and make sure not to try and copy more bytes than we have. Fixes: be1f485d7d6b ("sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().") Reported by: syzbot+30b4bb0c0bc0f53ac198@syzkaller.appspotmail.com Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42099 (cherry picked from commit 761ae1ce798add862d78728cc5ac5240ce7db779) --- sys/kern/uipc_syscalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 61f6585fa789..ef3ebeb58176 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -962,7 +962,8 @@ kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, AUDIT_ARG_SOCKADDR(td, AT_FDCWD, fromsa); #ifdef KTRACE if (ktruio != NULL) { - ktruio->uio_resid = len - auio.uio_resid; + /* MSG_TRUNC can trigger underflow of uio_resid. */ + ktruio->uio_resid = MIN(len - auio.uio_resid, len); ktrgenio(s, UIO_READ, ktruio, error); } #endif From nobody Fri Oct 20 16:02:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq9J2MCVz4xwqy; Fri, 20 Oct 2023 16:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBq9J0VWsz3HcR; Fri, 20 Oct 2023 16:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5vdzpBpoHMSEMW5Jl6fpkc4iSs+SkJDICaRBrvu0wU=; b=u89UQGaj7vpa/AyTNQ4pRs29neR+nC/xSdYX9zcJz1vM39IJNBdv6EpB8J4gOWwa82VSSR s2CGR1PBsbZv5d826ADHLMU4GEAcRn3Y77/jPkxW339C9yKeZrzyVxf7p+sNvi8DAv4/5b vcqxp79xiRItBxpNeCPii+tUyrrC1DcBbSbh1EddXY4lJPSNYhUGDW8pDv7DAxIRU+f4Pz zrmj+4QQCWtCIsipJegU4tPJT3EmQcw2kQd6u39I4XHr3uDOn5Z7e5/PqaBjMaNnJGAgI4 eEollyTWdO3Wrj2iDTwT+JmBzSc1ZwDeOqQxFxntVc1LhNG4nPmo0yiA0wtPSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817748; a=rsa-sha256; cv=none; b=HCLuQr9aAcoK0p+M3ggNHVAhmD5WHByQ1QsDztoHRyCoGWQ0iPCqI5NvFhOCGSjfhBVIBC rlAfFuCAwyHdHp9HKo2pIRaYdHbIvlls3G5wuymHbEkVkhCOL8oTg2k1H6NcL5TLRKuX7o raTTB/W34njeakTSHMvu220T5qKZvyRsjjEjq4XSz1YWsMIjuV4h19kO9Xl/lVZAKjwr+n VVqMHkNKbJwe+LVVglDtLZQiy1LYlekWF+vGNNkKv0y8INwZTi9opujMhYWLhY2XSKebxn tvchbuBzSivgSFeJ1eatZWVkg7eRTk0F5Kn21AOp5eMDdrCZ3DQpW+5zdLWM2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5vdzpBpoHMSEMW5Jl6fpkc4iSs+SkJDICaRBrvu0wU=; b=D4vvsCsQ9fbsLm3NH9Z0+3qNY1dr+b7xu4TXQ5M3QME/NMbmZhSB9pxZlcObgiKGQApo+Y 6GdFlc9DI2aSDFbuuG0+EFIC9QPwC8eMo28mBljRB2aWzv2UoEr35MwBCg9cXoG6FHQE5T fEEAdwx0rA/68wiDYcZmlyh1l5B7JN1/mF/UedzDdI9YAAcQzg2HQDvYPLHZQI2zkFtgt3 31UMjq7fvbX8O7QlaGpKhTvd2tPtM0KAMEj00GqHUt+eSBsiwPLUm/eY1YNja+qJrWFBPK 9c694gCwzGYwgeq4x+A3hxIz2MkRCciEgsMRSM9Ew81adsPsSm++qneXmFNMHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq9H6j6Zzfl1; Fri, 20 Oct 2023 16:02: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 39KG2R0P038858; Fri, 20 Oct 2023 16:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KG2Rk1038855; Fri, 20 Oct 2023 16:02:27 GMT (envelope-from git) Date: Fri, 20 Oct 2023 16:02:27 GMT Message-Id: <202310201602.39KG2Rk1038855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c89523d1c4be - stable/14 - kmsan: Set -fno-sanitize-memory-param-retval for now List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c89523d1c4be8f3408fb591261f3093b65dbb675 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c89523d1c4be8f3408fb591261f3093b65dbb675 commit c89523d1c4be8f3408fb591261f3093b65dbb675 Author: Mark Johnston AuthorDate: 2023-10-16 19:45:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-20 16:02:05 +0000 kmsan: Set -fno-sanitize-memory-param-retval for now As of LLVM 16, -fsanitize-memory-param-retval is the default. It yields significantly smaller code, but the KMSAN runtime interceptors need to be updated to stop checking shadow state of parameters. Apply a minimal workaround for now. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. (cherry picked from commit b6c653c9746342b373af01979319b3cb123b2872) --- sys/conf/files | 2 +- sys/conf/kern.pre.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index f2a31eb24f25..62eb54a0b765 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3872,7 +3872,7 @@ kern/subr_mchain.c optional libmchain kern/subr_memdesc.c standard kern/subr_module.c standard kern/subr_msan.c optional kmsan \ - compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fstack-protector*}" kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 4d37cd4156f0..158175eb6899 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -122,8 +122,11 @@ SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kcsan \ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo .if !empty(KMSAN_ENABLED) +# Disable -fno-sanitize-memory-param-retval until interceptors have been +# updated to work properly with it. SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory + -fsanitize=kernel-memory \ + -fno-sanitize-memory-param-retval .endif KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo From nobody Fri Oct 20 16:02:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq9K1l2cz4xxFh; Fri, 20 Oct 2023 16:02: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 4SBq9K18v6z3HZ1; Fri, 20 Oct 2023 16:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jKkIO8fI7pgSH12K0TjkxUzJVFTse9HwfQDH0Fsp3vs=; b=qVn+zLfE3GnO8SqA3maVgQZqpeuiX3HY/VjZIlNI5dkPsIQivsBzM6wkKqm/8i4DVtFkt/ DYJEOTULZP2SuZEEjVBYGvnLnZ4C+6waERryjecLEeUAH6lZujdSN2zRQ1MT+UoEwpFNI9 vdSbeo2A5JFSieX66K1XW8eySYF66Uxs+FcLt3PZqPyMHExLWnMZgwwRHSjNqNp5JzGfki epPzDxibIKVGnbHron7T6F4gO/Bax+Owq0zJqxHCaleKCulLL4zRKO1B/JT+prbVKyJeRD AI3v8JXi/Sp4ZfiumfDc7ItRWz1dvY6dMfNvZlhPota9adwTevML2yaypNDSYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817749; a=rsa-sha256; cv=none; b=ysYyMMVuDlw3lAxVcwFGqB0UK5d8Zl1cUjHCMgF7e4qa/mOHvRblPbsPyanNAqAGiZfHu6 lF0IbCyQeaaGBHMIz6K1PDJkyncCwURCekYmp3FZVRZ6FBCNi4TizwmkN8YG7XKOCptl5V qj0v7x4u1GM9M9Znibg7eFTIMYVSfY6sxHrnhnt7hJvpUERzVLLR0vqrU9TFthneL2I4gK 3OvLgsvunafi1LgJwgOFKEXmR9XN1rBnXd6mGObwOq8wXAmb77ctCQei2bZO/AQtlqQC4Z PgURH38mxgKGmrgqdSruVmnShpb7idLrbklHQr0L0E3dtO4SWqsnFHuJsqFBfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jKkIO8fI7pgSH12K0TjkxUzJVFTse9HwfQDH0Fsp3vs=; b=hbCaQBE4gDO1u5/zYt5vBVzzjm0zFg8hea1yGKmqEizyn6OU60pj8VSts+vzHJcHxfe9u3 A1r8cdoPVB5W5AmeOXmWPwNC8f0NU6sdKS6Mp57NZESg9niBF/JyRDESHsCSH0xiYzSeiA TxjTruZ+pYyMBCXb5TCQFVsjsuDns8DASCdsgXTMzR0DLHeA5vXdBK78jLL1DMJGaq1NiA nj7lsFFtcUz1wzGdsXElCyZneEOpcbFE9V87oKOqb5kJuBZNoE4G9We2L46nkIfjwcLMXv VKHM8GZshcPAGSiPYNzi2aSZVMz4JG/XHmbm/sxOytep0QmZ0kyrx0jd5Xwf/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 4SBq9K0CY0zfhL; Fri, 20 Oct 2023 16:02: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 39KG2Sns038903; Fri, 20 Oct 2023 16:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KG2S9Y038900; Fri, 20 Oct 2023 16:02:28 GMT (envelope-from git) Date: Fri, 20 Oct 2023 16:02:28 GMT Message-Id: <202310201602.39KG2S9Y038900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: eb965d4f0309 - stable/14 - ktrace: Handle uio_resid underflow via MSG_TRUNC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb965d4f0309514893745e6cfae998495e76d941 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb965d4f0309514893745e6cfae998495e76d941 commit eb965d4f0309514893745e6cfae998495e76d941 Author: Mark Johnston AuthorDate: 2023-10-16 20:11:55 +0000 Commit: Mark Johnston CommitDate: 2023-10-20 16:02:05 +0000 ktrace: Handle uio_resid underflow via MSG_TRUNC When recvmsg(2) is used with MSG_TRUNC on an atomic socket type (DGRAM or SEQPACKET), soreceive_generic() and uipc_peek_dgram() may intentionally underflow uio_resid so that userspace can find out how many bytes it should have asked for. If this happens, and KTR_GENIO is enabled, ktrgenio() will attempt to copy in beyond the end of the output buffer's iovec. In general this will silently cause the ktrace operation to fail since it'll result in EFAULT from uiomove(). Let's be more careful and make sure not to try and copy more bytes than we have. Fixes: be1f485d7d6b ("sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().") Reported by: syzbot+30b4bb0c0bc0f53ac198@syzkaller.appspotmail.com Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42099 (cherry picked from commit 761ae1ce798add862d78728cc5ac5240ce7db779) --- sys/kern/uipc_syscalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 2dad9d487290..c7c2e6544902 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -948,7 +948,8 @@ kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, AUDIT_ARG_SOCKADDR(td, AT_FDCWD, fromsa); #ifdef KTRACE if (ktruio != NULL) { - ktruio->uio_resid = len - auio.uio_resid; + /* MSG_TRUNC can trigger underflow of uio_resid. */ + ktruio->uio_resid = MIN(len - auio.uio_resid, len); ktrgenio(s, UIO_READ, ktruio, error); } #endif From nobody Fri Oct 20 16:02:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBq9M3CVwz4xx69; Fri, 20 Oct 2023 16:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBq9L51V7z3HZR; Fri, 20 Oct 2023 16:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wqzGpYtzjhle25n0gSHi8jUP06BnoqJWEw7MwNz7p4k=; b=NXyUvc+ASzOk0H/N4IV6kyYnn6RwSchQetCe7vGyP+XR5rXwSrvYoBtY7IY6YRXqbH127F pv8DajZsXq+ZCE6YzPedne7uxg/1ztynlhB81+SxUua1IauDVxjidQnnKUrTUhEdCkTJs8 h/kHe5EvWowgJj6rq+7Hmw5U+BDVu2xiX+HtswSmHJkVCVx8ikhsGyZaz1ZSsfnl87+Lgd wm6Y2Xjlon7+cIzshA0/wiJ9j6K/gGG0+9XHohvLiDgjtQSjMRUc3xmXiDewpnfLNr/xza TKhc40IfBKu9A4BZtr3yXOEHC34gauB/HR5q/boU7+tw5FUTmlC8Lzaapys3CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817750; a=rsa-sha256; cv=none; b=REOe1CKelNhlZc9WQ3nvJ/9ixzVn04s+vpqEdC6cAVsVH6NNvXzqE//nnn5jqqbJV8KJ5Q TGekJIbNU5Y0bFbYNUgdLIE5UDpmpXcXhxOsslo1yTSz9DHPhUEFKDm5U5zsQJf2jKPnrc 4H2gAZMUpY8wDrmFLX8m95eCfDF1LjsRAv5j68osSNLZOHt+aAvLwBQ+nKDLq4gQqh25oh cnnkA0HEIYvubBxupySy3E17CKNJf9In5ZdAzngCAOisTyoI31pBZD+1RwYG7Tf3Ylhji7 uYGROAHez0IkD1ONBkLPKRLRfKspzXf+ZYWNpcVPQ9EFGjLUL5k0mc+v3AVdZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wqzGpYtzjhle25n0gSHi8jUP06BnoqJWEw7MwNz7p4k=; b=A9eHHv8k4YEZYEJhgdqxQ+/ddLjXWWLjA1PbSvQsVweXvuYeKjqLF9UZXXCsEzU1iCSvE6 bAA0OHVlOqJdRwhrSGHPv4AkUcwjgYstGmSDFsTDy5yfcQvy9Fn9plUt4f52mKVBQL2+28 vQHk+HfkSJiJpm4xE/1he7lLp5DyFvgkKs5RDXQ/DwPVd/zx0Sn5r92lFenj65hwPKZvUD zmPOGJ8kxtDFq9mxx6DXFY/s/LhMFyLKve6SGV0gWSI34is72H2+8D2QBZH2MSKOihOwP7 Sa/TnURlOu9O1EhufhAP+XNMpXlM+BVdnt27wTAwEPwA6R6mg+oSlHSnq/1Hwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SBq9L1ZRkzfvQ; Fri, 20 Oct 2023 16:02: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 39KG2U2T038945; Fri, 20 Oct 2023 16:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KG2UJL038942; Fri, 20 Oct 2023 16:02:30 GMT (envelope-from git) Date: Fri, 20 Oct 2023 16:02:30 GMT Message-Id: <202310201602.39KG2UJL038942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4533fa42ad91 - stable/14 - amd64: Zero-fill AP PCPU pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4533fa42ad912537a15d72068f2cfca46a465521 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4533fa42ad912537a15d72068f2cfca46a465521 commit 4533fa42ad912537a15d72068f2cfca46a465521 Author: Mark Johnston AuthorDate: 2023-10-16 22:40:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-20 16:02:05 +0000 amd64: Zero-fill AP PCPU pages At least KMSAN relies on zero-initialization of AP PCPU regions, see commit 4b136ef259ce. Prior to commit af1c6d3f3013 these were allocated with allocpages() in the amd64 pmap, which always returns zero-initialized memory. Reviewed by: kib Fixes: af1c6d3f3013 ("amd64: do not leak pcpu pages") MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42241 (cherry picked from commit a37e484d049758c70f2d61be0d28a115b6f2f01e) --- sys/amd64/amd64/mp_machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index ec4501c3aeed..d506ffada4b9 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -300,11 +300,12 @@ amd64_mp_alloc_pcpu(void) m = NULL; if (vm_ndomains > 1) { m = vm_page_alloc_noobj_domain( - acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), 0); + acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), + VM_ALLOC_ZERO); } if (m == NULL) #endif - m = vm_page_alloc_noobj(0); + m = vm_page_alloc_noobj(VM_ALLOC_ZERO); if (m == NULL) panic("cannot alloc pcpu page for cpu %d", cpu); pmap_qenter((vm_offset_t)&__pcpu[cpu], &m, 1); From nobody Sat Oct 21 14:29:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3c6jrRz4y5Bj; Sat, 21 Oct 2023 14:29: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 4SCP3c696pz4Fh6; Sat, 21 Oct 2023 14:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXxJhCBb07vbsMUV2yeJ13miKTDoMTYaECKz8PBdPXo=; b=mN+po/d97YxEoqzXSfVGNJ6sNwYlqMoL5K2HdImK3n7OeJoPvEbOjOz7mn2eCt2gmD6E9N oElaXx7Iy8GXCn7eFGA+xMC2oD01eWUoisFahXjFlbnrFZhDo+oPs5rll3AHAQhxNLuoxV xlsNLO3JVlhwZrnpmBP6Gl+f4fn5h3d7Wufg+yvD35N8o+e235NgHOXqBAqYBWGNic9EQG xTPkWNsNBWpgfwEXLc4lRTPhkfbj0vNGZICoa1T2Ds3XdnZ0RR7w56sWIIrRQnn/ZxATaX RRbjLVNJFQErkhu5Q3qz+J04Deu2G0j7Q17ep140VPPV+thY/PFc55rSzHwaiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898572; a=rsa-sha256; cv=none; b=da/ClmvQTx/ueIIQzqRe5nQyheeqdSxUZaB1m8/x7+exeAl0kzdEt3jFts1zp722tGgq2o NaDqzc89WA2Nhasq59tJFj71vo5LyMeCb7F0zmef7PBnqW1Pw2c4g3WHH4wamuqWXQhSG2 euDScakMx6T244Q9FPvz+yWI+CNK1legqIZ9jzv86nKQpD7UxTqDKAMYVlasEmT4Ey/oJG PzD5PaGoI0J76ykpVorKyuaKDSfc9RUDh2WDLIxYNUT8H6/Iutv1EgQRlKNbKCoFPuGr3a XY5rNZ5mFTk5ZjzSzPeoFDi2qCUobfjGqehmiBZR1XppJKwhihtd4lY2VMv6kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXxJhCBb07vbsMUV2yeJ13miKTDoMTYaECKz8PBdPXo=; b=WCnrn8iucxRGu57wQBe0ja2B58bCuHecGwPwgxcjqjVx4Dsc2TILp+icRSdo4mj/DXQD8C dgaAqKmc5GY5RoQ8/hptIDUyJzGlGuqSgzh82OUX/31x41+2KF2nvcoakc89OZdhH8XLMz RLU+6S4SjC3xwdTvo5UyF7PNuMAj7f4/+jXLX2okSlKhn1870qrtSRF9c90/f/aYEfzxoL qJMHj9coHNm7sLGes/AOKsxBlBl9pGz6Dt/g6mFxY5UNms2ZQ7lEiaIvqpEAnEO4C7AshW bBad5d3A5Nl7achHUu/JC4VFCSweMX8DB2tspeJS8B3zqu5XfWTz9KPbrwe6jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3c5DX4z4BW; Sat, 21 Oct 2023 14:29: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 39LETWEB071509; Sat, 21 Oct 2023 14:29:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETWb2071506; Sat, 21 Oct 2023 14:29:32 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:32 GMT Message-Id: <202310211429.39LETWb2071506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: b53fe14843ab - stable/14 - (s)tty: add support for IUTF8 input flag List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b53fe14843ab1d5fc73d3e0ae2b14c182c6ee577 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b53fe14843ab1d5fc73d3e0ae2b14c182c6ee577 commit b53fe14843ab1d5fc73d3e0ae2b14c182c6ee577 Author: Bojan Novković AuthorDate: 2023-10-07 17:59:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:34 +0000 (s)tty: add support for IUTF8 input flag This patch adds the necessary kernel and stty code to support setting the IUTF8 flag for ttys. It is the first of two patches that fix backspace behaviour for UTF-8 encoded characters when in canonical mode. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42066 (cherry picked from commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8) --- bin/stty/modes.c | 2 ++ bin/stty/print.c | 1 + bin/stty/stty.1 | 3 +++ share/man/man4/termios.4 | 2 ++ sys/kern/tty.c | 4 ++-- sys/sys/_termios.h | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/stty/modes.c b/bin/stty/modes.c index ce39083d7d63..3818677ddc4e 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -126,6 +126,8 @@ static const struct modes imodes[] = { { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index 07a3c2058474..33472bbccea1 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -127,6 +127,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt) put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 9e9405928c67..c572a657a997 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -224,6 +224,9 @@ if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. +.It Cm iutf8 Pq Fl iutf8 +Assume that input characters are UTF-8 encoded. Setting this flag +causes backspace to properly delete multibyte characters in canonical mode. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index d3a5c8fa582d..80015025345e 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -884,6 +884,8 @@ following masks: /* any char will restart after stop */ .It Dv IMAXBEL /* ring bell on input queue full */ +.It Dv IUTF8 +/* assume input is UTF-8 encoded */ .El .Pp In the context of asynchronous serial data transmission, a break diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 134c1dfba98b..620233947410 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -85,8 +85,8 @@ static const char *dev_console_filename; /* * Flags that are supported and stored by this implementation. */ -#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|\ - INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL) +#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|\ + IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL|IUTF8) #define TTYSUP_OFLAG (OPOST|ONLCR|TAB3|ONOEOT|OCRNL|ONOCR|ONLRET) #define TTYSUP_LFLAG (ECHOKE|ECHOE|ECHOK|ECHO|ECHONL|ECHOPRT|\ ECHOCTL|ISIG|ICANON|ALTWERASE|IEXTEN|TOSTOP|\ diff --git a/sys/sys/_termios.h b/sys/sys/_termios.h index 327ffcb2f98b..823752732ee2 100644 --- a/sys/sys/_termios.h +++ b/sys/sys/_termios.h @@ -97,6 +97,7 @@ #endif #if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ +#define IUTF8 0x00004000 /* assume input is utf-8 encoded */ #endif /* From nobody Sat Oct 21 14:29:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3f1C11z4y559; Sat, 21 Oct 2023 14:29: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 4SCP3f0Xtnz4FmG; Sat, 21 Oct 2023 14:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eM6VAX6iW5nrMfI7ujgkgOc3GF5nTG1LvTfyWtEm/Zs=; b=GJK1sjXn6TfmqcbCwC1hhImbgkd90HxxII/SGV4usOKSpi+zXuymP3KA7LM2Th/KI+CfUR bW2Z2S29ZVXRfnuJcfUB4xCsW9uZ4V2YpY23H8/9EbxryeWL+YA+5BvOsl5OcpP4awzv0f AW/6WHNDNHIuHJz+4QhuUlr5+GNSI2lM4SLJNYJ4XyM+b8GKhrHWWtcazMFjWOm1ZEOvvJ uJIqincoqhiT+x4GdgVlJxfn5tKECV8DILhemOCyrPYHNftWoVFVhq4JnOszeRCGod3tOf T2fmXp4FMT7hOyQvixygEjFUyJs0vxv9ZAgjiMQOAgjKKWYA93swpYa+kGX7Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898574; a=rsa-sha256; cv=none; b=EXc7pJH9rh+pdlareh7wk4Z1fY55zHFJpYN5HE1pMqdCBjyh+Zw9drgNtouJJGj+aI6cLl HKuOMN9uREf0DFpLgQFcZK+pfY2YmsYj7UDs6YUPDFz4PG+rDW4ARr/PrUY1jHohyqfbkd sjZWNyB09zHoRoEIMg//2Yh/csZNx3eRp/6jrTnS/E2Ne1qVgeOh3dR4xt4naXA/SvomSz 6tfzz9FN0d5kU4/NvNCmgBCQleCGamILLfmILCzEdCwifO1mpt4ZWZfX6240Jz9lRskTsr xPDt5eVJnv2Eb2oA+Lf0F2JEyybNmuLwK5bYJlIxujgdwwZSn3Ztv1b/yQZ3mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eM6VAX6iW5nrMfI7ujgkgOc3GF5nTG1LvTfyWtEm/Zs=; b=LSa8CJMVfsB1BFjXPCNHZyoCQWDPaJ7uKdFG78cgrQ30KNoiTRqHU9USCJboLcrvJjGkw5 tjXC+X7l4aYkJGf+vKf6AUFcqg/JW+a8MG2CN5S/B5xWU+njrAmy526WlfJeTFicQM5QMz hN5K2A2h/5oSLJ6ESaJxKUVB7g0Woa22ncLs3AGMljknma0bmYMQcQrJutUYzsPj4brLQY w/pu0Fuk1VC6buS4AJ42IpY5icqmpqHKNb8qbS4ZZa1ZKXNkfr7jZfSMTTij9XpcCYP5Ym hLxIU4RxISVhxPHEpxKA+gtLtd9j6XuQKpGv7SVjrg5QNsSY7YZFNM7oKkzaqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3d6Wjgz4SP; Sat, 21 Oct 2023 14:29: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 39LETXQa071575; Sat, 21 Oct 2023 14:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETXmx071572; Sat, 21 Oct 2023 14:29:33 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:33 GMT Message-Id: <202310211429.39LETXmx071572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 817701123233 - stable/14 - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 81770112323383f1bcb93c7d038fe195b5872b8f Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=81770112323383f1bcb93c7d038fe195b5872b8f commit 81770112323383f1bcb93c7d038fe195b5872b8f Author: Bojan Novković AuthorDate: 2023-10-07 18:00:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:34 +0000 tty: fix improper backspace behaviour for UTF8 characters when in canonical mode This patch adds additional logic in ttydisc_rubchar() to properly handle backspace behaviour for UTF-8 characters. Currently, typing in a backspace after a UTF8 character will delete only one byte from the byte sequence, leaving garbled output in the tty's output queue. With this change all of the character's bytes are deleted. This change is only active when the IUTF8 flag is set (see 19054eb6053189144aa962b2ecc1bf5087758a3e "(s)tty: add support for IUTF8 input flag") The code uses the teken_wcwidth() function to properly handle character column widths for different code points, and adds the teken_utf8_bytes_to_codepoint() function that converts a UTF-8 byte sequence to a codepoint, as specified in RFC3629. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42067 (cherry picked from commit 9e589b0938579f3f4d89fa5c051f845bf754184d) --- sys/kern/tty_ttydisc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ sys/teken/teken_wcwidth.h | 30 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index 665275ee93e7..eae7162e31c0 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -43,6 +43,9 @@ #include #include +#include +#include + /* * Standard TTYDISC `termios' line discipline. */ @@ -78,8 +81,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, tty_nout, CTLFLAG_RD, /* Character is alphanumeric. */ #define CTL_ALNUM(c) (((c) >= '0' && (c) <= '9') || \ ((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) +/* Character is UTF8-encoded. */ +#define CTL_UTF8(c) (!!((c) & 0x80)) +/* Character is a UTF8 continuation byte. */ +#define CTL_UTF8_CONT(c) (((c) & 0xc0) == 0x80) #define TTY_STACKBUF 256 +#define UTF8_STACKBUF 4 void ttydisc_open(struct tty *tp) @@ -800,6 +808,72 @@ ttydisc_rubchar(struct tty *tp) ttyoutq_write_nofrag(&tp->t_outq, "\b\b\b\b\b\b\b\b", tablen); return (0); + } else if ((tp->t_termios.c_iflag & IUTF8) != 0 && + CTL_UTF8(c)) { + uint8_t bytes[UTF8_STACKBUF] = { 0 }; + int curidx = UTF8_STACKBUF - 1, cwidth = 1, + nb = 0; + teken_char_t codepoint; + + /* Save current byte. */ + bytes[curidx] = c; + curidx--; + nb++; + /* Loop back through inq until we hit the + * leading byte. */ + while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) { + ttyinq_peekchar(&tp->t_inq, &c, "e); + ttyinq_unputchar(&tp->t_inq); + bytes[curidx] = c; + curidx--; + nb++; + } + /* + * Shift array so that the leading + * byte ends up at idx 0. + */ + if (nb < UTF8_STACKBUF) + memmove(&bytes[0], &bytes[curidx + 1], + nb * sizeof(uint8_t)); + /* Check for malformed UTF8 characters. */ + if (nb == UTF8_STACKBUF && + CTL_UTF8_CONT(bytes[0])) { + /* + * Place all bytes back into the inq and + * delete the last byte only. + */ + ttyinq_write(&tp->t_inq, bytes, + UTF8_STACKBUF, 0); + } else { + /* Find codepoint and width. */ + codepoint = + teken_utf8_bytes_to_codepoint(bytes, + nb); + if (codepoint != + TEKEN_UTF8_INVALID_CODEPOINT) { + cwidth = teken_wcwidth( + codepoint); + } else { + /* + * Place all bytes back into the + * inq and fall back to + * default behaviour. + */ + ttyinq_write(&tp->t_inq, bytes, + nb, 0); + } + } + tp->t_column -= cwidth; + /* + * Delete character by punching + * 'cwidth' spaces over it. + */ + if (cwidth == 1) + ttyoutq_write_nofrag(&tp->t_outq, + "\b \b", 3); + else if (cwidth == 2) + ttyoutq_write_nofrag(&tp->t_outq, + "\b\b \b\b", 6); } else { /* * Remove a regular character by diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f57a185c2433..f5a23dbc9679 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -8,6 +8,8 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +#define TEKEN_UTF8_INVALID_CODEPOINT -1 + struct interval { teken_char_t first; teken_char_t last; @@ -116,3 +118,31 @@ static int teken_wcwidth(teken_char_t ucs) (ucs >= 0x20000 && ucs <= 0x2fffd) || (ucs >= 0x30000 && ucs <= 0x3fffd))); } + +/* + * Converts an UTF-8 byte sequence to a codepoint as specified in + * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function + * expects the 'bytes' array to start with the leading character. + */ +static teken_char_t +teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) +{ + + /* Check for malformed characters. */ + if (bitcount(bytes[0] & 0xf0) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); + + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } +} From nobody Sat Oct 21 14:29:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3g2QJyz4y5Km; Sat, 21 Oct 2023 14:29: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 4SCP3g1LYbz4G1r; Sat, 21 Oct 2023 14:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4VaYtnOtJ26OGtwl+XVhSZNXb9RoijzJX+2iEPLTO8=; b=pSQFxc/tkf2Ov6xdLFvDUzkFcedqDZ7iq222Ziyj3s0PFMvTDVq00XnhMRh30RbxqXA4Jr AsVc+60OfAZW3s81lI6EIAiL6z8NZQ+7oHlyEW36maL/Bxr5Q5Ethe/Jto6V+5wC3N1eCR TN40MmdqHuLJxzy17iSBBM59DB6oV0g2tDKfsbCWC8GeQDEykW8fUgVMhxrqCcfxsN8Hbi 6azRlBvmTPjS3ARmIrdu7GflLbjqKP/w0bQGuAE7D4i6vcaccDSt5CVz/DDU9u421iHizw +uA7UM3ttu2B92MwLouvIrx8Hbb9Ve6k0Z5kZa8IpmRL7GMtviO7dvpm1zC+6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898575; a=rsa-sha256; cv=none; b=h6hehhgBYWKDJF2bH8I/rv6VWHvQ0N7kUA3IgJ3LFOvwEzbNEQHfgnaM4vWntvzVZhpT+g RoIdQbev22bBx/mpbJ2iFRrjY44exTOxDu4tIWtLDs3vj1jAg85TzcpxajDfIajolahsIg tvAap7k9z5pxfBJs+Jt+12nCmqzP1RSa6TXu1gTiLVZC2BLCfBvoJ3oKEZZBd5izodwfrR hysl+zc2+gsbppZYi6ZjELX0yaZgTXvydXRqUy+XzGHySxMCDPes20MUNP7EXaHn+zr7FG grvCFgoqLcEGQoddOrfHNNll+C/lt3RE/63WU4SUbGrbQVRpbVb1wyqzxWHQ2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4VaYtnOtJ26OGtwl+XVhSZNXb9RoijzJX+2iEPLTO8=; b=ZUvlPSYz46aWSb83SuqLY8wVEuZZMYVOmAPua+9BKI2Tc93Rj+zqFZmjRzkdaW6WxcUjHV CozlVSY372kv/J3+Q4GZ1IRCj+5EL+Y467PtO5KGno5mHiupXg5NbAxJpUIk5xNNYttbCY SPs0CWrVoXYwtBisiKurkGzMPZ2ba9eIn6xwIkL8K1L69YyhkzyyPVrLq/hHd0tkfpDhtD 0d8gGVpFJ1XriDYxERxZ/MNYkOT2LfqqbxW3r855KMjzuXRhXb97Dz2Nls0dQL6GQQFo9o xFdeXy7oV09nACL2YqJ/9ch7STxcIqJPnV/BNUSbpN03Gq2P5qOCQzuayHR9Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3g0Qt3z3y2; Sat, 21 Oct 2023 14:29: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 39LETY7W071622; Sat, 21 Oct 2023 14:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETY4e071619; Sat, 21 Oct 2023 14:29:34 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:34 GMT Message-Id: <202310211429.39LETY4e071619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: dbe34ab6df0b - stable/14 - teken: use __bitcount() instead of bitcount() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dbe34ab6df0b84335e207adcb331dc0c7f507cd4 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dbe34ab6df0b84335e207adcb331dc0c7f507cd4 commit dbe34ab6df0b84335e207adcb331dc0c7f507cd4 Author: Christos Margiolis AuthorDate: 2023-10-07 21:36:59 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:34 +0000 teken: use __bitcount() instead of bitcount() The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is included in teken/teken.h. MFC after: 2 weeks (cherry picked from commit 6d3296f16a06bcaa49918799e683936711dcf9c9) --- sys/teken/teken_wcwidth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f5a23dbc9679..bc992e1ef5d8 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -129,7 +129,7 @@ teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { /* Check for malformed characters. */ - if (bitcount(bytes[0] & 0xf0) != nbytes) + if (__bitcount(bytes[0] & 0xf0) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { From nobody Sat Oct 21 14:29:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3h2zMqz4y58l; Sat, 21 Oct 2023 14:29: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 4SCP3h2QwGz4GFf; Sat, 21 Oct 2023 14:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kIsq4dlBIZLbuzEhK+eZqo2pl6AMapOkfYBiiFmWLIc=; b=S2aevm/xU3o6nNIBLXaw99TT8XpWEuMJ6+b53glp1ENLX4w9oA1/npKOKx3tJCj+GR+yKT NYl6lG0yKCm1GgnkkLBJrDcp4i1bAqZygrqfA/H04Mkh1w2ofXmY+6Z9HosI0XqEp5QaTQ BzVBzgpEx7WyaQXTVVEbxi13W4czfa8tHhwEUuAxxtx2aPGdH4RtloUJl8Qp4QXfvBi7e4 WxubnODv5+Mfclui+9F+OpR9yap3RMMdyCk4HnOrY/yvg/gMu1l7wVHLSjhMbnTD9BnP0D b7xRFQZJxRLcZ18aVTa/27Lppd1V50/ktQ3W9nVUXUNBgaM4IaNAIMDvrNSxkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898576; a=rsa-sha256; cv=none; b=Og6DcypjqAn4x1GrBE3qbJMtzcT+E+vXGF9c+JyXh+ISz9XqGCrYt0ReP7Ca6Hinr/1N2A yP9ugudYw7GxzyOL0Pzmf5yryeyd1uhA3s7ymVPpYtQ4LgGdu2LrDvf1aoleKgV4rYofwE hQtBCgpWAFv5aHfeceb2TVqiI9emQWOcJa1/pJ4KmT5AKz3/1sgCyx4U/iN9dzOR9PqzqH pDUw3ZQrbm4yC5fME/yy/3uNdx9OvEMj3xIi4J+sZCM8xdArRjlbfdlLl2nuYibR4np7NT SvGrDYDTxDauoKEVzI5MoK5Lh3gkMgrDplDt/Kbl3PVD5CR5TTJ8RGxO990s3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kIsq4dlBIZLbuzEhK+eZqo2pl6AMapOkfYBiiFmWLIc=; b=CXLS8FpShdiL8hYz11c+HnUc/yv0MOKxciwQIWoiFJbSyTXrwx8wGfUKscAQyqjSZrnmj9 OvCMg5gh+joD8xS37QPvB5gcNAFP4ZU+Beh3cYFu0d3rcRB2OkYkQXTRL4QGw438IWjw8P TQf4aichRC9fFy0Ydv5XzXrzXwxjgChsSBzgte/E+tl4jNsxkECfHKtEjEPlL+2IAw299/ f+oTYFnPzc5GC2OvB6rX1x089HB61ov6pISECYIDHIHmh/wt/Cx0P9QP9EVFKOTtK35bvG XHo/OgJ8fnCLSwYDqyTwO/mdLhQw0wtaecqRTsWuq///KxidJrK++DLE6V5JUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3h1Qnyz4S4; Sat, 21 Oct 2023 14:29: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 39LETa3c071677; Sat, 21 Oct 2023 14:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETaXu071674; Sat, 21 Oct 2023 14:29:36 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:36 GMT Message-Id: <202310211429.39LETaXu071674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: d25f8c1bdcdc - stable/14 - teken: fix up unused func warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d25f8c1bdcdcadf17c542dc457b13220cb20d768 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d25f8c1bdcdcadf17c542dc457b13220cb20d768 commit d25f8c1bdcdcadf17c542dc457b13220cb20d768 Author: Mateusz Guzik AuthorDate: 2023-10-08 13:54:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:35 +0000 teken: fix up unused func warnings Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 4b9aa38ef0e5bedcdd90b6627cc1c215037a1121) --- sys/teken/teken_wcwidth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc992e1ef5d8..bc40c23a6eb7 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -16,7 +16,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(teken_char_t ucs, const struct interval *table, int max) { +static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { int min = 0; int mid; @@ -35,7 +35,7 @@ static int bisearch(teken_char_t ucs, const struct interval *table, int max) { return 0; } -static int teken_wcwidth(teken_char_t ucs) +static inline int teken_wcwidth(teken_char_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -124,7 +124,7 @@ static int teken_wcwidth(teken_char_t ucs) * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function * expects the 'bytes' array to start with the leading character. */ -static teken_char_t +static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { From nobody Sat Oct 21 14:29:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3j5SWmz4y5F7; Sat, 21 Oct 2023 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCP3j3M1Wz4G2h; Sat, 21 Oct 2023 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WUDsoqn3Xs1dDcAIz9juvgkkwI2F2aG0d9Oux1P20fU=; b=l6mTcmY8zc9mZyJJVfhk9Jgju9EEvnVdjVesI6JHea1CodhMApaiogq83YBXm2ksvG4Lu0 gjShOPqrHtEYylxkADTw16W2U5Hstv0aKF1fpxzGvRP239I87IZ5u3NNYjf121sBo5t9im YhaYNPcPfdUN6Q9fKDpiNCZGxdXoGc6LPcOg2FxwsEWA3LiH/RXxXFhD+eh1FW7QZIknV+ pXnmwh8wDeVzsu6awLrRbD8vNkddX1lvegl5ykNHt0MGkFMdXymdGDredWxi/b+E6YumCj jQd40x3BCtX3bm9ZOZPiHKsdDVPQoH6xKMsDo7kkJ6vqa0xrJU3bopFRRRx7jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898577; a=rsa-sha256; cv=none; b=gdFncFkEB59ztYQGpDSsqdWlypnzH6n8fwedQHigW4jXyppUT4l2RCuVW2A1JEx3CWz9uR u9d7mPPHrZJ7Uw7lJsItpYIPZrn6/cJqIYivASEmAe+FcNQopL79BvXPiQnOZ687KNmMnI Ki7QLrZQ3BRQi2hL/H6vGK2b3RywFGBLvr+mU7EbXhXPXJsWstq6aL7tesiGL/tI/1NGEG dWHf4LAcCHDl0RcBrRNcTGMhvbBo4o0C0q2nTyiCCO9wUGljmQJSy0u+bMp9XPgk5cOhDS dTy3+hYANqo309+/ILh9Q+oIj7vmb0RFMadTWb66AWCuld5FwY3hceyXxpG2OA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WUDsoqn3Xs1dDcAIz9juvgkkwI2F2aG0d9Oux1P20fU=; b=k97K2msf8TTVtGOLgaDpKWEUf2qRweRazNCYgeCzS+6LJP1GKBHQMIGWLe2dB6igAtSLWf PS22LGAVBW7grr2hIahVrCVvmI4hEYLwmB4TFHLBgSRHiYP7VEK+9vLpwt3vjq5aI/c5MO gMvHKEwXf0d7IITeV/HeJIwUmoP1uRBU8Z89Zfu3wwh8yQLgBaDiqaaN8tojd+pGtMlqAw RercgvtqEYLpN4raOgDVxY3E6nNNQ70BAWg0Vp6Czzq+zwHTrkz6xz2AjdISlM0izJGBYA 9bfghi2KkfquHbDYsY9DiKpXNE1+94e2RRcNFl5TZDTWm9mhDdLL3izIQHqRMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3j2BLhz4Dg; Sat, 21 Oct 2023 14:29: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 39LETbud071727; Sat, 21 Oct 2023 14:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETbrH071724; Sat, 21 Oct 2023 14:29:37 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:37 GMT Message-Id: <202310211429.39LETbrH071724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 72a8e373f2d1 - stable/14 - tty/teken: fix UTF8 sequence validation logic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72a8e373f2d1886f27d1f724aa9e8e55e08809eb Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=72a8e373f2d1886f27d1f724aa9e8e55e08809eb commit 72a8e373f2d1886f27d1f724aa9e8e55e08809eb Author: Bojan Novković AuthorDate: 2023-10-13 05:14:36 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:35 +0000 tty/teken: fix UTF8 sequence validation logic This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UTF8 sequence is encountered. The code previously used __bitcount() to extract sequence length information from the leading byte. However, this assumption breaks for certain code points that have additional bits set in the first half of the leading byte (e.g. Cyrillic characters). This lead to incorrect behaviour when deleting those characters using backspaces. The code now checks the number of consecutive set bits in the leading byte starting from the MSB, as per RFC 3629. Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42147 (cherry picked from commit 2fed1c579c52d63b72fc08ffcc652ba0183f9254) --- sys/kern/tty_ttydisc.c | 12 +++++++----- sys/teken/teken_wcwidth.h | 23 ++++++++++++++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index eae7162e31c0..c46579cefbb1 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -844,23 +844,25 @@ ttydisc_rubchar(struct tty *tp) */ ttyinq_write(&tp->t_inq, bytes, UTF8_STACKBUF, 0); + ttyinq_unputchar(&tp->t_inq); } else { /* Find codepoint and width. */ codepoint = teken_utf8_bytes_to_codepoint(bytes, nb); - if (codepoint != - TEKEN_UTF8_INVALID_CODEPOINT) { - cwidth = teken_wcwidth( - codepoint); - } else { + if (codepoint == + TEKEN_UTF8_INVALID_CODEPOINT || + (cwidth = teken_wcwidth( + codepoint)) == -1) { /* * Place all bytes back into the * inq and fall back to * default behaviour. */ + cwidth = 1; ttyinq_write(&tp->t_inq, bytes, nb, 0); + ttyinq_unputchar(&tp->t_inq); } } tp->t_column -= cwidth; diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc40c23a6eb7..14af2c6f9530 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -128,15 +128,32 @@ static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { - /* Check for malformed characters. */ - if (__bitcount(bytes[0] & 0xf0) != nbytes) + /* + * Check for malformed characters by comparing 'nbytes' + * to the byte length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different + * values indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in + * the leading octet (except in the first case, where an MSB + * of 0 means a byte length of 1). Here we flip the 4 upper + * bits and count the leading zeros using __builtin_clz() + * to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { case 1: return (bytes[0] & 0x7f); case 2: - return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); case 3: return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); case 4: From nobody Sat Oct 21 14:29:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCP3k6HL8z4y5NG; Sat, 21 Oct 2023 14:29: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 4SCP3k43L4z4G9y; Sat, 21 Oct 2023 14:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eh74q98wL7Ok+lCPm58vzB1DE0musBuESQoPdtWlWo=; b=GMwmEdbQ0RW8coGtYaxuAq+77bS3v+fQAKmdSWJ0wedOic4Zqcd4lAexp6JhhyNiP0n2rN MLT0JenWoCaIUBOTxHDs4srLdWml5g89/XZbll1BMhso4SuYHoe82PtSjkrZ+tdkX54SYB 3c5X/MLvIQLS2fJs1pILuenPAfxdbz/9QM5GQEYJwCGFS/3TevGsEWYlT/A1S9+VXHVm9B dMXeIHIjsyVawz5YnjS/6rZ4VywJfZZFdxvT1nl3FQPIdkiTYgSTu0pnuv9GYwHBPZcrvn Dk/u7NXQL6oWxls/6tcELzQamqb0EvNK+gWh+PMPkZkXoA/5CFjoF1+Ukbwk4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898578; a=rsa-sha256; cv=none; b=Qu+A0Fh4ieKNW2apZaPLldxIy2pMLCc2Es2IVh5pkW0zxGdLu3Awq02F1pGHDLdWhG1P/w MJHBCKv1XDvB2EKGFMDMJ4OP1n0DYob9pf5y3xmr1WauZjD8jE5n3CQJIU/xuMeXb3nNuo kLgY/P5azS1mcwz/JVx4Ox18zlkw9SSYMowf4HCdX9Z8fqmQuEBfPAYcDCYy0SS7+2pSJf IQzv42kTi9Ii0LxW9U2wCxEZk00yH9C/P/47Dl+++3aUiQHK7y4LJpAaDv533GWz59C+u7 lVdPzzloNJVnhDa2+HfG2UmzAlwp89HgI7DP8kqzoaPoYU+7NJJonc42VkXcXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eh74q98wL7Ok+lCPm58vzB1DE0musBuESQoPdtWlWo=; b=cyEp8eu6V+g2ybkZRfUueTIktLMC4ksh5bRhCBiOGeMjA9PnhGU437QANjvbd6gCto4ltR +ADILzwez1IWnggdRCNKCbG63KoXrdkgkZF10N2ODt23KCUK/HaWlsppimEpwljqY2FnoK yJvFNhVeYplIDVsvjFOwNKN9SbM5DXDqJif0xlAXRB3hPLfA+Fd0H0XOCFfHZ2Cz8jGoHA Q22YI8jc4mAwJW8Qiey6xjFyKsbQelPKc9fLVtf47a8Q3J96Gp842soOOqNVIjhn1wAvXb ynlltRs2Nj9TuesIDPwtDU/Z+c+uM0dETC2JaS52ieMovvFuseNKSqarbJ8+Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCP3k38N0z3y3; Sat, 21 Oct 2023 14:29: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 39LETcxi071769; Sat, 21 Oct 2023 14:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LETcUx071767; Sat, 21 Oct 2023 14:29:38 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:29:38 GMT Message-Id: <202310211429.39LETcUx071767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 5f4f00adf34c - stable/14 - teken: fix style in teken_wcwidth.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f4f00adf34c7f4abeb4a2d408bbe98c6e392e25 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5f4f00adf34c7f4abeb4a2d408bbe98c6e392e25 commit 5f4f00adf34c7f4abeb4a2d408bbe98c6e392e25 Author: Christos Margiolis AuthorDate: 2023-10-13 05:14:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:28:35 +0000 teken: fix style in teken_wcwidth.h Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164 (cherry picked from commit 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af) --- sys/teken/teken_wcwidth.h | 265 +++++++++++++++++++++++----------------------- 1 file changed, 135 insertions(+), 130 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index 14af2c6f9530..72df62704d73 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -11,112 +11,118 @@ #define TEKEN_UTF8_INVALID_CODEPOINT -1 struct interval { - teken_char_t first; - teken_char_t last; + teken_char_t first; + teken_char_t last; }; -/* auxiliary function for binary search in interval table */ -static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { - int min = 0; - int mid; +/* Auxiliary function for binary search in interval table */ +static inline int +bisearch(teken_char_t ucs, const struct interval *table, int max) +{ + int min = 0; + int mid; - if (ucs < table[0].first || ucs > table[max].last) - return 0; - while (max >= min) { - mid = (min + max) / 2; - if (ucs > table[mid].last) - min = mid + 1; - else if (ucs < table[mid].first) - max = mid - 1; - else - return 1; - } + if (ucs < table[0].first || ucs > table[max].last) + return (0); + while (max >= min) { + mid = (min + max) / 2; + if (ucs > table[mid].last) + min = mid + 1; + else if (ucs < table[mid].first) + max = mid - 1; + else + return (1); + } - return 0; + return (0); } -static inline int teken_wcwidth(teken_char_t ucs) +static inline int +teken_wcwidth(teken_char_t ucs) { - /* sorted list of non-overlapping intervals of non-spacing characters */ - /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ - static const struct interval combining[] = { - { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, - { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, - { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, - { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, - { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, - { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, - { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, - { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, - { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, - { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, - { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, - { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, - { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, - { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, - { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, - { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, - { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, - { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, - { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, - { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, - { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, - { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, - { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, - { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, - { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, - { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, - { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, - { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, - { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, - { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, - { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, - { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, - { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, - { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, - { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, - { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, - { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, - { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, - { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, - { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, - { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, - { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, - { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, - { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, - { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, - { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, - { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, - { 0xE0100, 0xE01EF } - }; - - /* test for 8-bit control characters */ - if (ucs == 0) - return 0; - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) - return -1; + /* + * Sorted list of non-overlapping intervals of non-spacing characters. + * Generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" + */ + static const struct interval combining[] = { + { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, + { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, + { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, + { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, + { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, + { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, + { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, + { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, + { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, + { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, + { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, + { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, + { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, + { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, + { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, + { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, + { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, + { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, + { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, + { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, + { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, + { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, + { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, + { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, + { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, + { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, + { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, + { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, + { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, + { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, + { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, + { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, + { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, + { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, + { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, + { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, + { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, + { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, + { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, + { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, + { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, + { 0xE0100, 0xE01EF } + }; - /* binary search in table of non-spacing characters */ - if (bisearch(ucs, combining, - sizeof(combining) / sizeof(struct interval) - 1)) - return 0; + /* Test for 8-bit control characters */ + if (ucs == 0) + return (0); + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) + return (-1); - /* if we arrive here, ucs is not a combining or C0/C1 control character */ + /* Binary search in table of non-spacing characters */ + if (bisearch(ucs, combining, sizeof(combining) / + sizeof(struct interval) - 1)) + return (0); - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || /* Hangul Jamo init. consonants */ - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || /* CJK ... Yi */ - (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ - (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ - (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ - (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ - (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); + /* + * If we arrive here, ucs is not a combining or C0/C1 control character + */ + return (1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || /* Hangul Jamo init. consonants */ + ucs == 0x2329 || ucs == 0x232a || + (ucs >= 0x2e80 && ucs <= 0xa4cf && + ucs != 0x303f) || /* CJK ... Yi */ + (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ + (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ + (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ + (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ + (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2fffd) || + (ucs >= 0x30000 && ucs <= 0x3fffd)))); } /* @@ -127,39 +133,38 @@ static inline int teken_wcwidth(teken_char_t ucs) static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { + /* + * Check for malformed characters by comparing 'nbytes' to the byte + * length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different values + * indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in the leading + * octet (except in the first case, where an MSB of 0 means a byte + * length of 1). Here we flip the 4 upper bits and count the leading + * zeros using __builtin_clz() to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); - /* - * Check for malformed characters by comparing 'nbytes' - * to the byte length of the character. - * - * The table in section 3 of RFC 3629 defines 4 different - * values indicating the length of a UTF-8 byte sequence. - * - * 0xxxxxxx -> 1 byte - * 110xxxxx -> 2 bytes - * 1110xxxx -> 3 bytes - * 11110xxx -> 4 bytes - * - * The length is determined by the higher-order bits in - * the leading octet (except in the first case, where an MSB - * of 0 means a byte length of 1). Here we flip the 4 upper - * bits and count the leading zeros using __builtin_clz() - * to determine the number of bytes. - */ - if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) - return (TEKEN_UTF8_INVALID_CODEPOINT); - - switch (nbytes) { - case 1: - return (bytes[0] & 0x7f); - case 2: - return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); - case 3: - return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); - case 4: - return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | - (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); - default: - return (TEKEN_UTF8_INVALID_CODEPOINT); - } + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | + (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } } From nobody Sat Oct 21 14:35:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBm5S9fz4y5k5; Sat, 21 Oct 2023 14:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCPBm3gLlz4Hgk; Sat, 21 Oct 2023 14:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6W7kOhT7cmNlON8bDEF6kplrt2COkIkIwHwfgwq0Nig=; b=pLwranD67hSQ/1ZeUmvsc3QzUaHPJmEmxZqvmPiTfzokoZxW/gMBz1ky6AYtIVTf/Fulxt xuXTY4VkoGWZl/Hc2vguXRzeGYRmfWby8d9iQm3Kahb6fpAgdUyk/w18OGSzdzFKuhYseK fbneHXD1615D3YQQyxPeIHvGlC60Cin+qvPsNxdgN9flMyJX82sKvMXGuT7ZJXLYRqbOEh kdterQCjzH1c0rXKSNWNggu4hWUBjNtTbRCc18BX6nlKwZZPzgUycBXQpAvki7+PNwYFnj uZcyHtmhT718F9vS/10MHb3I6qYMTsVUjWpdAlRMAhrKYdRDR0bM+75iBPbMaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898944; a=rsa-sha256; cv=none; b=i6/BAMuFcxWSrmQ7C9eEVYmUWFsCuqLk77wHXmHupDhBDetRqUndqr1KdV7mfSWoSVzJKK wuy0BxsSUbqYgpBvz643eJ9CBrzTR2Q7S8x0e0m608vx8rsHpPrPFnj/68aA9AdLKb82VU vFir+s8FI6x+hD0/3PM93n/7uXN7KKaYGVzlEiqSX1QQlYg4AClgrBrtz1wvcHj0FMcNnP FkejTfW7Z5J4utl1YG/CM7lVImV1T8nfERsuEi/eI9r4pXxfodLCso1DrmpXncm7LNm+Tv 3fMn4kE6Pp8wYMLWan6WRz5o0xTJECjyUnvew0jdt09wgdlL9GcJIih3O7wBfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6W7kOhT7cmNlON8bDEF6kplrt2COkIkIwHwfgwq0Nig=; b=fLwbVBPwT5xXmyNa7zd6DuH5f28uUh8kKBjnWF10kBMcvMhNH5FGIqFi8fC35npnOGjsT2 sUAR+1kXnPDdvPzc8/1U0kFidfQl48rNWCKz5b0w6l7YDPdeJ3c9H9ddhhy8m0HP9Oav/f M7hJc1PioxEtjhJvCTsw7YYiKSQ7eF3Mn/WTEs/WX61FX0J+y15R3CuAQJsKmMQu1Ip0J7 UxDuUwKjvDeVLJrcNHFXaAEQmCmJEFaPLKTM2eZYtliauDBI1QTUkoVRFPf49tXwZYfn24 G8jwUXBAOFYgUqwUBh3XSB1iSeve9p4uGcNZAE1a4PhFZc7cNj6OXXWjnoCfOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBm2kLNz4C0; Sat, 21 Oct 2023 14:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39LEZiwT087454; Sat, 21 Oct 2023 14:35:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEZiVd087451; Sat, 21 Oct 2023 14:35:44 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:44 GMT Message-Id: <202310211435.39LEZiVd087451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 55bf2ae43ce0 - stable/13 - (s)tty: add support for IUTF8 input flag List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 55bf2ae43ce0b92a080086ec587be05d763ee2ea Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=55bf2ae43ce0b92a080086ec587be05d763ee2ea commit 55bf2ae43ce0b92a080086ec587be05d763ee2ea Author: Bojan Novković AuthorDate: 2023-10-07 17:59:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:21 +0000 (s)tty: add support for IUTF8 input flag This patch adds the necessary kernel and stty code to support setting the IUTF8 flag for ttys. It is the first of two patches that fix backspace behaviour for UTF-8 encoded characters when in canonical mode. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42066 (cherry picked from commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8) --- bin/stty/modes.c | 2 ++ bin/stty/print.c | 1 + bin/stty/stty.1 | 3 +++ share/man/man4/termios.4 | 2 ++ sys/kern/tty.c | 4 ++-- sys/sys/_termios.h | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/stty/modes.c b/bin/stty/modes.c index ce39083d7d63..3818677ddc4e 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -126,6 +126,8 @@ static const struct modes imodes[] = { { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index 07a3c2058474..33472bbccea1 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -127,6 +127,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt) put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index d81b9e1e3ece..58e1a1476abf 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -224,6 +224,9 @@ if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. +.It Cm iutf8 Pq Fl iutf8 +Assume that input characters are UTF-8 encoded. Setting this flag +causes backspace to properly delete multibyte characters in canonical mode. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index 79a0090587e6..8abe1fce4402 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -884,6 +884,8 @@ following masks: /* any char will restart after stop */ .It Dv IMAXBEL /* ring bell on input queue full */ +.It Dv IUTF8 +/* assume input is UTF-8 encoded */ .El .Pp In the context of asynchronous serial data transmission, a break diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 748f353c4fe4..00a5670d84cf 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -85,8 +85,8 @@ static const char *dev_console_filename; /* * Flags that are supported and stored by this implementation. */ -#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|\ - INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL) +#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|\ + IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL|IUTF8) #define TTYSUP_OFLAG (OPOST|ONLCR|TAB3|ONOEOT|OCRNL|ONOCR|ONLRET) #define TTYSUP_LFLAG (ECHOKE|ECHOE|ECHOK|ECHO|ECHONL|ECHOPRT|\ ECHOCTL|ISIG|ICANON|ALTWERASE|IEXTEN|TOSTOP|\ diff --git a/sys/sys/_termios.h b/sys/sys/_termios.h index 327ffcb2f98b..823752732ee2 100644 --- a/sys/sys/_termios.h +++ b/sys/sys/_termios.h @@ -97,6 +97,7 @@ #endif #if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ +#define IUTF8 0x00004000 /* assume input is utf-8 encoded */ #endif /* From nobody Sat Oct 21 14:35:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBn5v7Rz4y5Sh; Sat, 21 Oct 2023 14:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCPBn51cGz4Hsf; Sat, 21 Oct 2023 14:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sj7njNUqVxGJ48GUVoVEaiEmFutUp3uTLUT/rh8mrtQ=; b=WH2Au3YS+o0wVudBWtT3rn61ag9NcTskC+hpb0/rgRWqOsRjcBtLOUWyJ2CAX8OG2FqNaU YcmXPD2xmh1HxPlyIyohy87rCTfAK9PcbcgfBUOBkMVwHlIDs2gPP4VbZxBv8GIBIlSddT ic9iUsU+ddmBZ1dlhIVAEidUn/s33rn/E82ca38H90aAaJeas3jSlv+2DaktZs/zUKzR1q 0Iz51b6xigYy1Q/o81bdCWLPfwcyF6VKuqPsJH3mtP21mYNwMEt/Ebkr6ODJGuqOEApcgZ DdYxmwJblFZXwt+fRjJ4UGxrCJwZkf3k0rSS9CUyfXHA9G9IRoTuYw5Vur894Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898945; a=rsa-sha256; cv=none; b=IyV+wM++86WxOh2OYfwGEtOkKuFB937zi4w/RwewCxD+U1JRuI4/tVS6PLXiyxx/rqVlgx asMqUsLqr2tQ5XDxLwAIYU/Yv4uQPCKVCPmvbWZsIXieZtBNXVtKuRYI0RVvhHfQgLobq/ asWyZ7BHlHxIlMBZdxvAwMeMUDrtb/lau0MTJ1zEGhT01Kivzct8EuA+Cw/ANVH+XznMBF 5CbeNudV3wWM7ToLw/fX6beAxUh6RaSIYlejBx/zGoGcA7tmZMiyxOO8uDR4Fqj/kLCQg0 aXnj3gPIfvebpSCyprEH7ll93ANNUw9wttS1P0LC6Q9zmiyd1nbN/Q+JsLHOXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sj7njNUqVxGJ48GUVoVEaiEmFutUp3uTLUT/rh8mrtQ=; b=vZ+b/4M+IT5DNFlRchd2uowbxZXeNFPgjKbTmPHTAs/rvn++i7OSsIlQIJj/URAtbLDIRM 8zkhStGQtkYfjCT0RgUePel9hO1WGj2F3USFOjoL0xcs8TVRTbQa0BpfM+N5zrkHtVb6a8 hLDaXFtvVYv+W1n39D3TCi66NLszhJ1M3JFMyX34KUPWMyrmui2UTfxNgZ1NeKfMRDcgq9 a8sjzdNdGgV1vUQbPgxsFBjC0aKROQvPlNdJB0C7DGKOc3Nc83Se+asFkO65ZRO/kO/hxT E9RTXrgBjpz4paBlEKozy+0rs4RCmVNzJ1Y1y7MNF7MEl9/mnqcSUATIZRe2xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBn3pDrz4m8; Sat, 21 Oct 2023 14:35:45 +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 39LEZjd6087517; Sat, 21 Oct 2023 14:35:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEZjOh087514; Sat, 21 Oct 2023 14:35:45 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:45 GMT Message-Id: <202310211435.39LEZjOh087514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f859afb57fd8 - stable/13 - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f859afb57fd87715ab80fc00635016949a5daf0e Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f859afb57fd87715ab80fc00635016949a5daf0e commit f859afb57fd87715ab80fc00635016949a5daf0e Author: Bojan Novković AuthorDate: 2023-10-07 18:00:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:21 +0000 tty: fix improper backspace behaviour for UTF8 characters when in canonical mode This patch adds additional logic in ttydisc_rubchar() to properly handle backspace behaviour for UTF-8 characters. Currently, typing in a backspace after a UTF8 character will delete only one byte from the byte sequence, leaving garbled output in the tty's output queue. With this change all of the character's bytes are deleted. This change is only active when the IUTF8 flag is set (see 19054eb6053189144aa962b2ecc1bf5087758a3e "(s)tty: add support for IUTF8 input flag") The code uses the teken_wcwidth() function to properly handle character column widths for different code points, and adds the teken_utf8_bytes_to_codepoint() function that converts a UTF-8 byte sequence to a codepoint, as specified in RFC3629. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42067 (cherry picked from commit 9e589b0938579f3f4d89fa5c051f845bf754184d) --- sys/kern/tty_ttydisc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ sys/teken/teken_wcwidth.h | 30 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index 665275ee93e7..eae7162e31c0 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -43,6 +43,9 @@ #include #include +#include +#include + /* * Standard TTYDISC `termios' line discipline. */ @@ -78,8 +81,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, tty_nout, CTLFLAG_RD, /* Character is alphanumeric. */ #define CTL_ALNUM(c) (((c) >= '0' && (c) <= '9') || \ ((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) +/* Character is UTF8-encoded. */ +#define CTL_UTF8(c) (!!((c) & 0x80)) +/* Character is a UTF8 continuation byte. */ +#define CTL_UTF8_CONT(c) (((c) & 0xc0) == 0x80) #define TTY_STACKBUF 256 +#define UTF8_STACKBUF 4 void ttydisc_open(struct tty *tp) @@ -800,6 +808,72 @@ ttydisc_rubchar(struct tty *tp) ttyoutq_write_nofrag(&tp->t_outq, "\b\b\b\b\b\b\b\b", tablen); return (0); + } else if ((tp->t_termios.c_iflag & IUTF8) != 0 && + CTL_UTF8(c)) { + uint8_t bytes[UTF8_STACKBUF] = { 0 }; + int curidx = UTF8_STACKBUF - 1, cwidth = 1, + nb = 0; + teken_char_t codepoint; + + /* Save current byte. */ + bytes[curidx] = c; + curidx--; + nb++; + /* Loop back through inq until we hit the + * leading byte. */ + while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) { + ttyinq_peekchar(&tp->t_inq, &c, "e); + ttyinq_unputchar(&tp->t_inq); + bytes[curidx] = c; + curidx--; + nb++; + } + /* + * Shift array so that the leading + * byte ends up at idx 0. + */ + if (nb < UTF8_STACKBUF) + memmove(&bytes[0], &bytes[curidx + 1], + nb * sizeof(uint8_t)); + /* Check for malformed UTF8 characters. */ + if (nb == UTF8_STACKBUF && + CTL_UTF8_CONT(bytes[0])) { + /* + * Place all bytes back into the inq and + * delete the last byte only. + */ + ttyinq_write(&tp->t_inq, bytes, + UTF8_STACKBUF, 0); + } else { + /* Find codepoint and width. */ + codepoint = + teken_utf8_bytes_to_codepoint(bytes, + nb); + if (codepoint != + TEKEN_UTF8_INVALID_CODEPOINT) { + cwidth = teken_wcwidth( + codepoint); + } else { + /* + * Place all bytes back into the + * inq and fall back to + * default behaviour. + */ + ttyinq_write(&tp->t_inq, bytes, + nb, 0); + } + } + tp->t_column -= cwidth; + /* + * Delete character by punching + * 'cwidth' spaces over it. + */ + if (cwidth == 1) + ttyoutq_write_nofrag(&tp->t_outq, + "\b \b", 3); + else if (cwidth == 2) + ttyoutq_write_nofrag(&tp->t_outq, + "\b\b \b\b", 6); } else { /* * Remove a regular character by diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f57a185c2433..f5a23dbc9679 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -8,6 +8,8 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +#define TEKEN_UTF8_INVALID_CODEPOINT -1 + struct interval { teken_char_t first; teken_char_t last; @@ -116,3 +118,31 @@ static int teken_wcwidth(teken_char_t ucs) (ucs >= 0x20000 && ucs <= 0x2fffd) || (ucs >= 0x30000 && ucs <= 0x3fffd))); } + +/* + * Converts an UTF-8 byte sequence to a codepoint as specified in + * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function + * expects the 'bytes' array to start with the leading character. + */ +static teken_char_t +teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) +{ + + /* Check for malformed characters. */ + if (bitcount(bytes[0] & 0xf0) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); + + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } +} From nobody Sat Oct 21 14:35:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBp6tMNz4y5Mx; Sat, 21 Oct 2023 14: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 4SCPBp5sZ3z4J44; Sat, 21 Oct 2023 14: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=1697898946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vTUzX7UHjHP/rcRDmQH1kb9fWxDsJUrcEruKrJeAzc=; b=POmhU3e6F8MTTmTjcr27e6zcgHRebnUFaV9Uv3BcwViFRkJoG1S7jAg1xvxGJD5hk8010S tqCO4s/szMf5kmjYKFXdgt0YZm2f8uCKWnsnxKUq9hvoTt9Z9J4o7E7iJXBttFZj0O/zHX u90uCHPnU8moEGfY5femx0614q9NzRekFfS2kJCKg1uhGnZ/CKavZJzHVM1pDK++ueqqGM FcrQOyfMZ2N38fhHugpfeUiKbqyTUAbiQG7ADA2I38P8vLscFsinkjCDnI2Ju9rpQVCi5/ nNtSto6s7XGX4DzRUN4AaTa2HZR9trCefQHKRiSqMLbU4NVghx8KPlELZ10E5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898946; a=rsa-sha256; cv=none; b=q0q3n235/qoZt1HkO4O2WX/Jw64RHxrUoWS+smQjD499tQVZN2TVzRjWdC6WWfOir6u+IL xh/QHvpxnZG9AXx5gyQE88UYPOwqeRJSL+gq2FIU4sSWB/d/klZM6u9nMCOC9R3YbUY1AN zsNypi34mklkbY9WgVGL4LwHWxuFiE2kcb/iEUfdPEVAjrlh3KBttz6bw4Th7dFAN7pdGj K+w0DLwOuRyO6Hg8qfm3SQlFVCjkBqRysG8xIRGD455PEs1qLtj5/ZBs2OJIxbR0nQzPxT E8je7snBCfoAt4RBX9thyKeZg/5sM0WZbtL3rZywea1VTm/Z87eLhvNcx4b7LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vTUzX7UHjHP/rcRDmQH1kb9fWxDsJUrcEruKrJeAzc=; b=PcwGoLTvYg2wP5HyYoAl3YLilosJ2pDYb66a/mrzPDj+PAiESA0snHHjS3hoB3fkjHBeHm ap2qaHNqWYBmPp/gJdHD/r04pQxkQUWMdVsqYAV002OPjzKtPl61gahCDixTkPq2IjlP8A 2UZommZBC8vdVtHqYhm/TCWVMyWEZCV+Dc1a+FPWKnWiAqP9YMWVTCweJ3h54mlFdnkSa+ 09FO0CSTZdbBLG/0H9mafB3vTSNknoW7Q97jhlZ0lkHCH4RDyeuuO3xmnU+5vcM6egjYHl bvBLXjLjQm/8IpI3laZHRJei60Rp8WvBIf1hmipF/Ly0tv4uW8jBkG3UrjEb+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBp4pSMz4YY; Sat, 21 Oct 2023 14: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 39LEZkWw087562; Sat, 21 Oct 2023 14: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 39LEZk8t087559; Sat, 21 Oct 2023 14:35:46 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:46 GMT Message-Id: <202310211435.39LEZk8t087559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 0514cca9e44c - stable/13 - teken: use __bitcount() instead of bitcount() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0514cca9e44c80e098efd5bdcf461b9e0c36fdfb Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0514cca9e44c80e098efd5bdcf461b9e0c36fdfb commit 0514cca9e44c80e098efd5bdcf461b9e0c36fdfb Author: Christos Margiolis AuthorDate: 2023-10-07 21:36:59 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:21 +0000 teken: use __bitcount() instead of bitcount() The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is included in teken/teken.h. MFC after: 2 weeks (cherry picked from commit 6d3296f16a06bcaa49918799e683936711dcf9c9) --- sys/teken/teken_wcwidth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f5a23dbc9679..bc992e1ef5d8 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -129,7 +129,7 @@ teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { /* Check for malformed characters. */ - if (bitcount(bytes[0] & 0xf0) != nbytes) + if (__bitcount(bytes[0] & 0xf0) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { From nobody Sat Oct 21 14:35:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBr0jm0z4y5mf; Sat, 21 Oct 2023 14:35: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 4SCPBq6vMxz4Hx7; Sat, 21 Oct 2023 14:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSo19iyFzBc7c5If8d22j28bcl0g+Fpvf4a02YvChKc=; b=l+xaMIIgkRE+K/SHkdQ3uLMzXt2CTJR5mii9xyCMrHKfao5hjoz7IRvi1OVtyrTbanagXI WiO5wDla8aEEOHkKzs9qbHbzHiNQUVl7P6BNIMJrSJb1wmPegZjx37qB/yVDW4PmdKBS81 neIHLQL8acOnKGvd82yiyaJA3yWOwxK+GvmWusY+uLrKF/2bjAW+x5nbYO68zoBCnrpE8K Q8bGopFEcEtOmQbt48BaEiPW3Er9ajoEIpF7TzK5mdlH2ktx1Sztok/Hraz1nLvuP+aN5U 54XG1TFRpD1siszwE0rGPnfFKzbyl4iZs/ZhV0U+2By7yALPcgvxxNrwLtgBzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898948; a=rsa-sha256; cv=none; b=P+7JmESrO/c8eJFqnejQiufh80jDZt8lXKVZy2k4uPIPdQfTTix024GFmCEd4ACyizVk6Y zsxf7OQDvqAHiFnJY04kVZ4sWCuBumcKPDYCjSryrkip3vBV+QauWHtstOqR+iAOgID7Kz zdnk9SZMmyTeMjjNYnrtrMKkyeqO7gVRZazKwxgYmOqnpXGxdcTVYx7BmzmwtDWgn5z68X iZb4aggbETVYMOWXjECcLKRCzxLKyg3qih7LWC4rpAozwfOEQz7XQgrYREWd1H1dvRA9T5 88I6q+G4jXLeBSQcyha7nnjQMAXpXwE/hxcsv7W7TcTm0XkAvzFpTLPvWgL5fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSo19iyFzBc7c5If8d22j28bcl0g+Fpvf4a02YvChKc=; b=mxSY7c4xhRO4SayraXug3MIKmjgaII0D9cROHRnlhLUWY5oWJxeOcdUaT1jpXnn50qzo/R y/FMhJBwigO6vvTQSIZP8JrRP8PjJxX8dnRoj0+A2/ssV7/CFKx0QcDB3TIjU4wl2GsB4A o8tzc27KtLWk4RjrWY4PnEAIP0UPcQIMZe3orX/JXY4djSBxNTN8bCMqrEwLdCcfyIQ75P CJs5PDHKTRvtvCcA7ymqVTYKqv6xyrLK1LZAoBRJi1UZ65CSr5D2vEx9KpHmpERVZeN869 PvL1aISPVLVpzifp3j01AsKmaJ1PWsLLu8bXTp06L30HBVqfRGlQAtzgVEbJbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBq5pbRz4C1; Sat, 21 Oct 2023 14:35:47 +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 39LEZlnV087607; Sat, 21 Oct 2023 14:35:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEZl7C087604; Sat, 21 Oct 2023 14:35:47 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:47 GMT Message-Id: <202310211435.39LEZl7C087604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 7efbe98526f1 - stable/13 - teken: fix up unused func warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7efbe98526f18317420785fd989f617c482846a7 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7efbe98526f18317420785fd989f617c482846a7 commit 7efbe98526f18317420785fd989f617c482846a7 Author: Mateusz Guzik AuthorDate: 2023-10-08 13:54:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:22 +0000 teken: fix up unused func warnings Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 4b9aa38ef0e5bedcdd90b6627cc1c215037a1121) --- sys/teken/teken_wcwidth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc992e1ef5d8..bc40c23a6eb7 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -16,7 +16,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(teken_char_t ucs, const struct interval *table, int max) { +static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { int min = 0; int mid; @@ -35,7 +35,7 @@ static int bisearch(teken_char_t ucs, const struct interval *table, int max) { return 0; } -static int teken_wcwidth(teken_char_t ucs) +static inline int teken_wcwidth(teken_char_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -124,7 +124,7 @@ static int teken_wcwidth(teken_char_t ucs) * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function * expects the 'bytes' array to start with the leading character. */ -static teken_char_t +static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { From nobody Sat Oct 21 14:35:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBs1Sgtz4y5kG; Sat, 21 Oct 2023 14:35: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 4SCPBs0TvCz4J4s; Sat, 21 Oct 2023 14:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5P8Qfg2D8EPhBr4gVyxTQiteXR7uTn24jTz/igvhoyY=; b=VdegxjelU7HH9f/FcGvaReBqcz863sA8wX+u+F7KclygDZvuaAWX3BF6ycdtO26xnPbGVE onRrUoTULdQ7DEqhQSw9k2f5ld5kXxYXHDi+hgrdaK/HYIE/T+IOQ91XL6/rySZCg3ob7o rSf3DCUR5ielDsUNGo1Od1G+sPbzazPIFbA0EwyVzA84MwPbQmZt1VkhjJUIgXmvl/0yDp T+put5c36DGfJustHF8lb+tAeEW0dDUND4gs7ra9J5KvAXN6RRtJH40CXkuwzvSpNAJslv N6FqjBakPC+pv6Os499wHD9JPQcCMlJBCBAFb2FYweL9uzHbPUgh7asO1xkMXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898949; a=rsa-sha256; cv=none; b=jxMdvbLfKx/ehHdYLXPYoBFt8Q2oDVHyVgCAewg7+0yApXJwFyBsN1PCgiaSm2sR2kZokK EnAlXdCjd/sE9XC7l4k3vBCWW/A+MqoL8lgtkefLu++M8u/gtzDJIecz7RYxue31PbQP+G iAzx1eLJ/oEAqDfh8oX/gmF/47ZZMcs+j+TqIxzF/6uELm2/DEEl82DbcXnCKHvhdpsQG+ IBjPt5egrDLROXQHJ4l7BFg0UZ5a9SktORngm7zeERkAky7t3yrHCOTq0P78pPptC/lUgg g3sD/dcyuFnoMGlLACQoQvzw1BPPSkg7aLZC6lOurhaP62jM8NDTSSTQDpNy1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5P8Qfg2D8EPhBr4gVyxTQiteXR7uTn24jTz/igvhoyY=; b=rAvrp327tSZvm5mgYIXOmzYOFSOD3UBV1iJGUjtgUBwQgadqu/fvnx+TnFjwZPhNL3GbsJ 2oT0KBsG+FdHFBXO6PmsEUpIc6t1D1OtqTfecBZmUlbk01h0x5aRZ3AAJDfhv1P71ish22 7rErypPz0U5QeUCV2KJWPBynhsc+UB4SCxCRqyaPkQN0hmONn8xF0hF3uJY67A4VN7nIAa 7SQ2uigAepR+lrcNiFqTmDPD7beIq1NMR+0yn33/NlkIJQM6gQAOV5FTzpNHimQxP4CpbW rWS/CQbvj3UE5eyr2w3tJZiiU8Epj9Py6hSpKOinVMssVhi4DP7mGgmIe0mlDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBr6cqfz4TC; Sat, 21 Oct 2023 14:35: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 39LEZmnv087652; Sat, 21 Oct 2023 14:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEZms3087649; Sat, 21 Oct 2023 14:35:48 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:48 GMT Message-Id: <202310211435.39LEZms3087649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 376c2ff8981a - stable/13 - tty/teken: fix UTF8 sequence validation logic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 376c2ff8981a9b818e7a61149feeb4961ed970d2 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=376c2ff8981a9b818e7a61149feeb4961ed970d2 commit 376c2ff8981a9b818e7a61149feeb4961ed970d2 Author: Bojan Novković AuthorDate: 2023-10-13 05:14:36 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:22 +0000 tty/teken: fix UTF8 sequence validation logic This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UTF8 sequence is encountered. The code previously used __bitcount() to extract sequence length information from the leading byte. However, this assumption breaks for certain code points that have additional bits set in the first half of the leading byte (e.g. Cyrillic characters). This lead to incorrect behaviour when deleting those characters using backspaces. The code now checks the number of consecutive set bits in the leading byte starting from the MSB, as per RFC 3629. Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42147 (cherry picked from commit 2fed1c579c52d63b72fc08ffcc652ba0183f9254) --- sys/kern/tty_ttydisc.c | 12 +++++++----- sys/teken/teken_wcwidth.h | 23 ++++++++++++++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index eae7162e31c0..c46579cefbb1 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -844,23 +844,25 @@ ttydisc_rubchar(struct tty *tp) */ ttyinq_write(&tp->t_inq, bytes, UTF8_STACKBUF, 0); + ttyinq_unputchar(&tp->t_inq); } else { /* Find codepoint and width. */ codepoint = teken_utf8_bytes_to_codepoint(bytes, nb); - if (codepoint != - TEKEN_UTF8_INVALID_CODEPOINT) { - cwidth = teken_wcwidth( - codepoint); - } else { + if (codepoint == + TEKEN_UTF8_INVALID_CODEPOINT || + (cwidth = teken_wcwidth( + codepoint)) == -1) { /* * Place all bytes back into the * inq and fall back to * default behaviour. */ + cwidth = 1; ttyinq_write(&tp->t_inq, bytes, nb, 0); + ttyinq_unputchar(&tp->t_inq); } } tp->t_column -= cwidth; diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc40c23a6eb7..14af2c6f9530 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -128,15 +128,32 @@ static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { - /* Check for malformed characters. */ - if (__bitcount(bytes[0] & 0xf0) != nbytes) + /* + * Check for malformed characters by comparing 'nbytes' + * to the byte length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different + * values indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in + * the leading octet (except in the first case, where an MSB + * of 0 means a byte length of 1). Here we flip the 4 upper + * bits and count the leading zeros using __builtin_clz() + * to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { case 1: return (bytes[0] & 0x7f); case 2: - return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); case 3: return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); case 4: From nobody Sat Oct 21 14:35:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPBt3kGGz4y5j0; Sat, 21 Oct 2023 14:35: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 4SCPBt1h4Qz4JD7; Sat, 21 Oct 2023 14:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aZ9HMGVdYCBvw7WCUOAXgkpvIKZsjXWKsQ88GGbvi4=; b=WRMBFmtFqoIfQTHJqOiD0aoZAmE9y16tHSy+tedmNmhv7zglUOA0CyjzJFXgYwrAzUWOUA Lv+ht0aaf6EqlUUxsPfgWGrnhvI1nk7Sxz6GVvWJoYCX/yvEQ4pK+WHCy9kdgQeKdCognO 6Sksnyq0YkTGsXz4fL5bdb72E/J+ofZO6ek173F6dpt6D3mbhgt7UqyxjOzH/3yfdvPSaT suC7evegIoAuAY1L9ZR0SUyjI7/ruSYGawWElWO6ImGM225FpuOX6GpGFK77JPxe5HvgAe UN9mp/514yEZ90y60Um5V4//4Rhh9Md4h6gsO+MmgTMRhC3BTesJMqQcWr28xA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697898950; a=rsa-sha256; cv=none; b=upvfaFZ5wsUqd1dWeJuthEfrHh9acf9lkV/0dq4BwvZ1JqNYsnKoew78+bmf7TzN0BlZzy /dOAefS7afbZ557ZAoJKP6DMeKxgwRdzWbUkHiVax/oczQVI9B7M7A3QubLRoU6V+m5Kpg utlt3onXUOP2JgdTcpi0IhvUXXpbPfKN9EJ+RkMNGtymZF8Uzqo84wDt8JTZbkMYYy2P7q 9Ce6J/pCwqd3bj0lXvVdmVcOtJmNZ5hpzFlfxSgCx08enS1TYxAFNjY39YvXe7vZupfzD8 3OhvUOhy2/+o2gV9tesEP+OzbNrGwATme68qZS8WWLOiTTLD8zFevMdiv1DubQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697898950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aZ9HMGVdYCBvw7WCUOAXgkpvIKZsjXWKsQ88GGbvi4=; b=DzLUTov4ASE3KZylBruAot+qC8csR+vqSpsZFrsaMS035qH2AUI6QbxYog70VkPNBVxmNx gkF/TcVxGQPZ6Q+jfCCGmgT4STSkC0ZRK7TDQ6f9dyKNGY6SN/b/zE+G12fqXnH45r58LQ zhUidpLW89ThTtWWWXDuCdHDQHwwvS3/mAYzXxFvH5RpOFv/+bPsNd/lkkuq6OM+nptGh0 rZq7uoNsyWy+/BzUNhXSu0HgjQrst0j4ik/muhSK6u/lXLrMmViulNJ7ro9a60Gk7A4QoA jcSu1BQFJsdAWhYmCq5QR857aet5NuSsrVIMVwarx2JxwQIvTpFMwtTCAUSs1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPBt09YKz4cK; Sat, 21 Oct 2023 14:35: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 39LEZnCv087703; Sat, 21 Oct 2023 14:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEZnEc087700; Sat, 21 Oct 2023 14:35:49 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:35:49 GMT Message-Id: <202310211435.39LEZnEc087700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 9856a16ee49e - stable/13 - teken: fix style in teken_wcwidth.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9856a16ee49e5c634358d206ea208328bd5ab5fe Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9856a16ee49e5c634358d206ea208328bd5ab5fe commit 9856a16ee49e5c634358d206ea208328bd5ab5fe Author: Christos Margiolis AuthorDate: 2023-10-13 05:14:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-21 14:34:22 +0000 teken: fix style in teken_wcwidth.h Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164 (cherry picked from commit 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af) --- sys/teken/teken_wcwidth.h | 265 +++++++++++++++++++++++----------------------- 1 file changed, 135 insertions(+), 130 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index 14af2c6f9530..72df62704d73 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -11,112 +11,118 @@ #define TEKEN_UTF8_INVALID_CODEPOINT -1 struct interval { - teken_char_t first; - teken_char_t last; + teken_char_t first; + teken_char_t last; }; -/* auxiliary function for binary search in interval table */ -static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { - int min = 0; - int mid; +/* Auxiliary function for binary search in interval table */ +static inline int +bisearch(teken_char_t ucs, const struct interval *table, int max) +{ + int min = 0; + int mid; - if (ucs < table[0].first || ucs > table[max].last) - return 0; - while (max >= min) { - mid = (min + max) / 2; - if (ucs > table[mid].last) - min = mid + 1; - else if (ucs < table[mid].first) - max = mid - 1; - else - return 1; - } + if (ucs < table[0].first || ucs > table[max].last) + return (0); + while (max >= min) { + mid = (min + max) / 2; + if (ucs > table[mid].last) + min = mid + 1; + else if (ucs < table[mid].first) + max = mid - 1; + else + return (1); + } - return 0; + return (0); } -static inline int teken_wcwidth(teken_char_t ucs) +static inline int +teken_wcwidth(teken_char_t ucs) { - /* sorted list of non-overlapping intervals of non-spacing characters */ - /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ - static const struct interval combining[] = { - { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, - { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, - { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, - { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, - { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, - { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, - { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, - { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, - { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, - { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, - { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, - { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, - { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, - { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, - { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, - { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, - { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, - { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, - { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, - { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, - { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, - { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, - { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, - { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, - { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, - { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, - { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, - { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, - { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, - { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, - { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, - { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, - { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, - { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, - { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, - { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, - { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, - { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, - { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, - { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, - { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, - { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, - { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, - { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, - { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, - { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, - { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, - { 0xE0100, 0xE01EF } - }; - - /* test for 8-bit control characters */ - if (ucs == 0) - return 0; - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) - return -1; + /* + * Sorted list of non-overlapping intervals of non-spacing characters. + * Generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" + */ + static const struct interval combining[] = { + { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, + { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, + { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, + { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, + { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, + { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, + { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, + { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, + { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, + { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, + { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, + { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, + { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, + { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, + { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, + { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, + { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, + { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, + { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, + { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, + { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, + { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, + { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, + { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, + { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, + { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, + { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, + { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, + { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, + { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, + { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, + { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, + { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, + { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, + { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, + { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, + { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, + { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, + { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, + { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, + { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, + { 0xE0100, 0xE01EF } + }; - /* binary search in table of non-spacing characters */ - if (bisearch(ucs, combining, - sizeof(combining) / sizeof(struct interval) - 1)) - return 0; + /* Test for 8-bit control characters */ + if (ucs == 0) + return (0); + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) + return (-1); - /* if we arrive here, ucs is not a combining or C0/C1 control character */ + /* Binary search in table of non-spacing characters */ + if (bisearch(ucs, combining, sizeof(combining) / + sizeof(struct interval) - 1)) + return (0); - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || /* Hangul Jamo init. consonants */ - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || /* CJK ... Yi */ - (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ - (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ - (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ - (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ - (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); + /* + * If we arrive here, ucs is not a combining or C0/C1 control character + */ + return (1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || /* Hangul Jamo init. consonants */ + ucs == 0x2329 || ucs == 0x232a || + (ucs >= 0x2e80 && ucs <= 0xa4cf && + ucs != 0x303f) || /* CJK ... Yi */ + (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ + (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ + (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ + (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ + (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2fffd) || + (ucs >= 0x30000 && ucs <= 0x3fffd)))); } /* @@ -127,39 +133,38 @@ static inline int teken_wcwidth(teken_char_t ucs) static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { + /* + * Check for malformed characters by comparing 'nbytes' to the byte + * length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different values + * indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in the leading + * octet (except in the first case, where an MSB of 0 means a byte + * length of 1). Here we flip the 4 upper bits and count the leading + * zeros using __builtin_clz() to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); - /* - * Check for malformed characters by comparing 'nbytes' - * to the byte length of the character. - * - * The table in section 3 of RFC 3629 defines 4 different - * values indicating the length of a UTF-8 byte sequence. - * - * 0xxxxxxx -> 1 byte - * 110xxxxx -> 2 bytes - * 1110xxxx -> 3 bytes - * 11110xxx -> 4 bytes - * - * The length is determined by the higher-order bits in - * the leading octet (except in the first case, where an MSB - * of 0 means a byte length of 1). Here we flip the 4 upper - * bits and count the leading zeros using __builtin_clz() - * to determine the number of bytes. - */ - if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) - return (TEKEN_UTF8_INVALID_CODEPOINT); - - switch (nbytes) { - case 1: - return (bytes[0] & 0x7f); - case 2: - return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); - case 3: - return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); - case 4: - return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | - (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); - default: - return (TEKEN_UTF8_INVALID_CODEPOINT); - } + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | + (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } } From nobody Sat Oct 21 14:42:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPM40yRfz4y6PT; Sat, 21 Oct 2023 14:42: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 4SCPM403pMz4KwN; Sat, 21 Oct 2023 14:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6HTcGRw7p5ksbe/s/jQVRUo02CHyo7uInYhAQ4NCWY=; b=mYkvRMhjnQda4tSVFErrNbuPPZYOIQCugyld/FwmwCaL/Avtzp+7PcH06FAy9zBuvlzC8Y Lq7CmGPirKCFYEqQYxPp7t7J0XV+pSUp0iEL5Z96CR30JZqsVFjdum0Je7CA7zvrjVJswO VkWNgFO2CGzjYNdnV7rMhDme0xuKCgiqUPMX7aKVSL+Ky1a+2OBBT+Lidyx4MWO/Z4VTk2 aJ8gY6H7jtaz8D8/d+k2XYJn78QQDdnAJJ36FAxsTLR5P+j+/dWx/ghPZmM7geMaobiic+ yfEXgPmpW48VL9HUz9AGHgN1dN8w41MnixbmyYyyzFADlAYCSRZ0AbuzSzs5ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697899376; a=rsa-sha256; cv=none; b=XOQaO3bNk8HRvES9q6v1giXBkL+S+K/GrrRM2n7ehKqdNWst1fc/IR6MZsi23IypDGM6iG 7upS90CymXzcozDqQID7dWj5C7iMl6lX29q8tBdEH1Hq4sLW2mlud1RRuPk3xtCwA9MlAl MHH8BEdzhgld4/cjTI4XPc1FWxsLsW96LCBz95wqWkFMXurkbnjRmfrIbXYjrOXWsG/xDZ BPrajBc6rx6iWmspjr8WY4TZXErjWB3J5/3B0t5IGYMHP5cpCoA94s80a1pUZ+KYL0HVH2 K2Pb70kzivn1ndWVHEpyXkZyYjcvAl+IcMuQ2jA3V6S4lboMpTci+b6/lOJgGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6HTcGRw7p5ksbe/s/jQVRUo02CHyo7uInYhAQ4NCWY=; b=gyzUbwfrUJMoYxFRNDFpvfjP814PcL4EQT7SwVKV+/616Bl2DshFpPMjgUPO/4sjz+j0kN 9/7/ud8ee1d+/RnwJX9jCTXH3Pn4U4agXW5DahVKb21rfGiEzFLGsL+053G7YealOspjku KrcJd8zfZZkqG7TIg2RVuD7EwmgZ/Kj/WCckBab6B7NSpQjGS16NG/Wf7v408TrsNVtyZi V4H+VVueHGFVlybj8ld57i0YNoRQWh70gOW1DdbXZAdMZyNUXQSjD9zMynWt+F/jd+8xZf CayPWaZHs9e4/sdhMzVn8ONn51BUhCxAlEnvyFvbOyTpzf+DkJpiNqbQASPOpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPM36DDtz4pr; Sat, 21 Oct 2023 14:42: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 39LEgtXF004642; Sat, 21 Oct 2023 14:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEgtSY004639; Sat, 21 Oct 2023 14:42:55 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:42:55 GMT Message-Id: <202310211442.39LEgtSY004639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c878532881d6 - stable/14 - kasan.9: Mention the loader tunable 'debug.kasan.disable' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c878532881d639ff50fded05bca37595d8b9d00d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c878532881d639ff50fded05bca37595d8b9d00d commit c878532881d639ff50fded05bca37595d8b9d00d Author: Zhenlei Huang AuthorDate: 2023-10-13 14:42:34 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:41:09 +0000 kasan.9: Mention the loader tunable 'debug.kasan.disable' Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42165 (cherry picked from commit 2df97575088d2efe71d6ee136a677cf50249f96d) --- share/man/man9/kasan.9 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 1db6e187da46..209fbb06506c 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 23, 2023 +.Dd October 13, 2023 .Dt KASAN 9 .Os .Sh NAME @@ -90,6 +90,12 @@ sysctl/tunable. .Pp The .Nm +runtime in a KASAN-configured kernel can be disabled by +setting the loader tunable +.Sy debug.kasan.disable=1 . +.Pp +The +.Nm runtime works by maintaining a shadow map for the kernel map. There exists a linear mapping between addresses in the kernel map and addresses in the shadow map. From nobody Sat Oct 21 14:42:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPM51bPQz4y66R; Sat, 21 Oct 2023 14:42: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 4SCPM511rmz4Kpd; Sat, 21 Oct 2023 14:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0HCFKJ2njOx0FBwFldDAa7QOKNDn79rPJHr2yJdiKWU=; b=DRul0Uz4P+vounaWTExeKPAOPr4Au88ZOgCx8BCceudbLInXWUooRiXXvFQBn60sITNC6e a8ffsA3EKS/lMX1spJ71JDsLuHceRclQ7lESOoZ6m1MeW5KeTzKfmrZXUXS+RACoNvdYvX y6fg2kjLtljIEzh5reQLIe0Rj13K/L7K3RebqmjxY9agOBXIozRAZjBcbYRfb6EUcQbSPa z8Ut7PN1GZCmcf4QAPH8Nfzv6ZRFy+aD8DHyOWz2aYuto7f4e9ArmLCgAhqmYSM+mcbNZN wWHOBCnTOlVa81GNmpLdSWv10y8S79XJwh+WvlyeQ95Pf32lExKPOil61CDJtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697899377; a=rsa-sha256; cv=none; b=Iinpsb1zuZZKjWGnyzjXv8+ESYrN/UZaqN6fx1q+lfQFeZXGa6HYY7QQF1/6TwvKkDee8b OM+UA6R60ybtUVa6+toq3WwlAguUb9fsUnjtKEbo5tms3vKTc2jHcPGeZH0i12eFgbZSIO 7EDI0+rA8+Hh40mXJjL/vxNHXNnzWfLWrGmH+KIbTdQD6rig8JAzkDhRPr8OW5fowD2SM1 eKwmPK/2FJMu86I0RFoA/Ul7e/HtXx9crC9zPiUF9Z/wNN9ckwxRQFYoNVpsHR/Bbf6xu9 g4IrwRveiztn73V+T4xVh0NVsTXIGCVt3iGX9dmsUSR+Tp5zRa8FPJpH196otQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0HCFKJ2njOx0FBwFldDAa7QOKNDn79rPJHr2yJdiKWU=; b=us6ejGJmiM8/HjbG0gSO66UK5Bn/Ey7ZljjHLXFsIlB8CZf0lEWu9J3YX3NXyZsznAicHx RFB9fqsyr6156j7Y9jLU05HBPNa5aFgFRyTEkj6uHsv9YLrWeRgBGUqio1pFfWOvZ4U/zB c4WJz/XOerjqpkL5yvCoEkfHUpUOMlcKg4J0CkCXYMclt4z+zluquueJFmzwLpgelFN/nW zygxa4m5qYGOu6/OIzP263aKAezx99CV2VosYO9sSuUBJcZIARJrvslAi6pb+fnHmLzoWI pzCt+z3QVXLLTYvjm/4CyPS5pmlQWvjXwtbiLyq7of6rOnag5RceomnjVXVYrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPM504yzz4ps; Sat, 21 Oct 2023 14:42: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 39LEgugG004688; Sat, 21 Oct 2023 14:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEgu3r004685; Sat, 21 Oct 2023 14:42:56 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:42:56 GMT Message-Id: <202310211442.39LEgu3r004685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e022d8e4edbf - stable/14 - kmsan.9: Mention the loader tunable 'debug.kmsan.disable' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e022d8e4edbf17f1c12bfd55af98541962354f34 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e022d8e4edbf17f1c12bfd55af98541962354f34 commit e022d8e4edbf17f1c12bfd55af98541962354f34 Author: Zhenlei Huang AuthorDate: 2023-10-13 14:42:34 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:41:09 +0000 kmsan.9: Mention the loader tunable 'debug.kmsan.disable' Reviewed by: gbe (manpages), markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42166 (cherry picked from commit 7ca90db2f3ee15d9d0343d76f06a90efb8426d92) --- share/man/man9/kmsan.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kmsan.9 b/share/man/man9/kmsan.9 index ae9dbdc7a052..714442e4d9fe 100644 --- a/share/man/man9/kmsan.9 +++ b/share/man/man9/kmsan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 10, 2021 +.Dd October 13, 2023 .Dt KMSAN 9 .Os .Sh NAME @@ -108,6 +108,10 @@ should be used only for kernel testing and development. It is not recommended to enable .Nm in systems with less than 8GB of physical RAM. +.Pp +The sanitizer in a KMSAN-configured kernel can be disabled by setting the loader +tunable +.Sy debug.kmsan.disable=1 . .Sh FUNCTIONS The .Fn kmsan_mark From nobody Sat Oct 21 14:42:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPM70Gf4z4y6Q1; Sat, 21 Oct 2023 14:42: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 4SCPM639n4z4KgW; Sat, 21 Oct 2023 14:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bP5wR6d7wxH4RDTvO/wJmX5pFtfcqBDMdF2lDSCJdYM=; b=b476D4UymwIldBvCF/CYhh1XE8GCEm1o+NGOun974tK4LRmh3TxwFr4o3vyQVtvno82LZ7 ziOuduUyaJUnRty94GZsVljFkunLibAE1TtxP2PU+vPmYn9DkgHCnrKMKtlcLAM22SJ3/F BcGsaZ/e5zMJ/TqwqslIU23IYznejjTb+Z008CSf+DCl00GFRmVobHHYCfUWsz7+FaIZi1 slb+7+bCq6s0YkUewxCn/dgd58A3M3W4Jg4dcWChv7KSMeC7qUx2FQo5ZazXvg+/m1nkoE /CpINHAG0jOLoGzHbHk6F5IZcYe22nHO2KXWGuFCYMDLfBsuLQluo2x4h4z7cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697899378; a=rsa-sha256; cv=none; b=qjHK3RnEVpbH8mMwTWQYO3cuQx+B/jYy25BLuftwjkZVqQeOEEWBfOwHxkVUYbsi9j5tE5 0zi4OR/KZAcg0wJFeJlsyGjR5u5Q/swQ6G01Shr8/iYcgRNjMjhvFfxXLtY845ptmVTLy8 STMd0nhKRMB6QoJnI6wq8ENIXSSrNe+dmivhZEbs/c4stkoP4VCk4WRsJy1u/+7PvYLFGW TXyUSgyHQLXG9D9QAjVlTJry2ByVsolDF6Dgs7e+fzQUj4YssQbXC34jS3DKa8JJRxZfpA 3aqcubzRc/mo/4Pj/WZNDf5LJ99cI3RL4iaeSugYOE2AWnK7UwBCl7nFZmoKIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bP5wR6d7wxH4RDTvO/wJmX5pFtfcqBDMdF2lDSCJdYM=; b=tmLEIP65ZNnVcqKhQvJKvlxMFqs6hy3gNQbiGknnNThvyUPzu+ZSJRzFQukotyD0peWCxI DdIk+Ifgh0KJw2diPpn61yXhAc6Ip60q55fMWw7P3uvoHMhpkdE/jHQ+A9FFvbWjpYnHgi nI/7OaONvFI/geO/dPQ0OktCRm0MetphA9rofyfYLIgt0oky6u0m3MqRrmouuOibQB9qyO E85bPDsDMsi4bC77fXx4wnzNqrZYNIFQG3y5Qz3epmuIrzt62YmiqehGvs0yq/fdUO/VYD UYWj4UC2MSKtsWDe+N1mVj2zQv4jHXJ5tv/OADfkrirASH0SZzs2O3u5osOFig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPM61yYWz514; Sat, 21 Oct 2023 14:42: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 39LEgwnc004736; Sat, 21 Oct 2023 14:42:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LEgwjb004733; Sat, 21 Oct 2023 14:42:58 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:42:58 GMT Message-Id: <202310211442.39LEgwjb004733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 032a0b44541f - stable/14 - amd64: Fix two typos of loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 032a0b44541ffb669a4553105c6f6343ab4e3a67 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=032a0b44541ffb669a4553105c6f6343ab4e3a67 commit 032a0b44541ffb669a4553105c6f6343ab4e3a67 Author: Zhenlei Huang AuthorDate: 2023-10-19 15:23:33 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:41:09 +0000 amd64: Fix two typos of loader tunables To match the sysctl MIBs and document entries in security(7). Fixes: 2dec2b4a34b4 amd64: flush L1 data cache on syscall return with an error Fixes: 17edf152e556 Control for Special Register Buffer Data Sampling mitigation Reviewed by: kib MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D42249 (cherry picked from commit afbb8041a0633c97acb51ac895c9ae3cde4fe540) --- sys/amd64/amd64/machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 4b81f5b9671e..512f960926a2 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1484,7 +1484,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("hw.spec_store_bypass_disable", &hw_ssb_disable); TUNABLE_INT_FETCH("machdep.mitigations.ssb.disable", &hw_ssb_disable); - TUNABLE_INT_FETCH("machdep.syscall_ret_l1d_flush", + TUNABLE_INT_FETCH("machdep.syscall_ret_flush_l1d", &syscall_ret_l1d_flush_mode); TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); @@ -1492,7 +1492,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); - TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", + TUNABLE_INT_FETCH("machdep.mitigations.rngds.enable", &x86_rngds_mitg_enable); TUNABLE_INT_FETCH("machdep.mitigations.zenbleed.enable", From nobody Sat Oct 21 14:47:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPS34fYqz4y6Fw; Sat, 21 Oct 2023 14:47: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 4SCPS33tMmz4Mbk; Sat, 21 Oct 2023 14:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xckaHLn/jdLBO5NKs3FQkdTAnDbZcT5OB0mO1ZmYEyc=; b=ZtdkjjDGJZRjlQ7ifrSbT+1UzglxdMIFWdodY3hxQfhFJ//966AXQ/3jvMGYiSXbKT0NrE ygeMm/AX5zuXdO8iOg0yYxcuOpKbuiEj7WJNZmHrv00k/rz6reAF8QneGmg2f3R51Ulc96 9mvknYW2XojiYai3kaCDqTlfKKwRrWisCVsIz2YuMcu6KfW/oYMPAtQVPznHnWVzWsI/Mi BdGiKu4QXVyAte6Vl1kgrJXvG0/28ZvdXCE9r7R6Fd52ra7KY0bE+YJw4J0Raemk2w3qEU lk8FfGKMnz9sy7j/Ge00nPrGx1Z8StdtcELw34ETPyyZzlnZikwYQgzXAMOEew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697899635; a=rsa-sha256; cv=none; b=JSjcQNVW3f3c9o5XXEOwvdOkWlNCANKk890jzrR1hrAM/6TyU7XQcMZIz2CAa0kLXzjdu1 gZKVXm7A4ukbtPOb27brJH7JLJ+VHIjcJ8THIu5ashrCO1k3t2b2bWUvMunH8ZG6wlSHLo nkneL6lguh1Ba6rnJl6wP541YGC4545sz0/MuxRL4uQ5mGra89SJa7SDAW121qYnbxIYzv 9SRTHtpK/nwtAW4wjNQaBv4oLhG8+ZzFMhfTjnXtwSeh8MsxcW4eORdcyVTX2vrAr3JooK +KxxcJdDPOP+PrPeevFvyUIjjcQ19HQJHt3AQv7NfqqWc2kWMc8kdDFyBFRVfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xckaHLn/jdLBO5NKs3FQkdTAnDbZcT5OB0mO1ZmYEyc=; b=W2Tk/mKT6as6ZvM7ki04yUiMSb4rpXF+BHiRh5nnyVnGJNVQ43MvZ+HFGBK/mGL60Dtrmz sS98bmdtZB/SEJAQASevi1v3NPUupQFGqaCdD8b+z1qRxOKxaOXmkP+QMMaWhEXgV7/snA /grjrlp6p5qSveQ84e2nvjxXeLgGr/pZ+dQvjNUaR92IoplEJ68IKPZOESULsRvkhWhtNa HCk2lvKR+ehsbQU2FICvEnmPUfySz8jsNc9iAJLBAB6obCRqgvqQ4RKpcHJjUXZL2xuCi/ ELncLhwx4NLC4tA66csb2CvuxODOeNYzGXGlOpcZPpbbroHfWYgGHsF7qpNqGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPS32rGPz4XW; Sat, 21 Oct 2023 14:47: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 39LElF5V006025; Sat, 21 Oct 2023 14:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LElF1b006022; Sat, 21 Oct 2023 14:47:15 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:47:15 GMT Message-Id: <202310211447.39LElF1b006022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5de5f2de6e1d - stable/13 - kasan.9: Mention the loader tunable 'debug.kasan.disable' List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5de5f2de6e1d3b40557fea25d14c68135409556d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5de5f2de6e1d3b40557fea25d14c68135409556d commit 5de5f2de6e1d3b40557fea25d14c68135409556d Author: Zhenlei Huang AuthorDate: 2023-10-13 14:42:34 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:45:45 +0000 kasan.9: Mention the loader tunable 'debug.kasan.disable' Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42165 (cherry picked from commit 2df97575088d2efe71d6ee136a677cf50249f96d) (cherry picked from commit c878532881d639ff50fded05bca37595d8b9d00d) --- share/man/man9/kasan.9 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 9b13cf28aa59..d196ea6a218b 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 13, 2021 +.Dd October 13, 2023 .Dt KASAN 9 .Os .Sh NAME @@ -84,6 +84,12 @@ sysctl/tunable. .Pp The .Nm +runtime in a KASAN-configured kernel can be disabled by +setting the loader tunable +.Sy debug.kasan.disable=1 . +.Pp +The +.Nm runtime works by maintaining a shadow map for the kernel map. There exists a linear mapping between addresses in the kernel map and addresses in the shadow map. From nobody Sat Oct 21 14:47:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPS45j3Sz4y6G0; Sat, 21 Oct 2023 14:47: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 4SCPS455RGz4Mbw; Sat, 21 Oct 2023 14:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoF5h2l0V/FfGK0RKIKS5OintKC/4F/4KrKny4IuHWo=; b=TFGxrjyYeB/45lm8dUsoqjTX2GlNQ2cPzVqqhvs/5bS9Bgovnh94KX6Inz4FKMFw7B+gRx 6844wHsYV3sWz64jyV+8RpxKsIcrjrUYwrvrKcVy7OLkbLl0Jaa6RbDCsnyMNEuJae2K9g liKlyUUMRWXtx7Y37Y6A01+cpa7t6u0Wou1kjKEIB1u4tWe3689+wqQaRmtX7pbEyGjWFc Yd+rKha3FbEwtELLkCKVLt031lLJSsfLicO1oMKPvCfWmHfmSP5PbPGGZLOAliwTSj1Yxy YkWiO+8y4xpO8CLfsQUlfCxAt6aS8wF6syWB7/fkxHpfYsqZhJehOZvLXPvoCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697899636; a=rsa-sha256; cv=none; b=gx/2gYoba90Zb87iOse/JavZPcgo2JUfqS8WY+103m/OxVgSoBDS4yin5GPkil8B7YWO26 u7Oej+vBI1xb9Qha/MT/H3iej08Fj2GyOEZHd6BJJW3B8xxOJ3In2bLVkokr/2Q+67pbb9 Mc0QLsV3LiVeWLJU/3ZzV+IN74gq4DtB2nNO5uuRdU6O60iDRoxim+qy3w+uaTKjHQnePT HUBhIT7xj0Z6JfkrUMtrnk5+TQpyF1DDdK84Oi85+F6VQVSp9FCPrAlusFQbGzF19XqpEb qP3gIkbrQr4r8JW8QLQJoiSt67G65/RKmTJaMLikkq8vB1H5nJx1KeaW7bjhfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697899636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aoF5h2l0V/FfGK0RKIKS5OintKC/4F/4KrKny4IuHWo=; b=pVZ1YxhRCBSkhlSGcYJztnvYWJLOMeVOA6Fhc6laH/PS9IYRyGnxxgL29vuSQaTZ8Orhkk drXyKcYREEwPAZvvJoJg2K30PsOawRqsUIbWwBUZOrU0Xryd3y43IMPX2GGcxPqSlFdrfG rnSo5r4SGAV+WXAIhQAHDcHwpvlavLxg2ii039BkGpk6irBYi7KMNaWkXZ/YwGAz0KS8pV BMz7ZE/PrYMxfAaNvSfrqeJaqa7E9nxzAKZa2TT6bM+m2YNUBtQbZo9/lrfL7IGWRu1yZ1 QEuxAjH9Xhbqj1/s1g5wROYuQ1/crbqvrYEUog40on1Iivban1C8Aa6GgzwUWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPS43s7mz4xh; Sat, 21 Oct 2023 14:47: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 39LElGAD006073; Sat, 21 Oct 2023 14:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LElGli006070; Sat, 21 Oct 2023 14:47:16 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:47:16 GMT Message-Id: <202310211447.39LElGli006070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a72ab19000bd - stable/13 - amd64: Fix two typos of loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a72ab19000bd4b0a0c7ae0b69f8cf92343c73b95 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a72ab19000bd4b0a0c7ae0b69f8cf92343c73b95 commit a72ab19000bd4b0a0c7ae0b69f8cf92343c73b95 Author: Zhenlei Huang AuthorDate: 2023-10-19 15:23:33 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:45:45 +0000 amd64: Fix two typos of loader tunables To match the sysctl MIBs and document entries in security(7). Fixes: 2dec2b4a34b4 amd64: flush L1 data cache on syscall return with an error Fixes: 17edf152e556 Control for Special Register Buffer Data Sampling mitigation Reviewed by: kib MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D42249 (cherry picked from commit afbb8041a0633c97acb51ac895c9ae3cde4fe540) (cherry picked from commit 032a0b44541ffb669a4553105c6f6343ab4e3a67) --- sys/amd64/amd64/machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 145d373b1117..b0b7824c4b4b 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1486,7 +1486,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("hw.spec_store_bypass_disable", &hw_ssb_disable); TUNABLE_INT_FETCH("machdep.mitigations.ssb.disable", &hw_ssb_disable); - TUNABLE_INT_FETCH("machdep.syscall_ret_l1d_flush", + TUNABLE_INT_FETCH("machdep.syscall_ret_flush_l1d", &syscall_ret_l1d_flush_mode); TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); @@ -1494,7 +1494,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); - TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", + TUNABLE_INT_FETCH("machdep.mitigations.rngds.enable", &x86_rngds_mitg_enable); finishidentcpu(); /* Final stage of CPU initialization */ From nobody Sat Oct 21 14:53:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCPbc0j2Nz4y6dx; Sat, 21 Oct 2023 14:53: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 4SCPbb71TDz4N9j; Sat, 21 Oct 2023 14:53:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697900028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LmN58rkB2x76K4itQTIwgICLaP02iqfw1Jn2C45BIU=; b=XCcsBZ2pBxFdAnLeXqkXmcYVmHuAnBcZNydhmo20MbzBvRmCKBoJ8qmzEVszZMIpy5iJss HcpI4rMGiQfajfz2yW/CPUM6xJnROH3IYHEpQ8ohesYnhOYb1At1DcQHt9Dkcptppd1Mnd mwgjikc7Ajyt0VMpzg5G8pyRVZttaGlGGIEgGpascp1droUt3/KqcmTxmHBzBGN9PDMsyd P5Eh1k+rnAWpfFO5Wb7+lV9GPsAtsklplOsyH9e6Ue7D7KewlLV2lbeMVOSKyZE2J9/JK0 0XjQTFughhNf6L21cppcUPnWFgpEK6exlxcnrTmYGNDKUKgs4uUZSL76zHTXrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697900028; a=rsa-sha256; cv=none; b=fiGFfIwcvxVybZbio4Oey+ph8tw00L2ZUFwyJW8HGs0AWrkVQYI9+bjiBz4l5ovuukrskY Z7V8xZeJoPWl+UDgTWEK4s9zxrVRH2f/fPhCLWetktAOaBnsdAVUxnQdd1ZyIRNSYeWfax 0eV/6tl7uHy512pyR4RMwEeelXdreVbl29ciL25LG/A8gd5AaXua5tLBEShkAMq5qm74Cy kaOWu9i30nTPopRnZNPD1JPFOb4HGCoMxe8bFH6WZo/6cnX3RC30rR0VWfdCi7OJ7MtTY+ ds25X9Yvf9IvokBM6DVJjpHSVYIdIckUqfpjvVN4t4r0j67hua7yh3ikljjwAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697900028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LmN58rkB2x76K4itQTIwgICLaP02iqfw1Jn2C45BIU=; b=JC/kucGNIg56VZcm0z4+Tx5TkZ+GFb/aq3BYNA1aMNtCiU9ZOhKyxoKunaPgf2j0RDYVel 7Cpp4pPIksUX/vfw/vB22YdZ8yGDzteoevxnfr0p5+UpFMKGxStD3zQIZXdEwDo3JBOW+a xB3bAl3ZuEDhDcqwpTKKTi0dI7ZcQgAQfn8OigQeu1/xPWJ6b23leDYI/hsnqwaA1imMJl h0zUgb4d2vEgjJP/mEM3X2PzTFmNwQBQ2yNmq1yrQJWNfR/kzVjfVt1TfDqxDjL63jqbNm demkYQENMMuPYUksbjwafTw0Wh9Q9Hw2Bse0j/7bOoIqrS27dVQ68hXxo7QmGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCPbb648Rz521; Sat, 21 Oct 2023 14:53:47 +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 39LErlQk022103; Sat, 21 Oct 2023 14:53:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LErl7T022100; Sat, 21 Oct 2023 14:53:47 GMT (envelope-from git) Date: Sat, 21 Oct 2023 14:53:47 GMT Message-Id: <202310211453.39LErl7T022100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5173f00ae2e6 - stable/12 - amd64: Fix two typos of loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5173f00ae2e6c02b65ec95c428e7b50aafee1e5c Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5173f00ae2e6c02b65ec95c428e7b50aafee1e5c commit 5173f00ae2e6c02b65ec95c428e7b50aafee1e5c Author: Zhenlei Huang AuthorDate: 2023-10-19 15:23:33 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 14:50:51 +0000 amd64: Fix two typos of loader tunables To match the sysctl MIBs and document entries in security(7). Fixes: 2dec2b4a34b4 amd64: flush L1 data cache on syscall return with an error Fixes: 17edf152e556 Control for Special Register Buffer Data Sampling mitigation Reviewed by: kib MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D42249 (cherry picked from commit afbb8041a0633c97acb51ac895c9ae3cde4fe540) (cherry picked from commit 032a0b44541ffb669a4553105c6f6343ab4e3a67) (cherry picked from commit a72ab19000bd4b0a0c7ae0b69f8cf92343c73b95) --- sys/amd64/amd64/machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 1e663382f140..c0d501707bb9 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1797,12 +1797,12 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); TUNABLE_INT_FETCH("hw.spec_store_bypass_disable", &hw_ssb_disable); - TUNABLE_INT_FETCH("machdep.syscall_ret_l1d_flush", + TUNABLE_INT_FETCH("machdep.syscall_ret_flush_l1d", &syscall_ret_l1d_flush_mode); TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); - TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", + TUNABLE_INT_FETCH("machdep.mitigations.rngds.enable", &x86_rngds_mitg_enable); finishidentcpu(); /* Final stage of CPU initialization */ From nobody Sat Oct 21 15:42:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCQgm1mnFz4y91h; Sat, 21 Oct 2023 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 4SCQgm1K4lz4Ryp; Sat, 21 Oct 2023 15:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697902948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vap1AD1zWF4i4A6wc6UbW8TO/YabGwQqHIs9aZB7zvc=; b=SP6rnP6C3j1+tu34Jq65Z9Uyik1Y6BgK9ZmydFOGG8T426/oeAidFi2ijwvasOjG38Hrca +ZR7SMnk7gjyZBvrDHlYlEyGjCR9YswS0sERyBMebTVfaYknXGsBvKaOT3s6RJXH6FZAJm 0YGn8EIg8uZxqEodoVCt6NNtf3yBf06qNOW1CAWy5ubnKh78dyHjISF+a1+LQhlpgsFfF5 0nUjzNmauf8reMH8icD3WtBcCNb0xltwDWUszxc51hZVK8QhozDFD6fjrESZgFa3QhDWQw 3bumkPwvnBlhLfNKWj8mb0alIjpn7ZAc5D0xx1CQGBfqDCjAi8G821ltdFNimA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697902948; a=rsa-sha256; cv=none; b=As/lzpT9P97JdsbkRjrbxaWAiJZFEkDu6jS+wzY5v8EBp+oByZY4j9r9c9lHTY2ZJVITyw 6QUmEX0w/ymvcCsrjMY9y4DnBXSgsnrsp0iELGOHa0ociTBKqLT+5HAy6TaF5nahaRzeor OBnyI/T2UYoXg+zwImaNDIA6LeeyZikDEt04F+lkuPAAZ1cR6dR00tJpGwpto7gEMol2pW xUJvnoVwz0DctugALmX4ASE2Kd2IZth2nZ+t/W8atLw/ziSMJg4D0DBEfELOlsTq6sFoLZ xLDmkHqqAoUNxfO6AR7BRDMhXqrxIorkOHA08ekO3gmA8iCMdkNfQlcmk7HtDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697902948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vap1AD1zWF4i4A6wc6UbW8TO/YabGwQqHIs9aZB7zvc=; b=MtjChD6QN8hWRFF5ptrxu2UtPc/PhKv3Pmqk14of/PUdqyqRjqcSPAvWGnEy3b5sHiTFau loFyoMSlZ34+LUFa33MRe6UAiHiPJb4iJqNGdjMkX7zFyw9+0CpDgNxzu4jPuWIY6+o3mU Vh58AVs1LOUNu4ZvMRFiJgj3RJTZrcv3XIvTkdQZ5ifOs6Qdm4+ABA6S2uffp6ndJsMrvR itpXT2WmVA/bYN5GNnjkXBPKK5pBOVcDmPDSoOxLRh9G4jTtTsu7Q75RGF8+cAte8Rn8Yp jTDg3eCVRngsK2VmQDh1MxOdGkV5EWvbqI1IjoWDtmmid/+og96pNbwAiywabg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCQgm0MvTz6ZP; Sat, 21 Oct 2023 15:42: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 39LFgRJg004727; Sat, 21 Oct 2023 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 39LFgR3U004724; Sat, 21 Oct 2023 15:42:27 GMT (envelope-from git) Date: Sat, 21 Oct 2023 15:42:27 GMT Message-Id: <202310211542.39LFgR3U004724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: af20b2201669 - stable/14 - Fix intermittency in the sys.fs.fusefs.mknod.main test List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af20b2201669ea493de58ba7a5e5ff1138b80cd7 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=af20b2201669ea493de58ba7a5e5ff1138b80cd7 commit af20b2201669ea493de58ba7a5e5ff1138b80cd7 Author: Alan Somers AuthorDate: 2023-10-06 19:46:42 +0000 Commit: Alan Somers CommitDate: 2023-10-21 15:14:32 +0000 Fix intermittency in the sys.fs.fusefs.mknod.main test In the Mknod.parent_inode test case, the kernel sends an extra FUSE_FORGET message. But because it gets sent asynchronously with the failing syscall, it doesn't always get received before the test ends. So we never setup an expectation for it. And 90+% of the time the test would exit successfully. Fix the intermittency by always waiting to receive the FUSE_FORGET message. Sponsored by: Axcient (cherry picked from commit 86885b18689889e9b9142fd31d8c67f21334ba32) Fix intermittency in the sys.fs.fusefs.symlink.main test This change is identical to 86885b18689 but for symlink instead of mknod. The kernel sends a FUSE_FORGET asynchronously with the final syscall. The lack of an expectation caused this test to occasionally fail. Also, remove a sleep that accidentally snuck into a different test. Sponsored by: Axcient (cherry picked from commit 8399d764c929a4b2fa98dbfae0ca7359810e4668) --- tests/sys/fs/fusefs/mkdir.cc | 1 - tests/sys/fs/fusefs/mknod.cc | 7 +++++++ tests/sys/fs/fusefs/symlink.cc | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mkdir.cc b/tests/sys/fs/fusefs/mkdir.cc index 48453ff8bb8a..f020feb94ed8 100644 --- a/tests/sys/fs/fusefs/mkdir.cc +++ b/tests/sys/fs/fusefs/mkdir.cc @@ -241,7 +241,6 @@ TEST_F(Mkdir, parent_inode) ASSERT_EQ(-1, mkdir(FULLPATH, mode)); ASSERT_EQ(EIO, errno); - usleep(100000); } TEST_F(Mkdir_7_8, ok) diff --git a/tests/sys/fs/fusefs/mknod.cc b/tests/sys/fs/fusefs/mknod.cc index 223d38f8acb1..1fb855f44f29 100644 --- a/tests/sys/fs/fusefs/mknod.cc +++ b/tests/sys/fs/fusefs/mknod.cc @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include } #include "mockfs.hh" @@ -255,14 +256,18 @@ TEST_F(Mknod, parent_inode) const char RELPATH[] = "some_node"; mode_t mode = S_IFSOCK | 0755; struct sockaddr_un sa; + sem_t sem; int fd; dev_t rdev = -1; /* Really it's a don't care */ uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_mknod(ino, RELPATH, ino, mode, rdev); + expect_forget(ino, 1, &sem); fd = socket(AF_UNIX, SOCK_STREAM, 0); ASSERT_LE(0, fd) << strerror(errno); @@ -273,6 +278,8 @@ TEST_F(Mknod, parent_inode) ASSERT_EQ(EIO, errno); leak(fd); + sem_wait(&sem); + sem_destroy(&sem); } /* diff --git a/tests/sys/fs/fusefs/symlink.cc b/tests/sys/fs/fusefs/symlink.cc index 19286a446fc3..bd355497a8bd 100644 --- a/tests/sys/fs/fusefs/symlink.cc +++ b/tests/sys/fs/fusefs/symlink.cc @@ -29,6 +29,7 @@ */ extern "C" { +#include #include } @@ -174,15 +175,22 @@ TEST_F(Symlink, parent_ino) const char PPATH[] = "parent"; const char RELPATH[] = "src"; const char dst[] = "dst"; + sem_t sem; const uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_symlink(ino, dst, RELPATH); + expect_forget(ino, 1, &sem); EXPECT_EQ(-1, symlink(dst, FULLPATH)); EXPECT_EQ(EIO, errno); + + sem_wait(&sem); + sem_destroy(&sem); } TEST_F(Symlink_7_8, ok)