From nobody Sun Sep 17 08:22: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 4RpLWL324Tz4t04r; Sun, 17 Sep 2023 08:22: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 4RpLWL2CsPz3gmH; Sun, 17 Sep 2023 08:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694938926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBYDMeEiw4YB6xO2C6zHOCmP39+4N4wAfzKZafKj5sI=; b=r3iK9OBPDd2sznxm5lq/qFH2QB4nDCjEiA4IRQyF5BxTQ6K2T99HIuLBGw1n/DsC98IHx8 PGGH4BTzDG0vcKCnL9KPkCM7ROHiumuYzMCZLOPDtJjDxE8xZ9ORBokuZ0o5jaio4lMj01 BU4/l21W5bPnzI0jSCnIjPcR8zg8qAAxKL8ka/jNED2YinfPqGgTRvc5uJrO9zgmQPeQH7 BeKplKqdjOczKOD5C6jG8WpKTOznOeWq7Avi5HJ2zm722OzeKi1E+w4MYMZr6nQNHyy89Q Gz0ciUs8ygiJ2TI6vM134oKF8HJ8j7MalRCzSCFQTMbkOIJYywoMbFilKvStoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694938926; a=rsa-sha256; cv=none; b=BEHvNy5TEnDPim3cs41/63Mk5D/wbT2nLES7SgiGu9iqccrg4lB8MG5UKU/oLt80Gy/3LK aAWrf/3kgdxNf7J0pheIimKgejhLDameS0e/E4iOclRV1o0QXs81SiPmycCEjZq7/nLXew yIvlVFYLL6PnjTCQ69vMN9mNrpF3jUcpy0GBHqwdH5P0nzhpDuYS9gHhyhXIvg+B01GJY8 6hiDevr/yJMRNSUSZomz/93WJ/zL7bmV41zP1Tvma+GJmpS0jLkh6YVrua0vTNyMJEwsd5 +UxEEKGYifmKBapNVCTBjG0qL0fdQfb/uqfH1Edhw0Wc2kHU0SBgc41bu9pRiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694938926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBYDMeEiw4YB6xO2C6zHOCmP39+4N4wAfzKZafKj5sI=; b=gJTxAFbD91wQvrOJrOZY/tNxvK23ONhqTcskZjUGSqZ6sd62ID+De6Q/qLBs/c1HMJi/tK TJ14I8cwPBA/QVpuhJ7siEK/OtPKlZYSJx7M6ejKcICoC8PsLQ8wr80pik9TWBmnNQMNOr jdEQYwpfv6IYQu7uKkc8tewcxBFPmPbKz2NZZg7UKfLxDKFZinwPz3JdM/ycLr0XbGo5IA 89ApFe+JRzEIUx1Xz1o5ke0ZqNc/jw/2FK4fVIfLsGW104G6oUA3QEWbyIzW+lwchwPlka 1WAhKUv+YtyfEAiJ4YMm/rwulvmuTSFPuhjnrIVkujGTecF+4aL6tWPEGEyb/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 4RpLWL1Hp8zhSf; Sun, 17 Sep 2023 08:22: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 38H8M605008516; Sun, 17 Sep 2023 08:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38H8M6fE008513; Sun, 17 Sep 2023 08:22:06 GMT (envelope-from git) Date: Sun, 17 Sep 2023 08:22:06 GMT Message-Id: <202309170822.38H8M6fE008513@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: dbd445bbd3d7 - stable/13 - msi: handle error from BUS_REMAP_INTR in msi_assign_cpu List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: dbd445bbd3d7d5c50914bac20d6595ed344e4c5e Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbd445bbd3d7d5c50914bac20d6595ed344e4c5e commit dbd445bbd3d7d5c50914bac20d6595ed344e4c5e Author: Ed Maste AuthorDate: 2023-08-14 16:56:12 +0000 Commit: Ed Maste CommitDate: 2023-09-17 07:18:11 +0000 msi: handle error from BUS_REMAP_INTR in msi_assign_cpu Previously errors from BUS_REMAP_INTR were silently ignored, and we ended up with non-functional interrupts. Now we allocate and enable new vectors, but postpone assignment of new APIC IDs and vectors where we can, until after BUS_REMAP_INTR is successful. We then disable and free the old vectors. If BUS_REMAP_INTR fails we restore the old configuration, and disable and free the new, unused vectors. Thanks to AMD for providing hardware (with APIC IDs above 255) for testing. Reviewed by: jhb MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41455 (cherry picked from commit fa5f94140a83b4704c654ababd67cd9addb7cd29) --- sys/x86/x86/msi.c | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c index 8751c621a5e1..7f4d87c09453 100644 --- a/sys/x86/x86/msi.c +++ b/sys/x86/x86/msi.c @@ -244,7 +244,7 @@ msi_assign_cpu(struct intsrc *isrc, u_int apic_id) struct msi_intsrc *sib, *msi = (struct msi_intsrc *)isrc; int old_vector; u_int old_id; - int i, vector; + int error, i, vector; /* * Only allow CPUs to be assigned to the first message for an @@ -274,31 +274,48 @@ msi_assign_cpu(struct intsrc *isrc, u_int apic_id) if (vector == 0) return (ENOSPC); + /* Must be set before BUS_REMAP_INTR as it may call back into MSI. */ msi->msi_cpu = apic_id; msi->msi_vector = vector; if (msi->msi_intsrc.is_handlers > 0) apic_enable_vector(msi->msi_cpu, msi->msi_vector); - if (bootverbose) - printf("msi: Assigning %s IRQ %d to local APIC %u vector %u\n", - msi->msi_msix ? "MSI-X" : "MSI", msi->msi_irq, - msi->msi_cpu, msi->msi_vector); for (i = 1; i < msi->msi_count; i++) { sib = (struct msi_intsrc *)intr_lookup_source(msi->msi_irqs[i]); - sib->msi_cpu = apic_id; - sib->msi_vector = vector + i; if (sib->msi_intsrc.is_handlers > 0) - apic_enable_vector(sib->msi_cpu, sib->msi_vector); - if (bootverbose) - printf( - "msi: Assigning MSI IRQ %d to local APIC %u vector %u\n", - sib->msi_irq, sib->msi_cpu, sib->msi_vector); + apic_enable_vector(apic_id, vector + i); } - BUS_REMAP_INTR(device_get_parent(msi->msi_dev), msi->msi_dev, + error = BUS_REMAP_INTR(device_get_parent(msi->msi_dev), msi->msi_dev, msi->msi_irq); + if (error == 0) { + if (bootverbose) { + printf("msi: Assigning %s IRQ %d to local APIC %u vector %u\n", + msi->msi_msix ? "MSI-X" : "MSI", msi->msi_irq, + msi->msi_cpu, msi->msi_vector); + } + for (i = 1; i < msi->msi_count; i++) { + sib = (struct msi_intsrc *)intr_lookup_source( + msi->msi_irqs[i]); + sib->msi_cpu = apic_id; + sib->msi_vector = vector + i; + if (bootverbose) + printf("msi: Assigning MSI IRQ %d to local APIC %u vector %u\n", + sib->msi_irq, sib->msi_cpu, + sib->msi_vector); + } + } else { + device_printf(msi->msi_dev, + "remap irq %u to APIC ID %u failed (error %d)\n", + msi->msi_irq, apic_id, error); + msi->msi_cpu = old_id; + msi->msi_vector = old_vector; + old_id = apic_id; + old_vector = vector; + } /* * Free the old vector after the new one is established. This is done - * to prevent races where we could miss an interrupt. + * to prevent races where we could miss an interrupt. If BUS_REMAP_INTR + * failed then we disable and free the new, unused vector(s). */ if (msi->msi_intsrc.is_handlers > 0) apic_disable_vector(old_id, old_vector); @@ -309,7 +326,7 @@ msi_assign_cpu(struct intsrc *isrc, u_int apic_id) apic_disable_vector(old_id, old_vector + i); apic_free_vector(old_id, old_vector + i, msi->msi_irqs[i]); } - return (0); + return (error); } void From nobody Sun Sep 17 14:29: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 4RpVgg0HKxz4svLF; Sun, 17 Sep 2023 14:29: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 4RpVgf6xtsz3cKB; Sun, 17 Sep 2023 14:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694960991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h44VBzjU1/UTP609Bvbk9LlD1OwFHZ+B8pRcFdIJt0g=; b=mn24yPvr9yo7FxgJNYaavq8chaHX/+/JembVW7KW3xPREYMAhBy3xdLrPzA51TIdzvlveo PUh4D+mmgELE780ZQwk4oRODtBIR3FmpO9HY+uHWCJXLdA1aMAal3PGR37UqjdXEkoQimg OQBnIi4AdHyjXw6MqETj9jYP5OpfkqKxAKOFyrvrjVbDo2ztIi4VnFUu3fvjgPzKm8tsmx t58TzuuMYNWQmV879ZPkb+b3ZbcI2ndBnVtoO9aNdHsMAVTn66PjgMoOZowUGTZh+xJEhg CBEZVCaft3X3RPKTLRf29X1KwjxszM1fHEkySTmChbQO+mZ9vppYePKCD/n8Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694960991; a=rsa-sha256; cv=none; b=HhEK8qp25TCbSEZLNiEa+/7te7Ze17alkoAnGGLA3AD7IDN0ZC4Mm+vtTPqotuuoJX3QRs k/554zIEA0tr/TspltjA78JEZ0nXl0/mPW6c72kc8sPNiEJNkbKjj5djacNNV4lVXbOGQB 1gkn6TOXw1fPefq0Hjza0Hvq4K2coFNDI6BiaBM+mHBT3V0ylRNAizQGXj0vXR1eMMdEAJ /wdmKvxCcIJ45GiUEfM1QkpzAAUFd7wG5Nz3VFIScRPJOhD+QlePytVqQItZZKnoKePihA p1xKA1Ni7RblrTQuOiy7qCQgsZL2KeUcwhajTjKcUE5D/56B516Eig6dMdAUVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694960991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h44VBzjU1/UTP609Bvbk9LlD1OwFHZ+B8pRcFdIJt0g=; b=kY1wpzDc8jNnXvyHBN+ZWunKdQbLap4EabjEd16qpAQLJRnjC0wFxauTgQEq6yn6a6NFEh X41py9+Pp5GPPkquUoJaMd2aG7docXVUKvyNaTJHoBT+ESx/47jwOJj8/wTAaYYuAZRZ3N 5m0HlpBMdbD3dsNbgfrj2CiIUT57egCCJZeTbVhXRQLdL0VExF0FEOHTK06ndN4+OI4Zdw J8ZbWTbjrG6FUfzZgNHc7xdBQMke/SkdZJgnDZYxRZCsfmWkKzJIC1ydpm0RH/3cEXfJnT 2+/8rsRm4nv5uWxL9QukfkfTPNCiLtk4akvf1E7DOOxW7xG8GBUBb208/3bpPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVgf62WBzs5D; Sun, 17 Sep 2023 14:29: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 38HEToVC006022; Sun, 17 Sep 2023 14:29:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HETowg006019; Sun, 17 Sep 2023 14:29:50 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:29:50 GMT Message-Id: <202309171429.38HETowg006019@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: 7965d4d9e326 - stable/13 - net/bpf: Fix writing of buffer bigger than PAGESIZE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 7965d4d9e326373b4669e451d3bd2a7d840c4b5b Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7965d4d9e326373b4669e451d3bd2a7d840c4b5b commit 7965d4d9e326373b4669e451d3bd2a7d840c4b5b Author: Florian Florensa AuthorDate: 2023-09-17 14:16:07 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:17:51 +0000 net/bpf: Fix writing of buffer bigger than PAGESIZE When allocating the mbuf we used m_get2 which fails if len is superior to MJUMPAGESIZE, if its the case, use m_getjcl instead. Reviewed by: kp@ PR: 205164 Pull Request: https://github.com/freebsd/freebsd-src/pull/131 (cherry picked from commit f13da24715a75ce0fdac31062866877d980aa908) --- sys/net/bpf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 6656b4aca980..20c26892ce7a 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -641,7 +641,15 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); + /* Allocate a mbuf for our write, since m_get2 fails if len >= to MJUMPAGESIZE, use m_getjcl for bigger buffers */ + if (len < MJUMPAGESIZE) + m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); + else if (len <= MJUM9BYTES) + m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM9BYTES); + else if (len <= MJUM16BYTES) + m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM16BYTES); + else + m = NULL; if (m == NULL) return (EIO); m->m_pkthdr.len = m->m_len = len; From nobody Sun Sep 17 14:42: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 4RpVy46hvnz4sx8w; Sun, 17 Sep 2023 14:42: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 4RpVy46GPwz3f5Z; Sun, 17 Sep 2023 14:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPlKYxq0ESWd9p+D9q3yJy+FG7hCFml7pkxZNwHQFOY=; b=t+VmDjn+9OhPpgxAZmNHmQneSYOH3sjwShAXE4zvJ27J7r7EDmDQG9v3M38Yl3/1pd+PJ6 a7AOk6Jfku3fnfTS83HMVj4FXXUPyxaL9UlYn2G9UFF/p0mBXda75P0DZJNoe36fEt4kr5 9ohWM+Svv1xLSDNb58qD0ZyFfLbJLUtKFk7jIpEwcudUqwV1kU1NKeW+6fwWM9qHNW7Jhb 5fi603ukLdObSX5nHkXizoLN1h+QWrRAW5ig1lzUxmwGXHvnK3hxKLXyvwZgqbp7GJHH69 0rvf30Y8MKiW9TrgH9ky03WqVe9Uv4KOnIlBwyDlHZjXD1J2ungIT1g+g6hh5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961740; a=rsa-sha256; cv=none; b=uwhHwdKa+AmpA+AEi82xbzhzTwKdSqLxKfHu+l6opV1n7MlR+yC3Ec3YfY3gXSgoBhYRPj OXeTt/0qFNmsQl91ze0Yjex7NuOIJ95/0J5N1ifA4kocf0iN7Q4Ll7YZ67FSfWuxDKS8y4 C07bfDo2eJRKJjCyffVueIlwc1iATQ3IkaFA2jc6rUj+STokRGbT6Cd4StAjXL48WzJWLn 0kesDZT2Uq4aUMcxXWI5CvK8g8AkbLhdV7iL7+8UdKMlxLi52cIJzg1MGGpk3RJMzWnUcT 0RcxjIeYR4aQewLxCLUm+B5Fa6p9cJQOrMdNogm0fcK3ugEFxi0llg1AId0tdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPlKYxq0ESWd9p+D9q3yJy+FG7hCFml7pkxZNwHQFOY=; b=kJXDLP/IIRrW/pcwJ/XBWkv7WaryiWAxSBYA/6tcTR9VrWXxg9ULCWoxoCRmFAWKaTiCHw 2Dz0YnGTYRl2g47QWOvZO4IpSUKN0E4OBjygZ7x22SafYUbQXQRxyqc1sX2DabtjMogXO9 Pti1U1+iA/dW09EyvtvxXl2cGNlGLFtaNqgnmZYwl7Ger7cn8Aiwt1/PfFYDXAXV4ZWfoc YDUFe2W3z5DuW/iZtJLJW+guMD3PMtE4h1JafwAc77rCk3jsw5OQxpslfFH0sJNNuhbQVe T7g8X38EQhPFGl1PK5tXrozU2fgM00YcXeLwNYoWB2Czzrg06XMQM+MRqyzHwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVy45M4jzrrq; Sun, 17 Sep 2023 14:42: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 38HEgKEP036333; Sun, 17 Sep 2023 14:42:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgKFt036330; Sun, 17 Sep 2023 14:42:20 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:20 GMT Message-Id: <202309171442.38HEgKFt036330@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: 8c496b26641e - stable/14 - timerfd: fix up a memory leak and missing locking List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 8c496b26641e3d86b0c9db0ed2b4598093df6d5a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8c496b26641e3d86b0c9db0ed2b4598093df6d5a commit 8c496b26641e3d86b0c9db0ed2b4598093df6d5a Author: Mateusz Guzik AuthorDate: 2023-08-25 14:21:39 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:40 +0000 timerfd: fix up a memory leak and missing locking timerfd01 from ltp passes (and some other don't), but none of the tests crash the kernel. This is a bare minimum patch to fix up the immediate regression. Reported by: yasu (cherry picked from commit 02f534b57f84d6f4f97c337b05b383c8b3aaf18c) Approved by: re (cperciva@) --- sys/kern/sys_timerfd.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 6948fa059b8c..2bf2a05c443c 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,11 @@ #endif static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); -static LIST_HEAD(, timerfd) timerfd_head; + +static struct sx timerfd_list_lock; +static LIST_HEAD(, timerfd) timerfd_list; +SX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock"); + static struct unrhdr64 tfdino_unr; #define TFD_NOJUMP 0 /* Realtime clock has not jumped. */ @@ -125,7 +130,8 @@ timerfd_jumped(void) struct timespec boottime, diff; timerfd_getboottime(&boottime); - LIST_FOREACH(tfd, &timerfd_head, entry) { + sx_xlock(&timerfd_list_lock); + LIST_FOREACH(tfd, &timerfd_list, entry) { mtx_lock(&tfd->tfd_lock); if (tfd->tfd_clockid != CLOCK_REALTIME || (tfd->tfd_timflags & TFD_TIMER_ABSTIME) == 0 || @@ -160,6 +166,7 @@ timerfd_jumped(void) tfd->tfd_boottim = boottime; mtx_unlock(&tfd->tfd_lock); } + sx_xunlock(&timerfd_list_lock); } static int @@ -314,11 +321,14 @@ timerfd_close(struct file *fp, struct thread *td) { struct timerfd *tfd = fp->f_data; + sx_xlock(&timerfd_list_lock); + LIST_REMOVE(tfd, entry); + sx_xunlock(&timerfd_list_lock); + callout_drain(&tfd->tfd_callout); seldrain(&tfd->tfd_sel); knlist_destroy(&tfd->tfd_sel.si_note); mtx_destroy(&tfd->tfd_lock); - LIST_REMOVE(tfd, entry); free(tfd, M_TIMERFD); fp->f_ops = &badfileops; @@ -420,9 +430,11 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) if ((flags & TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; + error = falloc(td, &fp, &fd, fflags); + if (error != 0) + return (error); + tfd = malloc(sizeof(*tfd), M_TIMERFD, M_WAITOK | M_ZERO); - if (tfd == NULL) - return (ENOMEM); tfd->tfd_clockid = (clockid_t)clockid; tfd->tfd_flags = flags; tfd->tfd_ino = alloc_unr64(&tfdino_unr); @@ -431,16 +443,15 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); timerfd_getboottime(&tfd->tfd_boottim); getnanotime(&tfd->tfd_birthtim); - LIST_INSERT_HEAD(&timerfd_head, tfd, entry); + sx_xlock(&timerfd_list_lock); + LIST_INSERT_HEAD(&timerfd_list, tfd, entry); + sx_xunlock(&timerfd_list_lock); - error = falloc(td, &fp, &fd, fflags); - if (error != 0) - return (error); fflags = FREAD; if ((flags & TFD_NONBLOCK) != 0) fflags |= FNONBLOCK; - finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); + fdrop(fp, td); td->td_retval[0] = fd; From nobody Sun Sep 17 14:42: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 4RpVy60nw9z4sxQP; Sun, 17 Sep 2023 14:42: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 4RpVy60Km8z3f62; Sun, 17 Sep 2023 14:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwyraH1mMSr/snEhWIs8IPtN00brjkXIlVwnDdf1kgw=; b=BE9BgjxG6wCWEAYfW4oqKYWckxA/10Nlzb6FQoiUPlJlL0TYl+6z6gdanHVKBkHS+H3rxp z1gVAGjBZCkfBlV2YtR+ebwfG/uvJ9D7yVFEvHpbZSDlfBYVxzHmCs1DZFr0O+18laclSP AvHJEIEkesz46hdbdvuiXO/pdgA1hDYwk/DHx9M9a7jK6PRdmKrnHz+sdI6iI8HCvlp7EW MGFl99Vta/FDWzlDq99Bk0sYLeEAGX5CTMhR3A7lfBXVUcy5FvoIKoEEB/Ih7WlvCbLHt7 8bqUmxsKlU80OZNpnWAjkrDc194qByIegpoPC95WywyoVwV2r0Bqz2gDVNd+Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961742; a=rsa-sha256; cv=none; b=FAnfwDGJ5vIC7gX0p+SNhn0J13GNlUScjlnqIzGy+5M1hG5U8r6to/2QLlvRRea6A8RYL7 PCgID0F5Mb5vh8kpjbSJOcqeH6km02XP2WVlJiXvdi2kZFoOOMHeEJlRUQQoSPFNesJM8U 0ODIiW39AhvjnRSKwHduiGYA7Fy2yEWjc3BLL95oiGRFqYhWPbQrRKR0t2lBqrkx+elzIR HKlJ4KNX4ivJzVFa0+qRLbCfEdHT8osywxnVUXI1RhtICpx8l87BnlGi5pzxwVS29UqL1R SponHBFBP+dt1juwExSBk1Rc3mU9UqGQSAqTMGzVQdALhTolnsjA6t+s6+4QVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwyraH1mMSr/snEhWIs8IPtN00brjkXIlVwnDdf1kgw=; b=Gs4f3SwX92G8psJU6vQW1dT0+2LkKiuMsKYaOaixabv31k4CXdzIu2JmR/g24OPK9Ml1d6 upzecYBAUFR1G04nM9yx1WrMqfvSN3CSYFhz4ECfP+O6DowV86192CuJwo5O201wVYhfVu Gre3Sm/ba50lljkkqPJpekCDQ+qzOhyQcznpNFlDiuTxFGK2SjOddG8YdXEISS05BTJpqk rx73z5yggAc7Lu581N4CMHnPeRPVcMU6Cva171+5moZEMxPIdNo2PdLT0tNa1754MSgujB 6zbKLTJUxmBVysv22KZoxfU6MOuRHpngZFL2F/Y7+APv87WIKJY2D2fT+fYYMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVy56L3Nzrrs; Sun, 17 Sep 2023 14:42: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 38HEgLm7036380; Sun, 17 Sep 2023 14:42:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgLdI036377; Sun, 17 Sep 2023 14:42:21 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:21 GMT Message-Id: <202309171442.38HEgLdI036377@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: fc0c24482f11 - stable/14 - timerfd: compute fflags before calling falloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: fc0c24482f11c403480c5219810a27d8591a8fb6 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc0c24482f11c403480c5219810a27d8591a8fb6 commit fc0c24482f11c403480c5219810a27d8591a8fb6 Author: Mateusz Guzik AuthorDate: 2023-08-25 15:09:21 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:40 +0000 timerfd: compute fflags before calling falloc While here dodge list locking in timerfd_adjust if empty. (cherry picked from commit 5eab523053db79b4bd4f926c7d7ac04444d9c1da) Approved by: re (cperciva@) --- sys/kern/sys_timerfd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 2bf2a05c443c..c8b45a926b02 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -129,6 +129,9 @@ timerfd_jumped(void) struct timerfd *tfd; struct timespec boottime, diff; + if (LIST_EMPTY(&timerfd_list)) + return; + timerfd_getboottime(&boottime); sx_xlock(&timerfd_list_lock); LIST_FOREACH(tfd, &timerfd_list, entry) { @@ -418,7 +421,7 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) { struct file *fp; struct timerfd *tfd; - int error, fd, fflags = 0; + int error, fd, fflags; AUDIT_ARG_VALUE(clockid); AUDIT_ARG_FFLAGS(flags); @@ -427,8 +430,12 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) return (EINVAL); if ((flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) != 0) return (EINVAL); + + fflags = FREAD; if ((flags & TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; + if ((flags & TFD_NONBLOCK) != 0) + fflags |= FNONBLOCK; error = falloc(td, &fp, &fd, fflags); if (error != 0) @@ -447,9 +454,6 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) LIST_INSERT_HEAD(&timerfd_list, tfd, entry); sx_xunlock(&timerfd_list_lock); - fflags = FREAD; - if ((flags & TFD_NONBLOCK) != 0) - fflags |= FNONBLOCK; finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); fdrop(fp, td); From nobody Sun Sep 17 14:42: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 4RpVy72vKbz4sxMr; Sun, 17 Sep 2023 14:42: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 4RpVy70zcKz3dxr; Sun, 17 Sep 2023 14:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/Tl9vviQploEcuR+aZe1VCQhNTumgvuiHLYl4qqRQM=; b=SDDNsE+JPo6/uDHe+UTzl2mVhpSJAAiTnZGXgxRQ4ChSdXuItcaaqlOa5ddXkrpB/2vsO3 kyNieCICtpB6o7WPxhW0cEXwvbd+ytRqr/J4bLCxNmUn9NKl8JC2AscG5b8xI3PU+/32wM PBnGMOLsMlomQdbFFkO8vFk0a59sUuhPa68YjkMHEJj2P7k/ktjtPPWAN2BUecxqcSUt7f wk6/qkuOiIKsFXr0I3W9wBiaCkskAgneBXTPCpZPERaA0YNJOQF0ojmDz70UA4EEplSHib 4epEhBAQvNLqqNqz9Fxygbn90OPCt3sGI5tY3L+WV68fu9POhHEaRZZMWSuFZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961743; a=rsa-sha256; cv=none; b=lIUtVwF7bPIg8jsxIfM17OQ38B7AkO1GMuBcSwR0/wb6b/bEa87mpcCZb9W5IgN7IhnV7B ocXNe6gFRquFzeFVi42FvS4DRj269TwGAeInfW3tIqnjvvUJB7vv5AGuxsP2qyDnH8v8Co SG2PeTxCu4o+kDLdSBecH/bH3oVwfDm1hLbUwrYLY1dl45ZRTkXVmUqU1HArOQ50tjUbl0 DbT55spVRctW5Q66qqn+r00S+sfJjNtI/Tn9tsw193nyrSRCa5tIahYWbFNICTVhhI6XXG nGIsWpw9cgBwHhBRVuIqTFnMLhUpwDvf2Dyn7JfmO9zFYsNUjY7jgZAFQPoq4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/Tl9vviQploEcuR+aZe1VCQhNTumgvuiHLYl4qqRQM=; b=LU//y8Vopfvj6bJnVm+WYGcrBNgtltKmcrobsb26k288H1mxwpo0oCS1QI5ul8HuV8JlK/ ODhumDFe5ChCM/GElk4jdsjc7tYb6pOxqUlf1heDsgF5pw32/PxZaK7/0GDfrrG/GLW1vn SCTbryf2djxJyn6XSpBB75JrorgpwmfW3tEj4sGVnbAZZRQlLouWpvd/XjZ7VUVWASHaMy 1ymVeo4xx6U1zeTaGHfXbE2TL46BXnIIuhecwB6uKO4+gkaSxOA0w4UaylTWDcXMIaqcAJ T0La7w8eYpOFvcuuHIYhCcMuinBXHh0voxjZB3cs9lVf3cFkW5sXWgbfBRmGmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVy704wFzspb; Sun, 17 Sep 2023 14:42: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 38HEgM98036433; Sun, 17 Sep 2023 14:42:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgM0T036430; Sun, 17 Sep 2023 14:42:22 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:22 GMT Message-Id: <202309171442.38HEgM0T036430@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: 67e1423099ab - stable/14 - smartpqi: Fix build issues highlighted by gcc12 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 67e1423099ab55de9d3b18a4ad54b1c623383d42 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67e1423099ab55de9d3b18a4ad54b1c623383d42 commit 67e1423099ab55de9d3b18a4ad54b1c623383d42 Author: Warner Losh AuthorDate: 2023-08-25 15:45:28 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:40 +0000 smartpqi: Fix build issues highlighted by gcc12 Make inline functions defined in a header file as static inline. Mark inline functions used only in the compilation unit they are defined in as merely static (the compiler can figure out it these days). Sponsored by: Netflix (cherry picked from commit 2f06449d64298fe508e3c585b45effd69a72d696) Approved by: re (cperciva@) --- sys/dev/smartpqi/smartpqi_helper.c | 12 ------------ sys/dev/smartpqi/smartpqi_helper.h | 8 ++++---- sys/dev/smartpqi/smartpqi_prototypes.h | 4 ---- sys/dev/smartpqi/smartpqi_request.c | 6 +++--- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_helper.c b/sys/dev/smartpqi/smartpqi_helper.c index 68f105001fa0..741ac0a05a06 100644 --- a/sys/dev/smartpqi/smartpqi_helper.c +++ b/sys/dev/smartpqi/smartpqi_helper.c @@ -416,18 +416,6 @@ check_device_pending_commands_to_complete(pqisrc_softstate_t *softs, pqi_scsi_de } #endif -extern inline uint64_t -pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline uint64_t -pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline void -pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline uint64_t -pqisrc_read_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - void pqisrc_wait_for_device_commands_to_complete(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { diff --git a/sys/dev/smartpqi/smartpqi_helper.h b/sys/dev/smartpqi/smartpqi_helper.h index cc7030de74ad..507caeb9b0b6 100644 --- a/sys/dev/smartpqi/smartpqi_helper.h +++ b/sys/dev/smartpqi/smartpqi_helper.h @@ -28,7 +28,7 @@ #define _PQI_HELPER_H -inline uint64_t +static inline uint64_t pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -37,7 +37,7 @@ pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *dev #endif } -inline uint64_t +static inline uint64_t pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -46,7 +46,7 @@ pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *de #endif } -inline void +static inline void pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -55,7 +55,7 @@ pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) #endif } -inline uint64_t +static inline uint64_t pqisrc_read_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER diff --git a/sys/dev/smartpqi/smartpqi_prototypes.h b/sys/dev/smartpqi/smartpqi_prototypes.h index 8eabe5c47cf4..a10e5031d85e 100644 --- a/sys/dev/smartpqi/smartpqi_prototypes.h +++ b/sys/dev/smartpqi/smartpqi_prototypes.h @@ -167,10 +167,6 @@ int pqisrc_send_tmf(pqisrc_softstate_t *, pqi_scsi_dev_t *, rcb_t *, rcb_t *, int); int pqisrc_write_current_time_to_host_wellness(pqisrc_softstate_t *softs); int pqisrc_write_driver_version_to_host_wellness(pqisrc_softstate_t *softs); -extern inline void pqisrc_aio_build_cdb(aio_req_locator_t *, uint32_t, - rcb_t *, uint8_t *); -extern inline boolean_t pqisrc_aio_req_too_big(pqisrc_softstate_t *, pqi_scsi_dev_t *, - rcb_t *, aio_req_locator_t *, uint32_t); void pqisrc_build_aio_common(pqisrc_softstate_t *, pqi_aio_req_t *, rcb_t *, uint32_t); void pqisrc_build_aio_R1_write(pqisrc_softstate_t *, diff --git a/sys/dev/smartpqi/smartpqi_request.c b/sys/dev/smartpqi/smartpqi_request.c index 246ab891126d..1c0bbc2a1db5 100644 --- a/sys/dev/smartpqi/smartpqi_request.c +++ b/sys/dev/smartpqi/smartpqi_request.c @@ -1180,7 +1180,7 @@ fill_lba_for_scsi_rw(pqisrc_softstate_t *softs, uint8_t *cdb, aio_req_locator_t /* determine whether writes to certain types of RAID are supported. */ -inline boolean_t +static boolean_t pqisrc_is_supported_write(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { @@ -1492,7 +1492,7 @@ pqisrc_handle_blk_size_diffs(aio_req_locator_t *l) * handle based on dev type, Raid level, and encryption status. * TODO: make limits dynamic when this becomes possible. */ -inline boolean_t +static boolean_t pqisrc_aio_req_too_big(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, rcb_t *rcb, aio_req_locator_t *l, uint32_t disk_blk_cnt) @@ -1636,7 +1636,7 @@ pqisrc_aio_show_locator_info(pqisrc_softstate_t *softs, } /* build the aio cdb */ -inline void +static void pqisrc_aio_build_cdb(aio_req_locator_t *l, uint32_t disk_blk_cnt, rcb_t *rcb, uint8_t *cdb) { From nobody Sun Sep 17 14:42: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 4RpVy831F2z4sxCY; Sun, 17 Sep 2023 14:42: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 4RpVy826p6z3fCC; Sun, 17 Sep 2023 14:42:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3eGsjuq9Om6BvjGsKLjjrhk+VycZGuMvLVFRx97zt1Q=; b=KyaYM/FcKuBSUjBsX920sQKUqPEwnfkGI+fzuZU6XMrFm6tgWTUNbFDuQbrlywzmEEeBH4 3uzLbB9ckccCkzdLzd3ZjMqD+GhwIg9uFtMp/6QsSB15SPeikrPHvr16dFA8J/qmeoNWf3 6xEmPYWBhGbSPiOqTM0Zqsh99j+/HRU4HuiPKrkKxI/j7eh8v/X38lpI1dZA8usjIBI7eU /pjic3ZkLWMcHvuGvSmxt8TZt/2Jrj1waT/C043wx3AI8Pa0LPOCPnhoHqqk2pgTsE3mNl Sne3tQvqIGOiYWaTQ5ltjOnt6WNIMnxDkCfvMYusLtmtnO6KQxPaPaQ8rmwv7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961744; a=rsa-sha256; cv=none; b=axmRmoUlmCcDdbyIpEfbm+trLXf0L39FlBZWiQg8PIn3waIAJ/lKOnFqlvpWM40tMxc95C 3RM8kJyaUL1olvsz/ik3hMpb1Rg8yrn6NN5ss29zQ9S1/A2VxS0pz6+zBMpfTkfmoJCpdo YADx9kB0fO10pTnkMvwRJBQoh2gvE1IBLmVOZyceWs2RG+tTWxZ9P/dbIgq2NOUAQQdDY0 HcggtgVIkSzXtN1C4l+w5hsgI+iDMZJeZNcUNmtClQ6gGNcO0AERFLMER2UhTXwks4lZ2H zYpYO9ZtW0lkdcu94XH5bdyfHGRGV1CIwnCySZtAZ3QRjHanmZ+omOc5Nd1HGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3eGsjuq9Om6BvjGsKLjjrhk+VycZGuMvLVFRx97zt1Q=; b=L8c7HAttAKvoxwU1n9LZ5tn1pwnw2HFrqyANfoYSJj2LA78OH4pu6+dErHjvV3yN5XJRjM PKAcgPSgyh8RPJ8asCyBBqKsVHJOBRmJr9PGg9gBjFSQ1ZXGZqamNgcxIYr7iWm/c2Y7gN WdbupmN2gpGukIpPxfhM2X/fSvFtHhz4rQscsI9vHjfbc5uVL4kFBweWqY62dvK4JytiDu GCpgd/NzhkPsT7pU3tMcl6gJlyiqr+QwRgIMbBCymG/Ojz7QMoskNWHDJYG31czFyB01Pz 6EdxOc0o7+D0LjeNWamR48Z+X4DrdF2oz+Zwbpg1lG0cX+Q5H77xcHnX1AptKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVy815KSzspc; Sun, 17 Sep 2023 14:42: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 38HEgOFp036501; Sun, 17 Sep 2023 14:42:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgOQ0036496; Sun, 17 Sep 2023 14:42:24 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:24 GMT Message-Id: <202309171442.38HEgOQ0036496@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: 86cbdc2d2352 - stable/14 - dtrace: Remove $FreeBSD$ from genmakefiles.sh. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 86cbdc2d23521687c5088150d4e6c38a26816360 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=86cbdc2d23521687c5088150d4e6c38a26816360 commit 86cbdc2d23521687c5088150d4e6c38a26816360 Author: Domagoj Stolfa AuthorDate: 2023-08-25 20:53:51 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:40 +0000 dtrace: Remove $FreeBSD$ from genmakefiles.sh. $FreeBSD$ is gone in head, so this should be removed as well. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41595 (cherry picked from commit 7a3af0a59b56078e88b8009824fdd99e8df3f625) Approved by: re (cperciva@) --- cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh b/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh index a2814d6c9962..b3663a91d9ef 100755 --- a/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh +++ b/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh @@ -59,8 +59,6 @@ WITH_CTF=YES local makefile=$(mktemp) cat <<__EOF__ > $makefile -# \$FreeBSD$ - # # This Makefile was generated by \$srcdir${ORIGINDIR#${TOPDIR}}/genmakefiles.sh. # From nobody Sun Sep 17 14:42: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 4RpVy93BVsz4sxd7; Sun, 17 Sep 2023 14:42: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 4RpVy92kwNz3fJ0; Sun, 17 Sep 2023 14:42:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiiWAizz5LaEGuEfBWNHH7VOZih95QUEH9/JpBd/o2I=; b=VdR+aLHgmACRuWkaoDcGpfemDkPWwhd/FTOYLcAo0jgaaNIneCJQOGHGZaZpbsKNksURrV pV2jyS5yZCfYM1yF8R73Xv+Aar/rf7E6yI6Ycv34+3blOtPnarNvvd5+QCt5heU1Kv/EbA /zODYq0mU2dF9KIEZ4ayvzZx6Bes384s8lzpTMZQqCGSe6imbv0pa/YQZ8rVEfNe8s/O1l PFdMAiUTv4ZifsiTmKTbhPJuQ3ZUTfcyEh6n2xBuOEOFy1vqdxcltjob0ofhx/2t8Ee5iG WJ1NVa5YyP1EMX0JJWkui9iJimU0RSVnep7mkIQQmOXsJ8TKMYl+aUHxcNS4oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961745; a=rsa-sha256; cv=none; b=BGNds1HbRgCsB1WiUOTrSsl3ycLiMECwSFyIMB5m4HegkGbQ/C4d1UUfHdelSUaATvEMLW NnlY6Qs2L4qW+U1aQjUWiOzwYcidBpDsTZNe8I4S0w0dsHzLxNdSzsPJHAZQLfp84IkBOS 76R/RpOS+9d2D4+MD8WOxIibyXOpTHIBlvrtZMaxaeHicn4MkH7JuODc4KrONj0FIIkhij gdogv/3NHHWEptB3ID0Q7QLQBC7xNd7WwEgYT99jJTlMPV/MJGV+H0YSiTUbVHTzGPZL9m qus1ntJmMLLrDUUHVEc/QaWGRRBicNLSzyo//gHYYSEIg4sM8SRxM2m13eKqGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiiWAizz5LaEGuEfBWNHH7VOZih95QUEH9/JpBd/o2I=; b=MGrilWmqDfRbzLU26OAdPhnU9TWj9wt6hxUZ5awdtRlqf/dLuJK/AYkS5N3/qO7EwuHI+E ROF7mNz9oPU5DhFqROIRjy3DVIhqDHd0RIQ1V6s5/rnoUsfroTLpDNkGA045eFh3tkgpCp UfUrRsYzVqTXA3pw01RoTyhXqZ/cpHMDcDHA9dEcG/8pQZNakk+WXYVuj9qMNggKa8094d 57kn9flPOpQlr1IwLNXsJfqq7sjH3u4osUGIrQOfvE0gRkjtpqkQXXV4emUIi4oj+ypjft XgwgcEZNyuLEVDGg5Q40Cf/BccJBn5Vj6fKmuSUHPuQnueIam9hVL5AZKBbIEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVy91r1Xzsry; Sun, 17 Sep 2023 14:42: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 38HEgPwR037677; Sun, 17 Sep 2023 14:42:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgP2L037674; Sun, 17 Sep 2023 14:42:25 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:25 GMT Message-Id: <202309171442.38HEgP2L037674@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: 3c473eb80a09 - stable/14 - pccarddevs2h.awk: Remove List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 3c473eb80a09ff0b73f47470b907c20a0ed641d4 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c473eb80a09ff0b73f47470b907c20a0ed641d4 commit 3c473eb80a09ff0b73f47470b907c20a0ed641d4 Author: Warner Losh AuthorDate: 2023-08-25 21:02:34 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:41 +0000 pccarddevs2h.awk: Remove pccard support was removed in 31b35400cf77on Dec 14, 2021, but this wasn't. Belatedly remove it. MFC After: 1 week Sponsored by: Netflix (cherry picked from commit 67dd7233bef66f722ad0325b4b81fe7a12c573be) Approved by: re (cperciva@) --- sys/tools/pccarddevs2h.awk | 173 --------------------------------------------- 1 file changed, 173 deletions(-) diff --git a/sys/tools/pccarddevs2h.awk b/sys/tools/pccarddevs2h.awk deleted file mode 100644 index f6b54addd7f5..000000000000 --- a/sys/tools/pccarddevs2h.awk +++ /dev/null @@ -1,173 +0,0 @@ -#! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.3 1998/09/05 14:42:06 christos Exp $ - -#- -# SPDX-License-Identifier: BSD-2-Clause AND BSD-4-Clause -# -# Copyright (c) 1998 The NetBSD Foundation, Inc. -# All rights reserved. -# -# This code is derived from software contributed to The NetBSD Foundation -# by Christos Zoulas. -# -# 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# -# Copyright (c) 1995, 1996 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Christopher G. Demetriou. -# This product includes software developed by Christos Zoulas -# 4. The name of the author(s) may not be used to endorse or promote products -# derived from this software without specific prior written permission -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -function collectline(f, line) { - oparen = 0 - line = "" - while (f <= NF) { - if ($f == "#") { - line = line "(" - oparen = 1 - f++ - continue - } - if (oparen) { - line = line $f - if (f < NF) - line = line " " - f++ - continue - } - line = line $f - if (f < NF) - line = line " " - f++ - } - if (oparen) - line = line ")" - return line -} -BEGIN { - nproducts = nvendors = 0 - hfile="pccarddevs.h" -} -NR == 1 { - VERSION = $0 - gsub("\\$", "", VERSION) - - printf("/*\t\$FreeBSD\$\t*/\n\n") > hfile - printf("/*\n") > hfile - printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ - > hfile - printf(" *\n") > hfile - printf(" * generated from:\n") > hfile - printf(" *\t%s\n", VERSION) > hfile - printf(" */\n") > hfile - - next -} -$1 == "vendor" { - nvendors++ - - vendorindex[$2] = nvendors; # record index for this name, for later. - vendors[nvendors, 1] = $2; # name - if ($3 == "-1") - $3 = "0xffffffff"; - vendors[nvendors, 2] = $3; # id - printf("#define\tPCMCIA_VENDOR_%s\t%s\t", vendors[nvendors, 1], - vendors[nvendors, 2]) > hfile - vendors[nvendors, 3] = collectline(4, line) - printf("/* %s */\n", vendors[nvendors, 3]) > hfile - next -} -$1 == "product" { - nproducts++ - - products[nproducts, 1] = $2; # vendor name - if ($3 == "-1") - $3 = "0xffffffff"; - products[nproducts, 2] = $3; # product id - products[nproducts, 3] = $4; # id - - f = 5; - - if ($4 == "{") { - products[nproducts, 3] = "0xffffffff"; - z = "{ " - for (i = 0; i < 4; i++) { - if (f <= NF) { - gsub("&sp", " ", $f) - gsub("&tab", "\t", $f) - gsub("&nl", "\n", $f) - z = z $f " " - f++ - } - else { - if (i == 3) - z = z "NULL " - else - z = z "NULL, " - } - } - products[nproducts, 4] = z $f - f++ - } - else { - products[nproducts, 4] = "{ NULL, NULL, NULL, NULL }" - } - printf("#define\tPCMCIA_CIS_%s_%s\t%s\n", - products[nproducts, 1], products[nproducts, 2], - products[nproducts, 4]) > hfile - printf("#define\tPCMCIA_PRODUCT_%s_%s\t%s\n", products[nproducts, 1], - products[nproducts, 2], products[nproducts, 3]) > hfile - - products[nproducts, 5] = collectline(f, line) - - printf("#define\tPCMCIA_STR_%s_%s\t\"%s\"\n", - products[nproducts, 1], products[nproducts, 2], - products[nproducts, 5]) > hfile - - next -} -{ - print $0 > hfile -} From nobody Sun Sep 17 14:42: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 4RpVyB45Nnz4sxCb; Sun, 17 Sep 2023 14:42: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 4RpVyB3fDcz3fTN; Sun, 17 Sep 2023 14:42:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMYtiTYbWQ03hez6NVILw7f05uKZTU5yXn4RFTsQBQA=; b=svE2udKUbxj0X3XV0estZEEROefjCtQJXh3R8q46/OPrRQAOXmXI5NDn0+Qismb9A0cJNn TsA8M8esWL+3r/XpUFez911lqgAEJZWRYs2oxFi7DTpew+yId7r/xVwgAK23hUd9tFZGRf kzo5dE726gLZnxO2qK0BH/K8wrPDw4tcNF6sGSYdB73Fc7mI/1GZC3ZyaBP2xT9Qsp1aSs dScPFjJfrBp8V165eeesPYsUExmvG5RyYb8aX/xi9iFGI/hPZQeob1+lFWFu1xuQX11Idw Vk/2aZgqNlV4HKQ7rd1Dg31Didbl7csL/8g2ZcikDP63IJ50z/Tu7dAIOvdU/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961746; a=rsa-sha256; cv=none; b=IkWlaAa1voA938nqCoXvhFUFGLYWY1b+MfY+a5NwZLtlav4ZtF1I2f99kBc4++sfRkzhZZ qW1EB/yMP7liSR92VJf2FcydPzQhusqTnagsl5xmdJotr7EL9sn0ejxtJadKuzfBbVTgO4 +kAgz5MEEd2a9qWtw+1FI2poCywz/Rr8+zqfAMDiTJMH8+rzu9dHDqk9TwLCiD9+yKe162 1i3ulMqe9zqCIXrnX5uP4RtdqtdQ+cNteH+6IAA2J2Uzvxj8mLDEFpUBp0BcT429lHDqgC ihF5JBH2ggBFDCtRF5rHVj/Jyi988zdyu6OXYn9zBMAihG3CLVH+TCeI8VfRPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMYtiTYbWQ03hez6NVILw7f05uKZTU5yXn4RFTsQBQA=; b=VP1opMeA2sGBkta4ZStRunzbwm/erkSAkYiT+l9AK09Quj5msMyPQu0CuIa7wxl3OstEow NVLGwBLLMr+o3XM2lbloLNb/+hwhVfNZiymzEwZIC59/lTh+aOkAkjBWBjPYTEW9HYg6+R ryOp32J9BLVRTX7zy3IAVW678kpPzmtQGH25jp5VsfbHq9jZzMYF1Ep5uhtt3LiRP509Vy g53Lpr9aaXoa4s8jTienF8bOKgdzsDG0Th8A0GKxqGb6+m5ba3CnM+lDjKXMznpVvFHi8l oekHRlFkzl9qp5o0gqSLbuKEbTo8E+4A9e6hHSSJuvg6nw9IpXvON/fwceze6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVyB2cKQzsWK; Sun, 17 Sep 2023 14:42: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 38HEgQfa037716; Sun, 17 Sep 2023 14:42:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEgQNs037713; Sun, 17 Sep 2023 14:42:26 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:26 GMT Message-Id: <202309171442.38HEgQNs037713@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: b76c7862ab2d - stable/14 - Two more $FreeBSD$ stragglers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: b76c7862ab2dc7820ff33f246a01bdcd57de6f47 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b76c7862ab2dc7820ff33f246a01bdcd57de6f47 commit b76c7862ab2dc7820ff33f246a01bdcd57de6f47 Author: Warner Losh AuthorDate: 2023-08-25 21:14:19 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:41 +0000 Two more $FreeBSD$ stragglers (cherry picked from commit e8f2e3b6ddefe5eb08b472d6516cb923e74917bc) Approved by: re (cperciva@) --- crypto/README | 2 -- sys/dev/cxgb/bin2h.pl | 3 --- 2 files changed, 5 deletions(-) diff --git a/crypto/README b/crypto/README index a3c5ccf50a1c..28b7b9a115e9 100644 --- a/crypto/README +++ b/crypto/README @@ -1,5 +1,3 @@ -$FreeBSD$ - This directory is for the EXACT same use as src/contrib, except it holds crypto sources. In other words, this holds raw sources obtained from various third party vendors, with FreeBSD patches applied. No diff --git a/sys/dev/cxgb/bin2h.pl b/sys/dev/cxgb/bin2h.pl index 8d132be43ffb..46ed98de77be 100644 --- a/sys/dev/cxgb/bin2h.pl +++ b/sys/dev/cxgb/bin2h.pl @@ -47,9 +47,6 @@ 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\$ - ***************************************************************************/ END print OUTPUT "$license\n"; From nobody Sun Sep 17 14: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 4RpVyC5Xhwz4sxL0; Sun, 17 Sep 2023 14:42: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 4RpVyC4lVlz3fTw; Sun, 17 Sep 2023 14:42:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yj+ipE9Sux6AHXNjExDzHoJZymzrNs/ZYdETncYXbkI=; b=Iz8qtspm59LPNN2kKURJsf3vziBGrgel1ZnaRAEQWwVZjdo/Na0FgAVbKTgdT3ySBaTw/k yKIBOzI0O0ckIXB/BLQqpFHbYFgCCYOM+YUk2x0xhNi0UheCLIxTgu8TGLOSC5asEjHX59 VSZXq/3gL9Hra69M+yOJnYd26Vgt3JjEP3WQ0PzLBeenlYDIHwqcdJTg5F6BW4yjDeOf/I k160+PB4cITSYyLKJ2iL9toKk273J3nZgfaI6KpU5JIsMqZ3lf8WkxONFrLghbdb9ZaztL SXeZkeaaXV9UjR794PPhreCB6xG3v/peFsekuOxGXQl/7Jw9UWiHWGm51KOWTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961747; a=rsa-sha256; cv=none; b=X23wl3Qzv0BANvrYaXycyl/cVO3OvGWBDFzGqtDgJ0mlG2g3d4EJuPpdreA/+itZYyHKUQ UfTVXF0ydQAIAqzRUCN47HSBMXveQEEFeNzfCiWMqRCHOTw5fsPuFLSPmjUrgulvsb+ePX sAgedwU5UWoqYUax1uzeO+ISdZh9EOKYL++re6EtMBrv23BtI5u/egqIljBwyJzf9IPV2g HVgXytxqFPXsQu7laZ/sliJb/CV2iqsd3dgfTFtAq3VJdFBqJpd2f/B66RvKeI2PC2Sbzo /RRx9f00FUV9mtghUz+sD7fvmc6NU1ql4D0xCBXyKI9VtB7KaXllrWCSucYDbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yj+ipE9Sux6AHXNjExDzHoJZymzrNs/ZYdETncYXbkI=; b=iP7RMBp5spnU6E2SfdmAeAKRAsWDU52H82jt0yaw45troICD+4ivRkVegWaK2luqGMnjTb f9XizJrS/EVJL3Td3xZla7S06fTkgZJ0GGDWjAFi2eutaIhMFbAw5sb3rOZ5yC4VFU/uxG xSRxGOT42el8g0RRQuCXLXpYaX6vZPk4Y0sf/ohAV1IDMfZKRMBvestQFvBaqC250VSQzT bGwY9jLnIiBgoG5uc0IsjbSoSitwDdB1A4Sa3k/yWLuoua1gHNug+psxrFNkzKyZ12o9b0 wTn3b2iFbb/SDcK/g/ZB6jgEhGGhvxJR1XZGvBv3pA05f4s8ggiUcVfZLUDFcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpVyC3rNlzss1; Sun, 17 Sep 2023 14:42:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38HEgRir037770; Sun, 17 Sep 2023 14: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 38HEgRvg037767; Sun, 17 Sep 2023 14:42:27 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:42:27 GMT Message-Id: <202309171442.38HEgRvg037767@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: 1972e2eba48f - stable/14 - msun: LIBCSRCDIR is too fragile, use ${SRCTOP}/lib/libc instead List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 1972e2eba48f2e9924dc96d9eaa18d39c00d480f Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1972e2eba48f2e9924dc96d9eaa18d39c00d480f commit 1972e2eba48f2e9924dc96d9eaa18d39c00d480f Author: Warner Losh AuthorDate: 2023-09-05 20:58:06 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:34:41 +0000 msun: LIBCSRCDIR is too fragile, use ${SRCTOP}/lib/libc instead LIBCSRCDIR is defined in bsd.libnames.mk, which is read in later in the Makefile than the line: .if exists(${LIBCSRCDIR}/${MACHINE_ARCH}) so we test to see if /${MARCHIN_ARCH} exists which it usually doesn't (but did for me since I mounted 13.2R SD image there). Move to defining our own LIBC_SRCTOP in terms of SRCTOP to treat these uniformily. Sponsored by: Netflix Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D41661 (cherry picked from commit b19d8afe4dd205f7d4bfa3282f58b73d504926db) Approved by: re (cperciva@) --- lib/libc/Makefile | 14 ++++++++------ lib/msun/Makefile | 20 +++++++++++++++----- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index a26215324332..7540eb8c21ad 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -7,12 +7,14 @@ SHLIBDIR?= /lib LIBC_SRCTOP?= ${.CURDIR} -# Pick the current architecture directory for libc. In general, this is -# named MACHINE_CPUARCH, but some ABIs are different enough to require -# their own libc, so allow a directory named MACHINE_ARCH to override this. - -.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) -LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} +# Pick the current architecture directory for libc. In general, this is named +# MACHINE_CPUARCH, but some ABIs are different enough to require their own libc, +# so allow a directory named MACHINE_ARCH to override this (though treat +# powerpc64le and powerpc64 the same). +# Note: This is copeid to msun/Makefile +M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} +.if exists(${LIBC_SRCTOP}/${M}) +LIBC_ARCH=${M} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 8bc984c2c342..9917be01d863 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -97,17 +97,27 @@ COMMON_SRCS+= s_cospi.c s_cospif.c \ s_sinpi.c s_sinpif.c \ s_tanpi.c s_tanpif.c +# LIBCSRCDIR is defined lazily, so can't be used for exists() below +LIBC_SRCTOP=${SRCTOP}/lib/libc # Location of fpmath.h and _fpmath.h -.if exists(${LIBCSRCDIR}/${MACHINE_ARCH}) -LIBC_ARCH=${MACHINE_ARCH} + +# Pick the current architecture directory for libc. In general, this is named +# MACHINE_CPUARCH, but some ABIs are different enough to require their own libc, +# so allow a directory named MACHINE_ARCH to override this (though treat +# powerpc64le and powerpc64 the same). +# Note: This is copied from libc/Makefile +M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} +.if exists(${LIBC_SRCTOP}/${M}) +LIBC_ARCH=${M} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif -CFLAGS+= -I${.CURDIR}/src -I${LIBCSRCDIR}/include \ - -I${LIBCSRCDIR}/${LIBC_ARCH} + +CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \ + -I${LIBC_SRCTOP}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map -VERSION_DEF= ${LIBCSRCDIR}/Versions.def +VERSION_DEF= ${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} # C99 long double functions From nobody Sun Sep 17 14:45: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 4RpW185Gl2z4sxqs; Sun, 17 Sep 2023 14:45: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 4RpW184lyxz3gl5; Sun, 17 Sep 2023 14:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92ks+HcXngEKhWmNEbmwMXH2GWR62XvIYdfdo4Rhi1k=; b=yPIup5nwZeZ/c+rGbDlDJvZd3D70ZT35rlEwcCsuAMbl/PtBE793cfegv5qGguwJCvs7P5 xByoGTW4VUrwg+ykfwfwLoHjHutGSuxN/UQv+BZKGdIMmvAiSWZPkc/1CDzbLNxdsSDLnx Fp/PC3H0zYxKBgrSfQ+OeLxcI9ICu0Xqg1GqRwd9RR7e+ptCAU0I0/41MvdzezXWDMHXgJ gfS759DCadcXXPCCEPov5REjZG1oRRLQGd0czPqedNYUl06YvRlO/HAQq6xqKeaUXO+GQY EUAQ3n4a47+K2EQq4l62xaHu7cCydJEljZzSmTWOqZ1QHerXUqXC25rHisXj4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694961900; a=rsa-sha256; cv=none; b=yv+T+TeljVjkAs0BaNEPg+ews14XiQUxlNP6gcdELIvMvvQyYiULmWkzHesx0S/qCU+sPI 3HbHY0QFLozVpNIr1KQSej15cZLPcafA3ILrFnXr3hyywnC7M7kRhHEULuYNDCQ16hNMKd n2T0UDgglEPsQYpxr99LSpDNeUukkkTIwtLcAQ2Q2GhuJT0lL2oQ1jPDWzPy5mmuykW8NX bZ8WuUsk6Lw3dgkBq7Uv/HYR4t5EnRz/A9YnbILqpbvYeULASAZAv8pxBk5Ep0McRRjsQC yuVRYvJx2xCySK5QVntHlH+EdfZrnu7jwSvdYZ2biXKB6TcTKri0G0inf7hSbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694961900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92ks+HcXngEKhWmNEbmwMXH2GWR62XvIYdfdo4Rhi1k=; b=JtHvIZo8LW/3eayxcW5uOxUHBnJIMynjECQZqYbA90qzOt+i/vQyDvOtmEYKda6bHiDepz grNGBKB/jiCW/nG2wrQIzA6mm2MQwjXrKg49i8qArUlEkb0HrXAiRobVnoEmhkwJJCAdQM NA0llNTvloWj6OP0Z1Jp6maqjQrzRB1Agb8K/vfpIvCiXo0pEH0GIagWRc0F+06KswLRJU fU+av1yL+XxJYm+s1CBuYgQq3Uz4wp2UT75kk37WWMn1GyM/d6HpC+1noOvBas+X4Gvvhn HhSzwNuAzU1Fw9rjooKst1QV9y0rEgxULyHuAQh6oTBD7tmUQ/hbAJT05WvEaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpW183s5qzt5m; Sun, 17 Sep 2023 14:45: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 38HEj0Fk039093; Sun, 17 Sep 2023 14:45:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HEj01N039090; Sun, 17 Sep 2023 14:45:00 GMT (envelope-from git) Date: Sun, 17 Sep 2023 14:45:00 GMT Message-Id: <202309171445.38HEj01N039090@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: 75e7075fcadd - stable/14 - powerpcspe: Fix 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 75e7075fcadd66fa8a63a252e71513d729776805 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=75e7075fcadd66fa8a63a252e71513d729776805 commit 75e7075fcadd66fa8a63a252e71513d729776805 Author: Li-Wen Hsu AuthorDate: 2023-09-17 14:43:26 +0000 Commit: Warner Losh CommitDate: 2023-09-17 14:43:26 +0000 powerpcspe: Fix build Copy _fpmath.h from powerpc, which is the same as the one in powerpc64. Sponsored by: The FreeBSD Foundation (cherry picked from commit 604f6bf022cea7e48f3675aa82e756a440716fd9) --- lib/libc/powerpcspe/_fpmath.h | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/lib/libc/powerpcspe/_fpmath.h b/lib/libc/powerpcspe/_fpmath.h new file mode 100644 index 000000000000..9bc7450aacaf --- /dev/null +++ b/lib/libc/powerpcspe/_fpmath.h @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2003 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +union IEEEl2bits { + long double e; + struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + unsigned int manl :32; + unsigned int manh :20; + unsigned int exp :11; + unsigned int sign :1; +#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ + unsigned int sign :1; + unsigned int exp :11; + unsigned int manh :20; + unsigned int manl :32; +#endif + } bits; +}; + +#define mask_nbit_l(u) ((void)0) +#define LDBL_IMPLICIT_NBIT +#define LDBL_NBIT 0 + +#define LDBL_MANH_SIZE 20 +#define LDBL_MANL_SIZE 32 + +#define LDBL_TO_ARRAY32(u, a) do { \ + (a)[0] = (uint32_t)(u).bits.manl; \ + (a)[1] = (uint32_t)(u).bits.manh; \ +} while(0) From nobody Sun Sep 17 15:04: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 4RpWRN3zd3z4t1Lx; Sun, 17 Sep 2023 15:04: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 4RpWRN2lzqz4F5g; Sun, 17 Sep 2023 15:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnmd6kUEYPx0ckyE1CvqNwYlFS2l2qcFqKwttoZ0nZs=; b=FUIQRmBmDyrtKnXUZSKEYPkmz247ULCvr0DGaahyx/DNr5dQ23kcq7TNLjw++nU0paH/+O Nb06IFAwf4PNyzZj8OyxVfMCd8/8K+rTqz5/Q0DANDYlTDm+UDSjs4fMwBhYQXQxeO6wKn 4iyb8VbxlgNQKH6a+b0nMKkVHGneMRAUPQx1hlNSoMihfhYR23gb8n0do+MXs3t8zh/jro 8JigC7zNW8G9RAVPxCCOSFjqoSmada5pKqk4pdATaeOs5TaAAWJlFFS9uQO7S+3Kurm9ci n66akoeFtN4cfxL2i2LrbQ2CYzdpwe6RMYoPgMnO8VDyKArUZRoq/F2fAvAEhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694963056; a=rsa-sha256; cv=none; b=tHhc+bcMBpOuCSjoZI6J5+HWUplJEI4dXdhDpSZ8FGSYZ6IDuRjtMvXLyT5KrcGhJD6LqX +GYF5esT+UFkSuVUCipt6tJRMaq4Lfjasw/S7zZJxQos23LrzMcjk6z1jBo25ynavyk4Z8 eVuoZopvqNzsnObNeIJ7jkx49r9Vf81k9Foo0y84Dd79qsSZsCF8V0lDpufAplNf0sr2Zs FY/wBMdoqwG70RceliEiUdIH9v6cibk5ivxaBerS2Xe2KOJAFfHuSpfDRB4VsNlj60CTZ3 C9PNx0TZrBdd1vrzHcxlYcnaakonFJcQhYl0GpSZN4+Y06hD8jRx24vZMRHodw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnmd6kUEYPx0ckyE1CvqNwYlFS2l2qcFqKwttoZ0nZs=; b=kRWi5tJ8M/PdKcip2TEaNot34xBJRdwlCbJXm+YUMwl4xZpkhVSs/wnUNOMGGIK2Bi8/Sr N43dInwRuqAcDK+1uQnhKzN45T5cHoocS8/EW7ZFON0WKfNU+63E3sgsNr6wqKGFgWhagV 0IynsS8fFzEZwhb94FpWzy8ZLE42TSI4PyqzdwgmXFauFn/afcU318QqhxcnvG/C+J+B9E /yF8ObOx40cqSPU0CFlMl8vmwNUiQxy0JTsAFH/dM/unF9yAzLVMFzo/V6Z1u8E8WdLNLK +jsIHzIldbc6PkGMKzWk3Z/PWR39NKwjlizLnSgiwvySEFY3XR5OSQyqHH41/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 4RpWRN1kQMzt5C; Sun, 17 Sep 2023 15:04: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 38HF4GEP072202; Sun, 17 Sep 2023 15:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HF4G6T072197; Sun, 17 Sep 2023 15:04:16 GMT (envelope-from git) Date: Sun, 17 Sep 2023 15:04:16 GMT Message-Id: <202309171504.38HF4G6T072197@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: a87dddf39e86 - stable/14 - timerfd: convert timerfd_list_lock from sx to mtx List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: a87dddf39e866015341003eeac76d736d993514a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a87dddf39e866015341003eeac76d736d993514a commit a87dddf39e866015341003eeac76d736d993514a Author: Mateusz Guzik AuthorDate: 2023-09-17 15:01:33 +0000 Commit: Warner Losh CommitDate: 2023-09-17 15:01:33 +0000 timerfd: convert timerfd_list_lock from sx to mtx There was no good reason to use the former. This should prevent some head-scratching by an interested and qualified reader. (cherry picked from commit f4296cfb409a48de00bfa60e76f686c2b031876f) --- sys/kern/sys_timerfd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index c8b45a926b02..e4d2f10f28ef 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -61,9 +61,9 @@ static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); -static struct sx timerfd_list_lock; +static struct mtx timerfd_list_lock; static LIST_HEAD(, timerfd) timerfd_list; -SX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock"); +MTX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock", MTX_DEF); static struct unrhdr64 tfdino_unr; @@ -133,7 +133,7 @@ timerfd_jumped(void) return; timerfd_getboottime(&boottime); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_FOREACH(tfd, &timerfd_list, entry) { mtx_lock(&tfd->tfd_lock); if (tfd->tfd_clockid != CLOCK_REALTIME || @@ -169,7 +169,7 @@ timerfd_jumped(void) tfd->tfd_boottim = boottime; mtx_unlock(&tfd->tfd_lock); } - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); } static int @@ -324,9 +324,9 @@ timerfd_close(struct file *fp, struct thread *td) { struct timerfd *tfd = fp->f_data; - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_REMOVE(tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); callout_drain(&tfd->tfd_callout); seldrain(&tfd->tfd_sel); @@ -450,9 +450,9 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); timerfd_getboottime(&tfd->tfd_boottim); getnanotime(&tfd->tfd_birthtim); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_INSERT_HEAD(&timerfd_list, tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); From nobody Sun Sep 17 15:04: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 4RpWRP4fg6z4t1p1; Sun, 17 Sep 2023 15:04: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 4RpWRP3jFtz4FbQ; Sun, 17 Sep 2023 15:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hoz7WOQin++lWOVY83TNamFRf39RPg3GOjYWXnmzQbY=; b=vwAWayHjL/5JxkCnG2QlwYz6SmDz0OJoKUvjeMRq2eveERS4bKGvdk5SHQ6XRjOLNppSrk B+xxur37kPaNxrjG6M9r3vthtKirZykQbTWqlh404X3NISzK7iuHwB+U0VFvwafoliqhHp q71tDZQKkON3FvEALy/zIXTWAmsDJphFCeEtpJL8gqVhynSeZGPwZmN0aveHDa0mGoDU5u h1Dn1r3ntlxWDfv0k3e9lQEhC0zD1MdNXA5kQacKItDVlZvfDSpjCRe8OTFEI2dPv5bNDC 2KYug43BNWLwCPZkGVnt3Mi1yz/U7uuKfvb4zfImSRauW5eBQr9B+OCSstV4EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694963057; a=rsa-sha256; cv=none; b=oSMMfFvNLUqiKbcPLqXoROoivIVKKThKqXHehBzQHJvs/+X5iQuhi8Nko5OhTRIvOAyEGE NvbKtRTuRZQJQE1sj2i7NpbfjyElmyWsPig2YwJ2RtaLi3nF4r1cHha33cevqGAxWkw2Oa rlYzutTJdOTyBzt/xHQGg6pH01yZdhxf6pPLj4/3Rk0sfJ35uDbZzc6t4gOtcMPaRJDs37 /VZoijW7v25nMWIPfxzUYmEz7K7wH7K2LLBoXDoufDwf3kBZh5GaOauSwXUSJjAY8wFpTL 2y2alHCEuV/oUbcdjx8pP67f7zA6eRubTn2tWgexeOFH+D2I+YTeLsogLhQO9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hoz7WOQin++lWOVY83TNamFRf39RPg3GOjYWXnmzQbY=; b=oUsN0436jQfN2h3mW//QjmAgOw6tDpJevLqIC2vRzSAHfpMo+6CIr+l4Y4q6imwiWwGfBq 89CEAgWGMjcXXPPIFQv2fnfkzX4bhPqyLwovv2uBpOWO8ZPYxdFSEtUbmed9a04rR/sbRS B1nnkiNZ3gnURJ/uGYjZLPScrd62F4kmMOiPWacJizi4XWdHnc411DBZjHIPSrXrJkCv2b phMyZmwF6DvK5n3r/VZ4ENJF2H8BfzVC5wpo5Pv3VRgJvsbLVqFLCNUCA2Y2VMUyo2iG3C 9DzH+G3NCEzmD/hE1L9qGeTU0jK9zIyH1hWf41hfyKGCVIe6HQ6OyL+1c8vp5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpWRP2FQcztXf; Sun, 17 Sep 2023 15:04: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 38HF4HMD072251; Sun, 17 Sep 2023 15:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HF4HkQ072248; Sun, 17 Sep 2023 15:04:17 GMT (envelope-from git) Date: Sun, 17 Sep 2023 15:04:17 GMT Message-Id: <202309171504.38HF4HkQ072248@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: d00e6d877455 - stable/14 - timerfd: Define a locking regime List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: d00e6d87745528be7acf58f39eaa148d8cb6c7c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d00e6d87745528be7acf58f39eaa148d8cb6c7c2 commit d00e6d87745528be7acf58f39eaa148d8cb6c7c2 Author: Jake Freeland AuthorDate: 2023-09-17 15:01:46 +0000 Commit: Warner Losh CommitDate: 2023-09-17 15:01:46 +0000 timerfd: Define a locking regime Define a locking regime for the members of struct timerfd and document it so future code can follow the standard. The lock legend can be found in a comment above struct timerfd. Additionally, * Add assertions based on locking regime. * Fill kn_data with the expiration count when EVFILT_READ is triggered. * Report st_ctim for stat(2). * Check if file has f_type == DTYPE_TIMERFD before assigning timerfd pointer to f_data. MFC After: 3 days Reviewed by: imp, kib, markj Differential Revision: https://reviews.freebsd.org/D41600 (cherry picked from commit a1f506156c4db885d3cc177c93e9c8a28d535d30) --- sys/kern/sys_timerfd.c | 61 +++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index e4d2f10f28ef..a81b5ad0fade 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -73,28 +73,36 @@ static struct unrhdr64 tfdino_unr; #define TFD_CANCELED 4 /* Jumped, CANCEL_ON_SET=true. */ #define TFD_JUMPED (TFD_ZREAD | TFD_CANCELED) +/* + * One structure allocated per timerfd descriptor. + * + * Locking semantics: + * (t) locked by tfd_lock mtx + * (l) locked by timerfd_list_lock sx + * (c) const until freeing + */ struct timerfd { /* User specified. */ - struct itimerspec tfd_time; /* tfd timer */ - clockid_t tfd_clockid; /* timing base */ - int tfd_flags; /* creation flags */ - int tfd_timflags; /* timer flags */ + struct itimerspec tfd_time; /* (t) tfd timer */ + clockid_t tfd_clockid; /* (c) timing base */ + int tfd_flags; /* (c) creation flags */ + int tfd_timflags; /* (t) timer flags */ /* Used internally. */ - timerfd_t tfd_count; /* expiration count since last read */ - bool tfd_expired; /* true upon initial expiration */ - struct mtx tfd_lock; /* mtx lock */ - struct callout tfd_callout; /* expiration notification */ - struct selinfo tfd_sel; /* I/O alerts */ - struct timespec tfd_boottim; /* cached boottime */ - int tfd_jumped; /* timer jump status */ - LIST_ENTRY(timerfd) entry; /* entry in list */ + timerfd_t tfd_count; /* (t) expiration count since read */ + bool tfd_expired; /* (t) true upon initial expiration */ + struct mtx tfd_lock; /* tfd mtx lock */ + struct callout tfd_callout; /* (t) expiration notification */ + struct selinfo tfd_sel; /* (t) I/O alerts */ + struct timespec tfd_boottim; /* (t) cached boottime */ + int tfd_jumped; /* (t) timer jump status */ + LIST_ENTRY(timerfd) entry; /* (l) entry in list */ /* For stat(2). */ - ino_t tfd_ino; /* inode number */ - struct timespec tfd_atim; /* time of last read */ - struct timespec tfd_mtim; /* time of last settime */ - struct timespec tfd_birthtim; /* creation time */ + ino_t tfd_ino; /* (c) inode number */ + struct timespec tfd_atim; /* (t) time of last read */ + struct timespec tfd_mtim; /* (t) time of last settime */ + struct timespec tfd_birthtim; /* (c) creation time */ }; static void @@ -109,6 +117,7 @@ static inline void timerfd_getboottime(struct timespec *ts) { struct timeval tv; + getboottime(&tv); TIMEVAL_TO_TIMESPEC(&tv, ts); } @@ -274,6 +283,8 @@ filt_timerfdread(struct knote *kn, long hint) { struct timerfd *tfd = kn->kn_hook; + mtx_assert(&tfd->tfd_lock, MA_OWNED); + kn->kn_data = (int64_t)tfd->tfd_count; return (tfd->tfd_count > 0); } @@ -308,13 +319,13 @@ timerfd_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) sb->st_uid = fp->f_cred->cr_uid; sb->st_gid = fp->f_cred->cr_gid; sb->st_blksize = PAGE_SIZE; - mtx_lock(&tfd->tfd_lock); - sb->st_ino = tfd->tfd_ino; sb->st_atim = tfd->tfd_atim; sb->st_mtim = tfd->tfd_mtim; - sb->st_birthtim = tfd->tfd_birthtim; mtx_unlock(&tfd->tfd_lock); + sb->st_ctim = sb->st_mtim; + sb->st_ino = tfd->tfd_ino; + sb->st_birthtim = tfd->tfd_birthtim; return (0); } @@ -342,15 +353,12 @@ static int timerfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) { - struct timerfd *tfd = fp->f_data; kif->kf_type = KF_TYPE_TIMERFD; - mtx_lock(&tfd->tfd_lock); kif->kf_un.kf_timerfd.kf_timerfd_clockid = tfd->tfd_clockid; kif->kf_un.kf_timerfd.kf_timerfd_flags = tfd->tfd_flags; kif->kf_un.kf_timerfd.kf_timerfd_addr = (uintptr_t)tfd; - mtx_unlock(&tfd->tfd_lock); return (0); } @@ -376,6 +384,7 @@ timerfd_curval(struct timerfd *tfd, struct itimerspec *old_value) { struct timespec curr_value; + mtx_assert(&tfd->tfd_lock, MA_OWNED); *old_value = tfd->tfd_time; if (timespecisset(&tfd->tfd_time.it_value)) { nanouptime(&curr_value); @@ -472,11 +481,11 @@ kern_timerfd_gettime(struct thread *td, int fd, struct itimerspec *curr_value) error = fget(td, fd, &cap_write_rights, &fp); if (error != 0) return (error); - tfd = fp->f_data; - if (tfd == NULL || fp->f_type != DTYPE_TIMERFD) { + if (fp->f_type != DTYPE_TIMERFD) { fdrop(fp, td); return (EINVAL); } + tfd = fp->f_data; mtx_lock(&tfd->tfd_lock); timerfd_curval(tfd, curr_value); @@ -504,11 +513,11 @@ kern_timerfd_settime(struct thread *td, int fd, int flags, error = fget(td, fd, &cap_write_rights, &fp); if (error != 0) return (error); - tfd = fp->f_data; - if (tfd == NULL || fp->f_type != DTYPE_TIMERFD) { + if (fp->f_type != DTYPE_TIMERFD) { fdrop(fp, td); return (EINVAL); } + tfd = fp->f_data; mtx_lock(&tfd->tfd_lock); getnanotime(&tfd->tfd_mtim); From nobody Sun Sep 17 15:04: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 4RpWRQ58j3z4t1Z6; Sun, 17 Sep 2023 15:04: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 4RpWRQ4Fngz4FlL; Sun, 17 Sep 2023 15:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGKyqQTXWpucTVX4NUdQUUfqgaMW04/UXsCwcTOAK9Q=; b=c8PqPAn/qlAZHw5ZwOqC7oB9vij5R7kJ75MjllmOo4rlLVOeY0rTkC2IJ6nTf2v8QtmTdX B0mxOMer1Px23po+SmhZUdgVSJf+liz9nc2VBDXI+8X0/ujwdzfR3Da4buYVfk6vVDGnjB tRT5qxjLxFxPcx7PEvMbVXQwQ0Ah4PZSBHfjuvxOMDt1iPuvWMJreO81AKA6RYiZvoFjEp 6VhJPoI9qckgARLiQtDTkmI8fEI9i58Xl9l81EBoxye4VHL3/a/UKgAGuNjL4w2mwSzOh/ sNzFiLJlimyH4gMtJDnaeyo7Ikf+B3//lNP7MKYH5YPkhqBhjRoVWNDIer1oxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694963058; a=rsa-sha256; cv=none; b=s199KfTxcLRuJvjdt8r3cd14GQoV1jkdDm4ssQPSxLtQsZLPd1g6SgoLRwEDda+ogcBSLi E7SzSm0If1ph3Tgkw9k+jbUGUMifVYHvfQbtfWU08XIToSlNchdvzRvvEUZFcUXVJ+3vAP WVGqt2wdWNezkDuylKr4eE0IgKt1Q2OUo1iyhDawoOP/olSsbohyiJVXZqw6oX9iwDWszI h2QKXGNJkpRT224xlHk/ssh849Ty7LocPd51yX4WqIkQqQp9++6BCv9HWLKUwI6n5ZdGOr S+WA2edGB3L7iszE5GoRqv9P9pCNxTreS9uUtIWcD8uTVzqWw+JSoFgkHUujvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGKyqQTXWpucTVX4NUdQUUfqgaMW04/UXsCwcTOAK9Q=; b=Y6UO3B1zvXl9cBC+YCGUsNpf9SHwrjNoH10E2abXf5ycGynDZYJqzyCnvEX2JPY7/FkL++ vjfKEfpXxY0QsDZnzoUKe2viZ4PWvYogdZLwPgSmZ5phNaWPZc9l+OxsNf/CSD9gIRZ12a riysfDwHRbz2yIL+7nvcn2ttJRTJRv7O0vXd4C+hrBPNmcjw+0Tq3U8SpEvfFZdHXcXFDD Kjq14L85GjnL4b91acv78Psr0ppRzV5f05hDjmPrPwcPK9JXzf2YEl8FIw3md5lHAaZ/RL sf+42N3OEW0RLUVEZ6YKaDxDQbLXw3x5b1GfpFb1a4MEE8oe1Ftu72h+HVpfhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpWRQ3CxXztb8; Sun, 17 Sep 2023 15:04: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 38HF4Ixg072303; Sun, 17 Sep 2023 15:04:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HF4IjN072300; Sun, 17 Sep 2023 15:04:18 GMT (envelope-from git) Date: Sun, 17 Sep 2023 15:04:18 GMT Message-Id: <202309171504.38HF4IjN072300@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: 27d567847b18 - stable/14 - timerfd: Relocate 32-bit compat 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27d567847b18275012bf39fb517dceee41b1ed33 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=27d567847b18275012bf39fb517dceee41b1ed33 commit 27d567847b18275012bf39fb517dceee41b1ed33 Author: Jake Freeland AuthorDate: 2023-09-17 15:01:58 +0000 Commit: Warner Losh CommitDate: 2023-09-17 15:01:59 +0000 timerfd: Relocate 32-bit compat code 32-bit compatibility code is conventionally stored in sys/compat/freebsd32. Move freebsd32_timerfd_gettime() and freebsd32_timerfd_settime() from sys/kern/sys_timerfd.c to sys/compat/freebsd32/freebsd32_misc.c. MFC After: 3 days Reviewed by: imp, markj Differential Revision; https://reviews.freebsd.org/D41640 (cherry picked from commit 918966a27479b4fb7c4c8999c4926d83c2c081e5) --- sys/compat/freebsd32/freebsd32_misc.c | 55 +++++++++++++++++++++++++++++++ sys/kern/sys_timerfd.c | 61 ----------------------------------- 2 files changed, 55 insertions(+), 61 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 22ee4897083e..c26e7b97e717 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -82,6 +82,7 @@ #include #include #include +#include #include #include #include @@ -3138,6 +3139,60 @@ freebsd32_ktimer_gettime(struct thread *td, return (error); } +int +freebsd32_timerfd_gettime(struct thread *td, + struct freebsd32_timerfd_gettime_args *uap) +{ + struct itimerspec curr_value; + struct itimerspec32 curr_value32; + int error; + + error = kern_timerfd_gettime(td, uap->fd, &curr_value); + if (error == 0) { + CP(curr_value, curr_value32, it_value.tv_sec); + CP(curr_value, curr_value32, it_value.tv_nsec); + CP(curr_value, curr_value32, it_interval.tv_sec); + CP(curr_value, curr_value32, it_interval.tv_nsec); + error = copyout(&curr_value32, uap->curr_value, + sizeof(curr_value32)); + } + + return (error); +} + +int +freebsd32_timerfd_settime(struct thread *td, + struct freebsd32_timerfd_settime_args *uap) +{ + struct itimerspec new_value, old_value; + struct itimerspec32 new_value32, old_value32; + int error; + + error = copyin(uap->new_value, &new_value32, sizeof(new_value32)); + if (error != 0) + return (error); + CP(new_value32, new_value, it_value.tv_sec); + CP(new_value32, new_value, it_value.tv_nsec); + CP(new_value32, new_value, it_interval.tv_sec); + CP(new_value32, new_value, it_interval.tv_nsec); + if (uap->old_value == NULL) { + error = kern_timerfd_settime(td, uap->fd, uap->flags, + &new_value, NULL); + } else { + error = kern_timerfd_settime(td, uap->fd, uap->flags, + &new_value, &old_value); + if (error == 0) { + CP(old_value, old_value32, it_value.tv_sec); + CP(old_value, old_value32, it_value.tv_nsec); + CP(old_value, old_value32, it_interval.tv_sec); + CP(old_value, old_value32, it_interval.tv_nsec); + error = copyout(&old_value32, uap->old_value, + sizeof(old_value32)); + } + } + return (error); +} + int freebsd32_clock_getcpuclockid2(struct thread *td, struct freebsd32_clock_getcpuclockid2_args *uap) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index a81b5ad0fade..e245baed88be 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -54,11 +54,6 @@ #include -#ifdef COMPAT_FREEBSD32 -#include -#include -#endif - static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); static struct mtx timerfd_list_lock; @@ -598,59 +593,3 @@ sys_timerfd_settime(struct thread *td, struct timerfd_settime_args *uap) } return (error); } - -#ifdef COMPAT_FREEBSD32 -int -freebsd32_timerfd_gettime(struct thread *td, - struct freebsd32_timerfd_gettime_args *uap) -{ - struct itimerspec curr_value; - struct itimerspec32 curr_value32; - int error; - - error = kern_timerfd_gettime(td, uap->fd, &curr_value); - if (error == 0) { - CP(curr_value, curr_value32, it_value.tv_sec); - CP(curr_value, curr_value32, it_value.tv_nsec); - CP(curr_value, curr_value32, it_interval.tv_sec); - CP(curr_value, curr_value32, it_interval.tv_nsec); - error = copyout(&curr_value32, uap->curr_value, - sizeof(curr_value32)); - } - - return (error); -} - -int -freebsd32_timerfd_settime(struct thread *td, - struct freebsd32_timerfd_settime_args *uap) -{ - struct itimerspec new_value, old_value; - struct itimerspec32 new_value32, old_value32; - int error; - - error = copyin(uap->new_value, &new_value32, sizeof(new_value32)); - if (error != 0) - return (error); - CP(new_value32, new_value, it_value.tv_sec); - CP(new_value32, new_value, it_value.tv_nsec); - CP(new_value32, new_value, it_interval.tv_sec); - CP(new_value32, new_value, it_interval.tv_nsec); - if (uap->old_value == NULL) { - error = kern_timerfd_settime(td, uap->fd, uap->flags, - &new_value, NULL); - } else { - error = kern_timerfd_settime(td, uap->fd, uap->flags, - &new_value, &old_value); - if (error == 0) { - CP(old_value, old_value32, it_value.tv_sec); - CP(old_value, old_value32, it_value.tv_nsec); - CP(old_value, old_value32, it_interval.tv_sec); - CP(old_value, old_value32, it_interval.tv_nsec); - error = copyout(&old_value32, uap->old_value, - sizeof(old_value32)); - } - } - return (error); -} -#endif From nobody Sun Sep 17 15:04:19 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 4RpWRR6NmGz4t1gC; Sun, 17 Sep 2023 15:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RpWRR5KBXz4Fjs; Sun, 17 Sep 2023 15:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSU+zmlP1Tw1jB+mFIxZ1FZg1LyKsdHlSY+etT0e6D0=; b=U2aCRhRyP0Uv75FDukDsZVi6gIto301YerGF0Vl+p5Rw2F+38F3gPmiQxJf5+8niIx4X9e skBvizWRBnhOzHS7bFXo5qNoye+359zY5A+tp9wRsn3wpqxPeQ02uvld8I/9JhodOVPxMO 8sESk4lTltcY+GI85as9kEUp+0BeGE9U8EpQnJhGr3ziGB5l0SShuy50wxa84gpaNl9DRc dYY7EKiS52rzcx2EEPThYGd0kHDk06wbIfcvUj+0R5LTim2Gou/FRFJDqfUW2vvsozPHrS lbrQCpZ9YPtUnh3SV96iF3KH8iUGfOFMX20WnAebWK1xBjDn6tOE0kBUtpYQOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694963059; a=rsa-sha256; cv=none; b=W3h/s2Fv7FZm6wk1IpDxN9rsM3bAiLBTpIf7bxHtyOSL3JxmP4Glyzt3fi7HwFIC+Eoujb dmVdNsNQ+Gz2sqf2qNYvo9eRMZe8HKjpsWmbj70ylNq9jUDYbcOHOhb30kncJpnxCdECDT JOsQzsNjLJV00S93Tgb7QQG/l2fFYeHExPORWEQpwOBGEJbiMF7uXupL7phstqs8MzVzrM 55Tq3bUWUJWoumVrLgE456Ta3wCXGJN0WAX67V+YELfLMIAIeQsLKg63fs55TPYO+aheSU fejKEl/rL61DJTfNgR1hcTPaHIc3bDm1X8cL2vNW7z6T9vOS0g6kAMar5lS3OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694963059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSU+zmlP1Tw1jB+mFIxZ1FZg1LyKsdHlSY+etT0e6D0=; b=VZxGNTRd8f67uXR8E40nmFGzooE2gXWzP5pzxXufPu8WRr1mqEiTgixqF+LQTbIJmXTZx/ wi9CEOYsHZf65Cssrj5LulIOsSaVNln317zfbX0U+l/EGLM1vqyZsliXjMqT4d3sTx2ghF /WW8FrO0dn5CxKFnzYA12DPsV8xacibz5jHbeV5uIYfhx5rNLHelxU+dicKDXOjcO2XnnM YwJRu5EszI5gj87z8vZz7rZic/eiplmnDfYyCdbIMxiGG30Un9TsmG//vp5Eq27m2ogWZh 8jx7ApIq4KPEy77yz8s1oBfwUb9Vajgbex+kkr0ga8w85/QihZXPBwFWtc+5Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RpWRR4CY3ztb9; Sun, 17 Sep 2023 15:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38HF4JU4072345; Sun, 17 Sep 2023 15:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38HF4J3R072342; Sun, 17 Sep 2023 15:04:19 GMT (envelope-from git) Date: Sun, 17 Sep 2023 15:04:19 GMT Message-Id: <202309171504.38HF4J3R072342@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: 8bcf9a87c79d - stable/14 - timerfd: Namespace pollution adjustments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 8bcf9a87c79d8de05bc79ff2f8530bf4a52162ca Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8bcf9a87c79d8de05bc79ff2f8530bf4a52162ca commit 8bcf9a87c79d8de05bc79ff2f8530bf4a52162ca Author: Jake Freeland AuthorDate: 2023-09-17 15:02:09 +0000 Commit: Warner Losh CommitDate: 2023-09-17 15:02:09 +0000 timerfd: Namespace pollution adjustments Do not pollute userspace with , instead declare struct thread when _KERNEL is defined. Include instead of . This causes intentional namespace pollution that mimics Linux. g/musl libcs include in their , exposing clock gettime, settime functions and CLOCK_ macro constants. Ports like Chromium expect this namespace pollution and fail without it. MFC After: 3 days Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D41641 (cherry picked from commit fb5daae920bae84e3eec8175bf9e46304c3b2ae6) --- sys/sys/timerfd.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/sys/timerfd.h b/sys/sys/timerfd.h index 8cb9939ba60f..cace3b71498c 100644 --- a/sys/sys/timerfd.h +++ b/sys/sys/timerfd.h @@ -30,8 +30,12 @@ #include #include -#include -#include +/* + * We only need , but glibc pollutes the namespace + * with . This pollution is expected by most programs, so + * reproduce it by including here. + */ +#include typedef uint64_t timerfd_t; @@ -54,6 +58,8 @@ __END_DECLS #else /* _KERNEL */ +struct thread; + int kern_timerfd_create(struct thread *td, int clockid, int flags); int kern_timerfd_gettime(struct thread *td, int fd, struct itimerspec *curr_value); From nobody Mon Sep 18 10: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 4Rq1V927KLz4syH2; Mon, 18 Sep 2023 10: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 4Rq1V91fSXz3XXD; Mon, 18 Sep 2023 10: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=1695033505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfbW1+XaRDvgxBvovvSozJe7saK94M34r4XJ0R/iimo=; b=hqT6HloeXxcKsRqR4sW7blTfx1hSFyHVxuplUegT2b4Tkr42ATZIEFXxtEGJTSakODgzld m02Ah3fOQx++KE41h5QEZFl0r6bhi5lFmliEYw+QlOp5dmzjs7qRMELEJe79RgaacTRLFs rMyEDYXpMLROqs+ozfr9m28C1BCZVJXnL7fsonOwG2QWkXkW7YX5YN+us6K/6QVwYIpxJv pEiT3BvF8UxkC2WzpriRKtAmgRxZZ5xfNGCT1kI9U7NhSu4lAhQvT/Ra8mVdAtvXJp4s4O tka3qLAMQy2Gxovbsg7F84z27gMdSCRelH9qLPQ7BMBn/zhTVyVx8CaDZVdhDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695033505; a=rsa-sha256; cv=none; b=IjtLeIRVdJRV+KLVH8pJCz3nx8rsPbPmn2fQmYrT2LzGV/gaV439XF5MaWoDOh6AXcYHBV rOiNTJOysF0uf62EU2GMftQ1RTrcO5vZfkpYqxchEnhoSktPGkDjkGRExVbIfcMF2gP40P z83uoYOzNZ01kaZzF4AFcLxA8e2UsID4hh5u7OQgmFmoP+4BwIPedYhluekdz5RekLtHKc j0cEUF8IHZCGfUX/HMHwuAZf9RkrzqpKIi0nnyY/a0AWa9QDAz1aRpbfAFCx7FOCx6/OC8 ABG3BKDMyBA0I1TK1aZR/Rcp8rLKKxgBDgl2jomxcGG8WIZ1MR+dmZ/4vJxefw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695033505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfbW1+XaRDvgxBvovvSozJe7saK94M34r4XJ0R/iimo=; b=vOqRrOWW/VGrtR/rjKaN3CGfRgCtOewkBg8pEjKK/4bZYQ413dbGWp7khUhn0YcyWfgkpH twDwyA0BaEgK8QRzlLg0N0AkH0Qo9+2/b7EDpkQYtHyhdx1nN14g/84iIvzQyNSa+r0C3V GuWRzjQOrcsGnpEj1Gj+upxu/oJCn5WdlXzn9f+/bYN91Vp83pzhvdMFtxu+A5zBx03v3B 7/owYNoMyr/oh7LyqnCTGTxvwD95kl1P8I9tEoywejACuTPuLrDBpEN9pUD28rc5yTuMs+ lqVk/sPirqN8KtXScp5eGOdglNxCC0j5cCjVXw+BgJHC00DRVcwVs3WymmSmHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq1V90jr0zClj; Mon, 18 Sep 2023 10: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 38IAcPVv013849; Mon, 18 Sep 2023 10: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 38IAcPGG013846; Mon, 18 Sep 2023 10:38:25 GMT (envelope-from git) Date: Mon, 18 Sep 2023 10:38:25 GMT Message-Id: <202309181038.38IAcPGG013846@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: 4edfbe719bf6 - stable/14 - mana: add ioctl to support toggling offloading features List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 4edfbe719bf6a15dee388e65b39a116e9307be7f Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=4edfbe719bf6a15dee388e65b39a116e9307be7f commit 4edfbe719bf6a15dee388e65b39a116e9307be7f Author: Wei Hu AuthorDate: 2023-09-13 10:48:02 +0000 Commit: Wei Hu CommitDate: 2023-09-18 10:26:09 +0000 mana: add ioctl to support toggling offloading features With this support, users can enable or disable offloading features such as txcsum, rxcsum, tso and software lro through ifconfig. To enable or disable tx features, do it on mana interface first, then hn/netvsc to sync it up with mana. For example: ifconfig mana0 -txcsum ifconfig hn0 -tscsum To enable or disable rx features, just applying on mana interface would be sufficient. Disabling txcsum imples disabling tso. Enabling tso when txcsum is disabled will result in an error message in dmesg requesting to enable txcsum first. Above applies to ipv6 offloading features as well. Tested by: whu MFC after: 3 days Sponsored by: Microsoft (cherry picked from commit ab7dc1ceb6d36fd804bedb818086ae3ff6692bf7) --- sys/dev/mana/mana_en.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 56fa4e51ba26..064b28fa94a4 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -169,7 +169,7 @@ mana_ioctl(if_t ifp, u_long command, caddr_t data) struct ifrsshash *ifrh; struct ifreq *ifr; uint16_t new_mtu; - int rc = 0; + int rc = 0, mask; switch (command) { case SIOCSIFMTU: @@ -214,6 +214,81 @@ mana_ioctl(if_t ifp, u_long command, caddr_t data) } break; + case SIOCSIFCAP: + MANA_APC_LOCK_LOCK(apc); + ifr = (struct ifreq *)data; + /* + * Fix up requested capabilities w/ supported capabilities, + * since the supported capabilities could have been changed. + */ + mask = (ifr->ifr_reqcap & if_getcapabilities(ifp)) ^ + if_getcapenable(ifp); + + if (mask & IFCAP_TXCSUM) { + if_togglecapenable(ifp, IFCAP_TXCSUM); + if_togglehwassist(ifp, (CSUM_TCP | CSUM_UDP | CSUM_IP)); + + if ((IFCAP_TSO4 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { + mask &= ~IFCAP_TSO4; + if_setcapenablebit(ifp, 0, IFCAP_TSO4); + if_sethwassistbits(ifp, 0, CSUM_IP_TSO); + mana_warn(NULL, + "Also disabled tso4 due to -txcsum.\n"); + } + } + + if (mask & IFCAP_TXCSUM_IPV6) { + if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, (CSUM_UDP_IPV6 | CSUM_TCP_IPV6)); + + if ((IFCAP_TSO6 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { + mask &= ~IFCAP_TSO6; + if_setcapenablebit(ifp, 0, IFCAP_TSO6); + if_sethwassistbits(ifp, 0, CSUM_IP6_TSO); + mana_warn(ifp, + "Also disabled tso6 due to -txcsum6.\n"); + } + } + + if (mask & IFCAP_RXCSUM) + if_togglecapenable(ifp, IFCAP_RXCSUM); + /* We can't diff IPv6 packets from IPv4 packets on RX path. */ + if (mask & IFCAP_RXCSUM_IPV6) + if_togglecapenable(ifp, IFCAP_RXCSUM_IPV6); + + if (mask & IFCAP_LRO) + if_togglecapenable(ifp, IFCAP_LRO); + + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { + MANA_APC_LOCK_UNLOCK(apc); + if_printf(ifp, "Enable txcsum first.\n"); + rc = EAGAIN; + goto out; + } + if_togglecapenable(ifp, IFCAP_TSO4); + if_togglehwassist(ifp, CSUM_IP_TSO); + } + + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { + MANA_APC_LOCK_UNLOCK(apc); + if_printf(ifp, "Enable txcsum6 first.\n"); + rc = EAGAIN; + goto out; + } + if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, CSUM_IP6_TSO); + } + + MANA_APC_LOCK_UNLOCK(apc); +out: + break; + case SIOCSIFMEDIA: case SIOCGIFMEDIA: case SIOCGIFXMEDIA: From nobody Mon Sep 18 10:38: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 4Rq1VB3FQVz4syLx; Mon, 18 Sep 2023 10:38: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 4Rq1VB2Srzz3XS9; Mon, 18 Sep 2023 10:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695033506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jP0K3yH2EhpOlT2XjGT8/NkdiFzuUPDrGl38v/XCGpc=; b=OLjKukkPOG7H0HjNTdu4Ue17g/m4N9Mgt+6BMwGhC7vYHUosdb02wIQC83FcqLgT2IW7px oNuM9S7b7QKj91SVurqsP3ow9YQCxu1Q7Ye4ZWWc/FA7GJWRt8LpmlA/hBt5kQSkU/g1JC 7W7N+/jLhUHpAI1c5YqzTNU8NIP8etuEW8/GBLqqNtZLQyPf5kH4jjbso8Mm2gN0vq97/x Xr3xNNks3mkl2eiHT2/p9d4JA54xbwVPn3oUdYKoBWL0ag0kvXo3+ejjjXOyZHm3BkcMh2 WgBeBYJgkTbNZnrT0nAH0ELSOomlVOwH5wiY3h9gCc/WigeLQNzIm01muTI0Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695033506; a=rsa-sha256; cv=none; b=otO2AebYxGlue143od3v1kdWEXKBa+YIQ1yjEj1/xPYyJdrS1JsxHZ+jXEGMOVOlK5FJSD VY8cBN0DW/b912qJqgI2XX/cmxgZIp9T3yERyzH0tQ5hHDMbFsFBWLLyaNNzuRZVsDA1kp iIHZcXS/SHbjx5tcXa1yD4C8vOy1oIApHLaQ+qmMNQucTXLIeyv2MMOU/UdF9uFAN7lePO K9+Ass9VRnbNUkg0Syqyhho85/hoUIgCRY0f2aIwzayFNrchM0/F420HaAOsx6dwRYjXCv D4QAM2IvkiUc2DQhMjf/shbfLtFgSV7B/MY51qFO3RkZgM5gwP9SeXUksh42RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695033506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jP0K3yH2EhpOlT2XjGT8/NkdiFzuUPDrGl38v/XCGpc=; b=wYjTQz/xGfIVZI3F4Dp3nH9XxfKCO5F1OqM0W/t7/qQmmdK4GKgLclE/HLqNEzNtZ0Rykx NP5fsToF056CYKhtD8zZL8EiflUY6i51OBpsojwO+GDa3ZY6oKU8AejPAn3xQIXXEGoqsm BIxHuUThA8rJ6kJrLeGXY63dGC/gn1bgdQk6OTq32yb1neZuTi8pstrrHvOS4FYrCig+ZB wDA697F3zuOWbkfDiA7SEslBzU9Mm65QU1T6nNuh1xifVrz78CLHc8MWwkKW34B/LxTW2V 5tIMgKmdbA3nT+zglQFiPYcnMxw/vq1JQJTQjuM0W0zjYUbzPpG75y1GM/w7eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq1VB1Ym9zClk; Mon, 18 Sep 2023 10:38: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 38IAcQoO013894; Mon, 18 Sep 2023 10:38:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IAcQDJ013891; Mon, 18 Sep 2023 10:38:26 GMT (envelope-from git) Date: Mon, 18 Sep 2023 10:38:26 GMT Message-Id: <202309181038.38IAcQDJ013891@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: 85bc81352e4b - stable/14 - Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 85bc81352e4b0d0a9da251bacec35eec130eee49 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=85bc81352e4b0d0a9da251bacec35eec130eee49 commit 85bc81352e4b0d0a9da251bacec35eec130eee49 Author: Souradeep Chakrabarti AuthorDate: 2023-09-14 07:11:25 +0000 Commit: Wei Hu CommitDate: 2023-09-18 10:26:59 +0000 Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus In ARM64 Hyper-V UFS filesystem is getting corruption and those corruptions are consistently happening just after hitting a page boundary. It is unable to correctly read disk blocks into buffers that are not aligned to 512-byte boundaries. It happens because storvsc needs physically contiguous memory which may not be the case when bus_dma needs to create a bounce buffer. This can happen when the destination is not cache-line aligned. Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices that are added dynamically via the VMbus protocol and are not represented in the ACPI DSDT. Only the top level VMbus node exists in the DSDT. As such, on ARM64 these devices don't pick up coherence information and default to not hardware coherent. PR: 267654, 272666 Reviewed by: andrew, whu Tested by: lwhsu MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D41728 (cherry picked from commit e7a9817b8d328dda04069b65944ce2ed6f54c6f0) --- sys/dev/hyperv/vmbus/vmbus.c | 33 +++++++++++++++++++++++++++++++++ sys/dev/hyperv/vmbus/vmbus_var.h | 1 + 2 files changed, 34 insertions(+) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index e0f7bbc99ca7..ee412e643b4f 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -137,6 +137,7 @@ static void vmbus_intr_teardown(struct vmbus_softc *); static int vmbus_doattach(struct vmbus_softc *); static void vmbus_event_proc_dummy(struct vmbus_softc *, int); +static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, @@ -183,6 +184,7 @@ static device_method_t vmbus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), + DEVMETHOD(bus_get_dma_tag, vmbus_get_dma_tag), /* pcib interface */ DEVMETHOD(pcib_alloc_msi, vmbus_alloc_msi), @@ -219,6 +221,13 @@ vmbus_get_softc(void) return vmbus_sc; } +static bus_dma_tag_t +vmbus_get_dma_tag(device_t dev, device_t child) +{ + struct vmbus_softc *sc = vmbus_get_softc(); + return (sc->dmat); +} + void vmbus_msghc_reset(struct vmbus_msghc *mh, size_t dsize) { @@ -1382,6 +1391,9 @@ vmbus_doattach(struct vmbus_softc *sc) struct sysctl_oid_list *child; struct sysctl_ctx_list *ctx; int ret; + device_t dev_res; + ACPI_HANDLE handle; + unsigned int coherent; if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); @@ -1402,6 +1414,27 @@ vmbus_doattach(struct vmbus_softc *sc) sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, M_WAITOK | M_ZERO); + /* Coherency attribute */ + dev_res = devclass_get_device(devclass_find("vmbus_res"), 0); + handle = acpi_get_handle(dev_res); + + if (ACPI_FAILURE(acpi_GetInteger(handle, "_CCA", &coherent))) + coherent = 0; + if (bootverbose) + device_printf(sc->vmbus_dev, "Bus is%s cache-coherent\n", + coherent ? "" : " not"); + + bus_dma_tag_create(bus_get_dma_tag(sc->vmbus_dev), + 1, 0, + BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, + NULL, NULL, + BUS_SPACE_MAXSIZE, + BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE, + coherent ? BUS_DMA_COHERENT : 0, + NULL, NULL, + &sc->dmat); /* * Create context for "post message" Hypercalls */ diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index f6fc875deb32..023d27c52cea 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -129,6 +129,7 @@ struct vmbus_softc { void *icookie; int vector; #endif + bus_dma_tag_t dmat; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From nobody Mon Sep 18 10:38: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 4Rq1VD0WZMz4syPh; Mon, 18 Sep 2023 10:38: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 4Rq1VC3hMCz3Xdk; Mon, 18 Sep 2023 10:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695033507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hV/yXuEzAwdD+wXVZVJ1lZrfm595LMDnhnT7szjdRC0=; b=tgopWm6J3dzC0+08G8NyNSbDE9xqbw2iPKeBQ/z12ZUx8kmepz5C72w+s2miWuhcBN4BYu vxDg+15lmU0+83YWRSbSEH0UrpsgdyJcmlkyZSgpde7asrPVdE20Epajdz1UkWV6lx1qZr kBdo21+6DbNkXB97tPcse2YaOvPAjlQSYj2DJKCsVtQ0KwlqeQDcKHIDLx8tAowIIoKGz+ xqaDk2IYx4Mq34g1DNwb2PYXC5IgB1XDfDf5TG4KLgrnmvuiFoQWpjx1ASHTVjCoEAikiq i1c50w0vcFzs+sH81MOVSlMtGHvQjQtP2DM/tGWsmc5RSgNyfR02tJD1i6ZvXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695033507; a=rsa-sha256; cv=none; b=DI20mGp6aPtKZtv3+4cVlX6oOYGbLc6Z+i+HmcP4bmhZQEhohqeb26HI1gKTm4bCyfdDQ3 47MNZLtqXNHhUFDu9XBkI9RrCHPJmmFCNds694GMn8TeEy/9VY+jgp+EMdv1sWAxH9RtQE WDWGY6Ez3InCoBd6dvY1kdo/XZWwfsH/oIi9yG9SjXjAE0dk7I2YlDf6f11BtAMxWwdpCd 9ae1iedeE0D8eob5NQGoCHAQpioRIKIwmry0H0x/8qTydreXGXx4gLVfHSBpb9Fv8QXKH4 4fUF57EckCseCuF9Oq667CdW560V0fniXdi8F1l0uNDEiVXbizKXP6riyRQ32g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695033507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hV/yXuEzAwdD+wXVZVJ1lZrfm595LMDnhnT7szjdRC0=; b=giSbiG26tQXQZHvwvPPjOOXypZZA3HEXC56Iaoarl+5e9aoSXcfdHvfkPkUJYOMMd6qR2h 10/nwQkCtQERb0gb+e34WVzEJfgqWKW+7jDR9lWHONO1F3q9OyKAEPbWZcPJ9BvAcD44gU CZoLi1oXFcDJIr8FgZ/P5+9oiaK322NPbDejRXu+j56DmSbhCNH90cNNbo/dC5Ln6DTTAV 4frx1+JcCnW7LFuRQOt8dif740NdZxiYTQ2RpNNP4z9K08DVK6OE+TlXqIfLOuYNpu5CF5 JsCB67G3IwQL01rLK4auKc1GGJ6uSf9nEYekRqh4OFVY10DYTHoCtqITH9RkXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq1VC2bgFzCll; Mon, 18 Sep 2023 10:38: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 38IAcRfU013942; Mon, 18 Sep 2023 10:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IAcRw0013939; Mon, 18 Sep 2023 10:38:27 GMT (envelope-from git) Date: Mon, 18 Sep 2023 10:38:27 GMT Message-Id: <202309181038.38IAcRw0013939@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: a72a0af8194e - stable/14 - mana: add lro and tso stat counters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: a72a0af8194effa5f7e7a88d09673ed798819e88 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=a72a0af8194effa5f7e7a88d09673ed798819e88 commit a72a0af8194effa5f7e7a88d09673ed798819e88 Author: Wei Hu AuthorDate: 2023-09-14 11:56:20 +0000 Commit: Wei Hu CommitDate: 2023-09-18 10:27:46 +0000 mana: add lro and tso stat counters Add a few stat counters for tso and lro. MFC after: 3 days Sponsored by: Microsoft (cherry picked from commit b167e449c8db01f082691503fb5c1255ad5750eb) --- sys/dev/mana/mana.h | 5 ++ sys/dev/mana/mana_en.c | 12 ++++ sys/dev/mana/mana_sysctl.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) diff --git a/sys/dev/mana/mana.h b/sys/dev/mana/mana.h index 9a22ea87baa3..ab394f3203ad 100644 --- a/sys/dev/mana/mana.h +++ b/sys/dev/mana/mana.h @@ -170,6 +170,9 @@ struct mana_txq { struct mtx txq_mtx; char txq_mtx_name[16]; + uint64_t tso_pkts; + uint64_t tso_bytes; + struct task enqueue_task; struct taskqueue *enqueue_tq; @@ -423,6 +426,8 @@ struct mana_rxq { uint32_t buf_index; + uint64_t lro_tried; + uint64_t lro_failed; struct mana_stats stats; /* MUST BE THE LAST MEMBER: diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 064b28fa94a4..812a42e51dfc 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -501,6 +501,7 @@ mana_xmit(struct mana_txq *txq) struct gdma_queue *gdma_sq; struct mana_cq *cq; int err, len; + bool is_tso; gdma_sq = txq->gdma_sq; cq = &apc->tx_qp[txq->idx].tx_cq; @@ -578,7 +579,10 @@ mana_xmit(struct mana_txq *txq) pkg.wqe_req.flags = 0; pkg.wqe_req.client_data_unit = 0; + is_tso = false; if (mbuf->m_pkthdr.csum_flags & CSUM_TSO) { + is_tso = true; + if (MANA_L3_PROTO(mbuf) == ETHERTYPE_IP) pkg.tx_oob.s_oob.is_outer_ipv4 = 1; else @@ -641,6 +645,11 @@ mana_xmit(struct mana_txq *txq) packets++; bytes += len; + + if (is_tso) { + txq->tso_pkts++; + txq->tso_bytes += len; + } } counter_enter(); @@ -1697,9 +1706,12 @@ mana_rx_mbuf(struct mbuf *mbuf, struct mana_rxcomp_oob *cqe, do_if_input = true; if ((if_getcapenable(ndev) & IFCAP_LRO) && do_lro) { + rxq->lro_tried++; if (rxq->lro.lro_cnt != 0 && tcp_lro_rx(&rxq->lro, mbuf, 0) == 0) do_if_input = false; + else + rxq->lro_failed++; } if (do_if_input) { if_input(ndev, mbuf); diff --git a/sys/dev/mana/mana_sysctl.c b/sys/dev/mana/mana_sysctl.c index 79a4867a0abf..d03ebe44ab31 100644 --- a/sys/dev/mana/mana_sysctl.c +++ b/sys/dev/mana/mana_sysctl.c @@ -46,6 +46,96 @@ SYSCTL_INT(_hw_mana, OID_AUTO, log_level, CTLFLAG_RWTUN, SYSCTL_CONST_STRING(_hw_mana, OID_AUTO, driver_version, CTLFLAG_RD, DRV_MODULE_VERSION, "MANA driver version"); +static int +mana_sysctl_rx_stat_agg_u64(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, i, err; + struct mana_rxq *rxq; + uint64_t stat; + + stat = 0; + for (i = 0; i < apc->num_queues; i++) { + rxq = apc->rxqs[i]; + stat += *((uint64_t *)((uint8_t *)rxq + offset)); + } + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + + for (i = 0; i < apc->num_queues; i++) { + rxq = apc->rxqs[i]; + *((uint64_t *)((uint8_t *)rxq + offset)) = 0; + } + return 0; +} + +static int +mana_sysctl_rx_stat_u16(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, err; + struct mana_rxq *rxq; + uint64_t stat; + uint16_t val; + + rxq = apc->rxqs[0]; + val = *((uint16_t *)((uint8_t *)rxq + offset)); + stat = val; + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + else + return 0; +} + +static int +mana_sysctl_rx_stat_u32(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, err; + struct mana_rxq *rxq; + uint64_t stat; + uint32_t val; + + rxq = apc->rxqs[0]; + val = *((uint32_t *)((uint8_t *)rxq + offset)); + stat = val; + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + else + return 0; +} + +static int +mana_sysctl_tx_stat_agg_u64(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, i, err; + struct mana_txq *txq; + uint64_t stat; + + stat = 0; + for (i = 0; i < apc->num_queues; i++) { + txq = &apc->tx_qp[i].txq; + stat += *((uint64_t *)((uint8_t *)txq + offset)); + } + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + + for (i = 0; i < apc->num_queues; i++) { + txq = &apc->tx_qp[i].txq; + *((uint64_t *)((uint8_t *)txq + offset)) = 0; + } + return 0; +} + void mana_sysctl_add_port(struct mana_port_context *apc) { @@ -99,6 +189,52 @@ mana_sysctl_add_port(struct mana_port_context *apc) CTLFLAG_RD, &port_stats->rx_drops, "Receive packet drops"); SYSCTL_ADD_COUNTER_U64(ctx, stats_list, OID_AUTO, "tx_drops", CTLFLAG_RD, &port_stats->tx_drops, "Transmit packet drops"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_queued", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_queued), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO queued"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_flushed", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_flushed), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO flushed"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_bad_csum", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_bad_csum), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO bad checksum"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_tried", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro_tried), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO tried"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_failed", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro_failed), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO failed"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_ackcnt_lim", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_ackcnt_lim), + mana_sysctl_rx_stat_u16, + "LU", "Max # of ACKs to be aggregated by LRO"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_length_lim", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_length_lim), + mana_sysctl_rx_stat_u32, + "LU", "Max len of aggregated data in byte by LRO"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_cnt", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_cnt), + mana_sysctl_rx_stat_u32, + "LU", "Max # or LRO packet count"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "tx_tso_packets", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_txq, tso_pkts), + mana_sysctl_tx_stat_agg_u64, "LU", "TSO packets"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "tx_tso_bytes", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_txq, tso_bytes), + mana_sysctl_tx_stat_agg_u64, "LU", "TSO bytes"); } void From nobody Mon Sep 18 14:59: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 4Rq7Hv49mpz4tKWn; Mon, 18 Sep 2023 14:59: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 4Rq7Hv3R62z4fZY; Mon, 18 Sep 2023 14:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXohJFqB5e+uVx62osqhE5cS/lxNt3oXwnLH6KXVzoU=; b=izzo9PARmbkca2vlgqd5pFXS3ubU67I7XxLhJjpl4OiWSvFxp01+Zxzi79+fM/tr2Okibr MLVRdKGY6YZViJccx9ngXmPduS3PJ64oG246ut79DrN2cFHW1gehcjzxlvyU9Nw91tYyKP GCW56IoIzcNUDtnsj5dB05X9ujWoEfXdLmg0VPmaPiSHpK7JNIte/R9a4ZcOmutfy4DGgK czezHkGu5cZh3d3BJAL84M3JEAnyEn3czTH78qofadQ/kIjT6Zl7YtLZ5qSNu/4KKQGUJs HBX9G8dCkLG3b8HDEVIPh1/HiRAhFnA+SJXRxrw3mg4T74EVyeCmcoiLUhM2uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695049195; a=rsa-sha256; cv=none; b=jOMHET92X9LYshIbhNZ0ZkEUsvDuFHxZgJG+NMkADLJAS8UXcPyEccBQDouza2IHbAMiNN mxWZ0LzSPu5noTN2G+Z7oljszrrvZi394RqnZ3MSgz5XahPud+GC7FtftSAMh4lrw/gQNl s4pL87BqMx949hJZi7b+o+Fbr0seXxZK8Pn+KU2HWpJEYFCmz9LQAWxXqpW6RQ+TsD9NJS 6u7959iYeCYohXig+GHyoWd0EeUjOnRtmGVV4018tVHeB3qcGKT8KmFaJe7LkpwXntM9xQ ZGR9YEwQ9wGIvRXNqc7tq8HgKkjBtexkmo4vdiS8/PBPCq4srQSgeVQKcu7KkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXohJFqB5e+uVx62osqhE5cS/lxNt3oXwnLH6KXVzoU=; b=xfJEQ2cE2cyJyty5QA6kY4tijgYNMYJ/kw+v2Bxtw6ObriWpdV/XGnuHTEzSSxcez93ELq +eKLy3sVfsyELjGnvXAEtJQSrW9rVqWlcef4NZG/lnF9ksqRWiT9H7CnB5/JxpTErhJrkN Mn6qcVZDC8pZxl8hkp00Zal8qPhKANlYkdebx4llOwFGdEj8x9qT8BRnCSv0BBumb7ijFo GcyKYCwf9De9LXl5Uv3tg++QgVqpYMa/45/biEeD8iE32pC5PvxcMR7VoGdqlmMrrLthGB hnyTlcfWz/B09SRVxL5Oz7JYRJDJb+GghhT10D2ZRzvCk93ePFpmdKxkl/JCEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq7Hv2Vbfzbdf; Mon, 18 Sep 2023 14:59: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 38IExtFG047207; Mon, 18 Sep 2023 14:59:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IExtWY047204; Mon, 18 Sep 2023 14:59:55 GMT (envelope-from git) Date: Mon, 18 Sep 2023 14:59:55 GMT Message-Id: <202309181459.38IExtWY047204@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: f35cec70639f - releng/14.0 - mana: add ioctl to support toggling offloading features List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f35cec70639f3c937807feb6dc4081ae7d605265 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=f35cec70639f3c937807feb6dc4081ae7d605265 commit f35cec70639f3c937807feb6dc4081ae7d605265 Author: Wei Hu AuthorDate: 2023-09-13 10:48:02 +0000 Commit: Wei Hu CommitDate: 2023-09-18 14:56:48 +0000 mana: add ioctl to support toggling offloading features With this support, users can enable or disable offloading features such as txcsum, rxcsum, tso and software lro through ifconfig. To enable or disable tx features, do it on mana interface first, then hn/netvsc to sync it up with mana. For example: ifconfig mana0 -txcsum ifconfig hn0 -tscsum To enable or disable rx features, just applying on mana interface would be sufficient. Disabling txcsum imples disabling tso. Enabling tso when txcsum is disabled will result in an error message in dmesg requesting to enable txcsum first. Above applies to ipv6 offloading features as well. Approved by: re (gjb) Tested by: whu Sponsored by: Microsoft (cherry picked from commit ab7dc1ceb6d36fd804bedb818086ae3ff6692bf7) (cherry picked from commit 4edfbe719bf6a15dee388e65b39a116e9307be7f) --- sys/dev/mana/mana_en.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 56fa4e51ba26..064b28fa94a4 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -169,7 +169,7 @@ mana_ioctl(if_t ifp, u_long command, caddr_t data) struct ifrsshash *ifrh; struct ifreq *ifr; uint16_t new_mtu; - int rc = 0; + int rc = 0, mask; switch (command) { case SIOCSIFMTU: @@ -214,6 +214,81 @@ mana_ioctl(if_t ifp, u_long command, caddr_t data) } break; + case SIOCSIFCAP: + MANA_APC_LOCK_LOCK(apc); + ifr = (struct ifreq *)data; + /* + * Fix up requested capabilities w/ supported capabilities, + * since the supported capabilities could have been changed. + */ + mask = (ifr->ifr_reqcap & if_getcapabilities(ifp)) ^ + if_getcapenable(ifp); + + if (mask & IFCAP_TXCSUM) { + if_togglecapenable(ifp, IFCAP_TXCSUM); + if_togglehwassist(ifp, (CSUM_TCP | CSUM_UDP | CSUM_IP)); + + if ((IFCAP_TSO4 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { + mask &= ~IFCAP_TSO4; + if_setcapenablebit(ifp, 0, IFCAP_TSO4); + if_sethwassistbits(ifp, 0, CSUM_IP_TSO); + mana_warn(NULL, + "Also disabled tso4 due to -txcsum.\n"); + } + } + + if (mask & IFCAP_TXCSUM_IPV6) { + if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, (CSUM_UDP_IPV6 | CSUM_TCP_IPV6)); + + if ((IFCAP_TSO6 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { + mask &= ~IFCAP_TSO6; + if_setcapenablebit(ifp, 0, IFCAP_TSO6); + if_sethwassistbits(ifp, 0, CSUM_IP6_TSO); + mana_warn(ifp, + "Also disabled tso6 due to -txcsum6.\n"); + } + } + + if (mask & IFCAP_RXCSUM) + if_togglecapenable(ifp, IFCAP_RXCSUM); + /* We can't diff IPv6 packets from IPv4 packets on RX path. */ + if (mask & IFCAP_RXCSUM_IPV6) + if_togglecapenable(ifp, IFCAP_RXCSUM_IPV6); + + if (mask & IFCAP_LRO) + if_togglecapenable(ifp, IFCAP_LRO); + + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM & if_getcapenable(ifp))) { + MANA_APC_LOCK_UNLOCK(apc); + if_printf(ifp, "Enable txcsum first.\n"); + rc = EAGAIN; + goto out; + } + if_togglecapenable(ifp, IFCAP_TSO4); + if_togglehwassist(ifp, CSUM_IP_TSO); + } + + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & if_getcapenable(ifp)) && + !(IFCAP_TXCSUM_IPV6 & if_getcapenable(ifp))) { + MANA_APC_LOCK_UNLOCK(apc); + if_printf(ifp, "Enable txcsum6 first.\n"); + rc = EAGAIN; + goto out; + } + if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, CSUM_IP6_TSO); + } + + MANA_APC_LOCK_UNLOCK(apc); +out: + break; + case SIOCSIFMEDIA: case SIOCGIFMEDIA: case SIOCGIFXMEDIA: From nobody Mon Sep 18 14:59: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 4Rq7Hw69wtz4tKcn; Mon, 18 Sep 2023 14:59: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 4Rq7Hw562cz4fmh; Mon, 18 Sep 2023 14:59:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ba+QmhwCuDwgkFRgftFA/0pXboaUhUiWNR18lMaJac=; b=cpz8w9381hOC8mjH+1dZ6p7HhwReuS8nQK2w43RS+L5+vRSFqJem7HC/EFASmpT2isXRf4 Dm1U6aKgeOU8GCkFv/MRtL6O2d7Mr8r4lGS8S64XWDhH1pIaD/WY7HD+dHVa7sJNOTEFmm XlqQ8wF7gEOPhT4rJ03xWc6ZnAvwgbkA4Amk2izZg9pKcKg5zJTBA8/YG/jAijCgsZKcZK uGLaiIMLe1vF3fm/ZZl52vcGJX4M1DvCElFTk2Z4eMCP/vg86Wml1LKOceEqfUMj9Upw8X 071L2VrIZldASag1qCw0kwvua8kz10+KRgPE+dxMqW2ZswVSRnbRRHYKLlCRKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695049196; a=rsa-sha256; cv=none; b=poPOZwdjWhv5HkVWLBmXF/Nypt9ZOqAwKOGWy3PrMyFHupphqe3hItOYUEYata28y0nh7u bkfjKModGb5dujWBDGQhjJ5QJ8fv2Kdj6Ez015XeVF5dtwt6S4DJbXk+CxfDpibbkVxXC+ YvlTmOKqXhee8HQ0eO4aTTweZw4pNox9fTSZ4fVUJvXaMaY7A31Zo/EblRIcAprRFTGhqh AmGZU4sev+4SWvQhnzjoaZ4Hu4ok4oumI1lPr7Zc9WCR02AmY0A4bB7bhPSCGN5JmgMIkk +/Hi155QsxHTMv8IFtO24P24vFaWvYmFACg5n+nK66xP82N3fJdmCRD2ML1pMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ba+QmhwCuDwgkFRgftFA/0pXboaUhUiWNR18lMaJac=; b=RMRnHVBq2DetlENAGrdsl4epimpG1TW355WOnTg4yVFTcCPbrjJAMfyfp7iP6L6sBzm0vy L0sV/n+e/2BfQ9YoUVtK6EuHEuzKFlX3+xehv5DKppzh2KMpCFa2WtxvNkK/lAA2QwV9fn +2nI8I6gfoMzki2NPdjy1Kaf82HBxvX7Isc8HqbNPPzctq/3mD/w4f5ehnDsstUkYGXso0 CVTx3M147ACmxyQUfw2pJ+b46s6rEyceMXJ+WGf5eyIvRYZf592+FagqDhf81kDP8J2lpr LO3tAL5PKEOjLid6KZl5mOKpoBTpXGCV+vzYX4LACO8jKAtKmwkAk24EsI1LVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq7Hw3TxXzbG3; Mon, 18 Sep 2023 14:59: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 38IExudu047254; Mon, 18 Sep 2023 14:59:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IExuro047251; Mon, 18 Sep 2023 14:59:56 GMT (envelope-from git) Date: Mon, 18 Sep 2023 14:59:56 GMT Message-Id: <202309181459.38IExuro047251@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: 48a799af88c0 - releng/14.0 - Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 48a799af88c0c77963ffb23eba797f85f86751dd Auto-Submitted: auto-generated The branch releng/14.0 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=48a799af88c0c77963ffb23eba797f85f86751dd commit 48a799af88c0c77963ffb23eba797f85f86751dd Author: Souradeep Chakrabarti AuthorDate: 2023-09-14 07:11:25 +0000 Commit: Wei Hu CommitDate: 2023-09-18 14:57:57 +0000 Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus In ARM64 Hyper-V UFS filesystem is getting corruption and those corruptions are consistently happening just after hitting a page boundary. It is unable to correctly read disk blocks into buffers that are not aligned to 512-byte boundaries. It happens because storvsc needs physically contiguous memory which may not be the case when bus_dma needs to create a bounce buffer. This can happen when the destination is not cache-line aligned. Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices that are added dynamically via the VMbus protocol and are not represented in the ACPI DSDT. Only the top level VMbus node exists in the DSDT. As such, on ARM64 these devices don't pick up coherence information and default to not hardware coherent. Approved by: re (gjb) PR: 267654, 272666 Reviewed by: andrew, whu Tested by: lwhsu Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D41728 (cherry picked from commit e7a9817b8d328dda04069b65944ce2ed6f54c6f0) (cherry picked from commit 85bc81352e4b0d0a9da251bacec35eec130eee49) --- sys/dev/hyperv/vmbus/vmbus.c | 33 +++++++++++++++++++++++++++++++++ sys/dev/hyperv/vmbus/vmbus_var.h | 1 + 2 files changed, 34 insertions(+) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index e0f7bbc99ca7..ee412e643b4f 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -137,6 +137,7 @@ static void vmbus_intr_teardown(struct vmbus_softc *); static int vmbus_doattach(struct vmbus_softc *); static void vmbus_event_proc_dummy(struct vmbus_softc *, int); +static bus_dma_tag_t vmbus_get_dma_tag(device_t parent, device_t child); static struct vmbus_softc *vmbus_sc; SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, @@ -183,6 +184,7 @@ static device_method_t vmbus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), + DEVMETHOD(bus_get_dma_tag, vmbus_get_dma_tag), /* pcib interface */ DEVMETHOD(pcib_alloc_msi, vmbus_alloc_msi), @@ -219,6 +221,13 @@ vmbus_get_softc(void) return vmbus_sc; } +static bus_dma_tag_t +vmbus_get_dma_tag(device_t dev, device_t child) +{ + struct vmbus_softc *sc = vmbus_get_softc(); + return (sc->dmat); +} + void vmbus_msghc_reset(struct vmbus_msghc *mh, size_t dsize) { @@ -1382,6 +1391,9 @@ vmbus_doattach(struct vmbus_softc *sc) struct sysctl_oid_list *child; struct sysctl_ctx_list *ctx; int ret; + device_t dev_res; + ACPI_HANDLE handle; + unsigned int coherent; if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); @@ -1402,6 +1414,27 @@ vmbus_doattach(struct vmbus_softc *sc) sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, M_WAITOK | M_ZERO); + /* Coherency attribute */ + dev_res = devclass_get_device(devclass_find("vmbus_res"), 0); + handle = acpi_get_handle(dev_res); + + if (ACPI_FAILURE(acpi_GetInteger(handle, "_CCA", &coherent))) + coherent = 0; + if (bootverbose) + device_printf(sc->vmbus_dev, "Bus is%s cache-coherent\n", + coherent ? "" : " not"); + + bus_dma_tag_create(bus_get_dma_tag(sc->vmbus_dev), + 1, 0, + BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, + NULL, NULL, + BUS_SPACE_MAXSIZE, + BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE, + coherent ? BUS_DMA_COHERENT : 0, + NULL, NULL, + &sc->dmat); /* * Create context for "post message" Hypercalls */ diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index f6fc875deb32..023d27c52cea 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -129,6 +129,7 @@ struct vmbus_softc { void *icookie; int vector; #endif + bus_dma_tag_t dmat; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From nobody Mon Sep 18 14:59: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 4Rq7Hx6cpdz4tKPF; Mon, 18 Sep 2023 14:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rq7Hx5RqVz4fdb; Mon, 18 Sep 2023 14:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bVyJuyRK7b+fWytTqBuM9p6vU7T1sLl2qMfA/zqpoJY=; b=btV79FXSnUDdp/WehXV6iIkwnOckrb/0plX/oHv9Po4Hv8onsAfKK3D0hwyP0SqR9mFbj5 CGPKm2UBKBL+uWcg4P+c7eWZXEaiXUlsKFcyS/gNOL1KHRS8sXeDxBHRNpZ8+lNajeOYOG hpAOq71ysyH/VFgYTKovd8a74LHGNHnZQzr972qGrOSBeNo/MXELNYxO6m6wyifI2jLDyX tGT5QIKHJbfvY+rdTa54KnGfGdxTthpEedZWHYe7gAdVXbUalwp3ulV6/I7NvOiTGEdh9d Ov3OIvPgfKf154TbXITRXxCJyufutvsPz1fCoE2S3Kgxbv/g/skdOGQ5R9/1cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695049197; a=rsa-sha256; cv=none; b=xLUHfdXEKB6u8n7I6ru84YT+SzToN8Kb8RcN7iK/YG63C7JdU5eI1zEdodndfShEn/OWis gtj5GbX/GedAWAv272nMskiul0AF0aer7UpNE/6eIOJwNK6fYG1YeCPmfBArkAm8Pr81hw eeEimGo+c48C/6iHAN7Ofjy7DML3RS8rc9W//oCicYqZIq+NNK4fu9a71cpvBA33T5+0Sd W/73S+9tZ0NatcpvhuI8JvcxTc4u4qKdxyQBJk9i++QPyusycxH1hfiDzuJKWktvvN3CFV G6bIlIHt8NIrh5wUF/gMRcJXW7Zzzldi/oDbt32sjw8uJABd1ZlbIK5c4oRLXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695049197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bVyJuyRK7b+fWytTqBuM9p6vU7T1sLl2qMfA/zqpoJY=; b=PfXxlNoajdQeFeUosUyryMeBBUi5Nl6H1EKcXgjicg9o4VIfB1e4y3Dlla9G/OLJzxbv5C KndME5LoZrvhJHCtyNk6YNwDZmJPxrwBY77Yd38EqxEF0EptL38nv9FZHf2Cc4VbOLq974 bSfRBK1NDnapdayzh6gzsxNa601NIkSm9ysoontvFeRFyg4aBsvmpk2nCYSV/899HWjr9M K7nLJUGWPrilDZjU9EnhO8OMyuUUo8UyxvJ1IbHXgCWMvHNDST6jKC8m+zceKELrLw1LJm jUxzz2zZ4lmQwFDKB7Sma258OEi5lFD0H0aVlrHRHuLMpEHLSI/ioE9ogM/P8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq7Hx4Xmtzbgg; Mon, 18 Sep 2023 14:59: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 38IExv5j047303; Mon, 18 Sep 2023 14:59:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IExvgH047300; Mon, 18 Sep 2023 14:59:57 GMT (envelope-from git) Date: Mon, 18 Sep 2023 14:59:57 GMT Message-Id: <202309181459.38IExvgH047300@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: ebb74abbd8a2 - releng/14.0 - mana: add lro and tso stat counters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ebb74abbd8a2f01640678ca09b58f725175f2b7d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=ebb74abbd8a2f01640678ca09b58f725175f2b7d commit ebb74abbd8a2f01640678ca09b58f725175f2b7d Author: Wei Hu AuthorDate: 2023-09-14 11:56:20 +0000 Commit: Wei Hu CommitDate: 2023-09-18 14:58:13 +0000 mana: add lro and tso stat counters Add a few stat counters for tso and lro. Approved by: re (gjb) Sponsored by: Microsoft (cherry picked from commit b167e449c8db01f082691503fb5c1255ad5750eb) (cherry picked from commit a72a0af8194effa5f7e7a88d09673ed798819e88) --- sys/dev/mana/mana.h | 5 ++ sys/dev/mana/mana_en.c | 12 ++++ sys/dev/mana/mana_sysctl.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) diff --git a/sys/dev/mana/mana.h b/sys/dev/mana/mana.h index 9a22ea87baa3..ab394f3203ad 100644 --- a/sys/dev/mana/mana.h +++ b/sys/dev/mana/mana.h @@ -170,6 +170,9 @@ struct mana_txq { struct mtx txq_mtx; char txq_mtx_name[16]; + uint64_t tso_pkts; + uint64_t tso_bytes; + struct task enqueue_task; struct taskqueue *enqueue_tq; @@ -423,6 +426,8 @@ struct mana_rxq { uint32_t buf_index; + uint64_t lro_tried; + uint64_t lro_failed; struct mana_stats stats; /* MUST BE THE LAST MEMBER: diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 064b28fa94a4..812a42e51dfc 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -501,6 +501,7 @@ mana_xmit(struct mana_txq *txq) struct gdma_queue *gdma_sq; struct mana_cq *cq; int err, len; + bool is_tso; gdma_sq = txq->gdma_sq; cq = &apc->tx_qp[txq->idx].tx_cq; @@ -578,7 +579,10 @@ mana_xmit(struct mana_txq *txq) pkg.wqe_req.flags = 0; pkg.wqe_req.client_data_unit = 0; + is_tso = false; if (mbuf->m_pkthdr.csum_flags & CSUM_TSO) { + is_tso = true; + if (MANA_L3_PROTO(mbuf) == ETHERTYPE_IP) pkg.tx_oob.s_oob.is_outer_ipv4 = 1; else @@ -641,6 +645,11 @@ mana_xmit(struct mana_txq *txq) packets++; bytes += len; + + if (is_tso) { + txq->tso_pkts++; + txq->tso_bytes += len; + } } counter_enter(); @@ -1697,9 +1706,12 @@ mana_rx_mbuf(struct mbuf *mbuf, struct mana_rxcomp_oob *cqe, do_if_input = true; if ((if_getcapenable(ndev) & IFCAP_LRO) && do_lro) { + rxq->lro_tried++; if (rxq->lro.lro_cnt != 0 && tcp_lro_rx(&rxq->lro, mbuf, 0) == 0) do_if_input = false; + else + rxq->lro_failed++; } if (do_if_input) { if_input(ndev, mbuf); diff --git a/sys/dev/mana/mana_sysctl.c b/sys/dev/mana/mana_sysctl.c index 79a4867a0abf..d03ebe44ab31 100644 --- a/sys/dev/mana/mana_sysctl.c +++ b/sys/dev/mana/mana_sysctl.c @@ -46,6 +46,96 @@ SYSCTL_INT(_hw_mana, OID_AUTO, log_level, CTLFLAG_RWTUN, SYSCTL_CONST_STRING(_hw_mana, OID_AUTO, driver_version, CTLFLAG_RD, DRV_MODULE_VERSION, "MANA driver version"); +static int +mana_sysctl_rx_stat_agg_u64(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, i, err; + struct mana_rxq *rxq; + uint64_t stat; + + stat = 0; + for (i = 0; i < apc->num_queues; i++) { + rxq = apc->rxqs[i]; + stat += *((uint64_t *)((uint8_t *)rxq + offset)); + } + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + + for (i = 0; i < apc->num_queues; i++) { + rxq = apc->rxqs[i]; + *((uint64_t *)((uint8_t *)rxq + offset)) = 0; + } + return 0; +} + +static int +mana_sysctl_rx_stat_u16(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, err; + struct mana_rxq *rxq; + uint64_t stat; + uint16_t val; + + rxq = apc->rxqs[0]; + val = *((uint16_t *)((uint8_t *)rxq + offset)); + stat = val; + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + else + return 0; +} + +static int +mana_sysctl_rx_stat_u32(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, err; + struct mana_rxq *rxq; + uint64_t stat; + uint32_t val; + + rxq = apc->rxqs[0]; + val = *((uint32_t *)((uint8_t *)rxq + offset)); + stat = val; + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + else + return 0; +} + +static int +mana_sysctl_tx_stat_agg_u64(SYSCTL_HANDLER_ARGS) +{ + struct mana_port_context *apc = arg1; + int offset = arg2, i, err; + struct mana_txq *txq; + uint64_t stat; + + stat = 0; + for (i = 0; i < apc->num_queues; i++) { + txq = &apc->tx_qp[i].txq; + stat += *((uint64_t *)((uint8_t *)txq + offset)); + } + + err = sysctl_handle_64(oidp, &stat, 0, req); + if (err || req->newptr == NULL) + return err; + + for (i = 0; i < apc->num_queues; i++) { + txq = &apc->tx_qp[i].txq; + *((uint64_t *)((uint8_t *)txq + offset)) = 0; + } + return 0; +} + void mana_sysctl_add_port(struct mana_port_context *apc) { @@ -99,6 +189,52 @@ mana_sysctl_add_port(struct mana_port_context *apc) CTLFLAG_RD, &port_stats->rx_drops, "Receive packet drops"); SYSCTL_ADD_COUNTER_U64(ctx, stats_list, OID_AUTO, "tx_drops", CTLFLAG_RD, &port_stats->tx_drops, "Transmit packet drops"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_queued", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_queued), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO queued"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_flushed", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_flushed), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO flushed"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_bad_csum", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_bad_csum), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO bad checksum"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_tried", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro_tried), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO tried"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "rx_lro_failed", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro_failed), + mana_sysctl_rx_stat_agg_u64, "LU", "LRO failed"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_ackcnt_lim", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_ackcnt_lim), + mana_sysctl_rx_stat_u16, + "LU", "Max # of ACKs to be aggregated by LRO"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_length_lim", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_length_lim), + mana_sysctl_rx_stat_u32, + "LU", "Max len of aggregated data in byte by LRO"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "lro_cnt", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_rxq, lro.lro_cnt), + mana_sysctl_rx_stat_u32, + "LU", "Max # or LRO packet count"); + + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "tx_tso_packets", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_txq, tso_pkts), + mana_sysctl_tx_stat_agg_u64, "LU", "TSO packets"); + SYSCTL_ADD_PROC(ctx, stats_list, OID_AUTO, "tx_tso_bytes", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_STATS, apc, + __offsetof(struct mana_txq, tso_bytes), + mana_sysctl_tx_stat_agg_u64, "LU", "TSO bytes"); } void From nobody Mon Sep 18 19:11: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 4RqDtB30kvz4td3s; Mon, 18 Sep 2023 19:11: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 4RqDtB2KYHz4GVL; Mon, 18 Sep 2023 19:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695064290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c+GUQnwEclBLr2KYpUtucK9a2kRhrIy02R0U9x+AbE=; b=etqe9jjc3dhBhYa9vQke2JYz4BYY2CVitStwFEn50aycTUZTZqrlABNYM8J8ov7Epm59V+ dunt0EMiOiq6HVHV3tDXyVyOwbO2TazY4S3nVFfw4b2+0nB3cZTXublZn29/lr15C0utrE kO+Aj3hBf6slefOqpsNl3RQ2v/kYTmxG9lqb7P/SC4X/GfbeL+UADwJf9Tz3DkNt0hfcB8 YWAXvtKUlBJzHFdJ1Aaotqfs0zONCPQp+4vu1KtjXZV8C+6CdvuXjZOOIf3IJPVA9zLjZD wI16YY0fpjRBFHAiSKbAFVyvp2P2EWC7tg9PHFdir82FGvHqfwc0YJdT+ydafw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695064290; a=rsa-sha256; cv=none; b=pKSlInuDssWZWiTMcW5VEmWy/OR47wp2rTbnpmfbomFrLzcT/Xmt6qXUNioIRmoQb3pTmG nNsKhvfShGkAiXh354S0o4bpjnGUZAIlew/V0bK3y7kkXfT5+Uac1OfTP0BO+zopYZkHUQ Zrb24sPEdzOy10h9ZeBUPhRgffD9cYbY90YCotYzIrh9X7J3sIJN2incAdXwKKR6+qAsGa 7nD7tgemRg3o4VSVKnfFeCumQIFwWTv+WDBbmI0iCi1VLmkB2pyxT4x4+TBy2/h9tMx8UM 9QG/746WVAFn6OMQSLtvoF4fmGwWWC/+aXnB6LPpppahOeyAmIHlhSN1DzjSVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695064290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c+GUQnwEclBLr2KYpUtucK9a2kRhrIy02R0U9x+AbE=; b=B6bKeiARZ8F53jR78e2ToezNShE5eiCB/dO3NIlGZfUfWUiVNtkqm7O9HOsX25ss1DIQM1 C6TXgiVHN4koP9WRDwkK4vCUyPt+qYRhW5zQHnuWwQOEeGuIK248B/ui9FBwHFQ7kIJx+Y 3mQFsBCKzWhlJsoBxBRnCxssXxm2/e/uudF04/iskK0IXfPv5Aik5l12HymZ0oTybg3dOS mfAd1Ra7W5S/t8RPdWvZECLSZ8AaK3/DYu5JGPu+go2MHfs9NOnmTr6gcShIw93yNRRNPs 7bE8rJ8Bc1FfEult2C4dxqJT6PuDYaKE6DpNqBPrzr16f2uoa/REL1EK3GlAJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqDtB1Mh4zjSn; Mon, 18 Sep 2023 19:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38IJBUir072871; Mon, 18 Sep 2023 19:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IJBUF6072868; Mon, 18 Sep 2023 19:11:30 GMT (envelope-from git) Date: Mon, 18 Sep 2023 19:11:30 GMT Message-Id: <202309181911.38IJBUF6072868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 3287f64a7314 - stable/14 - cxgbe(4): Avoid hang on kldunload on netlink enabled kernels. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3287f64a731406a305b76b86d0b1a7ed47786359 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3287f64a731406a305b76b86d0b1a7ed47786359 commit 3287f64a731406a305b76b86d0b1a7ed47786359 Author: Navdeep Parhar AuthorDate: 2023-09-05 18:21:03 +0000 Commit: Navdeep Parhar CommitDate: 2023-09-18 18:57:43 +0000 cxgbe(4): Avoid hang on kldunload on netlink enabled kernels. netlink(4) calls back into the driver during detach and it attempts to start an internal synchronized op recursively, causing an interruptible hang. Fix it by failing the ioctl if the VI has been marked as DOOMED by cxgbe_detach. Here's the stack for the hang for reference. #6 begin_synchronized_op #7 cxgbe_media_status #8 ifmedia_ioctl #9 cxgbe_ioctl #10 if_ioctl #11 get_operstate_ether #12 get_operstate #13 dump_iface #14 rtnl_handle_ifevent #15 rtnl_handle_ifnet_event #16 rt_ifmsg #17 if_unroute #18 if_down #19 if_detach_internal #20 if_detach #21 ether_ifdetach #22 cxgbe_vi_detach #23 cxgbe_detach #24 DEVICE_DETACH MFC after: 3 days Sponsored by: Chelsio Communications (cherry picked from commit 3814249f1e8dacfcd326dd7c416c528a1d88b6a1) --- sys/dev/cxgbe/t4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 759887a2a488..a32cd9a3f2df 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3459,7 +3459,7 @@ cxgbe_media_status(if_t ifp, struct ifmediareq *ifmr) struct adapter *sc = pi->adapter; struct link_config *lc = &pi->link_cfg; - if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4med") != 0) + if (begin_synchronized_op(sc, vi , SLEEP_OK | INTR_OK, "t4med") != 0) return; PORT_LOCK(pi); From nobody Mon Sep 18 19:11: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 4RqDtC40Mvz4td20; Mon, 18 Sep 2023 19:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqDtC3RNBz4Gjy; Mon, 18 Sep 2023 19:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695064291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ia+VkntUAFuSfeT3uG9fgnbjwdDBjgswQL/k+/s4yck=; b=KP/MI+J398ogK8z6TdEEbD4QkGteyODr1oy4M+zg+0Qg8VTpWE8Ahp2h5JDxd53OqFy0FP wTx9okK8iCHNXbXXpnxKX7EBOlVQyd4nHHMKX3oRcykS5QEuEjKAkZmgGHqMKRDEJvxV9l +8rdqHMEnUsogT996vqzTOP4RIhkOnatHJcbIWUQO00Mrsu3acNIvJEvvOzugXrarkHXkf q8G6M8lswuIOE6lTw4aHHULh1W3DMgrUYI7txlMKzk/ZsVJK0wHesD3KN+QYMmjgYTOL4H 3JmhgM34AiKaW0SfZL88g/cm+9WJoUtZiofYJKRhM2MX3vBhgKkJZNnpXqvJhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695064291; a=rsa-sha256; cv=none; b=Wwe946nBIsqjsG3G74G/WEYf1oZKwJ3eqYpq9lgQm8vbISkUcgMXA8aq2HLTIaV8QoXOwA y0S7yT8rYsrgzgdBn9BimYbD1blwZECw7agMg1rqXRY3gf96EXKQgqexv8FTXVnoq4GcvY ehhU+42d3Tut5eOruLQjAYzK4Whs+7TxVGCjlA8kNjpvPAaxw7B4oaPDXv6YgtZK1xvN0m wW5uADKO0TRP1+hw/aqP+IaioCMM+M5gzOaOdB4VgYH//QawY/v9Duq1+F0nX+Mk4kfCJs a6FCQkHKAneWAKz6vTkPqFRNY1i3e84qHt1ih/8G1yLawnhEa/jJnJpaabuA9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695064291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ia+VkntUAFuSfeT3uG9fgnbjwdDBjgswQL/k+/s4yck=; b=Ub60xn6nt1Kp1do5SnIBvCCkDf4eJIcV8tGbzHRG22INLM4fCyAJXqai/qdZ0PTTJoaaE/ p1cgWBjQCiQKh0aA+qneD2cmz1u0aQop7WDXBVsGOP8uuvAGF7PCFnwEJ3zCBz5i3qz8Pb Ze3YiNHeQq7INPNiVtJp8ktH0N1pkZxrArcUa+g2bgmRImxv3HIpWZAClucS+ySoUtrxB7 iI8/FssVcS4QTrgfCFGdrHDvkSJo9nctJn2E/UYe4jlvj/iFbu1eg/B0bBL1omdmx47GbM 4/VdDXGo4Ho4lDFjY/Ls/aEn8FS+eUjmhevQQeKXBFFiToWW0VGCLv6f1tawKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqDtC2Lj5zjK5; Mon, 18 Sep 2023 19:11: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 38IJBVSg072919; Mon, 18 Sep 2023 19:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IJBVSZ072916; Mon, 18 Sep 2023 19:11:31 GMT (envelope-from git) Date: Mon, 18 Sep 2023 19:11:31 GMT Message-Id: <202309181911.38IJBVSZ072916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 38da3db5f9e3 - stable/14 - cxgbe(4): Fix tracing with netlink enabled kernels. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 38da3db5f9e3e9bc9eba30a2c560bfe660ce95ec Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=38da3db5f9e3e9bc9eba30a2c560bfe660ce95ec commit 38da3db5f9e3e9bc9eba30a2c560bfe660ce95ec Author: Navdeep Parhar AuthorDate: 2023-09-09 19:39:15 +0000 Commit: Navdeep Parhar CommitDate: 2023-09-18 18:57:51 +0000 cxgbe(4): Fix tracing with netlink enabled kernels. 1. The tracing ifnet's name must match the nexus name. One way to do this is to not use a unit number. 2. Do not hold the tracer lock around ether_ifattach or ether_ifdetach. netlink calls back into the driver (see stack below) and that leads to illegal lock recursion. tracer_ioctl if_ioctl get_operstate_ether get_operstate dump_iface rtnl_handle_ifevent rtnl_handle_ifattach if_attach_internal if_attach ether_ifattach t4_cloner_create MFC after: 3 days Sponsored by: Chelsio Communications (cherry picked from commit e203cb393fe0b963dd585d0576dcc6a47a28c386) --- sys/dev/cxgbe/t4_tracer.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index 4190aa627b14..d9b336c4b64a 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -138,7 +138,7 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) struct match_rr mrr; struct adapter *sc; if_t ifp; - int rc, unit; + int rc; const uint8_t lla[ETHER_ADDR_LEN] = {0, 0, 0, 0, 0, 0}; mrr.name = name; @@ -166,21 +166,14 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) goto done; } - - unit = -1; - rc = ifc_alloc_unit(ifc, &unit); - if (rc != 0) - goto done; - ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - ifc_free_unit(ifc, unit); rc = ENOMEM; goto done; } - /* Note that if_xname is not . */ - if_initname(ifp, name, unit); + /* Note that if_xname is identical to the nexus nameunit */ + if_initname(ifp, name, -1); if_setdname(ifp, t4_cloner_name); if_setinitfn(ifp, tracer_init); if_setflags(ifp, IFF_SIMPLEX | IFF_DRV_RUNNING); @@ -192,12 +185,14 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) tracer_media_status); ifmedia_add(&sc->media, IFM_ETHER | IFM_FDX | IFM_NONE, 0, NULL); ifmedia_set(&sc->media, IFM_ETHER | IFM_FDX | IFM_NONE); + sx_xunlock(&t4_trace_lock); ether_ifattach(ifp, lla); - + sx_xlock(&t4_trace_lock); mtx_lock(&sc->ifp_lock); if_setsoftc(ifp, sc); sc->ifp = ifp; mtx_unlock(&sc->ifp_lock); + rc = 0; done: sx_xunlock(&t4_trace_lock); end_synchronized_op(sc, 0); @@ -208,7 +203,6 @@ static int t4_cloner_destroy(struct if_clone *ifc, if_t ifp) { struct adapter *sc; - int unit = if_getdunit(ifp); sx_xlock(&t4_trace_lock); sc = if_getsoftc(ifp); @@ -219,10 +213,9 @@ t4_cloner_destroy(struct if_clone *ifc, if_t ifp) mtx_unlock(&sc->ifp_lock); ifmedia_removeall(&sc->media); } + sx_xunlock(&t4_trace_lock); ether_ifdetach(ifp); if_free(ifp); - ifc_free_unit(ifc, unit); - sx_xunlock(&t4_trace_lock); return (0); } From nobody Mon Sep 18 21:00:19 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 4RqHHm1f9Cz4tl5l; Mon, 18 Sep 2023 21:00: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 4RqHHm0q1Pz4QyK; Mon, 18 Sep 2023 21:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695070820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lm5CHYIeU9GGd9H5PIiHLdZ59eWnmKPH21iBTosoKUE=; b=V70UxQjzfRNXp/47BbEJVtCw66M1Dk02Aor3S3A4iJ7let3bDM5pL9/xYftXYRQO0StE/N gaUg/O6T0KPMsTBhVAxh18RRrpx+N0WW5+qyYG3oYRZ3hzMPJCVaK2j6H8Y1qxj2jJUUxX 8teYuONSXv6mwPRmjcOfPRhHmUrq2ck0VHKIxBuoGg05C8aNKANN3vaF2H4TkcuYiTg50E veO1v//BPNKNsSS7H61POh1Lv8PFODciU11pq1byf4Rg76jiSo4xS8PgF7pJ6UDbaSAhO6 QjfK2rNaZyd6gQTafjyx+T0joY79dBh5w8KGpNP8p9kKcH8t9GW8TYZF02tr7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695070820; a=rsa-sha256; cv=none; b=lhepSmtsh2DWj7hKcX+/K3K1aPLgUf5++MC1qXGyrKFai4vzSbbAaZkRD6bh3DoHSlReYB vx8gOkFENdXyf5BB5lxkA41tWayk95R2K4SVeD6bTHiNW0m4qMrPlkiu4UmiKFS5MrJDiW UWK6AEqajD8VhJLOAK8gnSkW/1LS3CPUHdP1bSicZb9c66bbfFV5lGz/4beJ6G5l/VCRPz uVgtuDphWqEs6yvoBF2Zhy+7Ylma3pigDfuSJw0d1ZKZewT/UTKB99URZ/3huGeFU2oush iS0Pflfc4j6QBge1gI3sW9efBwYpqG99wexJKP9Nb5M9byzWOMFc/J8D0Ze4xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695070820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lm5CHYIeU9GGd9H5PIiHLdZ59eWnmKPH21iBTosoKUE=; b=x4oOxLJwpp5a9pfxO8bsGcVrfu2kcvo2dYEDB2yaIGwuCSviKEARMa++reS/j2zrzV0KEr Cieh8JHMKI7Zr4U6MO0Pg83Li9EF0//dbYhGpcrInXuCPGb+b5X58Kjv+rgYJaC6c1RFLX h+eAxlJ5iBOhYziDK+L+/y4NVK1jI6jvcptYncNXPd64yp6OQo39ufE8/xx3biJntEnOQL c9kiCSwk+NBO2/4tmp7Unw8jAKju9e5aV3/jx5NW5ocKm+ccg6iBec9ZjI+WCf1YGBgMbY sZbQMF5jb/tGm3yvSJkB3WE+FGjv9Lfas8BtuH8TT8DuDTuwBJhWq/NmuqBTbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqHHl70sXzmC7; Mon, 18 Sep 2023 21:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38IL0JhS055259; Mon, 18 Sep 2023 21:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IL0Jjs055256; Mon, 18 Sep 2023 21:00:19 GMT (envelope-from git) Date: Mon, 18 Sep 2023 21:00:19 GMT Message-Id: <202309182100.38IL0Jjs055256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: f829556e3b85 - stable/14 - drm2: fix build after abs64 became global List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f829556e3b8541f676db914c1d3a9604e15b4b31 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f829556e3b8541f676db914c1d3a9604e15b4b31 commit f829556e3b8541f676db914c1d3a9604e15b4b31 Author: Mateusz Guzik AuthorDate: 2023-09-09 20:50:55 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-18 21:00:11 +0000 drm2: fix build after abs64 became global Fixes: 229c65a83fb ("kern: Globally define abs64") Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit ef545fe7ba6628054765c81624bb5f95884d45f2) --- sys/dev/drm2/drm_os_freebsd.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/drm2/drm_os_freebsd.h b/sys/dev/drm2/drm_os_freebsd.h index 7f5bb22aff03..0ce0dede6d73 100644 --- a/sys/dev/drm2/drm_os_freebsd.h +++ b/sys/dev/drm2/drm_os_freebsd.h @@ -304,13 +304,6 @@ ilog2(unsigned long x) return (flsl(x) - 1); } -static inline int64_t -abs64(int64_t x) -{ - - return (x < 0 ? -x : x); -} - int64_t timeval_to_ns(const struct timeval *tv); struct timeval ns_to_timeval(const int64_t nsec); From nobody Mon Sep 18 21:15: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 4RqHdc3TLpz4tlkh; Mon, 18 Sep 2023 21:15: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 4RqHdc2zLsz4VRs; Mon, 18 Sep 2023 21:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695071748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFH7Tpat/CsMCMY+BVcDfnc96DCl2TWNHdDVNyCEOv8=; b=Fj8lrdMkhOeq/mbknn6naiVkmkvd3HoihFlCdeBbc2p29hnPq7TSBDwMfKElOv1wM9BtTN Fnh2oqcHe5OFC/Y4tTjGDxQlRfh9jeZ+ZP3YsIgEvWIf80KyBath/y+Kqo5cXGJ2ublFfP Tw9zbFyU8hn74UWbkxOr2xoxJ/xZcrqCLB/eik6nrh5gq+6bgkaSfIB74x0SLgAeBq4uQb 2R35MdcE2pQoB3jhoemLs+Plw1jwaRP6fYh/gp+NrDvartGh3xvH6txxkU4yFspgRHgvZU MC14XwxeBlkwdtIbNysfhYTn+vkTZfoOVRkqfQgjS2xhfugmgwFfmxm0p/Uh8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695071748; a=rsa-sha256; cv=none; b=VVY8xjRGiCT5hbOmi/fC/CU1b8J2kE76lGfS/TZUUkcjL+XjLYprYZU9fHVcQWfDtVyRol xwMlxuCgZRAY0meyr+0TnjDGNufDRC8adhu6Y7iqufOUmK5hEs9YxkfslNff7D5rwp9KBr Qf1CHuLNpSXjn2tustSywwJ457HC7qbwjK11WVBfIH3izGfTnusFx7OHgmi361jgFQS+eh Pw2IHCErsM+aKs4ZLtC0jN6WYk1We+k1bZtD1y2bQS1b/Dp5T4hvPUlQq9j4grMktCMA92 ZwTxQLb6NgvZebWG+y3ycs+BkBdSs0ZSXFB/g2Oo9+6RoncMn9onQ+28uZtAFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695071748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFH7Tpat/CsMCMY+BVcDfnc96DCl2TWNHdDVNyCEOv8=; b=C5wQPuujsxCkVsaBbNqMXLfVoQ+UJu8CnVmYr/T+4s6zqxudB41M119oPaxKkVN+9NwI2J vG1YQVjxc5xhEdeVB08vKL8hRUJdy8fADsocxmLWrAm1Yt1Nvxk3P1pgvvpaThePdstx0x EEYu2GvV/EExwTfzr65w/zXICVL2FAoOpCD0sz4XQBpwsn8cqs+7mdJMEOw+e+H5h3eFFU I37t++kZNLXMoJ2rgEFryNb5L8f2CSDGBXau/fY56gtVxc2GNAVc2SqECcqu7087yBVPA1 ni+HdsV1eRf6/2g9JYJu2RHYcYl9FVWZIZzFCOU5vtIxyFhtQlP/LggXOJhtRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqHdc23MWzmbM; Mon, 18 Sep 2023 21:15: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 38ILFmLm079149; Mon, 18 Sep 2023 21:15:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ILFmcI079146; Mon, 18 Sep 2023 21:15:48 GMT (envelope-from git) Date: Mon, 18 Sep 2023 21:15:48 GMT Message-Id: <202309182115.38ILFmcI079146@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 15314c51e810 - stable/14 - kern: Globally define abs64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15314c51e810ca9da6785e90fbf591adcfcd52da Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=15314c51e810ca9da6785e90fbf591adcfcd52da commit 15314c51e810ca9da6785e90fbf591adcfcd52da Author: Emmanuel Vadot AuthorDate: 2023-09-07 07:48:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-18 21:13:45 +0000 kern: Globally define abs64 So we can use it in non-linuxkpi sources. Reviewed by: emaste, mmel Differential Revision: https://reviews.freebsd.org/D41767 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 229c65a83fbe0ede8c617e35d8f8c14d5ebadc19) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 6 ------ sys/sys/libkern.h | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 1490505a02fe..2ee452cb39ed 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -623,12 +623,6 @@ mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) return ((q * multiplier) + ((r * multiplier) / divisor)); } -static inline int64_t -abs64(int64_t x) -{ - return (x < 0 ? -x : x); -} - typedef struct linux_ratelimit { struct timeval lasttime; int counter; diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 86b4c90333e5..92698a3f9b23 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -113,6 +113,7 @@ static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); } static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); } static __inline int abs(int a) { return (a < 0 ? -a : a); } static __inline long labs(long a) { return (a < 0 ? -a : a); } +static __inline int64_t abs64(int64_t a) { return (a < 0 ? -a : a); } static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); } #ifndef RANDOM_FENESTRASX From nobody Mon Sep 18 21:15: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 4RqHdd5wMjz4tmFG; Mon, 18 Sep 2023 21:15: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 4RqHdd4Gj5z4VHB; Mon, 18 Sep 2023 21:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695071749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fyYV/ln5nbxxELjkMm0X+aw61PUcnC5mYrsaKSMXw0=; b=JR9rEsizHPtAOnwDtU30P5WU562NRNTQxkSC0UV71UpNarFxXjAuEfEFshd/U1mXXyaq+s nYoexttAv1lVNU2Qw6ah2xfbiIwnWxvMxTsdwTpKzYJ6sL/brSxm3JntAUpkXfmoKm/Mxz 9QMdk4xsxCTBOT0D7U2cctWucvlSGFPxdQgT0PaJPhpRMLACOqkgja/JATMohb9pjgqaWT LRNhOPYIVZ9j84vgpl7hTrVArCjhUxfjhz4VkWKQqodwRvQEfKV3n0zmTHSiSul1HbR2jO ed7vApaK4tvx1JCvc96pqp0kKmrp32+vwBDf8GpqztLHhgdXqtNd4C7mEpGLuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695071749; a=rsa-sha256; cv=none; b=u0Ba8bYEzZTIS+Ntb/etGokAyY03aklTKoLVdAFYPbRtegPY1t/vleIUgcZXfGNKv7eFuV HlAWkGW3an4ExgofgzXFLi37Q71dpVAz1osahiuuCaQzUt8Vs5uR8xoPX6hA9cvM7suq5S /TNmCFuEp0ZVyWSmpXiy9zBNMWjrhn2qe6e8uq0Vsl2HS1358zI5n5DmMRxi3KqI5sgOvr uacBgZ646T94+sKt7fACzxVUp6gQtl6ZguBBTbhC4u6mWv7puZhCPatSAMT7WnbsL82YWF rmUALOXuDDWPk0a6iUrHYcMZiNbklkXhMQp3JYTyTjNjc8TUFBFOnoEyvbm+ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695071749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fyYV/ln5nbxxELjkMm0X+aw61PUcnC5mYrsaKSMXw0=; b=Z2NdBLUYywMvn/j8Lw1S9AS4RvXaOEYUkGLiB+SZoTni0M+dEHiOqTgWxrdOkilGfe5jwX 2YGzthpMREUoxx+pRfgKP7VUgtMLBjzvXuXjcURjV8RR14fKVnppWX+Zs90ZYb5PBOY+SX Us+RcShFFwLOa5rQ6YhWYyfpIIrzH4qi1oX+8aB1XmVkIvAR0kPtNok1J2cAwuPXBvfVdk F83ilNGleKV5ErgWkUQDS0FDBog2YwLWkUwFpOeCMh57UR2JfVIr43AgjtWMo2IMJNw2pR c8rIFeURQTcJ463bLBZ0dbxf6XVW4C9GFu0UutxX3ce0tpda+FfCC/4AYuddhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqHdd33MDzmDX; Mon, 18 Sep 2023 21:15: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 38ILFnLF079188; Mon, 18 Sep 2023 21:15:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ILFnP4079185; Mon, 18 Sep 2023 21:15:49 GMT (envelope-from git) Date: Mon, 18 Sep 2023 21:15:49 GMT Message-Id: <202309182115.38ILFnP4079185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: be6f70428d6c - stable/14 - drm2: whack set-but-not-used warns List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be6f70428d6c918998e5430d2b60b9a8897ea9d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=be6f70428d6c918998e5430d2b60b9a8897ea9d8 commit be6f70428d6c918998e5430d2b60b9a8897ea9d8 Author: Mateusz Guzik AuthorDate: 2023-09-18 21:11:26 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-18 21:14:19 +0000 drm2: whack set-but-not-used warns immediate MFC to unbreak the build (cherry picked from commit c9130a46bca272492b4f29429ed340504b8eced7) --- sys/dev/drm2/drm_fops.c | 2 +- sys/dev/drm2/ttm/ttm_lock.c | 2 +- sys/dev/drm2/ttm/ttm_tt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c index 5d040e92ed12..316d21a8e731 100644 --- a/sys/dev/drm2/drm_fops.c +++ b/sys/dev/drm2/drm_fops.c @@ -536,7 +536,7 @@ void drm_event_wakeup(struct drm_pending_event *e) { struct drm_file *file_priv; - struct drm_device *dev; + struct drm_device *dev __diagused; file_priv = e->file_priv; dev = file_priv->minor->dev; diff --git a/sys/dev/drm2/ttm/ttm_lock.c b/sys/dev/drm2/ttm/ttm_lock.c index 9a8cafbf2abc..1884acb12118 100644 --- a/sys/dev/drm2/ttm/ttm_lock.c +++ b/sys/dev/drm2/ttm/ttm_lock.c @@ -245,7 +245,7 @@ static void ttm_vt_lock_remove(struct ttm_base_object **p_base) { struct ttm_base_object *base = *p_base; struct ttm_lock *lock = container_of(base, struct ttm_lock, base); - int ret; + int ret __diagused; *p_base = NULL; ret = __ttm_vt_unlock(lock); diff --git a/sys/dev/drm2/ttm/ttm_tt.c b/sys/dev/drm2/ttm/ttm_tt.c index 55131c73bdc3..d52df50adeb3 100644 --- a/sys/dev/drm2/ttm/ttm_tt.c +++ b/sys/dev/drm2/ttm/ttm_tt.c @@ -243,7 +243,7 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) void ttm_tt_unbind(struct ttm_tt *ttm) { - int ret; + int ret __diagused; if (ttm->state == tt_bound) { ret = ttm->func->unbind(ttm); From nobody Tue Sep 19 01: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 4RqPJs1nByz4t5BV; Tue, 19 Sep 2023 01:31: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 4RqPJs19Qkz3fKZ; Tue, 19 Sep 2023 01: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=1695087101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kL2UXBguDCeMS6AQTkh2aWz0jTXtnlO1PhwW4hx8mAE=; b=FsRaleVGJ3/CifxrLABmHkTH1ZGwV8qrDdgAqZV8uBr2tG8pz9fSbQAr18wQPiLvFSQhoJ CknjQK1QPiq7wj5Dp9hLOTwv8yNys7JREDJa1IfRW61jnxkrAseVw/p13LYA9vNhSbHCb+ R7gTZmHZS8TmfgrARUxrSNvdHfaS/tm+AnqVpVzWkLBurps5Kf4tE037hJqYbo04ZJlDE5 CV4DK8/N547DAajezyldiFPRSUGuFypRPOmwEqYJyXvq2LWlB5+l/V59Z3nrmIepWTCoaJ 1vjMEN80zxeQrLuJhevH4hglUgIGo/6UHv7jVw+El2MxwCCrkcmM8WlP37O1nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695087101; a=rsa-sha256; cv=none; b=OrJQo7oaN4K7njEbpCw2cemJTTDY6yITQLwTwPkGSHfdn0v1sJTTm2Qc4T+pddRSD3nQVV RnWldQYZjMn9A1hV1As3g2ZoUWsWvJERm9KKV2TSUnb5s7EcgVtGju2XquUBPIFF5OgedS QdTCwnQeM2nOZhE9zI3v1VXaRQPfNnAGd30hC35m6syRB/2SRGOQcQLMqCXI+SOMWiDGGw fnr34d+PEc0QVBDjsuIDHhlhANwOSnj4BTD0fykf1U3ioa3M49AHbca6qJNNokbduE9It6 OOgguqx8t0NboeAIHdrlh32FY/psj+1PSr47I3zYSfrQYiMV80yK+7d9y73ISA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kL2UXBguDCeMS6AQTkh2aWz0jTXtnlO1PhwW4hx8mAE=; b=vJ69MVGjVDk+wyOa9WmposXpHYcQ+EII53PVZZab4bfl8PuwSCu5tmUHf+3tZMybdrt/u5 bMNFEfSgBZTXN2mhgMLCAdFLKi4ZtWlPtTj373N0+iKQhRMLfBmQUeHn06Ic8rNKOgiED4 1EWVIPB25ZcOOiqeU6RX2tkEm8bVy7etLazLNSViChDB8HtVTfqvFrXyd12/Euu4XqiqvQ lp6QDdum7TrXMepNGPGKBY/fLhmp74yM9ZNOL0Ed2iKwWJ0QzH3qEGpZq56DLbW8GQFBAg h8dT7P648NQLb4y+g23X3Rv/EazYWeF+FvJm6DcP5js05UTZHYxy9wZMzgHDzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqPJs0FLcztwn; Tue, 19 Sep 2023 01: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 38J1VewX008445; Tue, 19 Sep 2023 01: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 38J1VemH008442; Tue, 19 Sep 2023 01:31:40 GMT (envelope-from git) Date: Tue, 19 Sep 2023 01:31:40 GMT Message-Id: <202309190131.38J1VemH008442@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: b33bfe0a35f7 - stable/14 - usbdi(9): Fix typo to simply -> to 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b33bfe0a35f7f9847313c9298d45cf16a03f23a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=b33bfe0a35f7f9847313c9298d45cf16a03f23a4 commit b33bfe0a35f7f9847313c9298d45cf16a03f23a4 Author: Damien Broka AuthorDate: 2023-09-11 11:12:27 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-19 01:31:12 +0000 usbdi(9): Fix typo to simply -> to simplify MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/839 (cherry picked from commit 06bac0da1314907b8de37bbad559777ab418e811) --- share/man/man9/usbdi.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/usbdi.9 b/share/man/man9/usbdi.9 index c42efc1154c6..47034b87c806 100644 --- a/share/man/man9/usbdi.9 +++ b/share/man/man9/usbdi.9 @@ -350,7 +350,7 @@ Example4: SETUP + STATUS - split .Ed .Sh USB TRANSFER CONFIG -To simply the search for endpoints the +To simplify the search for endpoints the .Nm usb module defines a USB config structure where it is possible to specify the characteristics of the wanted endpoint. From nobody Tue Sep 19 01: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 4RqPJt4KTKz4t5Bb; Tue, 19 Sep 2023 01: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 4RqPJt2SvHz3fnf; Tue, 19 Sep 2023 01:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8ofBQ3cUb4lOP79Uo4pVyCdCnQKNt4hcdVCR2Elquc=; b=sfVrMiPZ/cY43JZRZy4qz8fH1uNoDTtIAuAfrwIyKNmdNN5o/bbvl1ndxHYw6mxlEXtup+ Z1obYYk/DJ6EnW8eGiPfcF7bmvuHc+s54eiGGm1IL+eDmaJWcHI5ebR39WoA/5B6RUbUBv JO9VzWr/VgvudpoL1Y9zUePvGmEd8n4ZPfGZP+QzULyEMeaR6nXW+tBXw793qDGZWs4Zdt gQ3x943jaVYk/o22uPi8mdQ80mGIozQgwng3pcojiKW0dqDMv6otUc2NQJV//x6Laj3gCz YeSmrmKxaNgUKGm3Ziyop7KBRkfZPBkY6FPOaoZvNUbb43IyyGA52EMLB0fq1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695087102; a=rsa-sha256; cv=none; b=UTe0+x+ei9j/4PCpuaFDlcMVOaSwD0ROmiPHz1c2jL3PuLzksaSUE8GK6nMSh1iAeb30iG XQOSfmKATg6UVRN9qjjcLPjftnS0BEHbHkzJlX29egMQSjxIu+0omfttWnBjpjCpfaYNb0 TOdWs/JRfD8NpMIszvmq71j8+i7M61ynKtvAgKe6nAohgZ2tT4u+zULPzgD/B0HO1UCZKJ Jmf2Q4tyX41684fiTEwl03jrKcrKMJaKmUXa1YRFK5YjjWVK1/nC2fGIipQcVBOIvDafhy oxMvNVb/QJ+VEeYA1nc/btFF+Dc05iNPr1N4mpTiLv5NxdGHlBTM6Y1D12dUPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8ofBQ3cUb4lOP79Uo4pVyCdCnQKNt4hcdVCR2Elquc=; b=cxj57XOGPRnrfqj3io+OsQvqrZU3rX/wTFh9MhUKROYuZllbChoiUla5/Ug9grK4LMsG0R 6PZIvEM8+RMbuKGTxxe7BBb9RqAkn5mEMQ7QaYVFlPLnq5xAoIdxLCyGCX0RBU6vwuzEMs kOejb+uHTNrKbX0m4TUv7t/hCSVUXA+fEYFfovcwWflh0blYE1OE6pkGgoEUMVxgRzeP+C Yo291Gj1QVG3tCYeP/hrR8lBnEyV0rvf/IyQwPtgyQG4a+tqDJB/jMIRwMEJzdpy1jq9Jh 0EDPMbxxaM3/TTFC0oPcFaraJLyzymG+KHtqxsZEuLwKQNHY7W/Sy2/8GO6U7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqPJt1CsJztQY; Tue, 19 Sep 2023 01: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 38J1Vg9I008497; Tue, 19 Sep 2023 01: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 38J1VgPP008494; Tue, 19 Sep 2023 01:31:42 GMT (envelope-from git) Date: Tue, 19 Sep 2023 01:31:42 GMT Message-Id: <202309190131.38J1VgPP008494@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: 788aa931ccb7 - stable/14 - sysctl(9): Fix typo translatation -> translation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 788aa931ccb7e58f254e46c2fc9c80369204acfb Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=788aa931ccb7e58f254e46c2fc9c80369204acfb commit 788aa931ccb7e58f254e46c2fc9c80369204acfb Author: Damien Broka AuthorDate: 2023-09-11 11:15:18 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-19 01:31:20 +0000 sysctl(9): Fix typo translatation -> translation MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/839 (cherry picked from commit ff9c4abd9feaf13cf911f4655234da7a62d0c7af) --- share/man/man9/sysctl.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index d2001384c9aa..83f526b349a1 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -626,7 +626,7 @@ For example, .Fn SYSCTL_INT reports the raw value of an associated variable of type .Vt int . -However, nodes may also export a value that is a translatation of an internal +However, nodes may also export a value that is a translation of an internal representation. .Pp The From nobody Tue Sep 19 01:32:19 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 4RqPKb5wFJz4t5cV; Tue, 19 Sep 2023 01:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqPKb5Sntz3gDn; Tue, 19 Sep 2023 01:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YXSxZBlXiVBxDM1WfCRH1FzcCiLwG7DsL3gjAPaisU=; b=Ky2G6vDZO2pnMCocLJR19u+dekDG5eTn+CTWcX3RZeThJqeTPdq0YcHidap2Tn2gpzeAZE Lu3Pmn0o/LpLtVREsO98W005XNHGs7CvD7A1gyk2Q3WcNmzfEDvoHzt7Okz07NL7xC9lqu r20JZzYltasDfF1kQiuRTKgRkVBcjDXJnmYQjVnoZ5EJvZ61W7vU7WsYbp6vfKodF58pcg X6jHbwR2HSuRTxnw9ZchtC34GXHJhLot/iIydRZpXlvPvOnOgc95Sx0t6WRfvLiT9bEwen 9RmpGzzN2zFfPDCC1RygeRdCzaV8ORhpTqK/7e7U/M7o4yNyoMFgqgO1e671+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695087139; a=rsa-sha256; cv=none; b=NfcdeYePJqXBw6Mdv9Q6av9wLMfjZ+kOgODZRTFP9CnRoymF0t6/RU5rXnPmUvp7Bvtyr3 kdSPJT7qxcEr8HoPZYLZ7eErXs4SxdgQx9FI3BCHQfHkMMh/jGbGBy3E+QwNRHU9ldN/a3 R8tFZuPDz3xI9Iw9xWSS6xcVNd+gRxJn4IPt+T2aWGb+uSTXm4DGqP3C5SYrbJgiTM8Q1t pjvTnWmRb6MxZKDtHlte1an7WfcAdcBWZwAAHR9LQnU3bj66UfnL92dUm8XLcbqzzgbePd 3kdLJQdw9R21Hhmqvt341IMxbTVWfm0SjKkb2e5u3YHT/dJRtk6cU+qaffBVHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YXSxZBlXiVBxDM1WfCRH1FzcCiLwG7DsL3gjAPaisU=; b=FPOpAQ+wc1iqzGu6unVmPfbkYox6u/Oy46vFPoXynyRcRY8GG6PaMQ+Ub9FAPuvH7w/1uR 0S395NBCTqY32tXHZKUI/lU2DbQnnba68DCpsIJKgcYY06AvsEjOuNjl6OnLMPasCihkqY 17g2DqSX8b4kfXv7j2pBBtwuOb3YB7aU8Hmdaw77woQVxDoq3czbcX6sTZIukNiT2nROSr IPKUCHmWbVslhKzN2NC1nD4sebo7fOFr/SGAMsuDBBJOhP3adl6bj3hDCEHJpKlnz2sFBE Szc9m8z7rCHWaXz7XFfQMon2ZwSU2oBPXW6YXrE17Kd4wRzhS/FuMxw2iYxyoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqPKb4VydztnC; Tue, 19 Sep 2023 01:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38J1WJu1010605; Tue, 19 Sep 2023 01:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38J1WJIR010602; Tue, 19 Sep 2023 01:32:19 GMT (envelope-from git) Date: Tue, 19 Sep 2023 01:32:19 GMT Message-Id: <202309190132.38J1WJIR010602@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: a93e4f407319 - stable/13 - usbdi(9): Fix typo to simply -> to 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a93e4f407319c623def70907fe2ceff20a001189 Auto-Submitted: auto-generated The branch stable/13 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=a93e4f407319c623def70907fe2ceff20a001189 commit a93e4f407319c623def70907fe2ceff20a001189 Author: Damien Broka AuthorDate: 2023-09-11 11:12:27 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-19 01:32:01 +0000 usbdi(9): Fix typo to simply -> to simplify MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/839 (cherry picked from commit 06bac0da1314907b8de37bbad559777ab418e811) --- share/man/man9/usbdi.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/usbdi.9 b/share/man/man9/usbdi.9 index c42efc1154c6..47034b87c806 100644 --- a/share/man/man9/usbdi.9 +++ b/share/man/man9/usbdi.9 @@ -350,7 +350,7 @@ Example4: SETUP + STATUS - split .Ed .Sh USB TRANSFER CONFIG -To simply the search for endpoints the +To simplify the search for endpoints the .Nm usb module defines a USB config structure where it is possible to specify the characteristics of the wanted endpoint. From nobody Tue Sep 19 01:32: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 4RqPKc6nZGz4t5Bh; Tue, 19 Sep 2023 01:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqPKc64h6z3g91; Tue, 19 Sep 2023 01:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6vfFX+wpNUGQdA/VliNzmiwpHq4wO6w3aVZdMbzLSY=; b=leCMnCuCwnOtfOqVR6qASwwXjWqOy4Mg4z79Hy9Ecms/ebdOlk/uEYdGkSO0X7PAfrhMl3 TOxrllCrfHYJ60uY8Wtob2aROrnTNU2LKfrwOu2kOlNgo0w6psA6PQ8pvVSWZezBD2t+/8 /uDD290D13RhwSjiF2wec93ojtabMV43+agGCDm0tEDgGaItkehjTN3s+3koSoIaBopYF4 88woR/aYrrb3rMbChnoDhQo/T4GcLpsjLK7wfdF3Q2MGIAzOyXNTWmRtCcZoGrgyPwNbrf tfuyQ9D4+N4vhQC0HuEgf6fIDhyaQ3uUmpRYT5LqbNN5Vp+5evG6MiRZ4ktaRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695087140; a=rsa-sha256; cv=none; b=PYFqbtgCKobVOePkZk5Efn7QSUyfAr64k+Cr2ap0B1snBkvKr6i1sKK1MYkhdRsqalOLsm SahWu4L5PLjv45vm6jx0x52vxP0X55twfsd3F+FAfiyO82Wt39/b9Qe82+yFSLzPkGZBYw sFdGXWLa1H8s/avOmIwKB38lu1KmQhOXdxrvqzHDU75cVJ8tAjGQ+P8Ak0pzK+WUZRFCAz BuwWmA3QYs/YYTvl6sBq7OF28p+LbK/h0bPcsAIaKIb08dQ/qN96K59fTPBlJO6+AHCNLL 5g3gSTHvU6HKuxZmdo/Zh8h/Td/gXdsVIhOEFsRfcMVZDbaV/kPrypDnhbs15A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695087140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6vfFX+wpNUGQdA/VliNzmiwpHq4wO6w3aVZdMbzLSY=; b=E5UMjtgekzl+g7ktKqAoPwhJuGUIdFrakHBWCKPKi4ygM879BwFFKYXhrc4Omqw+AmGzPt j3OiKH9jG128TS3iDt/Fs7JKbFi1pce/hTvd+041uvc7aJNcnSjuGElEOl+7/WaFBL+JfU yJ2IaJXFA5sGwlrkMEMYmYxzaBDZIqXsAfZMlFaOXUY7lrqlu/aqn5o2J3V4QxNIMIVyPI FsNDiK0c+4c5ttBJZe63MeV1fdfT3BBj6+oGm7jTxy/Fl+FUG+XqF5DV/+avaqLQMKgiGz eokZfG5n4JZ8zRfnDUS6UZ03AnOdoOQdKgd6wI/NR+ltpcnR0fnZa1Z1e9451w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqPKc58W1zv0G; Tue, 19 Sep 2023 01:32: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 38J1WKpD010651; Tue, 19 Sep 2023 01:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38J1WKP0010648; Tue, 19 Sep 2023 01:32:20 GMT (envelope-from git) Date: Tue, 19 Sep 2023 01:32:20 GMT Message-Id: <202309190132.38J1WKP0010648@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: d6de4d2a2390 - stable/13 - sysctl(9): Fix typo translatation -> translation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: d6de4d2a2390067ea45fa01a67da9a3758e6442f Auto-Submitted: auto-generated The branch stable/13 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=d6de4d2a2390067ea45fa01a67da9a3758e6442f commit d6de4d2a2390067ea45fa01a67da9a3758e6442f Author: Damien Broka AuthorDate: 2023-09-11 11:15:18 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-19 01:32:07 +0000 sysctl(9): Fix typo translatation -> translation MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/839 (cherry picked from commit ff9c4abd9feaf13cf911f4655234da7a62d0c7af) --- share/man/man9/sysctl.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index e0bc17a1e46f..d6c03623e417 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -618,7 +618,7 @@ For example, .Fn SYSCTL_INT reports the raw value of an associated variable of type .Vt int . -However, nodes may also export a value that is a translatation of an internal +However, nodes may also export a value that is a translation of an internal representation. .Pp The From nobody Tue Sep 19 03:20: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 4RqRkB1Cf9z4tF1j; Tue, 19 Sep 2023 03:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqRkB0zl1z4MWl; Tue, 19 Sep 2023 03:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695093618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILDYueJg4aKGbNOQLSGrnMNI9NfzvGdEnxO1tB2PnXg=; b=EIIPDP7/QIySrQlOftg1GteDAZS4bnGcP/e+yj9ehKa2gdhZ+A4Vumqlv5FSA2OIS0D8fz kJwCZcBMKvbwftCbNQwUB1eTaWRSzvYoOquUurGVvUxZaB4R8+zPOBs7sxOLj2IX1N1COX C92ByFyTlcKfvxTt4yR89t8Huz8twDDVu0YC1HQeMSZa4nSZMhA3Qpiseg8HlmCKnycllq eysvHEED/bbfbqJNZC/PSzhxe6PrFtPu+1d+reIJLoaEP6vdL2+BWGUq61BFRITMMnjTZ6 wr4VepJwsX6UBhDJ6yq2dw0+gIc18ti73N5TyNeu+d+H0o0Lil+Jo64XnO28vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695093618; a=rsa-sha256; cv=none; b=fQwEITHI6kYs/8ERC6unF3JdMU3z3TJAHJuiS+Cdj4m5MGJt+aboEodyc1STnZsBAu/ZzK NtyVTEjctSEsSFONtwCfUg0fX5tHVGckHfzjdhNRYfxhZ5cVbIVr00JZoRtg6ec3++mBxi sRj8b+XsDbFyy0o+RETdYFCfoEfDLR5/y080Q1fNnk/7O2zDxGBB09yf/MMomckcgpCdfo Q0Q6dyDG08uYx7LdLeNVGd/t4bwv95wHrDfFFmvaydV3Iwew4WyAzqEG8RgsHbCMhTnYgy zeEd4l+BKrTg7ikYWWh2DuKhLBf8n35CcZ52w/w36swEQk+obHEGHOgtEf312A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695093618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILDYueJg4aKGbNOQLSGrnMNI9NfzvGdEnxO1tB2PnXg=; b=W7aCUBAwUILhdJJc/IPD/Vbr2pkugl+Sqo9MEvzgYjNwf91Gxf5wrH4uFgxTGO78gH0MEB SB/TZXTE2xlDSuqWNqoLvIAXqYDdyH5cMSJAqBpqMdk3kTw7Iv/dUq4Qe3gAFORhL3zAq4 /YjylbZPdPjmTlaB+ZZGTMm6vFZrBcYV6wd4m7CHRb1uQf7GrL+Ox+HdgOLQ6lKMvdy88t SgM0DxkYG94NqNaxXyc7y4XNJEl4FjYMQJ9BSKSABtdJ0Y0WZk+MIPq1+G5WeT33J2zqXL PkOPq3PHHLEDyvJ5whpuehw64AqEhB5egmXSkHUQbGpUjKqgHFuuVPOaAdHFfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqRkB01zSzxY4; Tue, 19 Sep 2023 03:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38J3KHLo087914; Tue, 19 Sep 2023 03:20:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38J3KHf4087911; Tue, 19 Sep 2023 03:20:17 GMT (envelope-from git) Date: Tue, 19 Sep 2023 03:20:17 GMT Message-Id: <202309190320.38J3KHf4087911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 6dff5fb10b5e - releng/14.0 - lib/libc/amd64: back out amd64 SIMD work List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 6dff5fb10b5e7ddf1049672ccaaef41a5ad1d5b8 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=6dff5fb10b5e7ddf1049672ccaaef41a5ad1d5b8 commit 6dff5fb10b5e7ddf1049672ccaaef41a5ad1d5b8 Author: Robert Clausecker AuthorDate: 2023-09-14 01:45:12 +0000 Commit: Robert Clausecker CommitDate: 2023-09-19 03:19:06 +0000 lib/libc/amd64: back out amd64 SIMD work Due to some bugs being found, back out the amd64 SIMD libc work from releng/14.0 ahead of the release and give these changes in a critical part of FreeBSD some more time to mature. This patch set backs out D40693, D41333, D41349, D41442, and D41697. Change sets D40729, D40730 (ffs), D41011 (bcmp integer overflow bug), and D41050 (rtld bits) are not backed out. The intent is for this backout to be a direct commit to releng/14.0 with the changes staying on CURRENT and stable/14. Sponsored by: The FreeBSD Foundation Requested by: imp kevans Approved by: kib, re (cperciva) Differential Revision: https://reviews.freebsd.org/D41855 --- lib/libc/amd64/amd64_archlevel.h | 90 ------------ lib/libc/amd64/string/Makefile.inc | 5 +- lib/libc/amd64/string/amd64_archlevel.c | 241 -------------------------------- lib/libc/amd64/string/memcmp.S | 181 +----------------------- lib/libc/amd64/string/stpcpy.S | 143 ++----------------- lib/libc/amd64/string/strchrnul.S | 170 ---------------------- lib/libc/amd64/string/strlen.S | 57 +------- lib/libc/string/string.3 | 5 +- share/man/man7/Makefile | 1 - share/man/man7/arch.7 | 5 +- share/man/man7/environ.7 | 12 +- share/man/man7/simd.7 | 227 ------------------------------ 12 files changed, 26 insertions(+), 1111 deletions(-) diff --git a/lib/libc/amd64/amd64_archlevel.h b/lib/libc/amd64/amd64_archlevel.h deleted file mode 100644 index 047beb9855d1..000000000000 --- a/lib/libc/amd64/amd64_archlevel.h +++ /dev/null @@ -1,90 +0,0 @@ -/*- - * Copyright (c) 2023 The FreeBSD Foundation - * - * This software was developed by Robert Clausecker - * under sponsorship from the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE 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 - */ - -/* must be macros so they can be accessed from assembly */ -#define X86_64_SCALAR 0 /* disable SIMD optimisations */ -#define X86_64_BASELINE 1 /* CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SSE, SSE2 */ -#define X86_64_V2 2 /* CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSSE3, SSE4_1, SSE4_2 */ -#define X86_64_V3 3 /* AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE */ -#define X86_64_V4 4 /* AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL */ - -#define X86_64_MAX X86_64_V4 /* highest supported architecture level */ -#define X86_64_UNDEFINED -1 /* architecture level not set yet */ - -#ifndef __ASSEMBLER__ -#include - -dlfunc_t __archlevel_resolve(u_int, u_int, u_int, u_int, - int32_t[X86_64_MAX + 1]) __hidden; -#else -#include - -#define ARCHRESOLVE(func) \ - .globl CNAME(func); \ - .type CNAME(func), @gnu_indirect_function; \ - .set CNAME(func), __CONCAT(func,_resolver); \ - ARCHENTRY(func, resolver); \ - lea __CONCAT(func,_funcs)(%rip), %r8; \ - jmp CNAME(__archlevel_resolve); \ - ARCHEND(func, resolver) - -/* - * The func_funcs array stores the location of the implementations - * as the distance from the func_funcs array to the function. Due - * to compiling for the medium code model, a 32 bit integer suffices - * to hold the distance. - * - * Doing it this way both saves storage and avoids giving rtld - * relocations to process at load time. - */ -#define ARCHFUNCS(func) \ - ARCHRESOLVE(func); \ - .section .rodata; \ - .align 4; \ - __CONCAT(func,_funcs): - -#define NOARCHFUNC \ - .4byte 0 - -#define ARCHFUNC(func, level) \ - .4byte __CONCAT(__CONCAT(func,_),level) - __CONCAT(func,_funcs) - -#define ENDARCHFUNCS(func) \ - .zero 4*(X86_64_MAX+1)-(.-__CONCAT(func,_funcs)); \ - .size __CONCAT(func,_funcs), .-__CONCAT(func,_funcs) - -#define ARCHENTRY(func, level) \ - _START_ENTRY; \ - .type __CONCAT(__CONCAT(func,_),level), @function; \ - __CONCAT(__CONCAT(func,_),level):; \ - .cfi_startproc - -#define ARCHEND(func, level) \ - END(__CONCAT(__CONCAT(func,_),level)) - -#endif /* __ASSEMBLER__ */ diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index 4df4ff8f1417..faa7c251ae3b 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -1,14 +1,11 @@ MDSRCS+= \ - amd64_archlevel.c \ bcmp.S \ memcmp.S \ memcpy.S \ memmove.S \ memset.S \ - stpcpy.S \ strcat.S \ - strchrnul.S \ strcmp.S \ strlen.S \ - strcpy.c + stpcpy.S diff --git a/lib/libc/amd64/string/amd64_archlevel.c b/lib/libc/amd64/string/amd64_archlevel.c deleted file mode 100644 index c06566658c59..000000000000 --- a/lib/libc/amd64/string/amd64_archlevel.c +++ /dev/null @@ -1,241 +0,0 @@ -/*- - * Copyright (c) 2023 The FreeBSD Foundation - * - * This software was developed by Robert Clausecker - * under sponsorship from the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE 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 "amd64_archlevel.h" -#include "libc_private.h" - -#define ARCHLEVEL_ENV "ARCHLEVEL" - -static volatile int amd64_archlevel = X86_64_UNDEFINED; - -static const struct archlevel { - char name[10]; - /* CPUID feature bits that need to be present */ - u_int feat_edx, feat_ecx, amd_ecx, ext_ebx; -} levels[] = { - { - .name = "scalar", - .feat_edx = 0, - .feat_ecx = 0, - .amd_ecx = 0, - .ext_ebx = 0, - }, { -#define FEAT_EDX_BASELINE (CPUID_FPU | CPUID_CX8 | CPUID_CMOV | CPUID_MMX | \ - CPUID_FXSR | CPUID_SSE | CPUID_SSE2) - .name = "baseline", - .feat_edx = FEAT_EDX_BASELINE, - .feat_ecx = 0, - .amd_ecx = 0, - .ext_ebx = 0, - }, { -#define FEAT_ECX_V2 (CPUID2_SSE3 | CPUID2_SSSE3 | CPUID2_CX16 | CPUID2_SSE41 | \ - CPUID2_SSE42 | CPUID2_POPCNT) -#define AMD_ECX_V2 AMDID2_LAHF - .name = "x86-64-v2", - .feat_edx = FEAT_EDX_BASELINE, - .feat_ecx = FEAT_ECX_V2, - .amd_ecx = AMD_ECX_V2, - .ext_ebx = 0, - }, { -#define FEAT_ECX_V3 (FEAT_ECX_V2 | CPUID2_FMA | CPUID2_MOVBE | \ - CPUID2_OSXSAVE | CPUID2_AVX | CPUID2_F16C) -#define AMD_ECX_V3 (AMD_ECX_V2 | AMDID2_ABM) -#define EXT_EBX_V3 (CPUID_STDEXT_BMI1 | CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2) - .name = "x86-64-v3", - .feat_edx = FEAT_EDX_BASELINE, - .feat_ecx = FEAT_ECX_V3, - .amd_ecx = AMD_ECX_V3, - .ext_ebx = EXT_EBX_V3, - }, { -#define EXT_EBX_V4 (EXT_EBX_V3 | CPUID_STDEXT_AVX512F | \ - CPUID_STDEXT_AVX512DQ | CPUID_STDEXT_AVX512CD | \ - CPUID_STDEXT_AVX512BW | CPUID_STDEXT_AVX512VL) - .name = "x86-64-v4", - .feat_edx = FEAT_EDX_BASELINE, - .feat_ecx = FEAT_ECX_V3, - .amd_ecx = AMD_ECX_V3, - .ext_ebx = EXT_EBX_V4, - } -}; - -static int -supported_archlevel(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, u_int ext_ecx) -{ - int level; - u_int p[4], max_leaf; - u_int amd_ecx = 0; - - (void)ext_ecx; - - do_cpuid(0x80000000, p); - max_leaf = p[0]; - - if (max_leaf >= 0x80000001) { - do_cpuid(0x80000001, p); - amd_ecx = p[2]; - } - - for (level = X86_64_BASELINE; level <= X86_64_MAX; level++) { - const struct archlevel *lvl = &levels[level]; - - if ((lvl->feat_edx & feat_edx) != lvl->feat_edx || - (lvl->feat_ecx & feat_ecx) != lvl->feat_ecx || - (lvl->amd_ecx & amd_ecx) != lvl->amd_ecx || - (lvl->ext_ebx & ext_ebx) != lvl->ext_ebx) - return (level - 1); - } - - return (X86_64_MAX); -} - -static int -match_archlevel(const char *str, int *force) -{ - int level, want_force = 0; - - *force = 0; - - if (str[0] == '!') { - str++; - want_force = 1; - } - - for (level = 0; level <= X86_64_MAX; level++) { - size_t i; - const char *candidate = levels[level].name; - - /* can't use strcmp here: would recurse during ifunc resolution */ - for (i = 0; str[i] == candidate[i]; i++) - /* suffixes starting with : or + are ignored for future extensions */ - if (str[i] == '\0' || str[i] == ':' || str[i] == '+') { - if (want_force) - *force = 1; - - return (level); - } - } - - return (X86_64_UNDEFINED); -} - -/* - * We can't use getenv(), strcmp(), and a bunch of other functions here as - * they may in turn call SIMD-optimised string functions. - * - * *force is set to 1 if the architecture level is valid and begins with a ! - * and to 0 otherwise. - */ -static int -env_archlevel(int *force) -{ - size_t i; - - if (environ == NULL) - return (X86_64_UNDEFINED); - - for (i = 0; environ[i] != NULL; i++) { - size_t j; - - for (j = 0; environ[i][j] == ARCHLEVEL_ENV "="[j]; j++) - if (environ[i][j] == '=') - return (match_archlevel(&environ[i][j + 1], force)); - } - - *force = 0; - - return (X86_64_UNDEFINED); - -} - -/* - * Determine the architecture level by checking the CPU capabilities - * and the environment: - * - * 1. If environment variable ARCHLEVEL starts with a ! and is followed - * by a valid architecture level, that level is returned. - * 2. Else if ARCHLEVEL is set to a valid architecture level that is - * supported by the CPU, that level is returned. - * 3. Else the highest architecture level supported by the CPU is - * returned. - * - * Valid architecture levels are those defined in the levels array. - * The architecture level "scalar" indicates that SIMD enhancements - * shall not be used. - */ -static int -archlevel(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, u_int ext_ecx) -{ - int islevel, wantlevel, hwlevel, force; - - islevel = atomic_load_int(&amd64_archlevel); - if (islevel != X86_64_UNDEFINED) - return (islevel); - - wantlevel = env_archlevel(&force); - if (!force) { - hwlevel = supported_archlevel(feat_edx, feat_ecx, ext_ebx, ext_ecx); - if (wantlevel == X86_64_UNDEFINED || wantlevel > hwlevel) - wantlevel = hwlevel; - } - - /* - * Ensure amd64_archlevel is set only once and - * all calls agree on what it was set to. - */ - if (atomic_cmpset_int(&amd64_archlevel, islevel, wantlevel)) - return (wantlevel); - else - return (atomic_load_int(&amd64_archlevel)); -} - -/* - * Helper function for SIMD ifunc dispatch: select the highest level - * implementation up to the current architecture level. - */ -dlfunc_t -__archlevel_resolve(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, - u_int ext_ecx, int32_t funcs[static X86_64_MAX + 1]) -{ - int level; - - for (level = archlevel(feat_edx, feat_ecx, ext_ebx, ext_ecx); level >= 0; level--) - if (funcs[level] != 0) - return (dlfunc_t)((uintptr_t)funcs + (ptrdiff_t)funcs[level]); - - /* no function is present -- what now? */ - __builtin_trap(); -} diff --git a/lib/libc/amd64/string/memcmp.S b/lib/libc/amd64/string/memcmp.S index d192229677b3..fea5cebc65f2 100644 --- a/lib/libc/amd64/string/memcmp.S +++ b/lib/libc/amd64/string/memcmp.S @@ -1,12 +1,9 @@ /*- - * Copyright (c) 2018, 2023 The FreeBSD Foundation + * Copyright (c) 2018 The FreeBSD Foundation * * This software was developed by Mateusz Guzik * under sponsorship from the FreeBSD Foundation. * - * Portions of this software were developed by Robert Clausecker - * under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,10 +27,6 @@ */ #include -#include - -#include "amd64_archlevel.h" - /* * Note: this routine was written with kernel use in mind (read: no simd), * it is only present in userspace as a temporary measure until something @@ -43,15 +36,10 @@ #define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ #ifdef BCMP -#define memcmp bcmp +ENTRY(bcmp) +#else +ENTRY(memcmp) #endif - -ARCHFUNCS(memcmp) - ARCHFUNC(memcmp, scalar) - ARCHFUNC(memcmp, baseline) -ENDARCHFUNCS(memcmp) - -ARCHENTRY(memcmp, scalar) xorl %eax,%eax 10: cmpq $16,%rdx @@ -169,6 +157,7 @@ ARCHENTRY(memcmp, scalar) 1: leal 1(%eax),%eax ret +END(bcmp) #else /* * We need to compute the difference between strings. @@ -241,165 +230,7 @@ ARCHENTRY(memcmp, scalar) 2: subl %r8d,%eax ret +END(memcmp) #endif -ARCHEND(memcmp, scalar) - -ARCHENTRY(memcmp, baseline) - cmp $32, %rdx # enough to permit use of the long kernel? - ja .Llong - - test %rdx, %rdx # zero bytes buffer? - je .L0 - - /* - * Compare strings of 1--32 bytes. We want to do this by - * loading into two xmm registers and then comparing. To avoid - * crossing into unmapped pages, we either load 32 bytes from - * the start of the buffer or 32 bytes before its end, depending - * on whether there is a page boundary between the overread area - * or not. - */ - - /* check for page boundaries overreads */ - lea 31(%rdi), %eax # end of overread - lea 31(%rsi), %r8d - lea -1(%rdi, %rdx, 1), %ecx # last character in buffer - lea -1(%rsi, %rdx, 1), %r9d - xor %ecx, %eax - xor %r9d, %r8d - test $PAGE_SIZE, %eax # are they on different pages? - jz 0f - - /* fix up rdi */ - movdqu -32(%rdi, %rdx, 1), %xmm0 - movdqu -16(%rdi, %rdx, 1), %xmm1 - lea -8(%rsp), %rdi # end of replacement buffer - sub %rdx, %rdi # start of replacement buffer - movdqa %xmm0, -40(%rsp) # copy to replacement buffer - movdqa %xmm1, -24(%rsp) - -0: test $PAGE_SIZE, %r8d - jz 0f - - /* fix up rsi */ - movdqu -32(%rsi, %rdx, 1), %xmm0 - movdqu -16(%rsi, %rdx, 1), %xmm1 - lea -40(%rsp), %rsi # end of replacement buffer - sub %rdx, %rsi # start of replacement buffer - movdqa %xmm0, -72(%rsp) # copy to replacement buffer - movdqa %xmm1, -56(%rsp) - - /* load data and compare properly */ -0: movdqu 16(%rdi), %xmm1 - movdqu 16(%rsi), %xmm3 - movdqu (%rdi), %xmm0 - movdqu (%rsi), %xmm2 - mov %edx, %ecx - mov $-1, %edx - shl %cl, %rdx # ones where the buffer is not - pcmpeqb %xmm3, %xmm1 - pcmpeqb %xmm2, %xmm0 - pmovmskb %xmm1, %ecx - pmovmskb %xmm0, %eax - shl $16, %ecx - or %ecx, %eax # ones where the buffers match - or %edx, %eax # including where the buffer is not - not %eax # ones where there is a mismatch -#ifndef BCMP - bsf %eax, %edx # location of the first mismatch - cmovz %eax, %edx # including if there is no mismatch - movzbl (%rdi, %rdx, 1), %eax # mismatching bytes - movzbl (%rsi, %rdx, 1), %edx - sub %edx, %eax -#endif - ret - - /* empty input */ -.L0: xor %eax, %eax - ret - - /* compare 33+ bytes */ - ALIGN_TEXT -.Llong: movdqu (%rdi), %xmm0 # load head - movdqu (%rsi), %xmm2 - mov %rdi, %rcx - sub %rdi, %rsi # express rsi as distance from rdi - and $~0xf, %rdi # align rdi to 16 bytes - movdqu 16(%rsi, %rdi, 1), %xmm1 - pcmpeqb 16(%rdi), %xmm1 # compare second half of this iteration - add %rcx, %rdx # pointer to last byte in buffer - pcmpeqb %xmm2, %xmm0 - pmovmskb %xmm0, %eax - xor $0xffff, %eax # any mismatch? - jne .Lmismatch_head - add $64, %rdi # advance to next iteration - jmp 1f # and get going with the loop - - /* process buffer 32 bytes at a time */ - ALIGN_TEXT -0: movdqu -32(%rsi, %rdi, 1), %xmm0 - movdqu -16(%rsi, %rdi, 1), %xmm1 - pcmpeqb -32(%rdi), %xmm0 - pcmpeqb -16(%rdi), %xmm1 - add $32, %rdi # advance to next iteration -1: pand %xmm0, %xmm1 # 0xff where both halves matched - pmovmskb %xmm1, %eax - cmp $0xffff, %eax # all bytes matched? - jne .Lmismatch - cmp %rdx, %rdi # end of buffer reached? - jb 0b - - /* less than 32 bytes left to compare */ - movdqu -16(%rdx), %xmm1 # load 32 byte tail through end pointer - movdqu -16(%rdx, %rsi, 1), %xmm3 - movdqu -32(%rdx), %xmm0 - movdqu -32(%rdx, %rsi, 1), %xmm2 - pcmpeqb %xmm3, %xmm1 - pcmpeqb %xmm2, %xmm0 - pmovmskb %xmm1, %ecx - pmovmskb %xmm0, %eax - shl $16, %ecx - or %ecx, %eax # ones where the buffers match - not %eax # ones where there is a mismatch -#ifndef BCMP - bsf %eax, %ecx # location of the first mismatch - cmovz %eax, %ecx # including if there is no mismatch - add %rcx, %rdx # pointer to potential mismatch - movzbl -32(%rdx), %eax # mismatching bytes - movzbl -32(%rdx, %rsi, 1), %edx - sub %edx, %eax -#endif - ret - -#ifdef BCMP -.Lmismatch: - mov $1, %eax -.Lmismatch_head: - ret -#else /* memcmp */ -.Lmismatch_head: - tzcnt %eax, %eax # location of mismatch - add %rax, %rcx # pointer to mismatch - movzbl (%rcx), %eax # mismatching bytes - movzbl (%rcx, %rsi, 1), %ecx - sub %ecx, %eax - ret - -.Lmismatch: - movdqu -48(%rsi, %rdi, 1), %xmm1 - pcmpeqb -48(%rdi), %xmm1 # reconstruct xmm1 before PAND - pmovmskb %xmm0, %eax # mismatches in first 16 bytes - pmovmskb %xmm1, %edx # mismatches in second 16 bytes - shl $16, %edx - or %edx, %eax # mismatches in both - not %eax # matches in both - tzcnt %eax, %eax # location of mismatch - add %rax, %rdi # pointer to mismatch - movzbl -64(%rdi), %eax # mismatching bytes - movzbl -64(%rdi, %rsi, 1), %ecx - sub %ecx, %eax - ret -#endif -ARCHEND(memcmp, baseline) .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/amd64/string/stpcpy.S b/lib/libc/amd64/string/stpcpy.S index 59358e3245a8..73c765556dc1 100644 --- a/lib/libc/amd64/string/stpcpy.S +++ b/lib/libc/amd64/string/stpcpy.S @@ -1,30 +1,10 @@ -/*- - * Copyright (c) 2023, The FreeBSD Foundation - * - * SPDX-License-Expression: BSD-2-Clause - * - * Portions of this software were developed by Robert Clausecker - * under sponsorship from the FreeBSD Foundation. - * - * Adapted from NetBSD's common/lib/libc/arch/x86_64/string/strcpy.S - * written by J.T. Conklin and - * adapted by Guillaume Morin to implement stpcpy - * that was originally dedicated to the public domain +/* + * Adapted by Guillaume Morin from strcpy.S + * written by J.T. Conklin + * Public domain. */ #include - -#include "amd64_archlevel.h" - -#define ALIGN_TEXT .p2align 4, 0x90 - - .weak stpcpy - .set stpcpy, __stpcpy -ARCHFUNCS(__stpcpy) - ARCHFUNC(__stpcpy, scalar) - ARCHFUNC(__stpcpy, baseline) -ENDARCHFUNCS(__stpcpy) - /* * This stpcpy implementation copies a byte at a time until the * source pointer is aligned to a word boundary, it then copies by @@ -38,7 +18,9 @@ ENDARCHFUNCS(__stpcpy) * requirements. */ -ARCHENTRY(__stpcpy, scalar) + .globl stpcpy,__stpcpy +ENTRY(stpcpy) +__stpcpy: movabsq $0x0101010101010101,%r8 movabsq $0x8080808080808080,%r9 @@ -59,7 +41,7 @@ ARCHENTRY(__stpcpy, scalar) dec %rax ret - ALIGN_TEXT + .p2align 4 .Lloop: movq %rdx,(%rdi) addq $8,%rdi @@ -127,111 +109,6 @@ ARCHENTRY(__stpcpy, scalar) .Ldone: movq %rdi,%rax ret -ARCHEND(__stpcpy, scalar) - -ARCHENTRY(__stpcpy, baseline) - mov %esi, %ecx - mov %rdi, %rdx - sub %rsi, %rdi # express destination as distance to surce - and $~0xf, %rsi # align source to 16 byte - movdqa (%rsi), %xmm0 # head of string with junk before - pxor %xmm1, %xmm1 - and $0xf, %ecx # misalignment in bytes - pcmpeqb %xmm1, %xmm0 # NUL byte present? - pmovmskb %xmm0, %eax - shr %cl, %eax # clear out matches in junk bytes - bsf %eax, %eax # find match if any - jnz .Lrunt - - /* first normal iteration: write head back if it succeeds */ - movdqa 16(%rsi), %xmm0 # 16 bytes of current iteration - movdqu (%rsi, %rcx, 1), %xmm2 # first 16 bytes of the string - pcmpeqb %xmm0, %xmm1 # NUL byte present? - pmovmskb %xmm1, %eax - test %eax, %eax # find match if any - jnz .Lshorty - - movdqu %xmm2, (%rdx) # store beginning of string - - /* main loop, unrolled twice */ - ALIGN_TEXT -0: movdqa 32(%rsi), %xmm2 # load current iteraion - movdqu %xmm0, 16(%rsi, %rdi, 1) # write back previous iteraion - pxor %xmm1, %xmm1 - add $32, %rsi - pcmpeqb %xmm2, %xmm1 # NUL byte present? - pmovmskb %xmm1, %eax - test %eax, %eax - jnz 1f - - movdqa 16(%rsi), %xmm0 # load current iteraion - movdqu %xmm2, (%rsi, %rdi, 1) # write back previous iteraion - pxor %xmm1, %xmm1 - pcmpeqb %xmm0, %xmm1 # NUL byte present? - pmovmskb %xmm1, %eax - test %eax, %eax - jz 0b - - /* end of string after main loop has iterated */ - add $16, %rsi # advance rsi to second unrolled half -1: tzcnt %eax, %eax # find location of match - # (behaves as bsf on pre-x86-64-v3 CPUs) - add %rsi, %rax # point to NUL byte - movdqu -15(%rax), %xmm0 # last 16 bytes of string - movdqu %xmm0, -15(%rax, %rdi, 1) # copied to destination - add %rdi, %rax # point to destination's NUL byte - ret - - /* NUL encountered in second iteration */ -.Lshorty: - tzcnt %eax, %eax - add $16, %eax # account for length of first iteration - sub %ecx, %eax # but not the parts before the string - - /* NUL encountered in first iteration */ -.Lrunt: lea 1(%rax), %edi # string length including NUL byte - add %rcx, %rsi # point to beginning of string - add %rdx, %rax # point to NUL byte - - /* transfer 16--32 bytes */ -.L1632: cmp $16, %edi - jb .L0815 - - movdqu -16(%rsi, %rdi, 1), %xmm0 # load last 16 bytes - movdqu %xmm2, (%rdx) # store first 16 bytes - movdqu %xmm0, -15(%rax) # store last 16 bytes - ret - - /* transfer 8--15 bytes */ -.L0815: cmp $8, %edi - jb .L0407 - - mov (%rsi), %rcx # load first 8 bytes - mov -8(%rsi, %rdi, 1), %rdi # load last 8 bytes - mov %rcx, (%rdx) # store to dst - mov %rdi, -7(%rax) # dito - ret - - /* transfer 4--7 bytes */ -.L0407: cmp $4, %edi - jb .L0203 - - mov (%rsi), %ecx - mov -4(%rsi, %rdi, 1), %edi - mov %ecx, (%rdx) - mov %edi, -3(%rax) - ret - - /* transfer 2--3 bytes */ -.L0203: cmp $2, %edi - jb .L0101 - - movzwl (%rsi), %ecx - mov %cx, (%rdx) # store first two bytes - - /* transfer 0 bytes (last byte is always NUL) */ -.L0101: movb $0, (%rax) # store terminating NUL byte - ret -ARCHEND(__stpcpy, baseline) - +END(stpcpy) + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/amd64/string/strchrnul.S b/lib/libc/amd64/string/strchrnul.S deleted file mode 100644 index 0e70b02311d7..000000000000 --- a/lib/libc/amd64/string/strchrnul.S +++ /dev/null @@ -1,170 +0,0 @@ -/*- - * Copyright (c) 2023 The FreeBSD Foundation - * - * This software was developed by Robert Clausecker - * under sponsorship from the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE 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 "amd64_archlevel.h" - -#define ALIGN_TEXT .p2align 4,0x90 # 16-byte alignment, nop-filled - - .weak strchrnul - .set strchrnul, __strchrnul - -ARCHFUNCS(__strchrnul) - ARCHFUNC(__strchrnul, scalar) - ARCHFUNC(__strchrnul, baseline) -ENDARCHFUNCS(__strchrnul) - -/* - * strchrnul(str, c) - * This is implemented like strlen(str), but we check for the - * presence of both NUL and c in each iteration. - */ -ARCHENTRY(__strchrnul, scalar) - mov %edi, %ecx - and $~7, %rdi # align to 8 byte - movzbl %sil, %esi # clear stray high bits - movabs $0x0101010101010101, %r8 - mov (%rdi), %rax # load first word - imul %r8, %rsi # replicate char 8 times - - /* - * Unaligned input: align to 8 bytes. Then proceed the same - * way as with aligned input, but prevent matches before the - * beginning of the string. This is achieved by oring 0x01 - * into each byte of the buffer before the string - */ - shl $3, %ecx - mov %r8, %r10 - add $8, %rdi - shl %cl, %r10 # 0x01 where the string is - xor %r8, %r10 # 0x01 where it is not - neg %r8 # negate 01..01 so we can use lea - movabs $0x8080808080808080, %r9 - - mov %rsi, %rcx - xor %rax, %rcx # str ^ c - or %r10, %rax # str without NUL bytes before it - or %r10, %rcx # (str ^ c) without matches before it - lea (%rax, %r8, 1), %rdx # str - 0x01..01 - lea (%rcx, %r8, 1), %r11 # (str ^ c) - 0x01..01 - not %rax # ~str - not %rcx # ~(str ^ c) - and %rdx, %rax # (str - 0x01..01) & ~str - and %r11, %rcx # ((str ^ c - 0x01..01) & ~(str ^ c) - or %rcx, %rax # matches for both - and %r9, %rax # not including junk bytes - jnz 1f - - /* main loop unrolled twice */ - ALIGN_TEXT -0: mov (%rdi), %rax # str - mov %rsi, %rcx - xor %rax, %rcx # str ^ c - lea (%rax, %r8, 1), %rdx # str - 0x01..01 - lea (%rcx, %r8, 1), %r11 # (str ^ c) - 0x01..01 - not %rax # ~str - not %rcx # ~(str ^ c) - and %rdx, %rax # (str - 0x01..01) & ~str - and %r11, %rcx # ((str ^ c - 0x01..01) & ~(str ^ c) - or %rcx, %rax # matches for both - and %r9, %rax # not including junk bits - jnz 2f - - mov 8(%rdi), %rax # str - add $16, %rdi - mov %rsi, %rcx - xor %rax, %rcx # str ^ c - lea (%rax, %r8, 1), %rdx # str - 0x01..01 - lea (%rcx, %r8, 1), %r11 # (str ^ c) - 0x01..01 - not %rax # ~str - not %rcx # ~(str ^ c) - and %rdx, %rax # (str - 0x01..01) & ~str - and %r11, %rcx # ((str ^ c - 0x01..01) & ~(str ^ c) - or %rcx, %rax # matches for both - and %r9, %rax # not including junk bits - jz 0b - - /* NUL or c found */ -1: sub $8, %rdi # undo advance past buffer -2: tzcnt %rax, %rax # first NUL or c byte match - shr $3, %eax # scale from bit to byte index - add %rdi, %rax # pointer to found c or NUL - ret -ARCHEND(__strchrnul, scalar) - -ARCHENTRY(__strchrnul, baseline) - mov %edi, %ecx - and $~0xf, %rdi # align to 16 byte - movdqa (%rdi), %xmm1 - movd %esi, %xmm0 - and $0xf, %ecx # distance from (%rdi) to start of string - pxor %xmm2, %xmm2 - mov $-1, %edx - punpcklbw %xmm0, %xmm0 # c -> cc - shl %cl, %edx # bits corresponding to bytes in the string - punpcklwd %xmm0, %xmm0 # cc -> cccc - add $16, %rdi - - /* check for match in head */ - pcmpeqb %xmm1, %xmm2 # NUL bytes present? - pshufd $0, %xmm0, %xmm0 # cccc -> cccccccccccccccc - pcmpeqb %xmm0, %xmm1 # c present? - por %xmm2, %xmm1 # either present? - pmovmskb %xmm1, %eax - and %edx, %eax # match in the string? - jnz 1f - - /* main loop unrolled twice */ - ALIGN_TEXT -0: movdqa (%rdi), %xmm1 - pxor %xmm2, %xmm2 - pcmpeqb %xmm1, %xmm2 # NUL bytes present? - pcmpeqb %xmm0, %xmm1 # c present? - por %xmm2, %xmm1 # either present? - pmovmskb %xmm1, %eax - test %eax, %eax # match in the string? - jnz 2f - - movdqa 16(%rdi), %xmm1 - add $32, %rdi - pxor %xmm2, %xmm2 - pcmpeqb %xmm1, %xmm2 # NUL bytes present? - pcmpeqb %xmm0, %xmm1 # c present? - por %xmm2, %xmm1 # either present? - pmovmskb %xmm1, %eax - test %eax, %eax # match in the string? - jz 0b - -1: sub $16, %rdi # undo advance past buffer -2: tzcnt %eax, %eax # where is the match? - add %rdi, %rax # pointer to found c or NUL - ret -ARCHEND(__strchrnul, baseline) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/amd64/string/strlen.S b/lib/libc/amd64/string/strlen.S index cc248af001ac..88328d40e48b 100644 --- a/lib/libc/amd64/string/strlen.S +++ b/lib/libc/amd64/string/strlen.S @@ -1,15 +1,9 @@ -/*- +/* * Written by Mateusz Guzik - * Copyright (c) 2023 The FreeBSD Foundation - * *** 408 LINES SKIPPED *** From nobody Tue Sep 19 08: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 4RqZdQ3hYLz4tc9Z; Tue, 19 Sep 2023 08: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 4RqZdQ1NZyz3LBj; Tue, 19 Sep 2023 08: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=1695112298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyfV1CqYOOrOGulsYPtkq/0aUfDwNF2LoKj7+WQ7e7w=; b=wvmABJ8AHJNVJFqqa8O0nM7xmpoakqI0OlSBxaZ3q7SMyl4PTwTRGgz9EM1Ot5xMRxv1tf GXel6B8DnKf/Tjc3UV95b7KicFb29i21BRif2qTj5YiVw5DrPhhqMW+gtL8+Owsaspz31q RCYcn8PgO36Vw/3UbAz1kz52Cc49YXVF2FZcZeb9+JM8npkxKBWmAzX+ervhAloIjhTY3z PgdN53Fq9F/1jcqx002KYKtThea4jCY75flaBcH1LPMlvE84M17/mm5wdG+DxhuzJry1wo WRnD7Zhh/NUXZ2g2MrTExkSOO9Uom8J30ypFxPBhNxPEBMUrFwHWStafzx9OGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695112298; a=rsa-sha256; cv=none; b=Luog7kyxBGdok4JOanlN9BsAm/xFY08T4nE7rQ6x9K6NlDXSm08Cmp9OhSy6ViBrQ+5j5W yRLjeueqPZ5VCvQ4tYKpQnDU+N4bKwfg/eDiX9GiaQ0Jc9q8X1Y0hbWttXA3hNhZsaz3EG k7RRkppe2yxaACVCiblooNUPTq6ztKEtA36thgEZEUez7a3NkN5KsNpchhMNmM1Zu0XGn/ JrCb3OVKxsULfWXfCJLoLUAStboKvaJZOydnGcr/c60qnrfWznyJsRK3E8NIpWYoce/ysJ AGbeAgy+p3wy9/MjJwQT03b1nSVZselnbgUIWG8U1OYDkCtmTe8Jt1sZS5+wKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695112298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyfV1CqYOOrOGulsYPtkq/0aUfDwNF2LoKj7+WQ7e7w=; b=Yg/a5yUcjCeNn/a8ZH1lRyU/I/AXJ+RVPlT3dtH9iajKA+PaNe1slTsUH6XnYgqKYb/Wn5 SSt6NjjFQJ99zrw+VdM7/6xr8TJd5/3rPnL8sPxO17EUB/QwdWZzTEtXPQ81vWDbi/zXkL oVkmmAUs4IuFkupvM9obbZzzhzlPWLBAYbr9bsT0/22CclJO2WDKa6hN1jQavAqkK7/bPk JN1Rbn00OQWgJc6qRpXjM7FPqDJ4efTK6s/KUjBxWBS5ndb3nZejwZbVb3BINCQKDyLysh j6anJrch0hWkHuH42v901iaXvX7CtPdBO9hmAY6FRzuXCa4HuoGqOLhQOxpu3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqZdQ0RLWz15pH; Tue, 19 Sep 2023 08: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 38J8Vb9W008910; Tue, 19 Sep 2023 08: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 38J8VbgN008907; Tue, 19 Sep 2023 08:31:37 GMT (envelope-from git) Date: Tue, 19 Sep 2023 08:31:37 GMT Message-Id: <202309190831.38J8VbgN008907@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: 3f3c631da0ab - stable/14 - rtld: output rtld errors into the dbg channel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 3f3c631da0ab6834c5b4a3e3d8c3ff98a4ad51aa Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f3c631da0ab6834c5b4a3e3d8c3ff98a4ad51aa commit 3f3c631da0ab6834c5b4a3e3d8c3ff98a4ad51aa Author: Konstantin Belousov AuthorDate: 2023-09-15 19:26:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-09-19 08:31:24 +0000 rtld: output rtld errors into the dbg channel (cherry picked from commit 72d97e1dd9cc72a2acb96e35e56db6f3f51bca7d) --- libexec/rtld-elf/rtld.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index aa7e6020a085..f8c4c18b5d5e 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1073,6 +1073,7 @@ _rtld_error(const char *fmt, ...) fmt, ap); va_end(ap); *lockinfo.dlerror_seen() = 0; + dbg("rtld_error: %s", lockinfo.dlerror_loc()); LD_UTRACE(UTRACE_RTLD_ERROR, NULL, NULL, 0, 0, lockinfo.dlerror_loc()); } From nobody Tue Sep 19 08:32: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 4RqZf25QG0z4tcD1; Tue, 19 Sep 2023 08:32: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 4RqZf24zkHz3LH3; Tue, 19 Sep 2023 08:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695112330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=meTtb8meoHxHdr3uneUTgD+JBky8SE3ec7w2O03UwRE=; b=wzRBEgh2oTMK1qDDEMOBjd1XH0ZMTYimi3wyQd/vFfsgdTWKs2UsdaZTR3+z5cCja4Mnje 1wk/qwxjR1GKt2E8qv9ddkcDhI2Vq4n+97C0aNFZGgrsQpDkOu+jOuLwJ6jTVY+TLXzLva Fv/ZaBZ7N8SQjY67LHP/YybGRSdEJ2Lyu9zJX+5PUhlF/qKi/0vredpk4CN0n7Y3+VL+6d gD3+/KxF4ovxngBRm2+zpvAQNto34tdYQPE6Hl5AW+yL2EZSvUy0snCo6e+hGWlcejQgCy 4Ea6Yg+iXbOmTCAGbKsvjc0bXDtRpLTGvQ/r88lDozbNefg9tivF3gdeuYG4ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695112330; a=rsa-sha256; cv=none; b=mnj3lHVmcU4sZMr1e6JyTvakhjCkqJkDFI32HVkYpKDCTl1qGPJLKLBP7nzl7m9KPgL4UG q/3GWn1ii+b5be9nFDnG86eMw0NezYOWsNZIcXOo9LjRn1wakTiFyQrzZGbV33JB5ZD3Ah FHazVNZXIIlYjhmeoDw4jqoXFD7SYmwgsGf3Z7hFITukD9MyCqJ/7/7Tg2DJ69NVIMt2Dk eqBIDag6F0sPSs7Mw9i8R6UYH4eHE47nXp7FFqztUv1UEa6nwkDGBTHzuFxTCT9nGJBkAA 5dKMk+pStgsBMlnZwZmMgThGp1bRwYnsp8XE3zvIENSD/k5iPc9r8fmkAqXoFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695112330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=meTtb8meoHxHdr3uneUTgD+JBky8SE3ec7w2O03UwRE=; b=MkxZ8/5DzpSl28Dj7f7/RPt7GS1k0iaYY0K0jLZv3Q04/JiD0xjpzE+2H9gxEM83kLPHjI u0TmqEHeWMX+WxzFV4GZwVf1CN2JJuF1FAidWzsJjdXwr7Aa+XMbCnYUgyJFwdS2oebpgG 6rxPcbB9L/YV+gP8+dPZhrLsJs1jntR9GSchIVOe0SnNhnr2Jbu9T/k2JjfQsy8OQMd7UJ BK1hG5eYhNp0T5FV0l1cJi5E9LP0jZ3edMf1V5kSPOWXEuIRseDPDCvmgzIIH7V0Yh0YeS 8x3nx5uAjo9rVQcZ/WMNJ3o5oPXjq8iiJcAcXsVnUbuQ681tgj/m9ncrTvX8kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqZf242m9z162p; Tue, 19 Sep 2023 08:32: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 38J8WAls009119; Tue, 19 Sep 2023 08:32:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38J8WAeD009116; Tue, 19 Sep 2023 08:32:10 GMT (envelope-from git) Date: Tue, 19 Sep 2023 08:32:10 GMT Message-Id: <202309190832.38J8WAeD009116@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: 5d6adc09cfb5 - stable/13 - rtld: output rtld errors into the dbg channel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 5d6adc09cfb50f7c08b33ab2e8fbe73af7ba609e Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6adc09cfb50f7c08b33ab2e8fbe73af7ba609e commit 5d6adc09cfb50f7c08b33ab2e8fbe73af7ba609e Author: Konstantin Belousov AuthorDate: 2023-09-15 19:26:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-09-19 08:31:49 +0000 rtld: output rtld errors into the dbg channel (cherry picked from commit 72d97e1dd9cc72a2acb96e35e56db6f3f51bca7d) --- libexec/rtld-elf/rtld.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 888586cf876d..ac492b1071f0 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1077,6 +1077,7 @@ _rtld_error(const char *fmt, ...) fmt, ap); va_end(ap); *lockinfo.dlerror_seen() = 0; + dbg("rtld_error: %s", lockinfo.dlerror_loc()); LD_UTRACE(UTRACE_RTLD_ERROR, NULL, NULL, 0, 0, lockinfo.dlerror_loc()); } From nobody Tue Sep 19 10: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 4RqdHs3zV1z4tlJh; Tue, 19 Sep 2023 10: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 4RqdHs3Rzfz3bZt; Tue, 19 Sep 2023 10: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=1695119497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NrURnYdQdlSTKMjRpAPgbYmaxcc9l+FIn6KYW2g0m7w=; b=bjI7k9bUE49dwOjk0FwjO0wPwqsgwAjdk57htd5qUEVUtODURMAjP+Jq3uhJ53Gz1m7TVa mFs+7YnfluAh972gXCjneHzzv/+m9wlnxytIIfgooG/MNsotV6qHLL/OIn5iXPKmvVQcU7 E/mFTemdK+QXh6A+Iod4HWcoYrbV/ubBqDhpHCo+7U5bfgZ379UjdDOSCHLVwybfbaslcH SEx/PxyaJWsKkb3cXXnj1u1NdyRC7o4biKtd1nsh4foFNUaSqYUA4ax2si7HQPhJ4GC0nV cdaFRhYtm5bNjQuzXt884VNEOfqPUsWqnFJN5VVhTkYXYZXVGheqwsZz+c+9cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695119497; a=rsa-sha256; cv=none; b=VmWTXYo633yw0o7krn6kkOlqqo0XDrRTU3EcJHKZpuqD0YiUE5ItU1YEpk074wNwQb4OlN gq7oJECYOvMN3ksLxJ4DUkr7uMgOWHIaC47lMe+gIb5Tvro71vxBrOIzHPfbdQrMNzK/0m 3dHrXoeOu7crk2akyNQY+8evckFz/KfX/Gla9UT6dCGrgTzaYViyhIJNN5m/k3Mc1jUaVc SZlk9MN5RQr4Lk/VIiToQBtzIMjJwJLWhLGtadI3EkXAWw2rQM1VWJATWakDhEFPXECcVJ a/YLgCdtXjzpqAoAko0GrizBu2q6ZD9f+IKK1Uv+E2ek0TRQPsQjLzbhb9BSuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695119497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NrURnYdQdlSTKMjRpAPgbYmaxcc9l+FIn6KYW2g0m7w=; b=MOxbzJNQ2JJzymb10UC9WO9n+z40ufjoXjh/EDAgzIYUKz8QFYCcYzTmAkSOfXibayF2Ur C1tFN76/sW03utMIGIBOaOnRSXDv8x9PC9E663iuXVSLyeIMiCnFxkYfbD2yJQA+Cii8jD EgdZeqQG4T1JeXah0Si6Ka1uonixXrQ8Zvddx5A8eFBqby5UD+asAFfIGRPXEN2cYvFNKg Qh2r5enLu+aRjqqPy63g+bA5zKsgmeETDIPvGCem6ISgkjR+Q5bSx71ia0rfHwmGEaOKb2 yjzoXQaX2oqPqB7l1+cktIqbuvmdVchqOKhqwUQbOdhkTQt1Wf0OnKYIOwFWqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqdHs2Vhfz192t; Tue, 19 Sep 2023 10: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 38JAVbDK004149; Tue, 19 Sep 2023 10: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 38JAVbbx004146; Tue, 19 Sep 2023 10:31:37 GMT (envelope-from git) Date: Tue, 19 Sep 2023 10:31:37 GMT Message-Id: <202309191031.38JAVbbx004146@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 51d54ed6151b - stable/14 - tcpdump: Initialize tzcode early. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 51d54ed6151b5381bca703d85762d9d054463003 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=51d54ed6151b5381bca703d85762d9d054463003 commit 51d54ed6151b5381bca703d85762d9d054463003 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-15 21:36:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-19 10:10:21 +0000 tcpdump: Initialize tzcode early. An explicit tzset() call is usually not needed as it happens implicitly the first time we call localtime() or mktime(), but in some cases (sandboxing, chroot) this may be too late. PR: 273807 MFC after: 3 days Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D41880 (cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6) --- contrib/tcpdump/tcpdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index 52209fedb999..8cfcb04fc093 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -1564,6 +1564,8 @@ main(int argc, char **argv) if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0) error("%s", ebuf); + tzset(); + while ( (op = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != -1) switch (op) { From nobody Tue Sep 19 10: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 4Rqddv61nzz4tlqY; Tue, 19 Sep 2023 10: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 4Rqddv5XRVz3drS; Tue, 19 Sep 2023 10: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=1695120435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWtXVQJK2ikq4D7NljOhj/7aXUFH9onuYQWWTGfCrME=; b=Fwfg1c6FVaz3Ji3ILUfO4moF1nxqVGqxwCOY8zRBEduPbfE0NFeOHg4ak+vL8rmuyo8iY/ p+DFVRR5kir6xtKQ7rR97p2xIM0+/XM++Gc22C3i2tmf/GhIMX4QCcplM8w3wF/EKdQ+qe /T4n7fq++Eq2An7vnVOd8F1iPNapc1OeCJyOFYVkMJYvTU25MO4jhH7puYyYUKybhQDhzK /X0JPHdG0bEbEjz4LPEfnDbH2zelrr0tcB18HgW2/TTW33fQnzQ/7FwXCRjYcYRAeJ/S/p JyJ3hcZbrj3Y1zGEznyyM1i/Iuz807XAIl5bAlUgJsQV45yblW3gjorW80aTIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695120435; a=rsa-sha256; cv=none; b=Zu1ph9ZrKrlcFk5KYdPOAtdhsn03t4/JkM+FDwL4p8bJdWnNWhaW8fdIymHlWnkMjEGs7B SDEredIWxHKdGEuws4XK7yP5VLTgSBS+Y6qonTUYldCmJjznFrkr5nEr7J59njW9CvDs+c MwK27ueIIl1bYnC3VBRh5WsWsBY6kWyNHqdHeijgOamoek2k59cGksNtj/PAE6ClI6NTih LidbgtnqriwEysJBzfIMRv7G8cqVfMaJz2SNmmzpo5kBp+/KF/xmVPxwCQPmPAVoAUO2hc NhsrTR4WBQkTsd2azN3cP/UE3t1xqUOsUd1iiO7nwkVrKcseW8sQvShU7jI19Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695120435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWtXVQJK2ikq4D7NljOhj/7aXUFH9onuYQWWTGfCrME=; b=h+3u62+cS83+qN1Zp2JawAnG83JfTvj7TfkJ0xaxYMh/jH+jiuN1N+ona6fAHayLQZ47gh SZ7+ZUprJ688Llf/QUtHV3kaAaT7mQMeko+jSFKNHf1cW8+ITuOK3OkN9EHIHvGR/frK5y 4VBflGXtCBmaDnEEoyeivn3UoDpaK2HJOlfL8kNCoHSk0wsutObT5A741UGVete66Urxsc JShhnNtyzlaHau+Lnv4zU0bcHqbJ+rVkeng8FX3L63OF47ufPD5oSoUejjyHMkypmyonc5 RbRNVzxUjbA2laUdbugKD1wSnC1lzWtBr6xCTN3veLo9lLnaCT/79yHPaJg8iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rqddv4TFCz18tn; Tue, 19 Sep 2023 10: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 38JAlFwx025892; Tue, 19 Sep 2023 10: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 38JAlFci025889; Tue, 19 Sep 2023 10:47:15 GMT (envelope-from git) Date: Tue, 19 Sep 2023 10:47:15 GMT Message-Id: <202309191047.38JAlFci025889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c1b6110df040 - releng/14.0 - tcpdump: Initialize tzcode early. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c1b6110df0405b53e0191c5cea42a85dc19ffe46 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c1b6110df0405b53e0191c5cea42a85dc19ffe46 commit c1b6110df0405b53e0191c5cea42a85dc19ffe46 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-15 21:36:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-19 10:45:29 +0000 tcpdump: Initialize tzcode early. An explicit tzset() call is usually not needed as it happens implicitly the first time we call localtime() or mktime(), but in some cases (sandboxing, chroot) this may be too late. PR: 273807 MFC after: 3 days Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D41880 Approved by: re (kib) (cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6) (cherry picked from commit 51d54ed6151b5381bca703d85762d9d054463003) --- contrib/tcpdump/tcpdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index 52209fedb999..8cfcb04fc093 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -1564,6 +1564,8 @@ main(int argc, char **argv) if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0) error("%s", ebuf); + tzset(); + while ( (op = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != -1) switch (op) { From nobody Tue Sep 19 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 4RqkZW26mBz4v0T8; Tue, 19 Sep 2023 14:29: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 4RqkZW1Y0Xz4cSR; Tue, 19 Sep 2023 14:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695133779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJ+SbstC/vMSY5pypjJ9acu9KPhKgvbL7IuEqSgV1KA=; b=Ikoq22MIt+hPhmWT4uTavX2QBbDHDyspZYhYl1l6oGotJxqo1uSaAM4Uq37wtCyIwtkSY0 dzyOgwJb7n3xba0U35BuqMnxYzadpnSIZBSLObDRisBcH/qGJcwH9iP8Z0iRNkD8vWG5xw eeUgEWkNMHXL+JJOTD1j32ksjhKlCymFC7KBYTjQ4auGW7f0hBmamk5XZlx26GLHtcGEaa B0profAc1ZGoCZs+BTc8PlBOZh6ps3rKq2MA5Ljek/wlzU76Neu6vIzR0HFEMHX79KJ0Z4 2GWP505Yn/I9dpGxBqg3MvxtAU82/Vr8qr7pOnnhkF5j79wHCG5Y9tuXvljfdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695133779; a=rsa-sha256; cv=none; b=bEM22GyMZHUls/ROhBEo/1t5eH5hshBc2h6LY8WnCzgYz/oAMsF2/zPHDfkCv21tz+ZyUA BFW8g1Nw+35soDJtnqfhaEss9r5un3SLAUJeDCqoZ1lfVn44xTFqwnIzG8pyJze9/v1MpA kSfJ/zHA6wfqBqlbS868ezfZXtrQRX8yqnDaLMTaYdU1em7bdKKX8qcy1Mox25AB8Ydchs 937vaY3AAeVfzCf9Jq3x3rCO7mKviEHA9YWQBq31+jnym/vMSa5RNbXrFbrJQJo+nz9jTZ X6AwpRhxl7OgG0RXMHnOlkeX1WVxg2/YgIldLvBQtWrD/LrGBxjeiBgpssaFIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695133779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJ+SbstC/vMSY5pypjJ9acu9KPhKgvbL7IuEqSgV1KA=; b=TkZ9f4ZDLmIsisthxirZrnjK4ly18CaXYd42OmZt4IQ1V1BT0yYZ+x+zWZAKnHm/bTqHTb oR3L597MjOtQuLPMAZaM7ZX6FCBanyYohf81QwJU8stNByOkZQHtx20uJn0oCjAg95s7m4 t+Hl+gnjAlRD31RIyv7P5KoLWVVRxBsBK53W5PEwEoKJpHgFk7TIe5cJQe9Cg+xr8Q8igM T7WhOC4l21fPiKZ3lFGA4XeIMqSQA0H6dt9SIITxcqeG4evOE+HYe1A5gxIZW6XmiGK8UK iPzs7el9Vb74iOKOHYC3yfigLFpoczm+dHVAJOT1ea+8ilfsPtIkcvpx4S0cfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqkZW0bBdz2h9; Tue, 19 Sep 2023 14:29: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 38JETcE7092104; Tue, 19 Sep 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 38JETcHD092101; Tue, 19 Sep 2023 14:29:38 GMT (envelope-from git) Date: Tue, 19 Sep 2023 14:29:38 GMT Message-Id: <202309191429.38JETcHD092101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: dda585f2c84b - releng/14.0 - cxgbe(4): Avoid hang on kldunload on netlink enabled kernels. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: dda585f2c84be0f04239227249c85c54da58a485 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dda585f2c84be0f04239227249c85c54da58a485 commit dda585f2c84be0f04239227249c85c54da58a485 Author: Navdeep Parhar AuthorDate: 2023-09-05 18:21:03 +0000 Commit: Navdeep Parhar CommitDate: 2023-09-19 14:28:12 +0000 cxgbe(4): Avoid hang on kldunload on netlink enabled kernels. netlink(4) calls back into the driver during detach and it attempts to start an internal synchronized op recursively, causing an interruptible hang. Fix it by failing the ioctl if the VI has been marked as DOOMED by cxgbe_detach. Here's the stack for the hang for reference. #6 begin_synchronized_op #7 cxgbe_media_status #8 ifmedia_ioctl #9 cxgbe_ioctl #10 if_ioctl #11 get_operstate_ether #12 get_operstate #13 dump_iface #14 rtnl_handle_ifevent #15 rtnl_handle_ifnet_event #16 rt_ifmsg #17 if_unroute #18 if_down #19 if_detach_internal #20 if_detach #21 ether_ifdetach #22 cxgbe_vi_detach #23 cxgbe_detach #24 DEVICE_DETACH Sponsored by: Chelsio Communications Approved by: re (kib) (cherry picked from commit 3814249f1e8dacfcd326dd7c416c528a1d88b6a1) (cherry picked from commit 3287f64a731406a305b76b86d0b1a7ed47786359) --- sys/dev/cxgbe/t4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 759887a2a488..a32cd9a3f2df 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3459,7 +3459,7 @@ cxgbe_media_status(if_t ifp, struct ifmediareq *ifmr) struct adapter *sc = pi->adapter; struct link_config *lc = &pi->link_cfg; - if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4med") != 0) + if (begin_synchronized_op(sc, vi , SLEEP_OK | INTR_OK, "t4med") != 0) return; PORT_LOCK(pi); From nobody Tue Sep 19 14:29: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 4RqkZX3LDTz4v0L2; Tue, 19 Sep 2023 14:29: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 4RqkZX2VQfz4cLD; Tue, 19 Sep 2023 14:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695133780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1UnpQId8sqEoKpAxksEx7B+uoj0td3qinn8KC2ZBB4=; b=aZnxXxL2YyTL9QhY1OvXlFcgm0GYfBiw73sKxEBHt9s8hTNRGlQfUehwnxmgtZg13CAaJ0 0Q9y3a7qjfAx5ihfS+AmSG4IXlfQ/QBlVuD14h/u5dRnPjZ2pZqhgRtT6USGwxy8DgiRQR 8502y/D9KSKunWIt5iNYYMhTS14IFAZYXaFTeYy85k43HNKK3hTxvR6wqCr2aXptDdK4Q5 3vyxx2PoHYqiQho1W+QuGv5j1jsAaMvsLbVvqI8sn9wVScvc/FnHWyT+Yr2Wd3LjWVGym8 2YLvRGXfP2HSVs3RjB89Zagg9rdNRnQGXNl9BwUnkBfZ5H/iFj1DKHovWa1emQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695133780; a=rsa-sha256; cv=none; b=b37kbVIwQJA6ipqwIoRWh/tZ8y3xObv0qgyR8B4rIZtIcxo5FBZivQyuBMcW/TKnNnLSlq L+pVikumPMMqgVKV1ecK1hZylfMcMEJbnf17waMl5mHpzeiDEglNa3wN/U74a4PEouUoj9 irnomJ3pi6UUxPjl/Z06pyxlRtvIP0Pbea8pEMh+J/yBtKlrq6/3zJgkzP6WYnuKgMvQ1T yqv5QpN0zQ/YXQqiA18QGwuMrDwOGGIFAmcrAD3pMfRRIxkoXqV6GqXPnT5RtaUq09tcuk 7aV1n8v+65K+MGW3tBgmNpCxpclFWNwt3IzbJl2f0pF1T018dDqUsIJkdSeGdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695133780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1UnpQId8sqEoKpAxksEx7B+uoj0td3qinn8KC2ZBB4=; b=lSFQ8LhaxHSU34GYtOzXLZe85Fl3Vv6M+ISYSB2Xd4JoP2TB8X/qo2XhjpleqlrHHBgZEY oP95Fp30qIqzHZH/fEKkVnwJ2epM2Me6jba/49Cw7hpQUn6LzRWIPVE56gTiaDanqD60ok 7wwjrR6pEm3ka9r0KoWDx1K5SwUKRW0JxpVVUCxIDRp8TJFfUNm45W2ul45NOkf1A3B7hr meddT6Qkh3jKZd0fXEI6vKQdYgp7LBGqdmi1ond/GwdJjbr8Jgln250+glE3El5TWLuWNW EyZfHptboMQ6FO8LG6Vx6zqYx1D7HP/rl3+RjJCVuhLmIx5HSGz/E4YGPR7/bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqkZX1Q1gz2Kc; Tue, 19 Sep 2023 14:29: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 38JETert092156; Tue, 19 Sep 2023 14:29:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38JETetL092153; Tue, 19 Sep 2023 14:29:40 GMT (envelope-from git) Date: Tue, 19 Sep 2023 14:29:40 GMT Message-Id: <202309191429.38JETetL092153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: f976dbaeb482 - releng/14.0 - cxgbe(4): Fix tracing with netlink enabled kernels. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f976dbaeb482ebbddf70c7374671ce9c27e4ad7f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f976dbaeb482ebbddf70c7374671ce9c27e4ad7f commit f976dbaeb482ebbddf70c7374671ce9c27e4ad7f Author: Navdeep Parhar AuthorDate: 2023-09-09 19:39:15 +0000 Commit: Navdeep Parhar CommitDate: 2023-09-19 14:28:28 +0000 cxgbe(4): Fix tracing with netlink enabled kernels. 1. The tracing ifnet's name must match the nexus name. One way to do this is to not use a unit number. 2. Do not hold the tracer lock around ether_ifattach or ether_ifdetach. netlink calls back into the driver (see stack below) and that leads to illegal lock recursion. tracer_ioctl if_ioctl get_operstate_ether get_operstate dump_iface rtnl_handle_ifevent rtnl_handle_ifattach if_attach_internal if_attach ether_ifattach t4_cloner_create Sponsored by: Chelsio Communications Approved by: re (kib) (cherry picked from commit e203cb393fe0b963dd585d0576dcc6a47a28c386) (cherry picked from commit 38da3db5f9e3e9bc9eba30a2c560bfe660ce95ec) --- sys/dev/cxgbe/t4_tracer.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index 4190aa627b14..d9b336c4b64a 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -138,7 +138,7 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) struct match_rr mrr; struct adapter *sc; if_t ifp; - int rc, unit; + int rc; const uint8_t lla[ETHER_ADDR_LEN] = {0, 0, 0, 0, 0, 0}; mrr.name = name; @@ -166,21 +166,14 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) goto done; } - - unit = -1; - rc = ifc_alloc_unit(ifc, &unit); - if (rc != 0) - goto done; - ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - ifc_free_unit(ifc, unit); rc = ENOMEM; goto done; } - /* Note that if_xname is not . */ - if_initname(ifp, name, unit); + /* Note that if_xname is identical to the nexus nameunit */ + if_initname(ifp, name, -1); if_setdname(ifp, t4_cloner_name); if_setinitfn(ifp, tracer_init); if_setflags(ifp, IFF_SIMPLEX | IFF_DRV_RUNNING); @@ -192,12 +185,14 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) tracer_media_status); ifmedia_add(&sc->media, IFM_ETHER | IFM_FDX | IFM_NONE, 0, NULL); ifmedia_set(&sc->media, IFM_ETHER | IFM_FDX | IFM_NONE); + sx_xunlock(&t4_trace_lock); ether_ifattach(ifp, lla); - + sx_xlock(&t4_trace_lock); mtx_lock(&sc->ifp_lock); if_setsoftc(ifp, sc); sc->ifp = ifp; mtx_unlock(&sc->ifp_lock); + rc = 0; done: sx_xunlock(&t4_trace_lock); end_synchronized_op(sc, 0); @@ -208,7 +203,6 @@ static int t4_cloner_destroy(struct if_clone *ifc, if_t ifp) { struct adapter *sc; - int unit = if_getdunit(ifp); sx_xlock(&t4_trace_lock); sc = if_getsoftc(ifp); @@ -219,10 +213,9 @@ t4_cloner_destroy(struct if_clone *ifc, if_t ifp) mtx_unlock(&sc->ifp_lock); ifmedia_removeall(&sc->media); } + sx_xunlock(&t4_trace_lock); ether_ifdetach(ifp); if_free(ifp); - ifc_free_unit(ifc, unit); - sx_xunlock(&t4_trace_lock); return (0); } From nobody Tue Sep 19 15:02: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 4RqlJJ1TYZz4v2Bb; Tue, 19 Sep 2023 15:02: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 4RqlJJ0ysBz4fWj; Tue, 19 Sep 2023 15:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695135744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WbbOMQCTZ5l5EkFMUX0QGq46ToYrozjm65UPFpeMypM=; b=AM/D514Dink754mYVEQcH0zPy88X0byUNOvq2u//gVig+LExVrKBB/CnwFllY/P7v5Uivo JlzZhCbUqkdVxRjKOhkB07ew61RFlyZHEyvbr9fvTNK4RakqirFVIfZBt3FXBxhTRmKmot NACcv+RFD9OpUJwslixyo3nwvQvxZfRLrfiijSIfCCZilBREA+gW0Y4y4Dz0WYy70hQUDG MPBc8Nm+gUlrlcuvP2iX9a/7BHOc5HuYV2tXtGg6YaOTRtg39sajkw6VkLWHjbW5Q6DJVs zqXTbmzCV/yM/MSXKSwr5vActWPXqG83vvHij8D1hFQgOkFyXr9iSYnTctR8AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695135744; a=rsa-sha256; cv=none; b=wLQTMl0xh6eZZL68VPRogVH73coKgNwIjEeMlIzNR4OAsA+wjJo68aiOr/dY6m6RFIwpTr zAVrsrMNlFlVWS0q/CpjyGYE0R2I54TcexVUWh04EdS5NpDzEqXNGTmcUd5SCE9+gTcTs+ GbCRfN75HPOvmpq/GjyDF67vGzZbtRRd9tRFs11afP7qf3hGZoDsQQgja+gX3DpSRGNn9p 9ZnRTZ7U2U/G9Rvh+7EuU9ynbW0Ohswf0v9/Va2XpCTJELtPAgfYSgx7kluts+0+k4U+kV bOcsP6mLnKsK2Oh+aOJXNikafUbTIdU6VvtIKl8Dj8sshvcMeH0ssQa67j/U2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695135744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WbbOMQCTZ5l5EkFMUX0QGq46ToYrozjm65UPFpeMypM=; b=Y8g525oV/LXATLuJWI5fR8K4M8JL9lUzPAYOH+1gExsItdjrjINtCnlpe2wBhwF4io80S2 sVJg1m4mSKYsrbjv4at3LB8PJNNuk5R0WeLj1PJnRflTFflsRSnJPhztXSZeDc08jAQHb0 L8Y0ES4eQGGWkIQIbwWIu+kRCF7lc+LrpIAjEwpY08WqtlPvNX/1+1BT9xYJtpI0mSobJA 0eH/HP+a5n3dSgfas/rfSneg9VqvFbEqiGp/87JzE54rnuJ0ees1CBdTo+Mgf2DcTH6crL OhBtMiSyokbWLnbk2mhUNREmmD4H2YhNPN0+dE2mOjstLisy9arMIl92IsHs3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqlJH6rlBz3GQ; Tue, 19 Sep 2023 15:02: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 38JF2N7q055791; Tue, 19 Sep 2023 15:02:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38JF2Nj0055788; Tue, 19 Sep 2023 15:02:23 GMT (envelope-from git) Date: Tue, 19 Sep 2023 15:02:23 GMT Message-Id: <202309191502.38JF2Nj0055788@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: fd4b13acd90b - stable/14 - libcrypto: link engines and the legacy provider to libcrypto List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: fd4b13acd90bdc107a072660d91baa163474ebef Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fd4b13acd90bdc107a072660d91baa163474ebef commit fd4b13acd90bdc107a072660d91baa163474ebef Author: Pierre Pronchery AuthorDate: 2023-09-15 15:14:16 +0000 Commit: Ed Maste CommitDate: 2023-09-19 15:01:55 +0000 libcrypto: link engines and the legacy provider to libcrypto OpenSSL's legacy provider module and engines need to link to libcrypto.so, as it provides some of the actual implementations of legacy routines. This is a little tricky due to build order issues. Introduce a small hack (LIBCRYPTO_WITHOUT_SUBDIRS) that builds libcrypto.so in its usual early phase without any OpenSSL provider modules or engines. This is intended to restore the test suite; a future change should remove the hack and replace it with a better approach. PR: 254853, 273528 Discussed with: Folks at EuroBSDCon in Coimbra Sponsored by: The FreeBSD Foundation (cherry picked from commit 1a18383a52bc373e316d224cef1298debf6f7e25) --- Makefile.inc1 | 2 +- secure/lib/libcrypto/Makefile | 2 ++ secure/lib/libcrypto/engines/Makefile.inc | 2 ++ secure/lib/libcrypto/modules/legacy/Makefile | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index f740cc5abcca..45d034c0002c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2980,7 +2980,7 @@ libraries: .MAKE .PHONY ${_+_}cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 _prereq_libs; \ ${MAKE} -f Makefile.inc1 _startup_libs; \ - ${MAKE} -f Makefile.inc1 _prebuild_libs; \ + ${MAKE} -f Makefile.inc1 _prebuild_libs -DLIBCRYPTO_WITHOUT_SUBDIRS; \ ${MAKE} -f Makefile.inc1 _generic_libs # diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 585e89861815..d8ae91bb3272 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -1,6 +1,8 @@ SHLIBDIR?= /lib +.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS) SUBDIR= engines modules +.endif .include .include diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 39b728ff722f..13d5f4849cbc 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -16,6 +16,8 @@ CFLAGS+= -DB_ENDIAN .endif CFLAGS+= -DNDEBUG +LIBADD= crypto + .PATH: ${LCRYPTO_SRC}/engines WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 913c0c41f5eb..a285d0b1148b 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -1,5 +1,6 @@ SHLIB_NAME?= legacy.so +LIBADD= crypto SRCS+= legacyprov.c prov_running.c From nobody Tue Sep 19 17:19: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 4RqpLP6jcPz4v9hR; Tue, 19 Sep 2023 17:19: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 4RqpLP6J8hz3FHD; Tue, 19 Sep 2023 17:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695143965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHAXA7o+8cxZ2X0T8+cdYsTNnKaAzoucF362qDnLQis=; b=NO18NNTTUMKGoMpoGEHxbgROxSoqqb9eaqgRJWEPQMnwOSCn9+vfxywnSkrdOhfgHa7dZS T8L2EsPDkRMGjmjPNFvVnwx1N9ksC5yuaf4SZjMbv+EFZft4HC34t5oWEIYGLNSyG1THDw l1yDjQR91LSApHy0rrVeUM1zMYMvIrZXLwq+TfJZT3yNM795jMXAQkaY+SyCNgLacNVlWd dNAFqjgd7Zs0CtkDXsZMA9enxTN1jsllVMvgOkfnicBE4HL+gIVqkMyPrkwsq+nNJ1CKJa 42mfWXHbFVYyY+h+P62b0hsTIdzYW5jlpWYrto6aMUpybo2vaPupDSH8tJOerA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695143965; a=rsa-sha256; cv=none; b=kydj2e4EFinu1rvR70e3U9dPxNyJUTVIP9diHqPEc8wgXyDnsEmownh37YDlDOyRHyWOOd HRR7m/UwSbRrvZf1KMjyKtWqHIldIENRM12uUi2Tka3bjmEY28cBG+CJIvzGjakIh8JLZh fvYCdkAxo1EToKMRriCw5drrkK8Wm6dtE+xkurctuu4r0Orqxa445bb8HuvVJq48fYy1IQ +IM4ntnNGEBZG6I57LSzgFvdInfvK1+f3OhT3aYWIjMYms1SFMj2XC3Lx3sFys+2br+NaU rUrtGD+lbC6e/gL1eVn/+2C6RXuGtK5UAfVS1jDxtyVmeNL/uCYFxVXUtTxtmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695143965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHAXA7o+8cxZ2X0T8+cdYsTNnKaAzoucF362qDnLQis=; b=Q7Md19nJhMQjiJZ3lrf8itKMPuRy2xp+OkO/tHIbqU/tmoMkQJEt07lpyejq+0c+YAVi9p x56hKQmUYhghIl+H2+gCzuQHjez1f89jW2i5tMckpie6YaVNxPiqRBHLOZIj0PZ3gFXHdw vsh9BInishDvPPNNU2+YnOppCSrfSTtKyi8TwEQySatvUUWBHAeAKXzTHBZfhen6F9ZdBG 39VF0HR/sklgEMrWEBFfihcU997xoZwpYCzFSEUyIj+4Lu/SXUJ9cIeh9PqRuSTZmsuFQt 9Px/AYPWL8be2Rssdv7QBpyAa9HM2PATAYwGPdgp59Z+4zmBuNfhHkpV3ZJ1zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqpLP5FL5z6qM; Tue, 19 Sep 2023 17:19: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 38JHJPHW075294; Tue, 19 Sep 2023 17:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38JHJP1i075291; Tue, 19 Sep 2023 17:19:25 GMT (envelope-from git) Date: Tue, 19 Sep 2023 17:19:25 GMT Message-Id: <202309191719.38JHJP1i075291@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: b7312b90289e - releng/14.0 - libcrypto: link engines and the legacy provider to libcrypto List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: b7312b90289e7244c124da9845c0a3011ba8d936 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b7312b90289e7244c124da9845c0a3011ba8d936 commit b7312b90289e7244c124da9845c0a3011ba8d936 Author: Pierre Pronchery AuthorDate: 2023-09-15 15:14:16 +0000 Commit: Ed Maste CommitDate: 2023-09-19 17:19:17 +0000 libcrypto: link engines and the legacy provider to libcrypto OpenSSL's legacy provider module and engines need to link to libcrypto.so, as it provides some of the actual implementations of legacy routines. This is a little tricky due to build order issues. Introduce a small hack (LIBCRYPTO_WITHOUT_SUBDIRS) that builds libcrypto.so in its usual early phase without any OpenSSL provider modules or engines. This is intended to restore the test suite; a future change should remove the hack and replace it with a better approach. PR: 254853, 273528 Discussed with: Folks at EuroBSDCon in Coimbra Sponsored by: The FreeBSD Foundation (cherry picked from commit 1a18383a52bc373e316d224cef1298debf6f7e25) (cherry picked from commit fd4b13acd90bdc107a072660d91baa163474ebef) Approved by: re (gjb) --- Makefile.inc1 | 2 +- secure/lib/libcrypto/Makefile | 2 ++ secure/lib/libcrypto/engines/Makefile.inc | 2 ++ secure/lib/libcrypto/modules/legacy/Makefile | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index f740cc5abcca..45d034c0002c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2980,7 +2980,7 @@ libraries: .MAKE .PHONY ${_+_}cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 _prereq_libs; \ ${MAKE} -f Makefile.inc1 _startup_libs; \ - ${MAKE} -f Makefile.inc1 _prebuild_libs; \ + ${MAKE} -f Makefile.inc1 _prebuild_libs -DLIBCRYPTO_WITHOUT_SUBDIRS; \ ${MAKE} -f Makefile.inc1 _generic_libs # diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index f4bd4a3247f3..827dee41201d 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -1,6 +1,8 @@ SHLIBDIR?= /lib +.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS) SUBDIR= engines modules +.endif .include .include diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 39b728ff722f..13d5f4849cbc 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -16,6 +16,8 @@ CFLAGS+= -DB_ENDIAN .endif CFLAGS+= -DNDEBUG +LIBADD= crypto + .PATH: ${LCRYPTO_SRC}/engines WARNS?= 0 diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index 913c0c41f5eb..a285d0b1148b 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -1,5 +1,6 @@ SHLIB_NAME?= legacy.so +LIBADD= crypto SRCS+= legacyprov.c prov_running.c From nobody Wed Sep 20 02:10: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 4Rr27F0btBz4tMml; Wed, 20 Sep 2023 02:10: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 4Rr27D6z83z4Yl9; Wed, 20 Sep 2023 02:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695175833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QzCIHQ9D16OpJqbT0596AXc+7mYhfgVt1UI2QinHe8=; b=TBfszTPxrPM0ff0SDpC7WkMlhFap9w8un7LvCD9mvQECWcxmMHk5Tn9Pe9C7lgU47lBDNT ONYqlY0azVkEpzWqmk7d5nxpDDTZrWVYzlD7aqVA7+6MwUWxERAQyj8+I8MVcI1N7zb3LE +bi7+a0hjxTCJM3Du8nzfWjBL4RwYYpSakkhUsZLJ5MWbqKjw4pObum140u5ILnZ6K+Dk6 LsWslNfKARhdchiUV8tQIM6UA17JICZ+csxHcUveYvnyMgQXBl+PKr4T2NqL1yOJyxMYoL dhQRQMi8S08JjSsqvEdv++mARJcEAPaKik9ngLtiN+F5jHYi2vs/S97p42VQtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695175833; a=rsa-sha256; cv=none; b=Q3ABbQOe22Xaj6o47l3oOaaiQVMdMdRkJyDu0ZtAM/3DEzwcKVRvNG4QflWq3Xvv0ysYDR 7RV6fnGQ4jx5Z7YK5+0Z8ChlEZ1/CXWASVCg6dE3S6yMFRjAqQihHBCbiDTlZ8IZjC4wd0 wsfoARh/2E/uMRBYkl7MGj5bd6uDQnljjgfKS2eL/fL6FdO0qpDXU/YhnQxxgS/CwkxeOr 5g3idfuP6gvoA4Pj5JaD9ekWMpGuoPJafCVPn8uf+I5MihG2bK2Kx5y7IkNZ8uZLECj/vG j2F1qIyoTg9e+DDvmjLPyb6YIxxe9McTzNIrzFtZnhQK6nYINQtEsO1edu+DFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695175833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QzCIHQ9D16OpJqbT0596AXc+7mYhfgVt1UI2QinHe8=; b=ePuwVbCivm5hZMARNE2bsyOiyCOQnrCt9+4mwEMCazTZTBm0oyCAp+9iJoHaCNGfdz26+h gLncY7j6MhypKZLYQww9YWlAGsGge5cooDrGAxwUmnuDf0jND1b270vPooyLnhOS2J7ley 40muUs28sXyN7Ffg7H0Qq0jNFp4M1uxYCnUoNoITMIzwB0MAQm9H1fpH/Ue46ZerCm58Lv 5CzyfRaA3UVW3m4qvMfi78exlcLNZTHO81G5DOVCGDZ5hKPEcEYhISOPgbxEyEpe0s6E6s HZelE6Uff+X7JMUkwHbP2LBeU2iyPqgYCPmSTLu9pPOKMKbiNpf8ium0tt+M7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rr27D64PCzdCl; Wed, 20 Sep 2023 02:10: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 38K2AWr8063960; Wed, 20 Sep 2023 02:10:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38K2AWj7063957; Wed, 20 Sep 2023 02:10:32 GMT (envelope-from git) Date: Wed, 20 Sep 2023 02:10:32 GMT Message-Id: <202309200210.38K2AWj7063957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Moore Subject: git: a4c7a3f7f56a - stable/14 - powerpc pmap: initialize kernel pmap radix trie List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a4c7a3f7f56a131a74b78ac48f6533feb8ef5aae Auto-Submitted: auto-generated The branch stable/14 has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a4c7a3f7f56a131a74b78ac48f6533feb8ef5aae commit a4c7a3f7f56a131a74b78ac48f6533feb8ef5aae Author: Doug Moore AuthorDate: 2023-09-13 18:17:57 +0000 Commit: Doug Moore CommitDate: 2023-09-20 02:09:37 +0000 powerpc pmap: initialize kernel pmap radix trie Commit 2d2bcba7ba70141388729ed49674b36fd01146c5 changed radix trie implementation and made it necessary that radix tries be initialized with vm_radix_init. @dbaio reports that in some configurations, there is a powerpc boot panic and that this commit introduced the problem. In powerpc/aim/mmu_radix.c, the radix trie in kernel_pmap is initialized by zeroing all its fields. Add a call to vm_radix_init to properly initialize kernel_pmap->pm_radix. Reported by: dbaio Reviewed by: alc, jhibbits Fixes: 2d2bcba7ba drop NULL check from radix trie search MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41846 (cherry picked from commit 8763b9862f90dc3bdbbc5e3c2664890be7c1f0c4) --- sys/powerpc/aim/mmu_radix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 32d08d2d7026..b904978e042c 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -1843,6 +1843,7 @@ mmu_radix_setup_pagetables(vm_size_t hwphyssz) bzero(kernel_pmap, sizeof(struct pmap)); PMAP_LOCK_INIT(kernel_pmap); + vm_radix_init(&kernel_pmap->pm_radix); ptpages = allocpages(3); l1phys = moea64_bootstrap_alloc(RADIX_PGD_SIZE, RADIX_PGD_SIZE); From nobody Wed Sep 20 04:05: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 4Rr4hF5MNgz4tVNZ; Wed, 20 Sep 2023 04:05: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 4Rr4hF4jNBz3J5j; Wed, 20 Sep 2023 04:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695182749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vqnnoc8M8s7feWga0tTD/RPLf6GnKHPpkaNlhaniR4U=; b=AlXzewOOYDv6TdJ6I1OUYhmEK+2b70JxTOBeqLTS8oyYBP6jWdyiZJezTkLLoy0NxDwlR6 ifslCxDqdU3p1SE86ntK8C9IZEls9QNw3aUVAtPXMALK3sKw71IBw0El15OqPSdrDRBG7S tWECC4yejNlJ297BrYDyBxqqvngoD9XyLi47RQPvZPRWTQt9SV16gnytT38hYEUiE+4Nkz 5J5JrMq5DLZY2vfklQVhD9RtVmtRoe8J3ln6eBOlRERO60llYmFJANGzAiYRjMv8X4i9YI NQYAiS0fMMjukCHXbDZDtJ9Bu28+QtmrFY3XN8qZszUHX1sQ7ZFRjaghcRnBGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695182749; a=rsa-sha256; cv=none; b=H2W2BEyO2V7r8aUC11v6K2As7LPCZdHTMWNZrEgi5FYlMf8Mp7EXTSWJwnmNt7y8q8biAT 9LpXcRSYZidcd3VFz1RbTqUYzHtYlqnGjmHwiZoPbsx0z2idtD0rE5V/E1io/Lytj1OOVk t5SaZwhHTiZIRVt5kCmIISx2KoLhf8ruxfB4DRMe0zznQjECzL1aOJTKQEfnQgEJqRJfiY 2E9KallSrlX42bOpaskYdcQKa/Qc+rJCvhsvRS2HrtwxnxsqYEhPGfkAZGqndiO8c0nM5H cGxcN0rMpueNKPNxUsZAg3D1UVo0D5K5PvHIZ59I+Gd9I7SzPMi8iSiWj7H3Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695182749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vqnnoc8M8s7feWga0tTD/RPLf6GnKHPpkaNlhaniR4U=; b=T1vcQcSpAtW9NarwcLERf+Kx5i2aVd9CrSBLBr+rcu9mA65qCLMyhLXWjZBYy2WGCYfVQb 8aq37a9IfEjkycEDyzMf2Mg2rNTzIXp7IzfGk79QyYMDMl5Ej0yOJnVBNQ1YcmFbFz7Pb/ rGEeJpC1xIwc+Nb9u2Q6cJbdKksOEpHDCDgtzm8h38S+/EBd3Fe1uhskULzbfWxrOJBdwB JE/0aexY4SRg6yXWIRWnTXyB3F9nljCRWbDV6LNGWAKwX1bXUPzgbW62VkO+rpAhxUI5AZ e+XvR6TTTK19G7J1sGG21mNFhFl1VZqCjHK94oBKmsohkYuapz/M8vbsZsyWzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rr4hF3dtjzgnn; Wed, 20 Sep 2023 04:05: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 38K45nMp055394; Wed, 20 Sep 2023 04:05:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38K45nfI055391; Wed, 20 Sep 2023 04:05:49 GMT (envelope-from git) Date: Wed, 20 Sep 2023 04:05:49 GMT Message-Id: <202309200405.38K45nfI055391@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: c750055382f7 - stable/14 - net: Check per-flow priority code point for untagged traffic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: c750055382f73db964c20f8eba855a9ac9e19591 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c750055382f73db964c20f8eba855a9ac9e19591 commit c750055382f73db964c20f8eba855a9ac9e19591 Author: Zhenlei Huang AuthorDate: 2023-09-06 10:15:14 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-20 04:04:57 +0000 net: Check per-flow priority code point for untagged traffic Commit 868aabb4708d introduced per-flow priority. There's a defect in the logic for untagged traffic, it does not check M_VLANTAG set in the mbuf packet header or MTAG_8021Q/MTAG_8021Q_PCP_OUT tag set by firewall, then can result missing desired priority in the outbound packets. For mbuf packet with M_VLANTAG in header, some interfaces happen to work due to bug in the drivers mentioned in D39499. As modern interfaces have VLAN hardware offloading, the defect is barely noticeable unless the feature per-flow priority is widely tested. As a side effect of this defect, the soft padding to work around buggy bridges is bypassed. That may result in regression if soft padding is requested. PR: 273431 Discussed with: kib Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39536 (cherry picked from commit 49d6743da15fe378782e43776df8b4fd4f84c8d0) --- sys/net/if_ethersubr.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index ab274eeb88bf..2cbe0ea98f27 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -123,6 +123,8 @@ static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); static int ether_requestencap(struct ifnet *, struct if_encap_req *); +static inline bool ether_do_pcp(struct ifnet *, struct mbuf *); + #define senderr(e) do { error = (e); goto bad;} while (0) static void @@ -470,11 +472,7 @@ ether_set_pcp(struct mbuf **mp, struct ifnet *ifp, uint8_t pcp) int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { - uint8_t pcp; - - pcp = ifp->if_pcp; - if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN && - !ether_set_pcp(&m, ifp, pcp)) + if (ether_do_pcp(ifp, m) && !ether_set_pcp(&m, ifp, ifp->if_pcp)) return (0); if (PFIL_HOOKED_OUT(V_link_pfil_head)) @@ -1400,6 +1398,19 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, mtag_pcp, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(vlan_mtag_pcp), 0, "Retain VLAN PCP information as packets are passed up the stack"); +static inline bool +ether_do_pcp(struct ifnet *ifp, struct mbuf *m) +{ + if (ifp->if_type == IFT_L2VLAN) + return (false); + if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG) != 0) + return (true); + if (V_vlan_mtag_pcp && + m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL) + return (true); + return (false); +} + bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, const struct ether_8021q_tag *qtag) From nobody Wed Sep 20 07:04: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 4Rr8fS4vwBz4thrK; Wed, 20 Sep 2023 07:04: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 4Rr8fS4KwYz3YXm; Wed, 20 Sep 2023 07:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lB9kEKrNo1kkWBi9GDOgyEEWY7x5jo2yb4NGeMHKr0=; b=SuIXtOOMJRpJJhHkPjpaJ/SwUDYNlg1c7VPUXQF8VJV8yl62/TN6bOxuAvbmh8NdAe00fD 7sqtGkxpp+9JDkRl930VjmjCrlHMTSeHgdm65NzsYqfsoAjcEOgkm6du9GcN7TXDzvhy8j h0PrFy+0VBCZvZxhPK+SjjWtdLEuWS+TIjBVaMUUaVGp5Fx5FA+fV5go9pwMP+/KjCWtKK ZRC2EUEjXq0b186oPjDA+FXacNINEZKCN1867aw97wWhy1e0Ay2wGSvZZ5P2/tkLXoJoYE Al/+YNOU70gxPUdaKqX8sATIVgG/rBYOeWotycFmIUACBN8o28rQiZlTuFK9DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695193472; a=rsa-sha256; cv=none; b=w+sBHGJmf6k0JNiKoqYMKzZVZWo+QtDMeAhlADAD/xvhrrC/nxrA2c+hqQ+/O1K9JBeKKg 9MDBxQBZ76SzdpBFp+pH8qywcinO3XFsiy7bIGq0wD3I7hup2dCXxUphUhzoPR/uGHsufu MkY+++fgav/OV6dTiCFTjQV3mRYsSVnBQhwQ9XTs96idknezxogfr8ipE0O3er3yzdWh4S eRi1RLHkkwAXSTnDw6iI+QBLRSkLj8w1I/MrzoYCvn9Y/AJEUwLdeevFSoCJ//iQ+FM6/O lsoVAxkb/hfVYjV7FeNSDtLfp4MOmf4gx2syvUzAv65TAPvO+b7izy5IECX/Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lB9kEKrNo1kkWBi9GDOgyEEWY7x5jo2yb4NGeMHKr0=; b=IesDnfbaRuCff/318wTFo8kDiKdKgCpVELehMqoCuFAzmkQXT84jZvHnUZv22qtAI0zDA2 aBSkVI/Ac0tpCFYjXJAUozLemNKgMpGSDBUA5T/HlHkoUSGeARR1JN1OcC0R6j1RMHtpBl A8wn95Q95JGSCNh+F5CmqvK/AtBR/ZHlFyz16mpodRfhEOSYG18GjfqtM2OfJ2Fe/ZUiPg IkYvPhH6U9JOMjNK0zinAQQmshlyifvaWPhS6Fu24tzEH78lx0wtdAS7KQwccepKO4WvyK d2YnbgUV31S1Xk1KLeKbdDFQd5q2hqEGpyyjYR/bwjwngiPaIfdDJ9hEl2+XPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rr8fS3FB6zmP6; Wed, 20 Sep 2023 07:04: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 38K74W2b053249; Wed, 20 Sep 2023 07:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38K74WGo053246; Wed, 20 Sep 2023 07:04:32 GMT (envelope-from git) Date: Wed, 20 Sep 2023 07:04:32 GMT Message-Id: <202309200704.38K74WGo053246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b12c6876b429 - stable/14 - Fix geom build with clang 17 and KTR enabled List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b12c6876b4294922175442c9206cd4e34819533b Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b12c6876b4294922175442c9206cd4e34819533b commit b12c6876b4294922175442c9206cd4e34819533b Author: Dimitry Andric AuthorDate: 2023-09-12 06:52:31 +0000 Commit: Dimitry Andric CommitDate: 2023-09-20 07:03:55 +0000 Fix geom build with clang 17 and KTR enabled When building a kernel with clang 17 and KTR enabled, such as with the LINT configurations, a -Werror warning is emitted: sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ^~ | & sys/geom/geom_io.c:145:31: note: remove constant to silence this warning Replace the multiple uses of the expression with one macro, and in this macro use "!= 0" to get a logical operand instead of a bitwise one. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41823 (cherry picked from commit 479d224efcbf0115f8cd84314fcc46cbac146a1d) --- sys/geom/geom_io.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 2acf08517222..da8f917686ff 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -68,6 +68,9 @@ #include #include +#define KTR_GEOM_ENABLED \ + ((KTR_COMPILE & KTR_GEOM) != 0 && (ktr_mask & KTR_GEOM) != 0) + static int g_io_transient_map_bio(struct bio *bp); static struct g_bioq g_bio_run_down; @@ -142,7 +145,7 @@ g_new_bio(void) bp = uma_zalloc(biozone, M_NOWAIT | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_new_bio(): %p", bp); @@ -160,7 +163,7 @@ g_alloc_bio(void) bp = uma_zalloc(biozone, M_WAITOK | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp); @@ -175,7 +178,7 @@ void g_destroy_bio(struct bio *bp) { #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp); @@ -220,7 +223,7 @@ g_clone_bio(struct bio *bp) bp->bio_children++; } #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2); @@ -249,7 +252,7 @@ g_duplicate_bio(struct bio *bp) bp2->bio_attribute = bp->bio_attribute; bp->bio_children++; #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2); From nobody Wed Sep 20 07:09: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 4Rr8mV0X8Rz4tj5q; Wed, 20 Sep 2023 07:09: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 4Rr8mV02lmz3Z62; Wed, 20 Sep 2023 07:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kwYeeUY8VerVP/jmI4sKONep3nDWSlwTXLL9uX+mrYA=; b=weGARLwBAXpDmlzB1rpAThPUiITYfuduoUeVpINetgMLt3HAFuKndBO5sn3TutHFWuYHCv yCwGp9XKwO5dTDhinkqLZ6O1owvmJH16qxszbGFV8cbH6ODh4hsrG/drglAH9S9hnyr2pm l3qWZZtJT/vr4IRoDyVM656zqH5kO7uz49hZvh5FF6JlyGvEvaUYeeQWA7mdbYkjpQgEMV OQv6O9KEyLpX/56KiXq0Uhao3rYIfnydM6eHRgc/8KQWglshG8bQzBZCvSv2K6JEnJ0pPh duD5wZFGTfiYMynnSDgSJRJRDN1qFiALOUFPV826gQiHywxYEeGb5mWjUK5Q7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695193786; a=rsa-sha256; cv=none; b=gDtSitrirbfz5+tk57d24N1wFrzkIIg6KWHNhi719niMugyoU4h30uyIkdZkxB4if0tEWp c9nV/ZukcPIBu45HaYPA0GIuNJkF07M55T/bz2GB/izLbwK5iFIXfPD41wI6SVgxoM80IY D5E4JplW88DJ2NnQi8AbfwomgjSkE+CPp7Du6SNz3Utnyu2z8lsLuiVhQQnjAUYTX7lUFg gtcVEXS0hUh9p4orda3IpDyDu87wqYWXN8hcIe2tBYtLaZI/R/HaPBWNtQBAmkkuCUByfu M05vnMl122e+cafIGw1ine1APpXP+CtkwEd4f8J3DS89+qDG4pMxN+38E5BIaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kwYeeUY8VerVP/jmI4sKONep3nDWSlwTXLL9uX+mrYA=; b=fvScttq0sc2AJRW37iv+YwqxXsSPfMzjigqQa0VvddqPTDiABFHv3opEYGDD4opdxhuc0z YrUaRHaFy9quESz37qXsjAox8ZbhFBLVxgAqeqKRzaaS0g9heAllZGmvaRihIlhTsKFmuJ y02vTZ1FDnZlT05HtZyZa750smqm03TgoFjwutlFRbu8OvLxv30mzj3JMAm7JInA9zJsGM EPx28cUHyjGfDur9ekOQS+Zrtq2OGihEBxu/QbDp0U0ioP35exwLTPbTtpqcqHaL900pV+ 8F44sgLfyNwoDTOMep2FfsFItNYHhRNhiN9Q7YHAOHRmPjXo2CdYlDoGPJKCJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rr8mT6F1Czm7Z; Wed, 20 Sep 2023 07:09: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 38K79jE0054082; Wed, 20 Sep 2023 07:09:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38K79jKx054079; Wed, 20 Sep 2023 07:09:45 GMT (envelope-from git) Date: Wed, 20 Sep 2023 07:09:45 GMT Message-Id: <202309200709.38K79jKx054079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c3e092dacbc8 - stable/13 - Fix geom build with clang 17 and KTR enabled List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3e092dacbc8ba38c0be175f95403b3b15da736f Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e092dacbc8ba38c0be175f95403b3b15da736f commit c3e092dacbc8ba38c0be175f95403b3b15da736f Author: Dimitry Andric AuthorDate: 2023-09-12 06:52:31 +0000 Commit: Dimitry Andric CommitDate: 2023-09-20 07:04:02 +0000 Fix geom build with clang 17 and KTR enabled When building a kernel with clang 17 and KTR enabled, such as with the LINT configurations, a -Werror warning is emitted: sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ^~ | & sys/geom/geom_io.c:145:31: note: remove constant to silence this warning Replace the multiple uses of the expression with one macro, and in this macro use "!= 0" to get a logical operand instead of a bitwise one. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41823 (cherry picked from commit 479d224efcbf0115f8cd84314fcc46cbac146a1d) --- sys/geom/geom_io.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 70c5809ae8eb..914b5807e6e0 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -67,6 +67,9 @@ #include #include +#define KTR_GEOM_ENABLED \ + ((KTR_COMPILE & KTR_GEOM) != 0 && (ktr_mask & KTR_GEOM) != 0) + static int g_io_transient_map_bio(struct bio *bp); static struct g_bioq g_bio_run_down; @@ -141,7 +144,7 @@ g_new_bio(void) bp = uma_zalloc(biozone, M_NOWAIT | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_new_bio(): %p", bp); @@ -159,7 +162,7 @@ g_alloc_bio(void) bp = uma_zalloc(biozone, M_WAITOK | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp); @@ -174,7 +177,7 @@ void g_destroy_bio(struct bio *bp) { #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp); @@ -219,7 +222,7 @@ g_clone_bio(struct bio *bp) bp->bio_children++; } #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2); @@ -248,7 +251,7 @@ g_duplicate_bio(struct bio *bp) bp2->bio_attribute = bp->bio_attribute; bp->bio_children++; #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2); From nobody Wed Sep 20 07:10: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 4Rr8mt7525z4thvF; Wed, 20 Sep 2023 07:10: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 4Rr8mt6cvMz3ZPs; Wed, 20 Sep 2023 07:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CEo2q+beCkXEqb57WiOutJ1yugt+XvQ7zIjWe7TMDk=; b=F/8p0s6ETffIfBp5yfs1aBbhhvTbK9I9bU1/phOvV8o5LH0BLAtKTny8Wyf9cc3/k9Ummp 3GEKd1Dcc1+JUgC/Red8kqhGKwESMmJfQWpNVbbOYT7JlRNBiZzepK1T+HUo06mSCXdiC/ 5vhPSxPz3f5xyfmZMvKuelkGSQmPWfmpQ1jof93+wplghoemF0AdUl7hkEZ26FhrJ4+iWS dWxZrsozaPkgNVKjzz2IS74Mg+tRIOpbtgCkn+TX3uuZ29qjTHMtQsNNpuKV14Ajjh4suD WBywjLoVwbyLlVNhB0kt1UGV9v9p9CFPQOKD48/YnO9aBKetzIiu5gvnR/ueIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695193806; a=rsa-sha256; cv=none; b=Js3Ya5TvvX5NRYrDe5etssVaorycTRwZiF8YNLqAknZdAv165hu6hcpVdmBkbqQ7ENSjoI fKQEnojdpzLWnti8hhEbE/WkTkpf7pZ3UYe4xj8H7kcqOOSEmQvxkmVPHby3hbDnm6xyeE 0AoDy+jQtu0owyz9h2oUHhFoKZS6U0gQ1lu/FGlEwyAPDpt0859Uk5ye+XAcJd3QuwLqJU Mq+V8ZGnyh+muYtTtetwY4Onl9w9BFU9yR2veZpxD3IP3MaeftfsRxAUAurjrNr/4rYbc8 mBhjp45ZgKV7vaTWDEFqoJvWvdVvV6G9/BWbue9dHbob+zdZnNnlBesFsLmwDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695193806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CEo2q+beCkXEqb57WiOutJ1yugt+XvQ7zIjWe7TMDk=; b=EccPWEDj2az8Gc6v4Z7fDodRwrNfR6h1SeOphYMCsqanyiAkruvr7ss6t42WZLrNcdyZbQ VSVfVKY6C8RrhNqxo48gBtRbB3W7HU66+KYTcFALidg1O9y9LwdVbntNAXugVlXve1yY6M ggWwkbF9qUahZjBZgYfFJx9Wwp7rQy57dDGup2mCB+V5A/TeIqRVUq8wplM7dctLx4AXu9 1P1LBDDTcyA4f0TB6K9eQPkW5VQD4kEWNxaEaSIusZi/omIbJW5AYYDhGW1mCiuKS+Y34I qKVgKMeDWE76uRxJoMfmWgsBVJ5rNAHJ6/5Z4nL8uzvbUj1IAsuzRgH4E4l7Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rr8mt5bPyzm7c; Wed, 20 Sep 2023 07:10: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 38K7A6no057189; Wed, 20 Sep 2023 07:10:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38K7A6i2057184; Wed, 20 Sep 2023 07:10:06 GMT (envelope-from git) Date: Wed, 20 Sep 2023 07:10:06 GMT Message-Id: <202309200710.38K7A6i2057184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 08862a1a5e14 - stable/12 - Fix geom build with clang 17 and KTR enabled List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 08862a1a5e14d49c221999a82e2a52690f918a97 Auto-Submitted: auto-generated The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=08862a1a5e14d49c221999a82e2a52690f918a97 commit 08862a1a5e14d49c221999a82e2a52690f918a97 Author: Dimitry Andric AuthorDate: 2023-09-12 06:52:31 +0000 Commit: Dimitry Andric CommitDate: 2023-09-20 07:04:10 +0000 Fix geom build with clang 17 and KTR enabled When building a kernel with clang 17 and KTR enabled, such as with the LINT configurations, a -Werror warning is emitted: sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation 145 | if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { | ^~ | & sys/geom/geom_io.c:145:31: note: remove constant to silence this warning Replace the multiple uses of the expression with one macro, and in this macro use "!= 0" to get a logical operand instead of a bitwise one. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41823 (cherry picked from commit 479d224efcbf0115f8cd84314fcc46cbac146a1d) --- sys/geom/geom_io.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 84a290dcc970..50db2f0c6639 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -67,6 +67,9 @@ __FBSDID("$FreeBSD$"); #include #include +#define KTR_GEOM_ENABLED \ + ((KTR_COMPILE & KTR_GEOM) != 0 && (ktr_mask & KTR_GEOM) != 0) + static int g_io_transient_map_bio(struct bio *bp); static struct g_bioq g_bio_run_down; @@ -150,7 +153,7 @@ g_new_bio(void) bp = uma_zalloc(biozone, M_NOWAIT | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_new_bio(): %p", bp); @@ -168,7 +171,7 @@ g_alloc_bio(void) bp = uma_zalloc(biozone, M_WAITOK | M_ZERO); #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp); @@ -183,7 +186,7 @@ void g_destroy_bio(struct bio *bp) { #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp); @@ -231,7 +234,7 @@ g_clone_bio(struct bio *bp) bp->bio_children++; } #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2); @@ -260,7 +263,7 @@ g_duplicate_bio(struct bio *bp) bp2->bio_attribute = bp->bio_attribute; bp->bio_children++; #ifdef KTR - if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) { + if (KTR_GEOM_ENABLED) { struct stack st; CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2); From nobody Wed Sep 20 10:02: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 4RrDbM2SQLz4tR8J; Wed, 20 Sep 2023 10:02: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 4RrDbM1sWJz4WKD; Wed, 20 Sep 2023 10:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695204127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/4wdy6iv81Gy/uDT56KZy1IMS07kGU/ESBryLTupJA=; b=QtvGI6LSUbJ0vsUP0KCY1Ie3cwoluhIUVrtJvMzJMkKz6SX5T2pLtRlUfMcjgsJb2UVRoa 1FcWs+O8JQ/gtom01fj7IGg++UQXUYMxv5Fgsyi0RCE5YfPrMtf8PTMlgprvb+N8kqCSau kYmIDgTWDal9nSgiXH2AIaVt7+unpINDZfC/udzXMvsvbhHga4R4kHbFIxK1+2LtGg3Uhr NtSXqBd3JWYu2W+WcGBHAg8LJ3XP0l6nxCRJK4owldqk7Jj4rO3QZLAwFnnjIfkHd9GB9E NY8HNXjvsFSyzAsNoRUk2EOoZ8R4lwtQTCvs5NazO8uJIZbh+bab6vAwsA4elQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695204127; a=rsa-sha256; cv=none; b=tSfrKHsNsBg7cpDNklKc3UaDqosoq1j0j6X38nWQmrXpDRRGySCj28XLl2SAdNLUUnBM0X gxpHyOHEPaMSy95u96YEObbDZWUR3bZbI+IkhgoO5qzvubwx/74IG00516+yLXfQdwOR6b 9IA3hx2eKYQc0AVyorcVb6fQcCl2AtElV+Az6BBWJBaYeNRk/OeaZa5/cV6U5bcX7Q7J7r RoPjpwbx89Gn70jwV/GQHLdoqWFo9RHaH9n9HeiLVwZ63HegX7FutotbLF6KW+99DAsmdK u0xlAdoqPLsbPoGWO8RhSy4Qud75yIGWx66HMExb7X+ibbRjAdKtLmTPleJUaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695204127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/4wdy6iv81Gy/uDT56KZy1IMS07kGU/ESBryLTupJA=; b=oibKSiyGwdYiM3HmcmvfbRCOTUZLjDADtZW4Tdjl8YL+FNhdHR5Pmsghet9w7PHQPfOcV+ gjFKovNxcSpZRqK+a19z8HmNCoAdfuRtzBvNMled9/JOrfsMmWqNRy+48M1ERgaEHMabSb 3RE9DcVDxyDYpatLMVSbx4WR5jHwmCs202Dvzm/nP7ABgMw4Cdn7SKXsUnb1chhyDMkDyS varuvJXcWSPtYwGrGMYAyQQpIW2IezOy+oPXtxMURzYFURWwwiCx4wioSv10mbGejtobs2 fUKP/w67Q9bzLJ5zELcavwBKpzm7NmXmh1BnYtQ0X1gB/7I4d64MS1mxYi6xNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrDbM0cZvzrkM; Wed, 20 Sep 2023 10:02: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 38KA27vH051691; Wed, 20 Sep 2023 10:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38KA27w1051688; Wed, 20 Sep 2023 10:02:07 GMT (envelope-from git) Date: Wed, 20 Sep 2023 10:02:07 GMT Message-Id: <202309201002.38KA27w1051688@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: 8303afca1765 - stable/13 - net: Check per-flow priority code point for untagged traffic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 8303afca1765148d0069ce5144072b3ae9cab61e Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8303afca1765148d0069ce5144072b3ae9cab61e commit 8303afca1765148d0069ce5144072b3ae9cab61e Author: Zhenlei Huang AuthorDate: 2023-09-06 10:15:14 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-20 10:00:37 +0000 net: Check per-flow priority code point for untagged traffic Commit 868aabb4708d introduced per-flow priority. There's a defect in the logic for untagged traffic, it does not check M_VLANTAG set in the mbuf packet header or MTAG_8021Q/MTAG_8021Q_PCP_OUT tag set by firewall, then can result missing desired priority in the outbound packets. For mbuf packet with M_VLANTAG in header, some interfaces happen to work due to bug in the drivers mentioned in D39499. As modern interfaces have VLAN hardware offloading, the defect is barely noticeable unless the feature per-flow priority is widely tested. As a side effect of this defect, the soft padding to work around buggy bridges is bypassed. That may result in regression if soft padding is requested. PR: 273431 Discussed with: kib Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39536 (cherry picked from commit 49d6743da15fe378782e43776df8b4fd4f84c8d0) (cherry picked from commit c750055382f73db964c20f8eba855a9ac9e19591) --- sys/net/if_ethersubr.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index d8043f0551ff..a3466c94d312 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -118,6 +118,8 @@ static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); static int ether_requestencap(struct ifnet *, struct if_encap_req *); +static inline bool ether_do_pcp(struct ifnet *, struct mbuf *); + #define senderr(e) do { error = (e); goto bad;} while (0) static void @@ -466,11 +468,7 @@ ether_set_pcp(struct mbuf **mp, struct ifnet *ifp, uint8_t pcp) int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { - uint8_t pcp; - - pcp = ifp->if_pcp; - if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN && - !ether_set_pcp(&m, ifp, pcp)) + if (ether_do_pcp(ifp, m) && !ether_set_pcp(&m, ifp, ifp->if_pcp)) return (0); if (PFIL_HOOKED_OUT(V_link_pfil_head)) @@ -1355,6 +1353,19 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, mtag_pcp, CTLFLAG_RW, &vlan_mtag_pcp, 0, "Retain VLAN PCP information as packets are passed up the stack"); +static inline bool +ether_do_pcp(struct ifnet *ifp, struct mbuf *m) +{ + if (ifp->if_type == IFT_L2VLAN) + return (false); + if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG) != 0) + return (true); + if (vlan_mtag_pcp && + m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL) + return (true); + return (false); +} + bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, const struct ether_8021q_tag *qtag) From nobody Wed Sep 20 10:09: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 4RrDlN1K3Nz4tRpl; Wed, 20 Sep 2023 10:09: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 4RrDlN0qXvz4Wtk; Wed, 20 Sep 2023 10:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695204544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcvOkyMfywAHuJHXBzeucOOKuvf1Q5LIHaldNeHO94Y=; b=NE94m8rQi5D54NqbkMFcPQkkDMSs7B2DB4na2cUD4tg2Bc5Kt8qXLM4ca4q195sKrGItBs a8fbzg96IBfmW8PcfBkgVbxlt2YOg7soomoLl1ceFpDroIFD+m7e7tx33fSVh9xVWuHAne v8nkGMn4ZO5svBWSe3C2YGkEl+Qflp3Mprukzv+2D88Y+qRtx2nBOhMBwPHexe8r9bpRl5 2d7EA6K+n/H+uDEXTvZWVgVY2Bft9qBvPvga3blLnMIQWjEIb3nyRhejCyjgQannVVKwpd SeDQZuqMIE8nHW6mbLweI2Vr5FgJSK/BxiqGnpLJxe9ATKEoVMTQetXIBsAFRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695204544; a=rsa-sha256; cv=none; b=X58N/nfNjOud7jAczYUhqhPvLfX7HB/CsTikDsEplwiSaKoG67Qy8x4z7v8Kx0Sp7asIWi v4FObO7vlgtnl/hX1f2azG92toWdRn3y02hdkmUI7bMI8/cvnbJxuAh0x60tOTPP5Mbze/ rjm5yG440IXdkS/tw4pk92lZxQqvAgSFBdV+9Ph6AyEtm8ErkllFqn7umEy1yPTYa1b5qJ FUkzu/IKs6GSyKS5IvyggRsOw21G7JeL59Avy7JQGZSkcBrHZ+dpxPm1CVxiqIjORe0mVc Vbs73Ew4wNJp49guCzorgnEWmdpT8gwy2jOiiKnIku0Sy01CGfG17KJFsWTwoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695204544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcvOkyMfywAHuJHXBzeucOOKuvf1Q5LIHaldNeHO94Y=; b=sF7hVMttkK5Qn1MrRakozSv6jowB86IY4YGMb5HQIPIGlIaXBDaMwpLwgogVWm/nlFHl0z zBNFbKINwv05vLB15b+AHxLJymtGZK/bRVoZ0RiF3Pk/SV8kjHYIOKzye8VP3CBY/IeFoA Q4vkKP8QukEFFsVtmy5SDOy/gGGy8VV7c7PS6OcTPumm70mT5EwJ7EU2SP4HiRMN6ISgcy /wrIqPV8cwD5wEtHQH1tIJoLomQi6PstOLH+dYGnO4IAJgmdjP5S7MCn4rm6gu61OzUARB Bm50/F08F1WWbfy/fK8ltsFvktaq7Bp/rcNRWh0vCKCVVdnmsD42VtVuFoNLdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrDlM71RnzrYT; Wed, 20 Sep 2023 10:09: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 38KA93Mb053525; Wed, 20 Sep 2023 10:09:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38KA93fj053522; Wed, 20 Sep 2023 10:09:03 GMT (envelope-from git) Date: Wed, 20 Sep 2023 10:09:03 GMT Message-Id: <202309201009.38KA93fj053522@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: d5dbed2f1e2a - stable/12 - net: Check per-flow priority code point for untagged traffic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: d5dbed2f1e2ab14f54acbe14c30ccac9f9fee29f Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d5dbed2f1e2ab14f54acbe14c30ccac9f9fee29f commit d5dbed2f1e2ab14f54acbe14c30ccac9f9fee29f Author: Zhenlei Huang AuthorDate: 2023-09-06 10:15:14 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-20 10:05:14 +0000 net: Check per-flow priority code point for untagged traffic Commit 868aabb4708d introduced per-flow priority. There's a defect in the logic for untagged traffic, it does not check M_VLANTAG set in the mbuf packet header or MTAG_8021Q/MTAG_8021Q_PCP_OUT tag set by firewall, then can result missing desired priority in the outbound packets. For mbuf packet with M_VLANTAG in header, some interfaces happen to work due to bug in the drivers mentioned in D39499. As modern interfaces have VLAN hardware offloading, the defect is barely noticeable unless the feature per-flow priority is widely tested. As a side effect of this defect, the soft padding to work around buggy bridges is bypassed. That may result in regression if soft padding is requested. PR: 273431 Discussed with: kib Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39536 (cherry picked from commit 49d6743da15fe378782e43776df8b4fd4f84c8d0) (cherry picked from commit c750055382f73db964c20f8eba855a9ac9e19591) (cherry picked from commit 8303afca1765148d0069ce5144072b3ae9cab61e) --- sys/net/if_ethersubr.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index f832700003ef..6f02f520e63b 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -119,6 +119,7 @@ static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); static int ether_requestencap(struct ifnet *, struct if_encap_req *); +static inline bool ether_do_pcp(struct ifnet *, struct mbuf *); #define senderr(e) do { error = (e); goto bad;} while (0) @@ -463,11 +464,8 @@ int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { int error; - uint8_t pcp; - pcp = ifp->if_pcp; - if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN && - !ether_set_pcp(&m, ifp, pcp)) + if (ether_do_pcp(ifp, m) && !ether_set_pcp(&m, ifp, ifp->if_pcp)) return (0); if (PFIL_HOOKED(&V_link_pfil_hook)) { @@ -1313,6 +1311,19 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, mtag_pcp, CTLFLAG_RW, &vlan_mtag_pcp, 0, "Retain VLAN PCP information as packets are passed up the stack"); +static inline bool +ether_do_pcp(struct ifnet *ifp, struct mbuf *m) +{ + if (ifp->if_type == IFT_L2VLAN) + return (false); + if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG) != 0) + return (true); + if (vlan_mtag_pcp && + m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL) + return (true); + return (false); +} + bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, uint16_t vid, uint8_t pcp) From nobody Wed Sep 20 13:26: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 4RrK6q61Dgz4tfZM; Wed, 20 Sep 2023 13:26: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 4RrK6q5WMPz3S6H; Wed, 20 Sep 2023 13:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695216371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=whO49MEuSobizP7h2Y7Z3fjcyQNdZh0g+X2XOe1bCzg=; b=iZnuah3D4ynsD8JRKMkRr3czuKqbfeyb7WdRLJJKuZ7ZY1IcsxUhz0s0TAFI5uXSec96nR eO4nveWGHffseTjywYyqy6WC3V9sR5jflzw6dC1xSdlYy/8pFJek+d1WHiRyHDJbzCz2Ms +5PJVX4O7dAXw9At2MVlthr0muVwBQywBTzqRKOrR1Ii6NEqalXZnmWZrnzBfQXIjfKfc4 3o4syAbHs0p7z38rICq9Vmpw/fknrgLg60eOY+Z23SsRafOZBZ71viRA1as9LzHTmn7QeS JhFFEa0EG/39u4zaEWwHYMYRFbZyE6eNxD7AFI5jAawu2xpyVbrjimksSey9zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695216371; a=rsa-sha256; cv=none; b=OivUQECi3YHkT5GFkSVqGBl62vJGWc3l/sIwqXnPvECirdnLDcDiXL56mNHke0q4zQDjAl GtptXnG4yPQyAnV+KqMO/4qzN6viePy2Qa20yvRADPoKkD3p9oWpcrlpfaHw5lz7ybtZHd bN7ZUyqsNn0Yh/2hqBmdIW4fb7j7vrpahyaFOsx8MGDfG8R/EQbaCSy/Luk+aTxinxbZPO wrdhU47frnZCFKm47GQgeg4ioyZoyUwgnkhHhDMwQVvmIB8d11EeASO+VPdd1iPkVNpRlq MVGd6fxAASVx341qedPXdnepLvTApQINPTio1ZY//lOO8no32RMSYXnyz7nCHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695216371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=whO49MEuSobizP7h2Y7Z3fjcyQNdZh0g+X2XOe1bCzg=; b=EzMyihUd7ThpEVCtIe1xcfpKPflciBp6H+Qsdl7HuRr6CHeceKSAAxSnpTsxT07s0V6qr7 i5AeM7wZHH15nZKvyIOe8sHWuO9OaEaGu0DRpOfQ9MCrT0bTcbhoBIztwwT7ArbNtJ5uVp FXrXackdq70RLv9ZLw9pr9CPxNRPs1GpPr36qNwHSKaNP7wI4SDyDX53/+0D9U1qX0W6RE IBQUd6VE1qCwjDUHMhKkCXaD2vuyeCPb4uade3zCghIeYsHyorrTptQgsCpVC6kfcrbNPB EedelVZrTNFbDfItzCljx80Kx4sYLdJsvRZeHqPFu6ntZbuLJFI7naiP7yRa7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrK6q4TFKzx7j; Wed, 20 Sep 2023 13:26: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 38KDQBSP086503; Wed, 20 Sep 2023 13:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38KDQB6Q086500; Wed, 20 Sep 2023 13:26:11 GMT (envelope-from git) Date: Wed, 20 Sep 2023 13:26:11 GMT Message-Id: <202309201326.38KDQB6Q086500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: a4916232acd6 - stable/13 - libc: use separate collate objects for C, POSIX, and C.UTF-8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4916232acd614d4d7d7226d678b427aacb9730e Auto-Submitted: auto-generated The branch stable/13 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=a4916232acd614d4d7d7226d678b427aacb9730e commit a4916232acd614d4d7d7226d678b427aacb9730e Author: Yuri Pankov AuthorDate: 2023-03-28 15:10:47 +0000 Commit: Yuri Pankov CommitDate: 2023-09-20 13:10:52 +0000 libc: use separate collate objects for C, POSIX, and C.UTF-8 Fix newlocale() overwriting the locale name in collate object when same instance was used for those locales, and querylocale() reporting unexpected value for LC_COLLATE_MASK. PR: 255646, 269375 Reviewed by: markj, bapt (previous version) Differential Revision: https://reviews.freebsd.org/D30146 (cherry picked from commit 269dea90d6eb32690730b0f6a17fb41170483104) --- lib/libc/locale/collate.c | 17 ++++- lib/libc/tests/locale/Makefile | 1 + lib/libc/tests/locale/newlocale_test.c | 111 +++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 3 deletions(-) diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index 3031d33dbb08..be995a5b963f 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -66,6 +66,14 @@ struct xlocale_collate __xlocale_C_collate = { {{0}, "C"}, 1, 0, 0, 0 }; +struct xlocale_collate __xlocale_POSIX_collate = { + {{0}, "POSIX"}, 1, 0, 0, 0 +}; + +struct xlocale_collate __xlocale_CUTF8_collate = { + {{0}, "C.UTF-8"}, 1, 0, 0, 0 +}; + static int __collate_load_tables_l(const char *encoding, struct xlocale_collate *table); @@ -82,10 +90,13 @@ destruct_collate(void *t) void * __collate_load(const char *encoding, __unused locale_t unused) { - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || - strncmp(encoding, "C.", 2) == 0) { + if (strcmp(encoding, "C") == 0) return (&__xlocale_C_collate); - } + else if (strcmp(encoding, "POSIX") == 0) + return (&__xlocale_POSIX_collate); + else if (strcmp(encoding, "C.UTF-8") == 0) + return (&__xlocale_CUTF8_collate); + struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 1); if (table == NULL) diff --git a/lib/libc/tests/locale/Makefile b/lib/libc/tests/locale/Makefile index 608dffc9768d..03e89571aacd 100644 --- a/lib/libc/tests/locale/Makefile +++ b/lib/libc/tests/locale/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= mbsnrtowcs_2_test ATF_TESTS_C+= mbsrtowcs_test ATF_TESTS_C+= mbstowcs_2_test ATF_TESTS_C+= mbtowc_2_test +ATF_TESTS_C+= newlocale_test ATF_TESTS_C+= towctrans_test ATF_TESTS_C+= wcrtomb_test ATF_TESTS_C+= wcsnrtombs_test diff --git a/lib/libc/tests/locale/newlocale_test.c b/lib/libc/tests/locale/newlocale_test.c new file mode 100644 index 000000000000..cb0ebb323a42 --- /dev/null +++ b/lib/libc/tests/locale/newlocale_test.c @@ -0,0 +1,111 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2023 Yuri Pankov + * + * 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 + +struct { + int lpmask; + const char *lpname; +} lparts[] = { + { LC_COLLATE_MASK, "LC_COLLATE" }, + { LC_CTYPE_MASK, "LC_CTYPE" }, + { LC_MONETARY_MASK, "LC_MONETARY" }, + { LC_NUMERIC_MASK, "LC_NUMERIC" }, + { LC_TIME_MASK, "LC_TIME" }, + { LC_MESSAGES_MASK, "LC_MESSAGES" }, +}; + +static void +check_lparts(const char *expected) +{ + int i; + + for (i = 0; i < nitems(lparts); i++) { + const char *actual; + + actual = querylocale(lparts[i].lpmask, uselocale(NULL)); + ATF_CHECK_STREQ_MSG(expected, actual, "wrong value for %s", + lparts[i].lpname); + } +} + +static void +do_locale_switch(const char *loc1, const char *loc2) +{ + locale_t l1, l2; + + /* Create and use the first locale */ + l1 = newlocale(LC_ALL_MASK, loc1, NULL); + ATF_REQUIRE(l1 != NULL); + ATF_REQUIRE(uselocale(l1) != NULL); + check_lparts(loc1); + /* + * Create and use second locale, creation deliberately done only after + * the first locale check as newlocale() call would previously clobber + * the first locale contents. + */ + l2 = newlocale(LC_ALL_MASK, loc2, NULL); + ATF_REQUIRE(l2 != NULL); + ATF_REQUIRE(uselocale(l2) != NULL); + check_lparts(loc2); + /* Switch back to first locale */ + ATF_REQUIRE(uselocale(l1) != NULL); + check_lparts(loc1); + + freelocale(l1); + freelocale(l2); +} + +/* + * PR 255646, 269375: Check that newlocale()/uselocale() used to switch between + * C, POSIX, and C.UTF-8 locales (and only these) do not stomp on other locale + * contents (collate part specifically). + * The issue is cosmetic only as all three have empty collate parts, but we need + * to correctly report the one in use in any case. + */ + +ATF_TC_WITHOUT_HEAD(newlocale_c_posix_cu8_test); +ATF_TC_BODY(newlocale_c_posix_cu8_test, tc) +{ + do_locale_switch("C", "POSIX"); + do_locale_switch("C", "C.UTF-8"); + do_locale_switch("POSIX", "C"); + do_locale_switch("POSIX", "C.UTF-8"); + do_locale_switch("C.UTF-8", "C"); + do_locale_switch("C.UTF-8", "POSIX"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, newlocale_c_posix_cu8_test); + + return (atf_no_error()); +} From nobody Thu Sep 21 04:54: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 4Rrjk34dJFz4tVdj; Thu, 21 Sep 2023 04:54: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 4Rrjk346hpz3S4H; Thu, 21 Sep 2023 04:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695272075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HJMDKsp+kLtD0/9qNxCVJ/WvBKNnkHX94EG7V7HfN4I=; b=HazA4TH/bX04e4sWU6oG5qRggGltLej06ENVNAETAQAERhr5s+VZBzEfHyVQdPWNO0vPPW TJaPHDs+1ULbjVy/9+5TzwHdBCZoHDedpxuV6CNxAUZJhqDPKI4eG8QWqwIdDAlhy4MT4H 3OfognPBSh2dOF3imKpmcP2OmG5SYZWqWqExhuAr6Nmrb2Wmf56ta8g6LE0ygdMvAw4KTd gDJ+XTH+dMboh2VLQVVie6MZLECVpDK5oM4uH5j2U7iFc4kmyeduYzda69o1zYDmMAbUOB 7aMM9sPm+LKrDW4vNkydtn/Rwd4XNYG3NJZTZBUwZyl4/UFMfQSBO55Lnw08og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695272075; a=rsa-sha256; cv=none; b=py66a8aYePFvcXPHcY/KXFNLNEAlQsd/eIJhsp1uu2xKZCL1FKL1v2k5GvaBfU0T0rPt62 WDoaE43sYhkP1z6JB/Hq4MaBXAPIMD9pRFaldfign4y8mKPLskV0D8J7Gnk9AnqULqsDnW m9baetZQHsZbez2s3f8D623O/aofPKuiiFVnFbkfOBc3FJmenJkndtPjkXjLx/xUJZKaYq fCUn7Bl120TqPZ4EWAhCwmUoIvsKZGIFJOU1Vx/sGiQRHP8kFUXOXfIzdSAIcUi+0piDqJ ErM41nk4un20KsJGspkdykEjWZgUQVECZxzFLCqEtEU4lQ3YI2ZmTjezLaRUzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695272075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HJMDKsp+kLtD0/9qNxCVJ/WvBKNnkHX94EG7V7HfN4I=; b=jwpc5C4uYcNBNVaK7D28aC44INVSVxlHph8tG4pK26IDPWFey9Iivejks5RE4AuA4WWhCN 3uEe1lAR7tf7ZMRLJxEtU5PwLN7Tz1/HwrSdAyegoa3QFamVoIgO0TQseyMv6mZebI05LG 2SX9j2ICgvYlcRyqJZqstKkI7AP75N9ax2RCIyVaGvNI+SqOg5GooJiSeuA1oo2g/pVV6x yEjowip6/mJ/9ddpse6gCI/9SFIuVnwdcNGIbeSpgikdYYJLoAMQr+5NQSC1l21FOHCjuR mQO4fir+ejQ0jZYovNXFxAQ3tUszc4xiUntyz2AV4FAYJ9TGMK+oaoAT8T7dOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrjk339TFz9bF; Thu, 21 Sep 2023 04:54: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 38L4sZTc042163; Thu, 21 Sep 2023 04:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38L4sZJ9042160; Thu, 21 Sep 2023 04:54:35 GMT (envelope-from git) Date: Thu, 21 Sep 2023 04:54:35 GMT Message-Id: <202309210454.38L4sZJ9042160@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: 0d648a59fced - releng/14.0 - net: Check per-flow priority code point for untagged traffic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0d648a59fceda79106fe66347b1df5cc11a7fa00 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0d648a59fceda79106fe66347b1df5cc11a7fa00 commit 0d648a59fceda79106fe66347b1df5cc11a7fa00 Author: Zhenlei Huang AuthorDate: 2023-09-06 10:15:14 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-21 04:49:53 +0000 net: Check per-flow priority code point for untagged traffic Commit 868aabb4708d introduced per-flow priority. There's a defect in the logic for untagged traffic, it does not check M_VLANTAG set in the mbuf packet header or MTAG_8021Q/MTAG_8021Q_PCP_OUT tag set by firewall, then can result missing desired priority in the outbound packets. For mbuf packet with M_VLANTAG in header, some interfaces happen to work due to bug in the drivers mentioned in D39499. As modern interfaces have VLAN hardware offloading, the defect is barely noticeable unless the feature per-flow priority is widely tested. As a side effect of this defect, the soft padding to work around buggy bridges is bypassed. That may result in regression if soft padding is requested. PR: 273431 Approved by: re (cperciva) Discussed with: kib Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39536 (cherry picked from commit 49d6743da15fe378782e43776df8b4fd4f84c8d0) (cherry picked from commit c750055382f73db964c20f8eba855a9ac9e19591) --- sys/net/if_ethersubr.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index ab274eeb88bf..2cbe0ea98f27 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -123,6 +123,8 @@ static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); static int ether_requestencap(struct ifnet *, struct if_encap_req *); +static inline bool ether_do_pcp(struct ifnet *, struct mbuf *); + #define senderr(e) do { error = (e); goto bad;} while (0) static void @@ -470,11 +472,7 @@ ether_set_pcp(struct mbuf **mp, struct ifnet *ifp, uint8_t pcp) int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { - uint8_t pcp; - - pcp = ifp->if_pcp; - if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN && - !ether_set_pcp(&m, ifp, pcp)) + if (ether_do_pcp(ifp, m) && !ether_set_pcp(&m, ifp, ifp->if_pcp)) return (0); if (PFIL_HOOKED_OUT(V_link_pfil_head)) @@ -1400,6 +1398,19 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, mtag_pcp, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(vlan_mtag_pcp), 0, "Retain VLAN PCP information as packets are passed up the stack"); +static inline bool +ether_do_pcp(struct ifnet *ifp, struct mbuf *m) +{ + if (ifp->if_type == IFT_L2VLAN) + return (false); + if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG) != 0) + return (true); + if (V_vlan_mtag_pcp && + m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL) + return (true); + return (false); +} + bool ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, const struct ether_8021q_tag *qtag) From nobody Thu Sep 21 11:09: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 4Rrt2H29yBz4tyGg; Thu, 21 Sep 2023 11:09: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 4Rrt2H1bYyz3CMn; Thu, 21 Sep 2023 11:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Okcj2bFzF0xrL1kWAr8oLoEfVReQerFkYZlyXXu2tdc=; b=Esq+O5BREZmwHY9tkNCjqAkqI1zGhy7GLw1ToiN7JXLwulKqE0Rzvu0keeLoHNfbyIBOnS gNHvltt/5zsIMm3TUsqRFD5CAV3HQJYe4RlfNaSX3Ici3kNSKbSTI1zBSxUE7q5xh4KvlF RmZm+L6dXVJMjx9qd2zN8u7oKVgNVwoBGwbxOP0imkVetXW8dGxvAFZdesd5a1HNa5n0+x WGJxFjbn9RFAcQTVYbcFz5+0ezY5wzNKkLkLs01sVurIPXjj5APvUKmlszeR9hnWkIs+0d rVQDtDDGPb4LbXXwnvDlT8WA+J6oi3FiOcwrT39qSSHTWUAnNF0bFJ+/hWT2/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695294551; a=rsa-sha256; cv=none; b=QY58RGG/G74B/MWEKj1JhLNW7PNtp4EhA4uRFJslA01OE6V+jGe7PidT+SS/xOOGRIv1OF Eoha75aE8hEZm2aqB+YLaVXvvOEWp6BlINWz1MSNtXnypcwNpSRKo7I8a/SMRYauMiwM5+ PvSIoyGFZgFRDSxAbutifz02wfqSOGqQfNw3W7yPyIAYZv4FgghlBJw1uf9+6h6f/Bzhig EttCKaaIBeuhN3K5kFmXEWDJQ9g2a/rRQ82R2BVrc5453TYv1BegAVIdPD4cd9LW6Odeea mpcAL2c9lWR4exYHPyNjk1m5Vdvtp9ADs+J2mPvzidXX6LfqZFmSn8fVnreolw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Okcj2bFzF0xrL1kWAr8oLoEfVReQerFkYZlyXXu2tdc=; b=veKbzCeAx/yxtY+nEOuhuznVK8/x2+rRIKyIssKz9sC5eUYvFMzB6VfhXtvJJuPXCkYDC2 02nrcEFSyp+weDca7Hc1SievslXpE4oWV2twjoRdLQe722yy+Kacmn7tGSBvdTcDBxshAJ Ex/ybaRmWttdd5JXV9TVppHiFO4VMWgqtayj2R43aS7KRt915Ld25Qer5ZljglAPw5lNs7 ZwAlENBPrJyrT6ZlapENOgivXKmrJ6pHw5d48Q9MNviS9eT73S3epqrRQtKr6ppigQxZhW YJRBt6wKAv4+fDxH+wEGbvxfHmcfE9bps/chChiErE3Awq2OYicvsYlo8l/91A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrt2H0fC3zcMR; Thu, 21 Sep 2023 11:09: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 38LB9AnW058685; Thu, 21 Sep 2023 11:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LB95qT058660; Thu, 21 Sep 2023 11:09:05 GMT (envelope-from git) Date: Thu, 21 Sep 2023 11:09:05 GMT Message-Id: <202309211109.38LB95qT058660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 35e5fd1b286c - stable/14 - zfs: merge openzfs/zfs@62677576a (zfs-2.2-release) into stable/14 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35e5fd1b286c18371ec6f66addf678cd4429302c Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=35e5fd1b286c18371ec6f66addf678cd4429302c commit 35e5fd1b286c18371ec6f66addf678cd4429302c Merge: b12c6876b429 62677576a75e Author: Martin Matuska AuthorDate: 2023-09-21 09:29:21 +0000 Commit: Martin Matuska CommitDate: 2023-09-21 09:29:21 +0000 zfs: merge openzfs/zfs@62677576a (zfs-2.2-release) into stable/14 Notable upstream pull request merges: #15274 f7a07d76e Retire z_nr_znodes #15278 62677576a ZIL: Fix potential race on flush deferring #15279 11943656f Update the MOS directory on spa_upgrade_errlog() #15281 54c6fbd37 zed: Allow autoreplace and fault LEDs for removed vdevs Obtained from: OpenZFS OpenZFS commit: 62677576a75e94396e945c4ecd9372f5d34e50cb sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 1 + .../openzfs/cmd/zed/zed.d/statechange-led.sh | 2 +- sys/contrib/openzfs/config/kernel-blkdev.m4 | 84 +++++++++++++++++++++- .../config/kernel-block-device-operations.m4 | 35 ++++++++- .../openzfs/config/kernel-filemap-splice-read.m4 | 25 +++++++ .../openzfs/config/kernel-register_sysctl_table.m4 | 27 +++++++ sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 ++++++- sys/contrib/openzfs/config/kernel.m4 | 4 ++ .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 - .../include/os/linux/kernel/linux/blkdev_compat.h | 7 ++ sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 ++++ .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 1 - sys/contrib/openzfs/man/man7/zpoolconcepts.7 | 8 +-- sys/contrib/openzfs/module/Makefile.in | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 8 +-- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 2 - sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 77 ++++++++++++++------ .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 ++++++++++++++--- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 1 - .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 2 - .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 15 ++-- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 ++++++-- sys/contrib/openzfs/module/zfs/spa_errlog.c | 9 +++ sys/contrib/openzfs/module/zfs/zil.c | 9 +++ .../cli_root/zdb/zdb_block_size_histogram.ksh | 8 +-- 29 files changed, 394 insertions(+), 78 deletions(-) diff --cc sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 index 000000000000,4c83b31d738a..4c83b31d738a mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 +++ b/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 diff --cc sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 index 000000000000,a5e934f56d29..a5e934f56d29 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 +++ b/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 From nobody Thu Sep 21 11:10: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 4Rrt3Q4kHVz4tyT8; Thu, 21 Sep 2023 11:10: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 4Rrt3Q4Dfdz3CnW; Thu, 21 Sep 2023 11:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiW7W178zncc5X7SdwfI6tVZHXbeYJbOyUwt43Wkvfs=; b=I8nWYWe3co6zxInX9N1sLJNFKwU498g81d0oyfarnqvR/BdlU8OfkLlVB7nxvW+ECEMLpJ r3lgL/aamzuhGrhkDfK/4G9Jg4LM/pyPU+z1HhtqdYUZo+PsavfO3ernjbEMogEXsQuyz2 EPoUdS/7z0ZBQl+PyXLlgiVmexZs+5Lx1bBhPZbj2QnrT5J3bc9iMZJSQ+kRy46mYuPybP kHQaXxcHOpX1O/KJm9gNYPH1gjSk/rGgY2qVAxVFTXY5HL+ietea+Pz5+jUKtk+FVsnHgN gKfBzVinMj/62vzYckyQbK6AMGrIZpOkwVO/NSNxFyaZzib1/gUo2tkucWqbvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695294610; a=rsa-sha256; cv=none; b=tdZPyBKRtQXbbkEHc0pyx3ss4GZaIlKo5B92LLbelra42p6wLuFvPhaHC6hqzxHKPRKn2K G+3E4oauy5dYVlF37+9V/Wpmrzwx+wnK9sSz42yPlQei0kpjW9LXFVSuiWVvG6pDND7/Oh +sLQi6SSi/JWtCmz+23BM6cbY4H530XKM8oR9Fg8c8l4GBx7P7mqIRr4gY7GXQ6axTJvVX wrrCrxiB+qfh6fWL35RETMfHQ9m5FIwH5xThDw9SxTx1zZBuSTJETJQOdw4jXBLxC45MZg t3x9J6TJlmwCqfvfr9pOTmZyP8PHPVT4e3gjliDCLL2hQISoTgEt0nfF1EzlqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiW7W178zncc5X7SdwfI6tVZHXbeYJbOyUwt43Wkvfs=; b=mq8FTg6j708imt8vfvtN9EGtTuVdrdqhyLwspAMQpdbBoqcHsn0JiwG5sOAVnenYe1Ajdm QgpkHnSfiWSsBBoDc3shXXWTdDTBECMWsqCNP0tjNt5tnqNrfCnVpYAVaGY511eTdNEvBz nRypShylJ2dBc3piJi9Jn1HnnyVWfTVgVolKnKXEaVd0zPEepQM8ogVIUGFFTtCAUsejfS 7i/TmHWg/vPdrrbFtoXJYhGsEQsrZssWZviEXu3z04tnxdD3bPUCr5FiDRCwGPQP3xb6CS E8sezNyyJXoDL0hk1XoVXu2dhziwPuTMKopaXCPSEbbtgW0seBUt6SS6lxMdGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrt3Q3HC0zbWN; Thu, 21 Sep 2023 11:10: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 38LBAAqa063307; Thu, 21 Sep 2023 11:10:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LBAAbQ063299; Thu, 21 Sep 2023 11:10:10 GMT (envelope-from git) Date: Thu, 21 Sep 2023 11:10:10 GMT Message-Id: <202309211110.38LBAAbQ063299@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: 100bed131d76 - stable/14 - ndp: cope with unresolved neighbours List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 100bed131d76893e9fc03f7a81dca3b83b030359 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=100bed131d76893e9fc03f7a81dca3b83b030359 commit 100bed131d76893e9fc03f7a81dca3b83b030359 Author: Kristof Provost AuthorDate: 2023-09-18 17:01:17 +0000 Commit: Kristof Provost CommitDate: 2023-09-21 11:09:57 +0000 ndp: cope with unresolved neighbours If we've not (yet) resolved a neighbour nda_lladdr will be NULL, and NLA_DATA_LEN(neigh->nda_lladdr) will dereference a NULL pointer. Avoid that by checking nda_lladdr first, and only dereferencing if it's not NULL. Test case: ping6 -c 1 ndp -a Reviewed by: melifaro MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41903 (cherry picked from commit b57df6fbcc484f1941bf306cb60a3adaf538df69) --- usr.sbin/ndp/ndp_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c index ace3e5e5fa11..954d16995b5a 100644 --- a/usr.sbin/ndp/ndp_netlink.c +++ b/usr.sbin/ndp/ndp_netlink.c @@ -230,9 +230,12 @@ print_entry(struct snl_parsed_neigh *neigh, struct snl_parsed_link_simple *link) .sdl_family = AF_LINK, .sdl_type = link->ifi_type, .sdl_len = sizeof(struct sockaddr_dl), - .sdl_alen = NLA_DATA_LEN(neigh->nda_lladdr), }; - memcpy(sdl.sdl_data, NLA_DATA(neigh->nda_lladdr), sdl.sdl_alen); + + if (neigh->nda_lladdr) { + sdl.sdl_alen = NLA_DATA_LEN(neigh->nda_lladdr), + memcpy(sdl.sdl_data, NLA_DATA(neigh->nda_lladdr), sdl.sdl_alen); + } addrwidth = strlen(host_buf); if (addrwidth < W_ADDR) From nobody Thu Sep 21 11:13: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 4Rrt6j1Sd4z4tykH; Thu, 21 Sep 2023 11:13: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 4Rrt6j0yy7z3D4t; Thu, 21 Sep 2023 11:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfGfYMnn/3eILhbIIFgzNu64AfYAKdG1YoJNmBZIzbc=; b=MM61QrDWs2DPK4ErIT1WUltDCFKumaYcCSOrZoJQmk7ueuxDy7Pi16s2NQYg4aCy8UYEuq n9LJvd2wv+1FZ+SVhxdo7m9wRFzAmjjdchYIoRv6iHWx/mlFP8VJslJYSK377WljpRrc13 OdvFID3FTEtn0mxglYzXMDBUTxUbdjN0w4szm2uVHWPxPUqjL7UQxePYovPNJq+SxigeZf 0M3W+gGNHAjDoJ9ysvcY/DncdZDRtsNNFtDMkG/TP4qTi+pfCIUmCIUiXnTZfcksvbQHuW z8cok91RcPHhp6CkbAJ5zqril33blF7z517IA/mahkXe3DITLQOayMSydj0Wtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695294781; a=rsa-sha256; cv=none; b=TTwgBEXksBQvNoyPgAHdCe8nZ1XvZoomPItR85CMCa8r77YTWbTdtS/SERSDlIWtPq7DgL VVfKAZeysa5/sg+pMrozlelwg54YfjN+0FM8qoNhz31+oqvOWiiB0VG3nRJQsboP0AhDFa xIratCISN85JA0HgSGogCOkYftkIQyFSh6gDIG2OQpl/u58MXMVaomA4jPVfnB/s13/S/s N6dxXwCYckcbZARc9rCQ4WIxn718HD14DYfOzK4oC34bA7z0ALdc89RVk3gWKCp+JDhpEF HIaurd58s7Ud6PeC4dIm/PgycEScP/0KU+1Saki267eIfnYIwo2XtCLY47r9iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695294781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfGfYMnn/3eILhbIIFgzNu64AfYAKdG1YoJNmBZIzbc=; b=PxyqcU7th5g4xKTha0In5KZrCAGaQWhCIeYAlVQhzRGSDVFxlL0JSS04hpC0xNxDuy9xyl Nfv6ES3ku3nsRb4QCgTQf1Gx6ocW1zvwsmYZZyyTQEgAL2jBqdubMPCney2OpTQSiPlDMQ WGxo4W3PCZ35XEJWmzSVX3j1rtFz+p461sQ+tmcAp30THRlX4BEeBNpnRJbj8A7M4YZ36T 5ZN7qVIKCIpXiCgKk/kv/ArOBeYPFBEDX6R+lGMZrQXRX5RlsUtt8xzSOXheim3jXjJ+cx 4FcHZXvtel1XslUrr/J5kooVfke7Q1JWXiqKnwxtV/ohAnJfARecdU9vbWjBhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrt6j01SbzcRQ; Thu, 21 Sep 2023 11:13: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 38LBD0aE074672; Thu, 21 Sep 2023 11:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LBD0Le074669; Thu, 21 Sep 2023 11:13:00 GMT (envelope-from git) Date: Thu, 21 Sep 2023 11:13:00 GMT Message-Id: <202309211113.38LBD0Le074669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 646c82e08a43 - stable/14 - zfs: update zfs_config.h and zfs_gitrev.h (missed in 35e5fd1b2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 646c82e08a433b61b97073051fd558e42c64603c Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=646c82e08a433b61b97073051fd558e42c64603c commit 646c82e08a433b61b97073051fd558e42c64603c Author: Martin Matuska AuthorDate: 2023-09-21 11:10:13 +0000 Commit: Martin Matuska CommitDate: 2023-09-21 11:12:46 +0000 zfs: update zfs_config.h and zfs_gitrev.h (missed in 35e5fd1b2) --- sys/modules/zfs/zfs_config.h | 27 ++++++++++++++++++++++++--- sys/modules/zfs/zfs_gitrev.h | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index 122a7a3f032e..f5d0a4d6d7d1 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -147,6 +147,9 @@ /* bio_set_op_attrs is available */ /* #undef HAVE_BIO_SET_OP_ATTRS */ +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + /* blkdev_get_by_path() handles ERESTARTSYS */ /* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ @@ -156,6 +159,9 @@ /* blkdev_issue_secure_erase() is available */ /* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + /* blkdev_reread_part() exists */ /* #undef HAVE_BLKDEV_REREAD_PART */ @@ -177,6 +183,9 @@ /* blk_cleanup_disk() exists */ /* #undef HAVE_BLK_CLEANUP_DISK */ +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + /* block multiqueue is available */ /* #undef HAVE_BLK_MQ */ @@ -216,6 +225,9 @@ /* BLK_STS_RESV_CONFLICT is defined */ /* #undef HAVE_BLK_STS_RESV_CONFLICT */ +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + /* Define if revalidate_disk() in block_device_operations */ /* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ @@ -243,6 +255,9 @@ /* copy_from_iter() is available */ /* #undef HAVE_COPY_FROM_ITER */ +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + /* copy_to_iter() is available */ /* #undef HAVE_COPY_TO_ITER */ @@ -502,6 +517,9 @@ /* Define to 1 if you have the `issetugid' function. */ #define HAVE_ISSETUGID 1 +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + /* kernel has kernel_fpu_* functions */ /* #undef HAVE_KERNEL_FPU */ @@ -664,6 +682,9 @@ /* register_shrinker is vararg */ /* #undef HAVE_REGISTER_SHRINKER_VARARG */ +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + /* iops->rename2() exists */ /* #undef HAVE_RENAME2 */ @@ -1074,7 +1095,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.2.0-FreeBSD_ge96fbdba3" +#define ZFS_META_ALIAS "zfs-2.2.0-FreeBSD_g62677576a" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -1083,7 +1104,7 @@ /* #undef ZFS_META_DATA */ /* Define the maximum compatible kernel version. */ -#define ZFS_META_KVER_MAX "6.4" +#define ZFS_META_KVER_MAX "6.5" /* Define the minimum compatible kernel version. */ #define ZFS_META_KVER_MIN "3.10" @@ -1104,7 +1125,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_ge96fbdba3" +#define ZFS_META_RELEASE "FreeBSD_g62677576a" /* Define the project version. */ #define ZFS_META_VERSION "2.2.0" diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h index f29b7621500d..9b7204050397 100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@ -1 +1 @@ -#define ZFS_META_GITREV "zfs-2.2.0-rc4-1-ge96fbdba3" +#define ZFS_META_GITREV "zfs-2.2.0-rc4-20-g62677576a" From nobody Thu Sep 21 12:00: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 4Rrv9V21DYz4v2Gt; Thu, 21 Sep 2023 12:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rrv9V1X81z3HsF; Thu, 21 Sep 2023 12:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695297630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4P2/a1sh87pyx/GroX6JXdm2Wq/tjSjS768GWAfOZl4=; b=lm3++EMc33dTopAQwXezYa6DbtKrIYFNp7vTM8COwD8o9zGxb3LOdE/6ybfSD3456f9OLF 8f4DAIaBSOGaD1sCrf+4Ml0KKsOmrCAMxDj8eEQnBpHtfqtNE1BqEGvU/578nrqugrLrma tn6PNktCODElLXzpUa2aHQTPMfNIhAd58E1qcYJ8bsB2pBMQBf7KVOn6pktDxFLakXTNby Hp4Grc+tQUVsTzaBTV+t4NmcU+VaMSS1dqwEzF9vFNjeLm41btNovr7+1OXk8e1nVoct4B 729894OVwL5HyHpNCO0XPUYuUGFY4l+frWot23umVRgqJ13TeQpKDCW1N/3V3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695297630; a=rsa-sha256; cv=none; b=sT0erKtioXQ+YDy6yvSgny7KL6NSLL2mHszYxvRL/WpMpEoxaHwzfIyp7pF5rx7mW378GY pl2ERY8hKe5xeL4q8l51SeRswEVkoBszXY+DvB83s8+9KpxDAlCkwGyXssk4PQ1W73R8i8 V1k1IFHzDcweFe/CMPMbg6pEBs/L4ScdOCP2Jx10DvzUiDKmJvz8bt7br/bt7VBg5ChYeD SGF8xjYpCch7xhZZohWwMuQYGjAae/CMXnnlDmY3/mGsyA2BDlwUAgbLn76to0XL8brm08 GjzZEFRuLzeoufUMfRdpHtbBAzcnCWZGVbhpMrJA7lAKMilxH0ZDMluoTnvLbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695297630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4P2/a1sh87pyx/GroX6JXdm2Wq/tjSjS768GWAfOZl4=; b=ZqYUbmS6ANSUE/AivmJ7ozSmbYMh2KVt6nRcfKEokQmhbBrrZSh5IB7IIHukyUso588QbW DDZ/IKZj0nenvHtTp0AcFvXPPLfT7zx7XYIr+9N8/8rIYRCSoH5/ZiKZu11eLTzYJ5D5QE swW0X60PxvzIaJIN21OkMI0GH3HG40z66YJZS6cLsV5alqwEKX9+qAlpCCVAHST1eF6Bke jY0VBIrTTANQoEV/xH3IaVEawMLzsFGWEjc7P2gQENc7jF849V7aJ3gqjJC+G9NjoVsYMM g3kQtFiELLQl98/JSbRjm9gm4nN2F8upRR0qhzuz8QeH7NVNelgznq9mO1jySg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrv9V0Zj3zd3H; Thu, 21 Sep 2023 12:00: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 38LC0T8s050927; Thu, 21 Sep 2023 12:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LC0T2h050924; Thu, 21 Sep 2023 12:00:29 GMT (envelope-from git) Date: Thu, 21 Sep 2023 12:00:29 GMT Message-Id: <202309211200.38LC0T2h050924@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: a9326cd7656b - releng/14.0 - ndp: cope with unresolved neighbours List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: a9326cd7656bdb84b3bbdcf12ed0e66aee19b450 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a9326cd7656bdb84b3bbdcf12ed0e66aee19b450 commit a9326cd7656bdb84b3bbdcf12ed0e66aee19b450 Author: Kristof Provost AuthorDate: 2023-09-18 17:01:17 +0000 Commit: Kristof Provost CommitDate: 2023-09-21 12:00:00 +0000 ndp: cope with unresolved neighbours If we've not (yet) resolved a neighbour nda_lladdr will be NULL, and NLA_DATA_LEN(neigh->nda_lladdr) will dereference a NULL pointer. Avoid that by checking nda_lladdr first, and only dereferencing if it's not NULL. Test case: ping6 -c 1 ndp -a Approved by: re (kib) Reviewed by: melifaro MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41903 (cherry picked from commit b57df6fbcc484f1941bf306cb60a3adaf538df69) (cherry picked from commit 100bed131d76893e9fc03f7a81dca3b83b030359) --- usr.sbin/ndp/ndp_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c index ace3e5e5fa11..954d16995b5a 100644 --- a/usr.sbin/ndp/ndp_netlink.c +++ b/usr.sbin/ndp/ndp_netlink.c @@ -230,9 +230,12 @@ print_entry(struct snl_parsed_neigh *neigh, struct snl_parsed_link_simple *link) .sdl_family = AF_LINK, .sdl_type = link->ifi_type, .sdl_len = sizeof(struct sockaddr_dl), - .sdl_alen = NLA_DATA_LEN(neigh->nda_lladdr), }; - memcpy(sdl.sdl_data, NLA_DATA(neigh->nda_lladdr), sdl.sdl_alen); + + if (neigh->nda_lladdr) { + sdl.sdl_alen = NLA_DATA_LEN(neigh->nda_lladdr), + memcpy(sdl.sdl_data, NLA_DATA(neigh->nda_lladdr), sdl.sdl_alen); + } addrwidth = strlen(host_buf); if (addrwidth < W_ADDR) From nobody Thu Sep 21 14:38: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 4RrygK3zrPz4tVRQ; Thu, 21 Sep 2023 14:38: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 4RrygK3VFHz4DgB; Thu, 21 Sep 2023 14:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/bOXhxB7ngKUzesLjEr0fBzJuwq73xLO0vEbl9tEK8=; b=sUHkR0MCu6feWq7pJuejLoMZ9RsYNiFN/iLJR11nMOMDbMwh56vH/T3bgnY9duNVigTxpa UyyguqK6FpsF648QwoBUgxjmqIBoewe+tS5cbPvZVPQ8+Lw3zV615loB+m8ewOK1FebOv9 SwCM/XLjwuoJ2UrRLRhTubhjbFYC+cyeCCRm+iW2YueBz5vKebUpeqnxMbyZmAsTQGvCbc W9RmbRXUNEWQvMLRt3OTPPPqIreQXcliPVw201qaClSPrGujKoI2SJjgoamIFCXtg8msrE BSzSXC4tSU1fIpBF96txLPOzOiJyIuDaTScs6cvmcauE/iECpnlzk0NO6lMDGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307085; a=rsa-sha256; cv=none; b=IuusLxvBTf/T3yIcYO30vyldPMhqfZhiKc8B0AFjdG3S1dYRoJnoXnTVXvb0JyE9yqVvJq g4HLQVrQDjUPMOPdEhLiWIy7WXIHYID5vydJ5HCHToQBFHjFLuwNhIyXBZwl+mTZm3ebUt ULdXOUEJWBRw646YM25QklyfCYuXm9Ds9CbWvjEJqpu7q0RLY3gYbYbNMm5GfC0PXycNP0 MJLly5q9BKy7eztmqH+0ubOAS8P4Mg7N3K9MZ96FM1cHK2tJ/iKY/GlIsgr07yiGP0D0bx LmPg4DtBH/ALckiMIOCUjYFMwxXW3tafMSWVYPJA9UQCkKPaDHL3JzYzPtQ7aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/bOXhxB7ngKUzesLjEr0fBzJuwq73xLO0vEbl9tEK8=; b=Yhy+exjBzE62VXyE379zutVd1LoFBjxsxEi6MqnIkfa4qNb4Fb+A9JTdJaBtHAr3yNtfQe YSOZkT5h4Lkxzb0nGhCBjV7bl21+egFWDgvGz/IRggkeO++xAclMTP+qu8AL+6kXIhyrQ8 gyVtTm17Z+RmMBqIXy7lAU+YznM/WP/0NeG9O9CFxXShKuraR4EvTiisTOQx9lv0ATq+cm Ndp5X9x/wYJCsLWX6v/w3wxEQAoen6LC/Z9fAIH4sqmYk6nV9CJ22TTj753XyQFz2ufJ97 vqQ6dEhDSUq+wjBhqyFrvBSIotljOpHdCV0rlNLIL0Wl5dAQsMZS94jS8/b8rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrygK2Y5szjQD; Thu, 21 Sep 2023 14:38: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 38LEc517006657; Thu, 21 Sep 2023 14:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEc50p006654; Thu, 21 Sep 2023 14:38:05 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:38:05 GMT Message-Id: <202309211438.38LEc50p006654@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: 0e985052eb96 - stable/14 - Update WITH_/WITHOUT_SSP descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 0e985052eb96b2c88b076c5b1b3f675bf4b072ae Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0e985052eb96b2c88b076c5b1b3f675bf4b072ae commit 0e985052eb96b2c88b076c5b1b3f675bf4b072ae Author: Ed Maste AuthorDate: 2023-08-30 20:49:44 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:37:49 +0000 Update WITH_/WITHOUT_SSP descriptions ProPolice refers to a specific implementation by Hiroaki Etoh and Kunikazu Yoda. The implementation in contemporary Clang and GCC is somewhat different and newer, so use a generic term in the src.conf descriptions. Sponsored by: The FreeBSD Foundation (cherry picked from commit b461276d75488fe50c1503db85d43cbb8c3c3067) --- tools/build/options/WITHOUT_SSP | 2 +- tools/build/options/WITH_SSP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/options/WITHOUT_SSP b/tools/build/options/WITHOUT_SSP index 9dc19c117995..88162cecf14a 100644 --- a/tools/build/options/WITHOUT_SSP +++ b/tools/build/options/WITHOUT_SSP @@ -1 +1 @@ -Do not build world with propolice stack smashing protection. +Do not build world with stack smashing protection. diff --git a/tools/build/options/WITH_SSP b/tools/build/options/WITH_SSP index 22aba26fd6cc..0088dd133782 100644 --- a/tools/build/options/WITH_SSP +++ b/tools/build/options/WITH_SSP @@ -1 +1 @@ -Build world with propolice stack smashing protection. +Build world with stack smashing protection. From nobody Thu Sep 21 14:38: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 4RrygL5JXnz4tVJV; Thu, 21 Sep 2023 14:38: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 4RrygL4mwnz4DTf; Thu, 21 Sep 2023 14:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLkLfz1RuQICNL2VdMxVoJFmz77tWbeErIi1sJA5+Yg=; b=o7vHBiXOi+IltQLggfP982q4Ejqi9nVxwTJ2Sr9Qib3Q6uJTXbIx0YvDQnRhf4mGNkOPdv NCejAJ3w37MclY5hio3WJKO9kDIHNcHe9V+WibhZ/y3N6YNDnkp6ds4/rOuOOmlcl+pmIW OmmtUIt5jMzaOu+vOlHPbmQLTICwqgvWgnyo4Ldr0g9HwAuT6QEqNzrBljrO9zOTeJro0L K3ddbHReMtadhDnF/v0tB9qd1sk6nA/SPNjNyfBi3Hur2q1GHZCIBrHlJFl3lrLh/q9dTD 6d0R3WR/TotpKGxnPkDL+fVk2Ztp9p9v1SzC5jGqYQzFIUgg74cWNo0dXekOyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307086; a=rsa-sha256; cv=none; b=fg94OZN5zQMeVsqAmLh2Jg5pxt0mVi3zU5HsORAqOsC9guGkN14amxsCkHa8U8Pv0zu1Rw 287TyfinkHjzGkesIY60HmyaYFeP/ntr6FZwa397nxdZSC4Bb02TussIUVKduk1lTPnOuL Wr/GPCg9ia91s5OpdX1EVbj5JCcgfUcm4DtpV2WO55pcYfeRtGUZm12XCiOE4L5Mv1T4vg uv4O/PKedpD6aaeCdI3eQSRNJSlgqXc3jC+WlctMX7VheNLEAdNfhD0UGk1Ig2Q1TkhU8+ P2U/cPCv/qntsPIMKkt8PeLdA5Jtt+7+xfgLNGDXtqpEXmYPALrPYBxYfVny1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLkLfz1RuQICNL2VdMxVoJFmz77tWbeErIi1sJA5+Yg=; b=LtUZJYuW+dzECq5Vhb+iEZ1vhUIAQrB0zcsQKxfS3vp0dVQsBofw2BboF61TuPZq+OsDap BEysfO89/ytS+tJ1pNjGThoprirxUiNr8ZEJdbDryOb0jf+8IMNiYPxzwV2dAmqWqBazKO KzUl8uiWDx1I4QJMdCZNoLTp206UVrX56CZHYxIvB7Vyd20AFA55o+Weagu2mYGP+Hq1OU DENLr0ud7lSvfa1xLBzVshUelG4aA8B9nsmUrfy4KpYLoQr4n71D9mucEhhaQsSTFYKxxy 87N+iqfj1G77HXTzgPIQMu2YrrVRCffnuz5hktOPhbL7K5Plmm6ffYPQnOzEIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrygL3Yv0zj9q; Thu, 21 Sep 2023 14:38: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 38LEc66R006708; Thu, 21 Sep 2023 14:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEc6GE006705; Thu, 21 Sep 2023 14:38:06 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:38:06 GMT Message-Id: <202309211438.38LEc6GE006705@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: 4c34f59e009a - stable/14 - src.conf.5: regen for SSP option description change List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 4c34f59e009ac6f59bd1597013fc4878b4fef802 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4c34f59e009ac6f59bd1597013fc4878b4fef802 commit 4c34f59e009ac6f59bd1597013fc4878b4fef802 Author: Ed Maste AuthorDate: 2023-09-21 14:37:20 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:37:49 +0000 src.conf.5: regen for SSP option description change --- share/man/man5/src.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 4b272eb3fd7a..82c8752722a1 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd September 4, 2023 +.Dd September 21, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1565,7 +1565,7 @@ When set, it enforces these options: .Va WITHOUT_KERNEL_SYMBOLS .El .It Va WITHOUT_SSP -Do not build world with propolice stack smashing protection. +Do not build world with stack smashing protection. .It Va WITH_STAGING Enable staging of files to a stage tree. This can be best thought of as auto-install to From nobody Thu Sep 21 14:39: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 4Rryhy57hpz4tVFj; Thu, 21 Sep 2023 14:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rryhy4ct5z4Fxh; Thu, 21 Sep 2023 14:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+l3rUUTHsulwH93ZpODO7HMThEpVLOoFOgVxQ31BFU=; b=Slbe+Bs5hYt6WBplFesFyNblhbpG3CcIKigYlQa8AF10Yea8Ph2UY2MHMCaBN0ydlSx4X7 GrQr9jF9aqws1BWCnDu3Q2KDET+m3nlGSQ5sKJ39Gt8OregXbFPBfk7dLJYQ5gpzZVmj/q Tr014WVixLKop6bzsoYn/WLg4+c5KDGsSUyBsOr8ga/5P2a2ClIM7nA0EFVgtVCkm7mvnf DQ0h5ntRuDQ91/x8hbCnDFVWTDxVqSuYDlOSChg7PiM++/IoWImlwR1mwWogZayZyqWoQ/ g9g1gwZv3CZBqO3ouJ1VxTSdfCQ0+sk/6/Gyn5prWZUCgrkcErMCJrO2k3j3Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307170; a=rsa-sha256; cv=none; b=BvjdEOqvaRRcw6XZTVk2hzaE1w6vt3U5rVn9uSZh78bASYMb12Mv7tVWee/X9o80H+66FQ M+ZIV1wk44bR4/+/J5ANwwDM763nkc5OffO9R0rhVlOCT6lZrLsEyUa8FS+Y3thiku3513 gky2kr9U4QUHZNxUv3n4HYcTdXyBcCv3hWAF4bEmtSVa66PjJvMC5Ge5VTEdMppS6Ud9et InGfwBl0NT04wZxchavxRencQA+LD6L2D7AWIn2DKKjrsfOIujboS2+PWbhKJ3HXeWcObH HAuT2swFctBpc/qVFHg2vZibHwi8lBa7WQ67EbU+3LGd1SE+FaHodDehDLbUDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+l3rUUTHsulwH93ZpODO7HMThEpVLOoFOgVxQ31BFU=; b=FfJ5zU45Oirz0wV3w1OIanDaq7SXSOcFJWIYjJNFlv25NIVp50G1FtnIA27rY3Jv8s3hku noaN/2Mg30QkkdzEUCJqlvXEn1PkjtqhZ4jReyaQ1cW/uWTskDsXJW81jdNfwyindR1Wsj mpcv3cspHsqC/0VgsT/YtpO2t1TXihtV1zz6e9577WixGEq/Zz8MKZU58+7iArifvYp+tR Ym7vB6YFok4+qEbTmsthpVwjRthC4o2b8CkWgj5lTUsS7ffBUnnWiNeiK3SRhSds4vM/6W lPj6oeSKJyuqkH9wwMwFgLZxMmF7g0SIP/cdVOzASwmDPWWv2ZuPNyfygcGyAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rryhy3Q56zjRq; Thu, 21 Sep 2023 14:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38LEdUlu007031; Thu, 21 Sep 2023 14:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEdUqW007028; Thu, 21 Sep 2023 14:39:30 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:39:30 GMT Message-Id: <202309211439.38LEdUqW007028@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: cce342e21357 - stable/14 - freebsd-update: do not restart sshd when updating jail/basedir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: cce342e21357833892083e865710c4a05603b7b5 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cce342e21357833892083e865710c4a05603b7b5 commit cce342e21357833892083e865710c4a05603b7b5 Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:38:48 +0000 freebsd-update: do not restart sshd when updating jail/basedir In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd after upgrade, to avoid an upgrade-related incompatibility that made it impossible to login. This is intended to avoid losing access to remote hosts, and ought not apply to upgrading jails (from outside). PR: 263489, 272282 Reported by: otis Reviewed by: otis, kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade") Differential Revision: https://reviews.freebsd.org/D41890 (cherry picked from commit 8ee97b1928e75f7f81a870ffb063010778e0a129) --- usr.sbin/freebsd-update/freebsd-update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 57023557839b..9cdff05c24e4 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3036,9 +3036,10 @@ Kernel updates have been installed. Please reboot and run install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Restart sshd if running (PR263489). Note that this does not - # affect child sshd processes handling existing sessions. - if service sshd status >/dev/null 2>/dev/null; then + # Restart host sshd if running (PR263489). Note that this does + # not affect child sshd processes handling existing sessions. + if [ "$BASEDIR" = / ] && \ + service sshd status >/dev/null 2>/dev/null; then echo echo "Restarting sshd after upgrade" service sshd restart From nobody Thu Sep 21 14:40: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 4RrykT1Q3dz4tVWt; Thu, 21 Sep 2023 14:40: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 4RrykT0vHzz4G9H; Thu, 21 Sep 2023 14:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpXQRYnj1Xes1zeqzXaWFQwDkTg68XQPH+iOkyo4nVw=; b=QJq0Zp+VA/0vUgui8K6070uaugQg8it74KT7/VhTMUX72D77+G6lQ/+ir3ZFOVFk6zPf4N Onqd41L4c5rmjPxZfi1jff3zdl5Q7HFsY1mw6ZTPKsrJtpnmhrRUDCQ8omYk7SKgNVj17R Fj9XwdAAhtQX+KIl7hLcjZveSU/jCLfh0r1mdXpAqxAnuVe5bK42m4djCowV6DVEC7hUjB pPRjy0NMEzMdnM2gLkyHlQUHancNMAnNkkApgwWPaZ+KX65zPVK2flRsjVVOdQFyJBxktT pch3qyZn5o3ier2ztK+vqd2acI4gfB9ecBuI+l7Pk4LnAVTwPPcuOZNXLZlufg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695307249; a=rsa-sha256; cv=none; b=u1BOM5DD9FF823WlqoyW2B3ScXjcWwxK65zW9Z8xO1Tqfl3JF3DSovk1wMkQe9beqUzw3S 64ZCeohwLRIwEtPDe/4TfyJC022FVGxyhT0VsoEHVngsXVy/K2V8LmspQcPAcPdrS3HRas 5PGMkCbTHD3Ys/2UGcDSbfOWAc625oiqsU/DfoPV9Cw0f7tQ9DasVXQSAuBtB6WtFe7IfN YovAmqNy2j3qUR8qj3vMBkqzkFV9TkJ2Q2xjvIAwC3WPtBABDkuoFe9Tjhy5i7Sz6xKIti G6OcfYpohfuuWHz+sektmk/Li1WO27pJXSRR51MgPGMOTqHS8p0XwXChUAGT8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695307249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpXQRYnj1Xes1zeqzXaWFQwDkTg68XQPH+iOkyo4nVw=; b=L+u+0GfsRg3Qmg3wzIz0J6eGYo78i3k+GzxOv3BOcNmvOmq394OdaYYh1KyNpMC5sqASMc tB2JRch9VylqMZ66i6PnbRixEOKz7Kw+qMMjSBpsPGvHENJl5zk9hhyMyGUENinxXrmy7P 97D8tfbUSV1jYrIBwm1kc0dpFxXndn+IoXKx2QfOnpT2KkV2RRmjLfbbDwD73qY4y4X4WG y74WQJsx6UUPLXZp7x4X1kW2MCyAmDOj9DNOY0JX1Uz4sGWlcSN/btmERkHnxLNyxrlinE XGP/6o/QndlLjoOsM91u6FNtD6mGPAmAf7jWf4Bi89WZOhylRWp7kt3w4oGWpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrykT009LzjGM; Thu, 21 Sep 2023 14:40: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 38LEemJO015844; Thu, 21 Sep 2023 14:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LEemI8015841; Thu, 21 Sep 2023 14:40:48 GMT (envelope-from git) Date: Thu, 21 Sep 2023 14:40:48 GMT Message-Id: <202309211440.38LEemI8015841@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: 877d15d57931 - stable/13 - freebsd-update: do not restart sshd when updating jail/basedir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 877d15d57931350dcde264de1dabe7fccf769388 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=877d15d57931350dcde264de1dabe7fccf769388 commit 877d15d57931350dcde264de1dabe7fccf769388 Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-21 14:40:03 +0000 freebsd-update: do not restart sshd when updating jail/basedir In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd after upgrade, to avoid an upgrade-related incompatibility that made it impossible to login. This is intended to avoid losing access to remote hosts, and ought not apply to upgrading jails (from outside). PR: 263489, 272282 Reported by: otis Reviewed by: otis, kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade") Differential Revision: https://reviews.freebsd.org/D41890 (cherry picked from commit 8ee97b1928e75f7f81a870ffb063010778e0a129) (cherry picked from commit cce342e21357833892083e865710c4a05603b7b5) --- usr.sbin/freebsd-update/freebsd-update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 57023557839b..9cdff05c24e4 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3036,9 +3036,10 @@ Kernel updates have been installed. Please reboot and run install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Restart sshd if running (PR263489). Note that this does not - # affect child sshd processes handling existing sessions. - if service sshd status >/dev/null 2>/dev/null; then + # Restart host sshd if running (PR263489). Note that this does + # not affect child sshd processes handling existing sessions. + if [ "$BASEDIR" = / ] && \ + service sshd status >/dev/null 2>/dev/null; then echo echo "Restarting sshd after upgrade" service sshd restart From nobody Thu Sep 21 16:53: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 4Rs1g12kq4z4thLk; Thu, 21 Sep 2023 16:53: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 4Rs1g06mTjz4bJ8; Thu, 21 Sep 2023 16:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695315181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h6BKsUUrvXeDG2jx/PjVmm1VPWENwbpWJgyhTQgdFRQ=; b=VuX47C7Cr6jbS+hB2HDsz+HROJ90E1LplCn+v2quv4+yKReSKPSJ2p5pK/le7VQllSs0Cf mVOjQ1OXLTlsyfIsngNZYmAK/uRBC3wgjjtkCjhhrKbxcdLpofcNITXyC/0LPwJ7PFcPQV vKiX8PpRxEisXhM0ISGy5yUf/ww98wwi77Qo/fYHw9gpXdpWPlOJon52YKHSIbeKuDEDuJ XEhtcZEiZxikIY8iz1U4o6JwJrzFlwnxpfGw8L0FS++V8is+YuaI88rcJ1w0nmor4LpqVZ YrjuPCMkCyGvpMC0Kbn3kPFLrg5lObYumUrfTN8fenWpaMdnPBlhdchwjFmm1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695315181; a=rsa-sha256; cv=none; b=lyO7kmKt8ur8KuHVzzsVxhC4lXDUXa4k7uaIJMqZG65VIt8pmfps05ULLlJSQ/zriXWcxg a0hYqKkHtH1x+FhAX9ycIx/a21rgx83p5/YOdYk1sLf59E1V6HBGcEJhzzXSSRbkFXc/te iJZxmSqF4ESx6AA8RSt543B6T0EspBuZ5X0Ip11EmeV1XkleWukZ/ALr4JfDjMsrGRO++F nDUYZLv4abuqKJ3yOiB2MLV3EWVeDtJ3AnIaP2bxuhqhoZFVtihmKgaRhtGGesbXLi96Ty 3J2wSQ0TVRYUSqv7X0rHfFbbAjKlY8ZJN2iOrDLRliiZiJfGQW7hwm/FxUXUWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695315181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h6BKsUUrvXeDG2jx/PjVmm1VPWENwbpWJgyhTQgdFRQ=; b=JcAj14W6uYVPkWiIylNj5I0BJmV66X5NQASsY4H9jEJrw7jCmcurrv5DhB65C77m4Yzi/L o72XIVYXPZPEPsYUynwUzeOXKNqmj8K/Y3GafbtASUl1nJCB8N2P8QfC7Yb0yy9vCAGXxJ U0uYl8Ue/pbRYn+RhgPZlsqMXXBXmR6MVdZ5B5sHdPEH3/esBifP6UDPZCeANS3RRijMjy 6vlufa2qBrVSDQ8B/8q9MrvuEqEBocb9n7D1zDIfvXT+RtQo4WF1RiPIjeqjyf+Jv8gjMy uN++cfjsbIWxRjpUn2TkbTROsoeKBKN6wcEDLoagr9ppBhNv9s7u9suqBRw3oQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs1g05NRgzmlN; Thu, 21 Sep 2023 16:53: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 38LGr0Z8040599; Thu, 21 Sep 2023 16:53:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LGr08B040596; Thu, 21 Sep 2023 16:53:00 GMT (envelope-from git) Date: Thu, 21 Sep 2023 16:53:00 GMT Message-Id: <202309211653.38LGr08B040596@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: f4bb052a789e - stable/14 - swapon.2: correct FreeBSD release that introduced swapoff List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4 commit f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4 Author: Ed Maste AuthorDate: 2023-09-18 09:01:38 +0000 Commit: Ed Maste CommitDate: 2023-09-21 16:52:46 +0000 swapon.2: correct FreeBSD release that introduced swapoff It was introduced in 92da00bb245b, after 5.0 and beforen 5.1. Reported in https://github.com/ziglang/zig/issues/16590. (cherry picked from commit b15f6400376a90d3b00aa3ac00666f683f975376) --- lib/libc/sys/swapon.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/swapon.2 b/lib/libc/sys/swapon.2 index 1a64d39f3029..c0c12d9dde68 100644 --- a/lib/libc/sys/swapon.2 +++ b/lib/libc/sys/swapon.2 @@ -158,4 +158,4 @@ system call appeared in The .Fn swapoff system call appeared in -.Fx 5.0 . +.Fx 5.1 . From nobody Thu Sep 21 16:54: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 4Rs1hF6ZH1z4thls; Thu, 21 Sep 2023 16:54: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 4Rs1hF5SBNz4c52; Thu, 21 Sep 2023 16:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695315245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/VNSq3yQpA2Bdsr76ikvh30cGzBKHRtPaj1vZgxNL0=; b=QjEkfKoChVnCi2IUke4J1tGHKnOcfY51kuuDnu1moQ/uzAKd3OLqs2cJZVgCaqjYvrpJSr c9R/DFC+T9P/wtvzc+U2vZY7405BYgRSeusitih/hNbwQsy/UNmHJibkQ1kg2ud5DP/Z0o fvcp+/6k1MzawP7wIayJVB6Z7Itg320HDouwT1A/VjNgwaWCXgv86pzAuftJl8FmQqBgrY eGzrJd+hcI57kdb4sP2HUTLmD5tyjH/UxK9YZYgvqIXR2OVqsfm2SyqxlIWjtoutxdjsN7 awrg66xa0IS5sih1qGyWzJ5LTOKW2uRtfiw9uNcxE5/gx0tHpCtTY8H6zRwPrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695315245; a=rsa-sha256; cv=none; b=wH+UC0BB2AW7ULfnnhIDrD7snV69vAQOBw8583EbpXtHcmFqMknMy+nTyvC7nc4DK4b2Uw UxaEs2XF8mxTQjGBZpgzraajKfa9xQ8Gou3odqkQsoePoceovV65W5LhC07cCCpbwGZJnv jRCuJfGpTdH8Wp9fLZ2VT9soF+lZleHhM5srAxQg99g4HI2hWq9U1rzZ2IEoIwWRsqYMcw EsLtXMjbQHJBvrElLVTo+woVa7yRWodVg75OSpa8rBlDeyS/4jQzSIhtjQlwicOXVHbJ0J ChEVIgVbygy97s2T++SCO5xl29ctwoJngQA8H7kFJXKn7SSrQZpRNFY2vHK1sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695315245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/VNSq3yQpA2Bdsr76ikvh30cGzBKHRtPaj1vZgxNL0=; b=xqX1bLIWi39CqWJZ4Lv4fvNpsp+VEezUM6bB2qrGgkQ3sGlniPXTXVcqbPPe4o8GjlILDE fGu0BsVM45eJGb4Z46OFmxd+fjUXHC2RIhuroMGk9R6PJP4EufpgTrknLzNjf106j9U+3i 8FJidZEnNKM3sAYCu+g3nAcotMp0XCsSLYxjHPLTuIIHCivYUfbm0E0jCoxvyVgU+wjS+Z 2RL2u71JDn+PvAs9e1XFonajKoNpd1imA07B/A54KpcRil5OZLhN4CIMepvFonGjHK7yQV 7fE9Vif5GtidmrNEU4yjbmb6nCzDDI+ZdU7HXCJqBVd4L5YLwg2b8HY398POpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs1hF4VntzmfN; Thu, 21 Sep 2023 16:54: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 38LGs5qr040857; Thu, 21 Sep 2023 16:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LGs5kB040854; Thu, 21 Sep 2023 16:54:05 GMT (envelope-from git) Date: Thu, 21 Sep 2023 16:54:05 GMT Message-Id: <202309211654.38LGs5kB040854@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: d52a5a3491a7 - stable/13 - swapon.2: correct FreeBSD release that introduced swapoff List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: d52a5a3491a76c86bf77f6ce1a801233bc61862c Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d52a5a3491a76c86bf77f6ce1a801233bc61862c commit d52a5a3491a76c86bf77f6ce1a801233bc61862c Author: Ed Maste AuthorDate: 2023-09-18 09:01:38 +0000 Commit: Ed Maste CommitDate: 2023-09-21 16:53:50 +0000 swapon.2: correct FreeBSD release that introduced swapoff It was introduced in 92da00bb245b, after 5.0 and beforen 5.1. Reported in https://github.com/ziglang/zig/issues/16590. (cherry picked from commit b15f6400376a90d3b00aa3ac00666f683f975376) (cherry picked from commit f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4) --- lib/libc/sys/swapon.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/sys/swapon.2 b/lib/libc/sys/swapon.2 index 1a64d39f3029..c0c12d9dde68 100644 --- a/lib/libc/sys/swapon.2 +++ b/lib/libc/sys/swapon.2 @@ -158,4 +158,4 @@ system call appeared in The .Fn swapoff system call appeared in -.Fx 5.0 . +.Fx 5.1 . From nobody Thu Sep 21 20:52: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 4Rs6zk3CR3z4tykN; Thu, 21 Sep 2023 20:52: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 4Rs6zk2mmBz3YtN; Thu, 21 Sep 2023 20:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695329570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILp5QxLXfp34vj0n02r0tX5TM2aol3kJrgpN72HTezI=; b=pKIVU6COwtxlpPomJKntgSYlf2pIhQ3UnKFBzxHEQ/Xlw1v3v/D8TtEYkffeeu0V/RsBCy oo8Hhd/MKrB6FOHtGkB9Vpkns7gYUcdtekqa/tb+mxI190q0qWvbaNfIvU2680BvHx3vMZ 5Ep45h/fnrmGklgJn+iBQXNzgpLIdliy11gkpDX1x1SV1IcskrWuv1Yte9jOkExnhyLAg3 C/4BiiuZRxFjvCmpOr4rNgvrfa7/QnDF+QDtcE+979XlBTtbF5AF5ddS3UR5IbIWBne6BC IGrgUY7SR91zeSsiUrHDqWjrmNfkb4N7VT448OI/m7xE4vPWurJSgITpP+kcQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695329570; a=rsa-sha256; cv=none; b=kSWGGhO6KCyJT9lfzKhUlLm6hY9hs5bhxQ/yjROIp2vpjlKOX32PHuUY8tQHNq9AkPS47Y VujFrPiBF5FLADaqYoiNqqTAntvYlvihjLq/LQgHAdfjTAGBqdWqxq9ikjXAlnYtgqwafc YedffaIuY/aP5GCUtepVyLZ1GsJniTvTckymWq1GRsm7z5hyzBYA42BXidEE5/EWV50OqZ Op6k/dxZZ5JOhHbFgnjeZXqpqUScTtvkDDWTFQSERVHvzy5V2Sq73pmEb6Uzb++AqomB0H 8a2BfTQmSM0kkrukRfPwPU0JmtPgCaFyjGZdz1aM7dWbUgzkc6Q0thzs0/ay9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695329570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILp5QxLXfp34vj0n02r0tX5TM2aol3kJrgpN72HTezI=; b=s17KtzBMYWCGbkgjZ0GUdR4hnKmmjKYIW2gIq3jayDi0CNxvmhkGPoPa8r5SWoRO5UziI9 k2nBlN8+Wwkq7x3jTcOrTY9Kgyb9mghx0AbPzLPT00ISs4stM+mKF/ZoskfAxSJTmok/J8 ilg3PZQAwGIpxWQbSt4Web/36Q2asr1I7UwpFf+2TPSvSZtXFbXo05/8NlFtrXPihFC1zD vO88ooGrbLu8H8kMT2IMzTFbqx7vZqNLtDdkWPHFanicr5PK6oc+5yOHILWs9v7R++pIEo HskejbjMOKclgL5Gy3UxaA1thJ+0iMWtdMG5auWTlxeyvAq488JyhvFO6mhvIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs6zk1rThzt0F; Thu, 21 Sep 2023 20:52: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 38LKqohs040158; Thu, 21 Sep 2023 20:52:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LKqoKv040155; Thu, 21 Sep 2023 20:52:50 GMT (envelope-from git) Date: Thu, 21 Sep 2023 20:52:50 GMT Message-Id: <202309212052.38LKqoKv040155@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: a39aac5bb8e4 - stable/14 - Fix zfsd with the device_removal pool feature. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: a39aac5bb8e46b0d9cd77e85be8a65808f8a89ce Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a39aac5bb8e46b0d9cd77e85be8a65808f8a89ce commit a39aac5bb8e46b0d9cd77e85be8a65808f8a89ce Author: Alan Somers AuthorDate: 2023-09-12 01:20:39 +0000 Commit: Alan Somers CommitDate: 2023-09-21 20:39:52 +0000 Fix zfsd with the device_removal pool feature. Previously zfsd would crash in the presence of a pool with a top-level-vdev that had previously been removed. The crash happened because the configuration nvlist of such a TLV contains an empty ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty list, which has undefined behavior. The crash only happened in stable/14 and later, probably do to differences in libcxx, but the change should be MFCed anyway. PR: 273663 Reported by: Marek Zarychta Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D41818 (cherry picked from commit 0b294a386d34f6584848ed52407687df7ae59861) --- cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc | 37 +++++++++++++++++++++++++++++++ cddl/usr.sbin/zfsd/vdev_iterator.cc | 5 +---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc index f3fea2ca83f4..caeb077a3de8 100644 --- a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc +++ b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc @@ -766,3 +766,40 @@ TEST_F(ReEvaluateByGuidTest, ReEvaluateByGuid_five) delete CaseFile4; delete CaseFile5; } + +/* + * Test VdevIterator + */ +class VdevIteratorTest : public ::testing::Test +{ +}; + +bool VdevIteratorTestCB(Vdev &vdev, void *cbArg) { + return (false); +} + +/* + * VdevIterator::Next should not crash when run on a pool that has a previously + * removed vdev. Regression for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273663 + */ +TEST_F(VdevIteratorTest, VdevRemoval) +{ + nvlist_t* poolConfig, *rootVdev; + + ASSERT_EQ(0, nvlist_alloc(&rootVdev, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(rootVdev, ZPOOL_CONFIG_GUID, 0x5678)); + /* + * Note: pools with previously-removed top-level VDEVs will contain a + * TLV in their labels that has 0 children. + */ + ASSERT_EQ(0, nvlist_add_nvlist_array(rootVdev, ZPOOL_CONFIG_CHILDREN, + NULL, 0)); + ASSERT_EQ(0, nvlist_alloc(&poolConfig, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(poolConfig, + ZPOOL_CONFIG_POOL_GUID, 0x1234)); + ASSERT_EQ(0, nvlist_add_nvlist(poolConfig, ZPOOL_CONFIG_VDEV_TREE, + rootVdev)); + + VdevIterator(poolConfig).Each(VdevIteratorTestCB, NULL); +} diff --git a/cddl/usr.sbin/zfsd/vdev_iterator.cc b/cddl/usr.sbin/zfsd/vdev_iterator.cc index f64b0d98440d..e9283108ed3c 100644 --- a/cddl/usr.sbin/zfsd/vdev_iterator.cc +++ b/cddl/usr.sbin/zfsd/vdev_iterator.cc @@ -109,10 +109,7 @@ VdevIterator::Next() { nvlist_t *vdevConfig; - if (m_vdevQueue.empty()) - return (NULL); - - for (;;) { + for (vdevConfig = NULL; !m_vdevQueue.empty();) { nvlist_t **vdevChildren; int result; u_int numChildren; From nobody Thu Sep 21 21:16: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 4Rs7Vl2lqGz4v1DB; Thu, 21 Sep 2023 21:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rs7Vl26Tyz3bv1; Thu, 21 Sep 2023 21:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695330975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jha9BIaG/JAyDWFXx9tRFo33A6wWDUdo6OZ+zpxiXoo=; b=w/qbMkSXGVqy13GhGKZk0hM/+h+gZtRqxI03AzfY9m6tejEy20Wamay+jiN66emC1sF1qk JOPki5guwlYepsMlgZJ3SDlgw3qzLdqAWqgp4432/r453wRDYrzj9D/4LIhpKRQ7/ZnOp7 uMknC5K0eB3naj+cj1bzwWDtKd1QX0RS4vRpBJAK9I33hKM9V9v2GBRwphs/DlXsfT6+eq Tw/mF4wGMekzDIDVqCke144eCE4QWtC13RzqTBjWl1bM7cbYa81QkTMqQXlhfNx/AFFTZT UjdWsD9+otKEttJ+jNV/GSj+8SbEvdx9XpTVgXFUmPOSWpFY6HOsCFPBqmce6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695330975; a=rsa-sha256; cv=none; b=Ail8hpul8NtIV4aQACHmYZ07auqeFPCjvykStqPyWyt7rNNt+dPnhwr1UspPprmkAbWp2H D7mgEksL/ZmBQAVfcz7ZnW5EHfAwSBzcY7izEBRVAMeCNJPdxedBe3TLOKYNDFP8wJnD2f t9IpS9jvC7ixbt4cpldb8eE1KBuK1uJwD6yySNd9Rj9FjQGu+9V03FNraS5UdEI4aIMWq3 z4x1nUxnAIDrvEJ6LBoPAX51pGCahe+6DCrDmyLMUYkMyKPZ767d34vJtggLcbADa+OtU8 30RaIzGdgKmFb7BMrOVqdm+wWnkWu0Hga+rxjz0c5lkIHVQbzCXOVmp4ZtYDDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695330975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jha9BIaG/JAyDWFXx9tRFo33A6wWDUdo6OZ+zpxiXoo=; b=HdYoswoQ7xUxtBAKnvuCr8a6/BJeqnWvIEBoP8/aLFITMUWMYFoji8N+A8az/TokuPGurx bZ3i1xiujF71ef17x13k1BaEPaVrKctF11c0otuKZt7qqw4KCy/S1KI/mDr5ItnEAPdCmi DBbDK8qVXk/8jgaj9NQUjQOSUd5pTD3C4KV6a2wgcmEwbVUBlHg/Uj4EsX7rTu3TOk5Icc F2KjdtkPHyjzoVCrdy3JYGM6lj2/lhpQd23st01zozDmc1WDxN7WKmScvDlhjUIeLF1uOt 6w0rE+jjjDnTSdcKmDzfqbeeN3LVvYI4RkLfA6zwKCyrx3zBU7dxv69SWdrrxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs7Vl16gmztvw; Thu, 21 Sep 2023 21:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38LLGFIU074379; Thu, 21 Sep 2023 21:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LLGFlp074376; Thu, 21 Sep 2023 21:16:15 GMT (envelope-from git) Date: Thu, 21 Sep 2023 21:16:15 GMT Message-Id: <202309212116.38LLGFlp074376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels Subject: git: 2476a7603190 - stable/14 - clk_fixed: reduce and clarify messages due to missing clk-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: karels X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2476a76031908016dd2513862d46ad8dd2bab462 Auto-Submitted: auto-generated The branch stable/14 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=2476a76031908016dd2513862d46ad8dd2bab462 commit 2476a76031908016dd2513862d46ad8dd2bab462 Author: Mike Karels AuthorDate: 2023-08-25 20:11:46 +0000 Commit: Mike Karels CommitDate: 2023-09-21 21:14:47 +0000 clk_fixed: reduce and clarify messages due to missing clk-frequency The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock nodes which have no clock-frequency value. Such nodes are non-standard. This results in about 150 messages during autoconfiguration: clk_fixed2: disabled on ofwbus0 clk_fixed2: Cannot FDT parameters. device_attach: clk_fixed2 attach returned 6 Defensively check for clock-frequency in the probe routine, and if none, return an error with a more direct error message (1 line per occurrence, 50 lines total): clk_fixed2: clock-fixed has no clock-frequency Based on a patch by manu. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41594 (cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488) --- sys/dev/extres/clk/clk_fixed.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/extres/clk/clk_fixed.c b/sys/dev/extres/clk/clk_fixed.c index f4f1d462233a..e5ca6b31d000 100644 --- a/sys/dev/extres/clk/clk_fixed.c +++ b/sys/dev/extres/clk/clk_fixed.c @@ -157,6 +157,11 @@ clk_fixed_probe(device_t dev) clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (clk_type) { case CLK_TYPE_FIXED: + if (OF_hasprop(ofw_bus_get_node(dev), "clock-frequency") == 0) { + device_printf(dev, + "clock-fixed has no clock-frequency\n"); + return (ENXIO); + } device_set_desc(dev, "Fixed clock"); return (BUS_PROBE_DEFAULT); case CLK_TYPE_FIXED_FACTOR: From nobody Thu Sep 21 22:21: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 4Rs8yD6Qg3z4v4tm; Thu, 21 Sep 2023 22:21: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 4Rs8yD5xwbz4GGj; Thu, 21 Sep 2023 22:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695334900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nelOBqjwlxJdRFD6FZVcwS+f5xkrnMyrEjju800w00A=; b=Ap3bBay1pGZeJb2U4fljKMZOpFrZ8wGTSSvd2zEPv72jhU952sTcfIxoPQivWICPXMkRjp kt4Fngh0FZon7tG3hwuQFg1dTPaoBVJr557xJrlU0gguPELcgx/1fCqe0bxNam8xPdkDka dDtbgc3cx3KpbUM9hjVDkhhqKTm+NLYIy6BAJceCbXgWqKzFI9ekmbGWOcFMJEf1CLYwVk DC+BJaHyIwPr+5lwLSL8+FYIWQl/Wgd4JorUWuQVt+znW5hkfky5X7Qb+z6X8tO66YlkoK 1f4Px+fKj8Xnqqsx/P3cHJQjddFfaFjehtCDFWj2GiUwCOQzi9lSNXipENK/mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695334900; a=rsa-sha256; cv=none; b=qJH9R0+LYJffvj/R1p9og0U2QUBkwiGpDnm1tj3CoOGJYQgtiKer1FfEOScOQzT4xR/Msf K+t5UPcKShu9qkfVxtN257zSf1LOV/TBUz1/g9ZplU7cLKOm2QOWF0ahFAuY5Hp0eLkHcZ cPVgsBkavweLGjLNmrqreIDuVwUAE/eM7PJE02XB3Jc+jH36gPXfcjyoyT9+o+sBrxjsCG P2OJXZNOkKSR+agIwMdP6Ja8MAcQDyaNXFyKkZ2PRz+AjZ4jK3K26ZadHnOb6oENqQmWLD UXgTHTyBPx047M49tMD+p21ovbznHCAQ1e4I1/dLTiszQ+QyMoF2ofBxlb1Jew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695334900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nelOBqjwlxJdRFD6FZVcwS+f5xkrnMyrEjju800w00A=; b=SA5Y7y5j+v+EWjoxtr50BPQMyGqmJiRI6nifv3prxBpUqlO8eXMafCOEp+nFX/qQJKUzaj MKo/+1kh4nRQMIdHMrWzMPR3Ov7fRmGu3Nds+IkAS8kAFHf1iN06NaXGhJwlD6JZAwupaw smiy4ISHMJCkS88cWb+YsGDnCsulEqXoXbUAUkbD+q+tr/AHH94wwZiGLMja7GTMVtwYRy TZreqaCjUpLNAw7INs+kIKfTMwJQaY5oBArz1ZqfnnkZ3NAjgIIQJ+pQniEiHhEz+hJM4G h2Tkf6f1g7g8O2qQq/+9Gfbd3CDADJ08a9CSiIY0uVduhK4hEO1SlK9BQJOHAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs8yD5195zwyh; Thu, 21 Sep 2023 22:21: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 38LMLe6m088484; Thu, 21 Sep 2023 22:21:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LMLeOh088481; Thu, 21 Sep 2023 22:21:40 GMT (envelope-from git) Date: Thu, 21 Sep 2023 22:21:40 GMT Message-Id: <202309212221.38LMLeOh088481@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: 3676929d3cae - stable/13 - Fix zfsd with the device_removal pool feature. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 3676929d3caea131170a48f8e054299d68c81ec5 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=3676929d3caea131170a48f8e054299d68c81ec5 commit 3676929d3caea131170a48f8e054299d68c81ec5 Author: Alan Somers AuthorDate: 2023-09-12 01:20:39 +0000 Commit: Alan Somers CommitDate: 2023-09-21 22:20:43 +0000 Fix zfsd with the device_removal pool feature. Previously zfsd would crash in the presence of a pool with a top-level-vdev that had previously been removed. The crash happened because the configuration nvlist of such a TLV contains an empty ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty list, which has undefined behavior. The crash only happened in stable/14 and later, probably do to differences in libcxx, but the change should be MFCed anyway. PR: 273663 Reported by: Marek Zarychta Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D41818 (cherry picked from commit 0b294a386d34f6584848ed52407687df7ae59861) --- cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc | 37 +++++++++++++++++++++++++++++++ cddl/usr.sbin/zfsd/vdev_iterator.cc | 5 +---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc index f3fea2ca83f4..caeb077a3de8 100644 --- a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc +++ b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc @@ -766,3 +766,40 @@ TEST_F(ReEvaluateByGuidTest, ReEvaluateByGuid_five) delete CaseFile4; delete CaseFile5; } + +/* + * Test VdevIterator + */ +class VdevIteratorTest : public ::testing::Test +{ +}; + +bool VdevIteratorTestCB(Vdev &vdev, void *cbArg) { + return (false); +} + +/* + * VdevIterator::Next should not crash when run on a pool that has a previously + * removed vdev. Regression for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273663 + */ +TEST_F(VdevIteratorTest, VdevRemoval) +{ + nvlist_t* poolConfig, *rootVdev; + + ASSERT_EQ(0, nvlist_alloc(&rootVdev, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(rootVdev, ZPOOL_CONFIG_GUID, 0x5678)); + /* + * Note: pools with previously-removed top-level VDEVs will contain a + * TLV in their labels that has 0 children. + */ + ASSERT_EQ(0, nvlist_add_nvlist_array(rootVdev, ZPOOL_CONFIG_CHILDREN, + NULL, 0)); + ASSERT_EQ(0, nvlist_alloc(&poolConfig, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(poolConfig, + ZPOOL_CONFIG_POOL_GUID, 0x1234)); + ASSERT_EQ(0, nvlist_add_nvlist(poolConfig, ZPOOL_CONFIG_VDEV_TREE, + rootVdev)); + + VdevIterator(poolConfig).Each(VdevIteratorTestCB, NULL); +} diff --git a/cddl/usr.sbin/zfsd/vdev_iterator.cc b/cddl/usr.sbin/zfsd/vdev_iterator.cc index 5a515f91e2ec..e2294856b87d 100644 --- a/cddl/usr.sbin/zfsd/vdev_iterator.cc +++ b/cddl/usr.sbin/zfsd/vdev_iterator.cc @@ -100,10 +100,7 @@ VdevIterator::Next() { nvlist_t *vdevConfig; - if (m_vdevQueue.empty()) - return (NULL); - - for (;;) { + for (vdevConfig = NULL; !m_vdevQueue.empty();) { nvlist_t **vdevChildren; int result; u_int numChildren; From nobody Thu Sep 21 22:24:19 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 4Rs91H63MWz4v4jn; Thu, 21 Sep 2023 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rs91H5W4kz4HKH; Thu, 21 Sep 2023 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695335059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVUvIUoZPQVKEslrDVTAoE1yFv2toSL7I8QjuTcIFbE=; b=HBl8fNilNrEcA8N0nogRFUN7yoc8hurZl5yHoZH43Rcj13SIERRJTgxE/Jf3dCnlRAhZNB YCrEtOZmkVGK0GlrCZje/vnkAkzAkAf2u3M2gi0m3h3Bt6Ojaf/po+Y33epWJwV2FtiJcg wvAyfYSk/yoiTlqmVKAyo3NaxfloVIp6WSS1pnl9iYjuWZxNTzv7FaieInC3Y2/osc3zEE wnVUyWkeF+vaASnCVdtrXRGbDzXyIfyjMiWY1gjtcFzC4gwP8Wvhovcai2cW1vvfya9pOl eXkyBp4263Eyt6zq5j23arTP7tEZ18Gpsw5vV2TDg4YRzm7ZruehJofOFZQTOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695335059; a=rsa-sha256; cv=none; b=RmV30a8C27BwXjaCJ05GoupZaEklExQ3mK/mPcM/RbiCrN1aYkTexW0E0j4ACH4AXwVazB OWD2LevqC5Hm6Ye/ikQUfk9FwUs4bOzkbKZt00eHMcKigZG3/3W1XOixJisU5dohogdKhi wCuBzfNjyVzBlE857Pu4HqD7Ia/XpNQof3UExsTRClqay1DVuoUm1KScpVQNCMEaQRbBOj AJDi/z9e47crWFU2VRGdhNJ1BH6+xFJwEYZQ3UVMHCyvgvAjbkQon7MclDvGtwWLt9lfme miB5SYhJ19FWLggdo/D8Rddjd/pIPsedh/WCBKVtWPx9yglCurC3Z/bW0DWcKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695335059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVUvIUoZPQVKEslrDVTAoE1yFv2toSL7I8QjuTcIFbE=; b=eSybQhuXeus3LqkqocDlbPjS4XL/VNukMDvPGebP4Wrpb+Ubs2EqhBJNmFbp7SeMMMdRgV oHll9GUwXdABLMZcPPVzLJ3c/gfkpF6f+fGw5oiKtsH00oPWRIB/Cbkf+TlTzDa2lRGnfO 7RyeSrsQlqfeqD2smdEzsfN3nvUXDs8WD4FM/WkI/gpvFhq6rwjX6DGe69p8mt6FzPHbg4 x9e+ONIivK68JQhVc/8Ypt3uBQq1u12fRpvMkpm3ZTXC3grj+yxFAb/g2RPwmbCOQkTSaY px21Q18c0ZLO6dbKwdCeQxxmCnmilBYF0T6aQx1+Ocvir4BhY89Jq9oYwB0unQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs91H4YkMzx07; Thu, 21 Sep 2023 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38LMOJTQ090852; Thu, 21 Sep 2023 22:24:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LMOJJ8090849; Thu, 21 Sep 2023 22:24:19 GMT (envelope-from git) Date: Thu, 21 Sep 2023 22:24:19 GMT Message-Id: <202309212224.38LMOJJ8090849@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: a015b9e690d8 - releng/14.0 - Fix zfsd with the device_removal pool feature. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: a015b9e690d87c45c73dd08840712f576894dbf9 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a015b9e690d87c45c73dd08840712f576894dbf9 commit a015b9e690d87c45c73dd08840712f576894dbf9 Author: Alan Somers AuthorDate: 2023-09-12 01:20:39 +0000 Commit: Alan Somers CommitDate: 2023-09-21 22:23:47 +0000 Fix zfsd with the device_removal pool feature. Previously zfsd would crash in the presence of a pool with a top-level-vdev that had previously been removed. The crash happened because the configuration nvlist of such a TLV contains an empty ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty list, which has undefined behavior. The crash only happened in stable/14 and later, probably do to differences in libcxx, but the change should be MFCed anyway. PR: 273663 Reported by: Marek Zarychta Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D41818 Approved by: gjb (re) (cherry picked from commit 0b294a386d34f6584848ed52407687df7ae59861) (cherry picked from commit a39aac5bb8e46b0d9cd77e85be8a65808f8a89ce) --- cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc | 37 +++++++++++++++++++++++++++++++ cddl/usr.sbin/zfsd/vdev_iterator.cc | 5 +---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc index f3fea2ca83f4..caeb077a3de8 100644 --- a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc +++ b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc @@ -766,3 +766,40 @@ TEST_F(ReEvaluateByGuidTest, ReEvaluateByGuid_five) delete CaseFile4; delete CaseFile5; } + +/* + * Test VdevIterator + */ +class VdevIteratorTest : public ::testing::Test +{ +}; + +bool VdevIteratorTestCB(Vdev &vdev, void *cbArg) { + return (false); +} + +/* + * VdevIterator::Next should not crash when run on a pool that has a previously + * removed vdev. Regression for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273663 + */ +TEST_F(VdevIteratorTest, VdevRemoval) +{ + nvlist_t* poolConfig, *rootVdev; + + ASSERT_EQ(0, nvlist_alloc(&rootVdev, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(rootVdev, ZPOOL_CONFIG_GUID, 0x5678)); + /* + * Note: pools with previously-removed top-level VDEVs will contain a + * TLV in their labels that has 0 children. + */ + ASSERT_EQ(0, nvlist_add_nvlist_array(rootVdev, ZPOOL_CONFIG_CHILDREN, + NULL, 0)); + ASSERT_EQ(0, nvlist_alloc(&poolConfig, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(poolConfig, + ZPOOL_CONFIG_POOL_GUID, 0x1234)); + ASSERT_EQ(0, nvlist_add_nvlist(poolConfig, ZPOOL_CONFIG_VDEV_TREE, + rootVdev)); + + VdevIterator(poolConfig).Each(VdevIteratorTestCB, NULL); +} diff --git a/cddl/usr.sbin/zfsd/vdev_iterator.cc b/cddl/usr.sbin/zfsd/vdev_iterator.cc index f64b0d98440d..e9283108ed3c 100644 --- a/cddl/usr.sbin/zfsd/vdev_iterator.cc +++ b/cddl/usr.sbin/zfsd/vdev_iterator.cc @@ -109,10 +109,7 @@ VdevIterator::Next() { nvlist_t *vdevConfig; - if (m_vdevQueue.empty()) - return (NULL); - - for (;;) { + for (vdevConfig = NULL; !m_vdevQueue.empty();) { nvlist_t **vdevChildren; int result; u_int numChildren; From nobody Thu Sep 21 22:27: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 4Rs94p0Y0Mz4v5Cd; Thu, 21 Sep 2023 22:27: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 4Rs94n6y16z4HqT; Thu, 21 Sep 2023 22:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695335242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F9Bc+fCely7wyBJtda8V6E0+OnK1Mq7qDuutRlJjIsA=; b=Cg2Kvq/OvJG88jJcAQzE+ZIX8EnPhXN1xuDK9QRz+ZPh/eyesfeLvweA/Bty7Ps/zAmQR8 3cKkd8lv/KoBCy0Z6mxe/U0XkB70RXGDJmkeKgq9Sq+fHn3tgn8F+gN7u/iarH38blnsT4 fznX92e1jf7p0L0sXCrKu06v906+/EgjlIYIMJFeTzlxQoMPeWjUjZc+vp+RadFqYMNoXN lsSwFUHS5WZ7Gfod3Jy9bkfoZEqjihPot4yUIdHSMAG2KmEwh2z8pNG4vYn8IG+74EPwLh tmWNSLCi9YajZ3+USw8aayfr+njAsLlVRYGHdn2QouTA7J5nJQwp6OIdLLIuLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695335242; a=rsa-sha256; cv=none; b=y2bswf1R5v/wNeFaCz0QQfqsH0hVbVcHxcsS/guRKd1pv43AvKIxKzsBLwaHLGhjfrAWt7 Vt8/d0OsnwWb4qYFhTHq33MjTh78P9F4PHWLJuumslpEhbE1wgo2VijkBJXuadSohuU0LS acSBz8YJWvwHcn/9SbhH4xdNrsuTYW2pluO4pIjuq5eABkzPVUi5RzpDTyY7K1iJuOhDED 2OdnCIg63oEbmTqZXwKyxfvyw/m4d/ovUSBmEb+cp9fGdWpGVhjAMVQcBXFXjBd+zUadtO KL31bt2Y2PBQrAbfsXILV8XEPtHaA0AUNL898huyZmK7OVXCWTyc9bph3lqwIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695335242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F9Bc+fCely7wyBJtda8V6E0+OnK1Mq7qDuutRlJjIsA=; b=dNVDp9s0CDDCS63G8t/zWI+Tbe2fH0vQeN5laT4YigR6jnXY2S6ORjMmbndMvZFobNASOO 9FD8NxUAJmhpTouzHK4Y5bInMXdSmQ3j8Bq8PcTWUkbYuS0zsHdvD0g/sJHf0+KM3oZspo CFQxnlmXZ0QBEqf4+VS06PJu5fb8tX2fs4zPTos9Zid4DzmeABc4jq64spJUGYQrTC3i5C ra/DQTAx4m2MUrf06t0AHCZaV2B8hfjz8zhb804hL2W6Go3onQ4eXunN6rQ1H8rbW6P6KX WfMmm4ZRAd0hm/sNBIjvKZzGXOmWGiIbZhGIwnCMipib26e9F+WLmoeZFS7uGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rs94n5yGNzx5p; Thu, 21 Sep 2023 22:27: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 38LMRL3I091420; Thu, 21 Sep 2023 22:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LMRLTm091417; Thu, 21 Sep 2023 22:27:21 GMT (envelope-from git) Date: Thu, 21 Sep 2023 22:27:21 GMT Message-Id: <202309212227.38LMRLTm091417@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: b2dff90c0be7 - stable/12 - Fix zfsd with the device_removal pool feature. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: b2dff90c0be7c92a228fdbee5f69335dcc8044fb Auto-Submitted: auto-generated The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=b2dff90c0be7c92a228fdbee5f69335dcc8044fb commit b2dff90c0be7c92a228fdbee5f69335dcc8044fb Author: Alan Somers AuthorDate: 2023-09-12 01:20:39 +0000 Commit: Alan Somers CommitDate: 2023-09-21 22:26:29 +0000 Fix zfsd with the device_removal pool feature. Previously zfsd would crash in the presence of a pool with a top-level-vdev that had previously been removed. The crash happened because the configuration nvlist of such a TLV contains an empty ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty list, which has undefined behavior. The crash only happened in stable/14 and later, probably do to differences in libcxx, but the change should be MFCed anyway. PR: 273663 Reported by: Marek Zarychta Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D41818 (cherry picked from commit 0b294a386d34f6584848ed52407687df7ae59861) --- cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc | 37 +++++++++++++++++++++++++++++++ cddl/usr.sbin/zfsd/vdev_iterator.cc | 5 +---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc index d65295075c1f..b4f1cecca033 100644 --- a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc +++ b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc @@ -768,3 +768,40 @@ TEST_F(ReEvaluateByGuidTest, ReEvaluateByGuid_five) delete CaseFile4; delete CaseFile5; } + +/* + * Test VdevIterator + */ +class VdevIteratorTest : public ::testing::Test +{ +}; + +bool VdevIteratorTestCB(Vdev &vdev, void *cbArg) { + return (false); +} + +/* + * VdevIterator::Next should not crash when run on a pool that has a previously + * removed vdev. Regression for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273663 + */ +TEST_F(VdevIteratorTest, VdevRemoval) +{ + nvlist_t* poolConfig, *rootVdev; + + ASSERT_EQ(0, nvlist_alloc(&rootVdev, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(rootVdev, ZPOOL_CONFIG_GUID, 0x5678)); + /* + * Note: pools with previously-removed top-level VDEVs will contain a + * TLV in their labels that has 0 children. + */ + ASSERT_EQ(0, nvlist_add_nvlist_array(rootVdev, ZPOOL_CONFIG_CHILDREN, + NULL, 0)); + ASSERT_EQ(0, nvlist_alloc(&poolConfig, NV_UNIQUE_NAME, 0)); + ASSERT_EQ(0, nvlist_add_uint64(poolConfig, + ZPOOL_CONFIG_POOL_GUID, 0x1234)); + ASSERT_EQ(0, nvlist_add_nvlist(poolConfig, ZPOOL_CONFIG_VDEV_TREE, + rootVdev)); + + VdevIterator(poolConfig).Each(VdevIteratorTestCB, NULL); +} diff --git a/cddl/usr.sbin/zfsd/vdev_iterator.cc b/cddl/usr.sbin/zfsd/vdev_iterator.cc index 31a4ce962970..6e60e13eeeb7 100644 --- a/cddl/usr.sbin/zfsd/vdev_iterator.cc +++ b/cddl/usr.sbin/zfsd/vdev_iterator.cc @@ -101,10 +101,7 @@ VdevIterator::Next() { nvlist_t *vdevConfig; - if (m_vdevQueue.empty()) - return (NULL); - - for (;;) { + for (vdevConfig = NULL; !m_vdevQueue.empty();) { nvlist_t **vdevChildren; int result; u_int numChildren; From nobody Fri Sep 22 00:00: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 4RsC8q1JD8z4vBTY; Fri, 22 Sep 2023 00:00: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 4RsC8p6DXDz4Ql2; Fri, 22 Sep 2023 00:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695340858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nD/NpoZ420apA4l5Cx90yF6r2LR3NquQy0Xl2Ip1wFE=; b=VQSMWEvvJ5j9t5jcCX4PE7aGhmZ8ufo7Gj9kRXrDPwrGunzHZEQYTAXLuge7AMxBXY1nI5 AvPsZQWcBNsPK/tisCl8Qa71Tl0Q/GGjGbKxS3fYnTlPrDaPaEexOtmvoXi3H6ZZIIk6tS l6L+tNxSWFSDj4XJmkYMgk4yGCsODcqQLWz+Gf4X4V0n1TS4qsme6uuvWvaoBZ8GgPnPRT gicokZTX/WzdU0apNcfriysD1VfaPxNFqFTKhnlix1zXN3Mbd7he68Jvdyfd36gtj3Rob+ JmpeC/5wdlz3hTXJxq3F0RaeKBrG+dcUt1NmpxRLglHM2yhqUHeK7nOFqvATWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695340858; a=rsa-sha256; cv=none; b=f8tXXjZU8CcSc4eY/ZkenRr/U5Fs7dUhS2kVerHLSkZVhJIojLWzwdlwMhCF8YcaEuBqwf 5HWqzUFbRDpBFSx0wx3p4J3r40GX49lUlUftdi+UDWsp/gdznjcxJoVE4teZbiqR/Yr284 MF8yu4+eZmIIGOFshAxtgrIUtJ8OeziK8UUf9U300UtU5bmZqdTn3ktq5uMwLE2HpQxe96 IzHRa2Nfzx4RAtJV7b0OdABBywAJeIOyBEhorzPmfITGKzME56EZ0JTdGEYnQZ8buzNkTf n8dgRDshCSS2cxtvGbOtafuXK9lDmow1tOvIM6UyGa33wFtP3DymS5XXHjupTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695340858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nD/NpoZ420apA4l5Cx90yF6r2LR3NquQy0Xl2Ip1wFE=; b=Epw4L/6No1irKsapSlay9MtaC2kcGV0UREsNgPsjPf+JDwvQ7IgKWGU66DfDIKFC0uoA1A PglnWg4XkPamns1iO3oCGZgJcFweiu3WzI+LaZ+VS50WBM7erRy1voD/jkxZ+0SqGCdVwf evQ5/avwMTMXjsjrPz7YQLgEVwNIa/R54rRSh+1y5ecJqqadu2VXMn5zPUionJcZrUk9yc IHGhclPIj2M6KG0Lx92kqiA5DVDZftuJuqRVDqkC8tK9pyr2SGpfw+BqIeLKww1iFarXPM E4fC22dD3GP8UvcqZQtCBfnLzfOKtM4BVpnMNXf6adueVCgoc4rgIDBxuOkT4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsC8p5HFPz109T; Fri, 22 Sep 2023 00:00: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 38M00wQY049653; Fri, 22 Sep 2023 00:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38M00wFJ049650; Fri, 22 Sep 2023 00:00:58 GMT (envelope-from git) Date: Fri, 22 Sep 2023 00:00:58 GMT Message-Id: <202309220000.38M00wFJ049650@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: c429a0425dc4 - releng/14.0 - release: update releng/14.0 to BETA3 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: c429a0425dc4dc2ff943a52f1228502760ae3f24 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=c429a0425dc4dc2ff943a52f1228502760ae3f24 commit c429a0425dc4dc2ff943a52f1228502760ae3f24 Author: Glen Barber AuthorDate: 2023-09-22 00:00:35 +0000 Commit: Glen Barber CommitDate: 2023-09-22 00:00:35 +0000 release: update releng/14.0 to BETA3 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 3dd497412d17..d33d2b82f0da 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Sep 22 06:36: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 4RsMx74M2Hz4vcnX; Fri, 22 Sep 2023 06:36: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 4RsMx73Tlcz4Ljf; Fri, 22 Sep 2023 06:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695364587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjrGU+5C5mlHhNHV+zu8oLKXhH/w81e1Rk0n79Crwi4=; b=JaczFLxhIF/L6QchXfjF9Zg0bLiN2h8aXiGWzBVMA61ZqQ3aaDz/sMobpSABSwGKY4TZdd EbDQdnwsFnzxjpqJRvYZs6lLtEMGbTodu5wwaL+afVPayDrLuekCdyThi6ZXrgfkKLqtpH cJDAkX2IqBeIvS1qYVfbg8HNck/6JbU2aYv1XSjUKhxYOBvydvbZJZSiO6mgPT7r073hfD qHDJ+bzQPlmJLVXNLGSminDOyuMWP4HAT4/F+lH9akgWA0s4lNQ51ByLuBOqLiSpjYfTYS hBhlxJlS5AHUpDwuku5eXqSWaeDp6VAFIhFz2Q8FJhzVOvRE4pCtQJl1Q6o9KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695364587; a=rsa-sha256; cv=none; b=eHuOLco9xGAG8tvQMod3QRziBkzD8DFhJMWXwhqqvM7Q4SX1nxnTFEfUlC2oUj1ELZN1A5 2iWawmpRWDafd0h14Z3zWn86KwrgxTd9vyPHhjfFZu3uFZXYyDurdOURNp3FcnUPHEXJUb 4Q25hqG2x+8srb5fxHkrXAjuvv7vkLE5/YQKvjIRAnAW5JG6oo3jWjvbpHF4HbuxZn6D79 6UwVVmOWw+NBoE8VzW5Dx+A2oSRbQ5aJkpwl2PCspcElOjDKDPjLeTsqj6imauLbLr/9i5 DSkyKpmQ/ZbNiZ+l2z7Vo82+oKM/A5Z4e3P0EfOJydRtqIH375HajWIl+mj4+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=1695364587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjrGU+5C5mlHhNHV+zu8oLKXhH/w81e1Rk0n79Crwi4=; b=t73TvlbEKz7HAl6JsLXW6UMa06UdKG6dZBXep+itUUtkVWrDYpo+uH1K5XC90Q5osIdBGP 6qBPcs+b4gf/+AKVz6rQKv3RsaUz4jBcK0NFwPOW9d5sW74zdApwFHmEovmxZiKY5M0P9L yqixF35qb3qQ0RoqRcyUB1YhRbSWuWsmOGAL02LSqrmRc0BR/Vwg8gIDoSWzqtzXHwrexb 13oy+OaAZ+JWruHSkLXjYT1iNq+NRWxCVi4nOotVVFExY4TlQUlh4E5LjWCYVE7aBPYdKa qWbC4lXA2tBCoGxp1mhjcmu07UK+M2dZ1eIqrMaeu9OZpC5yV5K7hi0uybwFqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsMx72ThLz19PR; Fri, 22 Sep 2023 06:36: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 38M6aRiA016202; Fri, 22 Sep 2023 06:36:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38M6aRi8016199; Fri, 22 Sep 2023 06:36:27 GMT (envelope-from git) Date: Fri, 22 Sep 2023 06:36:27 GMT Message-Id: <202309220636.38M6aRi8016199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f03512540805 - stable/14 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f03512540805694c75edb72f3aaaccbe47e69bd4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f03512540805694c75edb72f3aaaccbe47e69bd4 commit f03512540805694c75edb72f3aaaccbe47e69bd4 Author: Dimitry Andric AuthorDate: 2023-09-14 16:39:31 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 06:32:59 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64 PR: 273776 MFC after: 3 days (cherry picked from commit b9c012a60b6e98f7c3e765859195302cf3ae7f6c) --- ObsoleteFiles.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a59151dad4ea..45670b228aaf 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -382,10 +382,13 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -396,9 +399,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -418,8 +423,10 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_interceptors-x86_ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -437,34 +444,41 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Fri Sep 22 06:36: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 4RsMx85NhTz4vcFX; Fri, 22 Sep 2023 06:36: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 4RsMx84QcBz4LdM; Fri, 22 Sep 2023 06:36:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695364588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9u9DnN41mbyyqfWVX5Y4SEEORG/g7964NJAHPz0jqLo=; b=vX8trAy6NIWRd1062AsYqz1MtL1P4G++N9BFXHEQa9PzStILJ1ZnSl0B5JWHs8igueKRpP sUu3W6pjoB5/603P/hW+fEVRXLHE05cmO6SY4za3Qzxu4ZEMoXnjhdnxhHbIw4MgWSmJ/H bS4VAdVNqvx4J1LGQVWkeNHLWS34P7V6tgJPtzb8gKL9QoyO0dzW2HIqt95yI6Dv3JyV+E xeY7z5UAAXRCg3HzofAfrWw0mOD7ckangaKrbMQykh3Fze2ZmBoMiEnAvDnZO7SY02jCex 5XD5s0F8BVh4q0hEZ+3bX6NQwkmqGFb1JNe4P9mK68nxJZ7vtVxDkTQJZk8GSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695364588; a=rsa-sha256; cv=none; b=xk2vYQ8Rf0M++X1PM794cQRjZIUVvTMuBbpixACZHrihqBXRqRT1AItx+miOQPhj73FUOp G1c7782S/lIAAjhSkI5yVg4r1CJdpRSl2G7QdG7mtPqzWkOMvU9RBlSThPodOVXtb9amQ0 wiF0JocJYYAX+4n7QtdAGD/IYM8fqHu22NwNK+MSzpPlsUWlpEeRKCCR8pv/CDO7n1zDkB CdTs1P4lBkbmfzp44eMZkLaiVLxmPaNlC/v5OOBiHx2qY1cJY3iprlXZsR94hTEbC0cF84 kpZP4HXqinGAn2OtNJ8/3FsX4QrKh1MP+YuMM/RBnqWVBIwrO9K/TrlcfyOkBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695364588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9u9DnN41mbyyqfWVX5Y4SEEORG/g7964NJAHPz0jqLo=; b=XqrUgoodl+iNjsLtnJfTLhBzZ72Nhe3hkOJ3pjFDjp9/jlaCzc3zzHPF0lVXg4WVpvZbQT T62N5vvTyqVp+xAlH8exF1SRz7BdXOvjc9jWo6mmNPenD2zaL+3xJ+hX366REKvvJJ1/K1 A5Kd17TB/VrO/QnplQjOtTMAl+m7p3cJDrnhBj/jNN8JqDOPZZYqDi3+IXLL5x1N75Ag+R u1In8MHd3d1ZoiXOv2UWlNsKQInY3hjKhZeLQewj68wmdYrQTH1W0p+OLLAKiF4BW7BrIw FIuW4y0bJsDPIT31nkFJlwu8CBJNj7IahNmt0CDi5nRM2+0stY9FszXYZTjx9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsMx83CFlz19nC; Fri, 22 Sep 2023 06:36: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 38M6aShS016250; Fri, 22 Sep 2023 06:36:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38M6aSMI016247; Fri, 22 Sep 2023 06:36:28 GMT (envelope-from git) Date: Fri, 22 Sep 2023 06:36:28 GMT Message-Id: <202309220636.38M6aSMI016247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 0cf2f7f35877 - stable/14 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64le List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0cf2f7f35877161a3d48877fcd249a9a32d9cc70 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0cf2f7f35877161a3d48877fcd249a9a32d9cc70 commit 0cf2f7f35877161a3d48877fcd249a9a32d9cc70 Author: Dimitry Andric AuthorDate: 2023-09-16 07:47:19 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 06:33:22 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64le PR: 273776 MFC after: 3 days (cherry picked from commit cadbf320b352b3691cdfa90ad8ba818efca4ea68) --- ObsoleteFiles.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 45670b228aaf..eec5c4231f7e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -384,11 +384,14 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -400,10 +403,12 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -424,9 +429,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -435,6 +442,8 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a @@ -445,6 +454,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a @@ -452,19 +462,23 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a @@ -472,6 +486,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a @@ -479,6 +494,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Fri Sep 22 06:36: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 4RsMx95lvVz4vcQP; Fri, 22 Sep 2023 06:36: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 4RsMx95H12z4LMm; Fri, 22 Sep 2023 06:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695364589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ln5OpH/0CBWwpwhqfgz1Axe7d3G25/8kSvqbctX1HdE=; b=DEXu7uVQaCyrhceBO85r3V3pPNs64Ld39hiK/Qolj51nSMScEVGleIoA/qxPBwbnpWCFDJ BQFbfsUZ54c49sefYa63EDAOycxCqkVXIG4y8PGifRshs1p/MlYBOaOuUIJRZ+MRCJrOZJ Ao3R9MLaDeWmrSe7je5sxLts2UIK0ThhqhfRteQNk1TXXVw/Ueg1InwwgKis9aRjvaHwet +Qo8CCPiRu+zGhsFZKkqW+suONWxKrjvJ7f1qIqD0GBHEZcialAvCZfZXU8xQntrA7BQ5A /SWoZ+0EcQtsNGX/Wiy+6x3Einx95AqBZlFfjsssT8K8vUwZAdL6H8hE8kd6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695364589; a=rsa-sha256; cv=none; b=fqbcrxTdMMX3pH8V81luENJwp04+8LIannsIQy20N0OoZthrVTby2RXG6EG7Uufit9psIC t4cd/p1AViAEnpm0rz24rIbTlxhP9Csbxez+M0zSgMiNzw2Su/OSrP8yqvCKlfTVu0CsnT Ck41+KTyOQj6CuO8u9xAr86ZW9IJYY9dSYYTNo6Rc6lnxx2BEZts6mBRTATi5J4hEOz2Gn Q6AE9fDpTT0cUA8uw0u0wMW5tisl57jeOZuz3IVVVY406CP+Hre/cAW/1DbxNNRs97opd6 ldJ4YOsLkH/yv/DNVLfaLBHqXKQdBVQhLHloqMiqCk/y4uBiBOTDozQqisbKLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695364589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ln5OpH/0CBWwpwhqfgz1Axe7d3G25/8kSvqbctX1HdE=; b=pk4lXl4f5/PRQPZLDBYCJCfgalxLzEmZ36Uv02GieFKCCdMjerAYqyL4UZjmugvzxgrL+e 7coRzXAblT5cU/jSX5mDoDXjfECUhrAdb/7rOEP4UjLe/8YQogj7AUnkFYfiJE16kkV1ys IPGZczNtCz2WD4P6Ecm3hD5eSHIswhqKkaDret0joB6ybE2a9WcIlOpE6gpyMwmVzky36s 1gAywWRzHRvNeGF9iHjxolb2Omfb61ZsZkaRyiY1CzAw0Jst3XC6r1GsojPL6hL8WnApfM TuaxSG1GrXK/Cz/PexAGL79FLUOVzoG79ty8cACIrZxjcbwpurLe9KMpe/JwXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsMx9499Pz19Tq; Fri, 22 Sep 2023 06:36: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 38M6aTxb016304; Fri, 22 Sep 2023 06:36:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38M6aTPV016301; Fri, 22 Sep 2023 06:36:29 GMT (envelope-from git) Date: Fri, 22 Sep 2023 06:36:29 GMT Message-Id: <202309220636.38M6aTPV016301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 237b0c5b22c9 - stable/14 - ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 237b0c5b22c95683c2367ef0a82f54c309309db4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=237b0c5b22c95683c2367ef0a82f54c309309db4 commit 237b0c5b22c95683c2367ef0a82f54c309309db4 Author: Dimitry Andric AuthorDate: 2023-09-19 11:45:57 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 06:34:08 +0000 ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le PR: 273776 MFC after: 3 days (cherry picked from commit 8a99263e9da1f04ede967cfa1ea6d52d258dcbe5) --- ObsoleteFiles.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index eec5c4231f7e..df9d286cd039 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -503,14 +503,18 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-x86_64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-x86_64.a OLD_DIRS+=usr/lib/clang/15.0.7/lib/freebsd From nobody Fri Sep 22 08:11: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 4RsQ2H2K6zz4tTyn; Fri, 22 Sep 2023 08:11: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 4RsQ2H1t9Tz4c1n; Fri, 22 Sep 2023 08:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695370263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kuyvHTRqSKYmyIVDjygZ9G812X0r4ryB6UPPpKn59E=; b=gnE928ZRXcc00efTZPV1Pb7nXiOXagx1yhG3w4t5luYzDdE7NdTJkaqfncTbc310nhh9XD JxqKupE6hzX8KDjhSGaxPwHwOVamKZCN/GxyvzAwUWIHBLCfJzu/88jyYG3QgWOldjJ34R 9xpbw65+mc6wW5qClaLh4MFnjEFEZ/O0NIPhtjaeOzWTTxEwEc1fbURK7yNtGEMwF43+Ll iuiLw/d3dQLPRW0mmTqxYv2Uck/AYaiN9IaIusKBtvKmUxS293TLPUoDxvVFuu4QqEjLjO +YYHMqdC5aOEyjb1KL0J+uAnGpcv2ERd6Tomf2bTWgpJBpPu3gLlOSVuQpOGcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695370263; a=rsa-sha256; cv=none; b=esIc+1ueoGihGKiu/T98IQKrn5hE8BIrPU6r39PxSthiA59T/BcMu7P4b1O63vdRaEz0hB eeuqAhM9vq1uV0APZS+7Jyk1gQNAaJKQgu0+WDDWX2zUPJzKpgUcl3O/31ocyn9WLfKxaO 7JD1UhKmLkGdZT/6Stoj9f+s5XwAMeU7W2+cjnpCq13ZaTsrpwyA+Q7lgibMO7C3iKqOup A7YoOHylgON167Yp5IpLQWIF/Pu+i/k3fssdCXHylCglw7xRE5Y1pkvh4bvUYbkEF9KyDe zwUmo7LzV6/F7ktdHEpvHDDMTKFBws9cD4Wkdxz6urlEvssbSndqWwA5DPfLiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695370263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2kuyvHTRqSKYmyIVDjygZ9G812X0r4ryB6UPPpKn59E=; b=o5c84XOrDQRClaqPzvS7vBd+C81zSm9lgvJX9xrwrLjgSAzB/d3UPHAbbeTHJDMfEknJG/ js11HOQzvYlFLaXiv0WyRtKl3K8bvYp83r+5/zfFBjuduKQMQi185LfKxSNiUnvOHnVcDU BxWgfN5Img5Oo/LG99rfv2xXqIw3ZnOPCZRTRGxCKMdG0Y418ZMu6jwAlEjhRH60sXcWYP fEE4UKTZt7PEw3xTYNB7h2ujig2tt4MHxDYnI+Ho99DiVsfG+4fc39+4lh685sxp7ODhL8 kofJl/Nz4rrOldKnJBM4wBkUqkbaEfVWBeVfmbvIohW2sO/bP59sW079sFV0qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsQ2H0xMjz1CtQ; Fri, 22 Sep 2023 08:11: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 38M8B3SL075221; Fri, 22 Sep 2023 08:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38M8B3Sd075217; Fri, 22 Sep 2023 08:11:03 GMT (envelope-from git) Date: Fri, 22 Sep 2023 08:11:03 GMT Message-Id: <202309220811.38M8B3Sd075217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a944ba1225c5 - stable/14 - ping: The -C option is also supported for IPv6. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a944ba1225c5c26ca2698e9c172d2df1026a8e0f Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a944ba1225c5c26ca2698e9c172d2df1026a8e0f commit a944ba1225c5c26ca2698e9c172d2df1026a8e0f Author: Dag-Erling Smørgrav AuthorDate: 2023-09-19 08:47:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-22 07:50:32 +0000 ping: The -C option is also supported for IPv6. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: rscheff, allanjude Differential Revision: https://reviews.freebsd.org/D41881 (cherry picked from commit a2d1360142f609485c9301df08cc99140743ef2b) --- sbin/ping/main.c | 2 +- sbin/ping/ping.8 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 47d20f569008..6321178e1228 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -211,7 +211,7 @@ usage(void) "Z" #endif "] " - "[-b bufsiz] [-c count] [-e gateway]\n" + "[-b bufsiz] [-C pcp] [-c count] [-e gateway]\n" "\t [-I interface] [-i wait] [-k addrtype] [-l preload] " "[-m hoplimit]\n" "\t [-p pattern]" diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 7419aef51dfa..34ffc98c3a40 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -27,7 +27,7 @@ .\" .\" @(#)ping.8 8.2 (Berkeley) 12/11/93 .\" -.Dd November 20, 2022 +.Dd September 15, 2023 .Dt PING 8 .Os .Sh NAME @@ -81,6 +81,7 @@ packets to network hosts .Op Fl 6AaDdEfHNnOoquvYyZ .Op Fl .\& Ns Ar chars .Op Fl b Ar bufsiz +.Op Fl C Ar pcp .Op Fl c Ar count .Op Fl e Ar gateway .Op Fl I Ar interface From nobody Fri Sep 22 11: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 4RsTsZ0KQfz4tjFd; Fri, 22 Sep 2023 11: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 4RsTsY6v7hz4tGB; Fri, 22 Sep 2023 11:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Hdf+BTU9lXdjBhGt3OSDlTHHqd+ciaK+Dagh7ts6fg=; b=VnUNoM7g3C3f05jU9wjz3Hrrb8BTzoY0REuXOYo+99YK2ecN4MrZiEh9r23RRok2Eb/kir U+paNLfE/ggsPZhjEsCCc56uhsN3lnzJ8sLIKeSEYtWVu++dhPmyZ97fRNt6RnQELmZ8aG PY4yKm0PG5YeF+m7OUOeIBc7Mxrv1eWIA1ElrxB0k4ZzrQK8e3Bg/qJdEFUOds5F80xyVJ /B9Sgjd6ySQLbBr3e+8NDVlz+wHJ8a+PasKsZTxgVBklWHEJu6Qi1fnppeiMlx0vHkfsAz 6oJi5VUtCyIDgbr5IN92utThDB43/krq9ghKm1C1AkzjGRznK3JYvwpLNElinA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695380626; a=rsa-sha256; cv=none; b=JsUjvQ0kFCWA/nMK1MWmuu+YHM8MBsTXpFjHoDeFvjz4UOmoJ8tXeai8iZxR1y1GGrLSop FsyXBIqjWijjU15sTSQrs/Stz6seSkyfYFf93UlbltzQBMZtT5y2f6X6Pp7Zq6SkbhEvQh 3I/gu/WnaFpRa6JU2q2lZIHMjQyoiCD68542houRnjrd5SmLdP/IiAa5RYTJ24XgrgRASb vEfLz0GhWj/GzbXcf0tsBOIDt89YCcjdA51w1cS8VCuPTVGaSUzmQES7RRXMvVslCt7P8E XXDY0ZeYC0y6AJfnvcGTAc/QG4+Va0fpMUftHkWMxf/mELdKRNkIMGueufbVPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Hdf+BTU9lXdjBhGt3OSDlTHHqd+ciaK+Dagh7ts6fg=; b=HUuQoRaLOd4QHdEdkuLB4s8wTjxITehfYm5pKMl4CMsYLnpo1Px/wxU+fnAHS2Pf1EaxgX dsH1dAV7Mp0L4EGbpa4d7hFMesokJ+K28qNK9XYIbInPLibRZIHrc1qeGR4yMGpLevPHCQ H+yxVN4wI4aXfrMGAwtQIhC27WUUc/cnfdH0EMHecn3s0YbDBTtYcEgEaoTIV1hRVukG5D fhvD348RtgA/JSoGqdfapfWWp2dYRk6o0zUTpSHwWOT1kxpqhzvtB6N3b1V/INYDCvMIkh T1hQ1NDcjKXUD8HzHkP/trbhA7sB+00CvUN66rrqSm6+djwj6R8dOK5En6l6vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsTsY5xWzz42r; Fri, 22 Sep 2023 11: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 38MB3jpN065308; Fri, 22 Sep 2023 11: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 38MB3jv9065305; Fri, 22 Sep 2023 11:03:45 GMT (envelope-from git) Date: Fri, 22 Sep 2023 11:03:45 GMT Message-Id: <202309221103.38MB3jv9065305@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: 3df74eecfdec - stable/14 - libfido2: backport hidraw(4) support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3df74eecfdecbafe55838b45141c275754d526bb Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3df74eecfdecbafe55838b45141c275754d526bb commit 3df74eecfdecbafe55838b45141c275754d526bb Author: Ed Maste AuthorDate: 2023-09-19 16:50:13 +0000 Commit: Ed Maste CommitDate: 2023-09-22 11:03:35 +0000 libfido2: backport hidraw(4) support PR: 273596 Submitted by: David Horn Obtained from: libfido2 2c9dfaae2a56, 930160388700 (cherry picked from commit 1843dfb05ed80149f5a412180af882e3cb8f451b) --- contrib/libfido2/src/hid_freebsd.c | 97 ++++++++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 10 deletions(-) diff --git a/contrib/libfido2/src/hid_freebsd.c b/contrib/libfido2/src/hid_freebsd.c index 5aefe69c1bec..5151690afc0a 100644 --- a/contrib/libfido2/src/hid_freebsd.c +++ b/contrib/libfido2/src/hid_freebsd.c @@ -1,13 +1,17 @@ /* - * Copyright (c) 2020 Yubico AB. All rights reserved. + * Copyright (c) 2020-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ -#include +#include #include #include +#if __FreeBSD_version >= 1300500 +#include +#define USE_HIDRAW /* see usbhid(4) and hidraw(4) on FreeBSD 13+ */ +#endif #include #include @@ -57,8 +61,60 @@ is_fido(int fd) return (usage_page == 0xf1d0); } +#ifdef USE_HIDRAW +static int +copy_info_hidraw(fido_dev_info_t *di, const char *path) +{ + int fd = -1; + int ok = -1; + struct usb_device_info udi; + struct hidraw_devinfo devinfo; + char rawname[129]; + + memset(di, 0, sizeof(*di)); + memset(&udi, 0, sizeof(udi)); + memset(&devinfo, 0, sizeof(devinfo)); + memset(rawname, 0, sizeof(rawname)); + + if ((fd = fido_hid_unix_open(path)) == -1 || is_fido(fd) == 0) + goto fail; + + if (ioctl(fd, IOCTL_REQ(USB_GET_DEVICEINFO), &udi) == -1) { + if (ioctl(fd, IOCTL_REQ(HIDIOCGRAWINFO), &devinfo) == -1 || + ioctl(fd, IOCTL_REQ(HIDIOCGRAWNAME(128)), rawname) == -1 || + (di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(UHID_VENDOR)) == NULL || + (di->product = strdup(rawname)) == NULL) + goto fail; + di->vendor_id = devinfo.vendor; + di->product_id = devinfo.product; + } else { + if ((di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(udi.udi_vendor)) == NULL || + (di->product = strdup(udi.udi_product)) == NULL) + goto fail; + di->vendor_id = (int16_t)udi.udi_vendorNo; + di->product_id = (int16_t)udi.udi_productNo; + } + + ok = 0; +fail: + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); + + if (ok < 0) { + free(di->path); + free(di->manufacturer); + free(di->product); + explicit_bzero(di, sizeof(*di)); + } + + return (ok); +} +#endif /* USE_HIDRAW */ + static int -copy_info(fido_dev_info_t *di, const char *path) +copy_info_uhid(fido_dev_info_t *di, const char *path) { int fd = -1; int ok = -1; @@ -81,14 +137,13 @@ copy_info(fido_dev_info_t *di, const char *path) (di->manufacturer = strdup(udi.udi_vendor)) == NULL || (di->product = strdup(udi.udi_product)) == NULL) goto fail; - di->vendor_id = (int16_t)udi.udi_vendorNo; di->product_id = (int16_t)udi.udi_productNo; ok = 0; fail: - if (fd != -1) - close(fd); + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); if (ok < 0) { free(di->path); @@ -106,17 +161,35 @@ fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) char path[64]; size_t i; - *olen = 0; - if (ilen == 0) return (FIDO_OK); /* nothing to do */ if (devlist == NULL || olen == NULL) return (FIDO_ERR_INVALID_ARGUMENT); - for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) { + *olen = 0; + +#ifdef USE_HIDRAW + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { + snprintf(path, sizeof(path), "/dev/hidraw%zu", i); + if (copy_info_hidraw(&devlist[*olen], path) == 0) { + devlist[*olen].io = (fido_dev_io_t) { + fido_hid_open, + fido_hid_close, + fido_hid_read, + fido_hid_write, + }; + ++(*olen); + } + } + /* hidraw(4) is preferred over uhid(4) */ + if (*olen != 0) + return (FIDO_OK); +#endif /* USE_HIDRAW */ + + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { snprintf(path, sizeof(path), "/dev/uhid%zu", i); - if (copy_info(&devlist[*olen], path) == 0) { + if (copy_info_uhid(&devlist[*olen], path) == 0) { devlist[*olen].io = (fido_dev_io_t) { fido_hid_open, fido_hid_close, @@ -153,6 +226,10 @@ fido_hid_open(const char *path) ugd.ugd_data = buf; ugd.ugd_maxlen = sizeof(buf); + /* + * N.B. if ctx->fd is an hidraw(4) device, the ioctl() below puts it in + * uhid(4) compat mode, which we need to keep fido_hid_write() as-is. + */ if ((r = ioctl(ctx->fd, IOCTL_REQ(USB_GET_REPORT_DESC), &ugd) == -1) || ugd.ugd_actlen > sizeof(buf) || fido_hid_get_report_len(ugd.ugd_data, ugd.ugd_actlen, From nobody Fri Sep 22 11: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 4RsTsb1yGTz4tjLm; Fri, 22 Sep 2023 11: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 4RsTsb1bN7z4t9n; Fri, 22 Sep 2023 11: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=1695380627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSEkdozINdL3khPXN0z2K4L9ru2hbrGuq+HRf7rtr/Y=; b=XKWHUQ3vC9V/JExwhOa7tvaZkaH1W8XzbiFhA0r8Pnre2VoTRG6NTprzENfXEfPy8o95KJ tzNnAF4XaQ7cjJPJq5m+5Rh9zNRIk7C6yYIxPITc1ywiMHJ4TXJu/T62aAEzo7yPuZmfmV FtiT+zIJIdfIGzccT/p9sWk2d+lmjfZX3YmCZc7HB+hqMWMw7l4eWeasO9iw+1OaWeIW/l WjN7OOWQwNG8xI7uxwGeZtolbe5c9tUL2LeO1+KOYALnRxe38hIr2xSIEuqrrtxeV0F8fY 2ST/UHIB645QfRuyLk3WUkoNMlATqZF2ClZOLHLXw3K4IA9sm1gpWt3d5Zi04g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695380627; a=rsa-sha256; cv=none; b=QJrVT2Xx/2Hg3O6qaKy+euO+n3bp7DEVMCoJlvZRqpstbQ+3UBEPdOOkitJTlxRvTwouEA Dvt58K9WVJKCUSeQSJWOlqx9N+0Wx/uoeadFl2R0nYyZTYq9kd2xzN5eu/+42tAwFb2con jhUqC51rmTn9v7nwKQzi/8REWoiFxxcRH7QZ/Tqj2z4UapteOX/z7dddWdczvPqCfy5wuv 3YyACsBgoq7qcylGbKhog8CfTezpGfLYZO8j40II5P+0T9FeAy1jEW9/mAldT5Yu3h6v08 OS5kWbz/1vzTLWSAeOMT+n1dlLKD17RTqRNIo6UwJEABaSHN2UlrgbUrZpd3VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSEkdozINdL3khPXN0z2K4L9ru2hbrGuq+HRf7rtr/Y=; b=mBu+P8CmoREUvktZ1g6btgaP/EzJGCH0FHyNJc1lcNyUfYEHPxXhi/pPw3QLQqtKHfo3n6 wvvBa2zPlra214Vpz+yzpdU7GBOS60nQQMN98Vvzux/UNDDzjKnc2PQaFpPLoTV24tDVVP NFty/30GMrBzbZXoBgoyRB2oqTEGYnbUY8KYwfW8g48xI18ZSVmT+gKAusEgHJ+Yf6UQb0 m2lA/eru5gCxRVQu8hvJJFH81cRme9MeK4SgTUIl5xJ+f8ckyrfEb+j0HR/41NH6Bejk0a Zablhk9IArI8BWc9abTFe/fE5yXLH6wiEyNnO/X3Qqo81UtrmDMPyraAE90rAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsTsb0gxGz4Dr; Fri, 22 Sep 2023 11: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 38MB3lEN065347; Fri, 22 Sep 2023 11:03:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MB3kMc065344; Fri, 22 Sep 2023 11:03:46 GMT (envelope-from git) Date: Fri, 22 Sep 2023 11:03:46 GMT Message-Id: <202309221103.38MB3kMc065344@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: 5bfbde817cde - stable/14 - libfido2: update to 1.13.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5bfbde817cdedbd7309c38a361cd1211bdcdd70e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5bfbde817cdedbd7309c38a361cd1211bdcdd70e commit 5bfbde817cdedbd7309c38a361cd1211bdcdd70e Author: Ed Maste AuthorDate: 2023-09-19 17:06:12 +0000 Commit: Ed Maste CommitDate: 2023-09-22 11:03:36 +0000 libfido2: update to 1.13.0 Some highlights from NEWS entries: ** Improved OpenSSL 3.0 compatibility. ** Support for hidraw(4) on FreeBSD; gh#597. ** Improved support for FIDO 2.1 authenticators. PR: 273596 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e) --- contrib/libfido2/CMakeLists.txt | 142 ++++++-- contrib/libfido2/LICENSE | 4 +- contrib/libfido2/NEWS | 41 +++ contrib/libfido2/README.adoc | 114 +++++-- contrib/libfido2/examples/CMakeLists.txt | 12 +- contrib/libfido2/examples/README.adoc | 17 +- contrib/libfido2/examples/assert.c | 33 +- contrib/libfido2/examples/cred.c | 29 +- contrib/libfido2/examples/extern.h | 8 +- contrib/libfido2/examples/info.c | 101 +++++- contrib/libfido2/examples/manifest.c | 1 + contrib/libfido2/examples/reset.c | 1 + contrib/libfido2/examples/retries.c | 3 +- contrib/libfido2/examples/select.c | 5 +- contrib/libfido2/examples/setpin.c | 3 +- contrib/libfido2/examples/util.c | 65 +++- contrib/libfido2/fuzz/CMakeLists.txt | 55 ++- contrib/libfido2/fuzz/Dockerfile | 22 +- contrib/libfido2/fuzz/Makefile | 35 +- contrib/libfido2/fuzz/README | 22 +- contrib/libfido2/fuzz/build-coverage | 7 +- contrib/libfido2/fuzz/clock.c | 1 + contrib/libfido2/fuzz/dummy.h | 5 +- contrib/libfido2/fuzz/export.gnu | 32 +- contrib/libfido2/fuzz/functions.txt | 404 ++++++++++++++--------- contrib/libfido2/fuzz/fuzz_assert.c | 43 ++- contrib/libfido2/fuzz/fuzz_bio.c | 5 +- contrib/libfido2/fuzz/fuzz_cred.c | 10 +- contrib/libfido2/fuzz/fuzz_credman.c | 5 +- contrib/libfido2/fuzz/fuzz_hid.c | 5 +- contrib/libfido2/fuzz/fuzz_largeblob.c | 5 +- contrib/libfido2/fuzz/fuzz_mgmt.c | 34 +- contrib/libfido2/fuzz/fuzz_netlink.c | 5 +- contrib/libfido2/fuzz/fuzz_pcsc.c | 269 +++++++++++++++ contrib/libfido2/fuzz/libfuzzer.c | 61 +++- contrib/libfido2/fuzz/mutator_aux.c | 21 +- contrib/libfido2/fuzz/mutator_aux.h | 22 +- contrib/libfido2/fuzz/pcsc.c | 153 +++++++++ contrib/libfido2/fuzz/preload-fuzz.c | 1 + contrib/libfido2/fuzz/preload-snoop.c | 1 + contrib/libfido2/fuzz/report.tgz | Bin 323706 -> 357005 bytes contrib/libfido2/fuzz/summary.txt | 77 +++-- contrib/libfido2/fuzz/udev.c | 3 +- contrib/libfido2/fuzz/wiredata_fido2.h | 77 ++++- contrib/libfido2/fuzz/wiredata_u2f.h | 1 + contrib/libfido2/fuzz/wrap.c | 67 +++- contrib/libfido2/fuzz/wrapped.sym | 10 + contrib/libfido2/man/CMakeLists.txt | 53 ++- contrib/libfido2/man/check.sh | 1 + contrib/libfido2/man/eddsa_pk_new.3 | 32 +- contrib/libfido2/man/es256_pk_new.3 | 32 +- contrib/libfido2/man/es384_pk_new.3 | 164 +++++++++ contrib/libfido2/man/fido2-assert.1 | 27 +- contrib/libfido2/man/fido2-cred.1 | 27 +- contrib/libfido2/man/fido2-token.1 | 51 ++- contrib/libfido2/man/fido_assert_allow_cred.3 | 45 ++- contrib/libfido2/man/fido_assert_new.3 | 37 ++- contrib/libfido2/man/fido_assert_set_authdata.3 | 33 +- contrib/libfido2/man/fido_assert_verify.3 | 33 +- contrib/libfido2/man/fido_bio_dev_get_info.3 | 27 +- contrib/libfido2/man/fido_bio_enroll_new.3 | 27 +- contrib/libfido2/man/fido_bio_info_new.3 | 27 +- contrib/libfido2/man/fido_bio_template.3 | 27 +- contrib/libfido2/man/fido_cbor_info_new.3 | 169 +++++++++- contrib/libfido2/man/fido_cred_exclude.3 | 45 ++- contrib/libfido2/man/fido_cred_new.3 | 29 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 46 ++- contrib/libfido2/man/fido_cred_verify.3 | 27 +- contrib/libfido2/man/fido_credman_metadata_new.3 | 27 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 38 ++- contrib/libfido2/man/fido_dev_get_assert.3 | 27 +- contrib/libfido2/man/fido_dev_get_touch_begin.3 | 27 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 31 +- contrib/libfido2/man/fido_dev_largeblob_get.3 | 34 +- contrib/libfido2/man/fido_dev_make_cred.3 | 27 +- contrib/libfido2/man/fido_dev_open.3 | 27 +- contrib/libfido2/man/fido_dev_set_io_functions.3 | 27 +- contrib/libfido2/man/fido_dev_set_pin.3 | 29 +- contrib/libfido2/man/fido_init.3 | 27 +- contrib/libfido2/man/fido_strerr.3 | 27 +- contrib/libfido2/man/rs256_pk_new.3 | 32 +- contrib/libfido2/openbsd-compat/bsd-asprintf.c | 88 +++++ contrib/libfido2/openbsd-compat/clock_gettime.c | 1 + contrib/libfido2/openbsd-compat/endian_win32.c | 1 + contrib/libfido2/openbsd-compat/openbsd-compat.h | 5 + contrib/libfido2/regress/CMakeLists.txt | 57 +++- contrib/libfido2/regress/assert.c | 14 +- contrib/libfido2/regress/compress.c | 268 +++++++++++++++ contrib/libfido2/regress/cred.c | 15 +- contrib/libfido2/regress/dev.c | 43 ++- contrib/libfido2/regress/eddsa.c | 159 +++++++++ contrib/libfido2/regress/es256.c | 199 +++++++++++ contrib/libfido2/regress/es384.c | 213 ++++++++++++ contrib/libfido2/regress/rs256.c | 201 +++++++++++ contrib/libfido2/src/CMakeLists.txt | 31 +- contrib/libfido2/src/aes256.c | 1 + contrib/libfido2/src/assert.c | 206 ++++++++---- contrib/libfido2/src/authkey.c | 26 +- contrib/libfido2/src/bio.c | 116 ++++--- contrib/libfido2/src/blob.c | 1 + contrib/libfido2/src/blob.h | 1 + contrib/libfido2/src/buf.c | 1 + contrib/libfido2/src/cbor.c | 52 ++- contrib/libfido2/src/compress.c | 145 +++++++- contrib/libfido2/src/config.c | 28 +- contrib/libfido2/src/cred.c | 45 ++- contrib/libfido2/src/credman.c | 162 +++++---- contrib/libfido2/src/dev.c | 229 +++---------- contrib/libfido2/src/diff_exports.sh | 1 + contrib/libfido2/src/ecdh.c | 1 + contrib/libfido2/src/eddsa.c | 14 +- contrib/libfido2/src/err.c | 1 + contrib/libfido2/src/es256.c | 66 ++-- contrib/libfido2/src/es384.c | 296 +++++++++++++++++ contrib/libfido2/src/export.gnu | 22 +- contrib/libfido2/src/export.llvm | 22 +- contrib/libfido2/src/export.msvc | 22 +- contrib/libfido2/src/extern.h | 30 +- contrib/libfido2/src/fallthrough.h | 21 ++ contrib/libfido2/src/fido.h | 46 ++- contrib/libfido2/src/fido/bio.h | 26 +- contrib/libfido2/src/fido/config.h | 26 +- contrib/libfido2/src/fido/credman.h | 26 +- contrib/libfido2/src/fido/eddsa.h | 28 +- contrib/libfido2/src/fido/err.h | 26 +- contrib/libfido2/src/fido/es256.h | 26 +- contrib/libfido2/src/fido/es384.h | 59 ++++ contrib/libfido2/src/fido/param.h | 57 +++- contrib/libfido2/src/fido/rs256.h | 26 +- contrib/libfido2/src/fido/types.h | 78 ++++- contrib/libfido2/src/hid.c | 1 + contrib/libfido2/src/hid_freebsd.c | 1 + contrib/libfido2/src/hid_hidapi.c | 13 +- contrib/libfido2/src/hid_linux.c | 50 ++- contrib/libfido2/src/hid_netbsd.c | 1 + contrib/libfido2/src/hid_openbsd.c | 101 +++--- contrib/libfido2/src/hid_osx.c | 26 +- contrib/libfido2/src/hid_unix.c | 1 + contrib/libfido2/src/hid_win.c | 5 +- contrib/libfido2/src/info.c | 171 +++++++++- contrib/libfido2/src/io.c | 26 +- contrib/libfido2/src/iso7816.c | 1 + contrib/libfido2/src/iso7816.h | 1 + contrib/libfido2/src/largeblob.c | 34 +- contrib/libfido2/src/log.c | 1 + contrib/libfido2/src/netlink.c | 1 + contrib/libfido2/src/netlink.h | 1 + contrib/libfido2/src/nfc.c | 350 ++++++++++++++++++++ contrib/libfido2/src/nfc_linux.c | 387 +++------------------- contrib/libfido2/src/packed.h | 1 + contrib/libfido2/src/pcsc.c | 394 ++++++++++++++++++++++ contrib/libfido2/src/pin.c | 77 +++-- contrib/libfido2/src/random.c | 1 + contrib/libfido2/src/reset.c | 1 + contrib/libfido2/src/rs1.c | 3 +- contrib/libfido2/src/rs256.c | 29 +- contrib/libfido2/src/time.c | 1 + contrib/libfido2/src/touch.c | 109 ++++++ contrib/libfido2/src/tpm.c | 3 +- contrib/libfido2/src/types.c | 17 +- contrib/libfido2/src/u2f.c | 93 ++++-- contrib/libfido2/src/util.c | 31 ++ contrib/libfido2/src/webauthn.h | 75 ++++- contrib/libfido2/src/winhello.c | 122 +++++-- contrib/libfido2/tools/CMakeLists.txt | 12 +- contrib/libfido2/tools/assert_get.c | 7 +- contrib/libfido2/tools/assert_verify.c | 30 +- contrib/libfido2/tools/base64.c | 1 + contrib/libfido2/tools/bio.c | 1 + contrib/libfido2/tools/config.c | 1 + contrib/libfido2/tools/cred_make.c | 7 +- contrib/libfido2/tools/cred_verify.c | 1 + contrib/libfido2/tools/credman.c | 1 + contrib/libfido2/tools/extern.h | 4 +- contrib/libfido2/tools/fido2-assert.c | 1 + contrib/libfido2/tools/fido2-attach.sh | 1 + contrib/libfido2/tools/fido2-cred.c | 1 + contrib/libfido2/tools/fido2-detach.sh | 1 + contrib/libfido2/tools/fido2-token.c | 1 + contrib/libfido2/tools/fido2-unprot.sh | 1 + contrib/libfido2/tools/include_check.sh | 1 + contrib/libfido2/tools/largeblob.c | 59 +++- contrib/libfido2/tools/pin.c | 26 +- contrib/libfido2/tools/test.sh | 46 +-- contrib/libfido2/tools/token.c | 159 ++++++++- contrib/libfido2/tools/util.c | 70 +++- contrib/libfido2/udev/70-u2f.rules | 39 ++- contrib/libfido2/udev/CMakeLists.txt | 1 + contrib/libfido2/udev/check.sh | 1 + contrib/libfido2/udev/fidodevs | 3 + contrib/libfido2/udev/genrules.awk | 32 +- contrib/libfido2/windows/build.ps1 | 32 +- contrib/libfido2/windows/const.ps1 | 14 +- contrib/libfido2/windows/cygwin.ps1 | 2 + contrib/libfido2/windows/release.ps1 | 30 +- lib/libfido2/Makefile | 6 +- 196 files changed, 7592 insertions(+), 1733 deletions(-) diff --git a/contrib/libfido2/CMakeLists.txt b/contrib/libfido2/CMakeLists.txt index 11a51ac5a645..6fa341a01cc6 100644 --- a/contrib/libfido2/CMakeLists.txt +++ b/contrib/libfido2/CMakeLists.txt @@ -1,6 +1,7 @@ -# Copyright (c) 2018-2021 Yubico AB. All rights reserved. +# Copyright (c) 2018-2022 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause # detect AppleClang; needs to come before project() cmake_policy(SET CMP0025 NEW) @@ -28,18 +29,19 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_COLOR_MAKEFILE OFF) set(CMAKE_VERBOSE_MAKEFILE ON) set(FIDO_MAJOR "1") -set(FIDO_MINOR "10") +set(FIDO_MINOR "13") set(FIDO_PATCH "0") set(FIDO_VERSION ${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}) +option(BUILD_TESTS "Build the regress tests" ON) option(BUILD_EXAMPLES "Build example programs" ON) option(BUILD_MANPAGES "Build man pages" ON) -option(BUILD_SHARED_LIBS "Build the shared library" ON) -option(BUILD_STATIC_LIBS "Build the static library" ON) +option(BUILD_SHARED_LIBS "Build a shared library" ON) +option(BUILD_STATIC_LIBS "Build a static library" ON) option(BUILD_TOOLS "Build tool programs" ON) option(FUZZ "Enable fuzzing instrumentation" OFF) -option(LIBFUZZER "Build libfuzzer harnesses" OFF) option(USE_HIDAPI "Use hidapi as the HID backend" OFF) +option(USE_PCSC "Enable experimental PCSC support" OFF) option(USE_WINHELLO "Abstract Windows Hello as a FIDO device" ON) option(NFC_LINUX "Enable NFC support on Linux" ON) @@ -47,6 +49,14 @@ add_definitions(-D_FIDO_MAJOR=${FIDO_MAJOR}) add_definitions(-D_FIDO_MINOR=${FIDO_MINOR}) add_definitions(-D_FIDO_PATCH=${FIDO_PATCH}) +if(BUILD_SHARED_LIBS) + set(_FIDO2_LIBRARY fido2_shared) +elseif(BUILD_STATIC_LIBS) + set(_FIDO2_LIBRARY fido2) +else() + message(FATAL_ERROR "Nothing to build (BUILD_*_LIBS=OFF)") +endif() + if(CYGWIN OR MSYS OR MINGW) set(WIN32 1) endif() @@ -66,7 +76,7 @@ if(NOT MSVC) if(APPLE) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DARWIN_C_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D__STDC_WANT_LIB_EXT1__=1") - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR MINGW OR CYGWIN) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_GNU_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DEFAULT_SOURCE") elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR @@ -91,6 +101,7 @@ check_include_files(sys/random.h HAVE_SYS_RANDOM_H) check_include_files(unistd.h HAVE_UNISTD_H) check_symbol_exists(arc4random_buf stdlib.h HAVE_ARC4RANDOM_BUF) +check_symbol_exists(asprintf stdio.h HAVE_ASPRINTF) check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) check_symbol_exists(explicit_bzero string.h HAVE_EXPLICIT_BZERO) check_symbol_exists(freezero stdlib.h HAVE_FREEZERO) @@ -116,6 +127,7 @@ try_compile(HAVE_POSIX_IOCTL list(APPEND CHECK_VARIABLES HAVE_ARC4RANDOM_BUF + HAVE_ASPRINTF HAVE_CBOR_H HAVE_CLOCK_GETTIME HAVE_ENDIAN_H @@ -147,7 +159,7 @@ foreach(v ${CHECK_VARIABLES}) endif() endforeach() -if(HAVE_EXPLICIT_BZERO AND NOT LIBFUZZER) +if(HAVE_EXPLICIT_BZERO AND NOT FUZZ) add_definitions(-DHAVE_EXPLICIT_BZERO) endif() @@ -155,19 +167,30 @@ if(UNIX) add_definitions(-DHAVE_DEV_URANDOM) endif() + if(MSVC) if((NOT CBOR_INCLUDE_DIRS) OR (NOT CBOR_LIBRARY_DIRS) OR - (NOT CBOR_BIN_DIRS) OR (NOT CRYPTO_INCLUDE_DIRS) OR - (NOT CRYPTO_LIBRARY_DIRS) OR (NOT CRYPTO_BIN_DIRS) OR - (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS) OR - (NOT ZLIB_BIN_DIRS)) + (NOT CRYPTO_INCLUDE_DIRS) OR (NOT CRYPTO_LIBRARY_DIRS) OR + (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS)) message(FATAL_ERROR "please define " - "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY,BIN}_DIRS when " + "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY}_DIRS when " "building under msvc") endif() - set(CBOR_LIBRARIES cbor) - set(ZLIB_LIBRARIES zlib) - set(CRYPTO_LIBRARIES crypto-47) + if(BUILD_TESTS AND BUILD_SHARED_LIBS AND + ((NOT CBOR_BIN_DIRS) OR (NOT ZLIB_BIN_DIRS) OR (NOT CRYPTO_BIN_DIRS))) + message(FATAL_ERROR "please define {CBOR,CRYPTO,ZLIB}_BIN_DIRS " + "when building tests") + endif() + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES cbor) + endif() + if(NOT ZLIB_LIBRARIES) + set(ZLIB_LIBRARIES zlib1) + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES crypto) + endif() + set(MSVC_DISABLED_WARNINGS_LIST "C4152" # nonstandard extension used: function/data pointer # conversion in expression; @@ -209,8 +232,12 @@ else() message(FATAL_ERROR "could not find zlib") endif() - set(CBOR_LIBRARIES "cbor") - set(CRYPTO_LIBRARIES "crypto") + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES "cbor") + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES "crypto") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") pkg_search_module(UDEV libudev REQUIRED) @@ -237,6 +264,17 @@ else() add_compile_options(-Wno-unused-parameter) endif() + if(FUZZ) + set(USE_PCSC ON) + add_definitions(-DFIDO_FUZZ) + endif() + + # If building with PCSC, look for pcsc-lite. + if(USE_PCSC AND NOT (APPLE OR CYGWIN OR MSYS OR MINGW)) + pkg_search_module(PCSC libpcsclite REQUIRED) + set(PCSC_LIBRARIES pcsclite) + endif() + if(USE_HIDAPI) add_definitions(-DUSE_HIDAPI) pkg_search_module(HIDAPI hidapi${HIDAPI_SUFFIX} REQUIRED) @@ -244,7 +282,7 @@ else() endif() if(NFC_LINUX) - add_definitions(-DNFC_LINUX) + add_definitions(-DUSE_NFC) endif() if(WIN32) @@ -263,16 +301,21 @@ else() add_compile_options(-Wwrite-strings) add_compile_options(-Wmissing-prototypes) add_compile_options(-Wbad-function-cast) + add_compile_options(-Wimplicit-fallthrough) add_compile_options(-pedantic) add_compile_options(-pedantic-errors) + set(EXTRA_CFLAGS "-Wconversion -Wsign-conversion") + if(WIN32) add_compile_options(-Wno-type-limits) add_compile_options(-Wno-cast-function-type) endif() + if(HAVE_SHORTEN_64_TO_32) add_compile_options(-Wshorten-64-to-32) endif() + if(HAVE_STACK_PROTECTOR_ALL) add_compile_options(-fstack-protector-all) endif() @@ -285,12 +328,8 @@ else() add_definitions(-DOPENSSL_API_COMPAT=0x10100000L) endif() - if(FUZZ) - add_definitions(-DFIDO_FUZZ) - endif() - - if(LIBFUZZER) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=fuzzer-no-link") + if(NOT FUZZ) + set(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wframe-larger-than=2047") endif() endif() @@ -309,6 +348,10 @@ elseif(WIN32) endif() add_definitions(-DTLS=${TLS}) +if(USE_PCSC) + add_definitions(-DUSE_PCSC) +endif() + # export list if(APPLE AND (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) @@ -345,16 +388,18 @@ else() " /def:\"${CMAKE_CURRENT_SOURCE_DIR}/src/export.msvc\"") endif() -include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${CBOR_INCLUDE_DIRS}) include_directories(${CRYPTO_INCLUDE_DIRS}) include_directories(${HIDAPI_INCLUDE_DIRS}) +include_directories(${PCSC_INCLUDE_DIRS}) include_directories(${UDEV_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS}) link_directories(${CBOR_LIBRARY_DIRS}) link_directories(${CRYPTO_LIBRARY_DIRS}) link_directories(${HIDAPI_LIBRARY_DIRS}) +link_directories(${PCSC_LIBRARY_DIRS}) link_directories(${UDEV_LIBRARY_DIRS}) link_directories(${ZLIB_LIBRARY_DIRS}) @@ -367,24 +412,41 @@ message(STATUS "BUILD_TOOLS: ${BUILD_TOOLS}") message(STATUS "CBOR_INCLUDE_DIRS: ${CBOR_INCLUDE_DIRS}") message(STATUS "CBOR_LIBRARIES: ${CBOR_LIBRARIES}") message(STATUS "CBOR_LIBRARY_DIRS: ${CBOR_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CBOR_BIN_DIRS: ${CBOR_BIN_DIRS}") +endif() message(STATUS "CBOR_VERSION: ${CBOR_VERSION}") message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") message(STATUS "CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}") message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") +message(STATUS "CMAKE_CROSSCOMPILING: ${CMAKE_CROSSCOMPILING}") +message(STATUS "CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}") +message(STATUS "CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}") +message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: ${CMAKE_HOST_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}") message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") message(STATUS "CRYPTO_INCLUDE_DIRS: ${CRYPTO_INCLUDE_DIRS}") message(STATUS "CRYPTO_LIBRARIES: ${CRYPTO_LIBRARIES}") message(STATUS "CRYPTO_LIBRARY_DIRS: ${CRYPTO_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CRYPTO_BIN_DIRS: ${CRYPTO_BIN_DIRS}") +endif() message(STATUS "CRYPTO_VERSION: ${CRYPTO_VERSION}") message(STATUS "FIDO_VERSION: ${FIDO_VERSION}") message(STATUS "FUZZ: ${FUZZ}") +if(FUZZ) + message(STATUS "FUZZ_LDFLAGS: ${FUZZ_LDFLAGS}") +endif() message(STATUS "ZLIB_INCLUDE_DIRS: ${ZLIB_INCLUDE_DIRS}") message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}") message(STATUS "ZLIB_LIBRARY_DIRS: ${ZLIB_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "ZLIB_BIN_DIRS: ${ZLIB_BIN_DIRS}") +endif() message(STATUS "ZLIB_VERSION: ${ZLIB_VERSION}") if(USE_HIDAPI) message(STATUS "HIDAPI_INCLUDE_DIRS: ${HIDAPI_INCLUDE_DIRS}") @@ -392,7 +454,10 @@ if(USE_HIDAPI) message(STATUS "HIDAPI_LIBRARY_DIRS: ${HIDAPI_LIBRARY_DIRS}") message(STATUS "HIDAPI_VERSION: ${HIDAPI_VERSION}") endif() -message(STATUS "LIBFUZZER: ${LIBFUZZER}") +message(STATUS "PCSC_INCLUDE_DIRS: ${PCSC_INCLUDE_DIRS}") +message(STATUS "PCSC_LIBRARIES: ${PCSC_LIBRARIES}") +message(STATUS "PCSC_LIBRARY_DIRS: ${PCSC_LIBRARY_DIRS}") +message(STATUS "PCSC_VERSION: ${PCSC_VERSION}") message(STATUS "TLS: ${TLS}") message(STATUS "UDEV_INCLUDE_DIRS: ${UDEV_INCLUDE_DIRS}") message(STATUS "UDEV_LIBRARIES: ${UDEV_LIBRARIES}") @@ -400,29 +465,34 @@ message(STATUS "UDEV_LIBRARY_DIRS: ${UDEV_LIBRARY_DIRS}") message(STATUS "UDEV_RULES_DIR: ${UDEV_RULES_DIR}") message(STATUS "UDEV_VERSION: ${UDEV_VERSION}") message(STATUS "USE_HIDAPI: ${USE_HIDAPI}") +message(STATUS "USE_PCSC: ${USE_PCSC}") message(STATUS "USE_WINHELLO: ${USE_WINHELLO}") message(STATUS "NFC_LINUX: ${NFC_LINUX}") -subdirs(src) +if(BUILD_TESTS) + enable_testing() +endif() + +add_subdirectory(src) + +if(BUILD_TESTS) + add_subdirectory(regress) +endif() if(BUILD_EXAMPLES) - subdirs(examples) + add_subdirectory(examples) endif() if(BUILD_TOOLS) - subdirs(tools) + add_subdirectory(tools) endif() if(BUILD_MANPAGES) - subdirs(man) + add_subdirectory(man) endif() if(NOT WIN32) - if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FUZZ) - enable_testing() - subdirs(regress) - endif() if(FUZZ) - subdirs(fuzz) + add_subdirectory(fuzz) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - subdirs(udev) + add_subdirectory(udev) endif() endif() diff --git a/contrib/libfido2/LICENSE b/contrib/libfido2/LICENSE index 75a03f87e3af..ad0e13358930 100644 --- a/contrib/libfido2/LICENSE +++ b/contrib/libfido2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2022 Yubico AB. All rights reserved. +Copyright (c) 2018-2023 Yubico AB. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -22,3 +22,5 @@ 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. + +SPDX-License-Identifier: BSD-2-Clause diff --git a/contrib/libfido2/NEWS b/contrib/libfido2/NEWS index a48b685156c1..bf648aabfd92 100644 --- a/contrib/libfido2/NEWS +++ b/contrib/libfido2/NEWS @@ -1,3 +1,44 @@ +* Version 1.13.0 (2023-02-20) + ** Support for linking against OpenSSL on Windows; gh#668. + ** New API calls: + - fido_assert_empty_allow_list; + - fido_cred_empty_exclude_list. + ** fido2-token: fix issue when listing large blobs. + ** Improved support for different fuzzing engines. + +* Version 1.12.0 (2022-09-22) + ** Support for COSE_ES384. + ** Support for hidraw(4) on FreeBSD; gh#597. + ** Improved support for FIDO 2.1 authenticators. + ** New API calls: + - es384_pk_free; + - es384_pk_from_EC_KEY; + - es384_pk_from_EVP_PKEY; + - es384_pk_from_ptr; + - es384_pk_new; + - es384_pk_to_EVP_PKEY; + - fido_cbor_info_certs_len; + - fido_cbor_info_certs_name_ptr; + - fido_cbor_info_certs_value_ptr; + - fido_cbor_info_maxrpid_minpinlen; + - fido_cbor_info_minpinlen; + - fido_cbor_info_new_pin_required; + - fido_cbor_info_rk_remaining; + - fido_cbor_info_uv_attempts; + - fido_cbor_info_uv_modality. + ** Documentation and reliability fixes. + +* Version 1.11.0 (2022-05-03) + ** Experimental PCSC support; enable with -DUSE_PCSC. + ** Improved OpenSSL 3.0 compatibility. + ** Use RFC1951 raw deflate to compress CTAP 2.1 largeBlobs. + ** winhello: advertise "uv" instead of "clientPin". + ** winhello: support hmac-secret in fido_dev_get_assert(). + ** New API calls: + - fido_cbor_info_maxlargeblob. + ** Documentation and reliability fixes. + ** Separate build and regress targets. + * Version 1.10.0 (2022-01-17) ** hid_osx: handle devices with paths > 511 bytes; gh#462. ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*(); gh#480. diff --git a/contrib/libfido2/README.adoc b/contrib/libfido2/README.adoc index 114cc5eed762..44d559894dac 100644 --- a/contrib/libfido2/README.adoc +++ b/contrib/libfido2/README.adoc @@ -7,7 +7,7 @@ image:https://github.com/yubico/libfido2/workflows/fuzzer/badge.svg["Fuzz Status image:https://oss-fuzz-build-logs.storage.googleapis.com/badges/libfido2.svg["Fuzz Status (oss-fuzz)", link="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libfido2"] *libfido2* provides library functionality and command-line tools to -communicate with a FIDO device over USB, and to verify attestation and +communicate with a FIDO device over USB or NFC, and to verify attestation and assertion signatures. *libfido2* supports the FIDO U2F (CTAP 1) and FIDO2 (CTAP 2) protocols. @@ -23,8 +23,6 @@ file for the full license text. *libfido2* is known to work on Linux, macOS, Windows, OpenBSD, and FreeBSD. -NFC support is available on Linux and Windows. - === Documentation Documentation is available in troff and HTML formats. An @@ -38,19 +36,29 @@ is also available. * Perl: https://github.com/jacquesg/p5-FIDO-Raw[p5-FIDO-Raw] * Rust: https://github.com/PvdBerg1998/libfido2[libfido2] +=== Releases + +The current release of *libfido2* is 1.13.0. Signed release tarballs are +available at Yubico's +https://developers.yubico.com/libfido2/Releases[release page]. + +=== Dependencies + +*libfido2* depends on https://github.com/pjk/libcbor[libcbor], +https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. +On Linux, libudev +(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also +required. + === Installation -==== Releases +==== Fedora 35 and 34 -The current release of *libfido2* is 1.10.0. Please consult Yubico's -https://developers.yubico.com/libfido2/Releases[release page] for source -and binary releases. + $ sudo dnf install libfido2 libfido2-devel fido2-tools -==== Ubuntu 20.04 (Focal) +==== Ubuntu 22.04 (Jammy) and 20.04 (Focal) - $ sudo apt install libfido2-1 - $ sudo apt install libfido2-dev - $ sudo apt install libfido2-doc + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools Alternatively, newer versions of *libfido2* are available in Yubico's PPA. Follow the instructions for Ubuntu 18.04 (Bionic) below. @@ -60,13 +68,31 @@ Follow the instructions for Ubuntu 18.04 (Bionic) below. $ sudo apt install software-properties-common $ sudo apt-add-repository ppa:yubico/stable $ sudo apt update - $ sudo apt install libfido2-dev + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools + +On Linux, you may need to add a udev rule to be able to access the FIDO +device. For example, the udev rule may contain the following: + +---- +#udev rule for allowing HID access to Yubico devices for FIDO support. + +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ + MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" +---- ==== macOS $ brew install libfido2 -Or from source, on UNIX-like systems: +==== Windows + +Please consult Yubico's +https://developers.yubico.com/libfido2/Releases[release page] for ARM, ARM64, +Win32, and Win64 artefacts. + +=== Building from source + +On UNIX-like systems: $ cmake -B build $ make -C build @@ -74,23 +100,45 @@ Or from source, on UNIX-like systems: Depending on the platform, https://www.freedesktop.org/wiki/Software/pkg-config/[pkg-config] may need to -be installed, or the PKG_CONFIG_PATH environment variable set. - -*libfido2* depends on https://github.com/pjk/libcbor[libcbor], -https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. -On Linux, libudev -(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also -required. - -For complete, OS-specific installation instructions, please refer to the -`.actions/` (Linux, macOS) and `windows/` directories. - -On Linux, you will need to add a udev rule to be able to access the FIDO -device, or run as root. For example, the udev rule may contain the following: - ----- -#udev rule for allowing HID access to Yubico devices for FIDO support. - -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ - MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" ----- +be installed, or the PKG_CONFIG_PATH environment variable set. For complete, +OS-specific build instructions, please refer to the `.actions/` +(Linux, macOS, BSD) and `windows/` directories. + +=== Build-time Customisation + +*libfido2* supports a number of CMake options. Some of the options require +additional dependencies. Options that are disabled by default are not +officially supported. + +[%autowidth.stretch] +|=== +|*Option* |*Description* |*Default* +| BUILD_EXAMPLES | Build example programs | ON +| BUILD_MANPAGES | Build man pages | ON +| BUILD_SHARED_LIBS | Build a shared library | ON +| BUILD_STATIC_LIBS | Build a static library | ON +| BUILD_TOOLS | Build auxiliary tools | ON +| FUZZ | Enable fuzzing instrumentation | OFF +| NFC_LINUX | Enable netlink NFC support on Linux | ON +| USE_HIDAPI | Use hidapi as the HID backend | OFF +| USE_PCSC | Enable experimental PCSC support | OFF +| USE_WINHELLO | Abstract Windows Hello as a FIDO device | ON +|=== + +The USE_HIDAPI option requires https://github.com/libusb/hidapi[hidapi]. The +USE_PCSC option requires https://github.com/LudovicRousseau/PCSC[pcsc-lite] on +Linux. + +=== Development + +Please use https://github.com/Yubico/libfido2/discussions[GitHub Discussions] +to ask questions and suggest features, and +https://github.com/Yubico/libfido2/pulls[GitHub pull-requests] for code +contributions. + +=== Reporting bugs + +Please use https://github.com/Yubico/libfido2/issues[GitHub Issues] to report +bugs. To report security issues, please contact security@yubico.com. A PGP +public key can be found at +https://www.yubico.com/support/security-advisories/issue-rating-system/. diff --git a/contrib/libfido2/examples/CMakeLists.txt b/contrib/libfido2/examples/CMakeLists.txt index ad3d44faad6b..f013df4e71ec 100644 --- a/contrib/libfido2/examples/CMakeLists.txt +++ b/contrib/libfido2/examples/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright (c) 2018 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause list(APPEND COMPAT_SOURCES ../openbsd-compat/clock_gettime.c @@ -13,17 +14,6 @@ if(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MSYS) list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c) endif() -# set the library to link against -if(BUILD_STATIC_LIBS) - # drop -rdynamic - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") - set(_FIDO2_LIBRARY fido2) -elseif(BUILD_SHARED_LIBS) - set(_FIDO2_LIBRARY fido2_shared) -else() - set(_FIDO2_LIBRARY ${CRYPTO_LIBRARIES} fido2) -endif() - # enable -Wconversion -Wsign-conversion if(NOT MSVC) set_source_files_properties(assert.c cred.c info.c manifest.c reset.c diff --git a/contrib/libfido2/examples/README.adoc b/contrib/libfido2/examples/README.adoc index 44ee52743a0d..d44218c2cf87 100644 --- a/contrib/libfido2/examples/README.adoc +++ b/contrib/libfido2/examples/README.adoc @@ -20,8 +20,7 @@ The following definitions are used in the description below: - - The file system path of a file containing a NIST P-256 public key in - PEM format. + The file system path of a file containing a public key in PEM format. - @@ -48,8 +47,8 @@ The following examples are provided: Configures as the new PIN of . If [oldpin] is provided, the device's PIN is changed from [oldpin] to . -- cred [-t ecdsa|rsa|eddsa] [-k pubkey] [-ei cred_id] [-P pin] [-T seconds] - [-b blobkey] [-hruv] +- cred [-t es256|es384|rs256|eddsa] [-k pubkey] [-ei cred_id] [-P pin] + [-T seconds] [-b blobkey] [-hruv] Creates a new credential on and verify that the credential was signed by the authenticator. The device's attestation certificate @@ -66,14 +65,16 @@ The following examples are provided: option -b is specified, the credential's "largeBlob" key is stored in . -- assert [-t ecdsa|rsa|eddsa] [-a cred_id] [-h hmac_secret] [-s hmac_salt] - [-P pin] [-T seconds] [-b blobkey] [-puv] +- assert [-t es256|es384|rs256|eddsa] [-a cred_id] [-h hmac_secret] [-P pin] + [-s hmac_salt] [-T seconds] [-b blobkey] [-puv] Asks for a FIDO2 assertion corresponding to [cred_id], which may be omitted for resident keys. The obtained assertion is verified using . The -p option requests that the user - be present. User verification may be requested through the -v - option. If option -u is specified, the assertion is generated using + be present and checks whether the user presence bit was signed by the + authenticator. The -v option requests user verification and checks + whether the user verification bit was signed by the authenticator. + If option -u is specified, the assertion is generated using U2F (CTAP1) instead of FIDO2 (CTAP2) commands. If option -s is specified, a FIDO2 hmac-secret is requested from the authenticator, and the contents of are used as the salt. If option -h diff --git a/contrib/libfido2/examples/assert.c b/contrib/libfido2/examples/assert.c index 8b0dbd9f6eb2..32ba97b2fca3 100644 --- a/contrib/libfido2/examples/assert.c +++ b/contrib/libfido2/examples/assert.c @@ -1,11 +1,13 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include #include +#include #include #include @@ -30,9 +32,9 @@ static const unsigned char cd[32] = { static void usage(void) { - fprintf(stderr, "usage: assert [-t ecdsa|rsa|eddsa] [-a cred_id] " - "[-h hmac_secret] [-s hmac_salt] [-P pin] [-T seconds] " - "[-b blobkey] [-puv] \n"); + fprintf(stderr, "usage: assert [-t es256|es384|rs256|eddsa] " + "[-a cred_id] [-h hmac_secret] [-s hmac_salt] [-P pin] " + "[-T seconds] [-b blobkey] [-puv] \n"); exit(EXIT_FAILURE); } @@ -46,6 +48,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, RSA *rsa = NULL; EVP_PKEY *eddsa = NULL; es256_pk_t *es256_pk = NULL; + es384_pk_t *es384_pk = NULL; rs256_pk_t *rs256_pk = NULL; eddsa_pk_t *eddsa_pk = NULL; void *pk; @@ -67,6 +70,21 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, EC_KEY_free(ec); ec = NULL; + break; + case COSE_ES384: + if ((ec = read_ec_pubkey(key)) == NULL) + errx(1, "read_ec_pubkey"); + + if ((es384_pk = es384_pk_new()) == NULL) + errx(1, "es384_pk_new"); + + if (es384_pk_from_EC_KEY(es384_pk, ec) != FIDO_OK) + errx(1, "es384_pk_from_EC_KEY"); + + pk = es384_pk; + EC_KEY_free(ec); + ec = NULL; + break; case COSE_RS256: if ((rsa = read_rsa_pubkey(key)) == NULL) @@ -147,6 +165,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, errx(1, "fido_assert_verify: %s (0x%x)", fido_strerr(r), r); es256_pk_free(&es256_pk); + es384_pk_free(&es384_pk); rs256_pk_free(&rs256_pk); eddsa_pk_free(&eddsa_pk); @@ -219,9 +238,11 @@ main(int argc, char **argv) body = NULL; break; case 't': - if (strcmp(optarg, "ecdsa") == 0) + if (strcmp(optarg, "es256") == 0) type = COSE_ES256; - else if (strcmp(optarg, "rsa") == 0) + else if (strcmp(optarg, "es384") == 0) + type = COSE_ES384; + else if (strcmp(optarg, "rs256") == 0) type = COSE_RS256; else if (strcmp(optarg, "eddsa") == 0) type = COSE_EDDSA; diff --git a/contrib/libfido2/examples/cred.c b/contrib/libfido2/examples/cred.c index 4a9d8bf4b25a..576900d97786 100644 --- a/contrib/libfido2/examples/cred.c +++ b/contrib/libfido2/examples/cred.c @@ -1,7 +1,8 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include @@ -34,7 +35,7 @@ static const unsigned char user_id[32] = { static void usage(void) { - fprintf(stderr, "usage: cred [-t ecdsa|rsa|eddsa] [-k pubkey] " + fprintf(stderr, "usage: cred [-t es256|es384|rs256|eddsa] [-k pubkey] " "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-hruv] " "\n"); exit(EXIT_FAILURE); @@ -107,15 +108,23 @@ out: if (key_out != NULL) { /* extract the credential pubkey */ if (type == COSE_ES256) { - if (write_ec_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_es256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), fido_cred_pubkey_len(cred)) < 0) - errx(1, "write_ec_pubkey"); + errx(1, "write_es256_pubkey"); + } else if (type == COSE_ES384) { + if (write_es384_pubkey(key_out, + fido_cred_pubkey_ptr(cred), + fido_cred_pubkey_len(cred)) < 0) + errx(1, "write_es384_pubkey"); } else if (type == COSE_RS256) { - if (write_rsa_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_rs256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), fido_cred_pubkey_len(cred)) < 0) - errx(1, "write_rsa_pubkey"); + errx(1, "write_rs256_pubkey"); } else if (type == COSE_EDDSA) { *** 14695 LINES SKIPPED *** From nobody Fri Sep 22 11:07: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 4RsTxy5GfRz4tjD2; Fri, 22 Sep 2023 11:07: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 4RsTxy4TPHz4v6b; Fri, 22 Sep 2023 11:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v4+zgn7nHyC94n89iVPNh7qik+V9sAY4mv8Q/SmbP8=; b=rIlXrcFpYO81shZxWqmC/8iHBnJfHea4I/J/Of4jWAFmIHRCC6g59idMOqbYWnN4seR9no aVU4Pm4FUlav2sEbXv0uAI3zP+sWgU8+9z0os+LD//KgzZkOBmGgAr4a+iulR/jCWIh1Ie nUOYQUK79YFDJdmGkzWW8Ud9wgIEr3k19HSNETliToq1T70Ud6yWgvGR7ith/Sg9XvRurX lks2FBPJ903UywK7Dp7saXqyaxzeu15cZo3KrzuWkov4KN36S/tU6zOwtfrQoTYkpZep5t ZL1EzCzZMBhcmWvAe85y+OqoNprXy0qareVcnGzI2s74gc3FpQugm6Po2fGLjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695380854; a=rsa-sha256; cv=none; b=N85PaljzKmc0cBC1RCpz+6eES5iWaq/9Ud2hdENzGRcHKK6TNuvkY+tE+etcER/iSEwFt7 bfu5J3dzJxpIsRChN7ZSJkReCl6jydB2z7mp3F64R3kmn88JFlAhToCVT1RZqPmpockwzF tcgAR0IXB0iL/dV4L67zO4PjJkULfaTn35ZtK3w5I+pZVwJZvBpovtpjO9waiIyvorXesx Pnvy7pcyRoU7GeN4w+2hTDj47PjDTOoGgqszwgHrpZFW1SW2ns1XwkF9Y7aXW6rpIqSZcy xB1XKsvANXU1iaxkKY8bRjqts1AJP7IhDEnrZA9h9bvj6atSfIsFfLiT5QOjbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v4+zgn7nHyC94n89iVPNh7qik+V9sAY4mv8Q/SmbP8=; b=SGdHYdO0Fk5XvinTENAwjrmfGAQVq7O37ZymOXXxiW/H9nEFjQrlKqB/GlhsvZd/yvSC01 wccKJJUE8S6RxYg3gbkKTgUPJt+xFIjZwBr/cdFZaIHIeyDkWLnUc9e31yFtWpl6MFUkvO 6zDojG3uqfu9RDcrzQmbPSm5Q/YElwATUvNCiJULRiFJMVwj0KY36kraAdzMG5GrQ8GWK0 eyGNIeMBtFxSWEKpFTUjzc8WOhhWXQgcUDrBHxqI6IWdJAOgXQN6gmgqnEEuvXorK+hT1v /dbCQN4sNcmhfoN261aOGux4/KAXEsunFGu4awYvld6azTcSzXM+QGoMmvjjXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsTxy3XbJz4WJ; Fri, 22 Sep 2023 11:07: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 38MB7Y7n065992; Fri, 22 Sep 2023 11:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MB7YEf065989; Fri, 22 Sep 2023 11:07:34 GMT (envelope-from git) Date: Fri, 22 Sep 2023 11:07:34 GMT Message-Id: <202309221107.38MB7YEf065989@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: 3e85eb3c5ef0 - stable/13 - libfido2: backport hidraw(4) support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e85eb3c5ef0c08ae3a7db543d72713c365ca3a4 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3e85eb3c5ef0c08ae3a7db543d72713c365ca3a4 commit 3e85eb3c5ef0c08ae3a7db543d72713c365ca3a4 Author: Ed Maste AuthorDate: 2023-09-19 16:50:13 +0000 Commit: Ed Maste CommitDate: 2023-09-22 11:07:25 +0000 libfido2: backport hidraw(4) support PR: 273596 Submitted by: David Horn Obtained from: libfido2 2c9dfaae2a56, 930160388700 (cherry picked from commit 1843dfb05ed80149f5a412180af882e3cb8f451b) (cherry picked from commit 3df74eecfdecbafe55838b45141c275754d526bb) --- contrib/libfido2/src/hid_freebsd.c | 97 ++++++++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 10 deletions(-) diff --git a/contrib/libfido2/src/hid_freebsd.c b/contrib/libfido2/src/hid_freebsd.c index 5aefe69c1bec..5151690afc0a 100644 --- a/contrib/libfido2/src/hid_freebsd.c +++ b/contrib/libfido2/src/hid_freebsd.c @@ -1,13 +1,17 @@ /* - * Copyright (c) 2020 Yubico AB. All rights reserved. + * Copyright (c) 2020-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ -#include +#include #include #include +#if __FreeBSD_version >= 1300500 +#include +#define USE_HIDRAW /* see usbhid(4) and hidraw(4) on FreeBSD 13+ */ +#endif #include #include @@ -57,8 +61,60 @@ is_fido(int fd) return (usage_page == 0xf1d0); } +#ifdef USE_HIDRAW +static int +copy_info_hidraw(fido_dev_info_t *di, const char *path) +{ + int fd = -1; + int ok = -1; + struct usb_device_info udi; + struct hidraw_devinfo devinfo; + char rawname[129]; + + memset(di, 0, sizeof(*di)); + memset(&udi, 0, sizeof(udi)); + memset(&devinfo, 0, sizeof(devinfo)); + memset(rawname, 0, sizeof(rawname)); + + if ((fd = fido_hid_unix_open(path)) == -1 || is_fido(fd) == 0) + goto fail; + + if (ioctl(fd, IOCTL_REQ(USB_GET_DEVICEINFO), &udi) == -1) { + if (ioctl(fd, IOCTL_REQ(HIDIOCGRAWINFO), &devinfo) == -1 || + ioctl(fd, IOCTL_REQ(HIDIOCGRAWNAME(128)), rawname) == -1 || + (di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(UHID_VENDOR)) == NULL || + (di->product = strdup(rawname)) == NULL) + goto fail; + di->vendor_id = devinfo.vendor; + di->product_id = devinfo.product; + } else { + if ((di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(udi.udi_vendor)) == NULL || + (di->product = strdup(udi.udi_product)) == NULL) + goto fail; + di->vendor_id = (int16_t)udi.udi_vendorNo; + di->product_id = (int16_t)udi.udi_productNo; + } + + ok = 0; +fail: + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); + + if (ok < 0) { + free(di->path); + free(di->manufacturer); + free(di->product); + explicit_bzero(di, sizeof(*di)); + } + + return (ok); +} +#endif /* USE_HIDRAW */ + static int -copy_info(fido_dev_info_t *di, const char *path) +copy_info_uhid(fido_dev_info_t *di, const char *path) { int fd = -1; int ok = -1; @@ -81,14 +137,13 @@ copy_info(fido_dev_info_t *di, const char *path) (di->manufacturer = strdup(udi.udi_vendor)) == NULL || (di->product = strdup(udi.udi_product)) == NULL) goto fail; - di->vendor_id = (int16_t)udi.udi_vendorNo; di->product_id = (int16_t)udi.udi_productNo; ok = 0; fail: - if (fd != -1) - close(fd); + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); if (ok < 0) { free(di->path); @@ -106,17 +161,35 @@ fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) char path[64]; size_t i; - *olen = 0; - if (ilen == 0) return (FIDO_OK); /* nothing to do */ if (devlist == NULL || olen == NULL) return (FIDO_ERR_INVALID_ARGUMENT); - for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) { + *olen = 0; + +#ifdef USE_HIDRAW + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { + snprintf(path, sizeof(path), "/dev/hidraw%zu", i); + if (copy_info_hidraw(&devlist[*olen], path) == 0) { + devlist[*olen].io = (fido_dev_io_t) { + fido_hid_open, + fido_hid_close, + fido_hid_read, + fido_hid_write, + }; + ++(*olen); + } + } + /* hidraw(4) is preferred over uhid(4) */ + if (*olen != 0) + return (FIDO_OK); +#endif /* USE_HIDRAW */ + + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { snprintf(path, sizeof(path), "/dev/uhid%zu", i); - if (copy_info(&devlist[*olen], path) == 0) { + if (copy_info_uhid(&devlist[*olen], path) == 0) { devlist[*olen].io = (fido_dev_io_t) { fido_hid_open, fido_hid_close, @@ -153,6 +226,10 @@ fido_hid_open(const char *path) ugd.ugd_data = buf; ugd.ugd_maxlen = sizeof(buf); + /* + * N.B. if ctx->fd is an hidraw(4) device, the ioctl() below puts it in + * uhid(4) compat mode, which we need to keep fido_hid_write() as-is. + */ if ((r = ioctl(ctx->fd, IOCTL_REQ(USB_GET_REPORT_DESC), &ugd) == -1) || ugd.ugd_actlen > sizeof(buf) || fido_hid_get_report_len(ugd.ugd_data, ugd.ugd_actlen, From nobody Fri Sep 22 11:07: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 4RsTy001Cvz4tj9Y; Fri, 22 Sep 2023 11:07: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 4RsTxz6YdGz4v2R; Fri, 22 Sep 2023 11:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+fLZuThHsIb064v0pi/JV5gs+e6ea3rffVr9ylb9/6o=; b=t2lngHxWOVZWDIgh6bkgeolSYfykiXa2obZCWws941TNdl+PYWVdt2JBlus0YgY1pSxv2k t8VxuBB4Ev+6SQnZXo/Xqol8Nu0vIw2ENlSoCQuju2zTq3dr2gO1TAndrYZsw4kzHBO65e 83Cio38WqyUn+exBspy9Ze3uNAN6AmviOKTwAP/70+2/PtDh2aH8ZCE++Px4zlOie8UPZv TannEgI9BJvflG1EqZkbtzfg+iydfbWUtKBZimzCY1eFyt1h9ib2H0dD/k0Eu3pcJlPi0k ouli+PraxQZy2L+NchfucQDqLxP9Kpo+Az3IlMW0GBqaQp0DbF2r5d3pn82LGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695380855; a=rsa-sha256; cv=none; b=ZoXMqa3/hU0zryTA5Qn4i2P+kgBngmxcpmt16xNcXD/Zt9/F/dFvIwCcgTaKREGdlZwdIT Bm2lCo+SBYNO3+rfl6808u/uhV4XX1roKuUkWj2XBitvRnOcZUDgILvrdtv9TgTpeQ8NRL 60f/Jb37cRe6m4FkZ1g03wr14IL5dSxOUyai76QgXvqMoH0Ha9aa7AfXqcRMbQLl6icqsO lREquUbyWtkERqwG+ug4r/gCPVEl+YwXwCP8WSYYjWV4Edr6jXudH6xWnlOHBjS9NPSs8B n8AGQfrcyLUh/HRDqu+COTzRGWO+i5RLGe93Ne7sRMQaaEv3E6vySJxHaXRSwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695380855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+fLZuThHsIb064v0pi/JV5gs+e6ea3rffVr9ylb9/6o=; b=Fb0hPDaWy3j1oYI763msoBm1UiKyccrh0VRsZdy3VBchZ5k9qzYKGEqzKGUuA4EnPm6XX/ uXmoSjRugv8ORhH5ueOKvcpghBZUoeHn0GvuryXCMBf1BRt8HlXdgwG2SRWVqL30fIZW5k rHkWeRnx1JBZTPd+oCtpKV6Ma17XCqJRUs7hQxuBLkoSKfasq8sySptUDU/LP8i1sIOAUv cki7SoOmzvmIo47JijWN9hLiWJF4R4Nk4wAz1A5EVJ3LdSHveLkGEjk5YS8SZGllwn4X1n c5cqFQuMptOSdXHd4MUhkxJrQc8olPAC23le2+CTWu5fi/YUt1Hip1jlwCffrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsTxz5MLXz4Qv; Fri, 22 Sep 2023 11:07: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 38MB7Za0066032; Fri, 22 Sep 2023 11:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MB7ZfB066029; Fri, 22 Sep 2023 11:07:35 GMT (envelope-from git) Date: Fri, 22 Sep 2023 11:07:35 GMT Message-Id: <202309221107.38MB7ZfB066029@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: d79e0d1735e3 - stable/13 - libfido2: update to 1.13.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d79e0d1735e3e68aee782cc676dea99c71cdbbfb Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d79e0d1735e3e68aee782cc676dea99c71cdbbfb commit d79e0d1735e3e68aee782cc676dea99c71cdbbfb Author: Ed Maste AuthorDate: 2023-09-19 17:06:12 +0000 Commit: Ed Maste CommitDate: 2023-09-22 11:07:25 +0000 libfido2: update to 1.13.0 Some highlights from NEWS entries: ** Improved OpenSSL 3.0 compatibility. ** Support for hidraw(4) on FreeBSD; gh#597. ** Improved support for FIDO 2.1 authenticators. PR: 273596 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e) (cherry picked from commit 5bfbde817cdedbd7309c38a361cd1211bdcdd70e) --- contrib/libfido2/CMakeLists.txt | 142 ++++++-- contrib/libfido2/LICENSE | 4 +- contrib/libfido2/NEWS | 41 +++ contrib/libfido2/README.adoc | 114 +++++-- contrib/libfido2/examples/CMakeLists.txt | 12 +- contrib/libfido2/examples/README.adoc | 17 +- contrib/libfido2/examples/assert.c | 33 +- contrib/libfido2/examples/cred.c | 29 +- contrib/libfido2/examples/extern.h | 8 +- contrib/libfido2/examples/info.c | 101 +++++- contrib/libfido2/examples/manifest.c | 1 + contrib/libfido2/examples/reset.c | 1 + contrib/libfido2/examples/retries.c | 3 +- contrib/libfido2/examples/select.c | 5 +- contrib/libfido2/examples/setpin.c | 3 +- contrib/libfido2/examples/util.c | 65 +++- contrib/libfido2/fuzz/CMakeLists.txt | 55 ++- contrib/libfido2/fuzz/Dockerfile | 22 +- contrib/libfido2/fuzz/Makefile | 35 +- contrib/libfido2/fuzz/README | 22 +- contrib/libfido2/fuzz/build-coverage | 7 +- contrib/libfido2/fuzz/clock.c | 1 + contrib/libfido2/fuzz/dummy.h | 5 +- contrib/libfido2/fuzz/export.gnu | 32 +- contrib/libfido2/fuzz/functions.txt | 404 ++++++++++++++--------- contrib/libfido2/fuzz/fuzz_assert.c | 43 ++- contrib/libfido2/fuzz/fuzz_bio.c | 5 +- contrib/libfido2/fuzz/fuzz_cred.c | 10 +- contrib/libfido2/fuzz/fuzz_credman.c | 5 +- contrib/libfido2/fuzz/fuzz_hid.c | 5 +- contrib/libfido2/fuzz/fuzz_largeblob.c | 5 +- contrib/libfido2/fuzz/fuzz_mgmt.c | 34 +- contrib/libfido2/fuzz/fuzz_netlink.c | 5 +- contrib/libfido2/fuzz/fuzz_pcsc.c | 269 +++++++++++++++ contrib/libfido2/fuzz/libfuzzer.c | 61 +++- contrib/libfido2/fuzz/mutator_aux.c | 21 +- contrib/libfido2/fuzz/mutator_aux.h | 22 +- contrib/libfido2/fuzz/pcsc.c | 153 +++++++++ contrib/libfido2/fuzz/preload-fuzz.c | 1 + contrib/libfido2/fuzz/preload-snoop.c | 1 + contrib/libfido2/fuzz/report.tgz | Bin 323706 -> 357005 bytes contrib/libfido2/fuzz/summary.txt | 77 +++-- contrib/libfido2/fuzz/udev.c | 3 +- contrib/libfido2/fuzz/wiredata_fido2.h | 77 ++++- contrib/libfido2/fuzz/wiredata_u2f.h | 1 + contrib/libfido2/fuzz/wrap.c | 67 +++- contrib/libfido2/fuzz/wrapped.sym | 10 + contrib/libfido2/man/CMakeLists.txt | 53 ++- contrib/libfido2/man/check.sh | 1 + contrib/libfido2/man/eddsa_pk_new.3 | 32 +- contrib/libfido2/man/es256_pk_new.3 | 32 +- contrib/libfido2/man/es384_pk_new.3 | 164 +++++++++ contrib/libfido2/man/fido2-assert.1 | 27 +- contrib/libfido2/man/fido2-cred.1 | 27 +- contrib/libfido2/man/fido2-token.1 | 51 ++- contrib/libfido2/man/fido_assert_allow_cred.3 | 45 ++- contrib/libfido2/man/fido_assert_new.3 | 37 ++- contrib/libfido2/man/fido_assert_set_authdata.3 | 33 +- contrib/libfido2/man/fido_assert_verify.3 | 33 +- contrib/libfido2/man/fido_bio_dev_get_info.3 | 27 +- contrib/libfido2/man/fido_bio_enroll_new.3 | 27 +- contrib/libfido2/man/fido_bio_info_new.3 | 27 +- contrib/libfido2/man/fido_bio_template.3 | 27 +- contrib/libfido2/man/fido_cbor_info_new.3 | 169 +++++++++- contrib/libfido2/man/fido_cred_exclude.3 | 45 ++- contrib/libfido2/man/fido_cred_new.3 | 29 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 46 ++- contrib/libfido2/man/fido_cred_verify.3 | 27 +- contrib/libfido2/man/fido_credman_metadata_new.3 | 27 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 38 ++- contrib/libfido2/man/fido_dev_get_assert.3 | 27 +- contrib/libfido2/man/fido_dev_get_touch_begin.3 | 27 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 31 +- contrib/libfido2/man/fido_dev_largeblob_get.3 | 34 +- contrib/libfido2/man/fido_dev_make_cred.3 | 27 +- contrib/libfido2/man/fido_dev_open.3 | 27 +- contrib/libfido2/man/fido_dev_set_io_functions.3 | 27 +- contrib/libfido2/man/fido_dev_set_pin.3 | 29 +- contrib/libfido2/man/fido_init.3 | 27 +- contrib/libfido2/man/fido_strerr.3 | 27 +- contrib/libfido2/man/rs256_pk_new.3 | 32 +- contrib/libfido2/openbsd-compat/bsd-asprintf.c | 88 +++++ contrib/libfido2/openbsd-compat/clock_gettime.c | 1 + contrib/libfido2/openbsd-compat/endian_win32.c | 1 + contrib/libfido2/openbsd-compat/openbsd-compat.h | 5 + contrib/libfido2/regress/CMakeLists.txt | 57 +++- contrib/libfido2/regress/assert.c | 14 +- contrib/libfido2/regress/compress.c | 268 +++++++++++++++ contrib/libfido2/regress/cred.c | 15 +- contrib/libfido2/regress/dev.c | 43 ++- contrib/libfido2/regress/eddsa.c | 159 +++++++++ contrib/libfido2/regress/es256.c | 199 +++++++++++ contrib/libfido2/regress/es384.c | 213 ++++++++++++ contrib/libfido2/regress/rs256.c | 201 +++++++++++ contrib/libfido2/src/CMakeLists.txt | 31 +- contrib/libfido2/src/aes256.c | 1 + contrib/libfido2/src/assert.c | 206 ++++++++---- contrib/libfido2/src/authkey.c | 26 +- contrib/libfido2/src/bio.c | 116 ++++--- contrib/libfido2/src/blob.c | 1 + contrib/libfido2/src/blob.h | 1 + contrib/libfido2/src/buf.c | 1 + contrib/libfido2/src/cbor.c | 52 ++- contrib/libfido2/src/compress.c | 145 +++++++- contrib/libfido2/src/config.c | 28 +- contrib/libfido2/src/cred.c | 45 ++- contrib/libfido2/src/credman.c | 162 +++++---- contrib/libfido2/src/dev.c | 229 +++---------- contrib/libfido2/src/diff_exports.sh | 1 + contrib/libfido2/src/ecdh.c | 1 + contrib/libfido2/src/eddsa.c | 14 +- contrib/libfido2/src/err.c | 1 + contrib/libfido2/src/es256.c | 66 ++-- contrib/libfido2/src/es384.c | 296 +++++++++++++++++ contrib/libfido2/src/export.gnu | 22 +- contrib/libfido2/src/export.llvm | 22 +- contrib/libfido2/src/export.msvc | 22 +- contrib/libfido2/src/extern.h | 30 +- contrib/libfido2/src/fallthrough.h | 21 ++ contrib/libfido2/src/fido.h | 46 ++- contrib/libfido2/src/fido/bio.h | 26 +- contrib/libfido2/src/fido/config.h | 26 +- contrib/libfido2/src/fido/credman.h | 26 +- contrib/libfido2/src/fido/eddsa.h | 28 +- contrib/libfido2/src/fido/err.h | 26 +- contrib/libfido2/src/fido/es256.h | 26 +- contrib/libfido2/src/fido/es384.h | 59 ++++ contrib/libfido2/src/fido/param.h | 57 +++- contrib/libfido2/src/fido/rs256.h | 26 +- contrib/libfido2/src/fido/types.h | 78 ++++- contrib/libfido2/src/hid.c | 1 + contrib/libfido2/src/hid_freebsd.c | 1 + contrib/libfido2/src/hid_hidapi.c | 13 +- contrib/libfido2/src/hid_linux.c | 50 ++- contrib/libfido2/src/hid_netbsd.c | 1 + contrib/libfido2/src/hid_openbsd.c | 101 +++--- contrib/libfido2/src/hid_osx.c | 26 +- contrib/libfido2/src/hid_unix.c | 1 + contrib/libfido2/src/hid_win.c | 5 +- contrib/libfido2/src/info.c | 171 +++++++++- contrib/libfido2/src/io.c | 26 +- contrib/libfido2/src/iso7816.c | 1 + contrib/libfido2/src/iso7816.h | 1 + contrib/libfido2/src/largeblob.c | 34 +- contrib/libfido2/src/log.c | 1 + contrib/libfido2/src/netlink.c | 1 + contrib/libfido2/src/netlink.h | 1 + contrib/libfido2/src/nfc.c | 350 ++++++++++++++++++++ contrib/libfido2/src/nfc_linux.c | 387 +++------------------- contrib/libfido2/src/packed.h | 1 + contrib/libfido2/src/pcsc.c | 394 ++++++++++++++++++++++ contrib/libfido2/src/pin.c | 77 +++-- contrib/libfido2/src/random.c | 1 + contrib/libfido2/src/reset.c | 1 + contrib/libfido2/src/rs1.c | 3 +- contrib/libfido2/src/rs256.c | 29 +- contrib/libfido2/src/time.c | 1 + contrib/libfido2/src/touch.c | 109 ++++++ contrib/libfido2/src/tpm.c | 3 +- contrib/libfido2/src/types.c | 17 +- contrib/libfido2/src/u2f.c | 93 ++++-- contrib/libfido2/src/util.c | 31 ++ contrib/libfido2/src/webauthn.h | 75 ++++- contrib/libfido2/src/winhello.c | 122 +++++-- contrib/libfido2/tools/CMakeLists.txt | 12 +- contrib/libfido2/tools/assert_get.c | 7 +- contrib/libfido2/tools/assert_verify.c | 30 +- contrib/libfido2/tools/base64.c | 1 + contrib/libfido2/tools/bio.c | 1 + contrib/libfido2/tools/config.c | 1 + contrib/libfido2/tools/cred_make.c | 7 +- contrib/libfido2/tools/cred_verify.c | 1 + contrib/libfido2/tools/credman.c | 1 + contrib/libfido2/tools/extern.h | 4 +- contrib/libfido2/tools/fido2-assert.c | 1 + contrib/libfido2/tools/fido2-attach.sh | 1 + contrib/libfido2/tools/fido2-cred.c | 1 + contrib/libfido2/tools/fido2-detach.sh | 1 + contrib/libfido2/tools/fido2-token.c | 1 + contrib/libfido2/tools/fido2-unprot.sh | 1 + contrib/libfido2/tools/include_check.sh | 1 + contrib/libfido2/tools/largeblob.c | 59 +++- contrib/libfido2/tools/pin.c | 26 +- contrib/libfido2/tools/test.sh | 46 +-- contrib/libfido2/tools/token.c | 159 ++++++++- contrib/libfido2/tools/util.c | 70 +++- contrib/libfido2/udev/70-u2f.rules | 39 ++- contrib/libfido2/udev/CMakeLists.txt | 1 + contrib/libfido2/udev/check.sh | 1 + contrib/libfido2/udev/fidodevs | 3 + contrib/libfido2/udev/genrules.awk | 32 +- contrib/libfido2/windows/build.ps1 | 32 +- contrib/libfido2/windows/const.ps1 | 14 +- contrib/libfido2/windows/cygwin.ps1 | 2 + contrib/libfido2/windows/release.ps1 | 30 +- lib/libfido2/Makefile | 6 +- 196 files changed, 7592 insertions(+), 1733 deletions(-) diff --git a/contrib/libfido2/CMakeLists.txt b/contrib/libfido2/CMakeLists.txt index 11a51ac5a645..6fa341a01cc6 100644 --- a/contrib/libfido2/CMakeLists.txt +++ b/contrib/libfido2/CMakeLists.txt @@ -1,6 +1,7 @@ -# Copyright (c) 2018-2021 Yubico AB. All rights reserved. +# Copyright (c) 2018-2022 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause # detect AppleClang; needs to come before project() cmake_policy(SET CMP0025 NEW) @@ -28,18 +29,19 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_COLOR_MAKEFILE OFF) set(CMAKE_VERBOSE_MAKEFILE ON) set(FIDO_MAJOR "1") -set(FIDO_MINOR "10") +set(FIDO_MINOR "13") set(FIDO_PATCH "0") set(FIDO_VERSION ${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}) +option(BUILD_TESTS "Build the regress tests" ON) option(BUILD_EXAMPLES "Build example programs" ON) option(BUILD_MANPAGES "Build man pages" ON) -option(BUILD_SHARED_LIBS "Build the shared library" ON) -option(BUILD_STATIC_LIBS "Build the static library" ON) +option(BUILD_SHARED_LIBS "Build a shared library" ON) +option(BUILD_STATIC_LIBS "Build a static library" ON) option(BUILD_TOOLS "Build tool programs" ON) option(FUZZ "Enable fuzzing instrumentation" OFF) -option(LIBFUZZER "Build libfuzzer harnesses" OFF) option(USE_HIDAPI "Use hidapi as the HID backend" OFF) +option(USE_PCSC "Enable experimental PCSC support" OFF) option(USE_WINHELLO "Abstract Windows Hello as a FIDO device" ON) option(NFC_LINUX "Enable NFC support on Linux" ON) @@ -47,6 +49,14 @@ add_definitions(-D_FIDO_MAJOR=${FIDO_MAJOR}) add_definitions(-D_FIDO_MINOR=${FIDO_MINOR}) add_definitions(-D_FIDO_PATCH=${FIDO_PATCH}) +if(BUILD_SHARED_LIBS) + set(_FIDO2_LIBRARY fido2_shared) +elseif(BUILD_STATIC_LIBS) + set(_FIDO2_LIBRARY fido2) +else() + message(FATAL_ERROR "Nothing to build (BUILD_*_LIBS=OFF)") +endif() + if(CYGWIN OR MSYS OR MINGW) set(WIN32 1) endif() @@ -66,7 +76,7 @@ if(NOT MSVC) if(APPLE) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DARWIN_C_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D__STDC_WANT_LIB_EXT1__=1") - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR MINGW OR CYGWIN) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_GNU_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DEFAULT_SOURCE") elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR @@ -91,6 +101,7 @@ check_include_files(sys/random.h HAVE_SYS_RANDOM_H) check_include_files(unistd.h HAVE_UNISTD_H) check_symbol_exists(arc4random_buf stdlib.h HAVE_ARC4RANDOM_BUF) +check_symbol_exists(asprintf stdio.h HAVE_ASPRINTF) check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) check_symbol_exists(explicit_bzero string.h HAVE_EXPLICIT_BZERO) check_symbol_exists(freezero stdlib.h HAVE_FREEZERO) @@ -116,6 +127,7 @@ try_compile(HAVE_POSIX_IOCTL list(APPEND CHECK_VARIABLES HAVE_ARC4RANDOM_BUF + HAVE_ASPRINTF HAVE_CBOR_H HAVE_CLOCK_GETTIME HAVE_ENDIAN_H @@ -147,7 +159,7 @@ foreach(v ${CHECK_VARIABLES}) endif() endforeach() -if(HAVE_EXPLICIT_BZERO AND NOT LIBFUZZER) +if(HAVE_EXPLICIT_BZERO AND NOT FUZZ) add_definitions(-DHAVE_EXPLICIT_BZERO) endif() @@ -155,19 +167,30 @@ if(UNIX) add_definitions(-DHAVE_DEV_URANDOM) endif() + if(MSVC) if((NOT CBOR_INCLUDE_DIRS) OR (NOT CBOR_LIBRARY_DIRS) OR - (NOT CBOR_BIN_DIRS) OR (NOT CRYPTO_INCLUDE_DIRS) OR - (NOT CRYPTO_LIBRARY_DIRS) OR (NOT CRYPTO_BIN_DIRS) OR - (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS) OR - (NOT ZLIB_BIN_DIRS)) + (NOT CRYPTO_INCLUDE_DIRS) OR (NOT CRYPTO_LIBRARY_DIRS) OR + (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS)) message(FATAL_ERROR "please define " - "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY,BIN}_DIRS when " + "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY}_DIRS when " "building under msvc") endif() - set(CBOR_LIBRARIES cbor) - set(ZLIB_LIBRARIES zlib) - set(CRYPTO_LIBRARIES crypto-47) + if(BUILD_TESTS AND BUILD_SHARED_LIBS AND + ((NOT CBOR_BIN_DIRS) OR (NOT ZLIB_BIN_DIRS) OR (NOT CRYPTO_BIN_DIRS))) + message(FATAL_ERROR "please define {CBOR,CRYPTO,ZLIB}_BIN_DIRS " + "when building tests") + endif() + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES cbor) + endif() + if(NOT ZLIB_LIBRARIES) + set(ZLIB_LIBRARIES zlib1) + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES crypto) + endif() + set(MSVC_DISABLED_WARNINGS_LIST "C4152" # nonstandard extension used: function/data pointer # conversion in expression; @@ -209,8 +232,12 @@ else() message(FATAL_ERROR "could not find zlib") endif() - set(CBOR_LIBRARIES "cbor") - set(CRYPTO_LIBRARIES "crypto") + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES "cbor") + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES "crypto") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") pkg_search_module(UDEV libudev REQUIRED) @@ -237,6 +264,17 @@ else() add_compile_options(-Wno-unused-parameter) endif() + if(FUZZ) + set(USE_PCSC ON) + add_definitions(-DFIDO_FUZZ) + endif() + + # If building with PCSC, look for pcsc-lite. + if(USE_PCSC AND NOT (APPLE OR CYGWIN OR MSYS OR MINGW)) + pkg_search_module(PCSC libpcsclite REQUIRED) + set(PCSC_LIBRARIES pcsclite) + endif() + if(USE_HIDAPI) add_definitions(-DUSE_HIDAPI) pkg_search_module(HIDAPI hidapi${HIDAPI_SUFFIX} REQUIRED) @@ -244,7 +282,7 @@ else() endif() if(NFC_LINUX) - add_definitions(-DNFC_LINUX) + add_definitions(-DUSE_NFC) endif() if(WIN32) @@ -263,16 +301,21 @@ else() add_compile_options(-Wwrite-strings) add_compile_options(-Wmissing-prototypes) add_compile_options(-Wbad-function-cast) + add_compile_options(-Wimplicit-fallthrough) add_compile_options(-pedantic) add_compile_options(-pedantic-errors) + set(EXTRA_CFLAGS "-Wconversion -Wsign-conversion") + if(WIN32) add_compile_options(-Wno-type-limits) add_compile_options(-Wno-cast-function-type) endif() + if(HAVE_SHORTEN_64_TO_32) add_compile_options(-Wshorten-64-to-32) endif() + if(HAVE_STACK_PROTECTOR_ALL) add_compile_options(-fstack-protector-all) endif() @@ -285,12 +328,8 @@ else() add_definitions(-DOPENSSL_API_COMPAT=0x10100000L) endif() - if(FUZZ) - add_definitions(-DFIDO_FUZZ) - endif() - - if(LIBFUZZER) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=fuzzer-no-link") + if(NOT FUZZ) + set(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wframe-larger-than=2047") endif() endif() @@ -309,6 +348,10 @@ elseif(WIN32) endif() add_definitions(-DTLS=${TLS}) +if(USE_PCSC) + add_definitions(-DUSE_PCSC) +endif() + # export list if(APPLE AND (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) @@ -345,16 +388,18 @@ else() " /def:\"${CMAKE_CURRENT_SOURCE_DIR}/src/export.msvc\"") endif() -include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${CBOR_INCLUDE_DIRS}) include_directories(${CRYPTO_INCLUDE_DIRS}) include_directories(${HIDAPI_INCLUDE_DIRS}) +include_directories(${PCSC_INCLUDE_DIRS}) include_directories(${UDEV_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS}) link_directories(${CBOR_LIBRARY_DIRS}) link_directories(${CRYPTO_LIBRARY_DIRS}) link_directories(${HIDAPI_LIBRARY_DIRS}) +link_directories(${PCSC_LIBRARY_DIRS}) link_directories(${UDEV_LIBRARY_DIRS}) link_directories(${ZLIB_LIBRARY_DIRS}) @@ -367,24 +412,41 @@ message(STATUS "BUILD_TOOLS: ${BUILD_TOOLS}") message(STATUS "CBOR_INCLUDE_DIRS: ${CBOR_INCLUDE_DIRS}") message(STATUS "CBOR_LIBRARIES: ${CBOR_LIBRARIES}") message(STATUS "CBOR_LIBRARY_DIRS: ${CBOR_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CBOR_BIN_DIRS: ${CBOR_BIN_DIRS}") +endif() message(STATUS "CBOR_VERSION: ${CBOR_VERSION}") message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") message(STATUS "CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}") message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") +message(STATUS "CMAKE_CROSSCOMPILING: ${CMAKE_CROSSCOMPILING}") +message(STATUS "CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}") +message(STATUS "CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}") +message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: ${CMAKE_HOST_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}") message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") message(STATUS "CRYPTO_INCLUDE_DIRS: ${CRYPTO_INCLUDE_DIRS}") message(STATUS "CRYPTO_LIBRARIES: ${CRYPTO_LIBRARIES}") message(STATUS "CRYPTO_LIBRARY_DIRS: ${CRYPTO_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CRYPTO_BIN_DIRS: ${CRYPTO_BIN_DIRS}") +endif() message(STATUS "CRYPTO_VERSION: ${CRYPTO_VERSION}") message(STATUS "FIDO_VERSION: ${FIDO_VERSION}") message(STATUS "FUZZ: ${FUZZ}") +if(FUZZ) + message(STATUS "FUZZ_LDFLAGS: ${FUZZ_LDFLAGS}") +endif() message(STATUS "ZLIB_INCLUDE_DIRS: ${ZLIB_INCLUDE_DIRS}") message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}") message(STATUS "ZLIB_LIBRARY_DIRS: ${ZLIB_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "ZLIB_BIN_DIRS: ${ZLIB_BIN_DIRS}") +endif() message(STATUS "ZLIB_VERSION: ${ZLIB_VERSION}") if(USE_HIDAPI) message(STATUS "HIDAPI_INCLUDE_DIRS: ${HIDAPI_INCLUDE_DIRS}") @@ -392,7 +454,10 @@ if(USE_HIDAPI) message(STATUS "HIDAPI_LIBRARY_DIRS: ${HIDAPI_LIBRARY_DIRS}") message(STATUS "HIDAPI_VERSION: ${HIDAPI_VERSION}") endif() -message(STATUS "LIBFUZZER: ${LIBFUZZER}") +message(STATUS "PCSC_INCLUDE_DIRS: ${PCSC_INCLUDE_DIRS}") +message(STATUS "PCSC_LIBRARIES: ${PCSC_LIBRARIES}") +message(STATUS "PCSC_LIBRARY_DIRS: ${PCSC_LIBRARY_DIRS}") +message(STATUS "PCSC_VERSION: ${PCSC_VERSION}") message(STATUS "TLS: ${TLS}") message(STATUS "UDEV_INCLUDE_DIRS: ${UDEV_INCLUDE_DIRS}") message(STATUS "UDEV_LIBRARIES: ${UDEV_LIBRARIES}") @@ -400,29 +465,34 @@ message(STATUS "UDEV_LIBRARY_DIRS: ${UDEV_LIBRARY_DIRS}") message(STATUS "UDEV_RULES_DIR: ${UDEV_RULES_DIR}") message(STATUS "UDEV_VERSION: ${UDEV_VERSION}") message(STATUS "USE_HIDAPI: ${USE_HIDAPI}") +message(STATUS "USE_PCSC: ${USE_PCSC}") message(STATUS "USE_WINHELLO: ${USE_WINHELLO}") message(STATUS "NFC_LINUX: ${NFC_LINUX}") -subdirs(src) +if(BUILD_TESTS) + enable_testing() +endif() + +add_subdirectory(src) + +if(BUILD_TESTS) + add_subdirectory(regress) +endif() if(BUILD_EXAMPLES) - subdirs(examples) + add_subdirectory(examples) endif() if(BUILD_TOOLS) - subdirs(tools) + add_subdirectory(tools) endif() if(BUILD_MANPAGES) - subdirs(man) + add_subdirectory(man) endif() if(NOT WIN32) - if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FUZZ) - enable_testing() - subdirs(regress) - endif() if(FUZZ) - subdirs(fuzz) + add_subdirectory(fuzz) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - subdirs(udev) + add_subdirectory(udev) endif() endif() diff --git a/contrib/libfido2/LICENSE b/contrib/libfido2/LICENSE index 75a03f87e3af..ad0e13358930 100644 --- a/contrib/libfido2/LICENSE +++ b/contrib/libfido2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2022 Yubico AB. All rights reserved. +Copyright (c) 2018-2023 Yubico AB. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -22,3 +22,5 @@ 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. + +SPDX-License-Identifier: BSD-2-Clause diff --git a/contrib/libfido2/NEWS b/contrib/libfido2/NEWS index a48b685156c1..bf648aabfd92 100644 --- a/contrib/libfido2/NEWS +++ b/contrib/libfido2/NEWS @@ -1,3 +1,44 @@ +* Version 1.13.0 (2023-02-20) + ** Support for linking against OpenSSL on Windows; gh#668. + ** New API calls: + - fido_assert_empty_allow_list; + - fido_cred_empty_exclude_list. + ** fido2-token: fix issue when listing large blobs. + ** Improved support for different fuzzing engines. + +* Version 1.12.0 (2022-09-22) + ** Support for COSE_ES384. + ** Support for hidraw(4) on FreeBSD; gh#597. + ** Improved support for FIDO 2.1 authenticators. + ** New API calls: + - es384_pk_free; + - es384_pk_from_EC_KEY; + - es384_pk_from_EVP_PKEY; + - es384_pk_from_ptr; + - es384_pk_new; + - es384_pk_to_EVP_PKEY; + - fido_cbor_info_certs_len; + - fido_cbor_info_certs_name_ptr; + - fido_cbor_info_certs_value_ptr; + - fido_cbor_info_maxrpid_minpinlen; + - fido_cbor_info_minpinlen; + - fido_cbor_info_new_pin_required; + - fido_cbor_info_rk_remaining; + - fido_cbor_info_uv_attempts; + - fido_cbor_info_uv_modality. + ** Documentation and reliability fixes. + +* Version 1.11.0 (2022-05-03) + ** Experimental PCSC support; enable with -DUSE_PCSC. + ** Improved OpenSSL 3.0 compatibility. + ** Use RFC1951 raw deflate to compress CTAP 2.1 largeBlobs. + ** winhello: advertise "uv" instead of "clientPin". + ** winhello: support hmac-secret in fido_dev_get_assert(). + ** New API calls: + - fido_cbor_info_maxlargeblob. + ** Documentation and reliability fixes. + ** Separate build and regress targets. + * Version 1.10.0 (2022-01-17) ** hid_osx: handle devices with paths > 511 bytes; gh#462. ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*(); gh#480. diff --git a/contrib/libfido2/README.adoc b/contrib/libfido2/README.adoc index 114cc5eed762..44d559894dac 100644 --- a/contrib/libfido2/README.adoc +++ b/contrib/libfido2/README.adoc @@ -7,7 +7,7 @@ image:https://github.com/yubico/libfido2/workflows/fuzzer/badge.svg["Fuzz Status image:https://oss-fuzz-build-logs.storage.googleapis.com/badges/libfido2.svg["Fuzz Status (oss-fuzz)", link="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libfido2"] *libfido2* provides library functionality and command-line tools to -communicate with a FIDO device over USB, and to verify attestation and +communicate with a FIDO device over USB or NFC, and to verify attestation and assertion signatures. *libfido2* supports the FIDO U2F (CTAP 1) and FIDO2 (CTAP 2) protocols. @@ -23,8 +23,6 @@ file for the full license text. *libfido2* is known to work on Linux, macOS, Windows, OpenBSD, and FreeBSD. -NFC support is available on Linux and Windows. - === Documentation Documentation is available in troff and HTML formats. An @@ -38,19 +36,29 @@ is also available. * Perl: https://github.com/jacquesg/p5-FIDO-Raw[p5-FIDO-Raw] * Rust: https://github.com/PvdBerg1998/libfido2[libfido2] +=== Releases + +The current release of *libfido2* is 1.13.0. Signed release tarballs are +available at Yubico's +https://developers.yubico.com/libfido2/Releases[release page]. + +=== Dependencies + +*libfido2* depends on https://github.com/pjk/libcbor[libcbor], +https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. +On Linux, libudev +(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also +required. + === Installation -==== Releases +==== Fedora 35 and 34 -The current release of *libfido2* is 1.10.0. Please consult Yubico's -https://developers.yubico.com/libfido2/Releases[release page] for source -and binary releases. + $ sudo dnf install libfido2 libfido2-devel fido2-tools -==== Ubuntu 20.04 (Focal) +==== Ubuntu 22.04 (Jammy) and 20.04 (Focal) - $ sudo apt install libfido2-1 - $ sudo apt install libfido2-dev - $ sudo apt install libfido2-doc + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools Alternatively, newer versions of *libfido2* are available in Yubico's PPA. Follow the instructions for Ubuntu 18.04 (Bionic) below. @@ -60,13 +68,31 @@ Follow the instructions for Ubuntu 18.04 (Bionic) below. $ sudo apt install software-properties-common $ sudo apt-add-repository ppa:yubico/stable $ sudo apt update - $ sudo apt install libfido2-dev + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools + +On Linux, you may need to add a udev rule to be able to access the FIDO +device. For example, the udev rule may contain the following: + +---- +#udev rule for allowing HID access to Yubico devices for FIDO support. + +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ + MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" +---- ==== macOS $ brew install libfido2 -Or from source, on UNIX-like systems: +==== Windows + +Please consult Yubico's +https://developers.yubico.com/libfido2/Releases[release page] for ARM, ARM64, +Win32, and Win64 artefacts. + +=== Building from source + +On UNIX-like systems: $ cmake -B build $ make -C build @@ -74,23 +100,45 @@ Or from source, on UNIX-like systems: Depending on the platform, https://www.freedesktop.org/wiki/Software/pkg-config/[pkg-config] may need to -be installed, or the PKG_CONFIG_PATH environment variable set. - -*libfido2* depends on https://github.com/pjk/libcbor[libcbor], -https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. -On Linux, libudev -(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also -required. - -For complete, OS-specific installation instructions, please refer to the -`.actions/` (Linux, macOS) and `windows/` directories. - -On Linux, you will need to add a udev rule to be able to access the FIDO -device, or run as root. For example, the udev rule may contain the following: - ----- -#udev rule for allowing HID access to Yubico devices for FIDO support. - -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ - MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" ----- +be installed, or the PKG_CONFIG_PATH environment variable set. For complete, +OS-specific build instructions, please refer to the `.actions/` +(Linux, macOS, BSD) and `windows/` directories. + +=== Build-time Customisation + +*libfido2* supports a number of CMake options. Some of the options require +additional dependencies. Options that are disabled by default are not +officially supported. + +[%autowidth.stretch] +|=== +|*Option* |*Description* |*Default* +| BUILD_EXAMPLES | Build example programs | ON +| BUILD_MANPAGES | Build man pages | ON +| BUILD_SHARED_LIBS | Build a shared library | ON +| BUILD_STATIC_LIBS | Build a static library | ON +| BUILD_TOOLS | Build auxiliary tools | ON +| FUZZ | Enable fuzzing instrumentation | OFF +| NFC_LINUX | Enable netlink NFC support on Linux | ON +| USE_HIDAPI | Use hidapi as the HID backend | OFF +| USE_PCSC | Enable experimental PCSC support | OFF +| USE_WINHELLO | Abstract Windows Hello as a FIDO device | ON +|=== + +The USE_HIDAPI option requires https://github.com/libusb/hidapi[hidapi]. The +USE_PCSC option requires https://github.com/LudovicRousseau/PCSC[pcsc-lite] on +Linux. + +=== Development + +Please use https://github.com/Yubico/libfido2/discussions[GitHub Discussions] +to ask questions and suggest features, and +https://github.com/Yubico/libfido2/pulls[GitHub pull-requests] for code +contributions. + +=== Reporting bugs + +Please use https://github.com/Yubico/libfido2/issues[GitHub Issues] to report +bugs. To report security issues, please contact security@yubico.com. A PGP +public key can be found at +https://www.yubico.com/support/security-advisories/issue-rating-system/. diff --git a/contrib/libfido2/examples/CMakeLists.txt b/contrib/libfido2/examples/CMakeLists.txt index ad3d44faad6b..f013df4e71ec 100644 --- a/contrib/libfido2/examples/CMakeLists.txt +++ b/contrib/libfido2/examples/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright (c) 2018 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause list(APPEND COMPAT_SOURCES ../openbsd-compat/clock_gettime.c @@ -13,17 +14,6 @@ if(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MSYS) list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c) endif() -# set the library to link against -if(BUILD_STATIC_LIBS) - # drop -rdynamic - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") - set(_FIDO2_LIBRARY fido2) -elseif(BUILD_SHARED_LIBS) - set(_FIDO2_LIBRARY fido2_shared) -else() - set(_FIDO2_LIBRARY ${CRYPTO_LIBRARIES} fido2) -endif() - # enable -Wconversion -Wsign-conversion if(NOT MSVC) set_source_files_properties(assert.c cred.c info.c manifest.c reset.c diff --git a/contrib/libfido2/examples/README.adoc b/contrib/libfido2/examples/README.adoc index 44ee52743a0d..d44218c2cf87 100644 --- a/contrib/libfido2/examples/README.adoc +++ b/contrib/libfido2/examples/README.adoc @@ -20,8 +20,7 @@ The following definitions are used in the description below: - - The file system path of a file containing a NIST P-256 public key in - PEM format. + The file system path of a file containing a public key in PEM format. - @@ -48,8 +47,8 @@ The following examples are provided: Configures as the new PIN of . If [oldpin] is provided, the device's PIN is changed from [oldpin] to . -- cred [-t ecdsa|rsa|eddsa] [-k pubkey] [-ei cred_id] [-P pin] [-T seconds] - [-b blobkey] [-hruv] +- cred [-t es256|es384|rs256|eddsa] [-k pubkey] [-ei cred_id] [-P pin] + [-T seconds] [-b blobkey] [-hruv] Creates a new credential on and verify that the credential was signed by the authenticator. The device's attestation certificate @@ -66,14 +65,16 @@ The following examples are provided: option -b is specified, the credential's "largeBlob" key is stored in . -- assert [-t ecdsa|rsa|eddsa] [-a cred_id] [-h hmac_secret] [-s hmac_salt] - [-P pin] [-T seconds] [-b blobkey] [-puv] +- assert [-t es256|es384|rs256|eddsa] [-a cred_id] [-h hmac_secret] [-P pin] + [-s hmac_salt] [-T seconds] [-b blobkey] [-puv] Asks for a FIDO2 assertion corresponding to [cred_id], which may be omitted for resident keys. The obtained assertion is verified using . The -p option requests that the user - be present. User verification may be requested through the -v - option. If option -u is specified, the assertion is generated using + be present and checks whether the user presence bit was signed by the + authenticator. The -v option requests user verification and checks + whether the user verification bit was signed by the authenticator. + If option -u is specified, the assertion is generated using U2F (CTAP1) instead of FIDO2 (CTAP2) commands. If option -s is specified, a FIDO2 hmac-secret is requested from the authenticator, and the contents of are used as the salt. If option -h diff --git a/contrib/libfido2/examples/assert.c b/contrib/libfido2/examples/assert.c index 8b0dbd9f6eb2..32ba97b2fca3 100644 --- a/contrib/libfido2/examples/assert.c +++ b/contrib/libfido2/examples/assert.c @@ -1,11 +1,13 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include #include +#include #include #include @@ -30,9 +32,9 @@ static const unsigned char cd[32] = { static void usage(void) { - fprintf(stderr, "usage: assert [-t ecdsa|rsa|eddsa] [-a cred_id] " - "[-h hmac_secret] [-s hmac_salt] [-P pin] [-T seconds] " - "[-b blobkey] [-puv] \n"); + fprintf(stderr, "usage: assert [-t es256|es384|rs256|eddsa] " + "[-a cred_id] [-h hmac_secret] [-s hmac_salt] [-P pin] " + "[-T seconds] [-b blobkey] [-puv] \n"); exit(EXIT_FAILURE); } @@ -46,6 +48,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, RSA *rsa = NULL; EVP_PKEY *eddsa = NULL; es256_pk_t *es256_pk = NULL; + es384_pk_t *es384_pk = NULL; rs256_pk_t *rs256_pk = NULL; eddsa_pk_t *eddsa_pk = NULL; void *pk; @@ -67,6 +70,21 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, EC_KEY_free(ec); ec = NULL; + break; + case COSE_ES384: + if ((ec = read_ec_pubkey(key)) == NULL) + errx(1, "read_ec_pubkey"); + + if ((es384_pk = es384_pk_new()) == NULL) + errx(1, "es384_pk_new"); + + if (es384_pk_from_EC_KEY(es384_pk, ec) != FIDO_OK) + errx(1, "es384_pk_from_EC_KEY"); + + pk = es384_pk; + EC_KEY_free(ec); + ec = NULL; + break; case COSE_RS256: if ((rsa = read_rsa_pubkey(key)) == NULL) @@ -147,6 +165,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, errx(1, "fido_assert_verify: %s (0x%x)", fido_strerr(r), r); es256_pk_free(&es256_pk); + es384_pk_free(&es384_pk); rs256_pk_free(&rs256_pk); eddsa_pk_free(&eddsa_pk); @@ -219,9 +238,11 @@ main(int argc, char **argv) body = NULL; break; case 't': - if (strcmp(optarg, "ecdsa") == 0) + if (strcmp(optarg, "es256") == 0) type = COSE_ES256; - else if (strcmp(optarg, "rsa") == 0) + else if (strcmp(optarg, "es384") == 0) + type = COSE_ES384; + else if (strcmp(optarg, "rs256") == 0) type = COSE_RS256; else if (strcmp(optarg, "eddsa") == 0) type = COSE_EDDSA; diff --git a/contrib/libfido2/examples/cred.c b/contrib/libfido2/examples/cred.c index 4a9d8bf4b25a..576900d97786 100644 --- a/contrib/libfido2/examples/cred.c +++ b/contrib/libfido2/examples/cred.c @@ -1,7 +1,8 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include @@ -34,7 +35,7 @@ static const unsigned char user_id[32] = { static void usage(void) { - fprintf(stderr, "usage: cred [-t ecdsa|rsa|eddsa] [-k pubkey] " + fprintf(stderr, "usage: cred [-t es256|es384|rs256|eddsa] [-k pubkey] " "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-hruv] " "\n"); exit(EXIT_FAILURE); @@ -107,15 +108,23 @@ out: if (key_out != NULL) { /* extract the credential pubkey */ if (type == COSE_ES256) { - if (write_ec_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_es256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), fido_cred_pubkey_len(cred)) < 0) - errx(1, "write_ec_pubkey"); + errx(1, "write_es256_pubkey"); + } else if (type == COSE_ES384) { + if (write_es384_pubkey(key_out, + fido_cred_pubkey_ptr(cred), + fido_cred_pubkey_len(cred)) < 0) + errx(1, "write_es384_pubkey"); } else if (type == COSE_RS256) { - if (write_rsa_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_rs256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), fido_cred_pubkey_len(cred)) < 0) - errx(1, "write_rsa_pubkey"); + errx(1, "write_rs256_pubkey"); *** 14696 LINES SKIPPED *** From nobody Fri Sep 22 12:44: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 4RsX5K3KBKz4tqGD; Fri, 22 Sep 2023 12:44: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 4RsX5K2rmhz3Jsl; Fri, 22 Sep 2023 12:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VfJT2x5va5a8xbS/GhTh1QOnvO1puZbvtp6pLlYp7Ns=; b=WEOOoXB3BPwnQI1z7xP3hCNj9cAc66W6IslUwDljgHQrHJemK53LWCdPTt+y/gKjnOiJOA GpxTPt8gaiEbunCAgENa73qMLWPbKBCHLNEDzbIwxjjKe63xcAL4mKGiGHr+FDdwme4uIh 2zOs69kMT5NACOvo4Fe3ts9htUkSQlF8aw6mkoP9VUu34k6iBuAVROYXzLvzTIrJmxfwGP +mKkWbVn4Nycw8RhU0xvgZkzVWBlBpD8so+Lwup/uHzged8UQP0Q4wTlTYE9f4N2NPH1Fv E6cES1XW8fkL4wGkX3hrEHCOQjBwwoOgs86sceJYwLwrhHlbK5/cAWxPQWdjIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386645; a=rsa-sha256; cv=none; b=PloPguKhghUqLPzabwxFTjbGr8W+INdDvLg+M76RkY5hu08TsK6RphIJAoHdTfjSips7Io PEJY1plrWRXcJIbCujt4wTNBpp+AV1VwTvszZyTLF6gr1dCCsf+Jx8CrpHoE/6Px7wTY97 g9YFj5yPLoO6I6wXtCeYS5MMP3UTQIpmVBjnsaH8FseJPAMTQsgsBybjnhyFQPrqhLcmjY 4mrsZf2qKqOo+JCKeh7aScaihLyeJ2HMmaVXr4Jh3i8uTS1KdMnGBo1RcqF1R5rWU/v14Z 5ULvn28daGs1h8AsuYkCFE0TQPTYhR83bdansjTDjnIalGHzCWi6zPKlq3tiBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VfJT2x5va5a8xbS/GhTh1QOnvO1puZbvtp6pLlYp7Ns=; b=yAbtGaQoqnG6X0cO2UTN/PfnooL75BsDjWs7zWXFIj7H9oovzrzMdiAs3xSae4x/8hSHBu Tghy53eLin8OKYcfc1APXehDXrlKnT8fhdNNfBc3BVM/+ojzfvWrGNeErXe7Er0AiZo0E+ xhw2YkGOOhIJqTMEOrD7R8x7mNvk93aBKWwR9YPj1fTuxzqjvVy2nsgEcta0XOtgBIFots EMvWDWuOAben2kgHmAt/K//k4XuzLLCy5RtbZQeX1BbmAkFm9AnTy71pa7OwCVsGD2g15I 7aysTcmGIrKd24AjizsbvpBZM/Vfcwqv/UifU3mkcZU9W6Lcgld2XW7qQYXrUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5K1tMTz72h; Fri, 22 Sep 2023 12:44: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 38MCi5a5030586; Fri, 22 Sep 2023 12:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCi5B3030583; Fri, 22 Sep 2023 12:44:05 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:05 GMT Message-Id: <202309221244.38MCi5B3030583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1e33c914ca81 - stable/14 - bsdinstall.8: Document BSDINSTALL_SKIP_* variables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1e33c914ca81aa148491900396c0a666580df7ba Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e33c914ca81aa148491900396c0a666580df7ba commit 1e33c914ca81aa148491900396c0a666580df7ba Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:11:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 bsdinstall.8: Document BSDINSTALL_SKIP_* variables Fixes: 17f4ded55180 bsdinstall: add variables to allow skipping MFC after: 3 days (cherry picked from commit fea2cffb8659da1590401e04ce8cbf823c9da66c) --- usr.sbin/bsdinstall/bsdinstall.8 | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 44a577c8e430..215a0a28f8c9 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -323,6 +323,58 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_HARDENING +If not empty, the +.Cm auto +target +will not invoke the +.Cm hardening +target. +.It Ev BSDINSTALL_SKIP_HOSTNAME +If not empty, the +.Cm auto +target +will not invoke the +.Cm hostname +target. +.It Ev BSDINSTALL_SKIP_KEYMAP +If not empty, the +.Cm auto +target +will not invoke the +.Cm keymap +target. +.It Ev BSDINSTALL_SKIP_MANUAL +If not empty, the +.Cm auto +target will not offer to open a shell in the new system +for final manual modifications. +.It Ev BSDINSTALL_SKIP_SERVICES +If not empty, the +.Cm auto +target +will not invoke the +.Cm services +target. +.It Ev BSDINSTALL_SKIP_TIME +If not empty, the +.Cm auto +target +will not invoke the +.Cm time +target. +.It Ev BSDINSTALL_SKIP_USERS +If not empty, the +.Cm auto +target +will not invoke the +.Cm adduser +target. +.It Ev BSDINSTALL_SKIP_FINALCONFIG +If not empty, the +.Cm auto +target will not show the final configuration dialog, +where earlier configuration choices can be revisited. .It Ev BSDINSTALL_TMPETC Directory where files destined for the new system's .Pa /etc From nobody Fri Sep 22 12:44: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 4RsX5L4N13z4tpsj; Fri, 22 Sep 2023 12:44: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 4RsX5L3cfqz3JwX; Fri, 22 Sep 2023 12:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKdpjcRFYtCT5VOPD3BzSvS3TK1WfBcP1MONLD4toaI=; b=VkIyy5wHhfBKGJXDNioUrqjwn5onZFkKdzI7hQWXWZV36JrAqCRtAEmTcqPKZDmrl39jal aBYp8rwABeU6U3nY1j9kw3MXgtwiF95SvG3r5mVmePGj2tn+T0eh4TVzPcZLbPE7xuJlVJ +Or38HI0B0oEuV0uF1vHAyHDqZMTPqvNCkT1q6NEJvu1T+Fdekp6Z9Z/LOhv4+zKkIi7zf +MkjRKdzv9wWrgI2K5yec4TRQI7OE4iUkgQg6HJacn0AiB062Rs7hZ99b+US6bYCdQyZQW UW3+oLEffGhKAHmgdFjYoCoWqlmwQ9pJ9Tsq4v7EatL2Oioh52JwcyHA2qjHNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386646; a=rsa-sha256; cv=none; b=t90cBJ7FpuIIbeIqcQWYNF+GvIRkk0ojoX+4LyZUxLZkXenuOJ5GBD8RZ/lOb42E2vHv1D NnVDS/+Mca1rew8cvW7iPmBzF+aKx5dqUTc6a45FVCUJsrhr6QdCL58oq5hVnx8iSB1C8T v46jUsO5ghtp+fONrwiuQzSOV4eWq+inYQWB+8kGUIWLiz3SBb5xYaGdV+hN6Ny+NB3aZt ccJ6anY8+nmUkHSz+wnslygkp35KDOciortw6MqE4d/sjiAyW6IW9gJ6EzR9Oi/r/j4i2a UwxkevxhfnrDX/Mx0yj3MVipkAse8Np0BitQFs6DDIptf8D0OFHw37R5LUqt/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=1695386646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKdpjcRFYtCT5VOPD3BzSvS3TK1WfBcP1MONLD4toaI=; b=P2iQ/ayE0f0M/0a6Kfif0m8Eev3FqID4t5FcoblonIYSnIRpL6C8Z44Au3SNyKdS2lEkIh Cr9eu45EDzsJSP8ZDaoF9lVu6ksqpumlUTyMRzEagWw4tLF392DLcrme51YyPAHz703xPh V1UGby5cLmKzmipSII8stliPii4knBXUaAECMRMx+lvrGdEmwGftpStUcf/ZQp8hXwkaJJ DbK+avkFARoHESiVgsemPAWF2Eurof/gYuj5V+OYvjp1nr2NUNhpF82GmgZGA98QmfxKKr WI4hHvhYYpbDbVo8qE+V19zUrlz4P179XVe/63vSSJufEXdt/l0CpoPp6CkW+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 4RsX5L2Vk4z70M; Fri, 22 Sep 2023 12:44: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 38MCi6pi030638; Fri, 22 Sep 2023 12:44:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCi66L030635; Fri, 22 Sep 2023 12:44:06 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:06 GMT Message-Id: <202309221244.38MCi66L030635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: d940c39146e0 - stable/14 - daemon.8: Use Dv for signal names List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d940c39146e0b064c9f4f6f4d5fd1d57a92f0e04 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=d940c39146e0b064c9f4f6f4d5fd1d57a92f0e04 commit d940c39146e0b064c9f4f6f4d5fd1d57a92f0e04 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:28:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 daemon.8: Use Dv for signal names MFC after: 3 days (cherry picked from commit 735637f7d68777d0befa4b9a9291f3fc02b5ed00) --- usr.sbin/daemon/daemon.8 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 4c7064fc9b67..35b877039e4a 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -69,7 +69,9 @@ specified by the other options. .It Fl H , Fl -sighup Close .Pa output_file -and re-open it when signal SIGHUP is received, for interoperability with +and re-open it when signal +.Dv SIGHUP +is received, for interoperability with .Xr newsyslog 1 and similar log rotation / archival mechanisms. If .Fl -output-file @@ -89,7 +91,8 @@ and .Fl -sighup the absolute path needs to be provided to ensure .Nm -can re-open the file after a SIGHUP. +can re-open the file after a +.Dv SIGHUP . .It Fl m , Fl -output-mask Ar output_mask Redirect output from the child process stdout (1), stderr (2), or both (3). This value specifies what is sent to syslog and the log file. @@ -177,7 +180,9 @@ waits until it terminates to keep the pid file(s) locked and removes them after the process exits or restarts the program. In this case if the monitoring .Nm -receives software termination signal (SIGTERM) it forwards it to the +receives software termination signal +.Pq Dv SIGTERM +it forwards it to the spawned process. Normally it will cause the child to exit, remove the pidfile(s) and then terminate. From nobody Fri Sep 22 12:44: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 4RsX5M6txpz4tpyj; Fri, 22 Sep 2023 12:44: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 4RsX5M4czxz3K05; Fri, 22 Sep 2023 12:44:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNWh9ZbriRGA7Kp2riDGt4SmBLwkZrO1KLLviiEvjqo=; b=DyHSnXFkoO/tvb8MO2gpFQ5qazisC3gQ5CQH0FmfxxBZq80xy7TaTHZp17+lVtSBKc7G2H QLEJMJyy8SAwYzcgezLQuXGKn4ImOBwEhaS3jUx2kOGNnjIjVDZbIeUATO4vgK6qGRrmzT 7q2G7j0PzRnMUjIKOJ2mB+kK8J8fP3hIMRXENgaAGGrz/l8sZ2kC0T9GpXq26Lo8jv891u 0ri2mbpVxGHUGONAue0bRNGsNs0MVVn9oy3PEcHD4CazIhWiKwC3EdXhEnHz8+m9dpTMzO s1SGbf7BmWN8qiR/TdbB2qyEcGZaE1fcPaM+KNSLiRWW2uzlwl4KPAlK5lRWZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386647; a=rsa-sha256; cv=none; b=SFqCFjujztRIGPhrI0YtaU58ceSY+YQWYzntz0+7BIuLvrl9CEXmo+bKSmXoyulhUfyokb o+m9GI1rONzYJYijlCInQDbJDq1um8P65G/KKmZ8eiUhP8sBqVzIhv3HhXLTIUQ70J18bP 1uYSjobVCjrhodQF0C80m94nYp8PLg9G4RIDb3bgW7MAY8yRS+HAhVl07f3OhnPiAQQ5Ov vR1NWmZZK0DTLspULJstcTn+fdQYW8/AiRjN+uX1B1JrHkRzt/8FKo6Qh1KsV7rHouQvtN 0XQZ84i6xAGPmGfaMiGjVIxnEUOGwG+hT4dF9PrRXiAQLCxsV+AN+r/aH+cPog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNWh9ZbriRGA7Kp2riDGt4SmBLwkZrO1KLLviiEvjqo=; b=AYyfdZaxM7PgujxyTCCRL5k+/En388Qsh1HiKxAx17SxVWpngQJkvhOdE/AoAvP8ZKP9B9 W4P7Uc3GYkx1YRecl5+BiHkgv4/y9m9FgSZR5Tyfu2EIsSgXF9s8N/ZzMTAHT0o0MuG2vg bix8RQij63eaL2r7Vqjy5y6SqGO93sMIpc695avsURznOhoO36iC1P56nkKRoF2BKFY9AT 0gpyhliF0YUeexChdsu/AMyZYLRz984diAUUVW2X6gwBpOahqqbxM1ZLDunV8AJhfCthPJ QUHzd4Cldv/vOOUqhfbuD7Js6p4BaF//elSMjjDbU1LVh5pIW5y41iNzbga6AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5M3VRQz6t8; Fri, 22 Sep 2023 12:44: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 38MCi7OM030680; Fri, 22 Sep 2023 12:44:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCi7CB030677; Fri, 22 Sep 2023 12:44:07 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:07 GMT Message-Id: <202309221244.38MCi7CB030677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f4438540a1d5 - stable/14 - daemon.8: Use Cm where appropriate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4438540a1d575660c9a10ab6d826240562b2e1e Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4438540a1d575660c9a10ab6d826240562b2e1e commit f4438540a1d575660c9a10ab6d826240562b2e1e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:36:33 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 daemon.8: Use Cm where appropriate MFC after: 3 days (cherry picked from commit a5bc8e8a5863c4aea5ed7ebe2ebc2332c287545c) --- usr.sbin/daemon/daemon.8 | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 35b877039e4a..87b9bec0b3e8 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -94,9 +94,15 @@ the absolute path needs to be provided to ensure can re-open the file after a .Dv SIGHUP . .It Fl m , Fl -output-mask Ar output_mask -Redirect output from the child process stdout (1), stderr (2), or both (3). +Redirect output from the child process stdout +.Pq Cm 1 , +stderr +.Pq Cm 2 , +or both +.Pq Cm 3 . This value specifies what is sent to syslog and the log file. -The default is 3. +The default is +.Cm 3 . .It Fl p , Fl -child-pidfile Ar child_pidfile Write the ID of the created process into the .Ar child_pidfile @@ -148,17 +154,29 @@ The default is the daemonized invocation. Login name of the user to execute the program under. Requires adequate superuser privileges. .It Fl s , Fl -syslog-priority Ar syslog_priority -These priorities are accepted: emerg, alert, crit, err, warning, -notice, info, and debug. -The default is notice. +These priorities are accepted: +.Cm emerg , alert , crit , err , warning , +.Cm notice , info , +and +.Cm debug . +The default is +.Cm notice . .It Fl l , Fl -syslog-facility Ar syslog_facility -These facilities are accepted: auth, authpriv, console, cron, daemon, -ftp, kern, lpr, mail, news, ntp, security, syslog, user, uucp, and -local0, ..., local7. -The default is daemon. +These facilities are accepted: +.Cm auth , authpriv , console , cron , daemon , +.Cm ftp , kern , lpr , mail , news , ntp , security , +.Cm syslog , user , uucp , +and +local facilities from +.Cm local0 +to +.Cm local7 . +The default is +.Cm daemon . .It Fl T , Fl -syslog-tag Ar syslog_tag Set the tag which is appended to all syslog messages. -The default is daemon. +The default is +.Cm daemon . .El .Pp If any of the options From nobody Fri Sep 22 12:44: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 4RsX5N5xCyz4tqNn; Fri, 22 Sep 2023 12:44: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 4RsX5N4zGCz3K7B; Fri, 22 Sep 2023 12:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vwVuZWvxdQXxOTx73YxJvetdZ/IGijlcUUUtzneLVrg=; b=IgJJk/mXhpbAkGSfq35odLiFaMYsIZ9kCYgyJuwC+M3n8Vqf3V+64FM7qFtoESGseCO8DZ OGR63J4ZN3R5u9h0oED8BWQQ5hexOMTG5/pJHcMpPsyNuCoBMfWuIsYKBXN9s+G7tdaDWg G8Jmri7CdrsszJR2EAW8Hx6NWJkSK5Ubw5AymBnZ2yu+Hr0g6LkcWkklsYXm0mapj+yynO o3aLRCbhnFxUD5r7Bam9eOQrldZZVq/KF+WlLXvtT3sIs7ZCxGsNkt7MOCQf2tktJcE4io 3glmDZYiPskSxXJFJ5+4EOm4GqftI/TWsBqNmg6oeNgVlYQcUqbwFrzykC0aIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386648; a=rsa-sha256; cv=none; b=XkSbDS0iPq/CjezsMZ9F+2w/ugmXktyfJPMwPPI0AxtVAfmuRY2au0B7+Dp9+WM+lGIzz9 Mrezk5U0IyE/Fz94/h56QEqZHYKvb+mpdkjvqCys/o1+/WrfdoiKiw0iZOv62Xb78uBmmv lJRIXfcAHVTK9nlVIdYVetVZmOR6D6ynK7WOlMrFAqB265CHzCtmDtZAcJjRguDdIBrRwX PbkGmZQrRK0av+hYMuLtuxkFhZSJlozVRp9xQKEIeu7AFr37Jbji3HMgJEz1ugOrlrR6lj ItA1hi1Htl3fwuXMCHA1YQDFFdVY9643I782MT+v7EqTyN/uglYuP2DElHfvRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vwVuZWvxdQXxOTx73YxJvetdZ/IGijlcUUUtzneLVrg=; b=iOtCiUQJph6kHwbhaqBBtZs7O3nw6Bem00iOVE9M1P7ApBeJS0yuMjMdKFsS3kIvFgwwdb C8w5cdF1L4/uwsZObz7UuCGRBCmTwX1oAlD+Qxjcabo+4vECNvTdmmjVG8Exhgbj9c9n4y hRPAQIEFtpg0UQ+ja5lASubZ64r/oQY0BwWd9bbWn7UvwWmyjNdyBHf9kIe8wphNvd7hfF 8PXbpOQyzwmapg2jTOcy5+lx17igzgnxY8tqjStgl3gkftpzl2d2Q1c65Ud1huTKt3/HV1 M1/3NMv+dqKR4IytYxs56hid5/EQzuw0xfF2y6WH9CEHN478cNUwi2ab6DOA8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5N44m2z74k; Fri, 22 Sep 2023 12:44: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 38MCi8m1030722; Fri, 22 Sep 2023 12:44:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCi8Gn030719; Fri, 22 Sep 2023 12:44:08 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:08 GMT Message-Id: <202309221244.38MCi8Gn030719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 498aa9b2bf48 - stable/14 - daemon.8: Sort options in DESCRIPTION List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 498aa9b2bf4859a96d54bd41f658de48667b01a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=498aa9b2bf4859a96d54bd41f658de48667b01a2 commit 498aa9b2bf4859a96d54bd41f658de48667b01a2 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:40:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 daemon.8: Sort options in DESCRIPTION MFC after: 3 days (cherry picked from commit ee23e1e49666e2c6edd0e5d749d3562587dcb9a7) --- usr.sbin/daemon/daemon.8 | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 87b9bec0b3e8..5ccf18566240 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -76,11 +76,28 @@ is received, for interoperability with and similar log rotation / archival mechanisms. If .Fl -output-file is not specified, this flag is ignored. -.It Fl S , Fl -syslog -Enable syslog output. -This is implicitly applied if other syslog parameters are provided. -The default values are daemon, notice, and daemon for facility, priority, and -tag, respectively. +.It Fl l , Fl -syslog-facility Ar syslog_facility +These facilities are accepted: +.Cm auth , authpriv , console , cron , daemon , +.Cm ftp , kern , lpr , mail , news , ntp , security , +.Cm syslog , user , uucp , +and +local facilities from +.Cm local0 +to +.Cm local7 . +The default is +.Cm daemon . +.It Fl m , Fl -output-mask Ar output_mask +Redirect output from the child process stdout +.Pq Cm 1 , +stderr +.Pq Cm 2 , +or both +.Pq Cm 3 . +This value specifies what is sent to syslog and the log file. +The default is +.Cm 3 . .It Fl o , Fl -output-file Ar output_file Append output from the daemonized process to .Pa output_file . @@ -93,66 +110,55 @@ the absolute path needs to be provided to ensure .Nm can re-open the file after a .Dv SIGHUP . -.It Fl m , Fl -output-mask Ar output_mask -Redirect output from the child process stdout -.Pq Cm 1 , -stderr -.Pq Cm 2 , -or both -.Pq Cm 3 . -This value specifies what is sent to syslog and the log file. -The default is -.Cm 3 . -.It Fl p , Fl -child-pidfile Ar child_pidfile -Write the ID of the created process into the -.Ar child_pidfile +.It Fl P , Fl -supervisor-pidfile Ar supervisor_pidfile +Write the ID of the +.Nm +process into the +.Ar supervisor_pidfile using the .Xr pidfile 3 functionality. The program is executed in a spawned child process while the .Nm waits until it terminates to keep the -.Ar child_pidfile +.Ar supervisor_pidfile locked and removes it after the process exits. The -.Ar child_pidfile +.Ar supervisor_pidfile owner is the user who runs the .Nm regardless of whether the .Fl -user option is used or not. -.It Fl P , Fl -supervisor-pidfile Ar supervisor_pidfile -Write the ID of the -.Nm -process into the -.Ar supervisor_pidfile +.It Fl p , Fl -child-pidfile Ar child_pidfile +Write the ID of the created process into the +.Ar child_pidfile using the .Xr pidfile 3 functionality. The program is executed in a spawned child process while the .Nm waits until it terminates to keep the -.Ar supervisor_pidfile +.Ar child_pidfile locked and removes it after the process exits. The -.Ar supervisor_pidfile +.Ar child_pidfile owner is the user who runs the .Nm regardless of whether the .Fl -user option is used or not. -.It Fl r , Fl -restart -Supervise and restart the program after a one-second delay if it has -been terminated. .It Fl R , Fl -restart-delay Ar restart_delay_seconds Supervise and restart the program after the specified delay if it has been terminated. -.It Fl t , Fl -title Ar title -Set the title for the daemon process. -The default is the daemonized invocation. -.It Fl u , Fl -user Ar user -Login name of the user to execute the program under. -Requires adequate superuser privileges. +.It Fl r , Fl -restart +Supervise and restart the program after a one-second delay if it has +been terminated. +.It Fl S , Fl -syslog +Enable syslog output. +This is implicitly applied if other syslog parameters are provided. +The default values are daemon, notice, and daemon for facility, priority, and +tag, respectively. .It Fl s , Fl -syslog-priority Ar syslog_priority These priorities are accepted: .Cm emerg , alert , crit , err , warning , @@ -161,22 +167,16 @@ and .Cm debug . The default is .Cm notice . -.It Fl l , Fl -syslog-facility Ar syslog_facility -These facilities are accepted: -.Cm auth , authpriv , console , cron , daemon , -.Cm ftp , kern , lpr , mail , news , ntp , security , -.Cm syslog , user , uucp , -and -local facilities from -.Cm local0 -to -.Cm local7 . -The default is -.Cm daemon . .It Fl T , Fl -syslog-tag Ar syslog_tag Set the tag which is appended to all syslog messages. The default is .Cm daemon . +.It Fl t , Fl -title Ar title +Set the title for the daemon process. +The default is the daemonized invocation. +.It Fl u , Fl -user Ar user +Login name of the user to execute the program under. +Requires adequate superuser privileges. .El .Pp If any of the options From nobody Fri Sep 22 12:44: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 4RsX5P6l2Cz4tqLM; Fri, 22 Sep 2023 12:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5P60ZSz3KG4; Fri, 22 Sep 2023 12:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxUh/GgGhuAncQmL1bTKh/53J49RrKkOVo4BuPXfhs0=; b=ACunMKoKE+Z9Axl07jLmKkkECot8rKGlN4xcuPHWNLd3q9PgkRPpQxGt6LX6A/4RTK4Rwo glLVCDfw4lPjNmIziH/0oq2O+TPs7FPMxdlkfTImvrSdj5+OipW1WDE3POKEnoSxxPlHQS k5gcLK/R14jGAliBdizCnNqo32P2eXljOH+f7AByVwW+TpsvLefIiroRKstaOjRj719oVj t+MmoaHxPLYaHH0CoikpILjIX4wBHIAbylh24CNwtg1hqTfG4K3bYhN4u3C3ky+DOf1PIS 5GPzrNs4H7yq3zuKu97VJwSS9zgDGEcTrP8mqrf8XTtfjnFtL/tZgRWKRUpNFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386649; a=rsa-sha256; cv=none; b=KMASd4+PZlIYqWLI1hNc4oPBhLNjG3xhhA7S+c1QGHfHvCpqul74sQ2+Sa1/1pL7582vN7 o1FQdQRWAwl72USD7OJJhH/HkNE2tBbN5CBcQkxNzfsqDMOFqJXIsCLKRYgArFxz01TYx/ 7mxY/CJmaRp8VGLlLieLo6VP6IKfAldXi6Wb3GCeP0jyv6gUFe36ToYVXFagNWb3DzgqZ1 MrJMbSMzGsKYbZBnEDI0Pw8ZhvP7gPE6v2FDWb2RYXN7wgLX8DlWPVGHKmlxJdSrK22YcO Va+srtg3SILkMkGrUbpFpjStgOj9Gif5CwThHVm1LiELr1nUuU9bxCnyRT1HCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxUh/GgGhuAncQmL1bTKh/53J49RrKkOVo4BuPXfhs0=; b=pL/RsZvSgrbiPrAN4X/qyU/3t8JnrKa+ZbLkG+Bf4R947H4VDmgkEh5UAHA+62fK4CjhnY BQsbMhanSycDxjX6mTRzZmUwkT5E0OWLHAtHFdrgxkFwvvcCzUwEACZ4ANzhwImwZc/e7f /Q/R3L0jSroRaEiJhzRdQmOcnedjASp7/uvZiIaAc9NE18uNMZqgU0qe4spvZV2CTQ18fP EnTClm6TNZg8G6+Xtj7S9qLc4A4wq+PpQr+U5RX1CtEBZ0k5oF+3ZWL7gWeq6z3QeHl7vF 3hRfXHAsxUVXIhI67ATeUO4a53wnnVcD5n8KFE07su82SLzN5EMTOHXcsoo5FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5P55fpz70N; Fri, 22 Sep 2023 12:44: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 38MCi9rt030773; Fri, 22 Sep 2023 12:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCi9UW030770; Fri, 22 Sep 2023 12:44:09 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:09 GMT Message-Id: <202309221244.38MCi9UW030770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 8a43207b6d32 - stable/14 - daemon.8: Document -u sets HOME, USER, and SHELL List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a43207b6d32b222f09634e74aa16d90c5ebf976 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a43207b6d32b222f09634e74aa16d90c5ebf976 commit 8a43207b6d32b222f09634e74aa16d90c5ebf976 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:17:55 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 daemon.8: Document -u sets HOME, USER, and SHELL Fixes: 6b3ad1d73732 When -u option is used also set USER, HOME and SHELL MFC after: 3 days (cherry picked from commit c1207678f7ebd546a0705dabc3218e49abe06a99) --- usr.sbin/daemon/daemon.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 5ccf18566240..fce08bc90e62 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 14, 2021 +.Dd September 18, 2023 .Dt DAEMON 8 .Os .Sh NAME @@ -176,6 +176,11 @@ Set the title for the daemon process. The default is the daemonized invocation. .It Fl u , Fl -user Ar user Login name of the user to execute the program under. +Environment variables +.Ev HOME , USER , +and +.Ev SHELL +are set accordingly. Requires adequate superuser privileges. .El .Pp From nobody Fri Sep 22 12:44: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 4RsX5R0rf3z4tpym; Fri, 22 Sep 2023 12:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5R05f3z3KQ0; Fri, 22 Sep 2023 12:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDQooQfeN7Id7CnKUZHwZhfgEkvbkd7zXhwEkPDjhTI=; b=PaCyaRC8RBpf5HYIsrP0Wc9iPOr9zSMAwC3JgiNP3ukCCULNABhNOd3BfNp15GiTyhjntQ tMzNy7qknLxRUziILboWWmUm6odLEzkx6X/ZWePwqbgH0omsgHox7k468jwDivY+PxJ0sK y4uPbLElWPOjosGaOT5LzhgLoOXBnQIJ0fhQVf9SYkgraDg5P4LmP5Hd9sOSSMw2BM5B/I n/RjQi3uxweElcBI1UJboym3SNa3fvMPY+e/+ip5qhLU1AR6j8d+LSFD+UhPcD9dPSviko GVNcJdpc9+HUdz9yz0xRaP384Knass5L4BL8Gn+nSht5QvZdv+dWogMDe57a1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386651; a=rsa-sha256; cv=none; b=Ebgaz42kC5fYMIxYMeQZiHbhlR3RTPhwuV/7hlhIbvOO6/15iZmCrucfpK8mjkPMQehjLR QkW5Vjw1tTFdJ057wx8u6P8TrQ1UrqUvscxaRKo1OVRCqhbVFtSmNO+ZtnCuDcHeFPRxD3 VlaXgzXi7717Q8p3vNN6fA09KlET3bgHeHDDl7HLO0tF1dFScNmUm2OqgWHmaCw5m4FVUu m4Dkxla/QvD0ODeldn4v7d6XkyQaS0sQIx3AizEWKk6XDoRmlSacnHxWELB4oaOVog8g8p P1O9uQpxZfa+f6w7RzFvHAvdnynYq7VRSNe11I74+DrF9tCwruosHE0uGwYRIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDQooQfeN7Id7CnKUZHwZhfgEkvbkd7zXhwEkPDjhTI=; b=TAff1Vw3NiN0FCzhe7cl5KWVipy8Qtdv8Gs9T15LlUMRauPpP4vKwHGHw8km7xm0ermjba AmwaBHOo8vRt6g79qr5Pa6NoKeU49+6EJjGfBEJaNz9TRq8IXEGcFKW7dA/ZqOOs6VLEz+ bG2TKl4MH7r5jSu8nw77WfX3U8xewWYbf9knMsDGdIMx+cV0Z5ZzApRzi6oHcKdIqv7xgU B0NywxAOPjvxtP9IQdvpdZr+QkkWieWzYIuqMHHaxcytcUt2Jh/jnLDJWPe5WcYFUhIonY 2CmTeQYFu23BOII+qSq3+3PutaUfCwCCCSTMfvPksdjEBAWr34ONGCbF1QMT9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5Q65P6z7J2; Fri, 22 Sep 2023 12:44: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 38MCiASi030812; Fri, 22 Sep 2023 12:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiA94030809; Fri, 22 Sep 2023 12:44:10 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:10 GMT Message-Id: <202309221244.38MCiA94030809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 771fbfead4be - stable/14 - rc.conf.5: Pet mdoc linters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 771fbfead4befb90239c32c69bef46338452a8fd Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=771fbfead4befb90239c32c69bef46338452a8fd commit 771fbfead4befb90239c32c69bef46338452a8fd Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:47:10 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 rc.conf.5: Pet mdoc linters MFC after: 3 days (cherry picked from commit b7961dba30e60fb0d1a5383cf03e5ea2fd2ff607) --- share/man/man5/rc.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 4d7d25fd71d1..17c92ee663f7 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 11, 2023 +.Dd September 18, 2023 .Dt RC.CONF 5 .Os .Sh NAME @@ -3990,7 +3990,7 @@ The configuration filename used by utility. The default value is .Pa /etc/jail.conf . -.Pa /etc/jail. Ns Ao Va jname Ac Ns Pa .conf +.Pa /etc/jail\&. Ns Ao Va jname Ac Ns Pa .conf and .Pa /etc/jail.conf.d/ Ns Ao Va jname Ac Ns Pa .conf will also be used if From nobody Fri Sep 22 12:44: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 4RsX5S2Pt1z4tpsw; Fri, 22 Sep 2023 12:44: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 4RsX5S0Yfkz3KL6; Fri, 22 Sep 2023 12:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1z3JuGetCqf44JGQxd3vWCDFRPFXipbJ2Pw4h7X5ZUc=; b=fQMqCKUcZx+n+nHD7obQcnwH5Bgpl7jJ8XksOyDN038bQyHu0Pa9x1zGyO3w5nRhcxRT/B odNMZFRfoPurIcFO6Qa2dV+6VpiR9/JX365N2MznIJEiJft/HOu99TszHzhgM/8tONt2Z3 Cw365OnbKKkuT4kEO/ctb2DQDKK+N9LGoNeqHYVBsQX9iur/lVQWhGFMncqTeYHX5tM/mP 8NPoLJP9xu7Ifuja4W8qENK1DYsOoGZHhNh2iI92UUlHLAha4UYy0imLe3E7dsULL9t2M0 GN1O5OG/gHyN725mL7wX5R+k1+19K3LUNb5uAqMF5VoyGohvN5fy6lWKLE6uZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386652; a=rsa-sha256; cv=none; b=fpq7nX10zQztyjcWxAYv1nR16XZCUxvJFXAZ9RbkagB780GvhvyZhsFz4BZx3tZnlC7NWs MN3l0YR1PkT9xQ8+/2mZ4Rf1ngMYxuqxYKpb1g9I3D7cFzBYbu5xMpwZ20RR3fsavabgVd ONttXARSNuRXP/yMORuB/oy80ePWl8Qt+5AH3N94QYL926aYdK7ohA8/UaAkfKewR29DL9 +FRirMAwY0onvKvQDmLsyy+PVJMhEKfb6beA0yUGscoNkk0XVh9TIyojgmEuH6wW3sXHIf LmsjooJfX8TANN7tPSQrZEw4FwCFx0nklUi7sq+qMSIrB253YL8r5dYft81lUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1z3JuGetCqf44JGQxd3vWCDFRPFXipbJ2Pw4h7X5ZUc=; b=fwHzb5DCijMc+KCSzOtThhVzT1dj0etDEbsX9G0cG0mfv+XAa9Vjz+vo0NR6275VgGLlY3 Q5TD9JKrS0cbx5PQTx6vIRLtkpXe9UPaPxK5lrlRSe2D4giwl94kjCe/HGO/K6zzLaWZ9T nd9cut1w93zReBBqtdicUQCQtLNuD6gMrgaHDX6aLbtuESa8D/3/E43iDmMT/iRK7f/UDr 4+ieP8SEmlttGfGfPa2dYxwlBpP3aNhVFjIko91bg2zwiGoDQEyqa49DWW/r3HiA+bVQKg QusYz9RcoAvzEhdbvVCDrgm4wnEtCyY7AC4OCn/sG2KaHduc+D6YXtB0ufAatA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5R6n4Yz74l; Fri, 22 Sep 2023 12:44: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 38MCiBHU030855; Fri, 22 Sep 2023 12:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiB5D030851; Fri, 22 Sep 2023 12:44:11 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:11 GMT Message-Id: <202309221244.38MCiB5D030851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 7342a436750b - stable/14 - rc.conf.5: Document _setup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7342a436750b6de8621ed51a4069509e16c461f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=7342a436750b6de8621ed51a4069509e16c461f8 commit 7342a436750b6de8621ed51a4069509e16c461f8 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:53:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:28 +0000 rc.conf.5: Document _setup Fixes: c9be47b34dd8 rc: add ${name}_setup script support MFC after: 3 days (cherry picked from commit 5e3a8a4a035e6ff779cf54217870a259eb593d97) --- share/man/man5/rc.conf.5 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 17c92ee663f7..a76cb1a04e0a 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -250,6 +250,11 @@ such as PostgreSQL will not inherit the OOM killer protection. .Pp This variable has no effect on services running within a .Xr jail 8 . +.It Ao Ar name Ac Ns Va _setup +.Pq Vt str +Run the specified setup script right before starting the actual service +command. +Useful for automatic configuration file generation. .It Ao Ar name Ac Ns Va _umask .Pq Vt int Run the service using this From nobody Fri Sep 22 12:44: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 4RsX5T5hWBz4tpsx; Fri, 22 Sep 2023 12:44: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 4RsX5T1v7Xz3KSW; Fri, 22 Sep 2023 12:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpuw4p4SJjdbyYZeshRqP/LcTZ3+T7aDb3XFA8YTvzY=; b=c2Uxi03E//qnD9Y+5BYZz/XOj9rq9XDPPiSkCDvXwQ/uztJCeXJZE/9iEa7LxsEjhrwm12 xQ0VuxhZsl69dGKscyVTvpK1caFn+Y5DFUOOuUFpdwBvZh57b3HWnuC1WzsxKiF7JMPbCl iKxwqcpN6i01472zG5617Vz+2viaXymrjnJsn6lYS/ACVrKY4IoKovizj2O8ZdSOLPCtQB kyzDgF6vRee2j1ohL4bFCORFrMnkHLd6MuhyqwSZUPeDSs2ttcQTauRni/zAdJuEWOaZvB CA8VQq7F/dIwi1BIHu/ITuNKDJVLPI6N3gwVAa4gXYg9w+LMJ5B6B1lDLhoNaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386653; a=rsa-sha256; cv=none; b=nMFUq5gfD/LFRYsV5uswzaKS8kM76lMi0fkZR9gGb3+Arh3CaG5lzIZ51IN9fYLPqFaFUh 0VMfawwUYKOaoRmDPeazJBuI2/9k/AxEmQUIhY7EucEhHZKKrYOpMYtFhhEO0zulY1D4oT v6rYoKVbuRWSEHe5WoLb0ohYbau3jB/TDpBrSR68kH+hSCUDAvv1rpAFLI4rvObqMehmap zrZMHmzvVDZ1xXWoi3YfR8rSoqGt8UGSUdoRrSghYvfgRKBMGlb4djbkir3Q3MCjIAPCJ5 dO2coe+Ed8Q7Cs+t4y6ISC2OXWUhuKdqzJJFYDtaGGHRvY7J2FQdr5lD9lg9kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpuw4p4SJjdbyYZeshRqP/LcTZ3+T7aDb3XFA8YTvzY=; b=j+S2dWpEWSIbA0Eg520B4/PiyJ8NJ7wl7tR/9Wnum/V4lWX7aYY1LrcrhTK6921flZYeb2 ydYfmAfygjUANqUHjGqrsILxI4nQyfST+CmmZEoXpxFYvMjy9I6SPE0jot1FRzO4PoZXMN 03piQrgKHhkL+Li+UOFPof+Xidl96SniK89usYdiNvzx/rOWoUsuAvT8jpj16jD0GPNzUN HZCjgO53CBEVVMAQqT5Hb4x3acDsZ2FhpULZM8M124TMdDpbTCA3Dq5rohPxNNy6WxrwEt xS/IsTSjQ56w6mqyGvbPYHphU3p4mV7WcJ5Cl4G4+L5UymDmZFKwpyRtB94Q+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 4RsX5T0gn4z6xD; Fri, 22 Sep 2023 12:44: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 38MCiDtP030898; Fri, 22 Sep 2023 12:44:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiCPB030895; Fri, 22 Sep 2023 12:44:12 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:12 GMT Message-Id: <202309221244.38MCiCPB030895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: bffb55dc7577 - stable/14 - at.man: Fix mdoc(7) macro usage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bffb55dc7577bea3462c7e563e7ce129ec81ad2d Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=bffb55dc7577bea3462c7e563e7ce129ec81ad2d commit bffb55dc7577bea3462c7e563e7ce129ec81ad2d Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:12:31 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 at.man: Fix mdoc(7) macro usage MFC after: 3 days (cherry picked from commit d13b8b3e7255ad01b25ab512983af88d78fc1e53) --- usr.bin/at/at.man | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/usr.bin/at/at.man b/usr.bin/at/at.man index 58d53e2e75d5..328be8f346b9 100644 --- a/usr.bin/at/at.man +++ b/usr.bin/at/at.man @@ -81,15 +81,15 @@ or to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: -.Em midnight , -.Em noon , +.Cm midnight , +.Cm noon , or -.Em teatime +.Cm teatime (4pm) and time-of-day may be suffixed with -.Em AM +.Cm AM or -.Em PM +.Cm PM for running in the morning or the evening. The day on which the job is to be run may also be specified by giving a date in the form @@ -101,34 +101,35 @@ or giving a date of the forms .Ar DD.MM.YY , .Ar MM/DD/YYYY , .Ar MM/DD/YY , -.Ar MMDDYYYY , or +.Ar MMDDYYYY , +or .Ar MMDDYY . The specification of a date must follow the specification of the time of day. Time can also be specified as: -.Op Em now -.Em + Ar count \%time-units , +.Op Cm now +.Cm \&+ Ar count \%time-units , where the time-units can be -.Em minutes , -.Em hours , -.Em days , -.Em weeks , -.Em months +.Cm minutes , +.Cm hours , +.Cm days , +.Cm weeks , +.Cm months or -.Em years +.Cm years and .Nm may be told to run the job today by suffixing the time with -.Em today +.Cm today and to run the job tomorrow by suffixing the time with -.Em tomorrow . +.Cm tomorrow . .Pp For example, to run a job at 4pm three days from now, use -.Nm at Ar 4pm + 3 days , +.Ql at 4pm + 3 days , to run a job at 10:00am on July 31, use -.Nm at Ar 10am Jul 31 +.Ql at 10am Jul 31 and to run a job at 1am tomorrow, use -.Nm at Ar 1am tomorrow . +.Ql at 1am tomorrow . .Pp The .Nm at @@ -151,7 +152,7 @@ The working directory, the environment (except for the variables .Ev TERMCAP , .Ev DISPLAY and -.Em _ ) +.Ev _ ) and the .Ar umask are retained from the time of invocation. From nobody Fri Sep 22 12:44: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 4RsX5V34s8z4tpyr; Fri, 22 Sep 2023 12:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5V2Sh8z3KLn; Fri, 22 Sep 2023 12:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VoejQCnmwjKEk9ROEQzWaYFcTsmconIj7oqbQd3jfKk=; b=qwBAuRC6bz/SQx1kZTYBPptKJhWDYtkphJDwlYm6v2TYfbFehHkKQJ4DJXoY/vvkz1J9rc Jf5unrgQK+TCqk7DW2UBs0QR3rWbI2ydK5PfhwDuDhUdkq4XQfMtvQPdaYhDIjrT9N0u4r utQDtk1ouJ1GI6JE99rCcKYfTsD1KB5YVSaAKrZzFfzKerZ8Dx90GH8XhYZqe3CI/skph5 clYAGsNLu+yr5D+i6JwomLC9VvP0pLpEyaiSi6MsMz9vc9sRpJEdX44CxGr+UkMEVGWX0h z3EyFI+Z1EY72n3QJ90HuRuTRbpmitBGYX8XfSDW1M6tMkPU8zq8IgYbjk7k4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386654; a=rsa-sha256; cv=none; b=RMGtCNLs5onONnx7VgtDC477QQ2ng1lqcJ6T8xaRQ3udf5j0y2I9AV0oo3ppnOKqYveeCZ dIGP7j6pQPM+sZdTeqsdOvDdCTqz+e6geq02ins/xvMEwlv5uavcuUDWV5UN01wm//wjRI sDw4XacEluyz7XVvM+PinzI0FL6kq8fof9ilJcnrhMxkOIK6lTJmL6uU3X0fYFTlV6B6EJ 3cgDdCoj/WWq/riaXBdwBxgSu1bMuTIl+T/qEzB8voPutkISLIig8ltjByAKKnOKnwOOTS NSmPKy22pMLn2Sy4nT4Nqh4lLV5G4RrgJ/x4FzoX5V3AMHudVS+uOrFDKkuKSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VoejQCnmwjKEk9ROEQzWaYFcTsmconIj7oqbQd3jfKk=; b=qZOSXFWXWRqDsQhy9oXxA0PidRItSPjKpjNoiCkRwjS845+ZGvtsSDhtnkk77Jxnz9p+fG DWRBRAmFeGNcr5IJZvme+kwBLkq6yB3ScEeZqr8wGda3ll+ZzWIN1oVhRcjV3UgRDEB9gC c6LnLediZalTXDPtkIIcvreHFCjxX6p4pYpmin6vKKlAtfE1XruIXSZSena3WRV1TMSVcA 5NFpUHzDldPO/FsEpOM7Hwy4VuXg5G1XfRJU0iVq0YAPSG/xKU+tO69s7lRohibh2jmFBV rZD6kYE52lEeFHeVlvR1qFEoF416MDi9cv1eQN4Ggkq70I9IWeQ4RiyTCNAk7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5V1YMtz74m; Fri, 22 Sep 2023 12:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38MCiE5s030946; Fri, 22 Sep 2023 12:44:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiER2030943; Fri, 22 Sep 2023 12:44:14 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:14 GMT Message-Id: <202309221244.38MCiER2030943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: bd7273bc7ff5 - stable/14 - at.man: Move examples to the EXAMPLES section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd7273bc7ff54704031f59ad4e3de40e60e6eb72 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd7273bc7ff54704031f59ad4e3de40e60e6eb72 commit bd7273bc7ff54704031f59ad4e3de40e60e6eb72 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:17:52 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 at.man: Move examples to the EXAMPLES section MFC after: 3 days (cherry picked from commit cd056e3cd4e421fd50245bb2aa6f989b23e861bc) --- usr.bin/at/at.man | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/usr.bin/at/at.man b/usr.bin/at/at.man index 328be8f346b9..a1002da6545f 100644 --- a/usr.bin/at/at.man +++ b/usr.bin/at/at.man @@ -1,4 +1,4 @@ -.Dd August 11, 2018 +.Dd September 18, 2023 .Dt "AT" 1 .Os .Sh NAME @@ -124,13 +124,6 @@ may be told to run the job today by suffixing the time with and to run the job tomorrow by suffixing the time with .Cm tomorrow . .Pp -For example, to run a job at 4pm three days from now, use -.Ql at 4pm + 3 days , -to run a job at 10:00am on July 31, use -.Ql at 10am Jul 31 -and to run a job at 1am tomorrow, use -.Ql at 1am tomorrow . -.Pp The .Nm at utility also supports the @@ -328,6 +321,22 @@ deny permission control .It Pa _ATJOB_DIR/_LOCKFILE job-creation lock file .El +.Sh EXAMPLES +To run a job at 4pm three days from now, use: +.Bd -literal -offset indent +at 4pm + 3 days +.Ed +.Pp +To run a job at 10:00am on July 31, use: +.Bd -literal -offset indent +at 10am Jul 31 +.Ed +.Pp +To run a job at 1am tomorrow, use: +.Bd -literal -offset indent +at 1am tomorrow +.Ed +.Pp .Sh SEE ALSO .Xr nice 1 , .Xr sh 1 , From nobody Fri Sep 22 12:44: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 4RsX5W5sjvz4tqJg; Fri, 22 Sep 2023 12:44: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 4RsX5W3SYsz3KfX; Fri, 22 Sep 2023 12:44:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0041VWtbSsg97BzzY5yBOxansVgxW0ZqEqX3LMTz/Ik=; b=xzLW+klezK6P+3P1o/QHR4rnSvzkMSKDJh2z1EMNVnQUy/YQpyi1gsgYc/S/T03NrO+vGt UPIkxqlzrsJyD9CwCVCy0iXicAC1DDS+oJKbNzbQkyH+bs/cjqlLrB965DLrF0dys8AEmh gP6KpPdlFJIveAfyg/RYR+GFtl3rifUlfwQC20+yiPbdX7AmKV/cFg00lU+lEPmNuW3gnQ 8LIKwwlOszVlSHXnFBhY5XFaPbsrb+2key0WKsogAS10OxsCv1yDecNKFDeFTgI9pEMcX9 izrNeKt70yEKTo/EdS29zlbONm05sgM6BVcZlhVOPD+gjbQ99pmvUOinaMv1wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386655; a=rsa-sha256; cv=none; b=XJzESNunOwUxZxSyXDhJ3QkLFyZYUEafbrMcYh3EHGn/BZVRboO32xDHn7FeQD1f8/dVFW 5mbFi387Q6Ya5vo97aakVNyc8oXFidT2RwHeLVtFxIsS7mZq04+3DbyElEsL9q9cDZRif3 4lbK7UWs59TKbs0JWCSowCpLixz86HGotEFYm/6tXMZdrEMPDaxsPw3qi1U6EOiTyYVL4a Jg6thdfFhkKFKZSVn4kVf1Go/+OerTLbdAXOc4AmmGw/ZqU2d9kwocwSbDhMYdbU5EwOKD tXY/lD9+bVr/8kNhYl2Jhw4GgpVvbx3ZDe0BMtW5fPPIobpe7QetDoC0HjhjSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0041VWtbSsg97BzzY5yBOxansVgxW0ZqEqX3LMTz/Ik=; b=LG/JfjD3VBPtjpgW83Xa6zTsFoyFRvM+rgi5HyeMt5NbayoZWBrlsnG/vtcDtraW5EGOqi TeSoXRKUbOXkivbQ8xE6H1H6exV7V7rE5qnmPB/yzQhIZkVKAZk6maqsimRxyA7tHp7xjj 0IKlaB9aSC9kY3PBDC6NQDTi6N98t9k9BdahiF+pNSmL2+AdQhiECkHcF+A3e0AWQljiZC f4tWWLCNDnW2q1AjhF/HAtnFlSdAz5hNAEYdnJO6ul/TxBLqwr+U99FUWI/e5Vph5A9FER lk4Kyb3DSE/5lkQQ+5K8nrzk+A6jLtnNQi09+yjXpZPZo4lJbHJ5njoOzbKfXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5W2HZqz72l; Fri, 22 Sep 2023 12:44: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 38MCiFTB031001; Fri, 22 Sep 2023 12:44:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiFqC030998; Fri, 22 Sep 2023 12:44:15 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:15 GMT Message-Id: <202309221244.38MCiFqC030998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 0b8d44e44da7 - stable/14 - tmpfs.5: Fix the use of Bl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0b8d44e44da763fa12d8cc776fbdc3a71dc774ca Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=0b8d44e44da763fa12d8cc776fbdc3a71dc774ca commit 0b8d44e44da763fa12d8cc776fbdc3a71dc774ca Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:24:22 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Fix the use of Bl MFC after: 3 days (cherry picked from commit adbc93c4cc862b6fc6e7992f6e8c78745d0d36eb) --- share/man/man5/tmpfs.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index a89be6885d3e..ac5ddbf759d3 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -51,7 +51,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 21, 2022 +.Dd September 18, 2023 .Dt TMPFS 5 .Os .Sh NAME @@ -108,7 +108,7 @@ The following options are available when mounting .Nm file systems: -.Bl -tag -width "It Cm maxfilesize" +.Bl -tag -width "maxfilesize" .It Cm gid Specifies the group ID of the root inode of the file system. Defaults to the mount point's GID. From nobody Fri Sep 22 12:44: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 4RsX5X4y9gz4tqP3; Fri, 22 Sep 2023 12:44: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 4RsX5X450jz3Khy; Fri, 22 Sep 2023 12:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84FU1kQ6fiPVLQ9xzeCbc5PPVmdGLuIQ1ccfv7332kw=; b=WZhiAdbqI6tt1m6AmDGu0Gca0zVpo1tTTlmC9fU+qAdSvvNA3wUoWr6gOJjeYorcfgSU6y xRkzTvqL/aDxZLgAGKqzPlISGDkr17ArWaPUNWe9p2x0fKiSFyUAZffxhg0juOccK+sIMY UhPRYAVxN6wbsAGSTOCFHWuGtWj8KkEJy7ZzPT+wYp7nnER0YLYJz4al4JKALx2lG67kzS 3WsOhYmgHj6S3BBmnbnN62uU/gtqIzG7uzM0D3ft9rwRKmTBH8awtV5F8xt7YH2mZm+qvO F9KORYWpLjSb73y9+hIr3yMcF0vJ5nmkBK2W/zLlcORXbuG0xyParO9N40SUFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386656; a=rsa-sha256; cv=none; b=mPLjS1kdBj+3rpRwXfZClg/kCEUNRe5hwTssmwP9FO/4OEDa0v//zpYV5916Pc+VO+Wm4e kwCEHchaqycRqPXAKsWfPbY525eRpimeWoGivuX28zr7l9Y7gshrmrfV9fEKx2Y7X3zfoI F/jkAhvKievyUN7JFu32B+W6iEulnGhAP3Nha9XBKYG1EiOWZPcgeQ5Z9quAK14YBdcXao XHUQqt5mL7/LcKqW0MQxaaYO1yO81MEIB3mKoewtSSO4+RV8dDhp7epIszCJrGLQuOYe4M X7qVzL6IsKcF611JsoYURwcVlg9fDXdzKg+UUs0M6MGvxWkRH+Zh+JazXEvt9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84FU1kQ6fiPVLQ9xzeCbc5PPVmdGLuIQ1ccfv7332kw=; b=Vwo0wLTl6YrOxCxIvbQ8c3QCQPytoyF5+Sdrr+o4B2iHxmg9DEyYwTbl/fHx0E4sa3Zgao M5lvHOc1Iomh4OLZoR57Wz3SSfaeH+7cL8dB/YhoGmpdsOsLOooIphoDR13aMfYKBSIWke /onZK90fLJMAUb+qMf3Ixu7JNGv70w2BUTkoVRoyNDeH5NW1PVnRA1bOwiMJdU+rXl0urR 8SDIyCp1f6/qt6H0sjeD7qvVugnmm9Kf+4S5R7vFOJGy2yAHm238PoiZlyGSk8NwMNx1az c+BkYaQGo4cH1yH4rlfFe/E15jRC1utWEncRI/LT08QY+HDnfWfSTEn6zh+RFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5X36qTz72p; Fri, 22 Sep 2023 12:44: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 38MCiGIT031052; Fri, 22 Sep 2023 12:44:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiGNS031049; Fri, 22 Sep 2023 12:44:16 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:16 GMT Message-Id: <202309221244.38MCiGNS031049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 37f1e0d07ebf - stable/14 - tmpfs.5: Keep the style of option descriptions consistent List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37f1e0d07ebfa753e13c6e5720eaa31141be2158 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=37f1e0d07ebfa753e13c6e5720eaa31141be2158 commit 37f1e0d07ebfa753e13c6e5720eaa31141be2158 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:29:42 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Keep the style of option descriptions consistent MFC after: 3 days (cherry picked from commit 0789d988a95eba5bd45fbe82a4ebd4dc7e957797) --- share/man/man5/tmpfs.5 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index ac5ddbf759d3..1644e1c5d1bb 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -110,37 +110,37 @@ mounting file systems: .Bl -tag -width "maxfilesize" .It Cm gid -Specifies the group ID of the root inode of the file system. -Defaults to the mount point's GID. +Set the group ID of the root inode of the file system. +The default is the mount point's GID. .It Cm uid -Specifies the user ID of the root inode of the file system. -Defaults to the mount point's UID. +Set the user ID of the root inode of the file system. +The default is the mount point's UID. .It Cm mode -Specifies the mode (in octal notation) of the root inode of the file system. -Defaults to the mount point's mode. +Set the mode (in octal notation) of the root inode of the file system. +The default is the mount point's mode. .It Cm nonc Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. .It Cm inodes -Specifies the maximum number of nodes available to the file system. +Set the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on the file system size, which can be limited with the .Cm size option. .It Cm size -Specifies the total file system size in bytes, unless suffixed +Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, megabyte, gigabyte, terabyte and petabyte respectively. If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including main memory and swap space) will be used. .It Cm maxfilesize -Specifies the maximum file size in bytes. -Defaults to the maximum possible value. +Set the maximum file size in bytes. +The default is the maximum possible value. .It Cm easize -Specifies the maximum memory size used by extended attributes in bytes. -Defaults to 16 megabytes. +Set the maximum memory size used by extended attributes in bytes. +The default is 16 megabytes. .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 12:44: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 4RsX5Z0P04z4tpt8; Fri, 22 Sep 2023 12:44: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 4RsX5Y5GW0z3KrC; Fri, 22 Sep 2023 12:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtL4tnE93a2GyJzGruFUft86dzTxJwa7HJ5itmgP1iY=; b=HsDEFRikNs3tsb4n36LpN6h2XyjZQL87k1FYYZ29lU8UHgP6RwDFBGx2WOQ+u4YCC/HfOt xJbXV7Gk8U7yXS3zR+2iSDtH9Mr8rxshs7euwswEwwrtCW+D65ycGVgJ4vU/Nfa83RTWes HCGgkDtBU1HrUHCNxqTIFJrObc9P+1xiIPJZq0KhOkPeBmVFZ6BJsY3j/cwGhfDKTxRkYs XnMqPWekkKNnzGzct//RZGrJbzv+7e99R587P7CiDab4K9HfPS3hyZtgAgWN9jsbLXPNu5 D/cSTvkPKNp4nUVLOCkP9JcTZQLRJP+0YPaRCiD0FIL3c/4OI8fGgho+SRNkwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386657; a=rsa-sha256; cv=none; b=ttCtEqeXZrU4dv9+l+mm9nahHw5z2BC9Ww0/t+WB5ah10Z0HT3DK663zmAxHpeYxrsMpZJ NsFFAuj0jY381cfxiiuilCzMtzmSCEuLMYRmbXBwQ85wbOuzwzm64VShQ7rJ+p7EH56rEH Ra1ba88JN59ZBnuqJyX5SDwoPnBHJKJqZySJaK0eDTDYfP4pO9efN90Xemig+MqypWbod3 YVJi2pFIZEXIeidJbJh3Mgw2y8yq+JN0MHBt0gLZEzk5KGVsjQOxZpS31ZJSfuZpE4RkPh fFjQekVH/NCo7LjJiRuqZbv5YpLklkHPwvIGLaQ+8MwmadOPV2DBjqQRMALlXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtL4tnE93a2GyJzGruFUft86dzTxJwa7HJ5itmgP1iY=; b=TL7r82gB9a4Y6JigLjystDncPGt/mANucGJFakYiV3lV/jSATRc68FSU1jdeF20UIpLRVq DjAXhwdwQtscP4JcS1QsMTHxpDaKXzNOv7UGOee6QEcr38c2UP0CWInYSvL1C+yymWpJsv 67xi2A3DQu+PQDAr1sqs+F3E0AvPPvbLl0v2MNBJjECtQfaWz8GhUJlHksADrXlKZW/5c5 JejW7hYf/4HFHbAer06Hmq1Uz0FouYeRTAorrJTCNNczJU/qyWjmJlL+TnOZNso1hkIcnA /TMTRsezFf8wpqB4l1OuE3z3F+Zel1pAX1GnCBzdoQY058j29q52qbuf7BA8nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5Y44MYz72q; Fri, 22 Sep 2023 12:44: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 38MCiHh9031095; Fri, 22 Sep 2023 12:44:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiHOV031092; Fri, 22 Sep 2023 12:44:17 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:17 GMT Message-Id: <202309221244.38MCiHOV031092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b4c409785ff2 - stable/14 - tmpfs.5: Sort option descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b4c409785ff26af384d83dfcdf21ddf954d0bf87 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4c409785ff26af384d83dfcdf21ddf954d0bf87 commit b4c409785ff26af384d83dfcdf21ddf954d0bf87 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:31:24 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Sort option descriptions MFC after: 3 days (cherry picked from commit e69a5788273b4f531a49054e0238424826375633) --- share/man/man5/tmpfs.5 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 1644e1c5d1bb..8999fef40f46 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -109,12 +109,21 @@ mounting .Nm file systems: .Bl -tag -width "maxfilesize" +.It Cm easize +Set the maximum memory size used by extended attributes in bytes. +The default is 16 megabytes. .It Cm gid Set the group ID of the root inode of the file system. The default is the mount point's GID. -.It Cm uid -Set the user ID of the root inode of the file system. -The default is the mount point's UID. +.It Cm inodes +Set the maximum number of nodes available to the file system. +If not specified, the file system chooses a reasonable maximum based on +the file system size, which can be limited with the +.Cm size +option. +.It Cm maxfilesize +Set the maximum file size in bytes. +The default is the maximum possible value. .It Cm mode Set the mode (in octal notation) of the root inode of the file system. The default is the mount point's mode. @@ -122,12 +131,6 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. -.It Cm inodes -Set the maximum number of nodes available to the file system. -If not specified, the file system chooses a reasonable maximum based on -the file system size, which can be limited with the -.Cm size -option. .It Cm size Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, @@ -135,12 +138,9 @@ megabyte, gigabyte, terabyte and petabyte respectively. If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including main memory and swap space) will be used. -.It Cm maxfilesize -Set the maximum file size in bytes. -The default is the maximum possible value. -.It Cm easize -Set the maximum memory size used by extended attributes in bytes. -The default is 16 megabytes. +.It Cm uid +Set the user ID of the root inode of the file system. +The default is the mount point's UID. .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 12:44: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 4RsX5b03Vcz4tptK; Fri, 22 Sep 2023 12:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5Z64G0z3Kcy; Fri, 22 Sep 2023 12:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8aE4M2FoyRjxyY7WPtlW3AJnS6NdnVvA6LlIhBA7Eg=; b=gaeA9VDYTceJ3lb3csBPPgWqkYTcbm6B7wzzGkpSF/UgJ0wA44zox6uDQosovlpo2SdubV jj7p/K3WutTgzl3XqR3ybhnqe09cieA/bBp4cqif6rld/yCKhhdv07k4ZgYjVRg82fYH+c BFouptsYvULsOs8y9/cqgbMz/FRBQi/1VFfJKXQGIeVaSSRxAibJapJQ6LarJ/LYRsD7SJ 8DwHcfBqMRxKLNbOy1SU847xxTnTE9uHT0l1huwXrZwOPOMdeLs/dJDH1SZEkGmRwb4Phg Bo9kEDtK9TMsbGHh8eE5j/KjvrGiWEP4axg057iTQ70YE6aCQ7vWSc1ueKZNrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386658; a=rsa-sha256; cv=none; b=TG6kpdAiQm7oPyZzh+1ILuYhB2m8atosAxyejPURq32SZx6kcx3ZZSz5EyLwtnMKjekvXN AzrRJRjtEQJ0rYgltfzv2DcK/ViGU57E0Hpu+S76Uspfqjg+f1vs6ZPz58kFVMdI7z7aMA jMHEQr1c36fcjITQpocun+GsBCVdfbQyzaGyMmovlnhEIiF0+P7m+hUBQ1p1ELVKdsWmhX 9ueQhBmHAkqUVjk+jnLKtiOZ9o76juog/3WDxX4F5/1xdoQP/xmt76bGnRyE/9S/ushnEi fXFE0jFcb0r04/XzSpwBOAo5kAcjT0VrRI1/q6inul73DUglji+YJ0ljxKG7ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8aE4M2FoyRjxyY7WPtlW3AJnS6NdnVvA6LlIhBA7Eg=; b=tIabvoQKjRwMWXoaDDpAbQjNswmUfl0+ULdtYHk7wA4bBnbYFYcdOCtKFLcduljNKTfomT o84O1tSmO84KMmtpiQBosu54bwsPoj/dMgnAm2V9cN8RWV77sRy9OIMO9WQQHLSQSl8Rzi lFAU96MpJEJF+Y/o/9EcIvN9PGK9ODnVBrxfCrcPdUCjaNgCuWfHaxmGd9TosIJTuUl+YR z//2QCIiar2eAAcFUs6u0DfJaM/KaWToLFoLu+oxHmcDAvVbb2ysxG4ZJBuv4Geiv65Iqq 3DlF+qiOa8FyZIplFvQkXRWCvTtXhGS38q4kcKISbt4c6p9Ji724x4LgpiG+SA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5Z57MQz7J6; Fri, 22 Sep 2023 12:44: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 38MCiITQ031136; Fri, 22 Sep 2023 12:44:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiIsA031133; Fri, 22 Sep 2023 12:44:18 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:18 GMT Message-Id: <202309221244.38MCiIsA031133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 26d060cb46d7 - stable/14 - tmpfs.5: Document option pgread List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26d060cb46d747b515ccb5a63dc37ce1bab47596 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=26d060cb46d747b515ccb5a63dc37ce1bab47596 commit 26d060cb46d747b515ccb5a63dc37ce1bab47596 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:38:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Document option pgread Fixes: 765ad5b28d3f tmpfs: add the "pgread" mount option MFC after: 7 days (cherry picked from commit fade2298889d588c15705b44e336ff02cc96f956) --- share/man/man5/tmpfs.5 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 8999fef40f46..33ed055d7f30 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -131,6 +131,8 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. +.It Cm pgread +Enable pgcache read for the mount. .It Cm size Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, From nobody Fri Sep 22 12:44:19 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 4RsX5c0gZXz4tqGq; Fri, 22 Sep 2023 12:44: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 4RsX5c0Fwmz3KqB; Fri, 22 Sep 2023 12:44:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ac/QnbI7mXztD0S0eD9u6MsJeRxHsU9SW0jxajkR9+Q=; b=rq+uPCr6Z7eJYt4rjkYlbxtTVJASsZ7RMOcnnpTg3kxIcxSinscETiXG51dF+m6rQVix2x K8HvBqLrzRlO8JMK34+ditjRkW+8scCrZcQEKIB9DJlim5plf+/WxYGzLMLXP+wZq5KnO+ jZNtrtubzXHmllEjs3AoCEPgI0TAtZsUe01IUE0FvQAPpGTramjeVUx8jKOXIC+HIKgh6n A58yXATXRPWdT2ovv1diCgZR9srqNylwlFWdWOerzXsZ4mkA+k0LO8G+cZ3Qylu+NYTLkI yS+6pm53jY4EHGU+zpilzvIQlpCnhxFNTlin4VlR8LtL32ujJzm2qt+lEtnEzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386660; a=rsa-sha256; cv=none; b=ek7mE576+VYROQTZuyGEmnCbZW+P3E+lhvh2mdzkk67UnI1Gua7xNTXAHdX9x2cdGErbfd Unl/4gXXbZAHBCPc7xayG+58jJEkUInulDST9GjsY8jfclPwI4FBP1dDFSr5A3Q0XUTvki cy+5Uct+Blav4Tfj0OoiU4BHqmfBMpSM/k6jM0x325i9JKYOyu+Ua7UHOgkX73BdtS0t9J vSOWDb2nhl2+Qn0xLkmLr7HvANS9NFNykk4OvcrEo3JB35TB0ctz6TSO9T4IRmgE/78uY0 Xm3sXqbAjHKGsLsd10b4plSFKGx0np8Z8jfpKjIT9iAX8mu/mqaA7Yv2Uus2Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ac/QnbI7mXztD0S0eD9u6MsJeRxHsU9SW0jxajkR9+Q=; b=ozhbPxq2m32Ly5Y8z4jcK+BsKB2Xd1m8mR7fwNoO1d5z2m6MxHvrdz85sglDHpJXeFkhqd GX0q758lQg9xGSMVd0R0WmLQT2wNNS2qE1Ep+jw25Yl4OW3eYepW8zZzHfSTyfEqr90JbG hk1L0aVrJ0Tcdalzo8yOP1+Dk+1BjqupQABMkldCtVOTspUzuRqC1vjd22dUgOuObvJPA3 JOnw481i5CVZMQQTOQ8DXHDX8bX7kqM32ZbSjW+TgzRuhFqACkUNxcXnoPGffwlz38rBpC Hu63T6vDYYPRg4agvfNdfergr4yYHNB/UXMTzDe6o0iuGv8pzohbz+u0w2hB4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5b6Bdcz7J7; Fri, 22 Sep 2023 12:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38MCiJfW031175; Fri, 22 Sep 2023 12:44:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiJlH031172; Fri, 22 Sep 2023 12:44:19 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:19 GMT Message-Id: <202309221244.38MCiJlH031172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f4db7434f058 - stable/14 - tmpfs.5: Document option nosymfollow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4db7434f0580438951c3c45e69addd7a47bbd66 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4db7434f0580438951c3c45e69addd7a47bbd66 commit f4db7434f0580438951c3c45e69addd7a47bbd66 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:43:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Document option nosymfollow Fixes: 15df90218bb6 tmpfs: support the nosymfollow mount option MFC after: 7 days (cherry picked from commit 942cc861f2cb5af287f15aa9b1bd56527f113032) --- share/man/man5/tmpfs.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 33ed055d7f30..c442b868dd1d 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -131,6 +131,10 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. +.It Cm nosymfollow +Do not follow +.Xr symlink 7 Ap s +on the mounted file system. .It Cm pgread Enable pgcache read for the mount. .It Cm size From nobody Fri Sep 22 12:44: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 4RsX5d1yRkz4tpwR; Fri, 22 Sep 2023 12:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5d1DNYz3Ky4; Fri, 22 Sep 2023 12:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0Qdv3SdPMgwZuiMY0vGCHbhF+u9q9F7lYzjHADLd4M=; b=OnN/+Af1smTozXM6PpfARzmcF4IQ2dEjZyuEqINyTU50JbdyYsC8I8HmsY8m0VPsPss+Gv sOmqHMPBX1KL9HnwIA8oj+8LnfQ1kXyflQnnMe18ncgpzFp3zHADZRboRD0HsXkn5tm09t qFC5LGNxmvKONLTT5A0jti1XTdXZzsAe4DezmcyAtprW2N2zUwPKiiQKfApN4IuQblGDud hcKwsl5SMNZvK9SLvgs8uMG+9ZxpBkeA8onylxTOX60creUAQ02KNrEE8sC4V7RPbcLhB1 +FwTICfkJuqfX9KsbCFXzlf2XX8oDejEm+x5cTgpYhfbpdGPv6jZKITGZRrPvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386661; a=rsa-sha256; cv=none; b=ciGo+0kFNee4KsioEX8w4rLst4nQ2KlQdyS0yTPhQwyLqMzziUe+ZxSOol4ieODA2hxbFf T6bK3SahdtT5YPY70l8s7axHzLBiaicVeAhZOfFrR3nyrllYEyomGKwB6p/6ocA8wVXMP8 OX555LrfdGu2j5K6PbiEZ/orhQmA5F9HaUkNV2u1wG8VDcyuXeN3MYr50fCk+VfT7slrd/ ZZ6j7dZuTv0Sd2970Y23hpeBUvsebbx9npAlogw8ZLgZRNld++iKyypcjeuqYwRmp86eql O8jCCaENmKmoiRS1zv1NlSynK0kq2PlPsLzkK/WvlrNcVvzR2ok5+Q1emtvrnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0Qdv3SdPMgwZuiMY0vGCHbhF+u9q9F7lYzjHADLd4M=; b=Hp/DZZZ0l03KFLzy5DgREycVkf9y6Xz3bXwh0dQV4NcQh+3tF/QKzn1VdP2UEze1FSiOA9 DhQeODog86o/O6nMs2hAuyAfcWacz8Qy6qfkYqHzpnVouTYeAT2EDTEtxdCtEPJFxhvvOt GsqPOAR95tYssjfzK1O3wTG86tloHkgXcd7655THkMQ503M6mTYftcK6C/Xa9He1V8m/Gi 6gKmBxLiZosuoRqAzSL4jlhF0rQQ5AHnySEDpOPiJoeOdWVTivz18v7tukp5qW7gVwQ/SH FU9WxaIvpYKNr73kqRGQm95pjpoEB6mR0q3TdvZl3jEquy6eFWOC5CvhJUOKhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5d0DJHz6rd; Fri, 22 Sep 2023 12:44: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 38MCiKlJ031214; Fri, 22 Sep 2023 12:44:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiKkt031211; Fri, 22 Sep 2023 12:44:20 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:20 GMT Message-Id: <202309221244.38MCiKkt031211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 72ac353efe2f - stable/14 - tmpfs.5: Document option nomtime List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72ac353efe2ff6e80222cbef3c3371792273d72c Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=72ac353efe2ff6e80222cbef3c3371792273d72c commit 72ac353efe2ff6e80222cbef3c3371792273d72c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:51:50 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Document option nomtime Fixes: c1e84733ac7e tmpfs: add nomtime mount option, MFC after: 7 days (cherry picked from commit 6a1de1912d5216512a73dd97c4ee454d44b8fffb) --- share/man/man5/tmpfs.5 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index c442b868dd1d..8fff1c15815d 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -127,6 +127,13 @@ The default is the maximum possible value. .It Cm mode Set the mode (in octal notation) of the root inode of the file system. The default is the mount point's mode. +.It Cm nomtime +Disable the tracking of mtime updates caused by writes to the +shared mapped areas backed by +.Nm +files. +This option removes periodic scans, +which downgrade read-write-mapped pages to read-only to note the writes. .It Cm nonc Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly From nobody Fri Sep 22 12:44: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 4RsX5f4KcHz4tqLf; Fri, 22 Sep 2023 12:44:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5f26yJz3Kw0; Fri, 22 Sep 2023 12:44:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6pOYJQHjTQ0IljLftzdT1Z9E3cSqe3CgFJe1/2jGr9U=; b=Jn7UvIlZU0INitUPVY7S6HtN+lMmdd88QSysFupsz3D+2ITTU6La9nlzp1DpAyVwcnUX74 s9O9czngP0sD5ePx9Gcajl+cNIAGFsNEVu8QEJtNQy2AokU7JcrdhyprNNTsFRlaCTL2tj gGmpzhap7ZemhPlHonwctJyD89G5Isx2x9myS3CHdimQ5aKe/nQ/q8iJgq9YF651ZPCg0Z ScUpvW7vPGjRKgzTbi8ZSiIIujO36VqnwgXa2cX5Q+A39j6YFiKQi9uFRJumw3ZAEnrnfi n1uwvEabMCn6C6CI8YbNMElYrTjgJlTgEyYwTl3mhn0Yx2Xgld8edlWFF+PKtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386662; a=rsa-sha256; cv=none; b=bYQH0zicogQPkfZXaXobWEeWDtOYEG089QM+aR1f7bpC2cxjJjtmv9MrYdXGFj613kxdhu MjhkKoV/+DwcXDonEWyqtZyJSiy8icPznEStZU6YfbDFyp0YMGxGZfkD5u0/RhIaY54hWy AXy3hga4QaapFPQ2ePoPD4GFVB9+kfzganBzybgDMjHX9G1kE18P99cK302ph0LEyFhfIy fdzpyfYVAZEfObwDBB1Lvqc6O52QCn1TiOxr2pAxCBESHhK2U7DsRqBMan2cU2ixbUDlXb ru2KPNHjZAdVDNqeNdeOd4v/9Or3rj+KHdJ9T1b13bkkwn7Akrs45HA626udzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6pOYJQHjTQ0IljLftzdT1Z9E3cSqe3CgFJe1/2jGr9U=; b=wt/2AuX9gyzDEcTW/2H8wJimWbXPYZYQea6yMFQ8fScS0YKJuj0hkmCODD1Q5R51tBjZ67 f6U5WqzWtV48FhwmIYBtHc7F8Uk/O291KuWLDekuBOFfV8kyPzKQmI1yoH+jXFAVQi+2GK svP1gYf00nQlOyMtAIblQsUmNHyWooSgNUuObMPIsdorrlZHapu5JoWoyEB3XOtTFTCiDh jen060iENnV8JG3ufbOrj3Wy24q256I7/M2LB2QtiHqwTsgbnCAHN8xun104gWjVHqKgZS Amhwk17lgyZ/kisBq/v9kzy2JoWktddU45QgFjeo2HegoB/AQ2dRHZLu/G3HHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5f1DLJz74q; Fri, 22 Sep 2023 12:44: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 38MCiMN7031253; Fri, 22 Sep 2023 12:44:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiMYh031250; Fri, 22 Sep 2023 12:44:22 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:22 GMT Message-Id: <202309221244.38MCiMYh031250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 89d376545231 - stable/14 - tmpfs.5: Document option union List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 89d376545231aeea60923982e7b3bf0435fd347a Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=89d376545231aeea60923982e7b3bf0435fd347a commit 89d376545231aeea60923982e7b3bf0435fd347a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 20:29:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Document option union As noted in 59169d915600333b7d9187097f157865ba642256, tmpfs(5) supports the union option just fine. MFC after: 7 days (cherry picked from commit 1d225179fd5d7eb932486a94abb8b76be7e44241) --- share/man/man5/tmpfs.5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 8fff1c15815d..bf07f06de026 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -154,6 +154,9 @@ main memory and swap space) will be used. .It Cm uid Set the user ID of the root inode of the file system. The default is the mount point's UID. +.It Cm union +Refer to +.Xr mount 8 . .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 12:44: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 4RsX5g5W29z4tptP; Fri, 22 Sep 2023 12:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsX5g3d0yz3KtJ; Fri, 22 Sep 2023 12:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toRGk+yqYDVHMEQcolGPA6xEdZptwW6bBimsWZckdPg=; b=ojOtMCIUFwP/EiPjuxnB+7scTlMcaRYHY0iN/QWEJR2LcVU3chIglMQo4EI0NR7kePaqUT J6b6le3frFHDPJbr01R9kEzKPWjNOTbLmWvt3MIeyKg7Tk2og0ZzsIjtcDpQXn79gpFj20 mb+zacMFY1i2eGgkGYuQG4tms1C66KD7NjIiaSZibdBCz0jdu8SmghT8s0hCqyTiBxp0G5 G4v3AClE6EmgyKnbbcY7x/pVyUb9c1WgxvzD9NJ6KrMRnscdGYpXPDbxoYh8xgg9OUMXZa JTxJMHrdGPMmD87Zt2orkCeIHXaXngLZN+mCeePC3vZ+uK5SiErxe128chVhnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386663; a=rsa-sha256; cv=none; b=EXdxi3/AaSs/WkKAaCizi8bNwRuDmQCbZwuF2XQA50mB1g/fMtcU4m9j+wr4bm4KI1fAWd SxkMqhmqWgWLzqCDT1uCgFwvuf1OjGEmor3zJPLFRpEVCZiNn6gJ9Se1fDjcquDhD9Gmfb I2IROICPMDNIU39F+P+wzigtRDN40SlAnKjSWrxcVNbzTOBsAiQhWcQ/dmxsOJ2coKsP1h HRKORyavz2D9dwLsluSjKghKboMWbQQekTYHmb4wXDsn72Wn2JVw9IeHkrvoaGaJ42YhE1 Ln22D0g4+qlstAeo5OD7PzyMZ3f4l4vgs/FrYKXH7/0emvsYE7srpw9/pRAr4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toRGk+yqYDVHMEQcolGPA6xEdZptwW6bBimsWZckdPg=; b=xpJuernbk4GAUwtenOBxm+vuQIZnTUA2w4BQbPKZ7SoMrQ/vIosDbMa3Zui5KoPxKe+wXO BDKUykBnh04jDJzBi59MVAbxTsgOb8Jq9WWhwMSeUPeKuceuRr6CRxV+xFoJjZpNHv0Dh1 rqwUjGyB3yAaIdfFTJ9AmiTp25OIMjWTvMd5Gzc3YoQg+YpDD3eRmgMXFns2bSWRRajzGR 1xObtLyRo4CCMpyXdpT8DbaK2u1LbU6c4nMZFP+HE8bhkRHBbZWcGzyrpf1Sdat3Ly02u7 c168PlFjoZ6ZmTSGRVmMFKmnf2B6eyhy3M+vO5al4S48U6S4rGHlSeTDjQizMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX5g29N3z6xK; Fri, 22 Sep 2023 12:44: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 38MCiNHX031297; Fri, 22 Sep 2023 12:44:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCiNiZ031294; Fri, 22 Sep 2023 12:44:23 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:44:23 GMT Message-Id: <202309221244.38MCiNiZ031294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: eabe10a91bc6 - stable/14 - tmpfs.5: Document option export List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eabe10a91bc6c290bf7643de90ce63a5e184f213 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=eabe10a91bc6c290bf7643de90ce63a5e184f213 commit eabe10a91bc6c290bf7643de90ce63a5e184f213 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 21:58:08 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:41:29 +0000 tmpfs.5: Document option export This is a no-op option supported for the sake of NFS. MFC after: 7 days (cherry picked from commit b2bd87bb01a97b5b025614a6bfccb8e109c201cd) --- share/man/man5/tmpfs.5 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index bf07f06de026..c01aefd8550a 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -112,6 +112,12 @@ file systems: .It Cm easize Set the maximum memory size used by extended attributes in bytes. The default is 16 megabytes. +.It Cm export +Accept the +.Cm export +option for compatibility with +.Xr nfsv4 4 . +This option does nothing. .It Cm gid Set the group ID of the root inode of the file system. The default is the mount point's GID. From nobody Fri Sep 22 12:45: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 4RsX7S13bSz4tqM0; Fri, 22 Sep 2023 12:45: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 4RsX7R6jxxz3NM4; Fri, 22 Sep 2023 12:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkimcf+ycvXALR3vCLFksqWpVpsvjws7fc318CTyoT4=; b=mGZsEeF+Q7LYdx/odkCNagD+h5y6sy7uHeRTuRx/vzc/4WMppqLDCtFZ07Sj6CMnEUXpxI 3vSocBpHl54mrr1KL+RJ11mLj6i9iN3o3jqtAEE7G5Dh2aCdnxd2cM/fP/VWE0jtjSCl82 8Cycqzam/wZgt/RgUQuv5IUIRl6nXdQqUeWu1UVNM11GPpwXPcoEo64DiqD6VN59gSYkmF 0EWwK7ANiR3rjVAyDsjHI+/i5cP58OGo4t/uGN10NTVZ4HVaV6dSqvwMzv4fyfVdgO81vP iNwQdWRrcFRsVoc553q8qA8rNZNtxDSjoN5mUlHDovPk+K9vknG5rvfLR7xjeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695386755; a=rsa-sha256; cv=none; b=ssBCBDwhVwKcTjC/Hs0NWU72+r94zLGidVGqQQoEUJYFnccQRIRtEnw9HVaidzOlUQ5SAB 3v/NSB5me53OZRXcYoBWGzvhgrbALPWnAdlBAYZ7/+wiPw3tYdl7zasMDOcw6DyzV3+ftG jprkdDeypcLCSathkpybzcfwyPe5yIpS0GOXE1BdpU+DQWE5wkmGARlBqosPNTOq7qQidB Z8lMniBIQ3xkad+P4tHkjX79NGFuDc1oN581YUOl6gPhUMELTGqCEGahgK8EeYrrgMtlYO PyP40LpgRDbLGdeVhePh4221KMm3Wqn5Zm5dpGWw1bgAWi77H/GYxeOMoMpsOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695386755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dkimcf+ycvXALR3vCLFksqWpVpsvjws7fc318CTyoT4=; b=qSZIjr43ikqz3oR0OlrMRbSGbSoVSJ7lcNZ6TE39jehaNZdcQ/nj28KFYtCQ9DLwrEOMF5 oP8s6yqogJYlKfo1WJPqkZnjD3jqKeugCXKYMor5ViA2LSwKj4cTUg6NmB6crASN5yC/l2 SjtelVsKKqX0m7D1jsdsk3QS3WU8vpFHh9IVaev57G4E81cqK/qF6szReP0rygE/wcRmZo 6J1RHgc0Fzun8DjojrlI0Wg0D1GZZYRTztL4/nFlyeLfYXA0HBXkfqAGih/LqsVL53GKI7 kGXHZwrd2NeBNTN6Ztlp5JVZKvPZV8t9Zhq1VaAbQpuEjTeRW11Py0swK6TjSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsX7R5Mwfz7JK; Fri, 22 Sep 2023 12:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38MCjtmP031713; Fri, 22 Sep 2023 12:45:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MCjtg4031710; Fri, 22 Sep 2023 12:45:55 GMT (envelope-from git) Date: Fri, 22 Sep 2023 12:45:55 GMT Message-Id: <202309221245.38MCjtg4031710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fbd543a3fe30 - stable/14 - bsdinstall.8: Set Bl's -width correctly List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fbd543a3fe306bdf84775f869a899c21fdc0d554 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=fbd543a3fe306bdf84775f869a899c21fdc0d554 commit fbd543a3fe306bdf84775f869a899c21fdc0d554 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 17:49:57 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 12:45:50 +0000 bsdinstall.8: Set Bl's -width correctly MFC after: 3 days (cherry picked from commit a8f5c9d3305feb8e846e2ebb6511e350c2702eca) --- usr.sbin/bsdinstall/bsdinstall.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 215a0a28f8c9..77da9622d4d7 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -23,7 +23,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 18, 2022 +.Dd September 18, 2023 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -69,7 +69,7 @@ For interactive use, most users will be interested only in the and .Cm script targets. -.Bl -tag -width ".Cm jail Ar destination" +.Bl -tag -width "jail destination" .It Cm auto Run the standard interactive installation, including disk partitioning. .It Cm jail Ar destination @@ -272,7 +272,7 @@ Many are used internally during installation and have reasonable default values for most installation scenarios. Others are set by various interactive user prompts, and can be usefully overridden when making scripted or customized installers. -.Bl -tag -width ".Ev BSDINSTALL_DISTSITE" +.Bl -tag -width "BSDINSTALL_DISTSITE" .It Ev TMPDIR The directory to use for temporary files. Default: From nobody Fri Sep 22 15:07: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 4RsbGx20njz4v0mW; Fri, 22 Sep 2023 15:07: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 4RsbGx1VKpz3ZMf; Fri, 22 Sep 2023 15:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoeSDnP5DDCXNsgeIbDkmTOT6RPORDqBvV62M+yI4aE=; b=Bq44rCg08qiVvd8X2fXDtac0vJAAt262QqjXpKeta6Ur6RIZL0QLMH74GphNHn/+dn/uMP 09vhq6TQ2qBgLWuHz2jVKX9pdnuhGmw/ArzutXwBfBta3TcuBblplUYFdPqnVpYDopelqD ojLx7Ihs6OmWcvLmrLET6n1PhUfkRqyBL/aZfY3tELr90lBwpUoqbCLouCIuDoSbAVrIPc g6Vg7scct6aj1LXJWeKbcNIbEdSz97mDhtT05bYlFajgNZfBy48EwfL2HOy90XzGwrX5D6 Upk57I0arPzcOA9ELzvG56/GO6mRfjLpuzTYzFc1YbETrIvIgJDgz5XrlAnD9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395257; a=rsa-sha256; cv=none; b=s+uFhWlCujZ3jrb+IKOw/Yl79J1YdaB78SEqWU9M5Kj7KDpgWuEV/Y7qrmTBmMP8pDJ5Hv 5r/vrU2/VX35MYHSEJmzCZ83DDt7wAtmEmWLpPH5lHvNvJysUczjomcS414Y3WjMQuS114 Alsmx97g5MkN/LmkfYMTM56VpPXVciboL1HDXvaSHzaKvVJmiat1yjnr9unvFTB5H5oW1N Qt59t3FxySoMkTu5dF3Fu40/rjanhn9R8i/8PvhPSXZXmcWuq2d2CgYmTMDCjdrBI0vOoU qCyngXG8oQSMSxEQsH5IqaQ8Uo1LHpW1xrXxsh5H5j/D6ynI6W3LEQlkvJ6W9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoeSDnP5DDCXNsgeIbDkmTOT6RPORDqBvV62M+yI4aE=; b=XmxDzpRKR1cuSZtpxfDH+UqA5PNj1NyXPLl6cP2ne349DoEEv5Jy4B8KdcL6U3fwaazY0R U2uYEV2wXDaCf/1GOGBDORV4ebWfoYMu5XwFJj1UdoSDCEKCWR/gNBN5vqp8rm4DUtxisS sxb6reMOaxPGnncKJj9mW8J66GUG+kqJdM1lImPyx1dP8huVz+Gl6RiorEMj/msvVD4dZ7 fRAecIYML9Jx0jEK3tB5zf4pGut7OJXuvLMmrTIOKur6xSiMlYESdHUCSM+CtXByj+vUni C5/dF7ylZjeRd0ydFoIxVC58rIsroP1EJJ2CgQft82VZjXpopxX1CcqWYn0Yig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbGx0YfKzBW0; Fri, 22 Sep 2023 15:07: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 38MF7b44064049; Fri, 22 Sep 2023 15:07:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7b75064046; Fri, 22 Sep 2023 15:07:37 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:37 GMT Message-Id: <202309221507.38MF7b75064046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e43a4603222b - stable/13 - bsdinstall.8: Set Bl's -width correctly List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e43a4603222ba2822c6869cad364bd6721de0216 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=e43a4603222ba2822c6869cad364bd6721de0216 commit e43a4603222ba2822c6869cad364bd6721de0216 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 17:49:57 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 bsdinstall.8: Set Bl's -width correctly MFC after: 3 days (cherry picked from commit a8f5c9d3305feb8e846e2ebb6511e350c2702eca) --- usr.sbin/bsdinstall/bsdinstall.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 6787fdc30175..4b7e8f2fb853 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -23,7 +23,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 18, 2022 +.Dd September 18, 2023 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -69,7 +69,7 @@ For interactive use, most users will be interested only in the and .Cm script targets. -.Bl -tag -width ".Cm jail Ar destination" +.Bl -tag -width "jail destination" .It Cm auto Run the standard interactive installation, including disk partitioning. .It Cm jail Ar destination @@ -272,7 +272,7 @@ Many are used internally during installation and have reasonable default values for most installation scenarios. Others are set by various interactive user prompts, and can be usefully overridden when making scripted or customized installers. -.Bl -tag -width ".Ev BSDINSTALL_DISTSITE" +.Bl -tag -width "BSDINSTALL_DISTSITE" .It Ev TMPDIR The directory to use for temporary files. Default: From nobody Fri Sep 22 15:07: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 4RsbGy3KqLz4v0VD; Fri, 22 Sep 2023 15:07: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 4RsbGy2jYTz3ZF3; Fri, 22 Sep 2023 15:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RHQKYKrLIwRTfmRu9qLZZorCrMPinF8+ToMD1eNzOFY=; b=K5crhGhbhg0bxoGN6fmN8LTw9Wc6ohYhvVM1cUaDFw5mcnAbeRtDdqG+0d4eMZ/ADHM6G6 6Ss39ycr9C9zl5ueldtL75SXtCF0RiEjuFKXAmQjBRAEHdBc3sM8DCvA1Xra3do3IS16vX rGtPQHSB2Kr55KYHGPhjvJOnjldbhccHMNpI2nM2kB7UcSrDhjQISh/Tvm8HlD9AdQXzss 7GW7dT/EmYUJ8rBYztkqYIlJpJNMxEsz1+Yt+xJqFOwQX2aC63XmH+fh/cZwYKRnpRh0zc yebso4EB4KgPC20yr5GoQBlS6TIIoMuhmNiaKmhQU3CYFtDxJmeJBH2cBDaVjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395258; a=rsa-sha256; cv=none; b=lZz86m4FAvs9U5vhmSEFrbcfrcMlLDXgPIOHfGRwxxzZxOIHPf9qFJmK/TLZuz32EklHpO RaFgeawXkteFRwC88n4UIUiP/H1Gh4z8oPzWJC8X3tTW4ee+0f+JxCVpzFoUOQMdUqwc0x 2gEjoDUZEXJ9k5ObeMCrymZ2VgOScWBhIFQIAqE/pWiMR+u0WDXmfopY+5v0lx1vVIi9vU mk8iymd5Rf1pgFHCk/MobM3fvA50TQNls+zmVDSIFU4uYjLzWXyrJcOjf/RFQuqgCMkUN1 +raFkXOpJdu8j2WJlm6qyA/LrdQuhwkycfDu5fw9m+aTQJMOAl3VNYmFUqZFtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RHQKYKrLIwRTfmRu9qLZZorCrMPinF8+ToMD1eNzOFY=; b=OvrvuAguKzNyPqPvRAhtR+g6eYHzIsTUkUaIr3XKsMtGhnQQ803Rv9E7UAaaBxjzZntGll FAuxeBbMtjj7hhQD55TCKYZJTfNB3pV7qAbijK2K74QHJDxroITAbNreSWcZy0+aeEVO7U 27Rh6KF2r+Srovj0Vge3UXNFyyJE1mO/zVz0jP/ahW1hTGevdo621L97vFahdfOd2W5+FF bu/YPQrOg4PHiCGLInbrpG3IT2LAll3C02LKinraItBif9EUHRa6exDd1awt33qXkwTl+s Fod4M0hfddY26ek8U1rDbCqquIDIkZiA3RrO922XLWUl7T+hRRzK1wF74WWmxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbGy1TTfzBW1; Fri, 22 Sep 2023 15:07: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 38MF7cdN064095; Fri, 22 Sep 2023 15:07:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7cSp064092; Fri, 22 Sep 2023 15:07:38 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:38 GMT Message-Id: <202309221507.38MF7cSp064092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 24a3cb75011d - stable/13 - bsdinstall.8: Document BSDINSTALL_SKIP_* variables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 24a3cb75011d6a81aff0fb244d803572cc857d03 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=24a3cb75011d6a81aff0fb244d803572cc857d03 commit 24a3cb75011d6a81aff0fb244d803572cc857d03 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:11:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 bsdinstall.8: Document BSDINSTALL_SKIP_* variables Fixes: 17f4ded55180 bsdinstall: add variables to allow skipping MFC after: 3 days (cherry picked from commit fea2cffb8659da1590401e04ce8cbf823c9da66c) --- usr.sbin/bsdinstall/bsdinstall.8 | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 4b7e8f2fb853..2fbad48ecad4 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -323,6 +323,58 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_HARDENING +If not empty, the +.Cm auto +target +will not invoke the +.Cm hardening +target. +.It Ev BSDINSTALL_SKIP_HOSTNAME +If not empty, the +.Cm auto +target +will not invoke the +.Cm hostname +target. +.It Ev BSDINSTALL_SKIP_KEYMAP +If not empty, the +.Cm auto +target +will not invoke the +.Cm keymap +target. +.It Ev BSDINSTALL_SKIP_MANUAL +If not empty, the +.Cm auto +target will not offer to open a shell in the new system +for final manual modifications. +.It Ev BSDINSTALL_SKIP_SERVICES +If not empty, the +.Cm auto +target +will not invoke the +.Cm services +target. +.It Ev BSDINSTALL_SKIP_TIME +If not empty, the +.Cm auto +target +will not invoke the +.Cm time +target. +.It Ev BSDINSTALL_SKIP_USERS +If not empty, the +.Cm auto +target +will not invoke the +.Cm adduser +target. +.It Ev BSDINSTALL_SKIP_FINALCONFIG +If not empty, the +.Cm auto +target will not show the final configuration dialog, +where earlier configuration choices can be revisited. .It Ev BSDINSTALL_TMPETC Directory where files destined for the new system's .Pa /etc From nobody Fri Sep 22 15:07: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 4RsbGz4Chxz4v0VG; Fri, 22 Sep 2023 15:07: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 4RsbGz3QlYz3Zdx; Fri, 22 Sep 2023 15:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rn4g51FuljcKshdRg7DeoVwCyQG3/+2Ai3LiPD8X0hs=; b=jvcdCxxKsnfixaz0fwvP5s2JXUJqwgJC5pbOtYfwe7bIg485CmJ5jYkWPyvf4r9bv8d2VN ZHidRUl1AjI2GXhIcO6NzOLOzSvpsw2JpLM+hGyUJUfkPztxZeFgQgA6k6eE8ej7Zs7Ty5 CcuVCeaul30k61aapQJxpQYlljEDX7q1YDxxJd4jklMWs4/+Tv85kTZq+QtmWZSCKpjR1q i0QjOzDV7gLusWxvRt1YmQvk5luR+vo6/oW8nq+xQo96xfFCkggD9bVG5Wm4Jf1cWlG4Sq K5aTp0qLuDOfaG4I25c6q0nRUPFiyV9339Mhb3I+8UlyhEf/euowYHOxU6ph3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395259; a=rsa-sha256; cv=none; b=dFbSflqwrLqZDfzRPJy3JPtbJnCBj1mj4lywV1ulvUQLc10xGzFB9YIMAMmXBevXth70JS Gr3Lfre5VDxJ12ymbbTtYeQPXIZd+RAIRkIFx3iKEQmfsNRyBAkcA1CqiVQxOmOdWPzeJa hLRF3Ji2Tt6jjYbAwfSvXmY3OlpgUYeBWtl9l9tYSpLwN3XddMahGFflGFF9BW9C05f6vQ ZKGaWtKD2TsOOuEwphcExj9ucI25kXYe41T+iLk5lRknLchBzjGxNcf8EzkjjW2l3lYlFE zDz0PeAlowJ7Vdpc3V7RS9FNzyXEWbYntPHY0rv9+Dj1bsKwflGD2/pLxAPXpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rn4g51FuljcKshdRg7DeoVwCyQG3/+2Ai3LiPD8X0hs=; b=ZX29OwjrBngOSafM5s7TJUilxOBh26co3dOGruPLqknu58/NyEcuAditEsvKPdKIrG9XjG bUf+6ZULbpFb+9qdQ8jtvZ8k7UPR48w0nMtRoBqlEHR9fjJgCJzQJdIF8jlLQ2dQy6xSem vj3o25uMSLq7F9P17RvNkMZj+f1Eht8iuV4E6Aqz5akyCyj6d94x4P/R7K2SwBqJ6wSiSV RUe7iYhUoY0F2lAOgJp6HE3/KyJCG+DigdByQfjEtcPV6scwJCScaIDBASlrLwbKmmYt5V yK+E8ZnoYIa8zaWmvx0NMmiSVh5qK2O6kZBuMrSQ2aYwxtXguViYwPHf+S/X9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbGz2VxBzBMD; Fri, 22 Sep 2023 15:07: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 38MF7dk6064141; Fri, 22 Sep 2023 15:07:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7d3T064138; Fri, 22 Sep 2023 15:07:39 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:39 GMT Message-Id: <202309221507.38MF7d3T064138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ab77ddea3325 - stable/13 - daemon.8: Use Dv for signal names List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ab77ddea332528c306faf356d49e7b58cf1526b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab77ddea332528c306faf356d49e7b58cf1526b6 commit ab77ddea332528c306faf356d49e7b58cf1526b6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:28:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 daemon.8: Use Dv for signal names MFC after: 3 days (cherry picked from commit 735637f7d68777d0befa4b9a9291f3fc02b5ed00) --- usr.sbin/daemon/daemon.8 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 4c7064fc9b67..35b877039e4a 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -69,7 +69,9 @@ specified by the other options. .It Fl H , Fl -sighup Close .Pa output_file -and re-open it when signal SIGHUP is received, for interoperability with +and re-open it when signal +.Dv SIGHUP +is received, for interoperability with .Xr newsyslog 1 and similar log rotation / archival mechanisms. If .Fl -output-file @@ -89,7 +91,8 @@ and .Fl -sighup the absolute path needs to be provided to ensure .Nm -can re-open the file after a SIGHUP. +can re-open the file after a +.Dv SIGHUP . .It Fl m , Fl -output-mask Ar output_mask Redirect output from the child process stdout (1), stderr (2), or both (3). This value specifies what is sent to syslog and the log file. @@ -177,7 +180,9 @@ waits until it terminates to keep the pid file(s) locked and removes them after the process exits or restarts the program. In this case if the monitoring .Nm -receives software termination signal (SIGTERM) it forwards it to the +receives software termination signal +.Pq Dv SIGTERM +it forwards it to the spawned process. Normally it will cause the child to exit, remove the pidfile(s) and then terminate. From nobody Fri Sep 22 15:07: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 4RsbH06Gd8z4v0VK; Fri, 22 Sep 2023 15:07: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 4RsbH04QF3z3ZTR; Fri, 22 Sep 2023 15:07:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/zNOspGZx/wlysdpOETzbS5zz903cJnz3FctkkccEis=; b=YK13ERHjwFrT0vf9uCew1TPzeylXJLYWZQtNgeDSikxDmKZseQA0a2InfIcps8xX192ap4 MX4JEphzyFDMrJUeG+xPRH13Nmqbe85QDWcwWHw6rDnWrjXZQlAzi0gHl+Y335YPsiHOMQ xBQq9hT15Lvi5bFFFswdLQC+busu3HFKC/+yfwT1IzaUZ2YIWdOFMzOAG7TNfqzOEZ917H 8pD16q1WWxodZlk47Nstr6EvkEX3PXwL1fcNbBx6N9llR5K8xRw4sIxRfZtFu9mT10UT6J U6vecrpz7OODADYObpFhf+HfBcumpxGFYwGTld78oQChjCOfhJ1zYIJouW/ueQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395260; a=rsa-sha256; cv=none; b=ZCvMo/dSwCLLlg1cBUaaVdD8cKtlT3tFlARx1rvmpzm9WdW4/z44WnClmM/SfUqOVos3EF gZ/YOTOd84tNvAxon0HK6J3y6E6An3wJ8NixL8rUstLq2qQ80RnwkmSnEebYF2hHLxucX5 Vu8AWLx92wN38r5+OOYhk+2aHSZVXqJFEuGwEVT+sYcKQCu0ctfneF4a5Tm3Jrqzpd/OfP Oo1FIaT9I46LsIJNCvlaxrqBktTxXPEBjNsPLmC3g6O1q9jK8KyKg8J7Ow5S2mWvKm/uCu Uph3H6qDfBr5beKKxvzcLVE8GR+tacUpEbF4ZZdQ4eUdqGplyYiSGekblK5Y3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/zNOspGZx/wlysdpOETzbS5zz903cJnz3FctkkccEis=; b=fMOqNnnbykQGb3b2daW52L9XCFvwqK+5hOK2IqG+wjbz87gTalX/F1QLqSAlHqvlwi968G TgtG16KY7BqhgrU7+EtQVOi8361bMJQr7f40o94AZ6UY/XFDkbEDQmfbeWtWDDH0sUo4+l bqoZ+L0qOal184+E2+mYM5rz1oFmLk+wdP84D1PGCLz2jv9uLA5AZu+dDTCYRkN0HMNSZA QaS4wkl20I7hw60/1Gl4SMC9HWG0WJOzhQpuWNY/dOPknNcmm+tBs+DsUb+Bx2n+7nZ/FS fz7huKO4/U+44/xHhDcT5oe/rcBXt3FOeUX8fJQphB8sZ5LrenDEPBDaxPxM7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH03WKwzBX9; Fri, 22 Sep 2023 15:07: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 38MF7eLZ064183; Fri, 22 Sep 2023 15:07:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7eS5064180; Fri, 22 Sep 2023 15:07:40 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:40 GMT Message-Id: <202309221507.38MF7eS5064180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 488064449b29 - stable/13 - daemon.8: Use Cm where appropriate List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 488064449b29d9241efeaeb19852136e20565639 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=488064449b29d9241efeaeb19852136e20565639 commit 488064449b29d9241efeaeb19852136e20565639 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:36:33 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 daemon.8: Use Cm where appropriate MFC after: 3 days (cherry picked from commit a5bc8e8a5863c4aea5ed7ebe2ebc2332c287545c) --- usr.sbin/daemon/daemon.8 | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 35b877039e4a..87b9bec0b3e8 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -94,9 +94,15 @@ the absolute path needs to be provided to ensure can re-open the file after a .Dv SIGHUP . .It Fl m , Fl -output-mask Ar output_mask -Redirect output from the child process stdout (1), stderr (2), or both (3). +Redirect output from the child process stdout +.Pq Cm 1 , +stderr +.Pq Cm 2 , +or both +.Pq Cm 3 . This value specifies what is sent to syslog and the log file. -The default is 3. +The default is +.Cm 3 . .It Fl p , Fl -child-pidfile Ar child_pidfile Write the ID of the created process into the .Ar child_pidfile @@ -148,17 +154,29 @@ The default is the daemonized invocation. Login name of the user to execute the program under. Requires adequate superuser privileges. .It Fl s , Fl -syslog-priority Ar syslog_priority -These priorities are accepted: emerg, alert, crit, err, warning, -notice, info, and debug. -The default is notice. +These priorities are accepted: +.Cm emerg , alert , crit , err , warning , +.Cm notice , info , +and +.Cm debug . +The default is +.Cm notice . .It Fl l , Fl -syslog-facility Ar syslog_facility -These facilities are accepted: auth, authpriv, console, cron, daemon, -ftp, kern, lpr, mail, news, ntp, security, syslog, user, uucp, and -local0, ..., local7. -The default is daemon. +These facilities are accepted: +.Cm auth , authpriv , console , cron , daemon , +.Cm ftp , kern , lpr , mail , news , ntp , security , +.Cm syslog , user , uucp , +and +local facilities from +.Cm local0 +to +.Cm local7 . +The default is +.Cm daemon . .It Fl T , Fl -syslog-tag Ar syslog_tag Set the tag which is appended to all syslog messages. -The default is daemon. +The default is +.Cm daemon . .El .Pp If any of the options From nobody Fri Sep 22 15:07: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 4RsbH15qwfz4v0gp; Fri, 22 Sep 2023 15:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsbH159Q1z3ZXB; Fri, 22 Sep 2023 15:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jhuGDJO0kgULudR6GLoYiHPZH+37VP1EpQzqWPlz80Q=; b=r68ykmzDEdDxYSs68Ashmvd1TtfpbKuEgCtSJT/bxR2vt48oO5ZRBqkBLFKKcTGZuP3llt pUbfePcaY/n2+jGGUZuBz7NRfw+1A1V87wRkhyC4LHXYi+5Eq2rGQj1Bj3Di89klYzslRH H7Yzm1/mL9HoAmqQVZlXGXQ9cA25iEJuu0gj3oT/yohJzglFFaWEOHm3FKKmGD+DoS2bV8 +dyqNkVjZfuBm5aLmURU/wUbONgL0fvmZoaLKn+AqCtm6WKSpNU+ZxL1lY+zhgCXO7MD5a 29sRJ/t/ZL/zr6Dkcj9ZBSBTKZOrmEER1EQVhP86oNO/SNvWGJqjxFLSCumnWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395261; a=rsa-sha256; cv=none; b=uSkiLWKcrE80KfRLj4ceqovpy9fCUQOP57uX8LzubUvmHgbNxxYmI/GrQe5Pz/X8am1iCG ydqRorByMvlZvnVYEupGW3uApoXEZABlwyE/YzBRAq+s2AKZlj9HLrmrtpwvoqj73HR9ar 0qZKWAXuQ0CTutmA6xm3UFOl9S3CVd3I1BRKtN03legRUzng8FUVfTStxq+DsErb8wcI54 4K6uf/ukQJr8+EZfbIGG4hJQ5HqiiKTIfRW5R0cYA8vQ07DDt1Dl2XOPjtYca2YzXkpzpb qf4hA616nBK6kxk71GdaC78VtBlstS/rcuFLMT/qPodYwvaLMGDy5jlyxRr4kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jhuGDJO0kgULudR6GLoYiHPZH+37VP1EpQzqWPlz80Q=; b=m4NV3mzkBuq1Wf7wkd7cyBQb/tdbcT3qB94OUFvyTVybnHOVbi0pi8gHFOBt+rj4JJ/moD 6+qbHR1zjcD2D0x13G2wGJ8yNx6f5AQrtTsyoczgi3uMhuywl7TgIYqzjirPGQ4acAGw8b nG90tBmmo2bmNwPQd7gVdlosKcxGrq+PDmHYOX9PxN6Im2GpdMAX9xik2OJ4MKuGpMArb+ Oka0bNxjZAV62V/RRHypy2pZeF8nf4xBMsmviFXhLUWmXdPpFkfjkGslgkM6vNYnxkElmc tPieVYq1RA1ZAD8sHprpgn8DoS/7HMAf/N0y/w2++kFpn5neMk3suKXtFj+XFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH14H3SzBMF; Fri, 22 Sep 2023 15:07: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 38MF7fYm064225; Fri, 22 Sep 2023 15:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7fbv064222; Fri, 22 Sep 2023 15:07:41 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:41 GMT Message-Id: <202309221507.38MF7fbv064222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 53512a06abca - stable/13 - daemon.8: Sort options in DESCRIPTION List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53512a06abca865da5844c101e7900a3a634849d Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=53512a06abca865da5844c101e7900a3a634849d commit 53512a06abca865da5844c101e7900a3a634849d Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:40:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 daemon.8: Sort options in DESCRIPTION MFC after: 3 days (cherry picked from commit ee23e1e49666e2c6edd0e5d749d3562587dcb9a7) --- usr.sbin/daemon/daemon.8 | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 87b9bec0b3e8..5ccf18566240 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -76,11 +76,28 @@ is received, for interoperability with and similar log rotation / archival mechanisms. If .Fl -output-file is not specified, this flag is ignored. -.It Fl S , Fl -syslog -Enable syslog output. -This is implicitly applied if other syslog parameters are provided. -The default values are daemon, notice, and daemon for facility, priority, and -tag, respectively. +.It Fl l , Fl -syslog-facility Ar syslog_facility +These facilities are accepted: +.Cm auth , authpriv , console , cron , daemon , +.Cm ftp , kern , lpr , mail , news , ntp , security , +.Cm syslog , user , uucp , +and +local facilities from +.Cm local0 +to +.Cm local7 . +The default is +.Cm daemon . +.It Fl m , Fl -output-mask Ar output_mask +Redirect output from the child process stdout +.Pq Cm 1 , +stderr +.Pq Cm 2 , +or both +.Pq Cm 3 . +This value specifies what is sent to syslog and the log file. +The default is +.Cm 3 . .It Fl o , Fl -output-file Ar output_file Append output from the daemonized process to .Pa output_file . @@ -93,66 +110,55 @@ the absolute path needs to be provided to ensure .Nm can re-open the file after a .Dv SIGHUP . -.It Fl m , Fl -output-mask Ar output_mask -Redirect output from the child process stdout -.Pq Cm 1 , -stderr -.Pq Cm 2 , -or both -.Pq Cm 3 . -This value specifies what is sent to syslog and the log file. -The default is -.Cm 3 . -.It Fl p , Fl -child-pidfile Ar child_pidfile -Write the ID of the created process into the -.Ar child_pidfile +.It Fl P , Fl -supervisor-pidfile Ar supervisor_pidfile +Write the ID of the +.Nm +process into the +.Ar supervisor_pidfile using the .Xr pidfile 3 functionality. The program is executed in a spawned child process while the .Nm waits until it terminates to keep the -.Ar child_pidfile +.Ar supervisor_pidfile locked and removes it after the process exits. The -.Ar child_pidfile +.Ar supervisor_pidfile owner is the user who runs the .Nm regardless of whether the .Fl -user option is used or not. -.It Fl P , Fl -supervisor-pidfile Ar supervisor_pidfile -Write the ID of the -.Nm -process into the -.Ar supervisor_pidfile +.It Fl p , Fl -child-pidfile Ar child_pidfile +Write the ID of the created process into the +.Ar child_pidfile using the .Xr pidfile 3 functionality. The program is executed in a spawned child process while the .Nm waits until it terminates to keep the -.Ar supervisor_pidfile +.Ar child_pidfile locked and removes it after the process exits. The -.Ar supervisor_pidfile +.Ar child_pidfile owner is the user who runs the .Nm regardless of whether the .Fl -user option is used or not. -.It Fl r , Fl -restart -Supervise and restart the program after a one-second delay if it has -been terminated. .It Fl R , Fl -restart-delay Ar restart_delay_seconds Supervise and restart the program after the specified delay if it has been terminated. -.It Fl t , Fl -title Ar title -Set the title for the daemon process. -The default is the daemonized invocation. -.It Fl u , Fl -user Ar user -Login name of the user to execute the program under. -Requires adequate superuser privileges. +.It Fl r , Fl -restart +Supervise and restart the program after a one-second delay if it has +been terminated. +.It Fl S , Fl -syslog +Enable syslog output. +This is implicitly applied if other syslog parameters are provided. +The default values are daemon, notice, and daemon for facility, priority, and +tag, respectively. .It Fl s , Fl -syslog-priority Ar syslog_priority These priorities are accepted: .Cm emerg , alert , crit , err , warning , @@ -161,22 +167,16 @@ and .Cm debug . The default is .Cm notice . -.It Fl l , Fl -syslog-facility Ar syslog_facility -These facilities are accepted: -.Cm auth , authpriv , console , cron , daemon , -.Cm ftp , kern , lpr , mail , news , ntp , security , -.Cm syslog , user , uucp , -and -local facilities from -.Cm local0 -to -.Cm local7 . -The default is -.Cm daemon . .It Fl T , Fl -syslog-tag Ar syslog_tag Set the tag which is appended to all syslog messages. The default is .Cm daemon . +.It Fl t , Fl -title Ar title +Set the title for the daemon process. +The default is the daemonized invocation. +.It Fl u , Fl -user Ar user +Login name of the user to execute the program under. +Requires adequate superuser privileges. .El .Pp If any of the options From nobody Fri Sep 22 15:07: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 4RsbH30HGpz4v0vJ; Fri, 22 Sep 2023 15:07: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 4RsbH26YN8z3ZlX; Fri, 22 Sep 2023 15:07:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFxHU3QHee0nAzyDpsMshZySALy9tRDm/2L6xvrPU1U=; b=aJTuNgVF1U1sCPlZR7X9vINA8/K9sviruIt8i53pMe4LAMmnENCUDWYU8AeIZQh9itnBib rsBv08BLWsQiKI+g9d6JD0vg0vRJcfdg1C0qoYPyZI0ek6RR0rOS0V1TpQCwyc4x8SHUsC z8cZNT8UtXgG7zZ/PaEJe7nv8DdzXyWiff4yl2MMsgTyZuU2X3gc+1xwgAN0QXSXlLKRjU 5HHeATVuV/dV/739U5EWNsiDYw1JVfVd05OQ3NQeLleV+lOX9qk57tPUlxSD94UmcLnydF mH62PKNVX/0X9muA+uc4Yc+EjuCDVKJG2PMg1q+oqbr57d6X0yoSAdM7mSr1mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395262; a=rsa-sha256; cv=none; b=VRZKZSHhw1BNLd0ZdBsIyEOwwaWwTw25cbrI1hr/Lw2ydTKO0AsllIqraDXhT6DNirPKDf QJvQMus1cruZNPrv+evyN2yeFf4M6d84h8T7xxNIv+LDAX5A6MLMbf6DxqmXlVaMlOVCsn jzU6BGb3Et8IxWbnaY47V6rmUQ8QG14cF/TFvg145iXQ7HSHusZN3l/jKgINzi69DB79uY kRGG4QL3UJJCj55azCEB9OgN3uOYBANtfH/YmAg3lDJJj+9u/Rjd4XSxFqCVOrbjfubCH4 YEFFXWNaLruUkPJNZDPYlTDMet19u5EyHWpZzCaMWGq1apeA7ALhlEVvBC08oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFxHU3QHee0nAzyDpsMshZySALy9tRDm/2L6xvrPU1U=; b=orIOujCuNhACJRxCLGbr3b8xXUJOhUgG4Rw/cZn8paIvqf2KKQ4JIOC8q63mhoLbt8uYWY UIV6RnWCO7iW1UNyv+eoTDGzSmyAd8y6zrsJe/uXlo5Y5oDRkbUGO2tDrxq91atFjOrRUH aG8UY37eluKJd/RNCURClsYRBUbYNU6v/aFeu5FwLlFatMyHOf9SxmPkIuu3gOM1OtYEte U21fsPlGFn4BwBpwKBlCKeApN/zVX6zyAAlxP366VtwVdFNijYDCw9LUGCAsxeZEAZoO9T b5CellzWESbjKNoOyoLRrXn4nPa9WdmZ2F6OdYGs7hRYbiF0P/SqSowBbqBuwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH25Z4bzBMG; Fri, 22 Sep 2023 15:07: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 38MF7gbq064276; Fri, 22 Sep 2023 15:07:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7g4x064273; Fri, 22 Sep 2023 15:07:42 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:42 GMT Message-Id: <202309221507.38MF7g4x064273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6ed98c185aef - stable/13 - daemon.8: Document -u sets HOME, USER, and SHELL List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ed98c185aef712fb0bb4561e4688da9898f04e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ed98c185aef712fb0bb4561e4688da9898f04e2 commit 6ed98c185aef712fb0bb4561e4688da9898f04e2 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:17:55 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 daemon.8: Document -u sets HOME, USER, and SHELL Fixes: 6b3ad1d73732 When -u option is used also set USER, HOME and SHELL MFC after: 3 days (cherry picked from commit c1207678f7ebd546a0705dabc3218e49abe06a99) --- usr.sbin/daemon/daemon.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 5ccf18566240..fce08bc90e62 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 14, 2021 +.Dd September 18, 2023 .Dt DAEMON 8 .Os .Sh NAME @@ -176,6 +176,11 @@ Set the title for the daemon process. The default is the daemonized invocation. .It Fl u , Fl -user Ar user Login name of the user to execute the program under. +Environment variables +.Ev HOME , USER , +and +.Ev SHELL +are set accordingly. Requires adequate superuser privileges. .El .Pp From nobody Fri Sep 22 15:07: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 4RsbH40fcbz4v0S9; Fri, 22 Sep 2023 15:07: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 4RsbH40CqNz3Zrv; Fri, 22 Sep 2023 15:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYeObUrQ4XZsNvFA7Fnv91Q9h4eOfoaW6VJ1QZ2Fym8=; b=lPXo7egdnXVYD4Ro6PmxxZKJnmIe1MdSZRCDLXtsptWSdrULnMP9af1aDfme4Y09aYeEiJ Gz908I7UDtRsEKRXE5DEHg2dROpQMyhwhDZ2pJvfX+N+vIrS7vSLvoO18197xipYHdE/ja 5Y/h7glMFCdRGoQDYz7u9npgxGYUFVxUDZbdH6PkGgoE5tM4gsSucmAjoe3mgNU+gr4y1u iST4l/+bpvYTTcY4Xdo/1um82w+GYL7/gc+rUNV9ZCtt/qC+/tLj9Gi1oyq4KXPk2W3mnI CvffeDv80F67kcuHXqugx5Y3BWMjQqbTIHXQuwsR3niTW4LhApQmODzmj2/cgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395264; a=rsa-sha256; cv=none; b=t0G4RPUnzhiK/mZT1l8B18S1ZWAtrYVvyGo9Z8xOCCvAUqTAXJzCPRxk6wNqV/4bGJEfpp 3N67yYAs+nq0NqYsw5IpqTg32D/ZwoUIcTvWOxfsdDnv2b4SLFAINmBRAt5Lf1tHn7diGs PTAyCGdeOgWqIcy8+fno2xUW5QzNosiyiJ1U4hdvXvrZZDD2fzcj7eAhoHC4j5WIzkrkuo usE+bmvN3ZP3Da2B1fzfCkFKbwtwbjwsIpgwSswRrWzBuntUGvSx7NfjKeKGueT9PbV4dM WlNhxaT6dtje3FhQqzBceSRqyXO4cKRny154Bi6riSsKUfkGD43Omuh4J8otLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYeObUrQ4XZsNvFA7Fnv91Q9h4eOfoaW6VJ1QZ2Fym8=; b=c+/KfD+5oK5nWozo2ID6OB6lcytoUAOQ4koInZsWEsVbLhGrT4a6UgpgC/W/JYeGmosQmV IKZHjfAa6F//xAcSJukifA5ArifSXsxyljQcWHEP6n0PRtd+tWkY3lIpNatsQTQLDdw/Jb ThJzPWo3mlO5dgtFfPUvvjhfzIfDEYD3OJGTdRIjhAp8cA2SXskgPxyKPkIUGO4hiKMdv+ pATdGi40+SwcV3LSSsxDshRAV09a5FE2JdXF9HRhM8X2rH1C7h2y4hfcM9xQJ3ERhyVYAw VNIRt9ZZ1GY3tj3qiHiUVZFg4HFWO/WTABitlWOE1mpQwcs8Ma3Eu3eymqNGaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH36QVPzBXB; Fri, 22 Sep 2023 15:07: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 38MF7hac064320; Fri, 22 Sep 2023 15:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7hQ9064317; Fri, 22 Sep 2023 15:07:43 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:43 GMT Message-Id: <202309221507.38MF7hQ9064317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 12085c424700 - stable/13 - rc.conf.5: Pet mdoc linters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 12085c424700c0633e9cf3f0b96858b8c5c53530 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=12085c424700c0633e9cf3f0b96858b8c5c53530 commit 12085c424700c0633e9cf3f0b96858b8c5c53530 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 18:47:10 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 rc.conf.5: Pet mdoc linters MFC after: 3 days (cherry picked from commit b7961dba30e60fb0d1a5383cf03e5ea2fd2ff607) --- share/man/man5/rc.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index ea8ad6b88249..035cd20631b5 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 2, 2022 +.Dd September 18, 2023 .Dt RC.CONF 5 .Os .Sh NAME @@ -3949,7 +3949,7 @@ The configuration filename used by utility. The default value is .Pa /etc/jail.conf . -.Pa /etc/jail. Ns Ao Ar jname Ac Ns Va .conf +.Pa /etc/jail\&. Ns Ao Ar jname Ac Ns Va .conf and .Pa /etc/jail.conf.d/ Ns Ao Ar jname Ac Ns Va .conf will also be used if From nobody Fri Sep 22 15:07: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 4RsbH53Yqgz4v0pf; Fri, 22 Sep 2023 15:07: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 4RsbH51SP2z3b5h; Fri, 22 Sep 2023 15:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKC+Oj9llh4E3M+bCGZukfTAcxDchrisE1RGbT+TinU=; b=CmXWEwfJ9ot9i1EcNVYDuAPWObLQHJeILWpDJrvyM5CymqOJGNSq70+0YVigJKgcFc1gxu PbDMa8q09fX5boKo989uA+eX9SOTkjxGTBvBfFHfIKOOQ94SYUxm4K3Q6zWVM2B/OCDI8M OtUWIq3c7nQAP4fzdir1ckZGsTVMIFa1+zr67homyeUoUhLDRS+nLY2cB3dJ3+DW3Hsb+S D/KZVva4MohtXKmXZoXfao9GJ5SBN5YCYuIXeCJ8ZpzUJvqCMm5k3C2X+ZY3mfcZjpTZ6h TF+DzMm+YV646ZANfmNvKqLipXLxcV4TLLwqy+jNPM05hu7sFiBjicFBi0BDuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395265; a=rsa-sha256; cv=none; b=NiadZ84mTFHKTsb4hdzSBnvwrZ7V4nFjU1OTNr0N2Zx2Hi/oneN3Sn8Z8nyGyHrZWewjnC A/Fa7Pmr9VF4tVgbiN3YzTttTcvr2d7+ZSCT3rnX79SF0J9kgHF3NE9u5OqPGA2G7ijA+O sd3epLOV1U9EC2czy9c7m5KZffZmzCdtEFo2e3mNGNsa4g3Zcs9fQjEidCsxT1yT6wDPtM OZ34M4SfwLJH737aA4VsjKZJvB8DcA+q6A4sIOPwbJMxbahvUdJkp5YdGFnqnA328Bz9k4 DluvvTLEcN0mwxu7q8Vg1coKC2XjjF+Ewp53qof1icAqQk7FeuoL/7cKggT3aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKC+Oj9llh4E3M+bCGZukfTAcxDchrisE1RGbT+TinU=; b=khfe5WHFMsG0iA/wvhEQxrVqNk2r8kylLWCPqMQyaobV0PSNbUpuCwsTvVzGksutPKFDeC rIxwd15E9/q98EPrfDNRcFssfkIkYboPX783nlLqB4IqbSKJXbcQMrsN0/qO1B+U1bfQ5r o76EG+qsUu0ZNt1F3KbqslNPn3EZB8IbiSbXT3EIQ15roVQbJ+ruBzOq4IG12M+4SQm3LU URuZHzqHShk/yDcungktAqIfttijsb1W4N120PxqL1w4065243uACixkfPNuBjervv/XSY 5dbITMXBzK8M4LN5KD3FyPR3SW/hczlP3MN8qE+jA3qStoTiOEMFeyuNQssrQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH50RdyzBZW; Fri, 22 Sep 2023 15:07: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 38MF7irH064365; Fri, 22 Sep 2023 15:07:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7iP6064362; Fri, 22 Sep 2023 15:07:44 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:44 GMT Message-Id: <202309221507.38MF7iP6064362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fc56857d6150 - stable/13 - at.man: Fix mdoc(7) macro usage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fc56857d6150c6bb9d3f01fcae202f2ea6181e1c Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc56857d6150c6bb9d3f01fcae202f2ea6181e1c commit fc56857d6150c6bb9d3f01fcae202f2ea6181e1c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:12:31 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 at.man: Fix mdoc(7) macro usage MFC after: 3 days (cherry picked from commit d13b8b3e7255ad01b25ab512983af88d78fc1e53) --- usr.bin/at/at.man | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/usr.bin/at/at.man b/usr.bin/at/at.man index 58d53e2e75d5..328be8f346b9 100644 --- a/usr.bin/at/at.man +++ b/usr.bin/at/at.man @@ -81,15 +81,15 @@ or to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: -.Em midnight , -.Em noon , +.Cm midnight , +.Cm noon , or -.Em teatime +.Cm teatime (4pm) and time-of-day may be suffixed with -.Em AM +.Cm AM or -.Em PM +.Cm PM for running in the morning or the evening. The day on which the job is to be run may also be specified by giving a date in the form @@ -101,34 +101,35 @@ or giving a date of the forms .Ar DD.MM.YY , .Ar MM/DD/YYYY , .Ar MM/DD/YY , -.Ar MMDDYYYY , or +.Ar MMDDYYYY , +or .Ar MMDDYY . The specification of a date must follow the specification of the time of day. Time can also be specified as: -.Op Em now -.Em + Ar count \%time-units , +.Op Cm now +.Cm \&+ Ar count \%time-units , where the time-units can be -.Em minutes , -.Em hours , -.Em days , -.Em weeks , -.Em months +.Cm minutes , +.Cm hours , +.Cm days , +.Cm weeks , +.Cm months or -.Em years +.Cm years and .Nm may be told to run the job today by suffixing the time with -.Em today +.Cm today and to run the job tomorrow by suffixing the time with -.Em tomorrow . +.Cm tomorrow . .Pp For example, to run a job at 4pm three days from now, use -.Nm at Ar 4pm + 3 days , +.Ql at 4pm + 3 days , to run a job at 10:00am on July 31, use -.Nm at Ar 10am Jul 31 +.Ql at 10am Jul 31 and to run a job at 1am tomorrow, use -.Nm at Ar 1am tomorrow . +.Ql at 1am tomorrow . .Pp The .Nm at @@ -151,7 +152,7 @@ The working directory, the environment (except for the variables .Ev TERMCAP , .Ev DISPLAY and -.Em _ ) +.Ev _ ) and the .Ar umask are retained from the time of invocation. From nobody Fri Sep 22 15:07: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 4RsbH658ksz4v0jy; Fri, 22 Sep 2023 15:07: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 4RsbH62LcRz3Zw3; Fri, 22 Sep 2023 15:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0f0faUgJV7NAA7GNoqLwCfQT4+fVRcHPuVKySnObqmg=; b=aoDAwA9erHx94vSANZlKCbiPkjIT3swWknaRcP5Im0yOqfAXro911PP2Knp6MgefOxo8TZ /AIn+Uq5T1CXCxQ9QqImHWjN/3CdeubBtW8SaBrjixQfpZU0i44/EzDzbplP86Ke9mU8e0 Zk7eGNkeaZm/jr77psNrCAEertlswnLmh3BD4VS0vzW9Hb7jBPmvSPOfvsTjbxvBTD6mQN U2FiVO0hberODUF9l66Nf2GBTGtZVG++iK3rNyQLn84lYP3PqBnBuOln7Qa023h82tQypm 6HL2A79gu+GUy5DmPPJEa8P5V9Ur5HMZTa5C2ljXD2NPQpreyv63DXMtIAx0/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395266; a=rsa-sha256; cv=none; b=u/FoG8zAFD9mGwHuEogJhT/PFTFACdnPaJZOsYFB1iJF96COo4RGhptELcFwAwMpr3rlAv N70uxrhUR1p+giNHXSr+n6bMwYBt8Kl4EXbo9L2WWxBAEOHU/7x3ahEkwAombQtpbVE8NE kNKG0p7ifuFfa/1hmv8+c1KUpEFcFNylt8u70b2IiHiAm3jOKrxFTMQlWMqbbZ4VGeIJZz okZ8KSyWq6p7MHRuagn9+LRx+8A7t5BWuz9dnaf6mktpHXDRQEy329dmPnF9ih8pz3eZoW oHBexl4gIMoM9a26jO/1QmBk0bEBI61KSRIeebrpu4BObv0z+HPoRhSk3RApxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0f0faUgJV7NAA7GNoqLwCfQT4+fVRcHPuVKySnObqmg=; b=Ieo557vhFjW+Hzpaw+EgcBJHnQbYMwPVFNNZRZ/Wr8qdv1cYb1YOb82ilA6CknoEfROiDg oUDbxBQ97kz76Wdn9avzQwl+FujAtkZ+YaUG/SyaBAqVncXblfhKQMUUkK/u4fZ5DhNhSw bP/+B7uOPWQi+NwD1+rW/nnC2uUnC4qtrR8YFGrKxdMVdhTt5k2pjMZtkQUJSX/qFaNXr9 oPLLZ8FCpDcLNWynSnxDm39HKCyI7avP9UnlTN845guhs2BzmRsT01XQD75iASMUelUy4e Jp2SlkNzkDeMPs8c3kdFab6unhZQd/F5l3ezV/jo+ndctXyn8oYBenDDEKrGuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH61SlGz9pt; Fri, 22 Sep 2023 15:07: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 38MF7kL2064413; Fri, 22 Sep 2023 15:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7kg8064410; Fri, 22 Sep 2023 15:07:46 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:46 GMT Message-Id: <202309221507.38MF7kg8064410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 615b54d59b93 - stable/13 - at.man: Move examples to the EXAMPLES section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 615b54d59b93d5bd67d82552b022388701ab5700 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=615b54d59b93d5bd67d82552b022388701ab5700 commit 615b54d59b93d5bd67d82552b022388701ab5700 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:17:52 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 at.man: Move examples to the EXAMPLES section MFC after: 3 days (cherry picked from commit cd056e3cd4e421fd50245bb2aa6f989b23e861bc) --- usr.bin/at/at.man | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/usr.bin/at/at.man b/usr.bin/at/at.man index 328be8f346b9..a1002da6545f 100644 --- a/usr.bin/at/at.man +++ b/usr.bin/at/at.man @@ -1,4 +1,4 @@ -.Dd August 11, 2018 +.Dd September 18, 2023 .Dt "AT" 1 .Os .Sh NAME @@ -124,13 +124,6 @@ may be told to run the job today by suffixing the time with and to run the job tomorrow by suffixing the time with .Cm tomorrow . .Pp -For example, to run a job at 4pm three days from now, use -.Ql at 4pm + 3 days , -to run a job at 10:00am on July 31, use -.Ql at 10am Jul 31 -and to run a job at 1am tomorrow, use -.Ql at 1am tomorrow . -.Pp The .Nm at utility also supports the @@ -328,6 +321,22 @@ deny permission control .It Pa _ATJOB_DIR/_LOCKFILE job-creation lock file .El +.Sh EXAMPLES +To run a job at 4pm three days from now, use: +.Bd -literal -offset indent +at 4pm + 3 days +.Ed +.Pp +To run a job at 10:00am on July 31, use: +.Bd -literal -offset indent +at 10am Jul 31 +.Ed +.Pp +To run a job at 1am tomorrow, use: +.Bd -literal -offset indent +at 1am tomorrow +.Ed +.Pp .Sh SEE ALSO .Xr nice 1 , .Xr sh 1 , From nobody Fri Sep 22 15:07: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 4RsbH74Lpkz4v0Vc; Fri, 22 Sep 2023 15:07: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 4RsbH73VZbz3bBb; Fri, 22 Sep 2023 15:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMH4DlW6NleYHokWpHPtSSMdY47lhw9GRvHZvRvueLI=; b=IaK5/yNYoaSlZzy80+x7dF6uCwbh/diYu3Jgp9jh9Q/nG8Zl3zPHVvX9XCW2z+4Y99BWrL Nva3jdtKiyYt0AZuVk4d5Ndz/d/dnDiRJ2eqqOzUCmKcyovfyjibAd5F3gF+QQ+HPdkPl3 9U25s0ncDHcqTWSdt4g3SP2dMRpdzzrWYEXJYWU4exwWADhjfb+z08bHqT0F1rJgR2FdeI VEE6sQ0VRnYmFg1X44/hGycxiq9sgkCeX2aJ681Hw2x8K2XSDmk+pUHnPE+L+IdhJhLK1z rq/1rPL0VXlEOQikzw1yFUhRKWRiGOkmmdTNi5wzUgbGQDAMZEBOOOzBCiINJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395267; a=rsa-sha256; cv=none; b=MglFRNzvy/jwWBiqNIafCy73DU2H6roNFNfBGX6X7IBcHpwZydpqVJqFurtOkg4I3Y0SCW FLKtbiEx47w2QQDm5D9D43o8EhoQZLZybnQHIcOpGUHBgYiWWGt55yv1sgDKorAqIn9hdl i3fX/P2ryhHs+hVWZgs18U4GS2Tm0STbsnNOh4LR2BxWvYRtM1mwOI6b1AB1iZiwHVkLc3 eV50TDU4QFu8hRCY1+nDgxHZw0HvTeIo+yvBqLuuG+TfXsKjNzsaSz6E3yDzuV6C8rCefQ 67FDFwRr27MmWvtkaQp4VPkhOKAS6inrqhD97E9SHcN/IWJUnBQo1Bf3xNeasg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMH4DlW6NleYHokWpHPtSSMdY47lhw9GRvHZvRvueLI=; b=fq/otMjFRamfsgJQyBYpU5NUVTg/WkO7b+qhY8vw3ndd7VnkXB4/Dc3X8ybjXlUmjaGVQq FxWvBORa+gIrDgq1AVbt0kmCp6eELWYKjsozcJ+A4r8uZ7E8EP6gCc3WoRcSEEOfYy4J7R xHnoa5T3M3gZJQZkHicR/BBD/GUrLo+lnGIn7kFaw+WP+9HcVPAd/9mvnUm8W/p6FQD1QW 5QN9yaieW4AciYJcjWUpId9jGBGYvBMJ4hkZHaz1eu0TqSj4CXSg972jh/7k81aVDl4xsb /RwQ4xNB6JO+dm2XxWu5t71c7hePjpsOKFryvNTjefzVsGH0hO2D2Ig5QoRXjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH72ZVczBXC; Fri, 22 Sep 2023 15:07: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 38MF7l64064458; Fri, 22 Sep 2023 15:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7lSP064455; Fri, 22 Sep 2023 15:07:47 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:47 GMT Message-Id: <202309221507.38MF7lSP064455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b86dbf79e715 - stable/13 - tmpfs.5: Fix the use of Bl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b86dbf79e715f3e0cd20fb1623d1c66956a79763 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b86dbf79e715f3e0cd20fb1623d1c66956a79763 commit b86dbf79e715f3e0cd20fb1623d1c66956a79763 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:24:22 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 tmpfs.5: Fix the use of Bl MFC after: 3 days (cherry picked from commit adbc93c4cc862b6fc6e7992f6e8c78745d0d36eb) --- share/man/man5/tmpfs.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 6bd20b563b31..e19c898aa85b 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -51,7 +51,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 21, 2022 +.Dd September 18, 2023 .Dt TMPFS 5 .Os .Sh NAME @@ -108,7 +108,7 @@ The following options are available when mounting .Nm file systems: -.Bl -tag -width "It Cm maxfilesize" +.Bl -tag -width "maxfilesize" .It Cm gid Specifies the group ID of the root inode of the file system. Defaults to the mount point's GID. From nobody Fri Sep 22 15:07: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 4RsbH86568z4v0ms; Fri, 22 Sep 2023 15:07: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 4RsbH84nqrz3ZqP; Fri, 22 Sep 2023 15:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OqBwhS3w+NgjJH/CXF5KJxrdg2yRXK7hf9RCHwK5jNs=; b=KPusrnNRJ8FN6rNSoM9YR0YtoGPnjeSJUojT6PVFhoDD1mjptwy6ksuufhg+xoMc1bxyY0 IIiJChi8mHa1xW/u2ty88zP6nyOQzEDeCz44SFHfKwxvOr8yYmhs2KHyJGOQmzJWjJ1/cI qQ+1Z7b8Bxkn3RDLl2a+2AJdh5SCzUuluIGD8EQLKe8OUn2FjS4Mwm2l+RgxQ3lMZAP6Gx i2SiLJ9oaKHblR7QKlk3K2GyO/KGcls+ay3A8nUkmiV74ZPPLCRdxh8AY4kbHcLJAwbAt/ jBClQGao2MVLaVchrRUpteo5abSTac240uIBnKIP1vqsV85Mv7pyhLheR3/F2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395268; a=rsa-sha256; cv=none; b=Td46UJQxWjhD7x3IVNdjrsiy847gcJkzIA2CefRnjZ2JgejNxnY58xWY5Gw4tASoXkpVRc rtXlQlRoyZFP7cUP2RTz960EwldeaQHPFgc1YG85zuDJb4htIPMtzpwYSseT583ez3osUe /PPCf7WY6BlV7CkjhhiRXZQ42xBOssOAHDPaF5zknNR3DS8hJkdqlu7AIRmL7fRLWScykP VQCz//Z6ud3TiLYFSpujwAE8iUjoCseAiRhZVpLEPc688YZZWN6wxZJbaZnA7e9E1vFGs2 oJRUM1QJ3RHPAXplqPafFyKp89tbDlc/qqUNZTOG6Q1HW9eqO1f5QrWGvZ1Umg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OqBwhS3w+NgjJH/CXF5KJxrdg2yRXK7hf9RCHwK5jNs=; b=DZwnzsLzMaBgBefZMC+4kyb6eBLB2mVbDg3Uu7MR39RWNHBivMCWX5jWF8fnyuUIFBqHHz w4P9iADHAYKk2DpChgwvm4fHso4CyHHLKErzxRvLUM2u1uQNcqo8DNuY/1M1CV5NzVxukU OhqNH4o/YVVXhUMqKjhRdX99wjbRgrNL9VFMcqYDvrXwphYQSdQJU+AveWxqvono5/wAJ0 aSl0PIkkx5wld//AKtgkHzTKVRRriOE6Zan/6m6bmwl5ycMx3IfWgsA5COTAQuejhlACue C9B2VKCPBhXVtIEG5ECxb0GDsWKzh+d5FLpScR4gzHE+Um8db3p+3YEg7YnU8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH83ldKzBZX; Fri, 22 Sep 2023 15:07: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 38MF7mKg064509; Fri, 22 Sep 2023 15:07:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7mg9064506; Fri, 22 Sep 2023 15:07:48 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:48 GMT Message-Id: <202309221507.38MF7mg9064506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 055c1c9e107a - stable/13 - tmpfs.5: Keep the style of option descriptions consistent List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 055c1c9e107a62bb392436076f3f4bdcc25797e6 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=055c1c9e107a62bb392436076f3f4bdcc25797e6 commit 055c1c9e107a62bb392436076f3f4bdcc25797e6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:29:42 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 tmpfs.5: Keep the style of option descriptions consistent MFC after: 3 days (cherry picked from commit 0789d988a95eba5bd45fbe82a4ebd4dc7e957797) --- share/man/man5/tmpfs.5 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index e19c898aa85b..7ab22de0ffd5 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -110,34 +110,34 @@ mounting file systems: .Bl -tag -width "maxfilesize" .It Cm gid -Specifies the group ID of the root inode of the file system. -Defaults to the mount point's GID. +Set the group ID of the root inode of the file system. +The default is the mount point's GID. .It Cm uid -Specifies the user ID of the root inode of the file system. -Defaults to the mount point's UID. +Set the user ID of the root inode of the file system. +The default is the mount point's UID. .It Cm mode -Specifies the mode (in octal notation) of the root inode of the file system. -Defaults to the mount point's mode. +Set the mode (in octal notation) of the root inode of the file system. +The default is the mount point's mode. .It Cm nonc Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. .It Cm inodes -Specifies the maximum number of nodes available to the file system. +Set the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on the file system size, which can be limited with the .Cm size option. .It Cm size -Specifies the total file system size in bytes, unless suffixed +Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, megabyte, gigabyte, terabyte and petabyte respectively. If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including main memory and swap space) will be used. .It Cm maxfilesize -Specifies the maximum file size in bytes. -Defaults to the maximum possible value. +Set the maximum file size in bytes. +The default is the maximum possible value. .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 15:07: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 4RsbH96QFwz4v0pp; Fri, 22 Sep 2023 15:07: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 4RsbH95ggLz3bNQ; Fri, 22 Sep 2023 15:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ko27nfJ95W92bsWKTd74ei+iFdGBLSa33pPtdxjQM6s=; b=hmNBC+Ud7CBcYgpq6VsgPVrZuTdW+KcEWfxZb9edyH76hbbw2UDfvVPiKnaONWJpKgAuAb 1/P0aTs8OLJYv9yRtp/eY+wC4zSfZ8uN29gLpiSOCDIxVKiIvappSZCziTOzMnnc/jCrtv 9XoS7kZMeAS3WEu6BL7gRdF/AHhWDqDE41Pu984dxP/LRjtpJJu2q5PIhMzkCE7I0DxRfD aNvFp7y6TEn9pdIIWv71wBQPPyVMmFBbagQdS6EXuzGX9y42mav9IHt4XJbgP9vH4sAW3P l012C8943FBej7Uq+x5HwcWsSNcvoBOdyelvwGmYUSXqFf/5YmfSg3dWoyqoQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395269; a=rsa-sha256; cv=none; b=ksOPgOM2bEEK0qJ80alRN9TjLOM70DZXtgMbmV7IPeTCSSr/3Qap81Q1nXA9yPlBbahy4y bYhEtXn2+HriEJJDYce6VqZql3F+X7XEWP867wE3k5s6+F9iXPh6rS4qo+Y8tb7JEQrnAO 8T1VcSM+uKau/bVsS1oNFvjYl/8c+pyjCS3h22Vx/ixdhUMpLAi8h1JQdZl+r6WGwJPk1Z hJXqf0AzRIr0qSYfVh4x/kdjjn2eGJ6MKU3DIucm/ZjHDVyRMD9u5TptMrhpzRzYZFAnQd +0dZAZQh6H+6qyAzpa4ER1/nRIBIJ4jQCQEdtNsPYWdpCaNEyeX24Dde4ygydQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ko27nfJ95W92bsWKTd74ei+iFdGBLSa33pPtdxjQM6s=; b=Alq5jMGrT45X4UpDAzOOqz5Ej22Mmk5NVdkzwkumIa03k5GTXvbCnmTL6godT+DRQ31W9G 3IDYsgfJPdLfbYmgumXIfDMSggCSKHGmycHiBelC5NR/678eII+5O62jYs7mJWiJCKAJCV Ng+SmOOf8C0WRBmy2cIzWbe51rUHQkpvgHEZ//y8pNbCC0lO6huKTgAT6S5HC8RfFmHmLw SCK5X+WKtQh4O8VHOf5rq014zJ9NqgM+h0yKKF82YXLzy2DmDD/MyPk1jg9BNyTCkxj/8r 0plZBJjPzYQAZOUO2k+5fKpk1GjnMcgLHNJRsRGH8P0hX6zRwwhF/5lMawI1vA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbH94lctzBMH; Fri, 22 Sep 2023 15:07: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 38MF7nsD064554; Fri, 22 Sep 2023 15:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7nV1064551; Fri, 22 Sep 2023 15:07:49 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:49 GMT Message-Id: <202309221507.38MF7nV1064551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 178f801f6c99 - stable/13 - tmpfs.5: Sort option descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 178f801f6c99adfd9664c0cc319e0a15896510b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=178f801f6c99adfd9664c0cc319e0a15896510b4 commit 178f801f6c99adfd9664c0cc319e0a15896510b4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:31:24 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 tmpfs.5: Sort option descriptions MFC after: 3 days (cherry picked from commit e69a5788273b4f531a49054e0238424826375633) --- share/man/man5/tmpfs.5 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 7ab22de0ffd5..8999fef40f46 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -109,12 +109,21 @@ mounting .Nm file systems: .Bl -tag -width "maxfilesize" +.It Cm easize +Set the maximum memory size used by extended attributes in bytes. +The default is 16 megabytes. .It Cm gid Set the group ID of the root inode of the file system. The default is the mount point's GID. -.It Cm uid -Set the user ID of the root inode of the file system. -The default is the mount point's UID. +.It Cm inodes +Set the maximum number of nodes available to the file system. +If not specified, the file system chooses a reasonable maximum based on +the file system size, which can be limited with the +.Cm size +option. +.It Cm maxfilesize +Set the maximum file size in bytes. +The default is the maximum possible value. .It Cm mode Set the mode (in octal notation) of the root inode of the file system. The default is the mount point's mode. @@ -122,12 +131,6 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. -.It Cm inodes -Set the maximum number of nodes available to the file system. -If not specified, the file system chooses a reasonable maximum based on -the file system size, which can be limited with the -.Cm size -option. .It Cm size Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, @@ -135,9 +138,9 @@ megabyte, gigabyte, terabyte and petabyte respectively. If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including main memory and swap space) will be used. -.It Cm maxfilesize -Set the maximum file size in bytes. -The default is the maximum possible value. +.It Cm uid +Set the user ID of the root inode of the file system. +The default is the mount point's UID. .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 15:07: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 4RsbHC1H4bz4v0k6; Fri, 22 Sep 2023 15:07: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 4RsbHB6cZyz3bJW; Fri, 22 Sep 2023 15:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdN7q+TAlxFqntfKjjLP/aAhDlbPIg4tE/yM7L/W5+U=; b=bVCl0DDRIU5yZXrf7ekv3tOBhknUKTZD0ofWqMd64STdgjUGbQZHbwik9YOQy+fHxuyQmp 3DnAMEcYhaNUrClFm8mhcGwsvkjdsG+mGysdvBO4xH0SIvYe+AjIdObdlcMtBiJq7Y4wE2 3eb1t9kfP/9EniYmtzol5mjumXvrNk2AfHgBcfnctI/QxynUeV5ZsrMHrWrGaucAGcRzrR ZomYErc+qBm0DqBZu/4MVUiuVTa2EkYspPI1SpUSw9gx8/gZnC4k3HcLNJSbm5xFnxo8Kl lqJlRQbMPrXUl9hvFT9ByuYWEfg5GVJd73DdAVCV7f0HxvcBk3dYvFCREV700A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395270; a=rsa-sha256; cv=none; b=qbCPTBq7xkWc6mxbJAknkVLBIx4PVcdKqOR7M8iaV5/UoGNRG7UNKmDg9g14xF9HZrVCil Z/fX/stICK+AyDHp4Nak1E8h2tFe59UdO2Q+JI9jsrR2cy9oc2bh1HMPgeJeEGP0SSZd5k O9RU1A7DMsV+U5sJIz1xYIz/Pf4nCvI7KipIK/CM3uHK5b5WZ5Qoh8rQ+UV3GbfYIXadut y3W/rIdwJ9A8OsziI8Zdp+BlTU1584OG+0B3Lc9RWGAVA5Ya0CxeoG6B7ecu+jfo/ngqFy SX0+t17sTSCdmEOEFAR2PZOujAm5eB+paXvkWoe+FKd2B5nYzPRwwfE7msqY4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdN7q+TAlxFqntfKjjLP/aAhDlbPIg4tE/yM7L/W5+U=; b=xOlCJ/9x3cMlUYK99a3F50zUui3NQ2+c05fJc1Zs6+sjTePBbDjYynYY/Xu8qxB+VU1xON YOq072DE33iJb8tIy5jbH97en7nk7dshjdw1ftAmu8wH8gAKspIl5Z4z0jIqCI+nCy/Xms kDSEZl4Nt0uvXHrgIAkiBnJE3/lcPE6la3g7HXXfJsYpZckEPs8Q7DFdH/DcLbQ0U7zHxx eiDTkAcG5sFN2rYvcKMu3MSBSN6OwKTeIidZpjMIffCN4uhG2k+H22PZ6al0ejRmPcKvop VI9Tv67KBi7UPTVhnn2ed1F7ty7ydJGG4DKVHMT6mFqA6oDUr6wtwgc3jzgCzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbHB5k8PzBMJ; Fri, 22 Sep 2023 15:07: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 38MF7oTB064593; Fri, 22 Sep 2023 15:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7oT4064590; Fri, 22 Sep 2023 15:07:50 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:50 GMT Message-Id: <202309221507.38MF7oT4064590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 0d1be7098887 - stable/13 - tmpfs.5: Document option pgread List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0d1be7098887b0a89a3714c39e5153fc3182bea3 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d1be7098887b0a89a3714c39e5153fc3182bea3 commit 0d1be7098887b0a89a3714c39e5153fc3182bea3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:38:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 tmpfs.5: Document option pgread Fixes: 765ad5b28d3f tmpfs: add the "pgread" mount option MFC after: 7 days (cherry picked from commit fade2298889d588c15705b44e336ff02cc96f956) --- share/man/man5/tmpfs.5 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 8999fef40f46..33ed055d7f30 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -131,6 +131,8 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. +.It Cm pgread +Enable pgcache read for the mount. .It Cm size Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, From nobody Fri Sep 22 15:07: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 4RsbHD1D4rz4v0n1; Fri, 22 Sep 2023 15:07: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 4RsbHD0JMvz3bZP; Fri, 22 Sep 2023 15:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsWDlllFv4Qofh0GR083xsliSC3bhSADD0nTe041vpA=; b=EpnMHz1bebL/4ANBWSJiZQj3L5JAUcvzXFdDxtQfMd47ZBAlCMxpKehmdhPEVswgckNXVh SqkSwOPPmmXJ1fWvAPXsC6HFhOx/w4JhM+98Y3zv2iDbbYzl31wGtVWfQmrAyqON7rrb0M xAfKRpxDfcKwrfDZsNzXOrmJXydkDBP7AWynmcSBT5VWaXC/7h1A7xUAOEKzwvg3Ryeg1Z yGSiyq5FWasmaKZes5S3Zs67+8RnQn4zpgG7oNo4VJrY2xlVWH0uV4MfG2AsbtcgZ/DA6M fT7cewvf8e3cHeHQn7KHDtSoBHzaBkkjS456PWAwbP9Oa7FEcxH95dGYiQ/xzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395272; a=rsa-sha256; cv=none; b=lHNaYcASKV4duZakijpx8FRK9K9Ko1MpcjFVU1ctOWzAEMGtCe1sVZbaspH+nCticWoxvJ mO21CBnXYFKXQhzVebe6Xl4tXbTG3QfgbjnpWalSySZkb8P6Xx4EqAlQHvJy2ucn1OsQZ4 IxrZ/aPPKDfc39XUgbQIitdtkRiy97/c5INqdzOQ+8T/Ec7iAlqReWIZU1Ngq1RPVAXLFN 3NmKOhacuwynXAJ3Xzds/cd3SyzDcsXSxBeSXaL6oGJCQpAfeiNmlojkHG2KqEgvj5eRCo TmtYjtITHlHzI935yN4/PTqQKQ7L+U2Nv2zzoKD6Z2bQZkxGZMrl/qkTfZH6CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GsWDlllFv4Qofh0GR083xsliSC3bhSADD0nTe041vpA=; b=BlebB0I5LxSwSdVtF+DziKVYJYGITjAj3CQt6Pq1SO73KFQozuBIieb41e7PHeXTU4R0gk 7jXS/o2r/ulcoI8MVqX+SIAkjY+BD96c2+QA1QZWU7F1g2zQmaxcI999M+JA5Pkb/MZkgv Jlbbgh9ValQeNSpTg0K/vCHYcTYm/dXXlzrjBqCWq0421+xeGoleH39nS7vpmH+DoL3pVx 9dY5UD/yEZMkYR6KipGDQHbz9a6hPdssSQy5DmizDUuD81KyAxDKl847lmpvct3XW0wPZP ibmzd8yFSYRZEu0KhKKzDK77Wo26nLdLSZAWNDMnagmWd2Put9O9R16pbSoCkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbHC6WXrz9pv; Fri, 22 Sep 2023 15:07: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 38MF7pO7064632; Fri, 22 Sep 2023 15:07:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7pG7064629; Fri, 22 Sep 2023 15:07:51 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:51 GMT Message-Id: <202309221507.38MF7pG7064629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ec25b0ba5a0d - stable/13 - tmpfs.5: Document option nosymfollow List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ec25b0ba5a0dd16aa31e91da67c7956786d4111a Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ec25b0ba5a0dd16aa31e91da67c7956786d4111a commit ec25b0ba5a0dd16aa31e91da67c7956786d4111a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:43:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:28 +0000 tmpfs.5: Document option nosymfollow Fixes: 15df90218bb6 tmpfs: support the nosymfollow mount option MFC after: 7 days (cherry picked from commit 942cc861f2cb5af287f15aa9b1bd56527f113032) --- share/man/man5/tmpfs.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 33ed055d7f30..c442b868dd1d 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -131,6 +131,10 @@ The default is the mount point's mode. Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly used mounts on large machines. +.It Cm nosymfollow +Do not follow +.Xr symlink 7 Ap s +on the mounted file system. .It Cm pgread Enable pgcache read for the mount. .It Cm size From nobody Fri Sep 22 15:07: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 4RsbHF2Nqfz4v0Vj; Fri, 22 Sep 2023 15:07: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 4RsbHF1dxFz3bXS; Fri, 22 Sep 2023 15:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KIdqGyz9SapziOZOK/EAlYezanGLWcjcXPz5q4+9ln4=; b=co4AD3MdmKtQR6TcZYLSS7zmj38M3XohdR4S2C0bm52TXAe33wen9w4JkGzBbxVd/HPKsl lXGbHYPUBGIXY4fNOcUh7lj27ow5ijxl38yVyr/C4lhetVjhFH9TjIfEBoTopfGZe2I+ov tlKKbHF5QVXrL2kt8xFkkodqydc4TyqfBRkYdvGEuPLv+H/NkMfH4jtybn+CVpA8uNsmo6 67U6VXcQXhbc7Ckq9Ly3L6jo7pgxRlCf29UUyEulAhVeeP+D1AXocGoUwZQm8OK8uCabqc BqMS8qRemo4Zxf3dMhih9uUGXp95NQS0EovAb5R8wJ70mZBjpWfFp6kAc32fMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395273; a=rsa-sha256; cv=none; b=YJChpYt04s1lzYgEwzMrJieEgAwz6Thba914+mte7qTuSUPPN+Fpa+pFnP93F/Rwkgr+gp Z24byh/3LL1RFe7oKM+Ar6dnvQG8/+OZUwt6KAprsxsuGXBOEIcArt7DiN3IP29zMmX957 Ib/k4scXU3Ynr2qb9dZWiMDaqv3yHDZ3bKC6LgiVeHLsQ8mOTGye+jyzN+0pySe6icVZb7 mN762fS6FRqifBXSSqeMP0CPu6vWKNeC1jIUEWPVOU1X5MMomwra8sbXC0xP9tL7aFZVxX zFYbrq1jbfGUpU+61SDiSMal8jqPc/u1o8tTx8mbA4TDy8rYeTPx/kV0hFGP2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KIdqGyz9SapziOZOK/EAlYezanGLWcjcXPz5q4+9ln4=; b=rl2pAm8JxdjHFQNvds2KC+TKCt9GajVQQmrfR8BUr+MNJuRj8g5vMh1wTGZqLvnrTEAnH0 Lmf4r0SlI6t1mQGPCg03IYty/QyNhd5NkEPpFarbn31jqSIk/ZgLKxT7N3Wrt7qGUIQEGJ nEklIE8+i3g7gYaEojMz0v9Z96yFzzSONItl9oh9Q1pIRknxf9fnKiTA9onBFEnrZBQcu0 y9JaLLXOrvaG053bpeM3GmFZSEXvb7KD+Agx3Z2qgAFQR4eiXvaavXMrW+J+zr02ZxMEIu D3m+3RiEwp94KF7pWQbmdaVmZCS5ka1e8m4QteJ+EUvzomGtrEnguG5aFZ+LZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbHF0fYgzBZY; Fri, 22 Sep 2023 15:07: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 38MF7qSU064671; Fri, 22 Sep 2023 15:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7qvp064668; Fri, 22 Sep 2023 15:07:52 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:52 GMT Message-Id: <202309221507.38MF7qvp064668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: cbc8699b85d2 - stable/13 - tmpfs.5: Document option nomtime List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cbc8699b85d2226fa9885d25ba016075686a8fdd Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc8699b85d2226fa9885d25ba016075686a8fdd commit cbc8699b85d2226fa9885d25ba016075686a8fdd Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 19:51:50 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:29 +0000 tmpfs.5: Document option nomtime Fixes: c1e84733ac7e tmpfs: add nomtime mount option, MFC after: 7 days (cherry picked from commit 6a1de1912d5216512a73dd97c4ee454d44b8fffb) --- share/man/man5/tmpfs.5 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index c442b868dd1d..8fff1c15815d 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -127,6 +127,13 @@ The default is the maximum possible value. .It Cm mode Set the mode (in octal notation) of the root inode of the file system. The default is the mount point's mode. +.It Cm nomtime +Disable the tracking of mtime updates caused by writes to the +shared mapped areas backed by +.Nm +files. +This option removes periodic scans, +which downgrade read-write-mapped pages to read-only to note the writes. .It Cm nonc Do not use namecache to resolve names to files for the created mount. This saves memory, but currently might impair scalability for highly From nobody Fri Sep 22 15:07: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 4RsbHG2mFFz4v0Vk; Fri, 22 Sep 2023 15:07: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 4RsbHG2B76z3bQM; Fri, 22 Sep 2023 15:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MDwz3TI2oKuHIUXl5+7T7UjKh0tYsX9v1AJlo26ck4=; b=f/iql838Yw1+CWfJndT/vbAN93MMXqJ1vrbnI2h7ZZaLGcKu1Me8GYOBXnAQPSUOVjNTHA 41H23e2V6Zmkl57huRYFo3LGKpN280z7YHvpqIDFZ2rAVuJ48H4FonIz4k5a5H6/B1Jd0e sgFws8wojHwllQg8PAc+uO4zXz0qWrNhDuWumSzp94DO2qePfVzTUqp8w8Mnmi1iDgBx4f WwL5NEfugMN9A/NeOUKr0YoAYRCIhYA2G3EMXc/xUKn1nXA4wJjTu1/ooLlSaRhNfFOyij OcdX6fDOFjwTPNEQ4oWf7Ay97w4jhnckBV+hFhKtABmFY5g6oxcV+dv9UrSn/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395274; a=rsa-sha256; cv=none; b=nVgAyWs68cKHowKsQDob79nMt8B3eQDqQydT4rOO15dOmqIxXx8cQrAcLQMiz9Xt04BEd9 KA2HZWD0KfeMOcKRyfeimrsT1np+lgSb2vuJx4KtsKsqU9nVVAvIBQs3GF17UYZ1LXUmVX EK/7jgAS7I3+aEbGJ8C1zvWtLQFu7mAZX3DpIVCNteSL4wCzibd6J6AP5UBCUVu5SC9IhC BYt81TSnOaqq+jHrL2+06GI0VuARO4Eobs3UYIq+6jdI9+jDGfwn0Z65h7fF+w/tVNv4ge XS9pMVK6UgcXrm7cw2Gor9q+Gf2hwSKeOycvfyza9Kt4Nd5sFqtDh9Msejzx6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MDwz3TI2oKuHIUXl5+7T7UjKh0tYsX9v1AJlo26ck4=; b=aqG1wl6KmRiSRlJtYSfWJiC83/TFncfxbReJMf/SyyuTUY6N3rcs6EP0XWNZ+sYZMB3bYb gWiWy7CX2r+hZxKKENw+tLyMISDPyDFoBGbk7/l7EwllUgHvMmwvWEX8T7Q5vJAsVd7Y53 Vb1J1qTE0K++RlfRfP6iyO3+C2T4wP5mN0ySob4wOOrfKPaYe+ptO4bzwQUHRm/nojmuHO rQ4bbN8oOWFyQcM/6/0HE7pkoTae3COLvJ9+WqBYiQfqCXaMX2iJnyV41wgEbSgrmB+M+i g1PkT37oXX/hMUJ41h8sq4vi7wY0Io0FjXb7zJkrEFMEGJT9b4n6hGVcl+wr2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbHG1HJkzBZZ; Fri, 22 Sep 2023 15:07: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 38MF7s8j064715; Fri, 22 Sep 2023 15:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7sHi064712; Fri, 22 Sep 2023 15:07:54 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:54 GMT Message-Id: <202309221507.38MF7sHi064712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b7dd97fb122d - stable/13 - tmpfs.5: Document option union List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b7dd97fb122d697c100ffc378fc67edcb74cd39f Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b7dd97fb122d697c100ffc378fc67edcb74cd39f commit b7dd97fb122d697c100ffc378fc67edcb74cd39f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 20:29:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:29 +0000 tmpfs.5: Document option union As noted in 59169d915600333b7d9187097f157865ba642256, tmpfs(5) supports the union option just fine. MFC after: 7 days (cherry picked from commit 1d225179fd5d7eb932486a94abb8b76be7e44241) --- share/man/man5/tmpfs.5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index 8fff1c15815d..bf07f06de026 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -154,6 +154,9 @@ main memory and swap space) will be used. .It Cm uid Set the user ID of the root inode of the file system. The default is the mount point's UID. +.It Cm union +Refer to +.Xr mount 8 . .El .Sh EXAMPLES Mount a From nobody Fri Sep 22 15:07: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 4RsbHH5jhZz4v0vl; Fri, 22 Sep 2023 15:07: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 4RsbHH3MHpz3bgk; Fri, 22 Sep 2023 15:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFebpRJnFWwepqFrX5vikFe7QcymaeTumbP4OLQhQiU=; b=SQwpmoHpaLdfUntwn796s6HLWD4Bayd6XZZ+4g+5hF4kJ3IJ2QBlOJCTZLF/vztklxlucf qyrXSPwd7Sg2nvzScIbJJyi2jwfEM9eGs+U4S3aBRHOuOzocF16dWKsTPCBqeiX3o5to2p zZFNYaYxQ0mgIN2mOpqqPlLpcS3zKL/PILN+/Nfp+3dB2hSAR9Xgwre3o2VaBJYNg5948T GYqtO6QQwoHZ5Mvvcsstu5LEZQredqSAOf8r4rEATxfyds1cjwg9lvrOyOeh9Pp0PsXcMQ zecwhxfIKIZkSG2iDANyzJRnSodT1sZ6LS1VIyxSiHVTjZ7ghdNOcj2cEMEVYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695395275; a=rsa-sha256; cv=none; b=HR+bKNMNsharSsd4Twx66+G39coUalO4iAvzr7bNI8LNLDohYE29zZH2o24Hd7P0JnnO8H ViUPHS1d0qOwkbVudfM+Z+DNyyVZP75/YP3ZsgThnBIcMEwTpI0w7PiI9g9nHHGH4hQsi2 Rn+l68SEvwE7H1RkNt9o68OxAxUp4lzkRnJxLuJbOFw+9OVeAlMraxM4Tw7dDTEqqX9Yk8 JNQJgH0AXMSjJtYaI3VpPk6mQw30lEKMR1f20uge+PMA6KQcGDLS+uCktV4dnvWqkeOvdt OJivrdtY+FprBiuBL0GWvotZsyevZ+aRrwOwZHPl203CNMjlihpnZIZj/wwuRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695395275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kFebpRJnFWwepqFrX5vikFe7QcymaeTumbP4OLQhQiU=; b=JYR2Va5HYfXbLwYSGoKRlxhrVeoWfbzfuVH7Bsnf9i4RmOjBpForE8WudMMx1R15pXRCce EEdCgGoG4vaLgOgXErjYZJNWrZspZsh9BSBmpwaVmvaHpdn9rpCefYn797Am3+ys2E7+Lg SxQhGVQDIsNpcPRvS/4QkiUkko4EA4NR0TjLMGtDgNCOmzUZCM1nHk2TYCz+J512rW8ZMH NkxphGn/KvPjsrRlZC5zE95uVWsAntlo8XgNoIDsXay6hctn/MiUMmY0WOzBSnLX9SLi/s g6I2QzyAGcWPMdF6SuijrMiTqiohdqP/kETBbt5sOsSAKASWnKtQxgJBMvT3tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsbHH2MSJzBXD; Fri, 22 Sep 2023 15:07: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 38MF7t1x064760; Fri, 22 Sep 2023 15:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MF7tqV064757; Fri, 22 Sep 2023 15:07:55 GMT (envelope-from git) Date: Fri, 22 Sep 2023 15:07:55 GMT Message-Id: <202309221507.38MF7tqV064757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c534d0b0f39f - stable/13 - tmpfs.5: Document option export List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c534d0b0f39f1398687cbdb93e00e777690df20f Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=c534d0b0f39f1398687cbdb93e00e777690df20f commit c534d0b0f39f1398687cbdb93e00e777690df20f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-18 21:58:08 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-09-22 15:07:29 +0000 tmpfs.5: Document option export This is a no-op option supported for the sake of NFS. MFC after: 7 days (cherry picked from commit b2bd87bb01a97b5b025614a6bfccb8e109c201cd) --- share/man/man5/tmpfs.5 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/man/man5/tmpfs.5 b/share/man/man5/tmpfs.5 index bf07f06de026..c01aefd8550a 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man5/tmpfs.5 @@ -112,6 +112,12 @@ file systems: .It Cm easize Set the maximum memory size used by extended attributes in bytes. The default is 16 megabytes. +.It Cm export +Accept the +.Cm export +option for compatibility with +.Xr nfsv4 4 . +This option does nothing. .It Cm gid Set the group ID of the root inode of the file system. The default is the mount point's GID. From nobody Fri Sep 22 17:24: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 4RsfKJ0Phbz4v8m9; Fri, 22 Sep 2023 17:24: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 4RsfKH6h9Pz4T7q; Fri, 22 Sep 2023 17:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80N9uMu7FtA276pfE9dgM1kNaaaNgsukA1tRARYohRI=; b=YCeHNu7VicmFuujNwaQkLsevKoGVuFhk5WTzoi4fim/lvHjEzyBKhvRCkr8+Xtuvm0FCKw 7aEzFeaqndyHsjqYtcRYzdo/1MmNF4+dFeHWlLHLble8J/2Tx3zV+G9bFUdWx5JmmIsvw0 B16B4M4t9CZ+t18ZjXjsRXgU8Jh4HwbQfufVEVUtbxI7RnHO41OOl9faEFFl3ffXwBzI0/ 5bqNLb1RdbnVJ68pZQt1A8/0+JAUYHO75CtgDPgGKxqRAxrGRfaAMpDTT3ESvsCvTTJkCH ta4DzSPaxiKl2xXjFNmxwg3e5YBSSVwXWRPVL2OIp9l3PtiryIGRFtvR82Ek4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403491; a=rsa-sha256; cv=none; b=oC6f2Tz/JeJCgmkNFUruYJXt2YO2o4cnKE1bNemYfa0hKbHc3t61T2i/TuHl5xxrK717AA swK+KbkWs7jxMzYiv172b7RExOVeLqAkzra56VArrodHQLbpd41JJU/M+KDnUmfyIif0bk xYJC5Zk4n/w+Kgfdk2zKqTc2MBHxxNjQbyl5j2h+i4MkN6jQfuDYW5/vsEgBnC8uflnR/t jbNp8/WRYvBdOoIl42IXDDL+/VDQNWZTFM0n9D1TWdytIOEGPqk0UIfeGIX0wg/n4h4s1/ JQ/FLCafGzUY/85uEoXXk15kVMQXCQSKaAPXItKmcL92ChZXeiNq06Ghz6WGhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80N9uMu7FtA276pfE9dgM1kNaaaNgsukA1tRARYohRI=; b=BenqFw/SDa2rwX+LK4fWJHO0ACHK0IALaTrVdB18aCU1YvLQHm0o6PBypAOY9AMoidkFTZ /0T4nba4dOZpCd351f/Q0fOizevf4oPB7VghEvwVOyI7EUWpNk2neQIMSqMBpeD3gjANmT UMH1+h17heKMWkTUW2e6nUrN3pBxNI34L3MBPqq4mQLGXfme/KiFqmtqwiGYa52NDBGY0Q S/Rwk1Z/QStDkhGvfNiSjuzWHrSpfGTZkTY+3gowFTffr9A0u9Q9UKJ3MMdIsIy6sf2k34 lZQ9mjss3ftxOZDxxEMGOfBIvlYvCidjSmw5FDEKO3qy6k2h6795a3O14fTomw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsfKH5kkKzWPw; Fri, 22 Sep 2023 17:24: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 38MHOpNM097037; Fri, 22 Sep 2023 17:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHOpBM097034; Fri, 22 Sep 2023 17:24:51 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:24:51 GMT Message-Id: <202309221724.38MHOpBM097034@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: 2209676efe9a - stable/14 - Fix padding in struct tcp_info List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2209676efe9a23d9411fa0314b9c6bb285baefc1 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2209676efe9a23d9411fa0314b9c6bb285baefc1 commit 2209676efe9a23d9411fa0314b9c6bb285baefc1 Author: Alan Somers AuthorDate: 2023-09-17 14:22:08 +0000 Commit: Alan Somers CommitDate: 2023-09-22 16:57:03 +0000 Fix padding in struct tcp_info This structure should have the same size across different FreeBSD versions to ensure backwards-compatibility. It has since stable/6. But two recent changes added fields without compensating by reducing padding: 945f9a7cc9dcc071bfcc702748fbbb11087ae773 and 22c81cc51636cfebe94e0979eb31556d87775938 . Reduce padding to compensate. Direct commit to stable/14 because we decided to break compatibility in FreeBSD 15 in order to add more fields. Of course, that decision could be reversed before 15.0-RELEASE. See the review for details. PR: 273902 MFC after: 1 week Reviewed by: tuexen, glebius Differential Revision: https://reviews.freebsd.org/D41894 --- sys/netinet/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 2b898d062b0d..bfb825930c66 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -434,7 +434,7 @@ struct tcp_info { u_int32_t tcpi_dupacks; /* Consecutive dup ACKs recvd */ /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[14]; /* Padding. */ + u_int32_t __tcpi_pad[10]; /* Padding. */ }; /* From nobody Fri Sep 22 17:26: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 4RsfMW1fRPz4v9Kl; Fri, 22 Sep 2023 17:26: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 4RsfMW16wDz4TbY; Fri, 22 Sep 2023 17:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a94we3efvuJT2nB8Maa6e/Byg4u8CK5vURWOtoUniCU=; b=pBwA5eLxaNUqC55rQpiUndfb+idEJWq16VI56QF7TGHiYh6i2rqyhY2lSZYb7Mo6k12YEX 73krULekLGYm4D8v4rOd8uXl8jcqJmmq/kchyK254uYjDYtQcLms686DsE95mrDTZ2uGjD PoUGNw5RTfBmgz6ljXw4NpoHgokD9WCXNPKnmbFv77rppA4ntoHtzYH5L/ZqKiGaEzSOxC mQ8fzWOB2Fawh3Zvg1acYAJuLko/1NThjvgb5dNSEYvSm9B/2vko+BoUiRKvI1JSZcpLUW 0Lnh6q8YVQqWUAG92zYOUb4LNggPLcpgc7/AtGp8Jhb86YMOQB6NShlH2yWsiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403607; a=rsa-sha256; cv=none; b=ZSLhKyDusNo8G8gJkUx9f0n6qLWqW0zS9CSrpOCwXmy4r/oBHLw0fh4NpJ0MP1CzBncvIc txh5hY+nDA+nIPmU/v1AVZ6qv8URetHLWZRwWGBdSyPtTszcS7Axc50aY5PkBSj71PX+Qw fyNYqBBy7U85Oy/qdXnKg98sVFZqOa1XAJ3KavT+y8DyoBDcMgj7wHY/k4yWLT+k3RNdvH 2CNV/z/bVOnRUGEqNwvY/r74g5DhWKxxsen8qABmfK7ZquhDvbjVVD2T7zdWijq5PyX5DP XkNAq1+/nQD4aZN9RCc3NNrEOXjmHrnoPwX7Pxmdrh3qFaNF2yvFSCfzduz7JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a94we3efvuJT2nB8Maa6e/Byg4u8CK5vURWOtoUniCU=; b=KISdvVx7K9cDkW5Vb1wOmLNxxWqrdr985JiogFKZrwyk3Ax9aVPJNWz8Q2tb84ZmA0Km0s VkUE+bpV0su5M0xb52erAxzBWxdL+rb/MAYOTf8FifLooO1tVXtQ8XuIRbSkmmzcOzrgtt M/02PRUaqvyz70rrkvfQwx05Mw799dKhnmaO9uBoD/FxBDtjn02QybYnTn/iRn3ggT53Ar y5qaPsNfCmMpKjGrP8OFv0jfpt6XVHvEyuXphIn226l22CPP04xSsv1pTuI7LGtbWpIWIH Yf+IKHiEBxj8mzpcyHNFhrIAQMZ+yTxNPwnyq/wctZ3+aLjlzLlis7Ly0Sjq6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsfMW09b6zWF0; Fri, 22 Sep 2023 17:26: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 38MHQkft097499; Fri, 22 Sep 2023 17:26:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHQkm5097496; Fri, 22 Sep 2023 17:26:46 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:26:46 GMT Message-Id: <202309221726.38MHQkm5097496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8232867991d1 - stable/13 - ObsoleteFiles.inc: Add libclang_rt libraries for riscv64 for LLVM 14/15. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8232867991d10d97b2526ed8267f7cf6b1105f5b Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8232867991d10d97b2526ed8267f7cf6b1105f5b commit 8232867991d10d97b2526ed8267f7cf6b1105f5b Author: John Baldwin AuthorDate: 2023-09-05 16:12:12 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 17:24:36 +0000 ObsoleteFiles.inc: Add libclang_rt libraries for riscv64 for LLVM 14/15. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D41701 (cherry picked from commit 25b58f9a4a69012b5c1729a3895f9fb3369e2b5d) --- ObsoleteFiles.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 3ff61da559ab..df9033d900e6 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -299,13 +299,17 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-x86_64.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a @@ -337,6 +341,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-i386.a @@ -345,11 +350,13 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a @@ -359,16 +366,19 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-arm.a @@ -636,13 +646,17 @@ OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-riscv64.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-riscv64.so OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan-x86_64.so OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_static-i386.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.asan_static-x86_64.a @@ -674,6 +688,7 @@ OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.safestack-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.safestack-i386.a @@ -682,11 +697,13 @@ OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.tsan-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.tsan-x86_64.a @@ -696,16 +713,19 @@ OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.xray-aarch64.a OLD_FILES+=usr/lib/clang/14.0.5/lib/freebsd/libclang_rt.xray-arm.a From nobody Fri Sep 22 17:26: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 4RsfMX3h9sz4v968; Fri, 22 Sep 2023 17:26: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 4RsfMX2YTTz4TVf; Fri, 22 Sep 2023 17:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9fX5ieJkEWKs2xrZWYa+MHhNWo6SO/wEYkHcbkMU4E=; b=KSUxFuOnJ389nASD9zZi5ICBspnnGI5JMTCaZLwRmFoKTlGX1NtcPuApkF+82nH4JoU9jf SJeVN2MMhtPoZGLgI/jOJEDt2seT2mVot4IzO++SxocB4SAclHy55K4N0vxXHvpNdYQsQH jvvT4WvSP90czDRBNWE2JdaPZsgfHVLtYLsbehoyuKWLRqCG8YsSX94H83jy5QdwZ7ABkB AnT76NN2aqFVbBETEX7QOYMMvz86qtWzcxAv9KXztNFXtrNAWYmhZKJUuyztBRIxbAxclh effjS13v6z1xWmw5keCf489lVM9cZlOukoMQwAp4zis59rBQSEDk0NhCZZxUgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403608; a=rsa-sha256; cv=none; b=rqdpYIUq/By5o02TxRSby3/Dd9QNcSSwKRUVUwIKMjMc60cg2z37XQbEFd+KxzhS4XD+b8 VFvuOmWBd2PuI6pXSVc07bBNq7X/LS1ot+2D5rpgVpL8hHCmlf6cGtFCw289iM6Zmj7W4V NIAexlE6Ea3Xhh4EXpeq99ahaolHKLbwa8qcaeH4j+5oYRuapTdlr9zD2aoVMuLDE6+NjE dcWTrtycTaknuqT1vNq9l1lN8dR8xwl+wGXzMBjLCx95S+ffhptjJ6zItwcL6RKsZMB/2V eIGsVIjJrVYqdIXeu/gn1huw1vMBGhTUEtWd8JcCzCGGA40S+KXlmqgQobDyqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9fX5ieJkEWKs2xrZWYa+MHhNWo6SO/wEYkHcbkMU4E=; b=s0s9O6sFVxIV25rA9AjnSNU5jZaZB7dsDuURpQFrsOmJ54j78ramrJX4m+dFqyQRxBimY9 xkcBDbMPzymDAjWAgClqTKIG5bRfzlf1+lxl2NgaRHGhmmGDIRrStnTmRotdd9Dq85xOI/ DSVsPR2DrqmENn4u2rwtQUf0mpGsnll6B5aRaB/bq7wYKvcWptnAUFHixI9h79ltzWYlmo w85Hx58m+nA3qwyR9psvlAYbvJU0zL3kSsj3U3Xzidq1URyEcSzsY7uhuaJ3du74ChdaAq 5ITW8J+Y2lFat/RKoAFkEnwurMMmtCwC5g8vukLnVpi6s5dVP0PZ35eM3FNRMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsfMX1dBHzWF1; Fri, 22 Sep 2023 17:26: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 38MHQmdA097551; Fri, 22 Sep 2023 17:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHQmFa097548; Fri, 22 Sep 2023 17:26:48 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:26:48 GMT Message-Id: <202309221726.38MHQmFa097548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a3e137356da3 - stable/13 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a3e137356da342fd56a2cf39489f5d723d3ef4f7 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a3e137356da342fd56a2cf39489f5d723d3ef4f7 commit a3e137356da342fd56a2cf39489f5d723d3ef4f7 Author: Dimitry Andric AuthorDate: 2023-09-14 16:39:31 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 17:24:36 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64 PR: 273776 MFC after: 3 days (cherry picked from commit b9c012a60b6e98f7c3e765859195302cf3ae7f6c) --- ObsoleteFiles.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index df9033d900e6..aaa72f851f3b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -295,10 +295,13 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -309,9 +312,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -331,8 +336,10 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_interceptors-x86_ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -350,34 +357,41 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Fri Sep 22 17:26: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 4RsfMY3xcYz4v9Hm; Fri, 22 Sep 2023 17:26: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 4RsfMY3ThLz4TmH; Fri, 22 Sep 2023 17:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7KyRgUlaShi1t5G7rjocfuVzXBWAhIn4dl8YHBIoo0I=; b=x79ckX/fljM0Ln6ZsGg3C9pT+Hpm3kMURrhQ0FCL/lcSjnZa9zf+velJ1PArVVyO9G51G8 1tDjGfKoFNhHbe2meoa9D6wRco6n2YmaacU1Rgrxgo6K/478ey0XuxxPJB8Yk7O5V6BBLu t1LLdRe9+MgeidSjXnkKmpL388IjafsYaZRFf2CuwlrQG4TjOkV2zI9PopINQEPACH2E8y D2xiUf3phT7MOCk7ixzEwqRGsUdwv4lH3oWDj0VvKrZUqshCCsBxRtzCotTrEjLxdpJiVG +5u3qnZx0iAFMDD11uazisbMSvaM41xi14g5I2PWqa5lvfk0aZP/2Qpd/pTyCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403609; a=rsa-sha256; cv=none; b=E9VpK02L7MwaS1HRCHWQlgRg8/nzfaNT3o/kEBumTWDubsQJty+gPQ3NrjENRW2U7ZU/e7 PiO5JWruHWJlQeFQ2t0KA9v0KMU27baG+9YbVs76s2j+bhoeR7HmhkUz8Y6AU4Z5PROI0E K5IYoNTwcbreDyZEIAZpGVLCJTzqn+Kj/MFgWtURxf312RSl8AwUquZEjPkx2KPsC8MSDx xzB8NxF13vQ3zvgDR105crQyzhUxi2lDa5NaPGXIZCM8N796rllIfoVk2Lo+nAWBEgMXgi lhni8Qj77gm4+INwYEfMog5myWyvsqtHl37POuh2Simw1yE8L5J5rQwpIkjdRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7KyRgUlaShi1t5G7rjocfuVzXBWAhIn4dl8YHBIoo0I=; b=yGlrfjgCw1VcFPBoJtelfuVZXRbbB7Thxl9w7nLQbv+ybZm2boIHllzQJQxmFqb7knwsK5 zBv1fua5j63Pn1DLgS4E3nDnaONeU9xti93k20dP8jas7Gtdvk30zt/ch5uYewutPX3+5h +uztVyqexzX6Kw2omMugERrXXmcxocTeE2sIJKBQGrobloF/2L9yOECNIR+EkjZMBE37h+ H40VIZ7Qo6AKwecKtPBVx4zYqVVqU3htBtAgIC782Wr3CDi7EI05I+ewAh9+fd4TEwAMLy f5jKgzL1oamXqlSxS0bdsqhBUhfAW7dkrwYsDCKRCc0wH23LM2DDNB0zyauGIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsfMY2ZgZzWft; Fri, 22 Sep 2023 17:26: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 38MHQn01097601; Fri, 22 Sep 2023 17:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHQnrq097598; Fri, 22 Sep 2023 17:26:49 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:26:49 GMT Message-Id: <202309221726.38MHQnrq097598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2cf595243a5d - stable/13 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64le List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2cf595243a5dccbb045e1d770724c03595f8a12a Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2cf595243a5dccbb045e1d770724c03595f8a12a commit 2cf595243a5dccbb045e1d770724c03595f8a12a Author: Dimitry Andric AuthorDate: 2023-09-16 07:47:19 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 17:24:36 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64le PR: 273776 MFC after: 3 days (cherry picked from commit cadbf320b352b3691cdfa90ad8ba818efca4ea68) --- ObsoleteFiles.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index aaa72f851f3b..8aeefbb3c12c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -297,11 +297,14 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -313,10 +316,12 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -337,9 +342,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -348,6 +355,8 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a @@ -358,6 +367,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a @@ -365,19 +375,23 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a @@ -385,6 +399,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a @@ -392,6 +407,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Fri Sep 22 17:26: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 4RsfMZ5Hc8z4v9Hq; Fri, 22 Sep 2023 17:26: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 4RsfMZ4mH7z4Tvf; Fri, 22 Sep 2023 17:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWnIxtv87l75nMgv2LFv0KyhFUlodRcQOILZFC5W28o=; b=iSRJiYwSVXab/0G0H7qke7avs5wnQ3gJcjMiCSTPy+/AcBcWLq2pb3jNTYFNGPcfM6nUrC E9iYdLMm4PwS1UG3jKZPHqr4bJdH+xU++N8/ELOL66jc3zfuH/32uMELHjn4lrvEpZDqJL sdURG+phnlNGUOtjP2GRXAnm77Wgwc6Nrpg96UDLv29SBdp9LQ3zBrd36drOeldpzFcaFB +AVNnbTVZoOCUBC017YFLWvCL1913+f3H14sqCk1EUiU3eY/x91hu2437Z9D4Wee4tRBAS f2XVWTV6S9nW0AmCqqfScl22gydO5D5zqffSMDnn/eEiXlL0xrRel97oZGSokQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695403610; a=rsa-sha256; cv=none; b=X/nZgAlHSJjnt0A3DQg1Z9Ed2Q9sRwrMsU3W/50MvXTzqmwMu4vCW1hnQGt2lHADtsGF2Y WFiHe5GqqdPv6Ljn8iEh9x8/YIe/li1zaGmwSCVmaiYgjaJtThbdR+i8od9elL511IDZvv MY0XgO2gg1kOVPebNm7yXGeg4B5LMYNiuPj8qa9CRhbEAC6ytIzJD4jEGazz3pZF2TI/+/ 7DDUI6Tz/Ab3soJDN3sF6FpufV/NGxmnLc7P++JNFrpGT3V6RWIO8lV42a9fabc2AJo0I6 6WzixVSqEJOo6KAx6KYolxZm8SEe0vmhqk3KekbHF1QGtSV3DSZHJq9UeIn1DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695403610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWnIxtv87l75nMgv2LFv0KyhFUlodRcQOILZFC5W28o=; b=DKBSKO0mrqlBFCnM71k2GSMzWlvg5zBbE50It4g58ZySJw+FDqQF2qp12HrjVXd7gxO885 Y6F8R4HahVbrxN98ofQIMhZO7cGgLsmKnI9YpaZcOlKp60mlxXX/7ZkJqyisPwUDeDr8lB SEfiIg2s8nSKbL7RrWGhVJLRJK2VW6V+Nq0pOggMztuqyZ+9siEvIf4sA4gmhc/bH9GfMw MxAGi7WngI8n65FHPcA2+Oubzdhtg1kJgVjdBkUe5PKqBtUtdEKORzInPdr/yKb1xpjW+a 7KMpWfai1z2gLG5J8EU+B6y9WprCtizxa6gy3xV3Zkek6V6qy/3/I9rmMls0ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsfMZ3gfFzWVn; Fri, 22 Sep 2023 17:26: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 38MHQoiM097652; Fri, 22 Sep 2023 17:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MHQobx097649; Fri, 22 Sep 2023 17:26:50 GMT (envelope-from git) Date: Fri, 22 Sep 2023 17:26:50 GMT Message-Id: <202309221726.38MHQobx097649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 20295ac0d045 - stable/13 - ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20295ac0d0453a4efa1ffc93a580c83577a7f344 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=20295ac0d0453a4efa1ffc93a580c83577a7f344 commit 20295ac0d0453a4efa1ffc93a580c83577a7f344 Author: Dimitry Andric AuthorDate: 2023-09-19 11:45:57 +0000 Commit: Dimitry Andric CommitDate: 2023-09-22 17:24:36 +0000 ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le PR: 273776 MFC after: 3 days (cherry picked from commit 8a99263e9da1f04ede967cfa1ea6d52d258dcbe5) (cherry picked from commit 237b0c5b22c95683c2367ef0a82f54c309309db4) --- ObsoleteFiles.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 8aeefbb3c12c..55e0645f2d3a 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -416,14 +416,18 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-x86_64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-x86_64.a OLD_DIRS+=usr/lib/clang/15.0.7/lib/freebsd From nobody Fri Sep 22 19:07: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 4RshcG3SjLz4vHGs; Fri, 22 Sep 2023 19:07: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 4RshcG2vWMz4g0l; Fri, 22 Sep 2023 19:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695409678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pBaf1sGtXmQlZCgl2IWSZieSkPGVGUm75R7SrL0w6AU=; b=GjI2WEZ7hAmHWjjCOnOlrJYCDFyoHXYj6CzWcPEZQE/rLucTkKtP60cwavUhfzA8CuxT05 T0aJghN6bge4UFsZwv+C1UxDTYk9OQ3N/ZrxeGZadhpNBuExLGgsjouicXbWNZdHxrEojk YmOrUXKk8xF9pe7gtHN789Za29JETv0YcoHPIeUCbF/07LzpZvnCzKc81PWN/sM/U/oiqI qnIiyrwjMCgMI2k/NQIGvEvewFPg3t58Fx4tqejhkJklzxHBMXTsPyE6crsNLRgoEQzDpf 6UpYfrbu7yrN2kTp3Bh0iMOuKB4MvN11H9Mljy7q9duf9bgVyjq5uPnhqEUjeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695409678; a=rsa-sha256; cv=none; b=g4zb5vnIJE54wcxGArB3JkKUXDlDVl9bZGr3iIY8dCqZgsGK4wh7hFK/nWYHrlGA6goo5a IvrJZ23Kqh+lZfyFsUl+mjEeSRXwU3QMDYmJvHdQBT+3Ql7ybYzuBXN03PMpYxf6tSO7W8 eTNuE7TGSbeWxok1UsI7FiH/IaO5DH5jMdcpIMki4fs3s0Mw9QkQvOWxe7Gm5FsNirZXjf Z0KRSFqXSmgcjEt2TqjuxuIACB1ySjUHnhBZPa9pPJyeRLT/dX77CjzIvY3xHlay2+sk9z JMLJX2qJ5RAGEifqttk9ey5GChvfM86RVRnbPCTuHAJwz1n4jBLqlFntWJ5DOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695409678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pBaf1sGtXmQlZCgl2IWSZieSkPGVGUm75R7SrL0w6AU=; b=Q9rir9FiTXg6N2zGQZRifWgDnfAWXKtbcIu5K4x3d3fpT3rRmMgRMS4t5D2rJ1dBI1boW+ deOBl4fVT49/FIVq9K9qtcY7C95Y9TC1vtZPQYPQA2l9/0Pz2eK4fzD5r7rhQJeCdq3ntk nYuQbB9+RjdYFzjJzp4V2fv6oyp383j6BWZtwSMzqC7CStrsZPY1BEhLO33j789iX7MIdu seKI/50d0Y/W0Ma716BXUQ1hDuqLvI0a/QLkyiJWL/uvHqRblW65vSO8ZGMxtc3lkEe5EM cyyAxRW/vk+TN6JkvpgrADmtqz7VvXpTGOd3il1Q15tvTTtohiPmoToFrqGBCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RshcG1yQSzYvk; Fri, 22 Sep 2023 19:07: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 38MJ7wmu065878; Fri, 22 Sep 2023 19:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MJ7w1Y065875; Fri, 22 Sep 2023 19:07:58 GMT (envelope-from git) Date: Fri, 22 Sep 2023 19:07:58 GMT Message-Id: <202309221907.38MJ7w1Y065875@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: e99406a2bb32 - stable/14 - OpenSSL: Fix handling of the "0:" label in arm-xlate.pl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: e99406a2bb3234e2a05eef5e63be3054ffac3371 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e99406a2bb3234e2a05eef5e63be3054ffac3371 commit e99406a2bb3234e2a05eef5e63be3054ffac3371 Author: Tom Cosgrove AuthorDate: 2023-08-29 21:38:11 +0000 Commit: Ed Maste CommitDate: 2023-09-22 19:06:35 +0000 OpenSSL: Fix handling of the "0:" label in arm-xlate.pl When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't a label. Correct this by looking at the result of the s/// command. Verified that there are no changes in the .S files created during a normal build, and that the "0:" labels appear in the translation given in the error report (and they are the only difference in the before and after output). Obtained from: OpenSSL commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41587 (cherry picked from commit eba6abafc1988dc8753b08822abff333d4810e75) --- crypto/openssl/crypto/perlasm/arm-xlate.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/crypto/perlasm/arm-xlate.pl b/crypto/openssl/crypto/perlasm/arm-xlate.pl index a90885905c0f..57b75c4e5dad 100755 --- a/crypto/openssl/crypto/perlasm/arm-xlate.pl +++ b/crypto/openssl/crypto/perlasm/arm-xlate.pl @@ -159,9 +159,8 @@ while(my $line=<>) { } { - $line =~ s|(^[\.\w]+)\:\s*||; - my $label = $1; - if ($label) { + if ($line =~ s|(^[\.\w]+)\:\s*||) { + my $label = $1; printf "%s:",($GLOBALS{$label} or $label); } } From nobody Fri Sep 22 19:07: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 4RshcH5cYKz4vH45; Fri, 22 Sep 2023 19:07: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 4RshcH412mz3Bvd; Fri, 22 Sep 2023 19:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695409679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IweWknBRgWyS8Jynr+znaM1P3khobibLwr6bN//XAHg=; b=L1rE/G1+NDOZJQvz6u8j63NrBylskz5LRcympsvZcIkTVG2F+T8FJrKsjDOkGETYpgfqKi aZXomB4IYlqXCu8qXf4TdDMS/Ps0VNMig2ETf2Gz0mA9rrEkaBtYBbkFSWx2I3xSOmVU4O OqchfFL4dtPuH9ZftvqUobfH3SapqZCouj/I82BV75fcl78Mqhj608gwsWHkZ0icNeglyz sBIE9vvlskAzZmpa+zGDLgKd4XSDhgY0CO88RySz60GcfcjMU8ZWxDtQSB8mC3wfGaag3G ZE0txq0jTsXFBywT8ldYh3q8fh4tMwzEOdQjOjGj/VKd54a1oaIgiWu1UYuH/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695409679; a=rsa-sha256; cv=none; b=C0bVaLjruSQUmBxOpm4if7RlNbmLwOCxWYtHbwaDlO+ROW0+dqn6beyAB6qZ6Pu5kl/TNV 57OsbTTqP55kMOuA/QGPTu+n6WP2OcyYK+qwrRChXCt8QwYM0o9ppZtkPprkC/3399XLUZ OF/XjbNQummOTQU/b3J3vh8MqokC6jnnudHQF/OckK82jQJ2NNcjZlut1T15/ZEweOcPB6 AY9MlSfSLyEUNnLM/zw+Epulrl13ZPSZVfgBwcdkAwX5ifbFXQLolaYDNgx5JdN3VV8j3T vEehdcfZUG67QPK4E1Z0GwTjW9T/Ht18EL7aA62lWczexlztstibcVkjUFTV6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695409679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IweWknBRgWyS8Jynr+znaM1P3khobibLwr6bN//XAHg=; b=OPYByMeTrLERXasM6HfG6s4+HE+CiZvj6aTI/aouJzeIyxrUvzFlA6NLigRlUGVHKkdaT+ JD4EymjdSCEizd8OufoOOGg+ujAvwpAsYag963hQ8aqM6pci+7Kp8mskVLDI9YtoIwwL89 QdQIoICf5zHSp2Foylq/mptjaRBsk1Em42DvnGZzZGTHxyI3uwEV8Ll3RnguVHD+E+1YdF gzieTvNAYWUAa9okUseNFNVzkyp3dvYmOL0PDSv/DPTHovKPktVZ7cHYjiHYKTCsaD0MNO jAtJW+Jcp744VsvRS8q/cwIk76HSYEs/tWIIgb/TnBU5BCY0A2NBytPXrZh6mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RshcH2lRBzZCQ; Fri, 22 Sep 2023 19:07: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 38MJ7xJx065928; Fri, 22 Sep 2023 19:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MJ7xis065925; Fri, 22 Sep 2023 19:07:59 GMT (envelope-from git) Date: Fri, 22 Sep 2023 19:07:59 GMT Message-Id: <202309221907.38MJ7xis065925@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: abd9da936335 - stable/14 - libcrypto: fix the FIPS provider on amd64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: abd9da936335eca88d670ad35a94ed67d911bdb1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=abd9da936335eca88d670ad35a94ed67d911bdb1 commit abd9da936335eca88d670ad35a94ed67d911bdb1 Author: Pierre Pronchery AuthorDate: 2023-09-04 17:57:35 +0000 Commit: Ed Maste CommitDate: 2023-09-22 19:06:35 +0000 libcrypto: fix the FIPS provider on amd64 This corrects the list of source files required for the FIPS provider. To test: ``` INSTALL PASSED enter AES-128-CBC encryption password: Verifying - enter AES-128-CBC encryption password: U2FsdGVkX1+MGm7LbZou29UWU+KAyBX/PxF5T1pO9VM= ``` Reviewed by: emaste Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/837 Differential Revision: https://reviews.freebsd.org/D41720 (cherry picked from commit 8f37b3a142f2f7197896cd283c44c7e4fb64aaf3) --- secure/lib/libcrypto/modules/fips/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index b674126bb6cf..8843cb9717c9 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -32,25 +32,25 @@ SRCS+= mem_clr.c .endif # crypto/aes -SRCS+= aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c +SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c .if defined(ASM_aarch64) -SRCS+= aes_core.c aesv8-armx.S vpaes-armv8.S +SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto .elif defined(ASM_amd64) -SRCS+= aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S aesni-sha256-x86_64.S -SRCS+= aesni-x86_64.S vpaes-x86_64.S +SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S +SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif defined(ASM_arm) -SRCS+= aes-armv4.S aesv8-armx.S bsaes-armv7.S +SRCS+= aes_cbc.c aes-armv4.S aesv8-armx.S bsaes-armv7.S .elif defined(ASM_i386) -SRCS+= aes_core.c aesni-x86.S vpaes-x86.S +SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .elif defined(ASM_powerpc) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .elif defined(ASM_powerpc64) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .elif defined(ASM_powerpc64le) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .else -SRCS+= aes_core.c +SRCS+= aes_cbc.c aes_core.c .endif # crypto/bn From nobody Fri Sep 22 20:48: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 4Rskqk2BBnz4vNqg; Fri, 22 Sep 2023 20:48: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 4Rskqk1Pjjz3J0H; Fri, 22 Sep 2023 20:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CmppmVZy2zcuPihOpOLT/qnvFg+cEpYqteLOAKLHG1I=; b=i4NYiSdQhboOGOnXXjb3Oup9vkog5cWinnO5twGsxKj/Ki52V/uGDd4f5DEP2Qvebs2BJe LTctUOsF2oaGbCHg/PnoXHh3zIGLeuUewD5N2f91XUWOPnI3FJZ7NtH2EGN0hkuu4VQZGh Motn3XbI4HBlr4cNejTSCYnIsubgT20DTx3rbBUtdTpTxVX2I/tiSBR8SrGJOBsztUYBr7 Xo+iV68g8xfsIa35tnzsbrBWLMMeMzwt9Vh1QMO+sTFVt9gIy9jUzcF0EP29VSEeUG7IPx zIB5NV0PcatYf/JQWr5QQbr/vh5v2am3v6yVzd4Yw5z6XOR+3cjJBdPYMK3XPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695415682; a=rsa-sha256; cv=none; b=WxW6IxkFa+eWiSWHRmqLf60fbw8eQxjj2mxMjZPmubZlXrZfOO4CbUs7vqmAfs44cdEHIt FJdwyMHEX6xjZs8tKqJgZTf6QWU5sXYKv94oLbWMf5h/1ZUn1mUNXlobOvWIr9k3DX3o9s MpsP7eSM8RKU65bABLXPNl9TmT+yk+s+0trKhZiR7sw3Ky/XB6aSOOoMy0J+xOLDgsTfnx 8a6PVo+Ve/Yl/rA6hv2vNH4P220k+T3wyw1rhOFyBGQ+GGq+wL+/WrcDhRRB8s+8t0rTaa Hmp67w/Wz1V6m2rJafBBiNsHj0XRZLuSb4BSNrNTVhWX3+cqpkueUePFPKwI9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CmppmVZy2zcuPihOpOLT/qnvFg+cEpYqteLOAKLHG1I=; b=Fo/ggI9AhmGcZEeJnx1QOOmSb927cBvlCQIQjRo6F8ssni/Ik5nRbluhHsJLsr+P66JC/r MHJD+Cxyt/gvZWmgSNSZrtDLZGk+SJsklggzTlxyGUptQHel5RGCUvBnm1VBCcC4rglEC8 6CJRVWr63nSx3ocCaLaiye8lW7Lm6GmfYzYf3hrpVpi8DnyEJmdnluDGvM935GPxFaWaue I0j1lE5f8+CZ2XLM/oXhd3WQLNrHMkYiHWLdGMbgOS6n+n5HkthdcnvlU9nIWm9GTi+o8S PHfQDvXlwcHU1uwInD6LrJC3PM+THpfnHfRPW1EV3Vm+52Vw1+4UgrNE331PYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rskqk0Rx8zc0V; Fri, 22 Sep 2023 20:48: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 38MKm1dA030660; Fri, 22 Sep 2023 20:48:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MKm12h030657; Fri, 22 Sep 2023 20:48:01 GMT (envelope-from git) Date: Fri, 22 Sep 2023 20:48:01 GMT Message-Id: <202309222048.38MKm12h030657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 65d0d7807328 - stable/14 - ice_ddp: Update to 1.3.35.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: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 65d0d780732853b5ddb2278497d2c72b2b42d7d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=65d0d780732853b5ddb2278497d2c72b2b42d7d0 commit 65d0d780732853b5ddb2278497d2c72b2b42d7d0 Author: Eric Joyner AuthorDate: 2023-08-22 04:55:34 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 20:37:17 +0000 ice_ddp: Update to 1.3.35.0 This is intended to be used with the upcoming updated ice(4) version 1.38.16-k. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation (cherry picked from commit e04c4b4a369df3f1dcbebbdf726193f02af60801) --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/contrib/dev/ice/LICENSE | 2 +- .../dev/ice/{ice-1.3.30.0.pkg => ice-1.3.35.0.pkg} | Bin 692660 -> 692776 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index e1499b19bb12..dfbe278f0c46 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -194,7 +194,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -203,8 +203,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 7b033c979c55..02dcadc0aa5c 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -322,7 +322,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -331,8 +331,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index aad29d050b68..48251ab07d9e 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -95,7 +95,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -104,8 +104,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/LICENSE b/sys/contrib/dev/ice/LICENSE index 7faadfc55aac..97fe53c2d998 100644 --- a/sys/contrib/dev/ice/LICENSE +++ b/sys/contrib/dev/ice/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2021, Intel Corporation. +Copyright (c) 2006-2023, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without diff --git a/sys/contrib/dev/ice/ice-1.3.30.0.pkg b/sys/contrib/dev/ice/ice-1.3.35.0.pkg similarity index 88% rename from sys/contrib/dev/ice/ice-1.3.30.0.pkg rename to sys/contrib/dev/ice/ice-1.3.35.0.pkg index 454a2a6ea193..fc3e8ebc640f 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.30.0.pkg and b/sys/contrib/dev/ice/ice-1.3.35.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index 41ed4ac92888..ad85bc2a9935 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.30.0.pkg:ice_ddp:0x01031e00 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.35.0.pkg:ice_ddp:0x01032300 .include From nobody Fri Sep 22 20:48: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 4Rskql2r2Cz4vNqj; Fri, 22 Sep 2023 20:48: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 4Rskql2LTyz3HxW; Fri, 22 Sep 2023 20:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3peReChQ1OzzlWHMqm4sHf9moaPuHJx6iwKyKrJ+ARQ=; b=w3jwaZ05aH2QD8IwjYkwLJ5IHR74qVeL43f8MQJvCFpxe9cdhOp2FOrIcSmteezogUO8H7 WLWBfUPhMn8AF8ur9xp/TWC/+Hy4KmxZ1vwwKtvTl3Hps3dENs8SN0G/Z/OjkbbpUgPzE8 KYaqc/ZwygMcpiJEFnetjCYE1xhS75Fc0zbQ8V2nFM1JpfJBEhbyomKGQqRzoQySujTFfJ Qwd7gY/U2lcqtLOB3xZ5FCK3pVM+eTlz7g9lsWcHAEZbo56m0UR8nF05U91gCjq+5cJ1me c6tZt2RKvQP02N9NcTrthYcPI3SGgwCpYFwGK073eWBi7dLK8415xoBCV1eD2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695415683; a=rsa-sha256; cv=none; b=P7782+QBCz5I/GOJYKKghQtKKXweM5r0LfMbJB2oVh09KRUc1Lt4QnhE8g72ofZIlX5M+U +eQVXnWTOeIMvH+qOzf/NG24/uJnHKG8Z1xC6JRif4suGkn436tf+wqs9zQy4I+910DX4P epf2tNMZkAhEfhphayXtU/zPqrir2Sw1b3wlMpCvncHmN5jzEsNPMwZ5Ukn8tmbhWY6IgQ ZT7yk50TNrCDQXJJLys+Mt6dXQrUfMYtVrXXh1yUb5HQNO2jrlDG3rkO6Fg24vgvufZ0jx +o3lAJI6w0d1gFW5eoohtuEVEU6a+UdqdV2zCuDkDbR/Pn0xR4qu9MbHhVF7qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3peReChQ1OzzlWHMqm4sHf9moaPuHJx6iwKyKrJ+ARQ=; b=fRsKHLeoG00X0i6KJmRosSglnozonR3w2kdol2UZldlIwwl/E01AB+oAiLz82QV2suwmod GzN1U5x6HONAxHbcFTWB0vgA5K8sHaZ0JRmutnd9lZjOG5HcLrwdH8UazI2XOzBI2wJcLA gssQdoPekxtzrZnEJz99XPWyPVYxKYv8vRVZYfiM4aH1KZoevboXFE2tvadMVIYqE8zXLg K0aQH3ImzjlzX5NWW/03zVi16d6vpXtVtHQCHCabmL2x2tNywJtrEKPmm8FhYBOAfom9uU afO8JbmTGIA4EUQFteJTcfF7s4kPYvG88kUZapNuqca+FpdxKX05wxzW33iqoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rskql1S79zcQW; Fri, 22 Sep 2023 20:48: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 38MKm3oU030709; Fri, 22 Sep 2023 20:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MKm3YV030706; Fri, 22 Sep 2023 20:48:03 GMT (envelope-from git) Date: Fri, 22 Sep 2023 20:48:03 GMT Message-Id: <202309222048.38MKm3YV030706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: cc1abdc6ab34 - stable/14 - irdma(4): use related vnet for searching netdev List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc1abdc6ab34211748988684800d5b54705b36c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc1abdc6ab34211748988684800d5b54705b36c2 commit cc1abdc6ab34211748988684800d5b54705b36c2 Author: Bartosz Sobczak AuthorDate: 2023-09-12 21:31:39 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 20:37:35 +0000 irdma(4): use related vnet for searching netdev It was found through testing that when ULP uses individual vnet, the search for the correct vlan_id may failing because of no proper interface with given address. The solution is to use vnet associated to the connection whenever possible. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41592 (cherry picked from commit bc3a013ccd23c50bb48f17211ffc36fe85d11e18) --- sys/dev/irdma/fbsd_kcompat.c | 6 ++---- sys/dev/irdma/fbsd_kcompat.h | 14 ++++++++++++++ sys/dev/irdma/irdma_cm.c | 35 ++++++++++++++++++++++++----------- sys/dev/irdma/irdma_main.h | 5 +++-- sys/dev/irdma/irdma_verbs.c | 4 ++-- 5 files changed, 45 insertions(+), 19 deletions(-) diff --git a/sys/dev/irdma/fbsd_kcompat.c b/sys/dev/irdma/fbsd_kcompat.c index 013f9279952e..fbfa5c9e5fc4 100644 --- a/sys/dev/irdma/fbsd_kcompat.c +++ b/sys/dev/irdma/fbsd_kcompat.c @@ -393,8 +393,7 @@ irdma_get_dst_mac(struct irdma_cm_node *cm_node, struct sockaddr *dst_sin, u8 *d { struct ifnet *netdev = cm_node->iwdev->netdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif struct ifnet *ifp; struct llentry *lle; @@ -492,8 +491,7 @@ irdma_resolve_neigh_lpb_chk(struct irdma_device *iwdev, struct irdma_cm_node *cm struct irdma_cm_info *cm_info) { #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif int arpindex; int oldarpindex; diff --git a/sys/dev/irdma/fbsd_kcompat.h b/sys/dev/irdma/fbsd_kcompat.h index eb1e615fc048..f465f97167cc 100644 --- a/sys/dev/irdma/fbsd_kcompat.h +++ b/sys/dev/irdma/fbsd_kcompat.h @@ -121,6 +121,20 @@ static inline u64 *irdma_next_pbl_addr(u64 *pbl, struct irdma_pble_info **pinfo, return (*pinfo)->addr; } + +static inline struct vnet * +irdma_cmid_to_vnet(struct iw_cm_id *cm_id) +{ + struct rdma_cm_id *rdma_id; + + if (!cm_id) + return &init_net; + + rdma_id = (struct rdma_cm_id *)cm_id->context; + + return rdma_id->route.addr.dev_addr.net; +} + #if __FreeBSD_version < 1400026 struct ib_cq *irdma_create_cq(struct ib_device *ibdev, const struct ib_cq_init_attr *attr, diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 48aefda681cb..c1d5875961f0 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1624,10 +1624,13 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4) * vlan id and mac for that address. */ if_t -irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) +irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac) { if_t ip_dev = NULL; struct in6_addr laddr6; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif struct ifaddr *ifa; u16 scope_id = 0; @@ -1641,7 +1644,11 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) IN6_IS_ADDR_MC_INTFACELOCAL(&laddr6)) scope_id = ntohs(laddr6.__u6_addr.__u6_addr16[1]); +#ifdef VIMAGE + ip_dev = ip6_ifp_find(vnet, laddr6, scope_id); +#else ip_dev = ip6_ifp_find(&init_net, laddr6, scope_id); +#endif if (ip_dev) { if (vlan_id) *vlan_id = rdma_vlan_dev_vlan_id(ip_dev); @@ -1658,12 +1665,19 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) * @addr: local IPv4 address */ u16 -irdma_get_vlan_ipv4(u32 *addr) +irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { if_t netdev; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif u16 vlan_id = 0xFFFF; +#ifdef VIMAGE + netdev = ip_ifp_find(vnet, htonl(addr[0])); +#else netdev = ip_ifp_find(&init_net, htonl(addr[0])); +#endif if (netdev) { vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); @@ -2060,8 +2074,7 @@ irdma_cm_create_ah(struct irdma_cm_node *cm_node, bool wait) struct irdma_ah_info ah_info = {0}; struct irdma_device *iwdev = cm_node->iwdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif ether_addr_copy(ah_info.mac_addr, if_getlladdr(iwdev->netdev)); @@ -3520,11 +3533,11 @@ irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (((struct sockaddr_in *)&cm_id->local_addr)->sin_family == AF_INET) { cm_node->ipv4 = true; - cm_node->vlan_id = irdma_get_vlan_ipv4(cm_node->loc_addr); + cm_node->vlan_id = irdma_get_vlan_ipv4(cm_id, cm_node->loc_addr); } else { cm_node->ipv4 = false; - irdma_netdev_vlan_ipv6(cm_node->loc_addr, &cm_node->vlan_id, - NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_node->loc_addr, + &cm_node->vlan_id, NULL); } irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Accept vlan_id=%d\n", cm_node->vlan_id); @@ -3719,7 +3732,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_info.rem_addr[0] = ntohl(raddr->sin_addr.s_addr); cm_info.loc_port = ntohs(laddr->sin_port); cm_info.rem_port = ntohs(raddr->sin_port); - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV6) return -EINVAL; @@ -3731,7 +3744,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) raddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); cm_info.rem_port = ntohs(raddr6->sin6_port); - irdma_netdev_vlan_ipv6(cm_info.loc_addr, &cm_info.vlan_id, NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } cm_info.cm_id = cm_id; cm_info.qh_qpid = iwdev->vsi.ilq->qp_id; @@ -3846,7 +3859,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) cm_info.loc_port = ntohs(laddr->sin_port); if (laddr->sin_addr.s_addr != htonl(INADDR_ANY)) { - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { cm_info.vlan_id = 0xFFFF; wildcard = true; @@ -3860,7 +3873,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) laddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); if (!IN6_IS_ADDR_UNSPECIFIED(&laddr6->sin6_addr)) { - irdma_netdev_vlan_ipv6(cm_info.loc_addr, + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } else { cm_info.vlan_id = 0xFFFF; diff --git a/sys/dev/irdma/irdma_main.h b/sys/dev/irdma/irdma_main.h index 25c3fcfc939e..aa5bbee2fb77 100644 --- a/sys/dev/irdma/irdma_main.h +++ b/sys/dev/irdma/irdma_main.h @@ -584,8 +584,9 @@ void irdma_gen_ae(struct irdma_pci_f *rf, struct irdma_sc_qp *qp, struct irdma_gen_ae_info *info, bool wait); void irdma_copy_ip_ntohl(u32 *dst, __be32 *src); void irdma_copy_ip_htonl(__be32 *dst, u32 *src); -u16 irdma_get_vlan_ipv4(u32 *addr); -if_t irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac); +u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr); +if_t irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, + u8 *mac); struct ib_mr *irdma_reg_phys_mr(struct ib_pd *ib_pd, u64 addr, u64 size, int acc, u64 *iova_start); int irdma_upload_qp_context(struct irdma_qp *iwqp, bool freeze, bool raw); diff --git a/sys/dev/irdma/irdma_verbs.c b/sys/dev/irdma/irdma_verbs.c index 8b7b34f7b2fb..cda8041ab397 100644 --- a/sys/dev/irdma/irdma_verbs.c +++ b/sys/dev/irdma/irdma_verbs.c @@ -3336,7 +3336,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) if (!ipv6_addr_v4mapped((struct in6_addr *)ibgid)) { irdma_copy_ip_ntohl(ip_addr, sgid_addr.saddr_in6.sin6_addr.__u6_addr.__u6_addr32); - irdma_netdev_vlan_ipv6(ip_addr, &vlan_id, NULL); + irdma_netdev_vlan_ipv6(iwqp->cm_id, ip_addr, &vlan_id, NULL); ipv4 = false; irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP6address=%x:%x:%x:%x\n", ibqp->qp_num, @@ -3345,7 +3345,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) } else { ip_addr[0] = ntohl(sgid_addr.saddr_in.sin_addr.s_addr); ipv4 = true; - vlan_id = irdma_get_vlan_ipv4(ip_addr); + vlan_id = irdma_get_vlan_ipv4(iwqp->cm_id, ip_addr); irdma_mcast_mac_v4(ip_addr, dmac); irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP4address=%x, MAC=%x:%x:%x:%x:%x:%x\n", From nobody Fri Sep 22 20:48: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 4Rskqm435wz4vNjm; Fri, 22 Sep 2023 20:48: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 4Rskqm3LBTz3JKT; Fri, 22 Sep 2023 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaIf1C6/INpiqE/BbUiRaHDnk2lmlWXojvMNY7E5uks=; b=UUCKvKLOTcAfsS1bDWUzDKNQVGxLFxPOuEeuvgw02CQixwj2595g0QA7fQE57fRkfE5UYj lD0pbimk80ca+HmZrnB6bgd3L+9In6QTABBa4o6rOZueOlls9kLKADjjqabEFXB+pE7pFl AXh9L0wdIG3LG9kGsB27B+0M+egzTR8GDteh4WhpbS0Xl0s0H9BPOmze3e8sVxJZyxFnUG HbsLqwIseIY4bRPOiPjiAIAnELGgtyAJW7CTzlWDZeygfbXCq+6MI974kZYvpNxMw2WiOR CO2fpguLZEGWpt0NScwEKHS/i4JbilFyYEKjWJNRMm0PAwjy4Z4AmEboY3C/CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695415684; a=rsa-sha256; cv=none; b=AvEaM/duBDIkNQgnHx1Lv6NV2sJuvQq6JlNJWcDi7h8K/TfAlS/hfOwZWbDwO5VCfV7fFT qSDd5hCnChkgrON4cbQbqs8MnEr49XWoytsSeJHCHFj+RkE2FAk9ScR0MX3T60qfO8+YsW jOG3DIQvx7uWXUZ4iLxnCfGkMnHjB17n899rd8BpZDVyV1S1O4jOW8CK30ermLBTWYp3Ce 1D4En7HR6+cKcVkGVXioXe07KQdJENwXvJdYeRNl8+E/b0RLy3t49Bwdul6XE5aOpcCpqh XQca5U6O80sJOdg2JH3ZzgyF+3Rd2em226bc/uBQos8WBMtHaeHDTJJcuxNloA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaIf1C6/INpiqE/BbUiRaHDnk2lmlWXojvMNY7E5uks=; b=vxlOJ/ZOjFq7Hk3zlnzRDNRPxM1j36/rwrNZ8BP6DlZKJT1nTmLv9qNpiUMJhPNGZgs5T/ LLOgjPr4XaMcF0befi5aD+9fjm0fyCizDaJg/r/AZv56YFRFn+oFK8iWKLBE9BMTjajLLG q0ikRxvUAk0oGC6+6Omnt6OCWKaY07JMWv+u2r3/EVtf2Swb/oHfhCxTg2P0b93Alxlv+C XS1qyorSB2v34FWz7b4Lf9jPlGTwoHGoitVbctwWwHuJ0fLnd9+b8kKnO/HV2PdJ896dYx HKWDkLQqBytMYhD4rZ+DJTFxsjMrm11w5Fd722iA0HiFY6/muWX5LO0B1BbM0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rskqm2RTkzcQX; Fri, 22 Sep 2023 20:48: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 38MKm41h030752; Fri, 22 Sep 2023 20:48:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MKm4sg030749; Fri, 22 Sep 2023 20:48:04 GMT (envelope-from git) Date: Fri, 22 Sep 2023 20:48:04 GMT Message-Id: <202309222048.38MKm4sg030749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 4e80493a33fe - stable/14 - irdma(4): remove artificial completion generator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4e80493a33feeabd358ffc233463934a85649c45 Auto-Submitted: auto-generated The branch stable/14 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=4e80493a33feeabd358ffc233463934a85649c45 commit 4e80493a33feeabd358ffc233463934a85649c45 Author: Bartosz Sobczak AuthorDate: 2023-09-12 21:35:06 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 20:38:33 +0000 irdma(4): remove artificial completion generator Removing artificial completion generator as there had been no indication of the code being required for E810 cards. Further more it was found that the code may have unpleasant side effects on user experience when using ucmatose tool. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41593 (cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080) --- contrib/ofed/libirdma/irdma_umain.h | 8 -- contrib/ofed/libirdma/irdma_uverbs.c | 161 +---------------------------------- 2 files changed, 1 insertion(+), 168 deletions(-) diff --git a/contrib/ofed/libirdma/irdma_umain.h b/contrib/ofed/libirdma/irdma_umain.h index c67c5d7076f9..7ff850c46b72 100644 --- a/contrib/ofed/libirdma/irdma_umain.h +++ b/contrib/ofed/libirdma/irdma_umain.h @@ -109,11 +109,6 @@ struct verbs_cq { }; }; -struct irdma_cmpl_gen { - LIST_ENTRY(irdma_cmpl_gen) list; - struct irdma_cq_poll_info cpi; -}; - struct irdma_ucq { struct verbs_cq verbs_cq; struct verbs_mr vmr; @@ -130,7 +125,6 @@ struct irdma_ucq { struct list_head resize_list; /* for extended CQ completion fields */ struct irdma_cq_poll_info cur_cqe; - struct list_head_cmpl cmpl_generated; }; struct irdma_uqp { @@ -150,7 +144,6 @@ struct irdma_uqp { struct irdma_qp_uk qp; enum ibv_qp_type qp_type; struct irdma_sge *recv_sges; - pthread_t flush_thread; }; /* irdma_uverbs.c */ @@ -207,5 +200,4 @@ void irdma_async_event(struct ibv_context *context, void irdma_set_hw_attrs(struct irdma_hw_attrs *attrs); void *irdma_mmap(int fd, off_t offset); void irdma_munmap(void *map); -void *irdma_flush_thread(void *arg); #endif /* IRDMA_UMAIN_H */ diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c index c59d409e72cd..bc6bec34e6cd 100644 --- a/contrib/ofed/libirdma/irdma_uverbs.c +++ b/contrib/ofed/libirdma/irdma_uverbs.c @@ -459,7 +459,6 @@ ucreate_cq(struct ibv_context *context, info.cq_size = get_cq_size(attr_ex->cqe, hw_rev, cqe_64byte_ena); iwucq->comp_vector = attr_ex->comp_vector; LIST_INIT(&iwucq->resize_list); - LIST_INIT(&iwucq->cmpl_generated); total_size = get_cq_total_bytes(info.cq_size, cqe_64byte_ena); cq_pages = total_size >> IRDMA_HW_PAGE_SHIFT; @@ -615,142 +614,6 @@ irdma_process_resize_list(struct irdma_ucq *iwucq, return cq_cnt; } -static void -irdma_remove_cmpls_list(struct irdma_ucq *iwucq) -{ - struct irdma_cmpl_gen *cmpl_node, *next; - - LIST_FOREACH_SAFE(cmpl_node, &iwucq->cmpl_generated, list, next) { - LIST_REMOVE(cmpl_node, list); - free(cmpl_node); - } -} - -static int -irdma_generated_cmpls(struct irdma_ucq *iwucq, struct irdma_cq_poll_info *cq_poll_info) -{ - struct irdma_cmpl_gen *cmpl; - - if (!iwucq || LIST_EMPTY(&iwucq->cmpl_generated)) - return ENOENT; - cmpl = LIST_FIRST(&iwucq->cmpl_generated); - LIST_REMOVE(cmpl, list); - memcpy(cq_poll_info, &cmpl->cpi, sizeof(*cq_poll_info)); - - free(cmpl); - - return 0; -} - -/** - * irdma_set_cpi_common_values - fill in values for polling info struct - * @cpi: resulting structure of cq_poll_info type - * @qp: QPair - * @qp_num: id of the QP - */ -static void -irdma_set_cpi_common_values(struct irdma_cq_poll_info *cpi, - struct irdma_qp_uk *qp, __u32 qp_num) -{ - cpi->comp_status = IRDMA_COMPL_STATUS_FLUSHED; - cpi->error = 1; - cpi->major_err = IRDMA_FLUSH_MAJOR_ERR; - cpi->minor_err = FLUSH_GENERAL_ERR; - cpi->qp_handle = (irdma_qp_handle) (uintptr_t)qp; - cpi->qp_id = qp_num; -} - -static bool -irdma_cq_empty(struct irdma_ucq *iwucq) -{ - struct irdma_cq_uk *ukcq; - __u64 qword3; - __le64 *cqe; - __u8 polarity; - - ukcq = &iwucq->cq; - cqe = IRDMA_GET_CURRENT_CQ_ELEM(ukcq); - get_64bit_val(cqe, 24, &qword3); - polarity = (__u8) FIELD_GET(IRDMA_CQ_VALID, qword3); - - return polarity != ukcq->polarity; -} - -/** - * irdma_generate_flush_completions - generate completion from WRs - * @iwuqp: pointer to QP - */ -static void -irdma_generate_flush_completions(struct irdma_uqp *iwuqp) -{ - struct irdma_qp_uk *qp = &iwuqp->qp; - struct irdma_ring *sq_ring = &qp->sq_ring; - struct irdma_ring *rq_ring = &qp->rq_ring; - struct irdma_cmpl_gen *cmpl; - __le64 *sw_wqe; - __u64 wqe_qword; - __u32 wqe_idx; - - if (pthread_spin_lock(&iwuqp->send_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->send_cq)) { - while (IRDMA_RING_MORE_WORK(*sq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->send_cq->lock); - return; - } - - wqe_idx = sq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->sq_wrtrk_array[wqe_idx].wrid; - sw_wqe = qp->sq_base[wqe_idx].elem; - get_64bit_val(sw_wqe, 24, &wqe_qword); - cmpl->cpi.op_type = (__u8) FIELD_GET(IRDMAQPSQ_OPCODE, wqe_qword); - /* remove the SQ WR by moving SQ tail */ - IRDMA_RING_SET_TAIL(*sq_ring, sq_ring->tail + qp->sq_wrtrk_array[sq_ring->tail].quanta); - LIST_INSERT_HEAD(&iwuqp->send_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->send_cq->lock); - if (pthread_spin_lock(&iwuqp->recv_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->recv_cq)) { - while (IRDMA_RING_MORE_WORK(*rq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->recv_cq->lock); - return; - } - - wqe_idx = rq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->rq_wrid_array[wqe_idx]; - cmpl->cpi.op_type = IRDMA_OP_TYPE_REC; - /* remove the RQ WR by moving RQ tail */ - IRDMA_RING_SET_TAIL(*rq_ring, rq_ring->tail + 1); - LIST_INSERT_HEAD(&iwuqp->recv_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->recv_cq->lock); -} - -void * -irdma_flush_thread(void *arg) -{ - __u8 i = 5; - struct irdma_uqp *iwuqp = arg; - - while (--i) { - if (pthread_spin_lock(&iwuqp->lock)) - break; - irdma_generate_flush_completions(arg); - pthread_spin_unlock(&iwuqp->lock); - sleep(1); - } - pthread_exit(NULL); -} - /** * irdma_udestroy_cq - destroys cq * @cq: ptr to cq to be destroyed @@ -771,8 +634,6 @@ irdma_udestroy_cq(struct ibv_cq *cq) if (ret) goto err; - if (!LIST_EMPTY(&iwucq->cmpl_generated)) - irdma_remove_cmpls_list(iwucq); irdma_process_resize_list(iwucq, NULL); ret = ibv_cmd_destroy_cq(cq); if (ret) @@ -1016,15 +877,6 @@ __irdma_upoll_cq(struct irdma_ucq *iwucq, int num_entries, while (npolled < num_entries) { ret = irdma_poll_one(&iwucq->cq, cur_cqe, entry ? entry + npolled : NULL); - if (ret == ENOENT) { - ret = irdma_generated_cmpls(iwucq, cur_cqe); - if (!ret) { - if (entry) - irdma_process_cqe(entry + npolled, cur_cqe); - else - irdma_process_cqe_ext(cur_cqe); - } - } if (!ret) { ++npolled; cq_new_cqe = true; @@ -1710,14 +1562,7 @@ irdma_umodify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask) return ret; } else { - int ret; - - ret = ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); - if (ret) - return ret; - if (attr_mask & IBV_QP_STATE && attr->qp_state == IBV_QPS_ERR) - pthread_create(&iwuqp->flush_thread, NULL, irdma_flush_thread, iwuqp); - return 0; + return ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); } } @@ -1770,10 +1615,6 @@ irdma_udestroy_qp(struct ibv_qp *qp) int ret; iwuqp = container_of(qp, struct irdma_uqp, ibv_qp); - if (iwuqp->flush_thread) { - pthread_cancel(iwuqp->flush_thread); - pthread_join(iwuqp->flush_thread, NULL); - } ret = pthread_spin_destroy(&iwuqp->lock); if (ret) goto err; From nobody Fri Sep 22 20:48: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 4Rskqn5fHsz4vNjp; Fri, 22 Sep 2023 20:48: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 4Rskqn4nlHz3J1P; Fri, 22 Sep 2023 20:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/rXtCo9+sVWJdq8JNRTXBROF5tcxsgMVfyMr5iIjs00=; b=PZzQFWGdAGu0Cfyjed32gKSVfRUlnS241ltPwqO0dGe0Irqgl6r8iNOJY32+mihHuO5oVg iek8VCyr+vd6o2h22i8aadOu9EqD64maTUexDb15mnBIjQtFeeBfxlWcpJTJTFV0owthhr utLE6/Pc3gnmFmbwL7sU/33nEXpUu+4AFsP9TmGh1vPfRBWtjY85iamFUIyHxIKIXV0Oe2 y/0cqXP2k/HCYQ8Na+p9vKA2APZlMFnYbM4Uf+X7Ac+Dw1g0+xLRHCqLGGESH5deIOjoY6 hQfNudqATTVB81zKuzL3mDCuT02CiZcoO8so4BV4rtTwCIFSySbR2nG82YtKmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695415685; a=rsa-sha256; cv=none; b=fgOIOwG2MUKqm8yp+CvoUG7P/oCBKUiDSpOfaulAyDO5npBdjmC7KL9yD5/Ux5iHHDvCr7 9Ao4nKxroBuuMq1dOy31rSrae+UMpCxPBXAda71Iuoba2keBNPMZDrKTOwA0iA4RpON6iB QN1RLXkyPRGFsrUdoJRY5YetE4WljBeGvP1L2M3MJry/S7ejDJm4ODVbs7h8p+GXUaLhbB jjg2bfBt1T7iZAmsdL0bOgVoSJ9GjGSR9KF+2DpJiM3Mp1EnwAxICiZSum7uunCFOb5HZo Vm9jCTbZ7WntUHgxhz2skDZl4V/4ENVqBLf/Qe8ZMnVjms6iu2zHfjQOvnaB1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695415685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/rXtCo9+sVWJdq8JNRTXBROF5tcxsgMVfyMr5iIjs00=; b=XvC14xV9GELaVFIdJIh14Wq2uqP6XOsQcs/gM+BfZ5HJJSsObWH42892l7zZz44YGeKMW4 QZxkSljDILmzqawNamkdPZkpMpF6Lnkw8bBFtjB3c2S71bMe+BFW5Nci/LFfaof+TMdY98 zaKG8T8Eqbb44T9yW4YqukawPMnTTU+AaB8oQ5uXPCeAfnSAo1VECAwgG2cQju2j1KiDya AP/mtIv32hKVwfRasVbYFQQ9LpqaH5iFFqzq/VzZPb1/peeiK3Fvsr+4DcY5s8vSl9kOxp qcc9TvOUFkGofA+LuFlto7wxGjhBThSH/kDBlcwe41aCGcqPAy0bjONvgUB6wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rskqn3VxDzbvW; Fri, 22 Sep 2023 20:48: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 38MKm5I7030798; Fri, 22 Sep 2023 20:48:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MKm5BM030795; Fri, 22 Sep 2023 20:48:05 GMT (envelope-from git) Date: Fri, 22 Sep 2023 20:48:05 GMT Message-Id: <202309222048.38MKm5BM030795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 6a196646cd15 - stable/14 - ice(4): Update to 1.38.16-k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a196646cd15d56945d751abc82837e065cbcb1a Auto-Submitted: auto-generated The branch stable/14 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=6a196646cd15d56945d751abc82837e065cbcb1a commit 6a196646cd15d56945d751abc82837e065cbcb1a Author: Eric Joyner AuthorDate: 2023-08-24 23:26:13 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 20:39:04 +0000 ice(4): Update to 1.38.16-k New features - Add sysctl "link_active_on_if_down" (defaults to 1 to match previous behavior): set this to 0 to have the driver bring the physical link down when the interface is brought administratively down - Add sysctl "temp" to read chip temperature on E810 devices; this requires a 4.30 or newer NVM (see package sysutils/intel-nvmupdate-100g) Bug fixes and general changes - (linked to irdma) properly propagate PF reset request from irdma driver - (linked to irdma) properly notify irdma of an impending PF reset - (linked to irdma) move Protocol Engine error handling to irdma - Print log message when using a DDP that doesn't support the "TX balancing" mode - Block LLDP agent configuration when DSCP QoS mode is enabled - Fix kernel panic when updating NVM when adapter is in the "TX balancing" mode - Remove ice_sbq_cmd.h since it's unused - Fix LLDP RX filter to still allow LLDP frames to be received by SW after a PF reset in SW LLDP mode - Add ice_if_needs_restart handler in order to fix a bad VLAN and link down interaction - Issue PF reset during unload - nvmupdate process fixes - Use pci_msix_table_bar() to get MSI-X bar index at runtime instead of hardcoding it Signed-off-by: Eric Joyner Reviewed by: anzhu@netapp.com Sponsored by: Intel Corporation, NetApp Differential Revision: https://reviews.freebsd.org/D41655 (cherry picked from commit 9c30461dd25bac49045acbeac10e00b6cc13d2bc) --- sys/dev/ice/ice_adminq_cmd.h | 123 ++++++---- sys/dev/ice/ice_common.c | 490 +++++++++++++++++++++------------------- sys/dev/ice/ice_common.h | 6 +- sys/dev/ice/ice_controlq.c | 110 ++++----- sys/dev/ice/ice_controlq.h | 3 - sys/dev/ice/ice_dcb.c | 2 +- sys/dev/ice/ice_ddp_common.c | 4 + sys/dev/ice/ice_ddp_common.h | 1 + sys/dev/ice/ice_defs.h | 4 +- sys/dev/ice/ice_features.h | 2 + sys/dev/ice/ice_flow.c | 41 +++- sys/dev/ice/ice_flow.h | 6 +- sys/dev/ice/ice_fw_logging.c | 4 +- sys/dev/ice/ice_fwlog.c | 1 + sys/dev/ice/ice_lan_tx_rx.h | 1 - sys/dev/ice/ice_lib.c | 239 ++++++++++++++++++-- sys/dev/ice/ice_lib.h | 16 +- sys/dev/ice/ice_rdma.c | 16 ++ sys/dev/ice/ice_rdma.h | 80 ++++++- sys/dev/ice/ice_rdma_internal.h | 17 ++ sys/dev/ice/ice_sbq_cmd.h | 120 ---------- sys/dev/ice/ice_sched.c | 104 +++++++-- sys/dev/ice/ice_sched.h | 42 +++- sys/dev/ice/ice_strings.c | 4 + sys/dev/ice/ice_switch.c | 334 +++++++++++++++------------ sys/dev/ice/ice_switch.h | 86 ++++--- sys/dev/ice/ice_type.h | 112 ++++++++- sys/dev/ice/if_ice_iflib.c | 130 +++++++++-- sys/dev/ice/irdma_di_if.m | 5 + sys/dev/ice/irdma_if.m | 4 + sys/dev/ice/virtchnl.h | 2 +- 31 files changed, 1360 insertions(+), 749 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 710830e95a16..e4dc14b0162c 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -168,6 +168,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_LED 0x0061 #define ICE_AQC_CAPS_SDP 0x0062 #define ICE_AQC_CAPS_WR_CSR_PROT 0x0064 +#define ICE_AQC_CAPS_SENSOR_READING 0x0067 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP 0x0073 #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 @@ -180,7 +181,8 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084 #define ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085 #define ICE_AQC_CAPS_NAC_TOPOLOGY 0x0087 -#define ICE_AQC_CAPS_DYN_FLATTENING 0x0090 +#define ICE_AQC_CAPS_DYN_FLATTENING 0x008A +#define ICE_AQC_CAPS_OROM_RECOVERY_UPDATE 0x0090 #define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 u8 major_ver; @@ -793,12 +795,30 @@ struct ice_aqc_sw_rules { __le32 addr_low; }; +/* Add switch rule response: + * Content of return buffer is same as the input buffer. The status field and + * LUT index are updated as part of the response + */ +struct ice_aqc_sw_rules_elem_hdr { + __le16 type; /* Switch rule type, one of T_... */ +#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 +#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 +#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 +#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 +#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 + __le16 status; +}; + /* Add/Update/Get/Remove lookup Rx/Tx command/response entry * This structures describes the lookup rules and associated actions. "index" * is returned as part of a response to a successful Add command, and can be * used to identify the rule for Update/Get/Remove commands. */ struct ice_sw_rule_lkup_rx_tx { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 recipe_id; #define ICE_SW_RECIPE_LOGICAL_PORT_FWD 10 /* Source port for LOOKUP_RX and source VSI in case of LOOKUP_TX */ @@ -877,14 +897,17 @@ struct ice_sw_rule_lkup_rx_tx { * lookup-type */ __le16 hdr_len; - u8 hdr[STRUCT_HACK_VAR_LEN]; + u8 hdr_data[STRUCT_HACK_VAR_LEN]; }; +#pragma pack(1) /* Add/Update/Remove large action command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the action for Update/Get/Remove commands. */ struct ice_sw_rule_lg_act { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index in large action table */ __le16 size; /* Max number of large actions */ @@ -939,50 +962,30 @@ struct ice_sw_rule_lg_act { #define ICE_LG_ACT_STAT_COUNT_M (0x7F << ICE_LG_ACT_STAT_COUNT_S) __le32 act[STRUCT_HACK_VAR_LEN]; /* array of size for actions */ }; +#pragma pack() +#pragma pack(1) /* Add/Update/Remove VSI list command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the VSI list for Update/Get/Remove commands. */ struct ice_sw_rule_vsi_list { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index of VSI/Prune list */ __le16 number_vsi; __le16 vsi[STRUCT_HACK_VAR_LEN]; /* Array of number_vsi VSI numbers */ }; +#pragma pack() #pragma pack(1) /* Query VSI list command/response entry */ struct ice_sw_rule_vsi_list_query { __le16 index; - ice_declare_bitmap(vsi_list, ICE_MAX_VSI); + u8 vsi_list[DIVIDE_AND_ROUND_UP(ICE_MAX_VSI, BITS_PER_BYTE)]; }; #pragma pack() -#pragma pack(1) -/* Add switch rule response: - * Content of return buffer is same as the input buffer. The status field and - * LUT index are updated as part of the response - */ -struct ice_aqc_sw_rules_elem { - __le16 type; /* Switch rule type, one of T_... */ -#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 -#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 -#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 -#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 -#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 - __le16 status; - union { - struct ice_sw_rule_lkup_rx_tx lkup_tx_rx; - struct ice_sw_rule_lg_act lg_act; - struct ice_sw_rule_vsi_list vsi_list; - struct ice_sw_rule_vsi_list_query vsi_list_query; - } pdata; -}; - -#pragma pack() - /* PFC Ignore (direct 0x0301) * The command and response use the same descriptor structure */ @@ -994,8 +997,8 @@ struct ice_aqc_pfc_ignore { u8 reserved[14]; }; -/* Set PFC Mode (direct 0x0303) - * Query PFC Mode (direct 0x0302) +/* Query PFC Mode (direct 0x0302) + * Set PFC Mode (direct 0x0303) */ struct ice_aqc_set_query_pfc_mode { u8 pfc_mode; @@ -1098,9 +1101,9 @@ struct ice_aqc_txsched_elem { u8 generic; #define ICE_AQC_ELEM_GENERIC_MODE_M 0x1 #define ICE_AQC_ELEM_GENERIC_PRIO_S 0x1 -#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) +#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) #define ICE_AQC_ELEM_GENERIC_SP_S 0x4 -#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) +#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S 0x5 #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_M \ (0x3 << ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S) @@ -1673,6 +1676,32 @@ struct ice_aqc_set_mac_lb { u8 reserved[15]; }; +/* Get sensor reading (direct 0x0632) */ +struct ice_aqc_get_sensor_reading { + u8 sensor; +#define ICE_AQC_INT_TEMP_SENSOR 0x0 + u8 format; +#define ICE_AQC_INT_TEMP_FORMAT 0x0 + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + +/* Get sensor reading response (direct 0x0632) */ +struct ice_aqc_get_sensor_reading_resp { + union { + u8 raw[8]; + /* Output data for sensor 0x00, format 0x00 */ + struct { + s8 temp; + u8 temp_warning_threshold; + u8 temp_critical_threshold; + u8 temp_fatal_threshold; + u8 reserved[4]; + } s0f0; + } data; +}; + /* DNL Get Status command (indirect 0x0680) * Structure used for the response, the command uses the generic * ice_aqc_generic struct to pass a buffer address to the FW. @@ -2476,6 +2505,19 @@ struct ice_aqc_get_set_rss_keys { u8 extended_hash_key[ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE]; }; +enum ice_lut_type { + ICE_LUT_VSI = 0, + ICE_LUT_PF = 1, + ICE_LUT_GLOBAL = 2, + ICE_LUT_TYPE_MASK = 3 +}; + +enum ice_lut_size { + ICE_LUT_VSI_SIZE = 64, + ICE_LUT_GLOBAL_SIZE = 512, + ICE_LUT_PF_SIZE = 2048, +}; + /* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */ struct ice_aqc_get_set_rss_lut { #define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15) @@ -2484,21 +2526,13 @@ struct ice_aqc_get_set_rss_lut { __le16 vsi_id; #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S 0 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) - -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL 2 + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S 2 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128 128 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512 512 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K 2048 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG 2 #define ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S 4 @@ -2686,7 +2720,7 @@ struct ice_aqc_move_rdma_qset_buffer { }; /* Download Package (indirect 0x0C40) */ -/* Also used for Update Package (indirect 0x0C42 and 0x0C41) */ +/* Also used for Update Package (indirect 0x0C41 and 0x0C42) */ struct ice_aqc_download_pkg { u8 flags; #define ICE_AQC_DOWNLOAD_PKG_LAST_BUF 0x01 @@ -2989,6 +3023,8 @@ struct ice_aq_desc { struct ice_aqc_get_phy_caps get_phy; struct ice_aqc_set_phy_cfg set_phy; struct ice_aqc_restart_an restart_an; + struct ice_aqc_get_sensor_reading get_sensor_reading; + struct ice_aqc_get_sensor_reading_resp get_sensor_reading_resp; struct ice_aqc_dnl_get_status get_status; struct ice_aqc_dnl_run_command dnl_run; struct ice_aqc_dnl_call_command dnl_call; @@ -3239,6 +3275,7 @@ enum ice_adminq_opc { ice_aqc_opc_get_link_status = 0x0607, ice_aqc_opc_set_event_mask = 0x0613, ice_aqc_opc_set_mac_lb = 0x0620, + ice_aqc_opc_get_sensor_reading = 0x0632, ice_aqc_opc_dnl_get_status = 0x0680, ice_aqc_opc_dnl_run = 0x0681, ice_aqc_opc_dnl_call = 0x0682, diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index a3f50f251533..0df73583e137 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -343,6 +343,88 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, return ICE_SUCCESS; } +/** + * ice_phy_maps_to_media + * @phy_type_low: PHY type low bits + * @phy_type_high: PHY type high bits + * @media_mask_low: media type PHY type low bitmask + * @media_mask_high: media type PHY type high bitmask + * + * Return true if PHY type [low|high] bits are only of media type PHY types + * [low|high] bitmask. + */ +static bool +ice_phy_maps_to_media(u64 phy_type_low, u64 phy_type_high, + u64 media_mask_low, u64 media_mask_high) +{ + /* check if a PHY type exist for media type */ + if (!(phy_type_low & media_mask_low || + phy_type_high & media_mask_high)) + return false; + + /* check that PHY types are only of media type */ + if (!(phy_type_low & ~media_mask_low) && + !(phy_type_high & ~media_mask_high)) + return true; + + return false; +} + +/** + * ice_set_media_type - Sets media type + * @pi: port information structure + * + * Set ice_port_info PHY media type based on PHY type. This should be called + * from Get PHY caps with media. + */ +static void ice_set_media_type(struct ice_port_info *pi) +{ + enum ice_media_type *media_type; + u64 phy_type_high, phy_type_low; + + phy_type_high = pi->phy.phy_type_high; + phy_type_low = pi->phy.phy_type_low; + media_type = &pi->phy.media_type; + + /* if no media, then media type is NONE */ + if (!(pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE)) + *media_type = ICE_MEDIA_NONE; + /* else if PHY types are only BASE-T, then media type is BASET */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_BASET_PHY_TYPE_LOW_M, 0)) + *media_type = ICE_MEDIA_BASET; + /* else if any PHY type is BACKPLANE, then media type is BACKPLANE */ + else if (phy_type_low & ICE_MEDIA_BP_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_BP_PHY_TYPE_HIGH_M) + *media_type = ICE_MEDIA_BACKPLANE; + /* else if PHY types are only optical, or optical and C2M, then media + * type is FIBER + */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_OPT_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M && + phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M)) + *media_type = ICE_MEDIA_FIBER; + /* else if PHY types are only DA, or DA and C2C, then media type DA */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_DAC_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_DAC_PHY_TYPE_LOW_M && + (phy_type_low & ICE_MEDIA_C2C_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) + *media_type = ICE_MEDIA_DA; + /* else if PHY types are only C2M or only C2C, then media is AUI */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2M_PHY_TYPE_LOW_M, + ICE_MEDIA_C2M_PHY_TYPE_HIGH_M) || + ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2C_PHY_TYPE_LOW_M, + ICE_MEDIA_C2C_PHY_TYPE_HIGH_M)) + *media_type = ICE_MEDIA_AUI; + + else + *media_type = ICE_MEDIA_UNKNOWN; +} + /** * ice_aq_get_phy_caps - returns PHY capabilities * @pi: port information structure @@ -434,6 +516,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type, sizeof(pi->phy.link_info.module_type), ICE_NONDMA_TO_NONDMA); + ice_set_media_type(pi); + ice_debug(hw, ICE_DBG_LINK, "%s: media_type = 0x%x\n", prefix, + pi->phy.media_type); } return status; @@ -513,156 +598,6 @@ ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, return ICE_ERR_DOES_NOT_EXIST; } -/** - * ice_is_media_cage_present - * @pi: port information structure - * - * Returns true if media cage is present, else false. If no cage, then - * media type is backplane or BASE-T. - */ -static bool ice_is_media_cage_present(struct ice_port_info *pi) -{ - struct ice_aqc_get_link_topo *cmd; - struct ice_aq_desc desc; - - cmd = &desc.params.get_link_topo; - - ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo); - - cmd->addr.topo_params.node_type_ctx = - (ICE_AQC_LINK_TOPO_NODE_CTX_PORT << - ICE_AQC_LINK_TOPO_NODE_CTX_S); - - /* set node type */ - cmd->addr.topo_params.node_type_ctx |= - (ICE_AQC_LINK_TOPO_NODE_TYPE_M & - ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE); - - /* Node type cage can be used to determine if cage is present. If AQC - * returns error (ENOENT), then no cage present. If no cage present then - * connection type is backplane or BASE-T. - */ - return ice_aq_get_netlist_node(pi->hw, cmd, NULL, NULL); -} - -/** - * ice_get_media_type - Gets media type - * @pi: port information structure - */ -static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) -{ - struct ice_link_status *hw_link_info; - - if (!pi) - return ICE_MEDIA_UNKNOWN; - - hw_link_info = &pi->phy.link_info; - if (hw_link_info->phy_type_low && hw_link_info->phy_type_high) - /* If more than one media type is selected, report unknown */ - return ICE_MEDIA_UNKNOWN; - - if (hw_link_info->phy_type_low) { - /* 1G SGMII is a special case where some DA cable PHYs - * may show this as an option when it really shouldn't - * be since SGMII is meant to be between a MAC and a PHY - * in a backplane. Try to detect this case and handle it - */ - if (hw_link_info->phy_type_low == ICE_PHY_TYPE_LOW_1G_SGMII && - (hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE || - hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE)) - return ICE_MEDIA_DA; - - switch (hw_link_info->phy_type_low) { - case ICE_PHY_TYPE_LOW_1000BASE_SX: - case ICE_PHY_TYPE_LOW_1000BASE_LX: - case ICE_PHY_TYPE_LOW_10GBASE_SR: - case ICE_PHY_TYPE_LOW_10GBASE_LR: - case ICE_PHY_TYPE_LOW_25GBASE_SR: - case ICE_PHY_TYPE_LOW_25GBASE_LR: - case ICE_PHY_TYPE_LOW_40GBASE_SR4: - case ICE_PHY_TYPE_LOW_40GBASE_LR4: - case ICE_PHY_TYPE_LOW_50GBASE_SR2: - case ICE_PHY_TYPE_LOW_50GBASE_LR2: - case ICE_PHY_TYPE_LOW_50GBASE_SR: - case ICE_PHY_TYPE_LOW_50GBASE_FR: - case ICE_PHY_TYPE_LOW_50GBASE_LR: - case ICE_PHY_TYPE_LOW_100GBASE_SR4: - case ICE_PHY_TYPE_LOW_100GBASE_LR4: - case ICE_PHY_TYPE_LOW_100GBASE_SR2: - case ICE_PHY_TYPE_LOW_100GBASE_DR: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_10G_SFI_AOC_ACC: - case ICE_PHY_TYPE_LOW_25G_AUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_40G_XLAUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_LAUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI1_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_CAUI4_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_AUI4_AOC_ACC: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_100BASE_TX: - case ICE_PHY_TYPE_LOW_1000BASE_T: - case ICE_PHY_TYPE_LOW_2500BASE_T: - case ICE_PHY_TYPE_LOW_5GBASE_T: - case ICE_PHY_TYPE_LOW_10GBASE_T: - case ICE_PHY_TYPE_LOW_25GBASE_T: - return ICE_MEDIA_BASET; - case ICE_PHY_TYPE_LOW_10G_SFI_DA: - case ICE_PHY_TYPE_LOW_25GBASE_CR: - case ICE_PHY_TYPE_LOW_25GBASE_CR_S: - case ICE_PHY_TYPE_LOW_25GBASE_CR1: - case ICE_PHY_TYPE_LOW_40GBASE_CR4: - case ICE_PHY_TYPE_LOW_50GBASE_CR2: - case ICE_PHY_TYPE_LOW_50GBASE_CP: - case ICE_PHY_TYPE_LOW_100GBASE_CR4: - case ICE_PHY_TYPE_LOW_100GBASE_CR_PAM4: - case ICE_PHY_TYPE_LOW_100GBASE_CP2: - return ICE_MEDIA_DA; - case ICE_PHY_TYPE_LOW_25G_AUI_C2C: - case ICE_PHY_TYPE_LOW_40G_XLAUI: - case ICE_PHY_TYPE_LOW_50G_LAUI2: - case ICE_PHY_TYPE_LOW_50G_AUI2: - case ICE_PHY_TYPE_LOW_50G_AUI1: - case ICE_PHY_TYPE_LOW_100G_AUI4: - case ICE_PHY_TYPE_LOW_100G_CAUI4: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_LOW_1000BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_X: - case ICE_PHY_TYPE_LOW_5GBASE_KR: - case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1: - case ICE_PHY_TYPE_LOW_10G_SFI_C2C: - case ICE_PHY_TYPE_LOW_25GBASE_KR: - case ICE_PHY_TYPE_LOW_25GBASE_KR1: - case ICE_PHY_TYPE_LOW_25GBASE_KR_S: - case ICE_PHY_TYPE_LOW_40GBASE_KR4: - case ICE_PHY_TYPE_LOW_50GBASE_KR_PAM4: - case ICE_PHY_TYPE_LOW_50GBASE_KR2: - case ICE_PHY_TYPE_LOW_100GBASE_KR4: - case ICE_PHY_TYPE_LOW_100GBASE_KR_PAM4: - return ICE_MEDIA_BACKPLANE; - } - } else { - switch (hw_link_info->phy_type_high) { - case ICE_PHY_TYPE_HIGH_100G_AUI2: - case ICE_PHY_TYPE_HIGH_100G_CAUI2: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_HIGH_100GBASE_KR2_PAM4: - return ICE_MEDIA_BACKPLANE; - case ICE_PHY_TYPE_HIGH_100G_CAUI2_AOC_ACC: - case ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC: - return ICE_MEDIA_FIBER; - } - } - return ICE_MEDIA_UNKNOWN; -} - #define ice_get_link_status_datalen(hw) ICE_GET_LINK_STATUS_DATALEN_V1 /** @@ -681,7 +616,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, struct ice_aqc_get_link_status_data link_data = { 0 }; struct ice_aqc_get_link_status *resp; struct ice_link_status *li_old, *li; - enum ice_media_type *hw_media_type; struct ice_fc_info *hw_fc_info; bool tx_pause, rx_pause; struct ice_aq_desc desc; @@ -694,7 +628,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, hw = pi->hw; li_old = &pi->phy.link_info_old; - hw_media_type = &pi->phy.media_type; li = &pi->phy.link_info; hw_fc_info = &pi->fc; @@ -716,7 +649,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, li->link_speed = LE16_TO_CPU(link_data.link_speed); li->phy_type_low = LE64_TO_CPU(link_data.phy_type_low); li->phy_type_high = LE64_TO_CPU(link_data.phy_type_high); - *hw_media_type = ice_get_media_type(pi); li->link_info = link_data.link_info; li->link_cfg_err = link_data.link_cfg_err; li->an_info = link_data.an_info; @@ -747,7 +679,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, (unsigned long long)li->phy_type_low); ice_debug(hw, ICE_DBG_LINK, " phy_type_high = 0x%llx\n", (unsigned long long)li->phy_type_high); - ice_debug(hw, ICE_DBG_LINK, " media_type = 0x%x\n", *hw_media_type); ice_debug(hw, ICE_DBG_LINK, " link_info = 0x%x\n", li->link_info); ice_debug(hw, ICE_DBG_LINK, " link_cfg_err = 0x%x\n", li->link_cfg_err); ice_debug(hw, ICE_DBG_LINK, " an_info = 0x%x\n", li->an_info); @@ -1066,7 +997,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) if (status) goto err_unroll_cqinit; - hw->port_info = (struct ice_port_info *) + if (!hw->port_info) + hw->port_info = (struct ice_port_info *) ice_malloc(hw, sizeof(*hw->port_info)); if (!hw->port_info) { status = ICE_ERR_NO_MEMORY; @@ -1205,7 +1137,7 @@ void ice_deinit_hw(struct ice_hw *hw) */ enum ice_status ice_check_reset(struct ice_hw *hw) { - u32 cnt, reg = 0, grst_timeout, uld_mask; + u32 cnt, reg = 0, grst_timeout, uld_mask, reset_wait_cnt; /* Poll for Device Active state in case a recent CORER, GLOBR, * or EMPR has occurred. The grst delay value is in 100ms units. @@ -1237,8 +1169,10 @@ enum ice_status ice_check_reset(struct ice_hw *hw) uld_mask = ICE_RESET_DONE_MASK | (hw->func_caps.common_cap.iwarp ? GLNVM_ULD_PE_DONE_M : 0); + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + /* Device is Active; check Global Reset processes are done */ - for (cnt = 0; cnt < ICE_PF_RESET_WAIT_COUNT; cnt++) { + for (cnt = 0; cnt < reset_wait_cnt; cnt++) { reg = rd32(hw, GLNVM_ULD) & uld_mask; if (reg == uld_mask) { ice_debug(hw, ICE_DBG_INIT, "Global reset processes done. %d\n", cnt); @@ -1247,7 +1181,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) ice_msec_delay(10, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "Wait for Reset Done timed out. GLNVM_ULD = 0x%x\n", reg); return ICE_ERR_RESET_FAILED; @@ -1265,7 +1199,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) */ static enum ice_status ice_pf_reset(struct ice_hw *hw) { - u32 cnt, reg; + u32 cnt, reg, reset_wait_cnt, cfg_lock_timeout; /* If at function entry a global reset was already in progress, i.e. * state is not 'device active' or any of the reset done bits are not @@ -1290,8 +1224,10 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) * timeout plus the PFR timeout which will account for a possible reset * that is occurring during a download package operation. */ - for (cnt = 0; cnt < ICE_GLOBAL_CFG_LOCK_TIMEOUT + - ICE_PF_RESET_WAIT_COUNT; cnt++) { + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + cfg_lock_timeout = ICE_GLOBAL_CFG_LOCK_TIMEOUT; + + for (cnt = 0; cnt < cfg_lock_timeout + reset_wait_cnt; cnt++) { reg = rd32(hw, PFGEN_CTRL); if (!(reg & PFGEN_CTRL_PFSWR_M)) break; @@ -1299,7 +1235,7 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) ice_msec_delay(1, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == cfg_lock_timeout + reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "PF reset polling failed to complete.\n"); return ICE_ERR_RESET_FAILED; } @@ -2452,6 +2388,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, true : false; ice_debug(hw, ICE_DBG_INIT, "%s: nvm_unified_update = %d\n", prefix, caps->nvm_unified_update); + caps->netlist_auth = + (number & ICE_NVM_MGMT_NETLIST_AUTH_SUPPORT) ? + true : false; + ice_debug(hw, ICE_DBG_INIT, "%s: netlist_auth = %d\n", prefix, + caps->netlist_auth); break; case ICE_AQC_CAPS_CEM: caps->mgmt_cem = (number == 1); @@ -2534,6 +2475,8 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, (phys_id & ICE_EXT_TOPO_DEV_IMG_LOAD_EN) != 0; caps->ext_topo_dev_img_prog_en[index] = (phys_id & ICE_EXT_TOPO_DEV_IMG_PROG_EN) != 0; + caps->ext_topo_dev_img_ver_schema[index] = + (phys_id & ICE_EXT_TOPO_DEV_IMG_VER_SCHEMA) != 0; ice_debug(hw, ICE_DBG_INIT, "%s: ext_topo_dev_img_ver_high[%d] = %d\n", prefix, index, @@ -2554,6 +2497,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, "%s: ext_topo_dev_img_prog_en[%d] = %d\n", prefix, index, caps->ext_topo_dev_img_prog_en[index]); + ice_debug(hw, ICE_DBG_INIT, + "%s: ext_topo_dev_img_ver_schema[%d] = %d\n", + prefix, index, + caps->ext_topo_dev_img_ver_schema[index]); break; } case ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE: @@ -2564,6 +2511,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, ice_debug(hw, ICE_DBG_INIT, "%s: dyn_flattening_en = %d\n", prefix, caps->dyn_flattening_en); break; + case ICE_AQC_CAPS_OROM_RECOVERY_UPDATE: + caps->orom_recovery_update = (number == 1); + ice_debug(hw, ICE_DBG_INIT, "%s: orom_recovery_update = %d\n", + prefix, caps->orom_recovery_update); + break; default: /* Not one of the recognized common capabilities */ found = false; @@ -2782,6 +2734,26 @@ ice_parse_nac_topo_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, dev_p->nac_topo.id); } +/** + * ice_parse_sensor_reading_cap - Parse ICE_AQC_CAPS_SENSOR_READING cap + * @hw: pointer to the HW struct + * @dev_p: pointer to device capabilities structure + * @cap: capability element to parse + * + * Parse ICE_AQC_CAPS_SENSOR_READING for device capability for reading + * enabled sensors. + */ +static void +ice_parse_sensor_reading_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, + struct ice_aqc_list_caps_elem *cap) +{ + dev_p->supported_sensors = LE32_TO_CPU(cap->number); + + ice_debug(hw, ICE_DBG_INIT, + "dev caps: supported sensors (bitmap) = 0x%x\n", + dev_p->supported_sensors); +} + /** * ice_parse_dev_caps - Parse device capabilities * @hw: pointer to the HW struct @@ -2827,6 +2799,9 @@ ice_parse_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, case ICE_AQC_CAPS_NAC_TOPOLOGY: ice_parse_nac_topo_dev_caps(hw, dev_p, &cap_resp[i]); break; + case ICE_AQC_CAPS_SENSOR_READING: + ice_parse_sensor_reading_cap(hw, dev_p, &cap_resp[i]); + break; default: /* Don't list common capabilities as unknown */ if (!found) @@ -3776,8 +3751,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; case ICE_FEC_DIS_AUTO: /* Set No FEC and auto FEC */ - if (!ice_fw_supports_fec_dis_auto(hw)) - return ICE_ERR_NOT_SUPPORTED; + if (!ice_fw_supports_fec_dis_auto(hw)) { + status = ICE_ERR_NOT_SUPPORTED; + goto out; + } cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS; /* fall-through */ case ICE_FEC_AUTO: @@ -3852,6 +3829,7 @@ enum ice_status ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, struct ice_sq_cd *cd) { + enum ice_status status = ICE_ERR_AQ_ERROR; struct ice_aqc_restart_an *cmd; struct ice_aq_desc desc; @@ -3866,7 +3844,16 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, else cmd->cmd_flags &= ~ICE_AQC_RESTART_AN_LINK_ENABLE; - return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + status = ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + if (status) + return status; + + if (ena_link) + pi->phy.curr_user_phy_cfg.caps |= ICE_AQC_PHY_EN_LINK; + else + pi->phy.curr_user_phy_cfg.caps &= ~ICE_AQC_PHY_EN_LINK; + + return ICE_SUCCESS; } /** @@ -4062,6 +4049,51 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, return ICE_SUCCESS; } +static u16 ice_lut_type_to_size(u16 lut_type) +{ + switch (lut_type) { + case ICE_LUT_VSI: + return ICE_LUT_VSI_SIZE; + case ICE_LUT_GLOBAL: + return ICE_LUT_GLOBAL_SIZE; + case ICE_LUT_PF: + return ICE_LUT_PF_SIZE; + default: + return 0; + } +} + +static u16 ice_lut_size_to_flag(u16 lut_size) +{ + u16 f = 0; + + switch (lut_size) { + case ICE_LUT_GLOBAL_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG; + break; + case ICE_LUT_PF_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG; + break; + default: + break; + } + return f << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S; +} + +int ice_lut_size_to_type(int lut_size) +{ + switch (lut_size) { + case ICE_LUT_VSI_SIZE: + return ICE_LUT_VSI; + case ICE_LUT_GLOBAL_SIZE: + return ICE_LUT_GLOBAL; + case ICE_LUT_PF_SIZE: + return ICE_LUT_PF; + default: + return -1; + } +} + /** * __ice_aq_get_set_rss_lut * @hw: pointer to the hardware structure @@ -4073,7 +4105,7 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, static enum ice_status __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *params, bool set) { - u16 flags = 0, vsi_id, lut_type, lut_size, glob_lut_idx, vsi_handle; + u16 flags, vsi_id, lut_type, lut_size, glob_lut_idx = 0, vsi_handle; struct ice_aqc_get_set_rss_lut *cmd_resp; struct ice_aq_desc desc; enum ice_status status; @@ -4084,16 +4116,22 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params vsi_handle = params->vsi_handle; lut = params->lut; + lut_type = params->lut_type; + lut_size = ice_lut_type_to_size(lut_type); + cmd_resp = &desc.params.get_set_rss_lut; + if (lut_type == ICE_LUT_GLOBAL) + glob_lut_idx = params->global_lut_id; - if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) + if (!lut || !lut_size || !ice_is_vsi_valid(hw, vsi_handle)) return ICE_ERR_PARAM; - lut_size = params->lut_size; - lut_type = params->lut_type; - glob_lut_idx = params->global_lut_id; - vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); + if (lut_size > params->lut_size) + return ICE_ERR_INVAL_SIZE; - cmd_resp = &desc.params.get_set_rss_lut; + if (set && lut_size != params->lut_size) + return ICE_ERR_PARAM; + + vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); if (set) { ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_rss_lut); @@ -4107,61 +4145,15 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params ICE_AQC_GSET_RSS_LUT_VSI_ID_M) | ICE_AQC_GSET_RSS_LUT_VSI_VALID); - switch (lut_type) { - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL: - flags |= ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M); - break; - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL) { - flags |= ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & - ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); + flags = ice_lut_size_to_flag(lut_size) | + ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & + ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M) | + ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & + ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else { - goto ice_aq_get_set_rss_lut_send; - } - - /* LUT size is only valid for Global and PF table types */ - switch (lut_size) { - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K: - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - } - /* fall-through */ - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - -ice_aq_get_set_rss_lut_send: cmd_resp->flags = CPU_TO_LE16(flags); status = ice_aq_send_cmd(hw, &desc, lut, lut_size, NULL); - -ice_aq_get_set_rss_lut_exit: + params->lut_size = LE16_TO_CPU(desc.datalen); return status; } @@ -5155,7 +5147,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, q_ctx->q_teid = LE32_TO_CPU(node.node_teid); /* add a leaf node into scheduler tree queue layer */ - status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node); + status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node, NULL); if (!status) status = ice_sched_replay_q_bw(pi, q_ctx); @@ -5390,7 +5382,7 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc, for (i = 0; i < num_qsets; i++) { node.node_teid = buf->rdma_qsets[i].qset_teid; status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, - &node); *** 3425 LINES SKIPPED *** From nobody Fri Sep 22 21:51: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 4RsmDc38Lcz4tTjt; Fri, 22 Sep 2023 21:51: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 4RsmDc2ZNbz3PkZ; Fri, 22 Sep 2023 21:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOKAFnifKTUrmYmOaJRagYpx0djxp0T7cNUWivUdk9k=; b=dnla667I+DyGUAHk6DdV+myJaKtBxI8P52dxskZW5wu55ZeZ07vZ8qC/p4X1V0gK+tU1OO UxDkr7SecPXKQZz5Z25s58OjdciioeNAmH7FHUqshSvPwsn40zlZZicfzKGgONQYEsCtKC 8HdAijAa8xxYrU1MJ+JKKR9IZNf2oKRyiVq43XNNOFi+VJYlA96LRGTfWMjkFK7NTutKBe eIkdSgjXA/Uf/hY9BxNJvGnhNSgT4nMwvpdfpKtfUWx+TAK6la/XwXmMJgkizuHmx2ECep KMAlGyi+WrNJ6tF5Ah/aWLDfXFrhub+KW7AYkEa+0W/SnxyuG1olFQPUInIU6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419472; a=rsa-sha256; cv=none; b=fYHBVp9gijz6GYDBJ+Wo3xxnHWvvejea6BUt+DhYKk2Z79CODXiUIM9e+I9iW4ellZgAny /fzSuUSlOQ0Lk5mLlMEQXw1Z8IdwOfShLPY4tqU3qvGan2+XsbfuH7HoCjG9w2aiUuA97I LTnDp3TMZMriTPIw8kA9VZCnbNzrfXv68x2FQycb+eZ4/zE5w6NMURX2FSRYwhua8CgG0v VZV9/+3BRAkPkbr5r+TAnhHMpU7qL2CwM/MGoqG5dxIYlwnAl3bw0ztyyfCJEUj+yeJ6nd 53cW7q73d8icntqpLC1S6HBVsUJ4rPdoKretVl5eHHT8uE1w+vdJdgr1GgYI6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOKAFnifKTUrmYmOaJRagYpx0djxp0T7cNUWivUdk9k=; b=W6zVHv1T5kCxlTgjVNR9POeSgRalc8vOfub//TX6avScnqpWVDgyWaaask2zZveHuhdSwp qJlJXU22CetRHDjVyYdznzumSwJ2mDMC7Bi0e1ChclonQe24sfRQEmlQ0Yt0xTxs6URz/z kCrDz7pkqvgp/wsGZXpr9On0S15MGjfB/JNnkyT6yRcrSGuojdPKYjDLRZ47ypg63ctcZ9 sD9iYX0idVGWDOATo0q4Cg2cUmjLg395lrW8bErKf+Y/3Wn5CGar5HcTj4b35nNGS+SbkT tOVt2AB+xvF9NcNhfwBzIQHDsbFzqDicxGRCPeOPfFKXH6blnCRAdHf9zAt7dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDc1d65zf3Q; Fri, 22 Sep 2023 21:51: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 38MLpChA039083; Fri, 22 Sep 2023 21:51:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpCOX039080; Fri, 22 Sep 2023 21:51:12 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:12 GMT Message-Id: <202309222151.38MLpCOX039080@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 41fad6503c1e - stable/14 - vfs cache: fix a hang when bumping vnode limit too high List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 41fad6503c1e5259e65d4f14110a5decb7653b02 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=41fad6503c1e5259e65d4f14110a5decb7653b02 commit 41fad6503c1e5259e65d4f14110a5decb7653b02 Author: Mateusz Guzik AuthorDate: 2023-09-02 14:27:33 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:46 +0000 vfs cache: fix a hang when bumping vnode limit too high Overflow in cache_changesize would make the value flip to 0 and stay there as 0 << 1 does not do anything. Note callers limit the outcome to something below u_int. Also note there entire vnode handling thing both in vfs layer as a whole and this file can't decide whether to long, u_long or u_int. (cherry picked from commit 32988c1499f8698b41e15ed40a46d271e757bba3) --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 92c926a16afb..5b0cd64146ad 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2597,10 +2597,10 @@ cache_enter_time_flags(struct vnode *dvp, struct vnode *vp, struct componentname cache_enter_time(dvp, vp, cnp, tsp, dtsp); } -static u_int -cache_roundup_2(u_int val) +static u_long +cache_roundup_2(u_long val) { - u_int res; + u_long res; for (res = 1; res <= val; res <<= 1) continue; @@ -2616,7 +2616,7 @@ nchinittbl(u_long elements, u_long *hashmask) hashsize = cache_roundup_2(elements) / 2; - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); + hashtbl = malloc(hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); for (i = 0; i < hashsize; i++) CK_SLIST_INIT(&hashtbl[i]); *hashmask = hashsize - 1; @@ -2762,7 +2762,7 @@ cache_changesize(u_long newmaxvnodes) struct namecache *ncp; uint32_t hash; u_long newncsize; - int i; + u_long i; newncsize = newmaxvnodes * ncsizefactor; newmaxvnodes = cache_roundup_2(newmaxvnodes * 2); From nobody Fri Sep 22 21:51: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 4RsmDf36b1z4tTjx; Fri, 22 Sep 2023 21:51: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 4RsmDf2NW7z3PT4; Fri, 22 Sep 2023 21:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hin0C+sxTZTktiGNFXZD2CKlxK3aST+lrxB0ftLSC/c=; b=eWwb40ebVK6/OrPaM8HTU88qld+7FrgOuvIE+gv/kc76gp8A0X0lnbVOWMjxEIwixdzxQd 2iDD0IxibP/SLpgwI93+nVg5Pi6YW9SnVWXOJ3GhifaR3P/LcDsq1OhJexiNi80UAfU7Ym WzQazbOhlRrAszCECpZleTl+Rq9oXYaSa7oIjs+oioX0AMDHVdZguIHm8/4TcYCJ/aMK0F 2XdSf4zlRjD/6NTa0cRzVlVRe04pOhiw1GrjSleyEPkLHb39orMRCh8f5JC8N/HZfg1TXy plp1eAiYRQH6cz5u4UOIUo9ftkb6WuGGa/1FJo6zO2iEqzMDbtKqNjwU8X63IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419474; a=rsa-sha256; cv=none; b=edUR1BuaaFF76hSqFgPuAxPA1jFJDkUi/RQRHe7VqjI94/Sr8wk6Y/HtZ1JsAG7U1km4n6 gg8YnQZcWU7E3ibVl/bmARlL+ks5gfZaSWhAS0vysDzTJt7UMIz46mJVF0IhIpNeJFHMk7 tPk7edbNqB/BWdSWdEk5ahVRtbzwcNQWmyuiE0Nmy/bPcFdaSr/996M0tOQznGYvpN/HDx luDdgiI/6rdpJT4IUMRFd77DxAsSdApJHZcwHWDLtizMOxKNlcG+1baNDtdrc8A0W6K86J HOSuuko8ytl7lxbRc/ribBQ+ioq+yNUNF4qOJGI5KV/5VyRsAIZeo8br4wlNvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hin0C+sxTZTktiGNFXZD2CKlxK3aST+lrxB0ftLSC/c=; b=CpRizozdjbLKtGSsOKCyDQGkbwjJ/JRjE0QV+uDm+Pl3irVClz9Tpzn3QUxKnuFGidu4LG OsxNKdMutuHWYNWxhgcuGieZ+8p8wZvYh+v3VCuoAwDEuInc65A+jjf7N1bdFGipKvKF+R GpZuYGHHnvPQjVAgnN33O1NvBB5+QjR+Ijw6QsjkGDm+KMQfdfECSIZ2lwrwhJCeR9l2Z2 ZgZIlxk8E26F8Cw/ItkmvgBiD5sFHqYMKULJHGca5YqvMRcrLqI6IXM6/L2PKmMkUpZ0A8 U0tKLi7MRmCbl7/kSluROe7hB6b1dXdPd/i/CuZpExEfaDGShYakcP26pVn26A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDd2dWPzdvF; Fri, 22 Sep 2023 21:51: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 38MLpD0f039131; Fri, 22 Sep 2023 21:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpDFP039128; Fri, 22 Sep 2023 21:51:13 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:13 GMT Message-Id: <202309222151.38MLpDFP039128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 25d8cf225ac2 - stable/14 - ufs: restore name cache fast path lookup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25d8cf225ac29bb450bf52866aa6d169b9193178 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=25d8cf225ac29bb450bf52866aa6d169b9193178 commit 25d8cf225ac29bb450bf52866aa6d169b9193178 Author: Mateusz Guzik AuthorDate: 2023-09-09 21:48:57 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:46 +0000 ufs: restore name cache fast path lookup Found by: dchagin Fixes: f3c81b973897 ("ufs: add missing vop_fplookup ops") (cherry picked from commit a87c6962affc2d1994d8f30806c934eb4cb7af22) --- sys/ufs/ffs/ffs_vnops.c | 6 ++++-- sys/ufs/ufs/ufs_vnops.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 0dd64f696e0c..2b11a15c46c9 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -135,6 +135,8 @@ static vop_setextattr_t ffs_setextattr; static vop_vptofh_t ffs_vptofh; static vop_vput_pair_t ffs_vput_pair; +vop_fplookup_vexec_t ufs_fplookup_vexec; + /* Global vfs data structures for ufs. */ struct vop_vector ffs_vnodeops1 = { .vop_default = &ufs_vnodeops, @@ -151,7 +153,7 @@ struct vop_vector ffs_vnodeops1 = { .vop_write = ffs_write, .vop_vptofh = ffs_vptofh, .vop_vput_pair = ffs_vput_pair, - .vop_fplookup_vexec = VOP_EAGAIN, + .vop_fplookup_vexec = ufs_fplookup_vexec, .vop_fplookup_symlink = VOP_EAGAIN, }; VFS_VOP_VECTOR_REGISTER(ffs_vnodeops1); @@ -192,7 +194,7 @@ struct vop_vector ffs_vnodeops2 = { .vop_setextattr = ffs_setextattr, .vop_vptofh = ffs_vptofh, .vop_vput_pair = ffs_vput_pair, - .vop_fplookup_vexec = VOP_EAGAIN, + .vop_fplookup_vexec = ufs_fplookup_vexec, .vop_fplookup_symlink = VOP_EAGAIN, }; VFS_VOP_VECTOR_REGISTER(ffs_vnodeops2); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index a7d5e8ba96fc..79cca75fc563 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -101,7 +101,7 @@ VFS_SMR_DECLARE; #include static vop_accessx_t ufs_accessx; -static vop_fplookup_vexec_t ufs_fplookup_vexec; +vop_fplookup_vexec_t ufs_fplookup_vexec; static int ufs_chmod(struct vnode *, int, struct ucred *, struct thread *); static int ufs_chown(struct vnode *, uid_t, gid_t, struct ucred *, struct thread *); @@ -475,7 +475,7 @@ ufs_accessx( * VOP_FPLOOKUP_VEXEC routines are subject to special circumstances, see * the comment above cache_fplookup for details. */ -static int +int ufs_fplookup_vexec( struct vop_fplookup_vexec_args /* { struct vnode *a_vp; From nobody Fri Sep 22 21:51: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 4RsmDf5N6gz4tTmP; Fri, 22 Sep 2023 21:51: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 4RsmDf4cWZz3PTH; Fri, 22 Sep 2023 21:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pmm94ONptAEN+oXmDQ7heDltQZplV5fsG+46Dfv8c1Q=; b=klK/W4XPjrlp26sR8n7WbnORtV7zoE5Wre6bFU4J9Ug47vQB8uyr+DGS3AtMELGbaIEnO8 DDyqK+6eXJFDSUKtdBhum3VMt3DVvTXCfbp+beKqB76g7ITzoNn38eZWi3h+QnYGZW6/R2 WxZGFoDieGzfeKcltMTaZQ2HVrhAaiBvh0HLNDXoym9QkzRZcf6p6xLQGjPizN54RqgC6v 7zuz+mMj1vjrjxPMRC89cZ349NBJVNC4L3b0+K10PUgp3Y1WK2czD2IIBsxluTuAR/XUJI 61E7nHeKRUp8hYdY36jFIgaeSrtN80wInavx0qk/oBYaj6zl/PfY5FHgnpEXIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419474; a=rsa-sha256; cv=none; b=MbpSuREJCOnXQU4IhnsbHMpsEfE14JsGXUKhs0jZ/IlRhVdSAwjnkA7znTStymbNZ0W81u nonZrThafMj51iiKmDYMYVnVunB4vQJt0D7gix4vhzz0lZhuR3qX/kvo009DfP8pqyZULK +0TonGwIZ6Q5/+dpKxc2c6CaMTdVngTRP+4HRCitWvfdJH3FAYLo3iX+kIxKSCfVWHS7k8 z1f0FvEuIbvEs2J+8II2xa/TPMPC99bd+A8wMQFrRFfNRqHfSjNYpJP5LCV8Ci/eRlcyWs cEX+Ccyy8xEv1LPAxBnIqLgUXnCg078WV7EIL7lnE2jD3maIagSj6149Sqp8BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pmm94ONptAEN+oXmDQ7heDltQZplV5fsG+46Dfv8c1Q=; b=bpVRKNRJhnBNJTvXonvmc68JzQb9TupzHp2KatfDL0aEOfhuqyDrw2LB086crZXOBDtQq9 0zwzhw4LzXXEtbjgEPfn86XyttNxZyA/uHb0kuvEWImqRnOmpD0+nFsq4DURSWEkmuzJHL dXX+wBKRHw25sG34LxRom9QrZ8cOZBTyB3REeqddVv6UdyejDkqeNGvOb2o2h2G/M1k9Yr XtOCTI1KojxrWODd4b53iUJSr9ErdnmUrcBYz4fQouvKyU9IWK2T7W0dFlGnhNNEPOT9Fw 6mPpClEC4I4k1Yeqy3ubeJfKIUIOZIGzJ/cYI8Lj8RsPUQMYxftZfUEFmadAyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDf3Yv6zfBK; Fri, 22 Sep 2023 21:51: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 38MLpEqi039193; Fri, 22 Sep 2023 21:51:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpEUg039190; Fri, 22 Sep 2023 21:51:14 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:14 GMT Message-Id: <202309222151.38MLpEUg039190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 206dd9d1a82d - stable/14 - vfs: drop one vnode list lock trip during vnlru free recycle List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 206dd9d1a82df140a6071545a2dc558e8d9f5ad0 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=206dd9d1a82df140a6071545a2dc558e8d9f5ad0 commit 206dd9d1a82df140a6071545a2dc558e8d9f5ad0 Author: Mateusz Guzik AuthorDate: 2023-09-14 14:35:40 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:46 +0000 vfs: drop one vnode list lock trip during vnlru free recycle vnlru_free_impl would take the lock prior to returning even though most frequent caller does not need it. Unsurprisingly vnode_list mtx is the primary bottleneck when recycling and avoiding the useless lock trip helps. Setting maxvnodes to 400000 and running 20 parallel finds each with a dedicated directory tree of 1 million vnodes in total: before: 4.50s user 1225.71s system 1979% cpu 1:02.14 total after: 4.20s user 806.23s system 1973% cpu 41.059 total That's 34% reduction in total real time. With this the block *remains* the primary bottleneck when running on ZFS. (cherry picked from commit 74be676d87745eb727642f6f8329236c848929d5) --- sys/kern/vfs_subr.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1c6827ba0587..80ec15f78028 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1290,13 +1290,14 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) mtx_assert(&vnode_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; + if (count == 0) { + mtx_unlock(&vnode_list_mtx); + return (0); + } ocount = count; retried = false; vp = mvp; for (;;) { - if (count == 0) { - break; - } vp = TAILQ_NEXT(vp, v_vnodelist); if (__predict_false(vp == NULL)) { /* @@ -1319,6 +1320,7 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); TAILQ_INSERT_TAIL(&vnode_list, mvp, v_vnodelist); + mtx_unlock(&vnode_list_mtx); break; } if (__predict_false(vp->v_type == VMARKER)) @@ -1366,18 +1368,28 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ vtryrecycle(vp); count--; + if (count == 0) { + break; + } mtx_lock(&vnode_list_mtx); vp = mvp; } + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); return (ocount - count); } +/* + * XXX: returns without vnode_list_mtx locked! + */ static int vnlru_free_locked(int count) { + int ret; mtx_assert(&vnode_list_mtx, MA_OWNED); - return (vnlru_free_impl(count, NULL, vnode_list_free_marker)); + ret = vnlru_free_impl(count, NULL, vnode_list_free_marker); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); + return (ret); } void @@ -1389,7 +1401,7 @@ vnlru_free_vfsops(int count, struct vfsops *mnt_op, struct vnode *mvp) VNPASS(mvp->v_type == VMARKER, mvp); mtx_lock(&vnode_list_mtx); vnlru_free_impl(count, mnt_op, mvp); - mtx_unlock(&vnode_list_mtx); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); } struct vnode * @@ -1534,7 +1546,7 @@ vnlru_under_unlocked(u_long rnumvnodes, u_long limit) } static void -vnlru_kick(void) +vnlru_kick_locked(void) { mtx_assert(&vnode_list_mtx, MA_OWNED); @@ -1544,6 +1556,15 @@ vnlru_kick(void) } } +static void +vnlru_kick(void) +{ + + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); + mtx_unlock(&vnode_list_mtx); +} + static void vnlru_proc(void) { @@ -1574,6 +1595,7 @@ vnlru_proc(void) */ if (rnumvnodes > desiredvnodes) { vnlru_free_locked(rnumvnodes - desiredvnodes); + mtx_lock(&vnode_list_mtx); rnumvnodes = atomic_load_long(&numvnodes); } /* @@ -1751,6 +1773,7 @@ vn_alloc_hard(struct mount *mp) rnumvnodes = atomic_load_long(&numvnodes); if (rnumvnodes + 1 < desiredvnodes) { vn_alloc_cyclecount = 0; + mtx_unlock(&vnode_list_mtx); goto alloc; } rfreevnodes = vnlru_read_freevnodes(); @@ -1770,22 +1793,26 @@ vn_alloc_hard(struct mount *mp) */ if (vnlru_free_locked(1) > 0) goto alloc; + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); if (mp == NULL || (mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { /* * Wait for space for a new vnode. */ - vnlru_kick(); + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); vn_alloc_sleeps++; msleep(&vnlruproc_sig, &vnode_list_mtx, PVFS, "vlruwk", hz); if (atomic_load_long(&numvnodes) + 1 > desiredvnodes && vnlru_read_freevnodes() > 1) vnlru_free_locked(1); + else + mtx_unlock(&vnode_list_mtx); } alloc: + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) vnlru_kick(); - mtx_unlock(&vnode_list_mtx); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Fri Sep 22 21:51: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 4RsmDg5tNsz4tTTb; Fri, 22 Sep 2023 21:51: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 4RsmDg5KfCz3Pn1; Fri, 22 Sep 2023 21:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=th5PKB5TrPorJY26yIo9IVyZjeboZojKEFP/30jUl1A=; b=bfWSz1HYt/zxFAvcblwehjbzhu2yKJ0QE71l5wBORMGE2zDkcFy/GoIWDGY/s4UxVrJEsD yVwK0MEqacpb2xvM98ZzqyL2gSoSuCn6plxL3t9H6ffHRPuM5BOfpdM5vO1pRKTE0YVL4C q38em+kuDNcJjFjZ4dJ/6zxeGaz5I19QOROE1FAHF5WhQOnTuKYzq41yNCeAa9fAlvg3it 5dXtgmtdVplW+iRtsZGmR7dRSoEMPkwEdCCE5YQkQMUs+WosEGN270S2xYwA5nHlBp/5ty p1/0EFF4M9EsuXiNhz/Yjp77bGTJRkLyTbGNJyeSC9T48e+VZWh0XRMJ9Ac7hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419475; a=rsa-sha256; cv=none; b=AOBp0QKByByb1XyseLhTgzkEFuNRhJkJHTgndxyxgNOlZRkJHG9+YEoXuoPj4P7w7bRvXh /SDtkMohK2J/i3S1cm/H+TXjgAFhJN382df3hIQXN9Q1fwR+bDBnwMM0+uBPWEDpfYv3// ud9DaaRLYJ73QNJlF1YVT5IO+YxVkfuIJ/328HpA7w9B+BzdlvRJ/zTpjn1oZfy67PLLAb 8ltGxAk+fULmVHQp01/62y+Oodn6faaxg+oOIxkrhfBBShGUJIyflT379wVrHZkd3TawAy amvdCfoCEe7Ltk899GX2t0qnf/Y7Qcd0PSmyEopbR4UUsSJ+PRSRQi65jt2OdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=th5PKB5TrPorJY26yIo9IVyZjeboZojKEFP/30jUl1A=; b=PDC/6cWA1OV5ogzUhXs64V5nkhjVik2t/s3m6r+mBMmI1Wun7CGuNbGY+LjxVC8Jidfzhb G0NWL+1yjtnR7Muu0RYFGnq3VeqgjdzDEvz6AHIYqwDn/vDrrNpxEyB1KdLjtFwPA/WZX9 Q2SdYvekqT5CXesD/jISSRrbtrHwAlf5vtktre5cO6ehWod/5aUgyOjgcBANKXSua3fPHx lwIRPjZ6l8uAuUjJFZ/tYgMXAPlvpLGfPJU1O9HuwzmY8qt03WZYGVmySOtvh1784xte7g 0GJJDWbUUk5Kkr9VHnwOia9VXVOPkbNNRBKaPnWhId5QjknpQZEAtqI5GQzUyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDg4RYQzdvH; Fri, 22 Sep 2023 21:51: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 38MLpFPa039255; Fri, 22 Sep 2023 21:51:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpF2p039252; Fri, 22 Sep 2023 21:51:15 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:15 GMT Message-Id: <202309222151.38MLpF2p039252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 2ea531b264df - stable/14 - vfs: don't kick vnlru if it is already running List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ea531b264df97bfea7d74c7f9414b2d3c5d4277 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2ea531b264df97bfea7d74c7f9414b2d3c5d4277 commit 2ea531b264df97bfea7d74c7f9414b2d3c5d4277 Author: Mateusz Guzik AuthorDate: 2023-09-14 16:27:47 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:46 +0000 vfs: don't kick vnlru if it is already running Further shaves some lock trips. (cherry picked from commit 76f1153790b6d2e1a4f0389c3ac24e41d08f9ba6) --- sys/kern/vfs_subr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 80ec15f78028..4c9cb6200f10 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1557,9 +1557,11 @@ vnlru_kick_locked(void) } static void -vnlru_kick(void) +vnlru_kick_cond(void) { + if (vnlruproc_sig) + return; mtx_lock(&vnode_list_mtx); vnlru_kick_locked(); mtx_unlock(&vnode_list_mtx); @@ -1812,7 +1814,7 @@ alloc: mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) - vnlru_kick(); + vnlru_kick_cond(); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Fri Sep 22 21: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 4RsmDh6qb1z4tTjy; Fri, 22 Sep 2023 21:51: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 4RsmDh6J2xz3Pr9; Fri, 22 Sep 2023 21:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5ENA61nqNFt1D+BEwTjLDbQoWCxqZ+NQJJuuuikcMM=; b=bAGWcky0UgGtheux8YNLEQI54pwU2G8t3j+IU4sLt3y0iLrS7NUsPFcZBFMJsT9tnsu7ZR V7rkPOoCU3JTiW/q3V3+K2gwKBgPUssZetX5PvUIEYnqXvaNDeih33MD4bmjkCGNZCIL0x RL4Y3SCkgE9xwk82p5mkmDiN45K44+IfEX3Ll+FAXbsSMWPPurQ4DSqsrmYpnklufH73Zc RfTMkPDjaeiGAogKEfgZNQW4JXnOw6rOxhNxaSRnlAyVBKTcQWhQtjYWOPs3qbQBQFxG87 ftlZGKi/SSuRkPx4IczzUzJ6dGzA3X+anXyiC/LabBWsfbTGD4MvU1oeMzV9Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419476; a=rsa-sha256; cv=none; b=s8wZDorDluF4U+3agphqumDf9oIcl0TVEG+obaAyeX1WC53Ocq7XxGHv1NkkkSKCKH3oHt NHHZZv+3nB8q5d4P4Xi+6dcS8WjOyuImfiT0+RMWDiCClCGpLfNpEcOk803+gm/7R2hjV5 +dDsgAI8YwI4w1SMka2ivSZEB3rZt+2xpdKBja92dV0vx0eTmKZGo7Hy/E2HQiac72+JJk hdFj92LgwPdafyFQgBZRuutEGVcTromCNY/HXPEAKM6jiCaAQNFwvljs0udW42vyzCxbAY pfxIWpX3TBkHz0MYrspwweaOEuYYPNnM4h+Hvs+JHyJt9cjhZ/VUAyEr7xE4hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5ENA61nqNFt1D+BEwTjLDbQoWCxqZ+NQJJuuuikcMM=; b=lMxiaHJuR1jXmWxQeOHpaz/yVFhLtuvZUBfh5dKRvCBoHLQ0r00zuE76qMWMydLEc5hLaj XUKDon5m9wlaTUDJWy43eJqx6zV0+B0Ums2D8AdO/SfPadn6fU7HI0ohI9pzqrHIaB+wci uvAR4vPSQA8C2gmHQelw5sO3fk2WvWIwx7mpBe8pwb+0F+FLc+M3GwUJERNkfmJxeol3Ie 9AH7g3ukVoKKunK/GwRFMoBaWe9EeELRhhZcbp5bmcFTYBCXCVtY7AlCMtCl3fXUuF9xBX ozB1LXANrCx1aEwSUaKwZqCGiuUDoJ5ooqc1QD5T2U5heEA5iydKpMSTyzpa6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDh5C6JzfBL; Fri, 22 Sep 2023 21:51: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 38MLpGES039310; Fri, 22 Sep 2023 21: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 38MLpG0q039307; Fri, 22 Sep 2023 21:51:16 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:16 GMT Message-Id: <202309222151.38MLpG0q039307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 210dd7aa1f48 - stable/14 - vfs: fix stale comment about freevnodes management List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 210dd7aa1f48848707b09a172a957f0f4b7aacab Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=210dd7aa1f48848707b09a172a957f0f4b7aacab commit 210dd7aa1f48848707b09a172a957f0f4b7aacab Author: Mateusz Guzik AuthorDate: 2023-09-14 17:28:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:47 +0000 vfs: fix stale comment about freevnodes management (cherry picked from commit 9dc0c983b0931f359c2ff10d47ad835ef74e929a) --- sys/kern/vfs_subr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4c9cb6200f10..ed478d33aed0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1444,12 +1444,12 @@ static struct proc *vnlruproc; static int vnlruproc_sig; /* - * The main freevnodes counter is only updated when threads requeue their vnode - * batches. CPUs are conditionally walked to compute a more accurate total. + * The main freevnodes counter is only updated when a counter local to CPU + * diverges from 0 by more than VNLRU_FREEVNODES_SLOP. CPUs are conditionally + * walked to compute a more accurate total. * - * Limit how much of a slop are we willing to tolerate. Note: the actual value - * at any given moment can still exceed slop, but it should not be by significant - * margin in practice. + * Note: the actual value at any given moment can still exceed slop, but it + * should not be by significant margin in practice. */ #define VNLRU_FREEVNODES_SLOP 126 From nobody Fri Sep 22 21:51: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 4RsmDk2v2lz4tTpk; Fri, 22 Sep 2023 21: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 4RsmDj70Chz3Pv3; Fri, 22 Sep 2023 21: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=1695419478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H31v6R35FeWZFdg4sbzuL4j8xIzbp0czsgNObTGnUkM=; b=t1bCFQ1/E+f1+/LoKVLDgk1Ksa8BmTl2XUX+xeu1hpc4J6CAP7K+VyEctDJozxyqSrFj4o 5qGEdhx/JPDKWFQHk4OZc90NppHdVBzVHQiKzCVS6GpNZ6YDl+89Csk5X0EWjLZLKxdH1v LaqFcAGCkvFEwUTQutzRGJBNiv1ETuxn5w92Y5JrxPgoo6rCF4xh9O2+pmRXThfSBlnNmV eUHTbjbf9boUp6vBvxY+l/ZJCLU3KQ6C3d3tVuAuvkef1YbTK42Bj8h3szXJaj9kLp9E8z JN2V1kK81YqrAVgb6k1/FU/9UUtUXkGRiPo4+r0zsauwJ3lUfjlWU6lL5QcR5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419478; a=rsa-sha256; cv=none; b=NJLXW/WWfvTHuNg3zwV7YSUdgM0OCwQV8/hXV/OXlZiK1myEIbFKM8RvG6cpTKCc40dfMw vVVNxEfWtCBTaNjfrCzxuZYX7cenxg4zhPDfKlIZEtha91/mfaynuD3CqbPNgi3eA0HfPx yf3J3ZK+wg5UcV8pB8KKMw/gHSyMU6d7sucNw/dHl1p/GqfoVIrI7yuzsG8i9DYryz9T1H vjLmCGEzRZZj8sQ42zWrCGba+xee6/IKkGCsA+CIRu0JEfYXaSICOruwRBOICKhTRdX21N xmOgLP0p0+C3blx/res/w3oVETR7QHJiVJhku14cvX6hhcRyRwyHa+i1Q08PPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H31v6R35FeWZFdg4sbzuL4j8xIzbp0czsgNObTGnUkM=; b=phKjPvvnDGb0L9YFA7yi10VdDljY/I4svCNfp7PCECs8O4cfYzSqlNSKPb4efEylN1Rn0b xOJJECoEPZhe8RvKHeTc4tAUdyhQjp6PdlmT4EJc16PQ80wxhJ54+gyGuXpY1Kp9T5Ys7r oOFEgwL8P/WhVyO064xfQC3Mn+U6Nsb+lM+2tLlyUCuzaKHs4avP8aD0nDUWZEACTNwJUf Gg/gRhTNdOxSRMJ1l7kFRGkH8EEWYLKdQSzI/qS991Qh3Ds7xWey9+1NPNkCUJZurfPmBL mmXw0mAomYAvordIy0qcjvKiNyWaZ7pCJw2mRRTAdEg51OR5mqKzVpqUUY8JFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDj62wgzdkK; Fri, 22 Sep 2023 21: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 38MLpHRW039358; Fri, 22 Sep 2023 21:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpHQG039355; Fri, 22 Sep 2023 21:51:17 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:17 GMT Message-Id: <202309222151.38MLpHQG039355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 8e4a043bad75 - stable/14 - vfs cache: garbage collect the fullpathfail2 counter List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e4a043bad750d85e0028ae6ceb9c9e37842bf4a Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8e4a043bad750d85e0028ae6ceb9c9e37842bf4a commit 8e4a043bad750d85e0028ae6ceb9c9e37842bf4a Author: Mateusz Guzik AuthorDate: 2023-09-14 20:25:54 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:47 +0000 vfs cache: garbage collect the fullpathfail2 counter The conditions it checks cannot legally be true (modulo races against forced unmount), so assert on it instead. (cherry picked from commit 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2) --- sys/kern/vfs_cache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 5b0cd64146ad..0f4d7526ebb5 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -542,7 +542,6 @@ STATNODE_COUNTER(negzaps, numnegzaps, STATNODE_COUNTER(neghits, numneghits, "Number of cache hits (negative)"); /* These count for vn_getcwd(), too. */ STATNODE_COUNTER(fullpathcalls, numfullpathcalls, "Number of fullpath search calls"); -STATNODE_COUNTER(fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE_COUNTER(fullpathfail2, numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); @@ -3400,14 +3399,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, vp = vp1; continue; } - if (vp->v_type != VDIR) { - vrele(vp); - counter_u64_add(numfullpathfail1, 1); - error = ENOTDIR; - SDT_PROBE3(vfs, namecache, fullpath, return, - error, vp, NULL); - break; - } + VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp); error = vn_vptocnp(&vp, buf, &buflen); if (error) break; From nobody Fri Sep 22 21: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 4RsmDl1dCFz4tTMZ; Fri, 22 Sep 2023 21:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsmDl0jP8z3Ps0; Fri, 22 Sep 2023 21:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xm2Q4alr8IsorKZ9QEKyw4zoujUPL+n4/SDRZoOaLow=; b=EHfetrliadDo/lfSk8mmzh+o08/G/76OhKzAh1cTYQESCIpfYsndeCIDEOYfLPHU8qUUlo zZcHERgT9hujXcgp47+k81CS5hCjWTKiGIEGRfzFF9xHOvsnFGh4O46JU47smyEjrz1OvN MWBxsFz0JTyAcpGM3ugMRfDMgYAw/jREqAZJvfJx1GKSiUadTZr0R3aoHVSq1tXy/1U33G 4Pgafiu9KU81/tu1ICG/t4sri7MbCbgf45NRfgcmWEXEWb/+RSMU8gVVgtubclLOxNCpEo KXCshVmE85Dv+f+1ufT6qHsiCmc9UToMagOpmQBsUFaSCNTdYhYs9iLBndLLvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419479; a=rsa-sha256; cv=none; b=COLRpZp4m81OWOZQHbtv2Ig3SEkyP+hbrdvQYpI1IocKrVQge0OcZODBNBVIAgCg2T54EY YKcpiGpvGCC1aZgFbWkGAd+fYfyQjrUqZHofN4Asma2hWS7PRNhONKZkz9b8U/7zkkqJDD w0vhB91cWqaOMk1itj1vQBhC6yLzsSvqf6acCEFHtTVaqAIv8Yed8g/v2LMd9F7K0QZcmq /8h5eDYd7Yokql7E1+gmj70TWiFVpubHNNgzxKim1G3MZQ8KMhPhuca//sTSOL8j8boBUx 3wiEc/A10Na3BJ0jUzX8NTeUUDDbtWRF7MrI32cRf5kDiaUA5xzvmJaheHGFdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xm2Q4alr8IsorKZ9QEKyw4zoujUPL+n4/SDRZoOaLow=; b=Hev7mTW72CFMNqsA6t6aprservgM3CnIhPWD3RQuCt47kGVg2o+TmgMPa3X/7sld11ITk7 bbJUKXpqoiwfck94nG7uiTDpRgWTgZmJn5opHysTYuMoLp3Kv6JmwkXizgbg7xCdKHyE7V Q/IKBY0gzdsU5L85MVPesca/04C+AwVdVjUzHGZefMxWKEcQZz8w/S5o2rlpr38bHQVHgD Mudx1enSg+o0HYzosZ8kh1Fpf44eZfxsgAisFqzEsKT8HkMhIPDG8WuL1fsoHnWdUgNTqA ZgJO9mKqxI9aEQ0bMRWSli5j9fNuMK8u7M8ogwAuTrWN24z4ymNU7FwTc3j3rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDk6wCCzdvL; Fri, 22 Sep 2023 21: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 38MLpIjZ039395; Fri, 22 Sep 2023 21: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 38MLpIFU039392; Fri, 22 Sep 2023 21:51:18 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:18 GMT Message-Id: <202309222151.38MLpIFU039392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: b5210f3fb260 - stable/14 - vfs: retire vnlru_under_unlocked List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b5210f3fb26031e24f2f4c465aa3eab64002353a Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b5210f3fb26031e24f2f4c465aa3eab64002353a commit b5210f3fb26031e24f2f4c465aa3eab64002353a Author: Mateusz Guzik AuthorDate: 2023-09-14 23:05:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:47 +0000 vfs: retire vnlru_under_unlocked It only looks at the centralized value which in corner cases can end up being negative. (cherry picked from commit ba5dc166e0f390c703042910b637a83c705c8af3) --- sys/kern/vfs_subr.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ed478d33aed0..84219f3b5c12 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1528,23 +1528,6 @@ vnlru_under(u_long rnumvnodes, u_long limit) return (space < limit); } -static bool -vnlru_under_unlocked(u_long rnumvnodes, u_long limit) -{ - long rfreevnodes, space; - - if (__predict_false(rnumvnodes > desiredvnodes)) - return (true); - - space = desiredvnodes - rnumvnodes; - if (space < limit) { - rfreevnodes = atomic_load_long(&freevnodes); - if (rfreevnodes > wantfreevnodes) - space += rfreevnodes - wantfreevnodes; - } - return (space < limit); -} - static void vnlru_kick_locked(void) { @@ -1826,7 +1809,7 @@ vn_alloc(struct mount *mp) if (__predict_false(vn_alloc_cyclecount != 0)) return (vn_alloc_hard(mp)); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; - if (__predict_false(vnlru_under_unlocked(rnumvnodes, vlowat))) { + if (__predict_false(vnlru_under(rnumvnodes, vlowat))) { atomic_subtract_long(&numvnodes, 1); return (vn_alloc_hard(mp)); } From nobody Fri Sep 22 21:51: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 4RsmDm2kwwz4tTRf; Fri, 22 Sep 2023 21:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RsmDm1ymgz3QDQ; Fri, 22 Sep 2023 21:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLH3WD/ic55sTNHvGTGn92EHHYC2MTwdhBrAFqeW/Pw=; b=BPt+kUq79+Otnd2wWHo1PcUlVcsfn3du1hYjgKW072SjC7G1EYIUDlVpar+4aoQLsu2rKD 6tsfrvgGzZIr7HBqS0i673tKADvnkLqxNsrkmpiA7oeBiQLfTlKVjk1e9vpbHblcBI3A8+ eXY53/9nvwR/exYBY9/1lJQ4wIEF3verS94zx14F/OxmGkIDoqUPMnfHrCx6AhxNUN3XWO hv8pqpJofk2Y5nTWkddUcalUDTWgatgFrr9Nce8SQSOv/sWHq74/eE3BTlEtH67Ovv3Xiy 9R9YYjXb++NEbQZnaAaaa07GvdAx8Z8rMpYDbd5wbb6XGwF1bds49TuimuhZyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419480; a=rsa-sha256; cv=none; b=LI+fQ/sT8dM61rjYyQ9q1hIda/guMianQ4AD2GAtWneb5SP1/Y7G7GHSVwnydHvYZNly9H HGeoDgThlswvmkvu9gg3BGU5A5X+05S/vgD4eqI01fWP7Cjfpz07Ruzflqb5p4rRWEkUCr GcFqsa0SBYIWeh+b63T8pJHa13Paz2VbaGUBvV7YF5XDOSnpebG81C/oyTBS1ggiT929f+ DkdXyCnvVnqrYVYLeaGC/0Q3vsrc4tLHEacnNiWp+ZxKR5bdZ08dOzsSw8mpK3mtzvvjkS f42nC4Vc5WciNXDJxZr7ptXexOzSuYo98Q+ZFPfTbTY/UI1ld1gliy45UYua7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLH3WD/ic55sTNHvGTGn92EHHYC2MTwdhBrAFqeW/Pw=; b=DptV5e+VlacxfmdF2jey1Q64ZcsIeSLAka64q2CSnCnxp6+kV735YBsuzfv/gwR/dgIg06 SEnkOf71YfCYm+7GvpQqadcIjcSkTVUEaBOmM0ARDbKi/lSaPjMPzhZdj4QxGODFO6pKmG ALjieQhpKSXMpYqNe0vQbgBRtEGvr615PLv/OqAhvQh+jYFdlJsfS3H0vsFnEnMFr1y3ac VOZnDkhThCBmkwnn03gKud3C8DzVhzdM9xqBj32f0wYabek7P2KSBe2BR/mHJpmzjCNEi2 NpqxFxe/0FjevPB/ETI37tB/T69Wt7vW3jzYDQmU3Usx3ritU/2mxxw98KH5bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDm14F0zfBM; Fri, 22 Sep 2023 21:51: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 38MLpKKn039443; Fri, 22 Sep 2023 21:51:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpKPT039440; Fri, 22 Sep 2023 21:51:20 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:20 GMT Message-Id: <202309222151.38MLpKPT039440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 07c081e59232 - stable/14 - vfs: use vnlru_read_freevnodes for the freevnodes sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 07c081e59232433ce522cfdf37bc4a8afad75330 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=07c081e59232433ce522cfdf37bc4a8afad75330 commit 07c081e59232433ce522cfdf37bc4a8afad75330 Author: Mateusz Guzik AuthorDate: 2023-09-14 23:53:11 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:47 +0000 vfs: use vnlru_read_freevnodes for the freevnodes sysctl For a more accurate result. (cherry picked from commit 03bfee175269960c67cab64d761bbb5eb9ac5878) --- sys/kern/vfs_subr.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 84219f3b5c12..823b8005aa4d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -184,8 +184,6 @@ static struct vnode *vnode_list_reclaim_marker; */ static long wantfreevnodes; static long __exclusive_cache_line freevnodes; -SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, - &freevnodes, 0, "Number of \"free\" vnodes"); static long freevnodes_old; static counter_u64_t recycles_count; @@ -350,6 +348,19 @@ SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); +static int +sysctl_freevnodes(SYSCTL_HANDLER_ARGS) +{ + u_long rfreevnodes; + + rfreevnodes = vnlru_read_freevnodes(); + return (sysctl_handle_long(oidp, &rfreevnodes, 0, req)); +} + +SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes"); + static int sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) { From nobody Fri Sep 22 21:51: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 4RsmDn3lDBz4tTmZ; Fri, 22 Sep 2023 21:51: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 4RsmDn35fmz3QBg; Fri, 22 Sep 2023 21:51:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=llF9ZDRrDjXEIiFPmlt9NFol0HOKZITN7YOoGNUEAqg=; b=ucaGEqA6zD1LbUDBsIa7P/+Lx/RtcdhxSebFW5IL0lRh/u51ZBPW2j3MZb8+X4Su0mUOLr bTamctNrTuVeqAADW0m99jTf4YtTCtoL7/JsFRGR76ElNJPs/QWfzxWmsm38HQ6gxOi8gH F1Ad8PG9rPXN/9ygNutDQLnZELCBUaBPWgNeEjz0tAnZ23xTjdSEP4j0xetjAkwP0GZ+bu Hujbqex2AGFLHuFIGdox5BCiXTUnzJGae+i7J52fI74T8Ih8WH7VXdVEplh+XcBLPPXtMD buwiJQZgSv0U+dtvWNFl7OQYrnXP3cIV+oQd+Qz0N2EvuZf64aeHZmCEzIer/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419481; a=rsa-sha256; cv=none; b=gb3WTmqbtKIVuVnmfsRKK1wadmuWkTSPRDF4G1sYqb3NPzck2PalfSo8FjzI9jjjTe3sDk Grpuz0+ALvtybLXEPVb1+UNvzX3Gt7NjBPopQUOYckm8toaAvtdJLt9QlW1htkdy2bL7km +lxjaOvPizKy1C0gYmvvvKzkyVoIrzEQqi0/WHXGZskCee+oxNvzEEtqXD0oTRM1J1YciD 2O43JtcRX+id2AhgsYaPlqCOI4wnMbE4e+foDMXWmDTnIQPg/AfxC2R1FkpxuxHjQHwAY8 t+9ShKwqlOVzcr0Wr5jVD83vwk9S+PG1P1rbUkvRqtAMFrGDltwMqnc3pH5YeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=llF9ZDRrDjXEIiFPmlt9NFol0HOKZITN7YOoGNUEAqg=; b=rjF6QhLmPP7R1SxDqXTbfUYYMxMBvA8bin1oWQlPpv+6DNhfuOsKvtKBS2PsM3BpNxguOK Tt8L6p3/3+iDfJ8BGV8RhsWe61rGw756NX/XUu+RWzva68f9n53vUSWHRZOidtb9+YEjQ/ xED38baXwad2vsxdcZ0DHEbbJd1owkzSsNcOm6phobZEiWGX7s8o54OOIoeHGX9J8nnl/U S+5MKVof+OVsDBs68c9so1VXxD6c1Bsn/hMsR4n/uwB8IFduvWzoQLqkZgLvO7uih5VLRQ BBgdgT34LFIlEn5JIEKh6be2N4qPETNIavchu7Y1cnz+TngHAV5ZQqO0xNCUGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDn29LZzf3S; Fri, 22 Sep 2023 21:51: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 38MLpLFf039485; Fri, 22 Sep 2023 21:51:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpLJ3039482; Fri, 22 Sep 2023 21:51:21 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:21 GMT Message-Id: <202309222151.38MLpLJ3039482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: b93b1b939381 - stable/14 - vfs: retire kern.minvnodes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b93b1b93938154baf86adbade6496d5b183d71f3 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b93b1b93938154baf86adbade6496d5b183d71f3 commit b93b1b93938154baf86adbade6496d5b183d71f3 Author: Mateusz Guzik AuthorDate: 2023-09-16 07:33:36 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:47 +0000 vfs: retire kern.minvnodes It was marked as legacy in 2005. (cherry picked from commit 2a689cadf092a3319d7619c3f4aa242011c20c8e) --- sys/kern/vfs_subr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 823b8005aa4d..f4cccf2b4e1f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -385,8 +385,6 @@ SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); -SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, - &wantfreevnodes, 0, "Old name for vfs.wantfreevnodes (legacy)"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW | CTLFLAG_STATS, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); From nobody Fri Sep 22 21:51: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 4RsmDp5mQcz4tTTs; Fri, 22 Sep 2023 21:51: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 4RsmDp44fwz3Q2J; Fri, 22 Sep 2023 21:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UsiGgDE90jNWubl88vj7igrcwDc4m7C5A4z1JDy+RuA=; b=CMqrV+oGTvYWIWR/Jc9hIG6QVNv7ZuHp/qqyvD1k20CmeqLNs3x0Fj+hQKL9MpF6ocBXzr rAn8blvGZnpHrdNf6D+OZ6P6s3yK7wQvqp2AWBjz4IbLdfWlDK4BfQ0Cyherf26Ln6RHb7 eqNrvkZlH5L7SYTKDkZv+dEP6fKYBwYSuL8ZJ5YdgjFTGMzrPbYbbI069Tpd2++Iw0jxXC LQgM+ZMvOvnYBjBydf/OdXKG8ApuvwYYlSZlcO5XHqtEv3kXvO+fLui2dVNuOquv51dlwK nNDZdSTv5gPet09hrq3ILxfGQqREOOkzeDQgABR7koQ8NeX1AqWvOoG5GI/dWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419482; a=rsa-sha256; cv=none; b=f8IH0yoWm3wTnz6bp/wlHmOHerYqrtfnV5M28bAAIJwRbmEkjmfRaz7/Jh6yN1vM4kkIyE EZkTbIUclPkaV5sKrC2l/0FSRHvzWbdvRGSV255z2Gan3PNKMH7TSeVsuzqmK1V08sDfQm HUvdzoovoqGs6Preb9OiligHmebXoF7+MIUskio4wo5lHl2/Bn69xa/e8+tjokogiWjCba ZOFwyUnDPEIhzW8gGnPjRnK0LPzzBGWbLyx6ttDfHpmWX9Q4COvHqgMQdM0z6RPHGhZSKy Z1UkqpVAuqPJW4XEUogHKcBRBz+gUTr+mONG+IAvxIafZvU4iivWeuR4CImUNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UsiGgDE90jNWubl88vj7igrcwDc4m7C5A4z1JDy+RuA=; b=klR8VyAgIUuTCI13U36Kj1ucu4ty3ALP4HtWz8NMpQy2sSSoRdyqXcxHw/0Y0fOZKUiOHp XsZ4aH7gR8EUiRAsQkQ1f9IT7VLOspC7NYtnkISUKos2nAYm7PbHFgl/2+Ew639i5ugzqd OxDBUTWdt/cFXjNqUjo2RhtMWG+EtPtfvkG8e8ZjwvIP8rItH48DuwD9R63ManMcQRevt2 SWNwTjozyLTvKAynWIClIt25wsBhoipHpTKO+Vtr1Z2tOVyvlnpfLUqaxMNVcIsQJ3kS5m lilZe8/rjUKf75B9EfJEQAC7oo8RIdcEv8lD7qgAqTRCoUxU0KOK4ebI/qnGsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDp38vKzf3T; Fri, 22 Sep 2023 21:51: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 38MLpM2M039536; Fri, 22 Sep 2023 21:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpM1I039533; Fri, 22 Sep 2023 21:51:22 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:22 GMT Message-Id: <202309222151.38MLpM1I039533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: b757ea2bb27c - stable/14 - vfs: group vnode-related sysctls under vfs.vnode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b757ea2bb27c4035d28009d4a9906c66301d8e3e Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b757ea2bb27c4035d28009d4a9906c66301d8e3e commit b757ea2bb27c4035d28009d4a9906c66301d8e3e Author: Mateusz Guzik AuthorDate: 2023-09-15 21:08:38 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:48 +0000 vfs: group vnode-related sysctls under vfs.vnode Instead of having things scattered through vfs, debug and kern trees. Old names remain for compatibility. Sample output of "sysctl vfs.vnode": vfs.vnode.vnlru.failed_runs: 0 vfs.vnode.vnlru.recycles_free: 0 vfs.vnode.vnlru.recycles: 0 vfs.vnode.stats.alloc_sleeps: 0 vfs.vnode.stats.free: 1310 vfs.vnode.stats.skipped_requeues: 0 vfs.vnode.stats.created: 1686 vfs.vnode.stats.count: 1641 vfs.vnode.param.wantfree: 2097152 vfs.vnode.param.limit: 8388608 (cherry picked from commit d3e6478912431309aad36211b6c39b0d741312dc) --- sys/kern/vfs_subr.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f4cccf2b4e1f..a8477e4b691e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -126,6 +126,15 @@ static int v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, daddr_t startlbn, daddr_t endlbn); static void vnlru_recalc(void); +static SYSCTL_NODE(_vfs, OID_AUTO, vnode, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration and statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, param, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, vnlru, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode recycling"); + /* * Number of vnodes in existence. Increased whenever getnewvnode() * allocates a new vnode, decreased in vdropl() for VIRF_DOOMED vnode. @@ -133,10 +142,14 @@ static void vnlru_recalc(void); static u_long __exclusive_cache_line numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, + "Number of vnodes in existence (legacy)"); +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, count, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); static counter_u64_t vnodes_created; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + "Number of vnodes created by getnewvnode (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, created, CTLFLAG_RD, &vnodes_created, "Number of vnodes created by getnewvnode"); /* @@ -188,14 +201,18 @@ static long freevnodes_old; static counter_u64_t recycles_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, + "Number of vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, "Number of vnodes recycled to meet vnode cache targets"); static counter_u64_t recycles_free_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, + "Number of free vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, "Number of free vnodes recycled to meet vnode cache targets"); static counter_u64_t vnode_skipped_requeues; -SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnode_skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, "Number of times LRU requeue was skipped due to lock contention"); static u_long deferred_inact; @@ -345,6 +362,9 @@ sysctl_maxvnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, + "LU", "Target for maximum number of vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, limit, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); @@ -358,6 +378,9 @@ sysctl_freevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_stats, OID_AUTO, free, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, "LU", "Number of \"free\" vnodes"); @@ -382,11 +405,14 @@ sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, + "LU", "Target for minimum number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, wantfree, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); static int vnlru_nowhere; -SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW | CTLFLAG_STATS, +SYSCTL_INT(_vfs_vnode_vnlru, OID_AUTO, failed_runs, CTLFLAG_RD | CTLFLAG_STATS, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); static int @@ -1755,7 +1781,7 @@ vtryrecycle(struct vnode *vp) static u_long vn_alloc_cyclecount; static u_long vn_alloc_sleeps; -SYSCTL_ULONG(_vfs, OID_AUTO, vnode_alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, "Number of times vnode allocation blocked waiting on vnlru"); static struct vnode * __noinline From nobody Fri Sep 22 21:51: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 4RsmDq5rp6z4tTMg; Fri, 22 Sep 2023 21:51: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 4RsmDq55XLz3QCZ; Fri, 22 Sep 2023 21:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uQcee1Ihcfs+UsUmQTqwe+GLH156r9BpOPzWYVZxDHQ=; b=ixOEwB66uKa7XDwdcWbmJAE46/7zhu4nf/HjmZ3hFNjg6vFzSGn/jT982Wxq/BD5GWAnFs tHW7hiCSo/cF9ufMRYJLAE4q3LevsBalyNNRtnJboM36mwTJNTFKiqKvEFTp4teEnsXDK4 wnBE8mS5IypfTyqaYS/AgJ3QtE7YNMeXU5q6DxreCADpqkf4YhwYXEMj1hXHs3nCpet6Jh et8K+UCTvR7AoLIpmNkfm6iVbDJVR76UD9h6xY5YpORWsmcpGiQhfyQe6EsOFM4350Sn4M 9oBYp7jhgGFjGXQ9D+EDJNM3a1Muz0mEUTk3coCL4cirH+ATqsU9L3pK5xxjug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419483; a=rsa-sha256; cv=none; b=IlKnlCYO/x8O6RmCr7xkHPUcfqkTqlhJ+Kc1+viFvUTwaJcscN3uE+K1dQk7yloeR+IRCY vE8AN5yfVzzOSlVGc00NRt54RpKXg73u0DJMJW/KGm7wwrO7+ObtZKBYZ5UEpuqH4wxgzB eMVVwgBtP1AGtMYkubaeucwfskgCimXg9vB5qT+gHFhHfzwMlNKmUCP1oALS/5phi6h/xJ EGskIx0k614ZHvi5HMJ/KIr60Or0i4ouyJkzEhCSRKkTElvaziii4ilIFGkkngMSAe1Tih 7OneJQAyqxH/BosF0iun79pXT/sWX7Fuq+fS+2AcF9RKaVMCG4P4RvoDwMD8LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uQcee1Ihcfs+UsUmQTqwe+GLH156r9BpOPzWYVZxDHQ=; b=AeiCQHy5u196gGvjoeGnk5We9mOwiHiFhq8l2nOQRoFU0JJpe88lEB0VX46r9DrDnXIVlZ AvcKGepO1rQsIBKxI7WAdzbLvFkS3VMp3MF7kj9DeDwGyuHZKHOegQemrUHWWBaqXhZKdP 16GoldG+au/9J5yhofAO4d1ikUQdD6bkwJ3AitHLFA5nQNqGSKG66oGTO1yuO91HwxQdkt 6KKv3St51i6i4X5Aqf7QA8SNRfPYpJmFDs4R/C+lZQHrtQGFzJ24mZa5+0AxMO4u7gnhqh JHIJpxiJXjOkZG99P4Amrw+OASYTg4nNYTF9BZjtc9ldN8PYCHZ3rvQnP+oKoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDq4BXnzf3V; Fri, 22 Sep 2023 21:51: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 38MLpNkO039575; Fri, 22 Sep 2023 21:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpN8A039572; Fri, 22 Sep 2023 21:51:23 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:23 GMT Message-Id: <202309222151.38MLpN8A039572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 1a644e8b68be - stable/14 - vfs: s/u_long vstir/bool vstir/ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a644e8b68bef9b207eea67ccec190c7ccd26a39 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1a644e8b68bef9b207eea67ccec190c7ccd26a39 commit 1a644e8b68bef9b207eea67ccec190c7ccd26a39 Author: Mateusz Guzik AuthorDate: 2023-09-16 08:19:24 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:48 +0000 vfs: s/u_long vstir/bool vstir/ (cherry picked from commit 509d843a982b39a531a558c65794ffffcdf93ae8) --- sys/kern/vfs_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a8477e4b691e..9d5b1b7e472e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -325,7 +325,7 @@ u_long desiredvnodes; static u_long gapvnodes; /* gap between wanted and desired */ static u_long vhiwat; /* enough extras after expansion */ static u_long vlowat; /* minimal extras before expansion */ -static u_long vstir; /* nonzero to stir non-free vnodes */ +static bool vstir; /* nonzero to stir non-free vnodes */ static volatile int vsmalltrigger = 8; /* pref to keep if > this many pages */ static u_long vnlru_read_freevnodes(void); @@ -1627,7 +1627,7 @@ vnlru_proc(void) */ if (vstir && force == 0) { force = 1; - vstir = 0; + vstir = false; } if (force == 0 && !vnlru_under(rnumvnodes, vlowat)) { vnlruproc_sig = 0; @@ -1799,7 +1799,7 @@ vn_alloc_hard(struct mount *mp) rfreevnodes = vnlru_read_freevnodes(); if (vn_alloc_cyclecount++ >= rfreevnodes) { vn_alloc_cyclecount = 0; - vstir = 1; + vstir = true; } /* * Grow the vnode cache if it will not be above its target max From nobody Fri Sep 22 21:51: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 4RsmDr6dj1z4tTXJ; Fri, 22 Sep 2023 21:51: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 4RsmDr66X6z3QGH; Fri, 22 Sep 2023 21:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1h1SxTivSoOv20D78mK7qsa7Gxuup5xXefPK9jyv6Co=; b=FMe3LDFOoWVG9T+Lj/8Er4RuoPSuJ67VfL4/eaw11acbv58ExTqAVlAB1N43QXI3YpyNR1 aK057MYlzhcSD3NMp6cafvvU52THE7IyDmEuX4RvKHb0ruLONncc4W07L/5GbXfD295xDq 18mvUba+YnCmp2vI7SMzhusBvsEoFIqXr26Cb7KZS2xFhoamx6+hn2yYWUq2enOL2pyZND eCwBN9bpBsfJdi9lxHKwbwj7qWRp5z5TSKBM+hoZgIy3CxSLfDByZyImNV8nU0MhTrOalG Xyz8gwyuTZ4HfpuZsrQmx1hF2D7g9u7fZjadfESHiItsJx5DbPH2OFrN+KCn7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419484; a=rsa-sha256; cv=none; b=HBFP3uzGTUPZBxGNAMfpgHzv0HRiSrvXiRg+lo4CR2yzsej7WyfXCxh7+3UF2bg/Fhi6YM TNUymhuNPClJrmBaQg9GqYKoPy2V2QrOMLCzgoU144LqI4i+kiYSondODsEhWub4garkcA nnxh+rUN6grFGFkyq8ZYtl9Z+zWhoKHn+VIGtWte/jlYLUyRPDdFCzKXKC93boU5G+TVH2 R/jNiXRFYtsrx6a/JOyMPSP9pelxHLuKIE5fxOHzrLbjUzPjg4KSnpsXGxAFE3HD7f2DwE VCTdgjNXePAxzNecN1FliPKxOUb9wHO7HWzaQ78lIKugsM4AGKYSPRG2ixuKbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1h1SxTivSoOv20D78mK7qsa7Gxuup5xXefPK9jyv6Co=; b=Xx73E22/Mb2LyoeTiUSe9qyU1RIJKLmfmYYcFH6T0j8boG1u0Kz1+etEN87G3fxKzE2ASF so3dMsdfEbTFYXYwWleYktg0hklrgrANBnqDMSZzmLHY+mHGnZB5cU0xiBngqxyyQQZBOD qaHeqkaYFF6Kkebo1Y8ZX+PVLcrQpzDcszzuO3dc076JIt/bJ8otPUtCs900C2/u5OzB4X r3oBTWG2uz722S0J2L2Mk6V2m+TlFhHAYdNKlCXIk1wxOiZgaZs6rnFEcqGQOuv6GyjMLf sOj5pBQ8ncL94YlpEsbpzuN2qBYf5y84zzw2Q8QoaRHF2SEzhYP97ER08i51NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDr4r94zdx8; Fri, 22 Sep 2023 21:51: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 38MLpOPe039612; Fri, 22 Sep 2023 21:51:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpOWO039609; Fri, 22 Sep 2023 21:51:24 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:24 GMT Message-Id: <202309222151.38MLpOWO039609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 873b6cd62043 - stable/14 - vfs: stabilize freevnodes_old List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 873b6cd6204376e844815b4698e0f674634bc1c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=873b6cd6204376e844815b4698e0f674634bc1c0 commit 873b6cd6204376e844815b4698e0f674634bc1c0 Author: Mateusz Guzik AuthorDate: 2023-09-16 15:41:12 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:48 +0000 vfs: stabilize freevnodes_old In face of parallel callers. (cherry picked from commit ef89b78bb1f60484cc743fa590d623ad896ca8e9) --- sys/kern/vfs_subr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9d5b1b7e472e..11cdea5a7dc1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1528,21 +1528,22 @@ vfs_freevnodes_dec(void) static u_long vnlru_read_freevnodes(void) { - long slop, rfreevnodes; + long slop, rfreevnodes, rfreevnodes_old; int cpu; rfreevnodes = atomic_load_long(&freevnodes); + rfreevnodes_old = atomic_load_long(&freevnodes_old); - if (rfreevnodes > freevnodes_old) - slop = rfreevnodes - freevnodes_old; + if (rfreevnodes > rfreevnodes_old) + slop = rfreevnodes - rfreevnodes_old; else - slop = freevnodes_old - rfreevnodes; + slop = rfreevnodes_old - rfreevnodes; if (slop < VNLRU_FREEVNODES_SLOP) return (rfreevnodes >= 0 ? rfreevnodes : 0); - freevnodes_old = rfreevnodes; CPU_FOREACH(cpu) { - freevnodes_old += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; + rfreevnodes += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; } + atomic_store_long(&freevnodes_old, rfreevnodes); return (freevnodes_old >= 0 ? freevnodes_old : 0); } From nobody Fri Sep 22 21:51: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 4RsmDt156wz4tTXM; Fri, 22 Sep 2023 21:51: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 4RsmDt0KmDz3QTX; Fri, 22 Sep 2023 21:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9B9f+SCR1jiwVrJgWC5qwoyTmu6mK5KWyA2Hi76pSZs=; b=ikHe8CJj6Lra8YGmTy9+A9wSR1hVlFwiHzHWUN7XHFUqFFmxqqME9VTeP/cK9WAlXjmWNB QVoB1X7huLBdKWQ1QyyNdEkzLYfswoRZfmEKhrCScn6cHXyi8J5JqQpyV0gOe1lCaI78sR u6jH0I1gugOc4WFpT7E9ptK0cG0M6JXkZIE/ct8PfOrElPKiXcyT+n34eyOIRz1v92wI3z GaswzdRpi3Z3X8783tguSvHmbFNoJjaXg4Kwyw0HHCunktFeDHwIrDfDsMn+oP/s2IiIYk Y9VkkVx79+Y4NftzSBaeH+l67oaelrnux7GYjZpn/vC8ejsw7RrJBq6b//bujA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419486; a=rsa-sha256; cv=none; b=NQKWIKtutJ/1E77tXoosYYkUhUqZL0aVUK6ymrLgj7xmkK5+H0mU5Fhx+v/btEGBaNL3sx ftSHo+EUi6P0ttCIahjBQrST2KG25dkn7Ad9TyeSuCM8FT+vWhNE6Qisos9Q+x3u/MrbQT GkwaSIoTPJCDg9PT7Le4GlP98u1prF3bmIYxH7VTrro3kmdMgVyXvUm+c+mqgKcjR4iLeP bfxD8pcnNv1aNRp7L4qdkUeeBGLI55URTJGB2uTW0spnXnYZQXKeO1qY2rbgGeCvRF5uzw wbZWBUp4YiotdqAEncyqjZkThDimvRcDpFAzLJdrevT7RTmbsi30h7RxALMrPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9B9f+SCR1jiwVrJgWC5qwoyTmu6mK5KWyA2Hi76pSZs=; b=ei7/sdNR9aDLB6N/LKvWZD/2B5BMnTtcUglzfe6utpoFXpjDZMbSx5nmXTFiynoIkAkhDR uFrhu12HiyBbIZ4Z8iZYmvDDH/wNfJyg70Nj488fcx2OiCZ9PRctK9L3nLvaDEe0FE4Cf2 GkAdMM5GBfISaeUGeFMquxu96s25rXWUPKYZJCbo84ul5mkEHoc7arWI6kT2IzA+2Urwtb AG2OzVQJO6nzWtc3shbPQRddqLg/cGnGD44JwUpRY2lAIUAioOe60q4Jbk1wVaeCnA5ecY x78vu9DMP0l/dzL+2SWlHO7LjO6u4VvqRzKIA96GbgB5/UjR1ip0VpB/c7HZIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmDs672dzdkP; Fri, 22 Sep 2023 21:51: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 38MLpPnZ039686; Fri, 22 Sep 2023 21:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLpPDX039683; Fri, 22 Sep 2023 21:51:25 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:51:25 GMT Message-Id: <202309222151.38MLpPDX039683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: e5114cc203a6 - stable/14 - vfs: count how many times vnlru got woken up due to vnode shortage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e5114cc203a6bef23b072d9f98f6b8501e4ce6d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e5114cc203a6bef23b072d9f98f6b8501e4ce6d9 commit e5114cc203a6bef23b072d9f98f6b8501e4ce6d9 Author: Mateusz Guzik AuthorDate: 2023-09-16 17:26:39 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-22 21:50:48 +0000 vfs: count how many times vnlru got woken up due to vnode shortage (cherry picked from commit 9080190b970c7026695571f90b95fdcf7056ec67) --- sys/kern/vfs_subr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 11cdea5a7dc1..0251525a50c7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1477,6 +1477,10 @@ vnlru_recalc(void) */ static struct proc *vnlruproc; static int vnlruproc_sig; +static u_long vnlruproc_kicks; + +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, kicks, CTLFLAG_RD, &vnlruproc_kicks, 0, + "Number of times vnlru got woken up due to vnode shortage"); /* * The main freevnodes counter is only updated when a counter local to CPU @@ -1571,6 +1575,7 @@ vnlru_kick_locked(void) mtx_assert(&vnode_list_mtx, MA_OWNED); if (vnlruproc_sig == 0) { vnlruproc_sig = 1; + vnlruproc_kicks++; wakeup(vnlruproc); } } From nobody Fri Sep 22 21:57: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 4RsmMp25Fqz4tVDX; Fri, 22 Sep 2023 21:57: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 4RsmMp1q81z3T21; Fri, 22 Sep 2023 21:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8cEJJh+Zi5bomVyMNBUDYATk1Dlgl9yG0SQ5sTbcUE=; b=YQHqN/zob8ZTPlUUHxwT2kVYEaJO5sj9zJVOQAxhXUchRAAX91AQfTb2HljLQK/9xhz1QB L34VIvrBcZ/hIBjr9lDMwC3SqU7bSA74Fz1AbJZV2lrq1/vo4aB53q979x+V8KVgznuKLI 4JYIRj/V0G6TgDtVpHk3XUi4tmJ4IA6tOSbn7LKDxpV4YP48DSuGjE3TlN5v6Eph5vm2mN pecXQtDXN2AfV7HT8Exd757CoYy6l1107uziBc/YklVketxa488csQoSch3/tcpYc6rrJ3 uyqYZZ/bHhVrUCN13i1qy9RELRH0/vC6FMre7Zrd3O2Gjc7whvfbYDYrsRDshw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419846; a=rsa-sha256; cv=none; b=LsyzlkQqBkLmQnXZclZ2SCVlFKOltJREsE93CYtDavKJ9pCUSYaCwRiuhem6DTHTwTehcb ey+FBHSnlkOvDVTbLQzPOwLZHuK06abrwJrUbvolJ8zGVu6SPh2Px0mqvVyvbqhugjdNyB krGyVAGTYTE4BoJ72kkdD/RYtDlsM3yV5gg9bpvWf8+V5wWn9bJivOK/hIfPAa9AL6vO6Z xO280oP6iaO0lvi7ZUJLhfqOnjUkVxnd3+rB/mw8vmzU1465gRLvidIIaEGzxqHt9W80k/ scrUxdbOkhG1KkD/n13G98pYPGUjc32gg7Z0q4fCDvbIN9UEok1pM/k+ID80WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8cEJJh+Zi5bomVyMNBUDYATk1Dlgl9yG0SQ5sTbcUE=; b=BdoKhH6lGzt0V6zpf83k7dGsmjEI2rOsk6QIgkpmqxLgFDhzA/iV09CTMi6QyPDvnysVp0 ZVqD3tS2NCUHcY3/6mTUuVyD+V0reDnlk+ziQ1z2QIhxi+OsDqmjNSeboUGNXZaC0CDIen ihv0WQRWw6orI7BNR54B3hCCxMd4oa12jfK8fMNiETnK+3yEzQAyQIHSrsRrNdC867JidZ gYLbmnHkiIBG5yAIFx6Lmp/rA8s5uZYvXdINPdAPntD4sNZq+TlYcFW1wezu8qynKgH6IC 9GEK9dkIYdzakmLZFFYQmR03HYaJwqErma9DEedtibNcR70JtrLnOFDYn5Ex7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmMp0tTMzfFB; Fri, 22 Sep 2023 21:57: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 38MLvQ91047714; Fri, 22 Sep 2023 21:57:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLvPB2047711; Fri, 22 Sep 2023 21:57:25 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:57:25 GMT Message-Id: <202309222157.38MLvPB2047711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: dfdf0d7cb41d - stable/13 - irdma(4): Upgrade the driver to 1.1.11-k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dfdf0d7cb41dd00aceace8d4e2c46205ded35fc4 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=dfdf0d7cb41dd00aceace8d4e2c46205ded35fc4 commit dfdf0d7cb41dd00aceace8d4e2c46205ded35fc4 Author: Bartosz Sobczak AuthorDate: 2023-03-28 21:15:15 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 21:37:03 +0000 irdma(4): Upgrade the driver to 1.1.11-k Summary of changes: - postpone mtu size assignment during load to avoid race condition - refactor some of the debug prints - add request reset handler - refactor flush scheduler to increase efficiency and avoid racing - put correct vlan_tag for UD traffic with PFC - suspend QP before going to ERROR state to avoid CQP timout - fix arithmetic error on irdma_debug_bugf - allow debug flag to be settable during driver load - introduce meaningful default values for DCQCN algorithm - interrupt naming convention improvements - skip unsignaled completions in poll_cmpl Signed-off-by: Bartosz Sobczak bartosz.sobczak@intel.com Signed-off-by: Eric Joyner Reviewed by: hselasky@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39173 (cherry picked from commit 35105900c65bb5adcde05d37ae34ad006970d4f9) --- contrib/ofed/libirdma/abi.h | 2 + contrib/ofed/libirdma/i40iw_hw.h | 4 +- contrib/ofed/libirdma/irdma-abi.h | 8 +- contrib/ofed/libirdma/irdma_defs.h | 18 +- contrib/ofed/libirdma/irdma_uk.c | 13 +- contrib/ofed/libirdma/irdma_umain.c | 4 +- contrib/ofed/libirdma/irdma_umain.h | 3 +- contrib/ofed/libirdma/irdma_user.h | 2 - contrib/ofed/libirdma/irdma_uverbs.c | 7 +- contrib/ofed/libirdma/osdep.h | 9 +- sys/dev/irdma/fbsd_kcompat.c | 58 ++++- sys/dev/irdma/fbsd_kcompat.h | 13 +- sys/dev/irdma/icrdma.c | 30 ++- sys/dev/irdma/icrdma_hw.h | 2 +- sys/dev/irdma/irdma-abi.h | 6 + sys/dev/irdma/irdma_cm.c | 402 ++++++++++++++++++++++------------- sys/dev/irdma/irdma_cm.h | 3 - sys/dev/irdma/irdma_ctrl.c | 49 +++-- sys/dev/irdma/irdma_defs.h | 15 ++ sys/dev/irdma/irdma_hw.c | 173 ++++++++------- sys/dev/irdma/irdma_kcompat.c | 194 +++++++++++------ sys/dev/irdma/irdma_main.h | 8 +- sys/dev/irdma/irdma_pble.c | 18 +- sys/dev/irdma/irdma_pble.h | 4 +- sys/dev/irdma/irdma_protos.h | 2 - sys/dev/irdma/irdma_puda.c | 10 +- sys/dev/irdma/irdma_puda.h | 6 +- sys/dev/irdma/irdma_type.h | 8 +- sys/dev/irdma/irdma_uda.c | 11 +- sys/dev/irdma/irdma_uk.c | 127 +++++------ sys/dev/irdma/irdma_user.h | 4 - sys/dev/irdma/irdma_utils.c | 131 +++++++----- sys/dev/irdma/irdma_verbs.c | 220 ++++++++++--------- sys/dev/irdma/irdma_verbs.h | 22 +- sys/dev/irdma/irdma_ws.c | 2 - sys/dev/irdma/irdma_ws.h | 3 +- sys/dev/irdma/osdep.h | 11 +- 37 files changed, 977 insertions(+), 625 deletions(-) diff --git a/contrib/ofed/libirdma/abi.h b/contrib/ofed/libirdma/abi.h index e45a7b49caf8..6553ebcbcaca 100644 --- a/contrib/ofed/libirdma/abi.h +++ b/contrib/ofed/libirdma/abi.h @@ -115,6 +115,7 @@ struct irdma_get_context { __u32 rsvd32; __u8 userspace_ver; __u8 rsvd8[3]; + __aligned_u64 comp_mask; }; struct irdma_get_context_resp { @@ -136,6 +137,7 @@ struct irdma_get_context_resp { __u16 max_hw_sq_chunk; __u8 hw_rev; __u8 rsvd2; + __aligned_u64 comp_mask; }; struct irdma_ureg_mr { diff --git a/contrib/ofed/libirdma/i40iw_hw.h b/contrib/ofed/libirdma/i40iw_hw.h index c51d89a0fcb2..d04c37d689cb 100644 --- a/contrib/ofed/libirdma/i40iw_hw.h +++ b/contrib/ofed/libirdma/i40iw_hw.h @@ -41,8 +41,8 @@ enum i40iw_device_caps_const { I40IW_MAX_SGE_RD = 1, I40IW_MAX_PUSH_PAGE_COUNT = 0, I40IW_MAX_INLINE_DATA_SIZE = 48, - I40IW_MAX_IRD_SIZE = 63, - I40IW_MAX_ORD_SIZE = 127, + I40IW_MAX_IRD_SIZE = 64, + I40IW_MAX_ORD_SIZE = 64, I40IW_MAX_WQ_ENTRIES = 2048, I40IW_MAX_WQE_SIZE_RQ = 128, I40IW_MAX_PDS = 32768, diff --git a/contrib/ofed/libirdma/irdma-abi.h b/contrib/ofed/libirdma/irdma-abi.h index 8a06198608e2..b7d4b61c162d 100644 --- a/contrib/ofed/libirdma/irdma-abi.h +++ b/contrib/ofed/libirdma/irdma-abi.h @@ -2,7 +2,7 @@ * SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) * * - * Copyright (c) 2006 - 2021 Intel Corporation. All rights reserved. + * Copyright (c) 2006 - 2022 Intel Corporation. All rights reserved. * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005 Cisco Systems. All rights reserved. * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. @@ -53,10 +53,15 @@ enum irdma_memreg_type { IRDMA_MEMREG_TYPE_CQ = 2, }; +enum { + IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0, +}; + struct irdma_alloc_ucontext_req { __u32 rsvd32; __u8 userspace_ver; __u8 rsvd8[3]; + __aligned_u64 comp_mask; }; struct irdma_alloc_ucontext_resp { @@ -77,6 +82,7 @@ struct irdma_alloc_ucontext_resp { __u16 max_hw_sq_chunk; __u8 hw_rev; __u8 rsvd2; + __aligned_u64 comp_mask; }; struct irdma_alloc_pd_resp { diff --git a/contrib/ofed/libirdma/irdma_defs.h b/contrib/ofed/libirdma/irdma_defs.h index 932993fd44ce..3d8b59c4b78e 100644 --- a/contrib/ofed/libirdma/irdma_defs.h +++ b/contrib/ofed/libirdma/irdma_defs.h @@ -75,6 +75,7 @@ #define IRDMA_CQE_QTYPE_RQ 0 #define IRDMA_CQE_QTYPE_SQ 1 +#define IRDMA_QP_SW_MIN_WQSIZE 8 /* in WRs*/ #define IRDMA_QP_WQE_MIN_SIZE 32 #define IRDMA_QP_WQE_MAX_SIZE 256 #define IRDMA_QP_WQE_MIN_QUANTA 1 @@ -304,6 +305,17 @@ #define IRDMAPFINT_OICR_PE_PUSH_M BIT(27) #define IRDMAPFINT_OICR_PE_CRITERR_M BIT(28) +#define IRDMA_GET_RING_OFFSET(_ring, _i) \ + ( \ + ((_ring).head + (_i)) % (_ring).size \ + ) + +#define IRDMA_GET_CQ_ELEM_AT_OFFSET(_cq, _i, _cqe) \ + { \ + register __u32 offset; \ + offset = IRDMA_GET_RING_OFFSET((_cq)->cq_ring, _i); \ + (_cqe) = (_cq)->cq_base[offset].buf; \ + } #define IRDMA_GET_CURRENT_CQ_ELEM(_cq) \ ( \ (_cq)->cq_base[IRDMA_RING_CURRENT_HEAD((_cq)->cq_ring)].buf \ @@ -437,12 +449,6 @@ IRDMA_RING_MOVE_HEAD(_ring, _retcode); \ } -enum irdma_protocol_used { - IRDMA_ANY_PROTOCOL = 0, - IRDMA_IWARP_PROTOCOL_ONLY = 1, - IRDMA_ROCE_PROTOCOL_ONLY = 2, -}; - enum irdma_qp_wqe_size { IRDMA_WQE_SIZE_32 = 32, IRDMA_WQE_SIZE_64 = 64, diff --git a/contrib/ofed/libirdma/irdma_uk.c b/contrib/ofed/libirdma/irdma_uk.c index 5201ad692dc1..97e3ac553c26 100644 --- a/contrib/ofed/libirdma/irdma_uk.c +++ b/contrib/ofed/libirdma/irdma_uk.c @@ -641,7 +641,7 @@ irdma_copy_inline_data_gen_1(u8 *wqe, struct irdma_sge *sge_list, sge_len -= bytes_copied; if (!quanta_bytes_remaining) { - /* Remaining inline bytes reside after the hdr */ + /* Remaining inline bytes reside after hdr */ wqe += 16; quanta_bytes_remaining = 32; } @@ -710,7 +710,7 @@ irdma_copy_inline_data(u8 *wqe, struct irdma_sge *sge_list, u32 num_sges, if (!quanta_bytes_remaining) { quanta_bytes_remaining = 31; - /* Remaining inline bytes reside after the hdr */ + /* Remaining inline bytes reside after hdr */ if (first_quanta) { first_quanta = false; wqe += 16; @@ -1111,7 +1111,6 @@ irdma_uk_cq_request_notification(struct irdma_cq_uk *cq, u8 arm_next = 0; u8 arm_seq_num; - cq->armed = true; get_64bit_val(cq->shadow_area, IRDMA_BYTE_32, &temp_val); arm_seq_num = (u8)FIELD_GET(IRDMA_CQ_DBSA_ARM_SEQ_NUM, temp_val); arm_seq_num++; @@ -1338,6 +1337,8 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, info->error = (bool)FIELD_GET(IRDMA_CQ_ERROR, qword3); info->push_dropped = (bool)FIELD_GET(IRDMACQ_PSHDROP, qword3); info->ipv4 = (bool)FIELD_GET(IRDMACQ_IPV4, qword3); + get_64bit_val(cqe, IRDMA_BYTE_8, &comp_ctx); + qp = (struct irdma_qp_uk *)(irdma_uintptr) comp_ctx; if (info->error) { info->major_err = FIELD_GET(IRDMA_CQ_MAJERR, qword3); info->minor_err = FIELD_GET(IRDMA_CQ_MINERR, qword3); @@ -1366,10 +1367,7 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, info->qp_id = (u32)FIELD_GET(IRDMACQ_QPID, qword2); info->ud_src_qpn = (u32)FIELD_GET(IRDMACQ_UDSRCQPN, qword2); - get_64bit_val(cqe, IRDMA_BYTE_8, &comp_ctx); - info->solicited_event = (bool)FIELD_GET(IRDMACQ_SOEVENT, qword3); - qp = (struct irdma_qp_uk *)(irdma_uintptr) comp_ctx; if (!qp || qp->destroy_pending) { ret_code = EFAULT; goto exit; @@ -1493,7 +1491,8 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, } } while (1); - if (info->op_type == IRDMA_OP_TYPE_BIND_MW && info->minor_err == FLUSH_PROT_ERR) + if (info->op_type == IRDMA_OP_TYPE_BIND_MW && + info->minor_err == FLUSH_PROT_ERR) info->minor_err = FLUSH_MW_BIND_ERR; qp->sq_flush_seen = true; if (!IRDMA_RING_MORE_WORK(qp->sq_ring)) diff --git a/contrib/ofed/libirdma/irdma_umain.c b/contrib/ofed/libirdma/irdma_umain.c index 8d27f648f969..6c823646b375 100644 --- a/contrib/ofed/libirdma/irdma_umain.c +++ b/contrib/ofed/libirdma/irdma_umain.c @@ -49,7 +49,7 @@ /** * Driver version */ -char libirdma_version[] = "1.1.5-k"; +char libirdma_version[] = "1.1.11-k"; unsigned int irdma_dbg; @@ -170,7 +170,7 @@ irdma_init_context(struct verbs_device *vdev, iwvctx->uk_attrs.max_hw_sq_chunk = resp.max_hw_sq_chunk; iwvctx->uk_attrs.max_hw_cq_size = resp.max_hw_cq_size; iwvctx->uk_attrs.min_hw_cq_size = resp.min_hw_cq_size; - iwvctx->uk_attrs.min_hw_wq_size = IRDMA_MIN_WQ_SIZE_GEN2; + iwvctx->uk_attrs.min_hw_wq_size = IRDMA_QP_SW_MIN_WQSIZE; iwvctx->abi_ver = IRDMA_ABI_VER; mmap_key = resp.db_mmap_key; diff --git a/contrib/ofed/libirdma/irdma_umain.h b/contrib/ofed/libirdma/irdma_umain.h index f6dafc6bf39a..c67c5d7076f9 100644 --- a/contrib/ofed/libirdma/irdma_umain.h +++ b/contrib/ofed/libirdma/irdma_umain.h @@ -87,7 +87,8 @@ struct irdma_uvcontext { struct irdma_uk_attrs uk_attrs; void *db; int abi_ver; - bool legacy_mode; + bool legacy_mode:1; + bool use_raw_attrs:1; }; struct irdma_uqp; diff --git a/contrib/ofed/libirdma/irdma_user.h b/contrib/ofed/libirdma/irdma_user.h index 089619e1e3b1..8eb9ae7990e7 100644 --- a/contrib/ofed/libirdma/irdma_user.h +++ b/contrib/ofed/libirdma/irdma_user.h @@ -211,7 +211,6 @@ enum irdma_device_caps_const { IRDMA_Q2_BUF_SIZE = 256, IRDMA_QP_CTX_SIZE = 256, IRDMA_MAX_PDS = 262144, - IRDMA_MIN_WQ_SIZE_GEN2 = 8, }; enum irdma_addressing_type { @@ -521,7 +520,6 @@ struct irdma_cq_uk { u32 cq_size; struct irdma_ring cq_ring; u8 polarity; - bool armed:1; bool avoid_mem_cflct:1; }; diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c index 58c5c6cf617c..14efab96a107 100644 --- a/contrib/ofed/libirdma/irdma_uverbs.c +++ b/contrib/ofed/libirdma/irdma_uverbs.c @@ -1566,11 +1566,10 @@ irdma_ucreate_qp(struct ibv_pd *pd, info.sq_size = info.sq_depth >> info.sq_shift; info.rq_size = info.rq_depth >> info.rq_shift; /** - * For older ABI version (less than 6) passes raw sq and rq - * quanta in cap.max_send_wr and cap.max_recv_wr. - * But then kernel had no way of calculating the actual qp size. + * Maintain backward compatibility with older ABI which pass sq + * and rq depth (in quanta) in cap.max_send_wr a cap.max_recv_wr */ - if (iwvctx->abi_ver <= 5) { + if (!iwvctx->use_raw_attrs) { attr->cap.max_send_wr = info.sq_size; attr->cap.max_recv_wr = info.rq_size; } diff --git a/contrib/ofed/libirdma/osdep.h b/contrib/ofed/libirdma/osdep.h index 23bdbe805b01..fc39c139b6ca 100644 --- a/contrib/ofed/libirdma/osdep.h +++ b/contrib/ofed/libirdma/osdep.h @@ -117,7 +117,7 @@ do { \ irdma_debug(dev, mask, "%s\n", desc); \ irdma_debug(dev, mask, "starting address virt=%p phy=%lxh\n", buf, irdma_get_virt_to_phy(buf)); \ for (i = 0; i < size ; i += 8) \ - irdma_debug(dev, mask, "index %03d val: %016lx\n", i, ((unsigned long *)buf)[i / 8]); \ + irdma_debug(dev, mask, "index %03d val: %016lx\n", i, ((unsigned long *)(buf))[i / 8]); \ } while(0) #define irdma_debug(h, m, s, ...) \ @@ -135,11 +135,12 @@ do { \ if (irdma_dbg) \ printf("libirdma-%s: " fmt, __func__, ##args); \ } while (0) -#define irdma_dev_err(a, b, ...) printf(b, ##__VA_ARGS__) -#define irdma_dev_warn(a, b, ...) printf(b, ##__VA_ARGS__) /*dev_warn(a, b)*/ +#define irdma_dev_err(ibdev, fmt, ...) \ + pr_err("%s:%s:%d ERR "fmt, (ibdev)->name, __func__, __LINE__, ##__VA_ARGS__) +#define irdma_dev_warn(ibdev, fmt, ...) \ + pr_warn("%s:%s:%d WARN "fmt, (ibdev)->name, __func__, __LINE__, ##__VA_ARGS__) #define irdma_dev_info(a, b, ...) printf(b, ##__VA_ARGS__) #define irdma_pr_warn printf -#define ibdev_err(ibdev, fmt, ...) printf("%s:"fmt, (ibdev)->name, ##__VA_ARGS__) #define dump_struct(s, sz, name) \ do { \ diff --git a/sys/dev/irdma/fbsd_kcompat.c b/sys/dev/irdma/fbsd_kcompat.c index 88d56c0846c3..4928b4189cca 100644 --- a/sys/dev/irdma/fbsd_kcompat.c +++ b/sys/dev/irdma/fbsd_kcompat.c @@ -92,6 +92,18 @@ irdma_wr64(struct irdma_dev_ctx *dev_ctx, u32 reg, u64 value) } +void +irdma_request_reset(struct irdma_pci_f *rf) +{ + struct ice_rdma_peer *peer = rf->peer_info; + struct ice_rdma_request req = {0}; + + req.type = ICE_RDMA_EVENT_RESET; + + printf("%s:%d requesting pf-reset\n", __func__, __LINE__); + IRDMA_DI_REQ_HANDLER(peer, &req); +} + int irdma_register_qset(struct irdma_sc_vsi *vsi, struct irdma_ws_node *tc_node) { @@ -610,32 +622,38 @@ irdma_dcqcn_tunables_init(struct irdma_pci_f *rf) &rf->dcqcn_params.min_rate, 0, "set minimum rate limit value, in MBits per second, default=0"); + rf->dcqcn_params.dcqcn_f = 5; SYSCTL_ADD_U8(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_F", CTLFLAG_RDTUN, &rf->dcqcn_params.dcqcn_f, 0, - "set number of times to stay in each stage of bandwidth recovery, default=0"); + "set number of times to stay in each stage of bandwidth recovery, default=5"); + rf->dcqcn_params.dcqcn_t = 0x37; SYSCTL_ADD_U16(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_T", CTLFLAG_RDTUN, &rf->dcqcn_params.dcqcn_t, 0, - "set number of usecs that should elapse before increasing the CWND in DCQCN mode, default=0"); + "set number of usecs that should elapse before increasing the CWND in DCQCN mode, default=0x37"); + rf->dcqcn_params.dcqcn_b = 0x249f0; SYSCTL_ADD_U32(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_B", CTLFLAG_RDTUN, &rf->dcqcn_params.dcqcn_b, 0, - "set number of MSS to add to the congestion window in additive increase mode, default=0"); + "set number of MSS to add to the congestion window in additive increase mode, default=0x249f0"); + rf->dcqcn_params.rai_factor = 1; SYSCTL_ADD_U16(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_rai_factor", CTLFLAG_RDTUN, &rf->dcqcn_params.rai_factor, 0, - "set number of MSS to add to the congestion window in additive increase mode, default=0"); + "set number of MSS to add to the congestion window in additive increase mode, default=1"); + rf->dcqcn_params.hai_factor = 5; SYSCTL_ADD_U16(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_hai_factor", CTLFLAG_RDTUN, &rf->dcqcn_params.hai_factor, 0, - "set number of MSS to add to the congestion window in hyperactive increase mode, default=0"); + "set number of MSS to add to the congestion window in hyperactive increase mode, default=5"); + rf->dcqcn_params.rreduce_mperiod = 50; SYSCTL_ADD_U32(&rf->tun_info.irdma_sysctl_ctx, irdma_sysctl_oid_list, OID_AUTO, "dcqcn_rreduce_mperiod", CTLFLAG_RDTUN, &rf->dcqcn_params.rreduce_mperiod, 0, - "set minimum time between 2 consecutive rate reductions for a single flow, default=0"); + "set minimum time between 2 consecutive rate reductions for a single flow, default=50"); } /** @@ -742,3 +760,31 @@ irdma_prm_rem_bitmapmem(struct irdma_hw *hw, struct irdma_chunk *chunk) { kfree(chunk->bitmapmem.va); } + +void +irdma_cleanup_dead_qps(struct irdma_sc_vsi *vsi) +{ + struct irdma_sc_qp *qp = NULL; + struct irdma_qp *iwqp; + struct irdma_pci_f *rf; + u8 i; + + for (i = 0; i < IRDMA_MAX_USER_PRIORITY; i++) { + qp = irdma_get_qp_from_list(&vsi->qos[i].qplist, qp); + while (qp) { + if (qp->qp_uk.qp_type == IRDMA_QP_TYPE_UDA) { + qp = irdma_get_qp_from_list(&vsi->qos[i].qplist, qp); + continue; + } + iwqp = qp->qp_uk.back_qp; + rf = iwqp->iwdev->rf; + irdma_free_dma_mem(rf->sc_dev.hw, &iwqp->q2_ctx_mem); + irdma_free_dma_mem(rf->sc_dev.hw, &iwqp->kqp.dma_mem); + + kfree(iwqp->kqp.sq_wrid_mem); + kfree(iwqp->kqp.rq_wrid_mem); + qp = irdma_get_qp_from_list(&vsi->qos[i].qplist, qp); + kfree(iwqp); + } + } +} diff --git a/sys/dev/irdma/fbsd_kcompat.h b/sys/dev/irdma/fbsd_kcompat.h index ea693c511e7c..903e33614d9e 100644 --- a/sys/dev/irdma/fbsd_kcompat.h +++ b/sys/dev/irdma/fbsd_kcompat.h @@ -130,8 +130,7 @@ int irdma_destroy_ah(struct ib_ah *ibah); int irdma_destroy_ah_stub(struct ib_ah *ibah); int irdma_destroy_qp(struct ib_qp *ibqp); int irdma_dereg_mr(struct ib_mr *ib_mr); -void irdma_get_eth_speed_and_width(u32 link_speed, u8 *active_speed, - u8 *active_width); +int ib_get_eth_speed(struct ib_device *dev, u32 port_num, u8 *speed, u8 *width); enum rdma_link_layer irdma_get_link_layer(struct ib_device *ibdev, u8 port_num); int irdma_roce_port_immutable(struct ib_device *ibdev, u8 port_num, @@ -151,6 +150,7 @@ int irdma_get_hw_stats(struct ib_device *ibdev, struct rdma_hw_stats *stats, u8 port_num, int index); +void irdma_request_reset(struct irdma_pci_f *rf); int irdma_register_qset(struct irdma_sc_vsi *vsi, struct irdma_ws_node *tc_node); void irdma_unregister_qset(struct irdma_sc_vsi *vsi, @@ -264,4 +264,13 @@ static inline size_t irdma_ib_umem_num_dma_blocks(struct ib_umem *umem, unsigned ALIGN_DOWN(iova, pgsz))) / pgsz; } +static inline void addrconf_addr_eui48(u8 *deui, const char *const addr) +{ + memcpy(deui, addr, 3); + deui[3] = 0xFF; + deui[4] = 0xFE; + memcpy(deui + 5, addr + 3, 3); + deui[0] ^= 2; +} + #endif /* FBSD_KCOMPAT_H */ diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c index a40483522342..38a970700558 100644 --- a/sys/dev/irdma/icrdma.c +++ b/sys/dev/irdma/icrdma.c @@ -52,7 +52,7 @@ /** * Driver version */ -char irdma_driver_version[] = "1.1.5-k"; +char irdma_driver_version[] = "1.1.11-k"; #define pf_if_d(peer) peer->ifp->if_dunit @@ -222,9 +222,13 @@ static void irdma_log_invalid_mtu(u16 mtu, struct irdma_sc_dev *dev) { if (mtu < IRDMA_MIN_MTU_IPV4) - irdma_dev_warn(dev, "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 576 for IPv4\n", mtu); + irdma_dev_warn(to_ibdev(dev), + "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 576 for IPv4\n", + mtu); else if (mtu < IRDMA_MIN_MTU_IPV6) - irdma_dev_warn(dev, "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 1280 for IPv6\\n", mtu); + irdma_dev_warn(to_ibdev(dev), + "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 1280 for IPv6\\n", + mtu); } /** @@ -335,22 +339,25 @@ irdma_finalize_task(void *context, int pending) int status = 0; if (iwdev->iw_status) { - irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, "Starting deferred closing %d (%d)\n", + irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, + "Starting deferred closing %d (%d)\n", rf->peer_info->pf_id, pf_if_d(peer)); irdma_dereg_ipaddr_event_cb(rf); irdma_ib_unregister_device(iwdev); req.type = ICE_RDMA_EVENT_VSI_FILTER_UPDATE; req.enable_filter = false; IRDMA_DI_REQ_HANDLER(peer, &req); + irdma_cleanup_dead_qps(&iwdev->vsi); irdma_rt_deinit_hw(iwdev); } else { - irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, "Starting deferred opening %d (%d)\n", + irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, + "Starting deferred opening %d (%d)\n", rf->peer_info->pf_id, pf_if_d(peer)); - l2params.mtu = peer->mtu; irdma_get_qos_info(&l2params, &peer->initial_qos_info); if (iwdev->rf->protocol_used != IRDMA_IWARP_PROTOCOL_ONLY) iwdev->dcb_vlan_mode = l2params.num_tc > 1 && !l2params.dscp_mode; + l2params.mtu = peer->mtu; status = irdma_rt_init_hw(iwdev, &l2params); if (status) { irdma_pr_err("RT init failed %d\n", status); @@ -367,7 +374,8 @@ irdma_finalize_task(void *context, int pending) req.enable_filter = true; IRDMA_DI_REQ_HANDLER(peer, &req); irdma_reg_ipaddr_event_cb(rf); - irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, "Deferred opening finished %d (%d)\n", + irdma_debug(&rf->sc_dev, IRDMA_DEBUG_INIT, + "Deferred opening finished %d (%d)\n", rf->peer_info->pf_id, pf_if_d(peer)); } } @@ -458,6 +466,7 @@ irdma_fill_device_info(struct irdma_device *iwdev, rf->rsrc_profile = IRDMA_HMC_PROFILE_DEFAULT; rf->rst_to = IRDMA_RST_TIMEOUT_HZ; rf->check_fc = irdma_check_fc_for_qp; + rf->gen_ops.request_reset = irdma_request_reset; irdma_set_rf_user_cfg_params(rf); rf->default_vsi.vsi_idx = peer->pf_vsi_num; @@ -482,6 +491,7 @@ irdma_fill_device_info(struct irdma_device *iwdev, iwdev->rcv_wscale = IRDMA_CM_DEFAULT_RCV_WND_SCALE; iwdev->roce_cwnd = IRDMA_ROCE_CWND_DEFAULT; iwdev->roce_ackcreds = IRDMA_ROCE_ACKCREDS_DEFAULT; + iwdev->roce_rtomin = 5; if (rf->protocol_used == IRDMA_ROCE_PROTOCOL_ONLY) { iwdev->roce_mode = true; @@ -582,7 +592,8 @@ irdma_remove(struct ice_rdma_peer *peer) struct irdma_handler *hdl; struct irdma_device *iwdev; - irdma_debug((struct irdma_sc_dev *)NULL, IRDMA_DEBUG_INIT, "removing %s\n", __FUNCTION__); + irdma_debug((struct irdma_sc_dev *)NULL, IRDMA_DEBUG_INIT, + "removing %s irdma%d\n", __func__, pf_if_d(peer)); hdl = irdma_find_handler(peer); if (!hdl) @@ -613,7 +624,8 @@ irdma_remove(struct ice_rdma_peer *peer) kfree(iwdev->hdl); kfree(iwdev->rf); ib_dealloc_device(&iwdev->ibdev); - irdma_pr_info("IRDMA hardware deinitialization complete\n"); + irdma_pr_info("IRDMA hardware deinitialization complete irdma%d\n", + pf_if_d(peer)); return 0; } diff --git a/sys/dev/irdma/icrdma_hw.h b/sys/dev/irdma/icrdma_hw.h index 4f34a8f3e7af..8ed50fe6aa48 100644 --- a/sys/dev/irdma/icrdma_hw.h +++ b/sys/dev/irdma/icrdma_hw.h @@ -121,7 +121,7 @@ enum icrdma_device_caps_const { ICRDMA_MAX_STATS_COUNT = 128, ICRDMA_MAX_IRD_SIZE = 32, - ICRDMA_MAX_ORD_SIZE = 64, + ICRDMA_MAX_ORD_SIZE = 32, ICRDMA_MIN_WQ_SIZE = 8 /* WQEs */, }; diff --git a/sys/dev/irdma/irdma-abi.h b/sys/dev/irdma/irdma-abi.h index 8d6cd05531fd..c9da13ad7831 100644 --- a/sys/dev/irdma/irdma-abi.h +++ b/sys/dev/irdma/irdma-abi.h @@ -52,10 +52,15 @@ enum irdma_memreg_type { IRDMA_MEMREG_TYPE_CQ = 2, }; +enum { + IRDMA_ALLOC_UCTX_USE_RAW_ATTR = 1 << 0, +}; + struct irdma_alloc_ucontext_req { __u32 rsvd32; __u8 userspace_ver; __u8 rsvd8[3]; + __aligned_u64 comp_mask; }; struct irdma_alloc_ucontext_resp { @@ -76,6 +81,7 @@ struct irdma_alloc_ucontext_resp { __u16 max_hw_sq_chunk; __u8 hw_rev; __u8 rsvd2; + __aligned_u64 comp_mask; }; struct irdma_alloc_pd_resp { diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 313c2a0e36f6..6322a34acc13 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -205,9 +205,10 @@ irdma_send_cm_event(struct irdma_cm_node *cm_node, event.event = type; event.status = status; - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "cm_node %p cm_id=%p state=%d accel=%d event_type=%d status=%d\n", - cm_node, cm_id, cm_node->accelerated, cm_node->state, type, status); + cm_node, cm_id, cm_node->accelerated, cm_node->state, type, + status); switch (type) { case IW_CM_EVENT_CONNECT_REQUEST: @@ -287,8 +288,9 @@ irdma_create_event(struct irdma_cm_node *cm_node, event->cm_info.rem_port = cm_node->rem_port; event->cm_info.loc_port = cm_node->loc_port; event->cm_info.cm_id = cm_node->cm_id; - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "node=%p event=%p type=%u dst=%pI4 src=%pI4\n", cm_node, + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "node=%p event=%p type=%u dst=%pI4 src=%pI4\n", + cm_node, event, type, event->cm_info.loc_addr, event->cm_info.rem_addr); irdma_cm_post_event(event); @@ -355,15 +357,13 @@ irdma_form_ah_cm_frame(struct irdma_cm_node *cm_node, u32 hdr_len = 0; if (!cm_node->ah || !cm_node->ah->ah_info.ah_valid) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "AH invalid\n"); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "AH invalid\n"); return NULL; } sqbuf = irdma_puda_get_bufpool(vsi->ilq); if (!sqbuf) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "SQ buf NULL\n"); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "SQ buf NULL\n"); return NULL; } @@ -644,7 +644,7 @@ irdma_send_reset(struct irdma_cm_node *cm_node) if (!sqbuf) return -ENOMEM; - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "caller: %pS cm_node %p cm_id=%p accel=%d state=%d rem_port=0x%04x, loc_port=0x%04x rem_addr=%pI4 loc_addr=%pI4\n", __builtin_return_address(0), cm_node, cm_node->cm_id, cm_node->accelerated, cm_node->state, cm_node->rem_port, @@ -665,8 +665,9 @@ irdma_active_open_err(struct irdma_cm_node *cm_node, bool reset) irdma_cleanup_retrans_entry(cm_node); cm_node->cm_core->stats_connect_errs++; if (reset) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "cm_node=%p state=%d\n", cm_node, cm_node->state); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "cm_node=%p state=%d\n", cm_node, + cm_node->state); atomic_inc(&cm_node->refcnt); irdma_send_reset(cm_node); } @@ -686,8 +687,9 @@ irdma_passive_open_err(struct irdma_cm_node *cm_node, bool reset) irdma_cleanup_retrans_entry(cm_node); cm_node->cm_core->stats_passive_errs++; cm_node->state = IRDMA_CM_STATE_CLOSED; - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "cm_node=%p state =%d\n", cm_node, cm_node->state); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "cm_node=%p state =%d\n", + cm_node, cm_node->state); if (reset) irdma_send_reset(cm_node); else @@ -746,8 +748,7 @@ irdma_process_options(struct irdma_cm_node *cm_node, u8 *optionsloc, offset += 1; continue; case OPTION_NUM_MSS: - irdma_debug(iwdev_to_idev(cm_node->iwdev), - IRDMA_DEBUG_CM, + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "MSS Length: %d Offset: %d Size: %d\n", all_options->mss.len, offset, optionsize); got_mss_option = 1; @@ -767,8 +768,7 @@ irdma_process_options(struct irdma_cm_node *cm_node, u8 *optionsloc, all_options->windowscale.shiftcount; break; default: - irdma_debug(iwdev_to_idev(cm_node->iwdev), - IRDMA_DEBUG_CM, + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Unsupported TCP Option: %x\n", all_options->base.optionnum); break; @@ -800,9 +800,9 @@ irdma_handle_tcp_options(struct irdma_cm_node *cm_node, ret = irdma_process_options(cm_node, optionsloc, optionsize, (u32)tcph->th_flags & TH_SYN); if (ret) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), - IRDMA_DEBUG_CM, - "Node %p, Sending Reset\n", cm_node); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "Node %p, Sending Reset\n", + cm_node); if (passive) irdma_passive_open_err(cm_node, true); else @@ -949,8 +949,9 @@ irdma_send_mpa_request(struct irdma_cm_node *cm_node) &cm_node->mpa_hdr, MPA_KEY_REQUEST); if (!cm_node->mpa_hdr.size) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "mpa size = %d\n", cm_node->mpa_hdr.size); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "mpa size = %d\n", + cm_node->mpa_hdr.size); return -EINVAL; } @@ -1060,9 +1061,9 @@ negotiate_done: /* Not supported RDMA0 operation */ return -EOPNOTSUPP; - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "MPAV2 Negotiated ORD: %d, IRD: %d\n", cm_node->ord_size, - cm_node->ird_size); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "MPAV2 Negotiated ORD: %d, IRD: %d\n", + cm_node->ord_size, cm_node->ird_size); return 0; } @@ -1083,8 +1084,8 @@ irdma_parse_mpa(struct irdma_cm_node *cm_node, u8 *buf, u32 *type, *type = IRDMA_MPA_REQUEST_ACCEPT; if (len < sizeof(struct ietf_mpa_v1)) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "ietf buffer small (%x)\n", len); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "ietf buffer small (%x)\n", len); return -EINVAL; } @@ -1093,20 +1094,23 @@ irdma_parse_mpa(struct irdma_cm_node *cm_node, u8 *buf, u32 *type, priv_data_len = ntohs(mpa_frame->priv_data_len); if (priv_data_len > IETF_MAX_PRIV_DATA_LEN) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "private_data too big %d\n", priv_data_len); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "private_data too big %d\n", + priv_data_len); return -EOVERFLOW; } if (mpa_frame->rev != IETF_MPA_V1 && mpa_frame->rev != IETF_MPA_V2) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "unsupported mpa rev = %d\n", mpa_frame->rev); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "unsupported mpa rev = %d\n", + mpa_frame->rev); return -EINVAL; } if (mpa_frame->rev > cm_node->mpa_frame_rev) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "rev %d\n", mpa_frame->rev); + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, + "rev %d\n", + mpa_frame->rev); return -EINVAL; } @@ -1114,31 +1118,29 @@ irdma_parse_mpa(struct irdma_cm_node *cm_node, u8 *buf, u32 *type, if (cm_node->state != IRDMA_CM_STATE_MPAREQ_SENT) { if (memcmp(mpa_frame->key, IEFT_MPA_KEY_REQ, IETF_MPA_KEY_SIZE)) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), - IRDMA_DEBUG_CM, - "Unexpected MPA Key received\n"); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "Unexpected MPA Key received\n"); return -EINVAL; } } else { if (memcmp(mpa_frame->key, IEFT_MPA_KEY_REP, IETF_MPA_KEY_SIZE)) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), - IRDMA_DEBUG_CM, - "Unexpected MPA Key received\n"); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "Unexpected MPA Key received\n"); return -EINVAL; } } if (priv_data_len + mpa_hdr_len > len) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "ietf buffer len(%x + %x != %x)\n", priv_data_len, - mpa_hdr_len, len); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "ietf buffer len(%x + %x != %x)\n", + priv_data_len, mpa_hdr_len, len); return -EOVERFLOW; } if (len > IRDMA_MAX_CM_BUF) { - irdma_debug(iwdev_to_idev(cm_node->iwdev), IRDMA_DEBUG_CM, - "ietf buffer large len = %d\n", len); + irdma_debug(&cm_node->iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "ietf buffer large len = %d\n", len); return -EOVERFLOW; } @@ -1210,7 +1212,7 @@ irdma_schedule_cm_timer(struct irdma_cm_node *cm_node, new_send->timetosend += (HZ / 10); if (cm_node->close_entry) { kfree(new_send); - irdma_debug(iwdev_to_idev(cm_node->iwdev), + irdma_debug(&cm_node->iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "already close entry\n"); return -EINVAL; } @@ -1519,12 +1521,13 @@ irdma_send_fin(struct irdma_cm_node *cm_node) * irdma_find_listener - find a cm node listening on this addr-port pair * @cm_core: cm's core * @dst_addr: listener ip addr + * @ipv4: flag indicating IPv4 when true * @dst_port: listener tcp port num * @vlan_id: virtual LAN ID * @listener_state: state to match with listen node's */ static struct irdma_cm_listener * -irdma_find_listener(struct irdma_cm_core *cm_core, u32 *dst_addr, u16 dst_port, +irdma_find_listener(struct irdma_cm_core *cm_core, u32 *dst_addr, bool ipv4, u16 dst_port, u16 vlan_id, enum irdma_cm_listener_state listener_state) { struct irdma_cm_listener *listen_node; @@ -1538,7 +1541,7 @@ irdma_find_listener(struct irdma_cm_core *cm_core, u32 *dst_addr, u16 dst_port, list_for_each_entry(listen_node, &cm_core->listen_list, list) { memcpy(listen_addr, listen_node->loc_addr, sizeof(listen_addr)); listen_port = listen_node->loc_port; - if (listen_port != dst_port || + if (listen_node->ipv4 != ipv4 || listen_port != dst_port || !(listener_state & listen_node->listener_state)) continue; /* compare node pair, return node handle if a match */ @@ -1578,13 +1581,13 @@ irdma_del_multiple_qhash(struct irdma_device *iwdev, child_listen_node = list_entry(pos, struct irdma_cm_listener, child_listen_list); if (child_listen_node->ipv4) - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "removing child listen for IP=%pI4, port=%d, vlan=%d\n", child_listen_node->loc_addr, child_listen_node->loc_port, child_listen_node->vlan_id); else - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "removing child listen for IP=%pI6, port=%d, vlan=%d\n", child_listen_node->loc_addr, child_listen_node->loc_port, @@ -1602,8 +1605,8 @@ irdma_del_multiple_qhash(struct irdma_device *iwdev, } else { ret = 0; } - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, - "Child listen node freed = %p\n", + irdma_debug(&iwdev->rf->sc_dev, + IRDMA_DEBUG_CM, "Child listen node freed = %p\n", child_listen_node); kfree(child_listen_node); cm_parent_listen_node->cm_core->stats_listen_nodes_destroyed++; @@ -1613,6 +1616,10 @@ irdma_del_multiple_qhash(struct irdma_device *iwdev, return ret; } +static u8 irdma_get_egress_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4){ + return prio; +} + /** * irdma_netdev_vlan_ipv6 - Gets the netdev and mac * @addr: local IPv6 address @@ -1701,20 +1708,18 @@ irdma_add_mqh_6(struct irdma_device *iwdev, if_addr_rlock(ip_dev); IRDMA_TAILQ_FOREACH(ifp, &ip_dev->if_addrhead, ifa_link) { - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "IP=%pI6, vlan_id=%d, MAC=%pM\n", &((struct sockaddr_in6 *)ifp->ifa_addr)->sin6_addr, rdma_vlan_dev_vlan_id(ip_dev), IF_LLADDR(ip_dev)); if (((struct sockaddr_in6 *)ifp->ifa_addr)->sin6_family != AF_INET6) continue; child_listen_node = kzalloc(sizeof(*child_listen_node), GFP_KERNEL); - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Allocating child listener %p\n", child_listen_node); if (!child_listen_node) { - irdma_debug(iwdev_to_idev(iwdev), - IRDMA_DEBUG_CM, - "listener memory allocation\n"); + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "listener memory allocation\n"); ret = -ENOMEM; if_addr_runlock(ip_dev); goto exit; @@ -1728,6 +1733,11 @@ irdma_add_mqh_6(struct irdma_device *iwdev, ((struct sockaddr_in6 *)ifp->ifa_addr)->sin6_addr.__u6_addr.__u6_addr32); memcpy(cm_info->loc_addr, child_listen_node->loc_addr, sizeof(cm_info->loc_addr)); + if (!iwdev->vsi.dscp_mode) + cm_info->user_pri = + irdma_get_egress_vlan_prio(child_listen_node->loc_addr, + cm_info->user_pri, + false); ret = irdma_manage_qhash(iwdev, cm_info, IRDMA_QHASH_TYPE_TCP_SYN, IRDMA_QHASH_MANAGE_TYPE_ADD, @@ -1784,20 +1794,19 @@ irdma_add_mqh_4(struct irdma_device *iwdev, if_addr_rlock(ip_dev); IRDMA_TAILQ_FOREACH(ifa, &ip_dev->if_addrhead, ifa_link) { - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Allocating child CM Listener forIP=%pI4, vlan_id=%d, MAC=%pM\n", - &ifa->ifa_addr, - rdma_vlan_dev_vlan_id(ip_dev), IF_LLADDR(ip_dev)); + &ifa->ifa_addr, rdma_vlan_dev_vlan_id(ip_dev), + IF_LLADDR(ip_dev)); if (((struct sockaddr_in *)ifa->ifa_addr)->sin_family != AF_INET) continue; child_listen_node = kzalloc(sizeof(*child_listen_node), GFP_KERNEL); cm_parent_listen_node->cm_core->stats_listen_nodes_created++; - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Allocating child listener %p\n", child_listen_node); if (!child_listen_node) { - irdma_debug(iwdev_to_idev(iwdev), IRDMA_DEBUG_CM, - "listener memory allocation\n"); + irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "listener memory allocation\n"); if_addr_runlock(ip_dev); ret = -ENOMEM; goto exit; *** 3322 LINES SKIPPED *** From nobody Fri Sep 22 21:57: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 4RsmMq45L9z4tTxW; Fri, 22 Sep 2023 21:57: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 4RsmMq34y5z3TFN; Fri, 22 Sep 2023 21:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/VYNJadBhrpRffnBCEMd5gr6T3Yjh/ThdHip4sYb2I=; b=TstdL7CnXpb6Ci1h5RzOQ6qoG+alba/tYlVbLKce0/aWHEXeYYw1NAHpjbOgKqcc4OUpDk fnwot9q0ssDjuqFbg/uRAJWh+j10KqBp5IQzcHSfK9uK5+Wx8Ajbgdpl+5YqP/sKhuuhzn 9WPNr7PXZ5wQSB2fVZN4RDv5Ja78ZeLNV7A+smyd16Rh6Wz9/U69BdZOrZOwewlmMu5AGU PzYqBwapA7Ig/7mYukOC7UMF56N4x1XAbjP/oVfBlpBOL3MrxnEpd50MXvgcnPG1vpL2/A zmTkrw2RxIqv5HXjVXQuEp3/jsHV3rnn+AXMPuD7u22de16y90KChkvBNGsCsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419847; a=rsa-sha256; cv=none; b=uhlsPymbWPy2ENFZdcv9Ka/vq1vbAoywz3tSLTPilsQUPuFW4r1+M8SvoNQ5zsvCLuuCWP 2gUfU3fEiRZ4CwDHW5cOk7z5OHLbphYO8S1KXxVcUSjWjL0P1SuuFiRiJ6w2wE9zuxDbDC P5P7Nr57/Mtd/3G/7AWJZXoTz+WjBcYul12G+QigGSamxnQoVDFdLK5Sm4CmSFI+EKjjfr MGzBRBBdmTA8UUlZQzyRoe5qb3UkMfoqePPW5/whQwS4HFSP2bSf427mfO79vVAEywcmMG QGN4waH/p/VDBXoMqSP39DajP0RXcpSHBeU1LJsRP6293MYKJNgIboMEJqGR6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/VYNJadBhrpRffnBCEMd5gr6T3Yjh/ThdHip4sYb2I=; b=tTXKofIyp1xGqq7np4+CJArixFHJXo5pUQTTALc/WNcN1zLHnVcZZKObm7ZynHgYjMY7kG M7pTNlgBYtF2CUbTMJWiJNRBV+1+qdho66idvhD8481hSD9ORWhwy4GdxHFGz7OmeAhOTE YZb3tjqrwl/5Z8+19H9uMCbrwppJvxMBW7F+hIioTqzuFXLVRQT+QZjiL6Jkp2XrT32gQL TqaYlKiOf82mhK0i154GXQbiiijR5jvNG4S51srtT+wX3+273al5iEEX8mkZd5DtEkNXLS IBYgPzB933EYZ0Fo/ejRf/JPhTLKzU5mm5uL1cJsgEpkfX104JOy8pyaQ5cn6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmMq1pqFzdkf; Fri, 22 Sep 2023 21:57: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 38MLvRMB047754; Fri, 22 Sep 2023 21:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLvR5G047751; Fri, 22 Sep 2023 21:57:27 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:57:27 GMT Message-Id: <202309222157.38MLvR5G047751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: f5f2cc9ee688 - stable/13 - irdma(4): upgrade to 1.2.17-k List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5f2cc9ee688b0f6fc372f784ae8642de2e6ef7e Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f2cc9ee688b0f6fc372f784ae8642de2e6ef7e commit f5f2cc9ee688b0f6fc372f784ae8642de2e6ef7e Author: Bartosz Sobczak AuthorDate: 2023-07-05 14:23:06 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 21:54:37 +0000 irdma(4): upgrade to 1.2.17-k Update Intel irdma driver to version 1.2.17-k Notable changes: - pf-reset handling improvements, including fixes in communication with if_ice(4) - avoid racing when handling various events - adding sw stats sysctls - hand over pe_criterr handling from ice(4) to irdma(4) - debug prints adjustments - fix crash after changes in irdma_add_mqh_ifa_cb Additional fixes in stable/13 but not in original cherry-picked commit: - code appearance improvements - bug fixes in fbsd_kcompat.c - avoid waiting procedures under lock in irdma_add_mqh_ifa_cb - busy wait for manage_qhash - stats don't need to be RDTUN, RD is enough Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41425 (cherry picked from commit 01fbb86991d524288a785b544c29d9c5ea1b61fb) --- contrib/ofed/libirdma/abi.h | 1 - contrib/ofed/libirdma/i40e_devids.h | 1 - contrib/ofed/libirdma/i40iw_hw.h | 3 +- contrib/ofed/libirdma/ice_devids.h | 1 - contrib/ofed/libirdma/irdma-abi.h | 1 - contrib/ofed/libirdma/irdma.h | 1 - contrib/ofed/libirdma/irdma_defs.h | 26 +- contrib/ofed/libirdma/irdma_uk.c | 61 +--- contrib/ofed/libirdma/irdma_umain.c | 3 +- contrib/ofed/libirdma/irdma_umain.h | 1 - contrib/ofed/libirdma/irdma_uquery.h | 1 - contrib/ofed/libirdma/irdma_user.h | 2 - contrib/ofed/libirdma/irdma_uverbs.c | 62 +++-- contrib/ofed/libirdma/osdep.h | 80 ++---- sys/dev/irdma/fbsd_kcompat.c | 444 +++++++++++++++++++++++++---- sys/dev/irdma/fbsd_kcompat.h | 37 ++- sys/dev/irdma/icrdma.c | 310 ++++++++++++++------- sys/dev/irdma/icrdma_hw.c | 2 +- sys/dev/irdma/irdma.h | 2 +- sys/dev/irdma/irdma_cm.c | 522 ++++++++++++++++------------------- sys/dev/irdma/irdma_cm.h | 13 +- sys/dev/irdma/irdma_ctrl.c | 164 ++++------- sys/dev/irdma/irdma_defs.h | 87 +++--- sys/dev/irdma/irdma_hmc.c | 6 +- sys/dev/irdma/irdma_hmc.h | 6 +- sys/dev/irdma/irdma_hw.c | 106 +++---- sys/dev/irdma/irdma_kcompat.c | 118 ++++---- sys/dev/irdma/irdma_main.h | 14 +- sys/dev/irdma/irdma_pble.c | 16 +- sys/dev/irdma/irdma_pble.h | 4 +- sys/dev/irdma/irdma_protos.h | 6 +- sys/dev/irdma/irdma_puda.c | 9 + sys/dev/irdma/irdma_puda.h | 4 +- sys/dev/irdma/irdma_type.h | 25 +- sys/dev/irdma/irdma_uda.c | 15 +- sys/dev/irdma/irdma_uda.h | 2 +- sys/dev/irdma/irdma_uk.c | 85 +----- sys/dev/irdma/irdma_user.h | 1 - sys/dev/irdma/irdma_utils.c | 229 +++++++++++---- sys/dev/irdma/irdma_verbs.c | 438 +++++++++++++++-------------- sys/dev/irdma/irdma_verbs.h | 92 +++++- sys/dev/irdma/irdma_ws.c | 4 +- sys/dev/irdma/osdep.h | 60 ++-- sys/modules/irdma/Makefile | 2 +- 44 files changed, 1761 insertions(+), 1306 deletions(-) diff --git a/contrib/ofed/libirdma/abi.h b/contrib/ofed/libirdma/abi.h index 6553ebcbcaca..1d84fbc747f6 100644 --- a/contrib/ofed/libirdma/abi.h +++ b/contrib/ofed/libirdma/abi.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef PROVIDER_IRDMA_ABI_H #define PROVIDER_IRDMA_ABI_H diff --git a/contrib/ofed/libirdma/i40e_devids.h b/contrib/ofed/libirdma/i40e_devids.h index 1b0eaae95b82..e775a75bade5 100644 --- a/contrib/ofed/libirdma/i40e_devids.h +++ b/contrib/ofed/libirdma/i40e_devids.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef I40E_DEVIDS_H #define I40E_DEVIDS_H diff --git a/contrib/ofed/libirdma/i40iw_hw.h b/contrib/ofed/libirdma/i40iw_hw.h index d04c37d689cb..fcbfea8dfe09 100644 --- a/contrib/ofed/libirdma/i40iw_hw.h +++ b/contrib/ofed/libirdma/i40iw_hw.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2022 Intel Corporation + * Copyright (c) 2015 - 2023 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef I40IW_HW_H #define I40IW_HW_H diff --git a/contrib/ofed/libirdma/ice_devids.h b/contrib/ofed/libirdma/ice_devids.h index 57f26bc33260..57a7f2f7c2af 100644 --- a/contrib/ofed/libirdma/ice_devids.h +++ b/contrib/ofed/libirdma/ice_devids.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef ICE_DEVIDS_H #define ICE_DEVIDS_H diff --git a/contrib/ofed/libirdma/irdma-abi.h b/contrib/ofed/libirdma/irdma-abi.h index b7d4b61c162d..8c04dcce2e8b 100644 --- a/contrib/ofed/libirdma/irdma-abi.h +++ b/contrib/ofed/libirdma/irdma-abi.h @@ -35,7 +35,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_ABI_H #define IRDMA_ABI_H diff --git a/contrib/ofed/libirdma/irdma.h b/contrib/ofed/libirdma/irdma.h index 1dd09c36c7ea..0e2a5189acd1 100644 --- a/contrib/ofed/libirdma/irdma.h +++ b/contrib/ofed/libirdma/irdma.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_H #define IRDMA_H diff --git a/contrib/ofed/libirdma/irdma_defs.h b/contrib/ofed/libirdma/irdma_defs.h index 3d8b59c4b78e..da9eea472568 100644 --- a/contrib/ofed/libirdma/irdma_defs.h +++ b/contrib/ofed/libirdma/irdma_defs.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2022 Intel Corporation + * Copyright (c) 2015 - 2023 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_DEFS_H #define IRDMA_DEFS_H @@ -312,7 +311,7 @@ #define IRDMA_GET_CQ_ELEM_AT_OFFSET(_cq, _i, _cqe) \ { \ - register __u32 offset; \ + __u32 offset; \ offset = IRDMA_GET_RING_OFFSET((_cq)->cq_ring, _i); \ (_cqe) = (_cq)->cq_base[offset].buf; \ } @@ -338,7 +337,7 @@ #define IRDMA_RING_MOVE_HEAD(_ring, _retcode) \ { \ - register u32 size; \ + u32 size; \ size = (_ring).size; \ if (!IRDMA_RING_FULL_ERR(_ring)) { \ (_ring).head = ((_ring).head + 1) % size; \ @@ -349,7 +348,7 @@ } #define IRDMA_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \ { \ - register u32 size; \ + u32 size; \ size = (_ring).size; \ if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < size) { \ (_ring).head = ((_ring).head + (_count)) % size; \ @@ -360,7 +359,7 @@ } #define IRDMA_SQ_RING_MOVE_HEAD(_ring, _retcode) \ { \ - register u32 size; \ + u32 size; \ size = (_ring).size; \ if (!IRDMA_SQ_RING_FULL_ERR(_ring)) { \ (_ring).head = ((_ring).head + 1) % size; \ @@ -371,7 +370,7 @@ } #define IRDMA_SQ_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \ { \ - register u32 size; \ + u32 size; \ size = (_ring).size; \ if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < (size - 256)) { \ (_ring).head = ((_ring).head + (_count)) % size; \ @@ -457,6 +456,19 @@ enum irdma_qp_wqe_size { IRDMA_WQE_SIZE_256 = 256, }; +enum irdma_ws_op_type { + IRDMA_WS_OP_TYPE_NODE = 0, + IRDMA_WS_OP_TYPE_LEAF_NODE_GROUP, +}; + +enum irdma_ws_rate_limit_flags { + IRDMA_WS_RATE_LIMIT_FLAGS_VALID = 0x1, + IRDMA_WS_NO_RDMA_RATE_LIMIT = 0x2, + IRDMA_WS_LEAF_NODE_IS_PART_GROUP = 0x4, + IRDMA_WS_TREE_RATE_LIMITING = 0x8, + IRDMA_WS_PACING_CONTROL = 0x10, +}; + /** * set_64bit_val - set 64 bit value to hw wqe * @wqe_words: wqe addr to write diff --git a/contrib/ofed/libirdma/irdma_uk.c b/contrib/ofed/libirdma/irdma_uk.c index 97e3ac553c26..5fa9d792745f 100644 --- a/contrib/ofed/libirdma/irdma_uk.c +++ b/contrib/ofed/libirdma/irdma_uk.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2015 - 2022 Intel Corporation + * Copyright (c) 2015 - 2023 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #include "osdep.h" #include "irdma_defs.h" @@ -275,7 +274,8 @@ irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx, if (qp->uk_attrs->hw_rev == IRDMA_GEN_1 && wqe_quanta == 1 && (IRDMA_RING_CURRENT_HEAD(qp->sq_ring) & 1)) { wqe_0 = qp->sq_base[IRDMA_RING_CURRENT_HEAD(qp->sq_ring)].elem; - wqe_0[3] = htole64(FIELD_PREP(IRDMAQPSQ_VALID, !qp->swqe_polarity)); + wqe_0[3] = htole64(FIELD_PREP(IRDMAQPSQ_VALID, + qp->swqe_polarity ? 0 : 1)); } qp->sq_wrtrk_array[*wqe_idx].wrid = info->wr_id; qp->sq_wrtrk_array[*wqe_idx].wr_len = total_size; @@ -683,8 +683,8 @@ irdma_set_mw_bind_wqe(__le64 * wqe, * @polarity: polarity of wqe valid bit */ static void -irdma_copy_inline_data(u8 *wqe, struct irdma_sge *sge_list, u32 num_sges, - u8 polarity) +irdma_copy_inline_data(u8 *wqe, struct irdma_sge *sge_list, + u32 num_sges, u8 polarity) { u8 inline_valid = polarity << IRDMA_INLINE_VALID_S; u32 quanta_bytes_remaining = 8; @@ -1173,7 +1173,7 @@ irdma_repost_rq_wqes(struct irdma_qp_uk *qp, u32 start_idx, u32 end_idx) { __le64 *dst_wqe, *src_wqe; - u32 wqe_idx; + u32 wqe_idx = 0; u8 wqe_quanta = qp->rq_wqe_size_multiplier; bool flip_polarity; u64 val; @@ -1480,7 +1480,8 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, sw_wqe = qp->sq_base[tail].elem; get_64bit_val(sw_wqe, IRDMA_BYTE_24, &wqe_qword); - info->op_type = (u8)FIELD_GET(IRDMAQPSQ_OPCODE, wqe_qword); + info->op_type = (u8)FIELD_GET(IRDMAQPSQ_OPCODE, + wqe_qword); IRDMA_RING_SET_TAIL(qp->sq_ring, tail + qp->sq_wrtrk_array[tail].quanta); if (info->op_type != IRDMAQP_OP_NOP) { @@ -1690,6 +1691,7 @@ irdma_uk_calc_depth_shift_sq(struct irdma_qp_uk_init_info *ukinfo, { bool imm_support = ukinfo->uk_attrs->hw_rev >= IRDMA_GEN_2 ? true : false; int status; + irdma_get_wqe_shift(ukinfo->uk_attrs, imm_support ? ukinfo->max_sq_frag_cnt + 1 : ukinfo->max_sq_frag_cnt, @@ -1834,6 +1836,9 @@ irdma_uk_clean_cq(void *q, struct irdma_cq_uk *cq) if (polarity != temp) break; + /* Ensure CQE contents are read after valid bit is checked */ + udma_from_device_barrier(); + get_64bit_val(cqe, IRDMA_BYTE_8, &comp_ctx); if ((void *)(irdma_uintptr) comp_ctx == q) set_64bit_val(cqe, IRDMA_BYTE_8, 0); @@ -1845,48 +1850,6 @@ irdma_uk_clean_cq(void *q, struct irdma_cq_uk *cq) return 0; } -/** - * irdma_nop - post a nop - * @qp: hw qp ptr - * @wr_id: work request id - * @signaled: signaled for completion - * @post_sq: ring doorbell - */ -int -irdma_nop(struct irdma_qp_uk *qp, u64 wr_id, bool signaled, bool post_sq) -{ - __le64 *wqe; - u64 hdr; - u32 wqe_idx; - struct irdma_post_sq_info info = {0}; - u16 quanta = IRDMA_QP_WQE_MIN_QUANTA; - - info.push_wqe = qp->push_db ? true : false; - info.wr_id = wr_id; - wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, &quanta, 0, &info); - if (!wqe) - return ENOSPC; - - set_64bit_val(wqe, IRDMA_BYTE_0, 0); - set_64bit_val(wqe, IRDMA_BYTE_8, 0); - set_64bit_val(wqe, IRDMA_BYTE_16, 0); - - hdr = FIELD_PREP(IRDMAQPSQ_OPCODE, IRDMAQP_OP_NOP) | - FIELD_PREP(IRDMAQPSQ_SIGCOMPL, signaled) | - FIELD_PREP(IRDMAQPSQ_VALID, qp->swqe_polarity); - - udma_to_device_barrier(); /* make sure WQE is populated before valid bit is set */ - - set_64bit_val(wqe, IRDMA_BYTE_24, hdr); - - if (info.push_wqe) - irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); - else if (post_sq) - irdma_uk_qp_post_wr(qp); - - return 0; -} - /** * irdma_fragcnt_to_quanta_sq - calculate quanta based on fragment count for SQ * @frag_cnt: number of fragments diff --git a/contrib/ofed/libirdma/irdma_umain.c b/contrib/ofed/libirdma/irdma_umain.c index 6c823646b375..2902dd963e18 100644 --- a/contrib/ofed/libirdma/irdma_umain.c +++ b/contrib/ofed/libirdma/irdma_umain.c @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #include @@ -49,7 +48,7 @@ /** * Driver version */ -char libirdma_version[] = "1.1.11-k"; +char libirdma_version[] = "1.2.17-k"; unsigned int irdma_dbg; diff --git a/contrib/ofed/libirdma/irdma_umain.h b/contrib/ofed/libirdma/irdma_umain.h index c67c5d7076f9..312310dcb754 100644 --- a/contrib/ofed/libirdma/irdma_umain.h +++ b/contrib/ofed/libirdma/irdma_umain.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_UMAIN_H #define IRDMA_UMAIN_H diff --git a/contrib/ofed/libirdma/irdma_uquery.h b/contrib/ofed/libirdma/irdma_uquery.h index cf56818e4d51..4660c05f0a91 100644 --- a/contrib/ofed/libirdma/irdma_uquery.h +++ b/contrib/ofed/libirdma/irdma_uquery.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_UQUERY_H diff --git a/contrib/ofed/libirdma/irdma_user.h b/contrib/ofed/libirdma/irdma_user.h index 8eb9ae7990e7..0f0aa30bec91 100644 --- a/contrib/ofed/libirdma/irdma_user.h +++ b/contrib/ofed/libirdma/irdma_user.h @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef IRDMA_USER_H #define IRDMA_USER_H @@ -572,7 +571,6 @@ void irdma_get_wqe_shift(struct irdma_uk_attrs *uk_attrs, u32 sge, u32 inline_data, u8 *shift); int irdma_get_sqdepth(struct irdma_uk_attrs *uk_attrs, u32 sq_size, u8 shift, u32 *sqdepth); int irdma_get_rqdepth(struct irdma_uk_attrs *uk_attrs, u32 rq_size, u8 shift, u32 *rqdepth); -int irdma_get_srqdepth(struct irdma_uk_attrs *uk_attrs, u32 srq_size, u8 shift, u32 *srqdepth); void irdma_qp_push_wqe(struct irdma_qp_uk *qp, __le64 *wqe, u16 quanta, u32 wqe_idx, bool post_sq); void irdma_clr_wqes(struct irdma_qp_uk *qp, u32 qp_wqe_idx); diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c index 14efab96a107..50fd2f23476d 100644 --- a/contrib/ofed/libirdma/irdma_uverbs.c +++ b/contrib/ofed/libirdma/irdma_uverbs.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (C) 2019 - 2022 Intel Corporation + * Copyright (C) 2019 - 2023 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #include #include @@ -266,11 +265,13 @@ irdma_ualloc_mw(struct ibv_pd *pd, enum ibv_mw_type type) if (!mw) return NULL; - if (ibv_cmd_alloc_mw(pd, type, mw, &cmd, sizeof(cmd), &resp, - sizeof(resp))) { + err = ibv_cmd_alloc_mw(pd, type, mw, &cmd, sizeof(cmd), &resp, + sizeof(resp)); + if (err) { printf("%s: Failed to alloc memory window\n", __func__); free(mw); + errno = err; return NULL; } @@ -446,8 +447,10 @@ ucreate_cq(struct ibv_context *context, if (!iwucq) return NULL; - if (pthread_spin_init(&iwucq->lock, PTHREAD_PROCESS_PRIVATE)) { + ret = pthread_spin_init(&iwucq->lock, PTHREAD_PROCESS_PRIVATE); + if (ret) { free(iwucq); + errno = ret; return NULL; } @@ -464,8 +467,10 @@ ucreate_cq(struct ibv_context *context, iwucq->buf_size = total_size; info.cq_base = irdma_alloc_hw_buf(total_size); - if (!info.cq_base) + if (!info.cq_base) { + ret = ENOMEM; goto err_cq_base; + } memset(info.cq_base, 0, total_size); reg_mr_cmd.reg_type = IRDMA_MEMREG_TYPE_CQ; @@ -476,17 +481,17 @@ ucreate_cq(struct ibv_context *context, IBV_ACCESS_LOCAL_WRITE, &iwucq->vmr.ibv_mr, ®_mr_cmd.ibv_cmd, sizeof(reg_mr_cmd), ®_mr_resp, sizeof(reg_mr_resp)); - if (ret) { - errno = ret; + if (ret) goto err_dereg_mr; - } iwucq->vmr.ibv_mr.pd = &iwvctx->iwupd->ibv_pd; if (uk_attrs->feature_flags & IRDMA_FEATURE_CQ_RESIZE) { info.shadow_area = irdma_alloc_hw_buf(IRDMA_DB_SHADOW_AREA_SIZE); - if (!info.shadow_area) + if (!info.shadow_area) { + ret = ENOMEM; goto err_alloc_shadow; + } memset(info.shadow_area, 0, IRDMA_DB_SHADOW_AREA_SIZE); reg_mr_shadow_cmd.reg_type = IRDMA_MEMREG_TYPE_CQ; @@ -499,7 +504,6 @@ ucreate_cq(struct ibv_context *context, ®_mr_shadow_resp, sizeof(reg_mr_shadow_resp)); if (ret) { irdma_free_hw_buf(info.shadow_area, IRDMA_DB_SHADOW_AREA_SIZE); - errno = ret; goto err_alloc_shadow; } @@ -517,10 +521,8 @@ ucreate_cq(struct ibv_context *context, &cmd.ibv_cmd, sizeof(cmd.ibv_cmd), sizeof(cmd), &resp.ibv_resp, sizeof(resp.ibv_resp), sizeof(resp)); attr_ex->cqe = ncqe; - if (ret) { - errno = ret; + if (ret) goto err_create_cq; - } if (ext_cq) irdma_ibvcq_ex_fill_priv_funcs(iwucq, attr_ex); @@ -548,6 +550,7 @@ err_cq_base: free(iwucq); + errno = ret; return NULL; } @@ -1560,7 +1563,8 @@ irdma_ucreate_qp(struct ibv_pd *pd, memset(iwuqp, 0, sizeof(*iwuqp)); - if (pthread_spin_init(&iwuqp->lock, PTHREAD_PROCESS_PRIVATE)) + status = pthread_spin_init(&iwuqp->lock, PTHREAD_PROCESS_PRIVATE); + if (status) goto err_free_qp; info.sq_size = info.sq_depth >> info.sq_shift; @@ -1575,35 +1579,37 @@ irdma_ucreate_qp(struct ibv_pd *pd, } iwuqp->recv_sges = calloc(attr->cap.max_recv_sge, sizeof(*iwuqp->recv_sges)); - if (!iwuqp->recv_sges) + if (!iwuqp->recv_sges) { + status = errno; /* preserve errno */ goto err_destroy_lock; + } info.wqe_alloc_db = (u32 *)iwvctx->db; info.legacy_mode = iwvctx->legacy_mode; info.sq_wrtrk_array = calloc(info.sq_depth, sizeof(*info.sq_wrtrk_array)); - if (!info.sq_wrtrk_array) + if (!info.sq_wrtrk_array) { + status = errno; /* preserve errno */ goto err_free_rsges; + } info.rq_wrid_array = calloc(info.rq_depth, sizeof(*info.rq_wrid_array)); - if (!info.rq_wrid_array) + if (!info.rq_wrid_array) { + status = errno; /* preserve errno */ goto err_free_sq_wrtrk; + } iwuqp->sq_sig_all = attr->sq_sig_all; iwuqp->qp_type = attr->qp_type; status = irdma_vmapped_qp(iwuqp, pd, attr, &info, iwvctx->legacy_mode); - if (status) { - errno = status; + if (status) goto err_free_rq_wrid; - } iwuqp->qp.back_qp = iwuqp; iwuqp->qp.lock = &iwuqp->lock; status = irdma_uk_qp_init(&iwuqp->qp, &info); - if (status) { - errno = status; + if (status) goto err_free_vmap_qp; - } attr->cap.max_send_wr = (info.sq_depth - IRDMA_SQ_RSVD) >> info.sq_shift; attr->cap.max_recv_wr = (info.rq_depth - IRDMA_RQ_RSVD) >> info.rq_shift; @@ -1625,6 +1631,7 @@ err_free_qp: printf("%s: failed to create QP\n", __func__); free(iwuqp); + errno = status; return NULL; } @@ -2081,11 +2088,10 @@ irdma_ucreate_ah(struct ibv_pd *ibpd, struct ibv_ah_attr *attr) struct irdma_ucreate_ah_resp resp = {}; int err; - err = ibv_query_gid(ibpd->context, attr->port_num, attr->grh.sgid_index, - &sgid); - if (err) { + if (ibv_query_gid(ibpd->context, attr->port_num, attr->grh.sgid_index, + &sgid)) { fprintf(stderr, "irdma: Error from ibv_query_gid.\n"); - errno = err; + errno = ENOENT; return NULL; } diff --git a/contrib/ofed/libirdma/osdep.h b/contrib/ofed/libirdma/osdep.h index fc39c139b6ca..961e9cc99cf6 100644 --- a/contrib/ofed/libirdma/osdep.h +++ b/contrib/ofed/libirdma/osdep.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB * - * Copyright (c) 2021 - 2022 Intel Corporation + * Copyright (c) 2021 - 2023 Intel Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -31,7 +31,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/*$FreeBSD$*/ #ifndef _ICRDMA_OSDEP_H_ #define _ICRDMA_OSDEP_H_ @@ -46,7 +45,6 @@ #include #include -#define ATOMIC atomic_t #define IOMEM #define IRDMA_NTOHL(a) ntohl(a) #define IRDMA_NTOHS(a) ntohs(a) @@ -80,23 +78,13 @@ #define STATS_TIMER_DELAY 60000 /* a couple of linux size defines */ -#define SZ_128 128 -#define SZ_2K SZ_128 * 16 -#define SZ_1G (SZ_1K * SZ_1K * SZ_1K) -#define SPEED_1000 1000 -#define SPEED_10000 10000 -#define SPEED_20000 20000 -#define SPEED_25000 25000 -#define SPEED_40000 40000 -#define SPEED_100000 100000 - #define BIT_ULL(a) (1ULL << (a)) #define min(a, b) ((a) > (b) ? (b) : (a)) #ifndef likely -#define likely(x) __builtin_expect((x), 1) +#define likely(x) __builtin_expect((x), 1) #endif #ifndef unlikely -#define unlikely(x) __builtin_expect((x), 0) +#define unlikely(x) __builtin_expect((x), 0) #endif #define __aligned_u64 uint64_t __aligned(8) @@ -110,7 +98,7 @@ #define irdma_print(S, ...) printf("%s:%d "S, __FUNCTION__, __LINE__, ##__VA_ARGS__) #define irdma_debug_buf(dev, mask, desc, buf, size) \ do { \ - u32 i; \ + u32 i; \ if (!((mask) & (dev)->debug_mask)) { \ break; \ } \ @@ -120,20 +108,20 @@ do { \ irdma_debug(dev, mask, "index %03d val: %016lx\n", i, ((unsigned long *)(buf))[i / 8]); \ } while(0) -#define irdma_debug(h, m, s, ...) \ -do { \ - if (!(h)) { \ - if ((m) == IRDMA_DEBUG_INIT) \ +#define irdma_debug(h, m, s, ...) \ +do { \ + if (!(h)) { \ + if ((m) == IRDMA_DEBUG_INIT) \ printf("irdma INIT " s, ##__VA_ARGS__); \ - } else if (((m) & (h)->debug_mask)) { \ - printf("irdma " s, ##__VA_ARGS__); \ - } \ + } else if (((m) & (h)->debug_mask)) { \ + printf("irdma " s, ##__VA_ARGS__); \ + } \ } while (0) extern unsigned int irdma_dbg; -#define libirdma_debug(fmt, args...) \ -do { \ - if (irdma_dbg) \ - printf("libirdma-%s: " fmt, __func__, ##args); \ +#define libirdma_debug(fmt, args...) \ +do { \ + if (irdma_dbg) \ + printf("libirdma-%s: " fmt, __func__, ##args); \ } while (0) #define irdma_dev_err(ibdev, fmt, ...) \ pr_err("%s:%s:%d ERR "fmt, (ibdev)->name, __func__, __LINE__, ##__VA_ARGS__) @@ -142,18 +130,6 @@ do { \ #define irdma_dev_info(a, b, ...) printf(b, ##__VA_ARGS__) #define irdma_pr_warn printf -#define dump_struct(s, sz, name) \ -do { \ - unsigned char *a; \ - printf("%s %u", (name), (unsigned int)(sz)); \ - for (a = (unsigned char*)(s); a < (unsigned char *)(s) + (sz) ; a ++) { \ - if ((u64)a % 8 == 0) \ - printf("\n%p ", a); \ - printf("%2x ", *a); \ - } \ - printf("\n"); \ -}while(0) - /* * debug definition end */ @@ -177,13 +153,11 @@ struct irdma_sc_vsi; #define rt_tos2priority(tos) (tos >> 5) #define ah_attr_to_dmac(attr) ((attr).dmac) -#define kc_ib_modify_qp_is_ok(cur_state, next_state, type, mask, ll) \ - ib_modify_qp_is_ok(cur_state, next_state, type, mask) #define kc_typeq_ib_wr const #define kc_ifp_find ip_ifp_find #define kc_ifp6_find ip6_ifp_find #define kc_rdma_gid_attr_network_type(sgid_attr, gid_type, gid) \ - ib_gid_to_network_type(gid_type, gid) + ib_gid_to_network_type(gid_type, gid) #define irdma_del_timer_compat(tt) del_timer((tt)) #define IRDMA_TAILQ_FOREACH CK_STAILQ_FOREACH #define IRDMA_TAILQ_FOREACH_SAFE CK_STAILQ_FOREACH_SAFE @@ -191,36 +165,36 @@ struct irdma_sc_vsi; static inline void db_wr32(__u32 val, __u32 *wqe_word) { - *wqe_word = val; + *wqe_word = val; } void *hw_to_dev(struct irdma_hw *hw); struct irdma_dma_mem { - void *va; - u64 pa; + void *va; + u64 pa; bus_dma_tag_t tag; bus_dmamap_t map; bus_dma_segment_t seg; bus_size_t size; - int nseg; - int flags; + int nseg; + int flags; }; struct irdma_virt_mem { - void *va; - u32 size; + void *va; + u32 size; }; #ifndef verbs_mr enum ibv_mr_type { - IBV_MR_TYPE_MR, - IBV_MR_TYPE_NULL_MR, + IBV_MR_TYPE_MR, + IBV_MR_TYPE_NULL_MR, }; struct verbs_mr { - struct ibv_mr ibv_mr; - enum ibv_mr_type mr_type; + struct ibv_mr ibv_mr; + enum ibv_mr_type mr_type; int access; }; #define verbs_get_mr(mr) container_of((mr), struct verbs_mr, ibv_mr) diff --git a/sys/dev/irdma/fbsd_kcompat.c b/sys/dev/irdma/fbsd_kcompat.c index 4928b4189cca..5c11f7a35544 100644 --- a/sys/dev/irdma/fbsd_kcompat.c +++ b/sys/dev/irdma/fbsd_kcompat.c @@ -182,6 +182,31 @@ irdma_ieq_check_mpacrc(void *desc, return ret_code; } +static u_int +irdma_add_ipv6_cb(void *arg, struct ifaddr *addr, u_int count __unused){ + struct irdma_device *iwdev = arg; + struct sockaddr_in6 *sin6; + u32 local_ipaddr6[4] = {}; + char ip6buf[INET6_ADDRSTRLEN]; + u8 *mac_addr; + + sin6 = (struct sockaddr_in6 *)addr->ifa_addr; + + irdma_copy_ip_ntohl(local_ipaddr6, (u32 *)&sin6->sin6_addr); + + mac_addr = if_getlladdr(addr->ifa_ifp); + + printf("%s:%d IP=%s, MAC=%02x:%02x:%02x:%02x:%02x:%02x\n", + __func__, __LINE__, + ip6_sprintf(ip6buf, &sin6->sin6_addr), + mac_addr[0], mac_addr[1], mac_addr[2], + mac_addr[3], mac_addr[4], mac_addr[5]); + + irdma_manage_arp_cache(iwdev->rf, mac_addr, local_ipaddr6, + IRDMA_ARP_ADD); + return (0); +} + /** * irdma_add_ipv6_addr - add ipv6 address to the hw arp table * @iwdev: irdma device @@ -190,32 +215,36 @@ irdma_ieq_check_mpacrc(void *desc, static void irdma_add_ipv6_addr(struct irdma_device *iwdev, struct ifnet *ifp) { - struct ifaddr *ifa, *tmp; - struct sockaddr_in6 *sin6; - u32 local_ipaddr6[4]; - u8 *mac_addr; - char ip6buf[INET6_ADDRSTRLEN]; - if_addr_rlock(ifp); - IRDMA_TAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, tmp) { - sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; - if (sin6->sin6_family != AF_INET6) - continue; + if_foreach_addr_type(ifp, AF_INET6, irdma_add_ipv6_cb, iwdev); + if_addr_runlock(ifp); +} - irdma_copy_ip_ntohl(local_ipaddr6, (u32 *)&sin6->sin6_addr); - mac_addr = IF_LLADDR(ifp); +static u_int +irdma_add_ipv4_cb(void *arg, struct ifaddr *addr, u_int count __unused){ + struct irdma_device *iwdev = arg; + struct sockaddr_in *sin; + u32 ip_addr[4] = {}; + uint8_t *mac_addr; - printf("%s:%d IP=%s, MAC=%02x:%02x:%02x:%02x:%02x:%02x\n", - __func__, __LINE__, - ip6_sprintf(ip6buf, &sin6->sin6_addr), - mac_addr[0], mac_addr[1], mac_addr[2], - mac_addr[3], mac_addr[4], mac_addr[5]); + sin = (struct sockaddr_in *)addr->ifa_addr; - irdma_manage_arp_cache(iwdev->rf, mac_addr, local_ipaddr6, - IRDMA_ARP_ADD); + ip_addr[0] = ntohl(sin->sin_addr.s_addr); - } - if_addr_runlock(ifp); + mac_addr = if_getlladdr(addr->ifa_ifp); + + printf("%s:%d IP=%d.%d.%d.%d, MAC=%02x:%02x:%02x:%02x:%02x:%02x\n", + __func__, __LINE__, + ip_addr[0] >> 24, + (ip_addr[0] >> 16) & 0xFF, + (ip_addr[0] >> 8) & 0xFF, + ip_addr[0] & 0xFF, + mac_addr[0], mac_addr[1], mac_addr[2], + mac_addr[3], mac_addr[4], mac_addr[5]); + + irdma_manage_arp_cache(iwdev->rf, mac_addr, ip_addr, + IRDMA_ARP_ADD); + return (0); } /** @@ -226,32 +255,8 @@ irdma_add_ipv6_addr(struct irdma_device *iwdev, struct ifnet *ifp) static void irdma_add_ipv4_addr(struct irdma_device *iwdev, struct ifnet *ifp) { - struct ifaddr *ifa; - struct sockaddr_in *sin; - u32 ip_addr[4] = {}; - u8 *mac_addr; - if_addr_rlock(ifp); - IRDMA_TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - sin = (struct sockaddr_in *)ifa->ifa_addr; - if (sin->sin_family != AF_INET) - continue; - - ip_addr[0] = ntohl(sin->sin_addr.s_addr); - mac_addr = IF_LLADDR(ifp); - - printf("%s:%d IP=%d.%d.%d.%d, MAC=%02x:%02x:%02x:%02x:%02x:%02x\n", - __func__, __LINE__, - ip_addr[0] >> 24, - (ip_addr[0] >> 16) & 0xFF, - (ip_addr[0] >> 8) & 0xFF, - ip_addr[0] & 0xFF, - mac_addr[0], mac_addr[1], mac_addr[2], - mac_addr[3], mac_addr[4], mac_addr[5]); - - irdma_manage_arp_cache(iwdev->rf, mac_addr, ip_addr, - IRDMA_ARP_ADD); - } + if_foreach_addr_type(ifp, AF_INET, irdma_add_ipv4_cb, iwdev); if_addr_runlock(ifp); } @@ -266,12 +271,15 @@ irdma_add_ip(struct irdma_device *iwdev) { struct ifnet *ifp = iwdev->netdev; struct ifnet *ifv; + struct epoch_tracker et; int i; irdma_add_ipv4_addr(iwdev, ifp); irdma_add_ipv6_addr(iwdev, ifp); - for (i = 0; ifp->if_vlantrunk != NULL && i < VLAN_N_VID; ++i) { + for (i = 0; if_getvlantrunk(ifp) != NULL && i < VLAN_N_VID; ++i) { + NET_EPOCH_ENTER(et); ifv = VLAN_DEVAT(ifp, i); + NET_EPOCH_EXIT(et); if (!ifv) continue; irdma_add_ipv4_addr(iwdev, ifv); @@ -292,7 +300,7 @@ irdma_ifaddrevent_handler(void *arg, struct ifnet *ifp, struct ifaddr *ifa, int if (!ifa || !ifa->ifa_addr || !ifp) return; if (rf->iwdev->netdev != ifp) { - for (i = 0; rf->iwdev->netdev->if_vlantrunk != NULL && i < VLAN_N_VID; ++i) { + for (i = 0; if_getvlantrunk(rf->iwdev->netdev) != NULL && i < VLAN_N_VID; ++i) { NET_EPOCH_ENTER(et); ifv = VLAN_DEVAT(rf->iwdev->netdev, i); NET_EPOCH_EXIT(et); @@ -354,7 +362,8 @@ irdma_get_route_ifp(struct sockaddr *dst_sin, struct ifnet *netdev, struct nhop_object *nh; if (dst_sin->sa_family == AF_INET6) - nh = fib6_lookup(RT_DEFAULT_FIB, &((struct sockaddr_in6 *)dst_sin)->sin6_addr, 0, NHR_NONE, 0); + nh = fib6_lookup(RT_DEFAULT_FIB, &((struct sockaddr_in6 *)dst_sin)->sin6_addr, + ((struct sockaddr_in6 *)dst_sin)->sin6_scope_id, NHR_NONE, 0); else nh = fib4_lookup(RT_DEFAULT_FIB, ((struct sockaddr_in *)dst_sin)->sin_addr, 0, NHR_NONE, 0); if (!nh || (nh->nh_ifp != netdev && @@ -466,7 +475,7 @@ irdma_addr_resolve_neigh_ipv6(struct irdma_cm_node *cm_node, dst_addr.sin6_family = AF_INET6; dst_addr.sin6_len = sizeof(dst_addr); - dst_addr.sin6_scope_id = iwdev->netdev->if_index; + dst_addr.sin6_scope_id = if_getindex(iwdev->netdev); irdma_copy_ip_htonl(dst_addr.sin6_addr.__u6_addr.__u6_addr32, dest); err = irdma_get_dst_mac(cm_node, (struct sockaddr *)&dst_addr, dst_mac); *** 5195 LINES SKIPPED *** From nobody Fri Sep 22 21: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 4RsmMr5H1sz4tVDd; Fri, 22 Sep 2023 21: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 4RsmMr3KM3z3THS; Fri, 22 Sep 2023 21: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=1695419848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c13p2FSSICbr51yeBkcCfCu4KTbFuz2WwUkyIjRuKFw=; b=iFbli1RHbJaOq6edH//eN0X7gJp6dKPQGyDF/hbGSY7isF5I0Gd37GQynx0eG6nXRId3rr DwV2+rSYIMpXok6yDsTWVBGQpa/za2k2DiC4HF+TA6xDNo154qGAQ0t81tDFSkA1Qc/tRu 44Vm73xwk/L3nwQ2PB7hU53M9CAZLXfOK6x6PGOAeQ2P71rcX6KMAcyvCMWFkqIDuoSANa lYZSsa8Kme6yhGuXAfojMCw1jMRoavjqbLREYfvGbRVzKLf+itzXCqCdlN9uYdNRYYOMAi F3+dWbFMuyt5IC0N16r2s9r0LdaemrLs3bjsb8vyJXNWbSENMIM2unhxYh9TpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419848; a=rsa-sha256; cv=none; b=KKdbIzBlDum2JNytNK61rhBPIg0iucOzakPI7Y8H8zCpU6pryoROjT51bvWS/PjV9oWTXd dBqqujP0Db2LWNS4jwD0EP21oMYecH7Y50IrMGYUO6RfGpIW9UQClg/ZuRSNYI5nP08Kiu 6GzyLrvWpfc7qmJzndfVvQAVSmgtj01XHM42+zz+mmD5VO5+8qj05E6qkKObT+q5Q5uR2X PCs6Cjz3TEtyovkunM0ElyswVzW9wdCBH9vt2WEkED7ZyOWA7Yh9gD+BERb//dndHBYYCV XqUXPkdwf2TbuDvvxELCtiDIie0VjMrWJX55cl5MiPTfOMEsSxlBO1sVayupaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c13p2FSSICbr51yeBkcCfCu4KTbFuz2WwUkyIjRuKFw=; b=pE0dvDNyHG6UX3Yjq7ktzTBViCOA6RndEwq0YK+XsWEV88fdAqJfIUsZ0UvIoYv0r3dRiA tbY6xsbKkrBr1aN22DCdl0bUyksk6QWtOKt5GLzb6xOnHK1qx0FtNMVQ56Uk9JtGl+UA49 HCUUR3rRVpMACyZKtCJFOrFuUImnGPKZ8m1MRMICVcJ+k78oU1Y4KRO6qIkXiXPnAQNsgn hBubG08k9u9PdpFWhMKKygaDOFxy9aHKtRJmqVcFIAGHMA3s/d7plyzK5dy/3eiToHIMHT mUVvTt86GPQ1wtYD/3xQXjhELzN3kC8fiE1V2YsjUghm5Pbdu707ZTC+aAW3Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmMr2QPnzf1c; Fri, 22 Sep 2023 21: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 38MLvSk5047804; Fri, 22 Sep 2023 21: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 38MLvS2C047801; Fri, 22 Sep 2023 21:57:28 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:57:28 GMT Message-Id: <202309222157.38MLvS2C047801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 1002fd41e1b9 - stable/13 - ice(4): Match irdma interface changes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1002fd41e1b91d1acc8df9a2b06a4e163721e5e8 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=1002fd41e1b91d1acc8df9a2b06a4e163721e5e8 commit 1002fd41e1b91d1acc8df9a2b06a4e163721e5e8 Author: Bartosz Sobczak AuthorDate: 2023-07-24 15:46:31 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 21:55:02 +0000 ice(4): Match irdma interface changes (This is a direct commit to stable/13) Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Sponsored by: Intel Corporation --- sys/dev/ice/ice_rdma.c | 59 +++++++++++++++++++++++++++++++++++++---- sys/dev/ice/ice_rdma.h | 11 ++++---- sys/dev/ice/ice_rdma_internal.h | 2 ++ sys/dev/ice/if_ice_iflib.c | 15 +++++------ sys/dev/irdma/icrdma.c | 4 --- 5 files changed, 69 insertions(+), 22 deletions(-) diff --git a/sys/dev/ice/ice_rdma.c b/sys/dev/ice/ice_rdma.c index 8443cab1e98e..411bfb41dcec 100644 --- a/sys/dev/ice/ice_rdma.c +++ b/sys/dev/ice/ice_rdma.c @@ -121,11 +121,10 @@ ice_rdma_pf_reset(struct ice_rdma_peer *peer) { struct ice_softc *sc = ice_rdma_peer_to_sc(peer); - /* - * Request that the driver re-initialize by bringing the interface - * down and up. - */ - ice_request_stack_reinit(sc); + /* Tell the base driver that RDMA is requesting a PFR */ + ice_set_state(&sc->state, ICE_STATE_RESET_PFR_REQ); + + /* XXX: Base driver will notify RDMA when it's done */ return (0); } @@ -331,6 +330,7 @@ ice_rdma_request_handler(struct ice_rdma_peer *peer, switch(req->type) { case ICE_RDMA_EVENT_RESET: + ice_rdma_pf_reset(peer); break; case ICE_RDMA_EVENT_QSET_REGISTER: ice_rdma_qset_register_request(peer, &req->res); @@ -865,3 +865,52 @@ ice_rdma_dcb_qos_update(struct ice_softc *sc, struct ice_port_info *pi) IRDMA_EVENT_HANDLER(peer, &event); sx_xunlock(&ice_rdma.mtx); } + +/** + * ice_rdma_notify_pe_intr - notify irdma on incoming interrupts regarding PE + * @sc: the ice driver softc + * @oicr: interrupt cause + * + * Pass the information about received interrupt to RDMA driver if it was + * relating to PE. Specifically PE_CRITERR and HMC_ERR. + * The irdma driver shall decide what should be done upon these interrupts. + */ +void +ice_rdma_notify_pe_intr(struct ice_softc *sc, uint32_t oicr) +{ + struct ice_rdma_peer *peer = &sc->rdma_entry.peer; + struct ice_rdma_event event; + + memset(&event, 0, sizeof(struct ice_rdma_event)); + event.type = ICE_RDMA_EVENT_CRIT_ERR; + event.oicr_reg = oicr; + + sx_xlock(&ice_rdma.mtx); + if (sc->rdma_entry.attached && ice_rdma.registered) + IRDMA_EVENT_HANDLER(peer, &event); + sx_xunlock(&ice_rdma.mtx); +} + +/** + * ice_rdma_notify_reset - notify irdma on incoming pf-reset + * @sc: the ice driver softc + * + * Inform irdma driver of an incoming PF reset. + * The irdma driver shall set its state to reset, and avoid using CQP + * anymore. Next step should be to call ice_rdma_pf_stop in order to + * remove resources. + */ +void +ice_rdma_notify_reset(struct ice_softc *sc) +{ + struct ice_rdma_peer *peer = &sc->rdma_entry.peer; + struct ice_rdma_event event; + + memset(&event, 0, sizeof(struct ice_rdma_event)); + event.type = ICE_RDMA_EVENT_RESET; + + sx_xlock(&ice_rdma.mtx); + if (sc->rdma_entry.attached && ice_rdma.registered) + IRDMA_EVENT_HANDLER(peer, &event); + sx_xunlock(&ice_rdma.mtx); +} diff --git a/sys/dev/ice/ice_rdma.h b/sys/dev/ice/ice_rdma.h index f83c30b33f6c..38e2ef491e8e 100644 --- a/sys/dev/ice/ice_rdma.h +++ b/sys/dev/ice/ice_rdma.h @@ -64,7 +64,7 @@ * considered stable. */ #define ICE_RDMA_MAJOR_VERSION 1 -#define ICE_RDMA_MINOR_VERSION 0 +#define ICE_RDMA_MINOR_VERSION 1 #define ICE_RDMA_PATCH_VERSION 0 /** @@ -273,18 +273,19 @@ struct ice_rdma_event { uint64_t baudrate; }; /* MTU change event */ - struct { - int mtu; - }; + int mtu; /* * TC/QoS/DCB change event - * RESET event use prep variable only * prep: if true, this is a pre-event, post-event otherwise */ struct { struct ice_qos_params port_qos; bool prep; }; + /* + * CRIT_ERR event + */ + uint32_t oicr_reg; }; }; diff --git a/sys/dev/ice/ice_rdma_internal.h b/sys/dev/ice/ice_rdma_internal.h index c80d4540194a..b36544609f45 100644 --- a/sys/dev/ice/ice_rdma_internal.h +++ b/sys/dev/ice/ice_rdma_internal.h @@ -98,4 +98,6 @@ int ice_rdma_pf_stop(struct ice_softc *sc); void ice_rdma_link_change(struct ice_softc *sc, int linkstate, uint64_t baudrate); void ice_rdma_notify_dcb_qos_change(struct ice_softc *sc); void ice_rdma_dcb_qos_update(struct ice_softc *sc, struct ice_port_info *pi); +void ice_rdma_notify_pe_intr(struct ice_softc *sc, uint32_t oicr); +void ice_rdma_notify_reset(struct ice_softc *sc); #endif diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index be1aa86234c7..d8542e383564 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -1287,9 +1287,11 @@ ice_msix_admin(void *arg) ice_set_state(&sc->state, ICE_STATE_RESET_PFR_REQ); } - if (oicr & PFINT_OICR_PE_CRITERR_M) { - device_printf(dev, "Critical Protocol Engine Error detected!\n"); - ice_set_state(&sc->state, ICE_STATE_RESET_PFR_REQ); + if (oicr & (PFINT_OICR_PE_CRITERR_M | PFINT_OICR_HMC_ERR_M)) { + if (oicr & PFINT_OICR_HMC_ERR_M) + /* Log the HMC errors */ + ice_log_hmc_error(hw, dev); + ice_rdma_notify_pe_intr(sc, oicr); } if (oicr & PFINT_OICR_PCI_EXCEPTION_M) { @@ -1297,11 +1299,6 @@ ice_msix_admin(void *arg) ice_set_state(&sc->state, ICE_STATE_RESET_PFR_REQ); } - if (oicr & PFINT_OICR_HMC_ERR_M) { - /* Log the HMC errors, but don't disable the interrupt cause */ - ice_log_hmc_error(hw, dev); - } - return (FILTER_SCHEDULE_THREAD); } @@ -2307,6 +2304,8 @@ ice_prepare_for_reset(struct ice_softc *sc) if (ice_test_state(&sc->state, ICE_STATE_RECOVERY_MODE)) return; + /* inform the RDMA client */ + ice_rdma_notify_reset(sc); /* stop the RDMA client */ ice_rdma_pf_stop(sc); diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c index 848f8126e57c..8efd9d5c6034 100644 --- a/sys/dev/irdma/icrdma.c +++ b/sys/dev/irdma/icrdma.c @@ -350,7 +350,6 @@ irdma_event_handler(struct ice_rdma_peer *peer, struct ice_rdma_event *event) atomic_dec(&iwdev->rf->dev_ctx.event_rfcnt); break; case ICE_RDMA_EVENT_CRIT_ERR: -#ifdef EVNT_HNDLR_CRITERR if (event->oicr_reg & IRDMAPFINT_OICR_PE_CRITERR_M) { u32 pe_criterr; @@ -371,9 +370,6 @@ irdma_event_handler(struct ice_rdma_peer *peer, struct ice_rdma_event *event) } if (iwdev->rf->reset) iwdev->rf->gen_ops.request_reset(iwdev->rf); -#else - printf("%s:%d event type received: %d\n", __func__, __LINE__, event->type); -#endif break; case ICE_RDMA_EVENT_RESET: iwdev->rf->reset = true; From nobody Fri Sep 22 21:57: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 4RsmMs6pnmz4tTvX; Fri, 22 Sep 2023 21:57: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 4RsmMs5Zjpz3THw; Fri, 22 Sep 2023 21:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xwE6hykhhw3YFyEitv122LsCFRFL0GKyIebadkm8f8=; b=CVrXwGQhEvhNK4c5hhhaQ82XYsyGaZySDH6acFukvbb51k+Wa+Itbf7RwWaDmmTEJJ8Dc8 dJL7QPeeeOoMpF7VUnkIwDGEBI8kuuVjKyZ/XrXX+RmP2Xfc7iv/lT0NnJu1WyHnawzVkE F4kH9BDHpmdY9orbJXpsHkm8sQBpPNpUuc6KMbq792abhz6HcwC38xhuOLRVJ1hVCgXzgX xXqihXfeS+GAhq/BTG70KHfL4pP/BtYzBDJIVVZhbT5E2yR3eCYsOkwSfmxqaOZfCIwE9W z5OHxSVU4x7OSgfmm5utFMYGnjp8XRX9q0veCr/pdT214HVX3nhFXAEpRUYVmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419849; a=rsa-sha256; cv=none; b=N2UROR/WiXAAIwGeUTwGg5I78mQE95S8qis/9azqfEd4uuB2raG9bzuzxxgXnk1t1AcDXp ACZCkrNGvTRoKLqXLd5ejB25yf3yg6+EH9sF9/VHeQR2P1dOEKVcQrpVCoDEqsADRVIZmU eskY8nFzeWorawe/eVAxDs/yHrn5aeRwrGZWjBbvIXkQbgtVSHwIiNPHYTAj7F8GqSycEq HMSnAWbVAjTklNMycrV9jEKU2i0biMS5QWKMWlKIU46mNnurf+iaC2czM5/bDmXyxF+R8q V7qJu6cr36geIjKiCTEJgCB+LUp2AWRJTaRmk1rmxxMuABSw1SKfYYPgVa5HGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xwE6hykhhw3YFyEitv122LsCFRFL0GKyIebadkm8f8=; b=lTGGw62BteJ3mtqWS5v6B757vUP1zpmPEx0wkORLlpbP3TjVE8TjhUEA7aSj4e9bNW8C5b IoWr400V9DLx+RW09tuGRcUTdhMsadbt9gyqfa5rFfNcNTbu4xwQVULzxdPP1DA1lYhQul 2j1RR+pm7GW8KgnY0tYwHB4sPHZ/yBFGcwkrpkLaOHPZR/LsVL3d1AmhdKayxcQGj1qAjI PTVFz8cBD1X5YawyTk06LVfeH59r+7ppJ8gWmmZywVSxQf34R9h02PFCs0vYFXAS7phxGG NYNhQizMvUlZO3YBqAY3oqUBSgQ6QTbW55JG14mZnCsozeYaRCepb6hEEst1QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmMs3hLYzf1d; Fri, 22 Sep 2023 21:57: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 38MLvTY3047853; Fri, 22 Sep 2023 21:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLvTBv047850; Fri, 22 Sep 2023 21:57:29 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:57:29 GMT Message-Id: <202309222157.38MLvTBv047850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: e3b352597e4b - stable/13 - irdma(4): use related vnet for searching netdev List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3b352597e4bcb4ec94cb95db23c041da7f7e61c Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b352597e4bcb4ec94cb95db23c041da7f7e61c commit e3b352597e4bcb4ec94cb95db23c041da7f7e61c Author: Bartosz Sobczak AuthorDate: 2023-08-21 11:56:57 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 21:55:18 +0000 irdma(4): use related vnet for searching netdev It was found through testing that when ULP uses individual vnet, the search for the correct vlan_id may failing because of no proper interface with given address. The solution is to use vnet associated to the connection whenever possible. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41592 (cherry picked from commit bc3a013ccd23c50bb48f17211ffc36fe85d11e18) --- sys/dev/irdma/fbsd_kcompat.c | 6 ++---- sys/dev/irdma/fbsd_kcompat.h | 15 +++++++++++++++ sys/dev/irdma/irdma_cm.c | 35 ++++++++++++++++++++++++----------- sys/dev/irdma/irdma_main.h | 5 +++-- sys/dev/irdma/irdma_verbs.c | 4 ++-- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/sys/dev/irdma/fbsd_kcompat.c b/sys/dev/irdma/fbsd_kcompat.c index 5c11f7a35544..19c3943b5151 100644 --- a/sys/dev/irdma/fbsd_kcompat.c +++ b/sys/dev/irdma/fbsd_kcompat.c @@ -391,8 +391,7 @@ irdma_get_dst_mac(struct irdma_cm_node *cm_node, struct sockaddr *dst_sin, u8 *d { struct ifnet *netdev = cm_node->iwdev->netdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif struct ifnet *ifp; struct llentry *lle; @@ -490,8 +489,7 @@ irdma_resolve_neigh_lpb_chk(struct irdma_device *iwdev, struct irdma_cm_node *cm struct irdma_cm_info *cm_info) { #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif int arpindex; int oldarpindex; diff --git a/sys/dev/irdma/fbsd_kcompat.h b/sys/dev/irdma/fbsd_kcompat.h index 630e49068a74..5e656cd9be9f 100644 --- a/sys/dev/irdma/fbsd_kcompat.h +++ b/sys/dev/irdma/fbsd_kcompat.h @@ -122,6 +122,7 @@ static inline int cq_validate_flags(u32 flags, u8 hw_rev) return flags & ~IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION ? -EOPNOTSUPP : 0; } + static inline u64 *irdma_next_pbl_addr(u64 *pbl, struct irdma_pble_info **pinfo, u32 *idx) { @@ -133,6 +134,20 @@ static inline u64 *irdma_next_pbl_addr(u64 *pbl, struct irdma_pble_info **pinfo, return (*pinfo)->addr; } + +static inline struct vnet * +irdma_cmid_to_vnet(struct iw_cm_id *cm_id) +{ + struct rdma_cm_id *rdma_id; + + if (!cm_id) + return &init_net; + + rdma_id = (struct rdma_cm_id *)cm_id->context; + + return rdma_id->route.addr.dev_addr.net; +} + struct ib_cq *irdma_create_cq(struct ib_device *ibdev, const struct ib_cq_init_attr *attr, struct ib_ucontext *context, diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index cb508bf52cb8..d34da57cc84d 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1625,10 +1625,13 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4) * vlan id and mac for that address. */ if_t -irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) +irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac) { if_t ip_dev = NULL; struct in6_addr laddr6; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif struct ifaddr *ifa; u16 scope_id = 0; @@ -1642,7 +1645,11 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) IN6_IS_ADDR_MC_INTFACELOCAL(&laddr6)) scope_id = ntohs(laddr6.__u6_addr.__u6_addr16[1]); +#ifdef VIMAGE + ip_dev = ip6_ifp_find(vnet, laddr6, scope_id); +#else ip_dev = ip6_ifp_find(&init_net, laddr6, scope_id); +#endif if (ip_dev) { if (vlan_id) *vlan_id = rdma_vlan_dev_vlan_id(ip_dev); @@ -1659,12 +1666,19 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) * @addr: local IPv4 address */ u16 -irdma_get_vlan_ipv4(u32 *addr) +irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { if_t netdev; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif u16 vlan_id = 0xFFFF; +#ifdef VIMAGE + netdev = ip_ifp_find(vnet, htonl(addr[0])); +#else netdev = ip_ifp_find(&init_net, htonl(addr[0])); +#endif if (netdev) { vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); @@ -2060,8 +2074,7 @@ irdma_cm_create_ah(struct irdma_cm_node *cm_node, bool wait) struct irdma_ah_info ah_info = {0}; struct irdma_device *iwdev = cm_node->iwdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif ether_addr_copy(ah_info.mac_addr, if_getlladdr(iwdev->netdev)); @@ -3521,11 +3534,11 @@ irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (((struct sockaddr_in *)&cm_id->local_addr)->sin_family == AF_INET) { cm_node->ipv4 = true; - cm_node->vlan_id = irdma_get_vlan_ipv4(cm_node->loc_addr); + cm_node->vlan_id = irdma_get_vlan_ipv4(cm_id, cm_node->loc_addr); } else { cm_node->ipv4 = false; - irdma_netdev_vlan_ipv6(cm_node->loc_addr, &cm_node->vlan_id, - NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_node->loc_addr, + &cm_node->vlan_id, NULL); } irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Accept vlan_id=%d\n", cm_node->vlan_id); @@ -3720,7 +3733,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_info.rem_addr[0] = ntohl(raddr->sin_addr.s_addr); cm_info.loc_port = ntohs(laddr->sin_port); cm_info.rem_port = ntohs(raddr->sin_port); - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV6) return -EINVAL; @@ -3732,7 +3745,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) raddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); cm_info.rem_port = ntohs(raddr6->sin6_port); - irdma_netdev_vlan_ipv6(cm_info.loc_addr, &cm_info.vlan_id, NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } cm_info.cm_id = cm_id; cm_info.qh_qpid = iwdev->vsi.ilq->qp_id; @@ -3847,7 +3860,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) cm_info.loc_port = ntohs(laddr->sin_port); if (laddr->sin_addr.s_addr != htonl(INADDR_ANY)) { - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { cm_info.vlan_id = 0xFFFF; wildcard = true; @@ -3861,7 +3874,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) laddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); if (!IN6_IS_ADDR_UNSPECIFIED(&laddr6->sin6_addr)) { - irdma_netdev_vlan_ipv6(cm_info.loc_addr, + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } else { cm_info.vlan_id = 0xFFFF; diff --git a/sys/dev/irdma/irdma_main.h b/sys/dev/irdma/irdma_main.h index 8e304cae551f..3d6dd4e3f9db 100644 --- a/sys/dev/irdma/irdma_main.h +++ b/sys/dev/irdma/irdma_main.h @@ -572,8 +572,9 @@ void irdma_gen_ae(struct irdma_pci_f *rf, struct irdma_sc_qp *qp, struct irdma_gen_ae_info *info, bool wait); void irdma_copy_ip_ntohl(u32 *dst, __be32 *src); void irdma_copy_ip_htonl(__be32 *dst, u32 *src); -u16 irdma_get_vlan_ipv4(u32 *addr); -if_t irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac); +u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr); +if_t irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, + u8 *mac); struct ib_mr *irdma_reg_phys_mr(struct ib_pd *ib_pd, u64 addr, u64 size, int acc, u64 *iova_start); int irdma_upload_qp_context(struct irdma_qp *iwqp, bool freeze, bool raw); diff --git a/sys/dev/irdma/irdma_verbs.c b/sys/dev/irdma/irdma_verbs.c index 288b075ab79f..c0726d25b8ec 100644 --- a/sys/dev/irdma/irdma_verbs.c +++ b/sys/dev/irdma/irdma_verbs.c @@ -3217,7 +3217,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) if (!ipv6_addr_v4mapped((struct in6_addr *)ibgid)) { irdma_copy_ip_ntohl(ip_addr, sgid_addr.saddr_in6.sin6_addr.__u6_addr.__u6_addr32); - irdma_netdev_vlan_ipv6(ip_addr, &vlan_id, NULL); + irdma_netdev_vlan_ipv6(iwqp->cm_id, ip_addr, &vlan_id, NULL); ipv4 = false; irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP6address=%x:%x:%x:%x\n", ibqp->qp_num, @@ -3226,7 +3226,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) } else { ip_addr[0] = ntohl(sgid_addr.saddr_in.sin_addr.s_addr); ipv4 = true; - vlan_id = irdma_get_vlan_ipv4(ip_addr); + vlan_id = irdma_get_vlan_ipv4(iwqp->cm_id, ip_addr); irdma_mcast_mac_v4(ip_addr, dmac); irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP4address=%x, MAC=%x:%x:%x:%x:%x:%x\n", From nobody Fri Sep 22 21:57: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 4RsmMt6k8Vz4tVB8; Fri, 22 Sep 2023 21:57: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 4RsmMt5gVwz3TCx; Fri, 22 Sep 2023 21:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLQwbJIjMi4Bt0BILyL9dAthqbZc5/98R9Jc6fEgCTE=; b=rbqCeedr2uBlTWESbhsdjW6DGdr/adXwyg97QvLNMDFQ5L+1Nc0tDi9BjKf2nzZ4WwjA5+ AGx3EQ31/SokPSEAH3mHjXzuOLD0LOa2PO68UPiU3fp9KHSHEXPkXnapHGKqmfMICp4221 2TGT2UH8fh3c/1Y5HQ4EA5NrKYckn6Vw2HixKfyVYbxWdQNUfdXMPbUe6WUXe49cg6r1Nf Yl9Q4ivMqd3h0MQrxM74a/VwpQTFVTOdOYpEFimL7gWpSSwe8jpSUH7EnlYhWImsyL23kX GwFXWwS8D9yIveM1gcg4nHIC6KIXsZXEDDWtK6rVwNV6FC3hxz5dcf8dK2SQMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695419850; a=rsa-sha256; cv=none; b=tbmVsvZOtBY8+er78Ns/RzVGwum6C+gI9bPk/+UoAC7BrXKRZI+PP8txMl0khe39hpebKX JWmNGYkdUdmKSDqA8S5LI3BO4YnicRRxXa2jjrrmf/c/rQayZJ/OAxHrezNmb1CZnxOHJ2 2mL5pQkmUxinXOS5KTM+dr0la5/Ug456o9PpgFThEePySIyC1V4lmPgwq3PdIDHf9V0V4p NesQVKAOL4800Al+nvrmmFC5yhNR/LVL+KmGbvf7hhqEs2rbspyJSRT2CIOoFtfyXXAsH/ werdK5wIg6nKm7lBVFLEFVOyaYIZRNBGUZGzUTO9jo3GX+Loav6GFjeOTS89Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695419850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLQwbJIjMi4Bt0BILyL9dAthqbZc5/98R9Jc6fEgCTE=; b=TD9lKmKL7KdioINsahbT/N7vpfDtYeNaEDRnqm3VTAVPL0N5HuecZwOC6LkQiiG7AoYL8x yrTaCSuUadFBu73g96lChgJuAluwYD/HDh2EdT8pQqWErJzOnsKmVHOEkrMaQYSucl5aUi lbzo7NFmI3lepiqU3BpGqDvMdxLGOgt5MWfCjgB8zEgV8EGHdz3SYInMBAL3ndNRX/MmTn X5MhyG4y/2f0YYzrlCv11mAIeOV6d4lMYJq0P6KPc8OgFu5JgBUk8UxLqXQXr2xNk/10W3 N2oNFCGwhuRnvkrzvc1m6XnkJHWnA3WgHKvDdF4fu3/XQdgkgGQ8Wfz5P2lsqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RsmMt4NdBzdxN; Fri, 22 Sep 2023 21:57: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 38MLvUCg047895; Fri, 22 Sep 2023 21:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38MLvUgH047892; Fri, 22 Sep 2023 21:57:30 GMT (envelope-from git) Date: Fri, 22 Sep 2023 21:57:30 GMT Message-Id: <202309222157.38MLvUgH047892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 8ac750e095a3 - stable/13 - irdma(4): remove artificial completion generator List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ac750e095a3c9a5bd45b92d5a0b5aeb2572348d Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ac750e095a3c9a5bd45b92d5a0b5aeb2572348d commit 8ac750e095a3c9a5bd45b92d5a0b5aeb2572348d Author: Bartosz Sobczak AuthorDate: 2023-08-21 11:28:58 +0000 Commit: Eric Joyner CommitDate: 2023-09-22 21:55:18 +0000 irdma(4): remove artificial completion generator Removing artificial completion generator as there had been no indication of the code being required for E810 cards. Further more it was found that the code may have unpleasant side effects on user experience when using ucmatose tool. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41593 (cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080) --- contrib/ofed/libirdma/irdma_umain.h | 8 -- contrib/ofed/libirdma/irdma_uverbs.c | 161 +---------------------------------- 2 files changed, 1 insertion(+), 168 deletions(-) diff --git a/contrib/ofed/libirdma/irdma_umain.h b/contrib/ofed/libirdma/irdma_umain.h index 312310dcb754..1fa18dd7a847 100644 --- a/contrib/ofed/libirdma/irdma_umain.h +++ b/contrib/ofed/libirdma/irdma_umain.h @@ -108,11 +108,6 @@ struct verbs_cq { }; }; -struct irdma_cmpl_gen { - LIST_ENTRY(irdma_cmpl_gen) list; - struct irdma_cq_poll_info cpi; -}; - struct irdma_ucq { struct verbs_cq verbs_cq; struct verbs_mr vmr; @@ -129,7 +124,6 @@ struct irdma_ucq { struct list_head resize_list; /* for extended CQ completion fields */ struct irdma_cq_poll_info cur_cqe; - struct list_head_cmpl cmpl_generated; }; struct irdma_uqp { @@ -149,7 +143,6 @@ struct irdma_uqp { struct irdma_qp_uk qp; enum ibv_qp_type qp_type; struct irdma_sge *recv_sges; - pthread_t flush_thread; }; /* irdma_uverbs.c */ @@ -206,5 +199,4 @@ void irdma_async_event(struct ibv_context *context, void irdma_set_hw_attrs(struct irdma_hw_attrs *attrs); void *irdma_mmap(int fd, off_t offset); void irdma_munmap(void *map); -void *irdma_flush_thread(void *arg); #endif /* IRDMA_UMAIN_H */ diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c index 50fd2f23476d..962af399ed31 100644 --- a/contrib/ofed/libirdma/irdma_uverbs.c +++ b/contrib/ofed/libirdma/irdma_uverbs.c @@ -458,7 +458,6 @@ ucreate_cq(struct ibv_context *context, info.cq_size = get_cq_size(attr_ex->cqe, hw_rev, cqe_64byte_ena); iwucq->comp_vector = attr_ex->comp_vector; LIST_INIT(&iwucq->resize_list); - LIST_INIT(&iwucq->cmpl_generated); total_size = get_cq_total_bytes(info.cq_size, cqe_64byte_ena); cq_pages = total_size >> IRDMA_HW_PAGE_SHIFT; @@ -614,142 +613,6 @@ irdma_process_resize_list(struct irdma_ucq *iwucq, return cq_cnt; } -static void -irdma_remove_cmpls_list(struct irdma_ucq *iwucq) -{ - struct irdma_cmpl_gen *cmpl_node, *next; - - LIST_FOREACH_SAFE(cmpl_node, &iwucq->cmpl_generated, list, next) { - LIST_REMOVE(cmpl_node, list); - free(cmpl_node); - } -} - -static int -irdma_generated_cmpls(struct irdma_ucq *iwucq, struct irdma_cq_poll_info *cq_poll_info) -{ - struct irdma_cmpl_gen *cmpl; - - if (!iwucq || LIST_EMPTY(&iwucq->cmpl_generated)) - return ENOENT; - cmpl = LIST_FIRST(&iwucq->cmpl_generated); - LIST_REMOVE(cmpl, list); - memcpy(cq_poll_info, &cmpl->cpi, sizeof(*cq_poll_info)); - - free(cmpl); - - return 0; -} - -/** - * irdma_set_cpi_common_values - fill in values for polling info struct - * @cpi: resulting structure of cq_poll_info type - * @qp: QPair - * @qp_num: id of the QP - */ -static void -irdma_set_cpi_common_values(struct irdma_cq_poll_info *cpi, - struct irdma_qp_uk *qp, __u32 qp_num) -{ - cpi->comp_status = IRDMA_COMPL_STATUS_FLUSHED; - cpi->error = 1; - cpi->major_err = IRDMA_FLUSH_MAJOR_ERR; - cpi->minor_err = FLUSH_GENERAL_ERR; - cpi->qp_handle = (irdma_qp_handle) (uintptr_t)qp; - cpi->qp_id = qp_num; -} - -static bool -irdma_cq_empty(struct irdma_ucq *iwucq) -{ - struct irdma_cq_uk *ukcq; - __u64 qword3; - __le64 *cqe; - __u8 polarity; - - ukcq = &iwucq->cq; - cqe = IRDMA_GET_CURRENT_CQ_ELEM(ukcq); - get_64bit_val(cqe, 24, &qword3); - polarity = (__u8) FIELD_GET(IRDMA_CQ_VALID, qword3); - - return polarity != ukcq->polarity; -} - -/** - * irdma_generate_flush_completions - generate completion from WRs - * @iwuqp: pointer to QP - */ -static void -irdma_generate_flush_completions(struct irdma_uqp *iwuqp) -{ - struct irdma_qp_uk *qp = &iwuqp->qp; - struct irdma_ring *sq_ring = &qp->sq_ring; - struct irdma_ring *rq_ring = &qp->rq_ring; - struct irdma_cmpl_gen *cmpl; - __le64 *sw_wqe; - __u64 wqe_qword; - __u32 wqe_idx; - - if (pthread_spin_lock(&iwuqp->send_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->send_cq)) { - while (IRDMA_RING_MORE_WORK(*sq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->send_cq->lock); - return; - } - - wqe_idx = sq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->sq_wrtrk_array[wqe_idx].wrid; - sw_wqe = qp->sq_base[wqe_idx].elem; - get_64bit_val(sw_wqe, 24, &wqe_qword); - cmpl->cpi.op_type = (__u8) FIELD_GET(IRDMAQPSQ_OPCODE, wqe_qword); - /* remove the SQ WR by moving SQ tail */ - IRDMA_RING_SET_TAIL(*sq_ring, sq_ring->tail + qp->sq_wrtrk_array[sq_ring->tail].quanta); - LIST_INSERT_HEAD(&iwuqp->send_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->send_cq->lock); - if (pthread_spin_lock(&iwuqp->recv_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->recv_cq)) { - while (IRDMA_RING_MORE_WORK(*rq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->recv_cq->lock); - return; - } - - wqe_idx = rq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->rq_wrid_array[wqe_idx]; - cmpl->cpi.op_type = IRDMA_OP_TYPE_REC; - /* remove the RQ WR by moving RQ tail */ - IRDMA_RING_SET_TAIL(*rq_ring, rq_ring->tail + 1); - LIST_INSERT_HEAD(&iwuqp->recv_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->recv_cq->lock); -} - -void * -irdma_flush_thread(void *arg) -{ - __u8 i = 5; - struct irdma_uqp *iwuqp = arg; - - while (--i) { - if (pthread_spin_lock(&iwuqp->lock)) - break; - irdma_generate_flush_completions(arg); - pthread_spin_unlock(&iwuqp->lock); - sleep(1); - } - pthread_exit(NULL); -} - /** * irdma_udestroy_cq - destroys cq * @cq: ptr to cq to be destroyed @@ -770,8 +633,6 @@ irdma_udestroy_cq(struct ibv_cq *cq) if (ret) goto err; - if (!LIST_EMPTY(&iwucq->cmpl_generated)) - irdma_remove_cmpls_list(iwucq); irdma_process_resize_list(iwucq, NULL); ret = ibv_cmd_destroy_cq(cq); if (ret) @@ -1015,15 +876,6 @@ __irdma_upoll_cq(struct irdma_ucq *iwucq, int num_entries, while (npolled < num_entries) { ret = irdma_poll_one(&iwucq->cq, cur_cqe, entry ? entry + npolled : NULL); - if (ret == ENOENT) { - ret = irdma_generated_cmpls(iwucq, cur_cqe); - if (!ret) { - if (entry) - irdma_process_cqe(entry + npolled, cur_cqe); - else - irdma_process_cqe_ext(cur_cqe); - } - } if (!ret) { ++npolled; cq_new_cqe = true; @@ -1709,14 +1561,7 @@ irdma_umodify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask) return ret; } else { - int ret; - - ret = ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); - if (ret) - return ret; - if (attr_mask & IBV_QP_STATE && attr->qp_state == IBV_QPS_ERR) - pthread_create(&iwuqp->flush_thread, NULL, irdma_flush_thread, iwuqp); - return 0; + return ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); } } @@ -1769,10 +1614,6 @@ irdma_udestroy_qp(struct ibv_qp *qp) int ret; iwuqp = container_of(qp, struct irdma_uqp, ibv_qp); - if (iwuqp->flush_thread) { - pthread_cancel(iwuqp->flush_thread); - pthread_join(iwuqp->flush_thread, NULL); - } ret = pthread_spin_destroy(&iwuqp->lock); if (ret) goto err; From nobody Sat Sep 23 00: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 4Rsqrs5nLFz4tjbV; Sat, 23 Sep 2023 00:34: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 4Rsqrs5DDyz3GHB; Sat, 23 Sep 2023 00: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=1695429261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvdLVdhocw7MAKOFr9deptbBq13zcsBMfZy5+Th5Dhw=; b=EgxiFXrDZ8QlcA+UNK6HQTLwGyATA6aT4bw6e2Pmz/RYGLi3B8/84DYdHoDY2ZqmBLySho 6C7Ff1lb8pPNjVL958IVl0TRwu5xCFMWq1YzF650Zsy0bz0/SI5SNBAc+IFI2CeDK/uNlM 091XbneLm8OXShrHSxFD5BjWpaihUVQviAQMvlOV/6UfJYq+J4Abetn0I7hcKSzr+XXiXb /fjTPAn7RaSnQOHgVXjZqvZkXDvKHWHKN9eAn6+72EpU10xQUB3DMK5MTJD1CvQT3EVjpz YtCreByP2XH5YuY/HMtZdMyrwmNpt/6j55c8ww+624qwyOX1QoH9aHuegIVFzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695429261; a=rsa-sha256; cv=none; b=oCvW240YTZM8aSn5cpk8E620pqHXkMDNuSmbp7eeQPUNJvZ93FaFZGoL9LBTzd9mhbqOsN ejMfGFSmkQE2yRDED57jABlmBP69//GZ5E23r1Z6I7LLJXlvC4XALQhTREh5RDT7+mH6VS rVyyKxRcfesDPK3eTRncVZ8sOruJcQeiISERT0jFDCCiGVBE1vya5+3G3yqGIewuc5ZMAy XUNx3nUyLFPbGjlCQfk0tq24pQIyH8uNjBdvZipWsaebv63ItxPbj1XEobsKYf7s/tfgjo xKWtpXsPv4gAZy6gZ8FiLLjspb/XLTJ/GaAZRx+ZDv85BT77RdGBx7HZD6BOSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695429261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvdLVdhocw7MAKOFr9deptbBq13zcsBMfZy5+Th5Dhw=; b=l5qZYQ7XvQPz1m6SRxH66WlLRFD92RJsuQJKwSWMVBcyi+gaZ11wnyjF1FRDwJ4zex8jwC 1YkCMZEnfc+mOve+XcGvDRFTZ+nmjzVZx7hLcbUDRitVKOSMpi8vQqr4ZEsRl13xXtXxto 2xuAIaCx7CXHRxbXN2zl5KknvT/4bzVzZWikPGJ1wxB0V71UYyqKfs+uqWK/h2I60LeIaI 865pTJuNIwr1Lml86g/4nwi+ep04UpzMgrocSi6zyqpgOPaqunOLkW1LcJtq0W/hOXuyaT OAzOPMLdZvRLWHIIw0e6BegyNaALnZWoII2tlr9/QRAW4AlHTQ/eQnTQ7CV9rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rsqrs4KgZzjt8; Sat, 23 Sep 2023 00: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 38N0YLQS024842; Sat, 23 Sep 2023 00: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 38N0YL8M024839; Sat, 23 Sep 2023 00:34:21 GMT (envelope-from git) Date: Sat, 23 Sep 2023 00:34:21 GMT Message-Id: <202309230034.38N0YL8M024839@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: 84266fb897e6 - stable/14 - Add deprecation notices to publickey(5) tools List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 84266fb897e6e75569a81418f146f134af04046b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=84266fb897e6e75569a81418f146f134af04046b commit 84266fb897e6e75569a81418f146f134af04046b Author: Ed Maste AuthorDate: 2023-09-20 11:31:14 +0000 Commit: Ed Maste CommitDate: 2023-09-23 00:34:09 +0000 Add deprecation notices to publickey(5) tools Reviewed by: imp, manu MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40144 (cherry picked from commit d5ef73a71f0e2fbc4dc9b907a6e59a15599c50b3) --- usr.bin/chkey/chkey.1 | 4 ++++ usr.bin/keylogin/keylogin.1 | 4 ++++ usr.bin/keylogout/keylogout.1 | 4 ++++ usr.bin/newkey/newkey.8 | 4 ++++ usr.sbin/keyserv/keyserv.8 | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/usr.bin/chkey/chkey.1 b/usr.bin/chkey/chkey.1 index 0721c07e8c14..508227ba9601 100644 --- a/usr.bin/chkey/chkey.1 +++ b/usr.bin/chkey/chkey.1 @@ -9,6 +9,10 @@ .Nd change your encryption key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogin/keylogin.1 b/usr.bin/keylogin/keylogin.1 index a8a429e6c786..32a3e8e1b5b4 100644 --- a/usr.bin/keylogin/keylogin.1 +++ b/usr.bin/keylogin/keylogin.1 @@ -9,6 +9,10 @@ .Nd decrypt and store secret key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogout/keylogout.1 b/usr.bin/keylogout/keylogout.1 index 54cd5a575c51..1480a83aece5 100644 --- a/usr.bin/keylogout/keylogout.1 +++ b/usr.bin/keylogout/keylogout.1 @@ -8,6 +8,10 @@ .Sh SYNOPSIS .Nm .Op Fl f +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/newkey/newkey.8 b/usr.bin/newkey/newkey.8 index 966692b5968c..51dca6688bd0 100644 --- a/usr.bin/newkey/newkey.8 +++ b/usr.bin/newkey/newkey.8 @@ -10,6 +10,10 @@ .Fl h Ar hostname .Nm .Fl u Ar username +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/keyserv/keyserv.8 b/usr.sbin/keyserv/keyserv.8 index af8acd2fd642..17007c7d8f40 100644 --- a/usr.sbin/keyserv/keyserv.8 +++ b/usr.sbin/keyserv/keyserv.8 @@ -16,6 +16,10 @@ .Op Fl n .Op Fl p Ar path .Op Fl v +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm From nobody Sat Sep 23 01:54: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 4RssdS228Gz4tpMw; Sat, 23 Sep 2023 01:54: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 4RssdS1VYYz3MlM; Sat, 23 Sep 2023 01:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695434076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tITwXaQqLYH3Sz9ReYwgUfK/WRkW59xMrKF3mNQfM4Y=; b=iwx2fiWVIv2tnXRQ/Mql3im42WT+UiYmbUQmCL/uOKOu8nmB2wbvJmsWp71WUl+/Kzpyd+ +S/1y/bgBjKnDbkSHq7kcjeyVkuXHxIQokxIV+6/7xFH7ApFCAbqHNYNVKPevSDeomi9my Nc+xCM/hPCpFk4Z3ScHVNw94rARTGohvtnn+2wgFB8PIkTuHaQ40p/VQJeSAk3WLcYmgIq UYgCzE4elO0wJnrhTZCZbdzxZsfZvQOqJvPG2rf6n/fjoQybC9q+tMgRtHIU77FVWEKdGZ 0RWnMWXRQhnZ+o4CfJ/hagEhHXXc9T+uGpbjM0eTtje0+a9dodWSELEmdM+9kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695434076; a=rsa-sha256; cv=none; b=jWSDx28AXaZKS/2aCxkYIoIxRF/0c/U5Xjt9SrO13WHuHEOFW5F6a5AnTPq8iocHI47INh 4ix1c4eTE5fx2Zjt5tcjrfEjqwDUIAuatL9/YDn4E49+kT2+I5VgzYogCbZhMieop0gJnI ZjnO4AVUGpH1Uwl0d7W9er2NL0jNTSxwMjkN6pB83WLFhqd1RzqJS/TvbDdwffOMi02Yyf 12TH171KpWmG96f6Q2oprBvUFPu/mI/Xziu9/YAD2Vof2BIGzinLzevxfSBjt3NQhUdocC za2CUhKdfRqaXght/DZ/qYmdca/5d0yr0KaNlspxv5OZ387pjFzKtTvlRcVTjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695434076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tITwXaQqLYH3Sz9ReYwgUfK/WRkW59xMrKF3mNQfM4Y=; b=RNAHt0pgDP/mdb/WyWJmYi93JosHwwIJDFpC7MVhYCznNPdtuAhKnXefz2IlgpRe+zF2L9 o5b1fUtLZ4iIZwH15aZY+pI8owFCtyuPMVBNCr9GnASRMmmkZYzCeM00TLWDPFkRtHUBm3 9NRM8C8kmZ5mP6iMDww/stpxDYk3sd1IKgekdmWRmSd5EbLr7LWAdQnus6rpH2aIuz7B2u w8crGl/l0cleBYmSejuaYcPalULbv8DqyQqnb4IsEEhta/KYKm6Dcp4WnUjvq2H5rwdeea 1pM7CUMurKKRZFrkvVN7TJmlkDCDPLYbn1A2IIF8c+YWtsd7E/Fu3aMnNux69A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RssdS0WQTzlTw; Sat, 23 Sep 2023 01:54: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 38N1sZpm057174; Sat, 23 Sep 2023 01:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38N1sZuZ057171; Sat, 23 Sep 2023 01:54:35 GMT (envelope-from git) Date: Sat, 23 Sep 2023 01:54:35 GMT Message-Id: <202309230154.38N1sZuZ057171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Moore Subject: git: d9b8e5a74805 - releng/14.0 - powerpc pmap: initialize kernel pmap radix trie List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d9b8e5a748053ed9c641b5ac3832463b6f3731ac Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=d9b8e5a748053ed9c641b5ac3832463b6f3731ac commit d9b8e5a748053ed9c641b5ac3832463b6f3731ac Author: Doug Moore AuthorDate: 2023-09-13 18:17:57 +0000 Commit: Doug Moore CommitDate: 2023-09-23 01:49:16 +0000 powerpc pmap: initialize kernel pmap radix trie Commit 2d2bcba7ba70141388729ed49674b36fd01146c5 changed radix trie implementation and made it necessary that radix tries be initialized with vm_radix_init. @dbaio reports that in some configurations, there is a powerpc boot panic and that this commit introduced the problem. In powerpc/aim/mmu_radix.c, the radix trie in kernel_pmap is initialized by zeroing all its fields. Add a call to vm_radix_init to properly initialize kernel_pmap->pm_radix. Reported by: dbaio Reviewed by: alc, jhibbits Fixes: 2d2bcba7ba drop NULL check from radix trie search Differential Revision: https://reviews.freebsd.org/D41846 (cherry picked from commit 8763b9862f90dc3bdbbc5e3c2664890be7c1f0c4) (cherry picked from commit a4c7a3f7f56a131a74b78ac48f6533feb8ef5aae) Approved by: re (gjb) --- sys/powerpc/aim/mmu_radix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 32d08d2d7026..b904978e042c 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -1843,6 +1843,7 @@ mmu_radix_setup_pagetables(vm_size_t hwphyssz) bzero(kernel_pmap, sizeof(struct pmap)); PMAP_LOCK_INIT(kernel_pmap); + vm_radix_init(&kernel_pmap->pm_radix); ptpages = allocpages(3); l1phys = moea64_bootstrap_alloc(RADIX_PGD_SIZE, RADIX_PGD_SIZE); From nobody Sat Sep 23 02:26: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 4RstKl4DKZz4tr5J; Sat, 23 Sep 2023 02:26: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 4RstKl3kwjz3PND; Sat, 23 Sep 2023 02:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695435963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UO3h6SDvKcstcTTpUxYcezZd/x5rIoDaucLfBMYz4ig=; b=rg+nDQ1+2pjNxgFfll+/8rlixHEcq6OrLuvJ3njYXQR3kYW+gxi3wZ8EEeMTcijTcS0w1y 3N2PmcPklMyA2SHWo7gpaGBfOQpCdIw/Wq7EA85+PAR3ehY9yb8wg/jblEM+TAangIWlMA Qr5p7oVfkZRLoU/vWuUll2i/inuC2qrH9pDAy8znmob1xhg/hRgrG6UuREWqq+vEw8o3ZD u371LBHtwwJISTnfWMZvsKrqUQfau3F9Scfazh+ORxWz8p57mTc7KB7F/HuGDLyzxgUzXv exObHl3dYkcYK1sDVmzdrcCvizE4EVDFjCz2rZJeMe1XjG94YtSy2GONNzsM1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695435963; a=rsa-sha256; cv=none; b=u6zyrXd9TbX4NzU0PLj3hfftcpp9/ncEEvjv+twzMD6O+rUNCsv7KATjGnSg9oZUN0s+Yf d60ca55//6GJZqUTaRAZRkzrS1jo445nLCqj3da3tNnaEgfWiWDEIh0rEaxp8JOhCB76XI IV7fzZdSNED8VSHdK/TbnRpbuSX3k8hbwS/jW14/xMiewRi6thkDepQwVK1dKAPYyh5UHX mak0+fm2W7XoZdDXrvgHV5R4q8TY18xsb0010ddXyZAZ/qa/4C6EvueLvb87YCGerHgh1K wfFinhPzYcwSwW80JlCBYnhduCpWHET2sGiRZI1akK6a3E0BiwQAHmV7+sHTsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695435963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UO3h6SDvKcstcTTpUxYcezZd/x5rIoDaucLfBMYz4ig=; b=VlmGCGdAImIhrlF6/fT9aCWXIC2Nypp/2cpGutMUvQY71IO8TKkNnmcscyuEbPLDkLG/Pz XpmuqSGhPU89dOSMTGBac1oQKx+foOVR0DMBQRTbLjb5KgPnHUl86glN2uGS1yj/l1NOqv WklKDnAJ4kuvs1/CEzIqCBpU9omzhO+TrvGew7Wojs91IUJzdl1RlP99q47kn5R7p7zSbM tY+dFPgW2N2laTSrimT3NpgDqhMmCxehFWDdTRok4FymTl6aVPP+2xONH81URAft4HQevu 4RqBvxQUTDgskzm1pYoW3oaO3WFoyhz4mCVLaLopHwDJhPJp3CXBin7mWFvENg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RstKl2gjfzmD9; Sat, 23 Sep 2023 02:26: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 38N2Q3dB007757; Sat, 23 Sep 2023 02:26:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38N2Q3S0007754; Sat, 23 Sep 2023 02:26:03 GMT (envelope-from git) Date: Sat, 23 Sep 2023 02:26:03 GMT Message-Id: <202309230226.38N2Q3S0007754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels Subject: git: 4fdded885b8d - releng/14.0 - clk_fixed: reduce and clarify messages due to missing clk-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: karels X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4fdded885b8d587a5e0a7377361c0eaaa96af30e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=4fdded885b8d587a5e0a7377361c0eaaa96af30e commit 4fdded885b8d587a5e0a7377361c0eaaa96af30e Author: Mike Karels AuthorDate: 2023-08-25 20:11:46 +0000 Commit: Mike Karels CommitDate: 2023-09-23 02:24:22 +0000 clk_fixed: reduce and clarify messages due to missing clk-frequency The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock nodes which have no clock-frequency value. Such nodes are non-standard. This results in about 150 messages during autoconfiguration: clk_fixed2: disabled on ofwbus0 clk_fixed2: Cannot FDT parameters. device_attach: clk_fixed2 attach returned 6 Defensively check for clock-frequency in the probe routine, and if none, return an error with a more direct error message (1 line per occurrence, 50 lines total): clk_fixed2: clock-fixed has no clock-frequency Based on a patch by manu. Approved by: re(gjb) Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41594 (cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488) (cherry picked from commit 2476a76031908016dd2513862d46ad8dd2bab462) --- sys/dev/extres/clk/clk_fixed.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/extres/clk/clk_fixed.c b/sys/dev/extres/clk/clk_fixed.c index f4f1d462233a..e5ca6b31d000 100644 --- a/sys/dev/extres/clk/clk_fixed.c +++ b/sys/dev/extres/clk/clk_fixed.c @@ -157,6 +157,11 @@ clk_fixed_probe(device_t dev) clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (clk_type) { case CLK_TYPE_FIXED: + if (OF_hasprop(ofw_bus_get_node(dev), "clock-frequency") == 0) { + device_printf(dev, + "clock-fixed has no clock-frequency\n"); + return (ENXIO); + } device_set_desc(dev, "Fixed clock"); return (BUS_PROBE_DEFAULT); case CLK_TYPE_FIXED_FACTOR: From nobody Sat Sep 23 13:09: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 4Rt8cB3RKtz4tdn3; Sat, 23 Sep 2023 13:09: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 4Rt8cB2r5tz3Yc9; Sat, 23 Sep 2023 13:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lq/qY2TlP4QAL3HwWmX40QQ3Hf0Hn7YLmGORyyskO0=; b=X6HdCwPKjzBe8VwMxDPLR3HygUaGi6IkVw+bOVgnL+NxStv63V+spa9y4vSQyiZyySY3n8 gZjT+ev8O8JcBN7ajiUiL3wFrKA859imKO0lTyxTUHvdhD+N7L7ifg6ttIc+IxmkLQLNXE kDHSpH/9tJkvPOZhR2Jd/mzcIOfaEEJr/6zatR+aOzFOGMWPNgbtMg2OoZbgxbf26kqPsM knee/dZB3WwG68YDe+v8fkqIQfDHsEvEBGSN9r+q/Oypq/0V6OH84EvrxceQB2aAFnodgH IB2YoEyihVYatHSXvdNcoDzl9jehFTcXMrg6BPxHbws56/0WnqHAevuk2g9REA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695474570; a=rsa-sha256; cv=none; b=jT+ChFc52Fw+ndS+Y2+HdrJQbrroQIjUaadZvjzxvyaRjgYZYfchUv35HEWbu/Pvgrwn2i v11W6snzipCN6w69DhxphtMNuLcHgqwuUEZLDzP3H/BMvqSjTYviLpWw819xFM2ZEkicnV PL5B937PvHlOUxN7dsTW5JwInKrREdGu8Y5V8zPMcv8Jmq7M/27RfMxjc2wTJtfJSjdO62 xm/6ZTBEE2lKX3Ph8RHuzeLYPF2fDd8cDk4ifPB6hi5pvWaZZ611WOH8pa+8QeyVw/ufM8 4tSOLrY/NVW5gLv4ZjQWevF6kGwtRbkjl1k6y0ytmw5cwkX7IxhrHEUojdLRow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lq/qY2TlP4QAL3HwWmX40QQ3Hf0Hn7YLmGORyyskO0=; b=usf7zNV3I2gdirCAfcVGa24yhWMDVgikz+LQZ+IigGjtZaBYb39Ny0ES2Vb9NVjnN9o11n MzTjwSfaAReU9qLd6kEEuKGH6OzyR4j3jK1hxm60K3vIVq6ObAEkYVw5bI742OYbY3kKoM rjRAyK1lB+U4H3xe6lrme5j0fyGmEDhLQ34iNWefbDX7UG1UEJuG6qqUhu4Dvl6tdpXuT9 XePqEYGQMYHNUxdIJRseFZfTOhobpb9K3TpKYRLfS+/KEsJ3RzVnHqd08xyHawsQuyNE4F lFEtsXXpFzYuo7xotQF4CyHE1yRmCydby7dwKw2nka630umDjuYKV27WEXSyTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rt8cB1mzFz14vV; Sat, 23 Sep 2023 13:09: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 38ND9UZD073821; Sat, 23 Sep 2023 13:09:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ND9UG6073818; Sat, 23 Sep 2023 13:09:30 GMT (envelope-from git) Date: Sat, 23 Sep 2023 13:09:30 GMT Message-Id: <202309231309.38ND9UG6073818@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: 78534afbcab6 - releng/14.0 - freebsd-update: do not restart sshd when updating jail/basedir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 78534afbcab6e97565c06041fecfe28587e13f2b Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=78534afbcab6e97565c06041fecfe28587e13f2b commit 78534afbcab6e97565c06041fecfe28587e13f2b Author: Ed Maste AuthorDate: 2023-09-16 20:46:16 +0000 Commit: Ed Maste CommitDate: 2023-09-23 13:08:37 +0000 freebsd-update: do not restart sshd when updating jail/basedir In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd after upgrade, to avoid an upgrade-related incompatibility that made it impossible to login. This is intended to avoid losing access to remote hosts, and ought not apply to upgrading jails (from outside). PR: 263489, 272282 Reported by: otis Reviewed by: otis, kevans Sponsored by: The FreeBSD Foundation Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade") Differential Revision: https://reviews.freebsd.org/D41890 (cherry picked from commit 8ee97b1928e75f7f81a870ffb063010778e0a129) (cherry picked from commit cce342e21357833892083e865710c4a05603b7b5) Approved by: re (gjb) --- usr.sbin/freebsd-update/freebsd-update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 57023557839b..9cdff05c24e4 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3036,9 +3036,10 @@ Kernel updates have been installed. Please reboot and run install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Restart sshd if running (PR263489). Note that this does not - # affect child sshd processes handling existing sessions. - if service sshd status >/dev/null 2>/dev/null; then + # Restart host sshd if running (PR263489). Note that this does + # not affect child sshd processes handling existing sessions. + if [ "$BASEDIR" = / ] && \ + service sshd status >/dev/null 2>/dev/null; then echo echo "Restarting sshd after upgrade" service sshd restart From nobody Sat Sep 23 13:09: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 4Rt8cC41C2z4tdcv; Sat, 23 Sep 2023 13:09: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 4Rt8cC3JFwz3YZX; Sat, 23 Sep 2023 13:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hD7t4h4KUJAIMd69hjtZcFxC51RmHSZGvrYdTaHkV08=; b=onGLd21Id7QDutmIGWIwtIQUxhLYlAqXO3dONkz4MnbWOPIfxj7qBhtrPrlGaFYGWJk6ir IJfegQ/d7MnHJa4VxasOKUKPsjavZD2KHPQYNPxDdDeMz33FDyan7rPdA/kJ2zjOMVPIwq nJT3tPZSnJDxdUAbtEGKrNdywge5y3hFVjvq088cyl1wg0ZdRH1c6BPHqiavDfddYulhOX MVTTfDOouUt+UlSxyGOuFU7nzjm8DWT46rU5qnvXdKQmnEwkifA6YBhMVtEk2PYUS+V6JX bmg69YdvUlsfugcGY1P5UUGbW6V0QZE6UD8C9CjaKj77RX+lIUUxpXA6oIylug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695474571; a=rsa-sha256; cv=none; b=moJPEyBGPaLEuzptJm6BwnoL4VwC5vOtWPSpP3QhR7+i1Cdojsfd+nYZRFu9xMJgguGyTf eZLfkSAc3TNwso4vfjy0D2oi6cXQ6yAqAcZCeWLsu6gYQF9y3Z4QXHUTC0s2hKLnxFy9sp QmIFWhh5xFJcAO7oWvmMEBuP44imct6bEGCP/FbfQ9HdovhghRdidX+kAyAtz+nihtxv9A ZvUn+GWcAFj1aDG0wRYq+xoxTYqng6ACTIgyFX1jIDHLNate4PgE0eyr19sPJxreYQAutY gk06UqqNJP988gODKdC5wmEOVzxNHNBVAAJhecw33+Ov+uu9IPBywAprnubU9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hD7t4h4KUJAIMd69hjtZcFxC51RmHSZGvrYdTaHkV08=; b=ONS96mbwzkjcIDvkxDtyH1c2MDTDotbc8tw711TPVkzyH4uqhuG6U5eS3vApWw6Vye+Ax4 pYW5STGTpSr7dL63WmbkCv9YPwxkcHpYPHxzh5vA0a/lcHP0N9Ssl/GN3qwDyrAvCYHcwr mkzTT/dguhnd6Cn1OT4RxTpocvDtBi2jVGv8tI9Tcg0YGGxFIECz0XzPYZ//haxKRPJ44h qj3n57Nttc/g8URi3jFN7WYBhLOY1C3/rpvFFNF7zMk0PL9ERULsBckIKoo0miO+345f5Z 1KW9z0ggqfCGlw2ayDmacp1XfAoJ94qQQuf4U88YM4Lh/EQpLmjRaWSvy5xRcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rt8cC25Xrz14lq; Sat, 23 Sep 2023 13:09: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 38ND9Vju073860; Sat, 23 Sep 2023 13:09:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ND9V9a073857; Sat, 23 Sep 2023 13:09:31 GMT (envelope-from git) Date: Sat, 23 Sep 2023 13:09:31 GMT Message-Id: <202309231309.38ND9V9a073857@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: c782cf6f13fc - releng/14.0 - libfido2: backport hidraw(4) support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c782cf6f13fcc7b7c57acdeca6f13d624434bdec Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c782cf6f13fcc7b7c57acdeca6f13d624434bdec commit c782cf6f13fcc7b7c57acdeca6f13d624434bdec Author: Ed Maste AuthorDate: 2023-09-19 16:50:13 +0000 Commit: Ed Maste CommitDate: 2023-09-23 13:08:56 +0000 libfido2: backport hidraw(4) support PR: 273596 Submitted by: David Horn Obtained from: libfido2 2c9dfaae2a56, 930160388700 (cherry picked from commit 1843dfb05ed80149f5a412180af882e3cb8f451b) (cherry picked from commit 3df74eecfdecbafe55838b45141c275754d526bb) Approved by: re (gjb) --- contrib/libfido2/src/hid_freebsd.c | 97 ++++++++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 10 deletions(-) diff --git a/contrib/libfido2/src/hid_freebsd.c b/contrib/libfido2/src/hid_freebsd.c index 5aefe69c1bec..5151690afc0a 100644 --- a/contrib/libfido2/src/hid_freebsd.c +++ b/contrib/libfido2/src/hid_freebsd.c @@ -1,13 +1,17 @@ /* - * Copyright (c) 2020 Yubico AB. All rights reserved. + * Copyright (c) 2020-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ -#include +#include #include #include +#if __FreeBSD_version >= 1300500 +#include +#define USE_HIDRAW /* see usbhid(4) and hidraw(4) on FreeBSD 13+ */ +#endif #include #include @@ -57,8 +61,60 @@ is_fido(int fd) return (usage_page == 0xf1d0); } +#ifdef USE_HIDRAW +static int +copy_info_hidraw(fido_dev_info_t *di, const char *path) +{ + int fd = -1; + int ok = -1; + struct usb_device_info udi; + struct hidraw_devinfo devinfo; + char rawname[129]; + + memset(di, 0, sizeof(*di)); + memset(&udi, 0, sizeof(udi)); + memset(&devinfo, 0, sizeof(devinfo)); + memset(rawname, 0, sizeof(rawname)); + + if ((fd = fido_hid_unix_open(path)) == -1 || is_fido(fd) == 0) + goto fail; + + if (ioctl(fd, IOCTL_REQ(USB_GET_DEVICEINFO), &udi) == -1) { + if (ioctl(fd, IOCTL_REQ(HIDIOCGRAWINFO), &devinfo) == -1 || + ioctl(fd, IOCTL_REQ(HIDIOCGRAWNAME(128)), rawname) == -1 || + (di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(UHID_VENDOR)) == NULL || + (di->product = strdup(rawname)) == NULL) + goto fail; + di->vendor_id = devinfo.vendor; + di->product_id = devinfo.product; + } else { + if ((di->path = strdup(path)) == NULL || + (di->manufacturer = strdup(udi.udi_vendor)) == NULL || + (di->product = strdup(udi.udi_product)) == NULL) + goto fail; + di->vendor_id = (int16_t)udi.udi_vendorNo; + di->product_id = (int16_t)udi.udi_productNo; + } + + ok = 0; +fail: + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); + + if (ok < 0) { + free(di->path); + free(di->manufacturer); + free(di->product); + explicit_bzero(di, sizeof(*di)); + } + + return (ok); +} +#endif /* USE_HIDRAW */ + static int -copy_info(fido_dev_info_t *di, const char *path) +copy_info_uhid(fido_dev_info_t *di, const char *path) { int fd = -1; int ok = -1; @@ -81,14 +137,13 @@ copy_info(fido_dev_info_t *di, const char *path) (di->manufacturer = strdup(udi.udi_vendor)) == NULL || (di->product = strdup(udi.udi_product)) == NULL) goto fail; - di->vendor_id = (int16_t)udi.udi_vendorNo; di->product_id = (int16_t)udi.udi_productNo; ok = 0; fail: - if (fd != -1) - close(fd); + if (fd != -1 && close(fd) == -1) + fido_log_error(errno, "%s: close %s", __func__, path); if (ok < 0) { free(di->path); @@ -106,17 +161,35 @@ fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) char path[64]; size_t i; - *olen = 0; - if (ilen == 0) return (FIDO_OK); /* nothing to do */ if (devlist == NULL || olen == NULL) return (FIDO_ERR_INVALID_ARGUMENT); - for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) { + *olen = 0; + +#ifdef USE_HIDRAW + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { + snprintf(path, sizeof(path), "/dev/hidraw%zu", i); + if (copy_info_hidraw(&devlist[*olen], path) == 0) { + devlist[*olen].io = (fido_dev_io_t) { + fido_hid_open, + fido_hid_close, + fido_hid_read, + fido_hid_write, + }; + ++(*olen); + } + } + /* hidraw(4) is preferred over uhid(4) */ + if (*olen != 0) + return (FIDO_OK); +#endif /* USE_HIDRAW */ + + for (i = 0; i < MAX_UHID && *olen < ilen; i++) { snprintf(path, sizeof(path), "/dev/uhid%zu", i); - if (copy_info(&devlist[*olen], path) == 0) { + if (copy_info_uhid(&devlist[*olen], path) == 0) { devlist[*olen].io = (fido_dev_io_t) { fido_hid_open, fido_hid_close, @@ -153,6 +226,10 @@ fido_hid_open(const char *path) ugd.ugd_data = buf; ugd.ugd_maxlen = sizeof(buf); + /* + * N.B. if ctx->fd is an hidraw(4) device, the ioctl() below puts it in + * uhid(4) compat mode, which we need to keep fido_hid_write() as-is. + */ if ((r = ioctl(ctx->fd, IOCTL_REQ(USB_GET_REPORT_DESC), &ugd) == -1) || ugd.ugd_actlen > sizeof(buf) || fido_hid_get_report_len(ugd.ugd_data, ugd.ugd_actlen, From nobody Sat Sep 23 13:09: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 4Rt8cD5YXyz4tdrq; Sat, 23 Sep 2023 13:09: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 4Rt8cD50T9z3Yjg; Sat, 23 Sep 2023 13:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=edhydlNmPImtdvf1n/5TTxpeOPCkIAN6axcajkn1C3c=; b=Z1/fIBo4s1uwjZRXfMRhBBqZ1GIxsakhTr83YccmAJ8P/sjiT1ztnsmp6HuoeRzkjyMes8 NbVq9ZrIYHlN2uMDZhuPK5AQ3VmgEXLVRKbE8ugx4KygQFix4pVHFAmwbw7FzElPi/PMFP VSR8etwhwC/kWXBA8hw3nWc/CbECzhUn0EpyzngCSUll2IIwKWoXNk2np/TKElCKoLKBhu GoxoupEEXNzcDgrm0Ah2cySJcukdg7tM+KjxLQmoHqtbW8QkaVJFusdIrxjc+7zVF02eyK g02m67jNoXOYvjDt+KkKFuoDjhSUo1lc6yKwbWep9306BUkzwc5qtKPG5PazrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695474572; a=rsa-sha256; cv=none; b=LFGabTGMnezacPgignq17YPAa80xzfrJ+rF+va1cbQlwKWYu/MkaS5caoqBYXbJic0CLp2 koyMQLkXoRaPsUFgjIDZA59L5z5WGV9lQ4GZ0FsLLaR8VzGu5y1LLYgI9MSCFHZFLzpuO1 Awsho9Q+Pg+iKRDCNiBZCO7tvfVu9+UgcMibpTyy9qWRGr1dmNP1u6W4RNpHHgdoic3fU6 muSnMmXYYEoxIPS1jPmmtX0Rm7Jnzs+Ewizw0lF6YKOX9yiJXrVIwwsHuCFLrI7sejorM/ 13akd16vx2veEPPnOlF5MRzGF0DkeZbMkuEJKAqPmmoCfyZEgJQMhZTotRhQgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695474572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=edhydlNmPImtdvf1n/5TTxpeOPCkIAN6axcajkn1C3c=; b=JpnQy40TlUTFoz7ZSO180dmH8Sn7NtnEOFtONGWU17O/aBmRBDOjSE+hqnqOxMj9oIPyTG LGYJRs08qVysNschxodpaGSioinodgNdl6eIu1kWyLmpEtkfAJTnr6bmnV7pIdEAHJ08iJ E1wDb4DgQFZlXEbv1VKsF4ducxNHvgVpVo2I0EfFMCX0E6Z+FE4MweqcybDcJqGX2ZkR+Y HfweUD1RZM/Iv9tUWiGGIiX5kcA/jkb+Iqqoek9ar8q8ja0yH1rSushNQUI8ehzsUAfjkT 7lbvOcrDu8wQS8bNnYu1p9rVagzY2K+v79gd0or4gWuQ3pc9fIgJLX6NQuvD/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 4Rt8cD3xpyz14vW; Sat, 23 Sep 2023 13:09: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 38ND9WWq073899; Sat, 23 Sep 2023 13:09:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ND9W4N073896; Sat, 23 Sep 2023 13:09:32 GMT (envelope-from git) Date: Sat, 23 Sep 2023 13:09:32 GMT Message-Id: <202309231309.38ND9W4N073896@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: 95321fff46ec - releng/14.0 - libfido2: update to 1.13.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 95321fff46ec680708dc9c1ffe116757bee8ad78 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=95321fff46ec680708dc9c1ffe116757bee8ad78 commit 95321fff46ec680708dc9c1ffe116757bee8ad78 Author: Ed Maste AuthorDate: 2023-09-19 17:06:12 +0000 Commit: Ed Maste CommitDate: 2023-09-23 13:09:06 +0000 libfido2: update to 1.13.0 Some highlights from NEWS entries: ** Improved OpenSSL 3.0 compatibility. ** Support for hidraw(4) on FreeBSD; gh#597. ** Improved support for FIDO 2.1 authenticators. PR: 273596 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e) (cherry picked from commit 5bfbde817cdedbd7309c38a361cd1211bdcdd70e) Approved by: re (gjb) --- contrib/libfido2/CMakeLists.txt | 142 ++++++-- contrib/libfido2/LICENSE | 4 +- contrib/libfido2/NEWS | 41 +++ contrib/libfido2/README.adoc | 114 +++++-- contrib/libfido2/examples/CMakeLists.txt | 12 +- contrib/libfido2/examples/README.adoc | 17 +- contrib/libfido2/examples/assert.c | 33 +- contrib/libfido2/examples/cred.c | 29 +- contrib/libfido2/examples/extern.h | 8 +- contrib/libfido2/examples/info.c | 101 +++++- contrib/libfido2/examples/manifest.c | 1 + contrib/libfido2/examples/reset.c | 1 + contrib/libfido2/examples/retries.c | 3 +- contrib/libfido2/examples/select.c | 5 +- contrib/libfido2/examples/setpin.c | 3 +- contrib/libfido2/examples/util.c | 65 +++- contrib/libfido2/fuzz/CMakeLists.txt | 55 ++- contrib/libfido2/fuzz/Dockerfile | 22 +- contrib/libfido2/fuzz/Makefile | 35 +- contrib/libfido2/fuzz/README | 22 +- contrib/libfido2/fuzz/build-coverage | 7 +- contrib/libfido2/fuzz/clock.c | 1 + contrib/libfido2/fuzz/dummy.h | 5 +- contrib/libfido2/fuzz/export.gnu | 32 +- contrib/libfido2/fuzz/functions.txt | 404 ++++++++++++++--------- contrib/libfido2/fuzz/fuzz_assert.c | 43 ++- contrib/libfido2/fuzz/fuzz_bio.c | 5 +- contrib/libfido2/fuzz/fuzz_cred.c | 10 +- contrib/libfido2/fuzz/fuzz_credman.c | 5 +- contrib/libfido2/fuzz/fuzz_hid.c | 5 +- contrib/libfido2/fuzz/fuzz_largeblob.c | 5 +- contrib/libfido2/fuzz/fuzz_mgmt.c | 34 +- contrib/libfido2/fuzz/fuzz_netlink.c | 5 +- contrib/libfido2/fuzz/fuzz_pcsc.c | 269 +++++++++++++++ contrib/libfido2/fuzz/libfuzzer.c | 61 +++- contrib/libfido2/fuzz/mutator_aux.c | 21 +- contrib/libfido2/fuzz/mutator_aux.h | 22 +- contrib/libfido2/fuzz/pcsc.c | 153 +++++++++ contrib/libfido2/fuzz/preload-fuzz.c | 1 + contrib/libfido2/fuzz/preload-snoop.c | 1 + contrib/libfido2/fuzz/report.tgz | Bin 323706 -> 357005 bytes contrib/libfido2/fuzz/summary.txt | 77 +++-- contrib/libfido2/fuzz/udev.c | 3 +- contrib/libfido2/fuzz/wiredata_fido2.h | 77 ++++- contrib/libfido2/fuzz/wiredata_u2f.h | 1 + contrib/libfido2/fuzz/wrap.c | 67 +++- contrib/libfido2/fuzz/wrapped.sym | 10 + contrib/libfido2/man/CMakeLists.txt | 53 ++- contrib/libfido2/man/check.sh | 1 + contrib/libfido2/man/eddsa_pk_new.3 | 32 +- contrib/libfido2/man/es256_pk_new.3 | 32 +- contrib/libfido2/man/es384_pk_new.3 | 164 +++++++++ contrib/libfido2/man/fido2-assert.1 | 27 +- contrib/libfido2/man/fido2-cred.1 | 27 +- contrib/libfido2/man/fido2-token.1 | 51 ++- contrib/libfido2/man/fido_assert_allow_cred.3 | 45 ++- contrib/libfido2/man/fido_assert_new.3 | 37 ++- contrib/libfido2/man/fido_assert_set_authdata.3 | 33 +- contrib/libfido2/man/fido_assert_verify.3 | 33 +- contrib/libfido2/man/fido_bio_dev_get_info.3 | 27 +- contrib/libfido2/man/fido_bio_enroll_new.3 | 27 +- contrib/libfido2/man/fido_bio_info_new.3 | 27 +- contrib/libfido2/man/fido_bio_template.3 | 27 +- contrib/libfido2/man/fido_cbor_info_new.3 | 169 +++++++++- contrib/libfido2/man/fido_cred_exclude.3 | 45 ++- contrib/libfido2/man/fido_cred_new.3 | 29 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 46 ++- contrib/libfido2/man/fido_cred_verify.3 | 27 +- contrib/libfido2/man/fido_credman_metadata_new.3 | 27 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 38 ++- contrib/libfido2/man/fido_dev_get_assert.3 | 27 +- contrib/libfido2/man/fido_dev_get_touch_begin.3 | 27 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 31 +- contrib/libfido2/man/fido_dev_largeblob_get.3 | 34 +- contrib/libfido2/man/fido_dev_make_cred.3 | 27 +- contrib/libfido2/man/fido_dev_open.3 | 27 +- contrib/libfido2/man/fido_dev_set_io_functions.3 | 27 +- contrib/libfido2/man/fido_dev_set_pin.3 | 29 +- contrib/libfido2/man/fido_init.3 | 27 +- contrib/libfido2/man/fido_strerr.3 | 27 +- contrib/libfido2/man/rs256_pk_new.3 | 32 +- contrib/libfido2/openbsd-compat/bsd-asprintf.c | 88 +++++ contrib/libfido2/openbsd-compat/clock_gettime.c | 1 + contrib/libfido2/openbsd-compat/endian_win32.c | 1 + contrib/libfido2/openbsd-compat/openbsd-compat.h | 5 + contrib/libfido2/regress/CMakeLists.txt | 57 +++- contrib/libfido2/regress/assert.c | 14 +- contrib/libfido2/regress/compress.c | 268 +++++++++++++++ contrib/libfido2/regress/cred.c | 15 +- contrib/libfido2/regress/dev.c | 43 ++- contrib/libfido2/regress/eddsa.c | 159 +++++++++ contrib/libfido2/regress/es256.c | 199 +++++++++++ contrib/libfido2/regress/es384.c | 213 ++++++++++++ contrib/libfido2/regress/rs256.c | 201 +++++++++++ contrib/libfido2/src/CMakeLists.txt | 31 +- contrib/libfido2/src/aes256.c | 1 + contrib/libfido2/src/assert.c | 206 ++++++++---- contrib/libfido2/src/authkey.c | 26 +- contrib/libfido2/src/bio.c | 116 ++++--- contrib/libfido2/src/blob.c | 1 + contrib/libfido2/src/blob.h | 1 + contrib/libfido2/src/buf.c | 1 + contrib/libfido2/src/cbor.c | 52 ++- contrib/libfido2/src/compress.c | 145 +++++++- contrib/libfido2/src/config.c | 28 +- contrib/libfido2/src/cred.c | 45 ++- contrib/libfido2/src/credman.c | 162 +++++---- contrib/libfido2/src/dev.c | 229 +++---------- contrib/libfido2/src/diff_exports.sh | 1 + contrib/libfido2/src/ecdh.c | 1 + contrib/libfido2/src/eddsa.c | 14 +- contrib/libfido2/src/err.c | 1 + contrib/libfido2/src/es256.c | 66 ++-- contrib/libfido2/src/es384.c | 296 +++++++++++++++++ contrib/libfido2/src/export.gnu | 22 +- contrib/libfido2/src/export.llvm | 22 +- contrib/libfido2/src/export.msvc | 22 +- contrib/libfido2/src/extern.h | 30 +- contrib/libfido2/src/fallthrough.h | 21 ++ contrib/libfido2/src/fido.h | 46 ++- contrib/libfido2/src/fido/bio.h | 26 +- contrib/libfido2/src/fido/config.h | 26 +- contrib/libfido2/src/fido/credman.h | 26 +- contrib/libfido2/src/fido/eddsa.h | 28 +- contrib/libfido2/src/fido/err.h | 26 +- contrib/libfido2/src/fido/es256.h | 26 +- contrib/libfido2/src/fido/es384.h | 59 ++++ contrib/libfido2/src/fido/param.h | 57 +++- contrib/libfido2/src/fido/rs256.h | 26 +- contrib/libfido2/src/fido/types.h | 78 ++++- contrib/libfido2/src/hid.c | 1 + contrib/libfido2/src/hid_freebsd.c | 1 + contrib/libfido2/src/hid_hidapi.c | 13 +- contrib/libfido2/src/hid_linux.c | 50 ++- contrib/libfido2/src/hid_netbsd.c | 1 + contrib/libfido2/src/hid_openbsd.c | 101 +++--- contrib/libfido2/src/hid_osx.c | 26 +- contrib/libfido2/src/hid_unix.c | 1 + contrib/libfido2/src/hid_win.c | 5 +- contrib/libfido2/src/info.c | 171 +++++++++- contrib/libfido2/src/io.c | 26 +- contrib/libfido2/src/iso7816.c | 1 + contrib/libfido2/src/iso7816.h | 1 + contrib/libfido2/src/largeblob.c | 34 +- contrib/libfido2/src/log.c | 1 + contrib/libfido2/src/netlink.c | 1 + contrib/libfido2/src/netlink.h | 1 + contrib/libfido2/src/nfc.c | 350 ++++++++++++++++++++ contrib/libfido2/src/nfc_linux.c | 387 +++------------------- contrib/libfido2/src/packed.h | 1 + contrib/libfido2/src/pcsc.c | 394 ++++++++++++++++++++++ contrib/libfido2/src/pin.c | 77 +++-- contrib/libfido2/src/random.c | 1 + contrib/libfido2/src/reset.c | 1 + contrib/libfido2/src/rs1.c | 3 +- contrib/libfido2/src/rs256.c | 29 +- contrib/libfido2/src/time.c | 1 + contrib/libfido2/src/touch.c | 109 ++++++ contrib/libfido2/src/tpm.c | 3 +- contrib/libfido2/src/types.c | 17 +- contrib/libfido2/src/u2f.c | 93 ++++-- contrib/libfido2/src/util.c | 31 ++ contrib/libfido2/src/webauthn.h | 75 ++++- contrib/libfido2/src/winhello.c | 122 +++++-- contrib/libfido2/tools/CMakeLists.txt | 12 +- contrib/libfido2/tools/assert_get.c | 7 +- contrib/libfido2/tools/assert_verify.c | 30 +- contrib/libfido2/tools/base64.c | 1 + contrib/libfido2/tools/bio.c | 1 + contrib/libfido2/tools/config.c | 1 + contrib/libfido2/tools/cred_make.c | 7 +- contrib/libfido2/tools/cred_verify.c | 1 + contrib/libfido2/tools/credman.c | 1 + contrib/libfido2/tools/extern.h | 4 +- contrib/libfido2/tools/fido2-assert.c | 1 + contrib/libfido2/tools/fido2-attach.sh | 1 + contrib/libfido2/tools/fido2-cred.c | 1 + contrib/libfido2/tools/fido2-detach.sh | 1 + contrib/libfido2/tools/fido2-token.c | 1 + contrib/libfido2/tools/fido2-unprot.sh | 1 + contrib/libfido2/tools/include_check.sh | 1 + contrib/libfido2/tools/largeblob.c | 59 +++- contrib/libfido2/tools/pin.c | 26 +- contrib/libfido2/tools/test.sh | 46 +-- contrib/libfido2/tools/token.c | 159 ++++++++- contrib/libfido2/tools/util.c | 70 +++- contrib/libfido2/udev/70-u2f.rules | 39 ++- contrib/libfido2/udev/CMakeLists.txt | 1 + contrib/libfido2/udev/check.sh | 1 + contrib/libfido2/udev/fidodevs | 3 + contrib/libfido2/udev/genrules.awk | 32 +- contrib/libfido2/windows/build.ps1 | 32 +- contrib/libfido2/windows/const.ps1 | 14 +- contrib/libfido2/windows/cygwin.ps1 | 2 + contrib/libfido2/windows/release.ps1 | 30 +- lib/libfido2/Makefile | 6 +- 196 files changed, 7592 insertions(+), 1733 deletions(-) diff --git a/contrib/libfido2/CMakeLists.txt b/contrib/libfido2/CMakeLists.txt index 11a51ac5a645..6fa341a01cc6 100644 --- a/contrib/libfido2/CMakeLists.txt +++ b/contrib/libfido2/CMakeLists.txt @@ -1,6 +1,7 @@ -# Copyright (c) 2018-2021 Yubico AB. All rights reserved. +# Copyright (c) 2018-2022 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause # detect AppleClang; needs to come before project() cmake_policy(SET CMP0025 NEW) @@ -28,18 +29,19 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_COLOR_MAKEFILE OFF) set(CMAKE_VERBOSE_MAKEFILE ON) set(FIDO_MAJOR "1") -set(FIDO_MINOR "10") +set(FIDO_MINOR "13") set(FIDO_PATCH "0") set(FIDO_VERSION ${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}) +option(BUILD_TESTS "Build the regress tests" ON) option(BUILD_EXAMPLES "Build example programs" ON) option(BUILD_MANPAGES "Build man pages" ON) -option(BUILD_SHARED_LIBS "Build the shared library" ON) -option(BUILD_STATIC_LIBS "Build the static library" ON) +option(BUILD_SHARED_LIBS "Build a shared library" ON) +option(BUILD_STATIC_LIBS "Build a static library" ON) option(BUILD_TOOLS "Build tool programs" ON) option(FUZZ "Enable fuzzing instrumentation" OFF) -option(LIBFUZZER "Build libfuzzer harnesses" OFF) option(USE_HIDAPI "Use hidapi as the HID backend" OFF) +option(USE_PCSC "Enable experimental PCSC support" OFF) option(USE_WINHELLO "Abstract Windows Hello as a FIDO device" ON) option(NFC_LINUX "Enable NFC support on Linux" ON) @@ -47,6 +49,14 @@ add_definitions(-D_FIDO_MAJOR=${FIDO_MAJOR}) add_definitions(-D_FIDO_MINOR=${FIDO_MINOR}) add_definitions(-D_FIDO_PATCH=${FIDO_PATCH}) +if(BUILD_SHARED_LIBS) + set(_FIDO2_LIBRARY fido2_shared) +elseif(BUILD_STATIC_LIBS) + set(_FIDO2_LIBRARY fido2) +else() + message(FATAL_ERROR "Nothing to build (BUILD_*_LIBS=OFF)") +endif() + if(CYGWIN OR MSYS OR MINGW) set(WIN32 1) endif() @@ -66,7 +76,7 @@ if(NOT MSVC) if(APPLE) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DARWIN_C_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D__STDC_WANT_LIB_EXT1__=1") - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR MINGW OR CYGWIN) set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_GNU_SOURCE") set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DEFAULT_SOURCE") elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR @@ -91,6 +101,7 @@ check_include_files(sys/random.h HAVE_SYS_RANDOM_H) check_include_files(unistd.h HAVE_UNISTD_H) check_symbol_exists(arc4random_buf stdlib.h HAVE_ARC4RANDOM_BUF) +check_symbol_exists(asprintf stdio.h HAVE_ASPRINTF) check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) check_symbol_exists(explicit_bzero string.h HAVE_EXPLICIT_BZERO) check_symbol_exists(freezero stdlib.h HAVE_FREEZERO) @@ -116,6 +127,7 @@ try_compile(HAVE_POSIX_IOCTL list(APPEND CHECK_VARIABLES HAVE_ARC4RANDOM_BUF + HAVE_ASPRINTF HAVE_CBOR_H HAVE_CLOCK_GETTIME HAVE_ENDIAN_H @@ -147,7 +159,7 @@ foreach(v ${CHECK_VARIABLES}) endif() endforeach() -if(HAVE_EXPLICIT_BZERO AND NOT LIBFUZZER) +if(HAVE_EXPLICIT_BZERO AND NOT FUZZ) add_definitions(-DHAVE_EXPLICIT_BZERO) endif() @@ -155,19 +167,30 @@ if(UNIX) add_definitions(-DHAVE_DEV_URANDOM) endif() + if(MSVC) if((NOT CBOR_INCLUDE_DIRS) OR (NOT CBOR_LIBRARY_DIRS) OR - (NOT CBOR_BIN_DIRS) OR (NOT CRYPTO_INCLUDE_DIRS) OR - (NOT CRYPTO_LIBRARY_DIRS) OR (NOT CRYPTO_BIN_DIRS) OR - (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS) OR - (NOT ZLIB_BIN_DIRS)) + (NOT CRYPTO_INCLUDE_DIRS) OR (NOT CRYPTO_LIBRARY_DIRS) OR + (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS)) message(FATAL_ERROR "please define " - "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY,BIN}_DIRS when " + "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY}_DIRS when " "building under msvc") endif() - set(CBOR_LIBRARIES cbor) - set(ZLIB_LIBRARIES zlib) - set(CRYPTO_LIBRARIES crypto-47) + if(BUILD_TESTS AND BUILD_SHARED_LIBS AND + ((NOT CBOR_BIN_DIRS) OR (NOT ZLIB_BIN_DIRS) OR (NOT CRYPTO_BIN_DIRS))) + message(FATAL_ERROR "please define {CBOR,CRYPTO,ZLIB}_BIN_DIRS " + "when building tests") + endif() + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES cbor) + endif() + if(NOT ZLIB_LIBRARIES) + set(ZLIB_LIBRARIES zlib1) + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES crypto) + endif() + set(MSVC_DISABLED_WARNINGS_LIST "C4152" # nonstandard extension used: function/data pointer # conversion in expression; @@ -209,8 +232,12 @@ else() message(FATAL_ERROR "could not find zlib") endif() - set(CBOR_LIBRARIES "cbor") - set(CRYPTO_LIBRARIES "crypto") + if(NOT CBOR_LIBRARIES) + set(CBOR_LIBRARIES "cbor") + endif() + if(NOT CRYPTO_LIBRARIES) + set(CRYPTO_LIBRARIES "crypto") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") pkg_search_module(UDEV libudev REQUIRED) @@ -237,6 +264,17 @@ else() add_compile_options(-Wno-unused-parameter) endif() + if(FUZZ) + set(USE_PCSC ON) + add_definitions(-DFIDO_FUZZ) + endif() + + # If building with PCSC, look for pcsc-lite. + if(USE_PCSC AND NOT (APPLE OR CYGWIN OR MSYS OR MINGW)) + pkg_search_module(PCSC libpcsclite REQUIRED) + set(PCSC_LIBRARIES pcsclite) + endif() + if(USE_HIDAPI) add_definitions(-DUSE_HIDAPI) pkg_search_module(HIDAPI hidapi${HIDAPI_SUFFIX} REQUIRED) @@ -244,7 +282,7 @@ else() endif() if(NFC_LINUX) - add_definitions(-DNFC_LINUX) + add_definitions(-DUSE_NFC) endif() if(WIN32) @@ -263,16 +301,21 @@ else() add_compile_options(-Wwrite-strings) add_compile_options(-Wmissing-prototypes) add_compile_options(-Wbad-function-cast) + add_compile_options(-Wimplicit-fallthrough) add_compile_options(-pedantic) add_compile_options(-pedantic-errors) + set(EXTRA_CFLAGS "-Wconversion -Wsign-conversion") + if(WIN32) add_compile_options(-Wno-type-limits) add_compile_options(-Wno-cast-function-type) endif() + if(HAVE_SHORTEN_64_TO_32) add_compile_options(-Wshorten-64-to-32) endif() + if(HAVE_STACK_PROTECTOR_ALL) add_compile_options(-fstack-protector-all) endif() @@ -285,12 +328,8 @@ else() add_definitions(-DOPENSSL_API_COMPAT=0x10100000L) endif() - if(FUZZ) - add_definitions(-DFIDO_FUZZ) - endif() - - if(LIBFUZZER) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=fuzzer-no-link") + if(NOT FUZZ) + set(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wframe-larger-than=2047") endif() endif() @@ -309,6 +348,10 @@ elseif(WIN32) endif() add_definitions(-DTLS=${TLS}) +if(USE_PCSC) + add_definitions(-DUSE_PCSC) +endif() + # export list if(APPLE AND (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) @@ -345,16 +388,18 @@ else() " /def:\"${CMAKE_CURRENT_SOURCE_DIR}/src/export.msvc\"") endif() -include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${CBOR_INCLUDE_DIRS}) include_directories(${CRYPTO_INCLUDE_DIRS}) include_directories(${HIDAPI_INCLUDE_DIRS}) +include_directories(${PCSC_INCLUDE_DIRS}) include_directories(${UDEV_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS}) link_directories(${CBOR_LIBRARY_DIRS}) link_directories(${CRYPTO_LIBRARY_DIRS}) link_directories(${HIDAPI_LIBRARY_DIRS}) +link_directories(${PCSC_LIBRARY_DIRS}) link_directories(${UDEV_LIBRARY_DIRS}) link_directories(${ZLIB_LIBRARY_DIRS}) @@ -367,24 +412,41 @@ message(STATUS "BUILD_TOOLS: ${BUILD_TOOLS}") message(STATUS "CBOR_INCLUDE_DIRS: ${CBOR_INCLUDE_DIRS}") message(STATUS "CBOR_LIBRARIES: ${CBOR_LIBRARIES}") message(STATUS "CBOR_LIBRARY_DIRS: ${CBOR_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CBOR_BIN_DIRS: ${CBOR_BIN_DIRS}") +endif() message(STATUS "CBOR_VERSION: ${CBOR_VERSION}") message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") message(STATUS "CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}") message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") +message(STATUS "CMAKE_CROSSCOMPILING: ${CMAKE_CROSSCOMPILING}") +message(STATUS "CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}") +message(STATUS "CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}") +message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: ${CMAKE_HOST_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}") message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") message(STATUS "CRYPTO_INCLUDE_DIRS: ${CRYPTO_INCLUDE_DIRS}") message(STATUS "CRYPTO_LIBRARIES: ${CRYPTO_LIBRARIES}") message(STATUS "CRYPTO_LIBRARY_DIRS: ${CRYPTO_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "CRYPTO_BIN_DIRS: ${CRYPTO_BIN_DIRS}") +endif() message(STATUS "CRYPTO_VERSION: ${CRYPTO_VERSION}") message(STATUS "FIDO_VERSION: ${FIDO_VERSION}") message(STATUS "FUZZ: ${FUZZ}") +if(FUZZ) + message(STATUS "FUZZ_LDFLAGS: ${FUZZ_LDFLAGS}") +endif() message(STATUS "ZLIB_INCLUDE_DIRS: ${ZLIB_INCLUDE_DIRS}") message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}") message(STATUS "ZLIB_LIBRARY_DIRS: ${ZLIB_LIBRARY_DIRS}") +if(BUILD_TESTS) + message(STATUS "ZLIB_BIN_DIRS: ${ZLIB_BIN_DIRS}") +endif() message(STATUS "ZLIB_VERSION: ${ZLIB_VERSION}") if(USE_HIDAPI) message(STATUS "HIDAPI_INCLUDE_DIRS: ${HIDAPI_INCLUDE_DIRS}") @@ -392,7 +454,10 @@ if(USE_HIDAPI) message(STATUS "HIDAPI_LIBRARY_DIRS: ${HIDAPI_LIBRARY_DIRS}") message(STATUS "HIDAPI_VERSION: ${HIDAPI_VERSION}") endif() -message(STATUS "LIBFUZZER: ${LIBFUZZER}") +message(STATUS "PCSC_INCLUDE_DIRS: ${PCSC_INCLUDE_DIRS}") +message(STATUS "PCSC_LIBRARIES: ${PCSC_LIBRARIES}") +message(STATUS "PCSC_LIBRARY_DIRS: ${PCSC_LIBRARY_DIRS}") +message(STATUS "PCSC_VERSION: ${PCSC_VERSION}") message(STATUS "TLS: ${TLS}") message(STATUS "UDEV_INCLUDE_DIRS: ${UDEV_INCLUDE_DIRS}") message(STATUS "UDEV_LIBRARIES: ${UDEV_LIBRARIES}") @@ -400,29 +465,34 @@ message(STATUS "UDEV_LIBRARY_DIRS: ${UDEV_LIBRARY_DIRS}") message(STATUS "UDEV_RULES_DIR: ${UDEV_RULES_DIR}") message(STATUS "UDEV_VERSION: ${UDEV_VERSION}") message(STATUS "USE_HIDAPI: ${USE_HIDAPI}") +message(STATUS "USE_PCSC: ${USE_PCSC}") message(STATUS "USE_WINHELLO: ${USE_WINHELLO}") message(STATUS "NFC_LINUX: ${NFC_LINUX}") -subdirs(src) +if(BUILD_TESTS) + enable_testing() +endif() + +add_subdirectory(src) + +if(BUILD_TESTS) + add_subdirectory(regress) +endif() if(BUILD_EXAMPLES) - subdirs(examples) + add_subdirectory(examples) endif() if(BUILD_TOOLS) - subdirs(tools) + add_subdirectory(tools) endif() if(BUILD_MANPAGES) - subdirs(man) + add_subdirectory(man) endif() if(NOT WIN32) - if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FUZZ) - enable_testing() - subdirs(regress) - endif() if(FUZZ) - subdirs(fuzz) + add_subdirectory(fuzz) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - subdirs(udev) + add_subdirectory(udev) endif() endif() diff --git a/contrib/libfido2/LICENSE b/contrib/libfido2/LICENSE index 75a03f87e3af..ad0e13358930 100644 --- a/contrib/libfido2/LICENSE +++ b/contrib/libfido2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2022 Yubico AB. All rights reserved. +Copyright (c) 2018-2023 Yubico AB. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -22,3 +22,5 @@ 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. + +SPDX-License-Identifier: BSD-2-Clause diff --git a/contrib/libfido2/NEWS b/contrib/libfido2/NEWS index a48b685156c1..bf648aabfd92 100644 --- a/contrib/libfido2/NEWS +++ b/contrib/libfido2/NEWS @@ -1,3 +1,44 @@ +* Version 1.13.0 (2023-02-20) + ** Support for linking against OpenSSL on Windows; gh#668. + ** New API calls: + - fido_assert_empty_allow_list; + - fido_cred_empty_exclude_list. + ** fido2-token: fix issue when listing large blobs. + ** Improved support for different fuzzing engines. + +* Version 1.12.0 (2022-09-22) + ** Support for COSE_ES384. + ** Support for hidraw(4) on FreeBSD; gh#597. + ** Improved support for FIDO 2.1 authenticators. + ** New API calls: + - es384_pk_free; + - es384_pk_from_EC_KEY; + - es384_pk_from_EVP_PKEY; + - es384_pk_from_ptr; + - es384_pk_new; + - es384_pk_to_EVP_PKEY; + - fido_cbor_info_certs_len; + - fido_cbor_info_certs_name_ptr; + - fido_cbor_info_certs_value_ptr; + - fido_cbor_info_maxrpid_minpinlen; + - fido_cbor_info_minpinlen; + - fido_cbor_info_new_pin_required; + - fido_cbor_info_rk_remaining; + - fido_cbor_info_uv_attempts; + - fido_cbor_info_uv_modality. + ** Documentation and reliability fixes. + +* Version 1.11.0 (2022-05-03) + ** Experimental PCSC support; enable with -DUSE_PCSC. + ** Improved OpenSSL 3.0 compatibility. + ** Use RFC1951 raw deflate to compress CTAP 2.1 largeBlobs. + ** winhello: advertise "uv" instead of "clientPin". + ** winhello: support hmac-secret in fido_dev_get_assert(). + ** New API calls: + - fido_cbor_info_maxlargeblob. + ** Documentation and reliability fixes. + ** Separate build and regress targets. + * Version 1.10.0 (2022-01-17) ** hid_osx: handle devices with paths > 511 bytes; gh#462. ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*(); gh#480. diff --git a/contrib/libfido2/README.adoc b/contrib/libfido2/README.adoc index 114cc5eed762..44d559894dac 100644 --- a/contrib/libfido2/README.adoc +++ b/contrib/libfido2/README.adoc @@ -7,7 +7,7 @@ image:https://github.com/yubico/libfido2/workflows/fuzzer/badge.svg["Fuzz Status image:https://oss-fuzz-build-logs.storage.googleapis.com/badges/libfido2.svg["Fuzz Status (oss-fuzz)", link="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libfido2"] *libfido2* provides library functionality and command-line tools to -communicate with a FIDO device over USB, and to verify attestation and +communicate with a FIDO device over USB or NFC, and to verify attestation and assertion signatures. *libfido2* supports the FIDO U2F (CTAP 1) and FIDO2 (CTAP 2) protocols. @@ -23,8 +23,6 @@ file for the full license text. *libfido2* is known to work on Linux, macOS, Windows, OpenBSD, and FreeBSD. -NFC support is available on Linux and Windows. - === Documentation Documentation is available in troff and HTML formats. An @@ -38,19 +36,29 @@ is also available. * Perl: https://github.com/jacquesg/p5-FIDO-Raw[p5-FIDO-Raw] * Rust: https://github.com/PvdBerg1998/libfido2[libfido2] +=== Releases + +The current release of *libfido2* is 1.13.0. Signed release tarballs are +available at Yubico's +https://developers.yubico.com/libfido2/Releases[release page]. + +=== Dependencies + +*libfido2* depends on https://github.com/pjk/libcbor[libcbor], +https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. +On Linux, libudev +(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also +required. + === Installation -==== Releases +==== Fedora 35 and 34 -The current release of *libfido2* is 1.10.0. Please consult Yubico's -https://developers.yubico.com/libfido2/Releases[release page] for source -and binary releases. + $ sudo dnf install libfido2 libfido2-devel fido2-tools -==== Ubuntu 20.04 (Focal) +==== Ubuntu 22.04 (Jammy) and 20.04 (Focal) - $ sudo apt install libfido2-1 - $ sudo apt install libfido2-dev - $ sudo apt install libfido2-doc + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools Alternatively, newer versions of *libfido2* are available in Yubico's PPA. Follow the instructions for Ubuntu 18.04 (Bionic) below. @@ -60,13 +68,31 @@ Follow the instructions for Ubuntu 18.04 (Bionic) below. $ sudo apt install software-properties-common $ sudo apt-add-repository ppa:yubico/stable $ sudo apt update - $ sudo apt install libfido2-dev + $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools + +On Linux, you may need to add a udev rule to be able to access the FIDO +device. For example, the udev rule may contain the following: + +---- +#udev rule for allowing HID access to Yubico devices for FIDO support. + +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ + MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" +---- ==== macOS $ brew install libfido2 -Or from source, on UNIX-like systems: +==== Windows + +Please consult Yubico's +https://developers.yubico.com/libfido2/Releases[release page] for ARM, ARM64, +Win32, and Win64 artefacts. + +=== Building from source + +On UNIX-like systems: $ cmake -B build $ make -C build @@ -74,23 +100,45 @@ Or from source, on UNIX-like systems: Depending on the platform, https://www.freedesktop.org/wiki/Software/pkg-config/[pkg-config] may need to -be installed, or the PKG_CONFIG_PATH environment variable set. - -*libfido2* depends on https://github.com/pjk/libcbor[libcbor], -https://www.openssl.org[OpenSSL] 1.1 or newer, and https://zlib.net[zlib]. -On Linux, libudev -(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also -required. - -For complete, OS-specific installation instructions, please refer to the -`.actions/` (Linux, macOS) and `windows/` directories. - -On Linux, you will need to add a udev rule to be able to access the FIDO -device, or run as root. For example, the udev rule may contain the following: - ----- -#udev rule for allowing HID access to Yubico devices for FIDO support. - -KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \ - MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050" ----- +be installed, or the PKG_CONFIG_PATH environment variable set. For complete, +OS-specific build instructions, please refer to the `.actions/` +(Linux, macOS, BSD) and `windows/` directories. + +=== Build-time Customisation + +*libfido2* supports a number of CMake options. Some of the options require +additional dependencies. Options that are disabled by default are not +officially supported. + +[%autowidth.stretch] +|=== +|*Option* |*Description* |*Default* +| BUILD_EXAMPLES | Build example programs | ON +| BUILD_MANPAGES | Build man pages | ON +| BUILD_SHARED_LIBS | Build a shared library | ON +| BUILD_STATIC_LIBS | Build a static library | ON +| BUILD_TOOLS | Build auxiliary tools | ON +| FUZZ | Enable fuzzing instrumentation | OFF +| NFC_LINUX | Enable netlink NFC support on Linux | ON +| USE_HIDAPI | Use hidapi as the HID backend | OFF +| USE_PCSC | Enable experimental PCSC support | OFF +| USE_WINHELLO | Abstract Windows Hello as a FIDO device | ON +|=== + +The USE_HIDAPI option requires https://github.com/libusb/hidapi[hidapi]. The +USE_PCSC option requires https://github.com/LudovicRousseau/PCSC[pcsc-lite] on +Linux. + +=== Development + +Please use https://github.com/Yubico/libfido2/discussions[GitHub Discussions] +to ask questions and suggest features, and +https://github.com/Yubico/libfido2/pulls[GitHub pull-requests] for code +contributions. + +=== Reporting bugs + +Please use https://github.com/Yubico/libfido2/issues[GitHub Issues] to report +bugs. To report security issues, please contact security@yubico.com. A PGP +public key can be found at +https://www.yubico.com/support/security-advisories/issue-rating-system/. diff --git a/contrib/libfido2/examples/CMakeLists.txt b/contrib/libfido2/examples/CMakeLists.txt index ad3d44faad6b..f013df4e71ec 100644 --- a/contrib/libfido2/examples/CMakeLists.txt +++ b/contrib/libfido2/examples/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright (c) 2018 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause list(APPEND COMPAT_SOURCES ../openbsd-compat/clock_gettime.c @@ -13,17 +14,6 @@ if(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MSYS) list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c) endif() -# set the library to link against -if(BUILD_STATIC_LIBS) - # drop -rdynamic - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") - set(_FIDO2_LIBRARY fido2) -elseif(BUILD_SHARED_LIBS) - set(_FIDO2_LIBRARY fido2_shared) -else() - set(_FIDO2_LIBRARY ${CRYPTO_LIBRARIES} fido2) -endif() - # enable -Wconversion -Wsign-conversion if(NOT MSVC) set_source_files_properties(assert.c cred.c info.c manifest.c reset.c diff --git a/contrib/libfido2/examples/README.adoc b/contrib/libfido2/examples/README.adoc index 44ee52743a0d..d44218c2cf87 100644 --- a/contrib/libfido2/examples/README.adoc +++ b/contrib/libfido2/examples/README.adoc @@ -20,8 +20,7 @@ The following definitions are used in the description below: - - The file system path of a file containing a NIST P-256 public key in - PEM format. + The file system path of a file containing a public key in PEM format. - @@ -48,8 +47,8 @@ The following examples are provided: Configures as the new PIN of . If [oldpin] is provided, the device's PIN is changed from [oldpin] to . -- cred [-t ecdsa|rsa|eddsa] [-k pubkey] [-ei cred_id] [-P pin] [-T seconds] - [-b blobkey] [-hruv] +- cred [-t es256|es384|rs256|eddsa] [-k pubkey] [-ei cred_id] [-P pin] + [-T seconds] [-b blobkey] [-hruv] Creates a new credential on and verify that the credential was signed by the authenticator. The device's attestation certificate @@ -66,14 +65,16 @@ The following examples are provided: option -b is specified, the credential's "largeBlob" key is stored in . -- assert [-t ecdsa|rsa|eddsa] [-a cred_id] [-h hmac_secret] [-s hmac_salt] - [-P pin] [-T seconds] [-b blobkey] [-puv] +- assert [-t es256|es384|rs256|eddsa] [-a cred_id] [-h hmac_secret] [-P pin] + [-s hmac_salt] [-T seconds] [-b blobkey] [-puv] Asks for a FIDO2 assertion corresponding to [cred_id], which may be omitted for resident keys. The obtained assertion is verified using . The -p option requests that the user - be present. User verification may be requested through the -v - option. If option -u is specified, the assertion is generated using + be present and checks whether the user presence bit was signed by the + authenticator. The -v option requests user verification and checks + whether the user verification bit was signed by the authenticator. + If option -u is specified, the assertion is generated using U2F (CTAP1) instead of FIDO2 (CTAP2) commands. If option -s is specified, a FIDO2 hmac-secret is requested from the authenticator, and the contents of are used as the salt. If option -h diff --git a/contrib/libfido2/examples/assert.c b/contrib/libfido2/examples/assert.c index 8b0dbd9f6eb2..32ba97b2fca3 100644 --- a/contrib/libfido2/examples/assert.c +++ b/contrib/libfido2/examples/assert.c @@ -1,11 +1,13 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include #include +#include #include #include @@ -30,9 +32,9 @@ static const unsigned char cd[32] = { static void usage(void) { - fprintf(stderr, "usage: assert [-t ecdsa|rsa|eddsa] [-a cred_id] " - "[-h hmac_secret] [-s hmac_salt] [-P pin] [-T seconds] " - "[-b blobkey] [-puv] \n"); + fprintf(stderr, "usage: assert [-t es256|es384|rs256|eddsa] " + "[-a cred_id] [-h hmac_secret] [-s hmac_salt] [-P pin] " + "[-T seconds] [-b blobkey] [-puv] \n"); exit(EXIT_FAILURE); } @@ -46,6 +48,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, RSA *rsa = NULL; EVP_PKEY *eddsa = NULL; es256_pk_t *es256_pk = NULL; + es384_pk_t *es384_pk = NULL; rs256_pk_t *rs256_pk = NULL; eddsa_pk_t *eddsa_pk = NULL; void *pk; @@ -67,6 +70,21 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, EC_KEY_free(ec); ec = NULL; + break; + case COSE_ES384: + if ((ec = read_ec_pubkey(key)) == NULL) + errx(1, "read_ec_pubkey"); + + if ((es384_pk = es384_pk_new()) == NULL) + errx(1, "es384_pk_new"); + + if (es384_pk_from_EC_KEY(es384_pk, ec) != FIDO_OK) + errx(1, "es384_pk_from_EC_KEY"); + + pk = es384_pk; + EC_KEY_free(ec); + ec = NULL; + break; case COSE_RS256: if ((rsa = read_rsa_pubkey(key)) == NULL) @@ -147,6 +165,7 @@ verify_assert(int type, const unsigned char *authdata_ptr, size_t authdata_len, errx(1, "fido_assert_verify: %s (0x%x)", fido_strerr(r), r); es256_pk_free(&es256_pk); + es384_pk_free(&es384_pk); rs256_pk_free(&rs256_pk); eddsa_pk_free(&eddsa_pk); @@ -219,9 +238,11 @@ main(int argc, char **argv) body = NULL; break; case 't': - if (strcmp(optarg, "ecdsa") == 0) + if (strcmp(optarg, "es256") == 0) type = COSE_ES256; - else if (strcmp(optarg, "rsa") == 0) + else if (strcmp(optarg, "es384") == 0) + type = COSE_ES384; + else if (strcmp(optarg, "rs256") == 0) type = COSE_RS256; else if (strcmp(optarg, "eddsa") == 0) type = COSE_EDDSA; diff --git a/contrib/libfido2/examples/cred.c b/contrib/libfido2/examples/cred.c index 4a9d8bf4b25a..576900d97786 100644 --- a/contrib/libfido2/examples/cred.c +++ b/contrib/libfido2/examples/cred.c @@ -1,7 +1,8 @@ /* - * Copyright (c) 2018-2021 Yubico AB. All rights reserved. + * Copyright (c) 2018-2022 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include @@ -34,7 +35,7 @@ static const unsigned char user_id[32] = { static void usage(void) { - fprintf(stderr, "usage: cred [-t ecdsa|rsa|eddsa] [-k pubkey] " + fprintf(stderr, "usage: cred [-t es256|es384|rs256|eddsa] [-k pubkey] " "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-hruv] " "\n"); exit(EXIT_FAILURE); @@ -107,15 +108,23 @@ out: if (key_out != NULL) { /* extract the credential pubkey */ if (type == COSE_ES256) { - if (write_ec_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_es256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), fido_cred_pubkey_len(cred)) < 0) - errx(1, "write_ec_pubkey"); + errx(1, "write_es256_pubkey"); + } else if (type == COSE_ES384) { + if (write_es384_pubkey(key_out, + fido_cred_pubkey_ptr(cred), + fido_cred_pubkey_len(cred)) < 0) + errx(1, "write_es384_pubkey"); } else if (type == COSE_RS256) { - if (write_rsa_pubkey(key_out, fido_cred_pubkey_ptr(cred), + if (write_rs256_pubkey(key_out, + fido_cred_pubkey_ptr(cred), *** 14699 LINES SKIPPED *** From nobody Sat Sep 23 18:22: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 4RtHYF27kTz4v3Pb; Sat, 23 Sep 2023 18:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtHYF1Wbzz4kZ5; Sat, 23 Sep 2023 18:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXnEXDlxKmsjh+VMNe5JeIEZ8D5buvNGZHUlztcMKCE=; b=lAfDPjUbzLJHLznAWg7CydYVSuLcmcOHww9c349tFmAutjN5reTyHPqMSiShEZax67GNYB BYM6HtyRQzrw5tcqiRXk659XQMOzZkMk2nNyeL+vn0AUkktUuVS5xb2d/ofDvvPQa6gkdX 9Exoj8yjjYNJNByv9LNsmTe1QQzxAqlBugRcCCkvLIN/zKWsZ9cy6IE1oPVt/ewXRCzxeX ZrL2CmQRuaFShebVEvPeLSpAciUzATCUbLVTHQkZVXQffX3bxZIwPAlOhe6ZAz8tW3rYY4 aAlc4oC1vrMN9bxdw4mPRhFCspOl0WzcKM7+VKHJADjIceN96IMvT0PRxuNRIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493345; a=rsa-sha256; cv=none; b=hcjXXa0UfsAxC7Y3HLovo5KJBokK8Qvkdry3wTJpYElXvOgl31MWLuEaILJaaFVFO/NqaM WlVSG2EU3eGpHDwXcPpIJzdit0MUbT+GxE7kVlQ5tdhqz5Xh6QU/XtPuTrvBWFzk3v+ULW N+ld/mX73NfgIzRBSzPe7+qpFDfrgXX0dLUXzPWqbJ8fg0/O4TDhXBhFOT/V8qiExiQkR3 O/kCig98OlP0KJk6ApeQ8bA9xCTN6b4ZMgbVysARx28h3sXSA4xzkSMHgpIdFrAXgMYc49 X/mM72JicESpFnceVELOIIzCMrSAicNMzD6TyYtp/i2pVijN1SNv9LU5WWJYOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXnEXDlxKmsjh+VMNe5JeIEZ8D5buvNGZHUlztcMKCE=; b=YiBpqsC3491rQ5JNi+mDhOx4yd7Wc2Y4dsUAWNIVWbUGixSwPir8K7UTHdtFTn7v/dnC2G VuB+/LjO32lvILqiAQonXfW9Vc2Dvfjg1kBKrl87VRiXIaooPNw4g16akazjN4zKkWJU5y kmzBPEwVEqnEch0FR8hTG6CAdbATxBgryc18y1MPPddRmFAPiAJZ8aZeXRL3VX7YgPySgi jjDlpHIfq/KFkHUsfu8bKB19bhABhFTnz1gXyDDfDBD3Vc0GLk4Z6Crok1vI/+bhZfk+Uk DZYAuzudSd0d+AMmCYWFADwD0q1I5TbSDx+WnGvhxfK4JtFeBKtRXOQo9zJkuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYF0VCCzMx; Sat, 23 Sep 2023 18:22: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 38NIMOXV003672; Sat, 23 Sep 2023 18:22:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMO6X003669; Sat, 23 Sep 2023 18:22:24 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:24 GMT Message-Id: <202309231822.38NIMO6X003669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: feda2297b753 - stable/14 - lib/libc/amd64/string: add strcspn(3) scalar, x86-64-v2 implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: feda2297b753f2cf3590a8be154397c4462fc615 Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=feda2297b753f2cf3590a8be154397c4462fc615 commit feda2297b753f2cf3590a8be154397c4462fc615 Author: Robert Clausecker AuthorDate: 2023-08-13 17:35:01 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:19:28 +0000 lib/libc/amd64/string: add strcspn(3) scalar, x86-64-v2 implementation This changeset adds both a scalar and an x86-64-v2 implementation of the strcspn(3) function to libc. A baseline implementation does not appear to be feasible given the requirements of the function. The scalar implementation is similar to the generic libc implementation, but expands the bit set into a byte set to reduce latency, improving performance. This approach could probably be backported to the generic C version to benefit other platforms. The x86-64-v2 implementation is built around the infamous pcmpistri instruction. An alternative implementation based on the MuÅ‚a/Langdale algorithm [1] was prototyped, but performed worse than the pcmpistri approach except for sets of more than 16 characters with long input strings. All implementations provide special cases for the empty set (reduces to strlen as well as single-character sets (reduces to strchr). The x86-64-v2 kernel falls back to the scalar implementation for sets of more than 32 characters. This limit could be raised by additional multiples of 16 through the use of additional pcmpistri code paths, but I consider this case to be too rare to be of importance. This includes the bug fix from 52d4a4d. [1]: http://0x80.pl/articles/simd-byte-lookup.html Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41557 (cherry picked from commit 474408bb7933f0383a0da2b01e717bfe683ae77c) (cherry picked from commit 52d4a4d4e0dedc72bc33082a3f84c2d0fd6f2cbb) --- lib/libc/amd64/string/Makefile.inc | 1 + lib/libc/amd64/string/strcspn.S | 373 +++++++++++++++++++++++++++++++++++++ 2 files changed, 374 insertions(+) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index 4df4ff8f1417..f01a52d9ebea 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -10,5 +10,6 @@ MDSRCS+= \ strcat.S \ strchrnul.S \ strcmp.S \ + strcspn.S \ strlen.S \ strcpy.c diff --git a/lib/libc/amd64/string/strcspn.S b/lib/libc/amd64/string/strcspn.S new file mode 100644 index 000000000000..53100eeea9a5 --- /dev/null +++ b/lib/libc/amd64/string/strcspn.S @@ -0,0 +1,373 @@ +/* + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 "amd64_archlevel.h" + +#define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ + +ARCHFUNCS(strcspn) + ARCHFUNC(strcspn, scalar) + NOARCHFUNC + ARCHFUNC(strcspn, x86_64_v2) +ENDARCHFUNCS(strcspn) + +ARCHENTRY(strcspn, scalar) + push %rbp # align stack to enable function call + mov %rsp, %rbp + sub $256, %rsp # allocate space for lookup table + + /* check for special cases */ + movzbl (%rsi), %eax # first character in the set + test %eax, %eax + jz .Lstrlen + + movzbl 1(%rsi), %edx # second character in the set + test %edx, %edx + jz .Lstrchr + + /* no special case matches -- prepare lookup table */ + xor %r8d, %r8d + mov $28, %ecx +0: mov %r8, (%rsp, %rcx, 8) + mov %r8, 8(%rsp, %rcx, 8) + mov %r8, 16(%rsp, %rcx, 8) + mov %r8, 24(%rsp, %rcx, 8) + sub $4, %ecx + jnc 0b + + add $2, %rsi + movb $1, (%rsp, %rax, 1) # register first chars in set + movb $1, (%rsp, %rdx, 1) + mov %rdi, %rax # a copy of the source to iterate over + + /* process remaining chars in set */ + ALIGN_TEXT +0: movzbl (%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + movzbl 1(%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + add $2, %rsi + jmp 0b + + /* find match */ + ALIGN_TEXT +1: movzbl (%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 2f + + movzbl 1(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 3f + + movzbl 2(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 4f + + movzbl 3(%rax), %ecx + add $4, %rax + cmpb $0, (%rsp, %rcx, 1) + je 1b + + sub $3, %rax +4: dec %rdi +3: inc %rax +2: sub %rdi, %rax # number of characters preceding match + leave + ret + + /* set is empty, degrades to strlen */ +.Lstrlen: + leave + jmp CNAME(strlen) + + /* just one character in set, degrades to strchr */ +.Lstrchr: + mov %rdi, (%rsp) # stash a copy of the string + mov %eax, %esi # find the character in the set + call CNAME(strchrnul) + sub (%rsp), %rax # length of prefix before match + leave + ret +ARCHEND(strcspn, scalar) + + /* + * This kernel uses pcmpistri to do the heavy lifting. + * We provide five code paths, depending on set size: + * + * 0: call strlen() + * 1: call strchr() + * 2--16: one pcmpistri per 16 bytes of input + * 17--32: two pcmpistri per 16 bytes of input + * >=33: fall back to look up table + */ +ARCHENTRY(strcspn, x86_64_v2) + push %rbp + mov %rsp, %rbp + sub $256, %rsp + + /* check for special cases */ + movzbl (%rsi), %eax + test %eax, %eax # empty string? + jz .Lstrlenv2 + + cmpb $0, 1(%rsi) # single character string? + jz .Lstrchrv2 + + /* find set size and copy up to 32 bytes to (%rsp) */ + mov %esi, %ecx + and $~0xf, %rsi # align set pointer + movdqa (%rsi), %xmm0 + pxor %xmm1, %xmm1 + and $0xf, %ecx # amount of bytes rsi is past alignment + xor %edx, %edx + pcmpeqb %xmm0, %xmm1 # end of string reached? + movdqa %xmm0, 32(%rsp) # transfer head of set to stack + pmovmskb %xmm1, %eax + shr %cl, %eax # clear out junk before string + test %eax, %eax # end of set reached? + jnz 0f + + movdqa 16(%rsi), %xmm0 # second chunk of the set + mov $16, %edx + sub %ecx, %edx # length of set preceding xmm0 + pxor %xmm1, %xmm1 + pcmpeqb %xmm0, %xmm1 + movdqa %xmm0, 48(%rsp) + movdqu 32(%rsp, %rcx, 1), %xmm2 # head of set + pmovmskb %xmm1, %eax + test %eax, %eax + jnz 1f + + movdqa 32(%rsi), %xmm0 # third chunk + add $16, %edx + pxor %xmm1, %xmm1 + pcmpeqb %xmm0, %xmm1 + movdqa %xmm0, 64(%rsp) + pmovmskb %xmm1, %eax + test %eax, %eax # still not done? + jz .Lgt32v2 + +0: movdqu 32(%rsp, %rcx, 1), %xmm2 # head of set +1: tzcnt %eax, %eax + add %eax, %edx # length of set (excluding NUL byte) + cmp $32, %edx # above 32 bytes? + ja .Lgt32v2 + + /* + * At this point we know that we want to use pcmpistri. + * one last problem obtains: the head of the string is not + * aligned and may cross a cacheline. If this is the case, + * we take the part before the page boundary and repeat the + * last byte to fill up the xmm register. + */ + mov %rdi, %rax # save original string pointer + lea 15(%rdi), %esi # last byte of the head + xor %edi, %esi + test $PAGE_SIZE, %esi # does the head cross a page? + jz 0f + + /* head crosses page: copy to stack to fix up */ + and $~0xf, %rax # align head pointer temporarily + movzbl 15(%rax), %esi # last head byte on the page + movdqa (%rax), %xmm0 + movabs $0x0101010101010101, %r8 + imul %r8, %rsi # repeated 8 times + movdqa %xmm0, (%rsp) # head word on stack + mov %rsi, 16(%rsp) # followed by filler (last byte x8) + mov %rsi, 24(%rsp) + mov %edi, %eax + and $0xf, %eax # offset of head from alignment + add %rsp, %rax # pointer to fake head + +0: movdqu (%rax), %xmm0 # load head (fake or real) + lea 16(%rdi), %rax + and $~0xf, %rax # second 16 bytes of string (aligned) +1: cmp $16, %edx # 16--32 bytes? + ja .Lgt16v2 + + + /* set is 2--16 bytes in size */ + + /* _SIDD_UBYTE_OPS|_SIDD_CMP_EQUAL_ANY|_SIDD_LEAST_SIGNIFICANT */ + pcmpistri $0, %xmm0, %xmm2 # match in head? + jbe .Lheadmatchv2 + + ALIGN_TEXT +0: pcmpistri $0, (%rax), %xmm2 + jbe 1f # match or end of string? + pcmpistri $0, 16(%rax), %xmm2 + lea 32(%rax), %rax + ja 0b # match or end of string? + +3: lea -16(%rax), %rax # go back to second half +1: jc 2f # jump if match found + movdqa (%rax), %xmm0 # reload string piece + pxor %xmm1, %xmm1 + pcmpeqb %xmm1, %xmm0 # where is the NUL byte? + pmovmskb %xmm0, %ecx + tzcnt %ecx, %ecx # location of NUL byte in (%rax) +2: sub %rdi, %rax # offset of %xmm0 from beginning of string + add %rcx, %rax # prefix length before match/NUL + leave + ret + +.Lheadmatchv2: + jc 2f # jump if match found + pxor %xmm1, %xmm1 + pcmpeqb %xmm1, %xmm0 + pmovmskb %xmm0, %ecx + tzcnt %ecx, %ecx # location of NUL byte +2: mov %ecx, %eax # prefix length before match/NUL + leave + ret + +.Lgt16v2: + movdqu 48(%rsp, %rcx, 1), %xmm3 # second part of set + + /* set is 17--32 bytes in size */ + pcmpistri $0, %xmm0, %xmm2 # match in first set half? + jb .Lheadmatchv2 + pcmpistri $0, %xmm0, %xmm3 # match in second set half or end of string? + jbe .Lheadmatchv2 + + ALIGN_TEXT +0: movdqa (%rax), %xmm0 + pcmpistri $0, %xmm0, %xmm2 + jb 2f # match in first set half? + pcmpistri $0, %xmm0, %xmm3 + jbe 1f # match in second set half or end of string? + movdqa 16(%rax), %xmm0 + add $32, %rax + pcmpistri $0, %xmm0, %xmm2 + jb 3f # match in first set half? + pcmpistri $0, %xmm0, %xmm3 + ja 0b # neither match in 2nd half nor string end? + +3: lea -16(%rax), %rax # go back to second half +1: jc 2f # jump if match found + pxor %xmm1, %xmm1 + pcmpeqb %xmm1, %xmm0 # where is the NUL byte? + pmovmskb %xmm0, %ecx + tzcnt %ecx, %ecx # location of NUL byte in (%rax) +2: sub %rdi, %rax # offset of %xmm0 from beginning of string + add %rcx, %rax # prefix length before match/NUL + leave + ret + + /* set is empty, degrades to strlen */ +.Lstrlenv2: + leave + jmp CNAME(strlen) + + /* just one character in set, degrades to strchr */ +.Lstrchrv2: + mov %rdi, (%rsp) # stash a copy of the string + mov %eax, %esi # find this character + call CNAME(strchrnul) + sub (%rsp), %rax # length of prefix before match + leave + ret + + /* set is >=33 bytes in size */ +.Lgt32v2: + xorps %xmm0, %xmm0 + mov $256-64, %edx + + /* clear out look up table */ +0: movaps %xmm0, (%rsp, %rdx, 1) + movaps %xmm0, 16(%rsp, %rdx, 1) + movaps %xmm0, 32(%rsp, %rdx, 1) + movaps %xmm0, 48(%rsp, %rdx, 1) + sub $64, %edx + jnc 0b + + add %rcx, %rsi # restore string pointer + mov %rdi, %rax # keep a copy of the string + + /* initialise look up table */ + ALIGN_TEXT +0: movzbl (%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + movzbl 1(%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + movzbl 2(%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + movzbl 3(%rsi), %ecx + movb $1, (%rsp, %rcx, 1) + test %ecx, %ecx + jz 1f + + add $4, %rsi + jmp 0b + + /* find match */ + ALIGN_TEXT +1: movzbl (%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 2f + + movzbl 1(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 3f + + movzbl 2(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + jne 4f + + movzbl 3(%rax), %ecx + add $4, %rax + cmpb $0, (%rsp, %rcx, 1) + je 1b + + sub $3, %rax +4: dec %rdi +3: inc %rax +2: sub %rdi, %rax # number of characters preceding match + leave + ret +ARCHEND(strcspn, x86_64_v2) + + .section .note.GNU-stack,"",%progbits From nobody Sat Sep 23 18:22: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 4RtHYG3Y1Qz4v3WD; Sat, 23 Sep 2023 18:22: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 4RtHYG2WcKz4kj8; Sat, 23 Sep 2023 18:22:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvUvXqeehHNe7UARkRiNcmrzN/FslmVxyclXjmrKKr4=; b=crjQtYrsxQpcLiVI/vGB2hgScbsaaCjzmypC6m7wdoqOLb9/5oCiPW6wNWwZqhXQMRd+w6 qSYmyVyOdKRVFe01vy19gj3OGCnngZRvISOz/np5m26HI5MQWjom5qUJxcRS6sZEFBMJ9/ IAvKVCoO8PbYqcywHZ4GZL4ugg1aTybeodS5oVyt1/fce16SbzYr1cEj/mX9QZPZqrrtF8 C1q0HBmQ3i9xqC3J5n+xBGhXSvAOAN+54ZCtYNGqSIcoDS1jZzFd4ee1Yoq5BO50MoI7oR cl1YhZXBO+kGPV6vZfnDHrxh/w89d+4qvu/HTkVKOMsyE8gzV2M3XOA8qO/V7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493346; a=rsa-sha256; cv=none; b=kjKQWQM44tdLZG2P02Lyjjh/cTEWrFTYXZyH/jQaA4l3Evb03v0aWgS0U3gKN3vn4Aop7k iHuRNw1G3YRHuYQrSZ+Ks1PKj7fnSvfcn6n+SAVem/VBRuiV2P/8OC8NlQyV77JV41nuI1 coUpcs/W0spWqzfsLK0KZnVXLdUEyNvSwn3cOPawxX6OTWjyfgXmBiqckakhjQ05H4igLP R2oDIEj1YgaAMt2n1jifK0SeHjq7hupX92CteS8LwwnfwACJpiNMPjNiQoTGgq9dqK87Zd FSZBOMUfz9pDWJKl/8Lh0NKaMLJGjjzom75nHwQV7yKM8k0kGlCPa7aIuUE+pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvUvXqeehHNe7UARkRiNcmrzN/FslmVxyclXjmrKKr4=; b=HTBdw5/nZoooaE9WkLBdmxig4DVfyMgdNPel12vwK4B/q9fkkiIiiENKwOURH1oLLk1ct/ /4MQldL1PUP+AK6P3vAiAl+WLLlBzIT/MGlbq91MNBJg1X0hTUl7G/NpDe7dnq35W1MsVm jK70CGR5ReqhoyJT9WnSZ4kwRvpKFAnCMxWZJgF3GQuscsbYQOHJQMQlH2vMH42NK0dVJg GGwraIo+tEX01ZC34JhXgGWupB5bRfATNoKgi/aLI7445unHmdLv77BxC3dySgUhkx+GYM rmBShtSi3gMCvmhcV2rrzGK/9f2JLQOYFS6DE0V5HuO6Nc8Z5k8NfrSLTekaPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYG1QsGzq4; Sat, 23 Sep 2023 18:22: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 38NIMQeb003724; Sat, 23 Sep 2023 18:22:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMQHI003721; Sat, 23 Sep 2023 18:22:26 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:26 GMT Message-Id: <202309231822.38NIMQHI003721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 903c95aa6183 - stable/14 - share/man/man7/simd.7: document simd-enhanced strcspn(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 903c95aa61832bd477d8c2e6f4d19ccaf2709096 Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=903c95aa61832bd477d8c2e6f4d19ccaf2709096 commit 903c95aa61832bd477d8c2e6f4d19ccaf2709096 Author: Robert Clausecker AuthorDate: 2023-08-20 21:31:32 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:27 +0000 share/man/man7/simd.7: document simd-enhanced strcspn(3) Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41557 (cherry picked from commit 5fe2597b23191d49856b1739eef29e383872faf9) --- share/man/man7/simd.7 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index bf33d4eb5531..efa1306898ca 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd August 13, 2023 +.Dd August 14, 2023 .Dt SIMD 7 .Os .Sh NAME @@ -69,6 +69,7 @@ Enhanced functions are present in the following architectures: .It strchrnul Ta Ta Ta S1 .It strcmp Ta Ta S Ta S Ta S .It strcpy Ta Ta Ta S1 Ta S Ta S2 +.It strcspn Ta Ta Ta S2 .It strlen Ta Ta S Ta S1 .It strncmp Ta Ta S Ta Ta S .It strncpy Ta Ta Ta Ta Ta S2 From nobody Sat Sep 23 18:22: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 4RtHYH4fNtz4v3WF; Sat, 23 Sep 2023 18:22: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 4RtHYH3Qvqz4kgv; Sat, 23 Sep 2023 18:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6MNUy9e/1uxWYJO2U8Sd6q2atQOHZ40F14gPie1jR0=; b=XVXLpa7nfZSSjfmF9Ma/vg87CK/nYENsSKH/1KRzsVIFq4r3JRehDmaIgWMPWj6lnPRnex mKsIyY/66tXCsKgcUBLRDbkhYeasdQ9NB1P0Y/YtEziczvt+YXgsIk2O7hFU6P+04FsK5e nCiSENHFw732lyoVEeWdACPu9soYRLZ1Bq6fPVUyhYWczcwgiTrX/8ysqB0OS0UrIqMUd/ tb5X6cklX8dDr//2CNP1iOeWNjAyu+iyYN+dbKEk504d2TgnuYkjckA4yriQYj+cqojAoy oZbPlUjyKtUZH36aryx5srZgf8BgROnyvrkHgzZZmxS04KRS6gIbuXWSu17UNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493347; a=rsa-sha256; cv=none; b=wY/VFeYH+2hiE2+k8lNJXddS1+BYutMx9VdwNlFYLIauRTT85H/Gn5CgFx9GbEFDaf1uIC HdJvKbHNbkVbHOv9sPNHJf33OsosyzvCqLamvHxKjyLM/a+6JVz9MQPVWwqc683p2vxj1v Pg6VaaOdP7w1MaaXIzc9fmNzNhVd1p0cNo1T20QW14ZYRKd2Jsu8ocmRr42rC42XZLEdcn 41J/CRIuZrBJMYfMxCzeTbtO1vMUaBfNPMf7dRgZ3DYlaHNO34nFzvf8ZDz5Ir2BbrESP8 r4sGRFt+jqqO51OOLt24cXOj5kk02yZB4w34yAevdrjM7JtXbaQnco2QahrmPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6MNUy9e/1uxWYJO2U8Sd6q2atQOHZ40F14gPie1jR0=; b=qeKZqvHk6HbKVg4jMk/IIbYi5AHo4syorr2m2RRFV6XMtLiNvYq+uOp+IOqFYwY3GbXOpH EQs71WcverlKzsbqZmTmCdAmPzQQf8y7qcpJkMiZM4dtnWQAmalZd9FPM1WXLDSfbprj1f kovpQPOgGehtKWzKjHOQdjKGUup7hQxLHOkDLtbVaTswwI9Qhb16s2iAQh25QZf6rciiVn syWt1Z1BuJSaOUgNzPRbDErDh99FybCRQFA2MQqEnjpz2a9zNhTR/ek7xFZ+p2Rr51FD2D Xme/COH1bVTBuqRIafgRCB753nsCr379ZPb3akWa/oRfha2ONbwuDix1099LKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYH2BKzzw2; Sat, 23 Sep 2023 18:22: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 38NIMRdt003770; Sat, 23 Sep 2023 18:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMR2N003767; Sat, 23 Sep 2023 18:22:27 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:27 GMT Message-Id: <202309231822.38NIMR2N003767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 08eab3616950 - stable/14 - lib/libc/tests/string: add unit tests for strcspn(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 08eab3616950c84e1592484cfbfed3e58bd77b6b Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=08eab3616950c84e1592484cfbfed3e58bd77b6b commit 08eab3616950c84e1592484cfbfed3e58bd77b6b Author: Robert Clausecker AuthorDate: 2023-08-20 22:48:41 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:28 +0000 lib/libc/tests/string: add unit tests for strcspn(3) We currently use the NetBSD test suite to cover strcspn(3). It only contains a very rudimentary test of this function. This all new set of unit tests for the FreeBSD test suite should cover many more edge cases relating to alignment issues. Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41557 (cherry picked from commit 35a5359406fe779186d1fd7131c95927fefe20be) --- lib/libc/tests/string/Makefile | 2 +- lib/libc/tests/string/strcspn_test.c | 137 +++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 1 deletion(-) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index a7545b75e0e9..639b7f2d2d2d 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -11,6 +11,7 @@ ATF_TESTS_C+= flsll_test ATF_TESTS_C+= memcmp_test ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= stpncpy_test +ATF_TESTS_C+= strcspn_test ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= strverscmp_test ATF_TESTS_C+= strxfrm_test @@ -29,7 +30,6 @@ NETBSD_ATF_TESTS_C+= strchr_test NETBSD_ATF_TESTS_C+= strchrnul_test NETBSD_ATF_TESTS_C+= strcmp_test NETBSD_ATF_TESTS_C+= strcpy_test -NETBSD_ATF_TESTS_C+= strcspn_test NETBSD_ATF_TESTS_C+= strerror_test NETBSD_ATF_TESTS_C+= strlen_test NETBSD_ATF_TESTS_C+= strpbrk_test diff --git a/lib/libc/tests/string/strcspn_test.c b/lib/libc/tests/string/strcspn_test.c new file mode 100644 index 000000000000..59da497c16c6 --- /dev/null +++ b/lib/libc/tests/string/strcspn_test.c @@ -0,0 +1,137 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 + +enum { + MAXALIGN = 16, /* test all offsets from this alignment */ + MAXBUF = 64, /* test up to this buffer length */ +}; + +enum { NOMATCH, MATCH }; + +static void +testcase(char *buf, size_t buflen, char *set, size_t setlen, int want_match) +{ + size_t i, outcome, expected; + + assert(setlen < UCHAR_MAX - 2); + + for (i = 0; i < buflen; i++) + buf[i] = 1 + i % (UCHAR_MAX - setlen - 1); + + buf[i] = '\0'; + + for (i = 0; i < setlen; i++) + set[i] = UCHAR_MAX - i; + + set[i] = '\0'; + + if (want_match == MATCH && buflen > 0 && setlen > 0) { + buf[buflen - 1] = UCHAR_MAX; + expected = buflen - 1; + } else + expected = buflen; + + outcome = strcspn(buf, set); + ATF_CHECK_EQ_MSG(expected, outcome, "strcspn(%p[%zu], %p[%zu]) = %zu != %zu", + buf, buflen, set, setlen, outcome, expected); +} + +/* test set with all alignments and lengths of buf */ +static void +test_buf_alignments(char *set, size_t setlen, int want_match) +{ + char buf[MAXALIGN + MAXBUF + 1]; + size_t i, j; + + for (i = 0; i < MAXALIGN; i++) + for (j = 0; j <= MAXBUF; j++) + testcase(buf + i, j, set, setlen, want_match); +} + +/* test buf with all alignments and lengths of set */ +static void +test_set_alignments(char *buf, size_t buflen, int want_match) +{ + char set[MAXALIGN + MAXBUF + 1]; + size_t i, j; + + for (i = 0; i < MAXALIGN; i++) + for (j = 0; j <= MAXBUF; j++) + testcase(buf, buflen, set + i, j, want_match); +} + +ATF_TC_WITHOUT_HEAD(buf_alignments); +ATF_TC_BODY(buf_alignments, tc) +{ + char set[41]; + + test_buf_alignments(set, 0, MATCH); + test_buf_alignments(set, 1, MATCH); + test_buf_alignments(set, 5, MATCH); + test_buf_alignments(set, 20, MATCH); + test_buf_alignments(set, 40, MATCH); + + test_buf_alignments(set, 0, NOMATCH); + test_buf_alignments(set, 1, NOMATCH); + test_buf_alignments(set, 5, NOMATCH); + test_buf_alignments(set, 20, NOMATCH); + test_buf_alignments(set, 40, NOMATCH); +} + +ATF_TC_WITHOUT_HEAD(set_alignments); +ATF_TC_BODY(set_alignments, tc) +{ + char buf[31]; + + test_set_alignments(buf, 0, MATCH); + test_set_alignments(buf, 10, MATCH); + test_set_alignments(buf, 20, MATCH); + test_set_alignments(buf, 30, MATCH); + + test_set_alignments(buf, 0, NOMATCH); + test_set_alignments(buf, 10, NOMATCH); + test_set_alignments(buf, 20, NOMATCH); + test_set_alignments(buf, 30, NOMATCH); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, buf_alignments); + ATF_TP_ADD_TC(tp, set_alignments); + + return (atf_no_error()); +} From nobody Sat Sep 23 18:22: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 4RtHYJ5vVmz4v38p; Sat, 23 Sep 2023 18:22: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 4RtHYJ4BW9z4ks5; Sat, 23 Sep 2023 18:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcoXpqANpks7JjUoGWaN9UdOohEv3kIgMkQ5rxzQmJY=; b=LZbJu7pEv+PKk5IaR/GHoHag0FW1jGmY4kb+l9OkFSTSjbyM4wwm8gpoht0IObk1NNSB6J wtD591XUJqdp9A9vLvxiuSrBIU1MMshVYWFLcZrM+KrDnbY9c/0r+n1cWcfzGC8WfFFwXx 7plbbRGMQpGAVplEL506u30991Q34E3y/sfgjsiX7clJfIvl/7aYAJqChpOW/vv6wuL9+e XBwCwzMiPK44LM2A/hSUJIOgObNzYHrb+6eidjMvC4DpdI7HEtNG9dlWNPG7erJ03c9Ad+ jCHUa92KDwUjfkXmMOSR+nIF0R2xuAikY+4z5FbHtqTohXMS0jW4QG/IzFmrCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493348; a=rsa-sha256; cv=none; b=f+3dA5Y/HlTaMC2NNYa9EbO7TvDCtdmwpBA6+qohItm60cF7fyGaiuCpMTa7vG7tDC04S2 9jXcOTHzi3F1IdrvANzzhisEMJw/Y51zmOaKsTxNw+qp2sSrMmj/3cgA7c1OA69ve+4B/n 003YY52mQHfgsTkCI16qPSnFZ6Gt+0cdeaIbewcu4XxW1vYcJd/Vt1ih+6xMzIkeqObGLi nr4iFpsCo/56Ub5iIJeXtiIFDKGxqh6lISC/1JH0DVIs0Y3HKoZVMdakw4bvXUmh/V9qI7 X1mgKm1zL895/K6ZjVQIx0yvHzUTvW+rfZe6jppbKLgn0X9EYJ+PRhjPMy57/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcoXpqANpks7JjUoGWaN9UdOohEv3kIgMkQ5rxzQmJY=; b=i856wEXv83cnrQeRjnV69sXdBfcdob5ap7ROwNMWjCeGGK1o9vyFfEOBFevGmR06qJG7mo SD/0oxON7xOn3YLpakQEEuV6IFgUZhxR8b83v8yX41zsJ0CWMBP4aPZO5NbUJx8Rq4Ry8R xaxIc9orQHUpmzH5dIB6dEvGPrEDhvZFrVAnR6wclVQ/iQG+/73We4uBuEvFFCvkH6R2zY KJ7XBYl65utrFTPUy1tSolDSNH1z0Lox21m7QtJKoA4y+Y8GSrEBM1IeuLE9SWD5gxL0QN Snqd7/I9MavLOZYxIVUsxy17MZUK0KHLdy42NY8dO4OyNUnhD3/NuZVS9IxgFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYJ2qWXzq6; Sat, 23 Sep 2023 18:22: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 38NIMSOS003820; Sat, 23 Sep 2023 18:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMSre003817; Sat, 23 Sep 2023 18:22:28 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:28 GMT Message-Id: <202309231822.38NIMSre003817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 73883def3215 - stable/14 - lib/libc/tests/string: derive strspn(3) tests from strcspn(3) 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: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73883def32155cef504dcabcb9f4d8ff56fa661e Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=73883def32155cef504dcabcb9f4d8ff56fa661e commit 73883def32155cef504dcabcb9f4d8ff56fa661e Author: Robert Clausecker AuthorDate: 2023-08-21 15:30:23 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:28 +0000 lib/libc/tests/string: derive strspn(3) tests from strcspn(3) tests To cover the new optimised amd64 strspn(3) SIMD implementation, extend the previously written strcspn(3) unit test to also cover strspn(3). Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41567 (cherry picked from commit 468adddd75f6461fcdd2151122d85879ec592a5b) --- lib/libc/tests/string/Makefile | 2 +- lib/libc/tests/string/strcspn_test.c | 26 +++++++++++++++++++++++--- lib/libc/tests/string/strspn_test.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index 639b7f2d2d2d..1994b128ab57 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -13,6 +13,7 @@ ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= stpncpy_test ATF_TESTS_C+= strcspn_test ATF_TESTS_C+= strerror2_test +ATF_TESTS_C+= strspn_test ATF_TESTS_C+= strverscmp_test ATF_TESTS_C+= strxfrm_test ATF_TESTS_C+= wcscasecmp_test @@ -34,7 +35,6 @@ NETBSD_ATF_TESTS_C+= strerror_test NETBSD_ATF_TESTS_C+= strlen_test NETBSD_ATF_TESTS_C+= strpbrk_test NETBSD_ATF_TESTS_C+= strrchr_test -NETBSD_ATF_TESTS_C+= strspn_test NETBSD_ATF_TESTS_C+= swab_test SRCS.strerror2_test= strerror_test.c diff --git a/lib/libc/tests/string/strcspn_test.c b/lib/libc/tests/string/strcspn_test.c index 59da497c16c6..abacdcbbf18a 100644 --- a/lib/libc/tests/string/strcspn_test.c +++ b/lib/libc/tests/string/strcspn_test.c @@ -42,6 +42,12 @@ enum { enum { NOMATCH, MATCH }; +#ifdef STRSPN +#define STRXSPN strspn +#else +#define STRXSPN strcspn +#endif + static void testcase(char *buf, size_t buflen, char *set, size_t setlen, int want_match) { @@ -50,7 +56,11 @@ testcase(char *buf, size_t buflen, char *set, size_t setlen, int want_match) assert(setlen < UCHAR_MAX - 2); for (i = 0; i < buflen; i++) +#ifdef STRSPN + buf[i] = UCHAR_MAX - i % (setlen > 0 ? setlen : 1); +#else /* strcspn */ buf[i] = 1 + i % (UCHAR_MAX - setlen - 1); +#endif buf[i] = '\0'; @@ -59,15 +69,25 @@ testcase(char *buf, size_t buflen, char *set, size_t setlen, int want_match) set[i] = '\0'; +#ifdef STRSPN + if (setlen == 0) + expected = 0; + else if (want_match == MATCH && buflen > 0) { + buf[buflen - 1] = 1; + expected = buflen - 1; + } else + expected = buflen; +#else /* strcspn */ if (want_match == MATCH && buflen > 0 && setlen > 0) { buf[buflen - 1] = UCHAR_MAX; expected = buflen - 1; } else expected = buflen; +#endif - outcome = strcspn(buf, set); - ATF_CHECK_EQ_MSG(expected, outcome, "strcspn(%p[%zu], %p[%zu]) = %zu != %zu", - buf, buflen, set, setlen, outcome, expected); + outcome = STRXSPN(buf, set); + ATF_CHECK_EQ_MSG(expected, outcome, "%s(%p[%zu], %p[%zu]) = %zu != %zu", + __XSTRING(STRXSPN), buf, buflen, set, setlen, outcome, expected); } /* test set with all alignments and lengths of buf */ diff --git a/lib/libc/tests/string/strspn_test.c b/lib/libc/tests/string/strspn_test.c new file mode 100644 index 000000000000..73a08ddefa1b --- /dev/null +++ b/lib/libc/tests/string/strspn_test.c @@ -0,0 +1,30 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 + */ + +#define STRSPN +#include "strcspn_test.c" From nobody Sat Sep 23 18:22: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 4RtHYK6qKhz4v3CK; Sat, 23 Sep 2023 18:22: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 4RtHYK5VXDz4l3D; Sat, 23 Sep 2023 18:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eY2OH/JMoNo+QPnCDI2xb3D0uB7AdtkOltJkiXF5ko=; b=X0+SKbS1z7llES40z8mRKfOoNg2bvfjipCcRnz1yxyV4DxvfRZrmDI/a29ejqE4gBvZzja CVfhToerD7em1vot1iWgtQTfRKuioYWW2pAUwqOgsaUKaZ6KdSrdzdUCHfKZL09GPTC+3A UAtxFcAC9lR9hzTIAIFYspAWebsCdacAtsTJDox2lCj357SHBN8kFUX2Oe2897BYibtP7f fJgCI8n+lyUHMSW8pKof/XD8xfJj1j2I1Oq1+lNoBfstfm+8IdHKEP9YxsqB4SCNcT4qQ0 jFKFw5rRUTxrmcSXOhG4jIFP1aW8EBYGUGcN/mHKJzrZQcUzJ/0Gm27yDvOhlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493349; a=rsa-sha256; cv=none; b=iAoyXVMtl+LOWa2Ikra/cOBCQCrvciavHxpZNaSfu97oqJYPkUFdMyXssx9ZMvpvXrZXVq LWoja8YU6HqLH1lczlKckLTMMB8r1IWSDAlnFuXTh4IgqzLAmH39J64FkU3IDhxfJ+WILE INNdACdRGc4lZl7qqgnJ41YRRzekfA391O6XVYFNxUg+GczXDU41QKGZ/J71NkOUvPsq8J 1TvzY6YFdy9YvPB2Mih+GCbD3Ylfw5uLnaOwjPxsjHNs8BYTEq58GHN0+/87zX1uDJiUZg EfQpWC6tAJADUNfAOUY32zrw7infmGnBOJ1fmdMMYmTkIdmLZ/V9jAG/8xa9EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eY2OH/JMoNo+QPnCDI2xb3D0uB7AdtkOltJkiXF5ko=; b=qhHg2lOpsSxD/hlBDAlX+B8dUo9Uoz5huTS0upSyJ2VYRzj/JKYnv8epfxS/MmY5f0urc6 whalYy97HROKMFyJZCmmdUNSQPz7POabr+YBp5f1qQFsM1YfDRK0YOZblx1+DXbZRsbpPm 8uMYQ1PjBuBBA3YscZ1U16xToWs8hRKIKxZPaApWxJgcyY3i79O5vRXKog+7CCYIDzMzE7 /BhTqz5tpYULnYE9AqkS32qObS6RS91wNLJuywvANR0yBYQQslwoEhFM8mItlVwyj0LJBj VaT2be4CHS4OljggTBJ60K573JOLyFrnXH1shgQ6nukUjh55h+pUcbZj/NwHZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYK44jfzyD; Sat, 23 Sep 2023 18:22: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 38NIMTRx003865; Sat, 23 Sep 2023 18:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMTCU003862; Sat, 23 Sep 2023 18:22:29 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:29 GMT Message-Id: <202309231822.38NIMTCU003862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 39d500190be5 - stable/14 - lib/libc/amd64/string: add strspn(3) scalar, x86-64-v2 implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 39d500190be571a1b71150ec7d150a006472e3f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=39d500190be571a1b71150ec7d150a006472e3f6 commit 39d500190be571a1b71150ec7d150a006472e3f6 Author: Robert Clausecker AuthorDate: 2023-08-21 16:06:42 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:28 +0000 lib/libc/amd64/string: add strspn(3) scalar, x86-64-v2 implementation This is conceptually very similar to the strcspn(3) implementations from D41557, but we can't do the fast paths the same way. Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41567 (cherry picked from commit 7084133cde6a58412d86bae9f8a55b86141fb304) --- lib/libc/amd64/string/Makefile.inc | 3 +- lib/libc/amd64/string/strspn.S | 358 +++++++++++++++++++++++++++++++++++++ 2 files changed, 360 insertions(+), 1 deletion(-) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index f01a52d9ebea..b03811f40062 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -12,4 +12,5 @@ MDSRCS+= \ strcmp.S \ strcspn.S \ strlen.S \ - strcpy.c + strcpy.c \ + strspn.S diff --git a/lib/libc/amd64/string/strspn.S b/lib/libc/amd64/string/strspn.S new file mode 100644 index 000000000000..565330f0c385 --- /dev/null +++ b/lib/libc/amd64/string/strspn.S @@ -0,0 +1,358 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 "amd64_archlevel.h" + +#define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ + +ARCHFUNCS(strspn) + ARCHFUNC(strspn, scalar) + NOARCHFUNC + ARCHFUNC(strspn, x86_64_v2) +ENDARCHFUNCS(strspn) + +ARCHENTRY(strspn, scalar) + push %rbp # align stack to enable function call + mov %rsp, %rbp + sub $256, %rsp # allocate space for lookup table + + /* check for special cases */ + movzbl (%rsi), %edx # first character in the set + test %edx, %edx + jz .Lzero # empty set always returns 0 + + movzbl 1(%rsi), %eax # second character in the set + test %eax, %eax + jz .Lsingle + + /* no special case matches -- prepare lookup table */ + xor %r8d, %r8d + mov $28, %ecx +0: mov %r8, (%rsp, %rcx, 8) + mov %r8, 8(%rsp, %rcx, 8) + mov %r8, 16(%rsp, %rcx, 8) + mov %r8, 24(%rsp, %rcx, 8) + sub $4, %ecx + jnc 0b + + movb $1, (%rsp, %rdx, 1) # register first char in set + add $2, %rsi + + /* process remaining chars in set */ + ALIGN_TEXT +0: movb $1, (%rsp, %rax, 1) # register previous char + movzbl (%rsi), %eax # next char in set + test %eax, %eax # end of string? + jz 1f + + movb $1, (%rsp, %rax, 1) + add $2, %rsi + movzbl -1(%rsi), %eax + test %eax, %eax + jnz 0b + +1: mov %rdi, %rax # a copy of the source to iterate over + + /* find mismatch */ + ALIGN_TEXT +0: movzbl (%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 2f + + movzbl 1(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 3f + + movzbl 2(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 4f + + movzbl 3(%rax), %ecx + add $4, %rax + cmpb $0, (%rsp, %rcx, 1) + jne 0b + + sub $3, %rax +4: dec %rdi +3: inc %rax +2: sub %rdi, %rax # number of characters preceding match + leave + ret + + /* empty set never matches */ +.Lzero: xor %eax, %eax + leave + ret + + /* find repeated single character */ + ALIGN_TEXT +.Lsingle: + cmpb %dl, (%rdi, %rax, 1) + jne 1f + + cmpb %dl, 1(%rdi, %rax, 1) + jne 2f + + cmpb %dl, 2(%rdi, %rax, 1) + jne 3f + + cmpb %dl, 3(%rdi, %rax, 1) + lea 4(%rax), %rax + je .Lsingle + + sub $3, %rax +3: inc %rax +2: inc %rax +1: leave + ret +ARCHEND(strspn, scalar) + + /* + * This kernel uses pcmpistri to do the heavy lifting. + * We provide three code paths, depending on set size: + * + * 0--16: one pcmpistri per 16 bytes of input + * 17--32: two pcmpistri per 16 bytes of input + * >=33: fall back to look up table + */ +ARCHENTRY(strspn, x86_64_v2) + push %rbp + mov %rsp, %rbp + sub $256, %rsp + + /* find set size and copy up to 32 bytes to (%rsp) */ + mov %esi, %ecx + and $~0xf, %rsi # align set pointer + movdqa (%rsi), %xmm0 + pxor %xmm1, %xmm1 + and $0xf, %ecx # amount of bytes rsi is past alignment + xor %edx, %edx + pcmpeqb %xmm0, %xmm1 # end of string reached? + movdqa %xmm0, 32(%rsp) # transfer head of set to stack + pmovmskb %xmm1, %eax + shr %cl, %eax # clear out junk before string + test %eax, %eax # end of set reached? + jnz 0f + + movdqa 16(%rsi), %xmm0 # second chunk of the set + mov $16, %edx + sub %ecx, %edx # length of set preceding xmm0 + pxor %xmm1, %xmm1 + pcmpeqb %xmm0, %xmm1 + movdqa %xmm0, 48(%rsp) + movdqu 32(%rsp, %rcx, 1), %xmm2 # head of set + pmovmskb %xmm1, %eax + test %eax, %eax + jnz 1f + + movdqa 32(%rsi), %xmm0 # third chunk + add $16, %edx + pxor %xmm1, %xmm1 + pcmpeqb %xmm0, %xmm1 + movdqa %xmm0, 64(%rsp) + pmovmskb %xmm1, %eax + test %eax, %eax # still not done? + jz .Lgt32v2 + +0: movdqu 32(%rsp, %rcx, 1), %xmm2 # head of set +1: tzcnt %eax, %eax + add %eax, %edx # length of set (excluding NUL byte) + cmp $32, %edx # above 32 bytes? + ja .Lgt32v2 + + /* + * At this point we know that we want to use pcmpistri. + * one last problem obtains: the head of the string is not + * aligned and may cross a cacheline. If this is the case, + * we take the part before the page boundary and repeat the + * last byte to fill up the xmm register. + */ + mov %rdi, %rax # save original string pointer + lea 15(%rdi), %esi # last byte of the head + xor %edi, %esi + test $PAGE_SIZE, %esi # does the head cross a page? + jz 0f + + /* head crosses page: copy to stack to fix up */ + and $~0xf, %rax # align head pointer temporarily + movzbl 15(%rax), %esi # last head byte on the page + movdqa (%rax), %xmm0 + movabs $0x0101010101010101, %r8 + imul %r8, %rsi # repeated 8 times + movdqa %xmm0, (%rsp) # head word on stack + mov %rsi, 16(%rsp) # followed by filler (last byte x8) + mov %rsi, 24(%rsp) + mov %edi, %eax + and $0xf, %eax # offset of head from alignment + add %rsp, %rax # pointer to fake head + +0: movdqu (%rax), %xmm1 # load head (fake or real) + lea 16(%rdi), %rax + and $~0xf, %rax # second 16 bytes of string (aligned) +1: cmp $16, %edx # 16--32 bytes? + ja .Lgt16v2 + + + /* set is 2--16 bytes in size */ + + /* _SIDD_UBYTE_OPS|_SIDD_CMP_EQUAL_ANY|_SIDD_LEAST_SIGNIFICANT|_SIDD_NEGATIVE_POLARITY */ + pcmpistri $0x10, %xmm1, %xmm2 # match in head? + jc .Lheadmismatchv2 + + ALIGN_TEXT +0: pcmpistri $0x10, (%rax), %xmm2 + jc 1f # match or end of string? + pcmpistri $0x10, 16(%rax), %xmm2 + lea 32(%rax), %rax + jnc 0b # match or end of string? + + sub $16, %rax # go back to second half +1: sub %rdi, %rax # offset of (%rax) from beginning of string + add %rcx, %rax # prefix length before match/NUL + leave + ret + +.Lheadmismatchv2: + mov %ecx, %eax # prefix length before mismatch/NUL + leave + ret + + /* set is 17--32 bytes in size */ +.Lgt16v2: + movdqu 48(%rsp, %rcx, 1), %xmm3 # second part of set + + /* _SIDD_UBYTE_OPS|_SIDD_CMP_EQUAL_ANY|_SIDD_BIT_MASK|_SIDD_NEGATIVE_POLARITY */ + pcmpistrm $0x10, %xmm1, %xmm2 # any mismatch in first half? + movdqa %xmm0, %xmm4 + pcmpistrm $0x10, %xmm1, %xmm3 # any mismatch in the second half? + ptest %xmm0, %xmm4 # any entry that doesn't match either? + jnz 2f + + ALIGN_TEXT +0: movdqa (%rax), %xmm1 + pcmpistrm $0x10, %xmm1, %xmm2 + movdqa %xmm0, %xmm4 + pcmpistrm $0x10, %xmm1, %xmm3 + ptest %xmm0, %xmm4 + jnz 1f + movdqa 16(%rax), %xmm1 + add $32, %rax + pcmpistrm $0x10, %xmm1, %xmm2 + movdqa %xmm0, %xmm4 + pcmpistrm $0x10, %xmm1, %xmm3 + ptest %xmm0, %xmm4 + jz 0b + + sub $16, %rax +1: pand %xmm4, %xmm0 + movd %xmm0, %ecx + sub %rdi, %rax # offset of %xmm1 from beginning of string + tzcnt %ecx, %ecx + add %rcx, %rax # prefix length before match/NUL + leave + ret + + /* mismatch or string end in head */ +2: pand %xmm4, %xmm0 # bit mask of mismatches (end of string counts) + movd %xmm0, %eax + tzcnt %eax, %eax # prefix length before mismatch/NUL + leave + ret + + /* set is >=33 bytes in size */ +.Lgt32v2: + xorps %xmm0, %xmm0 + mov $256-64, %edx + + /* clear out look up table */ +0: movaps %xmm0, (%rsp, %rdx, 1) + movaps %xmm0, 16(%rsp, %rdx, 1) + movaps %xmm0, 32(%rsp, %rdx, 1) + movaps %xmm0, 48(%rsp, %rdx, 1) + sub $64, %edx + jnc 0b + + add %rcx, %rsi # restore string pointer + mov %rdi, %rax # keep a copy of the string + + /* initialise look up table */ + movzbl (%rsi), %ecx # string is known not to be empty + + ALIGN_TEXT +0: movb $1, (%rsp, %rcx, 1) + movzbl 1(%rsi), %ecx + test %ecx, %ecx + jz 1f + + movb $1, (%rsp, %rcx, 1) + movzbl 2(%rsi), %ecx + test %ecx, %ecx + jz 1f + + movb $1, (%rsp, %rcx, 1) + movzbl 3(%rsi), %ecx + add $4, %rsi + test %ecx, %ecx + jz 1f + + movb $1, (%rsp, %rcx, 1) + movzbl (%rsi), %ecx + test %ecx, %ecx + jnz 0b + + /* find match */ + ALIGN_TEXT +1: movzbl (%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 2f + + movzbl 1(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 3f + + movzbl 2(%rax), %ecx + cmpb $0, (%rsp, %rcx, 1) + je 4f + + movzbl 3(%rax), %ecx + add $4, %rax + cmpb $0, (%rsp, %rcx, 1) + jne 1b + + sub $3, %rax +4: dec %rdi +3: inc %rax +2: sub %rdi, %rax # number of characters preceding match + leave + ret +ARCHEND(strspn, x86_64_v2) + + .section .note.GNU-stack,"",%progbits From nobody Sat Sep 23 18:22: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 4RtHYL6y6mz4v3Pn; Sat, 23 Sep 2023 18:22: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 4RtHYL6326z4kkh; Sat, 23 Sep 2023 18:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c4Amq7Qn3M/J5DzOMMmP0ALBSHeUNCUv49MhX6rzHs=; b=IV3rYT0plgPbWhGEznp5Pm7dZ5n04B7y8GmfvCudeSoiyFQmcpvQhkRba9RDOT7gHqgpvW 6se3EGmTRe091DyvGEamU0CvYDQoQZxIzZxjj5Pe0pJPCIwK3k1XrxnCbDrZmWUKtuwITw FJEeBe8RY1RdjGp5wEQffY23liUe/SLn6WZ5DU+VFkyVnJVAsLOC1S6lI5mWznCQiMOeH5 yxhRyLqfztG2nssdc4FMlHktUNQGfS6HaAqnTy4LR9EgjRilobnetS7ai4uxxgIuVintCc nvdzp+NnA5wHz5XdXvzzIB2S4a6IT3aZ4WFZI2JDNaqSS9DFLlmCDrBMNapy6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493350; a=rsa-sha256; cv=none; b=uBwuRpd7iduKmpGKWeiGpVCc6DjvT91pTTEMKtTyzsiyDefVyNfv6jIlWX56qq9+GO8KvW iZQ3dPFAP3S0o6sbcTbAbupa3cbMh114XkwK2vv/UMVPW6LPmO7bqPsXq/9mYyscnrDCNH Szm9p7sQwZv0XqT24FSb7CYzVVXb+uwYbN7RIacNFV58A0ewtXSZKOa+QVy/FXLcnrJ/Om /X+/QN1QI536vXxgG4ePJjiTCBE1HhFXRuT6gHyltHYhXo9brh4j4eKhu6Bosuo3uXWUQ3 KSZdw9fx6yOiaXry7DschIqbl4PWRq0iA9I7w3NXY6Ji1D90x4A/iMaSZyu00g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c4Amq7Qn3M/J5DzOMMmP0ALBSHeUNCUv49MhX6rzHs=; b=U4WWGJOJmIEYxhCwZ762RDCCwf75Mbh0thd6w7N+R+A7SVN1x011QD0C6yyvOzqmgksBZS FwJOe4eP3O2afFKoXpBnhzwFHo2MaeczuyKQUmGkrTJI0pdq7hYEFHLTIfpKpzpL092gtj mAbr992GzjY6Iyp/VTyhUsDMn/LwEruYFqd2GoNTnRDQ0AVrx/cLFNe9p8ikeBcXvkpQNv zTpij+jW0pLcLukNhvxj49E9nTZ++lCHiNCQrRX8+f/264OvkdoTx+wSXPmdHTpJNwh4TI WMmjoB/DPLVm1JyGf6TbsyRJDupEJjxBlGF3xPP9CXMwKBTb8TkZaKiKF7C4Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYL55frzsZ; Sat, 23 Sep 2023 18:22: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 38NIMUAT003904; Sat, 23 Sep 2023 18:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMUEp003901; Sat, 23 Sep 2023 18:22:30 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:30 GMT Message-Id: <202309231822.38NIMUEp003901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 6aac2b251482 - stable/14 - share/man/man7/simd.7: document simd-enhanced strspn(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6aac2b251482ed5d1884147bd77f198b246b8cde Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=6aac2b251482ed5d1884147bd77f198b246b8cde commit 6aac2b251482ed5d1884147bd77f198b246b8cde Author: Robert Clausecker AuthorDate: 2023-08-23 15:52:42 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:28 +0000 share/man/man7/simd.7: document simd-enhanced strspn(3) Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41567 (cherry picked from commit a559ef1ac85947df1bff82b867bbfc07a8085092) --- share/man/man7/simd.7 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index efa1306898ca..b0a668e6ade7 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd August 14, 2023 +.Dd August 23, 2023 .Dt SIMD 7 .Os .Sh NAME @@ -74,6 +74,7 @@ Enhanced functions are present in the following architectures: .It strncmp Ta Ta S Ta Ta S .It strncpy Ta Ta Ta Ta Ta S2 .It strrchr Ta S Ta Ta Ta S +.It strspn Ta Ta Ta S2 .It swab Ta Ta Ta Ta S .It wcschr Ta Ta Ta Ta S .It wcscmp Ta Ta Ta Ta S From nobody Sat Sep 23 18:22: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 4RtHYN03jPz4v3Pq; Sat, 23 Sep 2023 18:22: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 4RtHYM6kSXz4l8G; Sat, 23 Sep 2023 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COL1INVYQvdANfudvD1BqRRPzeEJBSOpp98O3kJj4aE=; b=b15brIJnzBuJPPHM8BcoHepUFs0hQLJeMGmXDqXGZEz+yCl7yJEdJx/N+/gP1C2UIyD0Hg GYawZ7QcdvEan1b9pyLGQNY8pmw+Bjyqs6YMjWgqb1Wn/ANokri+GbE0PC6Cg0tcaaUpra fvz6dMFXJV6KmHUsqnB/QTOS2klGj5NhNRWhWj6Y8FRZhUpxyMS+U0gayyB747Qsf66n+T htFi6ok7yn69uS0RcL53nQXk2DkTUZjoauuWz9i8c3Nu9vmDJ5mCaDH1R9dDgRu9DfqNhm G3iJehvH9SxSIFSmNaURa4awxQzqO3RX44GUmENHlAJzMxXhaGXdszp7Riup9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493351; a=rsa-sha256; cv=none; b=onCnnkJyhRmDnFVSJZjipIU+ICr+EjAS6U/vneq5Y8x7nTDZ8gl589F5GV4VltV/Z6+KBk XRKtuCHFTk+U01z0ngeO/KKaRd2nHJCSGJi9hm/bYiiGiQcS3iDpdq0gDpulKxrlG4hOjw S/Z7X7xPl8mJFqz5u5JN/zUl/goqCHYyDN6PKCphwvUwoqCmQjhzNRwkLwnP731/eVrvBk si96kfi18t/LBgDJeuZDhs6aGmlJKLJWF5tuiFxmk2g2J22adZkivAGf0JrYFzK0Uv7Ek7 zBeM/bq8sdfalWopxP+h/4R/56gQtiWZ9qTHWeBLdJmBw6rE/RHgXQASfLYpvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COL1INVYQvdANfudvD1BqRRPzeEJBSOpp98O3kJj4aE=; b=Fhfjm7YFY70zQoNec5j8hAEr+yqxUhLURVAdovlnGrsL9CvEDExUJMUr/dZAa2P+fQF+Oq U+KakTJmiDo7i03j9I06bMKHgsGcQiaP82r39D+LxEC271BaY5+dhAk/ignchHcqg3OARo LV2qkUIgUiYBK8rgislqQYlYriP473y/x/+W1lheyeoItJ6QgiQqp2wjrwhW4pV6Awzyv7 N6D0H/39VLhtTapFXXGV4/R3Vew0NwjHDQeY+x3WHu+v0Jb36bKNp2bt/l/6f4Kg/Ax3UQ nW5w9fSuWBjT9mmB2t6JboanvTtxKZ17gljCiOncbl4vXdX7bGjK7CFK3pLfJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYM5pbMzw6; Sat, 23 Sep 2023 18:22: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 38NIMVsN003955; Sat, 23 Sep 2023 18:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMVwD003952; Sat, 23 Sep 2023 18:22:31 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:31 GMT Message-Id: <202309231822.38NIMVwD003952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 3f78bde932d3 - stable/14 - lib/libc/amd64/string: add memchr(3) scalar, baseline implementation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f78bde932d31e8c80e3201653abae96f8c5f45b Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=3f78bde932d31e8c80e3201653abae96f8c5f45b commit 3f78bde932d31e8c80e3201653abae96f8c5f45b Author: Robert Clausecker AuthorDate: 2023-08-24 16:43:40 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:20:28 +0000 lib/libc/amd64/string: add memchr(3) scalar, baseline implementation This is conceptually similar to strchr(3), but there are slight changes to account for the buffer having an explicit buffer length. this includes the bug fix from b2618b6. Sponsored by: The FreeBSD Foundation Reported by: yuri, des Tested by: des Approved by: mjg MFC after: 1 week MFC to: stable/14 PR: 273652 Differential Revision: https://reviews.freebsd.org/D41598 (cherry picked from commit de12a689fad271f5a2ba7c188b0b5fb5cabf48e7) (cherry picked from commit b2618b651b28fd29e62a4e285f5be09ea30a85d4) --- lib/libc/amd64/string/Makefile.inc | 1 + lib/libc/amd64/string/memchr.S | 207 +++++++++++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index b03811f40062..7c6a1f429590 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -2,6 +2,7 @@ MDSRCS+= \ amd64_archlevel.c \ bcmp.S \ + memchr.S \ memcmp.S \ memcpy.S \ memmove.S \ diff --git a/lib/libc/amd64/string/memchr.S b/lib/libc/amd64/string/memchr.S new file mode 100644 index 000000000000..cfab9b1302de --- /dev/null +++ b/lib/libc/amd64/string/memchr.S @@ -0,0 +1,207 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 "amd64_archlevel.h" + +#define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ + + .weak memchr + .set memchr, __memchr +ARCHFUNCS(__memchr) + ARCHFUNC(__memchr, scalar) + ARCHFUNC(__memchr, baseline) +ENDARCHFUNCS(__memchr) + +ARCHENTRY(__memchr, scalar) + test %rdx, %rdx # empty input? + je .Lnomatch + + lea (, %rdi, 8), %ecx + mov $-1, %rax + add %rdi, %rdx # pointer to end of buffer or to end of + cmovc %rax, %rdx # address space (whichever comes first) + and $~7, %rdi # align to 8 bytes + mov (%rdi), %rax # load first word + movzbl %sil, %esi # clear stray high bits + movabs $0x0101010101010101, %r8 + imul %r8, %rsi # replicate char 8 times + + /* compute head and tail masks */ + mov %r8, %r10 + movabs $0x8080808080808080, %r9 + shl %cl, %r10 # 0x01 where string head is + lea (, %rdx, 8), %ecx + xor %r8, %r10 # 0x01 where it is not + neg %r8 # negate 01..01 so we can use lea + mov %r9, %r11 + xor %rsi, %rax # str ^ c (0x00 where str[i] == c) + neg %ecx + or %r10, %rax # except before the string + shr %cl, %r11 # 0x80 where string tail is + + add $8, %rdi # advance to next 8 bytes + cmp %rdx, %rdi # end of buffer reached during head? + jae .Ltail # and go to tail-processing code + + /* main loop, unrolled twice */ + ALIGN_TEXT +0: lea (%rax, %r8, 1), %rcx # (str ^ c) - 0x01..01 + not %rax # ~(str ^ c) + and %r9, %rax # ((str^c) - 0x01..01) & ~(str^c) + and %rcx, %rax # not including junk bytes + jnz .Lmatch + + mov (%rdi), %rax + add $8, %rdi + xor %rsi, %rax # str ^ c + cmp %rdx, %rdi + jae .Ltail + + lea (%rax, %r8, 1), %rcx # (str ^ c) - 0x01..01 + not %rax # ~(str ^ c) + and %r9, %rax # ((str^c) - 0x01..01) & ~(str^c) + and %rcx, %rax # not including junk bytes + jnz .Lmatch + + mov (%rdi), %rax + add $8, %rdi + xor %rsi, %rax # str ^ c + cmp %rdx, %rdi + jb 0b + +.Ltail: lea (%rax, %r8, 1), %rcx # (str ^ c) - 0x01..01 + not %rax # ~(str ^ c) + and %r11, %rax # ((str^c) - 0x01..01) & ~(str^c) + and %rcx, %rax # not including junk bytes or bytes past buffer + jz .Lnomatch + +.Lmatch: + tzcnt %rax, %rax # first match + shr $3, %eax # scale from bit to byte index + lea -8(%rdi, %rax), %rax # pointer to found c + ret + + /* no match found */ +.Lnomatch: + xor %eax, %eax # return null pointer + ret +ARCHEND(__memchr, scalar) + +ARCHENTRY(__memchr, baseline) + test %rdx, %rdx # empty input? + je .Lnomatchb + + movd %esi, %xmm2 + mov %edi, %ecx + mov $-1, %r9 + add %rdi, %rdx # pointer to end of buffer or to end of + cmovc %r9, %rdx # address space (whichever comes first) + and $~0x1f, %rdi # align to 32 bytes + movdqa (%rdi), %xmm0 # load first 32 bytes + movdqa 16(%rdi), %xmm1 + + punpcklbw %xmm2, %xmm2 # c -> cc + + shl %cl, %r9d # mask with zeroes before the string + + punpcklwd %xmm2, %xmm2 # cc -> cccc + + mov $-1, %r8d + xor %ecx, %ecx + sub %edx, %ecx # edx = -ecx + shr %cl, %r8d # bytes in tail that are part of the buffer + + pshufd $0, %xmm2, %xmm2 # cccc -> cccccccccccccccc + + add $32, %rdi # advance to next 32 bytes + mov $-1, %eax + cmp %rdx, %rdi # end of buffer reached during head? + cmovae %r8d, %eax # if yes, do combined head/tail processing + and %r9d, %eax # mask of bytes in head part of string + + /* process head */ + pcmpeqb %xmm2, %xmm1 + pcmpeqb %xmm2, %xmm0 + pmovmskb %xmm1, %esi + pmovmskb %xmm0, %ecx + shl $16, %esi + or %esi, %ecx # locations of matches + and %ecx, %eax # any match inside buffer? + jnz .Lprecisematchb + + cmp %rdx, %rdi # did the buffer end here? + jae .Lnomatchb # if yes we are done + + /* main loop */ + ALIGN_TEXT +0: movdqa (%rdi), %xmm0 # load next string chunk + movdqa 16(%rdi), %xmm1 + add $32, %rdi + cmp %rdx, %rdi # ready for main loop? + jae .Ltailb + + pcmpeqb %xmm2, %xmm0 + pcmpeqb %xmm2, %xmm1 + por %xmm1, %xmm0 # match in either half? + pmovmskb %xmm0, %eax + test %eax, %eax + jz 0b + +.Lmatchb: + pcmpeqb -32(%rdi), %xmm2 # redo comparison of first 16 bytes + pmovmskb %xmm1, %ecx + pmovmskb %xmm2, %eax + shl $16, %ecx + or %ecx, %eax # location of matches + +.Lprecisematchb: + tzcnt %eax, %eax # find location of match + lea -32(%rdi, %rax, 1), %rax # point to matching byte + ret + +.Ltailb: + pcmpeqb %xmm2, %xmm1 + pcmpeqb %xmm2, %xmm0 + pmovmskb %xmm1, %edx + pmovmskb %xmm0, %eax + shl $16, %edx + or %edx, %eax # location of matches + and %r8d, %eax # mask out matches beyond buffer + bsf %eax, %edx # location of match + lea -32(%rdi, %rdx, 1), %rdx # pointer to match (if any) + cmovnz %rdx, %rax # point to match if present, + ret # else null pointer + +.Lnomatchb: + xor %eax, %eax # return null pointer + ret +ARCHEND(__memchr, baseline) + + .section .note.GNU-stack,"",%progbits From nobody Sat Sep 23 18:22: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 4RtHYP2dV9z4v38r; Sat, 23 Sep 2023 18:22: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 4RtHYP16kVz4l0M; Sat, 23 Sep 2023 18:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5rqCN0eyu2vfBKy7zQ879kS6aP9d+gmyP9JyqNOuFM=; b=V85f1FCixM3KveCRcJBaE6iOkE1/5oIobU/yw85kVSErdZ5ptl+VNjxZaCjx1UaIHgBxjN pNIWPwPV46EaH8vk51dAlJFsyuuihYSpNiD7qIDgynJWpseCuOaTeru0LyNY0klgxm6qke whGU1Y2T1H0WIwcZpKJ9nT90CKbZar8ZkObkJ5gL9ymHLf3CjF4+kc+Z5Wx/pTZOddBNST LFcXOkp8gmfI1/Xwkdkx/zLC5JEjEZp9VtyP2JsUc5neX8UCluUIxjan5srupp+OuVN2ge pAR8ntQ3/MRONgDSAlmLsE1H7EW50psp3InmE9YBoz7ADKUTNVyF4cCKp1zv0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493353; a=rsa-sha256; cv=none; b=aLwptjQIO1AlBvXDxyVRs9IHKY0sF/AzEKfLfLiDqUChSnM8ZyVNPZgpxxhJi2xuTcwkAM PsdWd55iJNCcf/C+VnIY9EBUyzx/W/Feiyv4YSdjjV989Th0TnJpMIC0WWJSiQHZmB50v+ dfegC/9sWEj2ousbKjBOCD79ShILUpwHMe1H+x3A8ZWF0eFtMSqaXKcCG18F6Wafd6pdKn Rp2pdEKCry2LtaPyhGXHKO+Dgh9yZY845XRrgM1jwmMXDz7bF/mkvaYiBctF8uRZkkhPIr c+o0mNNPR8R6n7kHKijkuxq4WabqwpAjQ/zhlmfxEUT3lphIniga+T2DSF+S4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5rqCN0eyu2vfBKy7zQ879kS6aP9d+gmyP9JyqNOuFM=; b=CZXNMUtxLhPDmINGugFQqTDTFvaE18FX/vQuaKJ2kDS6e/dGp4zqeFWxspejwgcwTQTBey JxWSeyjH4NAV55vy51aaZkqX+S1kmrR0/wHY2bVGfOvFV+b6JgbasvSjZOZpIgcAOfs+Xh H37PhLbo9rsi9MDdwkegrZ9eib98Ie60OqjBOZdBpD9Zfgok2Y7qudr/KRlIbr1hL3cCoM VuY1Zt/z3P/i8Zwmgy9m1Ri2M9MYsT5JzYp2DCZbUbeuPvsfoL1/jXNxRcaxvHflC+L7wx NdHbG8BX9+NeXJ4Z8bh3wJfvk19mlhiYTOQ6MLj/5IA6Q0ekf7oO95m9fCQJJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYN6kLNzVS; Sat, 23 Sep 2023 18:22: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 38NIMWdN004111; Sat, 23 Sep 2023 18:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMWpE004108; Sat, 23 Sep 2023 18:22:32 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:32 GMT Message-Id: <202309231822.38NIMWpE004108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 62f73a711e22 - stable/14 - lib/libc/amd64/string: implement strnlen(3) trough memchr(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62f73a711e224d06e62891c3212e063a752cedab Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=62f73a711e224d06e62891c3212e063a752cedab commit 62f73a711e224d06e62891c3212e063a752cedab Author: Robert Clausecker AuthorDate: 2023-09-08 21:11:55 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:21:37 +0000 lib/libc/amd64/string: implement strnlen(3) trough memchr(3) Now that we have an optimised memchr(3), we can use it to implement strnlen(3) with better perofrmance. Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41598 (cherry picked from commit 331737281c1929c29e679e48783055351ac4fbd9) --- lib/libc/amd64/string/Makefile.inc | 3 ++- lib/libc/amd64/string/strnlen.c | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index 7c6a1f429590..73973a6d69de 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -11,7 +11,8 @@ MDSRCS+= \ strcat.S \ strchrnul.S \ strcmp.S \ + strcpy.c \ strcspn.S \ strlen.S \ - strcpy.c \ + strnlen.c \ strspn.S diff --git a/lib/libc/amd64/string/strnlen.c b/lib/libc/amd64/string/strnlen.c new file mode 100644 index 000000000000..9db4ce30dfd4 --- /dev/null +++ b/lib/libc/amd64/string/strnlen.c @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 + +char *__memchr(const void *, int, size_t); + +size_t +strnlen(const char *s, size_t maxlen) +{ + const char *loc; + + loc = __memchr(s, '\0', maxlen); + + return (loc == NULL ? maxlen : (size_t)(loc - s)); +} From nobody Sat Sep 23 18:22: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 4RtHYQ2B0Jz4v3H7; Sat, 23 Sep 2023 18:22: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 4RtHYQ1TDPz4l2Q; Sat, 23 Sep 2023 18:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnGNH4TMZPlIF6Gz0LsT6NLQewbAyk3tqA/l4+W+t4A=; b=tSzIJIKeWoSjkjrzkGjmG4yVeleLsdaBDgUdBJnQTQJOOgw+B6p73Vq8tTpNYgUCeMzW47 3GC3Hp7rmi6w7wsTz6nX7ZT2m/dibesx2KL5QuoKnKhA9R/ZF/hKSQsBH87ar5UaZihzeh CeecwOlRgQHplOk6wAKcFpBxHGuDChvtfXFnfyY3dVYbJlVqMfqvrtUjDHuJDTaorAoKws xyLTLF7goVTOYr9YJeWd5JUn1f1qhNfaJngFzBuHJ17ZZLixNO1rcx4m+mLEoYOeBNvxqt DQn/DFEP+PNBtMV2XsNI9il21+NNBvpja6hv4GUyxeyZfHpdfZfHLLs47eV7iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493354; a=rsa-sha256; cv=none; b=C55ZYXDANgzJtWk10sWYdG10rjBVQBLDXfyPhEjSk4PcSzuCWvEmFLMlkX7x1SHTmbiTD2 v/VO7jJsRGdXxyw/dhWoel12SISAZOff2k1O8RbJpjttTbIXQD9FUyEgefpC75GUPQCNul YaLP6cMiJ2go8MLCI1oPcxtbLz7S1lTmiGbZ6gQqtToCXhaeR1AXH6kJtFVFG/fSHC+XP9 b+Pxggiu6ORkSWfJPoWg5305ACZtmaiY8wsDiMbfEG3WrXkXDEwY80w9pJDsOcuF9kHigj 9CXP5GbRP/LskvxWCOhpuWwnmfQpXTYypiGl5xdjIZZWvATQ++VzukBnY63LoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnGNH4TMZPlIF6Gz0LsT6NLQewbAyk3tqA/l4+W+t4A=; b=R1rNTfsHE7r9Y3ANLk7O725JBoa+pVaLxTKj8F548kOjSOKftIg+/fb0Ykd1z8aD5RaoBu ZOpt6xDBNWcC35po4bluRM2Ge+FQQBd2mRUa/npQOVXRM22YJTNf4QLMR5an84kulDo5na 3KOeBKzgAIad/XsFMw91RkJ5t+ZGZ2T41iZB3H7/a9l0KkW0Ckch7sNBMEWJC0woSqLLN1 BCxVcSrf6Yjb8YZY+Y8t2vtovo9sMgUwGURx11NBHW59NanZMz4saFaHDOrjLCzWJtei0y w6RBlpo7DG5u+gxCX0pD90MAUsklH6tzoCVHd7sC1hWHxReca0OVXfEEICbrZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYQ0Z5Hzsb; Sat, 23 Sep 2023 18:22: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 38NIMXmK004185; Sat, 23 Sep 2023 18:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMX73004182; Sat, 23 Sep 2023 18:22:33 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:33 GMT Message-Id: <202309231822.38NIMX73004182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: b6864ba42d37 - stable/14 - share/man/man7/simd.7: document simd-enhanced memchr(3), strnlen(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b6864ba42d37b0d6bd596958be13a35f135fa9fe Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=b6864ba42d37b0d6bd596958be13a35f135fa9fe commit b6864ba42d37b0d6bd596958be13a35f135fa9fe Author: Robert Clausecker AuthorDate: 2023-08-25 20:41:07 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:21:38 +0000 share/man/man7/simd.7: document simd-enhanced memchr(3), strnlen(3) Sponsored by: The FreeBSD Foundation Approved by: mjg MFC after: 1 week MFC to: stable/14 Differential Revision: https://reviews.freebsd.org/D41598 (cherry picked from commit 2a4096b012449d09e9bc3e912f762e4786092a3c) --- share/man/man7/simd.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index b0a668e6ade7..e5823f463ffb 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd August 23, 2023 +.Dd August 25, 2023 .Dt SIMD 7 .Os .Sh NAME @@ -58,6 +58,7 @@ Enhanced functions are present in the following architectures: .It index Ta S Ta Ta S1 .It ldiv Ta Ta Ta S Ta S .It lldiv Ta Ta Ta S +.It memchr Ta Ta Ta S1 .It memcmp Ta Ta S Ta S1 Ta S .It memcpy Ta S Ta S Ta S Ta S Ta SV .It memmove Ta S Ta S Ta S Ta S Ta SV @@ -73,6 +74,7 @@ Enhanced functions are present in the following architectures: .It strlen Ta Ta S Ta S1 .It strncmp Ta Ta S Ta Ta S .It strncpy Ta Ta Ta Ta Ta S2 +.It strnlen Ta Ta Ta S1 .It strrchr Ta S Ta Ta Ta S .It strspn Ta Ta Ta S2 .It swab Ta Ta Ta Ta S From nobody Sat Sep 23 18:22: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 4RtHYR3cqsz4v3LJ; Sat, 23 Sep 2023 18:22: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 4RtHYR2nHNz4l2p; Sat, 23 Sep 2023 18:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bssu/+ds5vU/Ee3/WYrc8sNYgsBZinLKMaglI/4Es4=; b=gXOxgS+mIIxMA5vKai/ZKaoZhEYlIjDBHH13xlofsVFJl/el27yu58MlmLmtNPdMDYd+dN vxe1rY9D0aJ+tEG1CfWx2Mc+gJfjNNJ56dBC3OOBzMAfPHXDUhxfKiqYMaPlfgKxJDL7dG g66JBPvI72wG+tBk6jkTtjkANYlXG78iE40LUx04bIf14M4EmQ+oogQ67yUtCwSq7fbaw2 DhqpdxXlrcL69dNcckQLndN6Q3t41EcYrCoIE6jxXmM+DIu6PWrIC5PnBq696Ci26fz/NQ aHuXdgTHNXR/U0/dWpsyBwYI4sYRkQ4MQso/FLWz3J9QT5xzPmYQTD65ZxqGOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493355; a=rsa-sha256; cv=none; b=WZY20xoslteotviXa4K8mRGRQGUmVaXujODIPg+8rABwC/HoY0BljY8by/iDI+E1SRZ3up vjDH3RImnWbqKesUQB3mQViVVBfsAMS8LdlZgUZ3k8aQ42qnuU5BCAvS0Ht7uX+AfrRocn 53IsvKn167oQUkForWZ61ZRdK2xSjA78ixiDybjlZ1iTUqSJmuHVzFzY9sezTS+PdsbIEb Y6SHvlur32HqL/poF55I11PrPGyoT9N/UfIHFG8h0OKN/+QG6db1XmIU8WzYa1svTVymZa ajLqTVsbziwimGkEmpOOM5xR8HQPhfkur5XIRKKzisvr6rZ0HH8GR8AxlOOwLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bssu/+ds5vU/Ee3/WYrc8sNYgsBZinLKMaglI/4Es4=; b=ixy9s3ssbegqMWAzd6c72KjAi+yIZq5q5WEzHAELmSX9ePhqsfkM/PPDKQI2PTKAFGokTE pq1xAsk27B8pkXH0JbSByw5Boi5nxpA8tfmA4PORAH0PCZEfOHbUnUyS4BGkQ06YKIgu0g mFF9SHeUh+7+jwMfK8wGet1+AUaGxb3eK1xyawz2k0iOeBedzN5xd0xnLRrnUidSZA76ZV bq5SoMT8z04ev6Lxc7AwyeybcDgX6haP7FzYe0PG7XIG0N5Z3XjMsasQNpE9oyEAQbWQ+Z zswP9SZrvm49FSaNAc03noi+SuQuY9R69Ce82vruhoKDxzdFhBZvCMPj8RZQmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYR1Ynfzw9; Sat, 23 Sep 2023 18:22: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 38NIMZrs004235; Sat, 23 Sep 2023 18:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMZlO004232; Sat, 23 Sep 2023 18:22:35 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:35 GMT Message-Id: <202309231822.38NIMZlO004232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 0666c6fc0322 - stable/14 - lib/libc/amd64/string/memcmp.S: harden against phony buffer lengths List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0666c6fc0322e0a4912288cd8b02213d52b2a9ce Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=0666c6fc0322e0a4912288cd8b02213d52b2a9ce commit 0666c6fc0322e0a4912288cd8b02213d52b2a9ce Author: Robert Clausecker AuthorDate: 2023-09-14 05:19:01 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:21:42 +0000 lib/libc/amd64/string/memcmp.S: harden against phony buffer lengths When memcmp(a, b, len) (or equally, bcmp) is called with a phony length such that a + len < a, the code would malfunction and not compare the two buffers correctly. While such arguments are illegal (buffers do not wrap around the end of the address space), it is neverthless conceivable that people try things like memcmp(a, b, SIZE_MAX) to compare a and b until the first mismatch, in the knowledge that such a mismatch exists, expecting memcmp() to stop comparing somewhere around the mismatch. While memcmp() is usually written to confirm to this assumption, no version of ISO/IEC 9899 guarantees this behaviour (in contrast to memchr() for which it is). Neverthless it appears sensible to at least not grossly misbehave on phony lengths. This change hardens memcmp() against this case by comparing at least until the end of the address space if a + len overflows a 64 bit integer. Sponsored by: The FreeBSD Foundation Approved by: mjg (blanket, via IRC) See also: b2618b651b28fd29e62a4e285f5be09ea30a85d4 MFC after: 1 week (cherry picked from commit 953b93cf24d8871c62416c9bcfca935f1f1853b6) --- lib/libc/amd64/string/memcmp.S | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/libc/amd64/string/memcmp.S b/lib/libc/amd64/string/memcmp.S index d192229677b3..dc8bcff73cb9 100644 --- a/lib/libc/amd64/string/memcmp.S +++ b/lib/libc/amd64/string/memcmp.S @@ -328,13 +328,28 @@ ARCHENTRY(memcmp, baseline) movdqu 16(%rsi, %rdi, 1), %xmm1 pcmpeqb 16(%rdi), %xmm1 # compare second half of this iteration add %rcx, %rdx # pointer to last byte in buffer - pcmpeqb %xmm2, %xmm0 + jc .Loverflow # did this overflow? +0: pcmpeqb %xmm2, %xmm0 pmovmskb %xmm0, %eax xor $0xffff, %eax # any mismatch? jne .Lmismatch_head add $64, %rdi # advance to next iteration jmp 1f # and get going with the loop + /* + * If we got here, a buffer length was passed to memcmp(a, b, len) + * such that a + len < a. While this sort of usage is illegal, + * it is plausible that a caller tries to do something like + * memcmp(a, b, SIZE_MAX) if a and b are known to differ, intending + * for memcmp() to stop comparing at the first mismatch. This + * behaviour is not guaranteed by any version of ISO/IEC 9899, + * but usually works out in practice. Let's try to make this + * case work by comparing until the end of the address space. + */ +.Loverflow: + mov $-1, %rdx # compare until the end of memory + jmp 0b + /* process buffer 32 bytes at a time */ ALIGN_TEXT 0: movdqu -32(%rsi, %rdi, 1), %xmm0 From nobody Sat Sep 23 18:22: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 4RtHYS48Pqz4v3cG; Sat, 23 Sep 2023 18:22: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 4RtHYS3TPnz4lML; Sat, 23 Sep 2023 18:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FbWfn1yOZ5n9HEs+iIsTs0K1TMaf7ysdWzDkkktnLdQ=; b=hG0vznIbybKjtvsrUxVQiRvnhJ5jKqafd2Un2fg0w4riaVRMf2Rh4yvhVQL0u2tmaufmdS 1u0niZPvz4PTFBm/eRENez15MHHKiIIja+C0c63KewjriTtk2NPgAipYkUXGffwhxNLlhN /gNV6FLoLWme/QjvtghlMbnLRwWUn4G1XNt83XP4hPC3kMsdknT3P2AZl+5WLwJq92ipjB rj5MPwyoFozZffGf9/SF9w/eRzgBLloiieymyNgI4VqpnlB4B0LU2wxzJJ1baK/eYPW3d1 1pmcrnraWYR+fwWKzdYZIM/CBlz8YGHeXRjDyo6HyPXx0+0aX6bbPFmFLTGAdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695493356; a=rsa-sha256; cv=none; b=tg60HzVMEJ+BJBdnnI07reprobtgNHRAY/p+/BR04Uqh279Q35K14PiDjAuDAhlMDaLd7o 3dWJY3ZI5SjAuhTnq2fTiyboRNtkXVQCVd+x16l/dyoUHeImvScmJ3zD0xWRZRehryUDRl VqOfrx68fczjB6sDcqio1i+9HhudZxPSLuJtPn/S2OFnjCJKRLlZUkqAaAGzBVk89G4UtH JwbCkJ7kCUz77om4Om8GwNNAuPJ5f+K1e/9AssUeVSM5VfRJZBny0IWVffj8heqNC4EeTZ FOmfVQDeTPUbjYZq/oVLGb5A4EAaFZhnCrJeBhGwFWrzRgj0+UKoB/9WjhV2yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695493356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FbWfn1yOZ5n9HEs+iIsTs0K1TMaf7ysdWzDkkktnLdQ=; b=lhVU1Nhwuuzak7fG+78TWL8YNkt3GUQKHgtRc4yBx/T5FcFrAciPwNOh+gQ1r0ScAXhlk8 RaYGlAfL99maV/y5VmOs7TPcKWm06xR7zV4SjiBTTmvk0YkyJOJHKgiVkwO2fECy6eXdEc TAguN/NerueZmv44A+P9hQIZfGvzKQ3yFccW6lg+IJzzaq3O7U+JjwcFGgCkBL6sjPuNW0 gDDUoWNUrUWH080MV3oaR7kaCqQjwMnZ3WRMNFUGD489enW9Dbsn22TrdpMWw5uuDL0RfW YXRJu8/kHOicG0ID/JD6r0f/amGot9qnGynkWoisCWbcHQSG/ZsH8pe11F2seg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtHYS2ZJCzVT; Sat, 23 Sep 2023 18:22: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 38NIMaJq004288; Sat, 23 Sep 2023 18:22:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NIMavp004285; Sat, 23 Sep 2023 18:22:36 GMT (envelope-from git) Date: Sat, 23 Sep 2023 18:22:36 GMT Message-Id: <202309231822.38NIMavp004285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: efbccec3e072 - stable/14 - lib/libc/tests/string/strcspn_test.c: extend tests to catch previous bug List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: efbccec3e0722d25601bc48a5dd62b22455381b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=efbccec3e0722d25601bc48a5dd62b22455381b3 commit efbccec3e0722d25601bc48a5dd62b22455381b3 Author: Robert Clausecker AuthorDate: 2023-09-12 02:48:58 +0000 Commit: Robert Clausecker CommitDate: 2023-09-23 18:21:42 +0000 lib/libc/tests/string/strcspn_test.c: extend tests to catch previous bug This extends the strcspn() unit tests to catch mistakes in the implementation that only appear when a mismatch occurs in a certain position of the string against a certain position of the set. See also: 52d4a4d4e0dedc72bc33082a3f84c2d0fd6f2cbb Sponsored by: The FreeBSD Foundation Approved by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41821 (cherry picked from commit 601fd768cfd599518f7f9d30592763d1279d336d) --- lib/libc/tests/string/strcspn_test.c | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/lib/libc/tests/string/strcspn_test.c b/lib/libc/tests/string/strcspn_test.c index abacdcbbf18a..722d20025535 100644 --- a/lib/libc/tests/string/strcspn_test.c +++ b/lib/libc/tests/string/strcspn_test.c @@ -148,10 +148,74 @@ ATF_TC_BODY(set_alignments, tc) test_set_alignments(buf, 30, NOMATCH); } +#ifndef STRSPN +/* test all positions in which set could match buf */ +static void +test_match_positions(char *buf, char *set, size_t buflen, size_t setlen) +{ + size_t i, j, outcome; + + memset(buf, '-', buflen); + + for (i = 0; i < setlen; i++) + set[i] = 'A' + i; + + buf[buflen] = '\0'; + set[setlen] = '\0'; + + /* + * Check for (mis)match at buffer position i + * against set position j. + */ + for (i = 0; i < buflen; i++) { + for (j = 0; j < setlen; j++) { + buf[i] = set[j]; + + outcome = strcspn(buf, set); + ATF_CHECK_EQ_MSG(i, outcome, + "strcspn(\"%s\", \"%s\") = %zu != %zu", + buf, set, outcome, i); + } + + buf[i] = '-'; + } +} + +ATF_TC_WITHOUT_HEAD(match_positions); +ATF_TC_BODY(match_positions, tc) +{ + char buf[129], set[65]; + + test_match_positions(buf, set, 128, 64); + test_match_positions(buf, set, 64, 64); + test_match_positions(buf, set, 32, 64); + test_match_positions(buf, set, 16, 64); + test_match_positions(buf, set, 8, 64); + test_match_positions(buf, set, 128, 32); + test_match_positions(buf, set, 64, 32); + test_match_positions(buf, set, 32, 32); + test_match_positions(buf, set, 16, 32); + test_match_positions(buf, set, 8, 32); + test_match_positions(buf, set, 128, 16); + test_match_positions(buf, set, 64, 16); + test_match_positions(buf, set, 32, 16); + test_match_positions(buf, set, 16, 16); + test_match_positions(buf, set, 8, 16); + test_match_positions(buf, set, 128, 8); + test_match_positions(buf, set, 64, 8); + test_match_positions(buf, set, 32, 8); + test_match_positions(buf, set, 16, 8); + test_match_positions(buf, set, 8, 8); +} +#endif /* !defined(STRSPN) */ + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, buf_alignments); ATF_TP_ADD_TC(tp, set_alignments); +#ifndef STRSPN + ATF_TP_ADD_TC(tp, match_positions); +#endif return (atf_no_error()); } From nobody Sat Sep 23 19:11: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 4RtJdz48DHz4v6c4; Sat, 23 Sep 2023 19:11:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtJdz3gsNz4vqj; Sat, 23 Sep 2023 19:11:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695496295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KzRe14d6LXyGpH3o7bqJKxwCRIEozMqTSnUo7pHkTxM=; b=o9wmQ7Fi39sm7JFl7uq6w8qj7V5wfrVhqHzyGnXrXb8+BOKhlA9jNZrwsYPOtXQpQvSYhD ouHkRUjuxAw869SRZErBmARxycAW2pPVRWfn/Fz5rPqAnxk2apDq0VWsixyEPCZXKKbLOH qYijtAFLKVT9D0QJAAmiD2hQ25LkYvERBHNuTXXA56PdV7ArrWxVOHDEu1kfW8ZPGsZzTm RWLB7Wot0LOn+NJQpkauPNQbqnSr33ge2Sv0WMMlb0U6+ZIjcabPuLygIEQWYOxvyCgOQ/ aMZuCYKpUJcpa4e8QiG/uIwN67eltaoGeRalqAcJLVowDYj06o2atrSplyD2Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695496295; a=rsa-sha256; cv=none; b=On8rnu0KKAU14iffxx51DgbHRJ/HukoC9epxO4ADn2HGmwVwebqv9ExvoSBt+P8A1Xc19L +YT/m75JwAOsBbudG2onvo1f6kKNi8f/uzj7k77uos2LGikeCUVg7E4VR1nGksJnH3eT+5 hETAA30bEj1r9Epu8xOncaPRrMbA9FkW+6SIYP8gvu7TvZnLehsfk/NeLjyBbcHIXEMpxM XfJtgJg5cbY29kozhUWngEYBPKIil5sWfLwdMQ/9D55hXuffubs4bPXRLsdVSi8bifsFTc lJXMzXXCcNtBn22bb2/fqSq0rZnyG9r3e4jkgnQ0W9dcenJQm9dM6oY6t8/JxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695496295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KzRe14d6LXyGpH3o7bqJKxwCRIEozMqTSnUo7pHkTxM=; b=yTS8ya8BWxOTmo63AMS7/92ccaObkZIetf0CJfKA2vs6rNOPo3ELpZQB2thNdpPfbQfEcu pzmPCtbMuZ5aD5wnQs3DpYHaTEvk4ZjgjgL0WN9seRZbYVTaSqAAEPdjfO5VDbISdOzapn 4BFnVgE7IMuleCbe42UyoaLLtrpEXyKkLJB0X/GE0E1Glw5Gl/CFDvi28EdzFBY2WfijkA RpbhHpluuNT0HP2jJbS7ge5qDIzk+4HCpHtqvbrFnRjeBgXxfNLL0aVO4uL1reg/jaVOpu bb/KUD8UsK8VJlKyvM/wjHMSOegh4cPTh/RYnVJGzJh6ynIiwrk0rbMewSI4FA== Received: from [IPV6:2601:648:8683:39a0:3160:4b0a:46d5:c8ed] (unknown [IPv6:2601:648:8683:39a0:3160:4b0a:46d5:c8ed]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RtJdy5VxMz1QhG; Sat, 23 Sep 2023 19:11:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <46876c23-e29d-a899-9bf1-78696f6ea90e@FreeBSD.org> Date: Sat, 23 Sep 2023 12:11:32 -0700 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: 6dff5fb10b5e - releng/14.0 - lib/libc/amd64: back out amd64 SIMD work Content-Language: en-US To: Robert Clausecker , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202309190320.38J3KHf4087911@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202309190320.38J3KHf4087911@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/19/23 4:20 AM, Robert Clausecker wrote: > The branch releng/14.0 has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6dff5fb10b5e7ddf1049672ccaaef41a5ad1d5b8 > > commit 6dff5fb10b5e7ddf1049672ccaaef41a5ad1d5b8 > Author: Robert Clausecker > AuthorDate: 2023-09-14 01:45:12 +0000 > Commit: Robert Clausecker > CommitDate: 2023-09-19 03:19:06 +0000 > > lib/libc/amd64: back out amd64 SIMD work > > Due to some bugs being found, back out the amd64 SIMD libc work from > releng/14.0 ahead of the release and give these changes in a critical > part of FreeBSD some more time to mature. > > This patch set backs out D40693, D41333, D41349, D41442, and D41697. > Change sets D40729, D40730 (ffs), D41011 (bcmp integer overflow bug), > and D41050 (rtld bits) are not backed out. The intent is for this > backout to be a direct commit to releng/14.0 with the changes staying on > CURRENT and stable/14. > > Sponsored by: The FreeBSD Foundation > Requested by: imp kevans > Approved by: kib, re (cperciva) > Differential Revision: https://reviews.freebsd.org/D41855 Thanks -- John Baldwin From nobody Sat Sep 23 21: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 4RtMFX2jZWz4vFWn; Sat, 23 Sep 2023 21:09: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 4RtMFX2C87z3SXZ; Sat, 23 Sep 2023 21:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695503344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ37n8lj02utSW/PnpV+xTt7RdMAs1f/R6OYpLB/+PY=; b=RynYBE3owJ4uGR2vBCrreFtANtVLQXQdqrlJimm8JibgVx3xmQGzeo13Y1t8Lr0XxNg6JB uwLkYN9WGvhsNagXWbmfO4k6AsHxqtIql8Xzyemg7LjJRX4jJOI8pXd/v/4mbSpoHdmzEb F1J/JcOSVriQ6yP7PQvDpWc5bBeFP4BbTVzeqlVFIiEXRj0VK2ENa5N5nt+wBoV+wrYO8L hQrIfr6HRMtJIxffqakAPhGl6AOsEUcYa1UQhF1uL1c5vEIZ5ffxwB3zIMpm2iSFmBPABC ja7q+ysyBdAtxS34MwFrQqYn3ZbpzTeQALlaiPM+aTyep5Pmc+TaQbCm8GPPpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695503344; a=rsa-sha256; cv=none; b=X9EKgddZulI6Rin+pFywgms/EVAfhPIYV+ll+7mto3L/b9e8qMBMBTKx35zHKxWLQ7HBzw /OIpEpzW5Bu+tordEyxVHiv4vS4HTuMczHNJP2SSwrr5qjtyFSlDp1FkFX9pgI601IXOiY aX/GBiq4hXf7pDdfzJpKsDtBPSDq5mUowV9RfUIRw6YMXBjYtCJcrF0V4sBiJWuKi2gwbF e0laMJccRCF76y6olFZGFMkgI1Jr0Wh8KbTvqpCuKzedN+66mP1na1EpuU7oaNAde4JLI0 oYRduW0Ug377zd7kDlSSkmqmnewtHxJxw7Mnh4ApOBjP2+wS6QvO89bUu5TRrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695503344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ37n8lj02utSW/PnpV+xTt7RdMAs1f/R6OYpLB/+PY=; b=wETym1mO7dY4j7aS7atlwLO6ESS85VttGmHwlgEMvRUCS1+1AXgCDhXwNiR4QoyORD+P7x DWlrMs5+L2bxK1QdKs3sZQCeot7buWZ0j245RmxK+zBCPR6p47iz/5pJkkL9msTbidQPXx buAaBWHOC1PNoR3kmM9HVIw4k+sbBiTdvhCyi9Ljw5HDk7oY7y5XzF7YEJPw4lEhULJff1 QY1hIDYCjSNWW3eAjZckaZbrvmpsG5ZQsx/LmUuinZcNiNtwXHeFnaFjURehwb60L1GiiH ibBnhbDueBdOzzy9AgTYsFtloYpff2xiBkycTPHbClRvQfwaLNqKybuhlIn1Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtMFX1GVtz4cZ; Sat, 23 Sep 2023 21: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 38NL942S071351; Sat, 23 Sep 2023 21: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 38NL94uB071348; Sat, 23 Sep 2023 21:09:04 GMT (envelope-from git) Date: Sat, 23 Sep 2023 21:09:04 GMT Message-Id: <202309232109.38NL94uB071348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Garance A Drosehn Subject: git: ca927128bf6a - stable/13 - When parsing a rule to rotate log files on a specific week day, parseDWM() can advance the time to the next week. If the next week is in the next month, then tm_mon is incremented. However, the increment was failing to handle the wraparound from December to January, so when parsing a rule during the last week of the December, the month would advance to month 12. This triggered an out-of-bounds read of the mtab[] array in days_pmonth() after parseDWM() returned. To fix, this change resets the month to January and increment the year when the month increment wraps. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gad X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca927128bf6a92abce27151fbb1ab112fd2a8385 Auto-Submitted: auto-generated The branch stable/13 has been updated by gad: URL: https://cgit.FreeBSD.org/src/commit/?id=ca927128bf6a92abce27151fbb1ab112fd2a8385 commit ca927128bf6a92abce27151fbb1ab112fd2a8385 Author: Garance A Drosehn AuthorDate: 2021-12-30 20:45:13 +0000 Commit: Garance A Drosehn CommitDate: 2023-09-23 21:04:40 +0000 When parsing a rule to rotate log files on a specific week day, parseDWM() can advance the time to the next week. If the next week is in the next month, then tm_mon is incremented. However, the increment was failing to handle the wraparound from December to January, so when parsing a rule during the last week of the December, the month would advance to month 12. This triggered an out-of-bounds read of the mtab[] array in days_pmonth() after parseDWM() returned. To fix, this change resets the month to January and increment the year when the month increment wraps. The default rule for /var/log/weekly.log triggers this during the last week of December each year. Reported by: CHERI Obtained from: CheriBSD Reviewed by: jhb Sponsored by: The University of Cambridge, Google Inc. Differential Revision: (cherry picked from commit b7b447fd4ca327faa99b2f16e6cbd61c86c75f04) --- usr.sbin/newsyslog/ptimes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/newsyslog/ptimes.c b/usr.sbin/newsyslog/ptimes.c index 06bdffdda084..792ad3e1727d 100644 --- a/usr.sbin/newsyslog/ptimes.c +++ b/usr.sbin/newsyslog/ptimes.c @@ -277,6 +277,10 @@ parseDWM(struct ptime_data *ptime, const char *s) if (tm.tm_mday > daysmon) { tm.tm_mon++; tm.tm_mday = tm.tm_mday - daysmon; + if (tm.tm_mon >= 12) { + tm.tm_mon = 0; + tm.tm_year++; + } } } break;