From nobody Mon Feb 3 06:41:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmcNB1vGgz5mc01; Mon, 03 Feb 2025 06:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmcNB1RJPz41hk; Mon, 03 Feb 2025 06:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3W8Gog8LhYDqHIxVAUSnfVZ8i8tFLpXVRMqYOJiT6Aw=; b=W/t+c88R5HrYJFC2udSX1MKb39xflAiq1zBvk/q17R7RGVrO0LPyGf+VFa+jWCnQpSMT7V IqZEFL9mSG82FN84TPYDbmiZudOJxklBCg0CocQD4LtQGyotJQdSA72h9t3lW0s52o7WGJ 4CL47aHstCRBLV/peI2/CylyH/R3SrX8J6KgVhwkEN7b8AHSyati38TiKbFnQClIKJrFgh uEDKFR2vldZGrccws0QZreKAjprGYfu6hzgwD75mDI9BiKW2BT52EwPaboHeh6OJsfvX9c kj1kx1OJgEDFs4XsEKlYFxFyyUiKpzsfIDf6VzLiSYlGO6hwk8TCkXdpeUE2yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3W8Gog8LhYDqHIxVAUSnfVZ8i8tFLpXVRMqYOJiT6Aw=; b=HWtnDx+4OtMv6X+vS8hDzUvbpGbKQt7DnBeL8pelSCyGvjEozTdzDqcgTFPDYdRpCEzDRQ npVFphodpDdEpEu8+DIL9doY/QPApNxsqn5wDaU5lL0z+2bbaeabIaDMuvmYIu8rGH3qde lubcWVwJqUuWHGwODYlQBz0ZPpNi5m0Si88gSOoDLDyGhmshitHfoyGNuXA13X6vJjnNCg /PLgistzWcTfjMzVKIzOeBU73Q70GAPpJDQBpzflDz6p2VnvE4iNzMIEUtN0ss7UmYO64D sYA/amqhdXm4WTfB+0MX1y7WScJVDd16k0knuhrBLjRYNUvB7AOz/wxqaW8iwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738564890; a=rsa-sha256; cv=none; b=KKrQD74MbineY7V22hDkjMwfC/3c/Bn/dIhj/I9zaQbdg0dDCO+3Shk6y4k/gKBFuLEFS7 A/MeKRjor6fnDYyILNi5vgMjb8pXTF76yAjpZJZMxiLt2rbWRHmvOFzeyinBslLmOqJDJw hW5Mp/Ld8cCsHUvcuT6FA5oEfapER/xCgggj+jAC6HVRvzjH4esZs2KYD87VvwrpTXOaps X4kjGqeJfYI68Y1kp6K8YnKSilJNyE70WDQ113ux4OIbp2wMmfLoW5DB0Y7UKSfUq1x4Lz 9eJ6FLkMDs90gIp1KjRRmQ2CnYokf0IqJt+ZvcwhD5XRhiLt76YlKYAQW2vODQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmcNB0rwcz998; Mon, 03 Feb 2025 06:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5136fTA9055744; Mon, 3 Feb 2025 06:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5136fTCd055741; Mon, 3 Feb 2025 06:41:29 GMT (envelope-from git) Date: Mon, 3 Feb 2025 06:41:29 GMT Message-Id: <202502030641.5136fTCd055741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9d7fb768543b - main - sockets: garbage collect SB_NOINTR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d7fb768543bbd1ddcd6a6d7bc2477838c59368f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9d7fb768543bbd1ddcd6a6d7bc2477838c59368f commit 9d7fb768543bbd1ddcd6a6d7bc2477838c59368f Author: Gleb Smirnoff AuthorDate: 2025-02-01 20:06:21 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 06:38:18 +0000 sockets: garbage collect SB_NOINTR Not used. All socket buffer sleeps are interruptible. --- sys/kern/uipc_debug.c | 4 ---- sys/kern/uipc_sockbuf.c | 3 +-- sys/netsmb/smb_trantcp.c | 6 ------ sys/sys/sockbuf.h | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/kern/uipc_debug.c b/sys/kern/uipc_debug.c index 83cb7f6dc00a..bbd6c078fd06 100644 --- a/sys/kern/uipc_debug.c +++ b/sys/kern/uipc_debug.c @@ -328,10 +328,6 @@ db_print_sbflags(short sb_flags) db_printf("%sSB_UPCALL", comma ? ", " : ""); comma = 1; } - if (sb_flags & SB_NOINTR) { - db_printf("%sSB_NOINTR", comma ? ", " : ""); - comma = 1; - } if (sb_flags & SB_AIO) { db_printf("%sSB_AIO", comma ? ", " : ""); comma = 1; diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 95c7241d5f13..e8d410b00c15 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -456,8 +456,7 @@ sbwait(struct socket *so, sb_which which) sb = sobuf(so, which); sb->sb_flags |= SB_WAIT; return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which), - (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait", - sb->sb_timeo, 0, 0)); + PSOCK | PCATCH, "sbwait", sb->sb_timeo, 0, 0)); } /* diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c index f19eea45f265..fbbf987367d8 100644 --- a/sys/netsmb/smb_trantcp.c +++ b/sys/netsmb/smb_trantcp.c @@ -161,12 +161,6 @@ nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, struct thread *td) goto bad; nb_setsockopt_int(so, SOL_SOCKET, SO_KEEPALIVE, 1); nb_setsockopt_int(so, IPPROTO_TCP, TCP_NODELAY, 1); - SOCKBUF_LOCK(&so->so_rcv); - so->so_rcv.sb_flags &= ~SB_NOINTR; - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); - so->so_snd.sb_flags &= ~SB_NOINTR; - SOCKBUF_UNLOCK(&so->so_snd); error = soconnect(so, (struct sockaddr*)to, td); if (error) goto bad; diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index fd503d021282..73dd7afa371f 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -40,7 +40,7 @@ #define SB_SEL 0x08 /* someone is selecting */ #define SB_ASYNC 0x10 /* ASYNC I/O, need signals */ #define SB_UPCALL 0x20 /* someone wants an upcall */ -#define SB_NOINTR 0x40 /* operations not interruptible */ +/* was SB_NOINTR 0x40 */ #define SB_AIO 0x80 /* AIO operations queued */ #define SB_KNOTE 0x100 /* kernel note attached */ #define SB_NOCOALESCE 0x200 /* don't coalesce new data into existing mbufs */ From nobody Mon Feb 3 06:41:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmcNC6djpz5mbfX; Mon, 03 Feb 2025 06:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmcNC25qmz41QG; Mon, 03 Feb 2025 06:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OmwznoOYdzUSYrcf+Cz90JDQGLiiKsnbZN2BVDfz/U=; b=o3L/lJIV+c3cDLFeIoIzI9ly2ATNbCnxHtueEm4xDy6wlkQiohBiOqdmSmTNcgsQuc6ObL N2rl6FuU9nEomntIrOpvP/11kWRhtBRD7/xYA3uw9kSAkmsSUgiJN0IWnsytYEmIa9Falt DeILMHiyV+BT4qspAtzeLINuSU5hlScjrKdBS09xyKEwGf9Qc9ki5y+QJNg17BSBBUAHVB pnGAHNSmG1xqBgwwTSX6IML2yvhD+j0vCElTB18/tcs9U2Jz9l+ffb7z3MCUR4enHhGDqQ kw5ugbad7DhppqQXMiJfam08ktlifgv48KsNEDhNWnMYyIFPyrWMZpg0+FOTIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1OmwznoOYdzUSYrcf+Cz90JDQGLiiKsnbZN2BVDfz/U=; b=NS/dwIo/5IRRNW0bX1Ld/RQtktSkwFdH1C28EloRHID5yO8jpLKSaItrfJTjQMh+mji79l vI/mpaHLX144pRZSp7DpuHUvaLdausYux6MZVZGRLQNI94EFww/Dfk+KkCiOZqFuNAlmOo tLlHmk2I4pfaKDdPFVo3zzq1RlJzgp2Tru9M68qvvr2tel9CK0IHl8KV35Q5kdXeYUhvhi 3W1aC+1ZvBjzLVtJIfJMpin+yCJHn1Cpyf8eXf9g2nqQZBL0JfbxKs+nr+nPhc2DlvmqwN h1WksmQxgUksTgGEp/mUPnXcypiKR7bt4e+Z/QG/pNPYe8dqI1JZcPaJ9QaYqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738564891; a=rsa-sha256; cv=none; b=T1mK16CeeRnIu5r5GHY6vdsdtuSSX3YgSJQqzl2WtC+ygNliwvAjGGVo4b/l7sWXtaBqy6 EHeUhbcavwgx6r04fZjm2mBhWD5muTfIzOzHXM0eKsD5R0PRs0oUwoX8aWocJYNsQhN/Ay WONfsnEZoI72ZlHTSSnBJKtPDuSE9vAm1npaJvXu5dt/oVbSwEc95OqrGH3Nc/WZ9ks6cw O1yw9S1dQZy6zzTL1GuqHAdW4wD1PHvAT/6K6suA0nQeHEbTJW4kzjUY/HzwEmzmQf4c7I xxxOSwdyZmYHItY8fWJhWdFYluWXiqAefFqvSYcJk722LiEIidAnDm8rL8r5VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmcNC1clLz8wh; Mon, 03 Feb 2025 06:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5136fV0S055799; Mon, 3 Feb 2025 06:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5136fVGl055787; Mon, 3 Feb 2025 06:41:31 GMT (envelope-from git) Date: Mon, 3 Feb 2025 06:41:31 GMT Message-Id: <202502030641.5136fVGl055787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6472c6baee7b - main - sctp: don't specify pr_poll = sopoll_generic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6472c6baee7b7f1069943391ca6d09e595b88445 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6472c6baee7b7f1069943391ca6d09e595b88445 commit 6472c6baee7b7f1069943391ca6d09e595b88445 Author: Gleb Smirnoff AuthorDate: 2025-02-03 05:28:41 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 06:38:18 +0000 sctp: don't specify pr_poll = sopoll_generic Trust the framework to set the generic methods. No functional change. --- sys/netinet/sctp_usrreq.c | 1 - sys/netinet6/sctp6_usrreq.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index b9a3be5280ae..7fb7ab3418cf 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -7516,7 +7516,6 @@ sctp_peeraddr(struct socket *so, struct sockaddr *sa) .pr_control = in_control, \ .pr_close = sctp_close, \ .pr_detach = sctp_close, \ - .pr_sopoll = sopoll_generic, \ .pr_disconnect = sctp_disconnect, \ .pr_listen = sctp_listen, \ .pr_peeraddr = sctp_peeraddr, \ diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 0f194821ea94..c0e758e9e12b 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -1094,7 +1094,6 @@ sctp6_getpeeraddr(struct socket *so, struct sockaddr *sa) .pr_control = in6_control, \ .pr_close = sctp6_close, \ .pr_detach = sctp6_close, \ - .pr_sopoll = sopoll_generic, \ .pr_disconnect = sctp_disconnect, \ .pr_listen = sctp_listen, \ .pr_peeraddr = sctp6_getpeeraddr, \ From nobody Mon Feb 3 06:41:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmcND509gz5mbp1; Mon, 03 Feb 2025 06:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmcND2dQ5z41qW; Mon, 03 Feb 2025 06:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl71bIeMDplxJMMV4DBEefASe/NDwD1kfcCEuwHBDP0=; b=ctL87d0B/jNb3CcADNQ1pZAxdRMuEIcvZqeVDT8TI0iOuKEnlGTMSvqPxUH7UAaIOau6qV HfTocJ8BFMqKEHliCQo6FjYLVcVkKC+92FDk7XrqRuRJDG8KQ3ghDSIeSDFrol9SXXrXSe /J4Vdfv38N25VcyRElteDWLaKWPMaLfCeo/JF/7uKBuSBu/OVbN9i1TKx7G3mAZFBfxZYl fuUqwnLBqL3ZZWXAdqetp2yfMGXd3hBCUwmqSMQe+BC8XcuFsL965agqP0/kYEN4da0qVN 0NaoRI2jZCEgsyyS7TVNcsLP7EJ6jrfvUf176CZ2aIaWhnDE0h90bJXSoCVHZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl71bIeMDplxJMMV4DBEefASe/NDwD1kfcCEuwHBDP0=; b=HPTrVfaHclrY7cIm/WKnt7e8+xKM7llEh0bakoCiyH2pGOa/eo6ioWdge3oOJeiTss1x6/ URzI2Bs5FXzp+40ZH/jTQOUiR50F90wqC2aFklP8FslrnokDsvSOvJrewIlqpgnu8JppJf 32mLyHTDn8dQUht3SUlI5QvF3gj+bM6fo0nFahG8kQDeX5I3Had2TKxrnnWXKXwFFjPCzZ LhCt6UdiDaw8vVPHjOZo3N1CoiH3x69RjnWKf6wXoEEXCsMEYwIZJyXj9B2jI3/SV8ghLz YAo3olO/DuRv7wSu82fVPfgOm/sipGbtiuT7sGabUvch8nlsQZPYGAiE7myewQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738564892; a=rsa-sha256; cv=none; b=DRpm8wPP34LgcwTFrhsrDcb7tWkvqo8wZRw1FhcClW1ue9mIfJxk5cQFP1PQJ5qxRF3YoD b+aI0BAGHUr7GxwK33TAVG+JFkpgg1x7+O67sHJ415s8K5tGbOAUDy7UZ+dYOHpuyDpKMa gaAlFsKc6nR++T0fdW2L2/pDpfGaKyA5aYki13uV+AsQpFs8tk9fe+S08dHi08e+aHKs30 Ds8l9oyB4O3IKazWK8Mx8BEINkYIWGVyrIQLkJAX5OVcPEoa8fs/tyRwq1dCct+Hs/+sYE xzWw3D1jp7H9h1kBtFMD846PTI/4mP72nDb/P6bfWWHunGPp/H3WS+JvPW8K1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmcND2Dslz999; Mon, 03 Feb 2025 06:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5136fWQw057287; Mon, 3 Feb 2025 06:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5136fW7q057262; Mon, 3 Feb 2025 06:41:32 GMT (envelope-from git) Date: Mon, 3 Feb 2025 06:41:32 GMT Message-Id: <202502030641.5136fW7q057262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 815f2a61bfa4 - main - sockets: removed unused argument from sopoll() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 815f2a61bfa43bf46d79b34f081e2fac1dca1d3d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=815f2a61bfa43bf46d79b34f081e2fac1dca1d3d commit 815f2a61bfa43bf46d79b34f081e2fac1dca1d3d Author: Gleb Smirnoff AuthorDate: 2025-02-03 05:36:17 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 06:38:24 +0000 sockets: removed unused argument from sopoll() --- sys/kern/sys_generic.c | 2 +- sys/kern/sys_socket.c | 2 +- sys/kern/uipc_domain.c | 3 +-- sys/kern/uipc_socket.c | 8 +++----- sys/sys/protosw.h | 3 +-- sys/sys/socketvar.h | 6 ++---- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 6fc7d5d2eefa..a3722d771573 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1817,7 +1817,7 @@ selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td) */ for (;;) { selfdalloc(td, NULL); - if (sopoll(so, events, NULL, td) != 0) { + if (sopoll(so, events, td) != 0) { error = 0; break; } diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 9011aa31c44f..ec9fd615685b 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -288,7 +288,7 @@ soo_poll(struct file *fp, int events, struct ucred *active_cred, if (error) return (error); #endif - return (sopoll(so, events, fp->f_cred, td)); + return (sopoll(so, events, td)); } static int diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index c5296f12ba94..0d3c622fa9c0 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -177,8 +177,7 @@ pr_soreceive_notsupp(struct socket *so, struct sockaddr **paddr, } static int -pr_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, - struct thread *td) +pr_sopoll_notsupp(struct socket *so, int events, struct thread *td) { return (EOPNOTSUPP); } diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 46a7053f2872..accd63642024 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -4405,20 +4405,18 @@ sohasoutofband(struct socket *so) } int -sopoll(struct socket *so, int events, struct ucred *active_cred, - struct thread *td) +sopoll(struct socket *so, int events, struct thread *td) { /* * We do not need to set or assert curvnet as long as everyone uses * sopoll_generic(). */ - return (so->so_proto->pr_sopoll(so, events, active_cred, td)); + return (so->so_proto->pr_sopoll(so, events, td)); } int -sopoll_generic(struct socket *so, int events, struct ucred *active_cred, - struct thread *td) +sopoll_generic(struct socket *so, int events, struct thread *td) { int revents; diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index f9d7e1c4bb69..941d377b1549 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -93,8 +93,7 @@ typedef int pr_sosend_t(struct socket *, struct sockaddr *, struct uio *, struct mbuf *, struct mbuf *, int, struct thread *); typedef int pr_soreceive_t(struct socket *, struct sockaddr **, struct uio *, struct mbuf **, struct mbuf **, int *); -typedef int pr_sopoll_t(struct socket *, int, struct ucred *, - struct thread *); +typedef int pr_sopoll_t(struct socket *, int, struct thread *); typedef void pr_sosetlabel_t(struct socket *); typedef void pr_close_t(struct socket *); typedef int pr_bindat_t(int, struct socket *, struct sockaddr *, diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index e818fd3fc757..57209ea5557f 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -525,10 +525,8 @@ struct socket * sonewconn(struct socket *head, int connstatus); struct socket * sopeeloff(struct socket *); -int sopoll(struct socket *so, int events, struct ucred *active_cred, - struct thread *td); -int sopoll_generic(struct socket *so, int events, - struct ucred *active_cred, struct thread *td); +int sopoll(struct socket *so, int events, struct thread *td); +int sopoll_generic(struct socket *so, int events, struct thread *td); int soreceive(struct socket *so, struct sockaddr **paddr, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp); int soreceive_stream(struct socket *so, struct sockaddr **paddr, From nobody Mon Feb 3 06:41:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmcNG15Tzz5mcCM; Mon, 03 Feb 2025 06:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmcNF4N2dz41QL; Mon, 03 Feb 2025 06:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kou/eh+JZFDakVKVbOoD7M0Lud5TPWTS2HpSKHZ/enU=; b=p15L9JJY6jfQc7izA7xvLXP7cdGYWKam2/0acxL2vHkmzy1wXU6t7uD0+88Lw1aAFgO94a NKXhmnhgjc571sCGFWCc/yoj3CsGoEY7LMrR6tRjrx/ZonYVfwzx/f/kDZHYn3S7C5b2nC M6jt+/563Raf404iqk/RMpHdB1qum7TPBJnwrO3zKdgzWTu+J3pWe9fz4iAYXmyrTer3Yh pzsHNuQxHstfD06Vfo9N0Igp3tazgmLRm8iV8tLrc3SxkmwXy0MVJ5lvn+DGEqgIDqn9Yu qlHC7eVLbDCKmUk0McZH2ttEyjt8cWpdPA9QTwvEVh15/IU7i3dMjDITKdgwjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738564893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kou/eh+JZFDakVKVbOoD7M0Lud5TPWTS2HpSKHZ/enU=; b=JkXiS4YY0WJDTSYg/Lf0dt3q/o9b+nnQR52UDGaIoMjf+Fxc98N3UcPP0b1qTAsUT1TF1F FXjtiMC8Y6F+NcqGIN7XFNkhWdQRodJLtoO30s74l3Wubak4VY3515Md6MCJoM+GI2ky7a 2EXhejf4/QCmbGfkf1h95lEvS8i3w8/6jQD9RaBuisdwV4+w+ezRWnpio6hDNCED6YDh4M jnK09yS1puf8AySuuzaCaUYV2t2AOQdZbiIWwwqgKrcltk9XocQYM7lXhaVO7+180xBx4E sVw9RY0Yx/oWLHDKnbxa4RvuvPK/SyFY0TP4lP+q/bxrNQGSmaLUY+h9jS8qig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738564893; a=rsa-sha256; cv=none; b=J9Cd74wRmYsZqYEf1uheH1I+vFQbuoz9kohJNW0dN+5zw4ZH4koWNE0zuCa4MnN4XGi+SY VDbTJbbzEJ5/ZmGB4d5XCB+emzcA6zmDU9zcWJ5NgvHGS1CUT+Y6enJ1yKI1DkXNMjQKtG qmEZEb9RqHLy3bBDJuhvSi7w62gxmLHa/RhWfxIyMSxeTgtvCvukBjq8Jr1IU/PAbxJ/Mv oMTUNsOtcq18xAbO1R/WbfkOSYmdzWZNT96iaHExJDHwx04B0EvNrzWCCZSXBtwUKGAU3c CBydWwux5pvXoaqjaCMd4FHEP9usf7uatak7RjfMQEXsuiudd+4s1XFPkwqIbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmcNF3Csmz90s; Mon, 03 Feb 2025 06:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5136fXId058460; Mon, 3 Feb 2025 06:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5136fXhZ058457; Mon, 3 Feb 2025 06:41:33 GMT (envelope-from git) Date: Mon, 3 Feb 2025 06:41:33 GMT Message-Id: <202502030641.5136fXhZ058457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b0580c7a6742 - main - sockets: remove empty shim function sopoll() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0580c7a67423efb0c2bff7081ff9747d257c830 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b0580c7a67423efb0c2bff7081ff9747d257c830 commit b0580c7a67423efb0c2bff7081ff9747d257c830 Author: Gleb Smirnoff AuthorDate: 2025-02-03 05:46:13 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 06:38:28 +0000 sockets: remove empty shim function sopoll() --- sys/kern/sys_generic.c | 3 ++- sys/kern/sys_socket.c | 2 +- sys/kern/uipc_socket.c | 15 ++------------- sys/sys/socketvar.h | 1 - 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index a3722d771573..dd9c28e81388 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -1817,7 +1818,7 @@ selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td) */ for (;;) { selfdalloc(td, NULL); - if (sopoll(so, events, td) != 0) { + if (so->so_proto->pr_sopoll(so, events, td) != 0) { error = 0; break; } diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index ec9fd615685b..33cfd1637b78 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -288,7 +288,7 @@ soo_poll(struct file *fp, int events, struct ucred *active_cred, if (error) return (error); #endif - return (sopoll(so, events, td)); + return (so->so_proto->pr_sopoll(so, events, td)); } static int diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index accd63642024..c4ebb43eef18 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -96,8 +96,8 @@ * NOTE: With regard to VNETs the general rule is that callers do not set * curvnet. Exceptions to this rule include soabort(), sodisconnect(), * sofree(), sorele(), sonewconn() and sorflush(), which are usually called - * from a pre-set VNET context. sopoll() currently does not need a VNET - * context to be set. + * from a pre-set VNET context. sopoll_generic() currently does not need a + * VNET context to be set. */ #include @@ -4404,17 +4404,6 @@ sohasoutofband(struct socket *so) selwakeuppri(&so->so_rdsel, PSOCK); } -int -sopoll(struct socket *so, int events, struct thread *td) -{ - - /* - * We do not need to set or assert curvnet as long as everyone uses - * sopoll_generic(). - */ - return (so->so_proto->pr_sopoll(so, events, td)); -} - int sopoll_generic(struct socket *so, int events, struct thread *td) { diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 57209ea5557f..6e2eb64ea0b8 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -525,7 +525,6 @@ struct socket * sonewconn(struct socket *head, int connstatus); struct socket * sopeeloff(struct socket *); -int sopoll(struct socket *so, int events, struct thread *td); int sopoll_generic(struct socket *so, int events, struct thread *td); int soreceive(struct socket *so, struct sockaddr **paddr, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp); From nobody Mon Feb 3 11:51:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlGJ604sz5n3tR; Mon, 03 Feb 2025 11:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlGJ48Zzz3r7T; Mon, 03 Feb 2025 11:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9A/vjuq97qFZvvnfjHngxT+/RikQlJ+e4nZzeIy6y8=; b=hzgjKRTOuoQ5L18vVGXDIw2bmx7XXA76ADm4/EQYORbRB9E2wWPlo7TY+BZ6p3hcilahF5 0ZunZdhAirMOwvadCH3dL/QoeHKSwRLBMO99ffels6e50SzmSvprRrPt6Mrwj9KouFljUJ /nz0hUuIpf6zC8CIhr3u9f1palrUslrgaGkc7G9n+OocaQRN2NXiOXEEF6DSYXeUyvIdx3 ol5w5lprLJ3NpWqlknh0LBd33/IJJYSn3hOgJ5qwXRqPgyv07EfH6JQFFpJSes8RAMWHT0 YCp4Dp7eD77yXSV1XKr6nPWelFaBQnS8gaoQPPrLHMzCAYcfeF7jVEHNDBVXZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9A/vjuq97qFZvvnfjHngxT+/RikQlJ+e4nZzeIy6y8=; b=fFwqE3GWaUReYzsAiGiee2v7nixwyxo77iK8qUTVbLk7vzQdFCIEToqJw1RLx74BQnzH2x eGjaYx/P0rf1U4bZMLNPvoCYhnE6kRBhvM9KlExc9ap5yDee+IAVQa5FufJG9phojURTeJ sd6Ci2VqRySzhkAtkbKHTywJV9ufmnRXDjIauD6qPwimud/IzaXz3qLTsU8AwaPzCqp2yc eitQYhf3gUjSkMI1+RDf9rwYjj746KVODgj5IIY3utzhENNzRP+RQ9IiSmBdAij3752SMN l7B6YRHL7RS4zzyq3tj8T+3Oedpjdm/+ZSIFRrwlDea92HcWRTIkWe4iYYD+4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738583512; a=rsa-sha256; cv=none; b=fHBDwVsDUXAoSrzHooF+P4Wz2z+S61xZOA/quWtxNwxRoz8/NllNNWUJRxExfd+G4p389Q FsOvvTYPHSSSQVVF4XFeJtWs6pKc/QslA1XURdzLNvj7WUlco6Fol3P+GngRbqurlhxdx1 exEiE6lB9c3sDecllBiTBfCdrPsWSBvny2zyqnUdiB+AiDtmef3L0sPLSbM19vS8SFFtLq ku01wuy0kQuvFLxAjVLxKDotvn9an//LHLUVr2JaU8WM16DU3oxOP0ApJWN0HvE8/sg8vH rA9lfn4ji3EK2DdRCl+9kaDLy/FxkoN8MPJ9uHy05DkaYMu///tRHqnxy1ptqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlGJ3dr9zbXd; Mon, 03 Feb 2025 11:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513BpqkI040390; Mon, 3 Feb 2025 11:51:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513Bpqip040387; Mon, 3 Feb 2025 11:51:52 GMT (envelope-from git) Date: Mon, 3 Feb 2025 11:51:52 GMT Message-Id: <202502031151.513Bpqip040387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 95b8b67f3c4b - main - bhyve/riscv: add clock-frequency property to DTS. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95b8b67f3c4b5cdbc48557359e6b2e1ef423ed26 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=95b8b67f3c4b5cdbc48557359e6b2e1ef423ed26 commit 95b8b67f3c4b5cdbc48557359e6b2e1ef423ed26 Author: Ruslan Bukin AuthorDate: 2025-02-03 11:39:21 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-03 11:39:21 +0000 bhyve/riscv: add clock-frequency property to DTS. Add clock-frequency property to the UART adapter node in DTS. Differential Revision: https://reviews.freebsd.org/D48699 --- usr.sbin/bhyve/riscv/fdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bhyve/riscv/fdt.c b/usr.sbin/bhyve/riscv/fdt.c index 81296714e013..fa66b761f08c 100644 --- a/usr.sbin/bhyve/riscv/fdt.c +++ b/usr.sbin/bhyve/riscv/fdt.c @@ -222,6 +222,7 @@ fdt_add_uart(uint64_t uart_base, uint64_t uart_size, int intr) fdt_begin_node(fdt, node_name); fdt_property_string(fdt, "compatible", "ns16550"); set_single_reg(fdt, uart_base, uart_size); + fdt_property_u32(fdt, "clock-frequency", 3686400); fdt_property_u32(fdt, "interrupt-parent", aplic_phandle); fdt_property_placeholder(fdt, "interrupts", 2 * sizeof(uint32_t), &interrupts); From nobody Mon Feb 3 11:51:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlGK6WsZz5n3nG; Mon, 03 Feb 2025 11:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlGK5htKz3r5b; Mon, 03 Feb 2025 11:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0FQEH8KU+5Gl1XJwAW5RR87W4hr2MQbYsM6JEYTMmk=; b=tNHNRhaKqmM7UglZ9El4ApqD+MT8cpn93creN8eRkV+FJ09Mfa7RoU0rd2hch3WaBemxRa GuA3KURaR+qIiNuF8yhlCEN/esY6OaDFKIyu0xnLUHFij/zQShf0ClU3u9G8I0lMNMWbWA BkHTJUE9Lqz90KQ8S2Xt8DVSqX+7KnGKnraQF0x/7n9kLvjdNEw2j3qS/8P1mSrUH6Lfuz rVqlEUhAhPNyr5/PW8KuVruBMA4v6CzM2NuYNmpeOX8t2ZIEbgQ1uN3Cxr6Qe/VDG5WtAC mwr8Cg1fsXdyPuHn0OrF/hC2/LmZo7cwEqT2nWIXGOYfUqQ2vUDzWJhfBNMlwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0FQEH8KU+5Gl1XJwAW5RR87W4hr2MQbYsM6JEYTMmk=; b=EM7cu3eSpaksggQ4wp4+s1UK5hscWkcA8IOYdZSSrW4ynfywJnURUH2qKErr1zLev7WL8l ChQ90JvyfjvfnRPmxbDbN57Nk4e/9/VsjO40/VxXM8+MpVWm0azpk86whUSnqxMd/xqRXo Kwz93w7YB6VDiCUG1QHRgy1FY9MgCkAqI2Ff0Fl9Ohd7GAlYgmipRu/EMPdqHLbTCi3e0q YDn7y+iUksC8zl+yH+9pc74L4ToFza+gPdR9FZYFR/r6J8bmXRow4twyJ7RaVF7RGCcHXM R3Wxl34ZSbE6b81IQluEiOYgv2XvniLZ/J2JQeBh11/uh+FQDuMIiQ7s4wTRAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738583513; a=rsa-sha256; cv=none; b=NqCA82PQiTzFWc/s1OpAvP8Ko1e0DddUoR5zh3n+yBNdB3cFQzsPjELXKlIXyNj+ng/nPT Ka0nW2ts8WSp37vuAyCiqMVj9/PXPuT41KdwOIreLjuP2ZwxP0b13Ei6ridmmGCq18lNyI vLETiAqx1Mk9IVZSqitfDEGuw94bnbO/hCigQe8EeBOOG5wzRo6rh+v4YvmRxGMsEm07Yd 6XrRJ1WjnY1XtMHDdXe4XjThrRyvbFn1fSCs+/GstBCsR0ehFBUElegCYMGhmkO0VkmUZW sGXWRagIkWLoQF52BJmvI6USQGO46BxJCsA+EP8+XDzlyKR8gsgXbqz+HHF1GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlGK57YPzblS; Mon, 03 Feb 2025 11:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513BprOf040425; Mon, 3 Feb 2025 11:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513Bpr8E040422; Mon, 3 Feb 2025 11:51:53 GMT (envelope-from git) Date: Mon, 3 Feb 2025 11:51:53 GMT Message-Id: <202502031151.513Bpr8E040422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 6b599b34dfb3 - main - bhyve/riscv: remove clock-frequency from CPU node. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b599b34dfb32f8a28b1e37a1781c19179e883f2 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=6b599b34dfb32f8a28b1e37a1781c19179e883f2 commit 6b599b34dfb32f8a28b1e37a1781c19179e883f2 Author: Ruslan Bukin AuthorDate: 2025-02-03 11:42:45 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-03 11:42:50 +0000 bhyve/riscv: remove clock-frequency from CPU node. Remove CPU clock-frequency property as incorrectly constructed and not needed. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D48712 --- usr.sbin/bhyve/riscv/fdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bhyve/riscv/fdt.c b/usr.sbin/bhyve/riscv/fdt.c index fa66b761f08c..bf5ec114cda0 100644 --- a/usr.sbin/bhyve/riscv/fdt.c +++ b/usr.sbin/bhyve/riscv/fdt.c @@ -96,7 +96,6 @@ add_cpu(void *fdt, int cpuid, const char *isa) fdt_property_u32(fdt, "reg", cpuid); fdt_property_string(fdt, "riscv,isa", isa); fdt_property_string(fdt, "mmu-type", "riscv,sv39"); - fdt_property_string(fdt, "clock-frequency", "1000000000"); fdt_begin_node(fdt, "interrupt-controller"); intc0_phandle = assign_phandle(fdt); From nobody Mon Feb 3 11:51:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlGM3RhNz5n3kf; Mon, 03 Feb 2025 11:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlGM0h3rz3r9m; Mon, 03 Feb 2025 11:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxQAqiOeeYdc/oLG7LF9bbkXbLiqAClNaT6lujV1jls=; b=SIsr+hqCY5pm/qvux1q1kqkIeBQ1+VbI4BGVi8SYH5/Q13jqZzKLWAFOiHGtyNzck2U1bq ROj7xGYvep62ucnc3ATBAS+/+Xd1sSS/xc34eVANyML/NCJbAAZeCp05ECrQztm9Jya8Ep 0BDZRdyRyjD8y4MZ0JXn2o0xu9pyRghJE/4ES7b66Rz5CPrKGlzo0cXcaIdU73Lp+6ATzS G4vNsKkhmBTSkEjbfiMNvdM67mn1OAn3P5o9kQhlZ+R1tC/159esQeSK7Al/fLCWzteOVw YX6xey1rIzYUBknio82CAVA31MpxmewRjd33zvw4RGym1PbKE2aKY8SV58bzbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxQAqiOeeYdc/oLG7LF9bbkXbLiqAClNaT6lujV1jls=; b=bIlJrbRKrSK8/CWN2QygU2PJhAQJViAbXfcTLR0XFxBcpgw8W4Dne1V8qtICZjMKngJfxO IWtkJi4LMoi3qRQULgVYvaLq/VLgl3N4ttHJuX+aNnWV2khW5aMELFdvaLfeAIBUIOcIab GN8EPWgG3+ZyDVUGtjb5vH3CzgUwa5PAEbNUO6MA19Dmjn+VZD4sQPiMXUwSUB/p2Ka+gp 7/Xnt8fCwUI28TJxeFbW/92/yCeT02NoXcmNHNyGrzn9aYxOQX+eQ9XDPFRTecK1wtshmO X4Kza9Sp2qxUHAyYaZJhcrlZQ2tmh5gngUb2Fv2WhoazoHu8IAYtDcOC+UVMoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738583515; a=rsa-sha256; cv=none; b=P4CMD5cr3wGi9hvpqvw05wzggcvBMtLdFPdYfpvzTD6ZSCtTJdNxf28yZFRwj08Y1iULib pt6ZAgxIc7xH13y5DvmyPT/0gNIgXZGycg0TvUrkbCOI6tlWJBrIqsyaUMKb31ILyzQzD8 JLk6tjxelqlqRWfxAmOeg4c6Fykcyu+uOAM3ufdrZLjf19XgS9tAc5dinmyrra4o32Q7v6 XfgWPjyCkUO6u1JR1pZ6Xv7g1PpjigTHP6sC355YyL6p+orp6uJSaSQBNww3IkogXYC7Ri wuFkPg6KYVoY0nGgpMje4jAwQPZSFjZAHC2V2v242VgH2p5dxQA1AF8sR651bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlGL56HGzbXf; Mon, 03 Feb 2025 11:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513BpsSN040459; Mon, 3 Feb 2025 11:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513Bpsrj040456; Mon, 3 Feb 2025 11:51:54 GMT (envelope-from git) Date: Mon, 3 Feb 2025 11:51:54 GMT Message-Id: <202502031151.513Bpsrj040456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 7ac65902d8ba - main - bhyve/riscv: fix interrupts-extended property. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ac65902d8ba0a85e5fe95d097f7fbd52cbda12a Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=7ac65902d8ba0a85e5fe95d097f7fbd52cbda12a commit 7ac65902d8ba0a85e5fe95d097f7fbd52cbda12a Author: Ruslan Bukin AuthorDate: 2025-02-03 11:44:15 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-03 11:44:18 +0000 bhyve/riscv: fix interrupts-extended property. Construct interrupts-extended (property of APLIC) properly. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D48713 --- usr.sbin/bhyve/riscv/bhyverun_machdep.c | 2 +- usr.sbin/bhyve/riscv/fdt.c | 27 ++++++++++++++++++--------- usr.sbin/bhyve/riscv/fdt.h | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/riscv/bhyverun_machdep.c b/usr.sbin/bhyve/riscv/bhyverun_machdep.c index d06b517a6624..8ee505e86679 100644 --- a/usr.sbin/bhyve/riscv/bhyverun_machdep.c +++ b/usr.sbin/bhyve/riscv/bhyverun_machdep.c @@ -337,7 +337,7 @@ bhyve_init_platform(struct vmctx *ctx, struct vcpu *bsp) error = vm_set_register(bsp, VM_REG_GUEST_A1, fdt_gpa); assert(error == 0); - fdt_add_aplic(APLIC_MEM_BASE, APLIC_MEM_SIZE); + fdt_add_aplic(APLIC_MEM_BASE, APLIC_MEM_SIZE, guest_ncpus); error = vm_attach_aplic(ctx, APLIC_MEM_BASE, APLIC_MEM_SIZE); if (error != 0) { warn("vm_attach_aplic()"); diff --git a/usr.sbin/bhyve/riscv/fdt.c b/usr.sbin/bhyve/riscv/fdt.c index bf5ec114cda0..3ccd7ae5dc79 100644 --- a/usr.sbin/bhyve/riscv/fdt.c +++ b/usr.sbin/bhyve/riscv/fdt.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2022 The FreeBSD Foundation - * Copyright (c) 2024 Ruslan Bukin + * Copyright (c) 2024-2025 Ruslan Bukin * * This software was developed by Andrew Turner under sponsorship from * the FreeBSD Foundation. @@ -44,6 +44,8 @@ #include #include +#include + #include "config.h" #include "bhyverun.h" #include "fdt.h" @@ -58,7 +60,7 @@ static void *fdtroot; static uint32_t aplic_phandle = 0; -static uint32_t intc0_phandle = 0; +static uint32_t *intc_phandles = NULL; static uint32_t assign_phandle(void *fdt) @@ -84,7 +86,7 @@ set_single_reg(void *fdt, uint64_t start, uint64_t len) } static void -add_cpu(void *fdt, int cpuid, const char *isa) +add_cpu(void *fdt, int cpuid, const char *isa, uint32_t *intc_phandle) { char node_name[16]; @@ -98,7 +100,7 @@ add_cpu(void *fdt, int cpuid, const char *isa) fdt_property_string(fdt, "mmu-type", "riscv,sv39"); fdt_begin_node(fdt, "interrupt-controller"); - intc0_phandle = assign_phandle(fdt); + *intc_phandle = assign_phandle(fdt); fdt_property_u32(fdt, "#address-cells", 2); fdt_property_u32(fdt, "#interrupt-cells", 1); fdt_property(fdt, "interrupt-controller", NULL, 0); @@ -120,8 +122,9 @@ add_cpus(void *fdt, int ncpu, const char *isa) /* TODO: take timebase from kernel? */ fdt_property_u32(fdt, "timebase-frequency", 1000000); + intc_phandles = malloc(sizeof(uint32_t) * ncpu); for (cpuid = 0; cpuid < ncpu; cpuid++) - add_cpu(fdt, cpuid, isa); + add_cpu(fdt, cpuid, isa, &intc_phandles[cpuid]); fdt_end_node(fdt); } @@ -172,10 +175,11 @@ fdt_init(struct vmctx *ctx, int ncpu, vm_paddr_t fdtaddr, vm_size_t fdtsize, } void -fdt_add_aplic(uint64_t mem_base, uint64_t mem_size) +fdt_add_aplic(uint64_t mem_base, uint64_t mem_size, int ncpu) { char node_name[32]; void *fdt, *prop; + int i; fdt = fdtroot; @@ -196,10 +200,13 @@ fdt_add_aplic(uint64_t mem_base, uint64_t mem_size) SET_PROP_U64(prop, 0, mem_base); SET_PROP_U64(prop, 1, mem_size); + assert(intc_phandles != NULL); fdt_property_placeholder(fdt, "interrupts-extended", - 2 * sizeof(uint32_t), &prop); - SET_PROP_U32(prop, 0, intc0_phandle); - SET_PROP_U32(prop, 1, 9); + 2 * ncpu * sizeof(uint32_t), &prop); + for (i = 0; i < ncpu; i++) { + SET_PROP_U32(prop, i * 2 + 0, intc_phandles[i]); + SET_PROP_U32(prop, i * 2 + 1, IRQ_EXTERNAL_SUPERVISOR); + } fdt_property_u32(fdt, "riscv,num-sources", 63); fdt_end_node(fdt); @@ -325,4 +332,6 @@ fdt_finalize(void) fdt_end_node(fdtroot); fdt_finish(fdtroot); + + free(intc_phandles); } diff --git a/usr.sbin/bhyve/riscv/fdt.h b/usr.sbin/bhyve/riscv/fdt.h index 60140a82a211..21453e363c3c 100644 --- a/usr.sbin/bhyve/riscv/fdt.h +++ b/usr.sbin/bhyve/riscv/fdt.h @@ -37,7 +37,7 @@ struct vmctx; int fdt_init(struct vmctx *ctx, int ncpu, vm_paddr_t addrp, vm_size_t size, const char *isa); -void fdt_add_aplic(uint64_t dist_base, uint64_t dist_size); +void fdt_add_aplic(uint64_t dist_base, uint64_t dist_size, int ncpu); void fdt_add_pcie(int intrs[static 4]); void fdt_add_uart(uint64_t uart_base, uint64_t uart_size, int intr); void fdt_finalize(void); From nobody Mon Feb 3 11:51:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlGP1CdFz5n40M; Mon, 03 Feb 2025 11:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlGP0Nnrz3qsF; Mon, 03 Feb 2025 11:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7557xcjlOQgpRlfFTsZ1TkmtRJ7omkcODJMvjUSYIQI=; b=KOU7IWiHw8V+RqJBVdk56/WRHo6RuRfbg9ZSGVHDzEiLUM6MoRMO7fZbpT3lLE4MC6ztw4 A3YDXZX3HOCa80yJLKDOkYTjbndzEGSy+RT4Qx7+gUyZJ7cqWiulYE8H4YyfBaYmWSrxG9 HyP44jO2tCcCcRVNMmeNRccTD25Dg8h86Gfu95U7Ebv4xpgxT4YdIt0Fee9WSsPQP7APES 0CAo/jLalC1rz6y6x+o9TAGhq7J4f5uzz1EbcEsJmLFtoFcY4rt1zOgn8BjGlJOKYehGKH c8GnY+YQv+uHWTnMrzexXUrJAKYsw+I1LsZjqS3Kbi3jmqdym4K2nO+JuCsYbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7557xcjlOQgpRlfFTsZ1TkmtRJ7omkcODJMvjUSYIQI=; b=o0jbGKy6r6/aHiDaijTc8k82HKggWJ9mPtfM2urZjSg5DkeJAi5n2AzEmMtSWWyV/jYNm9 i+FLgxRI+WxkTbxZhSeO0stB2uVUYJpf9GQPjBIvx0H+J1aUS2YgM7xYr6KKAAm9zmT3mh fpTVsTsIy727eb/Tf2gKjVlUxfuOHFIODHrOs7I2A26/3cSi8fszN3/3ONeHU/qoT2b71X P61PQoP/tFB5R+0gYn3XJYisW1OhsSqMV2NJvM2g5UpOShzQUacx0F9e8zuh3cViw/e8UZ vWy70QE7YBNlb3z3awn4BzY/0csT7BxrxvigcpLZy72WzvXjeanZN89Of2vqUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738583517; a=rsa-sha256; cv=none; b=P3nJxBwyzgVkmDxmo2wv7Pqt2Z+qEAtIVT2NpC5KbJBaSc9uCDUWgpXmvpvvdG/S48fDQ+ Kf5bUtHFFYeQ2dDFiNhJvu+VSSi8W+t1CgcnhHqp5WSHOLX3BzLyu9KXm0XCxmt9oGg0x7 exJ28SEZPynYAnoJmJmvKLT5pNty8XqCFkEYeDMoILW0nx1Hk5/lXFJreetYofw5ANezKE sHXI3Kx4g7nMjtxbEu3YGnVWJ1iZGpeUV7Jn/RHGE9mOLLqsTA4pBPIWO4sIXjHzEEPv4A fPDImn6QlKICCi1hJTc1oF5alVoZt2rPg3DaUufrq0wxxlB6C9AI+xX48+bGMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlGN710NzZyl; Mon, 03 Feb 2025 11:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513Bpulg040536; Mon, 3 Feb 2025 11:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513BpuSJ040533; Mon, 3 Feb 2025 11:51:56 GMT (envelope-from git) Date: Mon, 3 Feb 2025 11:51:56 GMT Message-Id: <202502031151.513BpuSJ040533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: c7e0b94b7de7 - main - riscv vmm: consider hart_mask_base argument in the SBI IPI handler. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7e0b94b7de76fec57f4ac25e02de39088ee77d3 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=c7e0b94b7de76fec57f4ac25e02de39088ee77d3 commit c7e0b94b7de76fec57f4ac25e02de39088ee77d3 Author: Ruslan Bukin AuthorDate: 2025-02-03 11:48:18 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-03 11:49:48 +0000 riscv vmm: consider hart_mask_base argument in the SBI IPI handler. From the spec: Any SBI function, requiring a hart mask, must take the following two arguments: - unsigned long hart_mask is a scalar bit-vector containing hartids - unsigned long hart_mask_base is the starting hartid from which the bit-vector must be computed. hart_mask_base can be set to -1 to indicate that hart_mask shall be ignored and all available harts must be considered. Differential Revision: https://reviews.freebsd.org/D48717 --- sys/riscv/vmm/vmm_sbi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/riscv/vmm/vmm_sbi.c b/sys/riscv/vmm/vmm_sbi.c index 586eb7c4d41c..3ba90e349b3c 100644 --- a/sys/riscv/vmm/vmm_sbi.c +++ b/sys/riscv/vmm/vmm_sbi.c @@ -154,6 +154,7 @@ vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) cpuset_t active_cpus; struct hyp *hyp; uint64_t hart_mask; + uint64_t hart_mask_base; uint64_t func_id; int hart_id; int bit; @@ -161,6 +162,7 @@ vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) func_id = hypctx->guest_regs.hyp_a[6]; hart_mask = hypctx->guest_regs.hyp_a[0]; + hart_mask_base = hypctx->guest_regs.hyp_a[1]; dprintf("%s: hart_mask %lx\n", __func__, hart_mask); @@ -173,6 +175,8 @@ vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) while ((bit = ffs(hart_mask))) { hart_id = (bit - 1); hart_mask &= ~(1u << hart_id); + if (hart_mask_base != -1) + hart_id += hart_mask_base; if (CPU_ISSET(hart_id, &active_cpus)) { /* TODO. */ target_vcpu = vm_vcpu(hyp->vm, hart_id); From nobody Mon Feb 3 11:51:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlGN42Tbz5n3kj; Mon, 03 Feb 2025 11:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlGN1JtDz3qsB; Mon, 03 Feb 2025 11:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCqd3/X9DCqlm+k/A3B2jIVOHeXt0BspZe09NBzOMQU=; b=hyigWBv+eotkp694tndzwHg1MBi15Gw3p9Xv9yTVeVcVLqC9/riCGqRaS/fYyZn1Ylad8Y KJcpw1f00jnovFEH/gas/3jlu4/wUZZX1QzDgMfq1NmHR+v1T7o8fNNwraF5TN65Raqz8v zyARLNKQx02bO5lIFna4wpOIUku2CySZzuz2Etf+o4SkTWWrRMCtbh2AU1afmKuXNt+wo6 ZgSvlTwuSEaMEG/mSYNokS1DMpJzRBm/7Lzjv+/vjItqRjh49G56hnEIIOzi6AmLVeQh10 q+MxqeH6Pg+tz5bMrTeA8kLVt+ZcYlG+mu0slxXyyjIXdvkiPEdQTPBHkZ3rjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738583516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCqd3/X9DCqlm+k/A3B2jIVOHeXt0BspZe09NBzOMQU=; b=OaC4FduVaAdCAGDMG+10eDzFSAgg+A21jht/8oX8DBCUqBwH/VfQZtFARM7bJFjfpvsw6o szdn2VH+54/76F1x0ExWHr7mDi9KdQpIln1nTufOTTfBp7ep64TKHega2G6y7w7webUfJ4 CgpwV5TMiXgVvWrKjmctuPVmqd/6ynYAdDLe0u8TIth2nmTSSWZka/JUdNmXU+xbSq5ahr U/59hLbIxo7VbiVDr7maKa1bNGOOBDA9c6+ubeVWZ204pgyGf+GrsRKysqX3VnD8XMQbNL CMxShQVqv+SAhgzzV+mOM9gABtR5fGpjMs65BRJERZ0PJJDkYGYXof638sAf7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738583516; a=rsa-sha256; cv=none; b=p+9JqKsXAB75h7qICpb63sHB+W+fU49kttwdzyZRTXlAA20z6CeNXxnIsgIy5J8ybAf1ev +SLvVFFaPUd362HkNCpg8EHX6J8s7K+pgcR4Hld6hM6O4KxyZ7GvNs9bLELRoRT72cfPYH UsNRATI5/Ja7wMKrcz2+jreC9V8h5dH7xzmh4OLC9B0YKPV6rGJoLfRKQpFa+xyncxAVaa nuJPJFlgAQs8VQG4ej8Utrf3cnwihW16A88w666KV7LlPr2s0jipQ3gBW1Vl+hV6gjbULy QpjU/F9AF8alLibi48tsfqvhmJNixU5ABJKIobnYTbYBGTUlBEf2/8mCh3W6NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlGN0ZthzbXg; Mon, 03 Feb 2025 11:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513Bpt60040494; Mon, 3 Feb 2025 11:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513Bptfk040491; Mon, 3 Feb 2025 11:51:55 GMT (envelope-from git) Date: Mon, 3 Feb 2025 11:51:55 GMT Message-Id: <202502031151.513Bptfk040491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 1fdb01ec5fdd - main - riscv vmm: fix remote fence. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fdb01ec5fdd23d3f6d7d743d1f438915ded40d4 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=1fdb01ec5fdd23d3f6d7d743d1f438915ded40d4 commit 1fdb01ec5fdd23d3f6d7d743d1f438915ded40d4 Author: Ruslan Bukin AuthorDate: 2025-02-03 11:45:29 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-03 11:45:32 +0000 riscv vmm: fix remote fence. From the spec: The remote fence function acts as a full TLB flush if • start_addr and size are both 0 • size is equal to 2^XLEN-1 Differential Revision: https://reviews.freebsd.org/D48716 --- sys/riscv/vmm/vmm_fence.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/riscv/vmm/vmm_fence.c b/sys/riscv/vmm/vmm_fence.c index 6bba3f4b5dfe..f8b69aac77a9 100644 --- a/sys/riscv/vmm/vmm_fence.c +++ b/sys/riscv/vmm/vmm_fence.c @@ -103,7 +103,8 @@ vmm_fence_process_one(struct vmm_fence *fence) sfence_vma_page(va); break; case VMM_RISCV_FENCE_VMA_ASID: - if (fence->start == 0 && fence->size == 0) + if ((fence->start == 0 && fence->size == 0) || + fence->size == -1) sfence_vma_asid(fence->asid); else for (va = fence->start; va < fence->start + fence->size; @@ -165,7 +166,8 @@ vmm_fence_add(struct vm *vm, cpuset_t *cpus, struct vmm_fence *fence) atomic_set_32(&hypctx->fence_req, FENCE_REQ_I); break; case VMM_RISCV_FENCE_VMA: - if (fence->start == 0 && fence->size == 0) + if ((fence->start == 0 && fence->size == 0) || + fence->size == -1) atomic_set_32(&hypctx->fence_req, FENCE_REQ_VMA); else From nobody Mon Feb 3 12:17:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmlqM09Zgz5n6P1; Mon, 03 Feb 2025 12:17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmlqL5vHPz3xZl; Mon, 03 Feb 2025 12:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738585022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJK277PoiTE+XSfXA4OfjrwFzKTwBoloGUhej8dCAiA=; b=r3NOEO8OLiouVy3DAjzygeKRg/I6nU1v7xv3AbpQwAMuVulg1t9X2jsACMLnbplLH1cpKt 0sIsHmtZXQDhMh7TBKr9QFMinFm18TPZ5hABDfCO3Tg2kuA3DX0juE1h/sV6swn/RVS2md XSYFz91Q4uGIOgfSwb32QEhL5EdnuE1MMNIu+Bvz/vhsCMETj7GFYb30bdPnS9LRoSEaSK OVSyT9ZAyA8gNNEOAzCrDdka7xdw1Z+wf4yafRW8CpUnJSFSgYwW65BgpDEwF83TG2DkJC tIQ8gtj+T2fjf3LNvw10ls4FWiHjWaZY3aGTqEgHIYrsi6peJE6pBAWwYCwrnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738585022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJK277PoiTE+XSfXA4OfjrwFzKTwBoloGUhej8dCAiA=; b=s7RSGmVAwYmICi51ttddm/aeRq7vRPh76UEzszx5EFbLOtdDw01/WLZSFQDQCEP+YrhdhH okX/OPDJli8Aho7IcGay4YECGur1xl1mv+47Jf2kuFn3k8neJiZrEq1oUJBZOR4V0f+FhK /XYj83xhX1VtqMK3b+uYq/UfeEoU+g1PCYgrjfvtb5DhtmMhEGSDy5OxNrXmhJTRjVnjoC +kQ8+QRbfX9EA2/cjzeNxErCUu59wJFN9m2sGAOuthYoQi1EL+X7jov9CudpBgwRJZmuAH bZAN4AKJImWYfV5BMhEfGS67Wr83z6TeXoHuK4bUNL2SK8hRF8LTx8FjRV1RVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738585022; a=rsa-sha256; cv=none; b=jnWrEqG0Xr6YjwWiX7n28vJpQRG34Amj0dx+D3aDS6GcLIHFmTZtxn7FbYTKYifatOjSj6 AT2LsGO78UHEd8CQJunKCijst1Zu+33IAMpapSH2udD2tPAA+lcQ1vIZE14o1Gi7/eqdxF iZesriwLGle3NktS8zf/RBs5qMjM21Rac2fxXhJAecAF+EUnU32N8NiyJGJ2wWNJxYSFgC M5NsinDl5zmCBKAqROLoeY0V8rhQDb9O9c16Bkiwwp0z87tbC0jt5U0Nuq5QgLudOJ/gtt vM0jzm9wYhMFzjui9Ma/jFeC0i3oLVSVNU7ZboPiGZcsnszFuC+1+0Y53SV/Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmlqL5SpQzc5c; Mon, 03 Feb 2025 12:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513CH2cG081363; Mon, 3 Feb 2025 12:17:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513CH2e8081360; Mon, 3 Feb 2025 12:17:02 GMT (envelope-from git) Date: Mon, 3 Feb 2025 12:17:02 GMT Message-Id: <202502031217.513CH2e8081360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 7def047a1ae9 - main - bpf: Fix potential race conditions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7def047a1ae93b3b10bd57ed1bd28e861f94b596 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7def047a1ae93b3b10bd57ed1bd28e861f94b596 commit 7def047a1ae93b3b10bd57ed1bd28e861f94b596 Author: Zhenlei Huang AuthorDate: 2025-02-03 12:13:19 +0000 Commit: Zhenlei Huang CommitDate: 2025-02-03 12:13:19 +0000 bpf: Fix potential race conditions There're two possible race conditions, 1. Concurrent bpfattach() and bpf_setif(), i.e., BIOCSETIF ioctl, 2. Concurrent bpfdetach() and bpf_setif(). For the first case, userland may see BPF interface attached but it has not been in the attached interfaces list `bpf_iflist` yet. Well it will eventually be so this case does not matter. For the second one, bpf_setif() may reference `dead_bpf_if` and the kernel will panic (spotted by change [1], without the change we will end up silently corrupted memory). A simple fix could be that, we add additional check for `dead_bpf_if` in the function `bpf_setif()`. But that requires to extend protection of global lock (BPF_LOCK), i.e., BPF_LOCK should also protect the assignment of `ifp->if_bpf`. That simple fix works but is apparently not a good design. Since the attached interfaces list `bpf_iflist` is the single source of truth, we look through it rather than check against the interface's side, aka `ifp->if_bpf`. This change has performance regression, that the cost of BPF interface attach operation (BIOCSETIF ioctl) goes back from O(1) to O(N) (where N is the number of BPF interfaces). Well we normally have sane amounts of interfaces, an O(N) should be affordable. [1] 7a974a649848 bpf: Make dead_bpf_if const Fixes: 16d878cc99ef Fix the following bpf(4) race condition ... MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D45725 --- sys/net/bpf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 657a34827bdb..a7d17109ed1a 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2090,10 +2090,20 @@ bpf_setif(struct bpf_d *d, struct ifreq *ifr) BPF_LOCK_ASSERT(); theywant = ifunit(ifr->ifr_name); - if (theywant == NULL || theywant->if_bpf == NULL) + if (theywant == NULL) + return (ENXIO); + /* + * Look through attached interfaces for the named one. + */ + CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) { + if (bp->bif_ifp == theywant && + bp->bif_bpf == &theywant->if_bpf) + break; + } + if (bp == NULL) return (ENXIO); - bp = theywant->if_bpf; + MPASS(bp == theywant->if_bpf); /* * At this point, we expect the buffer is already allocated. If not, * return an error. From nobody Mon Feb 3 14:44:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymq5y2bzxz5lhSr; Mon, 03 Feb 2025 14:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymq5y1RNNz3WQW; Mon, 03 Feb 2025 14:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738593894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kN1ZrKzw8wPi1WPCn7Irk0ieUnmteLqTfETRhL8Of8c=; b=m7XymY3cky6sue4+GA6YHw+XKrQNxRmH6e+TAwQZYUFfKPZTczJRltpFeTP/vB7c4Qp045 HFx+zR4Dthw+xXtwM1PRALFeJrClQeVN21EEa3LtiHOCevmQSGhLJshj9DMdR+9ZhUbRoF CaNwgi+a0gSicr33ohfRWcYKmpYUd0qijI9YPHOJ/orbunYj5EKR4lTiTBpzEPrQ7j3f6U gWuoXHpub/JLR+RTVDVkrHrPYimTMRlYtxO2NFu94c7wPBCdCSUl71o6FkwetmELuKZic7 CfsVnmMULJlE3EYn9mfCJcWAkUtVx2wMHJlmy/fNG9woYEX5g2PRNh6DL+1ldg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738593894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kN1ZrKzw8wPi1WPCn7Irk0ieUnmteLqTfETRhL8Of8c=; b=dx+GWkW7M17M7SN+mzNsDDaQdnw0VyQLF9+oS24tny2cU2AWOkAZC1scMX7kmaFpFcv4Lz TYjMrzVvkXqroD698PnM2s8ibR6oAEjlgIDUCQXOC71W6OewHBq+RYNvbu2N7+vuYRgaTu KALD0VoW6c4fuG9qPqBYFGK3GBJY/inra4DLYofEY/F5c3w/109b+jAiotYrcJ1pgaUD7N aUhg+pQCVrequC8OOdtQWnYrWH8/fISBEU1pl+ssMYCPJQBPktrkgU9qSZeQbhD4z3RBv3 HrF6J+DMNOE7k6scBg2EI9x/BwaB/qTXXjK7J/x7rvlOMJUHDnEByg27LnyV8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738593894; a=rsa-sha256; cv=none; b=IOvqp4I5wLjKUJnmg/7PQ1+s5n0648fGt9RIA3v3g6M9M6H/4nUKPmnSCIB8poKgZ4IkbG WZ+n5skk2/kyoRVNuG5eCsB5rXY4ohS9JKJGFBZpxytF3EBlLXdKjkNJRS14+LfCbKen98 6eq7EDuxKq6MAWgUESFB9dIc/WAAD8gfugEOeJFa3xBrQ0JU/6E18/g9jNFIwhTMMrH68c 0eT+B4Dwve7nSYwlynINGxc6JCDAH5ZA63y8JWIY0m2W8ddpRuEvYgJsG9r/CDmTNiInFi Qjl26UExjmWWsZH7w7O0zKk1aqaJdXjqhfK9s9a4mk5e8hd15LH9tlNqPRMXHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymq5y11P0zgsp; Mon, 03 Feb 2025 14:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513Eisi8065033; Mon, 3 Feb 2025 14:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513EisBp065030; Mon, 3 Feb 2025 14:44:54 GMT (envelope-from git) Date: Mon, 3 Feb 2025 14:44:54 GMT Message-Id: <202502031444.513EisBp065030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 513c4e20790a - main - blocklistd: Remove obsolete network class reference List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 513c4e20790a24526cb1c2f5a4725971a09d928a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=513c4e20790a24526cb1c2f5a4725971a09d928a commit 513c4e20790a24526cb1c2f5a4725971a09d928a Author: Ed Maste AuthorDate: 2025-02-03 12:51:18 +0000 Commit: Ed Maste CommitDate: 2025-02-03 14:40:51 +0000 blocklistd: Remove obsolete network class reference This was a comment in a configuration example. Reported by: bapt Reviewed by: bapt, jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48810 --- contrib/blocklist/bin/blacklistd.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/blocklist/bin/blacklistd.conf.5 b/contrib/blocklist/bin/blacklistd.conf.5 index 3a7ecd9be171..70036441eb4b 100644 --- a/contrib/blocklist/bin/blacklistd.conf.5 +++ b/contrib/blocklist/bin/blacklistd.conf.5 @@ -209,7 +209,7 @@ bnx0:ssh * * * * 3 6h [remote] # Never block 1.2.3.4 1.2.3.4:ssh * * * * * * -# For addresses coming from 8.8.0.0/16 block class C networks instead +# For addresses coming from 8.8.0.0/16 block whole /24 networks instead of # individual hosts, but keep the rest of the blocking parameters the same. 8.8.0.0/16:ssh * * * /24 = = .Ed From nobody Mon Feb 3 14:46:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymq7h6Km7z5lhHd; Mon, 03 Feb 2025 14:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymq7h65tVz3WyL; Mon, 03 Feb 2025 14:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738593984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF43bGBrqBsheOSlr62W5Uya3fJdozX+LzDtuch/+1g=; b=QSkRiyKhvs6cDpRb2DN1jYGB3JPudbpc8tXxGYxnbYr+P1fCXKsIJlIQ/zkq/or0R9nqWw DD59mc4PLSMeRljyxZXiRLy2CeTDxNcodGzRqn/q2WEEFayZEC74WR7Q/85xSiytmazjqq 6kgwTUoNFyE5NrqjTiyLRx/pZlZUewLhcQYBckVE4TWqHv49diCPLbhdas23d3YVKjkYXC MWpXsTiKVX8aCYYAqY3fMgWxBPMhdFtENPxF7RisIOV0MgS4Pi3Ny2rOodnjC3Efz3NliE mKUFBE05iC+JC3C4QS+W1xLnQkfYxgYh6leCf30h+NRNcMrewsvUcbfESqVQZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738593984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF43bGBrqBsheOSlr62W5Uya3fJdozX+LzDtuch/+1g=; b=m9/gvsoboeKbAO1ryxZm5pDV4mz7ABotFfV94rIvCZhMqtqTRV0+FWEXRKaPtVmpMJCD1T us51HeFzdPjkgUt/a9a4V/9XA/5veK9P+9QEUR8mKCrEmjSvhbW33rlyqFAggeBW4ll6+Q bok8zNqn7k5rRQTLB4vwe/PBK/9FPwv4XlitGdNQnmBq8+fb9kOz/3Tk8Z306TI1plgkFQ tLW4M1vJrfa+Z9Q66q6nMHBiCno4sYDQSk/hjpu4+Wd42iuj3VDI7wp3ldub4HBISKZU7k tFeYa3dLsFcTJ3LFl5qTGDZo8GvYvUFecJ/TY1q1fWIeYg1NKC9dCtsfHpk5Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738593984; a=rsa-sha256; cv=none; b=KKnxm6kbX1zXQAByfWSOXhoBrFEFndw+IcAGMNFjLNrg9KccmvEndDksaIq+ogJ8+V0Ejg qqoH0gICCW5dve0FnRGUVtTjPomF7UrAh0oJuA044DDYVSvNHxIFjANs3SE1CddViyy4nl yoBrECgDpI0WS2PLm3f1i4JhtlGGJVRk1A838AuHyge2fiYmNe7WeBkgZ21gP5BxLsmDaB IywHNDuhRSzrbgaGclEdS+5Xm5GZWqtyHe7ok8HPT/9b5zNzCGf6J+qWo6gesNSJtE2IDx OX9voQTk6AMBNHbPA06bNVxCbZsONk3yJHYdzxiGXyRaAdPytMdVizAwCTT4Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymq7h5QBqzgkC; Mon, 03 Feb 2025 14:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513EkOrW065621; Mon, 3 Feb 2025 14:46:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513EkOM1065618; Mon, 3 Feb 2025 14:46:24 GMT (envelope-from git) Date: Mon, 3 Feb 2025 14:46:24 GMT Message-Id: <202502031446.513EkOM1065618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4a7d6666c5dd - main - contrib: Remove now-unused cortex-strings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a7d6666c5ddd135b2023b4b3b4962770ff2e73b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4a7d6666c5ddd135b2023b4b3b4962770ff2e73b commit 4a7d6666c5ddd135b2023b4b3b4962770ff2e73b Author: Ed Maste AuthorDate: 2025-01-17 14:51:00 +0000 Commit: Ed Maste CommitDate: 2025-02-03 14:45:40 +0000 contrib: Remove now-unused cortex-strings Replaced by arm-optimized-routines in commit 2e8ff4d1d5b9 ("Switch to Arm Optimized Routines for mem* & str*"). Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48500 --- contrib/cortex-strings/.gitignore | 11 - contrib/cortex-strings/Makefile.am | 327 --------- contrib/cortex-strings/README | 111 --- contrib/cortex-strings/autogen.sh | 69 -- contrib/cortex-strings/benchmarks/dhry/dhry.h | 311 --------- contrib/cortex-strings/benchmarks/dhry/dhry_1.c | 778 ---------------------- contrib/cortex-strings/benchmarks/dhry/dhry_2.c | 186 ------ contrib/cortex-strings/benchmarks/multi/harness.c | 407 ----------- contrib/cortex-strings/configure.ac | 88 --- contrib/cortex-strings/scripts/add-license.sh | 79 --- contrib/cortex-strings/scripts/bench.py | 175 ----- contrib/cortex-strings/scripts/fixup.py | 27 - contrib/cortex-strings/scripts/libplot.py | 78 --- contrib/cortex-strings/scripts/plot-align.py | 67 -- contrib/cortex-strings/scripts/plot-sizes.py | 120 ---- contrib/cortex-strings/scripts/plot-top.py | 61 -- contrib/cortex-strings/scripts/plot.py | 123 ---- contrib/cortex-strings/scripts/trim.sh | 9 - contrib/cortex-strings/src/aarch64/memchr.S | 172 ----- contrib/cortex-strings/src/aarch64/memcmp.S | 162 ----- contrib/cortex-strings/src/aarch64/memcpy.S | 225 ------- contrib/cortex-strings/src/aarch64/memmove.S | 150 ----- contrib/cortex-strings/src/aarch64/memset.S | 235 ------- contrib/cortex-strings/src/aarch64/strchr.S | 165 ----- contrib/cortex-strings/src/aarch64/strchrnul.S | 144 ---- contrib/cortex-strings/src/aarch64/strcmp.S | 166 ----- contrib/cortex-strings/src/aarch64/strcpy.S | 336 ---------- contrib/cortex-strings/src/aarch64/strlen.S | 233 ------- contrib/cortex-strings/src/aarch64/strncmp.S | 222 ------ contrib/cortex-strings/src/aarch64/strnlen.S | 181 ----- contrib/cortex-strings/src/arm/memchr.S | 155 ----- contrib/cortex-strings/src/arm/memcpy.S | 617 ----------------- contrib/cortex-strings/src/arm/memset.S | 122 ---- contrib/cortex-strings/src/arm/strchr.S | 80 --- contrib/cortex-strings/src/arm/strcmp.S | 500 -------------- contrib/cortex-strings/src/thumb-2/strcpy.c | 173 ----- contrib/cortex-strings/src/thumb-2/strlen.S | 150 ----- contrib/cortex-strings/src/thumb/aeabi_idiv.S | 318 --------- contrib/cortex-strings/src/thumb/strcmp-armv6m.S | 143 ---- 39 files changed, 7676 deletions(-) diff --git a/contrib/cortex-strings/.gitignore b/contrib/cortex-strings/.gitignore deleted file mode 100644 index 558ca155c736..000000000000 --- a/contrib/cortex-strings/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.a -*.o -*.la -*.lo -*.png -*.pyc -.deps -.dirstamp -.libs -try-* -cache.txt diff --git a/contrib/cortex-strings/Makefile.am b/contrib/cortex-strings/Makefile.am deleted file mode 100644 index db6bb93254a4..000000000000 --- a/contrib/cortex-strings/Makefile.am +++ /dev/null @@ -1,327 +0,0 @@ -# Copyright (c) 2011, Linaro Limited -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the Linaro nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. -# - -# Top level Makefile for cortex-strings - -# Used to record the compiler version in the executables -COMPILER = $(shell $(CC) --version 2>&1 | head -n1) - -# The main library -lib_LTLIBRARIES = \ - libcortex-strings.la - -## Test suite -check_PROGRAMS = \ - tests/test-memchr \ - tests/test-memcmp \ - tests/test-memcpy \ - tests/test-memmove \ - tests/test-memset \ - tests/test-strchr \ - tests/test-strcmp \ - tests/test-strcpy \ - tests/test-strlen \ - tests/test-strncmp \ - tests/test-strnlen - -# Options for the tests -tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS) -tests_ldadd = libcortex-strings.la -tests_test_memchr_LDADD = $(tests_ldadd) -tests_test_memchr_CFLAGS = $(tests_cflags) -tests_test_memcmp_LDADD = $(tests_ldadd) -tests_test_memcmp_CFLAGS = $(tests_cflags) -tests_test_memcpy_LDADD = $(tests_ldadd) -tests_test_memcpy_CFLAGS = $(tests_cflags) -tests_test_memmove_LDADD = $(tests_ldadd) -tests_test_memmove_CFLAGS = $(tests_cflags) -tests_test_memset_LDADD = $(tests_ldadd) -tests_test_memset_CFLAGS = $(tests_cflags) -tests_test_strchr_LDADD = $(tests_ldadd) -tests_test_strchr_CFLAGS = $(tests_cflags) -tests_test_strcmp_LDADD = $(tests_ldadd) -tests_test_strcmp_CFLAGS = $(tests_cflags) -tests_test_strcpy_LDADD = $(tests_ldadd) -tests_test_strcpy_CFLAGS = $(tests_cflags) -tests_test_strlen_LDADD = $(tests_ldadd) -tests_test_strlen_CFLAGS = $(tests_cflags) -tests_test_strncmp_LDADD = $(tests_ldadd) -tests_test_strncmp_CFLAGS = $(tests_cflags) - -TESTS = $(check_PROGRAMS) - -## Benchmarks -noinst_PROGRAMS = \ - dhry \ - dhry-native \ - try-none \ - try-this \ - try-plain \ - try-newlib-c \ - try-bionic-c \ - try-glibc-c - -# Good 'ol Dhrystone -dhry_SOURCES = \ - benchmarks/dhry/dhry_1.c \ - benchmarks/dhry/dhry_2.c \ - benchmarks/dhry/dhry.h - -dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\"" -dhry_LDADD = libcortex-strings.la - -dhry_native_SOURCES = $(dhry_SOURCES) -dhry_native_CFLAGS = $(dhry_CFLAGS) - -# Benchmark harness -noinst_LIBRARIES = \ - libmulti.a \ - libbionic-c.a \ - libglibc-c.a \ - libnewlib-c.a \ - libplain.a - -libmulti_a_SOURCES = \ - benchmarks/multi/harness.c - -libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS) - -## Other architecture independant implementaions -libbionic_c_a_SOURCES = \ - reference/bionic-c/bcopy.c \ - reference/bionic-c/memchr.c \ - reference/bionic-c/memcmp.c \ - reference/bionic-c/memcpy.c \ - reference/bionic-c/memset.c \ - reference/bionic-c/strchr.c \ - reference/bionic-c/strcmp.c \ - reference/bionic-c/strcpy.c \ - reference/bionic-c/strlen.c - -libglibc_c_a_SOURCES = \ - reference/glibc-c/memchr.c \ - reference/glibc-c/memcmp.c \ - reference/glibc-c/memcpy.c \ - reference/glibc-c/memset.c \ - reference/glibc-c/strchr.c \ - reference/glibc-c/strcmp.c \ - reference/glibc-c/strcpy.c \ - reference/glibc-c/strlen.c \ - reference/glibc-c/wordcopy.c \ - reference/glibc-c/memcopy.h \ - reference/glibc-c/pagecopy.h - -libnewlib_c_a_SOURCES = \ - reference/newlib-c/memchr.c \ - reference/newlib-c/memcmp.c \ - reference/newlib-c/memcpy.c \ - reference/newlib-c/memset.c \ - reference/newlib-c/strchr.c \ - reference/newlib-c/strcmp.c \ - reference/newlib-c/strcpy.c \ - reference/newlib-c/strlen.c \ - reference/newlib-c/shim.h - -libplain_a_SOURCES = \ - reference/plain/memset.c \ - reference/plain/memcpy.c \ - reference/plain/strcmp.c \ - reference/plain/strcpy.c - -try_none_SOURCES = -try_none_LDADD = libmulti.a -lrt -try_this_SOURCES = -try_this_LDADD = libmulti.a libcortex-strings.la -lrt -try_bionic_c_SOURCES = -try_bionic_c_LDADD = libmulti.a libbionic-c.a -lrt -try_glibc_c_SOURCES = -try_glibc_c_LDADD = libmulti.a libglibc-c.a -lrt -try_newlib_c_SOURCES = -try_newlib_c_LDADD = libmulti.a libnewlib-c.a -lrt -try_plain_SOURCES = -try_plain_LDADD = libmulti.a libplain.a -lrt - -# Architecture specific - -if HOST_AARCH32 - -if WITH_NEON -# Pull in the NEON specific files -neon_bionic_a9_sources = \ - reference/bionic-a9/memcpy.S \ - reference/bionic-a9/memset.S -neon_bionic_a15_sources = \ - reference/bionic-a15/memcpy.S \ - reference/bionic-a15/memset.S -fpu_flags = -mfpu=neon -else -if WITH_VFP -fpu_flags = -mfpu=vfp -else -fpu_flags = -msoft-float -endif -endif - -# Benchmarks and example programs -noinst_PROGRAMS += \ - try-bionic-a9 \ - try-bionic-a15 \ - try-csl \ - try-glibc \ - try-newlib \ - try-newlib-xscale - -# Libraries used in the benchmarks and examples -noinst_LIBRARIES += \ - libbionic-a9.a \ - libbionic-a15.a \ - libcsl.a \ - libglibc.a \ - libnewlib.a \ - libnewlib-xscale.a - -# Main library -libcortex_strings_la_SOURCES = \ - src/thumb-2/strcpy.c \ - src/arm/memchr.S \ - src/arm/strchr.S \ - src/thumb-2/strlen.S \ - src/arm/memset.S \ - src/arm/memcpy.S \ - src/arm/strcmp.S - -# Libraries containing the difference reference versions -libbionic_a9_a_SOURCES = \ - $(neon_bionic_a9_sources) \ - reference/bionic-a9/memcmp.S \ - reference/bionic-a9/strcmp.S \ - reference/bionic-a9/strcpy.S \ - reference/bionic-a9/strlen.c - -libbionic_a9_a_CFLAGS = -Wa,-mimplicit-it=thumb - -libbionic_a15_a_SOURCES = \ - $(neon_bionic_a15_sources) \ - reference/bionic-a15/memcmp.S \ - reference/bionic-a15/strcmp.S \ - reference/bionic-a15/strcpy.S \ - reference/bionic-a15/strlen.c - -libbionic_a15_a_CFLAGS = -Wa,-mimplicit-it=thumb - -libcsl_a_SOURCES = \ - reference/csl/memcpy.c \ - reference/csl/memset.c \ - reference/csl/arm_asm.h - -libglibc_a_SOURCES = \ - reference/glibc/memcpy.S \ - reference/glibc/memset.S \ - reference/glibc/strchr.S \ - reference/glibc/strlen.S - -libnewlib_a_SOURCES = \ - reference/newlib/memcpy.S \ - reference/newlib/strcmp.S \ - reference/newlib/strcpy.c \ - reference/newlib/strlen.c \ - reference/newlib/arm_asm.h \ - reference/newlib/shim.h - -libnewlib_xscale_a_SOURCES = \ - reference/newlib-xscale/memchr.c \ - reference/newlib-xscale/memcpy.c \ - reference/newlib-xscale/memset.c \ - reference/newlib-xscale/strchr.c \ - reference/newlib-xscale/strcmp.c \ - reference/newlib-xscale/strcpy.c \ - reference/newlib-xscale/strlen.c \ - reference/newlib-xscale/xscale.h - -# Flags for the benchmark helpers -try_bionic_a9_SOURCES = -try_bionic_a9_LDADD = libmulti.a libbionic-a9.a -lrt -try_bionic_a15_SOURCES = -try_bionic_a15_LDADD = libmulti.a libbionic-a15.a -lrt -try_csl_SOURCES = -try_csl_LDADD = libmulti.a libcsl.a -lrt -try_glibc_SOURCES = -try_glibc_LDADD = libmulti.a libglibc.a -lrt -try_newlib_SOURCES = -try_newlib_LDADD = libmulti.a libnewlib.a -lrt -try_newlib_xscale_SOURCES = -try_newlib_xscale_LDADD = libmulti.a libnewlib-xscale.a -lrt - -AM_CPPFLAGS = $(fpu_flags) -AM_LDFLAGS = $(fpu_flags) - -endif - -# aarch64 specific -if HOST_AARCH64 - -libcortex_strings_la_SOURCES = \ - src/aarch64/memchr.S \ - src/aarch64/memcmp.S \ - src/aarch64/memcpy.S \ - src/aarch64/memmove.S \ - src/aarch64/memset.S \ - src/aarch64/strchr.S \ - src/aarch64/strchrnul.S \ - src/aarch64/strcmp.S \ - src/aarch64/strcpy.S \ - src/aarch64/strlen.S \ - src/aarch64/strncmp.S \ - src/aarch64/strnlen.S - -endif - -libcortex_strings_la_LDFLAGS = -version-info 1:0:0 - -AM_CFLAGS = \ - -std=gnu99 -Wall \ - -fno-builtin -fno-stack-protector -U_FORTIFY_SOURCE \ - $(AM_CPPFLAGS) - -if WITH_SUBMACHINE -AM_CFLAGS += \ - -mtune=$(submachine) -endif - -EXTRA_DIST = \ - tests/hp-timing.h \ - tests/test-string.h \ - tests/test-skeleton.c \ - scripts/add-license.sh \ - scripts/bench.py \ - scripts/fixup.py \ - scripts/libplot.py \ - scripts/plot-align.py \ - scripts/plot.py \ - scripts/plot-sizes.py \ - scripts/plot-top.py \ - scripts/trim.sh \ - autogen.sh diff --git a/contrib/cortex-strings/README b/contrib/cortex-strings/README deleted file mode 100644 index 5e9e9d3f1d6f..000000000000 --- a/contrib/cortex-strings/README +++ /dev/null @@ -1,111 +0,0 @@ -= Cortex-A String Routines = - -This package contains optimised string routines including memcpy(), memset(), -strcpy(), strlen() for the ARM Cortex-A series of cores. - -Various implementations of these routines are provided, including generic -implementations for ARMv7-A cores with/without Neon, Thumb2 implementations -and generic implementations for cores supporting AArch64. - -== Getting started == -First configure and then install libcortex-strings.so. To make other -applications use this library, either add -lcortex-strings to the link -command or use LD_PRELOAD to load the library into existing applications. - -Our intent is to get these routines into the common C libraries such -as GLIBC, Bionic, and Newlib. Your system may already include them! - -== Contents == - * src/ contains the routines themselves - * tests/ contains the unit tests - * reference/ contains reference copies of other ARM-focused - implementations gathered from around the Internet - * benchmarks/ contains various benchmarks, tools, and scripts used to - check and report on the different implementations. - -The src directory contains different variants organised by the -implementation they run on and optional features used. For example: - * src/thumb-2 contains generic non-NEON routines for AArch32 (with Thumb-2). - * src/arm contains tuned routines for Cortex-A class processors. - * src/aarch64 contains generic routines for AArch64. - * src/thumb contains generic routines for armv6-M (with Thumb). - -== Reference versions == -reference/ contains versions collected from various popular Open -Source libraries. These have been modified for use in benchmarking. -Please refer to the individual files for any licensing terms. - -The routines were collected from the following releases: - * EGLIBC 2.13 - * Newlib 1.19.0 - * Bionic android-2.3.5_r1 - -== Licensing == -All Linaro-authored routines are under the modified BSD license: - -Copyright (c) 2011, Linaro Limited -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. - -All ARM-authored routines are under the modified BSD license: - -Copyright (c) 2014 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. - -All third party routines are under a GPL compatible license. - -== Notes and Limitations == -Some of the implementations have been collected from other -projects and have a variety of licenses and copyright holders. - -== Style == -Assembly code attempts to follow the GLIBC coding convetions. They -are: - * Copyright headers in C style comment blocks - * Instructions indented with one tab - * Operands indented with one tab - * Text is wrapped at 70 characters - * End of line comments are fine diff --git a/contrib/cortex-strings/autogen.sh b/contrib/cortex-strings/autogen.sh deleted file mode 100755 index 8e0591cc315a..000000000000 --- a/contrib/cortex-strings/autogen.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# autogen.sh glue for hplip -# -# HPLIP used to have five or so different autotools trees. Upstream -# has reduced it to two. Still, this script is capable of cleaning -# just about any possible mess of autoconf files. -# -# BE CAREFUL with trees that are not completely automake-generated, -# this script deletes all Makefile.in files it can find. -# -# Requires: automake 1.9, autoconf 2.57+ -# Conflicts: autoconf 2.13 -set -e - -# Refresh GNU autotools toolchain. -echo Cleaning autotools files... -find -type d -name autom4te.cache -print0 | xargs -0 rm -rf \; -find -type f \( -name missing -o -name install-sh -o -name mkinstalldirs \ - -o -name depcomp -o -name ltmain.sh -o -name configure \ - -o -name config.sub -o -name config.guess \ - -o -name Makefile.in \) -print0 | xargs -0 rm -f - -echo Running autoreconf... -autoreconf --force --install - -# For the Debian package build -test -d debian && { - # link these in Debian builds - rm -f config.sub config.guess - ln -s /usr/share/misc/config.sub . - ln -s /usr/share/misc/config.guess . - - # refresh list of executable scripts, to avoid possible breakage if - # upstream tarball does not include the file or if it is mispackaged - # for whatever reason. - [ "$1" = "updateexec" ] && { - echo Generating list of executable files... - rm -f debian/executable.files - find -type f -perm +111 ! -name '.*' -fprint debian/executable.files - } - - # Remove any files in upstream tarball that we don't have in the Debian - # package (because diff cannot remove files) - version=`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | sed -e 's/-[^-]\+$//'` - source=`dpkg-parsechangelog | awk '/Source:/ { print $2 }' | tr -d ' '` - if test -r ../${source}_${version}.orig.tar.gz ; then - echo Generating list of files that should be removed... - rm -f debian/deletable.files - touch debian/deletable.files - [ -e debian/tmp ] && rm -rf debian/tmp - mkdir debian/tmp - ( cd debian/tmp ; tar -zxf ../../../${source}_${version}.orig.tar.gz ) - find debian/tmp/ -type f ! -name '.*' -print0 | xargs -0 -ri echo '{}' | \ - while read -r i ; do - if test -e "${i}" ; then - filename=$(echo "${i}" | sed -e 's#.*debian/tmp/[^/]\+/##') - test -e "${filename}" || echo "${filename}" >>debian/deletable.files - fi - done - rm -fr debian/tmp - else - echo Emptying list of files that should be deleted... - rm -f debian/deletable.files - touch debian/deletable.files - fi -} - -exit 0 diff --git a/contrib/cortex-strings/benchmarks/dhry/dhry.h b/contrib/cortex-strings/benchmarks/dhry/dhry.h deleted file mode 100644 index 3010aecdd31f..000000000000 --- a/contrib/cortex-strings/benchmarks/dhry/dhry.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - ************************************************************************** - * DHRYSTONE 2.1 BENCHMARK PC VERSION - ************************************************************************** - * - * "DHRYSTONE" Benchmark Program - * ----------------------------- - * - * Version: C, Version 2.1 - * - * File: dhry.h (part 1 of 3) - * - * Date: May 25, 1988 - * - * Author: Reinhold P. Weicker - * Siemens AG, AUT E 51 - * Postfach 3220 - * 8520 Erlangen - * Germany (West) - * Phone: [+49]-9131-7-20330 - * (8-17 Central European Time) - * Usenet: ..!mcsun!unido!estevax!weicker - * - * Original Version (in Ada) published in - * "Communications of the ACM" vol. 27., no. 10 (Oct. 1984), - * pp. 1013 - 1030, together with the statistics - * on which the distribution of statements etc. is based. - * - * In this C version, the following C library functions are used: - * - strcpy, strcmp (inside the measurement loop) - * - printf, scanf (outside the measurement loop) - * In addition, Berkeley UNIX system calls "times ()" or "time ()" - * are used for execution time measurement. For measurements - * on other systems, these calls have to be changed. - * - * Collection of Results: - * Reinhold Weicker (address see above) and - * - * Rick Richardson - * PC Research. Inc. - * 94 Apple Orchard Drive - * Tinton Falls, NJ 07724 - * Phone: (201) 389-8963 (9-17 EST) - * Usenet: ...!uunet!pcrat!rick - * - * Please send results to Rick Richardson and/or Reinhold Weicker. - * Complete information should be given on hardware and software used. - * Hardware information includes: Machine type, CPU, type and size - * of caches; for microprocessors: clock frequency, memory speed - * (number of wait states). - * Software information includes: Compiler (and runtime library) - * manufacturer and version, compilation switches, OS version. - * The Operating System version may give an indication about the - * compiler; Dhrystone itself performs no OS calls in the measurement - * loop. - * - * The complete output generated by the program should be mailed - * such that at least some checks for correctness can be made. - * - ************************************************************************** - * - * This version has changes made by Roy Longbottom to conform to a common - * format for a series of standard benchmarks for PCs: - * - * Running time greater than 5 seconds due to inaccuracy of the PC clock. - * - * Automatic adjustment of run time, no manually inserted parameters. - * - * Initial display of calibration times to confirm linearity. - * - * Display of results within one screen (or at a slow speed as the test - * progresses) so that it can be seen to have run successfully. - * - * Facilities to type in details of system used etc. - * - * All results and details appended to a results file. - * - * - * Roy Longbottom - * 101323.2241@compuserve.com - * - ************************************************************************** - * - * For details of history, changes, other defines, benchmark construction - * statistics see official versions from ftp.nosc.mil/pub/aburto where - * the latest table of results (dhry.tbl) are available. See also - * netlib@ornl.gov - * - ************************************************************************** - * - * Defines: The following "Defines" are possible: - * -DREG=register (default: Not defined) - * As an approximation to what an average C programmer - * might do, the "register" storage class is applied - * (if enabled by -DREG=register) - * - for local variables, if they are used (dynamically) - * five or more times - * - for parameters if they are used (dynamically) - * six or more times - * Note that an optimal "register" strategy is - * compiler-dependent, and that "register" declarations - * do not necessarily lead to faster execution. - * -DNOSTRUCTASSIGN (default: Not defined) - * Define if the C compiler does not support - * assignment of structures. - * -DNOENUMS (default: Not defined) - * Define if the C compiler does not support - * enumeration types. - *************************************************************************** - * - * Compilation model and measurement (IMPORTANT): - * - * This C version of Dhrystone consists of three files: - * - dhry.h (this file, containing global definitions and comments) - * - dhry_1.c (containing the code corresponding to Ada package Pack_1) - * - dhry_2.c (containing the code corresponding to Ada package Pack_2) - * - * The following "ground rules" apply for measurements: - * - Separate compilation - * - No procedure merging - * - Otherwise, compiler optimizations are allowed but should be indicated - * - Default results are those without register declarations - * See the companion paper "Rationale for Dhrystone Version 2" for a more - * detailed discussion of these ground rules. - * - * For 16-Bit processors (e.g. 80186, 80286), times for all compilation - * models ("small", "medium", "large" etc.) should be given if possible, - * together with a definition of these models for the compiler system used. - * - ************************************************************************** - * Examples of Pentium Results - * - * Dhrystone Benchmark Version 2.1 (Language: C) - * - * Month run 4/1996 - * PC model Escom - * CPU Pentium - * Clock MHz 100 - * Cache 256K - * Options Neptune chipset - * OS/DOS Windows 95 - * Compiler Watcom C/ C++ 10.5 Win386 - * OptLevel -otexan -zp8 -fp5 -5r - * Run by Roy Longbottom - * From UK - * Mail 101323.2241@compuserve.com - * - * Final values (* implementation-dependent): - * - * Int_Glob: O.K. 5 - * Bool_Glob: O.K. 1 - * Ch_1_Glob: O.K. A - * Ch_2_Glob: O.K. B - * Arr_1_Glob[8]: O.K. 7 - * Arr_2_Glob8/7: O.K. 1600010 - * Ptr_Glob-> - * Ptr_Comp: * 98008 - * Discr: O.K. 0 - * Enum_Comp: O.K. 2 - * Int_Comp: O.K. 17 - * Str_Comp: O.K. DHRYSTONE PROGRAM, SOME STRING - * Next_Ptr_Glob-> - * Ptr_Comp: * 98008 same as above - * Discr: O.K. 0 - * Enum_Comp: O.K. 1 - * Int_Comp: O.K. 18 - * Str_Comp: O.K. DHRYSTONE PROGRAM, SOME STRING - * Int_1_Loc: O.K. 5 - * Int_2_Loc: O.K. 13 - * Int_3_Loc: O.K. 7 - * Enum_Loc: O.K. 1 - * Str_1_Loc: O.K. DHRYSTONE PROGRAM, 1'ST STRING - * Str_2_Loc: O.K. DHRYSTONE PROGRAM, 2'ND STRING - * - * Register option Selected. - * - * Microseconds 1 loop: 4.53 - * Dhrystones / second: 220690 - * VAX MIPS rating: 125.61 - * - * - * Dhrystone Benchmark Version 2.1 (Language: C) - * - * Month run 4/1996 - * PC model Escom - * CPU Pentium - * Clock MHz 100 - * Cache 256K - * Options Neptune chipset - * OS/DOS Windows 95 - * Compiler Watcom C/ C++ 10.5 Win386 - * OptLevel No optimisation - * Run by Roy Longbottom - * From UK - * Mail 101323.2241@compuserve.com - * - * Final values (* implementation-dependent): - * - * Int_Glob: O.K. 5 - * Bool_Glob: O.K. 1 - * Ch_1_Glob: O.K. A - * Ch_2_Glob: O.K. B - * Arr_1_Glob[8]: O.K. 7 - * Arr_2_Glob8/7: O.K. 320010 - * Ptr_Glob-> - * Ptr_Comp: * 98004 - * Discr: O.K. 0 - * Enum_Comp: O.K. 2 - * Int_Comp: O.K. 17 - * Str_Comp: O.K. DHRYSTONE PROGRAM, SOME STRING - * Next_Ptr_Glob-> - * Ptr_Comp: * 98004 same as above - * Discr: O.K. 0 - * Enum_Comp: O.K. 1 - * Int_Comp: O.K. 18 - * Str_Comp: O.K. DHRYSTONE PROGRAM, SOME STRING - * Int_1_Loc: O.K. 5 - * Int_2_Loc: O.K. 13 - * Int_3_Loc: O.K. 7 - * Enum_Loc: O.K. 1 - * Str_1_Loc: O.K. DHRYSTONE PROGRAM, 1'ST STRING - * Str_2_Loc: O.K. DHRYSTONE PROGRAM, 2'ND STRING - * - * Register option Not selected. - * - * Microseconds 1 loop: 20.06 - * Dhrystones / second: 49844 - * VAX MIPS rating: 28.37 - * - ************************************************************************** - */ - -/* Compiler and system dependent definitions: */ - -#ifndef TIME -#define TIMES -#endif - /* Use times(2) time function unless */ - /* explicitly defined otherwise */ - -#ifdef TIMES -/* #include - #include */ - /* for "times" */ -#endif - -#define Mic_secs_Per_Second 1000000.0 - /* Berkeley UNIX C returns process times in seconds/HZ */ - -#ifdef NOSTRUCTASSIGN -#define structassign(d, s) memcpy(&(d), &(s), sizeof(d)) -#else -#define structassign(d, s) d = s -#endif - -#ifdef NOENUM -#define Ident_1 0 -#define Ident_2 1 -#define Ident_3 2 -#define Ident_4 3 -#define Ident_5 4 - typedef int Enumeration; -#else - typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5} - Enumeration; -#endif - /* for boolean and enumeration types in Ada, Pascal */ - -/* General definitions: */ - -#include -#include - - /* for strcpy, strcmp */ - -#define Null 0 - /* Value of a Null pointer */ -#define true 1 -#define false 0 - -typedef int One_Thirty; -typedef int One_Fifty; -typedef char Capital_Letter; -typedef int Boolean; -typedef char Str_30 [31]; -typedef int Arr_1_Dim [50]; -typedef int Arr_2_Dim [50] [50]; - -typedef struct record - { - struct record *Ptr_Comp; - Enumeration Discr; - union { - struct { - Enumeration Enum_Comp; - int Int_Comp; - char Str_Comp [31]; - } var_1; - struct { - Enumeration E_Comp_2; - char Str_2_Comp [31]; - } var_2; - struct { - char Ch_1_Comp; - char Ch_2_Comp; - } var_3; - } variant; - } Rec_Type, *Rec_Pointer; - - - diff --git a/contrib/cortex-strings/benchmarks/dhry/dhry_1.c b/contrib/cortex-strings/benchmarks/dhry/dhry_1.c deleted file mode 100644 index da272e4c4234..000000000000 --- a/contrib/cortex-strings/benchmarks/dhry/dhry_1.c +++ /dev/null @@ -1,778 +0,0 @@ -/* - ************************************************************************* - * - * "DHRYSTONE" Benchmark Program - * ----------------------------- - * - * Version: C, Version 2.1 - * - * File: dhry_1.c (part 2 of 3) - * - * Date: May 25, 1988 - * - * Author: Reinhold P. Weicker - * - ************************************************************************* - */ - - #include - #include - #include - #include "dhry.h" - /*COMPILER COMPILER COMPILER COMPILER COMPILER COMPILER COMPILER*/ - - #ifdef COW - #define compiler "Watcom C/C++ 10.5 Win386" - #define options " -otexan -zp8 -5r -ms" - #endif - #ifdef CNW - #define compiler "Watcom C/C++ 10.5 Win386" - #define options " No optimisation" - #endif - #ifdef COD - #define compiler "Watcom C/C++ 10.5 Dos4GW" - #define options " -otexan -zp8 -5r -ms" - #endif - #ifdef CND - #define compiler "Watcom C/C++ 10.5 Dos4GW" - #define options " No optimisation" - #endif - #ifdef CONT - #define compiler "Watcom C/C++ 10.5 Win32NT" - #define options " -otexan -zp8 -5r -ms" - #endif - #ifdef CNNT - #define compiler "Watcom C/C++ 10.5 Win32NT" - #define options " No optimisation" - #endif - #ifdef COO2 - #define compiler "Watcom C/C++ 10.5 OS/2-32" - #define options " -otexan -zp8 -5r -ms" - #endif - #ifdef CNO2 - #define compiler "Watcom C/C++ 10.5 OS/2-32" - #define options " No optimisation" - #endif - - -/* Global Variables: */ - -Rec_Pointer Ptr_Glob, - Next_Ptr_Glob; *** 6984 LINES SKIPPED *** From nobody Mon Feb 3 15:10:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymqgl6rwRz5llc8; Mon, 03 Feb 2025 15:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymqgl104bz3bpW; Mon, 03 Feb 2025 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738595443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xCH6/jgg71sGDqu1PTdnWxAKDppvMccwufMr+J5zOs0=; b=ia1FgxNkeE/M4gOPOn2d2eAU2cBushiutQY/UJ3cPm9wdNCuC3y0cWsN11REzFjdHVIusT 8ZRfHAvrn116Y3Gv/qJvP6KQEtEzeKoMF092YG4sKZMQJlR1BMWTSq9r+VYDBJpcUJ6w+Z Lq5uIeV6qnqMsxb4vz/4H7bjtkdBqql/DL2iE22thy8ufo/wEmTKoDqM9QtNr/Z+eYsbca UxUNf7+dSiyb2qrcMdmhDmEyzyNM8oqCEHggpnp4pl8PfxhmZIfny2cUpi1MJVC/beFnRp gVbnjgc5AZ6Gm7PKvRvaw8vyNVNIJUW0ICmMFOSdKH7GUj8iHt+m8OzniJMuvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738595443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xCH6/jgg71sGDqu1PTdnWxAKDppvMccwufMr+J5zOs0=; b=lRHFQ070z60CtIKn3PO1vyyxc6LQZgtX/Kby4wzmQN8MsnF992Cp5ovejKAwaOURUzXieW OgMot8Lk/fkxwCmnF28spKNJjN3NtFsOQXVJca7kVqkyLWYPRHMk4v/1rSDKr5/2hDlmgu 5/BYUHBl321ilbryoBvK0btTrJ7P7rayuK//DeQc3MiYraVvPOWK80nICA85/qRzb0BfCL yw0HqDwv9pOxCxcxREKdYh3RxO/rywW9xQxAJ1jlpeDxC+WBAzoq5PozNxTS+cCnmLTbBK 81YciA4x2VabPA7by0gDBzGWwK0L+b5VXYWAyVwG0DQVHBVLNZ1I6mTwP8B2Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738595443; a=rsa-sha256; cv=none; b=DvFvFuAVVczYWZLfbQemsBVsI4VtsqKPa5lbL+jvqJW9RCgTEjIcHrywSt6CYL/0tq0p1o golzzkhHsh9zfjHJK6jwrC/81mJ16M64i/wUIi5t8sXwQ3hxPgsx5Mo68G/QSfejXqRV5s hD4ymyyCroWWLw1hLP/yHX1kkbZ8h0qr6dKfU835p/0INxzQOAUGT8vLtwQLTH+L8cn3sl +WMBIn/ul6ARtPm1vX4QYn8CKP1GNj7xs9tKUK4diylFKWtxyPgc/JhPN3y3npbz0XaotF jNu3F4Tlib+971wDzL03SfUOHGkrEw5RmK7CWCbXkUIcOdEGpuOgTiPCW/RBCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymqgl0NWDzhf9; Mon, 03 Feb 2025 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513FAghS015340; Mon, 3 Feb 2025 15:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513FAgQk015337; Mon, 3 Feb 2025 15:10:42 GMT (envelope-from git) Date: Mon, 3 Feb 2025 15:10:42 GMT Message-Id: <202502031510.513FAgQk015337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 8b35839346d0 - main - gstat: Sync usage/synopsis + tag SPDX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b35839346d0bd8d4244018489bfdef8fd48de53 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8b35839346d0bd8d4244018489bfdef8fd48de53 commit 8b35839346d0bd8d4244018489bfdef8fd48de53 Author: Alexander Ziaee AuthorDate: 2025-02-03 02:15:26 +0000 Commit: Alexander Ziaee CommitDate: 2025-02-03 15:06:59 +0000 gstat: Sync usage/synopsis + tag SPDX Sort options using the slightly unusual convention used here as well. MFC after: 3 days Approved by: carlavilla (mentor), imp (src) Differential Revision: https://reviews.freebsd.org/D48800 --- usr.sbin/gstat/gstat.8 | 17 ++++++++++------- usr.sbin/gstat/gstat.c | 8 ++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/gstat/gstat.8 b/usr.sbin/gstat/gstat.8 index d328d26be23c..02dbbbc54a3d 100644 --- a/usr.sbin/gstat/gstat.8 +++ b/usr.sbin/gstat/gstat.8 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 Giorgos Keramidas .\" All rights reserved. .\" @@ -22,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 1, 2021 +.Dd February 1, 2025 .Dt GSTAT 8 .Os .Sh NAME @@ -30,7 +33,7 @@ .Nd print statistics about GEOM disks .Sh SYNOPSIS .Nm -.Op Fl abBcdops +.Op Fl abBcCdops .Op Fl f Ar filter .Op Fl I Ar interval .Sh DESCRIPTION @@ -75,11 +78,6 @@ Only devices with the names matching will be displayed. The format of the regular expression is described in .Xr re_format 7 . -.It Fl o -Enable display of statistics for other operations -.Pq Dv BIO_FLUSH . -.It Fl s -Enable blocks' size statistics. .It Fl I Ar interval Refresh the .Nm @@ -92,8 +90,13 @@ or .Cm us (the default) indicates that the update interval is specified in seconds, milliseconds, or microseconds, respectively. +.It Fl o +Enable display of statistics for other operations +.Pq Dv BIO_FLUSH . .It Fl p Only display physical providers (those with rank of 1). +.It Fl s +Enable blocks' size statistics. .El .Sh INTERACTIVE COMMANDS These commands are currently recognized if diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c index 887ae9dbee16..c650f7120a40 100644 --- a/usr.sbin/gstat/gstat.c +++ b/usr.sbin/gstat/gstat.c @@ -141,9 +141,6 @@ main(int argc, char **argv) "Invalid filter - see re_format(7)"); strlcpy(f_s, optarg, sizeof(f_s)); break; - case 'o': - flag_o = 1; - break; case 'I': p = NULL; i = strtoul(optarg, &p, 0); @@ -158,6 +155,9 @@ main(int argc, char **argv) i *= 1; flag_I = i; break; + case 'o': + flag_o = 1; + break; case 'p': flag_p = 1; break; @@ -615,7 +615,7 @@ out: static void usage(void) { - fprintf(stderr, "usage: gstat [-abBcCdps] [-f filter] [-I interval]\n"); + fprintf(stderr, "usage: gstat [-abBcCdops] [-f filter] [-I interval]\n"); exit(EX_USAGE); /* NOTREACHED */ } From nobody Mon Feb 3 16:22:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmsGz0kfPz5m207; Mon, 03 Feb 2025 16:22:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmsGx5plFz3XhF; Mon, 03 Feb 2025 16:22:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 513GMb4O020914; Mon, 3 Feb 2025 18:22:40 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 513GMb4O020914 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 513GMbGq020913; Mon, 3 Feb 2025 18:22:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Feb 2025 18:22:37 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c5d671b711c3 - main - libc/rpc: add userland side RPC server over netlink(4) Message-ID: References: <202502010902.51192534047826@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202502010902.51192534047826@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [1.01 / 15.00]; NEURAL_SPAM_LONG(0.99)[0.988]; NEURAL_SPAM_MEDIUM(0.98)[0.977]; NEURAL_HAM_SHORT(-0.96)[-0.960]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; HAS_XAW(0.00)[] X-Spamd-Bar: + X-Rspamd-Queue-Id: 4YmsGx5plFz3XhF On Sat, Feb 01, 2025 at 09:02:05AM +0000, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c5d671b711c34fb9eec55531663182feedd93f87 > > commit c5d671b711c34fb9eec55531663182feedd93f87 > Author: Gleb Smirnoff > AuthorDate: 2025-02-01 01:02:00 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-02-01 09:00:25 +0000 > > libc/rpc: add userland side RPC server over netlink(4) > > To be used by NFS related daemons that provide RPC services to the kernel. > Some implementation details inside the new svc_nl.c. > > Reviewed by: rmacklem > Differential Revision: https://reviews.freebsd.org/D48550 > --- > include/rpc/svc.h | 6 + > lib/libc/rpc/Makefile.inc | 2 +- > lib/libc/rpc/Symbol.map | 4 + > lib/libc/rpc/rpc_generic.c | 3 +- > lib/libc/rpc/svc_nl.c | 300 +++++++++++++++++++++++++++++++++++++++++++++ > 5 files changed, 313 insertions(+), 2 deletions(-) > > diff --git a/include/rpc/svc.h b/include/rpc/svc.h > index d4a84384bb92..deb626ad7c1d 100644 > --- a/include/rpc/svc.h > +++ b/include/rpc/svc.h > @@ -455,6 +455,12 @@ extern SVCXPRT *svc_fd_create(const int, const u_int, const u_int); > */ > extern SVCXPRT *svcunixfd_create(int, u_int, u_int); > > +/* > + * netlink(4) server creation. To be used to service requests that > + * originate from an in-kernel client. > + */ > +extern SVCXPRT *svc_nl_create(const char *); > + > /* > * Memory based rpc (for speed check and testing) > */ > diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc > index 5ee4ffc256a2..87963d10eec1 100644 > --- a/lib/libc/rpc/Makefile.inc > +++ b/lib/libc/rpc/Makefile.inc > @@ -8,7 +8,7 @@ SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ > rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ > rpcb_st_xdr.c rpcsec_gss_stub.c svc.c svc_auth.c svc_dg.c \ > svc_auth_unix.c svc_generic.c svc_raw.c svc_run.c svc_simple.c \ > - svc_vc.c > + svc_vc.c svc_nl.c > > # Secure-RPC > SRCS+= auth_time.c auth_des.c authdes_prot.c des_crypt.c des_soft.c \ > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map > index e4fecb83ec66..105d6fb6b54e 100644 > --- a/lib/libc/rpc/Symbol.map > +++ b/lib/libc/rpc/Symbol.map > @@ -199,6 +199,10 @@ FBSD_1.0 { > __rpc_get_local_uid; > }; > > +FBSD_1.8 { > + svc_nl_create; > +}; > + Are you sure that you want this symbol to be public? Do you envision that some out-of-base component would utilize it? Do you intend to keep the interface stable? Previous rpc syscall(s) were in private namespace. From nobody Mon Feb 3 16:56:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymt1R2WHFz5m5Kk; Mon, 03 Feb 2025 16:56:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymt1R1dS3z3CcJ; Mon, 03 Feb 2025 16:56:11 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738601771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xwwKP4uHxfcQ/Bwzif3dK2xq5uuYCgmiFaltbnGaRog=; b=heaak72y2aIWW+EoCfL6Ded37PwJIKPZs1byx7u2Mtiz8PFNy//9n4wdAsDVfTSE3gCkkJ Vz/0dMBWKQyDaH0uLpOwrTasIE28d1q6R9qDUEvRCrebI5mjX8D94UbX/suk92utqY3dGc hqhaEt0N+RKJstfR3mYyR3Gq1W6C6yPBFjQ9OoCKtCjMcitI4qGzkbexawi2a36/Xp2Gzu o7yazQO9ILRgOb23x1r5gZo872qkVvItCTUgPw1ONKFs5Xi2jRnwhqJsg8y4j6aDf4e68p 01oILVkIEpYFM3nEZ2uC/NbAt0P18W62/e3ffohXjma60hI9z+3WrqWHQEaAnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738601771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xwwKP4uHxfcQ/Bwzif3dK2xq5uuYCgmiFaltbnGaRog=; b=d1bK02Qo3SLg7MmzObwLpP1FrLZLsCVsDNJ+wXrFQzIZXscOh4Xuxg2Ox2iKG13UHj1r5B KOHXN95jakJfaT0+wh/wcGnxEbRdqKwi44RaaUwCq+eTz3EWosVy4YTte3ugtK+bZmSd7J 4c2lvGXois8dApTnpR/SNYTJJWkZebZ/y3U8dKR0Cl/1yoQ46r5IIvXgBHP/9cIbnrhHfR uff+wDNZIrkQry6bdxio9XHNXPEj+WmciHvqHOZbrC33MScpVbFWMdWpcmD29lGxbHBhkg /hGp8BT1oK1teFQJuTzpQAHBygq73g5WwrpYwiDumFsQjX4QSSbRl2HEnMlr+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738601771; a=rsa-sha256; cv=none; b=Desq+ZoLc+m8ZFrJyBpB1Xcbedb2CbdMEQlwQuhQN+og9eJlx+g8L9itnTbhM0vMIknuhK L9RN2fpLdkt/7OB0uRadSN1vZFXE5Qrbv0mwcaLd81/mbeAqgJevB64py7vP39V2pJtsXH 2xfDH6m754vATOKe7lC9zxEyKdgy++Iy1RJVedwFip//hL2rZoA7PSBqSnxoE+kWcclVbz tjzOQ2sNB7aUlCVp5DC5B31zpoRpQuRUg42cyY770QToAJZYEZ6dn1ASRE14YMSOin8eV9 CchUNLWyVkCcLDathjbyQz3nbawzpcaM9URylky5KWUE0/k8wy4OnicvNmP8AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Ymt1Q3F05z1JKH; Mon, 03 Feb 2025 16:56:10 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 3 Feb 2025 08:56:07 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c5d671b711c3 - main - libc/rpc: add userland side RPC server over netlink(4) Message-ID: References: <202502010902.51192534047826@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Feb 03, 2025 at 06:22:37PM +0200, Konstantin Belousov wrote: K> > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map K> > index e4fecb83ec66..105d6fb6b54e 100644 K> > --- a/lib/libc/rpc/Symbol.map K> > +++ b/lib/libc/rpc/Symbol.map K> > @@ -199,6 +199,10 @@ FBSD_1.0 { K> > __rpc_get_local_uid; K> > }; K> > K> > +FBSD_1.8 { K> > + svc_nl_create; K> > +}; K> > + K> Are you sure that you want this symbol to be public? Do you envision that K> some out-of-base component would utilize it? Do you intend to keep the K> interface stable? K> K> Previous rpc syscall(s) were in private namespace. This is not a syscall, it is a new type of client. All other are in public namespace: svc_tli_create, svc_tp_create, svc_dg_create, svc_vc_create. Of course this one is a bit special, it is designed to communicate to the kernel, not to remote hosts, but IMHO we should allow to create 3-rd party clients that would talk to kernel via Netlink RPC. -- Gleb Smirnoff From nobody Mon Feb 3 17:28:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymtl840S2z5mBjj; Mon, 03 Feb 2025 17:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymtl83WNjz3Jrp; Mon, 03 Feb 2025 17:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738603732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvOP2i79p4LxCMzFyXdVXQW8bx7tZlkSyN4adepoolE=; b=MczpcuP/NuOfEEhDylwsBUkK9kGo3CwlrUPiVlEuJeUAz8zn67ErEE0QHV2sxxhWSqf1Ri IOc+yw8f/F68O8Dyss+8GLkF/jjb0dvYqCsF9uKhWjOW7YaCmoPEHdL6zi+Aog94xtzhrR ms8bdvVWf71GSGB3/177cdnrC0QELslnT4qlwMrxRsVzp9CfdSg5BB80iKO/4KKQUNo+Ol hFR1cP6iufbXUW0q/VDCksFrUBeAkp9f3rrOlTOV5iz43/u2Kn0aZaY8ybOZM4yTtVpa5/ Spw0FfGW60dCKunCyTlGS5Bvm3yE687tsMraJUqQXg44lBL0n2kYTeR7/GccpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738603732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvOP2i79p4LxCMzFyXdVXQW8bx7tZlkSyN4adepoolE=; b=sqalJCPlEdtKEzOA+aF4YzcFt9AyEmP6AjJ8dRTFn7hFfC7F6yVpdn7pMKoKUyHYsTRGXh cgKCUQoPOQw8LtOnED2LuEnxw5keVtl6DeXw2qMZ4uYMra6kiqwRuyUqgceNMrXJnEgBMu 0w3TFxC82wI5zgoUeMAwSktl19pFBAHiFD8U0a55O5v5IX42GSH7natdOgXqKLFZICXJ1A g6PSB4OWXt0aUgNiwmosNkyzbtTxZbRy1UOUEX9hHdbT0NxPfgJ6VXBmiMq03UpMqLppP/ yXD6G1VbiPGL3zH8BUnEkQ/tnZAegnnOtWKb2aaCzty+guU5Qpmo4BGL54LtkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738603732; a=rsa-sha256; cv=none; b=sjpikcKh+07kPILWX+E/ubKPse1OviOe8yLUMCkpn3Q9comIMckONd7wYWN0JLDC83OTTg lMmeB+uWYzUYImlcOeJdjBJHgGerO8q10s67cT5veIJ9NYoDbD7+HL+CO9iDwRVy+C+q7z b0y5+nH8gWQiVhBfpw+l6Tlg/NZB+hft8rM7nimuZJgEnhBakrLBvLdTOy7nX7UDcmkcCe d7qd9HYmS8PREsxFxa3Ch+G3BJ+epBGoupMyjFCkQ5VSBEmRKBzrCQF8Z0JbpQ0Fxxdnq8 MndPr1WY/LIdKqXxwHtHaOJvD1+JeD9oA/BbsfVl8Y3dp4cq70K73mfqsYak0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymtl835tMzmKR; Mon, 03 Feb 2025 17:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513HSqq4009291; Mon, 3 Feb 2025 17:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513HSqpx009288; Mon, 3 Feb 2025 17:28:52 GMT (envelope-from git) Date: Mon, 3 Feb 2025 17:28:52 GMT Message-Id: <202502031728.513HSqpx009288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fdaf7d0fe10c - main - umass: Print quirks with %b List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdaf7d0fe10c1b0017305627f28e6e59149aadaa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fdaf7d0fe10c1b0017305627f28e6e59149aadaa commit fdaf7d0fe10c1b0017305627f28e6e59149aadaa Author: Warner Losh AuthorDate: 2025-02-03 17:25:27 +0000 Commit: Warner Losh CommitDate: 2025-02-03 17:25:27 +0000 umass: Print quirks with %b Print the quirks in a more human-readable form. When testing a dozen different removeable devices, the hex numbers quickly blur... Sponsored by: Netflix --- sys/dev/usb/storage/umass.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index ba10a23d2987..9137f3eb895e 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -365,6 +365,26 @@ typedef uint8_t (umass_transform_t)(struct umass_softc *sc, uint8_t *cmd_ptr, /* Device does not support 'PREVENT/ALLOW MEDIUM REMOVAL'. */ #define NO_PREVENT_ALLOW 0x8000 +#define UMASS_QUIRKS_STRING \ + "\020" \ + "\001NO_TEST_UNIT_READY" \ + "\002RS_NO_CLEAR_UA" \ + "\003NO_START_STOP" \ + "\004FORCE_SHORT_INQUIRY" \ + "\005SHUTTLE_INIT" \ + "\006ALT_IFACE_1" \ + "\007FLOPPY_SPEED" \ + "\010IGNORE_RESIDUE" \ + "\011NO_GETMAXLUN" \ + "\012WRONG_CSWSIG" \ + "\013NO_INQUIRY" \ + "\014NO_INQUIRY_EVPD" \ + "\015RBC_PAD_TO_12" \ + "\016READ_CAPACITY_OFFBY1" \ + "\017NO_SYNCHRONIZE_CACHE" \ + "\020NO_PREVENT_ALLOW" \ + + struct umass_softc { struct scsi_sense cam_scsi_sense; struct scsi_test_unit_ready cam_scsi_test_unit_ready; @@ -956,7 +976,7 @@ umass_attach(device_t dev) sc->sc_proto & UMASS_PROTO_WIRE); } - printf("; quirks = 0x%04x\n", sc->sc_quirks); + printf("; quirks = 0x%b\n", sc->sc_quirks, UMASS_QUIRKS_STRING); #endif if (sc->sc_quirks & ALT_IFACE_1) { From nobody Mon Feb 3 18:09:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymvdx0rwMz5mHfs; Mon, 03 Feb 2025 18:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymvdw49Xsz3SqX; Mon, 03 Feb 2025 18:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eR9mG5Q2igrEsYUO0kdpu9j3CMVNWbbxJvF+/8mXYIg=; b=DDMIGhhscgk2vNLM6SjRHGg5VGkmZ5SP44YxRVzkmPjhSt5nyLNKpkiVkXih6uwJjzIFw9 qrZO85NigVXec0aLKA5HJPEU0d+xEtEOK9GTD0jd3VFxkVrvPNbHMkqEMKVw/6fbzmK4gg ZHu0jIUX5m3CFCmqPeY+js1j7JNBAkbXZ7xPiuVHt1VNJqyLtOm0BVYjs4X4zrzUJUIKBM Y5jqJcKYizTZyz5zijWfdD21Xul93MOSIgm32yIBVFX7VNddguXvvo7iezOmM96Z7BULE0 8sDKYNYl1JtA2PIW+NwO5+/nT8j5Q8aZBNpiNHDLck7JU9q7SSlAiVBXusCEpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eR9mG5Q2igrEsYUO0kdpu9j3CMVNWbbxJvF+/8mXYIg=; b=UhlPOcuiwBBciH1hJrpIkY0P+DlhTgfbvIap3xC9ahq8B5ogs0Dly1MeWjcg2zM+w6wp5/ VjnItrvbpJdhP9Gc6GRkataSw81BZPsbboukATWSrgfi/ZvOZUdJEKEy3VkO+hNhtyRmhO T11oUckOatz+hpd/ucFqZgP42fsOofqnIZyxwZ4RgjCyftwe+3vc7Yh855q68Z4TRNOXF6 xt8WAHNFRsCsNPMOByvukbpWz4JeHVpOEKur/3rpgID8RfZEf9FKEl2f93NK4EjMFejc7J H4i8h4cRDDhMoNlllpP/2/5n32CVzEFcSWSPAID94arBOeC+buUC4VG/kWfF8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738606164; a=rsa-sha256; cv=none; b=Eh/6H2ObjdG0Syg6S44WmJkDNWo7vojimaKp3JgvI7LWOiE9plZp8IcZM2/oV+RfMqyFTR 9kaUwvVNZwVE8Jpn0pLWYqc3yFUdlqimUOqcybEvEIyt7mRgAtorXuTIPQJb8O/IUkOCki 76YyASFzQYktPb9aun1TGF2tv/C+IyDvx/VoBL6gk7SiH2OaR/6e5DHeBBbPcKric9jfv6 +xMOQMXM5l32J5RFodMoq5k/yKRrN1dNYUfUMsabI2yCi7TyXIOeW7Y1CCkxzHHpA4afZB 7+cgCcI43SzRsgKtrcRK5XjfwetFI9Dk9t8qee/GAD24sQrJTHHCh8w3NlprWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymvdw3NsxzncX; Mon, 03 Feb 2025 18:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513I9O8j085792; Mon, 3 Feb 2025 18:09:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513I9O7l085789; Mon, 3 Feb 2025 18:09:24 GMT (envelope-from git) Date: Mon, 3 Feb 2025 18:09:24 GMT Message-Id: <202502031809.513I9O7l085789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 94387f252a62 - main - sockets: remove unused pr_sopoll_notsupp() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94387f252a6227ce5964d8d66fc8892b0a604b2a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=94387f252a6227ce5964d8d66fc8892b0a604b2a commit 94387f252a6227ce5964d8d66fc8892b0a604b2a Author: Gleb Smirnoff AuthorDate: 2025-02-03 07:15:22 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 17:47:13 +0000 sockets: remove unused pr_sopoll_notsupp() --- sys/kern/uipc_domain.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 0d3c622fa9c0..734d9ee91349 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -176,12 +176,6 @@ pr_soreceive_notsupp(struct socket *so, struct sockaddr **paddr, return (EOPNOTSUPP); } -static int -pr_sopoll_notsupp(struct socket *so, int events, struct thread *td) -{ - return (EOPNOTSUPP); -} - static void pr_init(struct domain *dom, struct protosw *pr) { @@ -216,7 +210,6 @@ pr_init(struct domain *dom, struct protosw *pr) NOTSUPP(pr_sockaddr); NOTSUPP(pr_sosend); NOTSUPP(pr_soreceive); - NOTSUPP(pr_sopoll); NOTSUPP(pr_ready); } From nobody Mon Feb 3 18:09:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymvdy0k9fz5mHmr; Mon, 03 Feb 2025 18:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymvdx4hw7z3SqZ; Mon, 03 Feb 2025 18:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/t90EE2AtnPpm/aiSi11icMQ4dowWahaLElr2EfPoxE=; b=SFDTISFJyn/iSKkQHVjDeT3IgYEoZL/sG8jwx3OIxvHxuGFFKX/jXCAGFRJ8KfWdWiPU4t qS2QyMEqk1sNdJOhecuQKn8pgwRj8j0jXGTHH7QFnRwPigLqY8+bcWjY/YvgcekwPWKPV0 MRZOq2gHbAPHYBXbIzyN2iKurrZC5yOwSOX0Fhc66WOWorFqOpexH1kXrEAiNJ2xvuZsSn PxkNEe/GdA1sRdwXZiP76VsB60ZrD/LnSSZLHnKWCt7x/1Q+up3CFEbfihZl+OHfW2SeHq +K7dzf3U7eZggsVjkJAlOf+LJ6zS1Nr1FJvk6eW/PyobjNx9QyCYos4EG3sxOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/t90EE2AtnPpm/aiSi11icMQ4dowWahaLElr2EfPoxE=; b=AZYDjs808FkcvmQ2q9Orjsvk3oziQRw5GTZL1I9RBpHJ4TEyaDFOuTAaj/aXZMtJ6/iYkb VFa6QwinqI/Emn8Swz0DnjQXaLbEJBr4+wC8nAfQ8dUGpo3/v78qKk95kLYpMMrZFnLQt6 qXWRoIyXKqmyB/lsqgfV+qn7pdL5sENVokOz2WpqnHPrswLBLMGARSVELatE4uNgT2SuJY 0gwbUL84BMirIM/Tr6ozBSru0Xla0co8/9arfM7Im+Z9gB+VLCnw9DV7bLF3uRrpuMX2Ix djk4qqOeALlHo+TMnlzVal93qRcISPScz5Dk6fUcSTUM3MA7oLYk9CXVp/B4UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738606165; a=rsa-sha256; cv=none; b=EmGOt/NsNcOMrq8jxeZ2zq9snT3zfuvGNm3RNh/Fxrf2dKHpwVeMuj7dMK/hrpowCheIg9 4jcRYA8/Zwjce7lfWhk8XAetg/0JmZrlHXeGZE1O4Eazs7ac35S96Td/sL5GS4YiOFRxcN PhSwTZJCUdPk3TQoB0AZvQ2b9zbIxwXMXCvbU2Xhe+5VQlDn5UkEqXbCUVxWT+SU2+5f38 mQXANk8Y/YDklUnQXel1UsXaFnnmvuRWti/4BInUTm9HspMzigh5D4Hsn5lxB7btVXeBVk bZTH+MuSXmxzEGTJchx0expcx8u6CJGl+VIFLhsSuGCMhw0EL6GpryMMC8iO8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymvdx3ymlznFQ; Mon, 03 Feb 2025 18:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513I9Ppu085832; Mon, 3 Feb 2025 18:09:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513I9PV4085829; Mon, 3 Feb 2025 18:09:25 GMT (envelope-from git) Date: Mon, 3 Feb 2025 18:09:25 GMT Message-Id: <202502031809.513I9PV4085829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: bf3338e74b44 - main - netstat: cleanup includes in mroute6.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf3338e74b4432c17c992f46478c69ad020c5307 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bf3338e74b4432c17c992f46478c69ad020c5307 commit bf3338e74b4432c17c992f46478c69ad020c5307 Author: Gleb Smirnoff AuthorDate: 2025-02-03 07:59:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 17:48:41 +0000 netstat: cleanup includes in mroute6.c The file obtains some kernel structures in a dirty way and needs forward declaration of struct sockopt for that. Make it explicit instead of getting it via headers that were not designed for that. --- usr.bin/netstat/mroute6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c index 2a98f26f8b27..0bb44b8292e7 100644 --- a/usr.bin/netstat/mroute6.c +++ b/usr.bin/netstat/mroute6.c @@ -70,9 +70,7 @@ #include #include #include -#include #include -#include #include #include @@ -88,6 +86,7 @@ #include #define KERNEL 1 +struct sockopt; #include #undef KERNEL From nobody Mon Feb 3 18:09:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymvdz1vfcz5mHft; Mon, 03 Feb 2025 18:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymvdy6sfdz3SW2; Mon, 03 Feb 2025 18:09:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDFIPUZtMPLTBiti/4h/a+G5zCftZz3ZbXNLaUb7brI=; b=uwyd3TGwusEixVhvr/Mip4eRIC8RP+7ZB3/biwfAnBjvytE83va4LAAKADAujsZ7jE107L q+oiWTRNXY+ZVX9EV3mfBGiv2sQHqWtE7RrsHwCQeTyXX/7prvhV1bew0QPAfpVPX53eBT 8voD0DwlYW8TYU43j4frK1kVGuJir65sDpzTzlpgp7u0a2ti1s722RIiZnhh7ioUoxZCnL r2Vhhz/SNLVhPIxSiPAEuSLG6zIQCSmsU3bc30NOU1gRnYrBsidMjRkP7xV6bsFnG3Peha cczhwRkxOBFi5lEj80UYqXa/4YFic9EAYSkPwDitkFEjGvNQMGarAPZSbaCDkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDFIPUZtMPLTBiti/4h/a+G5zCftZz3ZbXNLaUb7brI=; b=fDAgxplKH9XKfTsl4Ezwe8bN5G9i70RG+7GTSiLNMGdMGb9DCc+oTG4FmU/VvNzb+5/zH/ nfqLX5z0bxhOMJXBDEGic9mGnmMnJ8HBlNwes/TbH3Cp3ohrwtU+tein3Ua+WQgCO33g8q 7x9dtfxjk7SKvzRIZ0aXoSeHGoxoMGRo5a4KTJYKg51/nch9SxOZt8223mLDMXXPBH4Za9 4inZI2KZnTd1OYrhfYACWeQTLwbJju1BmtDUnyGPgCAxmAYgB3zgLs3gato2LXq8QHuMvy UxhFf+z9VkOll+CDyNl9fH6leGjWrCaeO3R4ypMpC/DP7VdsmnqolqtKP2JsPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738606167; a=rsa-sha256; cv=none; b=ZMKyE7zSvjD7cW2T8u2OiDsJt3r8QY1NZtzVYoaEL8XBqh7Lh7hMJ+h44SluzyBralySFs v55RNdQ2b92eJ/5/+Z/ieYjdpl0l+ppMobN/A+3wSUwXRzG5/wUH6nBqJTF5CpdB915WVG 6DJrYrRfLuMKyWkigXxDcARjITGiOLOXeCqSvaMiGNUWgBNCBu9e7nMl6Ro0c+7kO8Fhfr 59par2mCw49lZ4awsTFsuXKj2YxahhdZdESm7BHj/PkKHp72iSi6syGpy0tfIsb96g90ri T/JFiuDVDV8K66pSyAQPk8SsfpSqScAk0nD1/FBU78W/krlK5Vn1ZmePedsmUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymvdy4JCmzms3; Mon, 03 Feb 2025 18:09:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513I9Q24085865; Mon, 3 Feb 2025 18:09:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513I9Qjp085862; Mon, 3 Feb 2025 18:09:26 GMT (envelope-from git) Date: Mon, 3 Feb 2025 18:09:26 GMT Message-Id: <202502031809.513I9Qjp085862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fe5a6266dde0 - main - protosw: this is a kernel only header, put back #ifdef _KERNEL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe5a6266dde08cece15025c75a80a45d977c57c2 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fe5a6266dde08cece15025c75a80a45d977c57c2 commit fe5a6266dde08cece15025c75a80a45d977c57c2 Author: Gleb Smirnoff AuthorDate: 2025-02-03 07:08:05 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 17:48:53 +0000 protosw: this is a kernel only header, put back #ifdef _KERNEL The uncommented #ifdef _KERNEL originates from 1997 by wollman@ (see 57bf258e3dc9e) with no clear original reason. Since these old times two abusers of the header leak were created - libprocstat(3) and netstat(1). These two already have a lot of _WANT_FOO hacks, so satisfy them with _WANT_PROTOSW. While here, cleanup and sort forward declaraions. --- lib/libprocstat/libprocstat.c | 1 + sys/sys/protosw.h | 26 ++++++++++---------------- usr.bin/netstat/inet.c | 1 + 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b808085f5eed..90e4879ca05b 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -50,6 +50,7 @@ #define _WANT_SOCKET #include #include +#define _WANT_PROTOSW #include #include #define _WANT_UNPCB diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 941d377b1549..2f74148efa1d 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -31,19 +31,7 @@ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ - -#include - -/* Forward declare these structures referenced from prototypes below. */ -struct kaiocb; -struct mbuf; -struct thread; -struct sockaddr; -struct socket; -struct sockopt; -enum shutdown_how; - -/*#ifdef _KERNEL*/ +#if defined(_KERNEL) || defined(_WANT_PROTOSW) /* * Protocol switch table. * @@ -53,10 +41,17 @@ enum shutdown_how; * In retrospect, it would be a lot nicer to use an interface * similar to the vnode VOP interface. */ +struct socket; +struct sockopt; +struct thread; +struct sockaddr; struct ifnet; +struct mbuf; struct stat; struct ucred; struct uio; +struct kaiocb; +enum shutdown_how; /* USE THESE FOR YOUR PROTOTYPES ! */ typedef int pr_ctloutput_t(struct socket *, struct sockopt *); @@ -144,7 +139,8 @@ struct protosw { pr_setsbopt_t *pr_setsbopt; /* Socket buffer ioctls */ pr_chmod_t *pr_chmod; /* fchmod(2) */ }; -/*#endif*/ +#endif /* defined(_KERNEL) || defined(_WANT_PROTOSW) */ +#ifdef _KERNEL /* * Values for pr_flags. @@ -167,7 +163,6 @@ struct protosw { #define PR_CAPATTACH 0x80 /* socket can attach in cap mode */ #define PR_SOCKBUF 0x100 /* private implementation of buffers */ -#ifdef _KERNEL struct domain *pffinddomain(int family); struct protosw *pffindproto(int family, int type, int proto); int protosw_register(struct domain *, struct protosw *); @@ -177,5 +172,4 @@ int protosw_unregister(struct protosw *); extern struct domain inetdomain; extern struct domain inet6domain; #endif - #endif diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 5a5610ccb6c0..6065a2a7644c 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -30,6 +30,7 @@ #include #include #include +#define _WANT_PROTOSW #include #include #define _WANT_SOCKET From nobody Mon Feb 3 18:10:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymvfm47DDz5mHSp; Mon, 03 Feb 2025 18:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymvfm0KfWz3TgW; Mon, 03 Feb 2025 18:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WS8QIeWSwrxoQiKNVG0y+foo/vHv42QJqg2rBrbB5Yg=; b=VdGncOqNKtox1cY+wio4MsjxpNaRJUuNwkcMOjWxjAGROPEWEyCKrYJPv2NvzU0mX9wqH0 4Flg5ysZStf+o0f+2nfL3svyCGggxsvLdS5fTAI+6rwM/J4IkpUmjJCo/J/qCMTui3X1nq etGhB77X8/SpfROT2xFu41+IHIhmqAI9aV7BZteezEujwwxck0Mjk5tID+KKXBm09sT+vc 6jNMTMHhr7xrYHWI4pAZ7+9/h5QLDVp+KU9CW/WQ/t8JImXyBYHUxNtya8wdnwdZmwNRJF ppJTYK36WfHwhNlDOR+q6GZj4m5+x9Fl0ta2QTaIRCQIqQSGCC+p2jEIcupKrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738606208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WS8QIeWSwrxoQiKNVG0y+foo/vHv42QJqg2rBrbB5Yg=; b=BVADH8El0N1/WMmye0ESl437jAclZov2AaMb8GbEwzLXvhczq5ZtDAc7d8qoEeVuwraWSA E289NScUOdnUwx16YKDCl0ZaLtzadF5zVki94hIYWCEdA9dSDLSz8F2M5MMs4lB4gjIQo8 izGrU7otLtI2wVc0M3ZXGztRFBgWaJh23qYp3pXqfjncuIqRcN92ez+6VCjPVq69jHQpRa wHzdxUKqUiWRS1euCgh27g6XqR7uHXgjea6d3oByYwFRMQtzoM/5cvk4B1Sz1vv6kLnk1O OKUOvtU5V8wGSYq4iqJlYH9yXALlLj6cgK9zIJHL28tk47RcQ7klQIm7TBbo/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738606208; a=rsa-sha256; cv=none; b=s7aAZgqu0O3x2AGSY5AGILsSr7E8r8GxEtx48cUZI8eR12GmiMgs9E/tHQabKk4V9mMh54 kQOsqT+Zom8bg4/8taUEJ4f/rb79S3MB/6jCFTrJFm9jwf+ofNFEB7VbDweaH62jsMmXSY erbR8n+GEwY5px9vmEsA7UPef3um+QPoput5wqfFx+XkN1huTFgtcSelqdOmPdVZrMx1xf ximDQ7nGr5YVPyVaf3bb9xfjOnwaAIS/PaRo4vroKRBP+FEjkAQeY7qsg9Z8DWDeMS2eN/ HW57ILP+UTFDwF5m16hU821tAGwaMNiGoO5YhSDUuuIOIzlIBvbxBVEheTPjxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymvfl72TjzncY; Mon, 03 Feb 2025 18:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513IA7Nn089425; Mon, 3 Feb 2025 18:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513IA7vR089421; Mon, 3 Feb 2025 18:10:07 GMT (envelope-from git) Date: Mon, 3 Feb 2025 18:10:07 GMT Message-Id: <202502031810.513IA7vR089421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c2aa91745e87 - main - netstat: restore printing the "default" keyword, provide -nn option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2aa91745e870d9d925cb054cc114f65180ed8c6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c2aa91745e870d9d925cb054cc114f65180ed8c6 commit c2aa91745e870d9d925cb054cc114f65180ed8c6 Author: Gleb Smirnoff AuthorDate: 2025-02-03 18:09:58 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-03 18:09:58 +0000 netstat: restore printing the "default" keyword, provide -nn option Avoid POLA breakage and preserve output standard that really predates the FreeBSD project itself. There are scripts in the wild that rely on the behavior. Provide option to specify -nn twice to have a completely numeric output of the routing tables. Fixes: 9206c79961986c2114a9a2cfccf009ac010ad259 This reverts commit e090646d6f5a4a6848ecd4bcb1f2db498ea3b3e2. Reviewed by: zlei, gallatin, melifaro, allanjude, markj, emaste Differential Revision: https://reviews.freebsd.org/D48729 --- tests/sys/netinet/fibs_test.sh | 10 +++++----- tests/sys/netinet6/ndp.sh | 6 +++--- usr.bin/netstat/main.c | 7 ++++--- usr.bin/netstat/netstat.1 | 8 +++++++- usr.bin/netstat/netstat.h | 4 ++-- usr.bin/netstat/route.c | 4 ++-- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh index a57d999496fc..b58a45b26f3e 100644 --- a/tests/sys/netinet/fibs_test.sh +++ b/tests/sys/netinet/fibs_test.sh @@ -240,9 +240,9 @@ default_route_with_multiple_fibs_on_same_subnet_body() # Verify that the default route exists for both fibs, with their # respective interfaces. - atf_check -o match:"^0\.0\.0\.0.*${TAP0}$" \ + atf_check -o match:"^default.*${TAP0}$" \ setfib ${FIB0} netstat -rn -f inet - atf_check -o match:"^0\.0\.0\.0.*${TAP1}$" \ + atf_check -o match:"^default.*${TAP1}$" \ setfib ${FIB1} netstat -rn -f inet } @@ -286,9 +286,9 @@ default_route_with_multiple_fibs_on_same_subnet_inet6_body() # Verify that the default route exists for both fibs, with their # respective interfaces. - atf_check -o match:"^::/0.*${TAP0}$" \ + atf_check -o match:"^default.*${TAP0}$" \ setfib ${FIB0} netstat -rn -f inet6 - atf_check -o match:"^::/0.*${TAP1}$" \ + atf_check -o match:"^default.*${TAP1}$" \ setfib ${FIB1} netstat -rn -f inet6 } @@ -479,7 +479,7 @@ slaac_on_nondefault_fib6_body() atf_check -o match:"${SUBNET}:/${MASK}.*\.*$EPAIRB" \ netstat -rnf inet6 -F $FIB1 # Check default route - atf_check -o match:"^::/0.*\.*$EPAIRB" \ + atf_check -o match:"default.*\.*$EPAIRB" \ netstat -rnf inet6 -F $FIB1 # Check that none of the above routes appeared on other routes diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index 24c0853d7361..038a640f331e 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -163,12 +163,12 @@ ndp_slaac_default_route_body() { while [ -z "$(jexec ${jname} ndp -r)" ]; do sleep 0.1 done - atf_check -o match:"^::/0[[:space:]]+fe80:" \ + atf_check -o match:"^default[[:space:]]+fe80:" \ jexec ${jname} netstat -rn -6 # Get rid of the default route. jexec ${jname} route -6 flush - atf_check -o not-match:"^::/0[[:space:]]+fe80:" \ + atf_check -o not-match:"^default[[:space:]]+fe80:" \ jexec ${jname} netstat -rn -6 # Send another RA, make sure that the default route is installed again. @@ -180,7 +180,7 @@ ndp_slaac_default_route_body() { while [ -z "$(jexec ${jname} ndp -r)" ]; do sleep 0.1 done - atf_check -o match:"^::/0[[:space:]]+fe80:" \ + atf_check -o match:"^default[[:space:]]+fe80:" \ jexec ${jname} netstat -rn -6 } diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 97509ea6798b..371216f4be59 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -207,8 +207,8 @@ int iflag; /* show interfaces */ int Lflag; /* show size of listen queues */ int mflag; /* show memory stats */ int noutputs = 0; /* how much outputs before we exit */ -int numeric_addr; /* show addresses numerically */ -int numeric_port; /* show ports numerically */ +u_int numeric_addr = 0; /* show addresses numerically */ +bool numeric_port; /* show ports numerically */ int Oflag; /* show nhgrp objects*/ int oflag; /* show nexthop objects*/ int Pflag; /* show TCP log ID */ @@ -361,7 +361,8 @@ main(int argc, char *argv[]) nlistf = optarg; break; case 'n': - numeric_addr = numeric_port = 1; + numeric_addr++; + numeric_port = true; break; case 'o': oflag = 1; diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index a5bbfc2f1b35..559cb1932080 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 29, 2024 +.Dd January 29, 2025 .Dt NETSTAT 1 .Os .Sh NAME @@ -872,6 +872,12 @@ Normally .Nm attempts to resolve addresses and ports, and display them symbolically. +Specifying +.Fl n +twice will also disable printing the keyword +.Qq Dv default +for the default IPv4 and IPv6 routes when displaying contents of routing +tables. .It Fl W Wider output; expand address fields, etc, to avoid truncation. Non-numeric values such as domain names may still be truncated; use the diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 7ebfc5180f44..7e37b9e5e820 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -49,8 +49,8 @@ extern int iflag; /* show interfaces */ extern int Lflag; /* show size of listen queues */ extern int mflag; /* show memory stats */ extern int noutputs; /* how much outputs before we exit */ -extern int numeric_addr; /* show addresses numerically */ -extern int numeric_port; /* show ports numerically */ +extern u_int numeric_addr; /* show addresses numerically */ +extern bool numeric_port; /* show ports numerically */ extern int Pflag; /* show TCP log ID */ extern int rflag; /* show routing tables (or routing stats) */ extern int Rflag; /* show flowid / RSS information */ diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index c54b1e61aa11..697c7ba2e9e1 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -578,7 +578,7 @@ netname4(in_addr_t in, in_addr_t mask) struct netent *np = 0; in_addr_t i; - if (!numeric_addr && in == INADDR_ANY && mask == 0) { + if (numeric_addr < 2 && in == INADDR_ANY && mask == 0) { strlcpy(line, "default", sizeof(line)); return (line); } @@ -673,7 +673,7 @@ netname6(struct sockaddr_in6 *sa6, struct sockaddr_in6 *mask) else masklen = 128; - if (!numeric_addr && masklen == 0 && + if (numeric_addr < 2 && masklen == 0 && IN6_IS_ADDR_UNSPECIFIED(&sa6->sin6_addr)) return("default"); From nobody Mon Feb 3 19:29:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YmxQc4b1Yz5mTKZ; Mon, 03 Feb 2025 19:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmxQc0wTTz3tGl; Mon, 03 Feb 2025 19:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738610984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSlaxQ3I5GTHES0mzdUedAVSy1Xdu83iATHkoPgg0c=; b=AwmiFkQZaxp3sV4cUeHEhsv9DRg7jOaIefr2zSWvX5QdSvbIireVbkB/xv54zuHN0lTIS8 1iu9l81xiUr3GGpWLS4FnxW3Qa3ckG2n/qX5Bw0kzk1olZ8KtXx4s7wCtde0WqnSycnRP6 dc1FgAa5r8clTKozqZ0BWox2HyZg3ha44j3DJDEaBjz+xg04qfAkxWOgU8h7KUOCutOw03 skYGuFLa/ZH1om8K+7w0+AKXnqvTnhjlPxDx809OiUC59V5Ai9F8xgQZNo7Q6OWxxqo132 iPjDgZlJIcgSCpfuIN8iPesKrQW9ANw2kE48TWlUIH1cxWbuf/+PL4Sz6cB3Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738610984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSlaxQ3I5GTHES0mzdUedAVSy1Xdu83iATHkoPgg0c=; b=wMXUhIm35PlQSEBw0bxyCFzayNzvG26YS7usRxFNsNzJG40hs2uP+IwD/e6DybQcC/99w2 j1wQb5VdisoMEqJmaDqoWpoFKim77YoDCA9GBUX+wgXvB7tgaljNANcB6F30w4OlS8/PQr 9d/hBY3eWRONgi96o88Nnh/oZ5VQZG/jWe0JxTHvScq7HhsqcEntJxqPyNJBVdGR9bizul J6xgk3+MzLjrsnQxnkyws5YnM2dVMNoKACt/WXI2zA625KyRN7heoDji50W/8CyaDuIBQi cxAe+wiDvWrCx/dAazulWsrSpgh1ypKaRc5maVore2doSkLn7pioFvpqS6Lxlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738610984; a=rsa-sha256; cv=none; b=CRFhjJHBcIOM4Zzuf4oJ7yuCM93yAtCtrXKpX35LetfrKSH/eaTOkFCEh+OO9LuTC5grjj xt+ro6IYXXI5geu9znit5xhfiLsrhlKAJLZ9LXQsCp6OquBWB5mYJ9gNvKdFqNGRCFv42x SAHF8gVgTSFstJBM7mGE3dwdjUSseZEen2kbYHBatCNqEgvBxztmFKMEZlxCDxjpl4xX6P zujf67UD+ujLJIAGza+MTRb8ixJqR6nxq5fUIdzz8qJ+4KVxLmM86HSPyEo5xbq6oKrtkK PbXPSLGwQzevv7PMCLnwYyT73hRHB1Hn4uK8eO0lB1cBqOSuBn6JUy5OVVsmgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YmxQc09CQzqb2; Mon, 03 Feb 2025 19:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513JTh6n036314; Mon, 3 Feb 2025 19:29:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513JThFp036311; Mon, 3 Feb 2025 19:29:43 GMT (envelope-from git) Date: Mon, 3 Feb 2025 19:29:43 GMT Message-Id: <202502031929.513JThFp036311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jesper Schmitz Mouridsen Subject: git: c14b01624261 - main - mt7601U: Importing if_mtw from OpenBSD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jsm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c14b016242613da79516e83fc6faef35d827cc18 Auto-Submitted: auto-generated The branch main has been updated by jsm: URL: https://cgit.FreeBSD.org/src/commit/?id=c14b016242613da79516e83fc6faef35d827cc18 commit c14b016242613da79516e83fc6faef35d827cc18 Author: Jesper Schmitz Mouridsen AuthorDate: 2025-02-03 19:20:52 +0000 Commit: Jesper Schmitz Mouridsen CommitDate: 2025-02-03 19:20:52 +0000 mt7601U: Importing if_mtw from OpenBSD Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c from OpenBSD. PR: 247545 Approved by: adrian, wireless Differential Revision: https://reviews.freebsd.org/D45179 --- sbin/devd/devd.conf | 2 +- share/man/man4/Makefile | 1 + share/man/man4/mtw.4 | 74 + sys/dev/usb/usbdevs | 3 +- sys/dev/usb/wlan/if_mtw.c | 4675 ++++++++++++++++++++++++++++++++++++++++++ sys/dev/usb/wlan/if_mtwreg.h | 1439 +++++++++++++ sys/dev/usb/wlan/if_mtwvar.h | 387 ++++ sys/modules/usb/Makefile | 2 +- sys/modules/usb/mtw/Makefile | 9 + 9 files changed, 6589 insertions(+), 3 deletions(-) diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf index 08cbeb840b2f..86faf2f30722 100644 --- a/sbin/devd/devd.conf +++ b/sbin/devd/devd.conf @@ -18,7 +18,7 @@ options { # Setup some shorthand for regex that we use later in the file. #XXX Yes, this is gross -- imp set wifi-driver-regex - "(ath|ath[0-9]+k|bwi|bwn|ipw|iwlwifi|iwi|iwm|iwn|malo|mwl|mt79|otus|\ + "(ath|ath[0-9]+k|bwi|bwn|ipw|iwlwifi|iwi|iwm|iwn|malo|mwl|mt79|mtw|otus|\ ral|rsu|rtw|rtwn|rum|run|uath|upgt|ural|urtw|wpi|wtap|zyd)[0-9]+"; }; diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9dc1c7f9bc12..600b4dfd9504 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -338,6 +338,7 @@ MAN= aac.4 \ msdosfs.4 \ msk.4 \ mtio.4 \ + mtw.4 \ multicast.4 \ muge.4 \ mvs.4 \ diff --git a/share/man/man4/mtw.4 b/share/man/man4/mtw.4 new file mode 100644 index 000000000000..17722be73203 --- /dev/null +++ b/share/man/man4/mtw.4 @@ -0,0 +1,74 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Jesper Schmitz Mouridsen +.\" +.\" 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. +.\" +.Dd Feb 03, 2025 +.Dt MTW 4 +.Os +.Sh NAME +.Nm if_mtw +.Nd "Mediatek MT7601U" +.Ed +.Sh DESCRIPTION +This module provides support for Mediatek MT7601U with the firmware from net/wifi-firmware-mtw-kmod + +.Sh HARDWARE +The +.Nm +driver supports Mediatek MT7601U +based USB wireless network adapters including (but not all of them tested): +.Pp +.Bl -column -compact +.It +ASUS USB-N10 v2 +.It +D-Link DWA-127 rev B1 +.It +Edimax EW-7711UAn v2 +.It +Foxconn WFU03 +.It +Tenda U2 +.It +Tenda W311MI v2 +.It +TP-LINK TL-WN727N v4 (tested working) +.It +Yealink WF40 +.El +.Sh SEE ALSO +.Xr usb 4 +.Sh BUGS +The +.Nm +only works in station mode and monitor mode. The firmware does not always reinitialize when reloading the module, or when rebooting, without first unplugging the device. +.Sh History +The mtw driver first appeared in OpenBSD 7.1. The mtw driver was ported to FreeBSD in FreeBSD 15.0. +.Sh AUTHORS +.An -nosplit +The mtw driver was written by +.An James Hastings Aq Mt hastings@openbsd.org +ported to FreeBSD by +.An Jesper Schmitz Mouridsen Aq Mt jsm@FreeBSD.org diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 61f563ca1aa6..0dc99526d991 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1906,6 +1906,7 @@ product EDIMAX EW7318USG 0x7318 USB Wireless dongle product EDIMAX RTL8192SU_1 0x7611 RTL8192SU product EDIMAX RTL8192SU_2 0x7612 RTL8192SU product EDIMAX EW7622UMN 0x7622 EW-7622UMn +product EDIMAX MT7601U 0x7710 MT7601U product EDIMAX RT2870_1 0x7711 RT2870 product EDIMAX EW7717 0x7717 EW-7717 product EDIMAX EW7718 0x7718 EW-7718 @@ -4101,7 +4102,7 @@ product RALINK RT3573 0x3573 RT3573 product RALINK RT5370 0x5370 RT5370 product RALINK RT5372 0x5372 RT5372 product RALINK RT5572 0x5572 RT5572 -product RALINK RT7601 0x7601 RT7601 +product RALINK MT7601U 0x7601 MT7601 Mediatek Wireless Adpater product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c new file mode 100644 index 000000000000..ecd4693e2361 --- /dev/null +++ b/sys/dev/usb/wlan/if_mtw.c @@ -0,0 +1,4675 @@ +/*- + * Copyright (c) 2008-2010 Damien Bergamini + * Copyright (c) 2013-2014 Kevin Lo + * Copyright (c) 2021 James Hastings + * Ported to FreeBSD by Jesper Schmitz Mouridsen jsm@FreeBSD.org + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * MediaTek MT7601U 802.11b/g/n WLAN. + */ + +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "usbdevs.h" + +#define USB_DEBUG_VAR mtw_debug +#include +#include + +#include "if_mtwreg.h" +#include "if_mtwvar.h" + +#define MTW_DEBUG + +#ifdef MTW_DEBUG +int mtw_debug; +static SYSCTL_NODE(_hw_usb, OID_AUTO, mtw, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB mtw"); +SYSCTL_INT(_hw_usb_mtw, OID_AUTO, debug, CTLFLAG_RWTUN, &mtw_debug, 0, + "mtw debug level"); + +enum { + MTW_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ + MTW_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ + MTW_DEBUG_RECV = 0x00000004, /* basic recv operation */ + MTW_DEBUG_RECV_DESC = 0x00000008, /* recv descriptors */ + MTW_DEBUG_STATE = 0x00000010, /* 802.11 state transitions */ + MTW_DEBUG_RATE = 0x00000020, /* rate adaptation */ + MTW_DEBUG_USB = 0x00000040, /* usb requests */ + MTW_DEBUG_FIRMWARE = 0x00000080, /* firmware(9) loading debug */ + MTW_DEBUG_BEACON = 0x00000100, /* beacon handling */ + MTW_DEBUG_INTR = 0x00000200, /* ISR */ + MTW_DEBUG_TEMP = 0x00000400, /* temperature calibration */ + MTW_DEBUG_ROM = 0x00000800, /* various ROM info */ + MTW_DEBUG_KEY = 0x00001000, /* crypto keys management */ + MTW_DEBUG_TXPWR = 0x00002000, /* dump Tx power values */ + MTW_DEBUG_RSSI = 0x00004000, /* dump RSSI lookups */ + MTW_DEBUG_RESET = 0x00008000, /* initialization progress */ + MTW_DEBUG_CALIB = 0x00010000, /* calibration progress */ + MTW_DEBUG_CMD = 0x00020000, /* command queue */ + MTW_DEBUG_ANY = 0xffffffff +}; + +#define MTW_DPRINTF(_sc, _m, ...) \ + do { \ + if (mtw_debug & (_m)) \ + device_printf((_sc)->sc_dev, __VA_ARGS__); \ + } while (0) + +#else +#define MTW_DPRINTF(_sc, _m, ...) \ + do { \ + (void)_sc; \ + } while (0) +#endif + +#define IEEE80211_HAS_ADDR4(wh) IEEE80211_IS_DSTODS(wh) + +/* NB: "11" is the maximum number of padding bytes needed for Tx */ +#define MTW_MAX_TXSZ \ + (sizeof(struct mtw_txd) + sizeof(struct mtw_txwi) + MCLBYTES + 11) + +/* + * Because of LOR in mtw_key_delete(), use atomic instead. + * '& MTW_CMDQ_MASQ' is to loop cmdq[]. + */ +#define MTW_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & MTW_CMDQ_MASQ) + +static const STRUCT_USB_HOST_ID mtw_devs[] = { +#define MTW_DEV(v, p) \ + { \ + USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) \ + } + MTW_DEV(EDIMAX, MT7601U), + MTW_DEV(RALINK, MT7601U), + MTW_DEV(XIAOMI, MT7601U) +}; +#undef MTW_DEV + +static device_probe_t mtw_match; +static device_attach_t mtw_attach; +static device_detach_t mtw_detach; + +static usb_callback_t mtw_bulk_rx_callback; +static usb_callback_t mtw_bulk_tx_callback0; +static usb_callback_t mtw_bulk_tx_callback1; +static usb_callback_t mtw_bulk_tx_callback2; +static usb_callback_t mtw_bulk_tx_callback3; +static usb_callback_t mtw_bulk_tx_callback4; +static usb_callback_t mtw_bulk_tx_callback5; +static usb_callback_t mtw_fw_callback; + +static void mtw_autoinst(void *, struct usb_device *, struct usb_attach_arg *); +static int mtw_driver_loaded(struct module *, int, void *); +static void mtw_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, + u_int index); +static struct ieee80211vap *mtw_vap_create(struct ieee80211com *, + const char[IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t[IEEE80211_ADDR_LEN], const uint8_t[IEEE80211_ADDR_LEN]); +static void mtw_vap_delete(struct ieee80211vap *); +static void mtw_cmdq_cb(void *, int); +static void mtw_setup_tx_list(struct mtw_softc *, struct mtw_endpoint_queue *); +static void mtw_unsetup_tx_list(struct mtw_softc *, + struct mtw_endpoint_queue *); +static void mtw_load_microcode(void *arg); + +static usb_error_t mtw_do_request(struct mtw_softc *, + struct usb_device_request *, void *); +static int mtw_read(struct mtw_softc *, uint16_t, uint32_t *); +static int mtw_read_region_1(struct mtw_softc *, uint16_t, uint8_t *, int); +static int mtw_write_2(struct mtw_softc *, uint16_t, uint16_t); +static int mtw_write(struct mtw_softc *, uint16_t, uint32_t); +static int mtw_write_region_1(struct mtw_softc *, uint16_t, uint8_t *, int); +static int mtw_set_region_4(struct mtw_softc *, uint16_t, uint32_t, int); +static int mtw_efuse_read_2(struct mtw_softc *, uint16_t, uint16_t *); +static int mtw_bbp_read(struct mtw_softc *, uint8_t, uint8_t *); +static int mtw_bbp_write(struct mtw_softc *, uint8_t, uint8_t); +static int mtw_mcu_cmd(struct mtw_softc *sc, uint8_t cmd, void *buf, int len); +static void mtw_get_txpower(struct mtw_softc *); +static int mtw_read_eeprom(struct mtw_softc *); +static struct ieee80211_node *mtw_node_alloc(struct ieee80211vap *, + const uint8_t mac[IEEE80211_ADDR_LEN]); +static int mtw_media_change(if_t); +static int mtw_newstate(struct ieee80211vap *, enum ieee80211_state, int); +static int mtw_wme_update(struct ieee80211com *); +static void mtw_key_set_cb(void *); +static int mtw_key_set(struct ieee80211vap *, struct ieee80211_key *); +static void mtw_key_delete_cb(void *); +static int mtw_key_delete(struct ieee80211vap *, struct ieee80211_key *); +static void mtw_ratectl_to(void *); +static void mtw_ratectl_cb(void *, int); +static void mtw_drain_fifo(void *); +static void mtw_iter_func(void *, struct ieee80211_node *); +static void mtw_newassoc_cb(void *); +static void mtw_newassoc(struct ieee80211_node *, int); +static int mtw_mcu_radio(struct mtw_softc *sc, int func, uint32_t val); +static void mtw_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, + const struct ieee80211_rx_stats *, int, int); +static void mtw_rx_frame(struct mtw_softc *, struct mbuf *, uint32_t); +static void mtw_tx_free(struct mtw_endpoint_queue *pq, struct mtw_tx_data *, + int); +static void mtw_set_tx_desc(struct mtw_softc *, struct mtw_tx_data *); +static int mtw_tx(struct mtw_softc *, struct mbuf *, struct ieee80211_node *); +static int mtw_tx_mgt(struct mtw_softc *, struct mbuf *, + struct ieee80211_node *); +static int mtw_sendprot(struct mtw_softc *, const struct mbuf *, + struct ieee80211_node *, int, int); +static int mtw_tx_param(struct mtw_softc *, struct mbuf *, + struct ieee80211_node *, const struct ieee80211_bpf_params *); +static int mtw_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static int mtw_transmit(struct ieee80211com *, struct mbuf *); +static void mtw_start(struct mtw_softc *); +static void mtw_parent(struct ieee80211com *); +static void mtw_select_chan_group(struct mtw_softc *, int); + +static int mtw_set_chan(struct mtw_softc *, struct ieee80211_channel *); +static void mtw_set_channel(struct ieee80211com *); +static void mtw_getradiocaps(struct ieee80211com *, int, int *, + struct ieee80211_channel[]); +static void mtw_scan_start(struct ieee80211com *); +static void mtw_scan_end(struct ieee80211com *); +static void mtw_update_beacon(struct ieee80211vap *, int); +static void mtw_update_beacon_cb(void *); +static void mtw_updateprot(struct ieee80211com *); +static void mtw_updateprot_cb(void *); +static void mtw_usb_timeout_cb(void *); +static int mtw_reset(struct mtw_softc *sc); +static void mtw_enable_tsf_sync(struct mtw_softc *); + + +static void mtw_enable_mrr(struct mtw_softc *); +static void mtw_set_txpreamble(struct mtw_softc *); +static void mtw_set_basicrates(struct mtw_softc *); +static void mtw_set_leds(struct mtw_softc *, uint16_t); +static void mtw_set_bssid(struct mtw_softc *, const uint8_t *); +static void mtw_set_macaddr(struct mtw_softc *, const uint8_t *); +static void mtw_updateslot(struct ieee80211com *); +static void mtw_updateslot_cb(void *); +static void mtw_update_mcast(struct ieee80211com *); +static int8_t mtw_rssi2dbm(struct mtw_softc *, uint8_t, uint8_t); +static void mtw_update_promisc_locked(struct mtw_softc *); +static void mtw_update_promisc(struct ieee80211com *); +static int mtw_txrx_enable(struct mtw_softc *); +static void mtw_init_locked(struct mtw_softc *); +static void mtw_stop(void *); +static void mtw_delay(struct mtw_softc *, u_int); +static void mtw_update_chw(struct ieee80211com *ic); +static int mtw_ampdu_enable(struct ieee80211_node *ni, + struct ieee80211_tx_ampdu *tap); + +static eventhandler_tag mtw_etag; + +static const struct { + uint8_t reg; + uint8_t val; +} mt7601_rf_bank0[] = { MT7601_BANK0_RF }, + mt7601_rf_bank4[] = { MT7601_BANK4_RF }, + mt7601_rf_bank5[] = { MT7601_BANK5_RF }; +static const struct { + uint32_t reg; + uint32_t val; +} mt7601_def_mac[] = { MT7601_DEF_MAC }; +static const struct { + uint8_t reg; + uint8_t val; +} mt7601_def_bbp[] = { MT7601_DEF_BBP }; + + +static const struct { + u_int chan; + uint8_t r17, r18, r19, r20; +} mt7601_rf_chan[] = { MT7601_RF_CHAN }; + + +static const struct usb_config mtw_config[MTW_N_XFER] = { + [MTW_BULK_RX] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = MTW_MAX_RXSZ, + .flags = {.pipe_bof = 1, + .short_xfer_ok = 1,}, + .callback = mtw_bulk_rx_callback, + }, + [MTW_BULK_TX_BE] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 0,}, + .callback = mtw_bulk_tx_callback0, + .timeout = 5000, /* ms */ + }, + [MTW_BULK_TX_BK] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1,}, + .callback = mtw_bulk_tx_callback1, + .timeout = 5000, /* ms */ + }, + [MTW_BULK_TX_VI] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1,}, + .callback = mtw_bulk_tx_callback2, + .timeout = 5000, /* ms */ + }, + [MTW_BULK_TX_VO] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1,}, + .callback = mtw_bulk_tx_callback3, + .timeout = 5000, /* ms */ + }, + [MTW_BULK_TX_HCCA] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1, .no_pipe_ok = 1,}, + .callback = mtw_bulk_tx_callback4, + .timeout = 5000, /* ms */ + }, + [MTW_BULK_TX_PRIO] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1, .no_pipe_ok = 1,}, + .callback = mtw_bulk_tx_callback5, + .timeout = 5000, /* ms */ + }, + + [MTW_BULK_FW_CMD] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = 0x2c44, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1, .no_pipe_ok = 1,}, + .callback = mtw_fw_callback, + + }, + + [MTW_BULK_RAW_TX] = { + .type = UE_BULK, + .ep_index = 0, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MTW_MAX_TXSZ, + .flags = {.pipe_bof = 1, + .force_short_xfer = 1, .no_pipe_ok = 1,}, + .callback = mtw_bulk_tx_callback0, + .timeout = 5000, /* ms */ + }, + +}; +static uint8_t mtw_wme_ac_xfer_map[4] = { + [WME_AC_BE] = MTW_BULK_TX_BE, + [WME_AC_BK] = MTW_BULK_TX_BK, + [WME_AC_VI] = MTW_BULK_TX_VI, + [WME_AC_VO] = MTW_BULK_TX_VO, +}; +static void +mtw_autoinst(void *arg, struct usb_device *udev, struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa->dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface->idesc; + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(mtw_devs, sizeof(mtw_devs), uaa)) + return; + + if (usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT) == 0) + uaa->dev_state = UAA_DEV_EJECTING; +} + +static int +mtw_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + mtw_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + mtw_autoinst, NULL, EVENTHANDLER_PRI_ANY); + break; + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, mtw_etag); + break; + default: + return (EOPNOTSUPP); + } + return (0); +} + +static const char * +mtw_get_rf(int rev) +{ + switch (rev) { + case MT7601_RF_7601: + return ("MT7601"); + case MT7610_RF_7610: + return ("MT7610"); + case MT7612_RF_7612: + return ("MT7612"); + } + return ("unknown"); +} +static int +mtw_wlan_enable(struct mtw_softc *sc, int enable) +{ + uint32_t tmp; + int error = 0; + + if (enable) { + mtw_read(sc, MTW_WLAN_CTRL, &tmp); + if (sc->asic_ver == 0x7612) + tmp &= ~0xfffff000; + + tmp &= ~MTW_WLAN_CLK_EN; + tmp |= MTW_WLAN_EN; + mtw_write(sc, MTW_WLAN_CTRL, tmp); + mtw_delay(sc, 2); + + tmp |= MTW_WLAN_CLK_EN; + if (sc->asic_ver == 0x7612) { + tmp |= (MTW_WLAN_RESET | MTW_WLAN_RESET_RF); + } + mtw_write(sc, MTW_WLAN_CTRL, tmp); + mtw_delay(sc, 2); + + mtw_read(sc, MTW_OSC_CTRL, &tmp); + tmp |= MTW_OSC_EN; + mtw_write(sc, MTW_OSC_CTRL, tmp); + tmp |= MTW_OSC_CAL_REQ; + mtw_write(sc, MTW_OSC_CTRL, tmp); + } else { + mtw_read(sc, MTW_WLAN_CTRL, &tmp); + tmp &= ~(MTW_WLAN_CLK_EN | MTW_WLAN_EN); + mtw_write(sc, MTW_WLAN_CTRL, tmp); + + mtw_read(sc, MTW_OSC_CTRL, &tmp); + tmp &= ~MTW_OSC_EN; + mtw_write(sc, MTW_OSC_CTRL, tmp); + } + return (error); +} + +static int +mtw_read_cfg(struct mtw_softc *sc, uint16_t reg, uint32_t *val) +{ + usb_device_request_t req; + uint32_t tmp; + uint16_t actlen; + int error; + + req.bmRequestType = UT_READ_VENDOR_DEVICE; + req.bRequest = MTW_READ_CFG; + USETW(req.wValue, 0); + USETW(req.wIndex, reg); + USETW(req.wLength, 4); + error = usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, &tmp, 0, + &actlen, 1000); + + if (error == 0) + *val = le32toh(tmp); + else + *val = 0xffffffff; + return (error); +} + +static int +mtw_match(device_t self) +{ + struct usb_attach_arg *uaa = device_get_ivars(self); + + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != 0) + return (ENXIO); + if (uaa->info.bIfaceIndex != 0) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(mtw_devs, sizeof(mtw_devs), uaa)); +} + +static int +mtw_attach(device_t self) +{ + struct mtw_softc *sc = device_get_softc(self); + struct usb_attach_arg *uaa = device_get_ivars(self); + struct ieee80211com *ic = &sc->sc_ic; + uint32_t ver; + int i, ret; + // uint32_t tmp; + uint8_t iface_index; + int ntries, error; + + device_set_usb_desc(self); + sc->sc_udev = uaa->device; + sc->sc_dev = self; + sc->sc_sent = 0; + + mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), + MTX_NETWORK_LOCK, MTX_DEF); + + iface_index = 0; + + error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, + mtw_config, MTW_N_XFER, sc, &sc->sc_mtx); + if (error) { + device_printf(sc->sc_dev, + "could not allocate USB transfers, " + "err=%s\n", + usbd_errstr(error)); + goto detach; + } + for (i = 0; i < 4; i++) { + sc->txd_fw[i] = (struct mtw_txd_fw *) + malloc(sizeof(struct mtw_txd_fw), + M_USBDEV, M_NOWAIT | M_ZERO); + } + MTW_LOCK(sc); + sc->sc_idx = 0; + mbufq_init(&sc->sc_snd, ifqmaxlen); + + /*enable WLAN core */ + if ((error = mtw_wlan_enable(sc, 1)) != 0) { + device_printf(sc->sc_dev, "could not enable WLAN core\n"); + return (ENXIO); + } + + /* wait for the chip to settle */ + DELAY(100); + for (ntries = 0; ntries < 100; ntries++) { + if (mtw_read(sc, MTW_ASIC_VER, &ver) != 0) { + goto detach; + } + if (ver != 0 && ver != 0xffffffff) + break; + DELAY(10); + } + if (ntries == 100) { + device_printf(sc->sc_dev, + "timeout waiting for NIC to initialize\n"); + goto detach; + } + sc->asic_ver = ver >> 16; + sc->asic_rev = ver & 0xffff; + DELAY(100); + if (sc->asic_ver != 0x7601) { + device_printf(sc->sc_dev, + "Your revision 0x04%x is not supported yet\n", + sc->asic_rev); + goto detach; + } + + mtw_load_microcode(sc); + ret = msleep(&sc->fwloading, &sc->sc_mtx, 0, "fwload", 3 * hz); + if (ret == EWOULDBLOCK || sc->fwloading != 1) { + device_printf(sc->sc_dev, + "timeout waiting for MCU to initialize\n"); + goto detach; + } + + sc->sc_srom_read = mtw_efuse_read_2; + /* retrieve RF rev. no and various other things from EEPROM */ + mtw_read_eeprom(sc); + + device_printf(sc->sc_dev, + "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n", + sc->asic_ver, sc->mac_rev, mtw_get_rf(sc->rf_rev), sc->ntxchains, + sc->nrxchains, ether_sprintf(ic->ic_macaddr)); + DELAY(100); + + //mtw_set_leds(sc,5); + // mtw_mcu_radio(sc,0x31,0); + MTW_UNLOCK(sc); + + + ic->ic_softc = sc; + ic->ic_name = device_get_nameunit(self); + ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ + ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */ + + ic->ic_caps = IEEE80211_C_STA | /* station mode supported */ + IEEE80211_C_MONITOR | /* monitor mode supported */ + IEEE80211_C_IBSS | + IEEE80211_C_HOSTAP | + IEEE80211_C_WDS | /* 4-address traffic works */ + IEEE80211_C_MBSS | + IEEE80211_C_SHPREAMBLE | /* short preamble supported */ + IEEE80211_C_SHSLOT | /* short slot time supported */ + IEEE80211_C_WME | /* WME */ + IEEE80211_C_WPA; /* WPA1|WPA2(RSN) */ + device_printf(sc->sc_dev, "[HT] Enabling 802.11n\n"); + ic->ic_htcaps = IEEE80211_HTC_HT + | IEEE80211_HTC_AMPDU + | IEEE80211_HTC_AMSDU + | IEEE80211_HTCAP_MAXAMSDU_3839 + | IEEE80211_HTCAP_SMPS_OFF; + + ic->ic_rxstream = sc->nrxchains; + ic->ic_txstream = sc->ntxchains; + + ic->ic_cryptocaps = IEEE80211_CRYPTO_WEP | IEEE80211_CRYPTO_AES_CCM | + IEEE80211_CRYPTO_AES_OCB | IEEE80211_CRYPTO_TKIP | + IEEE80211_CRYPTO_TKIPMIC; + + ic->ic_flags |= IEEE80211_F_DATAPAD; + ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; + + mtw_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, + ic->ic_channels); + + ieee80211_ifattach(ic); + + ic->ic_scan_start = mtw_scan_start; + ic->ic_scan_end = mtw_scan_end; + ic->ic_set_channel = mtw_set_channel; + ic->ic_getradiocaps = mtw_getradiocaps; + ic->ic_node_alloc = mtw_node_alloc; + ic->ic_newassoc = mtw_newassoc; + ic->ic_update_mcast = mtw_update_mcast; + ic->ic_updateslot = mtw_updateslot; + ic->ic_wme.wme_update = mtw_wme_update; + ic->ic_raw_xmit = mtw_raw_xmit; + ic->ic_update_promisc = mtw_update_promisc; + ic->ic_vap_create = mtw_vap_create; + ic->ic_vap_delete = mtw_vap_delete; + ic->ic_transmit = mtw_transmit; + ic->ic_parent = mtw_parent; + + ic->ic_update_chw = mtw_update_chw; + ic->ic_ampdu_enable = mtw_ampdu_enable; + + ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, + sizeof(sc->sc_txtap), MTW_TX_RADIOTAP_PRESENT, + &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), + MTW_RX_RADIOTAP_PRESENT); + TASK_INIT(&sc->cmdq_task, 0, mtw_cmdq_cb, sc); + TASK_INIT(&sc->ratectl_task, 0, mtw_ratectl_cb, sc); + usb_callout_init_mtx(&sc->ratectl_ch, &sc->sc_mtx, 0); + + if (bootverbose) + ieee80211_announce(ic); + + return (0); + +detach: + MTW_UNLOCK(sc); + mtw_detach(self); + return (ENXIO); +} + +static void +mtw_drain_mbufq(struct mtw_softc *sc) +{ + struct mbuf *m; + struct ieee80211_node *ni; + + MTW_LOCK_ASSERT(sc, MA_OWNED); + while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) { + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + m->m_pkthdr.rcvif = NULL; + ieee80211_free_node(ni); + m_freem(m); + } +} + +static int +mtw_detach(device_t self) +{ + struct mtw_softc *sc = device_get_softc(self); + struct ieee80211com *ic = &sc->sc_ic; + int i; + MTW_LOCK(sc); + mtw_reset(sc); + DELAY(10000); + sc->sc_detached = 1; + MTW_UNLOCK(sc); + + + /* stop all USB transfers */ + for (i = 0; i < MTW_N_XFER; i++) + usbd_transfer_drain(sc->sc_xfer[i]); + + MTW_LOCK(sc); + sc->ratectl_run = MTW_RATECTL_OFF; + sc->cmdq_run = sc->cmdq_key_set = MTW_CMDQ_ABORT; + + /* free TX list, if any */ + if (ic->ic_nrunning > 0) + for (i = 0; i < MTW_EP_QUEUES; i++) + mtw_unsetup_tx_list(sc, &sc->sc_epq[i]); + + /* Free TX queue */ + mtw_drain_mbufq(sc); + MTW_UNLOCK(sc); + if (sc->sc_ic.ic_softc == sc) { + /* drain tasks */ + usb_callout_drain(&sc->ratectl_ch); + ieee80211_draintask(ic, &sc->cmdq_task); + ieee80211_draintask(ic, &sc->ratectl_task); + ieee80211_ifdetach(ic); + } + for (i = 0; i < 4; i++) { + free(sc->txd_fw[i], M_USBDEV); + } + firmware_unregister("/mediatek/mt7601u"); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +static struct ieee80211vap * +mtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + struct mtw_softc *sc = ic->ic_softc; + struct mtw_vap *rvp; + struct ieee80211vap *vap; + int i; + + if (sc->rvp_cnt >= MTW_VAP_MAX) { + device_printf(sc->sc_dev, "number of VAPs maxed out\n"); + return (NULL); + } + + switch (opmode) { + case IEEE80211_M_STA: + /* enable s/w bmiss handling for sta mode */ + flags |= IEEE80211_CLONE_NOBEACONS; + /* fall though */ + case IEEE80211_M_IBSS: + case IEEE80211_M_MONITOR: + case IEEE80211_M_HOSTAP: + case IEEE80211_M_MBSS: + /* other than WDS vaps, only one at a time */ + if (!TAILQ_EMPTY(&ic->ic_vaps)) + return (NULL); + break; + case IEEE80211_M_WDS: + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + if (vap->iv_opmode != IEEE80211_M_HOSTAP) + continue; + /* WDS vap's always share the local mac address. */ + flags &= ~IEEE80211_CLONE_BSSID; + break; + } + if (vap == NULL) { + device_printf(sc->sc_dev, + "wds only supported in ap mode\n"); + return (NULL); + } + break; + default: + device_printf(sc->sc_dev, "unknown opmode %d\n", opmode); + return (NULL); + } + + rvp = malloc(sizeof(struct mtw_vap), M_80211_VAP, M_WAITOK | M_ZERO); + vap = &rvp->vap; + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid) != + 0) { + /* out of memory */ + free(rvp, M_80211_VAP); + return (NULL); + } + + vap->iv_update_beacon = mtw_update_beacon; + vap->iv_max_aid = MTW_WCID_MAX; + + /* + * The linux rt2800 driver limits 1 stream devices to a 32KB + * RX AMPDU. + */ + if (ic->ic_rxstream > 1) + vap->iv_ampdu_rxmax = IEEE80211_HTCAP_MAXRXAMPDU_64K; + else + vap->iv_ampdu_rxmax = IEEE80211_HTCAP_MAXRXAMPDU_64K; + vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_2; /* 2uS */ + + /* + * To delete the right key from h/w, we need wcid. + * Luckily, there is unused space in ieee80211_key{}, wk_pad, + * and matching wcid will be written into there. So, cast + * some spells to remove 'const' from ieee80211_key{} + */ + vap->iv_key_delete = (void *)mtw_key_delete; + vap->iv_key_set = (void *)mtw_key_set; + + // override state transition machine + rvp->newstate = vap->iv_newstate; + vap->iv_newstate = mtw_newstate; + if (opmode == IEEE80211_M_IBSS) { + rvp->recv_mgmt = vap->iv_recv_mgmt; + vap->iv_recv_mgmt = mtw_recv_mgmt; + } + *** 5717 LINES SKIPPED *** From nobody Mon Feb 3 20:25:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ymyg964Lkz5mbVw; Mon, 03 Feb 2025 20:25: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ymyg940SZz49LQ; Mon, 03 Feb 2025 20:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738614341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABW38LL6/ZooMfgdp/EafVrQ4G3iDmyq8Iu4wAJZSLY=; b=HqCn4n1vuaPfV+ekOA0D+Yw7/r9L0e1XvvNKBjPe1jxqL4yKbhUsZsp75tLdCf+aXAPVlj CtFtLirkfzGcm2d+1F/Yd9SUPWGv1Yn98OkJ04hQ5Mef0hupI32Eewg2Tp5SimSoVJ7ns7 UYFL8KGF6NU44PJzAPCdUGOKhfetEOkMvHvY4or8GUpOU9U1lySchonDMieVhZ7Efz5QxD IKpIJVvRWrhZAYvL22ua7NCsSjuy/qfOXrzm6ENn3ialqsHCHoyf64o1F6y5KRoMMN6eER efHXOJ6nvURvdHBHRCMsZ95QIooAAdqTMCAhTyF0VEDjw2RPW0pMm74GPX5z5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738614341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABW38LL6/ZooMfgdp/EafVrQ4G3iDmyq8Iu4wAJZSLY=; b=sv3neCGSDHSNGQMj3DI37B9o3vXCliW9p0jicrai6Z/VAxdpyS45wbnruPVnxBedVvw+Rt jj4L/DP5B/rQO3ajRSHJAHyS9Xszy13iQ7/Dg3+ySFW73xWI9wBpFdZNb5eGTHKJ8QKSPq 3qbqobyNnaFcOzaz2OxdHIR7KEgUkoaR5F2qWFchC9p+yILdfEnbMbACizci+peWs0YZkE NG3XZTFJfeibfS7o4AgAcTl2hpYuuXqqsxrbs5eK3hYpJ7zXmDeARIjscDq5xmOwa+3CdW 0X7QWLVeHvTF+SoaPtl3CPGlEY0h+HOJ2l+sIV1Pdt0fpBPzH+coxkSusOVt3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738614341; a=rsa-sha256; cv=none; b=CHAjXr1CvxAVT9pF3ZHSWYOi5fAKiP5cfbEhLSvwjyHci6W+Ge3bL3rHoRgUIH0fsbG0k8 1LJ8eDHfs2WZGXP8E6COvdATehYupwLlWeNVlWXb3hkwc024CDCwQ69v4CXx9xdUMsViUL J+fISp5RCCp9RrvWwJM2+fkFqRl1ck5Ezx18bj9trpNsVdbqxnFDuKHPG1g3NyDGTCv7zN 1Fai0t2pmJEdJGcW0K2rW/hBVAWB7B3Bl91EKSDDlop02K3PWcaJftSLz4WkkzHM9PfGD8 VRVe+G9MRsjcGigzUax9m+Ax+GXLHpWpi0+xXtFdudltftFdd3eqBqGTNZsXnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ymyg9360wzrh5; Mon, 03 Feb 2025 20:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513KPfWU046898; Mon, 3 Feb 2025 20:25:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513KPf81046895; Mon, 3 Feb 2025 20:25:41 GMT (envelope-from git) Date: Mon, 3 Feb 2025 20:25:41 GMT Message-Id: <202502032025.513KPf81046895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 4a5d51e73e48 - main - resizewin.1: Fix option list width typo + spdx List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a5d51e73e48b27d90b21ed26999b23208f603d8 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=4a5d51e73e48b27d90b21ed26999b23208f603d8 commit 4a5d51e73e48b27d90b21ed26999b23208f603d8 Author: Alexander Ziaee AuthorDate: 2025-02-03 20:24:32 +0000 Commit: Alexander Ziaee CommitDate: 2025-02-03 20:24:41 +0000 resizewin.1: Fix option list width typo + spdx MFC after: 3 days Accepted by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48349 --- usr.bin/resizewin/resizewin.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/resizewin/resizewin.1 b/usr.bin/resizewin/resizewin.1 index f917209f2c90..ba4abe53ea1d 100644 --- a/usr.bin/resizewin/resizewin.1 +++ b/usr.bin/resizewin/resizewin.1 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" resizewin .\" .\" Query terminal for size and inform the kernel @@ -44,7 +47,7 @@ the size known to the kernel using the ioctl. .Pp The following options are available: -.Bl -tag -width ".Fl z" +.Bl -tag -width "-z" .It Fl z Do nothing unless the current kernel terminal size is zero. This is useful when run from a user's profile (shell startup) scripts: From nobody Mon Feb 3 21:58:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn0kG3x16z5mrRY; Mon, 03 Feb 2025 21:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn0kG3K6dz3QY5; Mon, 03 Feb 2025 21:58:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738619910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4O0hUDzHqse1i006oExk0UcyL3/WiGeyvNPLqKKKac=; b=oB9BQxXPrRd3l9Vaz1pprb9tlpxIf4YCi7dWyN8Gzkanf/V3gPYEhe6Qc928qMpqqZoPiv R6ewHST5zq7Nc7LwSqRIzRQjxVaPx5YuDMIIKRW37QdLzU6eT2phup8bvOtYYOd+lKIv93 gKjh+6xOhL2F2xCU1xebJeMTuPTNTl1QvGmnNTaRmHewl8nAk8zl9J/skHzi0QCq26Upct Lf6fzQXS8SIfD3BI35zbFZjf6PElTUfXgKFnEtAV7SCSjtazvQuFJAhXD364l0s/I7ZgQH Bb6ft1/Mb9MWDLLZKxmTzROsRFBTRTQXkKmqJpCqtd8Qx/40PFEk4rdva9HtKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738619910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4O0hUDzHqse1i006oExk0UcyL3/WiGeyvNPLqKKKac=; b=i5qjnaqak2uoHw949s+BhLyYTy1yKEoW/Rc9tpA9MKFZzUY0BO8RKCmGyY7PhG4AGRGn/t 55DgqAXOkI6fpDMEIgSrMhaYHSmnNr/DB06o3vofNDYkCThbZufR3MquJlv2XqpNwchG6+ Rkzua5Wo28Rmn+lTsr7CRlamPKwmOuzwzDr1ubVfxM5iX0Uhjj1Oi4FPhHg3jY3KgJAWVm gmVLJoMdGAm5+hWz9mQ/XSnE2ZBvFO9C8FB2ccMVV0FNhRtumkuUENc+yauF+rdeBnbsBt emdPIIeq/B7n8EZlZBzF5QXXB/LhuTn1MnZu/WS7UzlB1CRuLc9oRbVxfFFU2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738619910; a=rsa-sha256; cv=none; b=pDmT4c6J2zPZQgszmxOwai9Ile9/JHfptPxz3N82VNP7svmAxkZi3/UlgqOIjhNKOhrQKy tj3IGrZyVV9RZ2eXHMvqQ6c6uJ67kpROY8yBjo6jC1FrbSru5YOr8R1XSPRsQDHsR2bEOK iqQOMD9Hyjt075u3rbeRpa4oNz/w+alnZ1cAgVcPtQ96+TYfCMqWKtQcefXLtD5kblwS/J oBNovWGjF3Zjx2DHDKUw+/82tev5m9KmF+u8FYUVB9W0TlqOaCfHrNWcBFCV2WuYDvXDbY wc2sd3TEsOlgR6lBrvl7LsfLUeoxLSJX4VuFcTSNLYCArsQvOUbmweU/3/0+eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yn0kG2nK9zvGy; Mon, 03 Feb 2025 21:58:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513LwULW015481; Mon, 3 Feb 2025 21:58:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513LwUI8015476; Mon, 3 Feb 2025 21:58:30 GMT (envelope-from git) Date: Mon, 3 Feb 2025 21:58:30 GMT Message-Id: <202502032158.513LwUI8015476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: ee511f83b386 - main - vm_reserv: use default pool for free page removal. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee511f83b386299d9ad0b4e7b141eed128eddf2b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=ee511f83b386299d9ad0b4e7b141eed128eddf2b commit ee511f83b386299d9ad0b4e7b141eed128eddf2b Author: Doug Moore AuthorDate: 2025-02-03 21:56:34 +0000 Commit: Doug Moore CommitDate: 2025-02-03 21:58:17 +0000 vm_reserv: use default pool for free page removal. Differential Revision: https://reviews.freebsd.org/D45409 --- sys/vm/vm_reserv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index 04453e050a38..1102cb61323a 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -480,7 +480,8 @@ vm_reserv_depopulate(vm_reserv_t rv, int index) if (rv->popcnt == 0) { vm_reserv_remove(rv); vm_domain_free_lock(vmd); - vm_phys_free_pages(rv->pages, rv->pages->pool, VM_LEVEL_0_ORDER); + vm_phys_free_pages(rv->pages, VM_FREEPOOL_DEFAULT, + VM_LEVEL_0_ORDER); vm_domain_free_unlock(vmd); counter_u64_add(vm_reserv_freed, 1); } From nobody Mon Feb 3 22:14:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn14v61htz5mt1p; Mon, 03 Feb 2025 22:14: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn14v5GD2z3VRd; Mon, 03 Feb 2025 22:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738620879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUIN3RzSfH81xQHZXWnij6LPS25vZm1GQcZUlsG/k74=; b=Cv7GkSujJb7YxYwczNh54Jzsbuc0QHhFCrawTu+z7PMZa7JDKdAWFJAlyt5EHa5eWvaqmh JQqYrQEPLTZjK9VpnTD6JellCx6Dtc8/pOTAzO6vC7PCBv8DTqLmCviBoB8XJIeEHkdEKv AnTmDwaXIs1Udzavw+XkNPKaQODB43jAv9uHbb2feV7F3Oxmkqu+pu+bT+rMFiKIVQ+cuo vrJwVe1vtjUiQQ6ysjc/+JbqErSO0RO6w52oBroBoJgmOZSAUsBy1CY0eBi9WJbQYVl9Kw ks0TCAAi7vAI25/yXmE02sZSwRWdXvxE3zxkms52vnztlM4XWexKjIny85pv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738620879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUIN3RzSfH81xQHZXWnij6LPS25vZm1GQcZUlsG/k74=; b=bIjwF1xJSwcjrnoaS6ddKXVqNRyKtJLJtPVHVTuTDW43seqlJcDBiKr7VtYY15sa2euKK8 8khJWu0hCKn2Rz4c0uOC6pSz6uh5AZ6jJEEva/DFOqy/aECitKsmllIVkMt5iNmCEgtEh5 becOoVMO+2O/8mxCi+6nA5U97qUU0CJQ8iwgE++qBBQUfD6AFiTOCQE/IdzvHySMzpKaXN AL/mRaoXpgAlbXvgJ9E4787GxZgkMeogsYUZmkkKrvvb1+NvyHgNF2jCcFvc3WUvschgOz MPTT1CO1MDy7GbIbBT57CUgZbuPcYn1Xmm73gp5TT1kDZirrF0MWh+fkC+Jauw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738620879; a=rsa-sha256; cv=none; b=lhIMVW1sK5cRiVVNZHW5jTRY+30kx8kEnniqkRBxdNqZ3h94WvA+qnMYM0nBATw290GQzJ EJNVThY9ompSyc7nJFFfvFpNAfpfaefpBANYhzXkrCDf9069j67R85YcJo3eCg5Cm7q95o RjDRLB2nFhLHv+W1kRpxxtuS8RLy6fjghEekXtFQaIsejPZD7U7dtG5MCUZjeFOz0vsdKq AeCJvyFGBAGw4UiN7uIkU8+cmJfQimNMwojkn7dQpRCDG8HZBxnwtwejr+aTWsKHAcC1/z D2zkbsDA6ice1mAolbl/8XtSd9sjkiD5NjFOLmlTUHlf3+MKLxqLDfTj9hqhQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yn14v4jptztX7; Mon, 03 Feb 2025 22:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513MEdcY052393; Mon, 3 Feb 2025 22:14:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513MEd5X052390; Mon, 3 Feb 2025 22:14:39 GMT (envelope-from git) Date: Mon, 3 Feb 2025 22:14:39 GMT Message-Id: <202502032214.513MEd5X052390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 70ccb89db2a2 - main - build.7: document check-old-libs target List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70ccb89db2a28998a85b60023e7b3211db540cab Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=70ccb89db2a28998a85b60023e7b3211db540cab commit 70ccb89db2a28998a85b60023e7b3211db540cab Author: Maxim Konovalov AuthorDate: 2025-02-03 22:13:39 +0000 Commit: Maxim Konovalov CommitDate: 2025-02-03 22:13:39 +0000 build.7: document check-old-libs target PR: 284546 MFC after: 3 days --- share/man/man7/build.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 5ca44c51cf56..1df9b084726f 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 10, 2025 +.Dd February 3, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -449,6 +449,8 @@ include: .Bl -tag -width ".Cm delete-old-libs" .It Cm check-old Print a list of old files and directories in the system. +.It Cm check-old-libs +Print a list of obsolete base system libraries. .It Cm delete-old Delete obsolete base system files and directories interactively. When From nobody Mon Feb 3 22:42:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn1j86vgcz5mSfW; Mon, 03 Feb 2025 22:42:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn1j83Ln9z3cr2; Mon, 03 Feb 2025 22:42:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id f2IxtaUBzxv7Pf59HtOnz8; Mon, 03 Feb 2025 22:42:35 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f59GtHiDPJhBPf59Ht1Ha0; Mon, 03 Feb 2025 22:42:35 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=67a1465b a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=XX3NlJVnMeRn34Xq-24A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A2E4E118; Mon, 03 Feb 2025 14:42:33 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 72223189; Mon, 03 Feb 2025 14:42:33 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Doug Moore cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ee511f83b386 - main - vm_reserv: use default pool for free page removal. In-reply-to: <202502032158.513LwUI8015476@gitrepo.freebsd.org> References: <202502032158.513LwUI8015476@gitrepo.freebsd.org> Comments: In-reply-to Doug Moore message dated "Mon, 03 Feb 2025 21:58:30 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 03 Feb 2025 14:42:33 -0800 Message-Id: <20250203224233.72223189@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFAHRK0ogZQXeObO9yf0FqkMTU/5oY+RmTWkM/zAVcdG6uB8Iko21GK3N949tPxdfpZPCes4EvKfHKBdf02a6L86bEsN1NiI0sC9DWLgcSa1v0crLT1M XvZDwUXbysG90EP4qFWM6ULNKu2kd8t7yX6RRZYbeo1xHUZ7r61nnwz6NH7p+meD+rjg8l0R4y/NntzgIQ355mOBVhiXOTT1i+PVUnO0USdFjyh8/m+P721L PRviXWyA7S9q6z3HaK5J0vVTqSgKzk176uXvEF+dfzj6NxANNeB3+7TfPma1gD0KaDVpuNMDAumujdFiNO+LIbs4HSbFWhsWDjiBS2zf8K4= X-Rspamd-Queue-Id: 4Yn1j83Ln9z3cr2 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message <202502032158.513LwUI8015476@gitrepo.freebsd.org>, Doug Moore writes : > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ee511f83b386299d9ad0b4e7b141eed1 > 28eddf2b > > commit ee511f83b386299d9ad0b4e7b141eed128eddf2b > Author: Doug Moore > AuthorDate: 2025-02-03 21:56:34 +0000 > Commit: Doug Moore > CommitDate: 2025-02-03 21:58:17 +0000 > > vm_reserv: use default pool for free page removal. > > Differential Revision: https://reviews.freebsd.org/D45409 Your description in the revision is an excellent description. Too bad it wasn't in the commit log. The summary in the revision tells us why. > --- > sys/vm/vm_reserv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c > index 04453e050a38..1102cb61323a 100644 > --- a/sys/vm/vm_reserv.c > +++ b/sys/vm/vm_reserv.c > @@ -480,7 +480,8 @@ vm_reserv_depopulate(vm_reserv_t rv, int index) > if (rv->popcnt == 0) { > vm_reserv_remove(rv); > vm_domain_free_lock(vmd); > - vm_phys_free_pages(rv->pages, rv->pages->pool, VM_LEVEL_0_ORDER > ); > + vm_phys_free_pages(rv->pages, VM_FREEPOOL_DEFAULT, > + VM_LEVEL_0_ORDER); > vm_domain_free_unlock(vmd); > counter_u64_add(vm_reserv_freed, 1); > } > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Mon Feb 3 23:58:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn3Ny0h7lz5mhPd; Mon, 03 Feb 2025 23:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn3Ny00PCz3xCy; Mon, 03 Feb 2025 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738627122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUCjKErcJN/ldSv31HzyHrQDdoQdE5hVajIbwvPci4o=; b=LMVvmETiZ4gDVg4uYnR5a97vSFEcTumBLS87X8wT1rqfAvY553+Fiv9EKEZMetLVVPGW+n /zuoy5h9leokb/wXeu1Z8qu6+TMwqK7aZUZ7RStfb8AOQWkgkFhTtnPEbneNdSqenAW8u6 5BV/vwMleVUX1jh274Ct2NefaUaGjNdzcO9kgdEr8NGOYTPm518LnmimhkMLGxNJ5Jv5Dt q7B9AWmWVLEGWiRpktn8KY+0SCoNyk8T+wA5slFJTgZ4vL+F44rWnu4IG204kZw+p6Bs4V IrCdB1mMGTgM6j/MqzRQ2yaN+g/Lwc2IU4hkVQqswe4OkKKKBAblIst8C0CaqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738627122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUCjKErcJN/ldSv31HzyHrQDdoQdE5hVajIbwvPci4o=; b=RiwSgd4Sa8W2JO+tANqgMDo557rgOhO9rN1JXJ3uxQ4RLAlUuiQPwf47/AUFrhh31IivuV cpUJMCHCUxblE7LERlqZVii/T8tPLQ9AXKS7fx0gDhRq3QqloMiVrLxPbM5JXy34jtKUr9 1K7su7S3s9ls4dMed/C0yS1eET2r8WI/GUST7QiicGN6/MoYVEMkmxiG7VkGyPCj5Lr3mO 4oVcEHnnRb4ctdEma8KbkzIpUVyW2mNNUncFAWhfLWRxz8mudx2O7OLvgEWPuUTabvaQ1b iEnAE5GtgNEEJFYxiA3mSqghEyHY619x5Jkk/t1ZqIi9+P6cRX8h61L7Uzuq9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738627122; a=rsa-sha256; cv=none; b=h0Y+G+eR26bQXxyanxwVSdLjviPc1HVeVixR9gyRwiumPUcKb/4MaID+xcY46ZL5ldneKO dGDQs0qwWuRiKBpt5bKhIaUUqwJgKhbiFAK1nl+hsz3DUbhfvHQj6cf5uHMPH/4PBhkPHT Xz6L5Sm6us0KRW/zNr3DDs5ZQIM7D4lhWe9HfwgYnuIx5rIclTj2n631BSoDdmFpO8EL/D PF72Kru5I65zIf1Pt5NKrYvRa7BVC34lXxmjN990TE05thK8xVd7ZifWuFlBURiT5VLn3a 4jseNjH3b1K3KFE5Zj27pTan1kpiep5sH0BsxiMRznND6iMwWX3LUIlsKpLOUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yn3Nx6MSNzyH8; Mon, 03 Feb 2025 23:58:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513Nwfnv040196; Mon, 3 Feb 2025 23:58:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513NwfBL040193; Mon, 3 Feb 2025 23:58:41 GMT (envelope-from git) Date: Mon, 3 Feb 2025 23:58:41 GMT Message-Id: <202502032358.513NwfBL040193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 44a768e1a80d - main - stand: Use SOURCE_DATE_EPOCH in newvers.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44a768e1a80d9e4f06d07fbd9025e63622a80de0 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=44a768e1a80d9e4f06d07fbd9025e63622a80de0 commit 44a768e1a80d9e4f06d07fbd9025e63622a80de0 Author: Colin Percival AuthorDate: 2025-02-03 03:37:56 +0000 Commit: Colin Percival CommitDate: 2025-02-03 23:58:32 +0000 stand: Use SOURCE_DATE_EPOCH in newvers.sh The newvers.sh script is used to generate vers.c for 10 programs (at latest count on amd64): 4 EFI loaders, 3 x86 loaders, two userboots, and one kboot. When building without MK_REPRODUCIBLE_BUILD this resulted in 10 different timestamps being compiled into various files. If SOURCE_DATE_EPOCH is set, use that value rather than the current date and time. Reviewed by: emaste, imp Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D48803 --- stand/common/newvers.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 369a1c7c76df..c244e718c041 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -43,7 +43,15 @@ done shift $((OPTIND - 1)) LC_ALL=C; export LC_ALL -u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` +u=${USER-root} h=${HOSTNAME-`hostname`} +if [ -n "$SOURCE_DATE_EPOCH" ]; then + if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then + echo "Invalid SOURCE_DATE_EPOCH" >&2 + exit 1 + fi +else + t=`date` +fi r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` bootprog_info="FreeBSD/${3} ${2}, Revision ${r}\\n" From nobody Mon Feb 3 23:58:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn3Nz2cGNz5mhMg; Mon, 03 Feb 2025 23:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn3Ny745Jz3xMq; Mon, 03 Feb 2025 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738627123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVeSFh6tdXFbk7l2D4SVF7Y9B8V3ZQ6I3ffxwmXwW+M=; b=qHGW4u5XLjY/8pFYmWQuFDmcrt9qM/IBKDScZ7h1HIDY4lVxIJiydiUPK3xTvnThAkxC73 UQqmjca4SgXLtBV1lJ+TgEigddxrtxJw18ffLSLFM9HX1sEYE107AaJ3ZkbFDnODkfGtiU C33COmSRfk77yAcb3kEgNLcPE3pt7eZzjXwSWuDJqFJgFKJTNW7PUiZUjKQHYCuCENle2o CK4SdYquKMUoU9f7Sv8g0uEDT/ilb1K1vHSvjXpOBhj5O1TnBLfeK9g75cov82V9orPdZd H9Jh2UA77yl0q6uAsGKwVbUh8yNtVmu9KqGyKjPURbJl3oNfB9NoPwP/hO+UGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738627123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVeSFh6tdXFbk7l2D4SVF7Y9B8V3ZQ6I3ffxwmXwW+M=; b=mMIynElp1VU/Usvhksnzl4BieuivIUzxULZG/C81V3/6OVPPfN71zFfMfz97ZYjzzrGJAW ZOBuaGUuQZRl7UFN07vpX7ocKjVTvEPywi2a6QhMtKbybQYsdAwSWYoBjTkI4/Z1BZ/Yud wRijKsriAG/dRWEsfXdxPdtRGZRKSEdBJ63UGveSypmTs3HQk01HAm5N6lqmbvn/5ESXGs Ro2l0/L9e75wVWZAuZzEqJWn7FRIjsLPLsuyHmRRgcqS7dwE/RSWfRe9+9EKqiRRCtpD9k obRvyRaRtwZL0rojDCfsTZzt+c+v54ZSuQ/ZfXAXf3/H9AkxJeEd28G+J0YoYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738627123; a=rsa-sha256; cv=none; b=yF/lC8kahfeEK79sykv2RCgcGez6I4MbqCPMIuJ4k/q2Olk0LFqGQLlUj/BnHKE1dm8i7d hhdUZIIT1AOL74PPGFxZQnbcvAFwndTwqS1kYPCC0UT9X8/WpG4oDwWjMJ9EDsXP04L0Ky 0h9ZsZlrOivBAEKHtUWKAMBqOTXq9uEUbJIJZKcZ8nZM1rDzZedGbFbbUroG8jImauQEbS eMVagzuXUnppLMnzV276rVesQ6A8mKKpkgRUCdspfQmFtTYsKpCFIy/n3TeiW2G0U8oYyq qohmuobjnx0f5WTgEkVegcgByq1GSdBE+Ps8p45dL1GYQrfrNwkRaZNfljjWPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yn3Ny6dVpzxjV; Mon, 03 Feb 2025 23:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 513NwgKp040229; Mon, 3 Feb 2025 23:58:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 513NwgUn040226; Mon, 3 Feb 2025 23:58:42 GMT (envelope-from git) Date: Mon, 3 Feb 2025 23:58:42 GMT Message-Id: <202502032358.513NwgUn040226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 16f334630975 - main - kernel: Print SOURCE_DATE_EPOCH in UTC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16f3346309757259b3613e43a2eb6404659cdda9 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=16f3346309757259b3613e43a2eb6404659cdda9 commit 16f3346309757259b3613e43a2eb6404659cdda9 Author: Colin Percival AuthorDate: 2025-02-03 04:10:08 +0000 Commit: Colin Percival CommitDate: 2025-02-03 23:58:32 +0000 kernel: Print SOURCE_DATE_EPOCH in UTC If SOURCE_DATE_EPOCH is set and MK_REPRODUCIBLE_BUILD is not set, the kernel contains SOURCE_DATE_EPOCH, converted to a date+time string. In the interests of easier reproducibility convert it in UTC. Reviewed by: imp Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D48802 --- 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 6e5f0716c90d..9a196da5466f 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -190,7 +190,7 @@ u=${USER:-root} d=$(pwd) h=${HOSTNAME:-$(hostname)} if [ -n "$SOURCE_DATE_EPOCH" ]; then - if ! t=$(date -r $SOURCE_DATE_EPOCH 2>/dev/null); then + if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then echo "Invalid SOURCE_DATE_EPOCH" >&2 exit 1 fi From nobody Tue Feb 4 00:13:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yn3kW4722z5mk6Y; Tue, 04 Feb 2025 00:13: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yn3kW3XyQz42sh; Tue, 04 Feb 2025 00:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738628035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WxqbVDl0kOL7YC0CqZPzVpKiwspwghsQGVN8rw2PqE4=; b=wVt2gK6HwBGUpN/3j6muB/j2Exu5vrRLZTaqw5cgp7vcjST2uMjgyzbiMohFMDWEOcvWtT jpbfY6qo6dYD8Nk+l+T1z/M+rKIqxjN48LeYgOzuKnSY2SYb3T6ijjNWdAakTq37dm57dB wwGZlfyCu6I/PzWYqwlUE8i4nxw8EEi4NSoWDvzsIDfZ7aR3l82AkhdAbZNIiHP7slVTlh O/zx6ldk/RSyhP25cH16n9sLEAAgIlwz6lEsqmKsu3rJoJr7pdzImbPPV7a8gW+Yhlugi0 wFXpfbV3ASW7xlx24Eqd8Y/RewDMyTnFSvkFDO9IPLSOxmNJhD/Goobl8ztvMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738628035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WxqbVDl0kOL7YC0CqZPzVpKiwspwghsQGVN8rw2PqE4=; b=S9g64DHMLpLl4SCyOUBZK7tCjhu+BLJF0bQXfAefNC8r5cDVvA1L4Nqod0y2bZ/YLa+M9f BeTaZGXqtsCnTUTnoNdQHGO5x4UaXSW/kqiAfAsU4q75iXLvBADsbtRT9VBu2g2+VMBI7H Ig9nImRKuzXeGVVlARi4dmO3Shz4IaOvxUL6RVpz9R1RsJ6ojD5H96s74w7Clq642OkQhD 0tbuV+qm5GpTQgt/pk6odeAp7+EgbdfrqgatccIN0YH4VybMDovCRuULI8krc6jWA6zUFm 8sVqzkL74G/+odeUGeqKrRoYLxq7xbZvN0vw2YwDVgc1Epkrcm1fb8e6r7gRew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738628035; a=rsa-sha256; cv=none; b=h/HQlhX+nzD7U98kkzevu7iKwA5J/M4U1cvJsihDqiMIMlgdB1vXLF348dayXSr2NzaIbe IiOtufCpg+6zqBBhN8yCJu0dXBLMEfJp4OQ2+kDqSJFz7bGuOJbJF9EE3L0UoDVGPV4w70 6ZqekEgTP/lx66dZXaUXTh4nNh8Es61kJZ/SnQY6fe1a4Xmc4zbEDeELRKXR4n3WgSA6Vh 6KExOC+5XZ2HKziqlEii7eBPT/86RHUHNdtTzxmAgL+1QElvQD9+43NmBZk1DpRdHx5py1 zX56JWTOTWa4lgyuyPpE9ii6jD3GMTpk1FWkwgPFG8tKlxsoq9RPQmOChNC37A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yn3kW32wdzymh; Tue, 04 Feb 2025 00:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5140DtH0077203; Tue, 4 Feb 2025 00:13:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5140DtEn077200; Tue, 4 Feb 2025 00:13:55 GMT (envelope-from git) Date: Tue, 4 Feb 2025 00:13:55 GMT Message-Id: <202502040013.5140DtEn077200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 078e8b34b13d - main - release: Chase location of pkg repo databases List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 078e8b34b13d6d0663661542eeac9007806fccdc Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=078e8b34b13d6d0663661542eeac9007806fccdc commit 078e8b34b13d6d0663661542eeac9007806fccdc Author: Colin Percival AuthorDate: 2025-02-04 00:10:47 +0000 Commit: Colin Percival CommitDate: 2025-02-04 00:10:47 +0000 release: Chase location of pkg repo databases pkg used to store copies of upstream repository databases in /var/db/pkg/repo-*.sqlite. About a year ago this was moved to /var/db/pkg/repos/*/, resulting in FreeBSD cloud images no longer having those (unhelpful since they'll be long out of date before the cloud images are launched) databases removed. Remove the correct location, and hope that future pkg updates don't break the base system again. Sponsored by: Amazon --- release/tools/azure.conf | 2 +- release/tools/ec2.conf | 2 +- release/tools/vagrant.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release/tools/azure.conf b/release/tools/azure.conf index 9da2b19de694..519ab13fe432 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -27,7 +27,7 @@ vm_extra_pre_umount() { # them from the image allows it to boot faster. chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD chroot ${DESTDIR} ${EMULATOR} pw usermod root -h - diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index ea61c2fa6db9..b5a91d47decf 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -27,7 +27,7 @@ ec2_common() { chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg umount ${DESTDIR}/dev - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD # Turn off IPv6 Duplicate Address Detection; the EC2 networking # configuration makes it unnecessary. diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 83a72b8e8aac..c212af7d012e 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -20,7 +20,7 @@ vagrant_common () { # them from the image allows it to boot faster. env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD # Vagrant instances use DHCP to get their network configuration. echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf From nobody Tue Feb 4 12:26:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnMzv71S6z5mkHg; Tue, 04 Feb 2025 12:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnMzv5wVyz3b7F; Tue, 04 Feb 2025 12:26:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QsFUbY7Tkj63tyAFggzCe0/1VtsJYAvVVa5KfBt3j8=; b=SBzs5Wt+JPu6+Ofw+3O2hsNCcwdf+OfjL7+3syg/TnWDERLpIs1/Sjgt8Evq/Wb6yUxay6 ixD82v6voQ2/Phk1bUWC19y0yhXSAv1/wrtGf05bpauuv+AfSAHgMMyNH/12bzssoek0y/ xLMmdfqF2FV/Ene1Fd2snyQLYA35DtBDXtxN6BRkVoqZ99C7Z1NZdNb78FJ68llkI9oJcq 6lTZ7nPypn8PzqpTwXI7XqVrBMx9Mscbpz6ziPPLfdZAKsU3YgKCewkS4KltIiRUqs7c2L dw4HQRFOXHlwZCzKQn9hF/v8dv7CC55IRFPP8EEb8Wlk+MO3lkE7120Op+hsAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0QsFUbY7Tkj63tyAFggzCe0/1VtsJYAvVVa5KfBt3j8=; b=mmrPfEZ2MtOSYqC7mEnB3da/lJamEt6lSuZOYDjYPFO+LGOSw2/O6W3t5P2JAFdY0UdcP4 U8BLIHWu133utowNm3DYhqviszP+VxK03eImUYAXkDKLtJHn+PgPeWZ9bkrMb1l7g+YYvY mvUYisc+ltqTZqq9Awpx66J0CHYNFTFu+c08xh89EuYRFw6+XRIP36RZTcqDvjDHOkNYN5 GgKHXvVa765KC87D1/bfb3SGslT7bzRDoS+ch28IfQP92PEhrJ9Blwmjk7yUJdBExwPvKJ tHEpOl04EKFpGKQHot4Vk9L+VCqoNmseJKHUg86tu965j8sEZcemytKuF0h43w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738671995; a=rsa-sha256; cv=none; b=Hqscx5WcUNF34sjruMBpXVhQcVStIBb8hJ50+6K+x5zpOQJdYqgc6H/PXHL8sc/cGDHp0o d3vopG+zB7J9LOEQYptWnIF8uVAoWXRrROcL05s/cWGeelNOyaRutCQ2KSu3F8hucdo75B O+Na8s8PCbErl5xUMBLJRaxZopUHuVObPOo1NuaotQjKtDTms+xR3NF9L5/VRFq2ybWlqG VdHHmKDFYMjAyCqW07Dg5UA9S2xsKp0Bg2iy4Ukg90Sb+9uXEAjR0Tcz0rCMnYPLoHvncB J3PZ4vz3/p90wpGv/+RgHSglUZEWiu2lXCp3BVo16KE4caLumUxgH7apBRvM7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnMzv5Lgqz1LKb; Tue, 04 Feb 2025 12:26:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514CQZdw040873; Tue, 4 Feb 2025 12:26:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514CQZQO040870; Tue, 4 Feb 2025 12:26:35 GMT (envelope-from git) Date: Tue, 4 Feb 2025 12:26:35 GMT Message-Id: <202502041226.514CQZQO040870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: cc67ca7207e7 - main - depend-cleanup: Ignore lib32 for arm64 only files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc67ca7207e7d220c5761106cb0e0843d1e886e0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cc67ca7207e7d220c5761106cb0e0843d1e886e0 commit cc67ca7207e7d220c5761106cb0e0843d1e886e0 Author: Andrew Turner AuthorDate: 2025-02-04 11:30:20 +0000 Commit: Andrew Turner CommitDate: 2025-02-04 11:30:37 +0000 depend-cleanup: Ignore lib32 for arm64 only files When cleaning arm64 only files we try to clean both the native libc depends files and the compat32 depends files. Ignore the latter as only the native files have changed. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48524 --- tools/build/depend-cleanup.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 8e2968b3061b..86a8340e2ce4 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -242,50 +242,50 @@ fi if [ $MACHINE_ARCH = aarch64 ]; then # 20250110 5e7d93a60440 add strcmp SIMD implementation - clean_dep lib/libc strcmp S arm-optimized-routines + ALL_libcompats= clean_dep lib/libc strcmp S arm-optimized-routines run rm -f "$OBJTOP"/lib/libc/strcmp.S # 20250110 b91003acffe7 add strspn optimized implementation - clean_dep lib/libc strspn c + ALL_libcompats= clean_dep lib/libc strspn c # 20250110 f2bd390a54f1 add strcspn optimized implementation - clean_dep lib/libc strcspn c + ALL_libcompats= clean_dep lib/libc strcspn c # 20250110 89b3872376cb add optimized strpbrk & strsep implementations - clean_dep lib/libc strpbrk c "libc.string.strpbrk.c" + ALL_libcompats= clean_dep lib/libc strpbrk c "libc.string.strpbrk.c" # 20250110 79287d783c72 strcat enable use of SIMD - clean_dep lib/libc strcat c "libc.string.strcat.c" + ALL_libcompats= clean_dep lib/libc strcat c "libc.string.strcat.c" # 20250110 756b7fc80837 add strlcpy SIMD implementation - clean_dep lib/libc strlcpy c + ALL_libcompats= clean_dep lib/libc strlcpy c # 20250110 25c485e14769 add strncmp SIMD implementation - clean_dep lib/libc strncmp S arm-optimized-routines + ALL_libcompats= clean_dep lib/libc strncmp S arm-optimized-routines run rm -f "$OBJTOP"/lib/libc/strncmp.S # 20250110 bad17991c06d add memccpy SIMD implementation - clean_dep lib/libc memccpy c + ALL_libcompats= clean_dep lib/libc memccpy c # 20250110 3dc5429158cf add strncat SIMD implementation - clean_dep lib/libc strncat c "libc.string.strncat.c" + ALL_libcompats= clean_dep lib/libc strncat c "libc.string.strncat.c" # 20250110 bea89d038ac5 add strlcat SIMD implementation, and move memchr - clean_dep lib/libc strlcat c "libc.string.strlcat.c" - clean_dep lib/libc memchr S "[[:space:]]memchr.S" + ALL_libcompats= clean_dep lib/libc strlcat c "libc.string.strlcat.c" + ALL_libcompats= clean_dep lib/libc memchr S "[[:space:]]memchr.S" run rm -f "$OBJTOP"/lib/libc/memchr.S # 20250110 3863fec1ce2d add strlen SIMD implementation - clean_dep lib/libc strlen S arm-optimized-routines + ALL_libcompats= clean_dep lib/libc strlen S arm-optimized-routines run rm -f "$OBJTOP"/lib/libc/strlen.S # 20250110 79e01e7e643c add bcopy & bzero wrapper - clean_dep lib/libc bcopy c "libc.string.bcopy.c" - clean_dep lib/libc bzero c "libc.string.bzero.c" + ALL_libcompats= clean_dep lib/libc bcopy c "libc.string.bcopy.c" + ALL_libcompats= clean_dep lib/libc bzero c "libc.string.bzero.c" # 20250110 f2c98669fc1b add ASIMD-enhanced timingsafe_bcmp implementation - clean_dep lib/libc timingsafe_bcmp c + ALL_libcompats= clean_dep lib/libc timingsafe_bcmp c # 20250110 3f224333af16 add timingsafe_memcmp() assembly implementation - clean_dep lib/libc timingsafe_memcmp c + ALL_libcompats= clean_dep lib/libc timingsafe_memcmp c fi From nobody Tue Feb 4 12:26:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnMzt6Tycz5mkHc; Tue, 04 Feb 2025 12:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnMzt5zZmz3bNv; Tue, 04 Feb 2025 12:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTr88lkmFoXEKUBnNV3nHW6gbKu+xwMuLqGjolff02U=; b=BR6rh5tkYO10SadB7/z3Cchdiw1uUcowtADxxqxK+rr672EGbNvK/mbpn8ot2TC+H/1B6X N/vDT51/pFqfrfqbit8yFbn4scXDZTg7G+9hIn1bSEJJMGzU6S2CT39nQ+gRMBEKBK0hOI pYpfp+26SDFubAlpBXyNV8SBKddY4UYeZusAvopAJps6bTvDwnosEZtY8WVgiHpjLX8izY XMampzpORlnGBjqvVjpuN513emeuCAKnk+rZkpp3lxmxV/jJD5cm4kL5m+Ud0saWyBD3H9 uI3F5aFBOHxPw9LNvXqBFBAFBd+ZoEUmDmjFAC/juXvr9l6mWxnkuPh20xK5Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTr88lkmFoXEKUBnNV3nHW6gbKu+xwMuLqGjolff02U=; b=bYRoPB3DoFOibEAZPKC7d2pwyUma/JDu8QbzJUtKauyuAX5pBA8+9JvAf1SE9n7Zstdx8J e63aMIpkkXx2ttuS/ZcLXYP8F/OLdljr4jcpxWhwHZNQctX/JIa4/7Ys5U6qYt0B6kZvxJ JS88rF8pGqT0+JtcZVt8RzWHoidgYuemjhyisCGofLvl28QL/I0flNhc5dPW4baVVHAV1g y4XQ514A1DvaYRVQ50XJc611jtYRsf/HxlQpZaSgpFczhM8n5xLLzXcMCBm8HT1+wXRCMc 1C5shmuS4K1R2rYBBy6895YNIcb/mI7mwq+nLDQ8RC/4h5gRBcCaUlXflOAAqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738671994; a=rsa-sha256; cv=none; b=d+71gCpQMFdixEW11WMhfRWTqu7X9vYUZOj3nHjbr4MlHAWrW/O5ABaxbjAMAadpku98w+ 4AqeN84j6raBgmaYPXMFCUU5l6t/sQip/rFjbkZy0ui9E9BwkUrmMuFekdRv8BkPEnWcc9 PgK0d3FLmC3rFxTtOcX+yVgEQcw26Hfjbhqrf/beyrp1vz3AAIsgYI9YTLnTZLePyCYFsv y5gG2hvtzLW4bSdVpt/vmEEPrj3b3cIdpkRSwp3l1fJb4WOIVP/Q2q8HdpOo3y9zccVHYN QcPBsoxWTDk5UvZJzLyjvkuVpMS3gvWRXJHQfJE77886YdUhvpKnYa+QDv+2BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnMzt4sNyz1L82; Tue, 04 Feb 2025 12:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514CQYPR040835; Tue, 4 Feb 2025 12:26:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514CQYkD040832; Tue, 4 Feb 2025 12:26:34 GMT (envelope-from git) Date: Tue, 4 Feb 2025 12:26:34 GMT Message-Id: <202502041226.514CQYkD040832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 32111003c308 - main - arm64/vmm: save and restore HCRX_EL2 register List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32111003c3087389cc5e50949ee3a26c4e7b26c4 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=32111003c3087389cc5e50949ee3a26c4e7b26c4 commit 32111003c3087389cc5e50949ee3a26c4e7b26c4 Author: Harry Moulton AuthorDate: 2025-01-23 12:40:05 +0000 Commit: Andrew Turner CommitDate: 2025-02-04 11:24:41 +0000 arm64/vmm: save and restore HCRX_EL2 register With the addition of the Extended Hypervisor Configuration Register (HCRX_EL2), this change ensures that it is both set to 0 before entering a vm, and that it is properly saved/restored. Reviewed by: andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48584 Signed-off-by: Harry Moulton --- sys/arm64/vmm/arm64.h | 1 + sys/arm64/vmm/vmm_hyp.c | 15 +++++++++++++++ sys/arm64/vmm/vmm_reset.c | 2 ++ 3 files changed, 18 insertions(+) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index 8cfe77dcde6f..6a0c4c78e568 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -94,6 +94,7 @@ struct hypctx { /* EL2 control registers */ uint64_t cptr_el2; /* Architectural Feature Trap Register */ uint64_t hcr_el2; /* Hypervisor Configuration Register */ + uint64_t hcrx_el2; /* Extended Hypervisor Configuration Register */ uint64_t mdcr_el2; /* Monitor Debug Configuration Register */ uint64_t vpidr_el2; /* Virtualization Processor ID Register */ uint64_t vmpidr_el2; /* Virtualization Multiprocessor ID Register */ diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index bd119c80139b..d61885c15871 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -259,6 +259,14 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) hypctx->hcr_el2 = READ_SPECIALREG(hcr_el2); hypctx->vpidr_el2 = READ_SPECIALREG(vpidr_el2); hypctx->vmpidr_el2 = READ_SPECIALREG(vmpidr_el2); + +#ifndef VMM_VHE + /* hcrx_el2 depends on feat_hcx */ + uint64_t mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + if (ID_AA64MMFR1_HCX_VAL(mmfr1) >> ID_AA64MMFR1_HCX_SHIFT) { + hypctx->hcrx_el2 = READ_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2)); + } +#endif } static void @@ -268,6 +276,13 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest) /* Restore the special registers */ WRITE_SPECIALREG(hcr_el2, hypctx->hcr_el2); + + if (guest_or_nonvhe(guest)) { + uint64_t mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + if (ID_AA64MMFR1_HCX_VAL(mmfr1) >> ID_AA64MMFR1_HCX_SHIFT) { + WRITE_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2), hypctx->hcrx_el2); + } + } isb(); WRITE_SPECIALREG(sp_el0, hypctx->sp_el0); diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c index 8ccb83e7a0ea..79d022cf33e8 100644 --- a/sys/arm64/vmm/vmm_reset.c +++ b/sys/arm64/vmm/vmm_reset.c @@ -140,6 +140,8 @@ reset_vm_el2_regs(void *vcpu) el2ctx->hcr_el2 |= HCR_E2H; } + /* Set the Extended Hypervisor Configuration Register */ + el2ctx->hcrx_el2 = 0; /* TODO: Trap all extensions we don't support */ el2ctx->mdcr_el2 = 0; /* PMCR_EL0.N is read from MDCR_EL2.HPMN */ From nobody Tue Feb 4 12:26:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnMzx2B64z5mk3y; Tue, 04 Feb 2025 12:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnMzw6M8Wz3bLq; Tue, 04 Feb 2025 12:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGwjGs5YKCCjd3pyDJD21z8GFbviCRszeviro7pfWQA=; b=kAP+PmMPFp+LO0kZjBp2zwk+BKLfoPPcNDmyiekqOnD8EwgxFre6ec1pb4Kqph7MZN+Vtu O5XMowDHX+HNpYzrrPlsUXXicrsCcyVnm9UWv12+0B02fdwR1Py/+bkMR+iRn2xb417471 104vkdw7B2ZNzkZc2TBo3dVR9drIVg83WHjsN/3/v56B21ZCS3MJXYKGoBpzp1P0K5F9uW LRnj+oAZrogQ5JdKvfaMgjushAvh/y+lyNny9HCMta4ia0ltQQ0n8uCTL4PN1c0eAmEYI+ zdZ5fyC3u9FpeUAVLelDwO+zV4o+BZfuiJkuUHKEh3+hU1UWqsbE9IfdZH1Zog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGwjGs5YKCCjd3pyDJD21z8GFbviCRszeviro7pfWQA=; b=JwJla8ZeE63IJro2vpTqK2JegDq24zHaOYabaFEdgtZPqEryReb09UBH3UuVu4Jo7FLW8W jEY14sVHTxn+WPH1H1zGlOnrWpGd/vSWKmkxqY+3IPU8pSmhy0dGlRAudklfDFJpn7FCZz YhoLJ9DluRIhm1drRPFNWud6mS8IjAMVVQAYY17qaHTKoSrY4cENQ3xTCew7ksVuomFw0O zSCOM18sd3xAOHmzXVXrf4j9/hn3CTt1c4XYy5UrdJIBiPRUM983fssDNP1iNgVXNX1RgH xR+2HpICY+NYV5dGgVprc6q4YDEaB5U0D6u067xgjgLM7t3YrHG4//iRSGh5Rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738671996; a=rsa-sha256; cv=none; b=cHHBY66wAC9azuGaLx8PviTXYjWwgyFuQsIBMHXqz8UzjiXV9rZJ7+VxsMQLzWBoynGl1p oaYdV49HgFx2/yA22kMbr8C12LWQ0RZERF83VXOQB0yXKrkBb8TB2AIGnxktSSp7iqaaxx /GBLDqpu/UEt5UgnY8tzqCsy7lE7noF3xeRRkmUc6lfy7W5VcIB7iIHf0OdBZUnTQsb/if 1imTKZQOM0wxA7A/yATzCQWCN+FwbRYwy6YlE8gukTZrt+iOjhksTRF/hmrKj3YP7NYcwp 86dUkGuPLtnDqUfIyXELDP3AfmCuHn+IwlypT7O9BeODIouvoWcD0RzZpqBEog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnMzw5xjFz1LJn; Tue, 04 Feb 2025 12:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514CQa09040912; Tue, 4 Feb 2025 12:26:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514CQa5T040907; Tue, 4 Feb 2025 12:26:36 GMT (envelope-from git) Date: Tue, 4 Feb 2025 12:26:36 GMT Message-Id: <202502041226.514CQa5T040907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 6a7a01ec8b74 - main - physmem: Move the ram0 device earlier in the boot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a7a01ec8b7495497d3d0cd28234cc68c36b6d61 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6a7a01ec8b7495497d3d0cd28234cc68c36b6d61 commit 6a7a01ec8b7495497d3d0cd28234cc68c36b6d61 Author: Andrew Turner AuthorDate: 2025-02-04 11:56:49 +0000 Commit: Andrew Turner CommitDate: 2025-02-04 12:02:00 +0000 physmem: Move the ram0 device earlier in the boot If the ram driver is unable to reserve a memory range it will panic with no real information why. Move this driver earlier in the boot so any devices that cause the conflict will fail to attach. This should make it easier to debug why the conflict exists. Reviewed by: mhorne, kevans, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48766 --- sys/kern/subr_physmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index 059566f0eccb..6b97b36a6c51 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -622,5 +622,6 @@ static device_method_t ram_methods[] = { }; DEFINE_CLASS_0(ram, ram_driver, ram_methods, /* no softc */ 1); -DRIVER_MODULE(ram, nexus, ram_driver, 0, 0); +EARLY_DRIVER_MODULE(ram, nexus, ram_driver, 0, 0, + BUS_PASS_ROOT + BUS_PASS_ORDER_MIDDLE); #endif /* _KERNEL */ From nobody Tue Feb 4 12:26:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnMzz2nNjz5mkVH; Tue, 04 Feb 2025 12:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnMzz1Rbbz3bJq; Tue, 04 Feb 2025 12:26:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUkX+VqIu5T70onHU/ZBHo0fYhaooV/WncTAn/gek0o=; b=nfLNjwS6/bR07siRi+qxdtpOvxa9UedRa8/dwIXcvGYF0K0cyTujDc3wk1HyD+h6vB1Lai 3dYnT7gXCM2VkfMbHuyel1JEkmJrrOi1QkP297//ClxOCTemZLo/KnIJyKwlXVDHqs7+IK iwYNUnxwctiDjoaHXORAgbocwp4DeZ6kTkZ/Klhl+erssGMcg5ypyA6IsHSTMnLsB3jgKs O9c4+lu+UHvqcleT0dCoc+PaKWP+TY6vh6HCfo1OWUuvGnJ9ZsZxLSBTc5qC02VTuYxTOD 3dXacFpLssDhl3PJL+i7QdaI1AyBurKUFchOA5tg08Qc5ZA65K93Ua9+8aVVxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUkX+VqIu5T70onHU/ZBHo0fYhaooV/WncTAn/gek0o=; b=nZf1n5lwGNGKFcm4ECaJ2ShAbuxJ1YlO368Xkm2FIX+urp6roB6ASY+COV6kAV3NxnMje9 8gAVgx+TGEShOFFNUbTFndHNBL9PlFdPRRlKdQ69oM41vn+3MuYrbCqXu7UFc7ELlE2JcS uQh8FROTaqUdLFnLvAQaFJpEtj1klD2x0vJgCm8jM1s0RJFEi2DMFsRmb73A44dH9zePgH 5bs8Z1q21t+ZZlECCFYhHOhFx6qP/lLSeUd+Te1yaLEoauZdD42Y86P7rgDwTIocQNkB/J K/8wwm91W0FLg5GOF/TKyp7LfkRvYJvcFxrvs7fH2AQmto9dSXGhcFHinBkSuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738671999; a=rsa-sha256; cv=none; b=t1yykEuJ9GPmwjvpZQfw4trUzLTOQZCkqgcip/TB7k4bBeA/FbWhMPh0zxoh0kiwrOsARM 82CMSR/dK1ygFXTkFwEZmVw1nALkL4X7yKj24ExDA+uiSSSGWcG5KWS0crw+d2I0aIpn2w jGvPkYim7/ljxoUKoV68iUQvCL4e4wus5Z0hOGNNTBsi9fPf3kgLW2gYj6l57LWDMPhurm lWrvhGANWJzLjOZPGqgHEDPiGhJitP9dPzes4V/La2yZmC1B6TdSjr4VeU6gLnwsUAegEJ TV4o8IM4M446VMbJG9eAaZvaTJeqXaZDA85vTk6QUFqnCgwLoj7MRIGfnPHzKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnMzz093wz1L15; Tue, 04 Feb 2025 12:26:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514CQcNH040985; Tue, 4 Feb 2025 12:26:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514CQcmt040982; Tue, 4 Feb 2025 12:26:38 GMT (envelope-from git) Date: Tue, 4 Feb 2025 12:26:38 GMT Message-Id: <202502041226.514CQcmt040982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ff977fd34b4b - main - arm64: Add a quirk for arm,fvp-base-revc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff977fd34b4bb85cf27b55106131b4dd6594afab Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ff977fd34b4bb85cf27b55106131b4dd6594afab commit ff977fd34b4bb85cf27b55106131b4dd6594afab Author: Andrew Turner AuthorDate: 2025-01-06 16:36:39 +0000 Commit: Andrew Turner CommitDate: 2025-02-04 12:21:04 +0000 arm64: Add a quirk for arm,fvp-base-revc This is a software model so may have too many CPUs in its dtb. Add the MP_QUIRK_CPULIST quirk so we don't panic on boot. Sponsored by: Arm Ltd --- sys/arm64/arm64/mp_machdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index d052033d9575..bca6487e487a 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -91,6 +91,7 @@ static struct { } fdt_quirks[] = { { "arm,foundation-aarch64", MP_QUIRK_CPULIST }, { "arm,fvp-base", MP_QUIRK_CPULIST }, + { "arm,fvp-base-revc", MP_QUIRK_CPULIST }, /* This is incorrect in some DTS files */ { "arm,vfp-base", MP_QUIRK_CPULIST }, { NULL, 0 }, From nobody Tue Feb 4 12:26:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnMzy5d2Tz5mkCj; Tue, 04 Feb 2025 12:26: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnMzy1Jw3z3b7G; Tue, 04 Feb 2025 12:26:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=265G761Zn1I7rbIBImtJOuQrNkLF+xZ4/00TsTAHYqU=; b=ue4Au/TZ10upntbTNuJuDY7Vo+WbdmuP+PMnbTa1UQq3+Ie42OJxBeCteOd6vIhX6+1iUB CSi7XuTVDsebA/j5a3tj9VjQGC4602GtNYGVV5afAzdNWzl6715k/+ERaGysyOD0aExSKY zZdL3t1hgutd8JP/U32XpLscGF8ebKAeZO/Ee8tIIXFb5Vwk8DYgyRPOGCdaWuK6uK+VWK wGXb020ihYKaLl/U8KE7Hx2LMjmwfrZm3dyUTZxCpoMUQBJpPRXOjpCWL//druhTx+emm1 HKVB+kByrUv6eI+jjZ1J3FT7Kw1VdGPFOVP7ODEmGIG3QQf12yDcPXm0Rlbzfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738671998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=265G761Zn1I7rbIBImtJOuQrNkLF+xZ4/00TsTAHYqU=; b=TU4+zpDWl+ibbzZs8j82r5rsZ2PrkK/6MIDZbXIGIMBleVW7W6KYCi5q0M8IeNsi5Ldxit FofldTKAdUZs71i7QQMsJ7eM5J/b4a9A6hmr17cO76xFT4EoIRKmX8lDAhCG2Uq09Dg94C b08TgujS18DWp4Mqo9GgknMSAjDgHfWOb9LVSJ2mFDeJ+/5IEhu4VnCW7DjhCAV3HqQ/8b 1/U/xORv9Z1I5uQtBYu83YTNvTZE3TNT7b/cmv31iMWozieh6UiSaHp8fsiNTe2t28J1XW Vj6RVSPBcihrJPqOlrhAnTjCQXZAIsPbvmWf5Ym7aB8mrT0U5X3msEMAjr9YIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738671998; a=rsa-sha256; cv=none; b=hQ61A1Feosro2KPBu9Fg/LOB+GiZY/6gqZDEIxHySxlM/+M4Tcchl5Sej7qGwAohx5Oui6 n+L/BHQnCTBFZ62UFppWHNHrbzibWsaRSJG5oOhEq2TWCzl7BjWl5p/0iPC0I+w/VZf0mw uuOi/gGM2aLJlYl2G7CVHkcNx2mLTdonQw1p4BEM2cWwuu0lmRWS0Bm2JSKZ7cgwJeOBwy 6Ycb595MRSpBQMAUN+xqHYKz7quk7RLVnMsdDg7bVcd0nhwxrA0aZf7GQmd8mML830ll33 xKtDGa4Xg5OBjLZJJo7YYzyz3OwMkJnen7kT5K17YW0o8azlBFtalILrloOqUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnMzx6k5qz1L14; Tue, 04 Feb 2025 12:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514CQb3V040951; Tue, 4 Feb 2025 12:26:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514CQbta040948; Tue, 4 Feb 2025 12:26:37 GMT (envelope-from git) Date: Tue, 4 Feb 2025 12:26:37 GMT Message-Id: <202502041226.514CQbta040948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8fd88aeedb1e - main - arm64/its: Support devices not behind an iommu List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8fd88aeedb1e4f34d6c127cf66fa3e7ecb3f5168 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8fd88aeedb1e4f34d6c127cf66fa3e7ecb3f5168 commit 8fd88aeedb1e4f34d6c127cf66fa3e7ecb3f5168 Author: Andrew Turner AuthorDate: 2025-02-04 11:57:21 +0000 Commit: Andrew Turner CommitDate: 2025-02-04 12:02:00 +0000 arm64/its: Support devices not behind an iommu When the IOMMU option is enabled but a device doesn't have an IOMMU this will return an error. If the device is really behind an IOMMU then it will fail later, and if not this is needed to allocate MSI and MSI-X interrupts. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48725 --- sys/arm64/arm64/gicv3_its.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 9224e03dec52..77d1936d8c95 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1744,9 +1744,15 @@ gicv3_iommu_init(device_t dev, device_t child, struct iommu_domain **domain) int error; sc = device_get_softc(dev); + /* + * Get the context. If no context is found then the device isn't + * behind an IOMMU so no setup is needed. + */ ctx = iommu_get_dev_ctx(child); - if (ctx == NULL) - return (ENXIO); + if (ctx == NULL) { + *domain = NULL; + return (0); + } /* Map the page containing the GITS_TRANSLATER register. */ error = iommu_map_msi(ctx, PAGE_SIZE, 0, IOMMU_MAP_ENTRY_WRITE, IOMMU_MF_CANWAIT, &sc->ma); From nobody Tue Feb 4 13:52:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnPtW44LFz5mr7l; Tue, 04 Feb 2025 13:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnPtW3JpJz3xCM; Tue, 04 Feb 2025 13:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738677123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xpbQgzpj4yBHSK+YQe0iT3cTT374A+/sIbLCHt0A5yM=; b=rSbW7tJYoSQXQw1nkKzZSFp/ClaQawcd6sGQZW3lMpd1a/x3FzsDY1CV71FqSuT1stpf0m VO2ufpt1ynAElY4PrwpMFEIZcxPS3132OvE21HHGMGtVdjEN0ppVZC7k9Cq2d9lH4CJf85 +QYDmic3QwBBtnNJjxdHpl7YBkZ2gchnxjMkSl5aMxkCDnuqtm8dvVSA0J8Mu4Nfntfl8j 7yOkylNZRb22VCLx82fyKxFKHjLhu/kpD0A8Tiljz7dvC2f5iL8OYwocZ9iKFvpD7ZOASD yAWIpYC/ZroU08MB6ivTgGyNTMHXWf2GFnHKsRqaKfFUq/+GlqAPk1TBH/YfPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738677123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xpbQgzpj4yBHSK+YQe0iT3cTT374A+/sIbLCHt0A5yM=; b=b0Q0U0OSCrnkiQzTAjtipQgWei5ObOWWXUeMB+x+Xc83F9nECgyI8IMqvG2aJVNNn3M3b/ mXnyhrP88QXM3i0I9Ckkt35CZCMW2DmuXtUq35bETyQ1sPFxP/IV9jCcTxBkf08KB60MXp jGYlONQJatkgezFuffEV1l8GUWB5RikWFrKK6cFnPF9+ULl4CxQloCvRVTN5k9EjPW7/Yx T52QoS2r2YZe7jLVx5/1NpdBuJqAeFToLH9ThGxho7ppN0yqX/D+JAmXD94foyK+Gt6whQ i3lk1nIVX+sSccN3Lf1VV0SbuoX6yTyxWEAQ0cDvayJW2uEGxOB4AN0DaccP0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738677123; a=rsa-sha256; cv=none; b=gD60H9kJLTZReeZG7FQJUEMlk3mG5Kl7tdWEIKRIOJTTXCkwDyRPdANP/39FzuVt8mm87D TShqnoWBMiKgw//3fYIe5yto4qGZAgOjpTiY4sk4ZeRBKMgrLZyGPqBa62BkAjm3JhPLKc ASupyVdHFh/zim7i/jFJkz3B6OGi3xHP61Gd8Y0QJbh+N/Zr/HiJGlFxb9u9xKZswX4XNU UB0FzhBpyMvLcyRQGiHnOtYDrtQaNfUSmiLnsZg9o3gtfvUYoul2xgnnIbz+F8f9YKONb6 E0Ge9FFtz7nSYChDxrhk8XLGWr2QqtfRIIu+0z+mU7IwfnCz77vEBnOaQoxF2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnPtW2JyBz1N9n; Tue, 04 Feb 2025 13:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514Dq3gp007034; Tue, 4 Feb 2025 13:52:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514Dq3tT007031; Tue, 4 Feb 2025 13:52:03 GMT (envelope-from git) Date: Tue, 4 Feb 2025 13:52:03 GMT Message-Id: <202502041352.514Dq3tT007031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: da1deb784d9a - main - Hyper-V: hn: rewrite hn rsc swtich to avoid sysctl hang List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da1deb784d9ad3a4015a3f91fa1a5ce394fd3fdb Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=da1deb784d9ad3a4015a3f91fa1a5ce394fd3fdb commit da1deb784d9ad3a4015a3f91fa1a5ce394fd3fdb Author: Wei Hu AuthorDate: 2025-02-04 13:39:14 +0000 Commit: Wei Hu CommitDate: 2025-02-04 13:39:14 +0000 Hyper-V: hn: rewrite hn rsc swtich to avoid sysctl hang Changing the rsc_switch flag using sysctl to turn rsc on or off could hang. The orignal code sends request to host to get the mtu setting. Sometimes the host fails to reply, causing the thread to sleep forever waiting for the host response. Use existing cached mtu from hn device instead to avoid calling host. Reported by: whu Tested by: whu MFC after: 1 week --- sys/dev/hyperv/netvsc/if_hn.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 212b6bc0ff57..ab7671025107 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -2355,7 +2355,7 @@ hn_attach(device_t dev) } SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rsc_switch", - CTLTYPE_UINT | CTLFLAG_RW, sc, 0, hn_rsc_sysctl, "A", + CTLTYPE_UINT | CTLFLAG_RW, sc, 0, hn_rsc_sysctl, "I", "switch to rsc"); /* @@ -4523,24 +4523,22 @@ static int hn_rsc_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; - uint32_t mtu; + int rsc_ctrl, mtu; int error; - HN_LOCK(sc); - error = hn_rndis_get_mtu(sc, &mtu); - if (error) { - if_printf(sc->hn_ifp, "failed to get mtu\n"); - goto back; - } - error = SYSCTL_OUT(req, &(sc->hn_rsc_ctrl), sizeof(sc->hn_rsc_ctrl)); + + rsc_ctrl = sc->hn_rsc_ctrl; + error = sysctl_handle_int(oidp, &rsc_ctrl, 0, req); if (error || req->newptr == NULL) - goto back; + return (error); + + if (sc->hn_rsc_ctrl != rsc_ctrl) { + HN_LOCK(sc); + sc->hn_rsc_ctrl = rsc_ctrl; + mtu = if_getmtu(sc->hn_ifp); + error = hn_rndis_reconf_offload(sc, mtu); + HN_UNLOCK(sc); + } - error = SYSCTL_IN(req, &(sc->hn_rsc_ctrl), sizeof(sc->hn_rsc_ctrl)); - if (error) - goto back; - error = hn_rndis_reconf_offload(sc, mtu); -back: - HN_UNLOCK(sc); return (error); } #ifndef RSS From nobody Tue Feb 4 14:07:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnQDM1w63z5msGp; Tue, 04 Feb 2025 14:07: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnQDM17fSz41v2; Tue, 04 Feb 2025 14:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tO2Ed5GlU8bj7XdiT3YHRWKG8cP4EVOGaCHZvVUMU2M=; b=uuNLI9OThK3hW+NwiM7Rd3NogiZOsWhWMsOyOG/Eoi6u/G9BJw6RjydYstFhn89O6umcEl z2tLHCw+q4d5bmpPaHUqQlwx7D0168j/7UufEt9IG7iiX1O/Burt/UEh5YQ9pQFvTJ8d3p Dztetz3xlFGNL3qRYNih9EqWvH0tWmSRyaxlQ37lWCQ0KgBfRY2xLlVBqfUCLmz3oumgLd 2tR4CiJY+GNZ0zEykuBeE7/uz/qOFvrx0xfB9w1PfstSZ5bUqWfNwh4h/b0XU3Fg4Kp4Iy ECj12mQfA0eqFLOL7NJUz71ooaYYFHv6SiibS2O+qt9yk+PhNLeyEXaFYex7KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tO2Ed5GlU8bj7XdiT3YHRWKG8cP4EVOGaCHZvVUMU2M=; b=uJ4/jHqsdZswfikfjOpea3VvbJgeu8u0/JWXW6tIussen0kkzIb4pN6I1iuTzm25t2yR64 olRpI7FnM1x3NxUbUHR3O8CNRu1zGKwVFR3HOHDnoYypAo5AsFB79dsBh/2ezMfhdAGQPb KZU4jFOu2VZOqE8FLFqiS+j7vugqWks7m+6gTw9oMnIgcr/JRruWWdMbSAsDcdnjNG4dJh 0WNLYgf9aWlC15KDaa86Ac/4l7RTUui9TJDioi0gOmcBvQyXbWsdCYxDoJNdo43r4ZicbF 2SsrOqz/ihRTt/0zZRzClxONDPrxDMr4QQCk/WdN/g7XLfyE4oDGP+PQ+2pkjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738678051; a=rsa-sha256; cv=none; b=J5ZBaGxeQFFbbq6y/U3rKAQgW2/PiKTKgvmrZmXxX2n3DMxgeur+3+pbWK5tEjLNw2V6v5 ryBgU4Y+HtqcuhdHjWkdKp8NcbfOhy/64xdUm7b0Kzbr9RIWVIKu734RCOTlST41ExXfrG VT61b+h/OErO2tm3HSJswEm5XxhWEFkpHk35RxrIKT/joFrcjNfKmXUurPnVTDJtZDc9wn JS0sOiXThC8QYsn1SGRVvWXIf3bR5ztC38pXe7Oek/501p36IESgWpvln0LM1+RPkIsX7R CjlXNODbg9oVpv/ECELy3bDI+Ce+rDd5PkI93KvgxB2gaXd1BmJc3YngsdggKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnQDM0FPNz1NsQ; Tue, 04 Feb 2025 14:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514E7USK029376; Tue, 4 Feb 2025 14:07:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514E7UFw029373; Tue, 4 Feb 2025 14:07:30 GMT (envelope-from git) Date: Tue, 4 Feb 2025 14:07:30 GMT Message-Id: <202502041407.514E7UFw029373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: dc4b36b96333 - main - nanobsd: Always define the partition index List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc4b36b96333f2ab05f3c454f0df2e0a0d4d451d Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=dc4b36b96333f2ab05f3c454f0df2e0a0d4d451d commit dc4b36b96333f2ab05f3c454f0df2e0a0d4d451d Author: Jose Luis Duran AuthorDate: 2025-02-04 14:07:00 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-04 14:07:00 +0000 nanobsd: Always define the partition index Print the desired partition index together with the starting LBA and the size. Otherwise, when only one code partition is desired, the configuration partition (/cfg) may not end up in the third slice, thus breaking the scripts that expect it there. This was the previous approach, changed in 587c054bea0f ("nanobsd: Use gpart and create code image before full disk image"). Fix it by printing the index as the last column to reduce the chances of breaking current overrides, and using it as the gpart index. PR: 262098 Reviewed by: imp Approved by: emaste (mentor) Fixes: 587c054bea0f ("nanobsd: Use gpart and create code image before full disk image") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47835 --- tools/tools/nanobsd/legacy.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index a45b447337b2..2f689212263e 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -64,31 +64,30 @@ calculate_partitioning ( ) ( } # First image partition start at second track - print $3, isl * cs - $3 + print $3, isl * cs - $3, 1 c = isl * cs; # Second image partition (if any) also starts offset one # track to keep them identical. if ($2 > 1) { - print $3 + c, isl * cs - $3 + print $3 + c, isl * cs - $3, 2 c += isl * cs; } # Config partition starts at cylinder boundary. - print c, csl * cs + print c, csl * cs, 3 c += csl * cs # Data partition (if any) starts at cylinder boundary. if ($7 > 0) { - print c, dsl * cs + print c, dsl * cs, 4 } else if ($7 < 0 && $1 > c) { - print c, $1 - c + print c, $1 - c, 4 } else if ($1 < c) { print "Disk space overcommitted by", \ c - $1, "sectors" > "/dev/stderr" exit 2 } - } ' > ${NANO_LOG}/_.partitioning ) @@ -174,7 +173,7 @@ create_diskimage ( ) ( } { # Make partition - print "gpart add -t freebsd -b ", $1, " -s ", $2, " $1" + print "gpart add -t freebsd -b ", $1, " -s ", $2, " -i ", $3, " $1" } END { # Force slice 1 to be marked active. This is necessary From nobody Tue Feb 4 14:16:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnQQr4nZyz5mt3x; Tue, 04 Feb 2025 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnQQr3dNNz43C1; Tue, 04 Feb 2025 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj0MdtcweWff1eom1wX9AM72TLmUXDIuJTC/+kiXcTY=; b=sGE446nAQXffDwYozwpMjlSmOmMjFr14LA/BobDkVVlH1RxOFqyhKNscZzq0zI2zNSgc2b 07wJPXAYNMRPIbZsIaxduDV/uqlatHW9zZ4tdY2joLhgwJ8xQOEj9xLx1Uw77GvDKIA5TN 0EO/0a347elRaq27O61I9XG+9Gi3oL1KftyyY3klFgB5Eqt3+ohcyKOuf3NWf1nD3aWPb1 bgMxAlpzIFk1y4otqJWMpMo6T2nZuMjpNXXwOHV/HVt+IGWUNZMe1FLWGSk5CyM+XX2nMS JYQL3YYegEvK+Rb3kqG2vT55Ost7fjJOoaoR3HLlUd3hfmiTLOBLaAP1Zu05FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj0MdtcweWff1eom1wX9AM72TLmUXDIuJTC/+kiXcTY=; b=FyYo93KLBV0tXttW07vIAG8rlSpbgko3t7gAHZV/GMQdL8HI2r4kPFyhGkPNdBlpXPsSG8 iZjBXxSIfSRHfohAxcbZfIap1BHyTIKHpePiAe/UHXrPlhQUCVywLvOutUEj1uKZ13850o g7U1B3G6lg/bpCqfkI+A80b25rT8P+MgwJLiOrUe3RpxqsYoEIqWDK8TaVtjQmNhdYKSxi SJJKkkgh/79tJ5LYy61hzZW4ALbGSxORcVVKysXr2TdP6bZsrV48Zd+EvAGMfUjHGnLu9n qp1l24Qal7e5unJSMVas1YQ7M+ddDVh5KGGKO4IIZHGoTKUsLQaLUh5lvJGvMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738678596; a=rsa-sha256; cv=none; b=RlQMc1ZXSgt2t69XNKbxhhZXCwQJWR8S6P7aStKDwXL7cI55XNmr2p0w7f4vjwfR2rTO+g TPqGJkgE0qRPOykSW1J3zJbqIdPU4MQ5x4ejNa6XzIUd9+bM7qC90zayE0WGymCoXx4ic3 DlSSk8rbMYYMOogxd1e1ja5JBVlkX1ftgYPOmh0IhRXT8+4PVUZylQm3ZdlAyr61oXZ4Cy 1gSD7FjZ5XCwshDxR2rcQeBxpKlHqFWaQYYo6fifEH8RP+2HZTNlqvkag/vwPHi7HatBLz /GJQWJv5FpvuO/TxvvrcE3geqreyNP02gmy+JN+z5zeLLyqdusVs7I81M+gt1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnQQr3Bvwz1NjL; Tue, 04 Feb 2025 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514EGa7r048119; Tue, 4 Feb 2025 14:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514EGamO048116; Tue, 4 Feb 2025 14:16:36 GMT (envelope-from git) Date: Tue, 4 Feb 2025 14:16:36 GMT Message-Id: <202502041416.514EGamO048116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 841856570e7b - main - csu tests: Remove extra slash List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 841856570e7b623c4f1283939936ffa005d2fcf4 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=841856570e7b623c4f1283939936ffa005d2fcf4 commit 841856570e7b623c4f1283939936ffa005d2fcf4 Author: Jose Luis Duran AuthorDate: 2025-02-04 14:15:12 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-04 14:15:12 +0000 csu tests: Remove extra slash Remove an extra slash that ends up in the metalog. This double slash can produce an invalid specification file if there are subdirectories down the hierarchy when sorted. For example, consider the following metalog excerpt: ./base/aaa type=dir ./base//aaa/bbb type=dir If sorted, would turn out: ./base//aaa/bbb type=dir ./base/aaa type=dir Apparently missing the ./base/aaa directory in the specification. Luckily here are no subdirectories. Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48778 --- lib/csu/tests/dso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/csu/tests/dso/Makefile b/lib/csu/tests/dso/Makefile index 2f2b8c90ac29..6c1d00e9fb58 100644 --- a/lib/csu/tests/dso/Makefile +++ b/lib/csu/tests/dso/Makefile @@ -18,6 +18,6 @@ SRCS+= ${src}.c SRCS+= ${src}.cc .endfor -LIBDIR= ${TESTSBASE}/lib/csu/dynamiclib/ +LIBDIR= ${TESTSBASE}/lib/csu/dynamiclib .include From nobody Tue Feb 4 14:16:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnQQt0NfJz5mt84; Tue, 04 Feb 2025 14:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnQQs4bWcz43NR; Tue, 04 Feb 2025 14:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSp8leeOmyP62bMXjogfyAwMUwwVM/aoaAoAiWrYbgA=; b=eIZSP6VSf+UDkpv8ix7LE9XyiXzNzBtkRByyBbv5rb2ATA6UDjUznLcrc70OJAsINERlPG yFRIXv+P3edhAYLMIG4sou70c/Klp4WQPdSxG6vZXmTR5TmoAH18FA6ZqsEEQfV9ZJ6Lac vu7KnifCkAbpLiGbk7HMEofLrzXtw7YEUSueZ7n2tkxBNtvKer6RRi4TWL774koK2W2l+A Y+P+NoMWd6vtz8giqezCgBf5CoFobkqw5/sQkVUtXWzIXRoCUpFERv4gt8TfrVpyEh8zT7 oj1Ul4IziW2EKvrTWZAFXZl60Bt9OdC5ywDEe3wGMmPBJhqYJGTOafbTh5541g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738678597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSp8leeOmyP62bMXjogfyAwMUwwVM/aoaAoAiWrYbgA=; b=t10KucZkPiOSsKdkyF2Rk+jwxdp9GsusSzOSk1MCm0ZYcIGeexXiE7lYFLJnHKdWEaHyXq xRhWtCT3KlX/dU2gGZQEqTwWo4u5+8HlYGfYlZGdOaflp4vPI06wo9NYapGA2h3ncMBM71 uTecgjxmNLMQsM2nQpxTwkfblLTBZfM97vtWO5XZW5zGxaU6CrfiUJhqpRvE6VqoTXSr1E 4hr/X/oolyAZRcIX+YrtDf6GTp7gfGZcfn/4XNRsHCBATasWWSHtu3M48ra6G/5W7VeBwI YGMQL4Zf491VI5EZPtEQSXy0xM6QrtJz+cX6YWQYSU2DF+G+qih+DTLBacK2YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738678597; a=rsa-sha256; cv=none; b=XW9RYBJ+CWn/sioIQ+hXA3Uk8XqntAgz2QKjFm71khoLBLPz0klT5bDhASGf4p3NDxMxHp Nc5h6Q+Hcl+1LbG5M+iV9Dc6z8oQGJjY13EkP9ehy9hhO4/fIEah71DZJkCfXXGzPku7aK 58rKQv+UyFb5XLp+o4sdva4HmSmlTt7svtLRw6HzP1TpqIdUOuCDe1zeGhkpevqTHPx0I8 4nosny+wVfy6tlPNQBcZhmmI/V5qlZsI6JcEMAqn03T8UXqV3Fx2VjfFUnOR/tIyuy5Pa7 PNdWlAmHLykGSsVtGalkwYSbYQNPc9gdSZwJStUoZXh7MP1yqYJxW5VyTlubyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnQQs489cz1Mqh; Tue, 04 Feb 2025 14:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514EGbIl048156; Tue, 4 Feb 2025 14:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514EGb9G048153; Tue, 4 Feb 2025 14:16:37 GMT (envelope-from git) Date: Tue, 4 Feb 2025 14:16:37 GMT Message-Id: <202502041416.514EGb9G048153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: bccaf0262dca - main - libopencsd: Remove extra slashes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bccaf0262dcab84be49c42cc6b7a81c279c44b62 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=bccaf0262dcab84be49c42cc6b7a81c279c44b62 commit bccaf0262dcab84be49c42cc6b7a81c279c44b62 Author: Jose Luis Duran AuthorDate: 2025-02-04 14:15:37 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-04 14:15:37 +0000 libopencsd: Remove extra slashes Remove extra slashes that end up in the metalog. These double slashes can produce an invalid specification file if there are subdirectories down the hierarchy when sorted. For example, consider the following metalog excerpt: ./base/aaa type=dir ./base//aaa/bbb type=dir If sorted, would turn out: ./base//aaa/bbb type=dir ./base/aaa type=dir Apparently missing the ./base/aaa directory in the specification. Luckily here are no subdirectories. Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48779 --- lib/libopencsd/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libopencsd/Makefile b/lib/libopencsd/Makefile index aae0b795c216..649e756eacf6 100644 --- a/lib/libopencsd/Makefile +++ b/lib/libopencsd/Makefile @@ -121,7 +121,7 @@ APIINCS= \ ocsd_c_api_types.h \ opencsd_c_api.h -APIINCSDIR=${INCLUDEDIR}/opencsd/c_api/ +APIINCSDIR=${INCLUDEDIR}/opencsd/c_api ETEINCS= \ ete_decoder.h \ @@ -129,7 +129,7 @@ ETEINCS= \ trc_dcd_mngr_ete.h \ trc_pkt_types_ete.h -ETEINCSDIR=${INCLUDEDIR}/opencsd/ete/ +ETEINCSDIR=${INCLUDEDIR}/opencsd/ete ETMV4INCS= \ etmv4_decoder.h \ @@ -142,7 +142,7 @@ ETMV4INCS= \ trc_pkt_proc_etmv4i.h \ trc_pkt_types_etmv4.h -ETMV4INCSDIR=${INCLUDEDIR}/opencsd/etmv4/ +ETMV4INCSDIR=${INCLUDEDIR}/opencsd/etmv4 ETMV3INCS= \ etmv3_decoder.h \ @@ -153,7 +153,7 @@ ETMV3INCS= \ trc_pkt_proc_etmv3.h \ trc_pkt_types_etmv3.h -ETMV3INCSDIR=${INCLUDEDIR}/opencsd/etmv3/ +ETMV3INCSDIR=${INCLUDEDIR}/opencsd/etmv3 PTMINCS= \ ptm_decoder.h \ @@ -164,7 +164,7 @@ PTMINCS= \ trc_pkt_proc_ptm.h \ trc_pkt_types_ptm.h -PTMINCSDIR=${INCLUDEDIR}/opencsd/ptm/ +PTMINCSDIR=${INCLUDEDIR}/opencsd/ptm STMINCS= \ stm_decoder.h \ @@ -175,7 +175,7 @@ STMINCS= \ trc_pkt_proc_stm.h \ trc_pkt_types_stm.h -STMINCSDIR=${INCLUDEDIR}/opencsd/stm/ +STMINCSDIR=${INCLUDEDIR}/opencsd/stm INCSGROUPS=INCS APIINCS ETEINCS ETMV3INCS ETMV4INCS PTMINCS STMINCS From nobody Tue Feb 4 14:48:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnR7Y6ckNz5mw50; Tue, 04 Feb 2025 14:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnR7Y5vxqz4CSl; Tue, 04 Feb 2025 14:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738680505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLf2VGLhqvGs8clh1zVWwWIYAZOB7hCwiNxEj6/yr30=; b=lhVQdlJWilRYSWGuam8zUcQfx4ycUBUUKb7/9ZyFlLloBvm1PheECauhHPainvv1W5lesL DOobsFKZi9eMSis8TtPBbWeie5ppvUU0+Ci/xW7Os5GeovvVi30IYHyFBv2kN1QC+psxzG xxUBkTBpYwx0cCeJHETRyXM4LWLUSqV+VsFXoiZgTd6Q1jkuIIer8Tomq0Xb3B8ff+35Xz 7F9rQs4ZqQ1OzvZU1yEn9gK8HqRBTIAH36od/EchVA6i0hsfmi9v44H0RMEETyFggtx1B/ oKypzKvC60HCjTYk1scFkcrNH5IR1bAXas3Pe9whyWloZWdUk8ZIaV8wr1oRXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738680505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLf2VGLhqvGs8clh1zVWwWIYAZOB7hCwiNxEj6/yr30=; b=Bz6pVTUWCk6ctUFoRJSZ6kXrRFNcAhdAdXNCABvSwsZw28WxfArSvh7nrvd0/ptUTHfqlZ Irpn2y8C6y7K20EKftDUCbwTsbO0++W0jdu/KJhv0kaJYLfJqBd+yTLkMxuUdJInbibyoB JUIMtEqfuETXYrE8J+1UvHbIrmdyk5u5lUwix9CrCP8pQvWonO/+ri+k67FdwGaH0+aSeQ VFMES7/XMU/QaxUOYDWIe3wVbJZxrB4292pAkvNv+UK3kkh+jJOYItbLmpWJnOYos74Cpk yna22usFgZh5mErP1ax7DAxNgft5UnDeTth+ffgh6vq+NQcpsPJovubYalz1Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738680505; a=rsa-sha256; cv=none; b=EjcW6dSSXCG+9mOfmX8+dPfgQzvoRU4lEifxuSE/f/rxdggeHSNMawVMyG5p80axANzeTb 694ImJiAvKgrHlvRodmBdJL04KqBC+dE659vQmG3p8MRFhhoyfMCXhxKuM+Jf6Fuzkv3Ky sMBKkhFrRx8JgOSXygb7ghOQszF738wmJHSar+5D404skv30zJ/NTttO/7PRfWKYRShCFh BlQQ+XAucvHorRJyzKKVQGVLHPgL+gorp7rsHHBiOFGktr9GdnKsG0dyRYCHmARlB9sTCJ dIYl+bhCVOmB7vapnPM+4dfjplABsby7WHrx3rabKouBO6Q/li49chtaiFsnoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnR7Y5T41z1P1Y; Tue, 04 Feb 2025 14:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514EmPSM004528; Tue, 4 Feb 2025 14:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514EmPpS004525; Tue, 4 Feb 2025 14:48:25 GMT (envelope-from git) Date: Tue, 4 Feb 2025 14:48:25 GMT Message-Id: <202502041448.514EmPpS004525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 88d448ec815c - main - mk: Move vm stack test debug symbols List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88d448ec815c1fda27be94846f88ccd96251febd Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=88d448ec815c1fda27be94846f88ccd96251febd commit 88d448ec815c1fda27be94846f88ccd96251febd Author: Jose Luis Duran AuthorDate: 2025-02-04 14:47:24 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-04 14:47:24 +0000 mk: Move vm stack test debug symbols Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by placing sys/vm/stack test debug symbols under /usr/lib/debug. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48796 --- ObsoleteFiles.inc | 3 +++ share/mk/bsd.lib.mk | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index e17ca9608cca..aff94af72c17 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250204: sys/vm/stack test symbols moved to /usr/lib/debug +OLD_DIRS+=usr/tests/sys/vm/stack/.debug + # 20250129: libdevinfo bumped to version 7 OLD_LIBS+=lib/libdevinfo.so.6 diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index cf8057907a1f..a4b2e4d11125 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -254,7 +254,8 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory .if ${_SHLIBDIR} == "/boot" ||\ ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ - ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" || + ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests" DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} .else DEBUGFILEDIR=${_SHLIBDIR}/.debug From nobody Tue Feb 4 15:06:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnRWr6qFkz5mxFw; Tue, 04 Feb 2025 15:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnRWr64f3z4GgW; Tue, 04 Feb 2025 15:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738681560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Lfg1wD7gHt/CCN0u1UXWt64gzyjeU9qpfaRyPh1tf4=; b=pZ33FHoZt8S3c3fKlEsnvSq7bziZcVQEL0MPCEFyBElX6Af+06q2C1ACK8EuBd4Ghor8aR ZpOY+HU+Yut60nCgdLDHjJHbH6LQ/DRLZlc6ES1+EISsW9xcABtVrcfu1dDfxgNNhYBU0L wXwkT02rphW+GO9XcwnJ9NZwombYBxVGpHmnq/bgTiedd0lhObUnddVxGS5SSLRvxiA24s JwZhT4wWxUP34UlRsUnOMGnwdKfNnGkLDr8PiWd0YeDOV16Xwhsy5ryOj+4fII1LUkb9if U1e9/OGVrpiASJ16P94/e7VVZzOYoOWm+B79b97eocnftHIYFsLSiWtWxPaGFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738681560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Lfg1wD7gHt/CCN0u1UXWt64gzyjeU9qpfaRyPh1tf4=; b=vdEeZpOL7EN2aThTGH6571DWcdmLaG4PIqQZdjgUYz0PaN895ePjRnZ4rI7Ce1hhi70D1B 0T/NqkDpePhwdUyNdXSF3eelu7pR9MiYzKK/6pvfCFHovbAPIe44g54m9M3yVhUIuu5xh8 MRr2Ai4r4HfiUXd1uvcfs9HO3gXLUSdYUho5sGBoXY8A28R+fYwoCoEl1DTwCCeB7AnZKh UuCPc7nCZRgBMMoAjVST/Thbm1+QLjLh+dGqQ0OFSS2N9ebqCJlaVQv7R1UQnmGYeBvV9S EqxaaouDHtlGC2gQH8Hfietn03tc4V5Ffvik0QpNgbBLXuEd1loHFcvblIREIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738681560; a=rsa-sha256; cv=none; b=wU9Q+l94+qvCr30B94AYRlc1vgVUDnl6+ZHS4HMrvNE8UqZ5XoWhEAVhaBaYZCN4inVXX0 hbxGUfqSJPgFHBumGZ0Zee9Pv9jGlltFV/2UyDGeh+SO6yE5zdwLmRPVL8/OrCULDGnigd 82/92S37GhiPxszzUgPt2KRteNT/ejzGOIiQ1DK3sGxup5DVM9dB98pyKiAvzza3qcOq7H /C8ag98EAc0e2MeIq5SqVb4E4oeZsUTaTiPWOlFoAOHfANpYPNY8Sre9AbHEjZdYlJ6i9y IHP1HceyTcjvCWUpgNVoRO8zdhmjZ/Ycn3Mu0qvBZMnDONYCDb3BOM+OaVn+Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnRWr5HX2z1Q8n; Tue, 04 Feb 2025 15:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514F60i9041394; Tue, 4 Feb 2025 15:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514F60pw041391; Tue, 4 Feb 2025 15:06:00 GMT (envelope-from git) Date: Tue, 4 Feb 2025 15:06:00 GMT Message-Id: <202502041506.514F60pw041391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: bb0348a17974 - main - ifnet: Make if_detach_internal() and if_vmove() void List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb0348a17974d83671becbd32ea0e4bd2ea61906 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bb0348a17974d83671becbd32ea0e4bd2ea61906 commit bb0348a17974d83671becbd32ea0e4bd2ea61906 Author: Zhenlei Huang AuthorDate: 2025-02-04 15:04:59 +0000 Commit: Zhenlei Huang CommitDate: 2025-02-04 15:04:59 +0000 ifnet: Make if_detach_internal() and if_vmove() void if_detach_internal() never fail since change [1]. As a consequence, also does its caller if_vmove(). While here, remove a stall comment. No functional change intended. This reverts commit c7bab2a7ca9a6dae79f970c6730a19b65a1ed86e. [1] a779388f8bb3 if: Protect V_ifnet in vnet_if_return() Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D48820 --- sys/net/if.c | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 08c59627b196..504550414bb7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -285,12 +285,12 @@ static int if_getgroup(struct ifgroupreq *, struct ifnet *); static int if_getgroupmembers(struct ifgroupreq *); static void if_delgroups(struct ifnet *); static void if_attach_internal(struct ifnet *, bool); -static int if_detach_internal(struct ifnet *, bool); +static void if_detach_internal(struct ifnet *, bool); static void if_siocaddmulti(void *, int); static void if_link_ifnet(struct ifnet *); static bool if_unlink_ifnet(struct ifnet *, bool); #ifdef VIMAGE -static int if_vmove(struct ifnet *, struct vnet *); +static void if_vmove(struct ifnet *, struct vnet *); #endif #ifdef INET6 @@ -1113,7 +1113,7 @@ if_detach(struct ifnet *ifp) * on a vnet instance shutdown without this flag being set, e.g., when * the cloned interfaces are destoyed as first thing of teardown. */ -static int +static void if_detach_internal(struct ifnet *ifp, bool vmove) { struct ifaddr *ifa; @@ -1244,7 +1244,7 @@ finish_vnet_shutdown: ifp->if_afdata_initialized = 0; IF_AFDATA_UNLOCK(ifp); if (i == 0) - return (0); + return; SLIST_FOREACH(dp, &domains, dom_next) { if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family]) { (*dp->dom_ifdetach)(ifp, @@ -1252,8 +1252,6 @@ finish_vnet_shutdown: ifp->if_afdata[dp->dom_family] = NULL; } } - - return (0); } #ifdef VIMAGE @@ -1261,19 +1259,14 @@ finish_vnet_shutdown: * if_vmove() performs a limited version of if_detach() in current * vnet and if_attach()es the ifnet to the vnet specified as 2nd arg. */ -static int +static void if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { - int rc; - /* * Detach from current vnet, but preserve LLADDR info, do not * mark as dead etc. so that the ifnet can be reattached later. - * If we cannot find it, we lost the race to someone else. */ - rc = if_detach_internal(ifp, true); - if (rc != 0) - return (rc); + if_detach_internal(ifp, true); /* * Perform interface-specific reassignment tasks, if provided by @@ -1288,7 +1281,6 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) CURVNET_SET_QUIET(new_vnet); if_attach_internal(ifp, true); CURVNET_RESTORE(); - return (0); } /* @@ -1299,8 +1291,7 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) { struct prison *pr; struct ifnet *difp; - int error; - bool found __diagused; + bool found; bool shutdown; MPASS(ifindex_table[ifp->if_index].ife_ifnet == ifp); @@ -1347,16 +1338,15 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) } /* Move the interface into the child jail/vnet. */ - error = if_vmove(ifp, pr->pr_vnet); + if_vmove(ifp, pr->pr_vnet); - /* Report the new if_xname back to the userland on success. */ - if (error == 0) - sprintf(ifname, "%s", ifp->if_xname); + /* Report the new if_xname back to the userland. */ + sprintf(ifname, "%s", ifp->if_xname); sx_xunlock(&ifnet_detach_sxlock); prison_free(pr); - return (error); + return (0); } static int @@ -1365,7 +1355,7 @@ if_vmove_reclaim(struct thread *td, char *ifname, int jid) struct prison *pr; struct vnet *vnet_dst; struct ifnet *ifp; - int error, found __diagused; + int found __diagused; bool shutdown; /* Try to find the prison within our visibility. */ @@ -1406,16 +1396,15 @@ if_vmove_reclaim(struct thread *td, char *ifname, int jid) found = if_unlink_ifnet(ifp, true); MPASS(found); sx_xlock(&ifnet_detach_sxlock); - error = if_vmove(ifp, vnet_dst); + if_vmove(ifp, vnet_dst); sx_xunlock(&ifnet_detach_sxlock); CURVNET_RESTORE(); - /* Report the new if_xname back to the userland on success. */ - if (error == 0) - sprintf(ifname, "%s", ifp->if_xname); + /* Report the new if_xname back to the userland. */ + sprintf(ifname, "%s", ifp->if_xname); prison_free(pr); - return (error); + return (0); } #endif /* VIMAGE */ From nobody Tue Feb 4 15:06:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnRWt0t0Lz5mxCd; Tue, 04 Feb 2025 15:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnRWs6J9bz4Gtj; Tue, 04 Feb 2025 15:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738681561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGOHgQk2B5+73WplgR8lwBda922wkE1ajh+i8LIq4PQ=; b=rnUkjtzEpYnMAN5n96Z/SOYwEBS2OBYhRQYaE4qYmC/QdCnMHDeeIxrcWHQwDJN7mB40Rx W9ibD/y+a2YD3kuoDEvzKBZMtDUzSYhF8xhiT10xPOFrUqGpNIZuJe95YvevyAv53OBVbt NhSNie/ByFurED/eUNUSBcie6houBxe/CbSLxHm3vUfZ5/uJsANg6xMtP7tlE26rpuiaWY Htd+IbH6XsOCwAnelIsv/JZ+tHGhKyymfGhGDcpcMCO+UJEmtOvSYxZTN5cNq2pMXn3DbL ZfmVpbStRoRGOQI/GFdNvp/+iiUtaGzPei8WvRAaOBAGyYY2a9lFTltNqJpUUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738681561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGOHgQk2B5+73WplgR8lwBda922wkE1ajh+i8LIq4PQ=; b=E9mqjrb+IGedroqgICMPYJeqrebBobgTyqqupNLDBEs65eOvYUYd2AxhEIka7ain07uLRm L00KxT3TKRv6rIiRZbQbD6eASkIvtQ33gM1yrrjzhV8YvZwV4fhp9CuyUMBAOwi80ymON0 36ZxzYPFN8Pw8aDmnKgf7/0b1IoUNUoFgxuNnw5EGYFXriaQUXYqptYrkn6Fq97sg3WMP+ FH3FXf1VIiBA/dPdnNlxDieCQPkkwv1n/V6fjLOMx/VzEYZMC70DR57FkEg4+o1JcwHOom h+Qg4j4IJws5iHWT+s4tVApQqjhmWElqYbdU9NtT/522aeSjGDsmTvE1ufRPSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738681561; a=rsa-sha256; cv=none; b=DMK8tqGng/HOTSm4KiIOoiHJZ1v427qb9akpC7vaXBZuDsvAvpLV/0bbwfumVBig/TxBCd 0/EtPADUrLPGH1f01l7ifcMbxptdqb2Aun0TA3Wjkm8Ny0DiBMhObbhCj0L80PsYlGsygf SiR4b86yZGbXngAg1CBX1HE/L4w3/anbzaF+nNAWy+MN68Kv8Z+ws1YjTAQi0UlOSIU0dd qSSCXTplIA3YiPu2NkTY3xwmNVxulPo+is5W4CAXVpahgThdhw4XR1c/OEMt9fm5XSrswj ZyMsq8ctvdg7ag+A/M7TX+GUs4IZP1RJtTVR9YFprf30enUHENnnx7eAMd38pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnRWs5KNHz1Q9Q; Tue, 04 Feb 2025 15:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514F614k041435; Tue, 4 Feb 2025 15:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514F616k041432; Tue, 4 Feb 2025 15:06:01 GMT (envelope-from git) Date: Tue, 4 Feb 2025 15:06:01 GMT Message-Id: <202502041506.514F616k041432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 1ed9b381d470 - main - ifnet: Detach BPF descriptors on interface vmove event List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ed9b381d4701fc9f66741256e93b96e22273217 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed9b381d4701fc9f66741256e93b96e22273217 commit 1ed9b381d4701fc9f66741256e93b96e22273217 Author: Zhenlei Huang AuthorDate: 2025-02-04 15:04:59 +0000 Commit: Zhenlei Huang CommitDate: 2025-02-04 15:04:59 +0000 ifnet: Detach BPF descriptors on interface vmove event When an interface is moving to/from a vnet jail, it may still have BPF descriptors attached. The userland (e.g. tcpdump) does not get noticed that the interface is departing and still opens BPF descriptors thus may result in leaking sensitive traffic (e.g. an interface is moved back to parent jail but a user is still sniffing traffic over it in the child jail). Detach BPF descriptors so that the userland will be signaled. Reviewed by: ae MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45727 --- sys/net/bpf.c | 27 +++++++++++++++++++++++++++ sys/net/bpf.h | 1 + sys/net/if.c | 5 +++++ 3 files changed, 33 insertions(+) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a7d17109ed1a..a7e5bda97e23 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2847,6 +2847,33 @@ bpf_get_bp_params(struct bpf_if *bp, u_int *bif_dlt, u_int *bif_hdrlen) return (0); } + +/* + * Detach descriptors on interface's vmove event. + */ +void +bpf_ifdetach(struct ifnet *ifp) +{ + struct bpf_if *bp; + struct bpf_d *d; + + BPF_LOCK(); + CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) { + if (bp->bif_ifp != ifp) + continue; + + /* Detach common descriptors */ + while ((d = CK_LIST_FIRST(&bp->bif_dlist)) != NULL) { + bpf_detachd_locked(d, true); + } + + /* Detach writer-only descriptors */ + while ((d = CK_LIST_FIRST(&bp->bif_wlist)) != NULL) { + bpf_detachd_locked(d, true); + } + } + BPF_UNLOCK(); +} #endif /* diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 38c5da0dcb58..654d6c00199e 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -428,6 +428,7 @@ void bpfdetach(struct ifnet *); bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); +void bpf_ifdetach(struct ifnet *); #endif void bpfilterattach(int); diff --git a/sys/net/if.c b/sys/net/if.c index 504550414bb7..283da94e7601 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1262,6 +1262,11 @@ finish_vnet_shutdown: static void if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { + /* + * Detach BPF file descriptors from its interface. + */ + bpf_ifdetach(ifp); + /* * Detach from current vnet, but preserve LLADDR info, do not * mark as dead etc. so that the ifnet can be reattached later. From nobody Tue Feb 4 15:16:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnRm22Gfcz5myKT; Tue, 04 Feb 2025 15:16:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnRm14ZYqz4KSM; Tue, 04 Feb 2025 15:16:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id fHnLtqhO7yLQGfKfAt71NU; Tue, 04 Feb 2025 15:16:32 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id fKf8tu1Vwl5eGfKf9tr0k7; Tue, 04 Feb 2025 15:16:32 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=EO6l0EZC c=1 sm=1 tr=0 ts=67a22f50 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=Ny0wPEL5L6wN-3XeyscA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 6B9E716C; Tue, 04 Feb 2025 07:16:30 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 3A038223; Tue, 04 Feb 2025 07:16:30 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jose Luis Duran cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 88d448ec815c - main - mk: Move vm stack test debug symbols In-reply-to: <202502041448.514EmPpS004525@gitrepo.freebsd.org> References: <202502041448.514EmPpS004525@gitrepo.freebsd.org> Comments: In-reply-to Jose Luis Duran message dated "Tue, 04 Feb 2025 14:48:25 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Feb 2025 07:16:30 -0800 Message-Id: <20250204151630.3A038223@slippy.cwsent.com> X-CMAE-Envelope: MS4xfH6qT9JR9nD/RlrwKHZ12xDcPIacHI7TYWrg2h7v5MTBZnTBXZbvLTUs2b6tINHfP2yJ5Bz5QG0X6+lXM1erXPnSHSPVwaK0Y7wQV6vKpxMxR1cAHxTo VvcyRcrsZVwOEmLX1iV5E1OAaaUUuLpPWc3PDcJQtVLGcCx70svD6aEwAesloVTK/qm1UclRF7OJ5E5j6238hG01tQbauGYcDG5yj2aCgc9o1mXx4k7SDLfO 7QI9m0skQ+qnQRz2qX67il4aVHvWy6M3QVUc/xGKMp+eytF3V+r8DbzDBm2lp+l6z7r2yWzy8vOQ+xihwld4cvkCzadLTUWq5a6kA4upQPU= X-Rspamd-Queue-Id: 4YnRm14ZYqz4KSM X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message <202502041448.514EmPpS004525@gitrepo.freebsd.org>, Jose Luis Duran w rites: > The branch main has been updated by jlduran: > > URL: https://cgit.FreeBSD.org/src/commit/?id=88d448ec815c1fda27be94846f88ccd9 > 6251febd > > commit 88d448ec815c1fda27be94846f88ccd96251febd > Author: Jose Luis Duran > AuthorDate: 2025-02-04 14:47:24 +0000 > Commit: Jose Luis Duran > CommitDate: 2025-02-04 14:47:24 +0000 > > mk: Move vm stack test debug symbols > > Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by > placing sys/vm/stack test debug symbols under /usr/lib/debug. > > Reviewed by: emaste > Approved by: emaste (mentor) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D48796 > --- > ObsoleteFiles.inc | 3 +++ > share/mk/bsd.lib.mk | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index e17ca9608cca..aff94af72c17 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -51,6 +51,9 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20250204: sys/vm/stack test symbols moved to /usr/lib/debug > +OLD_DIRS+=usr/tests/sys/vm/stack/.debug > + > # 20250129: libdevinfo bumped to version 7 > OLD_LIBS+=lib/libdevinfo.so.6 > > diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk > index cf8057907a1f..a4b2e4d11125 100644 > --- a/share/mk/bsd.lib.mk > +++ b/share/mk/bsd.lib.mk > @@ -254,7 +254,8 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full > # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory > .if ${_SHLIBDIR} == "/boot" ||\ > ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ > - ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" > + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" || > + ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests" > DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} > .else > DEBUGFILEDIR=${_SHLIBDIR}/.debug > This broke buildworld. make[5]: "/opt/src/git-src/share/mk/bsd.lib.mk" line 255: Malformed conditional '${_SHLIBDIR} == "/boot" || ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" || ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" ||' in /opt/src/git-src/kerberos5/lib/libasn1/Makefile:129 in directory /opt/src/git-src/kerberos5/lib/libasn1 This patch will fix it. diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index a4b2e4d11125..b7d6b333523b 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -254,7 +254,7 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory .if ${_SHLIBDIR} == "/boot" ||\ ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ - ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" || + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" ||\ ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests" DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} .else -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Feb 4 15:19:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnRqX6gcvz5myR7; Tue, 04 Feb 2025 15:19:36 +0000 (UTC) (envelope-from jlduran@gmail.com) Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnRqX1zdBz4KgN; Tue, 04 Feb 2025 15:19:36 +0000 (UTC) (envelope-from jlduran@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-6f6f61102adso1267577b3.1; Tue, 04 Feb 2025 07:19:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738682374; x=1739287174; h=content-transfer-encoding:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6wY16snSTGwt+8DStE4u7MIvHdy77ec6qiifeE3c3hU=; b=QZL+I29zgPjFdQYpGa5A6+BhmDpPApwktAOU+6fs4fFj/5IEkWvjNIO5FfLx5mOyoW NB4CMZpGbakY7gPznwagQNytwyr+eOTax0MDePnKQppt9zUmRBwa4hoyiQ4Tymr962ql Di0Rxz8FG2KFHBATV5JPEZG6rkGaa0xvVV9SNunpYFNbdbeQfkt+kEqKOxGa0GebiOX8 Dsty7OUXmEIM5HCSBhWLPpYbCCk0KJXNr6iK1Lo3y9OAjvK2dGSiVAt89Ry3K+qoW6JA u70rDnoSQy+iJEV52Nrlab3q1xh4MMyNrPe7wsRwsB/FZqe/9krkYCi202i+7Hn/G+RU p5sA== X-Forwarded-Encrypted: i=1; AJvYcCV6cah7q/Q9pZNR/SE3Pr4A3x4EZeU2lUrC5bHobxkABeo3++kH5CLl6mNtZJMIq+JW0WgIEaNeqrh7CTOSgYFxHZop@freebsd.org, AJvYcCWpyaHNKDM68ScyZXsEB7cfmRBDem29/GFOr/o9TH73ilaGm3uCOZSXWv9pJWejGetJByVkfpyhdcdjC1l2J1WJjatue1Q=@freebsd.org X-Gm-Message-State: AOJu0YzlpURfuNUgT6VinpCJZ6kUyRzudxEmrarW6vuOVmUqDJMdwkEw 4rlUt7BsuWhqlDnaAJ4zXn8q6V+uDnF5ACGlg4t22T9czW9VN31b509btVfg X-Gm-Gg: ASbGncuesxBgF3AnzVIqR5tfUWxIQ7yxZZTWQ9D+fct7lYbS+UNCDAuH5nHkaagUpor jwgpoopahkQVIkI6tZPqnrSOrKk1DDLtAYQYuH3SrtL4y9/jrF0N+XXfSoFNbHmZooYGWbAzfNE 7HwNq8uXdZtgXdHl8TsEjU+5qv9BlSRkCBj8efT0DFFXVOJ3nxpb8KcdXOcpMeHiv79r9sFSaCh G4zetcf2knctlzXAhtylVF5AY/KXbVPZhLy5bZqELOjytVvuNFaiVnBnD2wq2gzoL1Px02hWuYI fZ1gHlVTybNMyvkDpiJNV0+T1otFAir38272u2nIdj2MVF1g/3vT8fFn X-Google-Smtp-Source: AGHT+IGXBAAVsDEFGBJGuSHriubqV0WUuHDtJs0o+JqMfYr69YBmdRSAm/Z3CYSL1s4i3K89D/fOPA== X-Received: by 2002:a05:690c:112:b0:6ef:4f47:f21b with SMTP id 00721157ae682-6f976c73cf7mr16860547b3.5.1738682374603; Tue, 04 Feb 2025 07:19:34 -0800 (PST) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6f97eca9735sm1792607b3.1.2025.02.04.07.19.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2025 07:19:34 -0800 (PST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6f7d5f131d4so1131437b3.0; Tue, 04 Feb 2025 07:19:34 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUX7TxWgtgZMfwS2FoRINQwsjHDqGtq06I3D/9pl9DnmzFuYXr7MfrIVSv2S5Vot2yTSZnRHUEo011UCxkcc7v6+WMvNeg=@freebsd.org, AJvYcCWTcJ0FmhCmepR5jk0xuKckvfxizTyEqSnV8TUVDukdhpwec+oL7jKLuY2PO4oXn31Vx3AxGArA7i74Jx6NbDu/e9dk@freebsd.org X-Received: by 2002:a05:690c:660e:b0:6ef:5754:49e5 with SMTP id 00721157ae682-6f976b28c5cmr17004367b3.2.1738682374014; Tue, 04 Feb 2025 07:19:34 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202502041448.514EmPpS004525@gitrepo.freebsd.org> <20250204151630.3A038223@slippy.cwsent.com> In-Reply-To: <20250204151630.3A038223@slippy.cwsent.com> Reply-To: jlduran@freebsd.org From: Jose Luis Duran Date: Tue, 4 Feb 2025 12:19:23 -0300 X-Gmail-Original-Message-ID: X-Gm-Features: AWEUYZmvfn1aNOyVHh-PG_OB-R4NdV4AS6xDUVv-clFWD8xB83G_qfq49wu5yjc Message-ID: Subject: Re: git: 88d448ec815c - main - mk: Move vm stack test debug symbols To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4YnRqX1zdBz4KgN X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Thank you, it was a last-minute mistake! Will fix it! On Tue, Feb 4, 2025 at 12:16=E2=80=AFPM Cy Schubert wrote: > > In message <202502041448.514EmPpS004525@gitrepo.freebsd.org>, Jose Luis > Duran w > rites: > > The branch main has been updated by jlduran: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D88d448ec815c1fda27be9484= 6f88ccd9 > > 6251febd > > > > commit 88d448ec815c1fda27be94846f88ccd96251febd > > Author: Jose Luis Duran > > AuthorDate: 2025-02-04 14:47:24 +0000 > > Commit: Jose Luis Duran > > CommitDate: 2025-02-04 14:47:24 +0000 > > > > mk: Move vm stack test debug symbols > > > > Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by > > placing sys/vm/stack test debug symbols under /usr/lib/debug. > > > > Reviewed by: emaste > > Approved by: emaste (mentor) > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D48796 > > --- > > ObsoleteFiles.inc | 3 +++ > > share/mk/bsd.lib.mk | 3 ++- > > 2 files changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > > index e17ca9608cca..aff94af72c17 100644 > > --- a/ObsoleteFiles.inc > > +++ b/ObsoleteFiles.inc > > @@ -51,6 +51,9 @@ > > # xargs -n1 | sort | uniq -d; > > # done > > > > +# 20250204: sys/vm/stack test symbols moved to /usr/lib/debug > > +OLD_DIRS+=3Dusr/tests/sys/vm/stack/.debug > > + > > # 20250129: libdevinfo bumped to version 7 > > OLD_LIBS+=3Dlib/libdevinfo.so.6 > > > > diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk > > index cf8057907a1f..a4b2e4d11125 100644 > > --- a/share/mk/bsd.lib.mk > > +++ b/share/mk/bsd.lib.mk > > @@ -254,7 +254,8 @@ SHLIB_NAME_FULL=3D${SHLIB_NAME}.full > > # Use ${DEBUGDIR} for base system debug files, else .debug subdirector= y > > .if ${_SHLIBDIR} =3D=3D "/boot" ||\ > > ${SHLIBDIR:C%/lib(/.*)?$%/lib%} =3D=3D "/lib" ||\ > > - ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} =3D=3D "= /usr/lib" > > + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} =3D=3D "/usr/lib"= || > > + ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} =3D=3D "/usr/tests" > > DEBUGFILEDIR=3D${DEBUGDIR}${_SHLIBDIR} > > .else > > DEBUGFILEDIR=3D${_SHLIBDIR}/.debug > > > > This broke buildworld. > > make[5]: "/opt/src/git-src/share/mk/bsd.lib.mk" line 255: Malformed > conditional '${_SHLIBDIR} =3D=3D "/boot" || ${SHLIBDIR:C%/lib(/.*)?$%/lib= %} =3D=3D > "/lib" || ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} =3D=3D "/usr/l= ib" ||' > in /opt/src/git-src/kerberos5/lib/libasn1/Makefile:129 > in directory /opt/src/git-src/kerberos5/lib/libasn1 > > This patch will fix it. > > diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk > index a4b2e4d11125..b7d6b333523b 100644 > --- a/share/mk/bsd.lib.mk > +++ b/share/mk/bsd.lib.mk > @@ -254,7 +254,7 @@ SHLIB_NAME_FULL=3D${SHLIB_NAME}.full > # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory > .if ${_SHLIBDIR} =3D=3D "/boot" ||\ > ${SHLIBDIR:C%/lib(/.*)?$%/lib%} =3D=3D "/lib" ||\ > - ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} =3D=3D "/usr/lib" |= | > + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} =3D=3D "/usr/lib" |= |\ > ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} =3D=3D "/usr/tests" > DEBUGFILEDIR=3D${DEBUGDIR}${_SHLIBDIR} > .else > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > --=20 Jose Luis Duran From nobody Tue Feb 4 15:24:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnRxM31MDz5myXL; Tue, 04 Feb 2025 15:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnRxM2Hlgz4MKr; Tue, 04 Feb 2025 15:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738682679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBPlSqo6okbBgBaAV8qwjiVdHL8nklijfpepQHQNJ8g=; b=C6mbqf9s/M6084uO75aoE0J0/XamNQrisZp4uPdFLcgQgY5nZfd3/rZ1BE17ADsbuuzQvU 3nglxRw7bdv6t3a9Q3m+TCG8HqpN6wpRrtK5mVW7XrtRtSmyUZTYwrHBhrRTchVNtkXb6P 3/7f/oxWPrclLihhjvRjExaJt5Mohs5QVcPXgta0qgSCTZlTHBreD21bj1yp8r8yNdLjbM OA/5TnnG9EQY+gJMfUg6DvsJjVomZYWCFvymWyUhks/DN+gpZqbPEy44Eqic5/ekBEXhHa TImVjMNhZg1/cFGdbfp+t56RmH2Rbw5lc3omvEdj59kZvVeluWh3ZHF9wKmOYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738682679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBPlSqo6okbBgBaAV8qwjiVdHL8nklijfpepQHQNJ8g=; b=x0NSK/t34p8R8/TrOpPROSXl7l/GdpYw9+u/xeJL2hf+baL2JnCPxN/65zX4JrAzgLBU+m vf2Ej8WGCOOWPFXUYGdQ2hR1HPpsnBQbuB+gYVyHCOuUcsdz7qzU5GCLiCi2eLyNNNBIpk 8Ne5nj0NyKlewUb4Kd9yUPYI+vv2H++wo/u1cCsaFUF90e059w8vexiJaixDBY3sCDUJMQ 35quE6jW7d9/mTiiSPDHFVxhCIXZRfMtrkdZyVOa/TdCaAmUHL9cDSWjk8fQBjgnhjgXNp i7hgIn+/jdtkb0x1f71LEPYKc557ClXMX72fx8sV37F10tRZwmzgy5TnZKYz5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738682679; a=rsa-sha256; cv=none; b=IWoNrZfj8K7d3sIuBScUTrcVvYIMmvP/qgwZ4RQcVpH2hJIpjbB1ZK3T2s+E+FgWmX/Enr /WhAEIA6oWU7y/Q8Yzp2hPyUb3Q8U4zOpEnN2cjUIdeDvCANdzIDtCEx6D+SPpYQzta5J+ 22dkldKWvTisG4y6wIKFnnUYnSAt36JjdF9nY8zX7DcVQxm9koOL16IvOHsSNLZeiR3qud 3ec4YcbRsNqeHi1frcVUgD87A56iJmBdqk9O/m9xv3GSVS4L8YbP66JYyHatGzFwjCSbn+ yhb++teXjt1ckJHE9/46djJVQT7g2AZQggFT4zLjnqJrQkO67qFQhwfQ8X7EFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnRxM1qsQz1Qjr; Tue, 04 Feb 2025 15:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514FOdJm078633; Tue, 4 Feb 2025 15:24:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514FOdhK078630; Tue, 4 Feb 2025 15:24:39 GMT (envelope-from git) Date: Tue, 4 Feb 2025 15:24:39 GMT Message-Id: <202502041524.514FOdhK078630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 955f974a1a37 - main - mk: Add missing escape character List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 955f974a1a37cf3ae8b241327b1fef74c8932855 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=955f974a1a37cf3ae8b241327b1fef74c8932855 commit 955f974a1a37cf3ae8b241327b1fef74c8932855 Author: Jose Luis Duran AuthorDate: 2025-02-04 15:19:50 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-04 15:23:25 +0000 mk: Add missing escape character Add a missing escape character that splits a long line to avoid breaking the builds. Reported by: cy Approved by: emaste (mentor) Fixes: 88d448ec815c ("mk: Move vm stack test debug symbols") MFC after: 1 week --- share/mk/bsd.lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index a4b2e4d11125..b7d6b333523b 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -254,7 +254,7 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory .if ${_SHLIBDIR} == "/boot" ||\ ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ - ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" || + ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" ||\ ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests" DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} .else From nobody Tue Feb 4 16:58:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnV224Tmrz5n66g; Tue, 04 Feb 2025 16:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnV223VHzz3Rp1; Tue, 04 Feb 2025 16:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738688330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJs9LloLY4qr85+DdhGC05cOHqnwSZ9h3skg8FGMKZw=; b=kj3V32eLEDRINiOPlXFiW+K9bVhk/zvQGkFLV1KXcwu7Jo5qJ29Tx1siPZimo5hfniccjv JExuO41L3UCxYXcFQlv+eJe9EwmUZULEYtISXr4zdHJW6sffLR6h4umdMRRTs0wOJgp+CT HSMzC6D98gSF2r6g+tIkSd+8V6kAMfi8fh7jvfJDzI8fX8LOy5ESOByUI3cgwfeE9CD9kC F4PeH/mCrV9H/JdWpc7/+AVq+Jt4VEsxJ+BOjeyn1a519rtPxtT+wsHQdr9lujMcWbfm18 FfB7wEBEt2Spm09AnKlgcNerWWlDQ5A5NsrovXNfY/DbjbD8oxMl5MGY/na/qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738688330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJs9LloLY4qr85+DdhGC05cOHqnwSZ9h3skg8FGMKZw=; b=PzH9zB8iCYhEtBeVReCdhsg+MC/YphoMUH700LQdMtPH8gfS2K3tVgr+2qrqZRUXol9BgJ k98CqMVBh6BhJbyrbzme0kkLjx3kbxWdL8GZMXdi3Y2YHPyyofR1F+9A4sSfITI+8yAC61 IyL1tP+GVopuGhtlOhePAvpRXaagj+Q8OFXWylj/zwmClIWRwDzMJ7Nr6EdX7U/eT3bbNp d9gaLQDffpPPY6yjmtINYYMeWHO4ECIzLcme3As5Ts18pvHXLFntc7hi6VhlU85Ul2Ecrr TDDU6R6BSlcoI1BfY/qIcjcNTXSjhEUNfn0fobFgBmUph1zTy669eHe1k5pA2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738688330; a=rsa-sha256; cv=none; b=lLkl5fVI3eruN1p9qcNT+iUVn7ypDw+iMN0hJhQ+BJidljcqeDaZ/m8/8SjEGxNmdxRBiH 1QqKXGcVPoQGTizj0fMLg3vtW81ppaW6sANBrwkoqWpao05lYJ1Xb+E02lqR3sT0d9vT3u nfNMDpCz8D73NxOUlG99/wff3OtjKepSIU9DZOEc7/+sz1stcQWhHyDogz7SFPYmLyK5me FFEKHo+znkOYH278nk1Pjv1oE+tIcFlmOmcrPex74nY5X116jImIBPgoCY3PR5ap4Ect0/ knd9S4CnVyW5D+i7AvElFnULQdWFCamdIbeSqkrQf6vx9mor3i6S40Z9TvgB+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnV222trlzWD; Tue, 04 Feb 2025 16:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514GwoAN049204; Tue, 4 Feb 2025 16:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514Gwo4I049201; Tue, 4 Feb 2025 16:58:50 GMT (envelope-from git) Date: Tue, 4 Feb 2025 16:58:50 GMT Message-Id: <202502041658.514Gwo4I049201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ecccb638d494 - main - mountd: Promote missing netmask log to LOG_ERR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecccb638d494f2642f1e2eae8ad932ba70567ccc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ecccb638d494f2642f1e2eae8ad932ba70567ccc commit ecccb638d494f2642f1e2eae8ad932ba70567ccc Author: Ed Maste AuthorDate: 2025-02-01 13:16:47 +0000 Commit: Ed Maste CommitDate: 2025-02-04 16:58:41 +0000 mountd: Promote missing netmask log to LOG_ERR Historical network classes are deprecated, but currently still supported in mountd with a LOG_WARNING-priority message added by Mike Karels in 2021. Upgrade the log to LOG_ERR well in advance of this becoming a fatal error. Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48795 --- usr.sbin/mountd/mountd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 4457a925c2ed..19d76b72da10 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -1806,7 +1806,7 @@ get_exportlist_one(int passno) len = endcp - cp; } if (opt_flags & OP_CLASSMASK) - syslog(LOG_WARNING, + syslog(LOG_ERR, "WARNING: No mask specified for %s, " "using out-of-date default", (&grp->gr_ptr.gt_net)->nt_name); From nobody Tue Feb 4 17:11:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnVWV0pyPz5n7Q4; Tue, 04 Feb 2025 17:20:54 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnVWT12ktz3W8m; Tue, 04 Feb 2025 17:20:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id fLxvtbNNRxv7PfMbUtfqHB; Tue, 04 Feb 2025 17:20:52 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id fMbTtNqCsJhBPfMbUt2jYI; Tue, 04 Feb 2025 17:20:52 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=67a24c74 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=iaO6b-da03RWclYSbCMA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A808F64; Tue, 04 Feb 2025 09:20:50 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 8EA2C281; Tue, 04 Feb 2025 09:11:21 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ecccb638d494 - main - mountd: Promote missing netmask log to LOG_ERR In-reply-to: <202502041658.514Gwo4I049201@gitrepo.freebsd.org> References: <202502041658.514Gwo4I049201@gitrepo.freebsd.org> Comments: In-reply-to Ed Maste message dated "Tue, 04 Feb 2025 16:58:50 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Feb 2025 09:11:21 -0800 Message-Id: <20250204171121.8EA2C281@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDwYVEEbXW3Z85u6k6ynXCISDif8iNxIquCBSrKxkJBOeustRP7tI5SW6Raq5tydSHGxkFXe6LkZyiR8ShQfQt0HCa75KuziTDkmlxE2L339YHzQUvIU nMTagAhJ+V1UAteIWdqME4YKtDxIYePkdvzF02rylM2p9XKqRvQzzy52GYu3F1ouaHpScD5UvYtBR2aXp+l0WEDI6feDcJUdVZLoPzdWMeUBu9OzpI1k4cm1 wSENOgAltIRDnqIo3GovQ+S2YHLcd9/I27Bn/VvJRXr557jp43XsDmvZMrIcFJQ7EUeTzAP62BqQXEki8V/5PRwiRggf5bq+qjGK3h0owu4= X-Rspamd-Queue-Id: 4YnVWT12ktz3W8m X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message <202502041658.514Gwo4I049201@gitrepo.freebsd.org>, Ed Maste writes: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ecccb638d494f2642f1e2eae8ad932ba > 70567ccc > > commit ecccb638d494f2642f1e2eae8ad932ba70567ccc > Author: Ed Maste > AuthorDate: 2025-02-01 13:16:47 +0000 > Commit: Ed Maste > CommitDate: 2025-02-04 16:58:41 +0000 > > mountd: Promote missing netmask log to LOG_ERR > > Historical network classes are deprecated, but currently still supported > in mountd with a LOG_WARNING-priority message added by Mike Karels in > 2021. Upgrade the log to LOG_ERR well in advance of this becoming a > fatal error. > > Reviewed by: rmacklem > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D48795 > --- > usr.sbin/mountd/mountd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c > index 4457a925c2ed..19d76b72da10 100644 > --- a/usr.sbin/mountd/mountd.c > +++ b/usr.sbin/mountd/mountd.c > @@ -1806,7 +1806,7 @@ get_exportlist_one(int passno) > len = endcp - cp; > } > if (opt_flags & OP_CLASSMASK) > - syslog(LOG_WARNING, > + syslog(LOG_ERR, > "WARNING: No mask specified for %s, " Should this be changed from WARNING to ERROR too? > "using out-of-date default", > (&grp->gr_ptr.gt_net)->nt_name); > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Feb 4 17:30:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnVkT1dknz5n8HK; Tue, 04 Feb 2025 17:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnVkS601jz3YDP; Tue, 04 Feb 2025 17:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738690224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03N9lbPezaTw5L3oOt10FicG2HTi3CgsN5+OlYRppec=; b=yuEsXOQ9D0HXfn+fwiZd/+qogMU6MyewQdzpfFpRXWfiSC75IR66Z+SB0qa+ai5Eip3Mn9 NRb8dWapmn/ARhTz4cFxt08bTjZMFzUZZ4U7uLc62ZiRxp8qtocelzrpkbI+UvG7JvDFL2 5+1BY0F0gCqa+bGCXudIXn2C1zQeOq9ofo41Wu6W2+qh/le6dAKJfkERCnR2t7Njbv29vz PBzOEF5m7CCBWOBHjuTxao6m6yns8rcq6/uP6fNeZZGggz3EPumfzzTWiVZR5Dy2Oy0doE t0MmzvOHmKyFAgBTPw5bDd8dnkB/kmClve7ohNRf/yCiABJtEc1cyi1nu6eHuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738690224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03N9lbPezaTw5L3oOt10FicG2HTi3CgsN5+OlYRppec=; b=oyda+s4T53FaUHg77bKj95Dtf+daMZl/BNw1h8RnL+1X2iNtZhnhDWlDJqEBGXG2e0IEsj MV8H5+/2+qjnOVOND0tNg5yQM1TKw/UIqH9w0B6Aqp0xzbwHXudXLmr5b797fWlCObibWD X9ogVdB+QoV/IIOL6Hf7gAAToLj0HyvFnS1/4On3r7bUQ6OPjXiM6hcDWyf5IL/OofHTmM Pn1y8MPnl6GxF+ozS5D+yu3fIbEVmD8LHMgxUVdhD5efHCTSAsr7eyLYx5Wn/nkNPepmxA IcoVztypTXQNZ6fzNYrtMjWlXCwhhDj8AtOxLvL+TZiz85YUmVPbexCw1G43Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738690224; a=rsa-sha256; cv=none; b=f1fUNBmvYUf8IXhdK1+PXmi0Nd6eYQzOlhxnJ9nfBSv6P+zoD4IOQeMl0G9q+ACqCn3ege ePjxmAdDZjoLrp/2BXNkN0JRCeS8qUeWGuhYIgY8CvxJwDBA2CuHfJUVGpzf3bFEA3BRSs tkPXGfyZCmV88ezgtq029j6E+H+XtTakns6jM4XDMj8Izjzzx5J1PkRdOG9kzjhsRaCkxP XlNUs2pSRflIZ+aeYhEBqqma3drtvWsXjsiCq2ycguKYY4DYRaHmMDK33n9ANBhbDsRlPt e/sSQAtpfCxlu0copfpCxAKLQR07HXAo9SboRwJINcfJ8MiTet1hDj++6o1CRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnVkS5Wlvz1Lr; Tue, 04 Feb 2025 17:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514HUOb4014933; Tue, 4 Feb 2025 17:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514HUOrA014930; Tue, 4 Feb 2025 17:30:24 GMT (envelope-from git) Date: Tue, 4 Feb 2025 17:30:24 GMT Message-Id: <202502041730.514HUOrA014930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 21c534b9f5d5 - main - riscv: Fix and generalise saving TP (PCPU pointer) whilst in userspace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21c534b9f5d5de07137f9a42e016876dd6ae66c1 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=21c534b9f5d5de07137f9a42e016876dd6ae66c1 commit 21c534b9f5d5de07137f9a42e016876dd6ae66c1 Author: Jessica Clarke AuthorDate: 2025-02-04 17:28:42 +0000 Commit: Jessica Clarke CommitDate: 2025-02-04 17:28:42 +0000 riscv: Fix and generalise saving TP (PCPU pointer) whilst in userspace In cpu_fork, we allocate sizeof(struct pcb) + sizeof(struct trapframe) space on the stack, then round it for stack alignment. This not only fails to include the space needed for TP but also doesn't round up the trapframe allocation to be stack-aligned, yet TF_SIZE does, as is the expectation of fork_trampoline and cpu_exception_handler. Given that sizeof(struct pcb) + sizeof(struct trapframe) is a multiple of 16, this causes the saved TP to be stored in the PCB's pcb_sp (the intended trapframe padding aliasing pcb_ra), which is probably harmless in practice as the PCB isn't expected to be current, but definitely not intended. In cpu_thread_alloc, we do include the 8 bytes for TP and then stack align that. This again fails to include the padding for trapframe as present in TF_SIZE, but sizeof(struct pcb) + sizeof(struct trapframe) happens to be a multiple of 16, as above, so adding 8 then rounding to stack alignment (16) includes an extra 8 bytes of padding, giving the right result for the wrong reason (and could be broken by future struct growth). Extract the calculation into a shared function that rounds correctly regardless of the struct layouts. Also introduce a new struct kernframe to encapsulate and clearly document this shared state rather than using magic constants, and also enable it to be easily extended in future, as we intend to do downstream in CheriBSD. Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48799 --- sys/riscv/include/frame.h | 14 ++++++++++++++ sys/riscv/riscv/exception.S | 4 ++-- sys/riscv/riscv/genassym.c | 4 +++- sys/riscv/riscv/swtch.S | 2 +- sys/riscv/riscv/vm_machdep.c | 35 ++++++++++++++++++++++++----------- 5 files changed, 44 insertions(+), 15 deletions(-) diff --git a/sys/riscv/include/frame.h b/sys/riscv/include/frame.h index f134842d1c45..c70a3a48ee0a 100644 --- a/sys/riscv/include/frame.h +++ b/sys/riscv/include/frame.h @@ -57,6 +57,10 @@ struct trapframe { uint64_t tf_scause; }; +#ifdef _KERNEL +#define TF_SIZE (roundup2(sizeof(struct trapframe), STACKALIGNBYTES + 1)) +#endif + /* * Signal frame. Pushed onto user stack before calling sigcode. */ @@ -65,6 +69,16 @@ struct sigframe { ucontext_t sf_uc; /* actual saved ucontext */ }; +#ifdef _KERNEL +/* + * Kernel frame. Reserved near the top of kernel stacks for saving kernel + * state while in userspace. + */ +struct kernframe { + register_t kf_tp; +}; +#endif + #endif /* !LOCORE */ /* Definitions for syscalls */ diff --git a/sys/riscv/riscv/exception.S b/sys/riscv/riscv/exception.S index 8acb5cd691d4..eb8d92b55d05 100644 --- a/sys/riscv/riscv/exception.S +++ b/sys/riscv/riscv/exception.S @@ -53,7 +53,7 @@ .option pop /* Load our pcpu */ - ld tp, (TF_SIZE)(sp) + ld tp, (TF_SIZE + KF_TP)(sp) .endif sd t0, (TF_T + 0 * 8)(sp) @@ -139,7 +139,7 @@ csrw sscratch, t0 /* Store our pcpu */ - sd tp, (TF_SIZE)(sp) + sd tp, (TF_SIZE + KF_TP)(sp) ld tp, (TF_TP)(sp) /* And restore the user's global pointer */ diff --git a/sys/riscv/riscv/genassym.c b/sys/riscv/riscv/genassym.c index 77966913fd1b..c216c686db9a 100644 --- a/sys/riscv/riscv/genassym.c +++ b/sys/riscv/riscv/genassym.c @@ -85,7 +85,7 @@ ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_MD, offsetof(struct thread, td_md)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); -ASSYM(TF_SIZE, roundup2(sizeof(struct trapframe), STACKALIGNBYTES + 1)); +ASSYM(TF_SIZE, TF_SIZE); ASSYM(TF_RA, offsetof(struct trapframe, tf_ra)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); ASSYM(TF_GP, offsetof(struct trapframe, tf_gp)); @@ -98,6 +98,8 @@ ASSYM(TF_STVAL, offsetof(struct trapframe, tf_stval)); ASSYM(TF_SCAUSE, offsetof(struct trapframe, tf_scause)); ASSYM(TF_SSTATUS, offsetof(struct trapframe, tf_sstatus)); +ASSYM(KF_TP, offsetof(struct kernframe, kf_tp)); + ASSYM(HYP_H_RA, offsetof(struct hypctx, host_regs.hyp_ra)); ASSYM(HYP_H_SP, offsetof(struct hypctx, host_regs.hyp_sp)); ASSYM(HYP_H_GP, offsetof(struct hypctx, host_regs.hyp_gp)); diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index 8312a6b5f347..cfd19a2d76d6 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -419,7 +419,7 @@ ENTRY(fork_trampoline) * Store our pcpup on stack, we will load it back * on kernel mode trap. */ - sd tp, (TF_SIZE)(sp) + sd tp, (TF_SIZE + KF_TP)(sp) ld tp, (TF_TP)(sp) /* Save kernel stack so we can use it doing a user trap */ diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index bd510080e02c..cf9b85493e39 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -57,6 +57,26 @@ #define TP_OFFSET 16 /* sizeof(struct tcb) */ #endif +static void +cpu_set_pcb_frame(struct thread *td) +{ + td->td_pcb = (struct pcb *)((char *)td->td_kstack + + td->td_kstack_pages * PAGE_SIZE) - 1; + + /* + * td->td_frame + TF_SIZE will be the saved kernel stack pointer whilst + * in userspace, so keep it aligned so it's also aligned when we + * subtract TF_SIZE in the trap handler (and here for the initial stack + * pointer). This also keeps the struct kernframe just afterwards + * aligned no matter what's in it or struct pcb. + * + * NB: TF_SIZE not sizeof(struct trapframe) as we need the rounded + * value to match the trap handler. + */ + td->td_frame = (struct trapframe *)(STACKALIGN( + (char *)td->td_pcb - sizeof(struct kernframe)) - TF_SIZE); +} + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -73,13 +93,12 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) /* RISCVTODO: save the FPU state here */ - pcb2 = (struct pcb *)(td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE) - 1; + cpu_set_pcb_frame(td2); - td2->td_pcb = pcb2; + pcb2 = td2->td_pcb; bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); - tf = (struct trapframe *)STACKALIGN((struct trapframe *)pcb2 - 1); + tf = td2->td_frame; bcopy(td1->td_frame, tf, sizeof(*tf)); /* Clear syscall error flag */ @@ -91,8 +110,6 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) tf->tf_sstatus |= (SSTATUS_SPIE); /* Enable interrupts. */ tf->tf_sstatus &= ~(SSTATUS_SPP); /* User mode. */ - td2->td_frame = tf; - /* Set the return value registers for fork() */ td2->td_pcb->pcb_s[0] = (uintptr_t)fork_return; td2->td_pcb->pcb_s[1] = (uintptr_t)td2; @@ -206,11 +223,7 @@ cpu_thread_exit(struct thread *td) void cpu_thread_alloc(struct thread *td) { - - td->td_pcb = (struct pcb *)(td->td_kstack + - td->td_kstack_pages * PAGE_SIZE) - 1; - td->td_frame = (struct trapframe *)STACKALIGN( - (caddr_t)td->td_pcb - 8 - sizeof(struct trapframe)); + cpu_set_pcb_frame(td); } void From nobody Tue Feb 4 17:30:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnVkS62sbz5n81H; Tue, 04 Feb 2025 17:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnVkR4psGz3Y7V; Tue, 04 Feb 2025 17:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738690223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uteB/ZTBz2PXFPC/LMaykclLhUTAemIUA5MySvtOd6A=; b=XiSmH9zAvt7WYpb1hRcNTCeyEZDkVKDg4QtlaQb72ffJ8tWn0+T+h2crZHMhMey6vdcwIc iZ6n794j1I8O8W1am5wfkrLLq0QU+nXa2Hlkx8OCmC6r0tdgaG1CWoNEYU7gUE/Qrm7BzC FPX6UDWtvPiv4ZQ5Ua38bb9dH54IX5tyCUutgwoTn20Zim8CB1puhvWCOJpnYxR27e/oHK DOFcDDBMufTOTtxDM3SP7ilvx2HkgQxhPOcVaeLkMYgh9WfZ9sfj0XSqmwJqMESaahIY6B 77HSoB5CO/upmbSDNfMQOdSwiFaWrw2rfTogI1qGt9wMvgM0MEesTe9QL30x2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738690223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uteB/ZTBz2PXFPC/LMaykclLhUTAemIUA5MySvtOd6A=; b=pv1wI2Cor8u61uL0i5zaXycnwpKHTNbJ7vQEWYHoCk9AfEWAcVxdeSFUjBqEM2/XTXJzFc /odfncpqylFoy2nVWqcFc+PqFtFxSxnaQaJdzUEXEcfLIAVEHd8f++eybrKV0uXDqpXuy8 eA8B5XUgj38mfmESZKqYRMDBm4paw84KQcytJqfqHQf4dAFYOmr82ZGmQiRM1igzKnfFmI 1UgRK+dpVN7+kiS+/rXvb5084R49rA+FCFzA70aTRqC2c0VR+86woJo7W7hNSZhFG+HhM6 c/M4f02ysqBvv8ktghmObytrQ3bk9sszyi1n/vdph/SxehW5L5bNB6tm0dTH2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738690223; a=rsa-sha256; cv=none; b=oMv6ND4i+lJ/43YRgqOH3EC0Wi4A2xmug2/Ia92VUbt4OfwSkxu3YPz7zsF730wq5qjGO1 mLa/VC8euQOsd3FwuGiHiyf0YTu3N11aheDvuKtZtGumjmQ+uiXRfdb4G8PGEFsSY91Sz1 mGCfUEaMF7+0w99oh8Nlkwh8jVfX+HQK5dTgikMzVZkEwRJy0+A2GNv1nsbJUgdche3hzP 2C+9olIyb050YsIKHx4/Rqy2XgyCx2vF+bTacOMTRHarpkjgTwkvEGhCCH2x5gRNhzR3TP fQm/O7LTneJE+4yHXzpuNnWuGZjVq0V1LCSDigLi4HYrMUm5NCR6/SEIcF0GYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnVkR4GxfzxS; Tue, 04 Feb 2025 17:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514HUNQU014898; Tue, 4 Feb 2025 17:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514HUNUc014895; Tue, 4 Feb 2025 17:30:23 GMT (envelope-from git) Date: Tue, 4 Feb 2025 17:30:23 GMT Message-Id: <202502041730.514HUNUc014895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 97350075fe3a - main - bsdinstall: Switched back to amended single-button finalconfig List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97350075fe3a7951b7ef86a63c0a3f033dc03118 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=97350075fe3a7951b7ef86a63c0a3f033dc03118 commit 97350075fe3a7951b7ef86a63c0a3f033dc03118 Author: Jessica Clarke AuthorDate: 2025-02-04 17:27:00 +0000 Commit: Jessica Clarke CommitDate: 2025-02-04 17:27:00 +0000 bsdinstall: Switched back to amended single-button finalconfig Commit ac78e3e9c581 ("bsdinstall: Add "Finish" button to finalconfig") removed the Exit entry from the menu, renamed OK to Select and added a Finish in place of the old Exit entry. On the surface this seemed like a good idea, as at a glance OK wasn't clear that it was selecting an entry rather than just closing the box, Exit isn't the most obvious term to use for proceeding through the installer without doing anything, and it separated out the different cases of "do something extra" and "continue". However, because bsddialog (and dialog) keep a menu entry highlighted even when the Cancel (in this case, Finish) button is selected, this now looks even more confusing, with users easily believing that they are about to select the Add User option (being either surprised when it doesn't actually do that, or being confused about how to not select it). Instead, go back to the old scheme that fits more with bsddialog's supported functionality but tweak it to try and improve on the confusing UI/UX from the past. Specifically, the UI changes compared with the original version are as follows: 1. The OK button is renamed to Select, as in the current UI 2. The Exit entry is renamed to Finish, mirroring the label of the button in the current UI that it replaces This partially reverts commit ac78e3e9c581ac3b695adeec1ae312d619a1402b. Reviewed by: khorben_defora.org Differential Revision: https://reviews.freebsd.org/D47229 --- usr.sbin/bsdinstall/scripts/finalconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/finalconfig b/usr.sbin/bsdinstall/scripts/finalconfig index 68ee16a5330d..c7814a3b6a45 100755 --- a/usr.sbin/bsdinstall/scripts/finalconfig +++ b/usr.sbin/bsdinstall/scripts/finalconfig @@ -36,8 +36,9 @@ while true; do exec 5>&1 REVISIT=$(bsddialog --backtitle "$OSNAME Installer" \ --title "Final Configuration" --ok-label "Select" \ - --cancel-label "Finish" --default-no --menu \ + --no-cancel --menu \ "Setup of your $OSNAME system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ + "Finish" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ "Hostname" "Set system hostname" \ @@ -55,6 +56,9 @@ while true; do fi case "$REVISIT" in + "Finish") + break + ;; "Add User") bsdinstall adduser ;; From nobody Tue Feb 4 18:31:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnX5K6gJdz5mFP6; Tue, 04 Feb 2025 18:31: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnX5K6QRLz3pFK; Tue, 04 Feb 2025 18:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+vfdESU7AZgzjuUL8Iwfam1FbcOR04N+Uom/7peioNo=; b=Xv+skgf8BHLyFhWtzMOAedzUD06vKNTH710HJE24iBx209NojIDfNzJsADiY0ktBrWavmh RkjQn3nsGjy7u92sxNKwSv2bv6xK2hJV88oqGSrkBTD6WiM1yidQVsJuhq/Dy6/1LmLXIY 6ws4Qs1iU23+2flzO/42J3xVYaX4XWDFH+rERBymO/n4FenblnqIrOHC+NwMUzKoOpBXEU rC+5YjyQYd9ebFJxTxscpgW98wzUsNNcFitusKfBJ9ilF1ZI4QOjDcDpcii3Opm1AdpeTr IiGwIbVWTZY++396rnP/T645mLlkuqPK88TYhqB+n4QudW4YVBly6yGDkQ7UmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+vfdESU7AZgzjuUL8Iwfam1FbcOR04N+Uom/7peioNo=; b=WQSqQCHF6Caei87MB9IpLjgL1BoNzt6rMK/EfDlHVQiu4gGyp2bB9msMJyBHTOVwhnp/qm o92/nUbuB9HHnNv3UE4mOuh9y6mU0JVd215iqkIwMb+LAf1+sfq0bSKNpgsAWJCa6mMEJu PH/IWMXAkkPzWQWWHHsbTj02QgdUk4oGvsP4JCdvL1pD+K4MeSjzQkM5ttAIJCKwWlYq4k zHdbVF3bs0a+r9QnW4/JHBCbnAyGfa3/2O9ZuEcQS8JkIOmKQI3KipVPQ6DHDPQLwE7OoX M1EdoKFJ7DviSZlepU1DG/CZ5WCTeOBZiSMYYVteI12ALpb2zQpA4Nh9+qZ0pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738693909; a=rsa-sha256; cv=none; b=P/fmCdDt2/ARk/Adsf5j6UHZKdb0G8PXHDgJzXEPwgQRIsTOOrmJs8eDU9745+t3xBnXaz 4tUT7XUVME1G+e3OSDgbuLFWTFjxv5Er+WJSGcxHFSpQt3CTDuvmcbb5y98/3d07q0tt5F 9wPvvVd46TsK1H2KJTDGC6uwvNJQ9XHIes1l7m6N5xjN0B8/Gy7TwYx2aGC+CepKqpRt7+ cKUfttBuyTKPmf0o/8Uc1AVqmxCxdFTr5dJwoYV401Iqot+yLCfLsZ9BuL9uLfzMc6nh6X 9EjNUPRQfW1DAUlSpi/vmb1FTKGuSYRepz3Me7xUyEFxlK5de6hPlw4fMqqivQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnX5K5ss9z2HB; Tue, 04 Feb 2025 18:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514IVnOS035085; Tue, 4 Feb 2025 18:31:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514IVnx2035082; Tue, 4 Feb 2025 18:31:49 GMT (envelope-from git) Date: Tue, 4 Feb 2025 18:31:49 GMT Message-Id: <202502041831.514IVnx2035082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f5cebe73940c - main - cam/xpt: Put all messages on one line List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5cebe73940cb77df71438fd0aa4876af881a7d6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f5cebe73940cb77df71438fd0aa4876af881a7d6 commit f5cebe73940cb77df71438fd0aa4876af881a7d6 Author: Warner Losh AuthorDate: 2025-02-04 17:01:06 +0000 Commit: Warner Losh CommitDate: 2025-02-04 18:29:38 +0000 cam/xpt: Put all messages on one line Make all error messages from *xpt.c be greppable by putting them on one line, "outdenting" where necessary to keep things under about 90 columns. More of cam could use this treatment, but not finding a message in xpt is what prompted this round. Sponsored by: Netflix --- sys/cam/ata/ata_xpt.c | 39 +++++++++++++++++------------------ sys/cam/cam_iosched.c | 7 +++---- sys/cam/cam_xpt.c | 40 +++++++++++++++++------------------ sys/cam/mmc/mmc_xpt.c | 17 ++++++++------- sys/cam/nvme/nvme_xpt.c | 12 +++++------ sys/cam/scsi/scsi_xpt.c | 55 ++++++++++++++++++++++++------------------------- 6 files changed, 83 insertions(+), 87 deletions(-) diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index 7bdddc98511b..61cffeda6f0c 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -266,16 +266,16 @@ aproberegister(struct cam_periph *periph, void *arg) request_ccb = (union ccb *)arg; if (request_ccb == NULL) { - printf("proberegister: no probe CCB, " - "can't register device\n"); + printf( + "proberegister: no probe CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); } softc = (aprobe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_ZERO | M_NOWAIT); if (softc == NULL) { - printf("proberegister: Unable to probe new device. " - "Unable to allocate softc\n"); + printf( + "proberegister: Unable to probe new device. Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } TAILQ_INIT(&softc->request_ccbs); @@ -1509,8 +1509,8 @@ scan_next: if (status != CAM_REQ_CMP) { if (request_ccb->ccb_h.func_code == XPT_SCAN_LUN) mtx_unlock(mtx); - printf("xpt_scan_bus: xpt_create_path failed" - " with status %#x, bus scan halted\n", + printf( + "xpt_scan_bus: xpt_create_path failed with status %#x, bus scan halted\n", status); xpt_free_ccb(work_ccb); xpt_free_ccb((union ccb *)scan_info->cpi); @@ -1563,8 +1563,8 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path, if (request_ccb == NULL) { request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { - xpt_print(path, "xpt_scan_lun: can't allocate CCB, " - "can't continue\n"); + xpt_print(path, + "xpt_scan_lun: can't allocate CCB, can't continue\n"); return; } status = xpt_create_path(&new_path, NULL, @@ -1572,8 +1572,8 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path, path->target->target_id, path->device->lun_id); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: can't create path, " - "can't continue\n"); + xpt_print(path, + "xpt_scan_lun: can't create path, can't continue\n"); xpt_free_ccb(request_ccb); return; } @@ -1607,8 +1607,8 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path, request_ccb); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: cam_alloc_periph " - "returned an error, can't continue probe\n"); + xpt_print(path, + "xpt_scan_lun: cam_alloc_periph returned an error, can't continue probe\n"); request_ccb->ccb_h.status = status; xpt_done(request_ccb); } @@ -1784,8 +1784,7 @@ ata_action(union ccb *start_ccb) if (start_ccb->ccb_h.func_code != XPT_ATA_IO) { KASSERT((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) == 0, - ("%s: ccb %p, func_code %#x should not be allocated " - "from UMA zone\n", + ("%s: ccb %p, func_code %#x should not be allocated from UMA zone\n", __func__, start_ccb, start_ccb->ccb_h.func_code)); } @@ -1925,9 +1924,9 @@ ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path, if (cts->protocol_version > device->protocol_version) { if (bootverbose) { - xpt_print(path, "Down reving Protocol " - "Version from %d to %d?\n", cts->protocol_version, - device->protocol_version); + xpt_print(path, + "Down reving Protocol Version from %d to %d?\n", + cts->protocol_version, device->protocol_version); } cts->protocol_version = device->protocol_version; } @@ -1950,9 +1949,9 @@ ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path, if (cts->transport_version > device->transport_version) { if (bootverbose) { - xpt_print(path, "Down reving Transport " - "Version from %d to %d?\n", cts->transport_version, - device->transport_version); + xpt_print(path, + "Down reving Transport Version from %d to %d?\n", + cts->transport_version, device->transport_version); } cts->transport_version = device->transport_version; } diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 15e98b7cb39d..a7b7eb3cc4e9 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -1378,8 +1378,7 @@ cam_iosched_get_write(struct cam_iosched_softc *isc) if (bioq_first(&isc->bio_queue) && isc->current_read_bias) { if (iosched_debug) printf( - "Reads present and current_read_bias is %d queued " - "writes %d queued reads %d\n", + "Reads present and current_read_bias is %d queued writes %d queued reads %d\n", isc->current_read_bias, isc->write_stats.queued, isc->read_stats.queued); isc->current_read_bias--; @@ -1487,8 +1486,8 @@ cam_iosched_get_trim(struct cam_iosched_softc *isc) if (do_dynamic_iosched) { if (bioq_first(&isc->bio_queue) && isc->current_read_bias) { if (iosched_debug) - printf("Reads present and current_read_bias is %d" - " queued trims %d queued reads %d\n", + printf( + "Reads present and current_read_bias is %d queued trims %d queued reads %d\n", isc->current_read_bias, isc->trim_stats.queued, isc->read_stats.queued); isc->current_read_bias--; diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 68aa6faae9a3..8428125d5e99 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -723,10 +723,9 @@ xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread * * kernel. */ if (base_periph_found) { - printf("xptioctl: pass driver is not in the " - "kernel\n"); - printf("xptioctl: put \"device pass\" in " - "your kernel config file\n"); + printf( + "xptioctl: pass driver is not in the kernel\n" + "xptioctl: put \"device pass\" in your kernel config file\n"); } } xpt_unlock_buses(); @@ -923,8 +922,9 @@ xpt_init(void *dummy) return (ENOMEM); if ((error = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { - printf("xpt_init: xpt_bus_register failed with errno %d," - " failing attach\n", error); + printf( + "xpt_init: xpt_bus_register failed with errno %d, failing attach\n", + error); return (EINVAL); } @@ -936,8 +936,9 @@ xpt_init(void *dummy) if ((status = xpt_create_path(&path, NULL, CAM_XPT_PATH_ID, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD)) != CAM_REQ_CMP) { - printf("xpt_init: xpt_create_path failed with status %#x," - " failing attach\n", status); + printf( + "xpt_init: xpt_create_path failed with status %#x, failing attach\n", + status); return (EINVAL); } xpt_path_lock(path); @@ -962,8 +963,7 @@ xpt_init(void *dummy) } } if (cam_num_doneqs < 1) { - printf("xpt_init: Cannot init completion queues " - "- failing attach\n"); + printf("xpt_init: Cannot init completion queues - failing attach\n"); return (ENOMEM); } @@ -971,8 +971,7 @@ xpt_init(void *dummy) STAILQ_INIT(&cam_async.cam_doneq); if (kproc_kthread_add(xpt_async_td, &cam_async, &cam_proc, NULL, 0, 0, "cam", "async") != 0) { - printf("xpt_init: Cannot init async thread " - "- failing attach\n"); + printf("xpt_init: Cannot init async thread - failing attach\n"); return (ENOMEM); } @@ -4060,12 +4059,11 @@ xptpathid(const char *sim_name, int sim_unit, int sim_bus) pathid = dunit; break; } else { - printf("Ambiguous scbus configuration for %s%d " - "bus %d, cannot wire down. The kernel " - "config entry for scbus%d should " - "specify a controller bus.\n" - "Scbus will be assigned dynamically.\n", - sim_name, sim_unit, sim_bus, dunit); + printf( +"Ambiguous scbus configuration for %s%d bus %d, cannot wire down. The kernel\n" +"config entry for scbus%d should specify a controller bus.\n" +"Scbus will be assigned dynamically.\n", + sim_name, sim_unit, sim_bus, dunit); break; } } @@ -5036,9 +5034,9 @@ xpt_config(void *arg) if (xpt_create_path(&cam_dpath, NULL, CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN) != CAM_REQ_CMP) { - printf("xpt_config: xpt_create_path() failed for debug" - " target %d:%d:%d, debugging disabled\n", - CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN); + printf( +"xpt_config: xpt_create_path() failed for debug target %d:%d:%d, debugging disabled\n", + CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN); cam_dflags = CAM_DEBUG_NONE; } } else diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 0947e0addf59..b7f1e5bce868 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -283,8 +283,8 @@ mmc_scan_lun(struct cam_periph *periph, struct cam_path *path, path, NULL, 0, request_ccb); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: cam_alloc_periph " - "returned an error, can't continue probe\n"); + xpt_print(path, + "xpt_scan_lun: cam_alloc_periph returned an error, can't continue probe\n"); } request_ccb->ccb_h.status = status; xpt_done(request_ccb); @@ -516,16 +516,16 @@ mmcprobe_register(struct cam_periph *periph, void *arg) request_ccb = (union ccb *)arg; if (request_ccb == NULL) { - printf("mmcprobe_register: no probe CCB, " - "can't register device\n"); + printf( + "mmcprobe_register: no probe CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); } softc = (mmcprobe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT); if (softc == NULL) { - printf("proberegister: Unable to probe new device. " - "Unable to allocate softc\n"); + printf( + "proberegister: Unable to probe new device. Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } @@ -539,8 +539,9 @@ mmcprobe_register(struct cam_periph *periph, void *arg) memset(&periph->path->device->mmc_ident_data, 0, sizeof(struct mmc_params)); if (status != 0) { - printf("proberegister: cam_periph_acquire failed (status=%d)\n", - status); + printf( + "proberegister: cam_periph_acquire failed (status=%d)\n", + status); return (CAM_REQ_CMP_ERR); } CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n")); diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index d2cb6ff11fd4..47c0bde1df37 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -204,16 +204,16 @@ nvme_probe_register(struct cam_periph *periph, void *arg) request_ccb = (union ccb *)arg; if (request_ccb == NULL) { - printf("nvme_probe_register: no probe CCB, " - "can't register device\n"); + printf( + "nvme_probe_register: no probe CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); } softc = (nvme_probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_ZERO | M_NOWAIT); if (softc == NULL) { - printf("nvme_probe_register: Unable to probe new device. " - "Unable to allocate softc\n"); + printf( + "nvme_probe_register: Unable to probe new device. Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } TAILQ_INIT(&softc->request_ccbs); @@ -579,8 +579,8 @@ nvme_scan_lun(struct cam_periph *periph, struct cam_path *path, request_ccb); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: cam_alloc_periph " - "returned an error, can't continue probe\n"); + xpt_print(path, + "xpt_scan_lun: cam_alloc_periph returned an error, can't continue probe\n"); request_ccb->ccb_h.status = status; xpt_done(request_ccb); } diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 45aae4a50669..21cb6beaf1fb 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -646,16 +646,14 @@ proberegister(struct cam_periph *periph, void *arg) request_ccb = (union ccb *)arg; if (request_ccb == NULL) { - printf("proberegister: no probe CCB, " - "can't register device\n"); + printf("proberegister: no probe CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); } softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT); if (softc == NULL) { - printf("proberegister: Unable to probe new device. " - "Unable to allocate softc\n"); + printf("proberegister: Unable to probe new device. Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } TAILQ_INIT(&softc->request_ccbs); @@ -864,8 +862,8 @@ again: /*timeout*/60000); break; } - xpt_print(periph->path, "Unable to mode sense control page - " - "malloc failure\n"); + xpt_print(periph->path, + "Unable to mode sense control page - malloc failure\n"); PROBE_SET_ACTION(softc, PROBE_SUPPORTED_VPD_LIST); } /* FALLTHROUGH */ @@ -1000,8 +998,8 @@ done: inquiry_len = roundup2(SID_ADDITIONAL_LENGTH(inq_buf), 2); inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT); if (inq_buf == NULL) { - xpt_print(periph->path, "malloc failure- skipping Basic" - "Domain Validation\n"); + xpt_print(periph->path, + "malloc failure- skipping Basic Domain Validation\n"); PROBE_SET_ACTION(softc, PROBE_DV_EXIT); scsi_test_unit_ready(csio, /*retries*/4, @@ -2035,9 +2033,9 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) request_ccb->ccb_h.path_id, i, 0); if (status != CAM_REQ_CMP) { - printf("scsi_scan_bus: xpt_create_path failed" - " with status %#x, bus scan halted\n", - status); + printf( + "scsi_scan_bus: xpt_create_path failed with status %#x, bus scan halted\n", + status); free(scan_info, M_CAMXPT); request_ccb->ccb_h.status = status; xpt_free_ccb(work_ccb); @@ -2230,8 +2228,8 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) scan_info->counter, 0); if (status != CAM_REQ_CMP) { mtx_unlock(mtx); - printf("scsi_scan_bus: xpt_create_path failed" - " with status %#x, bus scan halted\n", + printf( + "scsi_scan_bus: xpt_create_path failed with status %#x, bus scan halted\n", status); xpt_free_ccb(request_ccb); xpt_free_ccb((union ccb *)scan_info->cpi); @@ -2260,9 +2258,9 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) */ xpt_free_path(oldpath); if (status != CAM_REQ_CMP) { - printf("scsi_scan_bus: xpt_create_path failed " - "with status %#x, halting LUN scan\n", - status); + printf( + "scsi_scan_bus: xpt_create_path failed with status %#x, halting LUN scan\n", + status); goto hop_again; } xpt_setup_ccb(&request_ccb->ccb_h, path, @@ -2323,8 +2321,8 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path, if (request_ccb == NULL) { request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { - xpt_print(path, "scsi_scan_lun: can't allocate CCB, " - "can't continue\n"); + xpt_print(path, + "scsi_scan_lun: can't allocate CCB, can't continue\n"); return; } status = xpt_create_path(&new_path, NULL, @@ -2332,8 +2330,8 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path, path->target->target_id, path->device->lun_id); if (status != CAM_REQ_CMP) { - xpt_print(path, "scsi_scan_lun: can't create path, " - "can't continue\n"); + xpt_print(path, + "scsi_scan_lun: can't create path, can't continue\n"); xpt_free_ccb(request_ccb); return; } @@ -2366,8 +2364,8 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path, request_ccb); if (status != CAM_REQ_CMP) { - xpt_print(path, "scsi_scan_lun: cam_alloc_periph " - "returned an error, can't continue probe\n"); + xpt_print(path, + "scsi_scan_lun: cam_alloc_periph returned an error, can't continue probe\n"); request_ccb->ccb_h.status = status; xpt_done(request_ccb); } @@ -2619,8 +2617,7 @@ scsi_action(union ccb *start_ccb) if (start_ccb->ccb_h.func_code != XPT_SCSI_IO) { KASSERT((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) == 0, - ("%s: ccb %p, func_code %#x should not be allocated " - "from UMA zone\n", + ("%s: ccb %p, func_code %#x should not be allocated from UMA zone\n", __func__, start_ccb, start_ccb->ccb_h.func_code)); } @@ -2687,8 +2684,9 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path if (cts->protocol_version > device->protocol_version) { if (bootverbose) { - xpt_print(path, "Down reving Protocol " - "Version from %d to %d?\n", cts->protocol_version, + xpt_print(path, + "Down reving Protocol Version from %d to %d?\n", + cts->protocol_version, device->protocol_version); } cts->protocol_version = device->protocol_version; @@ -2712,8 +2710,9 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path if (cts->transport_version > device->transport_version) { if (bootverbose) { - xpt_print(path, "Down reving Transport " - "Version from %d to %d?\n", cts->transport_version, + xpt_print(path, + "Down reving Transport Version from %d to %d?\n", + cts->transport_version, device->transport_version); } cts->transport_version = device->transport_version; From nobody Tue Feb 4 18:31:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnX5M2lnJz5mFP7; Tue, 04 Feb 2025 18:31: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnX5M0j1lz3pHQ; Tue, 04 Feb 2025 18:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2pil6Ve5jkXoBer92vfZwXtkWhVASBCWa0crS5r6k0=; b=P8FDfF7tbSaZvil/Uw5Uz7bq5442uJ50t1DMFF5RvFvryjdUaOZc3KSEEqDzDiiBZIBczO 0qXmz/GOBv9T60/SxNkH02LcNH5rwRFTgMU9t8lKe84wPs5JEK0xLmS6AUUW2q2jVJ5o3w mIG61Hn3dDifNjrWWmNRIr6VJdAdUZU8mYjegHXm6S+WOtIpxpvT8mdrB/lIm12eypKkCn I2az+a+80/9XPCl56k7zBW86+/hAqvfyAXLH84+VhPcLWcY8BK/aibvQK/ZIwX+Ij21jKG UxzABEGeiYbIV5E75n83i7DxKp/Mtbn5P3oeQbzcuvdd8yclO2HaroJbbyIxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2pil6Ve5jkXoBer92vfZwXtkWhVASBCWa0crS5r6k0=; b=sz0yLCr3YLdMFR3QVt5GuUTbQ/fc0VQ3OsND8hEr8tCUEZ89V7y5mEm5LlrMK8jOmb0Bv7 OMYEdNZ4uPigWCV7qCZdHskjbUpHRmfVlBWJX8NkK902MdWe2mMY+qxd4UymFfTj1EzlWi G8bAdpsqZ2J4T4UEqVGci9c+RVl3i6I+QsXZXNNCR9VQwEw+DjvLFtJYLXHow4kddrXr/6 XSE9Ka4TCD9eAgmAKS4sH8adO7xbUsrMYdfXL0QnKxc2sM1m9FE1FfJcYr4caRsQV/hQQS fXU/MAJ9xbvneQ+sdfgxi47hts8utIs2/IrPsIoSt5JkGMp9qwuidlWCWvnQLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738693911; a=rsa-sha256; cv=none; b=U3AyhhPg7jbzK0cshR5x0SnQM2N/FHkaPMzSRicdSL2flK+NEvGcXdPiVfYTurgxb4FE4a gU+07iSOs1hY3rY4NjEWGsEekzIY2X7+Tu9BngUXLs+LgXWCrtcjHhiICadXrYOIOWGFnv TtpDdaPq+EpL+hcfReHYkNgDtkrKjhcXi9FNeQ6qgZ2DGDtD3P9tNMSROEkvAmDsTKz1xg uF22ImXqsT+/k0pkzD59Wwt2W9HPi7oCUveiOBJ94ZmJc+pIcMcxDnaXMs6M4NC4RkAM7S spDuLMp4AEyd10xumwWk2uOqLrmsJ5X+r377GyfvlyWVTYQbeP2tecHH5fnOjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnX5M03pTz2vF; Tue, 04 Feb 2025 18:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514IVoar035119; Tue, 4 Feb 2025 18:31:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514IVoxS035116; Tue, 4 Feb 2025 18:31:50 GMT (envelope-from git) Date: Tue, 4 Feb 2025 18:31:50 GMT Message-Id: <202502041831.514IVoxS035116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 692e5f6ba63e - main - cam: Fail ASC 0x40 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 692e5f6ba63e5efe0b3c0a7b9ee6fb255302b000 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=692e5f6ba63e5efe0b3c0a7b9ee6fb255302b000 commit 692e5f6ba63e5efe0b3c0a7b9ee6fb255302b000 Author: Warner Losh AuthorDate: 2025-02-04 18:28:54 +0000 Commit: Warner Losh CommitDate: 2025-02-04 18:29:38 +0000 cam: Fail ASC 0x40 ASC 0x40 is use to report diagnostics (as in the self test the drive runs on itself) failures. The ASCQ code is the part that failed. These failures are such that I/O to the drive's LBA range is not possible, so make this condition fatal, and signal the drive's ill health. Sponsored by: Netflix Reviewed by: ken, mav Differential Revision: https://reviews.freebsd.org/D48684 --- sys/cam/scsi/scsi_all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 0f31757cae25..6fbcb1fd80fe 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -2394,10 +2394,10 @@ static struct asc_table_entry asc_table[] = { /* D */ { SST(0x3F, 0x1A, SS_RDEF, /* XXX TBD */ "Subsidiary binding changed") }, - { SST(0x40, 0x00, SS_RDEF, + { SST(0x40, 0x00, SS_FATAL | ENXIO, "RAM failure") }, /* deprecated - use 40 NN instead */ /* DTLPWROMAEBKVF */ - { SST(0x40, 0x80, SS_RDEF, + { SST(0x40, 0x80, SS_FATAL | ENXIO, "Diagnostic failure: ASCQ = Component ID") }, /* DTLPWROMAEBKVF */ { SST(0x40, 0xFF, SS_RDEF | SSQ_RANGE, From nobody Tue Feb 4 18:31:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnX5N3ZkMz5mFln; Tue, 04 Feb 2025 18:31: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnX5N1Rxxz3pVj; Tue, 04 Feb 2025 18:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdot2amCxS43PrEssVhRYAjCrnzjcDx/t2yemVfabUY=; b=vTGyh4APAr1L5vVniCV/g/orkvd6xeQIXhtmOOWx3hBaE8IIlUGsb7zO81uiYVqqM6N6TW yRTx/ywNpjvkX70mguqAm5HQoWFkioN6bJLoww6k99zL845yJdZsIdZ5GMmZUdgfk/iv7u Wz3+sRP6HkTWfTGBXLz7uuNR/bVc82koNnpzoAlQKPuursP1MaP91CSqqmJbFSWoSuUeFG tDuLUa1K0ab78e6kyxQ5rVnvcYTXs6arftGX2qo+CWZFUMLnyKUqR8Hbd/NKMFMSLK0ANh A2AKQrvzJvbDdxupBAmE1cgTtMwkeqJbs2TrPvwzHspBsp0zY5S+mLLpk3TU9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdot2amCxS43PrEssVhRYAjCrnzjcDx/t2yemVfabUY=; b=kr08YfhFodYU7G9sIXrwLZW8Rd2LIXSOSmyz0zvHRi1QOhiVG8nqmA1NIi+Ydb4iTR1ppw EPc486qLbaWWvnNGkxnmrFxHspZCGY7Fe/zJT6jCIQjQBuDWfh+TRwKJU2zjqmGFOWDtk4 AK+ZSKmq5yJho8dJNOiEDSGSmh5a55+5d3A9nw02z0zIkzvsuergB05SHBD8GU0h88590Y zsyLVYioAMR5IQl79CkQ+196ol3nKE1ZACICKHFLDvO7Dcj9dxw/6bRLO85pXTLRNfG46I QnmUiYtOU3pBU/KCk4tDTh1JsmWGAQOCOp5DToAANFftYFubpskToZPAP2l5/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738693912; a=rsa-sha256; cv=none; b=O8GNDmPmG/O91qRnhZKI6bn78P1jwlnGusmgwKNSIOoWgWvtKky5DizSZGNO3RuqJ74T8U ovsulr32PIGlpwq633zDNX3EkwGt4SOaUW9+HfPRZHruI8KEd/AZsWiV5gE8pZDjCWjrpt vI+FhEmUZwExLUdtJzpCURHl2MlDeAPcK7owOnbTvnuhuHnQUFB1SeH5jh3di3ChjEJaaF UoCP8CK2kVMTsfTBSZkF4KUlZjHx4reOc+KjoRE3nCB3Y/Y0zIGCY/+AzQYcZr4M84GEvU cy8yQ03EZB9o8gc4OX/3BOLI/lrtiUQlnvF9eEKeD6dM1Q/Ks3+A+m6a9D26YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnX5N10TFz2y5; Tue, 04 Feb 2025 18:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514IVqgY035154; Tue, 4 Feb 2025 18:31:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514IVqR3035151; Tue, 4 Feb 2025 18:31:52 GMT (envelope-from git) Date: Tue, 4 Feb 2025 18:31:52 GMT Message-Id: <202502041831.514IVqR3035151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5c04086a61ac - main - cam: Fix off by one error in ASC/ASCQ lookup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c04086a61acbc2c237ca992b85d26c933197009 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5c04086a61acbc2c237ca992b85d26c933197009 commit 5c04086a61acbc2c237ca992b85d26c933197009 Author: Warner Losh AuthorDate: 2025-02-04 18:29:04 +0000 Commit: Warner Losh CommitDate: 2025-02-04 18:29:38 +0000 cam: Fix off by one error in ASC/ASCQ lookup To implement ranges of ASC/ASCQ codes, we set SS_RANGE on an entry with the entry being the end (highest) of the range (with the prior entry being the start). When looking up a ASC/ASCQ code, however, we return the second entry, which just has the range info. Instead, return the prior entry in these cases so we can print the ASC/ASCQ code string correctly. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D48685 --- sys/cam/scsi/scsi_all.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 6fbcb1fd80fe..13a376ebb6e3 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -3419,7 +3419,15 @@ fetchtableentries(int sense_key, int asc, int ascq, ascentrycomp); if (found_entry) { + /* + * If we get to the SSQ_RANGE entry, we're one too + * far. The prior entry is the interesting one, since it + * contains the string to print, etc. Only the top end + * range is interesting in this entry. + */ *asc_entry = (struct asc_table_entry *)found_entry; + if (((*asc_entry)->action & SSQ_RANGE) != 0) + (*asc_entry)--; break; } } From nobody Tue Feb 4 18:31:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnX5P5xhRz5mFSl; Tue, 04 Feb 2025 18:31: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnX5P2K9lz3pVm; Tue, 04 Feb 2025 18:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9zguecxIvtsXPFiruvwccP8qkAcyFq+w+ECMsu7ah98=; b=uHNg+aGq9DX8CKpM9MZ60AOvRXJUjxUwc8TpwS3Ak8qlTuu1kladb6/JJ4GeaUjoDoaUQd hWOf/j4zI22UpNlwyLs85PSVprUfs38QfrK1hQzPhAt1HFRcHFz8KJBgFpXG0eEhFZbpTB 9MkrSTldlCotxmha4crIZkUVT04wo+eWiiCHSFQJa46HYzJQSkecqkHfposDwMPx0Ng2WU 2kBnKRn5hJOVroY9N7MSgv/KtZOaoPGD6PQstKx3yWhD9dfoG/eDXEwFV6qhMGKinWHiQS R43AvQO09pj8+jJFitEQHF6/VuL66AIbbrNhb/OSfnERABnLbX8OzOsf/HwT0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9zguecxIvtsXPFiruvwccP8qkAcyFq+w+ECMsu7ah98=; b=tAYrTG3SHRbrHLIyr4TdmBJxnFwr6N7moeT5D8NjyB0qQbidH9+b2piBfZFWJIr0ZANNzh 3OamhhGsQqF+iEB9DXdFC2/onAq+0blIYXozCIjUhHoSMaqLqnFPK2ZYiUkkQkbXLyz6si VHWkz91/q0dKl6oOARIHAXaIsiTEObblZ9wkeq3xzKn/6Pswo4aYlW+u210vbQagxrOTCl fnYE94pmGLCB6kKp63vYNORrgrjlRyWFKV4/JeYX60SS3ZtOf1+JlciLZhwJoti1yun4NE E3Gm0TNWEGKWcPI/FqFpdh+DG6xBipulug1msTF6Tg7Wju/D7b+tU2tTD2yejw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738693913; a=rsa-sha256; cv=none; b=N/BRT19ycd6bEqzMMn9lxZRs5olzm6Qcmq3EZHFOoE9Mu4sfPwH4SYkqEDnTx9P64A3SqX PXA6Ju92eq/E+k94nUvXNXre4IdWIKNf1fipOjY8Yg+bJQ4tlXcpC1+aB/+A5x7zjw28jb T/uFN+2NbiM9eoPxxw8qiFWU6+UM60bZz3lGd4sZjxm0CuUVJQxy7TGDZ4Ic+FYslLfyGi 0wbjk9lHhtj8zvAMGw0arXd5qLuHbN9d6xFrDUX4mxWtREOJSH06/UgX6NhYRCOKMNZjHm DbU17n7aYla4gMIZPoZzjBznh3c8acGnPUXisNqCsSYxK/395uPJDmJ72mkzYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnX5P1wR5z2HC; Tue, 04 Feb 2025 18:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514IVrJE035196; Tue, 4 Feb 2025 18:31:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514IVrr6035193; Tue, 4 Feb 2025 18:31:53 GMT (envelope-from git) Date: Tue, 4 Feb 2025 18:31:53 GMT Message-Id: <202502041831.514IVrr6035193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 43693fffc07e - main - cam/periph: Use a bool for a bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43693fffc07e8df6509d2fdf6c897a7b2916965c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43693fffc07e8df6509d2fdf6c897a7b2916965c commit 43693fffc07e8df6509d2fdf6c897a7b2916965c Author: Warner Losh AuthorDate: 2025-02-04 18:29:09 +0000 Commit: Warner Losh CommitDate: 2025-02-04 18:29:38 +0000 cam/periph: Use a bool for a bool This should be a bool, not a non-zero int. no change intended. Sponsored by: Netflix --- sys/cam/cam_periph.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 98236e3f5f5c..833df6cfb99b 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1874,7 +1874,8 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, struct cam_periph *periph; const char *action_string; cam_status status; - int frozen, error, openings, devctl_err; + bool frozen; + int error, openings, devctl_err; uint32_t action, relsim_flags, timeout; action = SSQ_PRINT_SENSE; @@ -2094,11 +2095,11 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, /* Attempt a retry */ if (error == ERESTART || error == 0) { - if (frozen != 0) + if (frozen) ccb->ccb_h.status &= ~CAM_DEV_QFRZN; if (error == ERESTART) xpt_action(ccb); - if (frozen != 0) + if (frozen) cam_release_devq(ccb->ccb_h.path, relsim_flags, openings, From nobody Tue Feb 4 18:31:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnX5Q6cb8z5mFCc; Tue, 04 Feb 2025 18:31: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnX5Q3mF7z3pFZ; Tue, 04 Feb 2025 18:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gH2acsmNcSsXPjHx3ihGMKl+yH1yYO0OA+gJZ3qvDhg=; b=E8J+S7KxUSnhiZvz6UL3wGPEiGXzqt0G3BUhX08NTZfs1kBgVKeJAKXvvznL6fsEbw25wr 7TbUx6BDA/zQ20Qepjbm9NChh/kl8jd7zQ3RMiLmIKtKq9VM1bOONah7erx4GyV7Im1lyS i/r80sMMy3t8ILo00Fmz0vwFfzkugt3aZN/lQDFmQM4krHdv8FMJSXQIam+1O+NabozuSS V9nRhpyv7woORAKapG/VVzzecJAIJA5UjKfwvZm1QBGwuFQtAFsq4vClXkmkQUraPGvUEq u1zdVf0fqWtIcxs2fIGx76+9ZOJ4yhkfkgsg574qB3D7JJ68I2WgpZ6QnOMNiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738693914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gH2acsmNcSsXPjHx3ihGMKl+yH1yYO0OA+gJZ3qvDhg=; b=ugSezo5lO5BYoly4XjerNCR0buCqh6sXtlZ+mSM+IuVuqai8wP7oiSmyIpN8tCEhweXHLP lMVlTnG3c91ZM9req7l1X10auXU8cO7YZfBoDReP6OqjyFsfvOTX9ueg/gu+hkPIbRt913 TiWNVPUApvEgR8EyNIeMI8MR6TMqoja2ElCDsRL1iPWa7Emxtvx03m8v7U2GqmM2fBu7C+ 703XlzZhV7AhURnw1aHu99lpYP7X+wqdYwITuc1Qen7cuM6a0hA/e2QjqicNKgzEZ/UGhq qUyxHqFw3OGEsOSj/2Viu4jkF77L6qXK9ihWeUdfdjmAzQ4Uinpx2YSeMu4VTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738693914; a=rsa-sha256; cv=none; b=vLbM3TuqH2EV7YXMGYPHd0S+46iTPznMYZ96Dy69vxAg/ikBCHyfICd7DlJjSNxccf/FSa LPYBEUsFKiAiqGQdfscF+JQBogK5BDoch6fV7c5TvROLRkrEBmP1YwKKdKvcbdLOo09I1P HG+828vOXDUFrd5lr55GjnVfwBLR5kyL5ZP6gWsixofHg9ZJmnKx98dAHs6bs5itSzk14a MO3GMJm/8nWyFX3NFMBblB92p5oqIc3ixD0W+TgejBQql/dQ8bIFOXu8NZ9e9dmKhvt2MN 7rptDO3lAEI3zC4uZN0z0R4OiuQISGnLdLDCeSZ2Owz8AbG+X5Ay9IWenlo1iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnX5Q2fn1z1ww; Tue, 04 Feb 2025 18:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514IVsBe035231; Tue, 4 Feb 2025 18:31:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514IVsbT035228; Tue, 4 Feb 2025 18:31:54 GMT (envelope-from git) Date: Tue, 4 Feb 2025 18:31:54 GMT Message-Id: <202502041831.514IVsbT035228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f8ef49c324c9 - main - cam/da: Document what an 'invalid pack' means. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8ef49c324c936aecc9a7d112a45a2e0ad9a47c8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8ef49c324c936aecc9a7d112a45a2e0ad9a47c8 commit f8ef49c324c936aecc9a7d112a45a2e0ad9a47c8 Author: Warner Losh AuthorDate: 2025-02-04 18:29:14 +0000 Commit: Warner Losh CommitDate: 2025-02-04 18:29:38 +0000 cam/da: Document what an 'invalid pack' means. An 'invalid pack' in the da driver means that the media for the drive is temproarily missing, pending an action by a third party (eg robot arm or human inserting a disk pack, etc) or has changed since we opened. We invalidate a pack when the ASC/ASCQ tells us the media is missing (ASC 0x3a MEDIA MISSING), for 0x28/0 (NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED) and for that brief period of time after a peripheral has been invalidated before the disk is destroyed. When the pack is invalid, we can't do READ/WRITE operations to the media, so we fail all outstanding I/O and any new I/O that comes in when this happens. This is cleared in daopen when we've repobed the device. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D48687 --- sys/cam/scsi/scsi_da.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index e8e13613413a..f2f3951ebe80 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1899,7 +1899,15 @@ dastrategy(struct bio *bp) cam_periph_lock(periph); /* - * If the device has been made invalid, error out + * If the pack has been invalidated, fail all I/O. The medium is not + * suitable for normal I/O, because one or more is ture: + * - the medium is missing + * - its size is unknown + * - it differs from the medium present at daopen + * - we're tearing the cam periph device down + * Since we have the cam periph lock, we don't need to check it for + * the last condition since PACK_INVALID is set when we invalidate + * the device. */ if ((softc->flags & DA_FLAG_PACK_INVALID)) { cam_periph_unlock(periph); @@ -1946,6 +1954,10 @@ dadump(void *arg, void *virtual, off_t offset, size_t length) softc = (struct da_softc *)periph->softc; secsize = softc->params.secsize; + /* + * Can't dump to a disk that's not there or changed, for whatever + * reason. + */ if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) return (ENXIO); From nobody Tue Feb 4 19:12:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnY0J3lp1z5mJPl; Tue, 04 Feb 2025 19:12: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnY0H4T1Pz41wQ; Tue, 04 Feb 2025 19:12:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738696351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRd4l6w86x805oRetlK0+SRESMUBwFXuXDVLfG+ECFk=; b=j6VkPfAYJxq0StzJw9QohLTkLTYmWviVD9LcyM84XHdEJ71egOAn7dxe0TzVNifPrS+2TE 2kSfEJCVhmkX+mjs0LptN6i6u/pJouaWXVjINZEo3EIby2jujzSMYBu+9PHXHk72F4bc0C Y07WvTWHV6Qv+KwbdQz4/ZTokr5+ryvmrQe0OBVVR6mDWX5Lg+b8D04JPnriKvfO9S8Xst AR2wO6/lHhlSI080qnLKlNFkP6pmkhSR45n1XpdgWQC7g4vjEWDIHk7BOfTbzf4/Xswjjz xKuDtSqSJ/T+Kjd1B+kbi6tKW75xizUwhMaa+RobXscTWGozHmAdUsp6BiYcyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738696351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRd4l6w86x805oRetlK0+SRESMUBwFXuXDVLfG+ECFk=; b=XX1AO9bLewuX4L1qibJt3PSPtPMKF66oknbHUXQSqdVOSbqr2L+6CKOIgE7cEMlNDWRMyE BCDNDlauw4jxfgz48bJi2jpZTuaXUUDVuLRngPOKp8kaw7WVYHjiyBgaT01YQK87G+XioP mcCAjkjW/XAuKlIcVlvfy7OU5L5b+hdBRUPBlUNA+KV+lxQ5dHtFZ16aWQZk6hnlAsyMTU CFXHz9TbSyFigBysMiaQF4qDB/mmcMunk13g/BnP1aT6oKODTrzZPpd+CPBhM/zpPKhseb wQuRw4JYGZQkm1KJFl7q5cxYRiUHM9EDzOjXmHZF9cPrnFy+gYxmIj1nKk1n3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738696351; a=rsa-sha256; cv=none; b=aE6lqhDVuPvkw95Bhp6I5yhWkTqrZ9hCVMikARLtbIo6+qSdoh94gadERBP3TMhNthSHRP q5F1O92F9KMsp3O/nz+l5Sg7cuFX+jha1GvDLEKUPPnT4oGArFSWj/+6WL66TadJxGIKtv yZ/W2pNMNUotxrwssKpMse7OQzHGmKy24d6r3exx372rWvRK0jljXmuqGEmlXXFfsa6wdf Np7yXDleqpuA4RY+YDLqFEdEO8SOoc2x2A61j6BJf7TgcgPrWKLlR4ZdX6kRdMuTRolJyX YO8GIe3O1Ds4KjlhjPtKzSw6iZWFtjBDjD4zQU39YJET1zknttfae7doiPN28Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnY0H43T0z4Bs; Tue, 04 Feb 2025 19:12:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514JCVwh011284; Tue, 4 Feb 2025 19:12:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514JCVes011281; Tue, 4 Feb 2025 19:12:31 GMT (envelope-from git) Date: Tue, 4 Feb 2025 19:12:31 GMT Message-Id: <202502041912.514JCVes011281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c032fb855766 - main - netstat: Use bool more widely List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c032fb855766d25d91b190af554e1ba86bbe7856 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c032fb855766d25d91b190af554e1ba86bbe7856 commit c032fb855766d25d91b190af554e1ba86bbe7856 Author: Ed Maste AuthorDate: 2025-02-03 18:23:21 +0000 Commit: Ed Maste CommitDate: 2025-02-04 19:12:21 +0000 netstat: Use bool more widely Following c2aa91745e87 ("netstat: restore printing the "default" keyword, provide -nn option"), consistently use bool where appropriate for commandline flags. Reviewed by: glebius Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48832 --- usr.bin/netstat/main.c | 98 +++++++++++++++++++++++------------------------ usr.bin/netstat/netstat.h | 36 ++++++++--------- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 371216f4be59..4275ea7821df 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -194,33 +194,33 @@ static int kresolve_list(struct nlist *_nl); static kvm_t *kvmd; static char *nlistf = NULL, *memf = NULL; -int Aflag; /* show addresses of protocol control block */ -int aflag; /* show all sockets (including servers) */ -static int Bflag; /* show information about bpf consumers */ -int bflag; /* show i/f total bytes in/out */ -int cflag; /* show TCP congestion control stack */ -int Cflag; /* show congestion control algo and vars */ -int dflag; /* show i/f dropped packets */ -int gflag; /* show group (multicast) routing or stats */ -int hflag; /* show counters in human readable format */ -int iflag; /* show interfaces */ -int Lflag; /* show size of listen queues */ -int mflag; /* show memory stats */ +bool Aflag; /* show addresses of protocol control block */ +bool aflag; /* show all sockets (including servers) */ +static bool Bflag; /* show information about bpf consumers */ +bool bflag; /* show i/f total bytes in/out */ +bool cflag; /* show TCP congestion control stack */ +bool Cflag; /* show congestion control algo and vars */ +bool dflag; /* show i/f dropped packets */ +bool gflag; /* show group (multicast) routing or stats */ +bool hflag; /* show counters in human readable format */ +bool iflag; /* show interfaces */ +bool Lflag; /* show size of listen queues */ +bool mflag; /* show memory stats */ int noutputs = 0; /* how much outputs before we exit */ u_int numeric_addr = 0; /* show addresses numerically */ bool numeric_port; /* show ports numerically */ -int Oflag; /* show nhgrp objects*/ -int oflag; /* show nexthop objects*/ -int Pflag; /* show TCP log ID */ -static int pflag; /* show given protocol */ -static int Qflag; /* show netisr information */ -int rflag; /* show routing tables (or routing stats) */ -int Rflag; /* show flow / RSS statistics */ +bool Oflag; /* show nhgrp objects*/ +bool oflag; /* show nexthop objects*/ +bool Pflag; /* show TCP log ID */ +static bool pflag; /* show given protocol */ +static bool Qflag; /* show netisr information */ +bool rflag; /* show routing tables (or routing stats) */ +bool Rflag; /* show flow / RSS statistics */ int sflag; /* show protocol statistics */ -int Wflag; /* wide display */ -int Tflag; /* TCP Information */ -int xflag; /* extra information, includes all socket buffer info */ -int zflag; /* zero stats */ +bool Wflag; /* wide display */ +bool Tflag; /* TCP Information */ +bool xflag; /* extra information, includes all socket buffer info */ +bool zflag; /* zero stats */ int interval; /* repeat interval for i/f stats */ @@ -269,25 +269,25 @@ main(int argc, char *argv[]) #endif break; case 'A': - Aflag = 1; + Aflag = true; break; case 'a': - aflag = 1; + aflag = true; break; case 'B': - Bflag = 1; + Bflag = true; break; case 'b': - bflag = 1; + bflag = true; break; case 'c': - cflag = 1; + cflag = true; break; case 'C': - Cflag = 1; + Cflag = true; break; case 'd': - dflag = 1; + dflag = true; break; case 'F': fib = strtol(optarg, &endptr, 0); @@ -322,22 +322,22 @@ main(int argc, char *argv[]) } break; case 'g': - gflag = 1; + gflag = true; break; case 'h': - hflag = 1; + hflag = true; break; case 'I': { char *cp; - iflag = 1; + iflag = true; for (cp = interface = optarg; isalpha(*cp); cp++) continue; unit = atoi(cp); break; } case 'i': - iflag = 1; + iflag = true; break; case 'j': #ifdef JAIL @@ -349,13 +349,13 @@ main(int argc, char *argv[]) #endif break; case 'L': - Lflag = 1; + Lflag = true; break; case 'M': memf = optarg; break; case 'm': - mflag = 1; + mflag = true; break; case 'N': nlistf = optarg; @@ -365,23 +365,23 @@ main(int argc, char *argv[]) numeric_port = true; break; case 'o': - oflag = 1; + oflag = true; break; case 'O': - Oflag = 1; + Oflag = true; break; case 'P': - Pflag = 1; + Pflag = true; break; case 'p': if ((tp = name2protox(optarg)) == NULL) { xo_errx(EX_DATAERR, "%s: unknown or uninstrumented " "protocol", optarg); } - pflag = 1; + pflag = true; break; case 'Q': - Qflag = 1; + Qflag = true; break; case 'q': noutputs = atoi(optarg); @@ -389,10 +389,10 @@ main(int argc, char *argv[]) noutputs++; break; case 'r': - rflag = 1; + rflag = true; break; case 'R': - Rflag = 1; + Rflag = true; break; case 's': ++sflag; @@ -405,20 +405,20 @@ main(int argc, char *argv[]) break; case 'W': case 'l': - Wflag = 1; + Wflag = true; break; case 'w': interval = atoi(optarg); - iflag = 1; + iflag = true; break; case 'T': - Tflag = 1; + Tflag = true; break; case 'x': - xflag = 1; + xflag = true; break; case 'z': - zflag = 1; + zflag = true; break; case '?': default: @@ -435,7 +435,7 @@ main(int argc, char *argv[]) if (interval <= 0) usage(); ++argv; - iflag = 1; + iflag = true; } if (*argv) { nlistf = *argv; diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 7e37b9e5e820..1255bfdf2e57 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -37,28 +37,28 @@ #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) -extern int Aflag; /* show addresses of protocol control block */ -extern int aflag; /* show all sockets (including servers) */ -extern int bflag; /* show i/f total bytes in/out */ -extern int cflag; /* show congestion control stats */ -extern int Cflag; /* show congestion control algo and stack */ -extern int dflag; /* show i/f dropped packets */ -extern int gflag; /* show group (multicast) routing or stats */ -extern int hflag; /* show counters in human readable format */ -extern int iflag; /* show interfaces */ -extern int Lflag; /* show size of listen queues */ -extern int mflag; /* show memory stats */ +extern bool Aflag; /* show addresses of protocol control block */ +extern bool aflag; /* show all sockets (including servers) */ +extern bool bflag; /* show i/f total bytes in/out */ +extern bool cflag; /* show congestion control stats */ +extern bool Cflag; /* show congestion control algo and stack */ +extern bool dflag; /* show i/f dropped packets */ +extern bool gflag; /* show group (multicast) routing or stats */ +extern bool hflag; /* show counters in human readable format */ +extern bool iflag; /* show interfaces */ +extern bool Lflag; /* show size of listen queues */ +extern bool mflag; /* show memory stats */ extern int noutputs; /* how much outputs before we exit */ extern u_int numeric_addr; /* show addresses numerically */ extern bool numeric_port; /* show ports numerically */ -extern int Pflag; /* show TCP log ID */ -extern int rflag; /* show routing tables (or routing stats) */ -extern int Rflag; /* show flowid / RSS information */ +extern bool Pflag; /* show TCP log ID */ +extern bool rflag; /* show routing tables (or routing stats) */ +extern bool Rflag; /* show flowid / RSS information */ extern int sflag; /* show protocol statistics */ -extern int Tflag; /* show TCP control block info */ -extern int Wflag; /* wide display */ -extern int xflag; /* extended display, includes all socket buffer info */ -extern int zflag; /* zero stats */ +extern bool Tflag; /* show TCP control block info */ +extern bool Wflag; /* wide display */ +extern bool xflag; /* extended display, includes all socket buffer info */ +extern bool zflag; /* zero stats */ extern int interval; /* repeat interval for i/f stats */ From nobody Tue Feb 4 19:15:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnY3y63Lfz5mJSH; Tue, 04 Feb 2025 19:15:42 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnY3y475Cz42n3; Tue, 04 Feb 2025 19:15:42 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5dc82e38c10so9207795a12.3; Tue, 04 Feb 2025 11:15:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738696540; x=1739301340; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pPCH9UKARa5oE1/0lhS3qryJrfwXwhkKKBEhY+n6u7E=; b=X9aUx38tmkqvlN9ghX/5xs08YqwJVqt454/liqn+tpZVzAHwqDx8T4VugLRobTOoeQ Y5FusoPDJNxlKvx0f2tRV+h/aedU8n7cLayuoxbOMWbI2zTVSUDqeX7+g5jnIw4Cryck yvkiL8fv0IrGkn9/WFGAyE95o0ftOeH/gEDsNHR2PO28Kd6wjnRz+c0TdAtl+dMWNesq aswQaEF3O/84M0krHlIwsGkj/13un7E25EELzMsuVTiHNKk1FcCzQUaMIcOJ/4X1sSpj DZTPcdZhOPeXFFGLRyKJSioSdkV0AjsUvyI7WHl6bAYR3r9PQ9IsyGnyQarelt/7uN22 jnVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738696540; x=1739301340; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pPCH9UKARa5oE1/0lhS3qryJrfwXwhkKKBEhY+n6u7E=; b=JYcYzsAJBFoB45i6gZMmOrZ+1nsu7qp62PUTUGn6FNSQthcpiPOVBXK96CCDd8SotY yf6ZYvlAnVFFQk1pcLO/JX/Tj8PJ/E4oU2EIf3s+A4OBrnfi+uTw09GGiYub6QYxvTtz 0q1gTG1Ezt4o/k1dTWKpv3/XRdq0YB7sriy/ZbwIylGndnC+u6mdoMVnB4bQFArYxFWr XhVPvQ9i7P0pBcACop5bV/6nqGhpy9QxotQs/4JIJnSSqIInYd28dcCu0L20GP0q05Wd q/8tXLciwI2n6YjnqSRFO1/bYWKfVaU01UNndCyCwcEDC6tVVer5mFYe5+OqvVfzO/IV fEaA== X-Forwarded-Encrypted: i=1; AJvYcCUppcc4vyGfNprfGuos3rLCvdan0rnCxQd6O3fnl/usUmTewPwnuPe9/xMdHB4NSPpRkf8FSzpjPrp3rIVuykYE4v72@freebsd.org, AJvYcCVBXVUQcLmGIj2tnxBCLLzUNq+/EQMCdS6H5DSujeYf6o7vOt3p0SUmrVYuRIgYcuIoRZwqz/BikXvPOi3Grm6hbbIJPfY=@freebsd.org, AJvYcCXsdShbG4TT8hAjtCd7h56h0eW9jud79qMGuw4XYg3ygGe6p+2Bo0GA3s9vzz996IC+YYKLg3mTgOcGdkXlN1w=@freebsd.org X-Gm-Message-State: AOJu0YykSsCHqzDH2G4Mn6cCfNVeLRvL/Ky7v4dZq6hQsnsCZQ0prfT6 7SQSp9yAd+Z+VHF9RpjbzaQoafynYBiXCWPRDX5WIJoiNgl8wVRifvQ9h+EhusOBX9gGR+gJrQj K1wfV6p7+sb8EFhLJLXATBlzD8g== X-Gm-Gg: ASbGnct6e+TQGB3pFwrXHAUiNeTREiho/eF/CvSWB3at9xi/4tujZLDMKiSfzvgOKAs e9dDZ7z7kK4PRpof+z/D9qDy2cVF9j96ab7CC4/1CTcCZIBzjK9vgBJI+5i7/jz282blo6Vfh/J TMa+Fn1BNZggi2oIYADNCHpbA4Nlzd X-Google-Smtp-Source: AGHT+IFkmN2it0Xm/TxvZ9Wli8stOQB4Z+8hpFmPWiBFPKrB7ahRjpV+r7/ORbDqcK+u4xpOQ9ay3Qed19q+oCT17OQ= X-Received: by 2002:a05:6402:5419:b0:5dc:d43c:3a1b with SMTP id 4fb4d7f45d1cf-5dcdb764622mr187901a12.20.1738696539692; Tue, 04 Feb 2025 11:15:39 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202502041658.514Gwo4I049201@gitrepo.freebsd.org> <20250204171121.8EA2C281@slippy.cwsent.com> In-Reply-To: <20250204171121.8EA2C281@slippy.cwsent.com> From: Rick Macklem Date: Tue, 4 Feb 2025 11:15:28 -0800 X-Gm-Features: AWEUYZkbzXSWa1zf-k0Rt76FukXS-lsRquMzLTpCAwRoK4luWg4U1MEc9dfewgQ Message-ID: Subject: Re: git: ecccb638d494 - main - mountd: Promote missing netmask log to LOG_ERR To: Cy Schubert Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4YnY3y475Cz42n3 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] On Tue, Feb 4, 2025 at 9:21=E2=80=AFAM Cy Schubert wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > In message <202502041658.514Gwo4I049201@gitrepo.freebsd.org>, Ed Maste > writes: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Decccb638d494f2642f1e2eae= 8ad932ba > > 70567ccc > > > > commit ecccb638d494f2642f1e2eae8ad932ba70567ccc > > Author: Ed Maste > > AuthorDate: 2025-02-01 13:16:47 +0000 > > Commit: Ed Maste > > CommitDate: 2025-02-04 16:58:41 +0000 > > > > mountd: Promote missing netmask log to LOG_ERR > > > > Historical network classes are deprecated, but currently still supp= orted > > in mountd with a LOG_WARNING-priority message added by Mike Karels = in > > 2021. Upgrade the log to LOG_ERR well in advance of this becoming = a > > fatal error. > > > > Reviewed by: rmacklem > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D48795 > > --- > > usr.sbin/mountd/mountd.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c > > index 4457a925c2ed..19d76b72da10 100644 > > --- a/usr.sbin/mountd/mountd.c > > +++ b/usr.sbin/mountd/mountd.c > > @@ -1806,7 +1806,7 @@ get_exportlist_one(int passno) > > len =3D endcp - cp; > > } > > if (opt_flags & OP_CLASSMASK) > > - syslog(LOG_WARNING, > > + syslog(LOG_ERR, > > "WARNING: No mask specified for %s, " > > Should this be changed from WARNING to ERROR too? I don't have a strong opinion, but I would say no. An error in mountd indicates a failure and in this case the semantics remain what they have always been and doesn't necessarily imply a semantics failure. rick > > > "using out-of-date default", > > (&grp->gr_ptr.gt_net)->nt_name); > > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > From nobody Tue Feb 4 19:53:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnYv134T7z5mMVl; Tue, 04 Feb 2025 19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnYv11Fttz3G31; Tue, 04 Feb 2025 19:53:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738698781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKcnoMUumMvpo/jlqstN8hyNsXdh7GiXX2sGPxyZWP4=; b=A8jJUGqfbJCBN3whTeCDMa8TVL1wrb2rPKRFrcSN966erwDOEdhUnAYVJP/Hyr1gH/lUtp vYnjnOKC7kODawgvMcUML3SThJVkp2fFuIPe0A4gPNlmth+dGEgAiSJpDJ+1wfDNLO8EnX F5ayoy0SniZBqA1Tv0/SUwtxfRgYcyn6PkcVp0VsaXtRE7L0KtEI+wmh3AXG3ANizuQqN8 KaBf1k3LykifjRiXtzJ6mdNUmKP7VBKu+g6QWVDs/YEAFSeWUu9nhVLzVVhkMQAfVfiN5V Jac+0FZtyv5cKhqhbwtW8jVFaqXUiJV3Ky/0sPxqh5qcfdxfxk1cnkUbF6V1aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738698781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKcnoMUumMvpo/jlqstN8hyNsXdh7GiXX2sGPxyZWP4=; b=F0JZO+9dr9K9LgZY6a06thfBq8RaHSimYWsei453h5ncsB+1uqVL01VJTmaHPDpi0GwI/w buk+0tnbA5M3bu1P1pzFu212WU5wBl/d0UQie9NYKmxnuaFQRBtbpg72juawS2nqKJ/sNj vJ2sdyHt71KK6stgwK/4w8KHrtAAZ00tGa0Bhna8QvrCtdx9rggkIO1bEVRfSPx+uYWNs4 AZSzte/iAMHslX4dBpszvXumnE30duBZm/hgqBFV5ySoKm7Z2h2Wq8FrTrNrAPIGpPElR4 Qsi0M/08QoeDu03kq/eMsKqxIrfpaBcavjbmKGOaeUwrbSzKLdJUQa54+eI99A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738698781; a=rsa-sha256; cv=none; b=yOt1e5QIkfL/pRbupT96he9cN2Qoos7ZyopgTFfClrnIrYIAjYN4nxP2YNp1AEMBeHF54o NX2hhv6QzW9JngBAk8DSZ/TwODlFus3U/BYqy5va46BCIeQZ3mypUNAfuoor8IlE1PrJtq SLDtNjIJlhXr64aD7830yVkkXM4R8zsxUQJpOqyyiJ20DQxyYNGJLTO09NXN+YRsv/KB5Z fBiXOZQxB+hv06i5w/ImnAxh2chyt0bMjg0xBZCOyLr6IE82HPooomtuLmVVaL2DHWguio hwruTx8M7dAA7+2MLBD+xJjaAZsgjQexL9AdoHfHsWhje386XoUxmIpK8laUKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnYv10s7Cz4Xb; Tue, 04 Feb 2025 19:53:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514Jr1uF086351; Tue, 4 Feb 2025 19:53:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514Jr1Ed086348; Tue, 4 Feb 2025 19:53:01 GMT (envelope-from git) Date: Tue, 4 Feb 2025 19:53:01 GMT Message-Id: <202502041953.514Jr1Ed086348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 753a4acd09e4 - main - netlink: make struct genl_family and genl_group private List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 753a4acd09e45d84cd863355943dbb2ccbcda77b Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=753a4acd09e45d84cd863355943dbb2ccbcda77b commit 753a4acd09e45d84cd863355943dbb2ccbcda77b Author: Gleb Smirnoff AuthorDate: 2025-02-04 19:52:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-04 19:52:35 +0000 netlink: make struct genl_family and genl_group private --- sys/netlink/netlink_generic.c | 72 ++++++++++++++++++++++++------------------- sys/netlink/netlink_var.h | 15 --------- 2 files changed, 41 insertions(+), 46 deletions(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index d4c84a34b850..30c73133134b 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -47,8 +47,47 @@ #include _DECLARE_DEBUG(LOG_INFO); -static int dump_family(struct nlmsghdr *hdr, struct genlmsghdr *ghdr, - const struct genl_family *gf, struct nl_writer *nw); +static int nlctrl_handle_getfamily(struct nlmsghdr *, struct nl_pstate *); + +static struct genl_cmd nlctrl_cmds[] = { + [CTRL_CMD_GETFAMILY] = { + .cmd_num = CTRL_CMD_GETFAMILY, + .cmd_name = "GETFAMILY", + .cmd_cb = nlctrl_handle_getfamily, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | + GENL_CMD_CAP_HASPOL, + }, +}; + +static struct genl_family { + const char *family_name; + uint16_t family_hdrsize; + uint16_t family_version; + uint16_t family_attr_max; + uint16_t family_cmd_size; + uint16_t family_num_groups; + struct genl_cmd *family_cmds; +} families[MAX_FAMILIES] = { + [CTRL_FAMILY_ID] = { + .family_name = CTRL_FAMILY_NAME, + .family_hdrsize = 0, + .family_version = 2, + .family_attr_max = CTRL_ATTR_MAX, + .family_cmd_size = CTRL_CMD_GETFAMILY + 1, + .family_cmds = nlctrl_cmds, + .family_num_groups = 1, + }, +}; + +static struct genl_group { + struct genl_family *group_family; + const char *group_name; +} groups[MAX_GROUPS] = { + [CTRL_GROUP_ID] = { + .group_family = &families[CTRL_FAMILY_ID], + .group_name = CTRL_GROUP_NAME, + }, +}; /* * Handler called by netlink subsystem when matching netlink message is received @@ -299,35 +338,6 @@ SX_SYSINIT(genl_lock, &sx_lock, "genetlink lock"); #define GENL_ASSERT_LOCKED() sx_assert(&sx_lock, SA_LOCKED) #define GENL_ASSERT_XLOCKED() sx_assert(&sx_lock, SA_XLOCKED) -static struct genl_cmd nlctrl_cmds[] = { - [CTRL_CMD_GETFAMILY] = { - .cmd_num = CTRL_CMD_GETFAMILY, - .cmd_name = "GETFAMILY", - .cmd_cb = nlctrl_handle_getfamily, - .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | - GENL_CMD_CAP_HASPOL, - }, -}; - -static struct genl_family families[MAX_FAMILIES] = { - [CTRL_FAMILY_ID] = { - .family_name = CTRL_FAMILY_NAME, - .family_hdrsize = 0, - .family_version = 2, - .family_attr_max = CTRL_ATTR_MAX, - .family_cmd_size = CTRL_CMD_GETFAMILY + 1, - .family_cmds = nlctrl_cmds, - .family_num_groups = 1, - }, -} -; -static struct genl_group groups[MAX_GROUPS] = { - [CTRL_GROUP_ID] = { - .group_family = &families[CTRL_FAMILY_ID], - .group_name = CTRL_GROUP_NAME, - }, -}; - static struct genl_family * find_family(const char *family_name) { diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h index 87b9f5aaaecd..c341abf7ca55 100644 --- a/sys/netlink/netlink_var.h +++ b/sys/netlink/netlink_var.h @@ -144,21 +144,6 @@ struct nl_buf *nl_buf_alloc(size_t len, int mflag); void nl_buf_free(struct nl_buf *nb); /* netlink_generic.c */ -struct genl_family { - const char *family_name; - uint16_t family_hdrsize; - uint16_t family_version; - uint16_t family_attr_max; - uint16_t family_cmd_size; - uint16_t family_num_groups; - struct genl_cmd *family_cmds; -}; - -struct genl_group { - struct genl_family *group_family; - const char *group_name; -}; - struct genl_family *genl_get_family(uint16_t family_id); struct genl_group *genl_get_group(uint32_t group_id); From nobody Tue Feb 4 19:53:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnYv22nPlz5mMMM; Tue, 04 Feb 2025 19:53: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnYv21rbDz3G9Q; Tue, 04 Feb 2025 19:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738698782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Osk09O9DqE104d+IFKUweQGGZhQqXa9p4t2W4BmP6k=; b=xQ/6lqmrki7cyuQabQB/aUawnig2gkAqPkJJ3DUonICEVIhxVO5uIwjfmncS7ymqG38Ock HDaaMqTzxnlybPl9bmPWRwG5Nt5A68tknPwbyFnkmX+cyCXutLN8O5gSSmR+tTPfvrz7IG MD+eA/s11nmUIsPozawieQyr95x061Ceil5+MzZqUYgdcJmd+AcTpEo30Un70apSNVMV3N RniSgMX6AxtHt1xPuWZYyyIrQHP171HSrs3CqG2o6t2qlulfydj117PyYfAj5f3++kM7In 0cnoJhM2BIW05nbqi6Wgrz909VBT16grlwDXmXQ8Z2v/Onz8GdHsHHaDRm7N0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738698782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Osk09O9DqE104d+IFKUweQGGZhQqXa9p4t2W4BmP6k=; b=E1eksuTx74kHMOLda0ERiJqsjT2BZWb3b3wGiETbsQOs/CZseaaJLaMd3OYOZMuO6CAAs+ cumTlGsMw0CF6GogjlN3bvWNaZ+7+T8vKnQPRL0JQNNmVbKMuKwpGLsAl5uFymaqDZcxIj YVvL5uJ6PrRyYB8mA1otIxi48l0mFGeaEK1mqPkwAJBVz62nwQ5HdCvEYoDM0x4CtAva5K R2/QvEHhqH3U5WX55NRNVTOSNAy/RBnm9AVyal4m2FRG2X1WVbkrM/K10Tnx3ZUQPeOnE2 mQ0btLmPYxLygKU5bBM7Ga71j5rNZ65JS2wFMwkUsg1ifumte//9EcCzD0fJSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738698782; a=rsa-sha256; cv=none; b=idMVBkhvdehjqJXHyc+aGnj0w/lVHX5PSwj0StnR9/aZO3nIvc95u1ZfRNrFqKbNzGO+8+ tuSRQ0lrmCDJsFXmaaCYYA527z8CwSFN+wYuAhvxNs19GXfppp1agRQrqE1YpH01roeNic /a0fCOXXJ7eRyBGYTu+2N6dECOxvZddvKf+FK9JrMMXZgqiALu0pYfykAtL7KjewY3SiWz id24ZjEsC2GQbR+6r/mNIfTNU6xCDsjTrh8xNMtcRN8vyrxM8DYd3WSsXe2X1yc4r1wTtH 2yIZZ2hDlYCTRVa+8Jj8cneR9UbB8V+65XKTnlv2PGUJ3Poev3qx+U8N/cFZnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnYv21GH4z4hS; Tue, 04 Feb 2025 19:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514Jr2rB086396; Tue, 4 Feb 2025 19:53:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514Jr2fS086393; Tue, 4 Feb 2025 19:53:02 GMT (envelope-from git) Date: Tue, 4 Feb 2025 19:53:02 GMT Message-Id: <202502041953.514Jr2fS086393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d2e6eb604656 - main - genl: fix printing of a command with zero capabilities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2e6eb6046560a848cf5627b4353a6fef1421ed4 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d2e6eb6046560a848cf5627b4353a6fef1421ed4 commit d2e6eb6046560a848cf5627b4353a6fef1421ed4 Author: Gleb Smirnoff AuthorDate: 2025-02-04 19:52:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-04 19:52:35 +0000 genl: fix printing of a command with zero capabilities --- usr.bin/genl/genl.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/genl/genl.c b/usr.bin/genl/genl.c index 51d2dfaa6364..4d2c252dab98 100644 --- a/usr.bin/genl/genl.c +++ b/usr.bin/genl/genl.c @@ -214,13 +214,19 @@ dump_operations(struct genl_ctrl_ops *ops) return; printf("\tsupported operations: \n"); for (uint32_t i = 0; i < ops->num_ops; i++) { - printf("\t - ID: %#02x, Capabilities: %#02x (", + bool p = true; + + printf("\t - ID: %#02x, Capabilities: %#02x", ops->ops[i]->id, ops->ops[i]->flags); for (size_t j = 0; j < nitems(op_caps); j++) - if ((ops->ops[i]->flags & op_caps[j].flag) == op_caps[j].flag) - printf("%s; ", op_caps[j].str); - printf("\b\b)\n"); + if ((ops->ops[i]->flags & op_caps[j].flag) == + op_caps[j].flag) { + printf("%s%s", p ? " (" : "; ", + op_caps[j].str); + p = false; + } + printf("%s\n", p ? "" : ")"); } } From nobody Tue Feb 4 20:16:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnZPw1BH6z5mPLF; Tue, 04 Feb 2025 20:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnZPw0llVz3LbP; Tue, 04 Feb 2025 20:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738700180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftee1wjji/4QMyXKvTzWpr07wBnCDkp1JxsZeYXnd+U=; b=Bz/oTCgKEHxVDln6keC2fe0dAnoJGEp1gaz+c2vuHySdzX+0oCYFBigxWbJZxJF4PNaToe TKPf8e0L9Z/iq/cqd8xnrU2tnmR2eltMq3dNIc0g0QvcDXpGwQyJx9SIF2J+U6OAnIIBKN ABA2m4ztOmoKQXDeN89tisSiUBBUJhmHZBlMOoRZDadmdrzWwYcKadxE1qMOgBcWF6Ec9T o75Om4Cg7nz2SdTMQJ6tpUn9We/828lWHQVNdaXcNqjPIiaTlDhY7MCl4HsAnKjnBYTTV2 x86aT/rIgyNnu/AWyvkET114TfmfcE77XY72yuD7Tz9IVdFO4109uZBhvUuYtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738700180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ftee1wjji/4QMyXKvTzWpr07wBnCDkp1JxsZeYXnd+U=; b=EDlsjEya4q/7i+/U25pqaa3UpNwsdi+wmRdIF+0nQ6BNPTZtuLEvlQs2Qc21YWvDJAis3L DB6I2SuZh1QHC7tkCR6tqXuST/8F23xPOTQmgywBASWTPwgYDSgycob8aJI3zJYdfgtuZm 9brAo84Q3EmQs38PNldhuGvHcBvRpI6OsCZd2Dww+s7fFe/dS3rIwX8RJjRQneVSmwWsHA c2vhV/yocORLnlCQ35Wcjzhi1HDyw28tVkV5/1XddMluSoBZYBO6ewZh4eA07wJcPYHgfR Ixh/j8Ru8p88sVfBTrIr4vLTHnVuu8Ljzd36TiunHMbsMBPzl5Mho11/AtkBzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738700180; a=rsa-sha256; cv=none; b=mmtQoWnccBW/Im0DE1gK6BUY5zPnw9JcdP1RpKDZhwcf0zYwMj4+gzINTWGeLcTaoCbuqK elqxuTrxEvmDMTT7+3/KII9YRXJJgpqS5DTPD4JGarOL2yOP9qUwJd8eKtdCKfkVzrPn0S lQt2pRKXA4VUiHFOP6jNTNF+YLtbGAQ8p/10pIrlsUN3sO6JUZutvIW3HZktSU4yM4BwzC iA/Nku2ubDUE5DgmKfcp+hEtoXvNRImHYlUo18iZtnWImUSoVFxLv1ZmvUESby+C9tB3tA hT2202vNv4W8eE+uL7xi28Ww4lVezu+moSS6MFiJSgq9Rl5gZro/XmGKC3ofFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnZPw0HWBz5NY; Tue, 04 Feb 2025 20:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514KGJPi025567; Tue, 4 Feb 2025 20:16:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514KGJ11025564; Tue, 4 Feb 2025 20:16:19 GMT (envelope-from git) Date: Tue, 4 Feb 2025 20:16:19 GMT Message-Id: <202502042016.514KGJ11025564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 46b91601bb16 - main - arch.7: Update version reference to 13.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46b91601bb165f20a40529775fffb4d05fe73d15 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=46b91601bb165f20a40529775fffb4d05fe73d15 commit 46b91601bb165f20a40529775fffb4d05fe73d15 Author: Ed Maste AuthorDate: 2023-09-26 13:32:43 +0000 Commit: Ed Maste CommitDate: 2025-02-04 20:16:07 +0000 arch.7: Update version reference to 13.0 This document is intended to be a reference for supported FreeBSD versions, so update text to refer to 13.0 and later. Sponsored by: The FreeBSD Foundation --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 3fa45af16ba6..a3c875df0bff 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 13, 2024 +.Dd February 4, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -42,7 +42,7 @@ documentation. .Pp If not explicitly mentioned, sizes are in bytes. The architecture details in this document apply to -.Fx 12.0 +.Fx 13.0 and later, unless otherwise noted. .Pp .Fx From nobody Tue Feb 4 20:29:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnZhj60rXz5mQ7G; Tue, 04 Feb 2025 20:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnZhj5J1jz3PHL; Tue, 04 Feb 2025 20:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738700949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZMIwuHuz6oKJK5BzwI2j9PH0BdiPfjiPWSO046um7A=; b=cFkBtU1ZAjcek2npeDFg77bZ8T7xxH8tgd+RJdrGVX5ubnf9Li3C/l6TarQutcSi/dJCmn U/0IFPyfBDKA5ShD8WnkGYGjmuaVucxw/WT4gLm4M487MfHIraXgWw1UQ8BfYfE5yg1hy1 M1BLFBvUxlUPrjO61i9U8MC5N8+uWzGlK8invZTgEhc3df8uCSrKEhSPQ3LZBqrr8oZiW8 zzedv8+VZZLjJGiJos+uzB0FVBkF8DDmYy5NV+1aEttYAU73xbeiwKImFuvPDgzWJoXGXJ 6/QxUSpKrpwAP/6Wkmu2L7aE+0pF4LHn815UxsjNdce6wpJXW9Ve+VcDf82l5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738700949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZMIwuHuz6oKJK5BzwI2j9PH0BdiPfjiPWSO046um7A=; b=fd3d7WbPLXsVHlSLxOqX+Bu/AQYZTfqBYjI3nfIgfa7nVpxI5esSujDisS/HXx3eiJxPlu zBryRuRjfVedQF/AcacxSjeprsyaVLq8Z5COhV1liLjTSMlKyvGJqdnLP4fwYTCgUrJpNs QwolgMj2esHYUk0VcHDtFIbyjJY+2K9fW/QGTh3SxMT96TBNeuYKAm0ynrgzggv4pq1ubL tc+ZzwfQd92Ga5eV8rQbbuXF4SpGcVwABoue/HZLWYb9ltQakhUGZcGXspo609eyvsNGHs GUHnR5ZuH6uVcRg+fTDUwiBWIizFAiv4KLDA01MPM3qhGAl1gT92/LN/1+/ujg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738700949; a=rsa-sha256; cv=none; b=uxBbmjC7M5VhMqVapoHRCwiQsXA4e+98By7w2W4dQHBW0cbDkWGfzuADTglvtOzqRjVn7W lvvdQzAFIuFAVTqCAdVL6cEKq8tkvc21jlM9tNBf/v6BafCEj66Si1zYkCZRjVLT4zCaFD foAF/rjZnylZ8ZNotkNbXf6CjDomW7ZvmMbAUK6r4wp0wJg1zw7tWDZQdAjt6f+wbsl7a2 WBembX4j2EEo78URFURCmvgoPtlvt1tl99M/U1vSCByzloq7RZrLlP5SyrJRC6H8impzYi 1rzJH4+yEZnG6RvTGw5HMPwyk7EwYHOvn4NIJ3UtJkV1HCSRrj11PP31QoGO2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnZhj4qmdz5xJ; Tue, 04 Feb 2025 20:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514KT9Xm045551; Tue, 4 Feb 2025 20:29:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514KT9UX045548; Tue, 4 Feb 2025 20:29:09 GMT (envelope-from git) Date: Tue, 4 Feb 2025 20:29:09 GMT Message-Id: <202502042029.514KT9UX045548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: b7f2a457a883 - main - arch.7: grammar fixes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7f2a457a883c8530c9b6111cee6a988ce5b7249 Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=b7f2a457a883c8530c9b6111cee6a988ce5b7249 commit b7f2a457a883c8530c9b6111cee6a988ce5b7249 Author: Maxim Konovalov AuthorDate: 2025-02-04 20:26:53 +0000 Commit: Maxim Konovalov CommitDate: 2025-02-04 20:26:53 +0000 arch.7: grammar fixes The "for hysterical raisons" was a nice one, though. MFC after: 3 days --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index a3c875df0bff..796c6db7d299 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -352,7 +352,7 @@ userland interfaces relating to underlying hardware platform differences in bus architecture, device enumeration and boot interface. Generally, .Dv MACHINE -should only be used in src/sys and src/stand or in system imagers or +should only be used in src/sys and src/stand or in system images or installers. .It Dv MACHINE_ARCH Represents the CPU processor architecture. @@ -414,7 +414,7 @@ in the top level Makefile for cross building. Unused outside of that scope. It is not passed down to the rest of the build. Makefiles outside of the top level should not use it at all (though -some have their own private copy for hysterical raisons). +some have their own private copy for historical reasons). .It Dv TARGET_ARCH Used to set .Dv MACHINE_ARCH From nobody Tue Feb 4 21:14:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynbhh1dqvz5mTTq; Tue, 04 Feb 2025 21:14: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynbhh0cJ8z3bPb; Tue, 04 Feb 2025 21:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738703652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09tfy9ekXpnLnEG40cDw/VZRge5PbJ5/QpmM1j7Bc3U=; b=Nz0sj7deZOxLh6hbSuyvJ/ppTvgQxvxA/P3bZlUHdcynbtWu/ElbE4L5PCIRnsLBe+9Cj2 PJ38LlXLT/wkMMtXGqteU5AEPvct/fjrqwK9uF1vNcoKtbOTW5RS5A+0m04cCTwG1UHP4f itH+FBbqZOR43v19cMZmXP//L3B6HtfNKKeirLSqSwVe+YrAtJAx5Son9uevPMZSUJ2zDd mOqP9OcgiNV39XSj5aDpmsbxgYjyc7ZYhAVuBVT9ig7G5pR5qqjrk3nlGUcuy1llSqG5M2 XyEr6EBChf1mf2HveCBoNZUVdvPSjBwViIdfsFe747Gc0yXIEEctKTCHpOV7Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738703652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09tfy9ekXpnLnEG40cDw/VZRge5PbJ5/QpmM1j7Bc3U=; b=nzIyXRlleRqYikLORI2NUlS50w9M5cKLViPJkpNjLazLysH5usE0yPpuJuQvz1XVYTUp5w x3L2UAbxsEhDUGtnTjZqLWzJDI4QpQ8CGz2VzmcHpTr6g8YwJps4RyluJLbrkNypb/tLtd K1ekCkznWIQ9h4i84Ftxzec3dVT6zfXyVcMMQLpfi9GVuYxxM0epQTrOvvCfoBx1u0Ly3S JcqLPGSzdxpGIPXZcfjM3S8ZSTPAUT23FxJ5ooTzWbGNkuh7szHak52BruGdmZtlSkyKhY 0EhIvrnhnDxXmaGqKxKx+q2UKRG705hhXBTILycOOn3FdKrpudxv8r7Gt7H8QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738703652; a=rsa-sha256; cv=none; b=JckH0ar8t9MiEnk/y2THNObZ7JmZ64NT0roHZnEWv3TnLCaClP9WPlA48WfVdIatOsG6Sn hhAdkPzBygfJ+OSNAFjbPqYt1/qZ8aD7FW61OUmEcL2nfYu6QQQS3/8StTR3ccztfWVXzf rMjrA01o/2GnQGzBqvxkFhoNOcuWNhJrpYs7zAkIl1byqQ85E/1+N6dNGlHU8cFVZnvznw 5qdzhngfn2G3UdZgxVtTPyAWAn4Ef4gxY6Wja/LLhTWPD1bVquItqDIVWMhIoW0nM40Yad CxvROBHL2kj4x0zjo2n3OMW1IOeKiK1YlZkFDHPqNaQ6XHiqTpaG52poTk/PZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynbhh07gGz7W5; Tue, 04 Feb 2025 21:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514LEB5c039524; Tue, 4 Feb 2025 21:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514LEBuj039521; Tue, 4 Feb 2025 21:14:11 GMT (envelope-from git) Date: Tue, 4 Feb 2025 21:14:11 GMT Message-Id: <202502042114.514LEBuj039521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1f4c3887e3fa - main - pfil: set PFIL_FWD for IPv4 forwarding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f4c3887e3fad411914ddc729fce175d5613e2b4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4c3887e3fad411914ddc729fce175d5613e2b4 commit 1f4c3887e3fad411914ddc729fce175d5613e2b4 Author: Kristof Provost AuthorDate: 2025-01-31 15:53:34 +0000 Commit: Kristof Provost CommitDate: 2025-02-04 20:56:06 +0000 pfil: set PFIL_FWD for IPv4 forwarding Just like we already do for IPv6 set the PFIL_FWD flag when we're forwarding IPv4 traffic. This allows firewalls to make more precise decisions. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D48824 --- sys/netinet/ip_fastfwd.c | 2 +- sys/netinet/ip_output.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 6d34ba4f5420..7a80cce908c1 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -401,7 +401,7 @@ passin: if (!PFIL_HOOKED_OUT(V_inet_pfil_head)) goto passout; - if (pfil_mbuf_out(V_inet_pfil_head, &m, nh->nh_ifp, + if (pfil_mbuf_fwd(V_inet_pfil_head, &m, nh->nh_ifp, NULL) != PFIL_PASS) goto drop; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 9317d5d57e1d..d0dbd22512f0 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -112,13 +112,19 @@ ip_output_pfil(struct mbuf **mp, struct ifnet *ifp, int flags, struct mbuf *m; struct in_addr odst; struct ip *ip; + int ret; m = *mp; ip = mtod(m, struct ip *); /* Run through list of hooks for output packets. */ odst.s_addr = ip->ip_dst.s_addr; - switch (pfil_mbuf_out(V_inet_pfil_head, mp, ifp, inp)) { + if (flags & IP_FORWARDING) + ret = pfil_mbuf_fwd(V_inet_pfil_head, mp, ifp, inp); + else + ret = pfil_mbuf_out(V_inet_pfil_head, mp, ifp, inp); + + switch (ret) { case PFIL_DROPPED: *error = EACCES; /* FALLTHROUGH */ From nobody Tue Feb 4 21:14:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynbhj4n25z5mTcg; Tue, 04 Feb 2025 21:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynbhj1dBMz3bRw; Tue, 04 Feb 2025 21:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738703653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XtD+ry8P8aPJbz38Kyo74Zjp1KUOFJ5jbRnraQXpnXw=; b=Sicuw/KL/6CkWSCaob44CufGqycYnfiuL8OeBGNdmorzb551R9fmRNFTtT9XHgeVMI5vRJ 34TEFU3yZkn7LoSzTERcgMCLgsURLOBMDCH9YDREkJK8IBIt95pHMkVAlTGNsf8Fgc8Dg/ Op2oweud0cEZLKWu0dO+xKMz0IFwRUn11+8NkFjPpTuZurARmLQgQDJ2sBGwQ5E8JZR0fi +AHegQsEN+A0uvYbFNnWDQ8WqKJVhriOaf75z6N/WxZvX8LHAQYtjFXKbm5jYqDeWJWcMH 13QE4yBu/jKoiKkzkGWfz4xkZ0ig9FBg9Ndh9TRG3lwn8q93VKuDckyVAhqhzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738703653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XtD+ry8P8aPJbz38Kyo74Zjp1KUOFJ5jbRnraQXpnXw=; b=FB6dhEFqZuJLr4WtFNjPZLTsD7dU3AWM3p4VTvTQ1xJG4xzMrut/y+GCEfAr1+t0pkxh6W 3ZuBvT4lpe8L+e3Mb/Qg/bb5PnlmxKP7LB7U57cSOjS3Sb31NOCIRWFmqtLPxDq1OBTb8q ZGyBG+bVkYsuvCThjvPkW+xBwmDzTXYFf9H00bfu4dRuEgznrPZVMfs0WtpLnUXEe5YeWz B+K1FlSIv/CvaXRsnhjNN+0shdhC8mY1XLasGhOISsHz2tDLovHtkLLgTP3C+GbJkR6EHg zvJ+Mw48LVRfCyl1Shb+ovv42yQRi086U9XewkCi3LZ4+BSZjKORK3AvJzbpXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738703653; a=rsa-sha256; cv=none; b=Qe9648+EpAT0mcMH3LkYJG872P2qfE83GugUeoh6sgCMsN8pQHTxVsxDxFbTq3wWl8gTrO coY1s5v+dfS3gGWAWDRY2eKzD91mBUDGtoutGZZl1caleGXvnB6edgZOGgJ4b9gGfwStsN ufVRILeQW01mOkJ+GlVRXJVxBbv6waK7IfX49G+VFV6T+KaEtmb1sTmRbJtZeRHDDo4S/4 4aRv29MWNOVmCqZA4Nu/ZzIgZFiyj+27auRUQphc9hg5kPCRrHZzW1o0hYRw3o0nyHd7n0 Kw6d4jGihb7vKincMNN0GhlW7h1gkrV1ZnyuO3pzgJp1VZMQAZgqvBCbeLLtug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynbhj1Bdfz71T; Tue, 04 Feb 2025 21:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514LED31039559; Tue, 4 Feb 2025 21:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514LEDrY039556; Tue, 4 Feb 2025 21:14:13 GMT (envelope-from git) Date: Tue, 4 Feb 2025 21:14:13 GMT Message-Id: <202502042114.514LEDrY039556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fffedd81a4bf - main - pf: send ICMP destination unreachable fragmentation needed when appropriate List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fffedd81a4bf86b1f77fc4ba0d170e7ef73d552c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fffedd81a4bf86b1f77fc4ba0d170e7ef73d552c commit fffedd81a4bf86b1f77fc4ba0d170e7ef73d552c Author: Kristof Provost AuthorDate: 2025-02-03 21:39:35 +0000 Commit: Kristof Provost CommitDate: 2025-02-04 20:56:06 +0000 pf: send ICMP destination unreachable fragmentation needed when appropriate Just like we do for IPv6, generate an ICMP fragmentation needed packet if we're going to need fragmenation for IPv4 as well (i.e. DF is set). Do so before full processing, so we generate it with pre-NAT addreses, just as we do for IPv6. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D48805 --- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 41 +++++++++++++++++++++++-------------- tests/sys/netpfil/pf/icmp.py | 48 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 15 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e50fbc96a8ba..6f10a55b64a8 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1625,6 +1625,7 @@ struct pf_pdesc { struct pf_rule_actions act; u_int32_t off; /* protocol header offset */ + bool df; /* IPv4 Don't fragment flag. */ u_int32_t hdrlen; /* protocol header length */ u_int32_t p_len; /* total length of protocol payload */ u_int32_t extoff; /* extentsion header offset */ diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0ebc813756f1..d78978a75317 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9990,6 +9990,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, pd->ttl = h->ip_ttl; pd->tot_len = ntohs(h->ip_len); pd->act.rtableid = -1; + pd->df = h->ip_off & htons(IP_DF); if (h->ip_hl > 5) /* has options */ pd->badopts++; @@ -10317,21 +10318,6 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 return (PF_PASS); } -#ifdef INET6 - /* - * If we end up changing IP addresses (e.g. binat) the stack may get - * confused and fail to send the icmp6 packet too big error. Just send - * it here, before we do any NAT. - */ - if (af == AF_INET6 && dir == PF_OUT && pflags & PFIL_FWD && - IN6_LINKMTU(ifp) < pf_max_frag_size(*m0)) { - PF_RULES_RUNLOCK(); - icmp6_error(*m0, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); - *m0 = NULL; - return (PF_DROP); - } -#endif - if (__predict_false(! M_WRITABLE(*m0))) { *m0 = m_unshare(*m0, M_NOWAIT); if (*m0 == NULL) { @@ -10380,6 +10366,31 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 goto done; } +#ifdef INET + if (af == AF_INET && dir == PF_OUT && pflags & PFIL_FWD && + pd.df && (*m0)->m_pkthdr.len > ifp->if_mtu) { + PF_RULES_RUNLOCK(); + icmp_error(*m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, + 0, ifp->if_mtu); + *m0 = NULL; + return (PF_DROP); + } +#endif +#ifdef INET6 + /* + * If we end up changing IP addresses (e.g. binat) the stack may get + * confused and fail to send the icmp6 packet too big error. Just send + * it here, before we do any NAT. + */ + if (af == AF_INET6 && dir == PF_OUT && pflags & PFIL_FWD && + IN6_LINKMTU(ifp) < pf_max_frag_size(*m0)) { + PF_RULES_RUNLOCK(); + icmp6_error(*m0, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); + *m0 = NULL; + return (PF_DROP); + } +#endif + if (__predict_false(ip_divert_ptr != NULL) && ((mtag = m_tag_locate(pd.m, MTAG_PF_DIVERT, 0, NULL)) != NULL)) { struct pf_divert_mtag *dt = (struct pf_divert_mtag *)(mtag+1); diff --git a/tests/sys/netpfil/pf/icmp.py b/tests/sys/netpfil/pf/icmp.py index cb9de2bf0f36..e54f9f20a058 100644 --- a/tests/sys/netpfil/pf/icmp.py +++ b/tests/sys/netpfil/pf/icmp.py @@ -48,6 +48,7 @@ class TestICMP(VnetTestTemplate): def vnet2_handler(self, vnet): ifname = vnet.iface_alias_map["if1"].name + if2name = vnet.iface_alias_map["if2"].name ToolsHelper.print_output("/sbin/pfctl -e") ToolsHelper.pf_rules([ @@ -59,6 +60,8 @@ class TestICMP(VnetTestTemplate): ToolsHelper.print_output("/sbin/sysctl net.inet.ip.forwarding=1") ToolsHelper.print_output("/sbin/pfctl -x loud") + ToolsHelper.print_output("/sbin/ifconfig %s mtu 1492" % if2name) + def vnet3_handler(self, vnet): # Import in the correct vnet, so at to not confuse Scapy import scapy.all as sp @@ -66,6 +69,7 @@ class TestICMP(VnetTestTemplate): ifname = vnet.iface_alias_map["if2"].name ToolsHelper.print_output("/sbin/route add default 198.51.100.1") ToolsHelper.print_output("/sbin/ifconfig %s inet alias 198.51.100.3/24" % ifname) + ToolsHelper.print_output("/sbin/ifconfig %s mtu 1492" % ifname) def checkfn(packet): icmp = packet.getlayer(sp.ICMP) @@ -124,3 +128,47 @@ class TestICMP(VnetTestTemplate): # We expect the timeout here. It means we didn't get the destination # unreachable packet in vnet3 pass + + def check_icmp_echo(self, sp, payload_size): + packet = sp.IP(dst="198.51.100.2", flags="DF") \ + / sp.ICMP(type='echo-request') \ + / sp.raw(bytes.fromhex('f0') * payload_size) + + p = sp.sr1(packet, iface=self.vnet.iface_alias_map["if1"].name, + timeout=3) + p.show() + + ip = p.getlayer(sp.IP) + icmp = p.getlayer(sp.ICMP) + assert ip + assert icmp + + if payload_size > 1464: + # Expect ICMP destination unreachable, fragmentation needed + assert ip.src == "192.0.2.1" + assert ip.dst == "192.0.2.2" + assert icmp.type == 3 # dest-unreach + assert icmp.code == 4 + assert icmp.nexthopmtu == 1492 + else: + # Expect echo reply + assert ip.src == "198.51.100.2" + assert ip.dst == "192.0.2.2" + assert icmp.type == 0 # "echo-reply" + assert icmp.code == 0 + + return + + @pytest.mark.require_user("root") + def test_fragmentation_needed(self): + ToolsHelper.print_output("/sbin/route add default 192.0.2.1") + + ToolsHelper.print_output("/sbin/ping -c 1 198.51.100.2") + ToolsHelper.print_output("/sbin/ping -c 1 -D -s 1472 198.51.100.2") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + self.check_icmp_echo(sp, 128) + self.check_icmp_echo(sp, 1464) + self.check_icmp_echo(sp, 1468) From nobody Tue Feb 4 21:21:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnbsH5sXtz5mTfK; Tue, 04 Feb 2025 21:21:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnbsH1JvYz3dMR; Tue, 04 Feb 2025 21:21:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.42 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-844ee166150so146072639f.2; Tue, 04 Feb 2025 13:21:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738704098; x=1739308898; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cKTbr4OKmirNekRDXI5irE9C1ROaqTbCbVCjPTIYFUo=; b=ekwlSEXj4s8hyU8U6tydepYKKIOeoaySDbgcuuc4tvQ2egQ220L7tosHR3/geI9OM/ na6SPISAKrb1bGlaasMQ00ohuQYFATPHpiDcKZV3vcjyN7h/Hu1kXqfbxuCR20muVy7j Es2DAQADebYW6hS6w9mRWM0rCVaFx8SvL2m5XJ0pMgnTMRx7g1PE2sXEDsljjGRlywNH LUSbvJJPg1z83cU8UUo42PcRrsSr7bsLCaX7FRvBfdp9Ixf/lIGPLcIvF8p76/Wl+M/g OyKeDoMJVE5QPrb7wM302v5hjfsejAsNXv7Y21DA9MM2I3v6cRAxWXBd/D/VM+OgCBUM o2zg== X-Forwarded-Encrypted: i=1; AJvYcCUC4RiUndt9pjg/27oYSwSZ3szAQjYJ8/LFFe6oBOt7+pnJHeJQoEjcuol//UdMFlb2Mq/So/x8Fd1xBayxVYDt6tqY@freebsd.org, AJvYcCUNMB6hZhOYNHCuZ5MbXBuER9nSHwUjYYy7pezlY/Nin85biWgFzRwafZP4Oal97EdJWSkPFhj2rqBqpyA2i6Q=@freebsd.org, AJvYcCV7xs/6k1a5FZznEQHh43sLrsMAotJfLnvTqWBmDIBCP+vk58lYrEQEDfCg8f+kGAttdu9iup80o7DQTLiH9D4PAlKqHJ4=@freebsd.org X-Gm-Message-State: AOJu0Yxe66QB/9aJCR10G64Wl7aqK5/jz3BRNN8G9x6y5J7AdPN8M82I hUMMgxp2zOo0qs6fky4wtcSM8LlNwrwOWmcCCKeXIwObiL9U+lvjhM1/VXHjvcFDRBNWItt8np/ QV3R9x2FCpvlesOE97Pv1vhfzDLHJNw== X-Gm-Gg: ASbGncvTyvE9MF8kGG22kEA5UTE80GThD1SlOAcOPwgqLdT1tYr364iKJRIAXO4lfys pVk8z1rLfMlXt8i8UTdUZijO3QhLFFd3VlHPqVJ2mRNky+HmnQpOoTrSy4DqC971Xxn53TEKov1 oRNX0GAzVQAXST179FnS1GEW27RDb1gQE= X-Google-Smtp-Source: AGHT+IG4V9ak9THAKkGFT7CJFGJL/gloZyKCKpU919s/khpf0qAj+N7cLgnL9Ujv4Mtlc9OAYt6rKYGHo0jw+XC50V4= X-Received: by 2002:a05:6602:4084:b0:843:e9c1:9317 with SMTP id ca18e2360f4ac-854ea531346mr58429039f.14.1738704098053; Tue, 04 Feb 2025 13:21:38 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202502041658.514Gwo4I049201@gitrepo.freebsd.org> <20250204171121.8EA2C281@slippy.cwsent.com> In-Reply-To: From: Ed Maste Date: Tue, 4 Feb 2025 16:21:26 -0500 X-Gm-Features: AWEUYZndDOnlXLAVCToW9PxfQMSrYmC8VqwcUFpuf6WyobHe14ddwn-1bcdYV7Y Message-ID: Subject: Re: git: ecccb638d494 - main - mountd: Promote missing netmask log to LOG_ERR To: Rick Macklem Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [2.51 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_SPAM_MEDIUM(0.96)[0.962]; NEURAL_SPAM_SHORT(0.94)[0.942]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.42:from]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_FIVE(0.00)[5]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TAGGED_RCPT(0.00)[]; RBL_SENDERSCORE_REPUT_8(0.00)[209.85.166.42:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.42:from]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Spamd-Bar: ++ X-Rspamd-Queue-Id: 4YnbsH1JvYz3dMR > > Should this be changed from WARNING to ERROR too? > I don't have a strong opinion, but I would say no. > An error in mountd indicates a failure and in this case the semantics > remain what they have always been and doesn't necessarily imply > a semantics failure. I agree with Rick. I wasn't sure about this at first, but noticed that there are some "Warning:" syslogs at LOG_ERR priority already. From nobody Tue Feb 4 21:28:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ync1R5b1fz5mVWb; Tue, 04 Feb 2025 21:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ync1R3HL4z3g82; Tue, 04 Feb 2025 21:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738704523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ViPG+U6l5zmn9mH2r+SBTtFwwYeeCLxPUfrc+ntt7Ps=; b=NyVdaDjLfjeQxuuKKy7MlJjtM6fIIetpSmiBnTL/XNG6+8DucXDIxKnk1uJRPs+IuWfFVG MaM+bRDoA9TfSWCh81/LvuE7WrgtfcLnIeLK+6hKo5mO2zFk2T0jQZ1mzkqFuoVchL6MZm CzO01U2oYbspt2bKiTicZ14idDmCEedOFY2UWliLt8tHMh1qjGKo+39sMEnPADhraFhYZK 9pkIFP0DozCVvrime1V3UbbRT9WW0C9swWSELdYJXswuWkCZG2VEqrOO7CZFDuyQBuqLV6 9Gqm58ONKuzfwGIEcFDEhXHkhtGX8roJCswKy7ftoDlS7aSdqXzGHIgxNZMFxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738704523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ViPG+U6l5zmn9mH2r+SBTtFwwYeeCLxPUfrc+ntt7Ps=; b=cHajIgk1xuWSs8KTIgGB1mRK/YDW/KlbK12y/516i3fpLBh7nlpJR0SFPCbLqWtR8HaWzg oEFbNFMXSspkx10Yq1UAjkPk6I/twEFUe6L9tM8pH6kKopR9Eu3OQ4VX1vRGIOo05ST78E 5rrRh5+w3C2qtEZNhIArVDXZsHROZKWwYBqeQBGQRUVGWwSbdC/zt5vrTWloi2/MPsLPq4 +YP0lAhGSAVSwLo6BHfdl9ZKe/5Z9DY6YRe1msbLWBLu1wNztsTeiLkN+6XxRGxzeOAM6D Rym1MogWHMZUMuV/cJDTmpmuPiCKQ+EzHsEUJ5z11wND4lKBjX72ZihyH8t4kA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738704523; a=rsa-sha256; cv=none; b=AFk03jHqOYxJ66alk3VyFyxy8/Yb5CMsHDiXb8BSOj439RiEQeARi2xZUjFFnv6CQhuryo nlBLcsjLTIx5Cg8YwNORXtSKBcxGM2BRKJgBhbn7exU0qWzL1de4i1N5I4QRSlSiHeBRq+ /z0KstqXua+TXSg9YyWX5zktj0RZROzMcD6vnum+DBlJLAkSKcT7YvgJsOAyskAx/un/Ka CkFyr+RIad3qn8Wfe4If3Dz6Ab4Epd++ZOLvnLHAISasDoTKKFDFwXEWv0QfGtPcvrjJ/O jX1g31f9ZPVUYrWkYRX43UEpbXOphd+Uz0qdmhDxVZ7VLQgqPvD0+gnSqKw0zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ync1R2jGrz7Wy; Tue, 04 Feb 2025 21:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514LShms058574; Tue, 4 Feb 2025 21:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514LShDL058571; Tue, 4 Feb 2025 21:28:43 GMT (envelope-from git) Date: Tue, 4 Feb 2025 21:28:43 GMT Message-Id: <202502042128.514LShDL058571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: f16ca171eaad - main - =?utf-8?Q?man:=E2=80=AFRemove references to classful networks?= List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f16ca171eaad70563872f61042eccd2971da572f Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=f16ca171eaad70563872f61042eccd2971da572f commit f16ca171eaad70563872f61042eccd2971da572f Author: Olivier Cochard AuthorDate: 2025-02-04 21:22:35 +0000 Commit: Olivier Cochard CommitDate: 2025-02-04 21:27:21 +0000 man: Remove references to classful networks Update wording in manual pages to replace references to classful networks with CIDR notation. Approved by: glebius, dhw Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D48853 --- sbin/ipf/ipnat/ipnat.5 | 2 +- sys/netinet/libalias/libalias.3 | 8 ++++---- usr.sbin/ppp/ppp.8 | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/ipf/ipnat/ipnat.5 b/sbin/ipf/ipnat/ipnat.5 index 2b391f119450..c6c8c2e54fc2 100644 --- a/sbin/ipf/ipnat/ipnat.5 +++ b/sbin/ipf/ipnat/ipnat.5 @@ -332,7 +332,7 @@ a network or range of network addresses, so a rule written like this: rdr le0 0/0 -> 192.168.1.0 .fi .PP -Will not spread packets across all 256 IP addresses in that class C network. +Will not spread packets across all 256 IP addresses in that /24 subnet. If you were to try a rule like this: .nf diff --git a/sys/netinet/libalias/libalias.3 b/sys/netinet/libalias/libalias.3 index c19acffe03ae..1b8ecc14059d 100644 --- a/sys/netinet/libalias/libalias.3 +++ b/sys/netinet/libalias/libalias.3 @@ -200,11 +200,11 @@ is closed. .It Dv PKT_ALIAS_UNREGISTERED_ONLY If this mode bit is set, traffic on the local network which does not originate from unregistered address spaces will be ignored. -Standard Class A, B and C unregistered addresses are: +The standard private IP address ranges are: .Pp -10.0.0.0 -> 10.255.255.255 (Class A subnet) -172.16.0.0 -> 172.31.255.255 (Class B subnets) -192.168.0.0 -> 192.168.255.255 (Class C subnets) +10.0.0.0 -> 10.255.255.255 (/8) +172.16.0.0 -> 172.31.255.255 (/16) +192.168.0.0 -> 192.168.255.255 (/24) .Pp This option is useful in the case that the packet aliasing host has both registered and unregistered subnets on different interfaces. diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 33bdc69f45a3..c351bd50c8c7 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -2202,8 +2202,8 @@ If your provider assigns your address dynamically, choose a suitably unobtrusive and unspecific IP number as your address. 10.0.0.1/0 would be appropriate. The bit after the / specifies how many bits of the -address you consider to be important, so if you wanted to insist on -something in the class C network 1.2.3.0, you could specify 1.2.3.1/24. +address you consider to be important, so if you wanted to specify an +address within the 1.2.3.0/24 subnet, you could specify 1.2.3.1/24. .It If you find that your ISP accepts the first IP number that you suggest, specify third and forth arguments of @@ -3186,7 +3186,7 @@ is an address from a LAN. Default: Disabled. Enabling this will tell .Nm -to add proxy arp entries for every IP address in all class C or +to add proxy arp entries for every IP address in all /24 subnets or smaller subnets routed via the tun interface. .Pp Proxy arp entries are only made for sticky routes that are added From nobody Tue Feb 4 22:20:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynd9D0X1Sz5mZQj; Tue, 04 Feb 2025 22:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynd9C6wwpz3x5T; Tue, 04 Feb 2025 22:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738707632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aK+/PM9qDiUtX7/PwBoKFngIQSU1B0RmtjHowU82mo=; b=OvQax3oNuVn3NJ0aJTFKCA5JyZJiGjN3pYGYcSkiWGrwRTcQDAmqjFtPPpMVsSVBhIS0rm SZiniVD/3hzcV5sNXf7nu5VsgVFcc2FX0/fqbLhHwUKAcpvz+7X0eIMGt5hGnjnqqgDWon gaY8mmn23d5+AaFmBNCpQb8/RHhKszVvyDqQdceLyVh7kS//vXPdEokRV+z2jOok8Urmjx XfO0DR2d7CmjYHKFSpHmj+/l1XC3/tcHp20WQlkQgWQ3dwd2eSqm+HM2OT0cUJXvs60XZn sXjLPlzJ4yeVni2xIEpMKclq80ORZ+pcL2QAhvWmB0ttTqj3yW7IrY9x+JQQ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738707632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aK+/PM9qDiUtX7/PwBoKFngIQSU1B0RmtjHowU82mo=; b=yV1r0Ejw2YBDtAw64BaSQr5NP3ivUGHCaFlO89aF8QOAp12V/nC7z9biEu4xCOkWHy/TIR GWKDkz8X5Cm2OUbzBtR+Q3H7bvFOT1mjtxnGrElcfb3TNBfhs4RwOdNFF1d+9Jd+YiARiJ WOeYBSXIL9lUn8fTFGKgj4lJiys78pGkZjk+dZloV+WgL9n8WULkCH7En1ZXa0J0aRHEUx mxdjE3S29O1w3qWq24yvqIT0Q3mFCMPqlYsK/yAFlbYe4X0lyUsqtjIt/1WXYktCYAElS3 Gd8Hq+TJbcc/oRK1PeUJYrV3RSDB/Yq9CowQqrUXwVtwahEzkTNpSzRwbNLGlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738707632; a=rsa-sha256; cv=none; b=ev/L4NqEo/krW9iZ2z5k4RbSTClfleeNOQpX2vbfY7+7jmeo1DhuwqgR7vAuxpXEOSFw/G eQQ1YPWrKV1GHtyKZ26IV4B/+6W9k9925aJ/zi9G3go3yUN/qWj5BHRoGuIQAtMtTdUKnL e85I7FtqE8bko+XOpWi832FoeFE23hlj8w5MD8vhKj5wh6BEqYC0RmagOIUqneAfFMv7ir Y3xzV5MDgJgdOf+K7zA/lt155ZhaIF6mNaBNS8qi/P6MBjanmz+Mg6RkUbI90ZKNK3hNG4 4NUEkN/pbPUYyB3LY6Sne3GcOgsAd7fc+4i8Bd+GgNl/m7O1IHUk9FmZDevFlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynd9C6F8hz8jF; Tue, 04 Feb 2025 22:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 514MKVsu063991; Tue, 4 Feb 2025 22:20:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 514MKV6Y063988; Tue, 4 Feb 2025 22:20:31 GMT (envelope-from git) Date: Tue, 4 Feb 2025 22:20:31 GMT Message-Id: <202502042220.514MKV6Y063988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1a0cb938f7b4 - main - unlink, rmdir: call notify_upper from VOP pre method instead of syscall List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a0cb938f7b461edc40316cb44a80438df674174 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1a0cb938f7b461edc40316cb44a80438df674174 commit 1a0cb938f7b461edc40316cb44a80438df674174 Author: Konstantin Belousov AuthorDate: 2025-02-04 00:23:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-02-04 22:19:50 +0000 unlink, rmdir: call notify_upper from VOP pre method instead of syscall Suppose that there are two or more nullfs mounts over some fs, and suppose the we unlink a file on one of the nullfs mount. This way notify_upper get called from the lower vnode as well, allowing the other nullfs mounts to note that and drop their caches for the unlinked vnode. PR: 254210 Reviewed by: olce Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48825 --- sys/kern/vfs_subr.c | 2 ++ sys/kern/vfs_syscalls.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ef51fdba8e7c..9e9b56064ecf 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6224,6 +6224,7 @@ vop_remove_pre(void *ap) a = ap; dvp = a->a_dvp; vp = a->a_vp; + vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK); vn_seqc_write_begin(dvp); vn_seqc_write_begin(vp); } @@ -6292,6 +6293,7 @@ vop_rmdir_pre(void *ap) a = ap; dvp = a->a_dvp; vp = a->a_vp; + vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK); vn_seqc_write_begin(dvp); vn_seqc_write_begin(vp); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index bbd67c2b0326..41609d7c5351 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2034,7 +2034,6 @@ restart: if (error != 0) goto out; #endif - vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK); error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd); #ifdef MAC out: @@ -4002,7 +4001,6 @@ restart: goto fdout; goto restart; } - vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK); error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); vn_finished_write(mp); out: From nobody Wed Feb 5 00:47:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnhQh5c89z5mmK3; Wed, 05 Feb 2025 00:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnhQh53WPz3XhR; Wed, 05 Feb 2025 00:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HIZ2mExBdJK69voErlEWubseAFD7y15Wmk+jZrhmc2o=; b=FRG+TR+j3MSLEpKhWp0l1jgCjWRcKddrWbJz76GuJO5sXZFubPQiHHSaJFmga00qRzOLMc kAhMiolq2j8eqtQVg0NhSQNJ0oas6RezmlpoFKg5/pMQkjxz20iSUzuYkXVX+oUxGRM93f w1TUCKnkxy3GKE1CTfQ4yH0tG/EZYU+ksTN4lq6OCQ0vYJDehGefHHohXlrbbVOYBNYMkQ BgZkXbbZFlBGM1n1YXmaumTh66JyZP6UlbXG9LF5SG4OtGYexG5LYwJKM9KHYdxapIUXqo Ea3Nl6V6VTC6tqpYB3spg3NhypWh9Kxrw82YvAtxS757h9Zw53nrdE/Vvv8DCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HIZ2mExBdJK69voErlEWubseAFD7y15Wmk+jZrhmc2o=; b=Oebrur78rDqO7lXY3UkkfRxxGhsIguPJ7cTwLjHRC3TWDA4pPQ85PS1aecFiSn6Z5ivOLj ssk4Mw5fARXqh68Ur/17QyDZHMi2xJnB1CYHc7KQkvjEC2JyJAiWgKrRUy7ywzggYTPONF gNLD8FuXnOanpZXG2oyE4wxE6mCUsC5HhXobtavCuzWahUpaCpkWgcmutF+Rx9hopHaJbl dwGxxgLWvexEdSadxHhK8/tHUw1xRXJlTH9iiqKtrdoNCIXfxxxodI1mnLqKUZp+tnFASL Koo8bVBqK+T+tXSVaxnXMM8rFZro1vdjAOeIhSEwW7gmICn11th5HoSIAa3hJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716444; a=rsa-sha256; cv=none; b=hNZDkibIR5S8UrGoXDLJ1WcmPQn+7MTCAVQbJskaVF5LW84iWRowQZ/tBN2I/tXx1VTWdx GdttwZkf8uifoDt9FfqVvMfCGJJVHj+fD2DJn8SQHBR+anXbCgSxU0qBT0LCH7FzadPo72 7v0c95CVuzr1lQPUUAGpqB+IvixiYUP2l0SJU2bGEsz8wX5UEfBHKV9T0toj/kOIKf0Jl9 c0MeKh9MhjIebVeYY7h9FsTpdGzFSqCknTwwl4VilcSBPR6zc6dYbCgBMN0s1IEFN+7kMB oeHGwRysRGSWAJXFHCSthQWb2gsaM4IpOn0c1miGcNIfaVfWc5EGMUMHic4duA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnhQh4MZDzTTc; Wed, 05 Feb 2025 00:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150lOcv032797; Wed, 5 Feb 2025 00:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150lO3k032794; Wed, 5 Feb 2025 00:47:24 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:47:24 GMT Message-Id: <202502050047.5150lO3k032794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d9beef938ae7 - main - mpt: print req->index rather than the pointer itself in mpt.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9beef938ae7c3189e85e377468f83804de94712 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d9beef938ae7c3189e85e377468f83804de94712 commit d9beef938ae7c3189e85e377468f83804de94712 Author: Fuqian Huang AuthorDate: 2019-06-17 10:29:56 +0000 Commit: Warner Losh CommitDate: 2025-02-05 00:47:21 +0000 mpt: print req->index rather than the pointer itself in mpt.c Print req->index instead of printing the pointer itself to avoid kernel pointer leakage. PR: 238661 Signed-off-by: Fuqian Huang Reviewed-by: imp --- sys/dev/mpt/mpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c index 80b26a0d6280..63ddb13a9f03 100644 --- a/sys/dev/mpt/mpt.c +++ b/sys/dev/mpt/mpt.c @@ -486,8 +486,8 @@ mpt_default_reply_handler(struct mpt_softc *mpt, request_t *req, { mpt_prt(mpt, - "Default Handler Called: req=%p:%u reply_descriptor=%x frame=%p\n", - req, req->serno, reply_desc, reply_frame); + "Default Handler Called: req=%u:%u reply_descriptor=%x frame=%p\n", + req->index, req->serno, reply_desc, reply_frame); if (reply_frame != NULL) mpt_dump_reply_frame(mpt, reply_frame); From nobody Wed Feb 5 00:47:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnhQk1Wtzz5mmdv; Wed, 05 Feb 2025 00:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnhQj5wTVz3Xks; Wed, 05 Feb 2025 00:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2WLWSUdVvkCc7pIX5emh+Y59EiI4gYq5lYBVYBOYgi4=; b=pi3sPCBNfiyepbZXpGoKaICRCQluwq85HvEJZ6kccDqvfzDt9477rVaeQxvAOOOgR+TaWr 731TL09kgnMnKP/Ew6S7Wsy/1qIR9TP3ojMvvp6to3F1N46kAAGlmmMPfLNzrGT8hvqyQ/ wjoemnXFLeeqLEFx2++8vWKviAxbewxuZDy2yz1DE2ZO0VNLCsO7WJ2r1f29oxd6WsfRu9 oX1etPgIIWQlpf5T62InkqNS3UENSrhEffe4blgEV/IxmLvn8CCbrQAlumQIEUGrRiaJ3U Kg6YOknlCB/2oWr88kl9v4w3+uwmWPEa01Uh/FYYb5XI0Vx16ZuUPKGogudmcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2WLWSUdVvkCc7pIX5emh+Y59EiI4gYq5lYBVYBOYgi4=; b=aEKJmVRoaKJ95icxzpLd5uKE7Y9Ut/drVeTiFXftS7p1xkzVtx2GlUL2HgFsrLumq4ROP9 gwsNjnjMyLSRiOgZhQM5ucVPspz4Crs9cSFcF99bc1Ebf9b8qgZOTtzN5qxu3lEvYu6jBA vLL0SdsEyJ7yiA8Cd++yjZG30+/kJFZ2HwAlS5EkEzUGW+oCw5P5UEhW6/IQ2cVzQ/KVPd k5iCWUBcQ3l+TgNWKDlMUFHs6FNsnsCbocDKdjmlf/Y7Q/1VjSiX1bG4+IIcDqrLsVD5cr N+7QvnLgeteW7Thx8JF+ueNtm5SfoCgWf/nnxNHUNr5hSrBmFuYJcXTUSVWz5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716445; a=rsa-sha256; cv=none; b=tSh46Wu7j8BKBRaV8LdAT99Aij/hTtn4PY0JOUNt1RxCEzhXhC0m3M6BERacspWjjBR+VQ uE+2VFqD2PcrZgllsj/ymj2kCBqS3lAvq2hnZ9znG9Pz+kJiCdKeoI6j6nAb7oyeGtLhP8 itQlP61p/YUd3Vg0QAloKEdUIUdPB7d36lw/i4UD0FGz0LSD9AM5G+cu80ifPzwnmTG12E q85ygaqjv5rqrs1pgH+Y6iNvu/b8OV496VWRcG/jN+/U/1J6d0pxMzoo8w6cTNKoTbK/1a PNa7vyTSV0o7JWxgM/uIk/rNBBmkHSEkolwPQKRVWM8D29t9/DGTtME7ng4k1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnhQj52M8zTTf; Wed, 05 Feb 2025 00:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150lPPd032830; Wed, 5 Feb 2025 00:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150lPO9032827; Wed, 5 Feb 2025 00:47:25 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:47:25 GMT Message-Id: <202502050047.5150lPO9032827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5b900bd26ab4 - main - mpt: replace mpt_prt with mpt_lprt in mpt_cam.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b900bd26ab46dfb1a6889d593de3f2e50f4ad35 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b900bd26ab46dfb1a6889d593de3f2e50f4ad35 commit 5b900bd26ab46dfb1a6889d593de3f2e50f4ad35 Author: Fuqian Huang AuthorDate: 2019-06-17 10:55:00 +0000 Commit: Warner Losh CommitDate: 2025-02-05 00:47:21 +0000 mpt: replace mpt_prt with mpt_lprt in mpt_cam.c Replace mpt_prt with mpt_lprt with DEBUG level to print kernel pointers only at the debug level. PR: 238662 Signed-off-by: Fuqian Huang Reviewed-by: imp --- sys/dev/mpt/mpt_cam.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 490add7bc599..35efdd1474d6 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -1246,7 +1246,8 @@ mpt_timeout(void *arg) MPT_LOCK_ASSERT(mpt); req = ccb->ccb_h.ccb_req_ptr; - mpt_prt(mpt, "request %p:%u timed out for ccb %p (req->ccb %p)\n", req, + mpt_lprt(mpt, MPT_PRT_DEBUG, + "request %p:%u timed out for ccb %p (req->ccb %p)\n", req, req->serno, ccb, req->ccb); /* XXX: WHAT ARE WE TRYING TO DO HERE? */ if ((req->state & REQ_STATE_QUEUED) == REQ_STATE_QUEUED) { @@ -2571,7 +2572,8 @@ mpt_scsi_reply_handler(struct mpt_softc *mpt, request_t *req, scsi_req = (MSG_SCSI_IO_REQUEST *)req->req_vbuf; ccb = req->ccb; if (ccb == NULL) { - mpt_prt(mpt, "mpt_scsi_reply_handler: req %p:%u with no ccb\n", + mpt_lprt(mpt, MPT_PRT_DEBUG, + "mpt_scsi_reply_handler: req %p:%u with no ccb\n", req, req->serno); return (TRUE); } @@ -2628,7 +2630,8 @@ mpt_scsi_reply_handler(struct mpt_softc *mpt, request_t *req, if ((req->state & REQ_STATE_TIMEDOUT) == 0) { TAILQ_REMOVE(&mpt->request_pending_list, req, links); } else { - mpt_prt(mpt, "completing timedout/aborted req %p:%u\n", + mpt_lprt(mpt, MPT_PRT_DEBUG, + "completing timedout/aborted req %p:%u\n", req, req->serno); TAILQ_REMOVE(&mpt->request_timeout_list, req, links); } @@ -3988,7 +3991,8 @@ mpt_recover_commands(struct mpt_softc *mpt) uint8_t response; MSG_REQUEST_HEADER *hdrp = req->req_vbuf; - mpt_prt(mpt, "attempting to abort req %p:%u function %x\n", + mpt_lprt(mpt, MPT_PRT_DEBUG, + "attempting to abort req %p:%u function %x\n", req, req->serno, hdrp->Function); ccb = req->ccb; if (ccb == NULL) { @@ -4063,7 +4067,8 @@ mpt_recover_commands(struct mpt_softc *mpt) mpt_reset(mpt, TRUE); continue; } - mpt_prt(mpt, "abort of req %p:%u completed\n", req, req->serno); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "abort of req %p:%u completed\n", req, req->serno); } } From nobody Wed Feb 5 00:47:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnhQl15Ddz5mmkW; Wed, 05 Feb 2025 00:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnhQk6fp0z3Xmn; Wed, 05 Feb 2025 00:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ug9cOZbniKhp/hpT3GgKJYC+JvOpTxOK9yDMSSyXk7o=; b=crlNQ8BP0YlNPapZdzWvlYIZmUQ3Wg3pvbwUPKl4UrhS8wZc/MJ7Pp2agoQMOMTgHKbQBC sWH+WXSoR79NiUErs0O57pU5+zn/LIwnQMtCqqPcncsugVi2TGuank7eVcBKpn3gbsJSS7 KcMudfqtPJ4UaF4zpJcBVRI3eOkayWHzZ3NosukpXkYoafAHLPoHfYQluXXaAXFHif5ywv rAakmKDPDhlVB4qPw2hV6XktbY5joMo1nHuJAV/LpP6PH0iNUe/QvGUeXPZzS3zZwSGfwE VXlaAb4dkV+fbvuJ/5E1LCwSwo2YMEfWdjfxLFyakthG36x8kXmgv6Z/3nZWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ug9cOZbniKhp/hpT3GgKJYC+JvOpTxOK9yDMSSyXk7o=; b=fWAfSJ4jES8XD8OlZuZjq8XrT8It7+ZkdPpinfEUvheEN3hfEbEiIVZ5c43GLyxvHivp5L zYfB25r3inaGTrYkZcbjFa/GD/YnRucKcnxtZfOBT9uiZp/iHmMcDHPLDcEX/DdWwu0N2V tzHIcktznn8i/RZXBU7muipG29geuCDGT2fniZhpeAF1GC0i6pujOs491pHrvsEnMpEyzg GQ0iJRAUuMrUWPwCrngezwRg2HTsnnn6gtINxLU4GGcbeH/wqlVqCiw8qnaaLYwS0URb5J QESNJr3FOnMKFTw74NzVVOpVgj0kWVAOasfe/AbNrEdHFAdg0WXEwzTWJsHu4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716446; a=rsa-sha256; cv=none; b=LNAGtVcQjZCruD1HlUcO7VvR7LJ4ypyM812Um3YqrZeWV1IECLO2U7uMUDrwQgQ0v+pTOh +/pApJvQIUBLZ9xQVNJt1qMGqWSJhtOdj6niHvJSdfqAYM+MEW5fu0QLJAM/cW7lNLk+16 xhNr/MM5zkxmS+GQIfoa1YQ014X1irr/tRi73YQ0iSHvNGt15JAqKp0eJNM+hwxvzcoz5j HtrZy8dBJWt1bBpLFWJO/vwv4cnFEVvSbfzmOzUaXWmtikPJ81E46ksTpxA5kCU8+wuoI/ VQNQ1XI6i6qKALUu5mITz4cxrc1WOuxpVdVXt4YXl1XnLGZ5pkp5iqiBRpidlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnhQk67RtzTTg; Wed, 05 Feb 2025 00:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150lQ4o032863; Wed, 5 Feb 2025 00:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150lQQp032860; Wed, 5 Feb 2025 00:47:26 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:47:26 GMT Message-Id: <202502050047.5150lQQp032860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2d17f44a5ae6 - main - rc.d: Add hastd as a prereq for devd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d17f44a5ae6e948c3a93cac30b8315d127ba900 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2d17f44a5ae6e948c3a93cac30b8315d127ba900 commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900 Author: Warner Losh AuthorDate: 2025-02-05 00:36:18 +0000 Commit: Warner Losh CommitDate: 2025-02-05 00:47:21 +0000 rc.d: Add hastd as a prereq for devd Setuping up CARP and HAST described in: https://www.freebsd.org/doc/en/books/handbook/disks-hast.html doesn't work at boot time because devd start before hastd. PR: 199733 Submitted-by: hs_fbsd@on-sky.net (no name given) --- libexec/rc/rc.d/devd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd index 98f2068c2075..524fb045dfab 100755 --- a/libexec/rc/rc.d/devd +++ b/libexec/rc/rc.d/devd @@ -3,7 +3,7 @@ # # PROVIDE: devd -# REQUIRE: netif ldconfig +# REQUIRE: netif ldconfig hastd # BEFORE: NETWORKING mountcritremote # KEYWORD: nojail shutdown From nobody Wed Feb 5 00:54:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynhb06cVgz5mn0Y; Wed, 05 Feb 2025 00: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynhb064H5z3bgM; Wed, 05 Feb 2025 00: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=1738716876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wI4VM/ED7SzFDVXJbYlCjrcWJx8kCpDXcHhc2qk+6rQ=; b=oYuREYSY39zbi1oVv4IJVmTfLaxYQ2Pko1I6ci1oTdCww2eHZmXm7EPjYgtOl+HdKRt9eX seKf3sxDXYcdsqhQPXchCQsqve9SI/J8Sow/jMosVXqWgFPoTQwf1ITL+9dsXb1lf094In mYHC+w6USrOrYr3fsDmZBNXJcYYv097j6q8Pz6A4TrW/93BEAcbqy+wa9EYdL6d2/V1mTb 7KwN2MGFH0L2CPKKLdFnFtvkC/0tgZ0SlOaPj7jnYJnuACstBN6s22jppl+nF9RywaEIfw f/4p2M4OrUm0EdfUEU4I49TnhjKY4pVIFB6saXSxmonfpdzq7bxU6/5rebU28g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wI4VM/ED7SzFDVXJbYlCjrcWJx8kCpDXcHhc2qk+6rQ=; b=CIiMx0Dc+FY9nLwkb586yTYQeRDNOT9+p7oagnrUpU0sWLgBvhEW6Kqp1U9QYzSIvwdvUn zYHP24vr/PGE1oyfDmO4h5tn7HEM6CZeTQHWf7m7FQNcaQV9AuCAfNl6MLQcAb+tKgAstU MY33lKeLF47Essd5QSPx5ujoel0VgyK+SP4X8FXKHViEBKR0GntJWXpTAxQ/OIS/ZuVzup W7t5wRhvIBmBSAH2IflQxruOEkUa89VsFdVuxV31bcKJRNOfvDEOZhpbnTqP214VHNH3QE dqTECtEkE4bsUFVRgzd+bvKah1QqbkREB9xhPTG8LP219D/PSfsjMTfLN+Z1rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716876; a=rsa-sha256; cv=none; b=as4M7zjWGRgY1jHI7/7KqrjKqQw+R9i35A6dQoHC+9UFMHAUrbQo591MSTyrXbKxdEsqal X6kKwuHoJd5DE72qxQyq+fucEMy0qAsBEdx7jV/eZYk+twrBJdN/Mob0YON+QYUsTXUZJy ABBhq4FKdp8Lb33lxR1zZKGV1/hyUexWU7kdZ41izH1Of+Egt2cagcWoYH9ZIGz9nU0ddK FmCfOoGeRo+HaYo1Zs4zNxrkO/lDMm472/mr3YWE/2gHk6DVwE8CrpjanZdZ3TwkKhENLL h4MbkjLZP4f3S18EnTDqwtU7YGoR1yg5x+My4/tKDbLtBssJfLh3BDG/Hm429A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynhb056fszTVg; Wed, 05 Feb 2025 00:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150saNq050713; Wed, 5 Feb 2025 00:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150saHQ050710; Wed, 5 Feb 2025 00:54:36 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:54:36 GMT Message-Id: <202502050054.5150saHQ050710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 56304579c17b - main - netlink: remove _pru_ prefix from protosw method names List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56304579c17b81740bc448d7f5e06035b9d0fa2d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=56304579c17b81740bc448d7f5e06035b9d0fa2d commit 56304579c17b81740bc448d7f5e06035b9d0fa2d Author: Gleb Smirnoff AuthorDate: 2025-02-05 00:36:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-05 00:54:20 +0000 netlink: remove _pru_ prefix from protosw method names This is a relic that doesn't has any value now. --- sys/netlink/netlink_domain.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 00eb2923eddf..94f880cbfb61 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -311,7 +311,7 @@ nl_bind_locked(struct nlpcb *nlp, struct sockaddr_nl *snl) } static int -nl_pru_attach(struct socket *so, int proto, struct thread *td) +nl_attach(struct socket *so, int proto, struct thread *td) { struct nlpcb *nlp; int error; @@ -373,7 +373,7 @@ nl_pru_attach(struct socket *so, int proto, struct thread *td) } static int -nl_pru_bind(struct socket *so, struct sockaddr *sa, struct thread *td) +nl_bind(struct socket *so, struct sockaddr *sa, struct thread *td) { struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); struct nlpcb *nlp = sotonlpcb(so); @@ -450,7 +450,7 @@ nl_autobind_port(struct nlpcb *nlp, uint32_t candidate_id) } static int -nl_pru_connect(struct socket *so, struct sockaddr *sa, struct thread *td) +nl_connect(struct socket *so, struct sockaddr *sa, struct thread *td) { struct sockaddr_nl *snl = (struct sockaddr_nl *)sa; struct nlpcb *nlp; @@ -537,7 +537,7 @@ nl_close(struct socket *so) } static int -nl_pru_disconnect(struct socket *so) +nl_disconnect(struct socket *so) { NL_LOG(LOG_DEBUG3, "socket %p, PID %d", so, curproc->p_pid); MPASS(sotonlpcb(so) != NULL); @@ -983,10 +983,10 @@ nl_setsbopt(struct socket *so, struct sockopt *sopt) .pr_flags = PR_ATOMIC | PR_ADDR | PR_SOCKBUF, \ .pr_ctloutput = nl_ctloutput, \ .pr_setsbopt = nl_setsbopt, \ - .pr_attach = nl_pru_attach, \ - .pr_bind = nl_pru_bind, \ - .pr_connect = nl_pru_connect, \ - .pr_disconnect = nl_pru_disconnect, \ + .pr_attach = nl_attach, \ + .pr_bind = nl_bind, \ + .pr_connect = nl_connect, \ + .pr_disconnect = nl_disconnect, \ .pr_sosend = nl_sosend, \ .pr_soreceive = nl_soreceive, \ .pr_sockaddr = nl_sockaddr, \ From nobody Wed Feb 5 00:54:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynhb23QnWz5mmx5; Wed, 05 Feb 2025 00:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynhb16cmYz3bZY; Wed, 05 Feb 2025 00:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI8vyg1Svp/dAywO4mLyldnQON+MZ/bl3ik3qdU2x5s=; b=JgNIKANisVgCh9Vz1VE6bWMRjVs2yC3SMm15Yyb/dfw6AZ83g5KDTGMp2uh4GZqGNcCLR+ yX0cgjIuq1T6+yNyHys7O6AWlXZCQSwh3iOLb7NQE6br2Z5HML+e7p9+3skpQ7Q9HVEBo2 lS5bvhTSTILawDy55btrJ6/GFvmQKULK6aUypBz9OVpttv/K22zQPB4L6PIfwZD24qpLT4 0zA29r186Lg6PDtXDLwDjU2QTYCGrscxNjl/pgJeaxZA/Zl7XgP9diqy7IJdrRIoXr63xu XrmoOJMt4+k5pNF2RRyjJNI82UmoP7JaeOaqG8rYGFIW9HT8ZZMh3FceGcltVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI8vyg1Svp/dAywO4mLyldnQON+MZ/bl3ik3qdU2x5s=; b=Ms+couxmsLKMVtj+6NPzHTjrQY1k/72NP/n3pOVXwIrsF8/c6v+apywZ13ci1wlTuLwbWy x9S7lYZINeex2/J+DyNgUkbTtS4mDXdRSBsAUH4K0h/VFi33kG9mi3x3r4Q50Ej2hxq86C xj2zMgDzqnoh+ULs2Kwkb+eeyAPCkRPIb308C4k3/84BZgzsFUNrh3CvgFHu5WlecCcvZt u4S57wOPg4JJMEUd32ICjbjERDL2yEax8k+/TdgIoW3kYkG5gW+4kJfA/A2Jc+tMjv/YWc huW+7egfOBCUDvC4HBIzobT+7q0LtYoQTXjaEVUXwd4rckp9VaS3ReXjZPTPVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716877; a=rsa-sha256; cv=none; b=XC09SXV8DLbLvpJHZ9RJqymubQAkfPKyG59zC0zVxSxB5C8YvrcSATZwZnnscXy52vrnr+ FOpo7huAIdXYA93BKbSqqekgeu+0C8mag9y6fs9JfbYr5C6K5UO8SGJETCBzynxLUF1OxK Xz15037zB8c0spW1i8wy+rRijtkioFPv8fKvowptUlCxgDS6QDF+mPXJoxrSA+kjD5tGcp S3tGUB0Ns3XeKQZraAqOMrmUqb5Q0Kpyo/TnYJicj7HU/n0s9FjjVHp0E+Sf0PVOimp7GO v4oC+PcYOL4h3nN9TO+EZdLH0unV9SCI/MLfFRP7rNz1v+XEyh7fhRM5H0+DAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynhb165QvzTvt; Wed, 05 Feb 2025 00:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150sbWQ050747; Wed, 5 Feb 2025 00:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150sbG9050744; Wed, 5 Feb 2025 00:54:37 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:54:37 GMT Message-Id: <202502050054.5150sbG9050744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 841dcdcd3f0a - main - netlink: initialize VNET context with VNET_SYSINIT() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 841dcdcd3f0a1dda65c080cec8377e3dc5b1aae7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=841dcdcd3f0a1dda65c080cec8377e3dc5b1aae7 commit 841dcdcd3f0a1dda65c080cec8377e3dc5b1aae7 Author: Gleb Smirnoff AuthorDate: 2025-02-05 00:36:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-05 00:54:21 +0000 netlink: initialize VNET context with VNET_SYSINIT() With the initial check-in netlink(4) was very conservative with regards to using memory and intrusiveness to the kernel and network stack. In particular it would initialize the VNET context only on the first actuall call to socket(PF_NETLINK), saving on allocation of a struct nl_control of size 224 bytes. Now it is clear that netlink(4) is primary citizen of FreeBSD, with a set of system tools using it. So resort to normal VNET_SYSINIT() and with that shave a lot of complexity, since after the change V_nl_ctl is immutable. --- sys/netlink/netlink_ctl.h | 1 - sys/netlink/netlink_domain.c | 89 +++++++++++++++----------------------------- sys/netlink/netlink_module.c | 61 ++++++++---------------------- sys/netlink/netlink_var.h | 6 +-- sys/netlink/route/iface.c | 6 --- 5 files changed, 47 insertions(+), 116 deletions(-) diff --git a/sys/netlink/netlink_ctl.h b/sys/netlink/netlink_ctl.h index 58f7f6c4abe3..895f70322a29 100644 --- a/sys/netlink/netlink_ctl.h +++ b/sys/netlink/netlink_ctl.h @@ -77,7 +77,6 @@ bool netlink_register_proto(int proto, const char *proto_name, nl_handler_f hand bool netlink_unregister_proto(int proto); /* Common helpers */ -bool nl_has_listeners(uint16_t netlink_family, uint32_t groups_mask); bool nlp_has_priv(struct nlpcb *nlp, int priv); struct ucred *nlp_get_cred(struct nlpcb *nlp); uint32_t nlp_get_pid(const struct nlpcb *nlp); diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 94f880cbfb61..0567537d1d1d 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -65,11 +65,13 @@ _Static_assert(NLP_MAX_GROUPS >= 64, "NLP_MAX_GROUPS has to be at least 64"); #define NLCTL_TRACKER struct rm_priotracker nl_tracker -#define NLCTL_RLOCK(_ctl) rm_rlock(&((_ctl)->ctl_lock), &nl_tracker) -#define NLCTL_RUNLOCK(_ctl) rm_runlock(&((_ctl)->ctl_lock), &nl_tracker) +#define NLCTL_RLOCK() rm_rlock(&V_nl_ctl.ctl_lock, &nl_tracker) +#define NLCTL_RUNLOCK() rm_runlock(&V_nl_ctl.ctl_lock, &nl_tracker) +#define NLCTL_LOCK_ASSERT() rm_assert(&V_nl_ctl.ctl_lock, RA_LOCKED) -#define NLCTL_WLOCK(_ctl) rm_wlock(&((_ctl)->ctl_lock)) -#define NLCTL_WUNLOCK(_ctl) rm_wunlock(&((_ctl)->ctl_lock)) +#define NLCTL_WLOCK() rm_wlock(&V_nl_ctl.ctl_lock) +#define NLCTL_WUNLOCK() rm_wunlock(&V_nl_ctl.ctl_lock) +#define NLCTL_WLOCK_ASSERT() rm_assert(&V_nl_ctl.ctl_lock, RA_WLOCKED) static u_long nl_sendspace = NLSNDQ; SYSCTL_ULONG(_net_netlink, OID_AUTO, sendspace, CTLFLAG_RW, &nl_sendspace, 0, @@ -128,7 +130,7 @@ nl_port_lookup(uint32_t port_id) { struct nlpcb *nlp; - CK_LIST_FOREACH(nlp, &V_nl_ctl->ctl_port_head, nl_port_next) { + CK_LIST_FOREACH(nlp, &V_nl_ctl.ctl_port_head, nl_port_next) { if (nlp->nl_port == port_id) return (nlp); } @@ -209,19 +211,8 @@ nl_send_group(struct nl_writer *nw) nw->buf = NULL; - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); - if (__predict_false(ctl == NULL)) { - /* - * Can be the case when notification is sent within VNET - * which doesn't have any netlink sockets. - */ - nl_buf_free(nb); - return (false); - } - - NLCTL_RLOCK(ctl); - - CK_LIST_FOREACH(nlp, &ctl->ctl_pcb_head, nl_next) { + NLCTL_RLOCK(); + CK_LIST_FOREACH(nlp, &V_nl_ctl.ctl_pcb_head, nl_next) { if ((nw->group.priv == 0 || priv_check_cred( nlp->nl_socket->so_cred, nw->group.priv) == 0) && nlp->nl_proto == nw->group.proto && @@ -249,17 +240,11 @@ nl_send_group(struct nl_writer *nw) } else nl_buf_free(nb); - NLCTL_RUNLOCK(ctl); + NLCTL_RUNLOCK(); return (true); } -bool -nl_has_listeners(uint16_t netlink_family, uint32_t groups_mask) -{ - return (V_nl_ctl != NULL); -} - static uint32_t nl_find_port(void) { @@ -298,7 +283,7 @@ nl_bind_locked(struct nlpcb *nlp, struct sockaddr_nl *snl) return (EADDRINUSE); nlp->nl_port = snl->nl_pid; nlp->nl_bound = true; - CK_LIST_INSERT_HEAD(&V_nl_ctl->ctl_port_head, nlp, nl_port_next); + CK_LIST_INSERT_HEAD(&V_nl_ctl.ctl_port_head, nlp, nl_port_next); } for (int i = 0; i < 32; i++) { if (snl->nl_groups & ((uint32_t)1 << i)) @@ -328,14 +313,6 @@ nl_attach(struct socket *so, int proto, struct thread *td) so, is_linux ? "(linux) " : "", curproc->p_pid, nl_get_proto_name(proto)); - /* Create per-VNET state on first socket init */ - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); - if (ctl == NULL) - ctl = vnet_nl_ctl_init(); - KASSERT(V_nl_ctl != NULL, ("nl_attach: vnet_sock_init() failed")); - - MPASS(sotonlpcb(so) == NULL); - nlp = malloc(sizeof(struct nlpcb), M_PCB, M_WAITOK | M_ZERO); error = soreserve(so, nl_sendspace, nl_recvspace); if (error != 0) { @@ -362,10 +339,9 @@ nl_attach(struct socket *so, int proto, struct thread *td) taskqueue_start_threads(&nlp->nl_taskqueue, 1, PWAIT, "netlink_socket (PID %u)", nlp->nl_process_id); - NLCTL_WLOCK(ctl); - /* XXX: check ctl is still alive */ - CK_LIST_INSERT_HEAD(&ctl->ctl_pcb_head, nlp, nl_next); - NLCTL_WUNLOCK(ctl); + NLCTL_WLOCK(); + CK_LIST_INSERT_HEAD(&V_nl_ctl.ctl_pcb_head, nlp, nl_next); + NLCTL_WUNLOCK(); soisconnected(so); @@ -375,7 +351,6 @@ nl_attach(struct socket *so, int proto, struct thread *td) static int nl_bind(struct socket *so, struct sockaddr *sa, struct thread *td) { - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); struct nlpcb *nlp = sotonlpcb(so); struct sockaddr_nl *snl = (struct sockaddr_nl *)sa; int error; @@ -387,11 +362,11 @@ nl_bind(struct socket *so, struct sockaddr *sa, struct thread *td) } - NLCTL_WLOCK(ctl); + NLCTL_WLOCK(); NLP_LOCK(nlp); error = nl_bind_locked(nlp, snl); NLP_UNLOCK(nlp); - NLCTL_WUNLOCK(ctl); + NLCTL_WUNLOCK(); NL_LOG(LOG_DEBUG2, "socket %p, bind() to %u, groups %u, error %d", so, snl->nl_pid, snl->nl_groups, error); @@ -402,18 +377,17 @@ nl_bind(struct socket *so, struct sockaddr *sa, struct thread *td) static int nl_assign_port(struct nlpcb *nlp, uint32_t port_id) { - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); struct sockaddr_nl snl = { .nl_pid = port_id, }; int error; - NLCTL_WLOCK(ctl); + NLCTL_WLOCK(); NLP_LOCK(nlp); snl.nl_groups = nl_get_groups_compat(nlp); error = nl_bind_locked(nlp, &snl); NLP_UNLOCK(nlp); - NLCTL_WUNLOCK(ctl); + NLCTL_WUNLOCK(); NL_LOG(LOG_DEBUG3, "socket %p, port assign: %d, error: %d", nlp->nl_socket, port_id, error); return (error); @@ -427,7 +401,6 @@ nl_assign_port(struct nlpcb *nlp, uint32_t port_id) static int nl_autobind_port(struct nlpcb *nlp, uint32_t candidate_id) { - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); uint32_t port_id = candidate_id; NLCTL_TRACKER; bool exist; @@ -435,9 +408,9 @@ nl_autobind_port(struct nlpcb *nlp, uint32_t candidate_id) for (int i = 0; i < 10; i++) { NL_LOG(LOG_DEBUG3, "socket %p, trying to assign port %d", nlp->nl_socket, port_id); - NLCTL_RLOCK(ctl); + NLCTL_RLOCK(); exist = nl_port_lookup(port_id) != 0; - NLCTL_RUNLOCK(ctl); + NLCTL_RUNLOCK(); if (!exist) { error = nl_assign_port(nlp, port_id); if (error != EADDRINUSE) @@ -491,7 +464,6 @@ destroy_nlpcb_epoch(epoch_context_t ctx) static void nl_close(struct socket *so) { - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); MPASS(sotonlpcb(so) != NULL); struct nlpcb *nlp; struct nl_buf *nb; @@ -508,7 +480,7 @@ nl_close(struct socket *so) taskqueue_drain_all(nlp->nl_taskqueue); taskqueue_free(nlp->nl_taskqueue); - NLCTL_WLOCK(ctl); + NLCTL_WLOCK(); NLP_LOCK(nlp); if (was_bound) { CK_LIST_REMOVE(nlp, nl_port_next); @@ -517,7 +489,7 @@ nl_close(struct socket *so) CK_LIST_REMOVE(nlp, nl_next); nlp->nl_socket = NULL; NLP_UNLOCK(nlp); - NLCTL_WUNLOCK(ctl); + NLCTL_WUNLOCK(); so->so_pcb = NULL; @@ -852,7 +824,6 @@ nl_getoptflag(int sopt_name) static int nl_ctloutput(struct socket *so, struct sockopt *sopt) { - struct nl_control *ctl = atomic_load_ptr(&V_nl_ctl); struct nlpcb *nlp = sotonlpcb(so); uint32_t flag; int optval, error = 0; @@ -875,12 +846,12 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) } NL_LOG(LOG_DEBUG2, "ADD/DEL group %d", (uint32_t)optval); - NLCTL_WLOCK(ctl); + NLCTL_WLOCK(); if (sopt->sopt_name == NETLINK_ADD_MEMBERSHIP) nl_add_group_locked(nlp, optval); else nl_del_group_locked(nlp, optval); - NLCTL_WUNLOCK(ctl); + NLCTL_WUNLOCK(); break; case NETLINK_CAP_ACK: case NETLINK_EXT_ACK: @@ -897,12 +868,12 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) break; } - NLCTL_WLOCK(ctl); + NLCTL_WLOCK(); if (optval != 0) nlp->nl_flags |= flag; else nlp->nl_flags &= ~flag; - NLCTL_WUNLOCK(ctl); + NLCTL_WUNLOCK(); break; default: error = ENOPROTOOPT; @@ -911,18 +882,18 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) case SOPT_GET: switch (sopt->sopt_name) { case NETLINK_LIST_MEMBERSHIPS: - NLCTL_RLOCK(ctl); + NLCTL_RLOCK(); optval = nl_get_groups_compat(nlp); - NLCTL_RUNLOCK(ctl); + NLCTL_RUNLOCK(); error = sooptcopyout(sopt, &optval, sizeof(optval)); break; case NETLINK_CAP_ACK: case NETLINK_EXT_ACK: case NETLINK_GET_STRICT_CHK: case NETLINK_MSG_INFO: - NLCTL_RLOCK(ctl); + NLCTL_RLOCK(); optval = (nlp->nl_flags & nl_getoptflag(sopt->sopt_name)) != 0; - NLCTL_RUNLOCK(ctl); + NLCTL_RUNLOCK(); error = sooptcopyout(sopt, &optval, sizeof(optval)); break; default: diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c index cf119a74cfb7..6c3cd90e61ab 100644 --- a/sys/netlink/netlink_module.c +++ b/sys/netlink/netlink_module.c @@ -58,7 +58,10 @@ struct nl_proto_handler *nl_handlers = _nl_handlers; CK_LIST_HEAD(nl_control_head, nl_control); static struct nl_control_head vnets_head = CK_LIST_HEAD_INITIALIZER(); -VNET_DEFINE(struct nl_control *, nl_ctl) = NULL; +VNET_DEFINE(struct nl_control, nl_ctl) = { + .ctl_port_head = CK_LIST_HEAD_INITIALIZER(), + .ctl_pcb_head = CK_LIST_HEAD_INITIALIZER(), +}; struct mtx nl_global_mtx; MTX_SYSINIT(nl_global_mtx, &nl_global_mtx, "global netlink lock", MTX_DEF); @@ -69,63 +72,31 @@ MTX_SYSINIT(nl_global_mtx, &nl_global_mtx, "global netlink lock", MTX_DEF); int netlink_unloading = 0; static void -free_nl_ctl(struct nl_control *ctl) +vnet_nl_init(const void *unused __unused) { - rm_destroy(&ctl->ctl_lock); - free(ctl, M_NETLINK); -} - -struct nl_control * -vnet_nl_ctl_init(void) -{ - struct nl_control *ctl; - - ctl = malloc(sizeof(struct nl_control), M_NETLINK, M_WAITOK | M_ZERO); - rm_init(&ctl->ctl_lock, "netlink lock"); - CK_LIST_INIT(&ctl->ctl_port_head); - CK_LIST_INIT(&ctl->ctl_pcb_head); + rm_init(&V_nl_ctl.ctl_lock, "netlink lock"); NL_GLOBAL_LOCK(); - - struct nl_control *tmp = atomic_load_ptr(&V_nl_ctl); - - if (tmp == NULL) { - atomic_store_ptr(&V_nl_ctl, ctl); - CK_LIST_INSERT_HEAD(&vnets_head, ctl, ctl_next); - NL_LOG(LOG_DEBUG2, "VNET %p init done, inserted %p into global list", - curvnet, ctl); - } else { - NL_LOG(LOG_DEBUG, "per-VNET init clash, dropping this instance"); - free_nl_ctl(ctl); - ctl = tmp; - } - + CK_LIST_INSERT_HEAD(&vnets_head, &V_nl_ctl, ctl_next); + NL_LOG(LOG_DEBUG2, "VNET %p init done, inserted %p into global list", + curvnet, &V_nl_ctl); NL_GLOBAL_UNLOCK(); - - return (ctl); } +VNET_SYSINIT(vnet_nl_init, SI_SUB_INIT_IF, SI_ORDER_FIRST, vnet_nl_init, NULL); static void -vnet_nl_ctl_destroy(const void *unused __unused) +vnet_nl_uninit(const void *unused __unused) { - struct nl_control *ctl; - /* Assume at the time all of the processes / sockets are dead */ - NL_GLOBAL_LOCK(); - ctl = atomic_load_ptr(&V_nl_ctl); - atomic_store_ptr(&V_nl_ctl, NULL); - if (ctl != NULL) { - NL_LOG(LOG_DEBUG2, "Removing %p from global list", ctl); - CK_LIST_REMOVE(ctl, ctl_next); - } + NL_LOG(LOG_DEBUG2, "Removing %p from global list", &V_nl_ctl); + CK_LIST_REMOVE(&V_nl_ctl, ctl_next); NL_GLOBAL_UNLOCK(); - if (ctl != NULL) - free_nl_ctl(ctl); + rm_destroy(&V_nl_ctl.ctl_lock); } -VNET_SYSUNINIT(vnet_nl_ctl_destroy, SI_SUB_PROTO_IF, SI_ORDER_ANY, - vnet_nl_ctl_destroy, NULL); +VNET_SYSUNINIT(vnet_nl_uninit, SI_SUB_INIT_IF, SI_ORDER_FIRST, vnet_nl_uninit, + NULL); int nl_verify_proto(int proto) diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h index c341abf7ca55..11b69eb604fe 100644 --- a/sys/netlink/netlink_var.h +++ b/sys/netlink/netlink_var.h @@ -102,17 +102,13 @@ struct nl_control { CK_LIST_ENTRY(nl_control) ctl_next; struct rmlock ctl_lock; }; -VNET_DECLARE(struct nl_control *, nl_ctl); +VNET_DECLARE(struct nl_control, nl_ctl); #define V_nl_ctl VNET(nl_ctl) - struct sockaddr_nl; struct sockaddr; struct nlmsghdr; -/* netlink_module.c */ -struct nl_control *vnet_nl_ctl_init(void); - int nl_verify_proto(int proto); const char *nl_get_proto_name(int proto); diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index d856498b975f..93465e55e6aa 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -1383,9 +1383,6 @@ rtnl_handle_ifaddr(void *arg __unused, struct ifaddr *ifa, int cmd) return; } - if (!nl_has_listeners(NETLINK_ROUTE, group)) - return; - if (!nl_writer_group(&nw, NLMSG_LARGE, NETLINK_ROUTE, group, 0, false)) { NL_LOG(LOG_DEBUG, "error allocating group writer"); @@ -1404,9 +1401,6 @@ rtnl_handle_ifevent(if_t ifp, int nlmsg_type, int if_flags_mask) struct nlmsghdr hdr = { .nlmsg_type = nlmsg_type }; struct nl_writer nw; - if (!nl_has_listeners(NETLINK_ROUTE, RTNLGRP_LINK)) - return; - if (!nl_writer_group(&nw, NLMSG_LARGE, NETLINK_ROUTE, RTNLGRP_LINK, 0, false)) { NL_LOG(LOG_DEBUG, "error allocating group writer"); From nobody Wed Feb 5 00:54:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynhb33bCbz5mn0Z; Wed, 05 Feb 2025 00:54: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynhb26zkVz3bZb; Wed, 05 Feb 2025 00:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2C3f14XE+OtP6tUgRXHwLigaekgW+WxyMqe1tRid9I=; b=vVJ3Up6mP/+DmKd3cHxwI21fn4U51Gh4qIX0ltyR+NqUvYeJZKSu349w/eVbcJM9nfaxaM Ln3syHYTJjQJhi3YZXmZa7dBqqbzJbPE/m48oW4lE1ffIpzyBiS3e3bcQiy3AUHtyjiD76 32xD2n+LRdhl06cCRBoCBQC3oz1jFqnfQ6OITbsdDykwtVXbgCZ2Tonecz7KdyPiQDzdHX 8jV3aA8GCSrt4b7Q8NkNttw/3VXr2YW6uE7iJ7KWhsaVhzG7tQfCZXROOAT5YpbpNbusOP BQQiJ1aMoXvGf34XA+ujBxCcxN2CN0oPn0KmDsjpYipbDGXTgbp8grt2Sb+imw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2C3f14XE+OtP6tUgRXHwLigaekgW+WxyMqe1tRid9I=; b=HjPpLWyGwNfYGsylF9ZePJsXMeF5dUxKMO9CcBLCeysWcPQ+3k+jvmdMH5NWD+6fA3ie6Q oUrBN5ZedVlnRmIo6dZnPuQ6GBnhABuOoUF6srDESDPOfkeH2N3L0vxx2EQ/n4tMqZwYCL qiZEjIsdaIJTKb/RJpF8Ga4sO0dIlIIiKCSvYbz20PF+THDc8mJNTMzgoidcR2tI6Rhgmx ft9fiE1NZ4y8kzUMa2p2mxawteW4NvkdOFzCGEAXVYuPsj87+4hT/uti/7zHyEJ1hvxdNV OUozyrmBKVB9SgZaR9MDMF/5tNuNFn+Ca7Nl5g7ra2PDymo0aS9kpNuZfrXtuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716879; a=rsa-sha256; cv=none; b=yd5rNmyQtZK+syQQnlVRslcBCSza1GAyG8K28+R0MWjGzQCmojiVT6vy+3o/adQQQW3TWf 14QwL9ckEpt7kP9nkVyAb80kS7s+JD25Dpj21G3oRBcCUUmVZsRRh8ligzuz1JG+piSfNT eCxgP/mmElO39mZJN49BP1vg46Hc7e5qe/fvzIKnRc2keQA/UdQ4zavDWYSGNgwYPxWLAn Gl4j6IFUKUY5Odme4bN0Y7YlbBvl/KhnYaTVdPkYvloNTsihkU25bSICzREeGVEMVXuEQY 66j3bb90DiTzTrMKpA8vCnnNAZzLxhOx9IjnNaeUliUJjmWgLk9+/qqPThBYug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynhb26bVGzTVk; Wed, 05 Feb 2025 00:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150scvW050785; Wed, 5 Feb 2025 00:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150sc6Y050782; Wed, 5 Feb 2025 00:54:38 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:54:38 GMT Message-Id: <202502050054.5150sc6Y050782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 164dec88e8fa - main - netlink: rename functions that manipulate group membership of a pcb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 164dec88e8facbeb29fd85f0156d041c9491d21d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=164dec88e8facbeb29fd85f0156d041c9491d21d commit 164dec88e8facbeb29fd85f0156d041c9491d21d Author: Gleb Smirnoff AuthorDate: 2025-02-05 00:36:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-05 00:54:21 +0000 netlink: rename functions that manipulate group membership of a pcb Use nlp_ prefix for them, cause they operate on single pcb. Use words "join" and "leave" instead of "add" and "del", cause we aren't creating or destroying groups, we are just joining or leaving. Really assert locks instead of just having "locked" suffix. --- sys/netlink/netlink_domain.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 0567537d1d1d..e71ea1ce1e09 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -138,9 +138,10 @@ nl_port_lookup(uint32_t port_id) } static void -nl_add_group_locked(struct nlpcb *nlp, unsigned int group_id) +nlp_join_group(struct nlpcb *nlp, unsigned int group_id) { MPASS(group_id < NLP_MAX_GROUPS); + NLCTL_WLOCK_ASSERT(); /* TODO: add family handler callback */ if (!nlp_unconstrained_vnet(nlp)) @@ -150,28 +151,32 @@ nl_add_group_locked(struct nlpcb *nlp, unsigned int group_id) } static void -nl_del_group_locked(struct nlpcb *nlp, unsigned int group_id) +nlp_leave_group(struct nlpcb *nlp, unsigned int group_id) { MPASS(group_id < NLP_MAX_GROUPS); + NLCTL_WLOCK_ASSERT(); BIT_CLR(NLP_MAX_GROUPS, group_id, &nlp->nl_groups); } static bool -nl_isset_group_locked(struct nlpcb *nlp, unsigned int group_id) +nlp_memberof_group(struct nlpcb *nlp, unsigned int group_id) { MPASS(group_id < NLP_MAX_GROUPS); + NLCTL_LOCK_ASSERT(); return (BIT_ISSET(NLP_MAX_GROUPS, group_id, &nlp->nl_groups)); } static uint32_t -nl_get_groups_compat(struct nlpcb *nlp) +nlp_get_groups_compat(struct nlpcb *nlp) { uint32_t groups_mask = 0; + NLCTL_LOCK_ASSERT(); + for (int i = 0; i < 32; i++) { - if (nl_isset_group_locked(nlp, i + 1)) + if (nlp_memberof_group(nlp, i + 1)) groups_mask |= (1 << i); } @@ -216,7 +221,7 @@ nl_send_group(struct nl_writer *nw) if ((nw->group.priv == 0 || priv_check_cred( nlp->nl_socket->so_cred, nw->group.priv) == 0) && nlp->nl_proto == nw->group.proto && - nl_isset_group_locked(nlp, nw->group.id)) { + nlp_memberof_group(nlp, nw->group.id)) { if (nlp_last != NULL) { struct nl_buf *copy; @@ -287,9 +292,9 @@ nl_bind_locked(struct nlpcb *nlp, struct sockaddr_nl *snl) } for (int i = 0; i < 32; i++) { if (snl->nl_groups & ((uint32_t)1 << i)) - nl_add_group_locked(nlp, i + 1); + nlp_join_group(nlp, i + 1); else - nl_del_group_locked(nlp, i + 1); + nlp_leave_group(nlp, i + 1); } return (0); @@ -384,7 +389,7 @@ nl_assign_port(struct nlpcb *nlp, uint32_t port_id) NLCTL_WLOCK(); NLP_LOCK(nlp); - snl.nl_groups = nl_get_groups_compat(nlp); + snl.nl_groups = nlp_get_groups_compat(nlp); error = nl_bind_locked(nlp, &snl); NLP_UNLOCK(nlp); NLCTL_WUNLOCK(); @@ -848,9 +853,9 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) NLCTL_WLOCK(); if (sopt->sopt_name == NETLINK_ADD_MEMBERSHIP) - nl_add_group_locked(nlp, optval); + nlp_join_group(nlp, optval); else - nl_del_group_locked(nlp, optval); + nlp_leave_group(nlp, optval); NLCTL_WUNLOCK(); break; case NETLINK_CAP_ACK: @@ -883,7 +888,7 @@ nl_ctloutput(struct socket *so, struct sockopt *sopt) switch (sopt->sopt_name) { case NETLINK_LIST_MEMBERSHIPS: NLCTL_RLOCK(); - optval = nl_get_groups_compat(nlp); + optval = nlp_get_groups_compat(nlp); NLCTL_RUNLOCK(); error = sooptcopyout(sopt, &optval, sizeof(optval)); break; From nobody Wed Feb 5 00:54:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynhb465Rgz5mmrC; Wed, 05 Feb 2025 00:54: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynhb417c8z3bXG; Wed, 05 Feb 2025 00:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KKfyFN0oZl0bN2TlkSIaNPXTFLaZuZSZn4GJ4wI7xY=; b=W0kMTPMY2rWD544vfah34HBChBJ8GgDYpM9mh6IAkNgAm5ard8+xSaUjgCdilN3NaxLer+ I6Apalv6maMw9SaMwdk9100bjSp/lWGLtkVA5cQoKp6Ui8o0n9GwncgmMyBmSBV262HlUl G1ndq3BLgtWlim6HAHxHI4/pwJC7pp8Ua8+jwMu6YA3oJ/Jai4+8I44ALTqIdmLlQiBezA xEiZJifzcrch4phucVUJV4MHcmufNTk568kXCdRD9B4zabVp0ehMhPaQvzgVaL5sFErfYD NOPns7wbnqmEPSelrurp9/P8gztpp/DzExkvlpuljHe6JWXNZCW7/44Bu8iDWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738716880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KKfyFN0oZl0bN2TlkSIaNPXTFLaZuZSZn4GJ4wI7xY=; b=cWpOA7q0RcxBbFvvaNiXjvbm2c9FwPvtqG8KwTUFx6Wt0BA3+eZIllHBeRzj/1T/ac+nf5 PzStSYFwZQ/BxffYllqDELTNQnPRIdjtzi40aEEKp+GXOykMhfePrkFat0dXqu9N0INxN6 woMKztvmsdMTVX75ZeosXiqv3hcARzl3Qvq5LGlx5BdSQDqbabgjqeFK6ZapOCbBJPWeWZ Fm19Sn4RaSlwVRx4x3CKd5NSwtmz76KELBaoN5+Yd9uUNDC+MgFpdzIQMy4IdJLeH8Cih7 kopw8Q/f5TTYJe7K+JOy6CIfvxTC0ZEy+cPTEVe7MSVSXLBWGoXpmPJg63YBJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738716880; a=rsa-sha256; cv=none; b=Ck7/aZCq+ned1zBFmimIHW0WDB9eBrCWg4eZKz5jgXfHfk/dUBBPwq2ZkR9KcK5aWKsFKE Ycu0M60yWVvDL426bJC6YkhaC6hiiymDFVvgoHBrGSh7Rkd2LjUWI4xsbJW5p2Nz2fkfp1 QPnzIdtD6oFNPqVV2bHvwQ3FYl2APuRyVywiIy2jA0dQpNZ6lbFjdfb8rH5v2PAGY85GIi scg804R8JdqRQenDdIBgws1jZ4e+hYXbMkHwnKE9HV65e3jE8tPyNBJg7IL4ts63dr4KKh CVK2FYIVg03j43FgMIca+NmJ9cP1wir5Hyn54rUYdiYSQP0KABYEw5Fv1UvoZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynhb40QnQzTVl; Wed, 05 Feb 2025 00:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5150sdD5050826; Wed, 5 Feb 2025 00:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5150sdb2050823; Wed, 5 Feb 2025 00:54:39 GMT (envelope-from git) Date: Wed, 5 Feb 2025 00:54:39 GMT Message-Id: <202502050054.5150sdb2050823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ef3991d70dca - main - netlink: don't store an extra pointer to so_cred List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef3991d70dcacb419fbdc845a19ed6d646ebccd5 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3991d70dcacb419fbdc845a19ed6d646ebccd5 commit ef3991d70dcacb419fbdc845a19ed6d646ebccd5 Author: Gleb Smirnoff AuthorDate: 2025-02-05 00:36:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-02-05 00:54:21 +0000 netlink: don't store an extra pointer to so_cred --- sys/netlink/netlink_domain.c | 2 -- sys/netlink/netlink_glue.c | 4 ++-- sys/netlink/netlink_var.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index e71ea1ce1e09..e06c0bf1919e 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -328,8 +328,6 @@ nl_attach(struct socket *so, int proto, struct thread *td) TAILQ_INIT(&so->so_snd.nl_queue); so->so_pcb = nlp; nlp->nl_socket = so; - /* Copy so_cred to avoid having socket_var.h in every header */ - nlp->nl_cred = so->so_cred; nlp->nl_proto = proto; nlp->nl_process_id = curproc->p_pid; nlp->nl_linux = is_linux; diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index 0e8fdc0b054c..4b593fd9657b 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -85,13 +85,13 @@ struct rtbridge *netlink_callback_p = &ignore_cb; bool nlp_has_priv(struct nlpcb *nlp, int priv) { - return (priv_check_cred(nlp->nl_cred, priv) == 0); + return (priv_check_cred(nlp->nl_socket->so_cred, priv) == 0); } struct ucred * nlp_get_cred(struct nlpcb *nlp) { - return (nlp->nl_cred); + return (nlp->nl_socket->so_cred); } uint32_t diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h index 11b69eb604fe..ce10a303f9f7 100644 --- a/sys/netlink/netlink_var.h +++ b/sys/netlink/netlink_var.h @@ -69,7 +69,6 @@ struct nlpcb { bool nl_need_thread_setup; struct taskqueue *nl_taskqueue; struct task nl_task; - struct ucred *nl_cred; /* Copy of nl_socket->so_cred */ uint64_t nl_dropped_bytes; uint64_t nl_dropped_messages; CK_LIST_ENTRY(nlpcb) nl_next; From nobody Wed Feb 5 01:37:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnjXs2bRqz5mr5w; Wed, 05 Feb 2025 01:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnjXs0VHNz3qwg; Wed, 05 Feb 2025 01:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738719469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZwEDtiE/WAX8zvmHCyJoTAgoLYmZdDJbL7lYYAU2xoU=; b=IGgkuJXkiqv7XGwR2QUEBtsjQ9MdEpzulpl+iZym8VwtoyUrad/nCWVSAyeH1ztV1ewar8 ydWwx3YpLTSXiVgBycVftKMWucUkamQvJZSuD2Yb8t4xrRn5Dj8YFMw5T8v31TlRxOV2U3 wpaVFJ/uTekx1Y6nStrGFJMZsQuIsvTRe8us2+5vMMc6gRWacUX3iZN7IiHuT6sF5NiWdd wberoOwTqnM5Uj67/X30Ekvq5t1H60jRHri8oeGRT7PZbnoKX4Ydlk9Nfo0e1h8p9gI/I3 0NeYp9bFSQIYsPZPJoulN+IR3XaopnzJkk3GlX3WAg1C6mw/4E3T6rZycDHXzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738719469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZwEDtiE/WAX8zvmHCyJoTAgoLYmZdDJbL7lYYAU2xoU=; b=dWeFb3jVwUiYfYm5fVk1yW1TFdZfVGsNV1EFe5VtV+fcTcDB0mNWsFqaQLvrEGRXw7y1Ui 2sMSaGw+iRPwabg1kCRsre9R5sAegvM8vtiR5Mu1tZULacb7O0kF2khOqHMBZObwyzJKjx fQq/EP6LJLdlKhnb+6RLV9FJWmfavOkje9TVi6Qir/7okEWQ8HEyW4k4YGP3Mvv+R4f4FG VXhlzHYslYHS2AXPNGccEYflky8H302Itwm+OUNuFz3T4ikn/IR26MY2zQ9hCDr6+AmO6R p6+119HI7DvHe5fq8W4pnvN77OMmYXA0TAmz1u1qV8PimIMf8XupUmZPSyujew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738719469; a=rsa-sha256; cv=none; b=x2P4wv0KAPr4HkHhoC0GHmASkp7HYYv7R3CmVDNoIS89brMlCjCvN0u3aypuzRtedfnU5f kYfl3hVJc+yN2zLsyf5LO7vo5gvjpoNqG4BU8SUEEdnw4Rfpi3SRhg9aHlvNAJDYYX36kx +DHdFFwGRiSN+nuCoBUXDIP3gEETG3EFGC2yz+VhSoThXAd7o3iswia6YSfIdAeS4w85FS 2iecmafRmXKKdehzBXoaEcZ2gOLSnrMsAGDLNHRY9X/wfEUUTGkLgqIloaulVM4ZuzKUr3 xpQCb88XzemjWcRQ6oeMLWFZAj3V8QqKpUlCDmfwCnp27JGWx0oyly92KNmj8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnjXr752LzXGC; Wed, 05 Feb 2025 01:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5151bmWQ026298; Wed, 5 Feb 2025 01:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5151bmCw026295; Wed, 5 Feb 2025 01:37:48 GMT (envelope-from git) Date: Wed, 5 Feb 2025 01:37:48 GMT Message-Id: <202502050137.5151bmCw026295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f52154a2044a - main - hptrr: Better error recovery List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f52154a2044a4d1f324952af05542f93fdf0a088 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f52154a2044a4d1f324952af05542f93fdf0a088 commit f52154a2044a4d1f324952af05542f93fdf0a088 Author: Warner Losh AuthorDate: 2025-02-05 01:31:25 +0000 Commit: Warner Losh CommitDate: 2025-02-05 01:38:02 +0000 hptrr: Better error recovery This bug and https://www.mail-archive.com/freebsd-stable@freebsd.org/msg124458.html both have this fix. It turns unknown errors into an autosense failure, which causes us to grab the sense buffer manually. It also sets a condition that we use to retry timed out commands that jmg reports as being helpful. I'm torn on committing it. The code seems fine in terms of fixing things. But this is a 10-year-old bug with few other bugs and a short CC list for a driver that might go away in 15 anyway. I'm going to commit and close the bug, and MFC it in a week, unless someone complains (which seems unliekly, given the age of this hardware, I susepct most of it is out of service). Suggested by: jmg, Scott Long PR: 191135 MFC After: 1 week Reviewed by: imp --- sys/dev/hptrr/hptrr_osm_bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index 42866c1d4297..78a051d54cf8 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -463,7 +463,7 @@ static void os_cmddone(PCOMMAND pCmd) ccb->ccb_h.status = CAM_BUSY; break; default: - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; break; } @@ -557,7 +557,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_ext, union ccb *ccb) ccb->ccb_h.target_id >= osm_max_targets || (ccb->ccb_h.flags & CAM_CDB_PHYS)) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } From nobody Wed Feb 5 04:58:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynp144Cwfz5n684; Wed, 05 Feb 2025 04:59:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynp136Hjrz3kLq; Wed, 05 Feb 2025 04:59:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id fTW0tbtTHxv7PfXV9tvskf; Wed, 05 Feb 2025 04:59:03 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id fXV7tMveZWbOafXV8tj05v; Wed, 05 Feb 2025 04:59:03 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=67a2f017 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YsOA2-ArAAAA:8 a=YxBL1-UpAAAA:8 a=MLSBJ3yANAyTcSYo41kA:9 a=CjuIK1q_8ugA:10 a=_WP1hYWONFMA:10 a=FtjnIqZbAcgA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=pzjXTCURJ6VjBCy6T91o:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 6E89322C; Tue, 04 Feb 2025 20:59:00 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id AC7BB201; Tue, 04 Feb 2025 20:58:59 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2d17f44a5ae6 - main - rc.d: Add hastd as a prereq for devd In-reply-to: <202502050047.5150lQQp032860@gitrepo.freebsd.org> References: <202502050047.5150lQQp032860@gitrepo.freebsd.org> Comments: In-reply-to Warner Losh message dated "Wed, 05 Feb 2025 00:47:26 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Feb 2025 20:58:59 -0800 Message-Id: <20250205045859.AC7BB201@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDaOTrATBtiEyxS2Z12TqPFRh7NXVHD06/xNH04AmWJ8PyXT+bYZ0W0kpJy2YuFIq/YLFHW5XpTiGbskzF1VzlTxoKgFIkY0w6c6+cjZtOX/UFPPJDhe QJNQ5WFjZd1M3GGS/Ojesxm3urtnAKoBU8EbqsvlVMHhxwL3uDNcLLSgBiODmLBEuL00GbDXIugak+bOkt0Ix8HIf4PQwQewHctExdSDLNcTr7fwUbdhht8T AcRXX0cgvyNmtkYsoUxZ7VEkudcXDl1PBtYazZsFRRXrGUg94QQ1NL6bFj6VYMeqyUyFut+CTEc+EaBHgXWmdil21GEwm1+Ozz2WdPNgH+E= X-Rspamd-Queue-Id: 4Ynp136Hjrz3kLq X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message <202502050047.5150lQQp032860@gitrepo.freebsd.org>, Warner Losh write s: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2d17f44a5ae6e948c3a93cac30b8315d > 127ba900 > > commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900 > Author: Warner Losh > AuthorDate: 2025-02-05 00:36:18 +0000 > Commit: Warner Losh > CommitDate: 2025-02-05 00:47:21 +0000 > > rc.d: Add hastd as a prereq for devd > > Setuping up CARP and HAST described in: > https://www.freebsd.org/doc/en/books/handbook/disks-hast.html > doesn't work at boot time because devd start before hastd. > > PR: 199733 > Submitted-by: hs_fbsd@on-sky.net (no name given) > --- > libexec/rc/rc.d/devd | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd > index 98f2068c2075..524fb045dfab 100755 > --- a/libexec/rc/rc.d/devd > +++ b/libexec/rc/rc.d/devd > @@ -3,7 +3,7 @@ > # > > # PROVIDE: devd > -# REQUIRE: netif ldconfig > +# REQUIRE: netif ldconfig hastd > # BEFORE: NETWORKING mountcritremote > # KEYWORD: nojail shutdown > > This causes boot to hang requiring a ctrl-C to continue the boot. The reason for this is I, probably like many others, don't use hastd. And especially not on laptops. Maybe put # BEFOFE: devd in the hastd rc script. This way if hastd_enable="NO" or not specified in rc.conf there would be no hang during reboot. I've reverted this in my local "prod" tree. Life is good again. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Feb 5 05:00:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynp2s5G7Pz5n6Bs for ; Wed, 05 Feb 2025 05:00:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynp2r3xkzz3knD for ; Wed, 05 Feb 2025 05:00:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2f4448bf96fso8285669a91.0 for ; Tue, 04 Feb 2025 21:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1738731635; x=1739336435; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5dVA00RTWvPtrjeAFFkYeKfpawojnqFUs+MDVZj8m8g=; b=jwE/lUfe7leKfNeYZg0TGQovPhe0cpCeZNtSpHhBOYDSbOO3DanfxVwiag7HG3KUdz tmllXWAUfnXswgzqgbs4z1v5y91XOqKBS1hIlZTVfcbHPJI27TcfnygR7tQScnfLh/OM /gFZjlUQDCTW4QsYly2s5ljRagmLL9EMgmeB8CMwJ52gDhCLREpHQWYF3bnw2chNVQI4 O8siOZ511iOgbhladP82fQs66wx9i+5hZ5UBsPLyjDo56KkG7iXl1QaVFwN8mh4lKY9H JynZxmu5IIn/I/UCfze4iRvb00ZoakjxS4YXharNnz8fTu3q43A1yAGA5Uieu/HhpsFT 1wig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738731635; x=1739336435; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5dVA00RTWvPtrjeAFFkYeKfpawojnqFUs+MDVZj8m8g=; b=gzGOs33/Iros0aXCDO0WKO2qi1T+Zl05DDy8Lx9aU1hmmLkuVGo/FCo77HKn9Dd30H +ARp34OENL8C2Dib2FnCRTLcR0h1TgjEFhDmxJ7V4cw7fERf69qI4etcZzA8MgLlJThn ZbNeL5xGTk3vKJs0CX2J/6659Y3YM6U3IvvY1pQQpcwc6XrkVCe2G28uPHXWRRiM8xXV kd7ATwRVv/9aCihwuo4WyhqZIa8QryzR3+0XAaW4gz1xnM6d/F8tVtkADUZYl/hOJPmN a29g1MCBgGqc0WOZTTqD9WTypA3QEqDv0srjLukdziZNwnCthQ+H4OyJ+rqAJoR67eBY z8Aw== X-Forwarded-Encrypted: i=1; AJvYcCV8K3UseMHo3ydUanZvZzWBdwtki18GgeYNrAT+qKkg+719rQLqIa/lCeXlV4hsemiUGR1fgtH3WX13miUlH/yYGwivUQ==@freebsd.org X-Gm-Message-State: AOJu0YwP3TYUrAHTzGl1UGNNUYGpXNi8+Yq099yMoLlW5bxF9v8olclL 8NvCeZ6U/7UZRQVbS9WXV8mIYqda9oePiUL0CBw/uVnK9CMZNsrHtf0pjJeYXkNs52FA4wGozBU YNB/PYMyDR/GB+GhOR9l30nAvCcdQI/jizkK9aA== X-Gm-Gg: ASbGnct9JQTONBsUPVx+7rlsjrOnvXRKAKp6u7H/UTEOMP3Sd3wdQR0lpyV2pdg8HkT wE+Dl8gKTXdZvYSHl74vD3SVh6qlyuEfIBEmvLUskv7w//NtloZbxfVGry/w6IuhSI9u2V5x7uU fcGiEPw4xW9M6L7qkQjakjbVs7 X-Google-Smtp-Source: AGHT+IEQQNikAd+/HWn6IPuhvFOWpkmFT7jjzR1eoVfWJMVCSF+nXklKLoVYexariIjxkLxRu/dRlUc9/3t+PGe0IZE= X-Received: by 2002:a17:90b:4a92:b0:2ee:b2fe:eeeb with SMTP id 98e67ed59e1d1-2f9e07ff91cmr1968718a91.22.1738731634967; Tue, 04 Feb 2025 21:00:34 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202502050047.5150lQQp032860@gitrepo.freebsd.org> <20250205045859.AC7BB201@slippy.cwsent.com> In-Reply-To: <20250205045859.AC7BB201@slippy.cwsent.com> From: Warner Losh Date: Tue, 4 Feb 2025 22:00:23 -0700 X-Gm-Features: AWEUYZl2fzJWMSGKtCD27pHLZ-At4wqR5DRagKJ3r7rJ8v25v6syWr4UhMc4ne8 Message-ID: Subject: Re: git: 2d17f44a5ae6 - main - rc.d: Add hastd as a prereq for devd To: Cy Schubert Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000076657b062d5e01a8" X-Rspamd-Queue-Id: 4Ynp2r3xkzz3knD X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --00000000000076657b062d5e01a8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 4, 2025, 9:59=E2=80=AFPM Cy Schubert wrote: > In message <202502050047.5150lQQp032860@gitrepo.freebsd.org>, Warner Losh > write > s: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2d17f44a5ae6e948c3a93cac30b8315= d > > 127ba900 > > > > commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900 > > Author: Warner Losh > > AuthorDate: 2025-02-05 00:36:18 +0000 > > Commit: Warner Losh > > CommitDate: 2025-02-05 00:47:21 +0000 > > > > rc.d: Add hastd as a prereq for devd > > > > Setuping up CARP and HAST described in: > > > https://www.freebsd.org/doc/en/books/handbook/disks-hast.html > > doesn't work at boot time because devd start before hastd. > > > > PR: 199733 > > Submitted-by: hs_fbsd@on-sky.net (no name given) > > --- > > libexec/rc/rc.d/devd | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd > > index 98f2068c2075..524fb045dfab 100755 > > --- a/libexec/rc/rc.d/devd > > +++ b/libexec/rc/rc.d/devd > > @@ -3,7 +3,7 @@ > > # > > > > # PROVIDE: devd > > -# REQUIRE: netif ldconfig > > +# REQUIRE: netif ldconfig hastd > > # BEFORE: NETWORKING mountcritremote > > # KEYWORD: nojail shutdown > > > > > > This causes boot to hang requiring a ctrl-C to continue the boot. > > The reason for this is I, probably like many others, don't use hastd. And > especially not on laptops. > > Maybe put # BEFOFE: devd in the hastd rc script. This way if > hastd_enable=3D"NO" or not specified in rc.conf there would be no hang > during > reboot. > > I've reverted this in my local "prod" tree. Life is good again. > Ok. It worked for me. I gotta figure out why, but in the mean time I'll revert. Warner --=20 > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > > --00000000000076657b062d5e01a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Feb 4, 2025, 9:59=E2=80= =AFPM Cy Schubert <Cy.Schub= ert@cschubert.com> wrote:
In= message <202502050047.5150lQQp032860@gitre= po.freebsd.org>, Warner Losh
write
s:
> The branch main has been updated by imp:
>
> URL: https= ://cgit.FreeBSD.org/src/commit/?id=3D2d17f44a5ae6e948c3a93cac30b8315d > 127ba900
>
> commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-02-05 00:36:18 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-02-05 00:47:21 +0000
>
>=C2=A0 =C2=A0 =C2=A0rc.d: Add hastd as a prereq for devd
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Setuping up CARP and HAST described in:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://www.freebsd.org/doc/en/books/handbook/disks= -hast.html
>=C2=A0 =C2=A0 =C2=A0doesn't work at boot time because devd start be= fore hastd.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 199733
>=C2=A0 =C2=A0 =C2=A0Submitted-by: hs_fbsd@on-sky.net (no name given= )
> ---
>=C2=A0 libexec/rc/rc.d/devd | 2 +-
>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd
> index 98f2068c2075..524fb045dfab 100755
> --- a/libexec/rc/rc.d/devd
> +++ b/libexec/rc/rc.d/devd
> @@ -3,7 +3,7 @@
>=C2=A0 #
>=C2=A0
>=C2=A0 # PROVIDE: devd
> -# REQUIRE: netif ldconfig
> +# REQUIRE: netif ldconfig hastd
>=C2=A0 # BEFORE: NETWORKING mountcritremote
>=C2=A0 # KEYWORD: nojail shutdown
>=C2=A0
>

This causes boot to hang requiring a ctrl-C to continue the boot.

The reason for this is I, probably like many others, don't use hastd. A= nd
especially not on laptops.

Maybe put # BEFOFE: devd in the hastd rc script. This way if
hastd_enable=3D"NO" or not specified in rc.conf there would be no= hang during
reboot.

I've reverted this in my local "prod" tree. Life is good agai= n.

Ok. It worked for me. I gotta figure out why, but in the mean time I'= ll revert.

Warner
<= div dir=3D"auto">
--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=C2=A0 =C2= =A0 Web:=C2=A0 https://nwtime.org

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0



--00000000000076657b062d5e01a8-- From nobody Wed Feb 5 05:06:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynp9B5pGpz5n6lq; Wed, 05 Feb 2025 05:06:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynp9B31Ybz3mDX; Wed, 05 Feb 2025 05:06:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id fTW0trQN8yLQGfXbxtRfAM; Wed, 05 Feb 2025 05:06:05 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id fXbwtMxbfWbOafXbxtj0WE; Wed, 05 Feb 2025 05:06:05 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=67a2f1bd a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=YsOA2-ArAAAA:8 a=QxSy_i6vI-EY6E-1JNAA:9 a=CjuIK1q_8ugA:10 a=_WP1hYWONFMA:10 a=FtjnIqZbAcgA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=pzjXTCURJ6VjBCy6T91o:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D51F9235; Tue, 04 Feb 2025 21:06:03 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 23D8C280; Tue, 04 Feb 2025 21:06:03 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Warner Losh , src-committers , "" , "" Subject: Re: git: 2d17f44a5ae6 - main - rc.d: Add hastd as a prereq for devd In-reply-to: References: <202502050047.5150lQQp032860@gitrepo.freebsd.org> <20250205045859.AC7BB201@slippy.cwsent.com> Comments: In-reply-to Warner Losh message dated "Tue, 04 Feb 2025 22:00:23 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Feb 2025 21:06:03 -0800 Message-Id: <20250205050603.23D8C280@slippy.cwsent.com> X-CMAE-Envelope: MS4xfE+RVKIu59aawBcArzLKLi7yr+BmDrSbUY6LJoH6jo+inwuTuzvL+GDHJGFQ6EJ489SIPxhR3YKXVLyzhJG0/KJ60Jz7JqUS+GGJFdXGS1TGQ/plNF61 zEvUJlTq0F/sMJzPYfsL6kGF38zkEVmK3ZuzG+7vrRKuO2068IrtA2l2DPihqK9d8foHYRtNPNpaRomcbNyPvbIotd5tsbymBN0x8T+ejWBx52x0zD610x32 uAtdCRrD+z6+NH0D5kDN98OYYHHmKnGQl1rB4knlxQpvlc+WwQScXKQMoAEXJKCjCmJyo+tqUkPcpBie0z/HKAaY0kmuAjXmK0WeTcZFvs9xC67LvJGLKqqu t1SePxof X-Rspamd-Queue-Id: 4Ynp9B31Ybz3mDX X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message , Warner Losh writes: > --00000000000076657b062d5e01a8 > Content-Type: text/plain; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > > On Tue, Feb 4, 2025, 9:59=E2=80=AFPM Cy Schubert > wrote: > > > In message <202502050047.5150lQQp032860@gitrepo.freebsd.org>, Warner Losh > > write > > s: > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3D2d17f44a5ae6e948c3a93cac30b8315= > d > > > 127ba900 > > > > > > commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900 > > > Author: Warner Losh > > > AuthorDate: 2025-02-05 00:36:18 +0000 > > > Commit: Warner Losh > > > CommitDate: 2025-02-05 00:47:21 +0000 > > > > > > rc.d: Add hastd as a prereq for devd > > > > > > Setuping up CARP and HAST described in: > > > > > https://www.freebsd.org/doc/en/books/handbook/disks-hast.html > > > doesn't work at boot time because devd start before hastd. > > > > > > PR: 199733 > > > Submitted-by: hs_fbsd@on-sky.net (no name given) > > > --- > > > libexec/rc/rc.d/devd | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd > > > index 98f2068c2075..524fb045dfab 100755 > > > --- a/libexec/rc/rc.d/devd > > > +++ b/libexec/rc/rc.d/devd > > > @@ -3,7 +3,7 @@ > > > # > > > > > > # PROVIDE: devd > > > -# REQUIRE: netif ldconfig > > > +# REQUIRE: netif ldconfig hastd > > > # BEFORE: NETWORKING mountcritremote > > > # KEYWORD: nojail shutdown > > > > > > > > > > This causes boot to hang requiring a ctrl-C to continue the boot. > > > > The reason for this is I, probably like many others, don't use hastd. And > > especially not on laptops. > > > > Maybe put # BEFOFE: devd in the hastd rc script. This way if > > hastd_enable=3D"NO" or not specified in rc.conf there would be no hang > > during > > reboot. > > > > I've reverted this in my local "prod" tree. Life is good again. > > > > Ok. It worked for me. I gotta figure out why, but in the mean time I'll > revert. That's strange. This hung two laptops here in my office. I'm reluctant to apply it to the servers in my basement two floors down. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Feb 5 05:12:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnpJs1yh5z5n6wl; Wed, 05 Feb 2025 05:12:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnpJs0Hv9z3nxP; Wed, 05 Feb 2025 05:12:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id fKiEtbIFRxv7PfXiOtw03N; Wed, 05 Feb 2025 05:12:44 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id fXiMtIzYH4k0ofXiNtbulL; Wed, 05 Feb 2025 05:12:44 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=fLKa3oae c=1 sm=1 tr=0 ts=67a2f34c a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=T2h4t0Lz3GQA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=YsOA2-ArAAAA:8 a=0FNk9USiAAAA:8 a=j60yDONkRL_9UpNinKQA:9 a=zz45bIk1XtsMeathu/1YEEouC2M=:19 a=DVAmapWuBHiFO2-S:21 a=CjuIK1q_8ugA:10 a=_WP1hYWONFMA:10 a=FtjnIqZbAcgA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=pzjXTCURJ6VjBCy6T91o:22 a=TF7iPsq83L4KsoDyi5cH:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 1C15823F; Tue, 04 Feb 2025 21:12:42 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 9EACC185; Tue, 04 Feb 2025 21:12:41 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Warner Losh , src-committers , "" , "" Subject: Re: git: 2d17f44a5ae6 - main - rc.d: Add hastd as a prereq for devd In-reply-to: References: <202502050047.5150lQQp032860@gitrepo.freebsd.org> <20250205045859.AC7BB201@slippy.cwsent.com> Comments: In-reply-to Warner Losh message dated "Tue, 04 Feb 2025 22:00:23 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Feb 2025 21:12:41 -0800 Message-Id: <20250205051241.9EACC185@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNRx2qmz2DPs6fFVEfjb6BGT9HVm264qKMuwIoW3RDUZBXs73NFZvXTAACu5/NppyvzR9DrEEUsqq7z/sMnNCk8gjYLwa5UpZptrjXlxkxI390MbLQfY mNN0CBH57rhJzsoKNXT4YPcm3a776xP99o4mlWED1U+Ibai5O9Jp8LsYy9U79FOcJPX4gjtA6ZpJi8uDVfALtoqMLtOoKTdOHn3I7mKmHmG/wYk/xpQsafFt q7jg5IoEXYCWlGTYyf35PFfsER6asrY9E9A1oWeDnlrjlO7GVQgNHIszMBTg9SV52nAPg0aKcySsFTHdQupBfmTAsnXCcv+fC+BkEasBqqnP5VCQedUHeEIr oWBVuBtY X-Rspamd-Queue-Id: 4YnpJs0Hv9z3nxP X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 In message , Warner Losh writes: > --00000000000076657b062d5e01a8 > Content-Type: text/plain; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > > On Tue, Feb 4, 2025, 9:59=E2=80=AFPM Cy Schubert > wrote: > > > In message <202502050047.5150lQQp032860@gitrepo.freebsd.org>, Warner Losh > > write > > s: > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3D2d17f44a5ae6e948c3a93cac30b8315= > d > > > 127ba900 > > > > > > commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900 > > > Author: Warner Losh > > > AuthorDate: 2025-02-05 00:36:18 +0000 > > > Commit: Warner Losh > > > CommitDate: 2025-02-05 00:47:21 +0000 > > > > > > rc.d: Add hastd as a prereq for devd > > > > > > Setuping up CARP and HAST described in: > > > > > https://www.freebsd.org/doc/en/books/handbook/disks-hast.html > > > doesn't work at boot time because devd start before hastd. > > > > > > PR: 199733 > > > Submitted-by: hs_fbsd@on-sky.net (no name given) > > > --- > > > libexec/rc/rc.d/devd | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd > > > index 98f2068c2075..524fb045dfab 100755 > > > --- a/libexec/rc/rc.d/devd > > > +++ b/libexec/rc/rc.d/devd > > > @@ -3,7 +3,7 @@ > > > # > > > > > > # PROVIDE: devd > > > -# REQUIRE: netif ldconfig > > > +# REQUIRE: netif ldconfig hastd > > > # BEFORE: NETWORKING mountcritremote > > > # KEYWORD: nojail shutdown > > > > > > > > > > This causes boot to hang requiring a ctrl-C to continue the boot. > > > > The reason for this is I, probably like many others, don't use hastd. And > > especially not on laptops. > > > > Maybe put # BEFOFE: devd in the hastd rc script. This way if > > hastd_enable=3D"NO" or not specified in rc.conf there would be no hang > > during > > reboot. > > > > I've reverted this in my local "prod" tree. Life is good again. > > > > Ok. It worked for me. I gotta figure out why, but in the mean time I'll > revert. > > Warner > > --=20 > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: https://FreeBSD.org > > NTP: Web: https://nwtime.org > > > > e^(i*pi)+1=3D0 > > > > > > > > > > --00000000000076657b062d5e01a8 > Content-Type: text/html; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > >


ner">
On Tue, Feb 4, 2025, 9:59=E2=80= > =AFPM Cy Schubert <Cy.Schub= > ert@cschubert.com> wrote:
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In= > message < org" target=3D"_blank" rel=3D"noreferrer">202502050047.5150lQQp032860@gitre= > po.freebsd.org>, Warner Losh
> write
> s:
> > The branch main has been updated by imp:
> >
> > URL: e948c3a93cac30b8315d" rel=3D"noreferrer noreferrer" target=3D"_blank">https= > ://cgit.FreeBSD.org/src/commit/?id=3D2d17f44a5ae6e948c3a93cac30b8315d r> > > 127ba900
> >
> > commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900
> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> > AuthorDate: 2025-02-05 00:36:18 +0000
> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> > CommitDate: 2025-02-05 00:47:21 +0000
> >
> >=C2=A0 =C2=A0 =C2=A0rc.d: Add hastd as a prereq for devd
> >=C2=A0 =C2=A0 =C2=A0
> >=C2=A0 =C2=A0 =C2=A0Setuping up CARP and HAST described in:
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 freebsd.org/doc/en/books/handbook/disks-hast.html" rel=3D"noreferrer norefe= > rrer" target=3D"_blank">https://www.freebsd.org/doc/en/books/handbook/disks= > -hast.html
> >=C2=A0 =C2=A0 =C2=A0doesn't work at boot time because devd start be= > fore hastd.
> >=C2=A0 =C2=A0 =C2=A0
> >=C2=A0 =C2=A0 =C2=A0PR: 199733
> >=C2=A0 =C2=A0 =C2=A0Submitted-by: target=3D"_blank" rel=3D"noreferrer">hs_fbsd@on-sky.net (no name given= > )
> > ---
> >=C2=A0 libexec/rc/rc.d/devd | 2 +-
> >=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd
> > index 98f2068c2075..524fb045dfab 100755
> > --- a/libexec/rc/rc.d/devd
> > +++ b/libexec/rc/rc.d/devd
> > @@ -3,7 +3,7 @@
> >=C2=A0 #
> >=C2=A0
> >=C2=A0 # PROVIDE: devd
> > -# REQUIRE: netif ldconfig
> > +# REQUIRE: netif ldconfig hastd
> >=C2=A0 # BEFORE: NETWORKING mountcritremote
> >=C2=A0 # KEYWORD: nojail shutdown
> >=C2=A0
> >
>
> This causes boot to hang requiring a ctrl-C to continue the boot.
>
> The reason for this is I, probably like many others, don't use hastd. A= > nd
> especially not on laptops.
>
> Maybe put # BEFOFE: devd in the hastd rc script. This way if
> hastd_enable=3D"NO" or not specified in rc.conf there would be no= > hang during
> reboot.
>
> I've reverted this in my local "prod" tree. Life is good agai= > n.

">Ok. It worked for me. I gotta figure out why, but in the mean time I'= > ll revert.

Warner
<= > div dir=3D"auto">
l_quote_container">
.8ex;border-left:1px #ccc solid;padding-left:1ex"> > --
> Cheers,
> Cy Schubert < nk" rel=3D"noreferrer">Cy.Schubert@cschubert.com>
> FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 =3D"https://FreeBSD.org" rel=3D"noreferrer noreferrer" target=3D"_blank">ht= > tps://FreeBSD.org
> NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0< e.org" target=3D"_blank" rel=3D"noreferrer">cy@nwtime.org>=C2=A0 =C2= > =A0 Web:=C2=A0 target=3D"_blank">https://nwtime.org
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= > =A0 =C2=A0 e^(i*pi)+1=3D0
>
>
>
>
> > --00000000000076657b062d5e01a8-- From nobody Wed Feb 5 05:28:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynpfk1gHpz5n8FB; Wed, 05 Feb 2025 05:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynpfk1BjCz3rwX; Wed, 05 Feb 2025 05:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738733294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUeKJsTO7sLsF60AkMALGBPCEs/qQK6NFABGHwdXJAk=; b=a5mR2FHZhpBhuAUhOmZ5sXPR5L4aiTNJYgEuI4xqgc6cqnAQeR//z6rty/LiDaShk7Dt1c 7bF8KPbBD9PYctrv+FpSHQ+qR2bOhcIYlDEmqMFCyHRo3Ri9Qjyz+5u5mKHbcJIuf3wzbZ uVfXhCTyFEyTQMFNwl7IZOIk0ttxQz8/6NWKCIgh1BkxAIaZHxJmaJFsIrl54fXf+IT2wz aVDhdt72/LPeDRX6d2jZzf2SwNTscV7c8kJoOwkgF4zq5Z/Qm0vGrkRrF+ctQ4tLx26HaU BiZEowOMxxqN0cV+f2mPNx6Htq+67zpYijF3o/Y6oOz2uDlx6SFUl/9n9qYGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738733294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUeKJsTO7sLsF60AkMALGBPCEs/qQK6NFABGHwdXJAk=; b=xeDU4H3zbEf8I2iJrnLDAKqyFlzFWowO699C1bqlQQYbgq0TSTXVzwot3y1AvlbRU29uKS BXoADOGIKv8U9IWYqI8ff+H38EZLYXUiVgR6KUEd6/k1kr2QBTK4Sxgyao06ln71Xq30HD 4fw5F2QFYWXvi15PC+4/u8/nR6aThLsFO5OThQU0i+Qq3lupjqXh+I7suxUrEd916mIywV gvkNxZQKFuTWbNJEA4FZbUNU9R3ISFLTml8g5ySMZqaLuJ+G2DD/rU9lUVkilw1IiBKAmd S4nNFWHZga2RCQB8Qv1yY2E9scKFBcXWuec4F7t/+rlIXUpbdtSTi+u4xumccg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738733294; a=rsa-sha256; cv=none; b=FjV5qj1KJZJgoZ+S8KOYwmBx3rYZK7lD9/waT6CbulXFRr9GEh/c21nxrF/QeA3wsXhgXv fggnRmaO5MueiLAuvEmwDt8BbcTRB8RibDkXE10MGvJ6nE7XPmqNlznmpxpxPZIiLb8VbC 3RypJW2dvyISr/G2JdhLfb4SLPiU4pOLvlEl+Ca/wlPKmkDs5Ejo5VQMod1CqtfRO2IVzN /T4PU5w/2lOvNXEQnx9ZijQAHKCU+ksgG5/ZSQhB998T5mVsFImIIiUE2wCZjo3fUfcNmb 6m0ciOukXQLbJuE5z952xRnM0Sw/9GiJA13Qa0SgxCrcqltmafieGtD7ZPcaGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynpfk0d9HzfJM; Wed, 05 Feb 2025 05:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5155SD9F058473; Wed, 5 Feb 2025 05:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5155SDu2058470; Wed, 5 Feb 2025 05:28:13 GMT (envelope-from git) Date: Wed, 5 Feb 2025 05:28:13 GMT Message-Id: <202502050528.5155SDu2058470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d90e14fc18e8 - main - mptutil: Capture CAM errors from bus rescan List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d90e14fc18e8d276b9b4318b4ca0e16f015c2658 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d90e14fc18e8d276b9b4318b4ca0e16f015c2658 commit d90e14fc18e8d276b9b4318b4ca0e16f015c2658 Author: Enji Cooper AuthorDate: 2025-02-05 03:52:38 +0000 Commit: Warner Losh CommitDate: 2025-02-05 03:54:26 +0000 mptutil: Capture CAM errors from bus rescan This will force reporting of CAM errors from rescanning the bus. PR: 174072 Reviewed by: imp --- usr.sbin/mptutil/mpt_config.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/usr.sbin/mptutil/mpt_config.c b/usr.sbin/mptutil/mpt_config.c index 88fb619c7eba..066f8df28268 100644 --- a/usr.sbin/mptutil/mpt_config.c +++ b/usr.sbin/mptutil/mpt_config.c @@ -313,10 +313,10 @@ clear_config(int ac, char **av) } printf("mpt%d: Configuration cleared\n", mpt_unit); - mpt_rescan_bus(-1, -1); + error = mpt_rescan_bus(-1, -1); close(fd); - return (0); + return (error); } MPT_COMMAND(top, clear, clear_config); @@ -771,7 +771,7 @@ create_volume(int ac, char **av) #ifdef DEBUG skip: #endif - mpt_rescan_bus(vol->VolumeBus, vol->VolumeID); + error = mpt_rescan_bus(vol->VolumeBus, vol->VolumeID); /* Clean up. */ free(vol); @@ -781,7 +781,7 @@ skip: free(state.ioc2); close(fd); - return (0); + return (error); } MPT_COMMAND(top, create, create_volume); @@ -825,10 +825,10 @@ delete_volume(int ac, char **av) return (error); } - mpt_rescan_bus(-1, -1); + error = mpt_rescan_bus(-1, -1); close(fd); - return (0); + return (error); } MPT_COMMAND(top, delete, delete_volume); @@ -1071,7 +1071,9 @@ remove_spare(int ac, char **av) return (error); } - mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); + error = mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); + if (error) + return (error); free(info); close(fd); @@ -1175,7 +1177,9 @@ pd_delete(int ac, char **av) return (error); } - mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); + error = mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); + if (error) + return (error); free(info); close(fd); From nobody Wed Feb 5 05:28:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynpfl5ZFjz5n8Bc; Wed, 05 Feb 2025 05:28: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynpfl1xz7z3rtZ; Wed, 05 Feb 2025 05:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738733295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xeViIQcd8TxXm6Ltaj9iqzgOFCGiRFvN3TZpycMcpVo=; b=V5iz+7m2o3AY+D8K0Wq6mdDnHcxYohQ5MHDAorJSghSZPKu5G90t7LHk6BzmHuz7hIugQ5 6hlL7IFFd39SehtGaJedqwELH/Hf9qLU1xfTWvE7Cel3OvMBTx+HlLzOYXwHq8WO/761Mc j8A0wBUibYkapIZMcEosp7V7ggz3tqoeZzc1x2NJd6guwM0sbY3qq2hMNA5kYjwny/drKV 8ms32JpC9xMsTIiume8qIKXIcjQ9tXD5O83bKoKB3D92sq3cGRcK3nULGMn5BS50Obk5Ne S1E0VBKQW4DTtfa0J7Hs1VRRUXYT0Ieh/kvQ1V0hgwO/hNV5VlwLNpqSwnQu3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738733295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xeViIQcd8TxXm6Ltaj9iqzgOFCGiRFvN3TZpycMcpVo=; b=esRduDSzM5pREI/R2pCgj+4fHg/wuOHccjRuUROBNTqloyzyZQZWFz1u4xaAkiq8ZPgoTh 7sKE18772ubcrsnax4WRyRlZlbl0D2aAcoSMoZb2uUIgbSPaHJ+ohCi7iH9EA7qAfxo8h8 LAWg7eSwjQSi6dTDu/PVkxJ9n7hng0glDKVyiB1BRQYSiRQF9Fz8Q/vgDnDkeNerKBwVMp iujgtRcj6A6cudzR3FdgVNLuPFI4KKhuQlBTrMEGzt7wTHGkJI0SNUjz9yH4YGE1kKOdhB Bw7JTJZdHacs2FL8DdWY28dG/4saiqwRQJfFvBxPSbZY35iAHcBED1hXUts6sQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738733295; a=rsa-sha256; cv=none; b=CWfZ7PtqcnSKrQffRYs8TFI9I+rXhBFOWcHGHMOX00jhtFp3RgsvB6QsZufNWE0KHJyL8b ic6Yx4chZeFuFb9RVurZ6MbLM4NAhbhR2nNGgT8pWvsnzkIMAd4TovCvbpk1StcrU30Oyg nYTn6BdjlpFtkzRqWdPK3w3D4gpHgyLPAAgC2zeMgtYl6f9p5Mi9pZltZ2NbiPFPl7luQi 9BXXS1Tv4TBUEJveNhWgZGVgHS4Ty//7xdtiQBQuNBwdEC2gpkbXMMRsk6UBifBd3fZ1ni T1Z4f8+ejrGzklG3+3S9qvMMogfiB5FfCh3sjUJcS3QrBDAJEHHfI905WXM26g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynpfl1X3bzfsT; Wed, 05 Feb 2025 05:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5155SFuK058512; Wed, 5 Feb 2025 05:28:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5155SFiZ058509; Wed, 5 Feb 2025 05:28:15 GMT (envelope-from git) Date: Wed, 5 Feb 2025 05:28:15 GMT Message-Id: <202502050528.5155SFiZ058509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e3898d552c98 - main - Revert "rc.d: Add hastd as a prereq for devd" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3898d552c9807b523ab3b0a66056520aa2e252a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e3898d552c9807b523ab3b0a66056520aa2e252a commit e3898d552c9807b523ab3b0a66056520aa2e252a Author: Warner Losh AuthorDate: 2025-02-05 05:11:40 +0000 Commit: Warner Losh CommitDate: 2025-02-05 05:11:40 +0000 Revert "rc.d: Add hastd as a prereq for devd" This reverts commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900. It hangs the boot. It turns out I installed my test on the wrong machine and rebooted the other one... Sponsored by: Netflix --- libexec/rc/rc.d/devd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd index 524fb045dfab..98f2068c2075 100755 --- a/libexec/rc/rc.d/devd +++ b/libexec/rc/rc.d/devd @@ -3,7 +3,7 @@ # # PROVIDE: devd -# REQUIRE: netif ldconfig hastd +# REQUIRE: netif ldconfig # BEFORE: NETWORKING mountcritremote # KEYWORD: nojail shutdown From nobody Wed Feb 5 09:34:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynw771Yp8z5mSw2; Wed, 05 Feb 2025 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynw7647hkz3VnL; Wed, 05 Feb 2025 09:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5iuQ7/der2R3Atty9zFhRVoO1jnM+dM2aTScnoTmEo=; b=gfunMs/gwnCO/CaZsQfcjVaIdbiybDfRhuEju68m0qDCrT5jsPbp8cw0y31gmBLV+NtwcN EDc6N0RY8AMtj/jF5LpUDT9vLYnC8K36HJ1P9/LHPCEecnC7kDqEo7dVCNxgJJMo1aETsi N2/XKWrmKVh1KmugEN2HcnrW+L7HwU3T6UoYUlo0hSGBzavJkt7hBl/fu5j7n7vAP7hT6s nIslrgr5pgN1RxUwAyFXoGnV2U1RqfkofWtoPrpEsItvLxaN/QNcSMYnEGwGVFzBAt3L9b PSS+1sZBd63cxv6n497EOdCaWP77CIP7wxfUCFoYrkBlxWgJN/fvyyEOzmC6lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5iuQ7/der2R3Atty9zFhRVoO1jnM+dM2aTScnoTmEo=; b=ete1CUMxHe8RgSDRa+zNBAwLwTGb0tBhkcW04uC6sO2dFLwVzvSEA6M33Tzx66k6GjleDA gCQK2Tt92D6ecOiLlvrMjKKWs/XR91po8Nmp7HvUQUcieargreM2HJEMO2cpEdw5A/9K88 a6hk3q9Eqi1E+0FyYSVi7Fp695l3+u07HHgZFUx2KMYFjpP5B5cVbO/jd1tJf4VYUHXEgm pekGlYJEhK9e1EtAmx4FrpADa22yrPB4ho2pZo9TqkEH/rOtEJaBp13F4sherDGidJPgwq bjb7NZvTjeI2/8GGRSGSyv9BcvX377csPw8qTKJ+8xAqAwf6nWHZOo0b/kYrvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738748082; a=rsa-sha256; cv=none; b=jBrf5IHU146R6rjPwiIQpimix8/RvpQ1AQUCUUoWRvwjNy1OB/lNZ5ofkrupFpEKLVs+e6 GzswCo345M+4YynFa0DrYKubjSXeLXso4i5swut0M9Soh2SMzq39Vq0cxkztwLSTokAYgl Xjx9PJtZYIRd7gmZYJ89bD8Zn/x73qP/zKoqo2PPEPPPOLddCccqQJ1uq3soLC7OqPE42a dVntcl/Mta6WPvxF2GXl+lWtMWF+crZKUz1972KZJX9yMU3hw6qS8R+0EqI+eIzmthXMf0 ujoWjjJOysThvrFNjvh8Lzx1d3OSuUknDO/MHCDuYE01t5E3jnmp0FmyO6dlhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynw763lT0zmtZ; Wed, 05 Feb 2025 09:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5159Ygro025646; Wed, 5 Feb 2025 09:34:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5159Yg7M025643; Wed, 5 Feb 2025 09:34:42 GMT (envelope-from git) Date: Wed, 5 Feb 2025 09:34:42 GMT Message-Id: <202502050934.5159Yg7M025643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 6492ef7b832c - main - bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6492ef7b832c9dcb07784aaf752cb71682bd0444 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=6492ef7b832c9dcb07784aaf752cb71682bd0444 commit 6492ef7b832c9dcb07784aaf752cb71682bd0444 Author: Ruslan Bukin AuthorDate: 2025-02-05 09:30:50 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-05 09:30:58 +0000 bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits Apply 2e2b8afa52da6 for RISC-V: As on amd64 and aarch64 APs will repeatedly exit until they are brought online, so this hack helps avoid burning CPU time during guest bootup. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D48811 --- usr.sbin/bhyve/riscv/vmexit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.sbin/bhyve/riscv/vmexit.c b/usr.sbin/bhyve/riscv/vmexit.c index e2efd53bdede..233dba9f3c7f 100644 --- a/usr.sbin/bhyve/riscv/vmexit.c +++ b/usr.sbin/bhyve/riscv/vmexit.c @@ -47,6 +47,7 @@ #include #include #include +#include #include @@ -135,6 +136,12 @@ vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, struct vm_run *vmrun __unused) { + /* + * XXX-MJ sleep for a short period to avoid chewing up the CPU in the + * window between activation of the vCPU thread and the + * SBI_HSM_HART_START request. + */ + usleep(1000); return (VMEXIT_CONTINUE); } From nobody Wed Feb 5 09:34:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynw7354GZz5mT8s; Wed, 05 Feb 2025 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynw731Rqfz3W46; Wed, 05 Feb 2025 09:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaXYdV22E6t0i/RIEXhzRC7HigEoNxow8C4reHQe36Q=; b=uf+zygB9j/jY5QY8MASydRsofQaC1lMCK+mGgCIE+jTICBtQ0sWk+XSEVEo6lIFkFyiZfk STm74TG2VsstyDD33PhzBzxMlwV3ekeeTzNruzRQa/BLStQjIk1UhCeCzHMKS5G/kB7CBJ irkgF5ydTELO+ok3lJSqI6RkkIZuuiLbW8iJs1bbHmbZNyOFmznSwufSsYn/+k/GgjRFhm Mf9NVwrgr7snOTXxgWHwTgNLpXupox17NkNLBZG2VDsLx0/wmB0JIjAegpAon5mGwAzAQg 1TqqKJQLYNbboYZU8qvCn+LAakYdtY5ZDI0jyh6rIfjYBd2I+EEl+cJ6psKENA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaXYdV22E6t0i/RIEXhzRC7HigEoNxow8C4reHQe36Q=; b=Lf4GOvCprkwIEahimRuBRv0IPiXBv6heu38lIFqGdpsC+Mdrisdu4QO9Axj0GAvbczMP9h LHyYCq7dL/n8tY5D5SkpvOv6BDBMZC0OGkTLnUibKV3947TaTgivg1Kf2lXNjuroHE5zSW hMvaJ7KSF4Qcl1fgKtVCp00bIcYZdnCnCSJZt0f3pihuUun9mFnNZopFKZoK6Mov/7TavB BTyN1CZ1NGlEmX4cSCNn34zRTrCBxcHWXODbEwjXiqYj94gDjaOIeyK69xsGsAnjYSN0UE ri8b5l9Bhc0f2VD0k8pQoYBi3QmbbVV7lPVi6trKr6qWwZBCQW0EpFKooAA2Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738748079; a=rsa-sha256; cv=none; b=h7ES1mzINYp0YVaWSq1Aaem6KU+sltmCBjVfLhp8w/3aV04yZ5XaRev7rrkFaPAN2xHKh2 9ag2JiSdzs+VZefqqOVDZKJ4a2D3DT26I6y3f/oAST2bjAaCGmHIQ+0eDMC2TSV8yBgAJa C8zf7XCvkfuvVadCREO3pqPJWBfdYAXHJyenoiGF5BEwpqb256hQxB9tY9/hhv1bLd7iC1 VpTM1QCnqmaaXCUDxcjSfPmphFdtrhuBX8ZdTv9DWIb9+KexjHr7mRgjJ6MfZgv7B0dzNp wSrLshwMomTVQhQQnVgAeWJXSEkjjVlOz8nO9ldAgzeSahWIeedNEtatMLSxpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynw730tDbzmtX; Wed, 05 Feb 2025 09:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5159YdQu025537; Wed, 5 Feb 2025 09:34:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5159YdMH025534; Wed, 5 Feb 2025 09:34:39 GMT (envelope-from git) Date: Wed, 5 Feb 2025 09:34:39 GMT Message-Id: <202502050934.5159YdMH025534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 4eee13813967 - main - riscv vmm: clean up SBI code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4eee1381396714175495b395bd6e74b263b2b16d Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=4eee1381396714175495b395bd6e74b263b2b16d commit 4eee1381396714175495b395bd6e74b263b2b16d Author: Ruslan Bukin AuthorDate: 2025-02-05 09:20:23 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-05 09:21:23 +0000 riscv vmm: clean up SBI code - Use SBI standard error codes (with respect to the spec) - riscv_send_ipi() now takes cpuset_t* as an argument Differential Revision: https://reviews.freebsd.org/D48575 --- sys/riscv/vmm/riscv.h | 4 +- sys/riscv/vmm/vmm_riscv.c | 29 ++++++------- sys/riscv/vmm/vmm_sbi.c | 101 +++++++++++++++++++--------------------------- 3 files changed, 58 insertions(+), 76 deletions(-) diff --git a/sys/riscv/vmm/riscv.h b/sys/riscv/vmm/riscv.h index 793c61534cee..870d0d6c5cd1 100644 --- a/sys/riscv/vmm/riscv.h +++ b/sys/riscv/vmm/riscv.h @@ -150,9 +150,9 @@ DEFINE_VMMOPS_IFUNC(void, vmspace_free, (struct vmspace *vmspace)) struct hypctx *riscv_get_active_vcpu(void); void vmm_switch(struct hypctx *); void vmm_unpriv_trap(struct hyptrap *, uint64_t tmp); -int vmm_sbi_ecall(struct vcpu *, bool *); +bool vmm_sbi_ecall(struct vcpu *); -void riscv_send_ipi(struct hypctx *hypctx, int hart_id); +void riscv_send_ipi(struct hyp *hyp, cpuset_t *cpus); int riscv_check_ipi(struct hypctx *hypctx, bool clear); bool riscv_check_interrupts_pending(struct hypctx *hypctx); diff --git a/sys/riscv/vmm/vmm_riscv.c b/sys/riscv/vmm/vmm_riscv.c index 78250ae7c440..ca2ef50dbd24 100644 --- a/sys/riscv/vmm/vmm_riscv.c +++ b/sys/riscv/vmm/vmm_riscv.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2024 Ruslan Bukin + * Copyright (c) 2024-2025 Ruslan Bukin * * This software was developed by the University of Cambridge Computer * Laboratory (Department of Computer Science and Technology) under Innovate @@ -450,7 +450,6 @@ riscv_handle_world_switch(struct hypctx *hypctx, struct vm_exit *vme, uint64_t insn; uint64_t gpa; bool handled; - bool retu; int ret; int i; @@ -496,16 +495,12 @@ riscv_handle_world_switch(struct hypctx *hypctx, struct vm_exit *vme, handled = false; break; case SCAUSE_VIRTUAL_SUPERVISOR_ECALL: - retu = false; - vmm_sbi_ecall(hypctx->vcpu, &retu); - if (retu == false) { - handled = true; + handled = vmm_sbi_ecall(hypctx->vcpu); + if (handled == true) break; - } for (i = 0; i < nitems(vme->u.ecall.args); i++) vme->u.ecall.args[i] = hypctx->guest_regs.hyp_a[i]; vme->exitcode = VM_EXITCODE_ECALL; - handled = false; break; case SCAUSE_VIRTUAL_INSTRUCTION: insn = vme->stval; @@ -537,17 +532,23 @@ vmmops_gla2gpa(void *vcpui, struct vm_guest_paging *paging, uint64_t gla, } void -riscv_send_ipi(struct hypctx *hypctx, int hart_id) +riscv_send_ipi(struct hyp *hyp, cpuset_t *cpus) { - struct hyp *hyp; + struct hypctx *hypctx; struct vm *vm; + uint16_t maxcpus; + int i; - hyp = hypctx->hyp; vm = hyp->vm; - atomic_set_32(&hypctx->ipi_pending, 1); - - vcpu_notify_event(vm_vcpu(vm, hart_id)); + maxcpus = vm_get_maxcpus(hyp->vm); + for (i = 0; i < maxcpus; i++) { + if (!CPU_ISSET(i, cpus)) + continue; + hypctx = hyp->ctx[i]; + atomic_set_32(&hypctx->ipi_pending, 1); + vcpu_notify_event(vm_vcpu(vm, i)); + } } int diff --git a/sys/riscv/vmm/vmm_sbi.c b/sys/riscv/vmm/vmm_sbi.c index 3ba90e349b3c..426276444357 100644 --- a/sys/riscv/vmm/vmm_sbi.c +++ b/sys/riscv/vmm/vmm_sbi.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2024 Ruslan Bukin + * Copyright (c) 2024-2025 Ruslan Bukin * * This software was developed by the University of Cambridge Computer * Laboratory (Department of Computer Science and Technology) under Innovate @@ -32,29 +32,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include #include #include "riscv.h" @@ -64,13 +43,13 @@ static int vmm_sbi_handle_rfnc(struct vcpu *vcpu, struct hypctx *hypctx) { struct vmm_fence fence; + cpuset_t active_cpus; uint64_t hart_mask; uint64_t hart_mask_base; uint64_t func_id; struct hyp *hyp; uint16_t maxcpus; cpuset_t cpus; - int vcpu_id; int i; func_id = hypctx->guest_regs.hyp_a[6]; @@ -94,31 +73,39 @@ vmm_sbi_handle_rfnc(struct vcpu *vcpu, struct hypctx *hypctx) fence.type = VMM_RISCV_FENCE_VMA_ASID; break; default: - return (-1); + return (SBI_ERR_NOT_SUPPORTED); } /* Construct cpuset_t from the mask supplied. */ - CPU_ZERO(&cpus); hyp = hypctx->hyp; + active_cpus = vm_active_cpus(hyp->vm); maxcpus = vm_get_maxcpus(hyp->vm); for (i = 0; i < maxcpus; i++) { vcpu = vm_vcpu(hyp->vm, i); if (vcpu == NULL) continue; - vcpu_id = vcpu_vcpuid(vcpu); if (hart_mask_base != -1UL) { - if (vcpu_id < hart_mask_base) + if (i < hart_mask_base) continue; - if (!(hart_mask & (1UL << (vcpu_id - hart_mask_base)))) + if (!(hart_mask & (1UL << (i - hart_mask_base)))) continue; } + /* + * If either hart_mask_base or at least one hartid from + * hart_mask is not valid, then return error. + */ + if (!CPU_ISSET(i, &active_cpus)) + return (SBI_ERR_INVALID_PARAM); CPU_SET(i, &cpus); } + if (CPU_EMPTY(&cpus)) + return (SBI_ERR_INVALID_PARAM); + vmm_fence_add(hyp->vm, &cpus, &fence); - return (0); + return (SBI_SUCCESS); } static int @@ -126,7 +113,6 @@ vmm_sbi_handle_time(struct vcpu *vcpu, struct hypctx *hypctx) { uint64_t func_id; uint64_t next_val; - int ret; func_id = hypctx->guest_regs.hyp_a[6]; next_val = hypctx->guest_regs.hyp_a[0]; @@ -134,31 +120,25 @@ vmm_sbi_handle_time(struct vcpu *vcpu, struct hypctx *hypctx) switch (func_id) { case SBI_TIME_SET_TIMER: vtimer_set_timer(hypctx, next_val); - ret = 0; break; default: - ret = -1; - break; + return (SBI_ERR_NOT_SUPPORTED); } - hypctx->guest_regs.hyp_a[0] = ret; - - return (0); + return (SBI_SUCCESS); } static int vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) { - struct hypctx *target_hypctx; - struct vcpu *target_vcpu __unused; cpuset_t active_cpus; struct hyp *hyp; uint64_t hart_mask; uint64_t hart_mask_base; uint64_t func_id; + cpuset_t cpus; int hart_id; int bit; - int ret; func_id = hypctx->guest_regs.hyp_a[6]; hart_mask = hypctx->guest_regs.hyp_a[0]; @@ -170,6 +150,7 @@ vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) active_cpus = vm_active_cpus(hyp->vm); + CPU_ZERO(&cpus); switch (func_id) { case SBI_IPI_SEND_IPI: while ((bit = ffs(hart_mask))) { @@ -177,30 +158,28 @@ vmm_sbi_handle_ipi(struct vcpu *vcpu, struct hypctx *hypctx) hart_mask &= ~(1u << hart_id); if (hart_mask_base != -1) hart_id += hart_mask_base; - if (CPU_ISSET(hart_id, &active_cpus)) { - /* TODO. */ - target_vcpu = vm_vcpu(hyp->vm, hart_id); - target_hypctx = hypctx->hyp->ctx[hart_id]; - riscv_send_ipi(target_hypctx, hart_id); - } + if (!CPU_ISSET(hart_id, &active_cpus)) + return (SBI_ERR_INVALID_PARAM); + CPU_SET(hart_id, &cpus); } - ret = 0; break; default: - printf("%s: unknown func %ld\n", __func__, func_id); - ret = -1; - break; + dprintf("%s: unknown func %ld\n", __func__, func_id); + return (SBI_ERR_NOT_SUPPORTED); } - hypctx->guest_regs.hyp_a[0] = ret; + if (CPU_EMPTY(&cpus)) + return (SBI_ERR_INVALID_PARAM); - return (0); + riscv_send_ipi(hyp, &cpus); + + return (SBI_SUCCESS); } -int -vmm_sbi_ecall(struct vcpu *vcpu, bool *retu) +bool +vmm_sbi_ecall(struct vcpu *vcpu) { - int sbi_extension_id __unused; + int sbi_extension_id; struct hypctx *hypctx; int error; @@ -220,18 +199,20 @@ vmm_sbi_ecall(struct vcpu *vcpu, bool *retu) switch (sbi_extension_id) { case SBI_EXT_ID_RFNC: error = vmm_sbi_handle_rfnc(vcpu, hypctx); - hypctx->guest_regs.hyp_a[0] = error; break; case SBI_EXT_ID_TIME: - vmm_sbi_handle_time(vcpu, hypctx); + error = vmm_sbi_handle_time(vcpu, hypctx); break; case SBI_EXT_ID_IPI: - vmm_sbi_handle_ipi(vcpu, hypctx); + error = vmm_sbi_handle_ipi(vcpu, hypctx); break; default: - *retu = true; - break; + /* Return to handle in userspace. */ + return (false); } - return (0); + hypctx->guest_regs.hyp_a[0] = error; + + /* Request is handled in kernel mode. */ + return (true); } From nobody Wed Feb 5 09:34:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynw75637Lz5mT8t; Wed, 05 Feb 2025 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynw753WQKz3Vt2; Wed, 05 Feb 2025 09:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6aZDT3ZNgpMeEFh5pIKhiCy85/j0mlREFpgiDNSQ8M=; b=wTm4QeAyyJy/7APVZhlqPB3jL/XOjEPfATIZBtQ+K6M7nig8N2Hucun4Guqc6q0necHdHv K0zyllBvwmVRsBprfTsGd7dFUcTS7XRBn3h7S6tdkVt/jSZhPAX/JKYOhiaPzndaH8n/ZN Kg7b4gKQedOJH8wYzT7OOy6Bs2o7a09nLzv4bbPN+ka9uMWCmWOHzmjEpeykx/KaPPmse4 wdevWoCS+v+LmznahbD4QwGMJ/z4zNr2RLqPVkNUdLSNfNjyrmRbNhulkVSO69Y+7fIVIa noPRJlyKAXbemJeK97vTluypxMBYMyJ5nBgNIvxD/1b9KRYp1gRpPR1FNkJ5NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6aZDT3ZNgpMeEFh5pIKhiCy85/j0mlREFpgiDNSQ8M=; b=Qhnnv4Pe1N/Q4s/UzYhGexinHCjAiUonDnG0HV7/gbuDfFLdvdfdVuGz8h7PU78+axpXEy gMV30rW/3G1Qyf+iiP+nXfxvwKKKMhnbPhZLKJP+382jL70axtp5BGA2SWqz8nPcjwaM8V CMqu55vCBfXn8hR1U/w0EMD6XHatHMb3Ufwmzlx68dtzvOGt4w2jn7xIukyBHfWqJXd7Bg QlqDWaTMJ5PJ/2l+NBCP4lPstjHWIZckt+Dgb639tPdi/RPc2u1hNbbeNwOGt/hOaDqrut yraQGRAr3I/NGoFz2t64DgdXqUjLprek4+jcSW7juN555/bvEnadg1EzS6XwaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738748081; a=rsa-sha256; cv=none; b=tEfwpv5AUvD5FRG6Tom3qeS7MFogVvCAGMw9byTyX/gdDUXSAniE4vqbOqA0GSit/jTGyh u+mO9JXE/vFTfZBfOx5nPcpCNtmp/T/tYm96EGttHPCuZsQuDW1I+Mezgl2GTp2udXycaH OddMIf6SnjniNViOFbU4qhBiEKfzAUNogqA9mqdknISclJCR7+3gDc4XJqkoXY1D4vLg/E qbDlXugJgUwEsatRcbXSLbiCGWXLlWdShS/bso8O3RHkniyNSc2HNXNxmT5Az6EIsypaLS I4v5Bq5bOnYErdMhSkDj9qOCpFvsJqTErRKCK872qEDUxkT85Kam+4HguI36zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynw752nc8zmtY; Wed, 05 Feb 2025 09:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5159Yfek025612; Wed, 5 Feb 2025 09:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5159YfUu025609; Wed, 5 Feb 2025 09:34:41 GMT (envelope-from git) Date: Wed, 5 Feb 2025 09:34:41 GMT Message-Id: <202502050934.5159YfUu025609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: ae65d59d4b8c - main - riscv vmm: various fixes in APLIC. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae65d59d4b8c227ac27b58497b9295e09fa9a179 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=ae65d59d4b8c227ac27b58497b9295e09fa9a179 commit ae65d59d4b8c227ac27b58497b9295e09fa9a179 Author: Ruslan Bukin AuthorDate: 2025-02-05 09:25:37 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-05 09:30:11 +0000 riscv vmm: various fixes in APLIC. - Implement Level-sensitive interrupts - Disable up to 32 interrupts by a single query (CLRIE register handling) - Implement reading from DOMAINCFG All of this needed for Linux guest. Differential Revision: https://reviews.freebsd.org/D48808 --- sys/riscv/vmm/vmm_aplic.c | 85 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 12 deletions(-) diff --git a/sys/riscv/vmm/vmm_aplic.c b/sys/riscv/vmm/vmm_aplic.c index 60da6b4a27fb..4df41f2de1a5 100644 --- a/sys/riscv/vmm/vmm_aplic.c +++ b/sys/riscv/vmm/vmm_aplic.c @@ -70,9 +70,13 @@ MALLOC_DEFINE(M_APLIC, "RISC-V VMM APLIC", "RISC-V AIA APLIC"); /* If D == 1. */ #define SOURCECFG_CHILD_INDEX_S (0) #define SOURCECFG_CHILD_INDEX_M (0x3ff << SOURCECFG_CHILD_INDEX_S) +#define APLIC_SETIP 0x1c00 #define APLIC_SETIPNUM 0x1cdc +#define APLIC_CLRIP 0x1d00 #define APLIC_CLRIPNUM 0x1ddc +#define APLIC_SETIE 0x1e00 #define APLIC_SETIENUM 0x1edc +#define APLIC_CLRIE 0x1f00 #define APLIC_CLRIENUM 0x1fdc #define APLIC_GENMSI 0x3000 #define APLIC_TARGET(x) (0x3004 + ((x) - 1) * 4) @@ -96,6 +100,7 @@ struct aplic_irq { uint32_t state; #define APLIC_IRQ_STATE_PENDING (1 << 0) #define APLIC_IRQ_STATE_ENABLED (1 << 1) +#define APLIC_IRQ_STATE_INPUT (1 << 2) uint32_t target; uint32_t target_hart; }; @@ -146,15 +151,40 @@ aplic_set_enabled(struct aplic *aplic, bool write, uint64_t *val, bool enabled) irq = &aplic->irqs[i]; mtx_lock_spin(&aplic->mtx); - if (enabled) - irq->state |= APLIC_IRQ_STATE_ENABLED; - else - irq->state &= ~APLIC_IRQ_STATE_ENABLED; + if ((irq->sourcecfg & SOURCECFG_SM_M) != SOURCECFG_SM_INACTIVE) { + if (enabled) + irq->state |= APLIC_IRQ_STATE_ENABLED; + else + irq->state &= ~APLIC_IRQ_STATE_ENABLED; + } mtx_unlock_spin(&aplic->mtx); return (0); } +static void +aplic_set_enabled_word(struct aplic *aplic, bool write, uint32_t word, + uint64_t *val, bool enabled) +{ + uint64_t v; + int i; + + if (!write) { + *val = 0; + return; + } + + /* + * The write is ignored if value written is not an active interrupt + * source number in the domain. + */ + for (i = 0; i < 32; i++) + if (*val & (1u << i)) { + v = word * 32 + i; + (void)aplic_set_enabled(aplic, write, &v, enabled); + } +} + static int aplic_handle_target(struct aplic *aplic, int i, bool write, uint64_t *val) { @@ -238,6 +268,8 @@ aplic_mmio_access(struct hyp *hyp, struct aplic *aplic, uint64_t reg, int r; int i; + dprintf("%s: reg %lx\n", __func__, reg); + if ((reg >= APLIC_SOURCECFG(1)) && (reg <= APLIC_SOURCECFG(aplic->nirqs))) { i = ((reg - APLIC_SOURCECFG(1)) >> 2) + 1; @@ -258,9 +290,20 @@ aplic_mmio_access(struct hyp *hyp, struct aplic *aplic, uint64_t reg, return (error); } + if ((reg >= APLIC_CLRIE) && (reg < (APLIC_CLRIE + aplic->nirqs * 4))) { + i = (reg - APLIC_CLRIE) >> 2; + aplic_set_enabled_word(aplic, write, i, val, false); + return (0); + } + switch (reg) { case APLIC_DOMAINCFG: - aplic->domaincfg = *val & DOMAINCFG_IE; + mtx_lock_spin(&aplic->mtx); + if (write) + aplic->domaincfg = *val & DOMAINCFG_IE; + else + *val = aplic->domaincfg; + mtx_unlock_spin(&aplic->mtx); error = 0; break; case APLIC_SETIENUM: @@ -441,6 +484,7 @@ aplic_inject_irq(struct hyp *hyp, int vcpuid, uint32_t irqid, bool level) struct aplic *aplic; bool notify; int error; + int mask; aplic = hyp->aplic; @@ -460,22 +504,39 @@ aplic_inject_irq(struct hyp *hyp, int vcpuid, uint32_t irqid, bool level) notify = false; switch (irq->sourcecfg & SOURCECFG_SM_M) { + case SOURCECFG_SM_LEVEL0: + if (!level) + irq->state |= APLIC_IRQ_STATE_PENDING; + break; + case SOURCECFG_SM_LEVEL1: + if (level) + irq->state |= APLIC_IRQ_STATE_PENDING; + break; + case SOURCECFG_SM_EDGE0: + if (!level && (irq->state & APLIC_IRQ_STATE_INPUT)) + irq->state |= APLIC_IRQ_STATE_PENDING; + break; case SOURCECFG_SM_EDGE1: - if (level) { + if (level && !(irq->state & APLIC_IRQ_STATE_INPUT)) irq->state |= APLIC_IRQ_STATE_PENDING; - if (irq->state & APLIC_IRQ_STATE_ENABLED) - notify = true; - } else - irq->state &= ~APLIC_IRQ_STATE_PENDING; break; case SOURCECFG_SM_DETACHED: + case SOURCECFG_SM_INACTIVE: break; default: - /* TODO. */ - dprintf("sourcecfg %d\n", irq->sourcecfg & SOURCECFG_SM_M); error = ENXIO; break; } + + if (level) + irq->state |= APLIC_IRQ_STATE_INPUT; + else + irq->state &= ~APLIC_IRQ_STATE_INPUT; + + mask = APLIC_IRQ_STATE_ENABLED | APLIC_IRQ_STATE_PENDING; + if ((irq->state & mask) == mask) + notify = true; + mtx_unlock_spin(&aplic->mtx); if (notify) From nobody Wed Feb 5 09:34:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynw7503dwz5mSw1; Wed, 05 Feb 2025 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynw742NMPz3W47; Wed, 05 Feb 2025 09:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGTNoXZLH921pTgU8AkqEVNwZGQSIB0znpqCy7HPxOM=; b=h6kBN6oAPwb9RdJcUbIJqf9tnjqPxqgZ2UJNd+Nx7HZKFuxHY3i2tfdyw0cENZtUmMVWeN 8c4SclXUhed3cXX1jVh7MmPeybO4YS0E/VjdF/Qwe5f10KS+JIPWp4qnz92kxeBqzZqOyH P8uNZoSKPjVilvsIOmUjFbqA2IBjjCyVllwhttVsR1C5LZfdNOQXw6qQ97uxCll6pt9Io9 GwV8JtE0BG4t7FGd5I8s9nfdLzj+7MNo/mR1P2vUjyN0YbFLGUh5R6Vp1H9OXRnSEUotGQ IHLXlSbPxbJFZQDeIA/8JJIZFynfK2pJZIIs0eDGBMjoto6W/MX9KmLshkNBDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGTNoXZLH921pTgU8AkqEVNwZGQSIB0znpqCy7HPxOM=; b=S+1MGCrnxPnaq9eXuKUhAaKvPR1/txy9S0WMDhAu2RMP9zLhBYhern4qtw02V3W2RaCVPP hYcEAF8iNl0fvvVV1SiUH/35LhdvH2tezppnUbY32lr0yirhkqsS7809Xl2gY2AKw8SqNX p6l2Logcial2VFbk2xn6BsdW8PowsQFhTFpbUTnZcPV8y/tVuIacQ6ChxDxnISdbtJKOb6 vtpYFI8q1FpuhnzKIUCAK6yazwIu8CyfMRi9uu6vLckuIT9jsaCzhTikP9j/ov7LAMW2gZ EVQotgS76IKEleYFP/+r67DoZdjRFJvlXGtP0/vzpOIie/RtGg0A1eC6l2F/JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738748080; a=rsa-sha256; cv=none; b=AGgIQzcF1meJ204K01/baZMlr5StSEAawGT+Fg2jbBysYZ9WbD2Wq7a2zDjajfNjBnuJN2 5IKpqGG4DtEBex6QtDnA700pp3iURjaMThxCe0rDffAoWDB1gPh4iLG5GEn2JCiYsA8Qfu CNi6gu0AvBHsGrnHAZgGyCJO+AIkiY5rjyzaXuT6tEANIS7CY6T+p6fFCJs+HBPmgtoJLQ Ft7jkI5B9tiRXy9P2s1fl7O9kJjaxF+gYmWqdSGu2x68A44eijYev9w9dLTNDFsIxmQJu+ 135n4HPv+vw+pVqd8BfqDCMvZeidsSXDLtgIIAh5NEaNYWbfL5zMMpKNkETAUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynw741qHtzmYF; Wed, 05 Feb 2025 09:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5159YeLa025578; Wed, 5 Feb 2025 09:34:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5159Ye37025575; Wed, 5 Feb 2025 09:34:40 GMT (envelope-from git) Date: Wed, 5 Feb 2025 09:34:40 GMT Message-Id: <202502050934.5159Ye37025575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: d69ab49ce081 - main - bhyve/riscv: fix HSM extension handling. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d69ab49ce0814a9c3da7ba6567ed71f8713dc192 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=d69ab49ce0814a9c3da7ba6567ed71f8713dc192 commit d69ab49ce0814a9c3da7ba6567ed71f8713dc192 Author: Ruslan Bukin AuthorDate: 2025-02-05 09:23:43 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-05 09:24:35 +0000 bhyve/riscv: fix HSM extension handling. Pass private data from supervisor as the second argument on secondary CPU startup. This is used by Linux guest. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D48807 --- usr.sbin/bhyve/riscv/vmexit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/bhyve/riscv/vmexit.c b/usr.sbin/bhyve/riscv/vmexit.c index b7d1a272b87e..e2efd53bdede 100644 --- a/usr.sbin/bhyve/riscv/vmexit.c +++ b/usr.sbin/bhyve/riscv/vmexit.c @@ -207,6 +207,11 @@ vmexit_ecall_hsm(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, vme->u.ecall.args[1]); assert(error == 0); + /* Pass private data. */ + error = vm_set_register(newvcpu, VM_REG_GUEST_A1, + vme->u.ecall.args[2]); + assert(error == 0); + vm_resume_cpu(newvcpu); CPU_SET_ATOMIC(hart_id, &running_hartmask); From nobody Wed Feb 5 09:34:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ynw781tD4z5mT8v; Wed, 05 Feb 2025 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ynw775WXWz3W20; Wed, 05 Feb 2025 09:34:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rg5pBFdjw1c+x/CJPDdVjmzOXteWt1Yw1n/upnmSRzs=; b=cEC2At0nMlnDvkkSgKg0zY88sGbvS1k9FAPTZtIy2MjW0iK+ZGu5xqjfWhsLsexhcGLu+A BdaNZOM7kBXqAo4kWj0THjuuIoDOZ50YvA/WZB1ZVFygkV3Y5SRrgw7Ys6fzo0flovW+zE IFwnKp9cOyvlh62CbBKhHnbBaIPfh7AJ3+pO4zkNVs0IdGBK18KdXTFGP9DSaaXea2JIo7 n6zdT4ERN6xGf5+nYbw/5yz2VLYiQIXGz11dEFKAkLo673iES71JScflktt6jdMbz60+Mu uM89Js+47e9/NgTbJDSXzP8fZOvpS9Hc/E3Ra3054tkDF9GZUqNEPh0taXCYeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738748083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rg5pBFdjw1c+x/CJPDdVjmzOXteWt1Yw1n/upnmSRzs=; b=W5XPEegSKIoDxjxZnr3n/DTYoi63UCJ0Feu06QDpTEbrpv5SPwmtDHhJPfM+HNDGityPIR kbvTTRtrvxNGPbQ24bBG1VamQuvDBjGG575gLlhkILoELK24PtvoqfRdoOXx7ljMwsZfu1 vVl7RBR0BcyUUIvueYbRdNDg8lIpjjgAcTdDthYHDk85zzYCJAWL+nVKajRb2DzYQty4C/ rBfaUCTLefY41+fLWEB7pas5/lyecBp5ljo/9VxVUfeyR4f9aJOvOu1HF7sNuXyTJ/WaDR hDg8mlS1EUeamgU1kg6+xfrlVHd0B7Mrc4f0Ey+WhVQHEtGZgkpDWSOhqGYUbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738748083; a=rsa-sha256; cv=none; b=VHM3Hbo7FPv3lTFKyToOWvyk47KkxKkSyL1bY4Mlsj3eLfr9cDkOJGtH6OcOKttGOtJtdD TTLQTO53dSdZ5UqteKT1u2zmaPByHsZkvdUTOJcJuEB7uLTPxuuGPhgiQ9xIZOmPqy6h62 3SiMeEzFRdiqo+vxJZVMBMGQEzXBR6wODEPDA6WS483f1tLZguA33ioJZHSFSrRPT2CAhw d1kXNZPMR1VEjt/+sIg/Y0/QUrj4RWFbHs96YCQzsQQ9Yz2Jks43QrPceek+S5jigm2J0s 2pWb3R/OzOarugVT0GJs/347epkyNlf9eKN5dqobMEl5yO2bG9QuGfCc+gNjwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ynw774n8Dzn3m; Wed, 05 Feb 2025 09:34:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5159YhO9025679; Wed, 5 Feb 2025 09:34:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5159Yh3V025676; Wed, 5 Feb 2025 09:34:43 GMT (envelope-from git) Date: Wed, 5 Feb 2025 09:34:43 GMT Message-Id: <202502050934.5159Yh3V025676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 48f91cacc39c - main - bhyve/riscv: clean up SBI handlers. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48f91cacc39c3d48e8dfdb804b844e2a2dbc5157 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=48f91cacc39c3d48e8dfdb804b844e2a2dbc5157 commit 48f91cacc39c3d48e8dfdb804b844e2a2dbc5157 Author: Ruslan Bukin AuthorDate: 2025-02-05 09:31:57 +0000 Commit: Ruslan Bukin CommitDate: 2025-02-05 09:32:25 +0000 bhyve/riscv: clean up SBI handlers. Similar to kernel SBI clean up patch, do clean up in userspace SBI part: - use standard SBI error codes; - remove unused function. Differential Revision: https://reviews.freebsd.org/D48829 --- usr.sbin/bhyve/riscv/vmexit.c | 63 +++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/usr.sbin/bhyve/riscv/vmexit.c b/usr.sbin/bhyve/riscv/vmexit.c index 233dba9f3c7f..3bc83b3bef4e 100644 --- a/usr.sbin/bhyve/riscv/vmexit.c +++ b/usr.sbin/bhyve/riscv/vmexit.c @@ -173,13 +173,7 @@ vmm_sbi_probe_extension(int ext_id) return (1); } -static void -vmexit_ecall_time(struct vmctx *ctx __unused, struct vm_exit *vme __unused) -{ - -} - -static void +static int vmexit_ecall_hsm(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, struct vm_exit *vme) { @@ -187,15 +181,12 @@ vmexit_ecall_hsm(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, uint64_t hart_id; int func_id; int error; - int ret; hart_id = vme->u.ecall.args[0]; func_id = vme->u.ecall.args[6]; - ret = -1; - if (HART_TO_CPU(hart_id) >= (uint64_t)guest_ncpus) - goto done; + return (SBI_ERR_INVALID_PARAM); newvcpu = fbsdrun_vcpu(HART_TO_CPU(hart_id)); assert(newvcpu != NULL); @@ -221,42 +212,34 @@ vmexit_ecall_hsm(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, vm_resume_cpu(newvcpu); CPU_SET_ATOMIC(hart_id, &running_hartmask); - - ret = 0; break; case SBI_HSM_HART_STOP: if (!CPU_ISSET(hart_id, &running_hartmask)) break; CPU_CLR_ATOMIC(hart_id, &running_hartmask); vm_suspend_cpu(newvcpu); - ret = 0; break; case SBI_HSM_HART_STATUS: /* TODO. */ break; default: - break; + return (SBI_ERR_NOT_SUPPORTED); } -done: - error = vm_set_register(vcpu, VM_REG_GUEST_A0, ret); - assert(error == 0); + return (SBI_SUCCESS); } -static void +static int vmexit_ecall_base(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_exit *vme) { int sbi_function_id; + uint32_t val; int ext_id; int error; - uint32_t val; - int ret; sbi_function_id = vme->u.ecall.args[6]; - ret = 0; - switch (sbi_function_id) { case SBI_BASE_GET_SPEC_VERSION: val = SBI_VERS_MAJOR << SBI_SPEC_VERS_MAJOR_OFFSET; @@ -282,20 +265,16 @@ vmexit_ecall_base(struct vmctx *ctx __unused, struct vcpu *vcpu, val = 0; break; default: - ret = 1; - break; + return (SBI_ERR_NOT_SUPPORTED); } - error = vm_set_register(vcpu, VM_REG_GUEST_A0, ret); + error = vm_set_register(vcpu, VM_REG_GUEST_A1, val); assert(error == 0); - if (ret == 0) { - error = vm_set_register(vcpu, VM_REG_GUEST_A1, val); - assert(error == 0); - } + return (SBI_SUCCESS); } -static void +static int vmexit_ecall_srst(struct vmctx *ctx, struct vm_exit *vme) { enum vm_suspend_how how; @@ -315,11 +294,14 @@ vmexit_ecall_srst(struct vmctx *ctx, struct vm_exit *vme) vm_suspend(ctx, how); break; default: - break; + return (SBI_ERR_NOT_SUPPORTED); } - default: break; + default: + return (SBI_ERR_NOT_SUPPORTED); } + + return (SBI_SUCCESS); } static int @@ -327,30 +309,33 @@ vmexit_ecall(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) { int sbi_extension_id; struct vm_exit *vme; + int error; + int ret; vme = vmrun->vm_exit; sbi_extension_id = vme->u.ecall.args[7]; switch (sbi_extension_id) { case SBI_EXT_ID_SRST: - vmexit_ecall_srst(ctx, vme); + ret = vmexit_ecall_srst(ctx, vme); break; case SBI_EXT_ID_BASE: - vmexit_ecall_base(ctx, vcpu, vme); - break; - case SBI_EXT_ID_TIME: - vmexit_ecall_time(ctx, vme); + ret = vmexit_ecall_base(ctx, vcpu, vme); break; case SBI_EXT_ID_HSM: - vmexit_ecall_hsm(ctx, vcpu, vme); + ret = vmexit_ecall_hsm(ctx, vcpu, vme); break; case SBI_CONSOLE_PUTCHAR: case SBI_CONSOLE_GETCHAR: default: /* Unknown SBI extension. */ + ret = SBI_ERR_NOT_SUPPORTED; break; } + error = vm_set_register(vcpu, VM_REG_GUEST_A0, ret); + assert(error == 0); + return (VMEXIT_CONTINUE); } From nobody Wed Feb 5 10:32:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnxQ433pjz5mXm6; Wed, 05 Feb 2025 10:32: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnxQ42Vqxz3jXK; Wed, 05 Feb 2025 10:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738751564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FF3ocNeXy07BtxADQsxtjKB0o3TdR0/+p2et7a2m5jM=; b=Pno8N/fSqGzRNPfQEhHwAPi3RQ+hdpSxv4XNVkTMon5q3GcItso40HS2/mcWI3ov+f89ug Nv+zRA+gXkJaXADgDEnpbILbynHIAFzAnzB5t6zt3E6V/rtCK/CGCIvBCAwDTMD4uuqQTK mqrogjVU4JQU0ZKxgBsxqe5R5TRJXYemED94gffZ2aVuRBsVBey9+OLwyWeTvuvQNvvBzL jiup0uk/984vb1OwV/B8PAuummsm0PYC53Q6zKSt/WRQCsTcNtyvRv/79nNxjTg8Iik/1x sZvUCEMkvWBjhBXAfSP0iw6mYjnqEoOHrlKL7dZlij119vezpoLDCQ/rvaIjeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738751564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FF3ocNeXy07BtxADQsxtjKB0o3TdR0/+p2et7a2m5jM=; b=UW7RE98I1kjrd5vtlGogJ6mgyw1oypv+p8v+u50Hnb3A/8JNIG4qVLNy6f4so3GeaDJtO0 6Y050qkZ2l54Eox7aewB5OhpXFLHGlHsLmdKTy5gKW/X9jEnttTmHx7VfHokzA6bEscua/ Mc9fMIXGPtqjSfAS4uO3PezSUCc/Z82Y+fLSt6ZdtE7vPHsPs0axwG/1RpakQrwEc0LV5C lp/Xus31hClzKQbC6ZhKWNIOivme+eEsUWAQk08lIWEAdB4pvOVmREHOpHAtwJG90yvrpb ypAbnRgzjoWN7MOCyNEgcjmwHxkwcqL0Lx+mh9wLKUmTaKEtrhDXl7qmJXpU8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738751564; a=rsa-sha256; cv=none; b=axRy+y5ULsnT3097EupevFW45tzXBCIatrmXjMeNb9FUe2CNlgl1HR+6KzgumswNILCVN4 GhQLSH4I8YpPGGVPW3hNcQ0ZeldQxatcNvxUUJtcfEw78K5Eo5qZxaAU7MO/ATqXz+EaI1 nRhvYXA8pzhTQQynZ1yutKkvlOG6l6lrFijg+oIfWdFQIK7Tlp8nF33PNP66hpHqyKDSIr UDRg8eqKKqeLJ25Zb5f3FLEtMH2HyrkEVHt7Bx4l3CLEBW4vyfp5DVgNiUwNt1kBzAcreo fpfW4f59UxLfFpZiZpGo/yjMVirh6ZpyHt/JuMyBYlZ01DTBkbARdlehKqm/7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnxQ41y6Szpdh; Wed, 05 Feb 2025 10:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 515AWixK037205; Wed, 5 Feb 2025 10:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 515AWiXN037202; Wed, 5 Feb 2025 10:32:44 GMT (envelope-from git) Date: Wed, 5 Feb 2025 10:32:44 GMT Message-Id: <202502051032.515AWiXN037202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 84e3ffac12a8 - main - mlx4ib(4): Fix some typos in device messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84e3ffac12a8dcfeae0a5e0b25afe447ff2d5fa8 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=84e3ffac12a8dcfeae0a5e0b25afe447ff2d5fa8 commit 84e3ffac12a8dcfeae0a5e0b25afe447ff2d5fa8 Author: Gordon Bergling AuthorDate: 2025-02-05 10:31:12 +0000 Commit: Gordon Bergling CommitDate: 2025-02-05 10:31:12 +0000 mlx4ib(4): Fix some typos in device messages - s/availible/available/ MFC after: 5 days --- sys/dev/mlx4/mlx4_core/mlx4_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx4/mlx4_core/mlx4_cmd.c b/sys/dev/mlx4/mlx4_core/mlx4_cmd.c index 45d06104448d..54256ab1e124 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_cmd.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_cmd.c @@ -1960,7 +1960,7 @@ static void mlx4_allocate_port_vpps(struct mlx4_dev *dev, int port) err = mlx4_ALLOCATE_VPP_get(dev, port, &availible_vpp, vpp_param); if (err) { - mlx4_info(dev, "Failed query availible VPPs\n"); + mlx4_info(dev, "Failed query available VPPs\n"); return; } @@ -1982,12 +1982,12 @@ static void mlx4_allocate_port_vpps(struct mlx4_dev *dev, int port) /* Query actual allocated VPP, just to make sure */ err = mlx4_ALLOCATE_VPP_get(dev, port, &availible_vpp, vpp_param); if (err) { - mlx4_info(dev, "Failed query availible VPPs\n"); + mlx4_info(dev, "Failed query available VPPs\n"); return; } port_qos->num_of_qos_vfs = num_vfs; - mlx4_dbg(dev, "Port %d Availible VPPs %d\n", port, availible_vpp); + mlx4_dbg(dev, "Port %d Available VPPs %d\n", port, availible_vpp); for (i = 0; i < MLX4_NUM_UP; i++) mlx4_dbg(dev, "Port %d UP %d Allocated %d VPPs\n", port, i, @@ -2884,7 +2884,7 @@ static int mlx4_set_vport_qos(struct mlx4_priv *priv, int slave, int port, memset(vpp_qos, 0, sizeof(struct mlx4_vport_qos_param) * MLX4_NUM_UP); if (slave > port_qos->num_of_qos_vfs) { - mlx4_info(dev, "No availible VPP resources for this VF\n"); + mlx4_info(dev, "No available VPP resources for this VF\n"); return -EINVAL; } From nobody Wed Feb 5 10:33:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YnxR25Cssz5mY0n; Wed, 05 Feb 2025 10:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnxR24TwPz3jqt; Wed, 05 Feb 2025 10:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738751614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dj6hBLONiaERH6IslDU8zl5yO8NFNUiPWV/i9eTr1Is=; b=l2b9lipD8p+W4SMaPfo04GVgpoLVKqORAITXPRXdsxq++htC6tH74gEoSR/t4KohAp6EFn Ac1f0ZvH+lhe9DDhMWNu6P2zhMb6i1ZkGwZTQtYQ41/BbPHO5ekoxt2DKCtynsEG7AZmCI VCdX3+5C49Ci4CJI2RUsrJd4t507qSkOzIoboh0OGAPjxlVVwbCN1kOLjUXy102P72RjUw mx7bDGtB4+DJSaifJGTUkEwRfqfbZucyPi03zMMYJBvdJ8jAvmmYDKQCSry3zfYzqsrnsX Ah9lKb1zzoJG25AIimYJ5dEzu1dx+grvr81NuuaNaLZ4h9pQCJpGUqzhJGhcLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738751614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dj6hBLONiaERH6IslDU8zl5yO8NFNUiPWV/i9eTr1Is=; b=UOmkgNVr0+06FBKuIO8qHaJV+6gj3ldByFCeqN9buqp0W/UQmKlfwnwL0+Mf+UXCIzlU0S sIZbLLewYMdNohchwc0L5Tq1VNf2BAw7xwoKwwmzcRS7ckp3hOHL02fEh2a80n7Otx5Wpc bqpJVkfcyFwlztcATY5Rn4vkiCVuzzKAZFeaWFzfHKjy4h/LQ9BJh/sOBgmtbGxiHghkro J0qi3W/wlWvkR7FCFt5kHloyIdZPG6AmmS39esVIPTnWR50OqSeSw4mku1mK+vEg/0dtDU CNSKoJB6c3ybt4G6Ecx8b+fHATtU4IEO2AwkO3bar9OqBmWtzSK7oG31w0HdpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738751614; a=rsa-sha256; cv=none; b=IwRvPiCZgcjbpyOjnw8StV63yOwc6DGKZeJ5q5pACQYEYFkF/HbEF1yHtbhymsatUEPndt LE2KbJSFtm6mejwrcH315O4luKVFf9xNHUf33V43UCmrIF0pxwO9vH00xRCIheEG68r0On xiphLar9W+WxU5uGV/KrFRL9U7mYCg/KPKM1E8beJYMnMmtQ7Fukph10flbFy86nFqarw5 cV9/0Y+ZKWXcPtO55zhm8/TSxnhgtE8apBbmshNsHSDSn0bxSVAY9JxqCgg8kGWIN1kgA3 2ejJAiMrcBUkUyiY1cTLCdGHhyMdOqtT/A6IMVxtGk2wkBuSM+nx838xCsqMbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YnxR23pgxzpWt; Wed, 05 Feb 2025 10:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 515AXYUf037651; Wed, 5 Feb 2025 10:33:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 515AXYxr037647; Wed, 5 Feb 2025 10:33:34 GMT (envelope-from git) Date: Wed, 5 Feb 2025 10:33:34 GMT Message-Id: <202502051033.515AXYxr037647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e917958c3667 - main - rtld: clear any holes in the struct utrace_rtld passed to kernel logger List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e917958c36670131ab42e8f2c849b708a3216e37 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e917958c36670131ab42e8f2c849b708a3216e37 commit e917958c36670131ab42e8f2c849b708a3216e37 Author: Konstantin Belousov AuthorDate: 2025-02-04 22:33:11 +0000 Commit: Konstantin Belousov CommitDate: 2025-02-05 10:33:29 +0000 rtld: clear any holes in the struct utrace_rtld passed to kernel logger This should avoid an (almost) false positive from Valgrind, by filling the padding on LP64. PR: 284563 Reported by: Paul Floyd Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48854 --- libexec/rtld-elf/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 169ec0200ea5..aab20407b00d 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -337,14 +337,14 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, struct utrace_rtld ut; static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + memset(&ut, 0, sizeof(ut)); /* clear holes */ memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig)); ut.event = event; ut.handle = handle; ut.mapbase = mapbase; ut.mapsize = mapsize; ut.refcnt = refcnt; - bzero(ut.name, sizeof(ut.name)); - if (name) + if (name != NULL) strlcpy(ut.name, name, sizeof(ut.name)); utrace(&ut, sizeof(ut)); } From nobody Wed Feb 5 13:55:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yp1wH5hvxz5mnqJ; Wed, 05 Feb 2025 13:55: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yp1wH4sdjz3NlL; Wed, 05 Feb 2025 13:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738763743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvRuhrG3Lt5D5mqYhk85GIJ6eLx9CKsjQfFloCGJ/N0=; b=wmm7RD8tSfLXGmj/0hiTJadnkFoFRbnYu8bho7DocdDXOEPBUxwkH7+S34YeXia8mNyzuO g2RyNGC1xTBzTHaMtVHP3zOCoMfQDEvsbXgxrmtqM7KgDZSVzY5plcnEIPXlg57v1OoUti VM4UAG2M/6uH/A96cqE2PrfubVrnpvFYJOad1cgMmSH2VML443JD6sgCzHCy4OGP+NpUK0 Ma0P2sRzUHFt4mH2Fhkus0rFWuntEzUtK2Y6WjfL5uIrPvz1KPNxJ2chvLMXQSpa3QS/Zk HXLfSPOLyVNue74bPepbhbxQDnwm7iw+Rw8TU9H2F1CGREhNyfK+0VHBeVSdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738763743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvRuhrG3Lt5D5mqYhk85GIJ6eLx9CKsjQfFloCGJ/N0=; b=P5gFKIks9qCkarIsxSYVVKhGDAH8sfBltC7upDJaYcJtgNxks8dkoYPA8+wzJgtVEbz/8K zF4NMVGGoy8zUCgOS2XqRvTpXhY0F3Nf+65iG8tLuXGy8n9tJRGfnwm22nZsePQjHjwM8L A/jT2pd5vrckOm8Mo8dhMBMzpEby9txL3T8rErTf0Fc3YKS6mPJy9C+ymyuiT00LjuSwm+ CU/4xko2c/74HfxqskKAXRBxWE6TJKFur/Kb1C/YSbaO+oNGYOam38BqNXPCfzDso1hhmb lJoSXZrzDEtyISpbDlwcrl44mT0H1PLYViY++3WQw+7km9xDtSUfFYpha9chag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738763743; a=rsa-sha256; cv=none; b=qWg7VVVzv1hOidu6jH7bQxXfbFB34WDKyu3C/8i+7rCd15L36RVgQF1XhXVBh67oe39r6y 0U/B89eh4nhjYZecf00xzneyAg82oKEwCa2xgre0ISioai13JWTmPpIoJiD7ePJBwiK9ss sikwVEayPXYnQmWp3Iciuugxdj2o8NYwNXW8e66rgVEh0VH/GSFVMiN2lQFcPNSSEB4ReH Ii0yarKlNH8q6Fq5OT3R9pccfFKv9baXqI4Jma7/MhFr9VdVB93cHjF1H4pLE8A+zXAqAG D/43ilZaGpxinfllyEL17B4yoj9ma/SdoOgykjPdAkgWx8OhXlhUxjZce3x2VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yp1wH48hnzvgC; Wed, 05 Feb 2025 13:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 515DthFT012959; Wed, 5 Feb 2025 13:55:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 515DthVT012956; Wed, 5 Feb 2025 13:55:43 GMT (envelope-from git) Date: Wed, 5 Feb 2025 13:55:43 GMT Message-Id: <202502051355.515DthVT012956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6180d0382df2 - main - Cirrus-CI: Check for final "Uptime" message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6180d0382df2a7537e0ef7e33b18058f30329e8e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6180d0382df2a7537e0ef7e33b18058f30329e8e commit 6180d0382df2a7537e0ef7e33b18058f30329e8e Author: Ed Maste AuthorDate: 2025-02-03 18:09:23 +0000 Commit: Ed Maste CommitDate: 2025-02-05 13:54:02 +0000 Cirrus-CI: Check for final "Uptime" message The last thing printed by the kernel after shutdown is Uptime: