From nobody Mon Sep 30 04:45:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m03pzfz5Xk0V; Mon, 30 Sep 2024 04:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m03HQcz4DRq; Mon, 30 Sep 2024 04:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AMOee11tFqrnYmQZV8PQ+Gj4PQILUVeqid+1XAwG+E=; b=IcCSwWM3pyitazZdAjQAhnYNT6/48jk4m80Ucqd0QaEoHoU5tYzBpD9VutpT75UwAKYkOP XwqmqB3QXhOMXH+9Aw7JYuV5uaDAoynp5F9KJ/960yARHY4+M1iM6jkciAGse0iLI2eVfb nRuOACExYO3tQYs8LXOHk2D8Wk5THCsZRdTYOBcCPV6sQlwNY5N6fjvOLghG3Ux8H73tzE 4ePJkNrmEv8NS/IPayi9Y34OaC/8VP/qqPKu1/ynFVd6E4yv/8l+rmfBhZ29+hkZHFpOn0 dERQ3O9XOkFr1D7ffgL0q+3bVZrhzKu0C53vsr/bSbBcbmTRTNnD5fyB5Y1b1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AMOee11tFqrnYmQZV8PQ+Gj4PQILUVeqid+1XAwG+E=; b=GnteQmDCKcwHkuQXgJo980EdmC3bw1m3nxAnmWFMSHE3Kfs47TmtB+r67b7Y5geKfAo5XO 0DINmnpuWSRa2R0D0P8JdZ6/SBaFdXdyhP+in+YpkcdYIlytAg0sJYT8LEVfnCexSJXM0B gKEzMitpY+qkoxqPeaFJeIoVSvW8TAvtXieWV+iypl8fb/IMPCuw9SPgBBkUJ2fleKUM8J WXYh7UQAgNRDabhubFBZa7x8p9y+OYJCo9yyMsiE9iYsw5WK14YtnBdcNHZ2Hv/siq5M4d 7hnlWtTpGyTZTcv9z+6oQWdl9aguQwDp6ai8tgbhS68pzigCgvMQJmKE5udQXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671504; a=rsa-sha256; cv=none; b=DPZLsI4WhjoVluE4pXAUQ8YPGkNU16BVyj7/YBe5slc3Sa/UdIsSmzMSTODR4AMozrUulw id4FqrAZFuSi+Gs+aCHQvuzPe722C798zKVrfXWldoVH41FmwQF7heSKvRqsWfQzXo5MbX XczELcpL3XYfUKkf0aXoPfAGONeLKAd+f5qpnii0lsjtPqmLsYkoJKLICR3O8Kf0zNL0cb 34MnKVhQfeibFZSqKepMTdUFN/8kKoQetp0iM5Nk3FOAn547ykasBbiPnqrtzQKk9DZXtc 12A8QJD+TdIJtmIsfRfTBLW8LqQXByrCy0/GADmA8yaYCMub2XSIGdNyS6U6AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m02qqdzfbg; Mon, 30 Sep 2024 04:45:04 +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 48U4j4Oe086004; Mon, 30 Sep 2024 04:45:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j48i086001; Mon, 30 Sep 2024 04:45:04 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:04 GMT Message-Id: <202409300445.48U4j48i086001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fbaf48065115 - stable/14 - kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fbaf4806511522cdcac7eda3bd5fbcc4b2e2f15c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fbaf4806511522cdcac7eda3bd5fbcc4b2e2f15c commit fbaf4806511522cdcac7eda3bd5fbcc4b2e2f15c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:16 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:13 +0000 kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) `fp_malloc` is defined as a macro that redirects to `malloc`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6a2a385507c79abaa9db9eabfdd827362f3dc7ed) --- sys/kern/kern_fail.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index f60500b22ef4..2c362b68f24b 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -479,11 +479,10 @@ fail_point_init(struct fail_point *fp, const char *fmt, ...) /* Allocate the name and fill it in. */ name = fp_malloc(n + 1, M_WAITOK); - if (name != NULL) { - va_start(ap, fmt); - vsnprintf(name, n + 1, fmt, ap); - va_end(ap); - } + va_start(ap, fmt); + vsnprintf(name, n + 1, fmt, ap); + va_end(ap); + fp->fp_name = name; fp->fp_location = ""; fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME; From nobody Mon Sep 30 04:45:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m15H9yz5Xjp5; Mon, 30 Sep 2024 04:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m14cf6z4Dg4; Mon, 30 Sep 2024 04:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PyHJS/wkYeAwXSUNSVteFx0+AtjSxGA6vC6mHsFrZOE=; b=JSyZNXXn51X5VA3w4EON7hov9fuwfF4iuXNDmzL/OxXas8TpkbYKjAhEu4xbSBpE31Gu7J XoSX4YpQFpUaVCg76qQsd7feDAMJlE0k97YrMLgZF6nICbgfMupzja3NrlpUJ9GnJhTkEX c3Yj22HfKvLgRpbSrDpjiqhqViQnL9MGSCeo40bMS0wDe71ysYoXnJHDIO69DHAxTu9br7 /OxeeNiY3C6Rl4ZbW6KwEfYDNgWRcnA+3+aIok1MQIAHJzxzHQ14vaHNCtYGxPnHidJtpG 0xPRwNu8rl63kMHNZVEMEPC0tGzkzx4HO0te/eJiO+IZsM7MbMZFlYmWbyugog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PyHJS/wkYeAwXSUNSVteFx0+AtjSxGA6vC6mHsFrZOE=; b=Of/B9+s2+xjPMDvjWZleL8ZIDmIvgK2Q2vnyO/0dyOLJtGO2b8TSaB7P3PaOjl30IBUiXD XZycJhrXToCx30+h5MhxkJhVisFCAXthneuzNAefAAy34mPLx32epfMWxWn/CcTZss3heQ yILG54RYAy4ApSy0cjr+1nVQw4RRwws/gXi8m83sEH2yml57jpcVruUB0/afrM/6UmY62x B+OQG1LXHOY5RZEVcUanFsGIwEKJIRXjYyQs786XvnG8HS1ZHA41+jsnGzJcDsSKtOhfZh 0rp53BgV6jG8tTSP97wzR9oTUUPpa22et312cqTOrjMHANcnztup8AfLZ6AZow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671505; a=rsa-sha256; cv=none; b=Qb9Ugab6j9cJB/jPBjNl9chJ0q8GYZRH05lzwzy1jgjTf7J425qEWB++mD8+dpv4TTRnbR GqcAgKWdGK7Das6XCBOdciUBKAbFfrnK7TZ2s7lC7HTA6nk4ly1mf1tQiJe77ST7dXSet7 lTDLiMJjuA/QpxPvH1xf8jdM8Q5lQWXUeE5fdWa6M9ptkCmS3YFt+zPxzxw+3gZKZNP17F fK+WJeLLKBdQcwSPVPvMfb/7UePlZ+JsTlfcrja/icxBfueM4HH2m9YJcJL8UU+iYDej3M zhmTbUjlrhF2OBXnnwtlyPCsxjYXzZiPIxg1zjCPzXHKrGCvtc/FUoTtPSKHrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m147VHzf28; Mon, 30 Sep 2024 04:45:05 +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 48U4j55i086052; Mon, 30 Sep 2024 04:45:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j56W086049; Mon, 30 Sep 2024 04:45:05 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:05 GMT Message-Id: <202409300445.48U4j56W086049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ab314540193e - stable/14 - boottrace: Stop checking for failures from realloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab314540193e75983ceb363b18433ce405d943e6 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ab314540193e75983ceb363b18433ce405d943e6 commit ab314540193e75983ceb363b18433ce405d943e6 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:17 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:13 +0000 boottrace: Stop checking for failures from realloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit f444db950e877596805aed897c3fbb975be28711) --- sys/kern/kern_boottrace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c index 1b097e7378ad..5516f3160587 100644 --- a/sys/kern/kern_boottrace.c +++ b/sys/kern/kern_boottrace.c @@ -561,9 +561,6 @@ boottrace_resize(u_int newsize) } rt.table = realloc(rt.table, newsize * sizeof(struct bt_event), M_BOOTTRACE, M_WAITOK | M_ZERO); - if (rt.table == NULL) - return (ENOMEM); - rt.size = newsize; boottrace_reset("boottrace_resize"); return (0); From nobody Mon Sep 30 04:45:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m2707wz5Xk2D; Mon, 30 Sep 2024 04:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m25X8Kz4DdG; Mon, 30 Sep 2024 04:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3QxlFx+x+siIWvd27eRI0N4qhy83fW8DnRtgs05So3o=; b=AcKrVs9bT+CGRWCkWCX3Wsl3h2jV+spsN7brrf4UcgCPc1DXpwuKUOgePXzHDraD4ukdzQ o/yaIkdjSh94g19SGmHsZtbWv/werJGfyXgn6iZ0+zli3Nka4NscsHeCE8rAEMx+jZiAw1 uTYLeM2uBgdz1aBceWquvMIY1ES6FzByJibfRMsZ0OXFBErA3HJWhyWJAYp5G7AgoA8+rz kGpeDbUIq2X206VVa0m4Ystdanl5iWfgGXJe7d+OBsXdn/G9/8Mx7M/qZuhsViHqB5/BWP MCA/DCekqfnRtl6cjzOfrooV1HQSyd2KAohHyN6+tsx182qtlMq6u0sOQ4wIyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3QxlFx+x+siIWvd27eRI0N4qhy83fW8DnRtgs05So3o=; b=RyzLki9JmrfWHVsvzl+JhKHedKRPsMcp5WnCUZ8lz3FhEALN58yNkzLBY2iNDfDYRXRhRI Owak/gzrmsKLAYhmZWFyBggwG98kFRMGVn/ZpESI72qWRnrImFERQ0cpPRLoksHUGfnewe mYnf6gkS4Ulxmv5yEZYOGLxbwRNXAMvVlvha0RXzYoVEXiEiXiC0+oQex4hAYKZdED07Jm uzL5XQ+xDqr6f30CS4Xqksd+L+uv1jzRO66ZyGPNcyWGF/NUVf2zjWMZ9kjsyna7BoSuOS ybRBw3FBujl3ZTMOrSH1LZCN9EoeUb3LwyENJFGq2VAsxaLybJo8vNgYciugcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671506; a=rsa-sha256; cv=none; b=BHnPbYSqB+EiEDBVcxMgyM+nk5QnspmphJ+JhQYb67syNinZd1NliQXij+FUbL9pJ7Hn5O 8Kf6sRg9xnhOOHGU+2sy/Jq6toMitRHV+zXjYN7KDez61XRZizCYHVynQhsJ6HJl2hq+DF qxhKOsHVOxFqhK+0v3lOo2u0YPQRfnEjNqWf0eO+yletvrb6jFTto7EZVjzkMXPhSxCUg/ QwKDHfcm1kCuNPRciDZUo8QwQo6S55UbNlRJRPOWX2lEzyQ8UH0EoDFFUFOhvW9EiI7UKV 2cgiu0NYUf6WMyibnGeF0tIIokgSthUhPTHRBxc1dxAea4yITPdaRyX6m1zQBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m258P8zf9P; Mon, 30 Sep 2024 04:45:06 +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 48U4j6Jo086111; Mon, 30 Sep 2024 04:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j6ae086108; Mon, 30 Sep 2024 04:45:06 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:06 GMT Message-Id: <202409300445.48U4j6ae086108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 44a6f9c9a0b5 - stable/14 - subr_bus: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 44a6f9c9a0b503f70fb7f1d44bd75a8f68c4833f Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=44a6f9c9a0b503f70fb7f1d44bd75a8f68c4833f commit 44a6f9c9a0b503f70fb7f1d44bd75a8f68c4833f Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:17 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:14 +0000 subr_bus: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 99e3bb555cb1ef5572de54be0ffed2aa6fc080cd) --- sys/kern/subr_bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 38c646593a85..5965b8941b54 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5395,8 +5395,6 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) * Populate the return item, careful not to overflow the buffer. */ udev = malloc(sizeof(*udev), M_BUS, M_WAITOK | M_ZERO); - if (udev == NULL) - return (ENOMEM); udev->dv_handle = (uintptr_t)dev; udev->dv_parent = (uintptr_t)dev->parent; udev->dv_devflags = dev->devflags; From nobody Mon Sep 30 04:45:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m40WQfz5XkK9; Mon, 30 Sep 2024 04:45: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 4XH7m36ZNCz4DXp; Mon, 30 Sep 2024 04:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uHJp2Mi+0Lymgi3kOczBoKj+PtooZ2HRo8FSk7VNZ2w=; b=xVjdMCoJtSwiYjm9/PiBNfMiYO/0cE9tY+aAJuZNFyJpPK3ZuNUsE3/rEgltuSOQdQCpu0 j22QMMpiIFOyW8jiNaWkF1N9heZqL4prEHRl5t34jYFS1b86oX//XadU3/Ixt+Dosg2zwT 2bo9x+kE6ggyDWzVFXBiJGDu3LPvgfGC5/hZ7t2IBahVfMLwmZkFaUjndJvK9qOV0vmcFs xgX4XMfnR2eLanYAzjdp2tbPgO6Xx8J515wyki23rdZn3UgYw5+/0GIlceLXdoAhYPGXHO doirLyrWPnQKV+ZNkoh9xMRqW1RZCYwKcS+T8wMb3iHk0p7D1dio0Xz9dsbQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uHJp2Mi+0Lymgi3kOczBoKj+PtooZ2HRo8FSk7VNZ2w=; b=IIfoeALtY6m8tzKrweDCG0kU33VeoaoExchVJixkyFdKHQteHsA6yNmbd9g+xkvila9ErV o28qQAI2Yo3JDOXL9OopzaL5hDQL5E9R2rovQuLjPjLqX9F3/XHYeBIkbZiuoJDwaCCp6o hqZrMyw/gH0hNNEKkX/DlIF1rC5w2Ccr30PIIhBet4DUMJr9KGQ6/U+0P4XyrWOJxnQYTT JG0t2PscQb7pog9ELvVKoZh7OGjZOvcABps6iYm3PieNbj+RrepO0uoJtI3VsOe7X9bgPv Y5HugHmd5kO+c7Dqj2cptz1yTSFxzAJKyIgESFHQZB8+JvMwQ52m4Li6kjVnvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671507; a=rsa-sha256; cv=none; b=W2OXin20qkK+8QZyzyuOjxm75KniSZeCcxkJEtmMoFVkAf2yVglzJNK3a0fby81qfP/6ru ckDAvyj+MwA2FTZgf5Oqp+oPA1RhibeegZZtb0X8fILZiOZ5DFDbdJa5khbsjB6/kUoN7u OtBRvtcDUPE7eHo+JYMngSDT3JVvy5YvzBqqpyk9PLJoGWJmpQlXyDa85RKUdOTEwyg5KR 42+N7qdqwyHotASokasdnFg/8ph3Hh/gE3rYFr291nI23P7D3D/iaWHKXTd/vORK+S26YB zyttvo/jIIBqAL5j+unuqmUQ/ArhWzCHYNmA1SsPq+DMrP3713DOD7uNcH+7Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m35pJDzfFp; Mon, 30 Sep 2024 04:45: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 48U4j79a086164; Mon, 30 Sep 2024 04:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j7Uj086161; Mon, 30 Sep 2024 04:45:07 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:07 GMT Message-Id: <202409300445.48U4j7Uj086161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d2d4758456aa - stable/14 - ctl: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d2d4758456aa89863ee615dbe1516a01c1fa83b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d2d4758456aa89863ee615dbe1516a01c1fa83b9 commit d2d4758456aa89863ee615dbe1516a01c1fa83b9 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:18 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:14 +0000 ctl: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 8e6dd4185871cd9b785869178ab2191a0d6c0b53) --- sys/cam/ctl/ctl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 9a99823a5c1c..de759f81bc86 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -2711,12 +2711,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, } entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO); - if (entries == NULL) { - printf("%s: could not allocate %d bytes for OOA " - "dump\n", __func__, ooa_hdr->alloc_len); - retval = ENOMEM; - break; - } mtx_lock(&softc->ctl_lock); if ((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0 && From nobody Mon Sep 30 04:45:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m51rbhz5Xk0Y; Mon, 30 Sep 2024 04:45: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 4XH7m509xXz4DSJ; Mon, 30 Sep 2024 04:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N18vKApKXkQZOlOtAy9ndyRBZPNqCsxjSP+GuTQerCo=; b=oaJh/0Hj80BTmCtTgVoOF4o6c6I7jThrRWyqTWoyQ7+aXvf45VBZNq2kiNgx9jGvJjihE8 ICfwVP5COdIvkIoWQLTsTCu49JY9EYOAVU93KzOxHJzCBeMmYeRHWMMxM7ZfaWUb0qNBfO Hx2qSn/xlkI708oIFzLraJkR3FayyxFb0744He8tIHNSQRp0DjptG0j7PouWS1/37GE/Vg 06xLBc8iVycl21qFu4XVjAwd55PYqZdwFviaddpLp2EHG5nDp0bn9d3vBZvx2b0TuZuRxi q24kiUhaPOijqER9jrL3Pq3wF8RQFh5/cu/SDgUqyxLwBuYUTzcezCSg6FRq2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N18vKApKXkQZOlOtAy9ndyRBZPNqCsxjSP+GuTQerCo=; b=LbCRD+t1Z2EABDgjTo9EJlM+1yz0yvyWo+JpF13wZPwyAk6T4h61PldtgYUYKdG9ENjBN6 sWP7MyNyYCaPX7L82VDQS81oCeHHYEI6ge7TYJ5R1iQCRqzVdMWvwxWacd3PrE39pXLiSa uSofthUQNgahSnxK1unNaig+EtKY0yIp7NJibNrSct4sDfZYn+W6Bdt/IXHTmQI4AcIqb/ N1h1N36fululuMQdvftAhXmg8f9UYEVkpDqJS816Yu/+VRidDLjrHbKXF5OBYxzsuVNAxK 567ndc2pUejxhpAr1NDMrMGZUqIyMODz6rYhi4/LWs9ya+teyTs9xj6RSOfqog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671509; a=rsa-sha256; cv=none; b=nw9sBuFKDCiyjwkQ/KWwTjDMImqTEXv3KT6RvD6SWdvt69oxQSLECKq778mbZQ7c1sphrJ kDNN3KR9Q16/k0vjLd4Hctn0D68eSNRWoONSp0fdX/YOK5doJhPIQi0oIvFZNsmddL+8Zo /elyvpAxba8w14rpC9Vsu0SVVtUwH5CZTdYANJIiHDOoXHQ1a2G3HrzyVDzu1DvcGrWhD0 udKhd4vHWpp1TOlvvcGMjbeA1qXYEGzv0TQN5j2j/Lhs/CBQhIxBDbrR/TsUW5QiGaYtln Qluk4rKB3O3pCgx3d12ojDOw9c72LnLtbLd6mAARTUYqdArZGOSqJEt2NeAKtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m46ngGzdwJ; Mon, 30 Sep 2024 04:45:08 +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 48U4j8c1086212; Mon, 30 Sep 2024 04:45:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j8GS086209; Mon, 30 Sep 2024 04:45:08 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:08 GMT Message-Id: <202409300445.48U4j8GS086209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a77e68b0148d - stable/14 - udf: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a77e68b0148d5224a64740c2cb7b25b1efc55335 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a77e68b0148d5224a64740c2cb7b25b1efc55335 commit a77e68b0148d5224a64740c2cb7b25b1efc55335 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:18 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:15 +0000 udf: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 3feb35dc465a8247d70e50792680c230954ef1c1) --- sys/fs/udf/udf_vnops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index f230ca0c72fa..98a779280690 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -800,8 +800,6 @@ udf_readdir(struct vop_readdir_args *a) */ ncookies = uio->uio_resid / 8; cookies = malloc(sizeof(*cookies) * ncookies, M_TEMP, M_WAITOK); - if (cookies == NULL) - return (ENOMEM); uiodir.ncookies = ncookies; uiodir.cookies = cookies; uiodir.acookies = 0; From nobody Mon Sep 30 04:45:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m642f7z5Xjwt; Mon, 30 Sep 2024 04:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m619PJz4Df5; Mon, 30 Sep 2024 04:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boZvgMY/J+hXFIbp4H5pdYbqjri9Ip4anhZn/Bkdxz8=; b=LyBhuFgzx2HssoTLk9xrsX4fQg3GlgG+E/RqQcLdC4xjAJNgvN6VhvCynfHGSdSK6WIOG6 vax1JelrhXna03LfCi3jssMk0KOMfoXdeR4sdEGhIhFVpRDv/bEPwfsUJqUvF7/cv0PIA4 EvtrVXMxaWkqm167Ri62TCOSA93aNbio0Xr34fVM9HxPVtb+c5N3Cad5pOacY5/UqmJk/k EVnkt2uximi1z1KAfKQsf/Moad8w8sE1U9VqhRYTsCCY2uNpCZ7woZBxIKfslo2l4X2GYv YiMansxefV70MdnLvQVS8NzYpQiu5IDKPb94UKcKxtjsadygnsvb6o1sbSO3hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boZvgMY/J+hXFIbp4H5pdYbqjri9Ip4anhZn/Bkdxz8=; b=hAgiaPTelN5t3OGzHR4MJ6cw7B1AQyEfINiI9oYk0pSYRwjQ7rvWBMYLCyWN0GNSbAMbL+ 22O8dlTF64n41R+PkmXVsFXegiwwUlEQJCIK+h1Xj1bKC5Vl7V8Ih9BbABPQOPxzx6GPLu NrV15JU5C3hyMWy3bMYIy/jt9LmoetttK1j2BnmxLUACHddOZ1Na62rX4MSTgpND4Klsc4 0EiAsS67NBMh3epAqLlTTY8YhGRZwBvN2xlFtvBuPhPuPbax4WmP8xMg3WIWTT5+Edypbm pPspb0yWN8OH3+wmyZRDiTZ6tt80coN1VVef4UKsg/P8TUTxvQfN8oIIxdQsZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671510; a=rsa-sha256; cv=none; b=OagG4DhYMn/0WSgrMpOLPVITyQZN5PHCkZkg049IonjJLLOgYZX0P86Z36wNXmWXhN1oqw kNajYzsUsjGdmUlvbJX1W6dy/o29xRXcxGBvoYZWHILexk/z3ULBEj+v7b0suBbI03q+iF kuOSjw9RqlVlRDpBDFGrfSuVmYnQoywflMQJeJPtshk5T7ZxDdoPDERjCS/YgWKWNsWznZ cU8nUXYDXvvlzcmAVtYE0AoDoJNay6UB4uiF2FqHQg9LTRDFaG7CTEpsWZNxFJ40AInySw RXc85VsKYQ9WyZrkatJ0WKabbpwUpm8IbwC41p5oAsJxhEMl3cNhVvHN1VnejA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m60fDRzf29; Mon, 30 Sep 2024 04:45:10 +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 48U4j9Mo086260; Mon, 30 Sep 2024 04:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j9kU086257; Mon, 30 Sep 2024 04:45:09 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:09 GMT Message-Id: <202409300445.48U4j9kU086257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 891fdd020a68 - stable/14 - altq: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 891fdd020a6826eb98d30284f78000e666f9a263 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=891fdd020a6826eb98d30284f78000e666f9a263 commit 891fdd020a6826eb98d30284f78000e666f9a263 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:15 +0000 altq: Stop checking for failures from malloc(M_WAITOK) While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 2a119886630bb5fe8283e20db5acb7c0cdba31c3) --- sys/net/altq/altq_subr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 3ade724818dd..534841289611 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -1327,12 +1327,7 @@ acc_add_filter(classifier, filter, class, phandle) return (EINVAL); #endif - afp = malloc(sizeof(struct acc_filter), - M_DEVBUF, M_WAITOK); - if (afp == NULL) - return (ENOMEM); - bzero(afp, sizeof(struct acc_filter)); - + afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO); afp->f_filter = *filter; afp->f_class = class; From nobody Mon Sep 30 04:45:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m74S3cz5XkKH; Mon, 30 Sep 2024 04:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m72Fkyz4DkQ; Mon, 30 Sep 2024 04:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMQxlmdjk8A8Z6Ds4gvEu5q0jMENClFZ2kzKaQOuv+k=; b=Nlo9TI4e64WFh47WGnDZCjubxDhsZfHDzLwWF60hc1VVZPw8tVC47TPChcxRql6G5koM7N 4xzlWfu0n87UiEknwoYdX00J+6yjbgb0b1AqJotfd1gyRRFP8eETM/e4s2htCzGhJE1eYq ZAbCyw8mWuKYSx2WKdqvZvj9+U5kb3u7wM6GZLp+ap+HR73wJornrocgaTleoxNAA+xO4n Pq6hW7BWRuSziq0HwpxQLtIXrzU6mecq2IshpVp1qjiXW6ZGvS82obzfIa7tN8czu8Sn9Y NZRAMwTbsHzr7DA8xNNS5eOCLXy1kWCHxYBOojGfMLV7nM7v+fRTiKS8+TE8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMQxlmdjk8A8Z6Ds4gvEu5q0jMENClFZ2kzKaQOuv+k=; b=dj1wzpy4JOuoZ2umnqvrIZwtU08YzdTQSoko56H6c0B3Evi5nWeh7dWf+OHtBkBIQSd1Na nZ9e6et68rLywmMR2ShLP09Ohz2TnGE1/6kTT5XNAF0QgWxsPGtgaTMfAKdxa1E8qRRF8Z CCM4SWrgG3gtv1g8R+zLfHYcEROTGvnUydfF2BmpVVafIuEc9tbuPbd+LsG3K1vhX7ivEz ZtsYMb4YuZA/D1Wz5l6YJpwHiVJRJaeMPT4RlcMoXHfGnHdVwR0Mi2II1nFsaXv2x6rjor SOoS/a741FeLtJWdqGriBkiYnJjY4U+FVkTqyXvsd5OxY+sR8R3rzbhzYZyf2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671511; a=rsa-sha256; cv=none; b=qzSuNYeFOSWOFf0KVvyrhSzY2jCUbe6QPlRKkI6FkkvxjUbww0d260L26K0UvSFO7LQk7u 25VLlNfvJmdvu4QkOa4+qscVMPtaqd2+vmbtU4s8q7WFiuFHMWis1s+RDhPmWGUfjpsxnc By8YlpF1DkSdQCqn6ngzJQDc1iIy2zd01TchtqXNMk26CUgIVygan0FzbSrsKHixbDZUln WWTMCeu9HQqDUXMn4eCx1jluwWwwEg++phhUJUtzow6c+Y8VdilmtUxcjPEyCtJTt+y95o IRKQ0xcRwhh7iGYHezjpJpJ1KmDRwQm4mL/C3haE15wnr+IEblV4fEpXS57FpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m71kTBzf2B; Mon, 30 Sep 2024 04:45:11 +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 48U4jB1i086309; Mon, 30 Sep 2024 04:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jB64086306; Mon, 30 Sep 2024 04:45:11 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:11 GMT Message-Id: <202409300445.48U4jB64086306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 67971181687f - stable/14 - if_vlan: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 67971181687f0475dcf72b42d065364efea96251 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=67971181687f0475dcf72b42d065364efea96251 commit 67971181687f0475dcf72b42d065364efea96251 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:15 +0000 if_vlan: Stop checking for failures from malloc(M_WAITOK) Fixes: b08d611de835 fix vlan locking to permit sx acquisition in ioctl calls MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 07b16b1e2aeab0b30f68a013de31a4c322a61246) --- sys/net/if_vlan.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 59eb41956ad4..206d46e7f9be 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -508,11 +508,6 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch) return; hash2 = malloc(sizeof(struct ifvlanhead) * n2, M_VLAN, M_WAITOK); - if (hash2 == NULL) { - printf("%s: out of memory -- hash size not changed\n", - __func__); - return; /* We can live with the old hash table */ - } for (j = 0; j < n2; j++) CK_SLIST_INIT(&hash2[j]); for (i = 0; i < n; i++) From nobody Mon Sep 30 04:45:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7m90rbjz5XkGl; Mon, 30 Sep 2024 04:45: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 4XH7m84BTsz4Ds7; Mon, 30 Sep 2024 04:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQ080WfzmxQupCyrr6aR10smpDN5SrBZeVp5T3MFD0E=; b=Lr9MBfBGbosaEuF6HvQNUH6w+80e+yCXiOMx7GH2k7Iw27hK0sNbjTs0TZ/V2GS6yoXt0T Ytm92EO/nBe3uJ1Y/8fQrVw+k2LERi8feTIGNySLyGFvEjzj7uKTUC+yp0w6if7Odp414P zjT/1VFq9MzVcLHLBA7HWpggyaxsiBg8yxXm+IEQSnUA8pTa00UyfCAKcJ8KHDOmUfcoaE bejnHkIRoJJhx8hESD3xbtxkas10bOtAAGHrqzwVt9pSqGFzK2jXx3dfaaylEd3lt+SZ8y 2Z9nQuv+1RuTzVGCPGSb/HSwXuWYKNT6dL9BDbuNU2BKavORBG6iEwcJ7+P+4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQ080WfzmxQupCyrr6aR10smpDN5SrBZeVp5T3MFD0E=; b=ErZH5lNF5jA10KA5ops50g++elggK2Iv1BQHrON22WCOnokcHTVrRQPFoTKp1nInfGiYgu raJo91DHaQ4cT04sNe1pZF4B9Zjw2w1kFjsZ17D0T1v3jwSgta9CY+VDxOpmw+0M9Nmk3U ZHC+3Sfnm5dbBDI+gp/tAK/F0UxXHgIgfQ83VLKQWBQmQLe7jOQoIxhm6h6GRX3Wf9rt0X Xo6s7Tw0Py8vNrwZcq41SDmKM2B3EdNxBvm2/2wYY3vTj5fIGmP5Wl3qGYEhLpq3CYt4dJ gh34XnELJM7CXWr+IASZQm00VZPvGWmqMjZ+7KNux3ZC/7nJpCASY/8XT8bT7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671512; a=rsa-sha256; cv=none; b=WQ5KEWoI2JKLnVjX/YsJIDt/WfSEy2Do9FrDcPRFhERqUViv9afwX6B4ui/zhfGSTY/S+3 R/PGLV//LflmfYEWyGcTvbEjQvC+H7cOmywfNBC2ZE9iLcScvsyGPlBktiL8s08Zwli1CL 53gqUH0WL2S+bkzo08wuNHRjLfGkmSApOb7Q7LcaOtKqUiu27cGP8N2J2qyJnconwlc1yC 4oeYecUoAO09Cgd8DW1q4JDKci50IY2Wvv63eDzI6bCIBcKlKfMXDLyDcAizIsuX3xTrd7 /wiHbnYDDrby6L2SUzPnQykKxQo3cq/PX76HH08G3Xty0rtIyUnw9w+zQJmAVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m82tRZzf9Q; Mon, 30 Sep 2024 04:45: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 48U4jCWf086359; Mon, 30 Sep 2024 04:45:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jCfF086356; Mon, 30 Sep 2024 04:45:12 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:12 GMT Message-Id: <202409300445.48U4jCfF086356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a0c4498478f9 - stable/14 - pf: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a0c4498478f92f76e2d06a1d2ba49806156264e3 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a0c4498478f92f76e2d06a1d2ba49806156264e3 commit a0c4498478f92f76e2d06a1d2ba49806156264e3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:16 +0000 pf: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 5b00557330b3b69db84969e33f2e201288208dd9) --- sys/netpfil/pf/pf_ioctl.c | 32 -------------------------------- sys/netpfil/pf/pf_syncookies.c | 3 --- 2 files changed, 35 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 04369a1aa9bb..6cb7bc95df2b 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2670,9 +2670,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td /* Copy the request in */ packed = malloc(nv->len, M_NVLIST, M_WAITOK); - if (packed == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, packed, nv->len); if (error) ERROUT(error); @@ -2750,9 +2747,6 @@ DIOCGETETHRULES_error: ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -2850,9 +2844,6 @@ DIOCGETETHRULE_error: ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -2883,8 +2874,6 @@ DIOCGETETHRULE_error: } rule = malloc(sizeof(*rule), M_PFRULE, M_WAITOK); - if (rule == NULL) - ERROUT(ENOMEM); rule->timestamp = NULL; error = pf_nveth_rule_to_keth_rule(nvl, rule); @@ -2983,9 +2972,6 @@ DIOCADDETHRULE_error: ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -3061,9 +3047,6 @@ DIOCGETETHRULESETS_error: ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -3333,9 +3316,6 @@ DIOCADDRULENV_error: /* Copy the request in */ nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -6132,9 +6112,6 @@ pf_keepcounters(struct pfioc_nv *nv) ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -6258,9 +6235,6 @@ pf_killstates_nv(struct pfioc_nv *nv) ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -6316,9 +6290,6 @@ pf_clearstates_nv(struct pfioc_nv *nv) ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); @@ -6375,9 +6346,6 @@ pf_getstate(struct pfioc_nv *nv) ERROUT(ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - ERROUT(ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index c5ee64c6aed0..538ab1dfd94c 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -201,9 +201,6 @@ pf_set_syncookies(struct pfioc_nv *nv) return (ENOMEM); nvlpacked = malloc(nv->len, M_NVLIST, M_WAITOK); - if (nvlpacked == NULL) - return (ENOMEM); - error = copyin(nv->data, nvlpacked, nv->len); if (error) ERROUT(error); From nobody Mon Sep 30 04:45:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mB4TCMz5Xjv0; Mon, 30 Sep 2024 04:45: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 4XH7m94bjNz4Dxr; Mon, 30 Sep 2024 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuKNa0AGM5MlWxL1xCA2Gq4+WbhkNYbcFhyTmAz7HNg=; b=YBT0Nrwj5LZpca+6mhP8FhpP5jNcbCd767U14k3y1IMTZLcOika8gi6NELku2+3SGClHEn hRUInJVLdLL6b0ydbW682i8uE+4MshCxUHzArYQFkBVHHVczJawd0TVsYFafLSVWF/U+DN esa7Wx8yMhlkZNrtduncBtD3crOXOCHAcggpEBkwff9C8akz6i9GXtG56J0N/mRIkzxIJ2 W+5vaj9M3NcXFlsng3+xjPWgSYhScSP5SmOpjLEa38zvg+nn8SgVZTy1FSLKpv28MPfiGU 16IBr2k1v9rKXRSu+TE9Y4WOjre/hVuvs1QImEQfu79lAjGoP+1lx42rc8+VVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuKNa0AGM5MlWxL1xCA2Gq4+WbhkNYbcFhyTmAz7HNg=; b=m7hwHyTQ60EKBj2EylDXwFFzleWGQuBacLHNF49yXBeiB/jm/53XTN8DeQ2HIdwpI89eis u1d14Vldc+qnvPEbqHHnJ2rJepvaeFECOdzLyed3/uyYVmTbpDfZrIrH4yG9j8ZuDxItrh M26N1LRke5PYolvVCgP/3YUbjlmE68UOsPLre0eI/e5cZoMKVTyoHiBDf7muz8biwNFIsQ GlUftjjgPsdyiGa5nIg7IC1xDdnNr2h4S20lQRjbdUiP401sDp+4GKAjT7Qb0s0vad4SqM WrBOE6bhhrZ0ozDX3HLrP9WKSAwSRMhW2NPZbDwxTchXB+UT+NZRAL5dD1BR4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671513; a=rsa-sha256; cv=none; b=JMjBsMs7C+9ZrmA+xyYs51VPm4mpeZHKdbCEiUeqBtNoLFwQ+7omR7saiKetoSq4SnRi0U aOjusUuw0efgnlvrIFFNfEzKr8NLtCS0JUO4Bv79yJZzm6NPnnZHQCoUpk/Sc7oABeWI/v A9COFbM4FJEs/VnoyebQ87cr7aGLsZskvV5kVkgXZhwSqjHstcPlJRs0H9K9cXMzITZNVt Oa0xZAqNTVU8f6ec0LnVMfcgUx5Eij9ozTWmu3dCBashAPy6nLy9lpiOh+KG1Eh9mCHiqI EkLeKiNWUEXTTSm2dJqPYq3sNx6hK6I6b/p+x87NPtbF/rzfeVBabDBUtCLKfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m942JBzfFq; Mon, 30 Sep 2024 04:45: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 48U4jDqN086414; Mon, 30 Sep 2024 04:45:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jDgI086411; Mon, 30 Sep 2024 04:45:13 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:13 GMT Message-Id: <202409300445.48U4jDgI086411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ce708880847c - stable/14 - netsmb: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 commit ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:16 +0000 netsmb: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6e50988cf822f87a524b8da2fdc35b234078cc2f) --- sys/netsmb/smb_rq.c | 4 ---- sys/netsmb/smb_subr.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c index 71f6e221ace9..0170514f52ce 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -65,8 +65,6 @@ smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred, int error; rqp = malloc(sizeof(*rqp), M_SMBRQ, M_WAITOK); - if (rqp == NULL) - return ENOMEM; error = smb_rq_init(rqp, layer, cmd, scred); rqp->sr_flags |= SMBR_ALLOCED; if (error) { @@ -377,8 +375,6 @@ smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred, int error; t2p = malloc(sizeof(*t2p), M_SMBRQ, M_WAITOK); - if (t2p == NULL) - return ENOMEM; error = smb_t2_init(t2p, layer, setup, scred); t2p->t2_flags |= SMBT2_ALLOCED; if (error) { diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c index 8094f9593957..73961f7a8c81 100644 --- a/sys/netsmb/smb_subr.c +++ b/sys/netsmb/smb_subr.c @@ -150,8 +150,6 @@ smb_memdup(const void *umem, int len) if (len > 8 * 1024) return NULL; p = malloc(len, M_SMBSTR, M_WAITOK); - if (p == NULL) - return NULL; bcopy(umem, p, len); return p; } From nobody Mon Sep 30 04:45:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mC1Cd6z5XjpL; Mon, 30 Sep 2024 04:45: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 4XH7mB5dxTz4Dw7; Mon, 30 Sep 2024 04:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTAdvOqcQEjZFF1eahVyNuAheQvXWC+DH9WPauDc45E=; b=nPeJom4VAfD4hirO5QJOnsRvR5MAY9s/Gxh+v59gSJYpO+X/2KmqRN3fahzL4fITzlywIM nUZMbUVWPyjGIvZ1lVzpjj2g7OJeOnP+/wiYIbiYrvUElLoGnDLE5gynVkNOODaiyi8qWp 54KtumEelzluRn/rQoDMbLpWa+Uv1tzN6S6D0GaBFdQ4HA7fgQ9z66XJi86PdHugc1c0Zf vBOA6k83ESGg8PPQGHFj1WaZAS662oZqre0j+aDLTcZyknh/XgaTXBiN4z2Wv82sYCWg2G D7gsrV7NisgPYBw7RwcjJZM4taXc/sYyl0q9CyIcj/apXPq1Mt14cDhELAputw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTAdvOqcQEjZFF1eahVyNuAheQvXWC+DH9WPauDc45E=; b=Ky/ylhvxyGbMXcglYEq9zP7LBfqr1DW1Y2b1qx2G/IuvJxmioVIWw+HKj9p6W6Qpa4IgbP vKW76HLM3j0IYlYffuPVYLeI/kT8svLqem6yiYU8xv8fMr5c52tJtBooDcuy3xaW7n8oY3 wFRhrd7/D+DXjsceyUgMJB9siyFF5xeMB5whN3yumqUdW6abjYBiJdym1xzUiSEys+DSbd z9Xes4wHPLS5wXMyplnRBXnpqqD4FqmkUst673SAWsSTO45JtJ90zrF/BF1hWIg4ALAJa1 8Y6a1ILYoZyodTWUPTCiIlaNxp4Pd4+Q3X/MNyA47DLpPOOcfc+ZiAKXkxzK6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671514; a=rsa-sha256; cv=none; b=yJRSc5KzvQ1EvHse1WtD5og6KS7ue7y2OhmSCXtViZlS9I3RIZI7NlBWyunAa2Qt0S4vK2 jtPvbHw7TgL6YT7SD8Q9l6VCKPXR6qyewoOPhwXG2QjrTDnMd6xDyfquz/OKtSFgCbPb03 J6jMnka/ehiXbnodqyUulybFcEtCw7cylq9M0IuK1Pf6TqNGpFl5F1fLO3COAfuTMXOwnm d1RWyFa8pYk8PVVfwg4cQpY9MTV78j5Rz9yq6yh3uturHH9FBHO860xT4ekG62t24r5YCb sReVdluAR8dwR29n043fkMDmnohhwCiPfxcizZIlss3W7gsNnlh4DbxkhjrlFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mB53rPzf9R; Mon, 30 Sep 2024 04:45: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 48U4jEhd086468; Mon, 30 Sep 2024 04:45:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jEKk086465; Mon, 30 Sep 2024 04:45:14 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:14 GMT Message-Id: <202409300445.48U4jEKk086465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3d5e539b1f43 - stable/14 - xdr: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3d5e539b1f43dec0abd2df61cb958550ef9606a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3d5e539b1f43dec0abd2df61cb958550ef9606a0 commit 3d5e539b1f43dec0abd2df61cb958550ef9606a0 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:16 +0000 xdr: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 7a720bf67d73ba565a0a1130065f798870eb5faa) --- sys/xdr/xdr_sizeof.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/xdr/xdr_sizeof.c b/sys/xdr/xdr_sizeof.c index 6491fa80dce1..fc341dcaa9df 100644 --- a/sys/xdr/xdr_sizeof.c +++ b/sys/xdr/xdr_sizeof.c @@ -95,10 +95,7 @@ x_inline(XDR *xdrs, u_int len) /* Free the earlier space and allocate new area */ if (xdrs->x_private) free(xdrs->x_private, M_RPC); - if ((xdrs->x_private = (caddr_t) malloc(len, M_RPC, M_WAITOK)) == NULL) { - xdrs->x_base = 0; - return (NULL); - } + xdrs->x_private = malloc(len, M_RPC, M_WAITOK); xdrs->x_base = (caddr_t)(uintptr_t) len; xdrs->x_handy += len; return ((int32_t *) xdrs->x_private); From nobody Mon Sep 30 04:45:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mD1LtHz5Xk0h; Mon, 30 Sep 2024 04:45:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mC6PNHz4DnR; Mon, 30 Sep 2024 04:45:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OaGOyWuC+VvPfxJ8z/rSshaS5Qo5084pIuzbJE1ZWUw=; b=G3q+iJ7BKnWd4MGANGnbeebcns0HeJRNnggv5TRLHj1zIUfdNyoOWYOGCQBUTfW2hfnQB/ fevMD2zTbzM1wDptd9fJ9qiAvzH0mZVe83rkyINi4ZJFZw28vQbMRDfIOaYFmkVU7oH4yg +lt5Qla9I6MMVdvbCLTm/C/Dy4B/zEeK84JXV2nvL0oqffBEhKy1hrv5gXJcCibf5ijEdC XZzTWF+MzkBxydI0zIBwqO/tUpKcZ6kBqUWRzYbVhHUDsq1EhmJrGpMgrvOyPIefAHSoNk sa4QOeZGN/pjC39g/QsveK/6gCxjinWZ4KyxoQfHgll8e0hmSuRA5EDrRFc+Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OaGOyWuC+VvPfxJ8z/rSshaS5Qo5084pIuzbJE1ZWUw=; b=kLaRao2E++1J0ROdmaFueXl4FggLziH/vteSFwMDvv92nKNSieaSrg1Swn2HGEL2Puksm8 LU2n7L/psSzKl7XlTUCvcomgp/l2ArGhWGj4zlaU/1OT8Z/agXI+h1j9E44OLzA+DWpFQW 4t44AuIB5qnzSwEbIk3L+YA4HARSO6ZwxfCkv7fa/w0+Bv3xtjRcjrehZBuFLoQm9Xpa+Z jHmahAUj32zCbnvYfDMc1Rk8llnzlT2VdlXLc/uSfSSWkNtR01PbWtz2ANmNL3KiXNh56b ZeFxPGeJu5OlbU4vubw7jRkbT2OYyKDeRiK1x5y0bWY31UownSH1SFE/l46Dzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671515; a=rsa-sha256; cv=none; b=RY7SO6vir9DMbjFooYxhBj/XHw+BMWwPiKa21Q72FmWL0ZZ5rlxbZnXQ1F6qVWGal1Dooy lwzUO5/16tm+ra5lf/NkWLszGki+MaqkGuVstGR5u4XOSypAtdQgT1LstjB2AkCsmHipJv ZFDJqwTJH2q+hsjHOTyP6U3OY+iiVJuvhjKOKkruZPsYEwqYkA2Dm0lVbdp8GHod6FPd3m rfgTiKXc7s5sBp1YD3vEoSWbOaIULlbQNlT+ja4ndfa3vTuKkFE5DrtP55yTUEF1XdEURs KBcFzmC3MWrz4T/4JT6F3Ek3S7igaR//KZXJjM5vjnMcFiwPEzZx3ibVApmtBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mC5n6zzfFr; Mon, 30 Sep 2024 04:45: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 48U4jFjD086520; Mon, 30 Sep 2024 04:45:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jFNc086517; Mon, 30 Sep 2024 04:45:15 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:15 GMT Message-Id: <202409300445.48U4jFNc086517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7bea79c1ab40 - stable/14 - LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7bea79c1ab400fc223d730a89af97dcf4ba09911 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7bea79c1ab400fc223d730a89af97dcf4ba09911 commit 7bea79c1ab400fc223d730a89af97dcf4ba09911 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:17 +0000 LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK) As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove unneeded NULL check. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 7bcb1228558b4325fab39616e2e3b2573a9e7da6) --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index a4b5545e0c3c..34e40b961bed 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4402,8 +4402,6 @@ lkpi_ieee80211_ifalloc(void) struct ieee80211com *ic; ic = malloc(sizeof(*ic), M_LKPI80211, M_WAITOK | M_ZERO); - if (ic == NULL) - return (NULL); /* Setting these happens later when we have device information. */ ic->ic_softc = NULL; @@ -4455,10 +4453,6 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* BSD Specific. */ lhw->ic = lkpi_ieee80211_ifalloc(); - if (lhw->ic == NULL) { - ieee80211_free_hw(hw); - return (NULL); - } IMPROVE(); From nobody Mon Sep 30 04:45:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mF0tyFz5XkKS; Mon, 30 Sep 2024 04:45:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mF07Jsz4DqF; Mon, 30 Sep 2024 04:45:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnNLtjoYcteizefa7Pz3Fg338x97AClLe09A7N+g740=; b=GpsO3lAaUXmZEUTe1/DeDraYWiYgtdhhW01Xy5O984CvYWt5fPpGN95XU90oqfenucqV+4 XfuIp3UiRHdJ7Bb8VT8+ek5nnppZgVJ/EkWtA91t+2o5c65AhWGXO5uBlZ6QX+pZ1ccrzs Wd3Sj3dnJr+HyOG3khXxuknSchPgJB+VT2+l+VonI9eT9mhpA0DXLkCUKp/hdWHyshfOwV xbkSneMWUbY4pq+6omvaQi8xv/Aa7CAnNJqG0s2n+AEUoZJrBxUQM4vqmANyHvZzZ5zT20 ioLIbDPFq0t1le4MnpXSetkbNIuW/LIQXYPBmKUMtCzHTnO9ZPIlBZK6xjCyug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnNLtjoYcteizefa7Pz3Fg338x97AClLe09A7N+g740=; b=Y9mVbeGXzxxzpThyLYBxFRN/cmvm6YgSncN8tKc/2JZGfLui3ukWF/jemAvLhu5QbFCWJ+ AJ4UUDKH3QQuRERbIS/3zbo0ws/hnQ5zc3R0hmoBj57sU8kR5yaBcUM4sCBTMdDhpqWyen 4/iZ+Iv3aClkqlhKp8YhALXPAyYKkojZsBiuQU1GYT6bQ+JW9+LlM1Zh2bXXESkNAr3dY8 kPsVVvGXdh0ojwVXhjySafoTSZGHp/9otoLodp8bdZ6Eg+mn6cRMROORpynfgRBSRX9tBP kZzZelirn0hWU8xE7YYyioosAlv/jr/JXRYVWQMmnmi2PCP7rck/iDUc6bxcdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671517; a=rsa-sha256; cv=none; b=Z2+kAKZskad+HjXSVB6AC1u9g/ZGxB9p81fSttRrJAWuPckEjKV1LNDa/ZWgT+w9j5O35c CeGRoheTpS+hoAeRo+eqTt7ntlUsEgQpceGdPHeVVAlXg6TVRnpI363a3Yx1Y6FHB44smL pEMls5HWlmnVa12TgyxI8SAHcvWg7+I0jhhyNu1KQpLYDum7zr9XvbcJBI65PpEgp6kojB UvpjrfwqIuiDyKbggSQfWZ+wGs/vRJUn0Mg5AOGIE+d8OlBx/pEwjbcF68/m+jdRTWiY3g v8CLr90FxCuZI+0Rv0MW5cxBN1L83NKhWyKDY44+BVZ3mIxb6bCA22x6+2+MWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mD6lPLzfcy; Mon, 30 Sep 2024 04:45:16 +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 48U4jGKI086568; Mon, 30 Sep 2024 04:45:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jGmX086565; Mon, 30 Sep 2024 04:45:16 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:16 GMT Message-Id: <202409300445.48U4jGmX086565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 905d5420ee1e - stable/14 - krping: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 905d5420ee1eced55f99ab3ba5c340b685f2f896 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=905d5420ee1eced55f99ab3ba5c340b685f2f896 commit 905d5420ee1eced55f99ab3ba5c340b685f2f896 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:17 +0000 krping: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 66c35a6675ff987b52a2018871231658b1980a6c) --- sys/contrib/rdma/krping/krping_dev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/contrib/rdma/krping/krping_dev.c b/sys/contrib/rdma/krping/krping_dev.c index eea3c772ea4f..59aa19672443 100644 --- a/sys/contrib/rdma/krping/krping_dev.c +++ b/sys/contrib/rdma/krping/krping_dev.c @@ -174,12 +174,7 @@ krping_write(struct cdev *dev, struct uio *uio, int ioflag) char *cp; krping_t *krpingmsg; - krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK|M_ZERO); - if (!krpingmsg) { - uprintf("Could not malloc mem!\n"); - return ENOMEM; - } - + krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK | M_ZERO); cp = krpingmsg->msg; while (uio->uio_resid) { amt = MIN(uio->uio_resid, remain); From nobody Mon Sep 30 04:45:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mG2dYJz5XkGw; Mon, 30 Sep 2024 04:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mG1H8Gz4F2C; Mon, 30 Sep 2024 04:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c/NmM3ibfGmUWdwQn2vDt/S85DLdoksQCO8kZ3DEho4=; b=NFo3Le9EsRIGo8CHdfAUzK9T6ensh28Ha+Pqj7y8rLc+hvl/11gQ9Te3c2VLjXSvRaLFdx OyOS6KpJAc5a/HpQetqvP0ubI5hElyhHQmuftl7Hy6ReOf47XJ9H6F6jeJa58bxK5bjIQa 4audE8zpip6ldo4+Cp7ElU6bD8+fGVeJfo5ed5eCHL4iOJk4+ZJLcxh6hZgQOHPyBC4eC+ aoNywD/dHqOuA3Oo+4tFAynbLLY8UqeVDeeqv83u9Px+sQsQ1kAm9pV2NXTKQJd3bpI0hc vuoVHVok6bpgiz79NJTIOK4Y+APU3Axu9whs3WTMBEhEIsh1rMPMEj/l8xyXAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c/NmM3ibfGmUWdwQn2vDt/S85DLdoksQCO8kZ3DEho4=; b=gS6IQ968SIzlXfeccLrSBNBXvZxPZ4uLTA7xnX/BtSwPrauGypkaaIvmxA6cYah1SnP85x futjld593hdqMyANCC4UfYIUm7AIiaPRWG4ARPGWEVg/RdSpUipVn8FT6iudVlxsCfrFbN eg2cu06Bxe9i3lqFMUgswmBP2Z81P979Pz0u325JfXdz22N2kY/EOOn4ygQ8nfD0uuAJpV PJqhn1Uejhf+ThTDV40Cg+pX1IQbwMjb+fF7tES4YZsD1XJJCuPG+bUULtsA4/fj5nG0hY VlDzJkBeH5cib72YtrXDsQJiF+7CjUBKBSvkeblqQFMDK8gt4ql+baHqrnVx9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671518; a=rsa-sha256; cv=none; b=xLp6+VfmPWKkBIVUXr8KkjoT6CwM4QlQt4IfTp3XBkv4mUgDohJCKG9gXhhaNeK3H623tH FZb71meVI8XlKcXq8tFCYVzEf0MshsCrhv0dHJsk4HP+2fQolneyTJXzFzsTwPSrPmujjf ERoX2I3eRZBhp7mlc//lkitlw9e2PCo8E6UudtFfAwmhpae0+awg4kiV8QJWmYSP2gccqi IOMs31ySc0bvk4pGeQQBwD69o5bihn9poRzx/PsIu9vW1JC3pFSnS3JuDzj99OfzB/fmQS T90KdUs02evc1uwQ8hLew9OSNzT/Z7IBnpQF79+x+K8+9JIuSVbJbSlUjB1r+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mG0SdKzf2C; Mon, 30 Sep 2024 04:45:18 +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 48U4jHFM086622; Mon, 30 Sep 2024 04:45:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jHK1086619; Mon, 30 Sep 2024 04:45:17 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:17 GMT Message-Id: <202409300445.48U4jHK1086619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6a0ed6fe27ec - stable/14 - tests: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a commit 6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:18 +0000 tests: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit aac6c41d4ba9b0a1aef561f6c4bfd284ab369ebf) --- sys/tests/framework/kern_testfrwk.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/tests/framework/kern_testfrwk.c b/sys/tests/framework/kern_testfrwk.c index 19714fa76f52..c6b46542a205 100644 --- a/sys/tests/framework/kern_testfrwk.c +++ b/sys/tests/framework/kern_testfrwk.c @@ -192,10 +192,6 @@ kerntest_execute(SYSCTL_HANDLER_ARGS) } /* Grab some memory */ kte = malloc(sizeof(struct kern_test_entry), M_KTFRWK, M_WAITOK); - if (kte == NULL) { - error = ENOMEM; - goto out; - } KTFRWK_LOCK(); TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) { if (strcmp(li->name, kt.name) == 0) { @@ -244,10 +240,6 @@ kern_testframework_register(const char *name, kerntfunc func) return (E2BIG); } te = malloc(sizeof(struct kern_test_list), M_KTFRWK, M_WAITOK); - if (te == NULL) { - error = ENOMEM; - goto out; - } KTFRWK_LOCK(); /* First does it already exist? */ TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) { From nobody Mon Sep 30 04:45:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mH48Fjz5XjxG; Mon, 30 Sep 2024 04:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mH1qGhz4DtV; Mon, 30 Sep 2024 04:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQtfHmwQjGXmbcnjINCzFaVXy1L2jjSFqVGExZcjQas=; b=OTnWf8tLfrui59a/zaiaECGzZLn/0mHTvCSH76MzFMyGRBjsUcWUGHFO/bx57bRf3XlM+g IJvqtzxrqwhjIeZ3AZZaS/wtL+EBh0oPPhF/DxuI+OywAzPGxKWn6SXL8aolvyIHCOLAoT aTMObKkV5o6liwvA/TZCNIsFhKj0MwpPPJhFxb9qP022pDnhBZpIpibcv7Kq2+8Hy74xRx CUFclFyRF39k9vX0Rxx6U7Q++IJwmD/V87hbmWHDVRFh3GYAclEqIy8lz9SaGIVCqy0Gso +mT9S2vcxFOZZLsLH//0C1A0PtXEHPp7ptfZsW9N2seC8sBuTxth3Be7Bd+4jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQtfHmwQjGXmbcnjINCzFaVXy1L2jjSFqVGExZcjQas=; b=VV62QCTbdnTHDRQivBCd2j/bxcxnjWv4C/ovmBi78zhosDU9LI4AwmG97lRsaxDRWRjDLM f9y+5vRfP8zlZUpZflU79soa4mUsbNgklJdC/NjRsTc+4h9S0YckofFQXpIfTjlK1n7MHI FlBj/RGqJpsE4UOkUlRrtNhnu22iFinLwBbaFIZ91NX4In/q3w3ukue1NJHuTz/NcVY/ye hlbG+nWJkwiUOYnkZfmZ1ouD9+Ai9T/kakoGPFd3lirln4a5Tv0c2bxv2oWW4yDVu4tDqO hmDPAL0NCl04CYHLdfNso2Uzg2eUw2WSYtrLPeNB1woiNI3EjMFGFEd+BYIWng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671519; a=rsa-sha256; cv=none; b=fenQajGB9eedycAjiodAb7gP00xlE1PX+RWhSpZlL4BYxVodX1Zy+r7RKxVnTlqQzp8pt6 cJjC4zmtb+w/tI71I4WtlgiefxQ+cCwvPIs4JguOnUrq/sIOkkHafrOu3/DlJIGHyL5jg2 r10TGwVfoHSzPpgarN0V/k7vOnM6FOJT5i/CRlA9gOcjoBYVWkM8SynbusVSjW7rfH4gVK TWE5J+z3E70swoj98WyGS5z4r57tprCYvoZ+ek6Vg3lL1vqliyQxR8CX/wR5TuVx+inzld Jc39zl0kxUkNwFbAFoJeTZknmRfnbjDyjI1/iE9qnTsaMQ5GPcCkgCLxdxbVrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mH1HsNzf2D; Mon, 30 Sep 2024 04:45:19 +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 48U4jJTv086677; Mon, 30 Sep 2024 04:45:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jJ4U086674; Mon, 30 Sep 2024 04:45:19 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:19 GMT Message-Id: <202409300445.48U4jJ4U086674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 920288c32900 - stable/14 - arm ti: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 920288c32900da48136eafc41aa6d020552e36e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=920288c32900da48136eafc41aa6d020552e36e5 commit 920288c32900da48136eafc41aa6d020552e36e5 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:18 +0000 arm ti: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit fe6985ef87e1aedf8e5c9b3b959c7dd54a03e2fe) --- sys/arm/ti/ti_pruss.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/arm/ti/ti_pruss.c b/sys/arm/ti/ti_pruss.c index 378c892c95ec..b6895a8a9cef 100644 --- a/sys/arm/ti/ti_pruss.c +++ b/sys/arm/ti/ti_pruss.c @@ -184,9 +184,6 @@ ti_pruss_irq_open(struct cdev *dev, int oflags, int devtype, struct thread *td) sc = dev->si_drv1; irqs = malloc(sizeof(struct ctl), M_DEVBUF, M_WAITOK); - if (!irqs) - return (ENOMEM); - irqs->cnt = sc->tstamps.ctl.cnt; irqs->idx = sc->tstamps.ctl.idx; From nobody Mon Sep 30 04:45:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mJ5j0Mz5XkH0; Mon, 30 Sep 2024 04:45: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 4XH7mJ36Svz4F8n; Mon, 30 Sep 2024 04:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdTlxEcuMQT6anedAKrWIyqgKYKOJgRJ9neXnV9P1kE=; b=wwDnSFFnIe7TM5tzTnDTJcTDAJoqeVLmOP/fReVuKQwLd1njYpErq5rwcVE2tMryeea6/e ckyFuzDJJQowfS08NpWu9ZCQ9msoz13b+RayDks+XZZIv9V3kiJfEGsBORnNmpNuf0BVzw N42uP6zQ1sq/SpYBgphN668Iec2/Z4cV/1aDIAr50KfxCB+P3gG9KulGYIteQbE5R0JST0 wKkzS2HI87ASvd5Zn3eh0BG5jwTkAYeiPBwepkRQb1jeM97KVYdfeHumxvipCycoMFeJDL 9/IIWG7fu0Zx78Z30raPJ+m41b57ySJn2nCF9gOYosvnngnmuJIB4PfDloAzVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdTlxEcuMQT6anedAKrWIyqgKYKOJgRJ9neXnV9P1kE=; b=rnLbR6QPpgBMdIo1zjLzIdMDyE25inWO0n2xiFJQqLtcHz2vjU3IA5svfc3jpONnF0BQA6 ZqKdluXQb46n6q4vM2JE/6GWvtugc/MHdSlvI2rkCa1/XFK/MgONrLVehKyTDkrtOy2198 JPEOx7ONH1dv5GagGh95q/5FIOyM2GXhD27OpPbboKiLKWdJWNqaRPHXLjbKnSeklJt6xl 1SRurMNzD5h7KFSW5z6nK9ZTCit84QUidbzGnxz73lnzEhQhFtx3llekydTfxbbaObnQeu 5mMAPyreLoBWtLjL5AeEjdNRtY5zqdGOGP6BDyDCw0VxsiC0jG5dpctPm3LOEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671520; a=rsa-sha256; cv=none; b=soIvRFKcSUtJ++sBgolzO723JWwMcp2avlYx2obndUkfWfE0Z2GivfzB9xF8ApAxqW4yKd MImhoFXcqADKfqHu0Fy4IVXvUByGYWVAdLWOZibGu3tALez/4nAAht98sZrNshfDNGhkWP 1JrSCyRBPhzgO0FlqJkN20C/QfFDKeFnUjTQsFHMNu31CGs5TVZpRPJz98rLkJFJeO7HDZ iIBQi1bxUUzmpJiGGYb3cShuDrRWY24a/jk6aJV3Dwu6Idh3Y50iKNt24dU+rEVpsGu7xv /Aaw7BSfm9bH90yDBzHPsFfdd7KRn9N0S7FsET1cY+sfFc35vNFRkP0Q4yBnRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mJ2LZMzfFs; Mon, 30 Sep 2024 04:45: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 48U4jK6H086725; Mon, 30 Sep 2024 04:45:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jKtC086722; Mon, 30 Sep 2024 04:45:20 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:20 GMT Message-Id: <202409300445.48U4jKtC086722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 53b79271160c - stable/14 - cmn600: Stop checking for failures from malloc/mallocarray(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 53b79271160c36fc060c819a8e34dab86dd00df3 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=53b79271160c36fc060c819a8e34dab86dd00df3 commit 53b79271160c36fc060c819a8e34dab86dd00df3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:18 +0000 cmn600: Stop checking for failures from malloc/mallocarray(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 1d321c1907c210a33192ff5293f5c23554c96867) --- sys/arm64/arm64/cmn600.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/arm64/arm64/cmn600.c b/sys/arm64/arm64/cmn600.c index 7079907e63ce..976c272cc869 100644 --- a/sys/arm64/arm64/cmn600.c +++ b/sys/arm64/arm64/cmn600.c @@ -332,9 +332,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset, int i; node = malloc(sizeof(struct cmn600_node), M_DEVBUF, M_WAITOK); - if (node == NULL) - return (NULL); - node->sc = sc; node->nd_offset = node_offset; node->nd_parent = parent; @@ -399,8 +396,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset, node->nd_children = (struct cmn600_node **)mallocarray( node->nd_child_count, sizeof(struct cmn600_node *), M_DEVBUF, M_WAITOK); - if (node->nd_children == NULL) - goto FAIL; for (i = 0; i < node->nd_child_count; i++) { val = node->nd_read8(node, child_offset + (i * 8)); node->nd_children[i] = cmn600_create_node(sc, val & @@ -420,9 +415,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset, break; } return (node); -FAIL: - free(node, M_DEVBUF); - return (NULL); } static void From nobody Mon Sep 30 04:45:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mL4Jrkz5XkH1; Mon, 30 Sep 2024 04:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mL2Plfz4F73; Mon, 30 Sep 2024 04:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qOV3n55uSL1cUNuOU7bcbH7hufJIx3djyZfGHNVE5Cc=; b=iorsgez9JNYJta+6GpN1R+4u/BDodyd1cNi2lJbo7tqLCmMTtf2ISjbNf1XK2pAkqpyCM/ tDZFsqAuAxTnL1tlwmCqsCzJxYjO7d1De/XnD3qRMCwH2jw8pg038uiZ44gBbQoRDD8MsQ qwcNjpCuI+GCcnVstrI+bjj9KhkHpKKKgfdfsrZfMXbhe2RLZ1AgGeH95+O6bup5hzSHMB 7RFsq/Zxqs6GwMum0Pdj/HKt/NnYhxbd0+c7O3V/YkRL6dctR8AGxoUN0NP3xdvhHCV1nb FgN/9mSyb2eXFd1XCJ/9oSeipNFgNE2TDzNara2xPdbqxT/5+LG6C1SZE66flg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qOV3n55uSL1cUNuOU7bcbH7hufJIx3djyZfGHNVE5Cc=; b=jhhT4XFtMjy/qFnCEZ6pRrEwu6RROYqmEuAZG+pJXAKOGWg5q7RYY95jQWGlMkJiXB0juy L2LW0QLFD0ZVdr/ZPGmkSwuAxe5rY81ShPlduxAg+4nuZy/MQ6ZHjE2owSmFO2Wf8y+KWg eUqDonb/40iAw82D8vskRvwhJ5/oAfxnrDtqXEgNHjKSsB/7L3NlE9ymHhLhS0oU01Wqdl w5Iojv4kxif/hlQshBij/tgiPIQGDlZEiyF+zLYyRa0xSarh2R2f7At0e3LeZ4j90pnZ36 h1BZop+zpQs8MCu0HTRejIip/+lO9ek5jNjBqhJ5DiW/xUutG+QEjSmSYU9XOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671522; a=rsa-sha256; cv=none; b=h1NkGXHa1dF2DL55eBxebt+KupRg+Owag4Yj6zYNOsOR9JVYSkeCZk1st2cNxkR26NNlqg kUbpjD8V9wHy0aEpqjg1PF4QfPFisJJNQ/8Dk1gNRmBsWWhDKl+EhckOZfBgx6UNzjlKo2 IpoQz0qhX3YNhZ1kfxwPefMAenBLJeyN57oQhup4/DV+L7jpDIh7Tn+rHANUYJS9CJMznZ APjLxvh1aYNmTQlpXk96EemwoLD54V7Iga9z4dSz8PZXBNdvprx+yFtu8LVfvIk3NJk+k1 AFVKs3Zll7v2wla3uNzW4N4caQUcLJWR/tttRLx0M7utzs5Pv5NsZfO7exOp6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mK4TrNzdkT; Mon, 30 Sep 2024 04:45:21 +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 48U4jLD4086773; Mon, 30 Sep 2024 04:45:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jL6a086770; Mon, 30 Sep 2024 04:45:21 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:21 GMT Message-Id: <202409300445.48U4jL6a086770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 49995f771b53 - stable/14 - smmu: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49995f771b537064daeb2931ce86a13e78f9d977 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=49995f771b537064daeb2931ce86a13e78f9d977 commit 49995f771b537064daeb2931ce86a13e78f9d977 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:18 +0000 smmu: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit f75ceecad2157a0d3aca61a4893ab78f2dec21ee) --- sys/arm64/iommu/smmu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c index 4e724f2fd53a..d09f33a9a49f 100644 --- a/sys/arm64/iommu/smmu.c +++ b/sys/arm64/iommu/smmu.c @@ -971,10 +971,6 @@ smmu_init_strtab_2lvl(struct smmu_softc *sc) sz = strtab->num_l1_entries * sizeof(struct l1_desc); strtab->l1 = malloc(sz, M_SMMU, M_WAITOK | M_ZERO); - if (strtab->l1 == NULL) { - contigfree(strtab->vaddr, l1size, M_SMMU); - return (ENOMEM); - } reg = STRTAB_BASE_CFG_FMT_2LVL; reg |= size << STRTAB_BASE_CFG_LOG2SIZE_S; From nobody Mon Sep 30 04:45:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mM0zlXz5Xk2d; Mon, 30 Sep 2024 04:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mL560Hz4F0d; Mon, 30 Sep 2024 04:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lMMStybdZi6WPZctxlo20/zwWy8eKcJGSjWmE4PlsNw=; b=vnbULDfcfLDlg6pW2HAzHl9OW5Fc487ojHZTOk/9dhNQGViMFpR0MpeHiypM3glCKOrFwq m/kbIzkufdFbe227vy64RXTZx4ZR/Oo5T8vhGTAw3Z6X9rv47WAN+NkAv2C6XmSj0qIDfz UDxapDtlh7c4rEVM2vqGtCP0hS3ImXfoDK4BQiLItySSyJe0kbDq/cta0nQl9jdIE7qv/o II4O20P8LV8L2lBm4pQhFnwUy7y98MkitwL1r6MEwXMyproapkry9OqougjLdt4ywuuO+z 7IIzvzAH5MXWArzretFrAJ0Mi3MF7YSetTi20+b18ZTa0+0YykgAmtMom8gH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lMMStybdZi6WPZctxlo20/zwWy8eKcJGSjWmE4PlsNw=; b=XkEEiOda7BIR2mVnK092S2bODXWG7EsY4Zkxfxw0sMhUIreVD8LDVqQuMDPWkP3hZsrY1a Iz3fMF6ThY+lqxn+6sMFeGCf/7o2919lhidOB+Jxc/KxHv51xOcDBeh8nKMxyn7lcN2fHJ CgRstqSeRWGhKE+smkZa+RarMZ+qZjzLa3DJYkyNkat0WQsvFRzsMmb8tQdpWM54VNkgom DlYu2p1+7kNxd1oiTb72HSNUQFoaP3Sc9fd8C8HBD6yM9DfHmPXa5Tfwn/I+uKciDWfmI5 IFjRBpOkxZodj3AheoJcBc8qBFe+nZAkC4HPcGWv35Xvh7t+ewitXJAkYIK2eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671522; a=rsa-sha256; cv=none; b=jUh3AslLFUuCpW1biCkV4seujmudad4xyt+8tkTTZPHVeB0Qmm9RqAgZ5p9gHyJhUqS1fc YgIB952fUH747wj6/vOH/A5TQKdjOnv2TR0gqZN8w6vg6imaJ2ah9+CjoWeKGK2lksa73X pXDFUoKKsvGYiqDE4u6iD0ntI2r8DJHRzhNqucCh3BhzzZMnsAFVVzsxvfkgzGLgGeXPgB KAH7iQ8T6/EW0C2CnAj10GtumDlK35kkIXvKCDCUbvTFkYKJZuIn8dAGWHDGAa9fb43sBT ikkXuOdDd71QdD8HvtnWpVvkXpD7gCbMYEhMn8uS9tThUnJ3PmOxiHMpNnUygA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mL4gC8zf2F; Mon, 30 Sep 2024 04:45:22 +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 48U4jMQS086821; Mon, 30 Sep 2024 04:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jMSO086818; Mon, 30 Sep 2024 04:45:22 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:22 GMT Message-Id: <202409300445.48U4jMSO086818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 74887e322101 - stable/14 - al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 74887e322101cbc9e531e3acd08a6eb10dd2169e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=74887e322101cbc9e531e3acd08a6eb10dd2169e commit 74887e322101cbc9e531e3acd08a6eb10dd2169e Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:19 +0000 al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0) --- sys/dev/al_eth/al_eth.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index baf47ac1d378..b4fbf041660b 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -2005,14 +2005,6 @@ al_eth_enable_msix(struct al_eth_adapter *adapter) adapter->msix_entries = malloc(msix_vecs*sizeof(*adapter->msix_entries), M_IFAL, M_ZERO | M_WAITOK); - - if (adapter->msix_entries == NULL) { - device_printf_dbg(adapter->dev, "failed to allocate" - " msix_entries %d\n", msix_vecs); - rc = ENOMEM; - goto exit; - } - /* management vector (GROUP_A) @2*/ adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].entry = 2; adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector = 0; @@ -2300,9 +2292,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) size = sizeof(struct al_eth_tx_buffer) * tx_ring->sw_count; tx_ring->tx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (tx_ring->tx_buffer_info == NULL) - return (ENOMEM); - tx_ring->descs_size = tx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = tx_ring->hw_count; @@ -2325,10 +2314,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) mtx_init(&tx_ring->br_mtx, "AlRingMtx", NULL, MTX_DEF); tx_ring->br = buf_ring_alloc(AL_BR_SIZE, M_DEVBUF, M_WAITOK, &tx_ring->br_mtx); - if (tx_ring->br == NULL) { - device_printf(dev, "Critical Failure setting up buf ring\n"); - return (ENOMEM); - } /* Allocate taskqueues */ TASK_INIT(&tx_ring->enqueue_task, 0, al_eth_start_xmit, tx_ring); @@ -2477,9 +2462,6 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) size += 1; rx_ring->rx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (rx_ring->rx_buffer_info == NULL) - return (ENOMEM); - rx_ring->descs_size = rx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = rx_ring->hw_count; From nobody Mon Sep 30 04:45:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mN41RPz5Xjv4; Mon, 30 Sep 2024 04:45: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 4XH7mM6MlXz4F7g; Mon, 30 Sep 2024 04:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ln+Cyz3X/AptOaqzoWggl4SgekldK80KD0sjy77isk=; b=o4Sw4uxiAw8OmXV4yXem1SdQeZ3n+ac0iohPZZh9c22UVl68K6ZBkHLTL/cqUJDeWivhbT xiEXVqYhmhj+ZVoWHJLH+sAqt3UzMOYkGuA3Zr4ZqCSCZihkVsV4X/wNa1le1tm11xDB59 ltWroMWzE1fk5bkUQksgfGB6z9WHaGUebOYIRKLeY0XM+w/E1r31lDjn60ASoHnR6zha2V 0uUj978HldtUfTpnCr0PhjTQimkMlwdQ1r/raifd3vC41S5AoyZfIgwq2XEp+sakXxP/Ih svgWrU02RLh+mphAHOy40VnXZQMnNalYHNjsuXygZclODSeKEVxBFOWZ2Ke8Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ln+Cyz3X/AptOaqzoWggl4SgekldK80KD0sjy77isk=; b=QlWwzIhurTdKdpmSU8sguIFVJpFyOLHl66jBzNShWt9erWkKUI63Q6isVmkyru2WFUuG59 YKzmbpgLHXd8Y39u21DRYTBt4Y+YUuWRa6uOXMJVerd17U8E/bKjxz5YHiKURtzAmEI2wr MLBS9+DIxbnaHQ+odG6kfxs+d9ygAV1RPsl0Q/3kUzrXTsTE0nrbYXDEbVdOu59iRWmkt9 bo86KZfpwlwQGYgVmeB3rLHHumvSLTo8fOMV8zwAGSxUXldSAcegzwlg4FTTTXiOb6Nc9K kyqco24V4RbaoijHbqUc7E+d3/hfyqG+bUJrw+fstgarxddc6Xz3H/fwdfmmwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671523; a=rsa-sha256; cv=none; b=rqmY+yxkWiQuI2ZYP8QCCevANa1hQz0+5EhDC1ZUMm/eG5+ecMPMveh2FxqLm/69S1kB4m vuGNXGrXTtnu7eSAC8nUpLb2VQhuouSu+uJj93awV5GZTbb+qItXAoz2NCEPBZDusTZB1o YFNeMeI76tHq+ErDwk9wPPVeY6q9sg6McBocMCiOR8VpPxcODp9ODRIgIODpgPgKB9FB+E xwat61IklnQfurWJtOa423kD6Deqx4YWS6HPhqbSLZhdCzM1u+81cvMPoWWn7a5LNCQ077 Y5anxJdJV6yq2UrBhgx2YwLht0eJVo5/T+EjGFkH3ufZaEkadGhHLgEeFSxvJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mM5qkbzfFt; Mon, 30 Sep 2024 04:45: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 48U4jNVr086875; Mon, 30 Sep 2024 04:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jNBo086871; Mon, 30 Sep 2024 04:45:23 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:23 GMT Message-Id: <202409300445.48U4jNBo086871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 66bb507ccb1c - stable/14 - altera: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 66bb507ccb1c9860662a921d231f591ec814d83f Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=66bb507ccb1c9860662a921d231f591ec814d83f commit 66bb507ccb1c9860662a921d231f591ec814d83f Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:24 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:19 +0000 altera: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit e06e2c84074740a0087193d5929d09f1bc7e1c4b) --- sys/dev/altera/msgdma/msgdma.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/dev/altera/msgdma/msgdma.c b/sys/dev/altera/msgdma/msgdma.c index bb35d7315b6c..c5c75a5fb5e1 100644 --- a/sys/dev/altera/msgdma/msgdma.c +++ b/sys/dev/altera/msgdma/msgdma.c @@ -356,11 +356,6 @@ msgdma_desc_alloc(struct msgdma_softc *sc, struct msgdma_channel *chan, /* Descriptors. */ chan->descs = malloc(nsegments * sizeof(struct msgdma_desc *), M_DEVBUF, (M_WAITOK | M_ZERO)); - if (chan->descs == NULL) { - device_printf(sc->dev, - "%s: Can't allocate memory.\n", __func__); - return (-1); - } chan->dma_map = malloc(nsegments * sizeof(bus_dmamap_t), M_DEVBUF, (M_WAITOK | M_ZERO)); chan->descs_phys = malloc(nsegments * sizeof(bus_dma_segment_t), From nobody Mon Sep 30 04:45:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mP4ZpMz5XkHB; Mon, 30 Sep 2024 04:45: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 4XH7mP1Rdbz4FDS; Mon, 30 Sep 2024 04:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKy+IhVp4d0y/e53XdmuKoeMN3eiE8B6e7F8WmscERk=; b=IWxq4jvorRtF2mufVEE76DdmekwwJKNESXkJWqwc6nKkgHkGAXTS4XqAJ3ZUHbzxGcNurm 3hhgbYHmGnArp20zNSVbGddiyb6mlGiHdk3AkkfgvaSSNlhevFPzKLBfF4yOVclG0U+1I1 BEWM4jNkLHWyLh+XgmZFYAG8uxvNAbjnnZ+HD8SMaVvR7+kJns3UPgc+CxKh8IJsg6jN1+ kNjKYRsw2O5mIKrR2Ok4/mmUN9NJdPNLmLRHii1SYFE9ZabWYqnQ6clLFV9D3DrhHeI2B8 WVEAh0kAZAuyufgml9K4wLbB9+I8rOGSUXDv2sVnq+ASWkbwPK3fXCFUnClE/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKy+IhVp4d0y/e53XdmuKoeMN3eiE8B6e7F8WmscERk=; b=HnN2SA2HKfz3DZFakBf2IkZgzUvHca4hGotwQXs74LVUJCPo+GjxSFwjIMvV/z8+X4p/5N S3YT4QuXS8YBSxP4WQa2dJBo7uA8/4N7dS0Qx7PqNMAETfyH1Gr0LNazGIJR3MNiyiDoyI ZZDnOj6KNE+m8qpVYS56HZgHqo3MilZd5o5AokwyaJz6YX6ub1w/HanNEBSrfbNR64icdt 2gKlzcRyYmxu/Niyztk9XqhIhsn+xIXE675oX4lSHZ1ze29WG/FoS9suQrLZxIvReXnu9E qbiNaQRCNz2KMIrtfL0MyO7+/AWC+x6g2wSyE8EZFUYG/T+/856KDKyf4a7Q+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671525; a=rsa-sha256; cv=none; b=sKZyp3go+rlGVK7+mx0rAveiF/DJMChMS614YwcAT300CtbQD8d0/J9FI+/uoJsPRT65/p /K5qABneSStWVwUiAIU5HtLqyqUGpYhJUVcfDSQMYr9g6UXUOOkI2C8j44kt3y1vDxrw7/ Xpw5ozSSbRoINyD2RWGe+loGzcygb6RhySDHDqbP+Tr0rPS2w90GHBEL/rfkszjgyDcUb0 Kc7AsNkcANL83AazwMM3Tnq+6koTt2mo31nKmGNouxu+bNZcdMpdiUbjmaWqOq3inQ5pxi Qjda5WLmHjoBVqDeTTHYKPsti16SZ1ykRMszTJt4gzc7sRCLiTY3cah5XAoN0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mP00Vzzf2G; Mon, 30 Sep 2024 04:45: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 48U4jOEh086926; Mon, 30 Sep 2024 04:45:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jOBU086923; Mon, 30 Sep 2024 04:45:24 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:24 GMT Message-Id: <202409300445.48U4jOBU086923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8c2748b922f5 - stable/14 - ath(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8c2748b922f579080d4d8ca88a8ada5512a69035 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8c2748b922f579080d4d8ca88a8ada5512a69035 commit 8c2748b922f579080d4d8ca88a8ada5512a69035 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:24 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:19 +0000 ath(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 3fdf587ab02f33018bd042094e3d0bd4169352ed) --- sys/dev/ath/if_ath_lna_div.c | 6 ------ sys/dev/ath/if_ath_pci.c | 5 ----- sys/dev/ath/if_ath_spectral.c | 7 ------- 3 files changed, 18 deletions(-) diff --git a/sys/dev/ath/if_ath_lna_div.c b/sys/dev/ath/if_ath_lna_div.c index 1b20591fc64e..0755bb667716 100644 --- a/sys/dev/ath/if_ath_lna_div.c +++ b/sys/dev/ath/if_ath_lna_div.c @@ -96,12 +96,6 @@ ath_lna_div_attach(struct ath_softc *sc) ss = malloc(sizeof(struct if_ath_ant_comb_state), M_TEMP, M_WAITOK | M_ZERO); - if (ss == NULL) { - device_printf(sc->sc_dev, "%s: failed to allocate\n", - __func__); - /* Don't fail at this point */ - return (0); - } /* Fetch the hardware configuration */ OS_MEMZERO(&div_ant_conf, sizeof(div_ant_conf)); diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index 72f0a802aa5f..a242eab7a694 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -269,11 +269,6 @@ ath_pci_attach(device_t dev) __func__, fw->data); sc->sc_eepromdata = malloc(fw->datasize, M_TEMP, M_WAITOK | M_ZERO); - if (! sc->sc_eepromdata) { - device_printf(dev, "%s: can't malloc eepromdata\n", - __func__); - goto bad4; - } memcpy(sc->sc_eepromdata, fw->data, fw->datasize); firmware_put(fw, 0); } diff --git a/sys/dev/ath/if_ath_spectral.c b/sys/dev/ath/if_ath_spectral.c index 58f21b526e93..951d66605981 100644 --- a/sys/dev/ath/if_ath_spectral.c +++ b/sys/dev/ath/if_ath_spectral.c @@ -112,13 +112,6 @@ ath_spectral_attach(struct ath_softc *sc) ss = malloc(sizeof(struct ath_spectral_state), M_TEMP, M_WAITOK | M_ZERO); - - if (ss == NULL) { - device_printf(sc->sc_dev, "%s: failed to alloc memory\n", - __func__); - return (-ENOMEM); - } - sc->sc_spectral = ss; (void) ath_hal_spectral_get_config(sc->sc_ah, &ss->spectral_state); From nobody Mon Sep 30 04:45:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mQ4rpmz5Xk2g; Mon, 30 Sep 2024 04:45: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 4XH7mQ2Jbfz4F89; Mon, 30 Sep 2024 04:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FYKKd5tQYZPHJCOT7XwV086IPG3LYXeyRwipKtwApEk=; b=rG3M5ICFmlLNcF0S6Dtv+N4J2tlaBzzpArpW3KygGs2vLHcslz4HCj50YOMPyzJKKOfC6K M52mDTlksWNgN/exzxxdXdWwHgpDInrwOnoisFwupPdnqlMnGrBwH46rf1iTldGOqT2kx5 +lMK4MYIWgtePhnF3MlmaxDXpOFNJdqC37afUYOojOZu0283O+6Va2xMa/pHWwBn5YZPTi tOs2lGXXAZPHygRFotDlmzzPBXBKW86RdckKlOGJ8esQLOUoLMHx2D7mvcPPrNEMQM6TPN 42RjFLoD6mHdT4DVeQZ0AzwrSkM8JHNrI9F23Hbi2Vd+N/klRkoK6A+mnVRTxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FYKKd5tQYZPHJCOT7XwV086IPG3LYXeyRwipKtwApEk=; b=icrQlm4uawMt8JoaWTEffzHvjmf7211352YPwRv4dGmGNKVfaEbTFzt51NQ+soZoUYuu+g CkvA+GU/mC1GdHS6sMFhP/JWAHDSF8qlnO7jECPoa0Xb3yR7ou2vsaLcEhQxJWIfu0BpIw zcljiToJfzcptn6BDoMhJjDv3cJnea8a3Oa9b8Ns7DBCeast38F/6nxVsVzSsSdKqj6PIi 6B8bi4j++/O1tLTDXpz9AvnWRLtpfMTyMueYS0qJdVZ9om3sqaDRx8ExPOC/4iPSwtNxDp TJKcIWIjPVTV3LoIh6FK68z3u2WWEdfdiz4Hl5xA+9b1pC36wfZufsyBt36aCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671526; a=rsa-sha256; cv=none; b=reUaiLVBFkaS6p200Y4YRMQWjYAn0jCqKt6tOA6OZwgQa0mJhIkBKKn8/NKEnq+5+zotrg cfU5SwaDoX8GBVTtbQqzkR/1ixqqYXhthRoz0J0tbr2mxIUqAZ1Yq+2M2usSzpNn9Id7Gm aUs4wJ2nRuN7aI8WkvdJhw0OHRlvMvGfb4j1yAIc0MC2reDc3cEIcPAw3m6WTUu+8O4hqd aUYCowM7yCijnIwtKXZeOZZixMRma+NdgTEbM0lIgUM72Db14gWZuwhCNzhKmd/3Iim9x9 f1Mf/eATnzO8QuIVUbxAdmVlV9vz+bVMSRem7aompSb23RxJMU6JlX3wOxzHaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mQ19LszdwK; Mon, 30 Sep 2024 04:45: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 48U4jQIh086974; Mon, 30 Sep 2024 04:45:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jQW4086971; Mon, 30 Sep 2024 04:45:26 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:26 GMT Message-Id: <202409300445.48U4jQW4086971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3db5be682169 - stable/14 - axgbe: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3db5be68216957067ebaa9c57a70f3dde45887eb Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3db5be68216957067ebaa9c57a70f3dde45887eb commit 3db5be68216957067ebaa9c57a70f3dde45887eb Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:20 +0000 axgbe: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit ab0b996bddd96300d56b7d2aa830e2479cdfa92b) --- sys/dev/axgbe/xgbe-phy-v2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/axgbe/xgbe-phy-v2.c b/sys/dev/axgbe/xgbe-phy-v2.c index b7d27f633265..46e4bf8c9ee6 100644 --- a/sys/dev/axgbe/xgbe-phy-v2.c +++ b/sys/dev/axgbe/xgbe-phy-v2.c @@ -3482,8 +3482,6 @@ xgbe_phy_init(struct xgbe_prv_data *pdata) return (ret); phy_data = malloc(sizeof(*phy_data), M_AXGBE, M_WAITOK | M_ZERO); - if (!phy_data) - return (-ENOMEM); pdata->phy_data = phy_data; phy_data->port_mode = XP_GET_BITS(pdata->pp0, XP_PROP_0, PORT_MODE); From nobody Mon Sep 30 04:45:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mS52LSz5Xk0v; Mon, 30 Sep 2024 04:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mS3bzQz4FMF; Mon, 30 Sep 2024 04:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOciIc/YY3aiP6QYsRdz7QxEs3ma5bWA60YooK/aMIo=; b=vACptZrM6tV5cu8fswEH5JOb6QbVSPmsnZc+1usEl2MXvzjPCDSedCYtLSMsMfYlH9sMSW xR689JrnuM8zRywTyKmviyFpzQS9iRM3IHWlfuG33UMALGoLn2ZTYYErEoqPvy3Ctl4te2 AHAaZCj84ErStv1jFhhX+C4YUk/eWa56uKCorTXa+N6EaFx4FfkADrwWVPVxsM4SrzH3RV a5H8WjoIah5pr8hCBMwpDH14bwxGd9/B3EUL8ZqXagQsiJSwVWkEFYxHewWCeSZxvNDa55 U5OqTdMdBxdZdfFcvFPvj1POv0LJ7f07acTmnx1uWNHIPP+xjRKopAO7tN9WzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YOciIc/YY3aiP6QYsRdz7QxEs3ma5bWA60YooK/aMIo=; b=qnldUcIHSXM6EqiFT5gcDDG+aLy2ONziU/D/BvBv2Ojt7Oh5rW1Vz3irlYDKZ/wwyk7tnK s8NsrE4//T6icTozUk1uaXuflWNU2uxgTJmEi+nXgqtfTD+fRDj14jartAtB44D6372PWW bNYUbl8xeQCroVivWi66n2NRoJrw7nlBhWnE1EkFQ3m6VF65G7sZ4MV6RqOA+O1ik9PzNy bkCVS5vfs66QMx9lJAGU02Q7oOfizkXTm0ICw0vt5HgAUf/ta/UWx1YHnKFryRF7ZKFpY8 z9ivo3/tWLvu4fC9r5K8Zg6uHBdANHlglpqp7qIaIJSg60wTEl3Dd6w2NCHwAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671528; a=rsa-sha256; cv=none; b=uzGrnvus6pE7jnMnv+Ub1L8u1w8XTYFLwM6AN8ll7s7Jpsqk2iccrnGVEswzy4f4/1k/V2 zjVLUyQW5V3LpX4mv0X9pd447iApTGCgWmrfyEj2gaZh32PMbpjeZczSVuMTtpMXLW8tp6 2ssv+vHM/a7d59AQC0Gdj+qTWPNFlZDVcdeXwLOE+0HRfPKBOSDY0hGGDSy0svhu5hYsyN +LVKxy4+ApQ3Z89MKLZ7GF1tGOlsdDFD8DnrijO5XDOhb2M9DCslczfyOAwiklhtpZxKB2 hVeVE9JPbiS0p8MT8RqO36Cihyv0juV/s2srGlJlmBiIK2cqSxFn3x+qSHrCHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mS38sPzdwL; Mon, 30 Sep 2024 04:45:28 +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 48U4jSus087075; Mon, 30 Sep 2024 04:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jStr087072; Mon, 30 Sep 2024 04:45:28 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:28 GMT Message-Id: <202409300445.48U4jStr087072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9216ba1853b7 - stable/14 - cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9216ba1853b76185c85abccbf338f2e4ea71a238 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9216ba1853b76185c85abccbf338f2e4ea71a238 commit 9216ba1853b76185c85abccbf338f2e4ea71a238 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:20 +0000 cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit bb51f7c8a48a4cd5dfa67fefa81f3d5d199da92b) --- sys/dev/cxgb/cxgb_main.c | 4 +--- sys/dev/cxgb/cxgb_sge.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 9bcdb86312c4..4d754aa8b1b7 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -2472,9 +2472,7 @@ set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset) aligned_len = (len + (offset & 3) + 3) & ~3; if (aligned_offset != offset || aligned_len != len) { - buf = malloc(aligned_len, M_DEVBUF, M_WAITOK|M_ZERO); - if (!buf) - return (ENOMEM); + buf = malloc(aligned_len, M_DEVBUF, M_WAITOK | M_ZERO); err = t3_seeprom_read(adapter, aligned_offset, (u32 *)buf); if (!err && aligned_len > 4) err = t3_seeprom_read(adapter, diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index f57494065aec..8469997b00a8 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -2422,11 +2422,8 @@ t3_sge_alloc_qset(adapter_t *sc, u_int id, int nports, int irq_vec_idx, q->port = pi; q->adap = sc; - if ((q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, - M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { - device_printf(sc->dev, "failed to allocate mbuf ring\n"); - goto err; - } + q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, + M_DEVBUF, M_WAITOK, &q->lock); if ((q->txq[TXQ_ETH].txq_ifq = malloc(sizeof(struct ifaltq), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { device_printf(sc->dev, "failed to allocate ifq\n"); From nobody Mon Sep 30 04:45:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mS09Chz5XjvF; Mon, 30 Sep 2024 04:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mR2MqGz4FF7; Mon, 30 Sep 2024 04:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OtnNRpB2UM+DD8jthVxslNhmAb7MK+TYSxaT3+W5w=; b=vLOVB90iSyM5Px65rGdDF348eQb/xHUtZ3XH7NFjDMCp7ytye0JvZIKyJR0g6KEFAcvpI1 zWsohY9FexevhchEYaMxrA4zO+K4XUwyQIEOwi5zStfh0cme6ns5mQF7KguC7KU0WmZ0vl /tu6TzhgnavGuHDpo4mRTpBbcJrwUxSApebI5+VJbuJu3WyvkcLVgXXBhgb329bgmlvpAl djRAIPh/Y/eRc5EBl7jQv2/3lvhPNnaJyur8rDECMAS5gr7wUC56k9aKIYolmXHvug82mz 3eUlAa2ihxAEJTIMmDMwepwjXIvmQ+Sq8/0Xe+C28KeWdu8Wjzb+Zs51+AqmpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OtnNRpB2UM+DD8jthVxslNhmAb7MK+TYSxaT3+W5w=; b=GksTMnZFikw32af4grEcTT1y3ClTlE5Rz+l0s10W/UJA962z61BG2Jk9ZFrAwu5I8Mj8zb 18xt5+6piU6T0mzYYHoMfxeWLsDgB6gB3EsfMqVsSzGq70Xty9R610tsqUTyYHfyrDOVyy tm7nrt0yGZfzfnR3dzaordSQOlVcadAPgefMuiUQTxKWbrspMP1uPUgaFAw//eRu/xnLyZ H7pYA1Rae/nLS3i4TR5QZ7P6MvWCBXimVf+AG32AmG1kymsPFtLE+YVVTqGwLsz3yBVGA5 BN13jCRwv6IN8xb5JY7PvbV9jCadA1zxWKheMz0MUH2u4tZ7hfxtNYYiMEF+qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671527; a=rsa-sha256; cv=none; b=U/NldJzK7T1QkFkjiIpGtPWzHECtvwszxpdG1+f8v0GN1b27N9Zym9oorDzYc4Xc7yBfe+ 5//jBJY08D08j2g6G359rmPAGI2rzYCrsn+amgkP5TKn/haQpVBO3RLlzFYIgwxtCZGhK7 F4iP9khm7s3YN+slGV7CMnEjkiRGR43XRUWW5qVpNr/4zROmaOYhxF93A/yp3OQJtSX34b bL2g0Ri8QLFmTakcO58msVyfISemTMkLrDXePh1IaYwcqVsnxLRzsY+db70wC5hQ1oXGxR Ar4XYQdixFLzKZ33Ji6ukDspKj0Pc7GCvbxMhnnFulOrOCuvLD5/d0f5tHiy4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mR1qY0zf9S; Mon, 30 Sep 2024 04:45:27 +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 48U4jR24087025; Mon, 30 Sep 2024 04:45:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jRve087022; Mon, 30 Sep 2024 04:45:27 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:27 GMT Message-Id: <202409300445.48U4jRve087022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e763c326fc85 - stable/14 - bnxt(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e763c326fc85c0d8b3e86d954339aa847f13a934 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e763c326fc85c0d8b3e86d954339aa847f13a934 commit e763c326fc85c0d8b3e86d954339aa847f13a934 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:20 +0000 bnxt(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit dcd387aaa5d4409a7e99376e0254029fce1a48a8) --- sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index 2f82580352cb..72704c3db452 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -205,19 +205,7 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, } req = malloc(msg_temp.len_req, M_BNXT, M_WAITOK | M_ZERO); - if(!req) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - return -ENOMEM; - } - resp = malloc(msg_temp.len_resp, M_BNXT, M_WAITOK | M_ZERO); - if(!resp) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)msg_temp.usr_req, req, msg_temp.len_req)) { device_printf(softc->dev, "%s:%d Failed to copy data from user\n", @@ -237,12 +225,6 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, (num_ind * sizeof(struct dma_info)); msg2 = malloc(size, M_BNXT, M_WAITOK | M_ZERO); - if(!msg2) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)mgmt_req.req.hreq, msg2, size)) { device_printf(softc->dev, "%s:%d Failed to copy" From nobody Mon Sep 30 04:45:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mT6Dndz5XjvK; Mon, 30 Sep 2024 04:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mT4JSqz4FPT; Mon, 30 Sep 2024 04:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmBTBPCInDREYQVcIjraSjcJkRcFfD5RerQuwRF9PEo=; b=V21XxbDeU5p+0b8eiVV2yC1HagbZwbqz3lf4FyGtRQDfjsGU5QNj6rB7Wow4UNy/2jbOFt MqDaFZbOjLLW/PHWywe6I+Fr8fts7SQKlv3jIKCr7umLqIm7BQWx39eLbAakOtwMyBe1o6 X3ZCEbkDbLB/tnF2OgOFs3vZ3lX/nIEP1HZvXEsBRnMmA7QJbFdlArFeDAiR4BfoRvUXkk g6NRYiJX0d0Fn/aJPkREP5lsSM7SlKwcmowtDMSeIidmBg1d+to+LjFJ/2YUTfDZPE1+oz xrWUApKWunleFIkxi6BHulpLwNT2Q+YihbhNGYL5eynoBEObompNeE6vu80TsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmBTBPCInDREYQVcIjraSjcJkRcFfD5RerQuwRF9PEo=; b=W9pDmE4Cawu7PELfqOstD7i8bTyY+m47Bj2H4+by/z3Q+QOwHzwWbfHSY3nKlEpfomKW+8 4D1xQy/d6w2EhYXWtOYK/H83aEr3a0gfm/cAJnyF90/R6m9vI05p2crm8exbDu61UVmHg5 lYQIYTRC5lFs3Mv2vFxuKzlzEN317kSLli4jO2jfCmRa3lEMFV+QVRKuNhfecpBV8IA14X QIsEXEsYtMVH2gFf+UXvyru6X6XUm+P5/yzujItCJt2MRkQLvFuFC6o+JpQSSnxS48KuFm /YFh58a8vliuO5/EgHjuRwO0m5a5oWtj6d47eYSS2d1Vl28VQlGpsiY3jvjvbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671529; a=rsa-sha256; cv=none; b=tb7HEuFSkD6gJdzn9qqEyidD4D43oZT9dDN3Qj2WCGX8eORZuJgNffdMZNyjXJbNSFJDBk z4e9tMq66RPdm/p9MLrQ3RSJ/Ia3Ia1dG3nux99pFj4hSMb6E6RWPU4FqpERHkVex/wbp8 O093zfv8hK7WhT7f29tzptMxkXvSvUfIlrscegzBrCGF16N0Kf9ZsYhRDV81W1fVmpOZgA V6ttW6Ev1EB2YYWneW3ZYPhgi+7qg/N9PnZcBVRgWgD5YiGpbrEIggS+TRLsT/gsXmUIhv 3Oygi78RKW6cGpCbTKow9clehbUqsGo67QUb5Xb+nln/2pFLq8TgaHcl6IjwQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mT3tv2zf9T; Mon, 30 Sep 2024 04:45:29 +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 48U4jTic087129; Mon, 30 Sep 2024 04:45:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jTSB087126; Mon, 30 Sep 2024 04:45:29 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:29 GMT Message-Id: <202409300445.48U4jTSB087126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 09ed34449c79 - stable/14 - cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 09ed34449c795c137d0dd55890486165e2bb0c15 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09ed34449c795c137d0dd55890486165e2bb0c15 commit 09ed34449c795c137d0dd55890486165e2bb0c15 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:21 +0000 cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 955b380365af174b3d35905b7b8afae97506a0bd) --- sys/dev/cxgbe/cxgbei/cxgbei.c | 3 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 5 ----- 2 files changed, 8 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 193d58f9eda4..4ae0e4da717b 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -842,9 +842,6 @@ cxgbei_activate(struct adapter *sc) /* per-adapter softc for iSCSI */ ci = malloc(sizeof(*ci), M_CXGBE, M_ZERO | M_WAITOK); - if (ci == NULL) - return (ENOMEM); - rc = cxgbei_init(sc, ci); if (rc != 0) { free(ci, M_CXGBE); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 842e72bf8b2b..0d42c89dcf93 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2125,11 +2125,6 @@ alloc_aiotx_mbuf(struct kaiocb *job, int len) break; m = mb_alloc_ext_pgs(M_WAITOK, aiotx_free_pgs); - if (m == NULL) { - vm_page_unhold_pages(pgs, npages); - break; - } - m->m_epg_1st_off = pgoff; m->m_epg_npgs = npages; if (npages == 1) { From nobody Mon Sep 30 04:45:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mW1gxhz5Xk0y; Mon, 30 Sep 2024 04:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mV63q7z4FCD; Mon, 30 Sep 2024 04:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Ult7ENbyOHgfgA5tLzsaVF8LES7CKlmYO0Fd3oOyLw=; b=o38G6gff+ArLDb3+hZCtZbowph+gaNqTUM5fzEkmZLCeTOK8UFDH6dGEr3OWxCkQxRur+r LZwl2/6mKdYrjG8BVQdcK4MmD0xJJ1fcBmX8Ae+sQ+gfK9LnQLbbdJrw0Du4KpTKGDas/h LKp7F6LCrUWGvWVb88t+Fk6m0NFthhkligf6MC8DJU8NHKBv6W8ey369vpBJQnGV30l2ON 23h1MsEKbebdXedqVCow91TwpLc3ZMNXvRpwfoN4R0npuiwXX1sv9ZGCh2TT8vVhYacV81 XqC7blwDpX3W64HJmCT9cdk7tSq8lJTzAqLmE0aCJuXLKDtNQqQ4C9bBZxllSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Ult7ENbyOHgfgA5tLzsaVF8LES7CKlmYO0Fd3oOyLw=; b=IZzV2GZC3WTc8/zn3hJffUNXMAKsLjJx02lwnE7yBJ7OY9pGcQAWCxIo5cKL1gbeka0Iep OOYa4uQceeMmYvPjdTwpHXLkzcHDYD+Hu+9ODE0J1bwD49PR8RXjp+45ZRyOXJxZMvEKNX PIME7fXdHrl2VslR2Hm6nN78CLmIuUbq0INNKWRBtywtfyz8EGTs8IBnlI/c7OzTJj0Gpe FNKJRPYtb3aJMn7142Av1lU8GfKmnbr4UMBfXO2ERA5T78Be78buzIET3pfHpmQ03fxDl7 he519IzLHE/BP/zT7ihfSt1Jdf8aiObOf5SKgk0BbibzAXS/BCbRVu5kwb1Tzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671530; a=rsa-sha256; cv=none; b=qpRoQICTcwk8ayI3ZzSiSkERTzDvdBg5hbo7RPUBttTHxXhUqt5STxykcKUDwOsbHAvwXH I/sMaMDSeLmFse/4ec1FiP697Osb+NHqXpYwJvF66wOFRYbafssk3p3vKC8qR/u4YnCRIJ Ovbr4lkqVgK6kDoDUlWotZhwNwMXAWtsmEMDi8Sw9QJmutR6gz37Skpx9BdGomwf77JilS dy6Q7S0RhcUpWUPkCagnP8FSgBTBnvra9M8h1azTWYZppElqPNk3+kXLAI2P0tSAXKxcZr qBL64+Vyx6fjT8+hXCc5tosiBZ6pudjhjSdz4TSDXlI0qvgsZAw6bIhZJyxLkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mV4yPSzf2H; Mon, 30 Sep 2024 04:45: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 48U4jUOK087179; Mon, 30 Sep 2024 04:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jUod087176; Mon, 30 Sep 2024 04:45:30 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:30 GMT Message-Id: <202409300445.48U4jUod087176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 95532d15a12c - stable/14 - drm2: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 95532d15a12c9cbf7c5e62e912de90919af7db24 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=95532d15a12c9cbf7c5e62e912de90919af7db24 commit 95532d15a12c9cbf7c5e62e912de90919af7db24 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:21 +0000 drm2: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6dbf3aca4f5c4f7287f186360c2391f2adfea8d6) --- sys/dev/drm2/drm_buffer.c | 30 ----------------------------- sys/dev/drm2/drm_crtc.c | 45 +------------------------------------------ sys/dev/drm2/ttm/ttm_object.c | 5 ----- 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/sys/dev/drm2/drm_buffer.c b/sys/dev/drm2/drm_buffer.c index 8a674397262e..8069f2c8c4c6 100644 --- a/sys/dev/drm2/drm_buffer.c +++ b/sys/dev/drm2/drm_buffer.c @@ -50,45 +50,15 @@ int drm_buffer_alloc(struct drm_buffer **buf, int size) * variable sized */ *buf = malloc(sizeof(struct drm_buffer) + nr_pages*sizeof(char *), DRM_MEM_DRIVER, M_ZERO | M_WAITOK); - - if (*buf == NULL) { - DRM_ERROR("Failed to allocate drm buffer object to hold" - " %d bytes in %d pages.\n", - size, nr_pages); - return -ENOMEM; - } - (*buf)->size = size; for (idx = 0; idx < nr_pages; ++idx) { - (*buf)->data[idx] = malloc(min(PAGE_SIZE, size - idx * PAGE_SIZE), DRM_MEM_DRIVER, M_WAITOK); - - - if ((*buf)->data[idx] == NULL) { - DRM_ERROR("Failed to allocate %dth page for drm" - " buffer with %d bytes and %d pages.\n", - idx + 1, size, nr_pages); - goto error_out; - } - } return 0; - -error_out: - - /* Only last element can be null pointer so check for it first. */ - if ((*buf)->data[idx]) - free((*buf)->data[idx], DRM_MEM_DRIVER); - - for (--idx; idx >= 0; --idx) - free((*buf)->data[idx], DRM_MEM_DRIVER); - - free(*buf, DRM_MEM_DRIVER); - return -ENOMEM; } EXPORT_SYMBOL(drm_buffer_alloc); diff --git a/sys/dev/drm2/drm_crtc.c b/sys/dev/drm2/drm_crtc.c index b9415082e7a1..a163c7455773 100644 --- a/sys/dev/drm2/drm_crtc.c +++ b/sys/dev/drm2/drm_crtc.c @@ -662,13 +662,6 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane, plane->funcs = funcs; plane->format_types = malloc(sizeof(uint32_t) * format_count, DRM_MEM_KMS, M_WAITOK); - if (!plane->format_types) { - DRM_DEBUG_KMS("out of memory when allocating plane\n"); - drm_mode_object_put(dev, &plane->base); - ret = -ENOMEM; - goto out; - } - memcpy(plane->format_types, formats, format_count * sizeof(uint32_t)); plane->format_count = format_count; plane->possible_crtcs = possible_crtcs; @@ -725,8 +718,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev) nmode = malloc(sizeof(struct drm_display_mode), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!nmode) - return NULL; if (drm_mode_object_get(dev, &nmode->base, DRM_MODE_OBJECT_MODE)) { free(nmode, DRM_MEM_KMS); @@ -1009,9 +1000,6 @@ int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) group->id_list = malloc(total_objects * sizeof(uint32_t), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!group->id_list) - return -ENOMEM; - group->num_crtcs = 0; group->num_connectors = 0; group->num_encoders = 0; @@ -1997,10 +1985,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, connector_set = malloc(crtc_req->count_connectors * sizeof(struct drm_connector *), DRM_MEM_KMS, M_WAITOK); - if (!connector_set) { - ret = -ENOMEM; - goto out; - } for (i = 0; i < crtc_req->count_connectors; i++) { set_connectors_ptr = (uint32_t __user *)(unsigned long)crtc_req->set_connectors_ptr; @@ -2522,11 +2506,6 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev, } clips = malloc(num_clips * sizeof(*clips), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!clips) { - ret = -ENOMEM; - goto out_err1; - } - ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips)); if (ret) { @@ -2773,15 +2752,10 @@ struct drm_property *drm_property_create(struct drm_device *dev, int flags, property = malloc(sizeof(struct drm_property), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!property) - return NULL; - if (num_values) { + if (num_values) property->values = malloc(sizeof(uint64_t)*num_values, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!property->values) - goto fail; - } ret = drm_mode_object_get(dev, &property->base, DRM_MODE_OBJECT_PROPERTY); if (ret) @@ -2907,9 +2881,6 @@ int drm_property_add_enum(struct drm_property *property, int index, prop_enum = malloc(sizeof(struct drm_property_enum), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!prop_enum) - return -ENOMEM; - strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN); prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0'; prop_enum->value = value; @@ -3103,9 +3074,6 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev blob = malloc(sizeof(struct drm_property_blob)+length, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!blob) - return NULL; - ret = drm_mode_object_get(dev, &blob->base, DRM_MODE_OBJECT_BLOB); if (ret) { free(blob, DRM_MEM_KMS); @@ -3433,10 +3401,6 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, crtc->gamma_store = malloc(gamma_size * sizeof(uint16_t) * 3, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!crtc->gamma_store) { - crtc->gamma_size = 0; - return -ENOMEM; - } return 0; } @@ -3631,13 +3595,6 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, mtx_unlock(&dev->event_lock); e = malloc(sizeof *e, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (e == NULL) { - mtx_lock(&dev->event_lock); - file_priv->event_space += sizeof e->event; - mtx_unlock(&dev->event_lock); - goto out; - } - e->event.base.type = DRM_EVENT_FLIP_COMPLETE; e->event.base.length = sizeof e->event; e->event.user_data = page_flip->user_data; diff --git a/sys/dev/drm2/ttm/ttm_object.c b/sys/dev/drm2/ttm/ttm_object.c index 8c373618d7ac..31af15cf4c56 100644 --- a/sys/dev/drm2/ttm/ttm_object.c +++ b/sys/dev/drm2/ttm/ttm_object.c @@ -282,11 +282,6 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, if (unlikely(ret != 0)) return ret; ref = malloc(sizeof(*ref), M_TTM_OBJ_REF, M_WAITOK); - if (unlikely(ref == NULL)) { - ttm_mem_global_free(mem_glob, sizeof(*ref)); - return -ENOMEM; - } - ref->hash.key = base->hash.key; ref->obj = base; ref->tfile = tfile; From nobody Mon Sep 30 04:45:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mX3gWqz5XkKs; Mon, 30 Sep 2024 04:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mX0MTzz4FKW; Mon, 30 Sep 2024 04:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMepewXWptHS/0jEL9lhByCPEjwWPTlDLKpixj+ZpfI=; b=pSj9DmYh6H6vivYW+hgNai5k+lR9LghIbome2Y36fLHZiwYly3bSTgVnm+zUpG7IDAv8BH 15piDZ1nvMpziCphSh2T2VpLHLIRIOSDldybe1X7+lFLJWfzi863XbpjYbTmIZmXY/B7yh 8bP+m60krLuXZKnuOAhjgBbug9cs84isfZQ4XVE+7P023qy/eLPfG7ev9QfQn2hlTgVpFV PL6kMhs33tj/zXeCRCho5TrZg3B0bygYTTt8N2kTBV8AWM1dVu+57+QKHF+SWL8wXrwXmA z04wN2O3xUw1SejaCZegacdweYJe4QBYDttKfX2XyiRnk82erytGYPXnYFgbcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMepewXWptHS/0jEL9lhByCPEjwWPTlDLKpixj+ZpfI=; b=Vg0ZtOu9G/sfn4SbAcppjvbgAQH9sYdwa/91Tc57RXN8tBcyR313xLFwqjwVRkovFphTVz vimOMcbFuXcawlmPIcrb82AeXgSQCEgVX+R9J5unUpA0/rBtxZg6LK5EvIB4fC7Xq6/MZr 2h1JSHZJvTLbsgcle2TpwFloVHDsvjfFLU9O26KjRJD3yCx+tBv5VRaiMQN8HDadaUI3Nm q3pC7K3OmI59BqXgjMzZQqahJRp6+XPqxBbnHoqiiqr8+iIaOumK+BA4RnZDVFYh7GSjWw KvOcUZPxAEi7+tKeEiZTGsFQ1Ao9t3BkqY14Mz+XYQzYzZVOf8HeEEa+hLULyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671532; a=rsa-sha256; cv=none; b=SNacDiCagbmySlIGWgsR2sXBmiHpg3p5pAYgZ2OC9Jtf+hCjF/FrTz3x/ufGCpLHMhcvLP H5GEUXwPyHcg4/xbALXpTWMD+QvFtdBGN5l5txGk0GwFWi8HGavY89zTy5KbHgFfK9C7Yw DRn9G8MMIrlA/9k4KaWwWj1MyOjRD4GRvFQytT6oKSOGMBCvUjLTbECkb6DpHjVWXRSG2J xAmWhfX7FojSnScLLZzcw4DQplbtW6g8MWCC0GXXB7XG+07r8BoxWCdVHPbJAY4kKbD0XK 1lSbi+K9990VSS8FgtNdpEbzReTWL0uYPkwWYb4zfXvyhyKGJDaMrhRQZMWmcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mW6Dr5zfbh; Mon, 30 Sep 2024 04:45: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 48U4jV2r087229; Mon, 30 Sep 2024 04:45:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jVH8087226; Mon, 30 Sep 2024 04:45:31 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:31 GMT Message-Id: <202409300445.48U4jVH8087226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8c2d777a223d - stable/14 - ena(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8c2d777a223d56d63c55552e8ca1d689f7c58b06 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8c2d777a223d56d63c55552e8ca1d689f7c58b06 commit 8c2d777a223d56d63c55552e8ca1d689f7c58b06 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:21 +0000 ena(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 51971340bd3ff41591adbbfca68e9e753f6eb135) --- sys/dev/ena/ena_rss.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index d90a7fbb253a..41fa9c62f94a 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -279,12 +279,9 @@ ena_rss_indir_init(struct ena_adapter *adapter) struct ena_indir *indir = adapter->rss_indir; int rc; - if (indir == NULL) { + if (indir == NULL) adapter->rss_indir = indir = malloc(sizeof(struct ena_indir), M_DEVBUF, M_WAITOK | M_ZERO); - if (indir == NULL) - return (ENOMEM); - } rc = ena_rss_indir_get(adapter, indir->table); if (rc != 0) { From nobody Mon Sep 30 04:45:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mY5XCvz5XjvQ; Mon, 30 Sep 2024 04:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mY16sHz4FYd; Mon, 30 Sep 2024 04:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7EpfiiO4tGXH9i1uhFHvSceHFQ3Aq/FPcirdPoFlL4I=; b=ZeW5afUuaZAhJvinA03V62Lk2KdY2najtWgSDP+vhg2+29w70K1ue157fay+AAIfJD8B7+ Lm3cJ9heEjA0SfTbgqB+NEDv70Jrtc+iRglli8vz+8z+I67KaaMlTkCLlrqbCqcXJiRqnz U75JtR3sPHeHJNKD/VGkaLCthQ6HexMt9MWf3PRtohVOOcsWiI+wxee/yfLi1BJ1w6SRoU mxKBqaOg6ur1vpa4b6Zk1PNx6FYTv3PceCbBjCA5QlzwB10gUh1+u4Kbp5S+KcjHt9cpqE +vdOM8LbBphoBY3aznPskfjclnt/NsBEn9czSnbhnw9NR7g0V1UCFVShaS+i1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7EpfiiO4tGXH9i1uhFHvSceHFQ3Aq/FPcirdPoFlL4I=; b=idZZTQbNBKBZVzffuoAt63LlJSZ/ujDKHLw8Dk3Thx+x7BLlSTqP42b5KSZ56F7zUwYMv+ zT5sI5iDsdT1YTiKodkAnJwjZp/z1nMZ3tRAo49JknreF2/s+WtP1wNjkhVgbKDdSINNcB AmgzyWxjuwNuiLPtu20Q9p01+mGmKJQi5CFBPQVUwTrTSBeCiAmC/v7wT/U4El5l71jqRo CkoH++JBQ/t/SoxmnG2NRhGl5gAPmGgp9RG2DooG+y9HN5TZdwzQOSgU9Nc5dg4IOzmlqD 692/scsree/5Ea56XxYnbW8JuXPWyw27NZ7uL2nF7QT8MrBCxhE9zf/ivRao6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671533; a=rsa-sha256; cv=none; b=sU/v26Th65IZfx5JTjX6FdC/4u8lC5mcllNpwLf+pSMMAwH/ClJTDPMxW/5kSByd2GqFNr x8ooINxKL83JjsYAO0YHMzg2l70tl0Xt28nN+/1CcPLKS2BSI1jNG/8LCjJh1k17Qpe1IP MIqvE6xWr2PQGEXgz6b55BU9NcYf0jKL9Jx4WEzdymQBxxSHpqcl5YpeZfswkB/SMG4R/e d8xnHfrWcmbGGuWeu1xuV3z5VAozkpIqHgcWjX3XQG0YIwCU4pV3twSV51YVuG6SUoc1dc Sr1XXO0E0HxeYZv2Ao2l+2X5Em9OeYRiDAiDbA3pAxxzkovZ/5O9hC7XWOntMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mX6wFkzdwM; Mon, 30 Sep 2024 04:45: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 48U4jWiD087279; Mon, 30 Sep 2024 04:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jWiB087276; Mon, 30 Sep 2024 04:45:32 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:32 GMT Message-Id: <202409300445.48U4jWiB087276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e78c315e8941 - stable/14 - etherswitch: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e78c315e8941ff39d89c45ffa5841b8028a3bbce Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e78c315e8941ff39d89c45ffa5841b8028a3bbce commit e78c315e8941ff39d89c45ffa5841b8028a3bbce Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:27 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:21 +0000 etherswitch: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 48741f4ceca71523aa1fa8da3bb78b184fad4aca) --- sys/dev/etherswitch/infineon/adm6996fc.c | 22 ++++------------------ sys/dev/etherswitch/micrel/ksz8995ma.c | 22 ++++------------------ 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 2c6c83a4388d..64f61df93db1 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -179,10 +179,6 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_ADM6996FC, M_WAITOK | M_ZERO); - if (sc->miibus[port] == NULL) { - err = ENOMEM; - goto failed; - } err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], adm6996fc_ifmedia_upd, adm6996fc_ifmedia_sts, \ BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); @@ -255,12 +251,6 @@ adm6996fc_attach(device_t dev) sc->portphy = malloc(sizeof(int) * sc->numports, M_ADM6996FC, M_WAITOK | M_ZERO); - if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || - sc->portphy == NULL) { - err = ENOMEM; - goto failed; - } - /* * Attach the PHYs and complete the bus enumeration. */ @@ -281,14 +271,10 @@ adm6996fc_attach(device_t dev) return (0); failed: - if (sc->portphy != NULL) - free(sc->portphy, M_ADM6996FC); - if (sc->miibus != NULL) - free(sc->miibus, M_ADM6996FC); - if (sc->ifname != NULL) - free(sc->ifname, M_ADM6996FC); - if (sc->ifp != NULL) - free(sc->ifp, M_ADM6996FC); + free(sc->portphy, M_ADM6996FC); + free(sc->miibus, M_ADM6996FC); + free(sc->ifname, M_ADM6996FC); + free(sc->ifp, M_ADM6996FC); return (err); } diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index e512a86202c6..ccd7dbffa9e9 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -225,10 +225,6 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_KSZ8995MA, M_WAITOK | M_ZERO); - if (sc->miibus[port] == NULL) { - err = ENOMEM; - goto failed; - } err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], ksz8995ma_ifmedia_upd, ksz8995ma_ifmedia_sts, \ BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); @@ -305,12 +301,6 @@ ksz8995ma_attach(device_t dev) sc->portphy = malloc(sizeof(int) * sc->numports, M_KSZ8995MA, M_WAITOK | M_ZERO); - if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || - sc->portphy == NULL) { - err = ENOMEM; - goto failed; - } - /* * Attach the PHYs and complete the bus enumeration. */ @@ -339,14 +329,10 @@ ksz8995ma_attach(device_t dev) return (0); failed: - if (sc->portphy != NULL) - free(sc->portphy, M_KSZ8995MA); - if (sc->miibus != NULL) - free(sc->miibus, M_KSZ8995MA); - if (sc->ifname != NULL) - free(sc->ifname, M_KSZ8995MA); - if (sc->ifp != NULL) - free(sc->ifp, M_KSZ8995MA); + free(sc->portphy, M_KSZ8995MA); + free(sc->miibus, M_KSZ8995MA); + free(sc->ifname, M_KSZ8995MA); + free(sc->ifp, M_KSZ8995MA); return (err); } From nobody Mon Sep 30 04:45:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mZ2rFpz5XkHX; Mon, 30 Sep 2024 04:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mZ1rq6z4FbY; Mon, 30 Sep 2024 04:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/pG++KP5Vt0Jijn6GjFgcZQHXhiZ2aUelcgg47hwp8=; b=cbUgz9AMwZOT7UMVpqp8/ak9g3zieqecfaSUxUheN+dYtdyhvhv2y8JTngzBxmRs4JUZ9w V/VOiPRIIucTt/mBgQI4sjJW2NerISua7uNLDz7JF3aWkU2cRbhZUoiaRHuZzvibUQpRnA /3VLaMnay18x7jyFzmMLHVwXgUkfMIskca672AyvuuCEOXVi7/Bo+TQkQkZa++LTJ6ZHcm TxB+Hc72hWJ6jSz8Z6vFy5on/3jcuPsGuwyYLp+X3/USci0jRqm7rcAGnzHsPE6JiqNXwp W0/EPJ/AvaDMAC68gRmD7YM8SJFbhDS1O4Qo7DsNk7jQOz11px77r8c9QdJQjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/pG++KP5Vt0Jijn6GjFgcZQHXhiZ2aUelcgg47hwp8=; b=dCtdiyyZsIUa19u9szNPVTgdCWA96PDL2pGukxw+6h3vHwfFLMpwHESUM6yhk9lgx3n6Gw MMLpaOXFPbtG+JzMSEsxMYtIzV1ApJ9vpK1xPyTD/WUI7x4IdeYYJ/U6uAzRC4UJF2VV9p YKifSVawGZbCZHYfimhadWj8CArxDg9VTj+dSkZTvyUB/HYimOB4lMJWJFM54esrN3lr5K j2THxp1JfDQfFkkPJZ2D4yQ2SYA+11Ccr8Q3dRNFkP1t1QTxmiAHBK7aHydw+gynKBTomP O75R9TBRz2D2qr0WTuGFafvBLdnA+lFS37fPJWfGsU5P47jZn3LsI7XuuQafxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671534; a=rsa-sha256; cv=none; b=Ju4f2JW5Gt+BEYpje3qDi7VZdXGHXOBreyyLgDT5YLOrx6Z6EVmZGHV/+jdQAlx/i8Vykl Un1nEfKVO3HmyJin2soXrOZL2UFcRv7ycpRegw2fZrlOyI2EXSQejoa5GJdX0amYEkouOc xS3pPa8Mc6od8L+BA5vBCuVTRz2qVYbgjQV9WT2HSNXWpCwsGkqFxC17+ncT4SnrEU8OTb +3ry1q9+Y3vkj0+cQqG+5gZpvVunpCTjEciVQ2nSBsnY1LNeekOM33PmS+K3bITHFwup4r bRp9xSStIbOnCt4ANqrkzeAx8JYhaoO8LGW0br7O30lfnnGzybDL3WDPXbOo7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mZ16xszf2J; Mon, 30 Sep 2024 04:45: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 48U4jYRC087327; Mon, 30 Sep 2024 04:45:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jYRb087324; Mon, 30 Sep 2024 04:45:34 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:34 GMT Message-Id: <202409300445.48U4jYRb087324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6515ef4d2b42 - stable/14 - flexspi: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6515ef4d2b4251ff4c628577e93b3bd5c1ed480e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6515ef4d2b4251ff4c628577e93b3bd5c1ed480e commit 6515ef4d2b4251ff4c628577e93b3bd5c1ed480e Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:27 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:22 +0000 flexspi: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit d1a89bd9b6eb1524902b619fa092c7d6de63e623) --- sys/dev/flash/flexspi/flex_spi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c index 106a7845b2ad..b4c2ce985e08 100644 --- a/sys/dev/flash/flexspi/flex_spi.c +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -781,12 +781,6 @@ flex_spi_attach(device_t dev) } sc->buf = malloc(sc->erasesize, SECTOR_BUFFER, M_WAITOK); - if (sc->buf == NULL) { - device_printf(sc->dev, "Unable to set up allocate internal buffer\n"); - flex_spi_detach(dev); - return (ENOMEM); - } - /* Move it to per-flash */ sc->disk = disk_alloc(); sc->disk->d_open = flex_spi_open; From nobody Mon Sep 30 04:45:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mb5CxSz5Xk12; Mon, 30 Sep 2024 04:45: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 4XH7mb344Fz4FNW; Mon, 30 Sep 2024 04:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBDwHy60z43ST/Yx9UYpQ73C95WPG59o/U0WTaAYDQA=; b=a7ttbB7YIdyBE9t7p+G8MGqiLBqA36MdLVeEbTmA24FFbiv4O4Wz5nB0fiUuCNcUOYP31Q drzO8oC2NzEJ7rjP5odWeC037NDSAqZWHg3JOjlJ5f67qXWE+ym3D+LpVg3+LbaeNWTt0p YcFp4f4xndC9EkZAPLM/3sZ2WSq04HfSdcLTm46T/MYzrcG573kR+zNcTiK9cGfy7Bd3QJ PGWc2ESfyEpfMOD1VREXzKmfYBjCy6EFrOQ2cfLmNB4b4yh9qQXlvs68qByxgZIem5CEsp TBBWftBzEsmEwzzNCSx16EPjxK1yKvTrGeuii3tUe7jB5fmUKggqHrcTXoe0Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TBDwHy60z43ST/Yx9UYpQ73C95WPG59o/U0WTaAYDQA=; b=cfdS9+aWoNGNtVlkW4adjeBdCABTpPQkXA67G6BgoJOjjvk7TYyTIv3MavPSnh7gqFUC+n tkBcaUkpH9qzYwm5USyokOvk0IVuUCAQkFppWsuxzXM46nbN+SH4qXHnRfu+XeIRzeEMKE yOvsW4pUE7Sd2xwwh46jaXzGpxPljetYkpCzA8g3rMzKnqbdhLyJ5TsDzQ3m1uCnd5zsFa 56n3n6A4ChZp9YqB7G3n6t59Rcq4I0io/PSFjsgY+ZyIilJPUE0B6ZYxAF63xCjByRST9S tTN7bU/5p6BXeb+HJvnBk90HI3KpqHcwLFhWRt68fZ2+wHraGFI+X409TLsmXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671535; a=rsa-sha256; cv=none; b=QUO0Aqpdz2eYZjq+a/vhAKsi/1i33Va1fjQLN8XrPwrUnrlfG4tx/q24GcU/WyzFMu9RtR sD1trIXIQvgyOKPv7YFu6ygTzcpEs+YTJqatNbHqs9dyMlTxBMnjl2yprG6Ys4vJN6DGtF udxGcYJBldRucDiWJdajNHyEGr1UfUFl2Ro3cataY35gi2/dpjXEp+H47KYCd8oamWictD SHik9PJi/UGidcSNX7TN0rQeQUttgpqJDiJHkP2LvxsePhzGJvYNyASHHENjUGeywQ+3LN Jgb+FEs7eMH5z061ZEMF1ipJsYBA/azwHh4YtJkt8f+l59nE8yuTrsC1uPDkeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mb21gJzf2K; Mon, 30 Sep 2024 04:45: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 48U4jZe9087381; Mon, 30 Sep 2024 04:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jZSC087378; Mon, 30 Sep 2024 04:45:35 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:35 GMT Message-Id: <202409300445.48U4jZSC087378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f3af52726024 - stable/14 - fwip(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f3af527260242c570b3e2bea56287f1ad5abb7b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f3af527260242c570b3e2bea56287f1ad5abb7b7 commit f3af527260242c570b3e2bea56287f1ad5abb7b7 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:28 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:22 +0000 fwip(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4d47c7ca7baa1ae76cc1fc72ec85b475f1efd41d) --- sys/dev/firewire/if_fwip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 6350ec9cb56e..41143e2e59d4 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -304,13 +304,9 @@ fwip_init(void *arg) xferq->psize = MCLBYTES; xferq->queued = 0; xferq->buf = NULL; - xferq->bulkxfer = (struct fw_bulkxfer *) malloc( + xferq->bulkxfer = malloc( sizeof(struct fw_bulkxfer) * xferq->bnchunk, M_FWIP, M_WAITOK); - if (xferq->bulkxfer == NULL) { - printf("if_fwip: malloc failed\n"); - return; - } STAILQ_INIT(&xferq->stvalid); STAILQ_INIT(&xferq->stfree); STAILQ_INIT(&xferq->stdma); From nobody Mon Sep 30 04:45:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7md0SMrz5XkMY; Mon, 30 Sep 2024 04:45: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 4XH7mc3LJ7z4Ffb; Mon, 30 Sep 2024 04:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3pR/KU21c61vsx3FUQCt6s5GoJ4PIdesJOO5n9KMO4=; b=TMfcKGLEcGVgJV5QHGmG93zs+hETT9WeDavCuJfiEJyjn3QU5lJ1+8DRXj0Yr9Uh9zT8OK OepdwHvfWL+xeydB5a7QT6naQ5G2GJLn0UBxaoQeexbH6vRnfbJYIrJZo41zNpNp6Cr5hC wMX+/QOdzcJhl71gKQWj7hqhuUIaW9v0u7QhBb3UrO5AnP90KGefCOEmVB+FH76ZyTZFir HG+homGnRmBueT7bu7YVW4EdCN5NxQribyKPI/sqsB5vFat4BYEClj1Iy9ESQJqb/4KmkR HCAlsKgNN8Fjc0TSIejOF2HdAct05qAi+AvNV2uArPPxd5O3KLRaxn7uXTY5Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l3pR/KU21c61vsx3FUQCt6s5GoJ4PIdesJOO5n9KMO4=; b=uZthpnNm6CfaOaeFpuctobi5HyYG77sNMz4BmW12uqL21mCI12qdWZpQm8X7p1bxgEV7kq B20qjHmzX7tcrd+QqRBTFkfT/70o/tI86DE0+uv29IG99aFieGdd0Hzwrv40zm8fO+TaXs MggIPXJbjwn+BlADmcu/n+VWOnVhUhsFToLuOmepnV4iKIGWp5wncVWI9iFi1evWMJsU/G Qo5c5vbnJWfZSQv85eqFIQHcxbVuZvaIl//8Qvw0ncF6yFCbRQhI0WA9j1tf+l2/ybJN4x hvEp65TpCMnbWxQvcL5uVfalprYwsh7FriyFQHMkIg/KNh3RetsHC0LBOOxMzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671536; a=rsa-sha256; cv=none; b=MNS187Q30PLKLqctmyPDAEvuRBsduk4XZGh3OKqXvQ4hOkvFZwD2J9hJBac+xI3j6v61Up +HCrc0xdCISrd1LskgjfvkjnD/UmYpuFEuNdyFsXkp8yaCBQGSfbPBLNe6rV7D/mNkqFNX 5Zhskya8GyAOcvu+A0NC+9i4H2b+2U+0tKOns4tY6vytmOshhJnz0ktP0dM/sSfNrr6aYX 6zPJW6RuyLDC7PT2Vh0Hgnr3+RLKDjMMVNgv0GoN77soeBQ7HxiMCky/MUYpYCw0BoNb8v 9+h47kfktuMwg/dMLEfNFbFimfAfKGHscP1ChSMWnhx0wH4hSYFCMs42dghNLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mc2tZ5zdwN; Mon, 30 Sep 2024 04:45: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 48U4jamm087435; Mon, 30 Sep 2024 04:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4ja99087432; Mon, 30 Sep 2024 04:45:36 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:36 GMT Message-Id: <202409300445.48U4ja99087432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0341c77f203e - stable/14 - hpt27xx(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0341c77f203e5200470657a428f8ce63f2dc9988 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0341c77f203e5200470657a428f8ce63f2dc9988 commit 0341c77f203e5200470657a428f8ce63f2dc9988 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:28 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:22 +0000 hpt27xx(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 28e413a699838df6fa5b0504c9ceb92a515037d9) --- sys/dev/hpt27xx/hpt27xx_osm_bsd.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c index 32d3e465c569..a40cb69e47f0 100644 --- a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c +++ b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c @@ -94,9 +94,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; - hba->pcidev = dev; hba->pciaddr.tree = 0; hba->pciaddr.bus = pci_get_bus(dev); @@ -114,10 +111,6 @@ static int hpt_attach(device_t dev) if (!ldm_register_adapter(&hba->ldm_adapter)) { size = ldm_get_vbus_size(); vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK); - if (!vbus_ext) { - free(hba->ldm_adapter.him_handle, M_DEVBUF); - return ENXIO; - } memset(vbus_ext, 0, sizeof(VBUS_EXT)); vbus_ext->ext_type = EXT_TYPE_VBUS; ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext); @@ -168,7 +161,6 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_ext) f->tag, f->count, f->size, f->count*f->size)); for (i=0; icount; i++) { p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); - if (!p) return (ENXIO); *p = f->head; f->head = p; } @@ -1109,10 +1101,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1327,18 +1315,13 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } hpt_do_ioctl(&ioctl_args); From nobody Mon Sep 30 04:45:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mg1l4Jz5XkMb; Mon, 30 Sep 2024 04:45: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 4XH7mf65Lvz4FZh; Mon, 30 Sep 2024 04:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02eJ/Alv4sKOwzwQspzc8uIAb4wtBzFJ0uy7QT/20mM=; b=q1yLo344Kz6YzaL9sJtkRvs2t3Aeryg1yNxBRAKW4IHDI47tokCFbdyn+5jfVYOowdeEeb oDu/8MKJGCT74fBkeqkA6wnbeWabiBj+VOMNEd9zPdK0XwxrDm1AWp2jmraLgCbYtDYleD y0GM3ILtwwza/QBYUmlq7LfJCryEY7Dw8SvKSOepnWUyVi2IV1/1OrbYEZY2ThcrBuj6FQ chCoA0n4IlmHvXCvbTp6h5zD8oP65ur7eMM20fGBx3bMqk0lSFZsXMEjFEH+RkaouPAwWN qUKasrVbWnJ1SWpTsPO7gMSBCuGehXzLuwP1DVHhAVAIRHc/KbFj3OWoOjcFlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02eJ/Alv4sKOwzwQspzc8uIAb4wtBzFJ0uy7QT/20mM=; b=MvgdmOiYpT1au+RXl9q755QESDlZCl3v3p5ef3ytN+GJuFNrmO8UYfVPbpAkPT4tBdHSyd gBFzYLW0qbuP0vz+Ec3+ZCmt0HrX1+Vquw2YzTQqjO+iv4ezryNVddp0Z4hXDHq0otfL7H XhwnobiP1wJQJUKu2fvrrK2LBTIjTkgH5wY4a5/nHlhTOLfG8xwz9HiNOc5qkZMU1wgQNo Jod/pNnrfh6mcZ3LL5NBOxkIp6qVnAreE3bASoPPWO5ElwnO0XusJ8USZ6i4KFqASE0Dtj L6VT/XaYBkz3u6QQ4dF2ANxum6Xyw/ivwHlrGbJ+aZ6MNigXVbXQVvsRGx7K5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671538; a=rsa-sha256; cv=none; b=E3lNCC3f1ryiMYnOD945gmZQaLCsgzJpj2ZIrHPAd0GgLGr2fPwpwOvaKveVmP74fJO108 ow2eWKi1ha5wQNbbploPXscB3DfGzHGPQKvyAGjoLcj191vxhDvvB98fSHe6/hC3Pa12tg HWwQDx8dOs93zP/3AtbJKillTtXawOKl8vIPTnvq6gJEjnaSO0zIJACXCorpn3ZEMBrX8Y 9hTK0mNXPylv9+qOgwbUzhLUxk71Q6LSUHwP0WZwBDADkH2j8Oz0WhgyyzukfcImNZQj4g hEG4EbQqk7zN3m2QVfGE1U85IQ8zC7MohHZr4LGFyp6uMSHF/STSIQUvwlaITg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mf5G8nzfFv; Mon, 30 Sep 2024 04:45: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 48U4jc6e087535; Mon, 30 Sep 2024 04:45:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jccH087532; Mon, 30 Sep 2024 04:45:38 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:38 GMT Message-Id: <202409300445.48U4jccH087532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e4de0a965faa - stable/14 - hptrr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e4de0a965faaff171e6061714478c8f4eaec8cb1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e4de0a965faaff171e6061714478c8f4eaec8cb1 commit e4de0a965faaff171e6061714478c8f4eaec8cb1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:23 +0000 hptrr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 92b0370ec65d5287a1deec84fd513e320a8da736) --- sys/dev/hptrr/hptrr_osm_bsd.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index 4208dd620e37..055ad13b14cb 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -1032,10 +1032,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1252,19 +1248,14 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } - + hpt_do_ioctl(&ioctl_args); if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { From nobody Mon Sep 30 04:45:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7md6dV2z5Xk2w; Mon, 30 Sep 2024 04:45: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 4XH7md5NVSz4FNt; Mon, 30 Sep 2024 04:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MH+NDtS1SGDZOMPa6efGiXXI8+qFSuKsxSgSOLKPxwM=; b=kHbEWvrH8FZ0iyHEvjrbUzgjHGPiWyq4ohxhlKq+1i69KB/vNTf0AIJwYfPK/T1syQKGDO UH4RMNPLKHct0ffIDJ2gVqyHU7HunjupTpCYnF9D9ZoCWuEAywxaNGD8/eOIc7kfedaWWH dG8DkBScepXSeBVQQnzn0S47wARYdfesZNcf+subQgElVI2Pp4CXE9X2E/dWiQeFeP9nfV dIio+h8RdIgQDmGBuObrg4CiVvU9orcK0U2rlkE+P0UF1t6+9vz5NFesad8wrqWeZ5/QkO AuKpKLrtO/16G1hNHbktTyZC0K14TLPNhco8vDAHR6zmm83e/MV8pch1ElQysw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MH+NDtS1SGDZOMPa6efGiXXI8+qFSuKsxSgSOLKPxwM=; b=UanlTVRVvX6yqf7fRrmLV2yvB50W/JJHXLF+BB26fR5CTAOy0SLbL5whYAkgxWTExAc1Hs xdUW6hW+Yf6FjMIseObbMf5lrPbNev9kjb/DiROUR1YOEcAex/BcmEqkoOPAOan82vjSPB prTSRFt+Jt/4f2USJ2pUOCgiMyHJ3duJh4XKlJLqpxR8RS5/oTK+X328YesedU+cC+eNfN AQ705woTor3q4+/60iKp+DgP4vkGubHhDEck+SYZ+EkBDUvZ+7DhhWO70/OkQk/5j2RE2M OzfwE8htQnnvAui1SihAqS2M9nG7U3ewAgLVFL6h0Cv2JQbd9E9XadnLjxoEgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671537; a=rsa-sha256; cv=none; b=cvA0b13yVrsnWTCitMuN1W+0y7pcBe1F8CdaG7gZDN25Vh2JalUhTLl3cJHo2CyNxjXrBf 0wN002mCo6A1pol10ez0sCXKVJykK3/PagUS82agyRl40M1N516DnvJxJLDNArmG4FjaQS uGjha+/it7AxeL6vX2Tf5Aj2ASw8xnGl5ToNnlmzSt866K1DvmLnVf54Aa3fw/Koj2Sy+5 i04eLpj2eeCc+mPlv38dh+cVEr/lK2Ja++Xvt0dOlwVXZBDkqrQK3wodpDsmEdj66ftj5U ZRSBPX+tKWNZY38V20CSES7yHtH2lCUekKOPRIA1dTOWwUGxhvf4zOmHqFiU2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7md4B9GzdwP; Mon, 30 Sep 2024 04:45: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 48U4jbgm087487; Mon, 30 Sep 2024 04:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jbku087484; Mon, 30 Sep 2024 04:45:37 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:37 GMT Message-Id: <202409300445.48U4jbku087484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c860df902b6d - stable/14 - hptnr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c860df902b6d010cb18490580c776c4b0a6a9123 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c860df902b6d010cb18490580c776c4b0a6a9123 commit c860df902b6d010cb18490580c776c4b0a6a9123 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:23 +0000 hptnr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit a3ec5d3ee7579a26790a86ca4c074512946ab964) --- sys/dev/hptnr/hptnr_osm_bsd.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/hptnr/hptnr_osm_bsd.c b/sys/dev/hptnr/hptnr_osm_bsd.c index 00774bf9be4a..b1fcaae2fd7a 100644 --- a/sys/dev/hptnr/hptnr_osm_bsd.c +++ b/sys/dev/hptnr/hptnr_osm_bsd.c @@ -165,7 +165,6 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_ext) f->tag, f->count, f->size, f->count*f->size)); for (i=0; icount; i++) { p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); - if (!p) return (ENXIO); *p = f->head; f->head = p; } @@ -1389,10 +1388,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1610,19 +1605,14 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } - + hpt_do_ioctl(&ioctl_args); if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { From nobody Mon Sep 30 04:45:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mh51Syz5XkSW; Mon, 30 Sep 2024 04:45: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 4XH7mh0LKkz4Fb2; Mon, 30 Sep 2024 04:45:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tB/1cMRaSjjZ0QT7ooNRA9pxfomrBfZL5pAZC+GtLUE=; b=Lm5uwkoedgCDISyMuPawLiyv6db+X5mGx0BrrYqlZPRML9w2ZQD3pNuYNRHoJujX6U34I9 mE3jKFXydsH2AJSJbxTmch7copLT5H54GIu6vbM9PY6T5A3Lrnep4er/9zaIBU5Y3Dhkhj aHoxjqD3uug60uui22js7SP/eDwz1pGjEd+ewbV1IUm6l79phXvSOL5JHvNjeRJQXyG848 AvtkdjSABcqsxIahXGOwNbss5AZS22GJuirbFeNliMze8sB9UVfgJcxdxMKV44svHHL0H1 NutmQCWj48MCLcBe65p1uK1nMURncpCRtTPvtHQqn8UjFPlmkj8LnEzw5/CXJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tB/1cMRaSjjZ0QT7ooNRA9pxfomrBfZL5pAZC+GtLUE=; b=Dd+V+WvWwA7q07A2mWXQA9A/ua27JswZi7dIpT3rvEI+IG9mx4Ga0Pum48Y86G4eXzMLWx DST7zbAReJlwQu3h5YWgWBmj0cnlGDB67oXNQkrwUmo8DcfQQCjnsPQsAvR5UA4Sq4KUrq tA6/sLMdOYPGAyZO+GoHbQxhEWTgJsSCe0sBZUYX1Ck1EWyFVdB6NrELw7idX6OrvSQmzu g46VChJmaBW8lVInbh7QuIcSI1Ir/iieJqtBV/8s9EdGonG6Y8k+BvTdBCn2iDPf1/d/rs tFO5Zi808aH56TjF7UeDl+cYBpeezY9oA8lOMqvxOY4NoBulBfMi0MlKGU6fUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671540; a=rsa-sha256; cv=none; b=fe4h3VEYIWboov6auxOaf/qogmeOUwdzwSP1v6QtXuOiZaTpYRbWKprxp7yaB05pQeiGBX k0N7q9b6JIe2dapftDS3H/SJchG/SeeLOa+M/2+VE9tBoxDgxlWfzWJcGZ15Kxbv8NzGPf ppJW6/dtwIfzpEM7/KtmIkk4zW32s6RBdkw7HIqyd5vEc7nldXBbs5TJpkSNKcNuVvyI5j UBtL9sUnuFgYGoPM1qvwlOLEGloZ0Zv2OwQYEbOU1CuOse4pvYxBPfRiBY7sYUX5WyGgPR Wx0nNUhSdvxsN3EEH3kebCcrpHljLqS6r8d2lOoyY8USK2nEwILzjikYUXjmuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mg6Nj1zf9V; Mon, 30 Sep 2024 04:45: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 48U4jdDT087585; Mon, 30 Sep 2024 04:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jdgx087582; Mon, 30 Sep 2024 04:45:39 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:39 GMT Message-Id: <202409300445.48U4jdgx087582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: bb8c6f43256d - stable/14 - ice(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bb8c6f43256d234d492c267d74526fc62102b23d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bb8c6f43256d234d492c267d74526fc62102b23d commit bb8c6f43256d234d492c267d74526fc62102b23d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:23 +0000 ice(4): Stop checking for failures from malloc(M_WAITOK) As a consequence now ice_alloc_vsi_qmap() does not fail. Remove unneeded error checks. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 5f97656fa334b494d70866cb1bfff406d3efd92d) --- sys/dev/ice/ice_lib.c | 24 +++--------------------- sys/dev/ice/ice_lib.h | 2 +- sys/dev/ice/if_ice_iflib.c | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 659412450fce..7077859cc877 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -426,31 +426,21 @@ ice_setup_pf_vsi(struct ice_softc *sc) * all queues for this VSI are not yet assigned an index and thus, * not ready for use. * - * Returns an error code on failure. */ -int +void ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, const int max_rx_queues) { - struct ice_softc *sc = vsi->sc; int i; MPASS(max_tx_queues > 0); MPASS(max_rx_queues > 0); /* Allocate Tx queue mapping memory */ - if (!(vsi->tx_qmap = - (u16 *) malloc(sizeof(u16) * max_tx_queues, M_ICE, M_WAITOK))) { - device_printf(sc->dev, "Unable to allocate Tx qmap memory\n"); - return (ENOMEM); - } + vsi->tx_qmap = malloc(sizeof(u16) * max_tx_queues, M_ICE, M_WAITOK); /* Allocate Rx queue mapping memory */ - if (!(vsi->rx_qmap = - (u16 *) malloc(sizeof(u16) * max_rx_queues, M_ICE, M_WAITOK))) { - device_printf(sc->dev, "Unable to allocate Rx qmap memory\n"); - goto free_tx_qmap; - } + vsi->rx_qmap = malloc(sizeof(u16) * max_rx_queues, M_ICE, M_WAITOK); /* Mark every queue map as invalid to start with */ for (i = 0; i < max_tx_queues; i++) { @@ -459,14 +449,6 @@ ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, for (i = 0; i < max_rx_queues; i++) { vsi->rx_qmap[i] = ICE_INVALID_RES_IDX; } - - return 0; - -free_tx_qmap: - free(vsi->tx_qmap, M_ICE); - vsi->tx_qmap = NULL; - - return (ENOMEM); } /** diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index cfd848d370bb..6c010cffc0fd 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -830,7 +830,7 @@ void ice_free_bar(device_t dev, struct ice_bar_info *bar); void ice_set_ctrlq_len(struct ice_hw *hw); void ice_release_vsi(struct ice_vsi *vsi); struct ice_vsi *ice_alloc_vsi(struct ice_softc *sc, enum ice_vsi_type type); -int ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, +void ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, const int max_rx_queues); void ice_free_vsi_qmaps(struct ice_vsi *vsi); int ice_initialize_vsi(struct ice_vsi *vsi); diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 4e451bf3fb55..3de79787f6e8 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -631,12 +631,8 @@ reinit_hw: */ ice_setup_pf_vsi(sc); - err = ice_alloc_vsi_qmap(&sc->pf_vsi, scctx->isc_ntxqsets_max, + ice_alloc_vsi_qmap(&sc->pf_vsi, scctx->isc_ntxqsets_max, scctx->isc_nrxqsets_max); - if (err) { - device_printf(dev, "Unable to allocate VSI Queue maps\n"); - goto free_main_vsi; - } /* Allocate MSI-X vectors (due to isc_flags IFLIB_SKIP_MSIX) */ err = ice_allocate_msix(sc); @@ -3518,12 +3514,7 @@ ice_setup_mirror_vsi(struct ice_mirr_if *mif) mif->vsi = vsi; /* Reserve VSI queue allocation from PF queues */ - ret = ice_alloc_vsi_qmap(vsi, ICE_DEFAULT_VF_QUEUES, ICE_DEFAULT_VF_QUEUES); - if (ret) { - device_printf(dev, "%s: Unable to allocate mirror VSI queue maps (%d queues): %s\n", - __func__, ICE_DEFAULT_VF_QUEUES, ice_err_str(ret)); - goto release_vsi; - } + ice_alloc_vsi_qmap(vsi, ICE_DEFAULT_VF_QUEUES, ICE_DEFAULT_VF_QUEUES); vsi->num_tx_queues = vsi->num_rx_queues = ICE_DEFAULT_VF_QUEUES; /* Assign Tx queues from PF space */ From nobody Mon Sep 30 04:45:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mj3bmXz5XkLc; Mon, 30 Sep 2024 04:45: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 4XH7mj1NF0z4Fnl; Mon, 30 Sep 2024 04:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qw2VGB7ZG+WK4byvf5gqomghVH97Ksm9T78Mb1WbE+4=; b=YNbBG3bWdIj8RjZn92XPRgkgx1GSmeZMenKRwDm9Vsy5WAtIyukDWCr0Msk35zEDaS4xV/ M5GZ/IYHKwYvvawGrSI9GXkjmDLTqqSxWvhyMEOYdnEXifuuCnAlE4n+SB3iFsU8b2S1XK WIqOuqron4fbdd4CX94qnOe40fU3twMUyVQcLSvH2m7v2VaSdSX4NSPmxOkklz7heLwMD9 GJZ6cpn0PNr/UxFVSPBWOUBU1UJCEbWvY/I8dsJBhCGqEjj03sL8JUYqvn4M+LBLHV8znY cnD2m5KF5p2tVA2cfU3EsS5vUrw3mHud3ZFTNOiqPTZU/QbYTJOTzSknX/AQXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qw2VGB7ZG+WK4byvf5gqomghVH97Ksm9T78Mb1WbE+4=; b=j67x7I6MioIbxM9l/eD0iUblI8f6LiWJ5uR68n5929pGM34B6VvzGpV3RJk/eKqm7rdw+0 Y2ModmM6yErbPHrqYHtivcw5hZwhNpe2NiK54w2sQ0FJvSBsfrF9sWYErW0ls4ji1TJxiy x8wRUrAujH3izmlWQ7COtlNh6nrQitPwwk9py7PqUrFnDETnz2TBhyf/s482/Pq1n1ivQb xtMqD4dFZsfR7Lr3DfYXU892djlYny59kOtNyb4z55YnTraqR2Ors+oK/DaPa2R/tL4ZM9 Lxh0NIA/bD1mmaj3SG3ASKxdz47GQ/1fX4a6JBBrjsbCa7OpNeHjVHOI2Qcl2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671541; a=rsa-sha256; cv=none; b=wzDUCpR+hG8/sDIGZwJY8lFeX7EiBZo7VV4exHd6z2LnmtDCljzPZ0GXCFn9rAoK8SE1BK B1c6kGyIHOVxqluE7enjrLp/0hFFFau22X60O1WVOxtu+MlA49RUeZm9VudtAcGK7lawPn ebV1oakZXq7LYTu05eSwPb1Vb+IZoZKBGY9gTM+9ZjT5YHgI5X4pGYBpstamu4bPUeO/H0 nMiQp8TYf8vUwZloXggQ+RsItyPw4Qs1Nq6vosL526WpKTRDrNWi08ybfg2LG3kQaM22Be 5Qed1hJzeR6blTMmlpcHnpknt0bl6V6usVNqfgxxadpu3MNgWkPwQeug6g3F1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mj02ZfzfFw; Mon, 30 Sep 2024 04:45: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 48U4jeYO087641; Mon, 30 Sep 2024 04:45:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jeYd087638; Mon, 30 Sep 2024 04:45:40 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:40 GMT Message-Id: <202409300445.48U4jeYd087638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ec68da0a7e6e - stable/14 - iser(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ec68da0a7e6e8041672f515a6d09fe43ce8838a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ec68da0a7e6e8041672f515a6d09fe43ce8838a1 commit ec68da0a7e6e8041672f515a6d09fe43ce8838a1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:30 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:23 +0000 iser(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 40a6bbc4284111790d9240f8a24ef11a9a9ecb07) --- sys/dev/iser/iser_verbs.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/dev/iser/iser_verbs.c b/sys/dev/iser/iser_verbs.c index f5f057b961ef..f0c7e524ccf0 100644 --- a/sys/dev/iser/iser_verbs.c +++ b/sys/dev/iser/iser_verbs.c @@ -212,8 +212,6 @@ iser_create_device_ib_res(struct iser_device *device) device->comps = malloc(device->comps_used * sizeof(*device->comps), M_ISER_VERBS, M_WAITOK | M_ZERO); - if (!device->comps) - goto comps_err; max_cqe = min(ISER_MAX_CQ_LEN, ib_dev->attrs.max_cqe); @@ -280,7 +278,6 @@ cq_err: ib_dealloc_pd(device->pd); pd_err: free(device->comps, M_ISER_VERBS); -comps_err: ISER_ERR("failed to allocate an IB resource"); return (1); } @@ -343,11 +340,6 @@ iser_create_fastreg_desc(struct ib_device *ib_device, struct ib_pd *pd) int ret; desc = malloc(sizeof(*desc), M_ISER_VERBS, M_WAITOK | M_ZERO); - if (!desc) { - ISER_ERR("Failed to allocate a new fastreg descriptor"); - return (NULL); - } - ret = iser_alloc_reg_res(ib_device, pd, &desc->rsc); if (ret) { ISER_ERR("failed to allocate reg_resources"); @@ -509,9 +501,6 @@ iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) goto inc_refcnt; device = malloc(sizeof *device, M_ISER_VERBS, M_WAITOK | M_ZERO); - if (device == NULL) - goto out; - /* assign this device to the device */ device->ib_device = cma_id->device; /* init the device and link it into ig device list */ From nobody Mon Sep 30 04:45:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7ml6nMfz5Xjvq; Mon, 30 Sep 2024 04:45: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 4XH7ml2Sngz4Flx; Mon, 30 Sep 2024 04:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZbakR542Y5Cy/9+paqeGhk4mxJKrgWlefC5ioSdoU3E=; b=UZFhjAGO19UYdBr+zzqJsP91cCkNZn0ATkxWDZInCKsBitNm3oUpBwxtZwHK7fEQiRpDZm ypdz98mgXQNOQ4HKVEURAQIht0RsH88mEbg/VvDSHd7bAx1hy6V2T0q3wCNp4016SbYZVL +IIz9d//vCxwxcczNMXFbgsUej7JDNpcXfm8689QhzMJHMsFenTf2iKnb5qgwt65X/X004 e663MXkZLLWSHbAAsvYzb+9bnu6irEf7+cyt5t/k+ie6ehkuYu2t5Fbp7OYGoX7CPEUn/J oVXcWicCJn8KcLAW/CKmD4IMoIk8JD4Tjc/pFw0mvRBli/gTnzRiiQ9jgNJGoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZbakR542Y5Cy/9+paqeGhk4mxJKrgWlefC5ioSdoU3E=; b=lZfB6xC04+m4dnpgiQDffAyndu4DLYY7j9jSCKTu1kDTmRFXnyO0TiGdZuf9aRYmBC5hLE zh/qEdhL5dLvum8zttVNFMbEU1lQxACvr4+gIWbl9pn2bsceXpkLNJxubdOtg/Z9vIAEdL L+L/zFozRif/y4kuOaagD6YWon33tcaF0tRB9jxy+j6j3RmnS2DrddpCw79+rl/jYmQZ9/ 9/rIMOJ8tsh1WSNOAye4R3HcZBOzv0fiGq+AGJm5qFbiU9lpZYUdqqBpUNK2OxjBUGeRCb 0NWwATk8x35DzMmZH4ldJ6iJZdaGSM9rj5LwvoBFGgn3YtytDrN8ld+Fw/VQSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671543; a=rsa-sha256; cv=none; b=UGXt1T9gxy94H252YYR3QpgV5Ai3WFplNOvsZL6D/XeK2CsCAksltFM9IZ7PQUb4/4JvXJ +WQW0X8k42rvGBwbq+zKAJPP33NjnzL3ZBzTSN0wBtWmDxeF3ysX0HHhAvsVk+jwhDypT8 7NT4cNSdR9zRmzZtlWf18fcxahvLs4md6Thw4jPKMOFMuIWt4nCZ/WM1L8JCoDq32ayVte pwB2//bLGFPogN69040xpPZEK+UT0GR5E1BPYtCNSxOSXjizYnFuH2z51fbCsG8O3QdFY4 gVWjJ29bTlLD8Gye+YNSYi8oH4XYyUp0TBmv4eu5IMqYLUq9CVsEL6OlrkZsBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7ml1HwMzfbk; Mon, 30 Sep 2024 04:45: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 48U4jh8v087746; Mon, 30 Sep 2024 04:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jhim087743; Mon, 30 Sep 2024 04:45:43 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:43 GMT Message-Id: <202409300445.48U4jhim087743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 4fee8d3e92c6 - stable/14 - mfi(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4fee8d3e92c69d5865a7ef1a9102399b6fdeb9bc Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4fee8d3e92c69d5865a7ef1a9102399b6fdeb9bc commit 4fee8d3e92c69d5865a7ef1a9102399b6fdeb9bc Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:31 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:24 +0000 mfi(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 701308ef404f552034f8c3e3e912b41bfef28ee6) --- sys/dev/mfi/mfi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 3a61559d4605..f95ba0341a70 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -3633,11 +3633,8 @@ out: mfi_aen_entry = malloc(sizeof(struct mfi_aen), M_MFIBUF, M_WAITOK); mtx_lock(&sc->mfi_io_lock); - if (mfi_aen_entry != NULL) { - mfi_aen_entry->p = curproc; - TAILQ_INSERT_TAIL(&sc->mfi_aen_pids, mfi_aen_entry, - aen_link); - } + mfi_aen_entry->p = curproc; + TAILQ_INSERT_TAIL(&sc->mfi_aen_pids, mfi_aen_entry, aen_link); error = mfi_aen_register(sc, l_aen.laen_seq_num, l_aen.laen_class_locale); From nobody Mon Sep 30 04:45:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mk53drz5Xjxj; Mon, 30 Sep 2024 04:45: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 4XH7mk1c75z4FgQ; Mon, 30 Sep 2024 04:45:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LIC+XcId4LkbyGq5dQEuVwLvIAA93EQcQeRGPISfG34=; b=KBBwDvt92jtAfMgaCXPUBQ5kaZoyXlMqae8xI0PEo5jU0ALyXgM2KC2YGCGJ0q4OLpI9OL FGE13GJhnhrFTgI0PQ9ABI1rAEbEsrso3dhCPdmB6J2BFdJZonYyM+bBXmJ1gX8KxoXHN3 qaSnsLyjgkYOA3xYlvGizbZ8Z+sm9Ds9aXqQnhA+ZcwGn2yYoynNibhfFpF+AvdNUL1Zyk 1q1e/S+xPUQ8n1fqdaZmcmqoZyf1CJDteIo+dH1DfSAy0zHFfTeYthFo3zMxF95ORlQt2p QjyChaauJ+9ZrD7fmhnKb4/Zf3FVQ9PrTiiQiVhH9y89EShcEm0mc1QsnF9L/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LIC+XcId4LkbyGq5dQEuVwLvIAA93EQcQeRGPISfG34=; b=K88Q5x5kvTrm8dJ+CpQ3/Rv3yDePxmT7N7RtlxeIx9BMPpeDyc0k0M1E3OCt+ZmuT27hqK pn2Ip34ot3UOlXNkacMtzJJMsML38GNWgwBOrCFNHhJw/kwPPsB+Uiv3u5T90ApARiu8aB 6JX1hlOhjH/rgHmJZCC9eTO0kIth7AVQnVlLmwGa2SFhVQsWt92hm23ZW06QsgZDgWVvLg Nn1h+oZDvRVD+vYTfiEX2XwFnNS5PbnoXAgXFBx2TXB3RfAUE9hA0lyKBG8fj/X2aVndcf 4p3FcWSOlpn6hHLds0Di9JNwNhqM8Wz6iW15hpGYH4GhMP0u/oobCE4+N6d6UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671542; a=rsa-sha256; cv=none; b=hNgVZGa/fbb6okRq+DmuCvkf1nhpqwAtqrsugWUKNHshexa5SXOFJs9lzjJtsczaCcSs2k GlKLAyhLdE92YbPAuXHUWH+IhrD0sAKspBtpO+dziasOozba8uKRjTcgqpEcBJ6NvbVmRM Ra6Hsq8Lnbz6w0xV03FFN/4B1G5AW6n5n/lnlgDCFlVChx+MBezTpCl25W4+RDCl9JMibF CQNX4PDwKh3BTedKDsnlrVJu3Lob5NSfPtIxmX9kODl6/OyvO18guViKIfPX/AIkqWBy0B Lrslq+FaOx2rHigmBD9KVrtbal6vC7o0kyZuNQ0cziR+CsNvI0MqHkVOfKTq4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mk0gMBzfbj; Mon, 30 Sep 2024 04:45: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 48U4jfQU087695; Mon, 30 Sep 2024 04:45:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jf5V087692; Mon, 30 Sep 2024 04:45:41 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:41 GMT Message-Id: <202409300445.48U4jf5V087692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0fa85665105b - stable/14 - mana: Stop checking for failures from malloc/mallocarray/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0fa85665105baa1fafe22608304b4eddb2ad8949 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0fa85665105baa1fafe22608304b4eddb2ad8949 commit 0fa85665105baa1fafe22608304b4eddb2ad8949 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:30 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:24 +0000 mana: Stop checking for failures from malloc/mallocarray/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 1dc7a7b74b5ad37ff7c8dc22f1a710460a5f1dcd) --- sys/dev/mana/gdma_main.c | 19 ------------------- sys/dev/mana/hw_channel.c | 17 ----------------- sys/dev/mana/mana_en.c | 41 ----------------------------------------- 3 files changed, 77 deletions(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index d0438f127b83..090f6382b071 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -868,9 +868,6 @@ int mana_gd_create_hwc_queue(struct gdma_dev *gd, int err; queue = malloc(sizeof(*queue), M_DEVBUF, M_WAITOK | M_ZERO); - if (!queue) - return ENOMEM; - gmi = &queue->mem_info; err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); if (err) @@ -962,9 +959,6 @@ mana_gd_create_dma_region(struct gdma_dev *gd, } req = malloc(req_msg_size, M_DEVBUF, M_WAITOK | M_ZERO); - if (!req) - return ENOMEM; - mana_gd_init_req_hdr(&req->hdr, GDMA_CREATE_DMA_REGION, req_msg_size, sizeof(resp)); req->length = length; @@ -1008,9 +1002,6 @@ mana_gd_create_mana_eq(struct gdma_dev *gd, return EINVAL; queue = malloc(sizeof(*queue), M_DEVBUF, M_WAITOK | M_ZERO); - if (!queue) - return ENOMEM; - gmi = &queue->mem_info; err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); if (err) @@ -1056,9 +1047,6 @@ int mana_gd_create_mana_wq_cq(struct gdma_dev *gd, return EINVAL; queue = malloc(sizeof(*queue), M_DEVBUF, M_WAITOK | M_ZERO); - if (!queue) - return ENOMEM; - gmi = &queue->mem_info; err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); if (err) @@ -1480,9 +1468,6 @@ mana_gd_alloc_res_map(uint32_t res_avail, r->map = malloc(n * sizeof(unsigned long), M_DEVBUF, M_WAITOK | M_ZERO); - if (!r->map) - return ENOMEM; - r->size = res_avail; mtx_init(&r->lock_spin, lock_name, NULL, MTX_SPIN); @@ -1616,10 +1601,6 @@ mana_gd_setup_irqs(device_t dev) gc->irq_contexts = malloc(nvec * sizeof(struct gdma_irq_context), M_DEVBUF, M_WAITOK | M_ZERO); - if (!gc->irq_contexts) { - rc = ENOMEM; - goto err_setup_irq_release; - } for (i = 0; i < nvec; i++) { gic = &gc->irq_contexts[i]; diff --git a/sys/dev/mana/hw_channel.c b/sys/dev/mana/hw_channel.c index 1ecd276c0152..1d6a896d79dc 100644 --- a/sys/dev/mana/hw_channel.c +++ b/sys/dev/mana/hw_channel.c @@ -416,8 +416,6 @@ mana_hwc_create_cq(struct hw_channel_context *hwc, cq_size = MINIMUM_SUPPORTED_PAGE_SIZE; hwc_cq = malloc(sizeof(*hwc_cq), M_DEVBUF, M_WAITOK | M_ZERO); - if (!hwc_cq) - return ENOMEM; err = mana_hwc_create_gdma_eq(hwc, eq_size, ctx, callback, &eq); if (err) { @@ -438,10 +436,6 @@ mana_hwc_create_cq(struct hw_channel_context *hwc, comp_buf = mallocarray(q_depth, sizeof(struct gdma_comp), M_DEVBUF, M_WAITOK | M_ZERO); - if (!comp_buf) { - err = ENOMEM; - goto out; - } hwc_cq->hwc = hwc; hwc_cq->comp_buf = comp_buf; @@ -476,8 +470,6 @@ mana_hwc_alloc_dma_buf(struct hw_channel_context *hwc, uint16_t q_depth, dma_buf = malloc(sizeof(*dma_buf) + q_depth * sizeof(struct hwc_work_request), M_DEVBUF, M_WAITOK | M_ZERO); - if (!dma_buf) - return ENOMEM; dma_buf->num_reqs = q_depth; @@ -560,8 +552,6 @@ mana_hwc_create_wq(struct hw_channel_context *hwc, queue_size = MINIMUM_SUPPORTED_PAGE_SIZE; hwc_wq = malloc(sizeof(*hwc_wq), M_DEVBUF, M_WAITOK | M_ZERO); - if (!hwc_wq) - return ENOMEM; err = mana_hwc_create_gdma_wq(hwc, q_type, queue_size, &queue); if (err) @@ -669,8 +659,6 @@ mana_hwc_test_channel(struct hw_channel_context *hwc, uint16_t q_depth, ctx = malloc(q_depth * sizeof(struct hwc_caller_ctx), M_DEVBUF, M_WAITOK | M_ZERO); - if (!ctx) - return ENOMEM; for (i = 0; i < q_depth; ++i) init_completion(&ctx[i].comp_event); @@ -719,9 +707,6 @@ mana_hwc_establish_channel(struct gdma_context *gc, uint16_t *q_depth, gc->cq_table = malloc(gc->max_num_cqs * sizeof(struct gdma_queue *), M_DEVBUF, M_WAITOK | M_ZERO); - if (!gc->cq_table) - return ENOMEM; - gc->cq_table[cq->id] = cq; return 0; @@ -782,8 +767,6 @@ mana_hwc_create_channel(struct gdma_context *gc) int err; hwc = malloc(sizeof(*hwc), M_DEVBUF, M_WAITOK | M_ZERO); - if (!hwc) - return ENOMEM; gd->gdma_context = gc; gd->driver_data = hwc; diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 50a6192e5fbc..d5efb071a07e 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -921,13 +921,6 @@ mana_init_port_context(struct mana_port_context *apc) apc->rxqs = mallocarray(apc->num_queues, sizeof(struct mana_rxq *), M_DEVBUF, M_WAITOK | M_ZERO); - if (!apc->rxqs) { - bus_dma_tag_destroy(apc->tx_buf_tag); - bus_dma_tag_destroy(apc->rx_buf_tag); - apc->rx_buf_tag = NULL; - return ENOMEM; - } - return 0; } @@ -1156,8 +1149,6 @@ mana_cfg_vport_steering(struct mana_port_context *apc, req_buf_size = sizeof(*req) + sizeof(mana_handle_t) * num_entries; req = malloc(req_buf_size, M_DEVBUF, M_WAITOK | M_ZERO); - if (!req) - return ENOMEM; mana_gd_init_req_hdr(&req->hdr, MANA_CONFIG_VPORT_RX, req_buf_size, sizeof(resp)); @@ -1325,8 +1316,6 @@ mana_create_eq(struct mana_context *ac) ac->eqs = mallocarray(gc->max_num_queues, sizeof(struct mana_eq), M_DEVBUF, M_WAITOK | M_ZERO); - if (!ac->eqs) - return ENOMEM; spec.type = GDMA_EQ; spec.monitor_avl_buf = false; @@ -2043,8 +2032,6 @@ mana_create_txq(struct mana_port_context *apc, if_t net) apc->tx_qp = mallocarray(apc->num_queues, sizeof(struct mana_tx_qp), M_DEVBUF, M_WAITOK | M_ZERO); - if (!apc->tx_qp) - return ENOMEM; /* The minimum size of the WQE is 32 bytes, hence * MAX_SEND_BUFFERS_PER_QUEUE represents the maximum number of WQEs @@ -2141,14 +2128,6 @@ mana_create_txq(struct mana_port_context *apc, if_t net) txq->tx_buf_info = malloc(MAX_SEND_BUFFERS_PER_QUEUE * sizeof(struct mana_send_buf_info), M_DEVBUF, M_WAITOK | M_ZERO); - if (unlikely(txq->tx_buf_info == NULL)) { - if_printf(net, - "Failed to allocate tx buf info for SQ %u\n", - txq->gdma_sq->id); - err = ENOMEM; - goto out; - } - snprintf(txq->txq_mtx_name, nitems(txq->txq_mtx_name), "mana:tx(%d)", i); @@ -2156,13 +2135,6 @@ mana_create_txq(struct mana_port_context *apc, if_t net) txq->txq_br = buf_ring_alloc(4 * MAX_SEND_BUFFERS_PER_QUEUE, M_DEVBUF, M_WAITOK, &txq->txq_mtx); - if (unlikely(txq->txq_br == NULL)) { - if_printf(net, - "Failed to allocate buf ring for SQ %u\n", - txq->gdma_sq->id); - err = ENOMEM; - goto out; - } /* Allocate taskqueue for deferred send */ TASK_INIT(&txq->enqueue_task, 0, mana_xmit_taskfunc, txq); @@ -2353,9 +2325,6 @@ mana_create_rxq(struct mana_port_context *apc, uint32_t rxq_idx, rxq = malloc(sizeof(*rxq) + RX_BUFFERS_PER_QUEUE * sizeof(struct mana_recv_buf_oob), M_DEVBUF, M_WAITOK | M_ZERO); - if (!rxq) - return NULL; - rxq->ndev = ndev; rxq->num_rx_buf = RX_BUFFERS_PER_QUEUE; rxq->rxq_idx = rxq_idx; @@ -2808,12 +2777,6 @@ mana_probe_port(struct mana_context *ac, int port_idx, *ndev_storage = ndev; apc = malloc(sizeof(*apc), M_DEVBUF, M_WAITOK | M_ZERO); - if (!apc) { - mana_err(NULL, "Failed to allocate port context\n"); - err = ENOMEM; - goto free_net; - } - apc->ac = ac; apc->ndev = ndev; apc->max_queues = gc->max_num_queues; @@ -2892,7 +2855,6 @@ mana_probe_port(struct mana_context *ac, int port_idx, reset_apc: free(apc, M_DEVBUF); -free_net: *ndev_storage = NULL; if_printf(ndev, "Failed to probe vPort %d: %d\n", port_idx, err); if_free(ndev); @@ -2915,9 +2877,6 @@ int mana_probe(struct gdma_dev *gd) return err; ac = malloc(sizeof(*ac), M_DEVBUF, M_WAITOK | M_ZERO); - if (!ac) - return ENOMEM; - ac->gdma_dev = gd; ac->num_ports = 1; gd->driver_data = ac; From nobody Mon Sep 30 04:45:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mm5QdZz5XkSY; Mon, 30 Sep 2024 04:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mm3W44z4FrV; Mon, 30 Sep 2024 04:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqKJvQPfg5EckMCCNO/5+g7ELeLYWLZmwFp5shGyKVg=; b=x90Cir03/dl5+v4Le7kl3ef7zJlZii6IAOH1emlaMy9pDen5U3FH9N/8wfemDqvatNIsnG peFsWx7U0L3uiCjMBhCV8seGQlvnFuare+jO5HcyrGEDiYCCnar6S+WHbPOs7d9dZ/+hYb kgy2cJ7K1x9rtUXROcQUwUcigBa4YgxuTjG5ZKSqwFQl6LKnn156psvVH0x6U+2+uX+kfq m4nni6Z6TF8oPZuNNnvHedT1e3HlW+AZ/dntrW/B9zjWOoDkyN7cfBWWDPD2OKn/O+q1uw kB2GSPBiXoEjqcMtbqVv+rhWNgYKUMKjExPm5+zmWyPkF4Kfszd/XX0NPKoTfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqKJvQPfg5EckMCCNO/5+g7ELeLYWLZmwFp5shGyKVg=; b=EavbMhUrtvhXS7nzzp1RpMzc2omcvnVgkdae6swhOGW9ZnjR2FJE4bogSiSVjzEQrYzdmZ 02pPnxzrxp6BCnwTwqCLEhKq/6ekmt7BzZMXNXASy91X7pkstplZyYBAZ+vbCRb1E3ZiUO c1z+kmjOZN1pwKyEF9EoS4odZshJrIyXkC/EFpDFf/4+d8c1HjoBf8Er1TeGqLcqelON0L y6RCnKiTr8kIv4nOG5nud9QMS50rk8ikD3JOPTGlIrJeWSbM5UQK4t1hOELQrJ0cgYQnHn fSBYCvvzTScGwSSKYE+MA9+WlJl+iXfIIxRK/S5oIE9cqB4naErQxdYBsxUktg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671544; a=rsa-sha256; cv=none; b=GVINs9dyRY36ig0MINfGiZ0ERSQaoRwAZVPJ6l9tADsoe/Y0h6vT6Q/dgbEGE1ulVfI0qJ MBSu2UKLulEZgKsKvGSgGRUOtuJecsjXlI3c7OMqWBlF15HUwvplvCF1StYtQ0V4SvUyHg 7k0sO8I0S01+e31c2x7wrNv0ZGz26xdxA6BQ4ZYcR+w951cCy+6CTxZyaFzx4OZ83hSwdJ f+vjgB49t2w6ftWq1FS3EOMfYdgn/TacsTI1MeA29XX8TAi0U5ZJ89khQyLJzVJBgymIvx ui1/CQkAwqbh2vifyNbzpKpSgZ/npQpkJ0FGiu6KmhATeWL7Z+N6yWBmlXK7wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mm2d9Qzf9W; Mon, 30 Sep 2024 04:45: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 48U4jiCP087795; Mon, 30 Sep 2024 04:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jilf087792; Mon, 30 Sep 2024 04:45:44 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:44 GMT Message-Id: <202409300445.48U4jilf087792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: cf44738feb83 - stable/14 - mlx(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cf44738feb83b03f0726ae1dab83daf371aa2f0a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=cf44738feb83b03f0726ae1dab83daf371aa2f0a commit cf44738feb83b03f0726ae1dab83daf371aa2f0a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:31 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:24 +0000 mlx(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 556cd18fb07604e3442819b221afb2a19b924dbd) --- sys/dev/mlx/mlx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index bed697b0423c..63a31652682b 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -2075,8 +2075,8 @@ mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu) goto out; } MLX_IO_UNLOCK(sc); - if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) || - (error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { + kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK); + if ((error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { MLX_IO_LOCK(sc); goto out; } From nobody Mon Sep 30 04:45:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mq0Vtrz5XkLy; Mon, 30 Sep 2024 04:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mp4tbcz4Fk5; Mon, 30 Sep 2024 04:45:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APpUK+0Qb/hGPg+8HgvJUpSghA+7WKi4CnhCPPmQY0U=; b=gCU5W3ZHUh00lpxwX50RtkJFNrOz1y1PRzwZKVkhZF4JGgl70ws1PGnN5PDbvLX+y9/Xwd hV3Jc3Lqorkrc+2GX8TKc51UufbGOsDqrAWqxazVJWiy2oPX6+vOM5Z1ZPMsBZjPuJSbjp noGfcVZe7bXE8Nq1PJnDCYa7Na96Tw/ufpkN8GJF3pT9wbLwAxv3wmA5ahvQZKT2f69kDi NP/rmPSIXB4SgcOrXus+wSfB+pHLuDAuazyyG2TEHqY8FHWhpZOiJrNKMfeDWrX3Mq4x/l LfAjIrZUGzyGbZnMkj9+ORN3ND/fUoGK3WiO3I3TmP+vwA7yZAtkCaOJv53bBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APpUK+0Qb/hGPg+8HgvJUpSghA+7WKi4CnhCPPmQY0U=; b=YddT/Quwc93EOf1OlU24uF8fqQq/lAiLkBj0eauBymQlRgtkMcPurWQIj3q6NNJtojqUAE yLg5ydm3lt8CutDa14xcHMA37fQ+hfMRcOSccILeS4VV+F5gmda0UpKsoZqJA0jcGpVo/9 rfGLGsjNMvXuIgAW0sHXWLQw80TcKIxLSlX2rexJF22ORZ1o0OAy7+9+UEO8VUVBQtK3AR jfamG5P1KcfB/Id1VL64PxrqJpxOOleYYr3eVQP4knHHiPdqftGjhxl0nLUwK1fnruD3S0 M3fSxaoSEgLT0CSGGzoDFY0cvDvT387zq/XVRAoQZeMZaNA8dXNbcehMoRo/ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671546; a=rsa-sha256; cv=none; b=WCCi0dEaTyIwlJX85VPWDIiF9GMzWLXWwo4PEWWZX9L1h9QPaDIRbfAvJNp4uVaLMtd/2Y sG4Ce41esBzollS3D6ASSsZFagyIdRV4Rsowd+zmYho/YJboKMvkxhq+vju3Xk5J1rrUzY 5v1P+5+WTefzXOwXRs6LbpT1lY2MUxyQSZdfsDC4SLkou9Ex+Wy2GHxKmGZkZVYDPvnHFk IIH8V4p/fe5Ds6v52Tu+vYUtPcnLMRKL1sIgJ2dhFDFyikQ5xP/I0rj/HSVQ9yUwgqQFi7 QFT/qUtjY4b7tZ82CrFbza7LYzsy6XDgl7DZj8HJQE0oJvCbB/dnD5u/JtzlUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mp3v7vzf9X; Mon, 30 Sep 2024 04:45:46 +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 48U4jkAf087898; Mon, 30 Sep 2024 04:45:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jk7B087895; Mon, 30 Sep 2024 04:45:46 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:46 GMT Message-Id: <202409300445.48U4jk7B087895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3e51da349563 - stable/14 - mrsas(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3e51da34956345ca736944c8a296bb9103a01c6c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3e51da34956345ca736944c8a296bb9103a01c6c commit 3e51da34956345ca736944c8a296bb9103a01c6c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:25 +0000 mrsas(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit a38d9ad473123dca86108651ba10740055720777) --- sys/dev/mrsas/mrsas_ioctl.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys/dev/mrsas/mrsas_ioctl.c b/sys/dev/mrsas/mrsas_ioctl.c index 74eacfbeb9fa..8a85544604a4 100644 --- a/sys/dev/mrsas/mrsas_ioctl.c +++ b/sys/dev/mrsas/mrsas_ioctl.c @@ -462,13 +462,6 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) kern_sge[0].length = 0; } else { ioctl_temp_data_mem = malloc(ioc->buf_size, M_MRSAS, M_WAITOK); - if (ioctl_temp_data_mem == NULL) { - device_printf(sc->mrsas_dev, "Could not allocate " - "%d memory for temporary passthrough ioctl\n", - ioc->buf_size); - ret = ENOMEM; - goto out; - } /* Copy in data from user space */ ret = copyin(ioc->buf, ioctl_temp_data_mem, ioc->buf_size); @@ -483,12 +476,6 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) */ passcmd = malloc(sizeof(struct mrsas_passthru_cmd), M_MRSAS, M_WAITOK); - if (passcmd == NULL) { - device_printf(sc->mrsas_dev, "Could not allocate " - "memory for temporary passthrough cb struct\n"); - ret = ENOMEM; - goto out; - } passcmd->complete = 0; passcmd->sc = sc; passcmd->cmd = cmd; From nobody Mon Sep 30 04:45:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mp1sgXz5XkQD; Mon, 30 Sep 2024 04:45:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mn4Tzsz4Fgq; Mon, 30 Sep 2024 04:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4m4LrKCtYGwIxS0pI/Dq0kEAGPAXu+ch8Ftz252TGkA=; b=Lxn8INGXGKuaZDjHEi4EH72W4MFnyOouUHt0VR2CVZLsHrSpOMjJL4M7cccArCHcuXOyF0 IbLP2AIKNuVnFjg53TOghiGcLw7LYomLphW3D8BUXiGBH0OMpLafdOQ6NhgMHaeYa/qiG6 gPmymmC5fcyNJba6yPKPqqKavWCUCSCiR9Nf5u58R7yqbshjzPhDBDEC5BtlVsTk/vfYVU MvMflHMrP1I3IY0Qdl5Yn54rdfPdibDA/DsB2wE8uv8AtfBXD0a3P1cK+UHQD/yDbljUIH 79N16eoszUJmN9VQhcnGVfzjPl78ybM10iQkcgfAINTCAuJCWOqjd1YpgBr0Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4m4LrKCtYGwIxS0pI/Dq0kEAGPAXu+ch8Ftz252TGkA=; b=Mr9ps61IkSs+/7ZKCyo4HZt2rdJ+rYmFTG3PMMegoVptNYW7vAkPPqo+Ac4TeX0PoyWRRI 3JswRMxN3QkiVN4BJxz255DFy7kD6qpkSak5LfNlQOOzRlVdI9Lq2rcipuAAHON0I0hpn7 SsZ8jULC8dudQqfB6vsN6L8w4jTUbShPZLL0sNXdDdrcAKILkw8AZZSLxSOm9m2i+hRUuo hsQPqy5lRcxjx632gOqGYvzb9DmbsmbVgm+nKluaWgdEbeaUsQdsTbAqmW67Ax4x6EW9f2 kPOoBUoZUJ9sva+3CFLqpB+QreX/q1IHJdpMUxx1kNk3C9SgTS9hcqrZ1TB7lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671545; a=rsa-sha256; cv=none; b=uXoXLpw07z1GwoS/YhxPlGLS3PnxPFgcY7yTmylLu8sw94dFYn4Z4ACCLJJtyhLMVX9vjw bCHeeKLjDEwLKmgvToh0e7txfcmpPdUcYeVhIanxpKNRQH5aJmPwnKKNYtENvpnoQC5Bwu 64HmaYBEU7JwD5icBkT9iqiQ7u3kbNLmYtKIcArXYW3kT7riOKLt2k1D0/Qbup5KOzzBi6 KTe1mbIkbGYNz7RH1t8t1Vqq1nX5+opcak+VToPu9Ah49mrxtRKFgNH2uCKGVFwjcoKHRH 5A+3wPtHTPttW7ylASIUKiI43YyjIY/mnxZyuwkjI0Ue75jXn567dkZfow2ahQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mn3fkgzfPk; Mon, 30 Sep 2024 04:45:45 +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 48U4jjZD087845; Mon, 30 Sep 2024 04:45:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jj3t087842; Mon, 30 Sep 2024 04:45:45 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:45 GMT Message-Id: <202409300445.48U4jj3t087842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ae8388f726b5 - stable/14 - mpi3mr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ae8388f726b57773b9c7e7cd93966b27d39321dd Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ae8388f726b57773b9c7e7cd93966b27d39321dd commit ae8388f726b57773b9c7e7cd93966b27d39321dd Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:31 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:25 +0000 mpi3mr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 849f9ac370bd66993ce5cc6fca0d2ef9bd03c2c9) --- sys/dev/mpi3mr/mpi3mr_cam.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c index 4d17bb2338e5..7cc7c76cc202 100644 --- a/sys/dev/mpi3mr/mpi3mr_cam.c +++ b/sys/dev/mpi3mr/mpi3mr_cam.c @@ -2065,12 +2065,6 @@ mpi3mr_cam_attach(struct mpi3mr_softc *sc) mpi3mr_dprint(sc, MPI3MR_XINFO, "Starting CAM Attach\n"); cam_sc = malloc(sizeof(struct mpi3mr_cam_softc), M_MPI3MR, M_WAITOK|M_ZERO); - if (!cam_sc) { - mpi3mr_dprint(sc, MPI3MR_ERROR, - "Failed to allocate memory for controller CAM instance\n"); - return (ENOMEM); - } - cam_sc->maxtargets = sc->facts.max_perids + 1; TAILQ_INIT(&cam_sc->tgt_list); From nobody Mon Sep 30 04:45:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mr2R60z5XkQH; Mon, 30 Sep 2024 04:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mq5xx5z4FdF; Mon, 30 Sep 2024 04:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ1Ey+XJm+K392QC8iBCEtnlxP5VyxY23bMGgDCvQ8o=; b=fME8ss55PLqVOXQFgaL9FIBE+TWQvW3rv/ygTFxloDGr9XItcLC83PLrwp7ta6Bgh86+3N JzAI+cLL70r4NZTh5fRiTie4J9fFh5amr3k17dAkr5EIIUhwi+yAJYdxG1fasn3rEdvqiU O2tJvGVb40tc9ZUSqQ6nVmCq57NHQi2js220+0Q4uD55VChp0n2rJ0NrqzZlN5iH8+1jLE bX/RwnR49Nxc7Z8f1HqzB3PeXsjAVrk8z0uT7ChZASeylP5cPanHjM3HBAfufKSFeOvYwt P6Gl70q8eJtsd6Zd+GGal0xPmTgtYmyqwN+x4OUFrSIRB9RJ+BdeOOUKmWonLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ1Ey+XJm+K392QC8iBCEtnlxP5VyxY23bMGgDCvQ8o=; b=Mv4ZpCs9niyF9NA3zXzjXOfLuL9/mfoxhioMnemK4urACH8d/dfajtqOv0CD1Nt5p+ZmNJ J3fL3DpLrjf2LeSKzv7TFCqV46Rz0WeZS9OioJ4W0mLVXm+8fm7fL22TDEVLt1OlZ6k7oc Yrp/hyLs+AdkAKkwC8lTD2MH2qbCw30aYbzOBz7Kl/VijXuEABCdlZ9CKVHIOe086g00RG AS4uanc5lcudX+mREVwgMpPZnn9yrNQ1lGKaV8Pv11JIKjwWgiw8vlJkEENehQ68pzHbyP h+pVzhbMFaFDBTFMw7LEufTfOndld+W79bTzzN+I8ILFD1GAmbc3UHwT8+Jbww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671547; a=rsa-sha256; cv=none; b=wh+GbVGHaLOe/bnae+65bjZ7vC8c+smb2C1H8dq4mFwoG16yTdsOI/EM8GaOySJauUKbtf zkDKwnZO4GNG2M3qcKBpCZCwYAN19Q7vWKDNFmOverEjZVidZRQkc60XHJQOlYWN40EmWO bDzPtj774TN2s9pN4GXgY+ptNZqXJw6M8gr5jeIHKn9n/ehT4vqGbnNhGp8K48dy/WzOZK NSbHIyhEhM+TgnZeB4B29tcqoY75jyVwNy07n1E9algelLi5RhVYuNjdWQyWVBwqiXm5aU tnVznY0Up7YWxZrAaI2ny0ZQIK8okDXTespAhRZ/kDnNw8XwTnZWBEZV9kU5mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mq4th3zfPl; Mon, 30 Sep 2024 04:45:47 +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 48U4jlj6087949; Mon, 30 Sep 2024 04:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jlfe087946; Mon, 30 Sep 2024 04:45:47 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:47 GMT Message-Id: <202409300445.48U4jlfe087946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 025c47549419 - stable/14 - pms(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 025c4754941956e24830a9c3c6f5e2466b19a9e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=025c4754941956e24830a9c3c6f5e2466b19a9e1 commit 025c4754941956e24830a9c3c6f5e2466b19a9e1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:25 +0000 pms(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4fb8a80a78aa65e0b30bd5a74373512c678841c9) --- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 38 +++------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c index c24d03a178ee..4e697f06a4cf 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -318,13 +318,6 @@ int agtiapi_getdevlist( struct agtiapi_softc *pCard, sizeof(void *) ); AGTIAPI_PRINTK("agtiapi_getdevlist: portCount %d\n", pCard->portCount); devList = malloc(memNeeded1, TEMP2, M_WAITOK); - if (devList == NULL) - { - AGTIAPI_PRINTK("agtiapi_getdevlist: failed to allocate memory\n"); - ret_val = IOCTL_CALL_FAIL; - agIOCTLPayload->Status = IOCTL_ERR_STATUS_INTERNAL_ERROR; - return ret_val; - } osti_memset(devList, 0, memNeeded1); pPortalData = &pCard->pPortalData[0]; pDeviceHandleList = (bit8*)devList; @@ -970,13 +963,8 @@ static int agtiapi_attach( device_t devx ) } else { - pmsc->pPortalData = (ag_portal_data_t *) - malloc( sizeof(ag_portal_data_t) * pmsc->portCount, + pmsc->pPortalData = malloc( sizeof(ag_portal_data_t) * pmsc->portCount, M_PMC_MPRT, M_ZERO | M_WAITOK ); - if (pmsc->pPortalData == NULL) - { - AGTIAPI_PRINTK( "agtiapi_attach: Portal memory allocation ERROR\n" ); - } } pPortalData = pmsc->pPortalData; @@ -1227,32 +1215,14 @@ STATIC agBOOLEAN agtiapi_InitCardHW( struct agtiapi_softc *pmsc ) pmsc->flags |= AGTIAPI_SYS_INTR_ON; numVal = sizeof(ag_device_t) * pmsc->devDiscover; - pmsc->pDevList = - (ag_device_t *)malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); - if( !pmsc->pDevList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d DevList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW\n" ); - return AGTIAPI_FAIL; - } + pmsc->pDevList = malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); #ifdef LINUX_PERBI_SUPPORT numVal = sizeof(ag_slr_map_t) * pmsc->devDiscover; - pmsc->pSLRList = - (ag_slr_map_t *)malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); - if( !pmsc->pSLRList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d SLRList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW SLRL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pSLRList = malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); numVal = sizeof(ag_tgt_map_t) * pmsc->devDiscover; - pmsc->pWWNList = - (ag_tgt_map_t *)malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); - if( !pmsc->pWWNList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d WWNList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW WWNL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pWWNList = malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); // Get the WWN_to_target_ID mappings from the // holding area which contains the input of the From nobody Mon Sep 30 04:45:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mv4f0Vz5XkN2; Mon, 30 Sep 2024 04:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mv1DSWz4FkZ; Mon, 30 Sep 2024 04:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTpo8xH9IK72iIkVnalzAm9zcYgescylT10AD1Vrs5Q=; b=sXZUlmbb+XDutiRTIcJ8JZHCIk79zaHUF2BxoYWWw5e2h/0rb0JaLOFskUMn09TPiWmfpC g5XsnuX2O2qicZPqPjUOQyXqcwoAmxRp1xdUhmiD8WzaKpD5EKCFI+DjwA2AIQW7N3XunP kRmRVq2yGOQyMG9LJ7UHyJJG4AtQhNJ7zGAt9Gpw999K+RAscIJIlw2VABOURKYdEjYtl7 mupVFnk+Ij+So2B/DDs5dYLimA8O3RUP6EnM25HSobcFSDBwxjnXag5/WSIcri7HLRTrjz 60atD6CxtfCSpa+OGGfcGM5ousBBffQjuqeNm2wwUt9KJ14Ds3SWdzbKaZiVrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTpo8xH9IK72iIkVnalzAm9zcYgescylT10AD1Vrs5Q=; b=F8wI8JLBRRSxyNCQyHeUwzRZLxJG4fHA1HjYY+5m5TVxX0BxzlGrxsQeC7PN+JVBfAbZSH Qv5oknyN34F2VWyrShO6wO3aWvuh6lzi6ub3TFl4XAybL4xlAhbJ/dfJmI8xHEUUvG7BMx onUPapQ2U60VfEXg3iGeGpB2omMSLVg6oEUB16STcUcA07rD8vbGDmVnmmlI3A4QtkOKQl xRFOCAKT2ZiWAkdAmAwkc7heScDcfub7uFz1FW46U6IgbFH3K0+4VTWLdDncG56uqkgMsz apRcrKxz/pjwaYUNk4pEvpNLIIW3mndwMwXeJgVqgCOaO7spojhkeC++KtoxIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671551; a=rsa-sha256; cv=none; b=UqxP7jg7aOu+nB5pj/4pDaNaGYLpqGpp9JBjA/48xIq3gfEaH4KW6+C0Urd18x5dE22fss yjzg00U1aGp9ffJ1PuD+Ra3EIF9P9qQbKyYyr8ZjZVXoBVIbaP9XGeeqXKpJu5zbOzHljr Q+W2RnmzBeCEpkShx6e+O3OOf9nSCMeXY9wUr8RfU87B+o3gkx1ZvQSD62yrstmv5opEok KgzAt5fEYZZR68Zd7WPT2jwPy46RCDjlgPt4Ssq+V+ZiqUh1w1OeeJhXP7kjgUhny+nP4P 9zltydlaRo8kFiHc9iRWcDeOEUdRAWSZ5MipRmOgPuRr82UmDj7kZPSoAmT/AQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mv0ZG9zfbm; Mon, 30 Sep 2024 04:45: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 48U4joGC088100; Mon, 30 Sep 2024 04:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jodh088097; Mon, 30 Sep 2024 04:45:50 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:50 GMT Message-Id: <202409300445.48U4jodh088097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: bfcaaff418b8 - stable/14 - sound: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bfcaaff418b856ef3d2a5be665566f62824f2f09 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bfcaaff418b856ef3d2a5be665566f62824f2f09 commit bfcaaff418b856ef3d2a5be665566f62824f2f09 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:26 +0000 sound: Stop checking for failures from malloc(M_WAITOK) Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 59121599bbda1e4c3fc3c6e887cd48cd5e3afc70) --- sys/dev/sound/macio/i2s.c | 6 ++---- sys/dev/sound/usb/uaudio.c | 44 +++++++++++++++++++------------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/sys/dev/sound/macio/i2s.c b/sys/dev/sound/macio/i2s.c index 5f8cb3aa15f7..647d66c27bba 100644 --- a/sys/dev/sound/macio/i2s.c +++ b/sys/dev/sound/macio/i2s.c @@ -241,10 +241,8 @@ i2s_attach(device_t self) * Register a hook for delayed attach in order to allow * the I2C controller to attach. */ - if ((i2s_delayed_attach = malloc(sizeof(struct intr_config_hook), - M_TEMP, M_WAITOK | M_ZERO)) == NULL) - return (ENOMEM); - + i2s_delayed_attach = malloc(sizeof(struct intr_config_hook), + M_TEMP, M_WAITOK | M_ZERO); i2s_delayed_attach->ich_func = i2s_postattach; i2s_delayed_attach->ich_arg = sc; diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index c202ac581119..8238629a2a51 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2687,8 +2687,6 @@ uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, DPRINTF("Worst case buffer is %d bytes\n", (int)buf_size); ch->buf = malloc(buf_size, M_DEVBUF, M_WAITOK | M_ZERO); - if (ch->buf == NULL) - goto error; if (sndbuf_setup(b, ch->buf, buf_size) != 0) goto error; @@ -3256,31 +3254,27 @@ uaudio_mixer_add_ctl_sub(struct uaudio_softc *sc, struct uaudio_mixer_node *mc) malloc(sizeof(*p_mc_new), M_USBDEV, M_WAITOK); int ch; - if (p_mc_new != NULL) { - memcpy(p_mc_new, mc, sizeof(*p_mc_new)); - p_mc_new->next = sc->sc_mixer_root; - sc->sc_mixer_root = p_mc_new; - sc->sc_mixer_count++; + memcpy(p_mc_new, mc, sizeof(*p_mc_new)); + p_mc_new->next = sc->sc_mixer_root; + sc->sc_mixer_root = p_mc_new; + sc->sc_mixer_count++; - /* set default value for all channels */ - for (ch = 0; ch < p_mc_new->nchan; ch++) { - switch (p_mc_new->val_default) { - case 1: - /* 50% */ - p_mc_new->wData[ch] = (p_mc_new->maxval + p_mc_new->minval) / 2; - break; - case 2: - /* 100% */ - p_mc_new->wData[ch] = p_mc_new->maxval; - break; - default: - /* 0% */ - p_mc_new->wData[ch] = p_mc_new->minval; - break; - } + /* set default value for all channels */ + for (ch = 0; ch < p_mc_new->nchan; ch++) { + switch (p_mc_new->val_default) { + case 1: + /* 50% */ + p_mc_new->wData[ch] = (p_mc_new->maxval + p_mc_new->minval) / 2; + break; + case 2: + /* 100% */ + p_mc_new->wData[ch] = p_mc_new->maxval; + break; + default: + /* 0% */ + p_mc_new->wData[ch] = p_mc_new->minval; + break; } - } else { - DPRINTF("out of memory\n"); } } From nobody Mon Sep 30 04:45:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mt34Lhz5XkN1; Mon, 30 Sep 2024 04:45: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 4XH7mt0f1Hz4FsX; Mon, 30 Sep 2024 04:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DsjqXn+WuPlBswS9+xJ+UnOvx7MtMwbyCE0UiWb8a6w=; b=x8HP+sIT+91sQ/0qexEE4WWw9C6ifnC01mluUhDecMAQcHPK/wUfskEJBf48q6K2U9UeEC rfcJ6YyORiPCq8dkhujoSa6EVu7is8g5NXXATuyhKZ81LWtDQbjuVnfEvUqYRfjl8dr0Ey 8XjuUr8hlHqffInnf3OtZH/Rs2a1IPNhgN5hDzXptiPwJVBNlGbfplsBg8DwmUf/gGHc7Y xx1+wZwGOAXFvXH+69L7y2d2XZVyHsj5MO6wiOoCLlHzlEgwqf1OaNDjxdC5nwfru30eM+ c7o3EeZdJ3SIcWDUGo1s/OCs2KAj3tpgDY77qFVL8tKs4y28G6grYoUosBniwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DsjqXn+WuPlBswS9+xJ+UnOvx7MtMwbyCE0UiWb8a6w=; b=Ao9+8GSJ9ocM2ILb9ZgrHwtS6tYXmKlTzGJGRm9RrdSozWSngG5A9lkEJQuVwlgC4C/Jav Moj6sw8Y3V8MTPkyMuDmlk+NcxUYlM0YDvfdiJEiFPR5NLhP0ba+XOLmRF/BQj12Dyy/E0 zBSxnK5sZ2sgzFrPs9VYzl2jTxYTLrp3JKOm8K8W14ZIF2lU/vx5ujYYv51aZ7/iNCLKr3 j/oGEwJYIljXDIiVdVKHKcEZ8M7kgfctcO+LZKBt6A8nxGadOQqtjmwVsjklzI2K9xDrhX EGquZruRoxzbLccjvTrkgg5IXSoYPSGyrhixWXSL7cA20hLFVn1hn9cq1m8lOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671550; a=rsa-sha256; cv=none; b=oRWsB5oxa9BvUMFpqMnQoGh5XhjJgDyyQUvjhyyej9G5a7GvTIqrOtDEEXw0Jc7pMhndrQ /c6iOwqdTXZrxbm7CNfUMJfD262b3a8OEbyStT+EmL7LKMPiI7kaGQS9x1MpyQhz27sibb joNqspq9qut7GoDJewx6b34cO3GIcrlduwgC53y6I/KjHPxMP2UCC8u4qTzvOOskEg3VOd rxfaRxxtUJu4+mTNqSzk0G2HdE4DCEJn5V5wZKQ//EpF/fxf1RKWQsxOS8Zq7vRCt042Zh H7paBSGejSsqeAUAZ9Qm7Tcm7f9OKS0qdcXSoLRrKAl4LJZAOPHvkXHh5/nbbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7ms6fQWzfd0; Mon, 30 Sep 2024 04:45: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 48U4jneC088047; Mon, 30 Sep 2024 04:45:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jnOA088044; Mon, 30 Sep 2024 04:45:49 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:49 GMT Message-Id: <202409300445.48U4jnOA088044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 140a0c8f3981 - stable/14 - sume(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 140a0c8f39816648719d9670fb641c657732439e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=140a0c8f39816648719d9670fb641c657732439e commit 140a0c8f39816648719d9670fb641c657732439e Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:26 +0000 sume(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 761339c5544a360df9d3bab70675fea246eb6a83) --- sys/dev/sume/if_sume.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/sume/if_sume.c b/sys/dev/sume/if_sume.c index 4113af5a48b3..b6a8eb62219e 100644 --- a/sys/dev/sume/if_sume.c +++ b/sys/dev/sume/if_sume.c @@ -1196,16 +1196,11 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, { struct riffa_chnl_dir **rp; bus_addr_t hw_addr; - int error, ch; + int ch; device_t dev = adapter->dev; - error = ENOMEM; *p = malloc(SUME_RIFFA_CHANNELS * sizeof(struct riffa_chnl_dir *), M_SUME, M_ZERO | M_WAITOK); - if (*p == NULL) { - device_printf(dev, "malloc(%s) failed.\n", dir); - return (error); - } rp = *p; /* Allocate the chnl_dir structs themselves. */ @@ -1213,11 +1208,6 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, /* One direction. */ rp[ch] = malloc(sizeof(struct riffa_chnl_dir), M_SUME, M_ZERO | M_WAITOK); - if (rp[ch] == NULL) { - device_printf(dev, "malloc(%s[%d]) riffa_chnl_dir " - "failed.\n", dir, ch); - return (error); - } int err = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0, From nobody Mon Sep 30 04:45:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7ms1sXsz5XkJL; Mon, 30 Sep 2024 04:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mr68vCz4FkN; Mon, 30 Sep 2024 04:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evoAirIiEmAPDDhBvLpLB8MA2JZp7aF55SUT8VFbmb8=; b=LF/EiVJNgmsT9UB48uFsjd+Ezj9Lx/R8/yF9tyolTns/4Hg7Vg52Hs4zos3lH+07malxeC Zd2ohyzCl87R5CVQo0j/3UpvLj/SELNcNZJGNFds84/sysrwruNviz/rnPsIQ/H7oPva7y cmYuNe26sWLhN4QKJx1H69nZPu2lx/DcfVuHRoOc3LlFrXUalbGgcn2jr8Ujc5CtxzRgBL 6Lw+a4B0z42xCUYhKkaNbybOrritcEi86999QoWg5TMORrtsFZCvHJv23CqsDJxTHHECpj 1nfGdsDZhEvdjVPkmb/m3v5Y58l16ugJU47yWXVmedSgJVIBwt963TaMIaxFng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evoAirIiEmAPDDhBvLpLB8MA2JZp7aF55SUT8VFbmb8=; b=M47obyoq0NqcDdgY63dDmLxzHDWaQ8hSr6J1OHlAR1vOy2MyWQw5Q4gEYQDWOejv6wlIDI 1nP7X3hKqRmy10hwNbA+R0Zs4DtWknWiDWnJ2ZRbhE3DZu2VgLvS2DTxIQ7SlCpMhF5ylE h2GCCBUZ6VLK8PFNuJpWx3c9PjRBKUhyHB+biXIVt1h2pHh5EjY5aqrLoXtpoKgWjk4eDA vRQo9eu+FfSKrCF1tcpfHFDzP1n8RCR2WT086u9k+YU5mcQQmdlxJj2RyAFRpRdr+Z3m/g myYbarBIrunTXyXjHBuZYvJzGhmntsUN7PN2px2qfma65hefg27kVqRC3pkrWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671548; a=rsa-sha256; cv=none; b=eYDfcXl1p+oLnlQg6BtruIRT1traIOiHh3fyjmnMFH+gAJdfAu9lv5BUmXuds1ILUyhPSs DXHvzWZCtvBPxvo3zlsPpqRKGxISZN8OQxtYIesJGM16lcA1i7LsxFOqh8yJmu/7MczQmj TilwtRoyE88H7J0sxKjyoaNO2t8mkl5wU5mG7gVapBXpn559+RaxgdGOqfQU1i0+ROqEQS sdAxXbgSRSU+aODhNPCyrN6F+YPF1IPG//i51aJkjKEb2HKOdtFJJooGUjlm5Uj0R93H4L sm53nMTt3bFWvyOjBVQb8NAAfGyWICvOaSeOzhxW5kn48Uc8apUcSWiPn4VzZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mr5fpfzfbl; Mon, 30 Sep 2024 04:45: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 48U4jmRa087997; Mon, 30 Sep 2024 04:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jmeu087994; Mon, 30 Sep 2024 04:45:48 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:48 GMT Message-Id: <202409300445.48U4jmeu087994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a1075ea2a314 - stable/14 - qat(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a1075ea2a31428daac5e7308630ec68a8d4dbf6d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a1075ea2a31428daac5e7308630ec68a8d4dbf6d commit a1075ea2a31428daac5e7308630ec68a8d4dbf6d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:26 +0000 qat(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 866dc4bd81398b478daefe4b7447b92422b4a06c) --- sys/dev/qat/qat_common/adf_freebsd_dev_processes.c | 8 -------- sys/dev/qat/qat_common/adf_freebsd_uio.c | 8 -------- sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c | 3 --- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 5 ----- 4 files changed, 24 deletions(-) diff --git a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c index b8a17344bdea..a70f25d57dcb 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c +++ b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c @@ -146,8 +146,6 @@ adf_processes_open(struct cdev *dev, int oflags, int devtype, struct thread *td) return ENXIO; } prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO); - if (!prv_data) - return ENOMEM; INIT_LIST_HEAD(&prv_data->list); error = devfs_set_cdevpriv(prv_data, adf_processes_release); if (error) { @@ -573,14 +571,8 @@ adf_state_open(struct cdev *dev, int oflags, int devtype, struct thread *td) int ret = 0; prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO); - if (!prv_data) - return -ENOMEM; entry_proc_events = malloc(sizeof(struct entry_proc_events), M_QAT, M_WAITOK | M_ZERO); - if (!entry_proc_events) { - free(prv_data, M_QAT); - return -ENOMEM; - } mtx_lock(&mtx); prv_data->cdev = dev; prv_data->cdev->si_drv1 = prv_data; diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio.c b/sys/dev/qat/qat_common/adf_freebsd_uio.c index c109fc79b0f4..64efde72b4b8 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_uio.c +++ b/sys/dev/qat/qat_common/adf_freebsd_uio.c @@ -199,10 +199,6 @@ adf_alloc_bundle(struct adf_accel_dev *accel_dev, int bundle_nr) accel = accel_dev->accel; handle = malloc(sizeof(*handle), M_QAT, M_WAITOK | M_ZERO); - if (!handle) { - printf("ERROR in adf_alloc_bundle %d\n", __LINE__); - return ENOMEM; - } handle->accel = accel; handle->bundle = bundle_nr; @@ -294,10 +290,6 @@ adf_uio_mmap_single(struct cdev *dev, /* Adding pid to bundle list */ instance_rings = malloc(sizeof(*instance_rings), M_QAT, M_WAITOK | M_ZERO); - if (!instance_rings) { - printf("QAT: Memory allocation error - line: %d\n", __LINE__); - return -ENOMEM; - } instance_rings->user_pid = curproc->p_pid; instance_rings->ring_mask = 0; mutex_lock(&bundle->list_lock); diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c index 6fb4cf0bf2f7..954e31c683ce 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c +++ b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c @@ -123,9 +123,6 @@ get_orphan_bundle(int bank, orphan_bundle = malloc(sizeof(*orphan_bundle), M_QAT, M_WAITOK | M_ZERO); - if (!orphan_bundle) - return ENOMEM; - csr_base = accel->bar->virt_addr; orphan_bundle->csr_base = csr_base; orphan_bundle->bank = bank; diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 05a99ae43ab7..9b66ae4b2370 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -117,11 +117,6 @@ adf_attach(device_t dev) } /* Allocate and configure device configuration structure */ hw_data = malloc(sizeof(*hw_data), M_QAT_4XXXVF, M_WAITOK | M_ZERO); - if (!hw_data) { - ret = -ENOMEM; - goto out_err; - } - accel_dev->hw_device = hw_data; adf_init_hw_data_4xxxiov(accel_dev->hw_device); accel_pci_dev->revid = pci_get_revid(dev); From nobody Mon Sep 30 04:45:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mw6Sftz5Xjxy; Mon, 30 Sep 2024 04:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mw2jfMz4G3P; Mon, 30 Sep 2024 04:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jn1OtV8R8P2UbXOVACQeOC4h/IESsW0SGvU8arVw/XE=; b=hX8mpffM1ZXuypT/NVPhk3NYdu1mq2KrlJ0gfhng+Yl0SRm1Nd869rSY62juZUqHwUtIiV fnP0MbErH37Mj/yZ8e76PXc3Ir1xDW71Al6H7gThqic1x/2Qhm1X/87Dfa+3xV2lzdIDSL DJnvkJ6VccioYkxkhrAKTG20LuqpWcajY9Xs7Nu5TFTxkLOQES2fAePyc4A08ZeDs9eDw1 6G84OBfDShvCsMejW8OxYS80bMBK7T/KPiVLqTGdvljfVLE7Jx1qQa0bQ73KEMdkoOuczp ePvGn8o6MGQhoUEe6OsC8LK87e/n10xM8fcj090yIoIIEoqQfujIbe0bG4EWxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jn1OtV8R8P2UbXOVACQeOC4h/IESsW0SGvU8arVw/XE=; b=q73Z7BEEBSbRCNR2O6tJDMNdLMXjA2A+V+LMMn1lmzbuFGZBv4nrfaV7lgzeUIJPrF2xsG bgOZakD4Vvlu3WGoiatcuQIN+uTVECj8uIF4iRKYzGx+9ZY7tQY93slxqjqgom38zHblZx 9LNgEkTYcVjZIx4wIpN5bwlu5dB2lRehQD/x0YV7+WUKa3N8VgdobhyI7xZwLpsSvlZquj cl3QzOr0CUr54ZXKffLsn+8Jal2qCDNMcqZWYTRSmVtLfbhHy6pa6DHC8evBGGyrQdgRcw WAuLTt1kRIMLYPHmBagSlSikURkqodfSKnav1HzdVoLkYeurRkn8dEUXMDrQzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671552; a=rsa-sha256; cv=none; b=wUFjUeeSy6IqtQIa4SW1x17Fk5vdXzDdFQzeV1DEptXiJYcSd70BETJ/mFenzSozgsbg+a HbnHyFJK+Ze2JTYBSjNjdoJ9N9RmOCNCqepHYsBNTndutgCrQl/nFQp2gqn1pRcmPCWVYT HNRs29No6kC4ZyM4UGJAsl17Q6G3CFtmBrqkz/1xsfveNXPH5jom6LWUOZQrVyVqu7j5Ff g2GcJEdoggS2uLLZh1AS1BM79df/sQuCOg3wXPR9KiACeVDoAf+zC9gMNA7QRvPCogO8lE enRonDnqS/bKc5NHgTjJN3tnu6/xMTizDs7AeArbssF73bIROaJKuHvd4Ha5Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mw1ZZXzf9Y; Mon, 30 Sep 2024 04:45: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 48U4jqls088152; Mon, 30 Sep 2024 04:45:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jqgt088148; Mon, 30 Sep 2024 04:45:52 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:52 GMT Message-Id: <202409300445.48U4jqgt088148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5a7db2ff56f9 - stable/14 - sdhci(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a7db2ff56f9e08579913ae16850ff82617001dc Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5a7db2ff56f9e08579913ae16850ff82617001dc commit 5a7db2ff56f9e08579913ae16850ff82617001dc Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:27 +0000 sdhci(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit f80483cdd58a032ae2cfb2b9119824e9badc2c91) --- sys/dev/sdhci/sdhci_xenon_acpi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sdhci/sdhci_xenon_acpi.c b/sys/dev/sdhci/sdhci_xenon_acpi.c index f185944ff567..0f4e1da72ac6 100644 --- a/sys/dev/sdhci/sdhci_xenon_acpi.c +++ b/sys/dev/sdhci/sdhci_xenon_acpi.c @@ -88,8 +88,6 @@ sdhci_xenon_acpi_attach(device_t dev) memset(&mmc_helper, 0, sizeof(mmc_helper)); slot = malloc(sizeof(*slot), M_DEVBUF, M_ZERO | M_WAITOK); - if (!slot) - return (ENOMEM); /* * Don't use regularators. From nobody Mon Sep 30 04:45:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7my6Vwyz5XkWG; Mon, 30 Sep 2024 04:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7my4H0Fz4Fyw; Mon, 30 Sep 2024 04:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RXmtd2KOyOpD6OQ3Z9k5NlnvX2A9+DrTlt4TSo2Bzck=; b=G9rO/uLSgx5xjPiOHpkSCO67cuFI3LPu6T98FC/MWQ7OyplkEOd+myt2eaX2daXNVq7Q/z VXrVHWGFtzwrvczdzF0KJflHULVFp9Zjs4aGgUdlZo3lwqBtqZo5xx6tzreOKaQz6RmjqG x9jFomK/Unu9f/mzGVu4pYfGJJCmZ4vCJsCJfm25MbyuNpTvG2gbJrL9v4d9RYB+ye+1fh v4LnNNCmVIFOf952b3DMynOrQczJhc89M70VwL7iXcNLKFoDJ9n7QwpsLUpWHRnwyl2lQ8 Qp4k+yeLEhwkMhD8d4vmGKty6ki02pE7ytlApmJ2gbfFqfPdf5egOXNI/AcLsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RXmtd2KOyOpD6OQ3Z9k5NlnvX2A9+DrTlt4TSo2Bzck=; b=K2Nwmv+nFMhzBXVdgorYcUy0oQIofhmttM9ppgO90BQRiXyES9hz+JmaDUQeu9Ggu0U1hD EE7NStsZN9ZZeHGXfnDwtlc5ZcIhGQABJuEfvjp9rhpw+pUoT44ptOm8F83rHi5ir1Ii5x 9HYcEoDa3ymx/XXmcrvpu9au0eAW+e0kl4tvu5Vw1tYeG2NiZQcGgfq3eFKE7XGn+Hbiq8 TjgRK35knF/FXglWrZuPZinlwhU5LwhsyuyIMCJYw0yAw63TLkXu7GbR8e+Ed5EDkzNGtN P4qaqcGz2U0eyrMpmM3Cdq7YazlgViIPtpPysB6TsFE+7g1lhmLlsNkW9ls8Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671554; a=rsa-sha256; cv=none; b=u/f++n58aOKuNqWNO8GPMdZ5eFAGthYGU9/FPIyzJOzbWkaGEhqQa+jrDVSt529Fq/+h23 rwBIsZC2O1JRGF7C+alSjinXNZsFg2hL3x0YGMpA5tBwYTmilmYs3QnDQk/S3yA004lCo3 ej6xvUs6lo9GSBy5RnLQW/2ZSb2GM3/NyHw5iEn/Y9e5mYoVV9lciKJXs9P0obdF30JbuS 4hCu0ux+x2bxWi64UH7rOqilc6eFxaQrEt3WT7K8J+wzmdj1dQrYXYHS/E2wTp7AIBdPca yDoBWdwNzZaIpZgXPUYaQ9NKJmVbiNt4tUv+uQTk+uEy/rSLgV0CF2VyeFgraw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7my3YJTzdwR; Mon, 30 Sep 2024 04:45: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 48U4jsW1088255; Mon, 30 Sep 2024 04:45:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4js6u088252; Mon, 30 Sep 2024 04:45:54 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:54 GMT Message-Id: <202409300445.48U4js6u088252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5de9286b9af6 - stable/14 - ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5de9286b9af6e2448ab7d3fe749d37dd00b915e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5de9286b9af6e2448ab7d3fe749d37dd00b915e7 commit 5de9286b9af6e2448ab7d3fe749d37dd00b915e7 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:27 +0000 ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 3f3f3ca25bc453315c6a1f5d16bfcc1189d41bdd) --- sys/dev/ae/if_ae.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index 97b96161dfed..d6258af3b6b1 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -363,12 +363,6 @@ ae_attach(device_t dev) */ sc->tq = taskqueue_create_fast("ae_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->dev)); From nobody Mon Sep 30 04:45:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mx4Y1lz5XkJY; Mon, 30 Sep 2024 04:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mx2yDxz4FtJ; Mon, 30 Sep 2024 04:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQAcaZhpfbIT9OMb8sYF+qTRpfomMCk0216dky2+Y2E=; b=YYvwk3zt3rOW1mIY3VhFbva0B0e+dN8hirhQPEAo/44jLaMCEUrqkzcfESHedDTez6b7s5 x/JG/MFEXkycsyPUOx+JRkvAjP4he5G7TILQ+7KMv1BkPRUzVRsRZZaC1lhdNLlwTeuzxY zEVxXzJWVnhZQUWVtJbzjAnoIg/JjbXN6r0U4cOhaUlIh477y6PEEQmkSb4JRyb6ykJXqf TtIET0gfVBxitL1XPuVfOdZh2sxyV55SsJr0q4a6sChc41hwc+W54VKuFduuZCIwOuBpBJ oOFkzger/f1BgH1T6JoflB4T74kea+Mm0Bj8dugwksoptPCE5YY5HCN4YoKCQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQAcaZhpfbIT9OMb8sYF+qTRpfomMCk0216dky2+Y2E=; b=kHs88X3qRz1htjgSJ/UhDiLtNiFIsWdaHBunolaPRbixTfLvkkKQGCux72nhIRdpcQvxpO jIMUDfGY6bG4vqDKciGWkI093cp6J5EMgrUhKdOBJV1gJlRYCfyFiv+yUj1lSFEs4LgUOR S9Wi0bTA9Eso3Jlx36cmvm0nnTqxitI2sJ6+FO7TggO44C+348lvZnmfJqHUa3BXBPYJ2k aMnKojba974TvczHdJKIU7+KldTv6/+Kf6hyGqCqe1ENaMx3GG2Yqs+YO/C1QwHLAPzuE7 nKywDDsKVqJ5yLkxAQ0v8US62JXnK4AFDHt5IbL6F8zcr1+sFFwLLAOsvqxY9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671553; a=rsa-sha256; cv=none; b=sT7ZaJaiXZqwD3jV66CkwELAUxr6BiIj41NBgkLARgO4uB+svqu3xgdAiK/9b/sfWjmFcT LTkNic6p/h88a4qXR18alCpv9KtVyebaZKgcfHt+zkhqqGLUwXMjAvF7h0QqoGNOKRAuik 56PSgkEe5LRvzYwJEzEGuuPxGtCJtLyT69D66q2W1uNGxQAwWOO5/PKB3ngr9V6eBYvBlm 66GgBXmq2KUSnJAGj+Toq5PEXZeR3JHa1yE89c/hq7yaPRyMm+P3CxRFHMC3bAU7HdnNoc w9yePvebZNgWLnZ7GGpNxZRXB1mnePcvrd8iT5z4qJUAd5mEWbq03XgjRip8gA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mx2J4FzdwQ; Mon, 30 Sep 2024 04:45: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 48U4jrtY088203; Mon, 30 Sep 2024 04:45:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jrT3088200; Mon, 30 Sep 2024 04:45:53 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:53 GMT Message-Id: <202409300445.48U4jrT3088200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 40015f1c11ee - stable/14 - vchiq(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 40015f1c11ee2321485d0dd83cc2edb92236a541 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=40015f1c11ee2321485d0dd83cc2edb92236a541 commit 40015f1c11ee2321485d0dd83cc2edb92236a541 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:27 +0000 vchiq(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 778ea7ed5a23db9c4f9d8dc43a5cea26ded6231c) --- sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c index 279aacd0880a..ab8981e25cb2 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -278,8 +278,6 @@ vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, WARN_ON(memhandle != VCHI_MEM_HANDLE_INVALID); bi = malloc(sizeof(*bi), M_VCPAGELIST, M_WAITOK | M_ZERO); - if (bi == NULL) - return VCHIQ_ERROR; ret = create_pagelist((char __user *)offset, size, (dir == VCHIQ_BULK_RECEIVE) From nobody Mon Sep 30 04:45:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n014qxz5XkQb; Mon, 30 Sep 2024 04:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mz6cNHz4G1R; Mon, 30 Sep 2024 04:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uh6UZU+g5E1r4/5WgUtGyZ17+eLGzCHfEE5uQSee1lc=; b=VZV3QFe9GeD4grIWeOWFqTjCxZo49+ri8dK5Ny/qs1S2f/sXNwu0wdg+cSooBt83xNghar aHHk3gmf967A5iC9KyrFd9r0tKJX9Zx3jX60+kPUGansPr+iwb0ahVT0ZOoaCpEN0DkGDC nXIWNf/Iz1BD5dpNNzmiryxEejI9lzEj6lgqD8yBR3apTJR+73xXtSgdw7rZoczCf4vy4q M3bSox7iwOeOu4EdNPh4Gk+UwUEhkRm7g2DU1Aujm2GeLDbhKUzFtS7iLEH2F/Rm5JEuWf ZaO66MVkDf7cQxiBxW2zsVN+miCChBT+RpMs7OyPAGQyLOWPotUPb1fF86t9gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uh6UZU+g5E1r4/5WgUtGyZ17+eLGzCHfEE5uQSee1lc=; b=eiR2F6KsMBxoZ6zLHjFfc63KcUuzr6dzn18gVHAXnjGX/B/MXRO+jVpplJgc/SxI1DJdb+ jyxmWvXavkWYXWPYxq6jM5W+v+YtjLWQE2V56wKIh2BbP5hAWl04qiLv7vorbM8Sa4MEkN dqPADhClxd1BvnCUJDEhDxQq4HLHdiOPOMdM7F9H4GkFqIR+yC+ztPgYeL5PPg1+6Qa519 tSUPkGVkwtRUJfE1akx9oHOFe4MfXurMrDwaiKgKsWOBG6fSXbWv1hLkRdAtorMdWeSylW oItkK5nc8c0F78xGAe0rAq2OUKCCUbJKPT3RWo+XJ6EAZhS9jbwD5lQxyrgHcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671555; a=rsa-sha256; cv=none; b=yRfSj6pUqn5H9dyVYd1C3Oo9vePdEeNB92L4QA0hKTBOhvvWCaBXNoZxg32aajv4x4zXDo i0W3czsDd9Q4xGH8a0Hn1NxWM2CUjsZXwIr0UMfooDQnUV/fkT8aaMQDjePH0bhVNBf30R FyDzZbmzxrjMve3IxbJNYdr6bsIzO8+bRJMGMp5W6jbTZNOPq07aUz2+ymPCgoHFJ0VY/v w+XCwXNA4AW7+VchS8GJc0h2Q5r2gU6kOzSt16w0TyPwmNGbXRUfPIV6s0gvwxpGZgQees qXdG/K7JDFYtHbn41lU9U+AcOk3kQZRbWYPpSkzMEtXloW9+3s2BiZuBMEFNXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mz4PBhzf9Z; Mon, 30 Sep 2024 04:45: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 48U4jte3088307; Mon, 30 Sep 2024 04:45:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jteO088304; Mon, 30 Sep 2024 04:45:55 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:55 GMT Message-Id: <202409300445.48U4jteO088304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ea86e323e52f - stable/14 - age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ea86e323e52fe5bd7bac73ba2247b5ab0a3df052 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ea86e323e52fe5bd7bac73ba2247b5ab0a3df052 commit ea86e323e52fe5bd7bac73ba2247b5ab0a3df052 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:27 +0000 age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 5cece2c24bfa618091e778df488fb2380fcecafe) --- sys/dev/age/if_age.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c index 1a8b4aa6ad3f..180d9a368beb 100644 --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -629,12 +629,6 @@ age_attach(device_t dev) /* Create local taskq. */ sc->age_tq = taskqueue_create_fast("age_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->age_tq); - if (sc->age_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->age_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->age_dev)); From nobody Mon Sep 30 04:45:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n222T3z5XkN9; Mon, 30 Sep 2024 04:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n204KSz4GL2; Mon, 30 Sep 2024 04:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFw1nez+4W7n8oVUGk6ZpCmpm3IhzfPtTnoxsLXKF+A=; b=GIcSJ93eN3Fv4tKs6HFyCIJ1Stm8itM8PAGY/i5btR4BQNaxd3D6uJDTwv3/zAXeOLd5Yu NyyYhJ/ru4YdfVW3MfAo8bXfo6XNU2VJ958RDRvBYhqrHJyKPniWKtJNv28Kdt695fl1kB akNReVZn6Mg+1F73H6ijxZhDpVURx1DyMx7R0k9hlpHwGOc5IeTofDKtPDQTCF3hBmbshm +Csza1zUi2wj2xyOJjnjOxQnnadcHDrc2prRkMJaHmWoGKvk1Gjr36gC6ADbIAwodNyJVu n1lUN+KlTjgRJkeFP/tiJ3x9plTVUcqTmXB8y1/zdVGgaZZalccqtnkKN7ueGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFw1nez+4W7n8oVUGk6ZpCmpm3IhzfPtTnoxsLXKF+A=; b=gIwCta7q+bXAUPAP2ARpllUj5yJm2JS3Q6R1oRiFFsqIgZQzyKedI+1ou4M0O+CS1koIjX iKI2qifGo46FEToXo9h6gpnWwjbzAVvCqW2f1oiM38EvdTEUGHMLt9bXHBBQD0wBKNLBlg TtTBqa8qAp0bzWgeZ6HK3KT/B4O6tDAVnlC3RSCN7gh/Y7e9ecYPtkK3OAWc9eAiLdtf9k CSmTNbO0CZ7lzzuPuHFaPwN+9uq2pY/VT5Z5BMXxR5caoPZNFXMnIEnE5jryODFZ+M2soJ e9jSa1Yz+fXdiDtNMyeig42mbiyqkTUTedj923JzeqHA/oX/RIO9qZBxA9GoqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671558; a=rsa-sha256; cv=none; b=BNO5WawPmPtWLTC50Wfy+qnvK2WdDjzefV9QH2Wqth+EuTnyuGTTjXNXAoWQj3nBOkioRD N/b+/b2ETgmGzOezG7HzXT7jBqC35Lm4S2tISsedJT/YhIMOF8RcdQBjUenzJkbitYkDgy 1as87SMFpFRUIvbTDvOrhhlcp/Ax42b/TjGDc0gIeiRkVGmDlWSfyp6L2vXzd1izqc4xvU xEsofenVbI0E2pB0HEpG36yieft7J8wQ+NRfCfQQKQYlEk0Kmn/OUHxgfZ0kMS7x1Axy5X QedP7KbxJBXlIzCBajZpAnGfAagWFBaI14/2NdSuUwyuK+kWhwMDEZfJ8CmaEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n16BxjzdkV; Mon, 30 Sep 2024 04:45:57 +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 48U4jviL088406; Mon, 30 Sep 2024 04:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jv3G088403; Mon, 30 Sep 2024 04:45:57 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:57 GMT Message-Id: <202409300445.48U4jv3G088403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7ae70062241b - stable/14 - ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ae70062241b063e076935a9b8955d27ea84a3b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7ae70062241b063e076935a9b8955d27ea84a3b7 commit 7ae70062241b063e076935a9b8955d27ea84a3b7 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:28 +0000 ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit f5524be39e26e3d7fb774ffe7711602c676a8b9e) --- sys/dev/ale/if_ale.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index e8e7a55e9b8f..eba1a2430be0 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -656,12 +656,6 @@ ale_attach(device_t dev) /* Create local taskq. */ sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->ale_tq); - if (sc->ale_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->ale_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->ale_dev)); From nobody Mon Sep 30 04:45:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n10wmBz5XkWM; Mon, 30 Sep 2024 04:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n05vGwz4G1c; Mon, 30 Sep 2024 04:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KzX3UduUvm05P9eNvxLT/BKalSD6azNpAw1wLChZWA=; b=cUGLQ8duyNl/il/eDKlor2KKtvUrHP/OTjHeFdyhMKLYR3MmS+sfle1HfqPE43DUocyMxz PzNMdqbZUMzxt2CFxEl7uwH+M8wjyNLpIFdOFM2zBlgTQs5PpuFR2QwTfWox/vWUSiEkYP RXqq1DWD2fNONCOqWBNkib1Xk2CwHcz6V9nHU5L67dtCkCyS4vPhLW64JGG6ba0WQGcXKc G77LQ9gMAXIurF75f0iPuNv+5DrdId1FEu84jN39mpDs2Sy+vhgxS1WxwWVUvPguQnnQWu EZyleIwzSVQp5xPb7K6R308DCEeErwv364LKqm2n9ozBYpp8njOfuj9KDR4dBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KzX3UduUvm05P9eNvxLT/BKalSD6azNpAw1wLChZWA=; b=QvcwFRbNozoPHxrigKop4wVPWhkGcle4R87EzvETcXYg/XjnTeY+7+mw8ODfTuYJXGKT5F 7tKKfHwGZnIz8kJqbfkFRrnwloJckhh4vXSLwR7keSy4UEALaioANm4Q3HQJnnDaAcxtFX goO9eTgAQ4DXChq6SqNFVzbkoiNUOiEF5s5LfY22T7i11lHz2fLsTwylCgnvyKe0t6JW7c CuDsI9GgrIvfTPW8M1vSbtL4fKF9XwBbJ2nUaNA7QrjU4KmRnWa0F0Xclwk4Af3x9ASGXi rIBY9ZQktB5gu9bIepIFPQdXAf1yBOYAespo8T3JPhr1QBTip0ms0XysTkcQDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671556; a=rsa-sha256; cv=none; b=oWEaNQ/LZVkxi0G5CKgwqx6iOJQQ6P0s08v+o8aGsrF/1GT9A4SjvJRJ/pLG2r3ozfJWQz W5XK4APyXSJ21ekA2ULx9otEw7sqjBRZ1yuU/48lW2MqlBtuIJdn5Ibgju7/LmmcfwXsaw XzNPhJxZQGi+afjd3x9quJ/8ibl+MK/GM1y46Sxc3cvBM4P3Xle9Tz0RzrFWBpSDPPCbFX Ptb8cbirihE42+JsjJzjMg5BtdSshPWhBe+Fj5NgnDKD5fMDlxp5WFNsxRq36oClqINy1Q 7CNbLuYqKzv/SMmdhaqLKDpXlnH6b7JmQYSt0OUWHTA33LW00SNiSJqqDCSWBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n05RXlzfbn; Mon, 30 Sep 2024 04:45: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 48U4jusU088355; Mon, 30 Sep 2024 04:45:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jujL088352; Mon, 30 Sep 2024 04:45:56 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:56 GMT Message-Id: <202409300445.48U4jujL088352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a6c873a822b5 - stable/14 - alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a6c873a822b5dd51861616324abf3ba466958c7e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a6c873a822b5dd51861616324abf3ba466958c7e commit a6c873a822b5dd51861616324abf3ba466958c7e Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:28 +0000 alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 0cd3976d076218ea10761dc3f38ecf8549768ad5) --- sys/dev/alc/if_alc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index c83cd1bf6869..08f9f439aace 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -1640,12 +1640,6 @@ alc_attach(device_t dev) /* Create local taskq. */ sc->alc_tq = taskqueue_create_fast("alc_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->alc_tq); - if (sc->alc_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->alc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->alc_dev)); From nobody Mon Sep 30 04:46:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n500LPz5XkYZ; Mon, 30 Sep 2024 04:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n43fJ2z4G6k; Mon, 30 Sep 2024 04:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLw2rTVtaIuJhdMp9crzPKV8PjV5S05vOvFVF0ilTFg=; b=vBNG6sOG+A6qPjh4P0iqGRRf67U5EfpBpExMySMaFbuIgPGx8WigoSBNBxT0Q9hAFErY7x ueGqNw/xRxHRwnM5cONZzkre0PBzoBetYvn8iBzPWT4wQS4RDSuGpeFSLkbicZhuDDabhW 6mvnqoqaOv5WsAKVTK5BiTfDDC6YRXeCN+wUyj8UE+ID/p/HCNUoIZDhtvrNydCD1DUpYc 6HjOoAsLic0WCiWKbEzhk5zHbWngRnOIr7ZNoEdaEzSaz3WRLJhL7eW7ohX7OsfMXHMinc 3CALoT76GGLvjAmQjyoMNG+rbqhkD1DVr4KAccKSCf27kTex6/2cgJz+enNGTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLw2rTVtaIuJhdMp9crzPKV8PjV5S05vOvFVF0ilTFg=; b=s/Mn4OfGOGUagFaHlmXe+MIOHh7oVX2WPztAep+nv1xAH2Ohov0XGx9TI6VOBoOapTjpMh L5LLo4Y9YN26cXbDKMQRqdMVV+5T0Dq3qfg5dxLZ6GG63Fvn5qoraQ+1nNNGpK/GDSs8Cw mOylgYucv5af24eDdFVff6UY1AoG7XBHmDsoIni+LW1cF/2YQPWxRppq8HHje0hqhaVyh1 SlPii02p3O8MGwq4epr37RMrZWzVvpRYOxYm+V1k0V+64phk28KikgxUjXKjtz4yjq1jtt 3ZAkljBo+7b89cqgOxxYs50QVAciTxkYTiU70EFOexPz7EIRMd8KEtIFDedh9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671560; a=rsa-sha256; cv=none; b=aBvWNbiMQAhSfuYPLkeuar9UitpHjdlqO7TuOrwQZjH86eNcb+6ritVQdeH6Ao71FXcJHu 4vpgCkUQ5XgM6owMntHuDgZIqnpjIwN2zzMVLTmMiG1+XGqDWw7wW8VS3aYQxAIkd2UUNX /xUepk5gOIT8aYpDcUbGye/d/LuwVrmnIdXGxon/zR8Qdrl82tXrvRpw9DI+JxbrXBoRlV yHArTB9zXRE+uWPYr2xIldUrNxwmUQwva1EKC2rYp0Iy89J9xxjL4L1uiVvdLSBPWqIdp8 Ym4GYXK4JUsIOJdn6ILCl+mHf9Gqgq6JPTtOPR+zDlfnhcXTedyRCjCWV4SBSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n41MHnzdwS; Mon, 30 Sep 2024 04:46: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 48U4k0t5088513; Mon, 30 Sep 2024 04:46:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k0N0088510; Mon, 30 Sep 2024 04:46:00 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:00 GMT Message-Id: <202409300446.48U4k0N0088510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f5cbe8ce89f1 - stable/14 - bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f5cbe8ce89f1332e1188b9b315bc2707f50ef3d6 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f5cbe8ce89f1332e1188b9b315bc2707f50ef3d6 commit f5cbe8ce89f1332e1188b9b315bc2707f50ef3d6 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:36 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:29 +0000 bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit d44bc2f07b971fe1f451a1fff0389650a2502422) --- sys/dev/bge/if_bge.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index e8af6530354f..7aa25939fcf0 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3890,12 +3890,6 @@ again: ~BGE_MSIMODE_ONE_SHOT_DISABLE); sc->bge_tq = taskqueue_create_fast("bge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->bge_tq); - if (sc->bge_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENOMEM; - goto fail; - } error = taskqueue_start_threads(&sc->bge_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->bge_dev)); if (error != 0) { From nobody Mon Sep 30 04:45:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n335cGz5XjyB; Mon, 30 Sep 2024 04:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n30xfCz4G9P; Mon, 30 Sep 2024 04:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5dUecypT03ROYuJ+2nsOCsEelZ3+bJFmfXEqcD96Q14=; b=G+Fc4i4A170sN+UUnd/D2Z7uqs6O/ny5bjUjFeeAU8xgsn5Z1c+6IYKdUJYHM2cQzazxCO 0DgWmpSqg8xwiZTxfE/hlxvNMVLeBIqvuNph4dQez+rnuCKSyDOKI6I1i0uodB98WvNUNc FTYav/2wXV+n7Imak4mv4EF/2hkiy42OZL2LRHFSWg5ZNa2v0ElD9Oo+My67iG51IRRCfO biTdyiD6Pr4hX1ShXmTudA4FkCgCBSSWjwuZQQbkK61Epzo1VEsC3DmiLhV7US4ln3dM12 4ceTYpdc+Zc8YnD55Ac5FcZEMidlNV904qd/zVumyeS4xGYLuv8y19JtEGNnDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5dUecypT03ROYuJ+2nsOCsEelZ3+bJFmfXEqcD96Q14=; b=uWqvBQbcjewa+9xhBhJr7pa9X5x05SQwKokm1qXbYBuIs1DS/K5cBMUmN9B89N7eohwdXi EjCMjYVZ1jbkMSSzkpPtE6icwnnli8dtTGgx+1RRGQXT+Z4rbTx2AhAW/ubCdt5wRt6mb+ qB4/VlYsZL0ofL6iOo+BGyjeY4JL2hsDNVkVqBWVpSsMxsVStsrbMqoR4hPqX8RVLpf0j4 jfIZoxkKoCHNkB3BO6Iapfvl1ee5v96OjTk3EpBS1MCjDsyWdTZL9r3YSjsKGWx39dv23d QaBK2ihs4mdTf/u2fm7fmIz7LZgaqmiOTmpTRXxhuX2KiurEsxTm3B74BibdcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671559; a=rsa-sha256; cv=none; b=ZtVHStWP4pVjHE9Y/v/3XdRRl90Z7f/8nindZm6ZmYItuOpzgYJ10nR7DJHLqS9lQJzsgp j7rCOVS2N1zTAE8tS2UY9Jz/c2EAhz4Lv66uRUBjKdWwdQJNcDpYWfaDj72r7PvDmQYBmz 1bJcnP13DXZUhvym5X5hMLARpGT9Z4G7Ti2pEDHIw4h5uRgn9a6tPcyu1++I1lMZDKKvBj veokUC2eG8zYrxoSsorXgXqOiRs31qGzwsF+xoccsoePQNO0HpdG6Hl1KVuL83Dz6tDZkd SX+kjjUdtsswsSILItdkHEMG79py5aAnHHxQl70E9n9PXcvfXPRdwevEKCZCpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n30YYNzfFx; Mon, 30 Sep 2024 04:45:59 +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 48U4jwvn088458; Mon, 30 Sep 2024 04:45:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jwVv088455; Mon, 30 Sep 2024 04:45:58 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:58 GMT Message-Id: <202409300445.48U4jwVv088455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 39c35f6c5445 - stable/14 - axgbe: Stop checking for failures from taskqueue_create(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 39c35f6c5445d09b51a3fd366e8d64434b8fe7f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=39c35f6c5445d09b51a3fd366e8d64434b8fe7f1 commit 39c35f6c5445d09b51a3fd366e8d64434b8fe7f1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:36 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:28 +0000 axgbe: Stop checking for failures from taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit b29adaaf44f6cf9433c782bbeeefd12d74d395a5) --- sys/dev/axgbe/if_axgbe_pci.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 7a7c8539405c..5922e29d33a8 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -540,11 +540,6 @@ axgbe_if_attach_pre(if_ctx_t ctx) /* create the workqueue */ pdata->dev_workqueue = taskqueue_create("axgbe", M_WAITOK, taskqueue_thread_enqueue, &pdata->dev_workqueue); - if (pdata->dev_workqueue == NULL) { - axgbe_error("Unable to allocate workqueue\n"); - ret = ENOMEM; - goto free_channels; - } ret = taskqueue_start_threads(&pdata->dev_workqueue, 1, PI_NET, "axgbe dev taskq"); if (ret) { @@ -560,8 +555,6 @@ axgbe_if_attach_pre(if_ctx_t ctx) free_task_queue: taskqueue_free(pdata->dev_workqueue); - -free_channels: axgbe_free_channels(sc); release_bus_resource: From nobody Mon Sep 30 04:46:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n54k7sz5Xk3T; Mon, 30 Sep 2024 04:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n53g4kz4G2d; Mon, 30 Sep 2024 04:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gY2vGjWD5NvxW1VStnsiDu2iiIfqoSdgObTJ7Hn6ZvQ=; b=UOmpOWI4tMiNcZi6vREvTiDKSx0K1gkF87w5wGFA+tBkp/jLhgI8zvPdmUu97Hl8M4xeut 44IPiRpbmwr5xwg2L9QdLgyqdgQsn32IcVI8FKZZMwlO3sLrEBnlY1JDuluYvaI4nPcWOs J6KwqmRpZtRnN/9HcDglB4bTiOutK3ifQMuZZaIBm0QN+xhlWQJMXiZawZ/15oEvR5PhMU nCN37QHbMajY6Ej/+ZacvmUKrrVATzhBVCN+AVi8MKlZ8mVHTvQ78FvPvjIN8/yH70sIFQ AxU3rZ9MEIhY2IoJp5rl5DoKkeVmBDFpSr7IUr+fRTI/xCKQvmhGJxETTnlJCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gY2vGjWD5NvxW1VStnsiDu2iiIfqoSdgObTJ7Hn6ZvQ=; b=SXlKV7A09+T6IqWMb2zWQlh56s6UaeVPuFqj53wVyQVXgsTkDAST9T1Dxxs3zY/EMKlSTP TrxTsaJxoasw0ZcKqNotUhaOC1y0uRtXiMNaOH5m3zw9AeL14VyaK6EJ/8UMSYeFYcUyet DGjEfAh83okf0XnqWNVkJppUV/fQ3GDkQbKe3PmJwTa2lxX/BxEOUlR1IOBss5ZM83uJ39 XJfiqADUxr4YNmVkH94x6x/4ELoiu7a0GkQz81XdUOAtUONNSX7cwTCiakMxyFZ3gf3efe Hnao3qY14lV/0A1FiKjSUzlskEyHqfgESsqY5a9le7JUmmR/2aoVWShVcUn9/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671561; a=rsa-sha256; cv=none; b=eo8qvcBj6F+4AYIjTa6Yyo7LOSiOG7tgLuhoYIoYOQYHQmaLP55B2/+QSVpg9E2dFhDiHk 3rgnTAZIINSYFCU+EJbo9Q2obSpQ/kHTD0YY4mH0gdHK8/oFDKRR1rGDjgLwzmn7Ka9g14 kENEjvnjKxG77BOUlh7E0w14/Ld7AVXPYTggDkr+qdFpTo6EFAqWLayaJaLus9b1pOwLqv PL8iZmE1cXIxLYu8T+Zp2zMpCRzLSWyazRzBcjaTfG650HeAdxjm1JIlUzL7cZU5n3zuDl CEo4afSVTFm//pMvJZHvJa9chwpT5Bt4FJUvv1fHxe9vi8id23MFCqZ9Hni5DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n52XGfzfbp; Mon, 30 Sep 2024 04:46: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 48U4k135088563; Mon, 30 Sep 2024 04:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k1nw088560; Mon, 30 Sep 2024 04:46:01 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:01 GMT Message-Id: <202409300446.48U4k1nw088560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e78770d62f8a - stable/14 - cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e78770d62f8ad7e10f97defd3bb933623a3ded0c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e78770d62f8ad7e10f97defd3bb933623a3ded0c commit e78770d62f8ad7e10f97defd3bb933623a3ded0c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:29 +0000 cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit af28fc3c191cf572f7def767c60fff59d48947df) --- sys/dev/cas/if_cas.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c index 76d1b713e5bb..1f684097bd3a 100644 --- a/sys/dev/cas/if_cas.c +++ b/sys/dev/cas/if_cas.c @@ -205,11 +205,6 @@ cas_attach(struct cas_softc *sc) TASK_INIT(&sc->sc_tx_task, 1, cas_tx_task, ifp); sc->sc_tq = taskqueue_create_fast("cas_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_tq); - if (sc->sc_tq == NULL) { - device_printf(sc->sc_dev, "could not create taskqueue\n"); - error = ENXIO; - goto fail_ifnet; - } error = taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); if (error != 0) { @@ -462,7 +457,6 @@ cas_attach(struct cas_softc *sc) bus_dma_tag_destroy(sc->sc_pdmatag); fail_taskq: taskqueue_free(sc->sc_tq); - fail_ifnet: if_free(ifp); return (error); } From nobody Mon Sep 30 04:46:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n71ZSzz5XkNL; Mon, 30 Sep 2024 04:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n64WnSz4GD8; Mon, 30 Sep 2024 04:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYfwAUjvFYjdEg45tUZDkvJglUuLFWOUSBXJE/pedgQ=; b=K1ZfOxnuJqb5x0In8+OhsF5BX1R7/TVT6yFrP0bFX9TnUhq/K1gFzQURs30xC8Bj07nc8R b8XRgfoHQ6rNzhbx+Rpmocnev8PhFEbTh3XuCvXdOC8GE7VYhM1ZtFkNtEAdsepvxoIdhB 94gjsNqe4uVst5DsbDfIKW3I9zaHr5JrHCrxGiVFIUa58Wl5P9v9k7nNj+Q7xCvuDluPI5 8UQ8HsINm5Yj/026JSnJMr5ZcfPMeQg1fDurf1TlaAq13fL7rZww9qxRPBEdZGTV/Xb7Em Pbphe7U99JMkS4QdnsevQIkAIUvOwjJMaIyQPn9E0PnwkCqo6L0bJmyLg+qQRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYfwAUjvFYjdEg45tUZDkvJglUuLFWOUSBXJE/pedgQ=; b=y4L0SMCMGMriL4WxXilA1mO7tzo63WoF/uFr74x7F6KfXzj6UCzl4aN03fvWNIUGCaPOdN MnGnXLwVmv7p8+v0B7oOb14dMidkIX2fYCB+lLmpkbWIqT+JbDrFCo/8jHjd4nQBH49vsm sftwmU9lKN54rBxXmZcuenE89L+/+NX2wsVzdkPPqc2E1dPeMHeNT/m17l9KFVuOqQ7U/G Xv9LJOwr0avDSepoIPcBsKOep+ZmTiAd/EraMMyFyICIwcOYkwaoKNLdzHCKZUd0xwvbnT 8y2x/Kwy+i8mEG0vDal1BhxdnatAaVujR25y474hWY5wCO02xivK3Wz4nAoXRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671562; a=rsa-sha256; cv=none; b=bMEvANr+I2JTl5JbiZrkrMZ1oN0lX7ODSCcKYenRN/FfGroKaxNkXpxgwOLfbQW9bWXo1z udKjGalWO8dOGKzhgZPPc8TL4+LEtwaNJYonUmX+nlWGOyJnYWVAG9AD4jNZfq2U30LDi4 OYwc+OF4dA7PbaqePUfz1bkTvBbD+2oz3d7H3gZuD8z5lZbAM9iHGEEpNFvMIK8c1INilt P5aDXPtotV3Q0xQhgDHKEFzfqPHi4J4CJwDzxvRGNMUeaqXfgrKDaua9pfQqtOy+qN5hWy pMwQV6QjEmrtDTo0V5NMfSyS+AvVsWqODH52MY3bhfCOW/tgbRJzdvvcleeP9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n63lZ6zdwT; Mon, 30 Sep 2024 04:46: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 48U4k2jj088611; Mon, 30 Sep 2024 04:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k2W8088608; Mon, 30 Sep 2024 04:46:02 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:02 GMT Message-Id: <202409300446.48U4k2W8088608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f6c8db29aad8 - stable/14 - dpaa2: Stop checking for failures from malloc/taskqueue_create(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f6c8db29aad84291fa0975527d4d4b1c2a1d024a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f6c8db29aad84291fa0975527d4d4b1c2a1d024a commit f6c8db29aad84291fa0975527d4d4b1c2a1d024a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:29 +0000 dpaa2: Stop checking for failures from malloc/taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 36ef39831fe0e89f0b1672340a44c4ac1183158e) --- sys/dev/dpaa2/dpaa2_channel.c | 7 ------- sys/dev/dpaa2/dpaa2_mc.c | 2 -- sys/dev/dpaa2/dpaa2_ni.c | 15 --------------- 3 files changed, 24 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_channel.c b/sys/dev/dpaa2/dpaa2_channel.c index 87b76923a16d..654c6f2baf70 100644 --- a/sys/dev/dpaa2/dpaa2_channel.c +++ b/sys/dev/dpaa2/dpaa2_channel.c @@ -146,12 +146,6 @@ dpaa2_chan_setup(device_t dev, device_t iodev, device_t condev, device_t bpdev, } ch = malloc(sizeof(struct dpaa2_channel), M_DPAA2_CH, M_WAITOK | M_ZERO); - if (ch == NULL) { - device_printf(dev, "%s: malloc() failed\n", __func__); - error = ENOMEM; - goto fail_malloc; - } - ch->ni_dev = dev; ch->io_dev = iodev; ch->con_dev = condev; @@ -281,7 +275,6 @@ fail_dma_setup: /* taskqueue_drain(ch->cleanup_tq, &ch->cleanup_task); */ /* } */ /* taskqueue_free(ch->cleanup_tq); */ -fail_malloc: (void)DPAA2_CMD_CON_DISABLE(dev, child, DPAA2_CMD_TK(&cmd, contk)); fail_con_enable: (void)DPAA2_CMD_CON_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, contk)); diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index 0deebf7e8b24..02470a3efd6e 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -484,8 +484,6 @@ dpaa2_mc_manage_dev(device_t mcdev, device_t dpaa2_dev, uint32_t flags) return (EINVAL); di = malloc(sizeof(*di), M_DPAA2_MC, M_WAITOK | M_ZERO); - if (!di) - return (ENOMEM); di->dpaa2_dev = dpaa2_dev; di->flags = flags; di->owners = 0; diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index a21351a20b49..6ed656849709 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -588,11 +588,6 @@ dpaa2_ni_attach(device_t dev) /* Create a taskqueue thread to release new buffers to the pool. */ sc->bp_taskq = taskqueue_create(tq_name, M_WAITOK, taskqueue_thread_enqueue, &sc->bp_taskq); - if (sc->bp_taskq == NULL) { - device_printf(dev, "%s: failed to allocate task queue: %s\n", - __func__, tq_name); - goto close_ni; - } taskqueue_start_threads(&sc->bp_taskq, 1, PI_NET, "%s", tq_name); /* sc->cleanup_taskq = taskqueue_create("dpaa2_ch cleanup", M_WAITOK, */ @@ -1339,21 +1334,11 @@ dpaa2_ni_setup_tx_flow(device_t dev, struct dpaa2_ni_fq *fq) for (uint64_t j = 0; j < DPAA2_NI_BUFS_PER_TX; j++) { buf = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf == NULL) { - device_printf(dev, "%s: malloc() failed (buf)\n", - __func__); - return (ENOMEM); - } /* Keep DMA tag and Tx ring linked to the buffer */ DPAA2_BUF_INIT_TAGOPT(buf, ch->tx_dmat, tx); buf->sgt = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf->sgt == NULL) { - device_printf(dev, "%s: malloc() failed (sgt)\n", - __func__); - return (ENOMEM); - } /* Link SGT to DMA tag and back to its Tx buffer */ DPAA2_BUF_INIT_TAGOPT(buf->sgt, ch->sgt_dmat, buf); From nobody Mon Sep 30 04:46:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n82382z5XkJv; Mon, 30 Sep 2024 04:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n75QQgz4GJr; Mon, 30 Sep 2024 04:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67PQkfs0veJrmg4E5Y9eDPnsZoawdvcZ3ZHU8jhOMoA=; b=XitMbVWfaFsGDCzGP+l+oqx7/THqLEXniQPzsOexYYOabpCO4cKkMu3Yjg3q1Q1WDx4H1L mQRlkwjndu552VQWYv0vmFxM4lS4o3FTAU6B0pjm7BETHyHAsYRN/jtD4Uq3PR7DolruTK pOQXAvr+qfeleTzQZGVlPkCzPHk2HOHHb9nCOJH+Bnf6Ld7fDVvmnTpspr2RgpOBYN0P4R 1Fyt5rIqywaMiKAHVh4ufM0LHIqeMlxP+AqdBLoaEFeY/YnmXXLqiiqissa7LwZhBzfcyb 5xoQWXVrbOVHIEwssZhMzEEkwdjvlpqLggVZ+/xcDagxfAEouMIWwR/SVEYFUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67PQkfs0veJrmg4E5Y9eDPnsZoawdvcZ3ZHU8jhOMoA=; b=Og4JWds0VI2AzmTDdnZtllMOhcLLAb60c7OT+DESxY59iKBtR9e6PqvXximVlh+6n0fb7e ok/B5Y/GyAPstwtC7QE2HhXB6rUWPP0HNk8mDMEqEG1zPTuqa1kZK1SfDXY/LWQfdlnSta KP03qgxj7cX8aH61bw5YKZcQX9AwhK1JZjvugFEEBv3jtwrlo89RYl5iOCqOffWaRteC7w ChG84fTfuXABTMLUmEm7m8zZ1IxiOXKUfNzhn5z/42PT+dbCTfvc7Yu0VDo8jPiVeMbQKZ 2SUrCdjc2bxpX5h4iTXr6+bNvXofgtcBRzqdqHmemrAGyeHuRRTbqOWde5McGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671563; a=rsa-sha256; cv=none; b=ijxniUznDnR+PvttBq+jv01/XZk4SG0mIg3wA0P+x5YGNfd4C386LWK7Xs9ZKHWD391dJR h7lAiQrtUPcxH4cD2vvStAXuM3LMiMf0OYKBkypRdewqylfEkBN52vQrOQhvuJejqDW7wL rffSY1041fqYEF1u6DJrLLjT4/LT9I+3QWP7BpQYS0F5xZq2puMzWrx6tgmtQ7C+9sLPkU uu/iTWXTr06q8LcEAoLSwdsdPwjQXZo3zf/3kfDn5nWo2hzYyq7mo6fqpm0/rnNH0t9u0r kLrD4uSg2ifw0fbl6XDCE5BQaLz0JL2LETSh4eREgXe3/KVNeHtmGYZUXXYU5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n750qxzfFy; Mon, 30 Sep 2024 04:46: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 48U4k3px088665; Mon, 30 Sep 2024 04:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k3px088662; Mon, 30 Sep 2024 04:46:03 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:03 GMT Message-Id: <202409300446.48U4k3px088662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6b25a8f07958 - stable/14 - jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b25a8f079586f8f3e4badaec402dae1ab39ddb5 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6b25a8f079586f8f3e4badaec402dae1ab39ddb5 commit 6b25a8f079586f8f3e4badaec402dae1ab39ddb5 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:30 +0000 jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 3fdef8e855027d5c9bec06e2a53e8f99f7d5694b) --- sys/dev/jme/if_jme.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index 3631e5f8ffa0..05a67d34b6f8 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -873,12 +873,6 @@ jme_attach(device_t dev) /* Create local taskq. */ sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->jme_tq); - if (sc->jme_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->jme_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->jme_dev)); From nobody Mon Sep 30 04:46:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7n90Tlrz5XkNR; Mon, 30 Sep 2024 04:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7n86N5Vz4GK5; Mon, 30 Sep 2024 04:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MLogIuHRiLExGRnBaA8qfD0ZrrEC6m7xLNNDoHzBRp4=; b=WzMGUonyy3KPIVDxii6HzW/NPG22j2IAg15x1AbTW+rZK8dote2vlhCZKOp5zezRox8po6 mVPtFvHdqZcMt2XgaJwbSz3NRAm2ztQVNUZQMyfeWhbe6Bk3eoq5iVe4P8LsA259JoO/Kp +cBhUpr4juvCXYBPULOFcXt94XZWRC8TSU8xeRTuc0XzpCD3pOqhGImVUkuhR5wyrNKzRF UEB6/my5H+d8mluflddjXsUK1n6H8m4efPlBizQp4ROmthYFZa9pX2mAXb0Ggpx5eCoTF3 MDseZ+XikYs8c0V3XjLNTCvvnSbaOwMmRzkun7IuWL00W0b6jxCy9Ho+k7CqKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MLogIuHRiLExGRnBaA8qfD0ZrrEC6m7xLNNDoHzBRp4=; b=Jm+LqV/rCFuNgaggd+qhrmn8JvU1Szm/kFU8B+sz2u7IB/4qY8TDuxIFwKb/KEv05klW3s T+JYmVsWsNJpTihz/zCXHnLf/hiy01Ph1UQBFQ+kSk9Gf2jiF1stuQG/+GYli9iT9lVjrs oUj/rJ5NpbqrMhdp/CYJUI55w30nYDLWw5iq3zuQiUiVfQKfqD45d+6m/RndbidK+QOE9X qChCjZ/cuy8ulmscSQ9o8qbhzAEMkBfNaszo8c6otIM1MZLylpI6U/lZrF8rJ/4OUOwYnC dgrZ+gg0rKINwCJAaDJQ7qWR3yuBQW2fYEoe0UhDpd+gVr8xUqf5muGiv9dXYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671564; a=rsa-sha256; cv=none; b=BGV9kr5hNqcWv1NvLknQRtxPhyViW0tjnr8EWdbG+3ZmiCd7OFjh5vLXoJdKbA8fyo/Wse aPdZ5hCCG+Yc2YsEaL25PqVFuTmfcg/ZNwldYj+kVOlOMHyBZ76Gut592KVqANXm6KCUkS tqzU6nUhqxxm8bCYYNrqYFz2opImi3cZyqs1FDLgE7Ht0rkiO8Rd4FtDFGCuSg7OtRFMTE oH47+Niryuj10zj2ZVsEWgQHLMRWLQnOTleh4tJvmN/56Exc6hw1RptzGn+ol0T7zpvxYp DrgIcM9N9Lgrs7CybP0sFzsxut6XhKPABG8276y9NRwT2E+UHIO+uETPvQivjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n85p29zdkW; Mon, 30 Sep 2024 04:46:04 +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 48U4k4lh088715; Mon, 30 Sep 2024 04:46:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k4GN088712; Mon, 30 Sep 2024 04:46:04 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:04 GMT Message-Id: <202409300446.48U4k4GN088712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 518e138448b4 - stable/14 - liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 518e138448b46d57030b3e34962e69e6211c8e1b Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=518e138448b46d57030b3e34962e69e6211c8e1b commit 518e138448b46d57030b3e34962e69e6211c8e1b Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:30 +0000 liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 57cd8f27b727e7a87312f6f141cfa13807dc81a0) --- sys/dev/liquidio/base/lio_request_manager.c | 9 --------- sys/dev/liquidio/base/lio_response_manager.c | 4 ---- sys/dev/liquidio/lio_main.c | 4 ---- sys/dev/liquidio/lio_sysctl.c | 3 --- 4 files changed, 20 deletions(-) diff --git a/sys/dev/liquidio/base/lio_request_manager.c b/sys/dev/liquidio/base/lio_request_manager.c index f4eae0c8bf31..95eac12ecf3b 100644 --- a/sys/dev/liquidio/base/lio_request_manager.c +++ b/sys/dev/liquidio/base/lio_request_manager.c @@ -159,11 +159,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq, db_tq = &oct->check_db_tq[iq_no]; db_tq->tq = taskqueue_create("lio_check_db_timeout", M_WAITOK, taskqueue_thread_enqueue, &db_tq->tq); - if (db_tq->tq == NULL) { - lio_dev_err(oct, "check db wq create failed for iq %d\n", - iq_no); - return (1); - } TIMEOUT_TASK_INIT(db_tq->tq, &db_tq->work, 0, lio_check_db_timeout, (void *)db_tq); @@ -179,10 +174,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq, oct->instr_queue[iq_no]->br = buf_ring_alloc(LIO_BR_SIZE, M_DEVBUF, M_WAITOK, &oct->instr_queue[iq_no]->enq_lock); - if (oct->instr_queue[iq_no]->br == NULL) { - lio_dev_err(oct, "Critical Failure setting up buf ring\n"); - return (1); - } return (0); } diff --git a/sys/dev/liquidio/base/lio_response_manager.c b/sys/dev/liquidio/base/lio_response_manager.c index 12a3ad60521e..ac5fc6229885 100644 --- a/sys/dev/liquidio/base/lio_response_manager.c +++ b/sys/dev/liquidio/base/lio_response_manager.c @@ -59,10 +59,6 @@ lio_setup_response_list(struct octeon_device *oct) ctq = &oct->dma_comp_tq; ctq->tq = taskqueue_create("lio_dma_comp", M_WAITOK, taskqueue_thread_enqueue, &ctq->tq); - if (ctq->tq == NULL) { - lio_dev_err(oct, "failed to create wq thread\n"); - return (-ENOMEM); - } TIMEOUT_TASK_INIT(ctq->tq, &ctq->work, 0, lio_poll_req_completion, (void *)ctq); diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index 7104ff07674f..3c73a6b10eed 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -1854,10 +1854,6 @@ lio_setup_rx_oom_poll_fn(if_t ifp) rx_status_tq->tq = taskqueue_create("lio_rx_oom_status", M_WAITOK, taskqueue_thread_enqueue, &rx_status_tq->tq); - if (rx_status_tq->tq == NULL) { - lio_dev_err(oct, "unable to create lio rx oom status tq\n"); - return (-1); - } TIMEOUT_TASK_INIT(rx_status_tq->tq, &rx_status_tq->work, 0, lio_poll_check_rx_oom_status, (void *)rx_status_tq); diff --git a/sys/dev/liquidio/lio_sysctl.c b/sys/dev/liquidio/lio_sysctl.c index 729f4d432274..61a7e96098c8 100644 --- a/sys/dev/liquidio/lio_sysctl.c +++ b/sys/dev/liquidio/lio_sysctl.c @@ -744,9 +744,6 @@ lio_get_regs(SYSCTL_HANDLER_ARGS) regbuf = malloc(sizeof(char) * LIO_REGDUMP_LEN_XXXX, M_DEVBUF, M_WAITOK | M_ZERO); - if (regbuf == NULL) - return (error); - switch (oct->chip_id) { case LIO_CN23XX_PF_VID: len += lio_cn23xx_pf_read_csr_reg(regbuf, oct); From nobody Mon Sep 30 04:46:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7nB1rF1z5XkK4; Mon, 30 Sep 2024 04:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7nB07JQz4GQD; Mon, 30 Sep 2024 04:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyPYhERmK9pCR2aIY4Mp/7xO9ANSjTDhbWF6DJgVocs=; b=Msik1nYSL10uWjL59ApjC3O8VMVTkgqZ6qTS59eEvRmQ4fspvAUB7GJp2c1UmqzeYA+mPI 3iM4a6aNhdEi2UWOU8/bqL42sNJLcFdZT0zGLUpMa5C57MeDnk6uXEfoHE4AaedEToHdi6 iJ0O3bq1l+VVkbTwJTQ0Gvt75lN4Gv2IVl6SQ59m/lhDjCt5ce9ANIJeDRw8RA0prZEQr3 lylVNfg644BjZ8X4S9HRNusyLPDht9OqnI/ZWYwyW8yQkVTajbW6XzEKcq+TG5O3kepiHL oRTiBCaUHH9PixHLmWxAA5AK2UAJ+oc9IFa9hrM9f3B5jzS8GOwRj+ccaf70jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyPYhERmK9pCR2aIY4Mp/7xO9ANSjTDhbWF6DJgVocs=; b=SA9Jcum9o9f8NbkyHgkZyPBef4kozkDTbzWuI/qLPZ9yD1KY/UFWn+ZEdTUl7yr0hUNkKh oQBf+EFPmKrqz2wwoqvKR3xBV3NzoUyfUUx5NrL50Hb3lLL2Sa6dskNFOjzAjbpnLI+UFA wMDxcAXI99x4Zmds+zv6W+9phm7eL8lvyTU/PlUh5/3I576tvdPY/qgc29S903r80Dggaw ottLISMJQwAEJ3vu+gxWiKgBST723YUnoirllDdKkA4sd2br+aLBHA/m8xjwf00geVOyRc IYwdOI+lNXspto8xLbfgIEfr8xw5jBhIdF9iWB30ia84ljbCrOmf2f8V2ey6tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671566; a=rsa-sha256; cv=none; b=v6zbhqUn/qc6yQOFUVQxVKlWt0kVEgDo+lNLHfuwWbGHyfPanZRkS/X4Ymr1nKqX31D7Pw Sx1YUqUYbljNWceyrB4kJs7Eiy7V/oHs+J4ZxJDqRiOGf3gWayPWP3bbasblpw3HACWW+w YD1K0BvyuhqQB0kWnMaATjyJ3LEdAQ2sIeWY3rD9JjOuZ6ERpmV2DcMql7uH4iIHwOEZJ3 RWY2DJcFErRkfpS6WTXafJCmxNUguMgX0oDOfku+/6jk13+Ax0mSCscfYaFtM9t8jAWKO/ 3xfBzcP9BEXiABF2bOol3diYtKWQXjuHgxoFblesSLWAzbbYE7CenBUZ2GV3Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7n96pQRzf2L; Mon, 30 Sep 2024 04:46:05 +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 48U4k5A6088767; Mon, 30 Sep 2024 04:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4k5w6088764; Mon, 30 Sep 2024 04:46:05 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:46:05 GMT Message-Id: <202409300446.48U4k5w6088764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 70280bc71d28 - stable/14 - mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 70280bc71d28935346f7cc7c41ddd99e58b9604a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=70280bc71d28935346f7cc7c41ddd99e58b9604a commit 70280bc71d28935346f7cc7c41ddd99e58b9604a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:30 +0000 mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 7ea3fd3bb5f4039c372fd72aeef004fe12454537) --- sys/dev/mxge/if_mxge.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index 158bb8e5888c..097813b79c0f 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -4616,10 +4616,6 @@ mxge_attach(device_t dev) TASK_INIT(&sc->watchdog_task, 1, mxge_watchdog_task, sc); sc->tq = taskqueue_create("mxge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - err = ENOMEM; - goto abort_with_nothing; - } err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ @@ -4816,7 +4812,6 @@ abort_with_tq: taskqueue_free(sc->tq); sc->tq = NULL; } -abort_with_nothing: return err; } From nobody Mon Sep 30 05:07:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GQ6szPz5XlfL; Mon, 30 Sep 2024 05:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8GQ4wwzz4W14; Mon, 30 Sep 2024 05:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Uph0++etvEeKL12C6bdK6MOYPxkli6joQOkFdWt5QY=; b=QlTAN2lpXLO31wANPlX0Fkda4P03Ajrd99MyPTRhKfPAfcqbNJmNp+Khkoeogr1tblP/XG RPGPRwnaZ+h+7isSGVGC4GaLEUPMP6U6Km8b49rOtuiP3mnjW/Qvz1whLcneafpJXhrl/k +r/qpYuN4gAOB+hej5HiDGQb0lmnuqdWYPcd01GV2lPIxvH+vi1YSihiMrUUpDqNZgcjUq B8H/wjfyGr0geF8Mgt5g53S7n1Cg9k2Ss/vp+nhgZ8JQZO9tXaULEd/M5kYU/OU771nLzF kr7zuCUyVefYCXqCgdHps2wMlwJJb1q55pHTZnxX+VLKnvR6m07jVJ/itXbXng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Uph0++etvEeKL12C6bdK6MOYPxkli6joQOkFdWt5QY=; b=pIfUTo5RxBaVqMfVm5h7L7PHsllxIBTIInBtaCp+plghSm/w1kQKHvm8YcBIxhbnTKXF97 /QK/1lEsWpSmOCVOKnBxK3Kzv2Qe/V6VTqeUOl+RNe0iuFjwrC+Ubk7NfF3CZKLTjLq83o zNP4t1t7gLiNyuCXki6RbqjNLj6HqqztXayjGrD05IaG1eCyX8Faxnphg4RxcIAGytST+t lsCaSHVIx4b29rnymYaRRHmIjXj4QN0fa5si2sYEUcDEUXTFseaSnP+egeJW7yzfAySG3X 1GN/9lmSAmvGm/to9CnJJPhZMlz1mVc7AF3Z26n+KGFb7kNQB6RRQm4q8MGohQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672878; a=rsa-sha256; cv=none; b=fJ/MMMlmBY8hxq9h0jaqPzZaz+l7/PnrBiIXqt/+3ZbKh3MR00zpl8lke3jZBP9LtlaYIq JQeZiM62auks3QCtuVFjji2i+qJghSSebupuDBAaFIUXXH53EfdDo83zUwHKSCtWF81zK4 WTnG3hNvR0oBzOvs6fDMj+WAYoGdjRVBNv5pLmf8RfEhPQyXSKrHpe+zr8o2kcR1MkGw1R vIOvFliLF84g+u4vFE/fWVyWkBZjASwGdOByi6Hu7+Qyqfxk9T0FMMSP6jnCOBcLVLTaI1 ClkRCmZVe5aNQtrRvWLS8XGwS4QpsgMXm3XrAB1ze0la5xexZGVz0DFwV0q4aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GQ4XMtzfqw; Mon, 30 Sep 2024 05:07:58 +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 48U57wKs023938; Mon, 30 Sep 2024 05:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U57wtA023935; Mon, 30 Sep 2024 05:07:58 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:07:58 GMT Message-Id: <202409300507.48U57wtA023935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ca22505a15a7 - stable/13 - kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca22505a15a7c1638b6666c4d2858c36d1849939 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ca22505a15a7c1638b6666c4d2858c36d1849939 commit ca22505a15a7c1638b6666c4d2858c36d1849939 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:16 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:28 +0000 kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) `fp_malloc` is defined as a macro that redirects to `malloc`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6a2a385507c79abaa9db9eabfdd827362f3dc7ed) (cherry picked from commit fbaf4806511522cdcac7eda3bd5fbcc4b2e2f15c) --- sys/kern/kern_fail.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index f60500b22ef4..2c362b68f24b 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -479,11 +479,10 @@ fail_point_init(struct fail_point *fp, const char *fmt, ...) /* Allocate the name and fill it in. */ name = fp_malloc(n + 1, M_WAITOK); - if (name != NULL) { - va_start(ap, fmt); - vsnprintf(name, n + 1, fmt, ap); - va_end(ap); - } + va_start(ap, fmt); + vsnprintf(name, n + 1, fmt, ap); + va_end(ap); + fp->fp_name = name; fp->fp_location = ""; fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME; From nobody Mon Sep 30 05:07:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GR6nKLz5Xlqm; Mon, 30 Sep 2024 05:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8GR65qxz4WTV; Mon, 30 Sep 2024 05:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ECrwU6P69Vi7Xj0hGA47PeJFunc8Yx5UiQIZie29yU=; b=fNHMoM5v3eLnlwSZV84bsvJfX8JgbgAY7Ln4V3HJGpzLFIwenNgHSOiGdXLsuR3VbG7ZZ1 ASPAzKhw3PIuTqswXB1PAgny8HPJ9VY8AKmv9lWT67j/oSALoPu4Nyn8FIrLZ3/Bblt1UI h8Pd3MdGDjMUHBioB5h6OQFL+9TdXo5g2s+rPYkLJoImEBmMZGLznF/Y11kF5uDSIhThcr BTm/mMny9Bm/qJYzj3fsmA0r7AN7c9WzHV4vdZgABSCcnU1k/x4SUcR9m3ZO4KnCM7CbjP N3FQ2zMXpQSNERK3lseMKQzmCODgpwZ+4oa+g8UscCauArBvipPDaoxm6Bf4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ECrwU6P69Vi7Xj0hGA47PeJFunc8Yx5UiQIZie29yU=; b=HgRWEg427eGATWwJ8JgDxgCbLt4HSeMJBA/a7RUsKV7D5RFct7Fl/Vbf8ot+0enUmXdxNZ UcwgePrEch/jt+t/CEpmf2RsYuz5E3yripONvkYxcF5XXg4ob54SVYu0R/PofkNuam7Clm NLl4MBCG/Q8/+HAtj9K0kZmF1wTcQQMrcBAevhjbgHl5481Rrtsa6HoI7LwMjJHjQKFqJd hTYRMNIRfGavv+Een59dq6eK3V6ajwt/QqSOzyy0QxIeHY1N51vIROJ7A9ci6jK2z4Y3Qc RV/mwrn//5XZrdZpeL5cdyhYs4pwr+jERFCYiFdBmNOQDL0zg9Dt61T5lwP8Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672879; a=rsa-sha256; cv=none; b=myvlCoTX7qS5p0LYHofhc+jmVLlZDdp55uXq5nxKe7ddHfS/01A5U6PmJqaJgMJDBQXU3r 3qLJzeTstWgfMz8d/2/RZF5Hq+Z4ZuXQmy/m+/YEJgqc0fZuZPi+kzoRxkXn4zDy5kzfUP nQ/V3NVO3T+XWoDRlnk8YzJxnYGeNpK570TcJutQa7M+fRWyd+mfT1YKvb4poJgwvN9ozS rcGruQnXEjfn1Uk2KopEoyVaKFUYQxP08fiJmT0nZ0nZd651YqjPgpth27MR1bfFu29VCx ZPqw/hv+VvR+aE2fAAy+gtXaExnOMC6jK/aaYFJws/xWfejBTQOhuUpLYGEE1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GR5jxSzg9v; Mon, 30 Sep 2024 05:07:59 +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 48U57x6b023987; Mon, 30 Sep 2024 05:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U57xgZ023984; Mon, 30 Sep 2024 05:07:59 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:07:59 GMT Message-Id: <202409300507.48U57xgZ023984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6b42548c6dd7 - stable/13 - subr_bus: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b42548c6dd757b8f13cb716310555773f5c9c5b Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6b42548c6dd757b8f13cb716310555773f5c9c5b commit 6b42548c6dd757b8f13cb716310555773f5c9c5b Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:17 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:28 +0000 subr_bus: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 99e3bb555cb1ef5572de54be0ffed2aa6fc080cd) (cherry picked from commit 44a6f9c9a0b503f70fb7f1d44bd75a8f68c4833f) --- sys/kern/subr_bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d34bcc3cca58..06c64ef28fba 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5618,8 +5618,6 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) * Populate the return item, careful not to overflow the buffer. */ udev = malloc(sizeof(*udev), M_BUS, M_WAITOK | M_ZERO); - if (udev == NULL) - return (ENOMEM); udev->dv_handle = (uintptr_t)dev; udev->dv_parent = (uintptr_t)dev->parent; udev->dv_devflags = dev->devflags; From nobody Mon Sep 30 05:08:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GT25DTz5Xlnh; Mon, 30 Sep 2024 05:08: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 4XH8GT01t4z4WX5; Mon, 30 Sep 2024 05:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6PHq0hYzOIykO6N4+4iRowdxKDA4k+gUI/HTygkIqo=; b=YDkYzNF3HZrE3nz0FzvxfKRbhHlHavGpLpez9vcwCvHQu6A+DTMX57JgSVZUqj55tT+7Vh vV0mKIPop+pM/uEIV0JULIQDqgjejFl8cu/QhOAsD48xw/8QO5nFQJVtNXxl0XrNQ50eYS 78FmYuHmlMekBawT0dIrp7ySDQviOxip1n6bgJuMNJBG2yyHOk7ZOekUC7AgTL7cVqYfiN rJkbyRguBHtberEb1unysQx9Rrqv3cbH14BfJOI7Lc6UY+qYxYlkQ3btlY2vqZyNlBd6pf uAEfN3bgi7pZ/Jo9qc6Es5Ita3zonyV/Z9nf06R3M7JeznH+LSLnOeQhmPIGTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6PHq0hYzOIykO6N4+4iRowdxKDA4k+gUI/HTygkIqo=; b=ZXk0oRSyCGOd44VIigNfNIwjmbRD44bPdF7OSAzc+Z74DDhXOrYZPR90SJvFIg6yvHGK1u WT7WDU9HFKcMQU0TxNBRYF1bYKXdTaNFGvM3JuGfR8oqrjEKmAlcHc2Mcq9CEtSqa0oQGq z++5RfwcwxBdMNPUZfoxFfU7aWwO4zT3qNz2UNkekYV89rMFHCfaBic1fcE0ipZ5ijomvU NMn2qJHQzcL8MefQYnoeT0IC+L/7TZKMtuRrKfCtbstlrvxhsO9+o9ZN3wko6T83nZ20CB 7NgkClvC13Om5nTTiHqTie+sf0TzIOyfLKERSIpRsy1FDkQ0OjO0mskVxEAANw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672881; a=rsa-sha256; cv=none; b=KB/6iDLStEWnTkMhfXFjhVqo6FttlUT3bJuQOYG48Ob73Uk+wa+zQ6Xrre3SZjG2LxuxZt iqcG6pGvQrHuov4LyS1eMjJMBbKkaDQIyqKB2SsCOfD1bqVcIZGn3s9ioeR4D+cDQ0qjio sXyYFY/hnhrRK7Ppfsy9p3oYZZXeobApVqexqx9AYM7JAHopn3FdwJTuVJp8pUyvEGigRB i2x7MWUQKt94BPXDTf8XqyiyckyOAkyswcAGFMd4ShjJSMFfjkhV8u1f4Up+Xn8ZP5ILh4 2wv+BEhu8q7f043p3CrhNtxNfKyiKiufD1j4XUlCce2NQ6BIasQzUwnLvPWaRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GS6m6zzg9w; Mon, 30 Sep 2024 05:08: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 48U580po024041; Mon, 30 Sep 2024 05:08:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U580sY024038; Mon, 30 Sep 2024 05:08:00 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:00 GMT Message-Id: <202409300508.48U580sY024038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8f17a8c8a2d6 - stable/13 - ctl: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8f17a8c8a2d69923d828e638a6fda970f38b73c3 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8f17a8c8a2d69923d828e638a6fda970f38b73c3 commit 8f17a8c8a2d69923d828e638a6fda970f38b73c3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:18 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:29 +0000 ctl: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 8e6dd4185871cd9b785869178ab2191a0d6c0b53) (cherry picked from commit d2d4758456aa89863ee615dbe1516a01c1fa83b9) --- sys/cam/ctl/ctl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index b0f34cafac80..ed97bb7c2115 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -2710,12 +2710,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, } entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO); - if (entries == NULL) { - printf("%s: could not allocate %d bytes for OOA " - "dump\n", __func__, ooa_hdr->alloc_len); - retval = ENOMEM; - break; - } mtx_lock(&softc->ctl_lock); if ((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0 && From nobody Mon Sep 30 05:08:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GW3WFpz5Xlct; Mon, 30 Sep 2024 05:08: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 4XH8GW2L0Kz4WVD; Mon, 30 Sep 2024 05:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LngC0QfyupFFsnE1u6JkMlpIOXMHcLI3VxJYQJkcJo=; b=Z1ypRe/8/mI9cR6MMIqXsPgH58Br8lpSuQWxHkURCSgrlMnrC6a6YYN/SEtPft6A1/9UWz LZpWW2OOXNsejs9sv+ZNYnnh2x6rs66rEyZiB+nw6J0Hr1AOlHT/K8SDWCrpalfQEYICIL nW4282nkeNCu3d3zFav8nPW0p3jUvO1eyt4cEq7F+m3RabMZiELfTK6ZH+YK/nDkXS17bk fcgq0lS+XOvXZcejoCvNTpXD+L9+wpu/QOmkj020MvfdZpDZ37uRvGQFjwva70huZQK+tw Lymwh/IWUQhgGYzzykx+0EANK+F6q113mMnJ/Av3zNF3eO/z2JwsXSOUdQeCHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LngC0QfyupFFsnE1u6JkMlpIOXMHcLI3VxJYQJkcJo=; b=b7RYzBeorAPuYp07HuPkVQOM30UilRxNYZGUJSF7nipNvnuNdgjDjGDG+5YAW9/Pr0ZA3n kbaDOELrER6B98T7QQsym11wI+FAxORyEJQhVe/tJB4VtslHkHA2s2Pcp88l/Ti5c1j/qb u/GqkWnCTAg/50MfKi9bFe8+LtdE1ilbpex2dYu4MxYUJUhvhd139+2ELqlHmvmZK4SM3J G4BPemldFNww7AuqFLkNTVjMJqR6rvwngibtPYa3cq8GE/mOQVepJBYPlPsJU8/6oPr4yT B8vxY27KmLBf6G/RK5tPRAFIVEsK7A0lh/mNl1xxZajfTDZDXJ7PWxknWOsmeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672883; a=rsa-sha256; cv=none; b=GoJHM3dwaizBe9uGHv3xEwUPQ5/c3p7tRK+UtwnwatNOoHe1h+FaxJ/E5aBCdUWBiGVUM7 JxbCso+gxWjMHdXeqvZmZ6owz1cVs1PUKJLD71MK5XSwm59p9JUeko4jkaW7RgYmYLVnaG 4tZ2e4QbSc5MnWwEhV6TNzIFyMJNkuk3KNkLT2gemUb/PDHPpi0zEZPjlKUu4fm2BdnK1w CkEnudiTSm+tt83xVvvuzFZ7n+f1wot5FazWtiur1jxdBq9ODfHb3vHFvZAdZTHDlUMwYu o/3Xs7sA9+cuWdaTvSHXiPx7qK/Cpgb/4UO2oV7DStnrJwm3GYB3X3YTVX5K8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GW1fgvzg83; Mon, 30 Sep 2024 05:08: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 48U583K6024148; Mon, 30 Sep 2024 05:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U5834P024145; Mon, 30 Sep 2024 05:08:03 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:03 GMT Message-Id: <202409300508.48U5834P024145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f7bcf5725fee - stable/13 - altq: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7bcf5725fee3b65be9c7ba9cb201b2e469ae504 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f7bcf5725fee3b65be9c7ba9cb201b2e469ae504 commit f7bcf5725fee3b65be9c7ba9cb201b2e469ae504 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:29 +0000 altq: Stop checking for failures from malloc(M_WAITOK) While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 2a119886630bb5fe8283e20db5acb7c0cdba31c3) (cherry picked from commit 891fdd020a6826eb98d30284f78000e666f9a263) --- sys/net/altq/altq_subr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 8000691a7963..4e8e72fdf35c 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -1360,12 +1360,7 @@ acc_add_filter(classifier, filter, class, phandle) return (EINVAL); #endif - afp = malloc(sizeof(struct acc_filter), - M_DEVBUF, M_WAITOK); - if (afp == NULL) - return (ENOMEM); - bzero(afp, sizeof(struct acc_filter)); - + afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO); afp->f_filter = *filter; afp->f_class = class; From nobody Mon Sep 30 05:08:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GV3nbTz5Xlnk; Mon, 30 Sep 2024 05:08: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 4XH8GV0ydyz4W1Y; Mon, 30 Sep 2024 05:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qUyRXG+kWJhmwGyJQOh6zcDQxT+sY/KDWuGOTEHjFU=; b=n81j/nAjBUD8T+t/siDgDPbyUtKvP8rL9Ccc5HPYPC4N8ycrRWeUzHLeIlxgVEdaM7A8nc d2DoRsPEsLnIAu9PU8worURwcG4jJFnP0QPkxnOTMqQKAeRcpZiMGqLj6/aDQqEHkjJCpl Fh6mL49kbey96DxEb+j+QRQfhh51LsfIL/Ort7k6e8QgpEm/buxFUla/twN/MhJchiCjMe zYaTWO9ZY/IInYhxhidtB8Yqd/d8I00OjaP6w1RAQklhnFrQZwkSGFtwklVFxPCC4Z4Kjb wZexz+FDl8VyMWS/1yvWRJyrU3Zvl9R++cqv3YXb/x57jkUxZssNZK+9eKpdiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qUyRXG+kWJhmwGyJQOh6zcDQxT+sY/KDWuGOTEHjFU=; b=K8jztPRWqxg8H4SIIE7jtD4dBmUsgzzmv9IA48kZ0UBCsQx5bd2UbvDLGz5S1jjsQk0kHn npcGDZdGJpBiuSod+4D5YrTaZ4ZjCJBn/azV/BTZykTU/pIq2Z0P+iawkK7AdjaRmeN/+5 TdoP/+eZn3ixgDWiEIdtrQspkEcjk5iGVzNnzdlT12ranv+EY/eTHKT2hsUMNPKV3IJMzs DPbLJQ2IAR44ZHfYetefwn59SgjlGq+LxFrjc0rNXgGUQYF9XKAbVo1KtTe2G7HWPRdyLk PDZ2Qj6ZqJjJxEiRHCnIzf4KNPt4WeGM83hvwUkK4P9uYNjukA1mJgsk/D/a3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672882; a=rsa-sha256; cv=none; b=dfNrNS/dVj8ym4peS1ue6AZvJ4ahE8eV8cIVU9esVUCA4UG24gNxmgeKBPSFlOjGW1xBxj TQJ+sD9yg2aPo5WdYsLsNjtEsBITOAsW1fVVSok3POTiHTyzrGMd3wL90XVDlSPS4G4078 2G+Hh6Xc7dkMQyd307VYJOzUcZuVMoHDMFFSuuqz0WfrV8dOQGyseYw478lwO9OZ1xgmUI x/BkB2rTd1Cln5kGHQjQMWTR9CPhXsY70X0SqBu/kCMJp2ckZT9RXlHZb7xZapscbS5IQo bPYJ7aU7V7V/k9uLdbDP2IlevGdpRDYhT1NpzCEbCsS28IsmrolYb7CUQC8imw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GV0MQfzgDP; Mon, 30 Sep 2024 05:08: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 48U581RY024091; Mon, 30 Sep 2024 05:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U581aP024088; Mon, 30 Sep 2024 05:08:01 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:01 GMT Message-Id: <202409300508.48U581aP024088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a4417f586ffc - stable/13 - udf: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4417f586ffc620f69cd6d9914caabd4b8bc0ba6 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a4417f586ffc620f69cd6d9914caabd4b8bc0ba6 commit a4417f586ffc620f69cd6d9914caabd4b8bc0ba6 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:18 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:29 +0000 udf: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 3feb35dc465a8247d70e50792680c230954ef1c1) (cherry picked from commit a77e68b0148d5224a64740c2cb7b25b1efc55335) --- sys/fs/udf/udf_vnops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 4d08aa373678..d85bb9970913 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -804,8 +804,6 @@ udf_readdir(struct vop_readdir_args *a) ncookies = uio->uio_resid / 8; cookies = malloc(sizeof(u_long) * ncookies, M_TEMP, M_WAITOK); - if (cookies == NULL) - return (ENOMEM); uiodir.ncookies = ncookies; uiodir.cookies = cookies; uiodir.acookies = 0; From nobody Mon Sep 30 05:08:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GX5PYMz5Xlll; Mon, 30 Sep 2024 05:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8GX2tszz4WgH; Mon, 30 Sep 2024 05:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo8CaBkI5Mm4UA2nXKA2+FHujIOnza2Esd7i9/VzwQ8=; b=cs2SsGtL6mSeM9jGcktrKGpO8LkckxizzJ/Casd48Kl2FuGi6mC4fVXqntLHqZ6CWpFhkh gMKTPDnQ0lJcKNfLLgUzz83hewL3cU9CqHOTba42J57kBHZzAGNBDGLplzLf4q9QZPx5nr UO950Y4vT3+CA2VH3RTLrqPSA7PZ46gKNxfBScIRjB743AGX4rA/eSU+yP9tzwcGi/wUuG 3wNkVHiqfUiDFgRu0LTqcHAj9eRqSUe8zV9QsGep4lemSuEjLVJ3+HBYcga0a8NXX0r6wX D9h6XnE3v7C6RqghDniWRmvv7P0l7QK9/fvMmJDsLuIdzVjZXlit5TXbFLp9JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo8CaBkI5Mm4UA2nXKA2+FHujIOnza2Esd7i9/VzwQ8=; b=HDCuyDZidh3/IG98Ozf3OsWlqk0wtVO1/HjPypUYIvvERp0vula8yWYERJitS44UEpoYr/ prguXc7LP7FRKPT4tn9MPNXRAPVJS0MsCksj6OdFeCQ54J45UkBQXIkA3b7lsXVp/cMMqw YwzHMvJ1QqNCybi3Pokdq9TdYkyj62qcPENp6eoMR9dGEEuEV02Rwp2U7TnMOWrZ8BKrfE aJUDKo4B1/RGueyH14kFp7eenHyzRsPf+HO/tG9zB+oXLiBIzTovCLAdYGtb5aw2COXArm r9lf9vOcRkkVdPqC4+VZPP4tgzdf4ludq3FnOAn73Aw3aaNe/on2Z+Sn2ydbSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672884; a=rsa-sha256; cv=none; b=gqpEngtlUsZ3zJ1mt8FpclRHx7AfMxe6rm/MYk+iY5yl1Zd5X5ueOdDNQPlEINynIwm5Gd fvKJd4ltDfXgxqwT5V6BjtttMp/BwJn/6cDuBFksNPKxZ5Qn4gV/ZOa649QimvtExjjSWW 1rZ16gKuGdYs7a7RS7dbW8Sh+vpEZXDi98jDPDu+L8cBUFi/DrFZJ1M5faEwhyJ66k0fCP ikYCP0wueSV8OrZF6iFx1VRP/8Uitm/iD/cMLlyxMryTWkryyFhSjUTpFpTChQNi8xnhzI j+h+jiAcm4Q/z2WOR8dYmUsTx1MuJCo5zFrH4NwFx0pQhFc1mIISsiQSDfB82Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GX2QjHzftX; Mon, 30 Sep 2024 05:08:04 +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 48U584C7024203; Mon, 30 Sep 2024 05:08:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U584YG024200; Mon, 30 Sep 2024 05:08:04 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:04 GMT Message-Id: <202409300508.48U584YG024200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 019abb5cf986 - stable/13 - if_vlan: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 019abb5cf986a851cef6aa65e5a39b4955649357 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=019abb5cf986a851cef6aa65e5a39b4955649357 commit 019abb5cf986a851cef6aa65e5a39b4955649357 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:30 +0000 if_vlan: Stop checking for failures from malloc(M_WAITOK) Fixes: b08d611de835 fix vlan locking to permit sx acquisition in ioctl calls MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 07b16b1e2aeab0b30f68a013de31a4c322a61246) (cherry picked from commit 67971181687f0475dcf72b42d065364efea96251) --- sys/net/if_vlan.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 9d0e6ae66b31..976bda1f5ee4 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -465,11 +465,6 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch) return; hash2 = malloc(sizeof(struct ifvlanhead) * n2, M_VLAN, M_WAITOK); - if (hash2 == NULL) { - printf("%s: out of memory -- hash size not changed\n", - __func__); - return; /* We can live with the old hash table */ - } for (j = 0; j < n2; j++) CK_SLIST_INIT(&hash2[j]); for (i = 0; i < n; i++) From nobody Mon Sep 30 05:08:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8GZ1L8vz5Xlnn; Mon, 30 Sep 2024 05:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8GY65Knz4WWB; Mon, 30 Sep 2024 05:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU1CveKXENmiSP033J+bMdUxqmhDF2qu+qTlgJefJqQ=; b=g67tGkA61Hz6XCGKcH9Z1/a2JmfOTx92/pe9N0FHt+6hlAq8YaTx/hi/xD222qXFv/LFj4 QA+f6gTvugg/jt66hZ5daJzNdbaE2T6eQkFtb+iEXgqbdgcbHhE1+7ssLbsfxsLNQWt6o+ 2BUxC7iNCLix1SR0ikf4QrfK8k94ksF29v9JWLCl0Ky07MtI0ZEYIiBmfW+EFI2eTAyoph 2Q7y38Xq09pof/UfUy9pWsGPbBnfNcgwAHuawMGQM4S1AmAQF6b8wNBsYzS8/G2qlo9pzx n7u6mLJ6BuORvtNZok5j3mhiO4oiGZnJAKYIxIOgbEeIgiZM2r64n6ejGq7KMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU1CveKXENmiSP033J+bMdUxqmhDF2qu+qTlgJefJqQ=; b=O7FaUm6KS3CGZPCDskprOm5gyXOiWJKfp0OV3dTFJD5OJMa8rPGNRqzxh5OS+BXtwwJlcl 0k2xaefWuZcZGoTf9X0zc1He5RUkkDNqhFD3yIHqJRHOU5+H3+wQyIfJVFf3IgIA7gPxYK X4nw/b0ltrurdTqgKkDsUS644Al6+Y03LWvVWl3AZkH4zph/qQq6rZ8ykUKgiQOBxZODRG rlBTCpNqM9RBFM4ALujk9nfIAKbsfPBY4eMcRzQozAVSfd+tOkeSZCo/4NMVSOh0rNFVxL 5YMPoKnBkFPyWUXzhFPRQR6WbfP6hzkryz8XgOvF716Ewv1d70qS8FT+ZqVa+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672885; a=rsa-sha256; cv=none; b=h+xKAVw5QCoBb695utPq9YaWz3/A/ZapHHda6X+gT/f3ZotbQ2WBlGnYahXQ9ZLGr5iAjl pAWBDXcXi686pBdx+HO2WbjNBw/5l4QiUP5TtSBWkUJEHCjMF3koU+mfJ+iC+rDMBpNaTz XfR8m0y9hkWn3fYHqsQkaPDgFFUc+Wpj+Ed7Sv/bvuxL8Hh1do7+sB8tmOj7ZSsfcBUH/H Rdx7tqJXHyEtvEEOdaSU+eHGLOOH/oCG9ntKRs8Tt8//I6CQzqNgP/fH5tC/6Mdv3l8p7i P46saqdVSkY5iUaVKxjN7gqvkXGwh8pXVZq50QtAEqFHM8M9bEGW6ZrlaRQyuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GY3Q9PzftY; Mon, 30 Sep 2024 05:08:05 +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 48U585dv024255; Mon, 30 Sep 2024 05:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U585fv024252; Mon, 30 Sep 2024 05:08:05 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:05 GMT Message-Id: <202409300508.48U585fv024252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: be02b9a1142e - stable/13 - netsmb: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be02b9a1142e39dd537056c4917a86a97d901eb3 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=be02b9a1142e39dd537056c4917a86a97d901eb3 commit be02b9a1142e39dd537056c4917a86a97d901eb3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:30 +0000 netsmb: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6e50988cf822f87a524b8da2fdc35b234078cc2f) (cherry picked from commit ce708880847cb8d87ac0d7499fdb6f08cc33a7f8) --- sys/netsmb/smb_rq.c | 4 ---- sys/netsmb/smb_subr.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c index 71f6e221ace9..0170514f52ce 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -65,8 +65,6 @@ smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred, int error; rqp = malloc(sizeof(*rqp), M_SMBRQ, M_WAITOK); - if (rqp == NULL) - return ENOMEM; error = smb_rq_init(rqp, layer, cmd, scred); rqp->sr_flags |= SMBR_ALLOCED; if (error) { @@ -377,8 +375,6 @@ smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred, int error; t2p = malloc(sizeof(*t2p), M_SMBRQ, M_WAITOK); - if (t2p == NULL) - return ENOMEM; error = smb_t2_init(t2p, layer, setup, scred); t2p->t2_flags |= SMBT2_ALLOCED; if (error) { diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c index 8094f9593957..73961f7a8c81 100644 --- a/sys/netsmb/smb_subr.c +++ b/sys/netsmb/smb_subr.c @@ -150,8 +150,6 @@ smb_memdup(const void *umem, int len) if (len > 8 * 1024) return NULL; p = malloc(len, M_SMBSTR, M_WAITOK); - if (p == NULL) - return NULL; bcopy(umem, p, len); return p; } From nobody Mon Sep 30 05:08:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gc0mf9z5XlfV; Mon, 30 Sep 2024 05:08: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 4XH8Gb5qMrz4WQ1; Mon, 30 Sep 2024 05:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=35Mb+vakxCtLu9ivx/BUk6VtrOX3Jqi3fUUE4KwLWC4=; b=E92RS4B0t53eK0RZAEXCiKtIyUQeWN7fY0ZlGScDXjWezcvPkwPvp1sn0sJAGgaZ0MS4yp lMDzUamFYC38eKNmraXnNCRiGduXRptEKS+At1DthEPQcW4NcX85hFNCPhe497Zm5YFxv5 U2CH8OfMSTs9GFj+7V3+MTgIHRDkqsRLPvQ/1iNb22NmztwXYZ869MRB+VrNUiX397XdT3 OWEOSPO09vacF/pZwn0v1KXKe7pFxmb14MuW4GSomfNaGLKZCRclg4kG4+dMXDsb+ctWIe ck7PldjYqqVo110ySw90kRe0yvF4YvIgF3+L2UZDpsWq8Z7qLVTPyB9A/ET/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=35Mb+vakxCtLu9ivx/BUk6VtrOX3Jqi3fUUE4KwLWC4=; b=am+YczsObTT52X404OEvpfo8BZQZE1qyk5fFfyV0OM+2zAd2pZ3QsAwdqttHOr/wkPxUFC krPcFC/fjaoAwE1n8Bg2p5/jdWnD9EGqcOIipy02073LtnxX/m9u88wWHntCsIlpPTNjgR Q05dxYjGKOq67KIkTvsXKbonR3LJ+emLmWYIgLgmz9ZCuKE0SC2uPBoBXc6DxLDgcgdvw+ dJnaoZMbxzQPSZSj5Tof5CFZjbt9IpNjHRQBOvDgwWqxcI81cqWutklvagFXtqawflCSp5 5ZkUctqFMHxrvovT+jFAYP15YL6Cx1F2VMmXx9861zL2A1SEGA5jTicl1FI5Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672887; a=rsa-sha256; cv=none; b=q7ymnxtIjLoPwYlJkg6RhC1qsL/xc636zXkd3mcB66uxxxigdsilZ5wlUDhEekgFMO/6BE vhn9JTvDnlq3b/n4fdEebLfTI+Q/yhNH9uptXxPgoVzI5lOfgg1n7b/TqsuZFsuM245G8F 61babpClCgMXRjfVAd7TJATasQp9dH2uWRiIQL/zP/9+c3dsjgiAXdZVlv8m+4LUtrGxlu 7nepiiQj4yGZU9LNLfyMqF6FygSgyjNKmiYR+WM87aViIV1i8mbb3fDEHhHlOfBuOtsNgd I7S+ChOZAjuYMt33phQIbHUXB8BBIvkI/5/mblCLO3kP/da2wFgJOoCGvaVWHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gb5JFzzg9x; Mon, 30 Sep 2024 05:08: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 48U587AO024356; Mon, 30 Sep 2024 05:08:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U5871o024353; Mon, 30 Sep 2024 05:08:07 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:07 GMT Message-Id: <202409300508.48U5871o024353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ebf9b28b19e2 - stable/13 - LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ebf9b28b19e2f5832d954861efba5362b0f38d09 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ebf9b28b19e2f5832d954861efba5362b0f38d09 commit ebf9b28b19e2f5832d954861efba5362b0f38d09 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:31 +0000 LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK) As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove unneeded NULL check. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 7bcb1228558b4325fab39616e2e3b2573a9e7da6) (cherry picked from commit 7bea79c1ab400fc223d730a89af97dcf4ba09911) --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index a33149353c75..288ae00b6949 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4372,8 +4372,6 @@ lkpi_ieee80211_ifalloc(void) struct ieee80211com *ic; ic = malloc(sizeof(*ic), M_LKPI80211, M_WAITOK | M_ZERO); - if (ic == NULL) - return (NULL); /* Setting these happens later when we have device information. */ ic->ic_softc = NULL; @@ -4425,10 +4423,6 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* BSD Specific. */ lhw->ic = lkpi_ieee80211_ifalloc(); - if (lhw->ic == NULL) { - ieee80211_free_hw(hw); - return (NULL); - } IMPROVE(); From nobody Mon Sep 30 05:08:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gb0F6gz5Xlcv; Mon, 30 Sep 2024 05:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8GZ4vNmz4Wgg; Mon, 30 Sep 2024 05:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pj9pqoo3aEpCZsfOUd5JoqERKJMsgiNVdVcOiygw2jE=; b=eUdDVKXQpqVT4JWVw7x1+sc7vT1t0uB4SlHcj13dw9moTSHH9PZCqTTob1rTuVBTbQ5AUx b2nfQx+Iox68lgLmj5ZAV1yD68kqTh7CqHtPAAtS+wDrjQGFHDiFLqPCkj4pHPsQS6+/qL PmEsZHAI/RTKp2NLIJPuTK8HH1BZNTrzFBtRiWnDHBQ8zfEdYGrg+Ofbnrty6aMJQDhafa lAalWRVEnBiMxMLR9W4DDKfSZeLT69PCUummfF4ntKhGRXgCqrxKQOmyS4dSddbHiUIVSU BETdcqgZbu/Zz2/+gGywGntlmIxmE6lFY7/UeWdz4Up9phrwWJLzdL24e+IbmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pj9pqoo3aEpCZsfOUd5JoqERKJMsgiNVdVcOiygw2jE=; b=uyk1Ripmix1N9TbAxCQvyO5eZ3AfNCy3YSdCcxzRig8BAv5Z8pxX7F6Zc9MXQ+tDWSnh35 5LPu2mXqhbshbIhDb+gCnFu5QxDnWJSCRE1oEG9CT1PoPcVliwac70oRZ7hseR3fh37Nd+ dkzrH3kbIlxwSwsCtkXTHfPXwL0/DCYRpyCkr8ppMg7oFcX55rQ2uwfE6RL/5K3G+QVOAm yFpE4YmU59W5UC3lNfwg1yAOwUCR+wzzNgKNRnuaSgb5BIi4Od7bkzbLYZ9G+e2W/I+7+O okeaoIBM4eSuCNvQBmXSgrsQAohzGhionrUlLQYK0L8sC6Q+xyy9GBv5/guN0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672886; a=rsa-sha256; cv=none; b=MSi9m2+GtiX9UI/25Ckiv+mZUfJ5wNFsJRBYF9qEwLAdY2Bju1KOM5c/FvAmVP4aBwOACv r8tXOswiu7SHEND32Im2nsYOZ4OOJqbkLX3F6JXNIAgGR7T/QaHvlFS2rW6/2pVe1Yft0c QtM3Hmuf9ou9iibk3LHWykN7e+TBpPfcwMuoDFe0r4V/vOq+khvLiV+XXnnQTT+JbRbdYG TNDyp4RpNKQFSVS6I92BJu1dZSgMndSUtYtMPUElgzZSYGoc7N7hNJRCReZodsTpHQGxDq bo8cMxh7Io6VHRnv4pElwGG/7laXxwRBeW0Bs9MTwMAEN4y7ENQjBYQqRbawPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8GZ4TFlzftZ; Mon, 30 Sep 2024 05:08:06 +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 48U586Et024305; Mon, 30 Sep 2024 05:08:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U586Lq024302; Mon, 30 Sep 2024 05:08:06 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:06 GMT Message-Id: <202409300508.48U586Lq024302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 4e98af94a124 - stable/13 - xdr: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4e98af94a12408ee38468d2c77d0a19239f5cd95 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4e98af94a12408ee38468d2c77d0a19239f5cd95 commit 4e98af94a12408ee38468d2c77d0a19239f5cd95 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:30 +0000 xdr: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 7a720bf67d73ba565a0a1130065f798870eb5faa) (cherry picked from commit 3d5e539b1f43dec0abd2df61cb958550ef9606a0) --- sys/xdr/xdr_sizeof.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/xdr/xdr_sizeof.c b/sys/xdr/xdr_sizeof.c index 6491fa80dce1..fc341dcaa9df 100644 --- a/sys/xdr/xdr_sizeof.c +++ b/sys/xdr/xdr_sizeof.c @@ -95,10 +95,7 @@ x_inline(XDR *xdrs, u_int len) /* Free the earlier space and allocate new area */ if (xdrs->x_private) free(xdrs->x_private, M_RPC); - if ((xdrs->x_private = (caddr_t) malloc(len, M_RPC, M_WAITOK)) == NULL) { - xdrs->x_base = 0; - return (NULL); - } + xdrs->x_private = malloc(len, M_RPC, M_WAITOK); xdrs->x_base = (caddr_t)(uintptr_t) len; xdrs->x_handy += len; return ((int32_t *) xdrs->x_private); From nobody Mon Sep 30 05:08:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gd2Dldz5Xlnv; Mon, 30 Sep 2024 05:08: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 4XH8Gd06rcz4Wvk; Mon, 30 Sep 2024 05:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcsrWBXjjX4n65paWMJk+hTsi4Pd8qE5zovBNjuomkA=; b=Tmnz7t674p7FTAmy5fucOaaaOz+HaRK3koeLS2UtFowrXXzF3uQhn2V9Kfni19KORJJebm 3AoB8JTD4vOD9O+Rycltz9Do1gRfEVHH70Kg8zwSKRF5lKytXGyly+sEJD0e93+jK8b++u R0phSJVQ+RguF7wudmnPmb+wXLdnHYOxNqB5aOp0aNqIJF0FUzDIjLPZ2yyKkkSI66I6x+ AjvFe8Rign0sTw4VYP1sva97hRmEgcTvfTicLTrPoFw1mneEgAD5DiCcafUvJz9iDr7hgh sHB7TjDKrqm4Y6qAANkszQPE6ViY2JhCy8sqnt9p5ozP3B4wSOF29zj1KnTLvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gcsrWBXjjX4n65paWMJk+hTsi4Pd8qE5zovBNjuomkA=; b=NAabOe3MKEeUxhcKOynq52wp0ycLhzacp9NB7cg0EY8Q7buwWT5TiLBOcOIGV6RbK0slzN p6Uagd48cyrYQiN3bCglVIBKoGVZ3h9Beovz7Zj27uiZqMLkT06yDK45euPVBbjCS+1nNo 0orJJD/bv7I+2aLoWVEunvH+L+RbsgdwZjC6LwnFAlrC9dQlTMaBsVVfoM+67lDgrrydFU aT+ypD0l+265xTLbashonpqCSzAOeuOOiJ4yU6I6SEMSvLIkxtu5O8Y60oYy0wxaf3lGOj rbrp8r6wm+LKU70SPxgwFwipeBk7/Z1sUprT82JyhoGWC0zsHWKpzfBVJbISww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672889; a=rsa-sha256; cv=none; b=eops+YpEc4XwjfWDJGgzGVXnDV/ARtzy5V6oWz19+jwmO12MA8AJOlVCGqkcj7M2nuI/tl 1H3NLfaXuEPrT1GngLKW+QBEy3Xo/R0zXtMGF1FmmSjKFREYs2VLOs4jue6pVwFHU8ABbC hJKwLepBHP3usnkmWxvu8lJjMJIwtbwigkQSCfT1JL9WN1/ZOZ9S94e3ruV3qeo9Yc5Eqc gV28DXWxnWqtOjgaXSvJt9f3gLzxPGwzFrMgoN7RVv0eRqYbRyCavEDvsX2QjaE8So25ii AzTuP9irxQiV9IfVytW3wBb2sptrlpFDuqdWq5ztp7hnO52jQQPdQfzG4srAtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gc6rQfzg84; Mon, 30 Sep 2024 05:08:08 +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 48U588FA024405; Mon, 30 Sep 2024 05:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U588TT024402; Mon, 30 Sep 2024 05:08:08 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:08 GMT Message-Id: <202409300508.48U588TT024402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a7fff4fb4ec6 - stable/13 - krping: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7fff4fb4ec6e834d801e64df83a169b35cf2048 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a7fff4fb4ec6e834d801e64df83a169b35cf2048 commit a7fff4fb4ec6e834d801e64df83a169b35cf2048 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:31 +0000 krping: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 66c35a6675ff987b52a2018871231658b1980a6c) (cherry picked from commit 905d5420ee1eced55f99ab3ba5c340b685f2f896) --- sys/contrib/rdma/krping/krping_dev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/contrib/rdma/krping/krping_dev.c b/sys/contrib/rdma/krping/krping_dev.c index eea3c772ea4f..59aa19672443 100644 --- a/sys/contrib/rdma/krping/krping_dev.c +++ b/sys/contrib/rdma/krping/krping_dev.c @@ -174,12 +174,7 @@ krping_write(struct cdev *dev, struct uio *uio, int ioflag) char *cp; krping_t *krpingmsg; - krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK|M_ZERO); - if (!krpingmsg) { - uprintf("Could not malloc mem!\n"); - return ENOMEM; - } - + krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK | M_ZERO); cp = krpingmsg->msg; while (uio->uio_resid) { amt = MIN(uio->uio_resid, remain); From nobody Mon Sep 30 05:08:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gf2tnRz5Xlnw; Mon, 30 Sep 2024 05:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gf1Bklz4WqS; Mon, 30 Sep 2024 05:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n9cenK8YHRMZ/DMmFWKCcp4Sc+XLcEzqRNB/BjJu3kg=; b=s3Ev7i/xaWf4h9/BXygX3MGW38HTdkyYIbDqlrLFocp2QYCL6gaiml8638VNK8EARoKvlb Pgiq201mVoVZay5gHhCIEWrD5FcKOTEdbTwSlf0eL0yR7tUz/iVHFtvEmyuxVqcypYCRdb dE8oM5A/kIfLdK89ZBiTUtOZZViWaDWR6COIvt1NR8O7SZlHpO/SHBAdBZ9uwqPKSyvLPr VLRUvPQWoQCGHIK8A4DRqr+SLQ5EvGB9Ir+DQ7yd+ugh22fvWvyS8HpdS2Ihd/pU8UAJ0X tvsqKCG4rvxVY9kyy/tgrNnTLjztZREDVDxnah5ycsV70jtJHc8r1gy4xxxPTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n9cenK8YHRMZ/DMmFWKCcp4Sc+XLcEzqRNB/BjJu3kg=; b=yQWqjvJvHA/njvJHSybs8eG3lxtRl+kktVdqSM6pRdlIz1/n4/XDsoQ1IQGAAa6QC7hKDW qpY2/EtM76P7Y1ir38ssolSIVeXOiqlwxIM50MbIujFruZ5yYBYJCUSPnQ7tWjHiGW8y+m IyQ/cbvvpvJ2gsM28+MBTK9/gOt+uCMlw15fJsg6ZVV1gv6BbJUroxWEvsbsYv0DSJ19q7 ym+YqauIRrf0jReJnz2zYuqNI6TNfcmo2I2XE0YgBwxfWnTQjhYa3UXHPgJjViBHemNLSk oT+HQuP1GDjJApEddosE6dzTjUZRoPWffLjDB8n6RJGRGTzduEo6NIMxKpdrVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672890; a=rsa-sha256; cv=none; b=NRrjcy/xDY5FaDzFWqtylaxMExJjYZvALhl5fwH/FdwTARDREY4rXnY5YC7kSrzaT/5Mu3 miSoLav6S/gMIO3H9jpIN2QGwt3CDiP+KB08X4FYo0g+I1KLuioO6m9zZxSJgOj1dEfhDf ZIozIuHkKZ3oPpkkIS67Vk916oIysMyBdKgV9ArEz9kOYWgzvo3jD84vKYmVS79VDK1xac qPYmsE8q+Pj0OnIx8uxZNpeMPrRmEGsMjhIxizxCMfbcgmzXEsPmTY2kNH49BLr2SmDyB6 f4HrSYfkiDQD1RfaKrTM0JlczxA/fV+6ou1czBRJN99x2ZSd7Y/Qu7x/qBRMmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gf0nQDzg9y; Mon, 30 Sep 2024 05:08:10 +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 48U58APa024461; Mon, 30 Sep 2024 05:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58AvF024458; Mon, 30 Sep 2024 05:08:10 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:10 GMT Message-Id: <202409300508.48U58AvF024458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a8a127328ea4 - stable/13 - tests: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a8a127328ea48a62e87799ce3f1513df1a117e18 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a8a127328ea48a62e87799ce3f1513df1a117e18 commit a8a127328ea48a62e87799ce3f1513df1a117e18 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:31 +0000 tests: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit aac6c41d4ba9b0a1aef561f6c4bfd284ab369ebf) (cherry picked from commit 6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a) --- sys/tests/framework/kern_testfrwk.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/tests/framework/kern_testfrwk.c b/sys/tests/framework/kern_testfrwk.c index 19714fa76f52..c6b46542a205 100644 --- a/sys/tests/framework/kern_testfrwk.c +++ b/sys/tests/framework/kern_testfrwk.c @@ -192,10 +192,6 @@ kerntest_execute(SYSCTL_HANDLER_ARGS) } /* Grab some memory */ kte = malloc(sizeof(struct kern_test_entry), M_KTFRWK, M_WAITOK); - if (kte == NULL) { - error = ENOMEM; - goto out; - } KTFRWK_LOCK(); TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) { if (strcmp(li->name, kt.name) == 0) { @@ -244,10 +240,6 @@ kern_testframework_register(const char *name, kerntfunc func) return (E2BIG); } te = malloc(sizeof(struct kern_test_list), M_KTFRWK, M_WAITOK); - if (te == NULL) { - error = ENOMEM; - goto out; - } KTFRWK_LOCK(); /* First does it already exist? */ TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) { From nobody Mon Sep 30 05:08:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gg4mRRz5XlLR; Mon, 30 Sep 2024 05:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gg2HrVz4Wkm; Mon, 30 Sep 2024 05:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rpr7lswjwq48ly8LfBQPvwz3SYiAgEPTVYUX4vgjIfY=; b=cumLl9B6lqV8oM0q7WsEObyQbyVuTT8ZYMrLsfhoOHwfAWPV/bevXGtWqBegkqY83kej42 81V96rSlnnMsewJKg6duSCHOfvJ8h6A0jAO3b+s58KXJYpO4CpwifOngexSJnxC8lkHjfK 5SBzt8NjWhFlfWA0dac0B4/NFMWt3rkLqpy8Qu9Ip80Gb61Peu2USYmUk1QE+naAVglHpC AscQyTObJhNVRNKjv1RHoDRMiPHmbLgeJ5yp+LxC0Wn37/H681Owi3XvTBPv3JlJbIs291 FJZxTZz1jT7RbYfhrlf4hYSuS6oPzp3XzodsgjJwDdyQ5ul5PCwuvz8YJ4GeMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rpr7lswjwq48ly8LfBQPvwz3SYiAgEPTVYUX4vgjIfY=; b=w7sqRluyINkiZZxqDtfdq/mso89xpfVvL/6E5oA7OJp1sL+Ophf5Ks6NY+KT/SMTp74gNv 1OJ8sZDsv/3DK/8KpWOsxJy1a+/5S4xiu/zUtyZRJFM9NUf4LuztspHLpCyZTa+Cntfwd9 PLZUCh/yHN7ed12Xfg4OKNnECIcVdgu5XQL6HrzB4MDLpfGxOpGWi9vzTKbSQTJHsbHuK4 5DE/bNVE4q2sHbw4J08qgX5BfA1nNSwTF3oYOWwD1Qd7Q4ArJ2KLP2L03QQYQ+Ia+uOfZk ZpD6vo/0tqgyWEQS0PooiovtBp4xAFKcegA4gkCcgFoIPQAcX3okhUEO1Jrevg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672891; a=rsa-sha256; cv=none; b=n/XR8v2yd5qLlgcYyMKqz91UDcAhOl0AYm5xwUoJn3csWKaM7TWTvVZnnNLhJZmUUATL8u 5jbwlIHpRkWaWrp6BUfl6DISVRXyO+zgHRTXOtq8fc6ek3YuFk2wWcfm1D+TfWcB3TZn6k cc2MRZA4g13Yko6GMD/F1YYCSFhqz/zIYsLXqYDwM5OCpLDb54Gp+vNdUT+//CVZaLzV4v yZFXwICda3GJllC05w3J+AeDDj3A31RyUAK0F33zZwbpyNCCS6scvhbPZzguPEbxRiELdN W7XYqHWL5sxIkNoApNbxhHCFThYSY6zfkheOE4/5XGu1HjyAM0jyz3bs2VC3iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gg1wCSzg85; Mon, 30 Sep 2024 05:08:11 +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 48U58BtV024512; Mon, 30 Sep 2024 05:08:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58BGL024509; Mon, 30 Sep 2024 05:08:11 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:11 GMT Message-Id: <202409300508.48U58BGL024509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 53922b3c2669 - stable/13 - arm ti: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53922b3c2669f42f1f030615bbdf5e4e8b00f93f Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=53922b3c2669f42f1f030615bbdf5e4e8b00f93f commit 53922b3c2669f42f1f030615bbdf5e4e8b00f93f Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:32 +0000 arm ti: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit fe6985ef87e1aedf8e5c9b3b959c7dd54a03e2fe) (cherry picked from commit 920288c32900da48136eafc41aa6d020552e36e5) --- sys/arm/ti/ti_pruss.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/arm/ti/ti_pruss.c b/sys/arm/ti/ti_pruss.c index 82fbb0d7ace3..9e0c805478ba 100644 --- a/sys/arm/ti/ti_pruss.c +++ b/sys/arm/ti/ti_pruss.c @@ -186,9 +186,6 @@ ti_pruss_irq_open(struct cdev *dev, int oflags, int devtype, struct thread *td) sc = dev->si_drv1; irqs = malloc(sizeof(struct ctl), M_DEVBUF, M_WAITOK); - if (!irqs) - return (ENOMEM); - irqs->cnt = sc->tstamps.ctl.cnt; irqs->idx = sc->tstamps.ctl.idx; From nobody Mon Sep 30 05:08:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gh5CQSz5XlfY; Mon, 30 Sep 2024 05:08: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 4XH8Gh3M88z4Wr6; Mon, 30 Sep 2024 05:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKMrRUOn+y5jEph/hYaAkbF8/YB6BFYHYUf3ep87TTE=; b=trMX+WKdhTbqP3Ftms8UubxLNmTHBNMVdEeOZ4/JcyBJdN9jxK6HOa46bBzz/NR8m2+mM5 J4aS7mdavYD8h/iXo95UB9sE05SY/KUSSSBU2DZ3Gd8OdHQm0z6DWhmk3q7hPGsgZ4Pgou S2ZsB9JolGGc2xu89OsK1XWMt0pzxU/+8GIQmIYBX4dieLENg5oipERKBlP7EFgK1ccOMP Ug0uQzpKTAeqT81/J/03I8m5w+TlE3pa6rNyNZHLeG3PmAe3ID26Y1bqEPI5xaGSLpXugs tbA0E12Bm8s8SU01aAm53Qcdb/Q94H11u24ImKw1N3Rs+yO0KaaNoaJ+IK0k6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKMrRUOn+y5jEph/hYaAkbF8/YB6BFYHYUf3ep87TTE=; b=UhxSJ7XAzRsy8XKQhXt/j69P3kTLqKXH7sfrceoIoXSUdUg1uNGTNcHHyHJQ6+zhTSTW0k PYm3NmOd1xB79ylce3bmj1JxKWAHliy+7ZV4H3AJ2+jIRrjxRU8fIHyjVM9PHcBgK1fFJR sxJ/pYXbICyoQxP2y3iaNt2XqwAejqdxerV+L3wJhBSjicpOQAuYMw/Uw7NjSqd96FIvrE Uq9eoJN25GBPRnU+1dqvEsGwvVgQY+rYzX9CcQ49TH4xJaA0rkUEwSnMj/eMzX6C/zg6BD iNanjERdE/PQDa2vtQOnTmAs1oIpOZf8ysMDDX1qNlr5FN8nPUZz142PdJC3/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672892; a=rsa-sha256; cv=none; b=qa2/+N1VLI3dXf8DOt2hjuKclxbv9CAsEj/jD5wN5buKbv+/0sPtLfMTpORmkjqRbfV3vN L5PR8qZMwLSc2psb/+mRIdOnMPuny88IxETncvOM0FzwOhILu8v1IdQzdPXVTsSXQiP8TB cGrUnzjpCySx9d+2+FYDDTe6/y3kbG1a5MMp31tBSXBdAeUIDjA0c131zeXH0NW478YOlI ox0Uw2O157oi2AN8Gyltil8MHrnckxJ9RLowLvF/Mt53dzmpI92jdsFs0Ae4YDdla0wVOD IRFUGDi7+7oo2g3HZSffPzCfXWsDVqaJiD9S5oK4yDQYfS1Lyk17CREA5sAYkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gh2zcbzfx5; Mon, 30 Sep 2024 05:08: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 48U58CSc024560; Mon, 30 Sep 2024 05:08:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58CIM024557; Mon, 30 Sep 2024 05:08:12 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:12 GMT Message-Id: <202409300508.48U58CIM024557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 91b6d79c2f39 - stable/13 - smmu: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 91b6d79c2f39199d51f7642410418a8b10dcef0d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=91b6d79c2f39199d51f7642410418a8b10dcef0d commit 91b6d79c2f39199d51f7642410418a8b10dcef0d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:32 +0000 smmu: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit f75ceecad2157a0d3aca61a4893ab78f2dec21ee) (cherry picked from commit 49995f771b537064daeb2931ce86a13e78f9d977) --- sys/arm64/iommu/smmu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c index 40f78041c316..98e8ad14e277 100644 --- a/sys/arm64/iommu/smmu.c +++ b/sys/arm64/iommu/smmu.c @@ -931,10 +931,6 @@ smmu_init_strtab_2lvl(struct smmu_softc *sc) sz = strtab->num_l1_entries * sizeof(struct l1_desc); strtab->l1 = malloc(sz, M_SMMU, M_WAITOK | M_ZERO); - if (strtab->l1 == NULL) { - contigfree(strtab->vaddr, l1size, M_SMMU); - return (ENOMEM); - } reg = STRTAB_BASE_CFG_FMT_2LVL; reg |= size << STRTAB_BASE_CFG_LOG2SIZE_S; From nobody Mon Sep 30 05:08:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gj6gwSz5XlLX; Mon, 30 Sep 2024 05:08: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 4XH8Gj4Lxtz4Wws; Mon, 30 Sep 2024 05:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jf/fIULFnefiq24g9JWO6dyMajOIN4JcntMjzzzHD7o=; b=ERB620v+jy5E7TetKUt+FGcTNRBCcdR2qm3CKrgyq1mRyDyE3bnMH+XsX6Aje8qwKW9B2a fXZSkTtxHRI9F+ke+7ci+3+wQWRtgA3IQiCYpELJ34PBP5sS6StXZ7czv3CHzsI3Fn/tg1 2mhe4RaKsY1OS31470ZBJADkqex2oij/LXyxGqNnyKtz0yUieZSv87UFxICFkUPn6i4k/r ccqQlECycaGvY2CYeW2gTvaIq7UsQDV0cakzmrPKs7dOoHD+Fh8PM9Tyhge8/PYH2Ozjf3 Aaa2t6BvnadAntF/i8G7tc80Fvv/Zi0adDEq2e46R1VDGANPb9jTn+HX+0uWhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jf/fIULFnefiq24g9JWO6dyMajOIN4JcntMjzzzHD7o=; b=wtn/9RYYRCqvUqmJzNRAft4F9CUIdKmuG6of/WBTpfh7+mqAnrqLYwbT8NcrA5ZsJTR6vn uKQW4EO1Bz7BsKqZOFwFQ/pEtBCOjNh6Zd5dofsIq9xbMkblKnl2PMB6qUnG/Sd0y+DlC0 jgDHdJF7tmSloDTpbBljherzwfRFSVtSkHT18ikKgWZS0mNg5r2LwStTf7XaX03Z6WF4H1 MC4D4fuaY7dhTo1ER7sbR9ign0KC4DX0WSgqrTYLvjg/LPihuDq3GQmcXASGQXgnj5sQvB eGRsTfqJycpOJi+/hsLTsu2dUHB+s07379SrY7cVil/gq8mmJh0eNqF8g7KY1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672893; a=rsa-sha256; cv=none; b=pKDggnCciS2Kc8rZ9DQkwJhY1I7bxQpgPhMvXc48MVbXY1mK+3Lc4CUbBC1TMgEiOvNEVB fpU8A8gCGzlr+DkvhBAACIYLha1Z5wd9ZVnUfeZguihkkdAPnvPoSIRcohTogCcRTq8riu UUmdlZKovG9uTFw7Pl8THf/bR1I1rIQkTWxtuEkFAwIpVI6MMIv5FoYOe9EHJh1uMhVjbB tdjWtyqrXALeIltYSXU9dLvZxgagnaMgsqjOlQDDmYpCKXk7LKKGg8dYbdnWZ9OfMBJgZz PbxpvEuBk2azD5rSbPh8a7XH2YRomBZ7T3sGxGQnNM29RRb9BemUVSOkITeWUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gj3zH6zg86; Mon, 30 Sep 2024 05:08: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 48U58Dpe024608; Mon, 30 Sep 2024 05:08:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58DSL024605; Mon, 30 Sep 2024 05:08:13 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:13 GMT Message-Id: <202409300508.48U58DSL024605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9113fe381f1e - stable/13 - al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9113fe381f1ea848d960315a3d3abdf9b770da07 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9113fe381f1ea848d960315a3d3abdf9b770da07 commit 9113fe381f1ea848d960315a3d3abdf9b770da07 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:32 +0000 al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0) (cherry picked from commit 74887e322101cbc9e531e3acd08a6eb10dd2169e) --- sys/dev/al_eth/al_eth.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index eb6525a566dd..409769b5ee5f 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -2009,14 +2009,6 @@ al_eth_enable_msix(struct al_eth_adapter *adapter) adapter->msix_entries = malloc(msix_vecs*sizeof(*adapter->msix_entries), M_IFAL, M_ZERO | M_WAITOK); - - if (adapter->msix_entries == NULL) { - device_printf_dbg(adapter->dev, "failed to allocate" - " msix_entries %d\n", msix_vecs); - rc = ENOMEM; - goto exit; - } - /* management vector (GROUP_A) @2*/ adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].entry = 2; adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector = 0; @@ -2304,9 +2296,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) size = sizeof(struct al_eth_tx_buffer) * tx_ring->sw_count; tx_ring->tx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (tx_ring->tx_buffer_info == NULL) - return (ENOMEM); - tx_ring->descs_size = tx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = tx_ring->hw_count; @@ -2329,10 +2318,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) mtx_init(&tx_ring->br_mtx, "AlRingMtx", NULL, MTX_DEF); tx_ring->br = buf_ring_alloc(AL_BR_SIZE, M_DEVBUF, M_WAITOK, &tx_ring->br_mtx); - if (tx_ring->br == NULL) { - device_printf(dev, "Critical Failure setting up buf ring\n"); - return (ENOMEM); - } /* Allocate taskqueues */ TASK_INIT(&tx_ring->enqueue_task, 0, al_eth_start_xmit, tx_ring); @@ -2481,9 +2466,6 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) size += 1; rx_ring->rx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (rx_ring->rx_buffer_info == NULL) - return (ENOMEM); - rx_ring->descs_size = rx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = rx_ring->hw_count; From nobody Mon Sep 30 05:08:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gl2Ldbz5Xlr9; Mon, 30 Sep 2024 05:08: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 4XH8Gk5csFz4Wrt; Mon, 30 Sep 2024 05:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Ycn77/ts7SxkNeLDRlu1c2JmDkV8mc04UoKkZ3e1sU=; b=wxTToD+z6zaQqY98n+cS5I0jUMuB2Jgi09jMbBuZdm8mYxnbVMeWGPaJmVS4krzO11GqDI dbH085fa8a3zpE4UIow/sjFfIS2LvwJryOhhj6enAW3GIBlWGjyNsPkKE+SJiRM1wfUxQE 4/UKflgKceJ8gYGroVP3hztAbO+6LNnc/NzivhzHgfQFSolQFnYWC02PAykIUD1BP6ocbz KriJoske9cSdCH6IG+3F+2PGbvl9SPnse5wFUB6+MM9OSot9ZIQBhF9ecc6A+7WppKrLc/ fAYw/KY5QehX4lRT9oyxz7zaNVD7hu+KoR2s4vGuHRYK0ZCEzaK+jCz05xbOSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Ycn77/ts7SxkNeLDRlu1c2JmDkV8mc04UoKkZ3e1sU=; b=i9C7nypb+6cLG0uphyhpeNxRn13mRyohbuURVLDwc49eoZP0p7LswiTV2sEi3I1CG0TXkj /xF1hlgGlYbDuFH+CG5aEufXW3/hoTK7exsl4npiUE0h3RfxTGSBYkTL6XOe43t11g5ujY xysMB5K1v82mDStbE8ujsDMwdJ5mtpzd2u5xgZ+Gmld0w0C2LZGLyGqRHQYiLE4qZQfmBL 5MQIL4vJ1SgDbUHPHmSjLxNbnU30CtzOpyTbG6UlPrLX3EYliR++EGn7Zu04gtV+VYw/NO e8/dW0m+4Wj3gkuzBWHlYkjCbCBcDL4PDwXcRvz9bpyrKsLi5KvAJOFaVmpeCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672894; a=rsa-sha256; cv=none; b=QwjB7LeQck8rbM8DM+pcY1mzuO4yjL1mK+VVJGsczQwhaHZOlrptv7g3ID2dm7UB4JJS0R mROg3SWpZPprcvuxFJmbuqPBTE82AKsf32bv6ApiHpVi//32On48F5EOJ6lQTEl2P9fN5r M5w9gCXzBa6Lp9hM9l/5PkX6w7kp6CopvGZdgMGZSEB+J/Qi5nHz6jOOhSV/OKDwAX1R0f dOttnspMHJz27RYzNY8mwfULUGiWI2yvIgIv9EhReR5lYBICypo7mcE8lKhnt4NsklrQin K8+Wxt7o+3Wqw0CHClJSVXKWoXtL/4nOK/Y3ZsOu1Kqk2LSCxNsOZm95tDZkXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gk51W7zgDQ; Mon, 30 Sep 2024 05:08: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 48U58EvZ024656; Mon, 30 Sep 2024 05:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58EWl024653; Mon, 30 Sep 2024 05:08:14 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:14 GMT Message-Id: <202409300508.48U58EWl024653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d40d85672e9d - stable/13 - altera: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d40d85672e9d8154375d8a2ad6d6dabf26865576 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d40d85672e9d8154375d8a2ad6d6dabf26865576 commit d40d85672e9d8154375d8a2ad6d6dabf26865576 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:24 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:33 +0000 altera: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit e06e2c84074740a0087193d5929d09f1bc7e1c4b) (cherry picked from commit 66bb507ccb1c9860662a921d231f591ec814d83f) --- sys/dev/altera/msgdma/msgdma.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/dev/altera/msgdma/msgdma.c b/sys/dev/altera/msgdma/msgdma.c index be2c55baaabe..cc560140159c 100644 --- a/sys/dev/altera/msgdma/msgdma.c +++ b/sys/dev/altera/msgdma/msgdma.c @@ -356,11 +356,6 @@ msgdma_desc_alloc(struct msgdma_softc *sc, struct msgdma_channel *chan, /* Descriptors. */ chan->descs = malloc(nsegments * sizeof(struct msgdma_desc *), M_DEVBUF, (M_WAITOK | M_ZERO)); - if (chan->descs == NULL) { - device_printf(sc->dev, - "%s: Can't allocate memory.\n", __func__); - return (-1); - } chan->dma_map = malloc(nsegments * sizeof(bus_dmamap_t), M_DEVBUF, (M_WAITOK | M_ZERO)); chan->descs_phys = malloc(nsegments * sizeof(bus_dma_segment_t), From nobody Mon Sep 30 05:08:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gm1gnWz5XljP; Mon, 30 Sep 2024 05:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gl6Nczz4X23; Mon, 30 Sep 2024 05:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7CW5XUxmUpk53nYvvceoc9sb2fPASKUgkNyiQYzLd4k=; b=DHi1O4xuirX749gWTx99SyShuJeQuy7J83XGxwY+lPxtx7Tq0wtEnYT2x7wTKX6n9z9E4V moUH218tbWevQAf1Vm5kaS1g++P2PTOFD5IG10m6ZTWEnUriNKN607TvE1q+ZsWcCUJI91 nQ5peUI+EXfgyZtJ8fRMzRRog5AJ8r6V0YazjdzzG4Jxtvc/D6Wq8usgPbDIdbQt8U1yJz NhIpeFMGUd1hEWEs0rtgYOk189Eq1MIwx0DUo68wzz/cmEpmpb9AhKqjTDCZ+lGIS58DdR 7AIUOn11nBJAL4lVaKD2LlBfwF0LJALSDaLObCBfmnXbwJQjUV2DEx2dYp3yFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7CW5XUxmUpk53nYvvceoc9sb2fPASKUgkNyiQYzLd4k=; b=tAxVKioxUs+c/2kK/Jc9tPdkpUx8EIRiOsMz/LxNqixekJ6KnzfB0t2AV+L/Uhs5DVZpOF tkFMN6/ppBXQj18yAgWJ+OISHiDAY3MHz0LrntqBfi/0EzbjV1zmphRdQFeytjB4mbge8R GfbOJuPTr33JMCbANgTjNYz9VJ2U8PxOUkF8KKslCvuIsMxn3LWSv1HXTjsk9eUZjP3I8q SQHWaIc+Hp5bwUiLVwudpu4PB8rxzMjP+g/9aMieXj9H0C6GB2fYRuir6jjkDVNpG00sKI 7Imy4lNuZHhF44J7Mpk/3Zrg2F2Rp410MCICqKOxR1wUvnADX6z46SuqjuyAew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672895; a=rsa-sha256; cv=none; b=yy2idA4I2IN65Fc2PUcFpS4u65pVV/BZwWUrWcxmu7T0J5SGFzP8Y1vww2/83AvCom0zjE GynrAjjlyYYnjhGMAgUMTGJMdvaJwGZnFXOokTG9XPyJwbEF4hynaVap2bxbfh15pXMMk7 b7wCvdWvjsYtstA1lucz1fAddwayBL7PEPv1KaubqgdAF40sV4FlNU3Ake95qsvefd437Z nyIvL3vCDfTK6oZX5gfgNWTabRUGHjJXJeuOHgbmN4ZpvplRs8Yfcj9ggDZ8Ys99Caat1c YyXrdatYgEOpvrgxxGkP4h5f2Kl45YyF4Fvrx+YDKlRzWmDu9bYKSQt6xTcUCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gl60w0zgDR; Mon, 30 Sep 2024 05:08: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 48U58F2O024715; Mon, 30 Sep 2024 05:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Fkj024712; Mon, 30 Sep 2024 05:08:15 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:15 GMT Message-Id: <202409300508.48U58Fkj024712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d0aa34422a53 - stable/13 - ath(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d0aa34422a53ddf643d6187713ae453c5935ac89 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d0aa34422a53ddf643d6187713ae453c5935ac89 commit d0aa34422a53ddf643d6187713ae453c5935ac89 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:24 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:33 +0000 ath(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 3fdf587ab02f33018bd042094e3d0bd4169352ed) (cherry picked from commit 8c2748b922f579080d4d8ca88a8ada5512a69035) --- sys/dev/ath/if_ath_lna_div.c | 6 ------ sys/dev/ath/if_ath_pci.c | 5 ----- sys/dev/ath/if_ath_spectral.c | 7 ------- 3 files changed, 18 deletions(-) diff --git a/sys/dev/ath/if_ath_lna_div.c b/sys/dev/ath/if_ath_lna_div.c index 1b20591fc64e..0755bb667716 100644 --- a/sys/dev/ath/if_ath_lna_div.c +++ b/sys/dev/ath/if_ath_lna_div.c @@ -96,12 +96,6 @@ ath_lna_div_attach(struct ath_softc *sc) ss = malloc(sizeof(struct if_ath_ant_comb_state), M_TEMP, M_WAITOK | M_ZERO); - if (ss == NULL) { - device_printf(sc->sc_dev, "%s: failed to allocate\n", - __func__); - /* Don't fail at this point */ - return (0); - } /* Fetch the hardware configuration */ OS_MEMZERO(&div_ant_conf, sizeof(div_ant_conf)); diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index 95e3715dda2b..6e332b6c0c3b 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -269,11 +269,6 @@ ath_pci_attach(device_t dev) __func__, fw->data); sc->sc_eepromdata = malloc(fw->datasize, M_TEMP, M_WAITOK | M_ZERO); - if (! sc->sc_eepromdata) { - device_printf(dev, "%s: can't malloc eepromdata\n", - __func__); - goto bad4; - } memcpy(sc->sc_eepromdata, fw->data, fw->datasize); firmware_put(fw, 0); } diff --git a/sys/dev/ath/if_ath_spectral.c b/sys/dev/ath/if_ath_spectral.c index 58f21b526e93..951d66605981 100644 --- a/sys/dev/ath/if_ath_spectral.c +++ b/sys/dev/ath/if_ath_spectral.c @@ -112,13 +112,6 @@ ath_spectral_attach(struct ath_softc *sc) ss = malloc(sizeof(struct ath_spectral_state), M_TEMP, M_WAITOK | M_ZERO); - - if (ss == NULL) { - device_printf(sc->sc_dev, "%s: failed to alloc memory\n", - __func__); - return (-ENOMEM); - } - sc->sc_spectral = ss; (void) ath_hal_spectral_get_config(sc->sc_ah, &ss->spectral_state); From nobody Mon Sep 30 05:08:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gp4p8Rz5XlrN; Mon, 30 Sep 2024 05:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gp1YFjz4Wxk; Mon, 30 Sep 2024 05:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8+wSQbz+PKzgQXggaJkeuc3TtWniwFbOfjN+ghuYQw=; b=VCfYDki/SdCQrWD79m4kh4oazsg9I+5mw5iDu4J3yM5T4fJ6OS2yZyUd5AuttKomU/nfkb hglSNfAqvCyVysaqg61mLfZSGcRURvglxA31HueyLwX/bxNC1eZmb8BIkJ6fHHbycKjXcA +hcudIZdsn0Ey8SGtBKfEiGm/1fCAterw6aW8mDCRSePrOnf+n4oXLOP4f7NWtNoYI4O58 cckpT4yXQoQ7csLSwZK4w6FRWd8NAbb150DSPoxmpEVowHa4Jr9R9Z3Gtf5MdyKgzljdyW TipCVbG7EVfT3MIWBOeHrvbr2YrH8QAPgrbeTA+ntD3lBtb2/y2kRcfjjh22WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8+wSQbz+PKzgQXggaJkeuc3TtWniwFbOfjN+ghuYQw=; b=G7QkvuvPyZJsRcBDc96bnOABk/l31xMKpwciM15j0DxC9CYO6jgtbo2dQ8ie90k5hw4MSa YZWbc7+ODqckY5R6ci+lsr6rugAdHY7vOD7Wk4aWvrFgjerQZNM3rlbcWcEJ5xLg4UjPfo aUIxk555jqnzbMLl+9Fe10PRflG5uu/Ce0xVGaZnM/YviGqO8wB+KpP+nZmbcmsQJu5ugi kaucg2klbA4oVaRTCVUmMnatYTz9x39A1OQrUsqseCrO3K3c6a4u0cb5wW8698E+k5fb/Z XJBH67a+Pnci6bFoDK7ip84Or8bnb4/zcenGta2HAOl3L/nV5aBZ8snE0w9MPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672898; a=rsa-sha256; cv=none; b=GX4l3l9YruvMdGTbBogw/lX6A/xO56IyzwcF1x7bJkxKJD5GU5DLntoUmXujE2iPehckYE rX40fDO8taNc93t02eTRFBAaVjnV9lam4rdEilQ2AbCxJo9ZWNfwf+Qk7x9rGofEcJbIPt FL8CqQJ2e5R37UlndJ5rl5Ti3cm5uf/i7YMtV9jXoC4Gb3UH6tHAF5xFX6eGo2vz8IT4fY fPGmIO0n4vXjGSXrWTYou1Sc46dk6QwEfZaYtRdzCDTvn+40gPkk/YedVK7lDsumj1IqQ/ e1E5G/ZngkJlA7YcLdMTlsSCDIId0rxUIz8f4TNU17Ta/reBa5/cU2q7uuNyQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gp193szgDS; Mon, 30 Sep 2024 05:08:18 +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 48U58IFS024816; Mon, 30 Sep 2024 05:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58IZH024813; Mon, 30 Sep 2024 05:08:18 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:18 GMT Message-Id: <202409300508.48U58IZH024813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 783ec23313de - stable/13 - bnxt(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 783ec23313de492b7fd6bdcf58c6af9aa3a10163 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=783ec23313de492b7fd6bdcf58c6af9aa3a10163 commit 783ec23313de492b7fd6bdcf58c6af9aa3a10163 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:34 +0000 bnxt(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit dcd387aaa5d4409a7e99376e0254029fce1a48a8) (cherry picked from commit e763c326fc85c0d8b3e86d954339aa847f13a934) --- sys/dev/bnxt/bnxt_mgmt.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/bnxt/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_mgmt.c index d54d7a2a2fe1..6ec47e2c1191 100644 --- a/sys/dev/bnxt/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_mgmt.c @@ -141,19 +141,7 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, } req = malloc(msg_temp.len_req, M_BNXT, M_WAITOK | M_ZERO); - if(!req) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - return -ENOMEM; - } - resp = malloc(msg_temp.len_resp, M_BNXT, M_WAITOK | M_ZERO); - if(!resp) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)msg_temp.usr_req, req, msg_temp.len_req)) { device_printf(softc->dev, "%s:%d Failed to copy data from user\n", @@ -173,12 +161,6 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, (num_ind * sizeof(struct dma_info)); msg2 = malloc(size, M_BNXT, M_WAITOK | M_ZERO); - if(!msg2) { - device_printf(softc->dev, "%s:%d Memory allocation failed", - __FUNCTION__, __LINE__); - ret = -ENOMEM; - goto end; - } if (copyin((void *)mgmt_req.req.hreq, msg2, size)) { device_printf(softc->dev, "%s:%d Failed to copy" From nobody Mon Sep 30 05:08:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gn3JY1z5XlNv; Mon, 30 Sep 2024 05:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gn0N6Lz4X2K; Mon, 30 Sep 2024 05:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObqINiN7nGokQNMlnmkSiWpXYTBYyd7QF446CaKBxOk=; b=Q8/tNb12dHFl49GjnmUHdTHk0KSrALQFAiXxO24n1ZcYzrBDPWri2dvNSduNje+Lz5k6u2 q4r0fI6cRSEWE6K2b6XRmXuZ6fADsMxAqj3PKB55PKDvEVNQ14GtuTcVAd4aPVnLKrPY8X KkZ5Rlb/fA3iJD+4NoYF3xjLNSAIXmjVyOhDyMVyyo+tilM0bnHjjHdxkvH5zsNnzJ/lhn T/FKOxNqTnIWeYB/KTDnTb/pF2o7fuC31eI/izNA4VqgnKQ+50kvvC6hU359pdeYqjLrbM /Zb/7W5Jwq9Mh/zAyoMPSI3P2dY8HUNHY6aNaYc6EPCLnOcExKFCp4w29p6UTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObqINiN7nGokQNMlnmkSiWpXYTBYyd7QF446CaKBxOk=; b=a+fdozpJwTqNDoGo1EX7yf0+iN6aWDPqvdRPovrdafGrkXYt8gKuYc+sZewT8jPgrZL0I6 xMOyZAyx68WG0VPyeHU1Vfqz8Zb6Pvw0mOBUNrLU2CwwbOmAe/B7m+EI4Sx28C8mCQhNj3 XefJTFMX9L2t1as7ogtRUmeUIV6UlHGH5X7p8VXdu5r9pTHSC7hHSNEwGH5mjIEG7jrg4J cokdz3kuhNoW8lQzEMEIHFFjYzCY0GbWt0GUDZEnDTDcjtkWgZKGmZAwfyfxZtDRea2qtb hJg0zgBtIylW6nlR0+q14hhepo5eZLS5ZD+oeL83R7G1FkrXmeDv4H+ERMYKug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672897; a=rsa-sha256; cv=none; b=luth1LfKWMaGXPdlky8+Mu4ihFLoLWgeZxPdHaSKLVHwD17bQvywWpIpZo6ggyUiQmgPjG LUcyJFuZudkKu7O33E1R0HS4hqMk4AhLxn4qsBFsKSFVJP3zg1T/AZuoi1+hQF4MFOBXDu px+gAdyCAqwMKghrcU4RiG9N1qGRHkrEEcx1AF5cD/LCDEzwxwVTIxwtna9Nko4L2Wp2pd yCHqzhkQTc5S7hlEUnTirIRmZWx2e00VD1hEy0s+DF7/0PGkgFsKXwHc3ylTHq9vnrfZ+6 1BoOsmoB/ZjAyAMCRgS5oKShNOq/NYszZRnPgMLieYDSS5g31LNWRf/CNcx8BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gn00vCzfx6; Mon, 30 Sep 2024 05:08:17 +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 48U58GlF024768; Mon, 30 Sep 2024 05:08:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Gat024765; Mon, 30 Sep 2024 05:08:16 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:16 GMT Message-Id: <202409300508.48U58Gat024765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 55e34ff3a4bb - stable/13 - axgbe: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 55e34ff3a4bb2e7f32116e494805dabe15104f72 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=55e34ff3a4bb2e7f32116e494805dabe15104f72 commit 55e34ff3a4bb2e7f32116e494805dabe15104f72 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:33 +0000 axgbe: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit ab0b996bddd96300d56b7d2aa830e2479cdfa92b) (cherry picked from commit 3db5be68216957067ebaa9c57a70f3dde45887eb) --- sys/dev/axgbe/xgbe-phy-v2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/axgbe/xgbe-phy-v2.c b/sys/dev/axgbe/xgbe-phy-v2.c index 1fd01dc36f41..0ab517f99572 100644 --- a/sys/dev/axgbe/xgbe-phy-v2.c +++ b/sys/dev/axgbe/xgbe-phy-v2.c @@ -3482,8 +3482,6 @@ xgbe_phy_init(struct xgbe_prv_data *pdata) return (ret); phy_data = malloc(sizeof(*phy_data), M_AXGBE, M_WAITOK | M_ZERO); - if (!phy_data) - return (-ENOMEM); pdata->phy_data = phy_data; phy_data->port_mode = XP_GET_BITS(pdata->pp0, XP_PROP_0, PORT_MODE); From nobody Mon Sep 30 05:08:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gq3fvlz5XltK; Mon, 30 Sep 2024 05:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gq2q2Fz4XD7; Mon, 30 Sep 2024 05:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qbCFndWmpwU7IeMHTA1bbWuUd20C21EpnUVkzk+E52I=; b=FiQpwecGs+d26CUdSA6kZ5wfkqNNiMx8+hagOoerPeDY/Tpcw6Bmxu9X4PaZQDIOUTSNmf xAwLvz6bw810UHlPzRhhPIf23MLRrVL/H1jB+t5DYnvUAsJ3+pQDXb5OSiOW5Nk4E6Sc26 l/zLz7rWDIGel+IK1lzHb8/sLiT9venjoKifrq8bupfgHWoDTqEOhuVs048ButBzvdGQ1n A8YToMl5xAwB46IyXodQ+Qx6j0E3tul08WgEXodOAh6PiwxClRBx23YAWIvc9/d5NADENo K+YIqlTBzo9/jeoI/YNPapFvvU7yxez48bxmfyXIZQBbZmRCD3lwQUz/x2WHoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qbCFndWmpwU7IeMHTA1bbWuUd20C21EpnUVkzk+E52I=; b=GYPikxm9Wc8AU4jfAZYPDCZv25vWLXzpIS0KbRPHDmw8/mouMUmBlDz8NxTIMx1NNDbldD cW+oGSsAp3X3IqSzoKpfVJRmLMA3jEjDFmQiDLR952xud4PfZjUBrw7HmyRES2R/Dsca9m /rVGNjzsfFU1CvJyrfVZ1rppkATJLJ82xclJWoCjHDcGokOyP9mOeBBbLrOUSQPZVclVdK 5p12y5kerSqzQRukI7dsK6D0AqE8TNq53wKm9VlIiIh4TITfPd2vTWbJB4Ux4M6xup+60n G0cPNCEpNzWNM3cW8P/fH/j6phURwW+4Lic0qHJSs2jWVsxjdDhzDSSpFZ/GwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672899; a=rsa-sha256; cv=none; b=Wggeee68vU3ppZnQi/v/sAB/JVxE2b3Z01sdvR/VJlZvyvQ81q0Yel2Of8shcJtSfI5ONW EtFnOyxw7mzLiGyBNiGVrg2cXzPNqRTIA9OwNTtK6J3n+8ymz7rb9g7extHd88CqTieTGq K3INcI+uUCNYL3aylnZ/MQ5VwSHGwlWmM4XwgGzC2V9h6aw3rRp5BZMk/oW4fzeGcO8glx nUJWZio50OEvb74f6t59NpYkD0riyDTJbtXQTEiM9G152UuYApUCbT/3g32B8ij8Zb5MM7 haPraAi6QP/k+InCTFL6o94Jr5BhGaLPU0Qr+jBQENI+DpAHN9RrwHwMTg6Lmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gq2QxYzftb; Mon, 30 Sep 2024 05:08:19 +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 48U58JSK024864; Mon, 30 Sep 2024 05:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58JpJ024861; Mon, 30 Sep 2024 05:08:19 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:19 GMT Message-Id: <202409300508.48U58JpJ024861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 09491167a541 - stable/13 - cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 09491167a54120caf95822500e440ead964b5bb7 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09491167a54120caf95822500e440ead964b5bb7 commit 09491167a54120caf95822500e440ead964b5bb7 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:34 +0000 cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit bb51f7c8a48a4cd5dfa67fefa81f3d5d199da92b) (cherry picked from commit 9216ba1853b76185c85abccbf338f2e4ea71a238) --- sys/dev/cxgb/cxgb_main.c | 4 +--- sys/dev/cxgb/cxgb_sge.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index ba3a065cf806..8c817d751cdc 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -2485,9 +2485,7 @@ set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset) aligned_len = (len + (offset & 3) + 3) & ~3; if (aligned_offset != offset || aligned_len != len) { - buf = malloc(aligned_len, M_DEVBUF, M_WAITOK|M_ZERO); - if (!buf) - return (ENOMEM); + buf = malloc(aligned_len, M_DEVBUF, M_WAITOK | M_ZERO); err = t3_seeprom_read(adapter, aligned_offset, (u32 *)buf); if (!err && aligned_len > 4) err = t3_seeprom_read(adapter, diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 9d6d181ce64e..de1c1928f350 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -2422,11 +2422,8 @@ t3_sge_alloc_qset(adapter_t *sc, u_int id, int nports, int irq_vec_idx, q->port = pi; q->adap = sc; - if ((q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, - M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { - device_printf(sc->dev, "failed to allocate mbuf ring\n"); - goto err; - } + q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, + M_DEVBUF, M_WAITOK, &q->lock); if ((q->txq[TXQ_ETH].txq_ifq = malloc(sizeof(struct ifaltq), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { device_printf(sc->dev, "failed to allocate ifq\n"); From nobody Mon Sep 30 05:08:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gr5vQVz5XltM; Mon, 30 Sep 2024 05:08: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 4XH8Gr3z7Gz4XDM; Mon, 30 Sep 2024 05:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XzlbqRlfsLvB+xHmqeKMlljzfPdafhDVFmDCOoiPeQ=; b=CKHwpqn3jBFAz+hqzTfzPR3Pz513qYgtyTQkVdtpO93fXOZXsKvkZPQnULlI7fipoVQw18 J+6ZupJso/2Ymq4aq7RN2hweNg+PHM3kSE4f3Ol3n5LkDl3yHlhG0zxq0nqqax+kWkd3tl 3zgKbHykV9adAfwuK8mvcmpaE840DBmBVZOLfHz7fibkU3zb/Erd+4lU38wOwdpRsa3XID f9NkLWQhdChrMo6tfEZ0qJq2EzLp25MHKUUoedWpHsA+8ULy8kLlKiargbjUZKJLwrOn34 uuGkhelF/7EjkjnvcLQS6Y8x/OxljNlQfPRzdATIZBADc3FHsBShuviS4kxBbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XzlbqRlfsLvB+xHmqeKMlljzfPdafhDVFmDCOoiPeQ=; b=Vhm0BN9rLBZi3g3XHREYd92RRS73ZsHuAQpvza84DqORFQvgEtoXn/wNTTClzGrnOV/uoe 7HIStNKZxAqorX1qRSt3NWuroza4YTbaCfJgkto2tpR8XAOIiDPrA3+5wTzqx+vvPLwpwv svIYj6YDrfYYBPJcpke+cojp9bHeQKDtE8P6usjvgizGFS6br9/MmUy7Yjo840bmc29xx9 RIeOpbJd32dmSbopsCGREv0KPbEg4tBoHjZjHzrHIk8Zvn2ZYM2B0RGtNoHIkLH49k/UqU ihmqQxyPqIjXs3AxL7Be1U7lU5AkeM2OeFJz6MmE2Y9Kea323Q16IA1+nW2/eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672900; a=rsa-sha256; cv=none; b=QijNJFQ/vhFoFO34SfeWxH8/OMpDXkKdxyOMUzcLCuFzT26HXm+JTk33jzUujiDvDlcwgB XwSycVAwlhkvIWHm4XFppkYBYif8Es0Bm0y5hPkP8lgVf9V+TzgalxNY8n95lnlGbcSfLr 9uv4bKBuOBx/xCx/kExch6xgYdqueQfZwnsFHGxUjOWNnr8zOCii6RVCgjaXTC9jRImdn/ nrS0ykc4YGnE8FUPYSnHld1kRyP6/F9oDKcG7x2BHKbYm+49TT2F92pE4w5TYzHEM4QzlB dDAWFLxcoDe4BEEMIehPhxZhvABgXPTAskfudZJzVi2ZzwZ8maU8WF7itHAFIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gr3bW7zftc; Mon, 30 Sep 2024 05:08: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 48U58KRb024912; Mon, 30 Sep 2024 05:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Krp024909; Mon, 30 Sep 2024 05:08:20 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:20 GMT Message-Id: <202409300508.48U58Krp024909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: be61ff389f42 - stable/13 - cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be61ff389f425e9555ed5078240a05b49aa21556 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=be61ff389f425e9555ed5078240a05b49aa21556 commit be61ff389f425e9555ed5078240a05b49aa21556 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:34 +0000 cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 955b380365af174b3d35905b7b8afae97506a0bd) (cherry picked from commit 09ed34449c795c137d0dd55890486165e2bb0c15) --- sys/dev/cxgbe/cxgbei/cxgbei.c | 3 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 5 ----- 2 files changed, 8 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 2f3cc4eb6821..45adcf4338b0 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -842,9 +842,6 @@ cxgbei_activate(struct adapter *sc) /* per-adapter softc for iSCSI */ ci = malloc(sizeof(*ci), M_CXGBE, M_ZERO | M_WAITOK); - if (ci == NULL) - return (ENOMEM); - rc = cxgbei_init(sc, ci); if (rc != 0) { free(ci, M_CXGBE); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index e8a78b5f6c1b..e20c92350499 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2138,11 +2138,6 @@ alloc_aiotx_mbuf(struct kaiocb *job, int len) break; m = mb_alloc_ext_pgs(M_WAITOK, aiotx_free_pgs); - if (m == NULL) { - vm_page_unhold_pages(pgs, npages); - break; - } - m->m_epg_1st_off = pgoff; m->m_epg_npgs = npages; if (npages == 1) { From nobody Mon Sep 30 05:08:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gt0fCcz5XltQ; Mon, 30 Sep 2024 05:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gs59r8z4XK3; Mon, 30 Sep 2024 05:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b75OCzZwkyM+0RMWyyKe3MYcv2e0q/TDlSkzqrNvh0g=; b=ha6udomEdJxbdpp8ed0HdqmNxI+YmIHCn2sLsJqEULhcG2BULeouSVcodRuH1sOVSrlJUx nRh3XZ3ii9ABf50w38yAKDM7SYjPKjEljanaSnBF8rEDbcfzP/lOlfcwQGoGFkmrJtkQk1 3gM2eRhw3iUPSc0BE/qxUyovh33F2XfLblDzC0ACpq5d0mAooJxNudUs0bjbe+ct42hyJT GuxKS87l+jdrvzzXJmV5JF6t2XJoK9Zv3R49tWmB1MnUR6kun286Wi+z4mpXOMuTsphEsC qFs5mZVlRNaycG1MZzdiEtqSmcoCIvJamoYBidFDEZdPGAXG6FqW3pZyloiYTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b75OCzZwkyM+0RMWyyKe3MYcv2e0q/TDlSkzqrNvh0g=; b=Xd2cfWUAXdvdJ2dQuQJyR1gWALACyocXZzo3F1n2yk5mQ0c5KcyEjahHDIzRgbsEo9TeUU km3ED9w73y5hpoDYjF4a7m94EPVOEaoOpL0uIxtgyTlXeWJgOE8deK7kLULzw9rukDA6N1 9TZeLePeWs7CUQbpA/aHqKrYxzbUWiCnGCdR0uXPBnZTve6h8lNXDmWLCGGz2kCCYL7t/j CncN+so6oJDhTOoXZETVbYvVwDDPJ+Oeih5Xh1l4zzJ41y1HSrou6T6U1GmIT2Zfj6zQU3 HOmb3jPLVgo0Gbq097ZszC2baV54zkSjI3cW4BCUM+bzyj3+WkwKqf1G8Mp5ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672901; a=rsa-sha256; cv=none; b=pEpkcADcRqYTflv1mfrvzwpjb7o/I+EyuL7XDOl2vsS4r0UT+SLV5hRBk6TJ0ygBCaCn6E br/HVpiV7h4aA0RFxYfWqHczZr1MgTy+cEJ6FVOCklkuYkRIMoa02ZnVvQOdkK16TmHOqP ZcpoTQF9L3XSRz//jL/K06MBGH4FV1++0IKm2SdbAh2ZzfgwNQc3BKAKXtQD5si1INgWJ8 D+tB+uzMHj+CcNzddv96v+kd0WZg+3iumoEZ20gJDEfqWSOfAypIM2bpimIQHEYrg370SG LRxwpKZegbQGh/UuLsakHNP1IM4lncV0xxJr75P+ROWLMUfka1hhylVFHscSFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gs4lTszg87; Mon, 30 Sep 2024 05:08:21 +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 48U58Lxn024969; Mon, 30 Sep 2024 05:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Lhk024966; Mon, 30 Sep 2024 05:08:21 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:21 GMT Message-Id: <202409300508.48U58Lhk024966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 73e399c157a8 - stable/13 - drm2: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73e399c157a82dbe7d1ffd7e0346ead7e2167952 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=73e399c157a82dbe7d1ffd7e0346ead7e2167952 commit 73e399c157a82dbe7d1ffd7e0346ead7e2167952 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:34 +0000 drm2: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6dbf3aca4f5c4f7287f186360c2391f2adfea8d6) (cherry picked from commit 95532d15a12c9cbf7c5e62e912de90919af7db24) --- sys/dev/drm2/drm_buffer.c | 30 ----------------------------- sys/dev/drm2/drm_crtc.c | 45 +------------------------------------------ sys/dev/drm2/ttm/ttm_object.c | 5 ----- 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/sys/dev/drm2/drm_buffer.c b/sys/dev/drm2/drm_buffer.c index 8a674397262e..8069f2c8c4c6 100644 --- a/sys/dev/drm2/drm_buffer.c +++ b/sys/dev/drm2/drm_buffer.c @@ -50,45 +50,15 @@ int drm_buffer_alloc(struct drm_buffer **buf, int size) * variable sized */ *buf = malloc(sizeof(struct drm_buffer) + nr_pages*sizeof(char *), DRM_MEM_DRIVER, M_ZERO | M_WAITOK); - - if (*buf == NULL) { - DRM_ERROR("Failed to allocate drm buffer object to hold" - " %d bytes in %d pages.\n", - size, nr_pages); - return -ENOMEM; - } - (*buf)->size = size; for (idx = 0; idx < nr_pages; ++idx) { - (*buf)->data[idx] = malloc(min(PAGE_SIZE, size - idx * PAGE_SIZE), DRM_MEM_DRIVER, M_WAITOK); - - - if ((*buf)->data[idx] == NULL) { - DRM_ERROR("Failed to allocate %dth page for drm" - " buffer with %d bytes and %d pages.\n", - idx + 1, size, nr_pages); - goto error_out; - } - } return 0; - -error_out: - - /* Only last element can be null pointer so check for it first. */ - if ((*buf)->data[idx]) - free((*buf)->data[idx], DRM_MEM_DRIVER); - - for (--idx; idx >= 0; --idx) - free((*buf)->data[idx], DRM_MEM_DRIVER); - - free(*buf, DRM_MEM_DRIVER); - return -ENOMEM; } EXPORT_SYMBOL(drm_buffer_alloc); diff --git a/sys/dev/drm2/drm_crtc.c b/sys/dev/drm2/drm_crtc.c index b9415082e7a1..a163c7455773 100644 --- a/sys/dev/drm2/drm_crtc.c +++ b/sys/dev/drm2/drm_crtc.c @@ -662,13 +662,6 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane, plane->funcs = funcs; plane->format_types = malloc(sizeof(uint32_t) * format_count, DRM_MEM_KMS, M_WAITOK); - if (!plane->format_types) { - DRM_DEBUG_KMS("out of memory when allocating plane\n"); - drm_mode_object_put(dev, &plane->base); - ret = -ENOMEM; - goto out; - } - memcpy(plane->format_types, formats, format_count * sizeof(uint32_t)); plane->format_count = format_count; plane->possible_crtcs = possible_crtcs; @@ -725,8 +718,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev) nmode = malloc(sizeof(struct drm_display_mode), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!nmode) - return NULL; if (drm_mode_object_get(dev, &nmode->base, DRM_MODE_OBJECT_MODE)) { free(nmode, DRM_MEM_KMS); @@ -1009,9 +1000,6 @@ int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) group->id_list = malloc(total_objects * sizeof(uint32_t), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!group->id_list) - return -ENOMEM; - group->num_crtcs = 0; group->num_connectors = 0; group->num_encoders = 0; @@ -1997,10 +1985,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, connector_set = malloc(crtc_req->count_connectors * sizeof(struct drm_connector *), DRM_MEM_KMS, M_WAITOK); - if (!connector_set) { - ret = -ENOMEM; - goto out; - } for (i = 0; i < crtc_req->count_connectors; i++) { set_connectors_ptr = (uint32_t __user *)(unsigned long)crtc_req->set_connectors_ptr; @@ -2522,11 +2506,6 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev, } clips = malloc(num_clips * sizeof(*clips), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!clips) { - ret = -ENOMEM; - goto out_err1; - } - ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips)); if (ret) { @@ -2773,15 +2752,10 @@ struct drm_property *drm_property_create(struct drm_device *dev, int flags, property = malloc(sizeof(struct drm_property), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!property) - return NULL; - if (num_values) { + if (num_values) property->values = malloc(sizeof(uint64_t)*num_values, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!property->values) - goto fail; - } ret = drm_mode_object_get(dev, &property->base, DRM_MODE_OBJECT_PROPERTY); if (ret) @@ -2907,9 +2881,6 @@ int drm_property_add_enum(struct drm_property *property, int index, prop_enum = malloc(sizeof(struct drm_property_enum), DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!prop_enum) - return -ENOMEM; - strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN); prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0'; prop_enum->value = value; @@ -3103,9 +3074,6 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev blob = malloc(sizeof(struct drm_property_blob)+length, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!blob) - return NULL; - ret = drm_mode_object_get(dev, &blob->base, DRM_MODE_OBJECT_BLOB); if (ret) { free(blob, DRM_MEM_KMS); @@ -3433,10 +3401,6 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, crtc->gamma_store = malloc(gamma_size * sizeof(uint16_t) * 3, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (!crtc->gamma_store) { - crtc->gamma_size = 0; - return -ENOMEM; - } return 0; } @@ -3631,13 +3595,6 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, mtx_unlock(&dev->event_lock); e = malloc(sizeof *e, DRM_MEM_KMS, M_WAITOK | M_ZERO); - if (e == NULL) { - mtx_lock(&dev->event_lock); - file_priv->event_space += sizeof e->event; - mtx_unlock(&dev->event_lock); - goto out; - } - e->event.base.type = DRM_EVENT_FLIP_COMPLETE; e->event.base.length = sizeof e->event; e->event.user_data = page_flip->user_data; diff --git a/sys/dev/drm2/ttm/ttm_object.c b/sys/dev/drm2/ttm/ttm_object.c index 8c373618d7ac..31af15cf4c56 100644 --- a/sys/dev/drm2/ttm/ttm_object.c +++ b/sys/dev/drm2/ttm/ttm_object.c @@ -282,11 +282,6 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, if (unlikely(ret != 0)) return ret; ref = malloc(sizeof(*ref), M_TTM_OBJ_REF, M_WAITOK); - if (unlikely(ref == NULL)) { - ttm_mem_global_free(mem_glob, sizeof(*ref)); - return -ENOMEM; - } - ref->hash.key = base->hash.key; ref->obj = base; ref->tfile = tfile; From nobody Mon Sep 30 05:08:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gw4knCz5Xljc; Mon, 30 Sep 2024 05:08: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 4XH8Gw0SmBz4XBZ; Mon, 30 Sep 2024 05:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DnMNXBPelpjM5P57rMM0Iy8v9rb6qbavoIa0Se9o1VU=; b=uy/vISjlgj+uGV4ymwOq8nBM6hSWUv6vjUv+VX8qcEAoNz39JPy/uY6b2bPfDlZF1dOoox nPPj/CXJpOTa2Ogj2DlhIe6KpuPerx23Zqar3T+ljy/pnjJqya10hQ73BbYgpKVtp3ybzi 0aalg8kC2JW0ctZMV+PMJcD8LU2CfTkCjyJgqLZPLXPzdYf9Muvq5fX3eKEQa5Fzr1eX8+ 7ToFfLXCi/DXVJWUMspKFvj4bmTtp6bG+8DUaiUuHvsoLRBdmi6b+6ta4etczxm/fPW754 fAtLwk852qObHJHvgWoga/SHwojXvUMNp0L0ZwxQ89kBZBpGW3uWZdreUNttFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DnMNXBPelpjM5P57rMM0Iy8v9rb6qbavoIa0Se9o1VU=; b=kfJSIn9TQEfKDLj8dbIV6RyTM4+dS72xzZHadlsltXpf0OSm/gohudWgAmKrJppq2MPScZ jXcWmFwjF12yMQP9IoRwE9bn2Rc31dErEu9+fDjyky/jcRBeZgBSEgK08cmLIagt3T/1nM ui9MiG79z5MTvzV33Jd8zofgITy3p1u/ySstI+DKxqZnt0bo6TakJxOnlep2QYCZo0HsFr 5sZ0CUQHywkx2vSG9OJI9Yq234CiBAESRqFz5pkgTP2f55xyiv3fY0SVh1MAYkWEvRlwZB sEp3PRrWMcdyK5zNvE+tp6E7dAidyh9zhrstaYFarUQfky5XZzDrKPuDKYSmDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672904; a=rsa-sha256; cv=none; b=hhM9Cpz48HQUe3g6fkPKX1e9WvS4lphEpwq2u//AAELOeslJzRYtw4JA4TDu27ZD5DKblh OjpHNEQh0jJVd+/wSDw2600QADMHRcQkqYZZJEpwkWqXohMY+8snDIlHolKEVwFgyKhk80 xsFcgNt1cKytRdxq4p3rExWxyU57Iaho4HSEtnaCXvF0sviBCQNmzjtAcZsro8QSDT4Pv0 mlSp/Gk6kqhSsj0gmzZhc61pxJwG50nPMePc4KiHu4r3X2nTYotQOhvpX0ByOlfNMIa4wd Ti5mHioeHfk7gOzURQXHPFGkzukkrbLW8udcOIU2/hHPRAxeubqAlzZEWsanIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gw0536zfx7; Mon, 30 Sep 2024 05:08: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 48U58NMh025065; Mon, 30 Sep 2024 05:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58NQk025062; Mon, 30 Sep 2024 05:08:23 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:23 GMT Message-Id: <202409300508.48U58NQk025062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f5f9d9d4039d - stable/13 - etherswitch: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5f9d9d4039d27e1d1536ffca372dddedbd664d0 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f9d9d4039d27e1d1536ffca372dddedbd664d0 commit f5f9d9d4039d27e1d1536ffca372dddedbd664d0 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:27 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:35 +0000 etherswitch: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 48741f4ceca71523aa1fa8da3bb78b184fad4aca) (cherry picked from commit e78c315e8941ff39d89c45ffa5841b8028a3bbce) --- sys/dev/etherswitch/infineon/adm6996fc.c | 22 ++++------------------ sys/dev/etherswitch/micrel/ksz8995ma.c | 22 ++++------------------ 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 39e85270bb70..9acc513a02b7 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -185,10 +185,6 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_ADM6996FC, M_WAITOK | M_ZERO); - if (sc->miibus[port] == NULL) { - err = ENOMEM; - goto failed; - } err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], adm6996fc_ifmedia_upd, adm6996fc_ifmedia_sts, \ BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); @@ -261,12 +257,6 @@ adm6996fc_attach(device_t dev) sc->portphy = malloc(sizeof(int) * sc->numports, M_ADM6996FC, M_WAITOK | M_ZERO); - if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || - sc->portphy == NULL) { - err = ENOMEM; - goto failed; - } - /* * Attach the PHYs and complete the bus enumeration. */ @@ -287,14 +277,10 @@ adm6996fc_attach(device_t dev) return (0); failed: - if (sc->portphy != NULL) - free(sc->portphy, M_ADM6996FC); - if (sc->miibus != NULL) - free(sc->miibus, M_ADM6996FC); - if (sc->ifname != NULL) - free(sc->ifname, M_ADM6996FC); - if (sc->ifp != NULL) - free(sc->ifp, M_ADM6996FC); + free(sc->portphy, M_ADM6996FC); + free(sc->miibus, M_ADM6996FC); + free(sc->ifname, M_ADM6996FC); + free(sc->ifp, M_ADM6996FC); return (err); } diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index 15e03039b5f4..737c3f7a50f3 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -231,10 +231,6 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_KSZ8995MA, M_WAITOK | M_ZERO); - if (sc->miibus[port] == NULL) { - err = ENOMEM; - goto failed; - } err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], ksz8995ma_ifmedia_upd, ksz8995ma_ifmedia_sts, \ BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); @@ -311,12 +307,6 @@ ksz8995ma_attach(device_t dev) sc->portphy = malloc(sizeof(int) * sc->numports, M_KSZ8995MA, M_WAITOK | M_ZERO); - if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || - sc->portphy == NULL) { - err = ENOMEM; - goto failed; - } - /* * Attach the PHYs and complete the bus enumeration. */ @@ -345,14 +335,10 @@ ksz8995ma_attach(device_t dev) return (0); failed: - if (sc->portphy != NULL) - free(sc->portphy, M_KSZ8995MA); - if (sc->miibus != NULL) - free(sc->miibus, M_KSZ8995MA); - if (sc->ifname != NULL) - free(sc->ifname, M_KSZ8995MA); - if (sc->ifp != NULL) - free(sc->ifp, M_KSZ8995MA); + free(sc->portphy, M_KSZ8995MA); + free(sc->miibus, M_KSZ8995MA); + free(sc->ifname, M_KSZ8995MA); + free(sc->ifp, M_KSZ8995MA); return (err); } From nobody Mon Sep 30 05:08:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gv2784z5Xlfm; Mon, 30 Sep 2024 05:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8Gt6Sr2z4X7m; Mon, 30 Sep 2024 05:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS3I/aSdTWay7xqz0dipQgPch4xxAEEWPIBtmmW+s6g=; b=j5QKQEffvDdOwMVVpzVBke3I7izOhETekHKBoxYVqMzAJufSW+tu5Py/3MPCgaumAFSjMv 7o6vIPEy0OQ50Ttw82mxyIOeZcjlSBL/gvsByU6c+SlxrM3VzUdYDIcMygbhS8LXLzjMtI L6gF12d87yWqYyKnuY/6wpNsxlGO44YO6IjCGcqDvaleir0uM7kZnrqOMMSx8y94aI5u/X Nmu3uHOgRS3AfU8biWTe8uLY/id9ELCHbiD9XCZnYZws31ct8zzqCI+Q1eLc66regeJAfm 0TpTMP/SuUBxIA1tyljTTqwsk7e5mwblVix+ALTe08f4fJChMWV5k9ytSbA+eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS3I/aSdTWay7xqz0dipQgPch4xxAEEWPIBtmmW+s6g=; b=AuqeJp0eXB0ViNMm/ZFscCndCicFHnx3W2E/4hrfAAKnBG/+QT9KgjlfG23G+FuUS75/O2 X8xGwTRuT1ACii6/WRp2siqg9ZyPr1DXhm0CTVwTWyQNVuPs7aW28FKMCVFqFMaZa7Cq1U rrH/LFIO8n69ZSfQfXWLQl0naNOLaO9mqMms9lS86BuJA/iHCn4TIdh2XMSkfVpBAEYDIc PCC6zoS15vWLKQRW9lT7hR3b6JUDH8ZfyeYhj9MWISnw9lLLAx7PrK9DvRSgQfZ19WZ5oG jmE+3u2zay8lCN80OVL0qJEXnK94uHVB8yv8BwW6xoxhAD0vO3VTYj1pDwogtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672902; a=rsa-sha256; cv=none; b=loSaUW4YSZOVe5qTt1qyXMfQ5HVNtF/FtJyk1KB1FWDeZRFFOuEJuk7G5BDxRTZvlOu0Dp 4tf2X6xwCyRIJNlplewtVKqpQBIVNQlKrBEOf0zYAfrPZQc8ElRFvg2xlD7GmV9L7DpHIw vdpKwUI7xA40Nl9TDpdXzZD4GoR4wbbq1iDGQ/9RpWGUspGKzMcNYOxbHFiF8wsACJvs8i SLAy7MpMaC5R7TgIBPf4Zh6+sN3iWY9AQdGQDLn8f4AkqdoXceQ+rPgOPjuFPXW6qG69IK r4hD7YklFfa39D2WoB08/PiGhol+0M5yLoOSzodStSEQZAWsmfr79hHxT8Twwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gt63JVzfyw; Mon, 30 Sep 2024 05:08:22 +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 48U58MQ9025017; Mon, 30 Sep 2024 05:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58McD025014; Mon, 30 Sep 2024 05:08:22 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:22 GMT Message-Id: <202409300508.48U58McD025014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 568cb5592586 - stable/13 - ena(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 568cb55925868abe61d4f04e86128ab7312495b2 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=568cb55925868abe61d4f04e86128ab7312495b2 commit 568cb55925868abe61d4f04e86128ab7312495b2 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:35 +0000 ena(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 51971340bd3ff41591adbbfca68e9e753f6eb135) (cherry picked from commit 8c2d777a223d56d63c55552e8ca1d689f7c58b06) --- sys/dev/ena/ena_rss.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index d90a7fbb253a..41fa9c62f94a 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -279,12 +279,9 @@ ena_rss_indir_init(struct ena_adapter *adapter) struct ena_indir *indir = adapter->rss_indir; int rc; - if (indir == NULL) { + if (indir == NULL) adapter->rss_indir = indir = malloc(sizeof(struct ena_indir), M_DEVBUF, M_WAITOK | M_ZERO); - if (indir == NULL) - return (ENOMEM); - } rc = ena_rss_indir_get(adapter, indir->table); if (rc != 0) { From nobody Mon Sep 30 05:08:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gy12p8z5XlpF; Mon, 30 Sep 2024 05:08: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 4XH8Gx1jLlz4XBs; Mon, 30 Sep 2024 05:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SpPwaRYfdVSDD2LdwDQY0CYg/cpAKMDzNVp0XtU8ac8=; b=dLN5/e6HXoRI1DzZr4qEHdW4jWs+Ka9Y3wAdkg0CtOkhmqQvptzZarZDoDW7oMo89fd6cq o0nR7S2US3hHMaVorPXMKX8kaD9eAnT5Pw8W4pU7ISuFFmtw0iOqqen+NGhjW52ZRvwV9S 3OX1rPE89XgZ6AskCXT38b1rLbQR5C22PQAYBkSfnatXB6gIlfpIMRJaF/q0Xs5ttnIny6 CHbHmNDVtI3M22RXc5NHZovdSTrLp0UV3lXYEFPIgLM3PGP13P76zd/r5kX1wZHBBXeO+O zqBO6HM/MzrgKGRKhAGHVxzgyyJfJYhOyQ7mvKIvMXOHo6tBMjlxgFD2YBIlmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SpPwaRYfdVSDD2LdwDQY0CYg/cpAKMDzNVp0XtU8ac8=; b=Ol50a1teTZkOWBOxGDoD6TQ7hqPMccZiSlCCfjo1pG8GqXRjbtG1r/DVCwARizKkNYwWF4 11kuTL6FHgwa6Vgdsa/Yx/TvvT2kVcpqWRoo5NFk4iXzoD1H9GSaHiSPIgVS3diSLPKcqI J661rNtBpSK86sdjSK+ntI/rzpyOBCx1QCrWYMM04ZZHJtW6fF084nZBnSLG/dL8ItZ3qw liA0r2NF6zNiW8AT3v4K6l1Ps4rYHVl5mvJyiOORu+j6XGzJRYY1XmnM5y6p0oKxx2vB/8 4au9KFEXN61FZ82skjbekTzWYF30y3PjVbMOUJimTFGHM/8n1v52H9t/I1cBGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672905; a=rsa-sha256; cv=none; b=dop0b9ZN+ACYN2T5MY5CEvFXAd1ZKj9gs6pK6bvavq9SpvFtltQpnNVyVZboVLJ6BUic5v o03I0npeLzNFCXOwwOPubxY6YIEDVnoZ0WLnfXc9W8zBcAfoApyaLgPCbY4h0dEy7WV8Rv HEWXsGcgAY4kB3mco7RSA3cwrwPaeeKX22un31s76zslWN3t8L0SxHBL9Sb6UP693VQ9qh 5pj5rUHsexvBplwoIuM8m33htMNJRM1jTDo3/kAPrbq6+yDyeMba+0sbfVPQ//BkC9e8va tSYWFUV3PkbyeYacN3agRC011XpCS9lJk51TtVz1QGnXw59Y0U0pO/ws+ysVdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gx1Kchzfqx; Mon, 30 Sep 2024 05:08: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 48U58P2s025113; Mon, 30 Sep 2024 05:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58PTV025110; Mon, 30 Sep 2024 05:08:25 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:25 GMT Message-Id: <202409300508.48U58PTV025110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 97cc0b1fa252 - stable/13 - fwip(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 97cc0b1fa2529372c56c78de8e410fd02d13aa65 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=97cc0b1fa2529372c56c78de8e410fd02d13aa65 commit 97cc0b1fa2529372c56c78de8e410fd02d13aa65 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:28 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +0000 fwip(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4d47c7ca7baa1ae76cc1fc72ec85b475f1efd41d) (cherry picked from commit f3af527260242c570b3e2bea56287f1ad5abb7b7) --- sys/dev/firewire/if_fwip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index f7f2db4589d5..89b34aab4257 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -306,13 +306,9 @@ fwip_init(void *arg) xferq->psize = MCLBYTES; xferq->queued = 0; xferq->buf = NULL; - xferq->bulkxfer = (struct fw_bulkxfer *) malloc( + xferq->bulkxfer = malloc( sizeof(struct fw_bulkxfer) * xferq->bnchunk, M_FWIP, M_WAITOK); - if (xferq->bulkxfer == NULL) { - printf("if_fwip: malloc failed\n"); - return; - } STAILQ_INIT(&xferq->stvalid); STAILQ_INIT(&xferq->stfree); STAILQ_INIT(&xferq->stdma); From nobody Mon Sep 30 05:08:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gy56nwz5Xlfn; Mon, 30 Sep 2024 05:08: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 4XH8Gy2RScz4X8W; Mon, 30 Sep 2024 05:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m9Blf9L4ustoAbC5LUpbLeU6zf8IreOPvaEmuvdiV2Q=; b=nPWnPcsVjUIxWy+XQJRKySf5xFZhWE/gRh5gFfcM4NzGp8smXUOSIjNI0W4kNkefHaWSGH CzOD1dgECj6BgcSR6mn79FAGKOX4/kXmlH2i7/vbYWYWmFXvaZUnfJ4KRvxfrmOiSPpwn3 N+PznT5dSxWuidXbOf4b+IkfsviBPddVoJxxu5mMnhgxCIDGbrtzuLRkz2EF50xpHrj9N2 C3f9Gxqh4neHwwn4HuX0pVSj1tKWSt94EOEoYm3Qyaresja3xbdFFyUwsxEmhUlL1ZcRBN 2oXquCUe51hmJOwnCXRfcOp0FZxj00S3Dt9jtcIvnVS/g04LFp5QxdwaV+G0NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m9Blf9L4ustoAbC5LUpbLeU6zf8IreOPvaEmuvdiV2Q=; b=Qc5/wAN8MdwXASFmelQpjDqXg5JaM9wRzvW/qa1qnfO1mH9IvuDsmmX9YfRhA5wT8I4beM /N6qpAC/CMHloT8+EagIVHt+WNhwqPaG3uh/yaxi52vEPWLlpY+Bt+yH6Rf+0G+wim28Ng UuLwnnUpfLV5h6LSWFjHz3c5UWKMk4+YCNak81SJCokj43sZNJ40OYDUJw8ckAmLpy2pB4 uh7N6i5LRniZP6AsvLvQh/ZWImC9dWUg3p330jlzSII35qr2FGqbBqZp6R9Cub07RpQxiS ihDm9GXzmy6/qjwBs/Ga5kLnXEhdeLEt06+9OiOoQg/ZD4LA59zB80/0R58hsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672906; a=rsa-sha256; cv=none; b=iw5nQ0l+Y5PnT4+rz8yYuoINSmE7hbLewaZiF7L1z/gnu3sg5BNrOmb0A3VoFta4dwRhyV HrVRivRq3x1q4CCesa0RLbwD6zys0tsCw3/K2Qf+gsF/sSYacQQk5uQXl5MmtE+7N13t6M bBcGi2P/9FfpUyjHLVopicR70TTz8IjH4b6aRUrBQ0MVa7e1kQzWKQrE+jcpxYAu5uRrhT vvrT29mId4ISVJkuMV9CCi4okgdbWwCFy3fjZSNMv8Gc281hu+1EZoei3vcdZs+5Gk6Pmf EQ5q1QKmwlK06nwL+Uv7Ivi9U4SCKoplq7mXnrSxwAQOS2cmdJGpLCoEAWPOsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gy23T5zfx8; Mon, 30 Sep 2024 05:08: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 48U58QBs025162; Mon, 30 Sep 2024 05:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Qom025159; Mon, 30 Sep 2024 05:08:26 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:26 GMT Message-Id: <202409300508.48U58Qom025159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3df0c68bdb28 - stable/13 - hpt27xx(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3df0c68bdb28647f60b2b1cd34fb8cea390315ca Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3df0c68bdb28647f60b2b1cd34fb8cea390315ca commit 3df0c68bdb28647f60b2b1cd34fb8cea390315ca Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:28 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +0000 hpt27xx(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 28e413a699838df6fa5b0504c9ceb92a515037d9) (cherry picked from commit 0341c77f203e5200470657a428f8ce63f2dc9988) --- sys/dev/hpt27xx/hpt27xx_osm_bsd.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c index 2c760d2e9009..dfa4d7c3baee 100644 --- a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c +++ b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c @@ -94,9 +94,6 @@ static int hpt_attach(device_t dev) size = him->get_adapter_size(&pci_id); hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); - if (!hba->ldm_adapter.him_handle) - return ENXIO; - hba->pcidev = dev; hba->pciaddr.tree = 0; hba->pciaddr.bus = pci_get_bus(dev); @@ -114,10 +111,6 @@ static int hpt_attach(device_t dev) if (!ldm_register_adapter(&hba->ldm_adapter)) { size = ldm_get_vbus_size(); vbus_ext = malloc(sizeof(VBUS_EXT) + size, M_DEVBUF, M_WAITOK); - if (!vbus_ext) { - free(hba->ldm_adapter.him_handle, M_DEVBUF); - return ENXIO; - } memset(vbus_ext, 0, sizeof(VBUS_EXT)); vbus_ext->ext_type = EXT_TYPE_VBUS; ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext); @@ -168,7 +161,6 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_ext) f->tag, f->count, f->size, f->count*f->size)); for (i=0; icount; i++) { p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); - if (!p) return (ENXIO); *p = f->head; f->head = p; } @@ -1109,10 +1101,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1328,18 +1316,13 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } hpt_do_ioctl(&ioctl_args); From nobody Mon Sep 30 05:08:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8Gz6K2vz5XlmP; Mon, 30 Sep 2024 05:08: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 4XH8Gz3V6Mz4XG4; Mon, 30 Sep 2024 05:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9KunISfC+cNf94G4uHtZWE4z0tAbuOBDMoBm54mRWZs=; b=dGQRrZ00ZrTO4a5K/OJk7YtJHA/oy0COqi+KekYKJ85mRJdMtUtYAEKAYmLNLqxpv4Nv3I hf+J0YR4KS5fqtQbZKNh9LmO30F5lCUQeYjC8E3BqIS7hK/oDkel5OS3X8zrpdnQLCEZXG vijRSP/oVwmq7VotnPPP8jrt6BSqcOJHZlvS0OA7lrh+I9v68THdJxGWwiJbfKLjLFNSrj qQHWElZOJc8Wsc3Jx+mR31yZ77gletC5U89FYdUo1Mfi162UyRoMcrd/y46MCjuJ77WgHh pv6Xd2gQYUahT2ePce7L3LRUUNobRBnjNx4SoFbHWJigb7k3chgl8N3//Ts/7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9KunISfC+cNf94G4uHtZWE4z0tAbuOBDMoBm54mRWZs=; b=Hw14M+9IJulKwtSLqpk7mLMOV1DNLAxo01QLFylQr6f9uvlmCoMK3hHSXoHwN2Lb7vBBRG 5Zx6FVnb70pEKySrUHwdM0RdbgqzoHkakd+199hTkCfz8rE76vlFetDZrYcdNm7/koHqsu 7qpAS9+XHwMT7+jZu291fJlHIfZDAJLpw6Ro0QiqpDppRWv5lPMeCTYbbXYxaTy7bial4l wdwrTVCLTMQuv3v62pNZMFiYgm94UdEYkT7yapFcgayxZ16iCPgnqoYtq+qOJ01O+/iZW+ EBGmsYAAaMpAd7YxJgvy+mdHZafhaFJfeCrGNjdzcwof+WrDmxzFEql9qglrTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672907; a=rsa-sha256; cv=none; b=OmSjG612fWo5ZlDL+7VL8oXmA71ifSweHbw+YyOChny1BkWZ7SL6UxDFNSHnMShvJQPHM4 thm9XVCUHhLtw5V61IXAelULY7CdDzGzS6Nl87eMiUnOl0Ck+d4HUgT8djxNe1DTYqJtgk /mbOtwJAOAfgWsZ7xchCtwe59qKq8YYNcxSZmONP+4E9eTvhLpwPZv+bpwGu/P4SLrFOFZ tT7T8bFv1HV3TiI8oV8Yf45aPGw2c6Y0+ImVkzlikLEQuIkid0ifiHOiTu13x3EYugEsce pobR8kEE0ZyQYVcluhcGKm+TaPe+sfSovUxnVijVpGAY1IYuV5j1HFnWuMwfQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8Gz36f7zgB0; Mon, 30 Sep 2024 05:08:27 +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 48U58R0Y025218; Mon, 30 Sep 2024 05:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58RCV025215; Mon, 30 Sep 2024 05:08:27 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:27 GMT Message-Id: <202409300508.48U58RCV025215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 736dfe255d89 - stable/13 - hptnr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 736dfe255d8918188eb5b6cc4b64b0297dc6f15d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=736dfe255d8918188eb5b6cc4b64b0297dc6f15d commit 736dfe255d8918188eb5b6cc4b64b0297dc6f15d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +0000 hptnr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit a3ec5d3ee7579a26790a86ca4c074512946ab964) (cherry picked from commit c860df902b6d010cb18490580c776c4b0a6a9123) --- sys/dev/hptnr/hptnr_osm_bsd.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/hptnr/hptnr_osm_bsd.c b/sys/dev/hptnr/hptnr_osm_bsd.c index 067b8530cd3e..d605cf7712f3 100644 --- a/sys/dev/hptnr/hptnr_osm_bsd.c +++ b/sys/dev/hptnr/hptnr_osm_bsd.c @@ -165,7 +165,6 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_ext) f->tag, f->count, f->size, f->count*f->size)); for (i=0; icount; i++) { p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); - if (!p) return (ENXIO); *p = f->head; f->head = p; } @@ -1389,10 +1388,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1611,19 +1606,14 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } - + hpt_do_ioctl(&ioctl_args); if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { From nobody Mon Sep 30 05:08:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H10RdTz5XlmT; Mon, 30 Sep 2024 05:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8H04LSLz4XGC; Mon, 30 Sep 2024 05:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/SEmSLW4Lte93woYMQxXuAVv/dPHUCbNYju7Ja+y5eA=; b=dsJcBupxhDR68uZJbdMxaTCEGccym4H6XOUMTyvka+LlV5WJgO7xbbOJVCs2l7mNNYUcE0 b5JRKRfuu2PJAJKWxfEfvmRo13YxYUb52cmRGS9TJIfCPL9VmTQwocbotLHStTOBfMR78V 7g1wAHqLi0paiV3l0aIdJncKF/oFpvWhcLRqeOeobj3Hd9vtx6GWAquxzecK0MndKN5G2S JnxqD2vwIzUOAsSPuN94opjXwcuAhGpFiUXaWUAxZwYgFfVztB02WHlCpcpnL19ptD9lDj 9LQcRxxnqmtILoU63KyzmYP54xuxsXz/x91MIF10g6UEjYXL1zjIr5/i0iFNFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/SEmSLW4Lte93woYMQxXuAVv/dPHUCbNYju7Ja+y5eA=; b=Dl+KNPC0ebyITxuQpE17vuDtESmKYsrmDPM/mvyd/wuoE8W47MpAie6f45vxdhlpIn+jUz DlGQHB7b1T3vhGIXfIYOnauq8Hnc1NNTbSTo/XArTfQJ2xu6MkBoIEG45dLcVKPuht7uBE 1INeKJ66rtFr8/ugwTJjpJBE4J5p7cAer0XU93Nddyi5wsoNLYT7b062FnZlk4BbwwvxC8 mnyEh98xTiXhj48WFpN5MBovRD8myXA4xqmoUzOWVRUAFiYBzz0Q8sMh0ZcnbTU9r/y0bO D/OvMkzsstwP+1molU25oxoQwfOwHJySUQ4aL/GzzCqLE6IO9bdR4AbYZISCcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672908; a=rsa-sha256; cv=none; b=tLsDCxQst7FU/QNBNmHHwVOl3vKH1DJPYOXsK2ywo+newjcEmAhUsgXXobGEnvLLbYnpUj AcQSPVLC4H3S5Nw8l4RK6you2eHqeEdaJTBuL/enX2riqI/LwyDDokN+Gy/z6N9wPb3I9u pBvxH9a0wdx8hrtLlqvKY1HGgRTzEzk7xccUXj9ZaYNj59egYVNawI0VgxZLxmYPSEcbHy ELDTgWb2zUNEnsLQVnjJ08Mxc7W4c5zitvyA+YJDVN46NBhSWAcuTqyJHPzM8anhfCRt9D MR3Q6f5eqovM/L/ddfVy4XHk8/58OLxXQ+QXBBYwxUyfZqRui8dzbZFAHROP6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H03y5ZzfQq; Mon, 30 Sep 2024 05:08:28 +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 48U58SaU025266; Mon, 30 Sep 2024 05:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58S9i025263; Mon, 30 Sep 2024 05:08:28 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:28 GMT Message-Id: <202409300508.48U58S9i025263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e86d353a893f - stable/13 - hptrr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e86d353a893f5f57ba420fef5fd5a1486ab64ae9 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e86d353a893f5f57ba420fef5fd5a1486ab64ae9 commit e86d353a893f5f57ba420fef5fd5a1486ab64ae9 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +0000 hptrr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 92b0370ec65d5287a1deec84fd513e320a8da736) (cherry picked from commit e4de0a965faaff171e6061714478c8f4eaec8cb1) --- sys/dev/hptrr/hptrr_osm_bsd.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index fd102397716c..ca1e5714d33e 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -1032,10 +1032,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1253,19 +1249,14 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } - + hpt_do_ioctl(&ioctl_args); if (ioctl_args.result==HPT_IOCTL_RESULT_OK) { From nobody Mon Sep 30 05:08:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H24tl1z5Xltd; Mon, 30 Sep 2024 05:08: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 4XH8H15y3Bz4XJc; Mon, 30 Sep 2024 05:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Dd0Zw0s8CMkb/YVA2XmWlMR0iVSP5apJksKRcTrXig=; b=YECyy4P/N7UhsNqkbZJVAtTJ5Sa6flsYll5Hns2Pur0uk5N/AhvBHGFM7CWvq0XYvrBSxe iWM5lrdp3ntC/wL6Usrd29kqJxS51g1DTiFpFSusotCV9FNZSPJTrXWQ0fQbUMUEmyhq/T J/EOxApuzy91Egs36Jk9hnNCyUrpKiz42dXxlrCdQiK7k6NvdRCbD04nV1GBgBuywtxxoK K72py6VzYKSfHYdFmGqVp4sR/ZJP7tWcDWZ5QhUVAY4EAKGKDs9HCSggYWISRzmHE4/lzL s52+ldfLRmshiTsOhgwewFWUMgpboaiPOwl7DeZzhu4pQfRpx9sEsBlIdFhdFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Dd0Zw0s8CMkb/YVA2XmWlMR0iVSP5apJksKRcTrXig=; b=QLj59G1TcRAxQv4eGUKUKAr1QDaZgXI2s0FIAwwfxvhYo2UlhmcX/16JwXN8brExbC/F9z 7irilks74RIMvEPsIvF7BYnP7gkcnRa+OfQkBRnEgTXpV0jrZfucsnHI/sVs2skVWI/aWy kgNRwSyX0L7J6ic5zM4Is8dQK73RdGNdm/UljnRYPRfwVlnCQiidVfoYuik/+OQBvGukVG 0Lw5afYj1ECByHGudiTDoN1h6wkrC594n0y+sKD1PrmEf67dVQ6LFisz2oToTyTHWuWG3s gHl/6nAs7mrO1vfhfE0+B7yQ2ITM/oOryMPtyd1oQumi88seb3tf/rCyGkd52Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672909; a=rsa-sha256; cv=none; b=weHGW7blWzBYwQ4VsWEqEOutymYRPauRE5uLn44GZugnErYk2H6f9VLdDbX7gia/LR3dQ3 eBLC/WmXg/IHfpfhQeRQ2SOPD5/8uejb8m5wZl1BnfSEVcSakzYAqrZUkgo7SlQduhXLa4 jOKIR7sY9QVRpcIIkZAH2mS90xWbshWhsdvxYz+FH2XTwUDqJvirNwAjVxgovDW5Pac0/g m61KGXav18VmHdRVl1OJG+h4+xcyY0dA4C0c4Qe8DaZCdaM4g6IAPlrnGXr+ZCpIGl/tFT K0oe90IpXS+q6OknIn94wN8YdQx4TxGXgzXaQxC5jEptBOb9eFH5LTFST1lrRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H15YCPzfx9; Mon, 30 Sep 2024 05:08:29 +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 48U58T7q025314; Mon, 30 Sep 2024 05:08:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Tmp025311; Mon, 30 Sep 2024 05:08:29 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:29 GMT Message-Id: <202409300508.48U58Tmp025311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 438e078d3166 - stable/13 - ice(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 438e078d3166feafa4e7887471faa1da3e70a74a Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=438e078d3166feafa4e7887471faa1da3e70a74a commit 438e078d3166feafa4e7887471faa1da3e70a74a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:37 +0000 ice(4): Stop checking for failures from malloc(M_WAITOK) As a consequence now ice_alloc_vsi_qmap() does not fail. Remove unneeded error checks. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 5f97656fa334b494d70866cb1bfff406d3efd92d) (cherry picked from commit bb8c6f43256d234d492c267d74526fc62102b23d) --- sys/dev/ice/ice_lib.c | 24 +++--------------------- sys/dev/ice/ice_lib.h | 2 +- sys/dev/ice/if_ice_iflib.c | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 0fb1ba0158f1..0f9efc3ec6cf 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -426,31 +426,21 @@ ice_setup_pf_vsi(struct ice_softc *sc) * all queues for this VSI are not yet assigned an index and thus, * not ready for use. * - * Returns an error code on failure. */ -int +void ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, const int max_rx_queues) { - struct ice_softc *sc = vsi->sc; int i; MPASS(max_tx_queues > 0); MPASS(max_rx_queues > 0); /* Allocate Tx queue mapping memory */ - if (!(vsi->tx_qmap = - (u16 *) malloc(sizeof(u16) * max_tx_queues, M_ICE, M_WAITOK))) { - device_printf(sc->dev, "Unable to allocate Tx qmap memory\n"); - return (ENOMEM); - } + vsi->tx_qmap = malloc(sizeof(u16) * max_tx_queues, M_ICE, M_WAITOK); /* Allocate Rx queue mapping memory */ - if (!(vsi->rx_qmap = - (u16 *) malloc(sizeof(u16) * max_rx_queues, M_ICE, M_WAITOK))) { - device_printf(sc->dev, "Unable to allocate Rx qmap memory\n"); - goto free_tx_qmap; - } + vsi->rx_qmap = malloc(sizeof(u16) * max_rx_queues, M_ICE, M_WAITOK); /* Mark every queue map as invalid to start with */ for (i = 0; i < max_tx_queues; i++) { @@ -459,14 +449,6 @@ ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, for (i = 0; i < max_rx_queues; i++) { vsi->rx_qmap[i] = ICE_INVALID_RES_IDX; } - - return 0; - -free_tx_qmap: - free(vsi->tx_qmap, M_ICE); - vsi->tx_qmap = NULL; - - return (ENOMEM); } /** diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index cfd848d370bb..6c010cffc0fd 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -830,7 +830,7 @@ void ice_free_bar(device_t dev, struct ice_bar_info *bar); void ice_set_ctrlq_len(struct ice_hw *hw); void ice_release_vsi(struct ice_vsi *vsi); struct ice_vsi *ice_alloc_vsi(struct ice_softc *sc, enum ice_vsi_type type); -int ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, +void ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, const int max_rx_queues); void ice_free_vsi_qmaps(struct ice_vsi *vsi); int ice_initialize_vsi(struct ice_vsi *vsi); diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 05574efe62ce..455da99ea8d2 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -638,12 +638,8 @@ reinit_hw: */ ice_setup_pf_vsi(sc); - err = ice_alloc_vsi_qmap(&sc->pf_vsi, scctx->isc_ntxqsets_max, + ice_alloc_vsi_qmap(&sc->pf_vsi, scctx->isc_ntxqsets_max, scctx->isc_nrxqsets_max); - if (err) { - device_printf(dev, "Unable to allocate VSI Queue maps\n"); - goto free_main_vsi; - } /* Allocate MSI-X vectors (due to isc_flags IFLIB_SKIP_MSIX) */ err = ice_allocate_msix(sc); @@ -3525,12 +3521,7 @@ ice_setup_mirror_vsi(struct ice_mirr_if *mif) mif->vsi = vsi; /* Reserve VSI queue allocation from PF queues */ - ret = ice_alloc_vsi_qmap(vsi, ICE_DEFAULT_VF_QUEUES, ICE_DEFAULT_VF_QUEUES); - if (ret) { - device_printf(dev, "%s: Unable to allocate mirror VSI queue maps (%d queues): %s\n", - __func__, ICE_DEFAULT_VF_QUEUES, ice_err_str(ret)); - goto release_vsi; - } + ice_alloc_vsi_qmap(vsi, ICE_DEFAULT_VF_QUEUES, ICE_DEFAULT_VF_QUEUES); vsi->num_tx_queues = vsi->num_rx_queues = ICE_DEFAULT_VF_QUEUES; /* Assign Tx queues from PF space */ From nobody Mon Sep 30 05:08:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H30DGCz5Xlfy; Mon, 30 Sep 2024 05:08: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 4XH8H26SqCz4XYl; Mon, 30 Sep 2024 05:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJREBRccXVS7g9UwdZUR4hXtoXs11eVJpKQHYYZsfTo=; b=ydDAa7VyNt9ssw8SqptIE3otHju11LDm7dA07zPihNhlqxTZAH9sOx20G1Pv0PWA3qOwrq orLTypa6cxNpZdP9RiWz+9dtLttbvLFrlUvpz++6EBwhDtnfFYB8OnRwsxWMuAMFko9hJK 3MZtqbYVujCZdRKQNjEqwC5WeOZx2m6abqMDH5b8pnHKk8R5wB2+IXLLAGCKI12XQAZpxr Z7lkQub68FRtm7pdCwGLkMt5zv+gnSdOi21JiKGYmAf4kpKOfIFpORUxNV1kMz0b2XAS9J sHuisJWhzm2f0K3jUuyHuuXNEkqKZOatnMHNXpzN7z9pHBRNzLJ5A49pFhI9Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJREBRccXVS7g9UwdZUR4hXtoXs11eVJpKQHYYZsfTo=; b=rBQMkwXFfvPCE3ArbMC3yafYNL9ziFcHEABELS+T44XpUsd08w06+/EXHzmkjneejflRBU XN7hGTrWrXHUu2FsF1OaqOHEMZ9wIR6f3xtAqXlL6IMmazRDvPBF0FzRFODHpudx7RmODp agRLR4JUHu5aKBfY945rlRCnKNiCRpO+wpdOfdQXXreB4wtCDbZqDZ93RlkN02/YdR5WtR QOu2wp2v2taP+ftFqsLp9dh6+q3qas/jByWCHgnUzm/pCTg9wMz7PSfnOErKq/oZTycoB2 9Qdhn/bQj+azY1hzJavGmfojptipDVm+9z/fvqvLEmnqHDeeNVY2tjnGDgcvAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672910; a=rsa-sha256; cv=none; b=y4IAgIloCnWAGhuqhP/mZsYwyLRpFzzKcl9LzlFeqjbFq6sAzrqkTvqNvszoJWDpThO2nx 1aXJfDs9ya6VGN2a71Yg1+drcwC6vRu++jnhRyRhHt57AdJdeKyhc2Cu3z3Ov6AtDTb0Fw SE6UMJ4D4rLfG0fPYNQ7B/peOTkPk3sB4ObC9edFQQ7aydFd5zRWHA14t3b0yFmO0WEFaB uH2tV2w7PCXfTCd8gIWuFirrBSAnrqvmNvszh9Tg7zWVyI181Kb/aP40D478xVK8bvGsEP rreVThsl6Tptpa9ROBHhG3na4pnn7Ezq1OpQtvz/G6gAsdAeIACPpJAWMesToQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H263txzftd; Mon, 30 Sep 2024 05:08: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 48U58UfJ025364; Mon, 30 Sep 2024 05:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58URK025361; Mon, 30 Sep 2024 05:08:30 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:30 GMT Message-Id: <202409300508.48U58URK025361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 20805d47938b - stable/13 - iser(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20805d47938b9e3ae936b50d257fc2f40ad1081f Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=20805d47938b9e3ae936b50d257fc2f40ad1081f commit 20805d47938b9e3ae936b50d257fc2f40ad1081f Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:30 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:37 +0000 iser(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 40a6bbc4284111790d9240f8a24ef11a9a9ecb07) (cherry picked from commit ec68da0a7e6e8041672f515a6d09fe43ce8838a1) --- sys/dev/iser/iser_verbs.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/dev/iser/iser_verbs.c b/sys/dev/iser/iser_verbs.c index f5f057b961ef..f0c7e524ccf0 100644 --- a/sys/dev/iser/iser_verbs.c +++ b/sys/dev/iser/iser_verbs.c @@ -212,8 +212,6 @@ iser_create_device_ib_res(struct iser_device *device) device->comps = malloc(device->comps_used * sizeof(*device->comps), M_ISER_VERBS, M_WAITOK | M_ZERO); - if (!device->comps) - goto comps_err; max_cqe = min(ISER_MAX_CQ_LEN, ib_dev->attrs.max_cqe); @@ -280,7 +278,6 @@ cq_err: ib_dealloc_pd(device->pd); pd_err: free(device->comps, M_ISER_VERBS); -comps_err: ISER_ERR("failed to allocate an IB resource"); return (1); } @@ -343,11 +340,6 @@ iser_create_fastreg_desc(struct ib_device *ib_device, struct ib_pd *pd) int ret; desc = malloc(sizeof(*desc), M_ISER_VERBS, M_WAITOK | M_ZERO); - if (!desc) { - ISER_ERR("Failed to allocate a new fastreg descriptor"); - return (NULL); - } - ret = iser_alloc_reg_res(ib_device, pd, &desc->rsc); if (ret) { ISER_ERR("failed to allocate reg_resources"); @@ -509,9 +501,6 @@ iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) goto inc_refcnt; device = malloc(sizeof *device, M_ISER_VERBS, M_WAITOK | M_ZERO); - if (device == NULL) - goto out; - /* assign this device to the device */ device->ib_device = cma_id->device; /* init the device and link it into ig device list */ From nobody Mon Sep 30 05:08:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H44PLXz5Xljm; Mon, 30 Sep 2024 05:08: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 4XH8H40yz5z4XWV; Mon, 30 Sep 2024 05:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8lUxYlZKmLxSnKYxl9zmszxaknFZAU2B7wH0BAnjfk=; b=DX+XtApZGB0xoWEd5xG2CXxDRulC5zr1djZlgLB52ZvagznemVT3vG1nl0m9CqxbLadPXL MT/cErBbVgtRIEYr8m/Qx3xFtrIYaaTZ1MoCIca4djybi7mhvGDTAowKCtAMZNYQQYJu3Y f4ub1dbnaK21fJkjPDQtJMjaFb00riSzMUTWYU1adr3QFI/X6g/1BERjgCtlRTYnYxq8BV r+to+C2y4D97Tlf0CE0C9b11wsZ+ohseJHQzf48/HJoDPFkXJsOFil+WKcR+nOH8iNBDzM y89DeoG3pHN7dOD9r5hE8CPEcHcizu7rgyj524ZjBHItvtUxtt3th2FLPqd1jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8lUxYlZKmLxSnKYxl9zmszxaknFZAU2B7wH0BAnjfk=; b=i+zAuZk86nR0Th8jKJquGZ5nyxHynvSzqN46JL9qd3h+BlsujltwAwotLV8xFY3Rs5kQwX EWFrtxbTLQ1tNsxdikFejtwfnOkbLCvboW1bzNs51p5b9p2ngkmWA1+E/6gyOu0yOOnL8t j6sCOILp0tT6deDs3qseeqSIPUt71mTkvPkNyNU26/pWEwQES8j5YUPnUGiPcK8gN/JJMY MvBGdn5HfnL3dQde2SUKVIz29OUvekIwl9wXFataKdyNoHG5yUacE6sOKKP2UJVVX7JLSc XJl/5XSXXknS+iJtAXKUJneGr3zWVQuFai7bEHix/3jxu3Tq9H8Z4fvmasMDdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672912; a=rsa-sha256; cv=none; b=uHG6MonGwMk0xmGfaz2erP9+IOCYpFOXt6kpfbBXmvmnAaifBaSzDePtFbnR1ECkwAf0tF 0z/d6uGassDumCtrMJwx/RIJBx/HB87QzSixblasz7RITVHeVDeMd0RzyxuTAiCs7qQMZQ 2sEk0AlL6XCIgwsq3JC7AsGJYtlpEU9GRLoma0x/wdNaSy3xaSorPnvxIEZSqGw7u+kafp R/VerAxVJxe6JFzxsHEG9VMUPmeomTLIgnSsIp/uG6GwT5EkX2cgU3hPavTvUVjCzSLqgy 4tvCwASfHyO/u632AUlT5RPOhONrPaRkZEpyCVkGXWxGiRxzK8p0ze+i6KLkBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H40XjFzg88; Mon, 30 Sep 2024 05:08: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 48U58VsJ025412; Mon, 30 Sep 2024 05:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58Vqk025409; Mon, 30 Sep 2024 05:08:31 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:31 GMT Message-Id: <202409300508.48U58Vqk025409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 909623bc1a28 - stable/13 - mfi(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 909623bc1a28966ca11bb23dc863c579bbb5fff4 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=909623bc1a28966ca11bb23dc863c579bbb5fff4 commit 909623bc1a28966ca11bb23dc863c579bbb5fff4 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:31 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:37 +0000 mfi(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 701308ef404f552034f8c3e3e912b41bfef28ee6) (cherry picked from commit 4fee8d3e92c69d5865a7ef1a9102399b6fdeb9bc) --- sys/dev/mfi/mfi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 81bf8ae450bb..4a7bee6e1bbc 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -3635,11 +3635,8 @@ out: mfi_aen_entry = malloc(sizeof(struct mfi_aen), M_MFIBUF, M_WAITOK); mtx_lock(&sc->mfi_io_lock); - if (mfi_aen_entry != NULL) { - mfi_aen_entry->p = curproc; - TAILQ_INSERT_TAIL(&sc->mfi_aen_pids, mfi_aen_entry, - aen_link); - } + mfi_aen_entry->p = curproc; + TAILQ_INSERT_TAIL(&sc->mfi_aen_pids, mfi_aen_entry, aen_link); error = mfi_aen_register(sc, l_aen.laen_seq_num, l_aen.laen_class_locale); From nobody Mon Sep 30 05:08:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H65cz5z5Xltm; Mon, 30 Sep 2024 05:08: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 4XH8H63nGMz4Xg2; Mon, 30 Sep 2024 05:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FDPp/Smo0p9Qd6Lv0aItZgJS8hVjbRwST78vq++ljwA=; b=dnvlDedJp93RtIOMNj0BQxtIQR1pcHLE6u7y/PVLjMLNSuJ8j8BoazV9wVYHR+YEDUe2Jf BX3FMy+XNPt5bYkUF7ocH9YSPCwImxQLkEYsmmxJj9puJtVpz5BFwWvlxNVQwuituUdn64 NwOM1oVAoMFfmQbJMQxd/ceztA+YaObglrgg1Liaj4gEhZP2tOQcR3r/JjpNBqQF8gY3gg xVqNDSMTef5pI+OINi3+rGnW8EjubKYOyE5g8l3c1QwKciwQ+buCK88IJrC3AZtAOx6jmK EMxsZRcnFNjsReudY6xmJM1NXmaLUc3wulCng0iqlMjKcFX6IDRB3wEttvN3UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FDPp/Smo0p9Qd6Lv0aItZgJS8hVjbRwST78vq++ljwA=; b=HNGX4kvsPsgiW+ywhcs9kYWm52COvdTpaP+mSbEv8R1VWHWZU/UGO6QhKQ1NK2qK9ma9sG lTZ9HhsS+RqrWEnrLgOAC6Gvh/L8lkkKjccwcyvRVvi/lF66VKVTLqalCRJ4U1mku2C43t 33pg0obJPhzfSPyacIhV7Vwls9aFyQoxkSYNomEqD1GgzY9uq84jN9veGVxCtEx7JC5nvH vziC/X6QylmyLwMcVABf0GdGSCRCdlyGv9NkTgv3fvs1OKPdZCBlmgvmGEAV2BvEUHR1tn h2YAS+V1rGHX8/a0IB015Y2HbicB2oWtiz0dH3hBraisqCfn0HHKSlPE32z4iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672914; a=rsa-sha256; cv=none; b=G5NiZUX4juFA4ZLvgbLTn6D0xGZDufYKBI+i7SMgAURoaejY10PGLWB/UnPWL7WWZJC7n/ H/M+eep16cViAWWQWM19ggU3xalqPB9+JChowMABjAKK5TZGytGF5AcDIKU4fvZQ9+VyHU QvqKImLVjwW95NmYt+8IHkAtGbgP1CP1Jvuxjy9Gk4qh30my7lpf4RhyDcXNNZqVgDavbO qSX/Iz1juCT1VljUXgEacD+U8v+gbq+iKuqrmQsehgFfJ/6koFVAgJRegeAX34QsABHzrE xMRzl8gEgghc6ZrYQ72bAW+aek2ITfNh2dlt3Y9f0YuNOTkF77y5NVlgrXU2Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H62v0Szfyx; Mon, 30 Sep 2024 05:08: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 48U58Y2E025514; Mon, 30 Sep 2024 05:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58YIh025511; Mon, 30 Sep 2024 05:08:34 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:34 GMT Message-Id: <202409300508.48U58YIh025511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5d9c2687c3c8 - stable/13 - pms(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d9c2687c3c89e5cff9b76fc88f5417c6651354c Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9c2687c3c89e5cff9b76fc88f5417c6651354c commit 5d9c2687c3c89e5cff9b76fc88f5417c6651354c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:38 +0000 pms(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4fb8a80a78aa65e0b30bd5a74373512c678841c9) (cherry picked from commit 025c4754941956e24830a9c3c6f5e2466b19a9e1) --- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 38 +++------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c index 3368897d1d19..29290ec94ec7 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -318,13 +318,6 @@ int agtiapi_getdevlist( struct agtiapi_softc *pCard, sizeof(void *) ); AGTIAPI_PRINTK("agtiapi_getdevlist: portCount %d\n", pCard->portCount); devList = malloc(memNeeded1, TEMP2, M_WAITOK); - if (devList == NULL) - { - AGTIAPI_PRINTK("agtiapi_getdevlist: failed to allocate memory\n"); - ret_val = IOCTL_CALL_FAIL; - agIOCTLPayload->Status = IOCTL_ERR_STATUS_INTERNAL_ERROR; - return ret_val; - } osti_memset(devList, 0, memNeeded1); pPortalData = &pCard->pPortalData[0]; pDeviceHandleList = (bit8*)devList; @@ -968,13 +961,8 @@ static int agtiapi_attach( device_t devx ) } else { - pmsc->pPortalData = (ag_portal_data_t *) - malloc( sizeof(ag_portal_data_t) * pmsc->portCount, + pmsc->pPortalData = malloc( sizeof(ag_portal_data_t) * pmsc->portCount, M_PMC_MPRT, M_ZERO | M_WAITOK ); - if (pmsc->pPortalData == NULL) - { - AGTIAPI_PRINTK( "agtiapi_attach: Portal memory allocation ERROR\n" ); - } } pPortalData = pmsc->pPortalData; @@ -1225,32 +1213,14 @@ STATIC agBOOLEAN agtiapi_InitCardHW( struct agtiapi_softc *pmsc ) pmsc->flags |= AGTIAPI_SYS_INTR_ON; numVal = sizeof(ag_device_t) * pmsc->devDiscover; - pmsc->pDevList = - (ag_device_t *)malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); - if( !pmsc->pDevList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d DevList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW\n" ); - return AGTIAPI_FAIL; - } + pmsc->pDevList = malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); #ifdef LINUX_PERBI_SUPPORT numVal = sizeof(ag_slr_map_t) * pmsc->devDiscover; - pmsc->pSLRList = - (ag_slr_map_t *)malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); - if( !pmsc->pSLRList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d SLRList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW SLRL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pSLRList = malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); numVal = sizeof(ag_tgt_map_t) * pmsc->devDiscover; - pmsc->pWWNList = - (ag_tgt_map_t *)malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); - if( !pmsc->pWWNList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d WWNList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW WWNL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pWWNList = malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); // Get the WWN_to_target_ID mappings from the // holding area which contains the input of the From nobody Mon Sep 30 05:08:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H54czjz5Xlwy; Mon, 30 Sep 2024 05:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8H51mM5z4XZB; Mon, 30 Sep 2024 05:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+MXnc8LBnL9fhFziy75DpoQ0yRbGVhQ/sZ3kLYukl0=; b=yYaqpc8vj0y59gVV5BxdCyfawZO2UaNJRhMg9tRHl9R+zmPMtpoPHsSjKNYkIEHIOE1HG/ VQH+a0l+zMQKrHtDBxGKmqeIZSj2ikZlqvOrRLKQmqhhd6UEYu42pF+3+RUTIASdOO1pfM o3jRdDyE7yAoDpPIGuGQCfI3RGfEL+nodbEwz0rJzQzZKMJ4krfwBKJZUFLGiIIs4T+oaq KdME2sEHJ6sl3VZ84rRcC+np3/r254aQ0cvoCqhbGTJAsc4hlzP+u19fgQjl6607AI18KY NAnQhek/Xp2dTpeYbb2+Q/QHgAH/kAEDqzZHBDd34dvGtZE+AYoCLNJ23C7fcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+MXnc8LBnL9fhFziy75DpoQ0yRbGVhQ/sZ3kLYukl0=; b=A6JQ43LtvAZlb8xfA9Svs2/69AjU7mmm6YFOLB0jMLWYlG3tpCuYIWAthBMWkqPVkBgd6K a/S/cc+P7gdL9pUwXjI1fGm6DCP/nM/iRD+zvlSTgU+Z7L5MZoW0/kf9egy5KnVMo8oOls rb2XmqjKEAzHA7l6TrEVVMkpS9oro9QClsKP/0DKGidpHKc5gai6ta/YrqZFu3f9rfwvKj OmyNirGw+zPERFBdiSw0yf1tZ6Nyu7Y2gVZFN3+Kvp5tJR5A5r68BUQDX7uAtXbORHR+i/ L6ICiCfQ1FDCJ9X9pct56opeOWpbhu4SQ2WHJUgE04KnLGLB28NLr23dwHWylg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672913; a=rsa-sha256; cv=none; b=JxnDl6hTIScaHYDzxY26B0THnA7BDch72DpRcv6RoYiodfquJA1lHvRVScNz+dtyM53kPf Wlluoyn9LVidVZAg12259sOwRzj9SPnGdsJchJpzoST1CBam3In6/woow/uLHbYFKXrMZK ymoylqMsuSA44sN4kiV8361963Obm5M3n0Zok7+tktmVDO5X7EkndG/GFjiL8VFcMWvxP8 pvDTecC5l77xDHwd1D64o2m/hfI6jkeJMgkkRfY1RSnNk05WCI28CuTCExlYjmYqP+WtYY RchYqoF/izHpLetzkEDk76hHaDhw3F4Jq4gEbfNpfnKmb2VJookv5zlr3E5zNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H51LZ1zfqy; Mon, 30 Sep 2024 05:08: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 48U58XGs025466; Mon, 30 Sep 2024 05:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58XTd025463; Mon, 30 Sep 2024 05:08:33 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:33 GMT Message-Id: <202409300508.48U58XTd025463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6f7d5f52c19b - stable/13 - mlx(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f7d5f52c19bad9e260425b6f5c3cde7a83cadd1 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6f7d5f52c19bad9e260425b6f5c3cde7a83cadd1 commit 6f7d5f52c19bad9e260425b6f5c3cde7a83cadd1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:31 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:38 +0000 mlx(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 556cd18fb07604e3442819b221afb2a19b924dbd) (cherry picked from commit cf44738feb83b03f0726ae1dab83daf371aa2f0a) --- sys/dev/mlx/mlx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index e3590df73283..b074be4c98e8 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -2077,8 +2077,8 @@ mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu) goto out; } MLX_IO_UNLOCK(sc); - if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) || - (error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { + kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK); + if ((error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { MLX_IO_LOCK(sc); goto out; } From nobody Mon Sep 30 05:08:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H76vTGz5Xltp; Mon, 30 Sep 2024 05:08: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 4XH8H74YgCz4Xcm; Mon, 30 Sep 2024 05:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e1iVWFIKBXFs+S2dzJmNd2nIcYoSM2J4AYrWiiXHMKw=; b=lLEWbJ97i5hFJACiLwJolg0BOqXvhbodBWnFwNDizRKgSqrsQeFE3z/1mFK7k6eaw95v0H EAjuBdw899DpNU7y0bBGwW1n+qmUYRnzPJJYPRFo63VeBzn4dir/K4Vy5cLHqkH3yxZmuc ZqtKdM+X+gqvwQ04ZdU3E+PT+bHkzZ7h9f+T0+vnhOFU+roxWYgikd8JMLNf1VuLh8gY0h 5708nCLabR0vHR3usTSB18omL0lhJHpFPXHJLhpYHJLTuHMfu5lbjUSLFQitAxVcktyFyB QUP7IC42rsIetbg8bv7O6J83X3VDWzuA1PWRVdD+Ynzw4U/+C4XNOxeG3/IJkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e1iVWFIKBXFs+S2dzJmNd2nIcYoSM2J4AYrWiiXHMKw=; b=YhTUDpWN1/fVTlOahoINHKJSYnNO8S/LRHyq+XOzhmQjAXD/h2t/AL9gPybN1p/jXdherQ aKk8M87zY9g/zNl2z13/vPGF3FztBUOAjosmsCbWYLiC+Bbf9v2lzGZ9CV0MZ8xFCByZcL ZNV7A1OrYMgdVfrPHgw8PPG8yWZdBVjlu86nxVbC+C/uhG2sZufLry/njd20iQq2eMjChH rluJDowT0ODjFvc8/xCOLDRVczUzZvxsbyal3RgmvkZjQwVXy59/5eXO1kbP5jh+OGntyd Dze08VL0j5BMYCCtesnNELuQ2k+JqnZobgonnoIBu6xgiaVoug6Nh3bX7MrlJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672915; a=rsa-sha256; cv=none; b=fDTIZIBvZR7EXORXqIA04Usi1G607nPylANgkb/QDWrl+rz9VrHv3790QGxyYrYyuzBl+u 87lo5JpS+tdCBFy9kKA3LuPaCHFxUgraJewTLdlOybyxCP1dNsQeBbG+wJJeSj4jVdhm09 EtMd5bXpLJGJKybsNmADcW5ZErcEn7hmNuvF9uJWf+jJMW6OOUuIIF9wQEFcO3S9xlr8ni DKdv/HW6bDc9aj2r9NpHqw7ObUAtpo6Fm3ssBy1t4alvLWj+2uC9kLcYcZ+5Bt7zooGXMn SIB4JeEqbRU4RVzYwRPbXcf5AyamnusgESPyPJqR9HKahMqn2wegJujMPZebkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H748Xszfr0; Mon, 30 Sep 2024 05:08: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 48U58Z0u025563; Mon, 30 Sep 2024 05:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58ZRf025560; Mon, 30 Sep 2024 05:08:35 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:35 GMT Message-Id: <202409300508.48U58ZRf025560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 68c96d15d3e2 - stable/13 - sume(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 68c96d15d3e2107bd5b60825bae32ab3cd848593 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=68c96d15d3e2107bd5b60825bae32ab3cd848593 commit 68c96d15d3e2107bd5b60825bae32ab3cd848593 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:38 +0000 sume(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 761339c5544a360df9d3bab70675fea246eb6a83) (cherry picked from commit 140a0c8f39816648719d9670fb641c657732439e) --- sys/dev/sume/if_sume.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/sume/if_sume.c b/sys/dev/sume/if_sume.c index 59e4dbc9d02e..0868a5b00e87 100644 --- a/sys/dev/sume/if_sume.c +++ b/sys/dev/sume/if_sume.c @@ -1203,16 +1203,11 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, { struct riffa_chnl_dir **rp; bus_addr_t hw_addr; - int error, ch; + int ch; device_t dev = adapter->dev; - error = ENOMEM; *p = malloc(SUME_RIFFA_CHANNELS * sizeof(struct riffa_chnl_dir *), M_SUME, M_ZERO | M_WAITOK); - if (*p == NULL) { - device_printf(dev, "malloc(%s) failed.\n", dir); - return (error); - } rp = *p; /* Allocate the chnl_dir structs themselves. */ @@ -1220,11 +1215,6 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, /* One direction. */ rp[ch] = malloc(sizeof(struct riffa_chnl_dir), M_SUME, M_ZERO | M_WAITOK); - if (rp[ch] == NULL) { - device_printf(dev, "malloc(%s[%d]) riffa_chnl_dir " - "failed.\n", dir, ch); - return (error); - } int err = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0, From nobody Mon Sep 30 05:08:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8H91MVRz5Xlmd; Mon, 30 Sep 2024 05:08: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 4XH8H85FtSz4XSB; Mon, 30 Sep 2024 05:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6wBe0nC+fkEIx+Ms33Snzcf0EPcW8L6ioVHqA+Fhsw=; b=fvAmRvXiTD6lWvq1+/rOFhahNQjPnBQWYVtFR37bQjyCbyBGHZ8gt8QF3lkawgjahnFuRO 15NM3OtmXyiMw7OxkrZ2A13eDTpdL2GcnHqt/SvT1r4QJ/K80QKhd3FMi4iwTXHW2HP3Ue NDzYCg9hAOECjObKa8rgAzCaArb82ZRNmJX7Wy6a/rbTOIkMy/+oIGXd5JfiHDKLsd6dKX zqs0iF27yj7xnXQJbw3XjMk+q6OFpPRlwpyKB8wmbhueWYg15vIEnQh7eEWfRnxhmvfNcP FqjZVNS7mPm3Pp3TgfZhrX2o1eRjXgTQe75BIxW66on7uezGLRnVd89Rpx0I8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6wBe0nC+fkEIx+Ms33Snzcf0EPcW8L6ioVHqA+Fhsw=; b=sE5Q2lQt4pRhR21i5RcsLFcqzC/nypQI0x9qWHJIUbkk5XO6dwRqfqf99Ek8v5zsnnYieN nWeBNnRqcjcO3YY0nHBd+pSOZuhEEXoRImAnsc45Y2mEUzlPJ6HiBYCYNDLNbCaohVwI5j 6gWez1tlP91ZVOEpW+AF0bOiRA9rX83EnW7iAXC6WrBdHaTiqOGTora0ffB9WaKoEAe+NZ cyppeaen2eYjTDKicHahrEdMhBDNKW2436O4Jj71hh9W+FMfB2ABrSm9eS+NwnMAha4ZKC cvwy7mwXdn3+u1Ua4D5p5iX96VQvL1dlZqsV40uhbuIDtsXJF4cNG9O8H2Focg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672916; a=rsa-sha256; cv=none; b=TCBexQrEe9eSPh4HSb9vvDV5TExWcWjfqvprNxeHadO4fJRtxfo3++3/LfH8RjhoqQefGF fF75+Ibol4mCPBJBQOYSTD46Te9crLleyY2F2H33JuvXQt4t7NJm+Rdy7WVTQiZpTm502Q lRRs6jtnGXY+gTC6ZwTGCIftfILpGK5rXNe4TVEkNkMY3NZazNKKjiH4Ou7uXsEmuJTEsv MuStajJPc9+YPvg8gYiiJS4jakkwVIdWLjizYeMy1a4KnWFCSI69drFqRfRu25BUQkfeJS TW9K33gri5+8Q5lyVXFgjQ+BxFE3TFCckQ3wevbMJBRzeMLOQn5vecDUn9rrNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H84sTvzftf; Mon, 30 Sep 2024 05:08: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 48U58a8j025616; Mon, 30 Sep 2024 05:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58aUu025613; Mon, 30 Sep 2024 05:08:36 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:36 GMT Message-Id: <202409300508.48U58aUu025613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 36fb983d227d - stable/13 - sound: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36fb983d227decf10b26b666000fa69e832eb641 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=36fb983d227decf10b26b666000fa69e832eb641 commit 36fb983d227decf10b26b666000fa69e832eb641 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:39 +0000 sound: Stop checking for failures from malloc(M_WAITOK) Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 59121599bbda1e4c3fc3c6e887cd48cd5e3afc70) (cherry picked from commit bfcaaff418b856ef3d2a5be665566f62824f2f09) --- sys/dev/sound/macio/i2s.c | 6 ++---- sys/dev/sound/usb/uaudio.c | 44 +++++++++++++++++++------------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/sys/dev/sound/macio/i2s.c b/sys/dev/sound/macio/i2s.c index a769b9d81652..814bdd7e6bdc 100644 --- a/sys/dev/sound/macio/i2s.c +++ b/sys/dev/sound/macio/i2s.c @@ -242,10 +242,8 @@ i2s_attach(device_t self) * Register a hook for delayed attach in order to allow * the I2C controller to attach. */ - if ((i2s_delayed_attach = malloc(sizeof(struct intr_config_hook), - M_TEMP, M_WAITOK | M_ZERO)) == NULL) - return (ENOMEM); - + i2s_delayed_attach = malloc(sizeof(struct intr_config_hook), + M_TEMP, M_WAITOK | M_ZERO); i2s_delayed_attach->ich_func = i2s_postattach; i2s_delayed_attach->ich_arg = sc; diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index df6df8fd8e96..b2fd6096f323 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2634,8 +2634,6 @@ uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, DPRINTF("Worst case buffer is %d bytes\n", (int)buf_size); ch->buf = malloc(buf_size, M_DEVBUF, M_WAITOK | M_ZERO); - if (ch->buf == NULL) - goto error; if (sndbuf_setup(b, ch->buf, buf_size) != 0) goto error; @@ -3204,31 +3202,27 @@ uaudio_mixer_add_ctl_sub(struct uaudio_softc *sc, struct uaudio_mixer_node *mc) malloc(sizeof(*p_mc_new), M_USBDEV, M_WAITOK); int ch; - if (p_mc_new != NULL) { - memcpy(p_mc_new, mc, sizeof(*p_mc_new)); - p_mc_new->next = sc->sc_mixer_root; - sc->sc_mixer_root = p_mc_new; - sc->sc_mixer_count++; + memcpy(p_mc_new, mc, sizeof(*p_mc_new)); + p_mc_new->next = sc->sc_mixer_root; + sc->sc_mixer_root = p_mc_new; + sc->sc_mixer_count++; - /* set default value for all channels */ - for (ch = 0; ch < p_mc_new->nchan; ch++) { - switch (p_mc_new->val_default) { - case 1: - /* 50% */ - p_mc_new->wData[ch] = (p_mc_new->maxval + p_mc_new->minval) / 2; - break; - case 2: - /* 100% */ - p_mc_new->wData[ch] = p_mc_new->maxval; - break; - default: - /* 0% */ - p_mc_new->wData[ch] = p_mc_new->minval; - break; - } + /* set default value for all channels */ + for (ch = 0; ch < p_mc_new->nchan; ch++) { + switch (p_mc_new->val_default) { + case 1: + /* 50% */ + p_mc_new->wData[ch] = (p_mc_new->maxval + p_mc_new->minval) / 2; + break; + case 2: + /* 100% */ + p_mc_new->wData[ch] = p_mc_new->maxval; + break; + default: + /* 0% */ + p_mc_new->wData[ch] = p_mc_new->minval; + break; } - } else { - DPRINTF("out of memory\n"); } } From nobody Mon Sep 30 05:08:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HB2mWKz5Xlrx; Mon, 30 Sep 2024 05:08: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 4XH8HB0qqGz4XrT; Mon, 30 Sep 2024 05:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbtBbIYIeG9I7flMk6iJtYaKAa6KbxCj+FfFlNXjJuo=; b=dNAfuvpkQ/ieRLAW1g/Ou+nFK9uDORXEJkMTjIVeVNvO7rIMJE7FpCaBjSKD0TjynOJM13 Jg3GF0s6MYBdVnI+Sfv8UXQuPuSm4QM4XGtF/2Lv7pMJjV/iGUiEyFK9/b7t+wRQF0cEZg HQkV2F4ufoGt8inXnJqHxaaU8FeWszZ/PT6soTAXECIZMnGvdvvpnWxE4Fbyj2ArvoxbfZ rpOEv7Oc2bLo1s9odORoTmpiVcozgcdscvNqDxfjyIT5FqDnw8lp+xBsokf/RHDwe8EZaf NnwsXKIEiyx55kXV/cnq5J1l/79cFxcMJEGZaB5nZTzeSCLJYeSbztcW4b9pEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbtBbIYIeG9I7flMk6iJtYaKAa6KbxCj+FfFlNXjJuo=; b=veJIklsb3U+Z9GYEDCi0OsHq0sXhANOTJErRxF6SpSkKAKppVXkQ/8nU3D3juWv9rfqTFT +CaME2HGFsuheRWaewmsd4mC6D+JABamdIxJ7rYV1QN7nTkSERrtUrib8TGqplk1gVfDnb 8D+mIQiTeFn2lNb5j57XdtAgXW1hNKO2VRd6HTGOY0A1iVzz6acxcB389qsqkeB0kh0tt2 92ZXjOHveQ5uCIINEnuvQO5bClscLfXZMhFpPAVs0TMeRTI9PTS4IwxR6o9+reOQhK0Hw3 6GBJrv7qfu1iXOmJtcyU6BFFkTPbpXEbwLGpL2L/UxuFRhRt+tJGzNrTRpPQtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672918; a=rsa-sha256; cv=none; b=hVU1V4gWe1DY2IS0hUoagdZPLyJZLlHHlYRL0UuXEqMThWAxNMtv0d2og/CPtnWteyBGmG IdPq9j7pKj0tpn77sh8R1xNm78DKHr9wCfdUhA6+l0ThVSPZh6bJfJAe8rxonu3AV6H3/E qwUvvyz9vdAm0N/lzgdB+PNp1CHizddJEQkCeWdo3RWpzl50E0qEF6vthHXPH2ZshhwkJd dqSNDFiLAcTIJPOPSsx1ePGNQ4yyy9rsesq4kW29OaOwWzyndWc+3PsqFu8vbBHwQ0bPGC 9nXm/hZg9nh+5QE4SHPmhJBBmNk48jkYA9PCyWresrDm52haP3lod/4tc3fqeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8H96J9Wzfyy; Mon, 30 Sep 2024 05:08: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 48U58bFe025664; Mon, 30 Sep 2024 05:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58b8R025661; Mon, 30 Sep 2024 05:08:37 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:37 GMT Message-Id: <202409300508.48U58b8R025661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: eded71c830ee - stable/13 - sdhci(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eded71c830ee9cb85dee897418e47e2828116eb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=eded71c830ee9cb85dee897418e47e2828116eb1 commit eded71c830ee9cb85dee897418e47e2828116eb1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:39 +0000 sdhci(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit f80483cdd58a032ae2cfb2b9119824e9badc2c91) (cherry picked from commit 5a7db2ff56f9e08579913ae16850ff82617001dc) --- sys/dev/sdhci/sdhci_xenon_acpi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sdhci/sdhci_xenon_acpi.c b/sys/dev/sdhci/sdhci_xenon_acpi.c index 8699b26cff68..f130f03fc572 100644 --- a/sys/dev/sdhci/sdhci_xenon_acpi.c +++ b/sys/dev/sdhci/sdhci_xenon_acpi.c @@ -88,8 +88,6 @@ sdhci_xenon_acpi_attach(device_t dev) memset(&mmc_helper, 0, sizeof(mmc_helper)); slot = malloc(sizeof(*slot), M_DEVBUF, M_ZERO | M_WAITOK); - if (!slot) - return (ENOMEM); /* * Don't use regularators. From nobody Mon Sep 30 05:08:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HC3dmxz5XlgB; Mon, 30 Sep 2024 05:08: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 4XH8HC0gbzz4Xm5; Mon, 30 Sep 2024 05:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WOwSZjnFBF67YWEzTOsg+11v3iXItzvcQE/Gk9FUus=; b=PwKCsTr6UVwqVeL4LxwU5PQUFBEC5yLpjn+IQw/2rYM6Xeq9dfXeFlIOkSlfzts7mp5Mh0 nF13jwnKcyjZnqrZcrV3qdeJ3t4qYR8J5/V9rHkAzDtoLi1n20mqD66Kxts0CmZf2TIiho U6i0LH9pZB4QqsA5wd2bV3FIcm7NFdYYfFcu17INwptEW/HsqxOalXYjIxYZFq/iu0Vcws L0ADd7OGchsTQccwugOVL7zVFgjsXV867vs+YAv4US0c9hnYcB3rHnWy/r72u/Ujp0+iOX 8/5O/HYD8iubvsk7ZLuqaxCLuGYN9DM5NHrFSzGfk9P2iUXa2B7YufEqNS7Aig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WOwSZjnFBF67YWEzTOsg+11v3iXItzvcQE/Gk9FUus=; b=PH45vkamkWEzNS0MqcKUgO+AzdUypzVh9NHbGq1NU545nfjsmU4vibiBbLqDrinCS53EPc EZeeia/4ignzB1nm+YNwRosRbCt3Pj20a233R4n7HCLZABnkEudN6CCeS26SW3PxUaPcy1 NkC4mnXzsz5ZVecrNRA1MfC7dGl42cdQYai3Zpyb1jUqvn0eI0SVrDH8iQ9b/h1sO857Er ZwgdXnTZNBM6Kn5piS5VWmhmFPuM1mfCB3y0OqbR73TM1goxdl9KbXSbnD5Indqs3I56IK Ag0F0nEqf+FzuK/BDGZipSMK7sAft2aRAP4Tj6KeH+l73e2ZPd1yOXZwa/fu9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672919; a=rsa-sha256; cv=none; b=ILxCYKARnnz9grJmz7RO8pAuLJeJqzMq2DjoTHKPaSh0PiIKV0kIaxpJnuyA6I8Ep3xc+h x/NNEpekBl+2mhisJMr0RCIaoXDCU+jgyUXBnqKljfA0jNbqgL9kyjSyMYJGrCzEq1Ln8X F1z8Nab6A2DqZIGENpAFyz5LdHcEt74JQbbOCYJ7ruSNRIFrPutMmt1vQJwzu/vmoFnspS xbCyQPj3CaPnoeS5zW1HbDXOvIGBEX93fJOBBZuRWphRf9eELRjJ62RIyPREDvd45bx6S1 wcn7fgKhsNVJH5Vf8qpqNPzf7DdVJgUP3Qpb6NBA9htaRqhHSDVK7J1xL+Th4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HC0HrrzgGW; Mon, 30 Sep 2024 05:08: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 48U58c6t025718; Mon, 30 Sep 2024 05:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58ceX025715; Mon, 30 Sep 2024 05:08:38 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:38 GMT Message-Id: <202409300508.48U58ceX025715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c55da1eaf79e - stable/13 - vchiq(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c55da1eaf79e977ca95dc58ab6cf90908ae969e6 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c55da1eaf79e977ca95dc58ab6cf90908ae969e6 commit c55da1eaf79e977ca95dc58ab6cf90908ae969e6 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:39 +0000 vchiq(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 778ea7ed5a23db9c4f9d8dc43a5cea26ded6231c) (cherry picked from commit 40015f1c11ee2321485d0dd83cc2edb92236a541) --- sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c index 279aacd0880a..ab8981e25cb2 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -278,8 +278,6 @@ vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, WARN_ON(memhandle != VCHI_MEM_HANDLE_INVALID); bi = malloc(sizeof(*bi), M_VCPAGELIST, M_WAITOK | M_ZERO); - if (bi == NULL) - return VCHIQ_ERROR; ret = create_pagelist((char __user *)offset, size, (dir == VCHIQ_BULK_RECEIVE) From nobody Mon Sep 30 05:08:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HD4YFMz5Xlx9; Mon, 30 Sep 2024 05:08: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 4XH8HD1rrPz4XYC; Mon, 30 Sep 2024 05:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqEg/VZ1ZlUxOhBWaosm60hd2VXkofctF+2B8KYyrPU=; b=rz72J8O7+hANfcpIIQJ4Fp+lWKID6BQJsqepzY4e+6KmYDrLpejs0vxvwqln+tCEJRYRLp NUYgcvB8Sb0VcgP+bQ4oA7j0g1pHH5gsSCszguj/M+d/qdqq1UJEnOvuk6XLXP+0x5P3+l SSjtX+UNgGlhPjSTF/GoqgS4Gpyaa43fQH2kCfVqPoorSa8cfCijTj4ESV5PRb2nFirzWd 1piGsL80i2hJzy68mendBtxCGCVF3TWYxgRZcucVm4i+MDluSjQU+DofKHHohSuS1TdjSQ +t2boLt7eZt2NLeNz+rrFovu9e+P8JTmVQe+6dpVH8vv9t0zk2/U/gqVzU0bNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqEg/VZ1ZlUxOhBWaosm60hd2VXkofctF+2B8KYyrPU=; b=dJDuXXF2PH6tSi++TXKygiNBTUWotJ893yTCdpo1UmLUA1bJDfxLVaw49BXWgl2hpE1ECL ZLQ99mZ6kEhWkBGi2Xksg8YStuAwtb0PKzSIztNfmUdS6qb5z3eI8lD4vb1cxS5ZLHMJFM b4gEG8DpeTq/3JcJIDRMWpNk6RT47JZY+9oYBOYpWEDtkk1ciz78Bztib+0XYJphKYtsYE plW/UEQUu/u4DKPe55fACQ7u6oFPWS5/yzNQt9Wk7od8kjpt2k8tr3ssxkv+5fPw9ZtBq9 8avS/3X23Bf5l3YS0ZSLpZ2wET5vyMTJjv/kTe1niwSbu1ldFtSXYsY+9Wvbjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672920; a=rsa-sha256; cv=none; b=ey5Ww+aR7EcJqoLvg5BAq8n3bR839tTcjIaMb+I+wdWmc5oOPgpgzlOqo++hp/+3r25xTw ffiTz1ecWQfNC5+N3a6om0ESs81557qAJ3YWrKiLUkLlxepMkKJQgVq4odiN4NuZ+cfpdb mM3JdYJHPRjJ79cqcutJlZvAGsrxOt5bVdqF+CGLzyHsJoP1ZSiL4NZ26G11wr1xIllJpP +rZKRQj/bT2BrNLqjONnqhVb8E8fvlE9wAupwarEcKjoqtFyYWIioGQuVK9EK3xaKl1jtT f29a81WanyEdeQvvw8lDr3D3gJ24q2t7CqNKP62HrZK5nm8DS1+eOk63v1YwxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HD1QJhzg89; Mon, 30 Sep 2024 05:08: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 48U58e6i025766; Mon, 30 Sep 2024 05:08:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58eHf025763; Mon, 30 Sep 2024 05:08:40 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:40 GMT Message-Id: <202409300508.48U58eHf025763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 3e90f15df4c0 - stable/13 - ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e90f15df4c06b47e9b991baffcfca7ae7ad804c Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3e90f15df4c06b47e9b991baffcfca7ae7ad804c commit 3e90f15df4c06b47e9b991baffcfca7ae7ad804c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:40 +0000 ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 3f3f3ca25bc453315c6a1f5d16bfcc1189d41bdd) (cherry picked from commit 5de9286b9af6e2448ab7d3fe749d37dd00b915e7) --- sys/dev/ae/if_ae.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index dfff2ce22063..f8e83dc3c563 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -371,12 +371,6 @@ ae_attach(device_t dev) */ sc->tq = taskqueue_create_fast("ae_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->dev)); From nobody Mon Sep 30 05:08:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HF4Tccz5Xls4; Mon, 30 Sep 2024 05:08: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 4XH8HF2zGzz4XvD; Mon, 30 Sep 2024 05:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCDj60Lppoh54Fnv+pAIokPc8gc3oj+cUA21BDuvcKU=; b=oXIlgSM9h1zz1qE3gI4UHaNXUhv/mwBFbSkcX0EAJ4pn9xg0vHczEOHAsVSGOFYkVLgZHI krmcI284Rc97YyPhmHn3A0LYB7ShBAdipnmFPHM2ZDlHWsVzB+/Iw5iBMQVm6cQ0WspPsj 3Rb+Zy0q3ncmyZAvi+htOvpQjA4Bim/JB2uIYO19oQfHWkgYKzjhZfzbACWsdEedVGq5t5 j/xaJxYOiY3uyK5DSLVLXx0c7l8Mz2R0BaAEfIdAI6fqDQfGwLr/tBfUwQzKt/U1ZHGyzK 8z5d69YOq/DM2c2K+i6f05uqCDIyf9OA2kHGsJO922oGjOYxJMPJGMlBr1SU1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCDj60Lppoh54Fnv+pAIokPc8gc3oj+cUA21BDuvcKU=; b=MLDWf+GiRVObB9gBMNIOq1z27SgptfGyjIXACdXkXt5Bpuu4MDHrxiP9Ckwk/iqOJUp2R0 y8t7uGBQ2ReP17P9WquQinHRtUmx0gUMiNT9eZXswQ7uYXcZ6DfeJp1gGWB2zGp/Y8cUNM 89id5aOs25nMu2+UAlQtrEWv9LFz4fNUdPZRly87SAt+W1Y77cYLMtfkk1FTPEUBGieGRT Bj3noyatNeS5hBZ4Bg8yNZuIhwv3c3GHZIokL9i9pSS+AtuRN0gXJ0xUBcgofVM2i6lai6 3OgJltC3CTrC3L2NNZN2L+7b/aeR4i2maZ0mveXurRaSfxtVLu6kpv6M8y/oaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672921; a=rsa-sha256; cv=none; b=fo5ehYOHiOuQ7dA2k0UonZUnXmUmgWFNYUQ6H87bbDkkSqOvejs6uxxSHNlIKtB285sJH8 q2jSn6hEazkSXmBB4+qEx1qjyvgmw4S2dwv43wPGx+koZkew/s9IA58DBfkldeRZOrOtxT pDxm19q7tkw3/nWRzA/wha+L2Z6gbZkg6jMpCIELuUdh0KFWPlpbTg7lZg6pW1UfzhAqEm ZLPdvl1Xj9/83BjmjrRXCyhUu9dAtFWFU5FDHXDEp9d5biYxDCTNLCrO1JbrOeV0f8bcHs w6HSFEuTNwIPD41ZX3UfsTzhFxd0b8r+m9RmOt5v7JoW4Itl1QacLY7sXcI6BA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HF2bVPzg8B; Mon, 30 Sep 2024 05:08: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 48U58ffT025815; Mon, 30 Sep 2024 05:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58fpw025812; Mon, 30 Sep 2024 05:08:41 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:41 GMT Message-Id: <202409300508.48U58fpw025812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0b1ac58493b1 - stable/13 - age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0b1ac58493b16e55c882473567962b157ebbc775 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0b1ac58493b16e55c882473567962b157ebbc775 commit 0b1ac58493b16e55c882473567962b157ebbc775 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:40 +0000 age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 5cece2c24bfa618091e778df488fb2380fcecafe) (cherry picked from commit ea86e323e52fe5bd7bac73ba2247b5ab0a3df052) --- sys/dev/age/if_age.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c index c459493ba67b..7bb494d81de2 100644 --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -638,12 +638,6 @@ age_attach(device_t dev) /* Create local taskq. */ sc->age_tq = taskqueue_create_fast("age_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->age_tq); - if (sc->age_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->age_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->age_dev)); From nobody Mon Sep 30 05:08:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HG502kz5XlvB; Mon, 30 Sep 2024 05:08: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 4XH8HG3gFhz4Xf1; Mon, 30 Sep 2024 05:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4HBQJVo+TDDjZeYkO0Un1IVjWuRYRZIhuGpLvVzoZzU=; b=DSoA2AXzrRxnhzzVoTtr/3f7lqPUjd5jFXYryDYqv77ZnEDo0lw/M1LxpkBBKWn/HJysAO gdxirobq/QmX/eTXRc70jzSfOG/rYEPWWqb+Hb2xV42ajHChhwRpppl6MQesLanRIF3uUG Rnw6O4TL1G7+YDQGmUgFvHz7DC384iWcqRkr67cIC3yQID8b61n8pS0dbhWPjvRii4l5AH nNqMsfXWUgGM7S+xsv4UFhQaRIumJgchfIik/hgrGflB2PL8YhPVc/ps49vhB2KAqgHlb/ M67oBh2Fz6wL0jIE7dJVbctmgES7sA2wZwhQD/1DSwwJ9mbQZTy7KzxcDRgtog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4HBQJVo+TDDjZeYkO0Un1IVjWuRYRZIhuGpLvVzoZzU=; b=cQxbyxPqYns6UzXPeccXghEuHwTLF5gkl3TehEtrwGZpS5ieLDvxqVmt3WE+8svz9CQBDZ fddsgX0kGeXpbNHWPqA6IWoyNFVvy0fcOx6vqmfJDB5PKapooevfNvisZKahwedH2YjF/B T5Zr0/naZhkQOxck9vDx6425NsFQVM+ySKRDi3vRjDvACDhlmhIXAvEH2RZtEp6CgsoRlf 7XRqZcC9z5qGlT87/XL4FbJnQ/B97ejUapRN/QzegTESrWh+NZS+fze3aIuRXwu6hOoEGJ /d8F5dhLkbFzwiwgzGonlqI2U44ldWOwKVUKmfYy2hFSAMlmqz/PORXzD2FcWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672922; a=rsa-sha256; cv=none; b=UR2cWl7ed3TORGrfHUcPT/i+wPK92eqyKaGyBeGjdUzx4urK9W+srp2kI1VVkP65jLLv+I LDAMucG1dBqj2jNwgPmnWCrkmFa0x1NWCsUizIjb7riqLWGpcytrENcmkU7PcqDMFiWoDs nd+1yFLlkE3/XKdaEjA1k1sLG2e4gdq6P0nOu7jKPHcOc+9pBex/hWlaIdHwXBZHJoxM22 yBbkwoSJMQpWDXVMZF9zPPpttdQ37rt37x5Q7sWUZI+UJHXrquCe0chlp7PjazhNeQAshl TJ333Gm43e32TiBMs60h6/YmIffrraH9bUSbLRlFfByZ3oKHADDuvLU8zxLTqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HG3Hpszg8C; Mon, 30 Sep 2024 05:08: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 48U58gLo025863; Mon, 30 Sep 2024 05:08:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58gRj025860; Mon, 30 Sep 2024 05:08:42 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:42 GMT Message-Id: <202409300508.48U58gRj025860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8b872247de88 - stable/13 - alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b872247de889c9b8faa9bb309728a83e993de0d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8b872247de889c9b8faa9bb309728a83e993de0d commit 8b872247de889c9b8faa9bb309728a83e993de0d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:41 +0000 alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 0cd3976d076218ea10761dc3f38ecf8549768ad5) (cherry picked from commit a6c873a822b5dd51861616324abf3ba466958c7e) --- sys/dev/alc/if_alc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index edd3981fba7b..c4e66fe8e1be 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -1627,12 +1627,6 @@ alc_attach(device_t dev) /* Create local taskq. */ sc->alc_tq = taskqueue_create_fast("alc_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->alc_tq); - if (sc->alc_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->alc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->alc_dev)); From nobody Mon Sep 30 05:08:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HJ126Sz5Xldg; Mon, 30 Sep 2024 05:08: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 4XH8HH58Vmz4Xt7; Mon, 30 Sep 2024 05:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4QWf/2xFxkIUGR/cdc/F2iZS+JbQWqRjGZSYtOtmFU=; b=EFwrKY3oNTq1JDJ0F39kpWITSQiGpvXAMcItzM/+fkHZ2j1bMphoyR4CqlzfCIWcTbKd1k QYzlkpsNBvVEQ9BU+N5p/rhIcQW+dHa7tVtjpml9cT+Zy7tlRWqbVFeLLvexcSZwrY3QKr AXj9RfwoJgUMsaLREqVycWRSy4/opSkGnDhL02xc1aOy9TMDp0QUE9t02x7Ds/KWGCHC2M 6QL7EBkH/qgQg4s6Nu14o31IFwYkR7Jb1vuFFIDAhP+Q+pcSRsbLauLPqGlsE0i/GbszBy 12vafFLV9bZl6o4bfY80EcHLR8XDkkFsExpJt5DRxBillc1M4RLFcgf/8288xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4QWf/2xFxkIUGR/cdc/F2iZS+JbQWqRjGZSYtOtmFU=; b=JRohAicwiE3sK/GWDz8IICF745okZ+VWaWYW7DkRBmu++eeCD6RJcb0wK1XXjyvmDG8SG5 J0hgm0xn2MtQC/hqep9nipMoltkUG0XqrHcR6gFyFPGaTDURMLPMZ+CvINV9iCUzYNEYZc uxn2JrngFjEBhewXI8MBB1nkS9WOIb5qEsXOR61Ch7w23pdjWt1VEkWOIZc2vXhj+9Fwty GLzt+kw919Cdj+KqJWOFlhsSrQJf8htmmQtcE+SzG1/YCk9jEFAYo5zj/YH7012XJwCHyo AGdaAneUoM9ip/vS7jkq0lr0u2LPEZ/RGrw/cBW+B22U/yM7REApbH+9hqGYAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672923; a=rsa-sha256; cv=none; b=j4JxfkHh95i9uSf5kyDaSqVWEPr5sqAK/0hb35urAiPPtjmDrUyv0G0oqedolONEzd8/JM C15OosD8ZB1cr1ZiKZzPqSvwX41YMdoGKog6AEA+XuE0VIzo3vfLNNbPRW08/+OQDvrz+q 3rIGT/l60J/q1sycNjYv/mJ5F4OawnMN6P5a4OxO7qhB2kVBD4i/cgd6uNN8rjfO6xKsGo SFx0OJ18I4DnyXAG6cqrINSBt/x5N4vTOO06QjZcyW6p72y6SoPL16q+0+Pw4qjhKHCAN2 EFO7zrPi3YG9hfBCbhQ3j9foGoIceIJNoTMaV2bZJFc4WcaLsG5DLF5crZZRWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HH4jBZzgDT; Mon, 30 Sep 2024 05:08: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 48U58hH8025911; Mon, 30 Sep 2024 05:08:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58hIN025908; Mon, 30 Sep 2024 05:08:43 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:43 GMT Message-Id: <202409300508.48U58hIN025908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 26e17489cd06 - stable/13 - ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 26e17489cd06ab1ab89d650b16ecffa95c270689 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=26e17489cd06ab1ab89d650b16ecffa95c270689 commit 26e17489cd06ab1ab89d650b16ecffa95c270689 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:35 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:41 +0000 ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit f5524be39e26e3d7fb774ffe7711602c676a8b9e) (cherry picked from commit 7ae70062241b063e076935a9b8955d27ea84a3b7) --- sys/dev/ale/if_ale.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index 535a129024d5..a04d9dc651d3 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -665,12 +665,6 @@ ale_attach(device_t dev) /* Create local taskq. */ sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->ale_tq); - if (sc->ale_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->ale_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->ale_dev)); From nobody Mon Sep 30 05:08:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HK1dsVz5XlvH; Mon, 30 Sep 2024 05:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8HJ61ysz4Xmr; Mon, 30 Sep 2024 05:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIQ+Tuv4LX7RiZg38HD7kGWdhsZcLvi2QBSB3DtDxJk=; b=KEMTBG+g1rzUjQKsmCs+fbn71HL3fC5zJwox38GwFu8E8N6I3w33S5tvDhZIWLCye0w0Cw d6Zafl/BkH03E6a3SychJd3tZyGXFUSZBJ36+jGCFksj5gnI/eGRvkkgtjPDBh+JO+t5Ix GHHn0XnZjeMK76mhVg3gdOuJo4f66m0VFqQDHwHgxlQfDiBAMY6hR+ANy1z4fNhnkozdKo ly1wXT7g6JzJsgtIlZjuoTa6n1UwS2sOtdzduuOgc7ZOUGSSiH5Ad/KYphstJnw04M3RqO PXVhIePBvBwU3UaE+u4rNkVkBkPJoZcBnW2RjJkvZLxLGLqyHLSJoCMhHBoeng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIQ+Tuv4LX7RiZg38HD7kGWdhsZcLvi2QBSB3DtDxJk=; b=RNVa/0m0W8vvBNJwggzFGKXbAdr2QgQd9DksCdfdd8NkPhIjnF3x9R1V5xSI9Yk7WpY1nx LXdytO5C1P7ekgBbae6h8o9Pubxkkzb65+vJaiKTlmkL78A2Fkq1l9HWc4OfBfiwsLeLuF uN/rWEPIbWFi0/MxyQb2Gs+crhy/JcfN9efgYmqJZgmT+uIEHslIjRONkVhd0Ds0oaVjrN 23QyECl318iaZRokL9zZKxg+e4mzAR/UEKXvu6NgorbDGlANO22zpPlIyamKcfIx63cmG9 bsHGABqSXnquJI+EIym1w+YFZziunIcocW+mXURdnvybec2aGaCaZtKXx3O0sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672924; a=rsa-sha256; cv=none; b=O/CZ3GhMwnF5tTo6WK3uu8sQVaOGM5wSmesJjTSGsiTkHWpvWBfT/qpYBvBvD/bRG21uRV z00Ryzi4ZTlCdp+Pw/Rbx3HX+crJaH9vyJhCaaX8n7LOJtHM5++7OColYQwLfxEo21J7jN ABbM9knKy3kr6KmUW/3U/tHDUdK0jkG3P0Z4C8tmFS3+/PdjoP98Dtkgq5KwoZyctQ3vu6 PQOzxQHGEl9eZ1szi56QqgtV8h0XS9w/yJ5fGy86/v6x2A0qVkL9Nt7zEyknpcTbKE5b2B 27MvGSfdNz7DVqIpGHoWq2btFmwyBHBcamAdjjZh4fC6FJGfpyIbhLefoRuwmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HJ5dtxzgDV; Mon, 30 Sep 2024 05:08: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 48U58igV025965; Mon, 30 Sep 2024 05:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58iCh025962; Mon, 30 Sep 2024 05:08:44 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:44 GMT Message-Id: <202409300508.48U58iCh025962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: b620bc6e1dfa - stable/13 - axgbe: Stop checking for failures from taskqueue_create(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b620bc6e1dfad5c1838a3027cb902d64180bdd7a Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b620bc6e1dfad5c1838a3027cb902d64180bdd7a commit b620bc6e1dfad5c1838a3027cb902d64180bdd7a Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:36 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:41 +0000 axgbe: Stop checking for failures from taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit b29adaaf44f6cf9433c782bbeeefd12d74d395a5) (cherry picked from commit 39c35f6c5445d09b51a3fd366e8d64434b8fe7f1) --- sys/dev/axgbe/if_axgbe_pci.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index cd498bf1b5d7..679de1c6092a 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -540,11 +540,6 @@ axgbe_if_attach_pre(if_ctx_t ctx) /* create the workqueue */ pdata->dev_workqueue = taskqueue_create("axgbe", M_WAITOK, taskqueue_thread_enqueue, &pdata->dev_workqueue); - if (pdata->dev_workqueue == NULL) { - axgbe_error("Unable to allocate workqueue\n"); - ret = ENOMEM; - goto free_channels; - } ret = taskqueue_start_threads(&pdata->dev_workqueue, 1, PI_NET, "axgbe dev taskq"); if (ret) { @@ -560,8 +555,6 @@ axgbe_if_attach_pre(if_ctx_t ctx) free_task_queue: taskqueue_free(pdata->dev_workqueue); - -free_channels: axgbe_free_channels(sc); release_bus_resource: From nobody Mon Sep 30 05:08:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HL3hLvz5XlkD; Mon, 30 Sep 2024 05:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8HL01ybz4Xn4; Mon, 30 Sep 2024 05:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFDntZLmqBJBqRvBaRcJcnZMecw7cQ/pWwHjfyZUL1g=; b=kNNBG7dvitTyd1VyHp9ta+W2UWY3XkbNMCA6sqflyO7SbEIgg573oWqirD1OTaB56s9YPJ Gp/9EKQYolQV/ZzvubTqlzAwXsJqpi/lzsgSSNhIP3PNcsI+xlFWjg3A0gMITZ4H8Xze7X bqQyA+tuA6cuHjKufAiqZBj3TQm0MBqpNN7Ty1W54ISr0onn+M11O3bUSDkT5/Bzz2mJKe eH9zPdEa0O1Ny1glJdbm31UIrDYWkqf5brVv8h1yH6/hhGq5IHkRC+GP3B1WYebz2oYpMz 3U614Jrj9sJDca+rQEKNPiHcXHKNwnLe6idKQfksWRypf8Zq3PClg11R+fupWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFDntZLmqBJBqRvBaRcJcnZMecw7cQ/pWwHjfyZUL1g=; b=SFfvq0QQ1ATNCLmnQX0vLogNmUFJigEDAbXhqGnGOBauvplbHToNz5jOtM7JO3ewXcYUxy n68P/3ZPjpqyFLmON39dNhjVUaiuUF8k1AlRMat9s1oPW/yeXF+UV7TyfKSbIO6eEQZGmP 7a85Hs2+EquKTyOeaaAgsBVi+DpIlYnL/RrcRvzldp4k6m2zVw6IIcZNJ5TLbR3QBTEg8v qU03PLMSG+3sI5CZoUZptH3QNgzrkC6kmFRKHauLQYI+m6CTc4GCEA/uiH8x2Kfbkbghnn DoBru8fawWSSCyQKft/hE520ZqUKUySNOe2aSYJPfMJhPhJb0KPo+mXfeIbnew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672926; a=rsa-sha256; cv=none; b=TxoNN4ddSS0jSIOhH/pE6Q0G1DJqmGMdKnpzUHxsDFTN8MKHsFsM7S009JTce6f5vVke6s K9jZlvPbw+zCHbdIBre8dqtvn/MW8UIksSh4ljbkMYzWG8/+TEvQBKIyqaQ2tXI9BR9TEa GRGAf1Pl/pHL+mxwx/uJOyGhi3tXkHeRENwnztsujDWqkEsRLHkHJXYew+Q9/4FXL5V5LI ILXQgIrNu4TS9cMkTJKhfrZR6FMUh2/Fzs6AyAKo4R34GmpiuGYn+VSMZvOzgD+uSOHL5g VJK2Riz7rBUWLgrZp+bsg6Oi9lMBTrK/MK1h9WglmIE1tppiH4qeMruSMzrS3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HK6lBRzg00; Mon, 30 Sep 2024 05:08:45 +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 48U58jXJ026013; Mon, 30 Sep 2024 05:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58jjZ026010; Mon, 30 Sep 2024 05:08:45 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:45 GMT Message-Id: <202409300508.48U58jjZ026010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 617dcd17a5c9 - stable/13 - bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 617dcd17a5c930702ceb28f32016bc3bf3494c93 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=617dcd17a5c930702ceb28f32016bc3bf3494c93 commit 617dcd17a5c930702ceb28f32016bc3bf3494c93 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:36 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:42 +0000 bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit d44bc2f07b971fe1f451a1fff0389650a2502422) (cherry picked from commit f5cbe8ce89f1332e1188b9b315bc2707f50ef3d6) --- sys/dev/bge/if_bge.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index dcd65f9348d6..91b33492b2d2 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3897,12 +3897,6 @@ again: ~BGE_MSIMODE_ONE_SHOT_DISABLE); sc->bge_tq = taskqueue_create_fast("bge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->bge_tq); - if (sc->bge_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENOMEM; - goto fail; - } error = taskqueue_start_threads(&sc->bge_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->bge_dev)); if (error != 0) { From nobody Mon Sep 30 05:08:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HM5Gn7z5Xlmv; Mon, 30 Sep 2024 05:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8HM1Z6Kz4XrH; Mon, 30 Sep 2024 05:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFvewP66HRiyknGDVdLgSYXVsLLWDBVAFaKxQVZ6B6M=; b=pbo3iQ/ra1H+dAJda3V8vi7suseMHcTg1CtXIzetgzQCTH+zEtGvChg0oxMnDfmC/qrNXE NQnI2HdfaojrSY0/NRprg2XA/p/xlvTHyOhxHeA7QjoTC4tuUJoQ+K5YGHIh4RUG2iwqNB C3ppx4cq1s+QCdrOSQvavlzAyASfKnzA9JD5g0dzO8kOUfVjA7fWjVHH6z//rVFLsr139U ZKZYc9ZKyWK2iMFcL4kY/zDadMGlS+wEaQ7XuNewgVd5s/lPAql0W3gR21X0jG8cts80W5 OwNNTDbJ1+bZPXJM4gZz0RXTBWpnJJlqty1EOwXn0W0LWxLjT2hOmHHegHZobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFvewP66HRiyknGDVdLgSYXVsLLWDBVAFaKxQVZ6B6M=; b=WjsOEI5ZWDrcsYPpPK2h6/b/t6EwAiPCpyd3tqBm9BuwuPaEOP7ivu2rJ3lwfKi7mjHEvO UwqlnqHEbe2MPAaUWpxB9njJ/5WaChgC8Vg6VlJoyx3FYi0KYj6oiANIU8GOipMFgAdP8c pClD+qrQP8J4FuV6bhvMzoKWCKscksAbu4ux8kdQL0Yx1KUU0sus89fCLu/5Hc/cgQEr3Q 4UpaY9Fx2jUGX57k6+2B/135s671X52X0bLFadS4+CBWPTc/mZHUe6Ngp2aD4at7AYNwXG Dqpb9A9AOIalozAv7fgl0dWP+7Tkkjk44f0drzxX/UjcDBZOwivg0guCnLszKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672927; a=rsa-sha256; cv=none; b=RL+AL4T+H5TtSFhw/+PwbtZeklnNm3QZXO+u4EXHwaCGdZKRJUsh4JlUCv3dWL3jZRqVgK pxLUjpH4tL2WnfackpaheJS1QurT3+kWBKMeLuGJFRROLJ6tBh4/wGm5Ho8MdtfqJ5iq+u WQdlLDj4wglJyiydqVhr+aMYDgGVe0w/2rFNYzDH5dTCPvQ5+wpDkn4FHsctJZIiIQuf3g fqlxkIa1i9wmFjThiY7Gs0kPAyjWOcscX6vnnxzc1kdup4dbrrOoaHpWtBlvJfWhi2pICa Wzz+ObU5PgbpPVFYR/4fF505TXm5mDu2UeCYtAW9a+CxZsc9EQLjIlmeRf5pjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HM0njNzfr1; Mon, 30 Sep 2024 05:08:47 +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 48U58lwV026061; Mon, 30 Sep 2024 05:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58lkT026058; Mon, 30 Sep 2024 05:08:47 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:47 GMT Message-Id: <202409300508.48U58lkT026058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 545f28e021eb - stable/13 - cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 545f28e021eb9cb65c6abf7f4221f78d017565e4 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=545f28e021eb9cb65c6abf7f4221f78d017565e4 commit 545f28e021eb9cb65c6abf7f4221f78d017565e4 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:42 +0000 cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit af28fc3c191cf572f7def767c60fff59d48947df) (cherry picked from commit e78770d62f8ad7e10f97defd3bb933623a3ded0c) --- sys/dev/cas/if_cas.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c index 79a577208a2f..8071635c20e0 100644 --- a/sys/dev/cas/if_cas.c +++ b/sys/dev/cas/if_cas.c @@ -210,11 +210,6 @@ cas_attach(struct cas_softc *sc) TASK_INIT(&sc->sc_tx_task, 1, cas_tx_task, ifp); sc->sc_tq = taskqueue_create_fast("cas_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_tq); - if (sc->sc_tq == NULL) { - device_printf(sc->sc_dev, "could not create taskqueue\n"); - error = ENXIO; - goto fail_ifnet; - } error = taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); if (error != 0) { @@ -467,7 +462,6 @@ cas_attach(struct cas_softc *sc) bus_dma_tag_destroy(sc->sc_pdmatag); fail_taskq: taskqueue_free(sc->sc_tq); - fail_ifnet: if_free(ifp); return (error); } From nobody Mon Sep 30 05:08:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HN4DQ6z5XlxR; Mon, 30 Sep 2024 05:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH8HN2YlRz4YCB; Mon, 30 Sep 2024 05:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djiH1Stk9dsKcg+MtORaXrbO4hCOVzy8mZnwD8aZn9c=; b=OHZdeuwgqvXpSbN5pdH9FVbI+ZbE0x23+diI+2HBRy8PybxwpvUkbT0a4n9CLtK2k7YNHA Ql+LxvLw95F8//zjUhDDW6oSNd79zfvHBk5QYpipLSEyH7QIme/a13F12Ae5+625bsVLTG CmiojQbehFgswRk6C5vcTtfu6bYD6oKjI1eRWve3pWjHwW89jSwOi9mpxVp4r1X2VzN23I tdODLEd5sbO4DiPvqZVgGsJ1IuvenINbisX535QRdC5JV8zHm9mrHmEPPefy0RW7b+auxN XYpnUGtIJ0Rryx9mXhPR9thqZ+4a/OiuiyVlXDlde106RNtwL4PmBFdyJ9iNiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djiH1Stk9dsKcg+MtORaXrbO4hCOVzy8mZnwD8aZn9c=; b=ATWBJ7sgBWsqb/5sM+YJUOzrMKfcvRtpaHnGDfyo5vsjNk9R403BUGeTG5dJ7UCckVuDwk SGXJSZoUME/eO1JF6PXTW9kXKn71PcNJgvo6S/U782HEZQJJ05Ufai7D8h0C2Wl8v4shiv +8HdUVkgzyM2HOBjHO/O1QGyF3cpim4IpwF5sss9FRx2YhXddoqQZFm5u3ytQjOJDN8cbe FGLH33NLmn3SZHCxcmhWvLlzxW0nDy4QAJvqLV+tw/YRAJSGkX0mevIBvAb+6aeZ7ETeMf 2JWBF7iQ29K1W1v1EtiuCkyevQbIwDFFCOiKGQFvV8iQKYhmzLSG/Oyhr8I63g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672928; a=rsa-sha256; cv=none; b=X6bmd4/dQZVBZ+0d7e2QFMGxw7QlI5xsVyvd1OCqK/enhLa68l7LHQoVyHQ8MNNqcETazX 0H5ct9eFVzjr/T6G1nSxHDlPqiEDKJJlwHoob10O/MO/dOY0RukQTqBVJeeRh4vi1uh+JA omLypLxVq/ThTFAmR/rKByt2GXfdvhRfQOTFBKjmoGHWmmQ0JMLbV9K3G8xfdU9x3G5m4K RBEi63v0cCm1V9pCXavWnCrQF6ImfWl3WbQUoDFiwuaFXbNXKSpdJRfxmlqKDmCB8joQjX K6PAbqINbnibWOMgUMO4Ysa6VvP+H6AWgwSEb9wUqe3rlydHlumAB6XGoFmCog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HN1zsDzgB1; Mon, 30 Sep 2024 05:08: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 48U58mB9026109; Mon, 30 Sep 2024 05:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58m8d026106; Mon, 30 Sep 2024 05:08:48 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:48 GMT Message-Id: <202409300508.48U58m8d026106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7b7353261e4e - stable/13 - jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b7353261e4eb0e118d9dea2fb7f260204b88aad Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7b7353261e4eb0e118d9dea2fb7f260204b88aad commit 7b7353261e4eb0e118d9dea2fb7f260204b88aad Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:43 +0000 jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 3fdef8e855027d5c9bec06e2a53e8f99f7d5694b) (cherry picked from commit 6b25a8f079586f8f3e4badaec402dae1ab39ddb5) --- sys/dev/jme/if_jme.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index 03503da27e57..219ac675308d 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -882,12 +882,6 @@ jme_attach(device_t dev) /* Create local taskq. */ sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->jme_tq); - if (sc->jme_tq == NULL) { - device_printf(dev, "could not create taskqueue.\n"); - ether_ifdetach(ifp); - error = ENXIO; - goto fail; - } taskqueue_start_threads(&sc->jme_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->jme_dev)); From nobody Mon Sep 30 05:08:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HQ07jcz5XlsK; Mon, 30 Sep 2024 05:08: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 4XH8HP3ZSnz4Y08; Mon, 30 Sep 2024 05:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQzuqgjEwi4ZImrrMbdvKNjkMk+MLflnbYch0SsoNcQ=; b=ul7YhE96nbdjUAuX21VFs5k4YZgUB/leBPrNSqvbtwyCbouhPzpVvTAxPjiv/vFJXvw0bz 1L/ovqCtUsqBNlPppl7l9h1SnOBYh442CBjha5+u8HJ9zdo/iun5NLNxulQm/4cM42CDeo He8qDuzOcIJD7PxSDPJnb0JOwmC7f5IZBUbM+J/E/+HYBT87/2iR0cfXRMaL9JauO6Y41h ymKOxfDRd/xNePucPZg7682fz5zr1125jZ2DSmbUZnaW5+Ok2umsNM8wLKyLnY03VZk6uM kxYvCdLsqJ6ByXINyb9rKXi1hkVgbnO/MtCH71mDbkncqWphPCD/BoYkr6xwfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQzuqgjEwi4ZImrrMbdvKNjkMk+MLflnbYch0SsoNcQ=; b=JW7xDRtauBVBf+0RBeLyCWl4b0NU0R2v8/IhKTX/joGPK8MSGFZgE90itUklpghxK1vjLm eej1D6rSknjgR39wrZeR2FT5x7T8WaVMxQWkaIQydeiuWl6FAPoIwNMnY+nxIl6ZLVkEn/ KRBUP9bicJmXT4x8APYl9HdYWyBWYeu9jY/9XToFiJ6eJirRehRUk6ZTkAXAIeT1lXwGc7 ifF2iRWk68v4n8lmwGTbTnp9q/8ESXaY8QuJPwW1NVeLEOr6oIvwSesJmRZcr3Lcx4QLGI 2St/vRKYPAnosGm4nME2EiazNxbfp1yAkGqBHd4zVeYYX1odHCSlxMxZBTk4Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672929; a=rsa-sha256; cv=none; b=QZnq8CtC0JykDWILwT6U4AdF1v3hbexLCpU6P7NGuKqF9LB0iLkQvCaiYofgJ2/HoQJQXy KywjkhWhuksRmszAZz5CmFITurjFmEEOhpiu7faYWRPGhPisS0wom1n/7xlkxFqYhwxaSB xauTAKcJTXv/TWn97fDdXRFI9c6ZxKJiIz6QzD6NLJeJG341icOp/LGxoMif3+wSaEn+Mc /jfPGruLVyQjgBFRj9kPuqHusdYmdFrasJyGOwDRWdAZe5kC+tE96FzlEqIcsebzOkQxJg CGt9RUSe4tSNRz0jLTbZ0Ipyb6Ww+b09yy8noIkkULlpinyOIxzX5Pm7ClhwRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HP3B1lzgDW; Mon, 30 Sep 2024 05:08: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 48U58nOx026157; Mon, 30 Sep 2024 05:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58nC3026154; Mon, 30 Sep 2024 05:08:49 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:49 GMT Message-Id: <202409300508.48U58nC3026154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7000dd2e2912 - stable/13 - liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7000dd2e2912c15209f7e60538f8e7ba8f525339 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7000dd2e2912c15209f7e60538f8e7ba8f525339 commit 7000dd2e2912c15209f7e60538f8e7ba8f525339 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:43 +0000 liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 57cd8f27b727e7a87312f6f141cfa13807dc81a0) (cherry picked from commit 518e138448b46d57030b3e34962e69e6211c8e1b) --- sys/dev/liquidio/base/lio_request_manager.c | 9 --------- sys/dev/liquidio/base/lio_response_manager.c | 4 ---- sys/dev/liquidio/lio_main.c | 4 ---- sys/dev/liquidio/lio_sysctl.c | 3 --- 4 files changed, 20 deletions(-) diff --git a/sys/dev/liquidio/base/lio_request_manager.c b/sys/dev/liquidio/base/lio_request_manager.c index 75dabf4839a7..fedf0ee17893 100644 --- a/sys/dev/liquidio/base/lio_request_manager.c +++ b/sys/dev/liquidio/base/lio_request_manager.c @@ -159,11 +159,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq, db_tq = &oct->check_db_tq[iq_no]; db_tq->tq = taskqueue_create("lio_check_db_timeout", M_WAITOK, taskqueue_thread_enqueue, &db_tq->tq); - if (db_tq->tq == NULL) { - lio_dev_err(oct, "check db wq create failed for iq %d\n", - iq_no); - return (1); - } TIMEOUT_TASK_INIT(db_tq->tq, &db_tq->work, 0, lio_check_db_timeout, (void *)db_tq); @@ -179,10 +174,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq, oct->instr_queue[iq_no]->br = buf_ring_alloc(LIO_BR_SIZE, M_DEVBUF, M_WAITOK, &oct->instr_queue[iq_no]->enq_lock); - if (oct->instr_queue[iq_no]->br == NULL) { - lio_dev_err(oct, "Critical Failure setting up buf ring\n"); - return (1); - } return (0); } diff --git a/sys/dev/liquidio/base/lio_response_manager.c b/sys/dev/liquidio/base/lio_response_manager.c index 12a3ad60521e..ac5fc6229885 100644 --- a/sys/dev/liquidio/base/lio_response_manager.c +++ b/sys/dev/liquidio/base/lio_response_manager.c @@ -59,10 +59,6 @@ lio_setup_response_list(struct octeon_device *oct) ctq = &oct->dma_comp_tq; ctq->tq = taskqueue_create("lio_dma_comp", M_WAITOK, taskqueue_thread_enqueue, &ctq->tq); - if (ctq->tq == NULL) { - lio_dev_err(oct, "failed to create wq thread\n"); - return (-ENOMEM); - } TIMEOUT_TASK_INIT(ctq->tq, &ctq->work, 0, lio_poll_req_completion, (void *)ctq); diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index 54878bc6a12c..9b990282d7f5 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -1863,10 +1863,6 @@ lio_setup_rx_oom_poll_fn(struct ifnet *ifp) rx_status_tq->tq = taskqueue_create("lio_rx_oom_status", M_WAITOK, taskqueue_thread_enqueue, &rx_status_tq->tq); - if (rx_status_tq->tq == NULL) { - lio_dev_err(oct, "unable to create lio rx oom status tq\n"); - return (-1); - } TIMEOUT_TASK_INIT(rx_status_tq->tq, &rx_status_tq->work, 0, lio_poll_check_rx_oom_status, (void *)rx_status_tq); diff --git a/sys/dev/liquidio/lio_sysctl.c b/sys/dev/liquidio/lio_sysctl.c index e9ad95772164..5228077b8af8 100644 --- a/sys/dev/liquidio/lio_sysctl.c +++ b/sys/dev/liquidio/lio_sysctl.c @@ -744,9 +744,6 @@ lio_get_regs(SYSCTL_HANDLER_ARGS) regbuf = malloc(sizeof(char) * LIO_REGDUMP_LEN_XXXX, M_DEVBUF, M_WAITOK | M_ZERO); - if (regbuf == NULL) - return (error); - switch (oct->chip_id) { case LIO_CN23XX_PF_VID: len += lio_cn23xx_pf_read_csr_reg(regbuf, oct); From nobody Mon Sep 30 05:08:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH8HR16m8z5Xln4; Mon, 30 Sep 2024 05:08: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 4XH8HQ5tVLz4YFm; Mon, 30 Sep 2024 05:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtEFra1kB6R/JxHFtfLczwjt0D/Ji9f6Vo1qgSy0Xug=; b=XoBKkMMAnPdH7EvOpD3pzjEKoy71xZ7svlZDz+X6oKMvf1ABLZDg4x7stC9C/j8Ico+HC1 lzHPpsL6IbpDyQkXKuFrr1swjHP7HZMQ70W2PmM1h2CZBmyaKX5c1bYe4x5dW6MmHNHAMo gNVkt9Ui3uAMnmQpvDQ1fz9vmr197P9iTnGbJ4VE5HpiYdnRSsmk51bk9eSZP2EBMVEg3P G9d/zFtwnJphBxUZLR8a9WFTrgFNftRaOOnsluL6e+g3bH7ai/zdg1NX2KQwap+DETGtye qOpYyhrI/hh61VV6wpHr4ib/KtH9vehkRxDtcwL3yLHApoCIWkB0yqNMKZbckw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtEFra1kB6R/JxHFtfLczwjt0D/Ji9f6Vo1qgSy0Xug=; b=UGdAjqEqsyOlV15/mxbHq2NQTCcJjTyycfJaczpOoKo+L1zmwCdGGjRMmHlYOtGB6HWIRv ekF/fIj4x52RxHjCQzSE8FMvpeWhPDKM2rm9rIltbQ+PZECepYkItcHxyT2iCIbOwTCwni rUFDSHITr8sfNH5TK+vpIvKiqvk+6nr0MLC6Rgr37OCv6Xm4/+MF2Y7CxZbapvQH26try3 +B3vugGNnSrOqdhnvfvulrkjWKT4eIlDjsIGoFQ14JktJTXAeHWnNi7ZAwH1ERNjstdrF2 3zx/fe5/i1xGJ1sMTPcTB5MmLAQD3PVj9kIQqXAUgj+/kFBN7gI9VcYPFM4pwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672930; a=rsa-sha256; cv=none; b=hDhaDA4c5LwnaY23IrbnNdQSLShwyiWFkABuDlYy7elmKr8Lu+F3O/8rqchLdaxuMbKjLW 73xEENr/2nKDdhkyvN3Jfg1QGVeOTyw389p8hiuKikgNAZlBVKLLHUaW9KWWD1oQfzbSdT 3fi5Jj3lhMvFYw5qR22WzY1qbOU6n9mMu37Ow0Ynw0+RI8hnFhfNRo1bNMcrUSPXylbLoa EzNS/jfmr3/4AAY7FzhtO2Md1UJH9BgVcGLtCmsWSsRTWqBQyS1wLZhQgvDfAOmwwoQNsm oBy7IHelEvi9oAcbse2afNpNZLzo4fDyqWWr5Ns2EJGJ9CdLQfk1IW2HShjWvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH8HQ4Q7Pzg8D; Mon, 30 Sep 2024 05:08: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 48U58ou6026211; Mon, 30 Sep 2024 05:08:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58o1n026208; Mon, 30 Sep 2024 05:08:50 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:50 GMT Message-Id: <202409300508.48U58o1n026208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1290de0d5400 - stable/13 - mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1290de0d5400dd21930de0e1e022fc22fffecc1c Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1290de0d5400dd21930de0e1e022fc22fffecc1c commit 1290de0d5400dd21930de0e1e022fc22fffecc1c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:43 +0000 mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 (cherry picked from commit 7ea3fd3bb5f4039c372fd72aeef004fe12454537) (cherry picked from commit 70280bc71d28935346f7cc7c41ddd99e58b9604a) --- sys/dev/mxge/if_mxge.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index 440265762e7a..8e136470cdb1 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -4757,10 +4757,6 @@ mxge_attach(device_t dev) TASK_INIT(&sc->watchdog_task, 1, mxge_watchdog_task, sc); sc->tq = taskqueue_create("mxge_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->tq); - if (sc->tq == NULL) { - err = ENOMEM; - goto abort_with_nothing; - } err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, /* alignment */ @@ -4965,7 +4961,6 @@ abort_with_tq: taskqueue_free(sc->tq); sc->tq = NULL; } -abort_with_nothing: return err; } From nobody Mon Sep 30 12:11:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHKg90zd2z5YCPD; Mon, 30 Sep 2024 12:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHKg90TRVz4Jk5; Mon, 30 Sep 2024 12:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727698293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ1oudjSaN+zvegD2jUJrL8AD17xdT3EGsD9D/uJDUI=; b=KssgrJ8eFqKGfMMzhrlaFI0eui9M9iqj8p/w9+H1a9ufVkDeN4T3bjP4BsFxsTbDMW3ik2 KrZ0x+CWEfPvjr+IQW641ZhXl05v7FlJW53IWb3fOwMNFrpsRUEY3AmRxIm93xjbdCFdMe XyIfvDqFLSa3s8WJItP2xxfPGZvPiLIHt1V5HwCHCc9bwLVMkmlTAuVuH3r5YwaFbTvU5X zwSGl8YzlkV758b40cgBLRB0VP5X3sXLUtrIO+I5kmITYDK+vFTqKHBlU2MCmi0P1eDwou ulzqsklgPu2vAFgTQAWddyzsyAssIjo4bjhXFI/JskCJzVlH+mBDkf0LwzNAUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727698293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ1oudjSaN+zvegD2jUJrL8AD17xdT3EGsD9D/uJDUI=; b=oNCAl+oYeRvkQNLIUiacYDhnFTTbFwGZZOCRaOBSQ+jFbH7CYS8jC326/VETmkLsKGkN7P nlNj0W1pR0P0he5qm9XjVHMaCv/t7Jn0371b1+TzttywzHqCte5qIPE8jfAuFKq4FhRjIs kNJFF8Qc1Q1wBiWrkfmfFl1Fslpn7tuBv0vPQwh11Ex1czJ32TQaaP1NzOY2cRStPQP3sh a8GQ4Oubcckih3FJKseycew1/Nab8/QyqU56PzALAFTlklXNERbMqxz+zHcYasAo1/XeKB HzNpsiqQLhMF3SYIf9HjaxSYvfbC0iyxbJNqH233lNiWykHXSkH4DVgccEnPVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727698293; a=rsa-sha256; cv=none; b=bQYKI6cqyWWrsebdj6IaS3aRmEephWPC8R3YQlxRqFT5EWzsheC8g4C2Qak9ds14238uTR 95XxRGI2jQOKtCNZa4DnfOGAET3MlDkknj+CU2jfLHbFECpjV3zesi8bfFUDYd4BJSfUTz jn4S4RfHX51jWXa3yCbUyAky8KReqRPvlf/OmCAzyYWovr2dlFM9cOG4FQ1NxqN8PqoKoW RIXCXb05wNDKJWJmBQf+crQ4DBO374ArxdVgI4tkK0DiCfgWcYqqeSspA4bUWromorwLvS p/D0U4pScTf08qMi+UqdAU8rymDxOdp/SqDBX2h9DAUMv5Wm+iRQ9zToGNWE/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHKg872t5zsVB; Mon, 30 Sep 2024 12:11: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 48UCBW2L053349; Mon, 30 Sep 2024 12:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48UCBWwY053346; Mon, 30 Sep 2024 12:11:32 GMT (envelope-from git) Date: Mon, 30 Sep 2024 12:11:32 GMT Message-Id: <202409301211.48UCBWwY053346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a03acfa43410 - stable/14 - bhyve: initialize register value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a03acfa43410b3a449fa8d5b1dbba20e0bf02d5a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a03acfa43410b3a449fa8d5b1dbba20e0bf02d5a commit a03acfa43410b3a449fa8d5b1dbba20e0bf02d5a Author: Pierre Pronchery AuthorDate: 2024-07-24 19:33:26 +0000 Commit: Ed Maste CommitDate: 2024-09-30 12:11:15 +0000 bhyve: initialize register value In case of an error in a code pattern like ``` uint64_t val; error = memread(vcpu, gpa, &val, 1, arg); error = vie_update_register(vcpu, reg, val, size); ``` uninitialized stack data would be used. Reported by: Synacktiv Reviewed by: markj Security: HYP-21 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46107 (cherry picked from commit 94693ec7c85363f9b0098247489cea3efdb183f9) --- sys/amd64/vmm/vmm_ioport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c index ec270df80c3e..3caea7deac16 100644 --- a/sys/amd64/vmm/vmm_ioport.c +++ b/sys/amd64/vmm/vmm_ioport.c @@ -101,7 +101,7 @@ static int emulate_inout_port(struct vcpu *vcpu, struct vm_exit *vmexit, bool *retu) { ioport_handler_func_t handler; - uint32_t mask, val; + uint32_t mask, val = 0; int error; /* From nobody Mon Sep 30 12:11:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHKgZ6wgWz5YBw4; Mon, 30 Sep 2024 12:11: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 4XHKgZ6Qxpz4JtS; Mon, 30 Sep 2024 12:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727698314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fy2bxPcK4J2XhQ/qLBTF6TjT3DUwBMhHNjWYNzfW6wA=; b=PCXKkPzSLq9/890IEVvKDN08xov6uIZ+8vK0YXEyiaLovUZQN2n5E3b9XXxMliRSKAkRbs lYqGwqfTVNa/OEUSzCffZqsQvzud77ouPHJ9IhShhGWtJH6TeYJCwJxCJKeQr5UkWsv6Gn A4yi8yvDz9n0E1R5aCYAx/eoJ4qrfzBp7mRitW/KBF/W3lLqo9NfRifgS3FKk7EBDz8MpY dGYX43lL9ysOC/suMNZTwhaj+zMHd9QK7/+CQp4LmMe1hgS9AYJPQTLPhI4T/bz5sjKQhN QOECkBDX6vnpsxS3HmgrGBlWsHMYZXIOVs/1zNiY3ew8G33XZbpssLzKQZXGbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727698314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fy2bxPcK4J2XhQ/qLBTF6TjT3DUwBMhHNjWYNzfW6wA=; b=CzChTzXGNcXWhLeWhiyyNWtnNZF4zRMSXy1gJVnSGQ7kj4Qo1HbSbJedicLmpkezp52v3s L0Dtf6XmGJ2x/DDCg63UBows94F4jDjM+F+IMmc59PEEDP2DWUpyKW6cVEl5NpSeeNQClZ ODfwViyDqXsD+nKgW6OxkAk84LhMO7RjOca7V5ZKobhQ94CZHbgh0mTUYOU7hA3tqiTdW2 0hE8JUL3bigaYJzNvUNq+vua+Cu8o/4UfvclHR1iFZ4CMFdS6mI/E5NdgQFJ787IzG/eDI XD+bq+ijjO36Ukv0NpKN4249oGGP8hSGw6vQuJ+n0fgIg26hBEktAicXuAW8+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727698314; a=rsa-sha256; cv=none; b=h1ucL67YfZ0xm6N9jgv7ty1NGDCa2G9vnnfV7wsLdZUEgxgoHZ6VdnZdoPnfoX2XyrGHOf 66W8HAuOZuhJeMN+HTL3k9ca4hR+JTG3WYHrjdpCY5G1d3HENXPu1EyusWiWTcOKaYa0Bg jRkrKRzwVJ0qeqxbJCuLTQJSJVA3bOf1lXgN4fMml9yepTyWuJrVZRFJTg8F5dw5r3jFdU WzzVGitMaVDf+xmrotvizUKGQ9fztLk9Gob5+shp4vsszgiZmoS7NDhAi2Dvtu3HwJvNBN uMTbQWnF8IbZMyxfYvvW69e/jzL9g0zNvl88++MBniJw1Hbhjb8ZcNEcOxfBAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHKgZ5rxhzssw; Mon, 30 Sep 2024 12:11: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 48UCBsJF053536; Mon, 30 Sep 2024 12:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48UCBslq053533; Mon, 30 Sep 2024 12:11:54 GMT (envelope-from git) Date: Mon, 30 Sep 2024 12:11:54 GMT Message-Id: <202409301211.48UCBslq053533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 32e077f273d9 - stable/13 - bhyve: initialize register value List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 32e077f273d90c377faaddc5333758940cc52cef Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32e077f273d90c377faaddc5333758940cc52cef commit 32e077f273d90c377faaddc5333758940cc52cef Author: Pierre Pronchery AuthorDate: 2024-07-24 19:33:26 +0000 Commit: Ed Maste CommitDate: 2024-09-30 12:11:47 +0000 bhyve: initialize register value In case of an error in a code pattern like ``` uint64_t val; error = memread(vcpu, gpa, &val, 1, arg); error = vie_update_register(vcpu, reg, val, size); ``` uninitialized stack data would be used. Reported by: Synacktiv Reviewed by: markj Security: HYP-21 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46107 (cherry picked from commit 94693ec7c85363f9b0098247489cea3efdb183f9) (cherry picked from commit a03acfa43410b3a449fa8d5b1dbba20e0bf02d5a) --- sys/amd64/vmm/vmm_ioport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c index ec270df80c3e..3caea7deac16 100644 --- a/sys/amd64/vmm/vmm_ioport.c +++ b/sys/amd64/vmm/vmm_ioport.c @@ -101,7 +101,7 @@ static int emulate_inout_port(struct vcpu *vcpu, struct vm_exit *vmexit, bool *retu) { ioport_handler_func_t handler; - uint32_t mask, val; + uint32_t mask, val = 0; int error; /* From nobody Mon Sep 30 13:20:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHMC42pY8z5YGjd; Mon, 30 Sep 2024 13:20:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHMC42PMSz4VJt; Mon, 30 Sep 2024 13:20:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727702448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8q5n4RYHEY4CZHLgoO2NbzvBgi0aQoIAy+7kbFwbhdQ=; b=K8Osid9hUGikllKySD6Ez9HjhT3MN9cOf+el0Cwmb2nrEIhiFD5gAzgRQ90woI/4yhY8EJ jEYhGSSib20MBYARiV5axYj5JNvEn6AHo2VSxsBfsdAO8N44Iy1Obptqx0rm5iPHLLz1bV eAfsQsI2zyRs12zJOL5ndswF91pKQBnm4PQVo+sRQQ6VfntRAPr3wfDKqXmwbG8LoFp/tJ iRFUctYwpHlCd5eSaUrVYvTqmP6rqhPqGUifFl2b+TjxGjUngI6cUW288HhbfAJIAyJdxJ YFM/NCNRqP7/ma2D2dT8K6SR6K+0rkSKsc3fg9y0GqKrtN94Vz+wBiJrBw2nIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727702448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8q5n4RYHEY4CZHLgoO2NbzvBgi0aQoIAy+7kbFwbhdQ=; b=Idv8eStpXwJP5j9WlkAHReVxj9OrLchiQMDKbWW6zfRKCcbUejZYDF7cROPE7biCUrSekD sMGUb5Jwz5zu7CuJUAIs2PfC4UucTwtNjrGjSsxSfuIA4vURr3W6W45JQQgD6BiE3pLrOA nqMAUPDv5KH+g7tAP5eWd8tAc92wJ8sxX8psv65C/faaQfPg9MvETcjJEbt6YXO22QdjlF ofhn156ITGkRSPUtZd9ZVuMaV4dSzxmTBoJJv0VLTLhEIIlRGG9K7IAwOYsN0Z9NRvF3fC rlHE8I+u2GtYg2mmYavjGB2dROChJcegqv+tTeZCjfXsNtUb/3MU3EntIgkOlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727702448; a=rsa-sha256; cv=none; b=faSK2YFbi5ZVV2+g7pJdUZ+a5yAAP550nbBVtKgTT/PSf0lFpcrgAEaHCl9/daLIY5XnEn ARTHuGFWVfr1jR2ZD5JQiln3+P/ViP2TXG2ZpBxdPDwzAWO1fkD/qhKa41yJjiJGolK82n UiWgHe6JlRmSUhXPqmaOfXQeHOyi/pBoLAW9qjnw7bGXMgkMyie90ngIyJlMyYnq3TXnAu FMTtsfoQW38tDEu0RHJZ9w8c3mzXTGJkpXWPG3pGWTAUaOBk3zl1Lta2mgSeuUTC5ajOdx KcGYxNjIaKX97YrVMhu+lVnH7s/rn6ycJITUqno7MB3FPLvJXlW1LgZByWZ7wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHMC421gzztpt; Mon, 30 Sep 2024 13:20: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 48UDKmuP067501; Mon, 30 Sep 2024 13:20:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48UDKmMY067498; Mon, 30 Sep 2024 13:20:48 GMT (envelope-from git) Date: Mon, 30 Sep 2024 13:20:48 GMT Message-Id: <202409301320.48UDKmMY067498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 335a234d72be - stable/13 - LinuxKPI: 802.11: support manual lladdr changes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 335a234d72be2a042e60ddd93a2644ffdc27e515 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=335a234d72be2a042e60ddd93a2644ffdc27e515 commit 335a234d72be2a042e60ddd93a2644ffdc27e515 Author: Bjoern A. Zeeb AuthorDate: 2024-07-25 07:53:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-30 12:19:05 +0000 LinuxKPI: 802.11: support manual lladdr changes Allow a user to change the "ether" address by ifconfig while a VAP is not UP. Compared to net80211 (given we have no callback) we register an eventhandler per-vif (a global one would force us to use hacks to derive if a vap is indeed also a lkpi_80211 vif). Sponsored by: The FreeBSD Foundation PR: 277356 Tested by: lwhsu Differential Revision: https://reviews.freebsd.org/D46121 (cherry picked from commit 4aff4048f5b1b6ab0b905726853ba6083e37cc37) --- sys/compat/linuxkpi/common/src/linux_80211.c | 30 ++++++++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 1 + 2 files changed, 31 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 288ae00b6949..ef742125dbac 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2751,6 +2751,32 @@ lkpi_ic_wme_update(struct ieee80211com *ic) return (0); /* unused */ } +/* + * Change link-layer address on the vif (if the vap is not started/"UP"). + * This can happen if a user changes 'ether' using ifconfig. + * The code is based on net80211/ieee80211_freebsd.c::wlan_iflladdr() but + * we do use a per-[l]vif event handler to be sure we exist as we + * cannot assume that from every vap derives a vif and we have a hard + * time checking based on net80211 information. + */ +static void +lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) +{ + struct epoch_tracker et; + struct ieee80211_vif *vif; + + NET_EPOCH_ENTER(et); + /* NB: identify vap's by if_init; left as an extra check. */ + if (ifp->if_init != ieee80211_init || (ifp->if_flags & IFF_UP) != 0) { + NET_EPOCH_EXIT(et); + return; + } + + vif = arg; + IEEE80211_ADDR_COPY(vif->bss_conf.addr, IF_LLADDR(ifp)); + NET_EPOCH_EXIT(et); +} + static struct ieee80211vap * lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, int flags, @@ -2799,6 +2825,8 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->bss_conf.vif = vif; /* vap->iv_myaddr is not set until net80211::vap_setup or vap_attach. */ IEEE80211_ADDR_COPY(vif->bss_conf.addr, mac); + lvif->lvif_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, + lkpi_vif_iflladdr, vif, EVENTHANDLER_PRI_ANY); vif->bss_conf.link_id = 0; /* Non-MLO operation. */ vif->bss_conf.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */ @@ -2972,6 +3000,8 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) lhw = ic->ic_softc; hw = LHW_TO_HW(lhw); + EVENTHANDLER_DEREGISTER(iflladdr_event, lvif->lvif_ifllevent); + LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index a48cf719c693..516bc78a8c13 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -159,6 +159,7 @@ struct lkpi_sta { struct lkpi_vif { TAILQ_ENTRY(lkpi_vif) lvif_entry; struct ieee80211vap iv_vap; + eventhandler_tag lvif_ifllevent; struct mtx mtx; struct wireless_dev wdev; From nobody Tue Oct 1 01:18:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHg7f4Bcbz5Xy6X; Tue, 01 Oct 2024 01:18: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 4XHg7f2lm9z4sS3; Tue, 1 Oct 2024 01:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zq5u0m8ZFAVjz36Ej6UzUveS9mLaGWg9G+842UgSsFo=; b=teRpNZUtonMlj/Z8QovPeHcRLXd2Pg6Vu5iBH+notqLugCu3xIELroT1xyQ2rVoWH8TmMk h21itcStrPff9Duig3pUuCGhLDN/sc2ea6yLKcWd/6yXqA2yGbIoIJYbo9RS61iAgyVYDY zIP5aPeBXtbRJzTl98lAdnZFXk48RddsXyC1cRIHZIMT8dwjsOeN3iHA1OD8mvuxSb5IPl D/BXJJWnPEVIFWcbgfRcDt0wJSc6q6/cDb7sM1uqzf64MYWwpoAjMb0ygOz1wBiSj9CJPj HbYGkg2c+rWqkL3N4Ah90N+TsxFICIrC6pCf3EP63LR/Q0P2D6k4boo7iWrcNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zq5u0m8ZFAVjz36Ej6UzUveS9mLaGWg9G+842UgSsFo=; b=RRjUYp2gNfPjSiHF3rq6K842N4amHnUwvdz+VdR7g4qKWbz6NnjNbIjREywrjI5VGV1RB1 N5kqDOy5RaVqoq6z3SGXxtWh6tfVsBAQZT7Z1mv6S9JsKcCiYRhQ7fo2wRh/J2ztBaOhPT t36lNZL7uBDCSuyiW0ubyURkO/A3csZ1CHMFG9adNyKEnJdd++A9beTf9mbEUeL7O7FK/p sni1dKmXEYGlhHZL3uysV6lD15kT+8zYTtdDESs71OIDeOi4tvqQPPBD4BJw1aLq69cvFz XKcFgf/uBRUSSOua2a9hwaX3qslE+Rymbay0kLWREuXmgMgIDzPyggxbEIc8og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727745534; a=rsa-sha256; cv=none; b=E8Fi0oo1Ndwhg8S+4of53b0GyyScLD+AAYWZGnMZp30tDOOzjojH1bu5ItzbZUlraqCcRk 75hMx87h12U6q3r4VXEg2Ew59Ls/6jATs8P+d1dPgW/IwJ05MXaQLav7asZDXUPWlafpnX aGwCTgpln5lDLxtac/xgPpo7DALAomIk33Hy8LsMqTuxPJBSTl3ZUcIRp8gGXy62fzcGyZ 2UNousGWJH3QnNOIOb+zOUoyUwAvNZL+FmmoAWHaEMDiV3XK0f19MI3kW+hsOJ5Kp/26++ l0HSoCZRmZBh8hs8tvQOHGQi/0EaXSc4js6LVvLQmad7XFFvn1r536yBedaZJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHg7f2N9jzHJ1; Tue, 1 Oct 2024 01:18: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 4911Isbb016540; Tue, 1 Oct 2024 01:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4911IsF1016537; Tue, 1 Oct 2024 01:18:54 GMT (envelope-from git) Date: Tue, 1 Oct 2024 01:18:54 GMT Message-Id: <202410010118.4911IsF1016537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: dd7a4da0e967 - stable/13 - msun: update Clang bug reference in fma test List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dd7a4da0e9677069e037a7f0125f0fab5886cd45 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dd7a4da0e9677069e037a7f0125f0fab5886cd45 commit dd7a4da0e9677069e037a7f0125f0fab5886cd45 Author: Ed Maste AuthorDate: 2024-06-12 00:23:44 +0000 Commit: Ed Maste CommitDate: 2024-10-01 01:18:15 +0000 msun: update Clang bug reference in fma test LLVM bugzilla bug 8100 became issue #8472 with the migration to GitHub. https://github.com/llvm/llvm-project/issues/8472 (cherry picked from commit 92927b8bcf51dcbcf99d633c1b3cab3cab2373ac) (cherry picked from commit 6cd4450c6c9a83a0fd9430df7ec02c4c3203ad25) --- lib/msun/src/s_fma.c | 4 ++-- lib/msun/src/s_fmal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 0788bb2d47e8..a3dff85a430a 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -245,7 +245,7 @@ fma(double x, double y, double z) zs = copysign(DBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vxs = xs; /* @@ -277,7 +277,7 @@ fma(double x, double y, double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexp(r.hi + adj, spread)); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 0d5e2c0bc98f..20ff2886565b 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -226,7 +226,7 @@ fmal(long double x, long double y, long double z) zs = copysignl(LDBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vxs = xs; /* @@ -258,7 +258,7 @@ fmal(long double x, long double y, long double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexpl(r.hi + adj, spread)); From nobody Tue Oct 1 01:18:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHg7g6JgVz5XxpH; Tue, 01 Oct 2024 01:18: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 4XHg7g4wnsz4sV6; Tue, 1 Oct 2024 01:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MS9jUI1bNHtfUkhUZ3ARf3KWGUH7so8yn3WBuykhjrI=; b=U8WGSWV3atVosSe9mQauJXlMDEZ6oILo49q4hRosqaPBrDjd9vutcghamAiCBIiBF+OFS9 UOwJr3ggUfr9XlNeVJ5Pk2Ih/BV9ut5+I41DY48j+9PMH1DzFoU0fWRE4uxGpkMGc5+qWW d4f8h4TvCxvaCqig6B/i3rqznLZ0kpSYHvjvmbxiaKGtFiGtRbS217qlFH5iE9dCVF9emQ DXMFZoXYnjOGknk/5pkzCN9rEOFQeHank+L0pSSC1DEeJeC0KzaoXDqamjzbbhOVdTCU1j 7ObIjz14W0MNjkll4kriYlgeIuquUH7cuxv1zS0LQEZehJXSWAFVSR7VkTTRKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MS9jUI1bNHtfUkhUZ3ARf3KWGUH7so8yn3WBuykhjrI=; b=SqUyELe7dQ9uCujYAWyd5HR19ZsdMrV/pbLgXU2hiITxyVtUAroYTF9Rj27KDBDKhiWKA2 5tkzq9oVY2JlqWwAzJ0zlJUMjH9ZBl1WonIQtZUL2gSftfqovYNNgZWBThemU3Ljqrulw3 g/e9zyrFWpKFGQqw8AhDDYiEwxDIRk0ZdLBKsRXwnU/242xr75JxGWR2QFyvX0vkYJFjzq rWcLgCLq6ZNNyr7OKF4nd5l0SuRrL78pW/6e8dfIhJCOFX5QVoGKz0WUZ88M3JOD05qqH3 1+WQSa/youZEG8kShFFrsJQM6pG80i8OZ4T5PqukZGeUsI8RjLg+UFF2/Gn8bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727745535; a=rsa-sha256; cv=none; b=Ar3WR6xA9aO4/Qtbu1D4/fpvfmaI0s2cCKxaeboKj1A3GEdy98A9Hqz2HkNNfPn7r0kzOT /vVlsR/fkQDTAAz7rfQvgnBwO6DHYyhdLr8s8ZjzXLC1VDuxsC7kWQHLPDdWN8zNVfXjXf YTDDQsBJQpsYzXJwIf6rxzDofZZU7HCJWVfqPApCcXKnZX9G90euQVDVwb6HmB/mEXXXfX I+dsAjPI/ZfT48P/kDooZZzkgmDzRCQqlLEZVPbCVnbxs5E8UpU1fnQ24+UQKJYwXpfLvu JWpixIJPK+JQLDsbIUXVUTgWjfsMyg2MRPcdcZC/UnUKghWroRAmGkOhsYw6dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHg7g3Np0zGyN; Tue, 1 Oct 2024 01:18: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 4911ItCf016594; Tue, 1 Oct 2024 01:18:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4911ItK0016591; Tue, 1 Oct 2024 01:18:55 GMT (envelope-from git) Date: Tue, 1 Oct 2024 01:18:55 GMT Message-Id: <202410010118.4911ItK0016591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 047870a3b1af - stable/13 - libm: add parens to clarify expressions in fma, fmal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 047870a3b1afca73ecc777376e658c68b23ef975 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=047870a3b1afca73ecc777376e658c68b23ef975 commit 047870a3b1afca73ecc777376e658c68b23ef975 Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-10-01 01:18:15 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD (cherry picked from commit 001606523a48ca2aa440c985db47327a00671358) (cherry picked from commit d1d8c9114751ee481aa6ff980caa2640f8d6848d) --- lib/msun/src/s_fma.c | 6 +++--- lib/msun/src/s_fmal.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index a3dff85a430a..017067c6c92a 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -223,17 +223,17 @@ fma(double x, double y, double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafter(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafter(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafter(z, INFINITY)); else return (z); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 20ff2886565b..acaaaaf3678d 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -204,17 +204,17 @@ fmal(long double x, long double y, long double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafterl(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafterl(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafterl(z, INFINITY)); else return (z); From nobody Tue Oct 1 01:19:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHg8f5VN1z5XyDg; Tue, 01 Oct 2024 01:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHg8f4j23z4tT9; Tue, 1 Oct 2024 01:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+X32XH6VuoP/m+i4G5sTyEy7atc1IdVs8QvJDCvSrBw=; b=UiRl6QlJYjIbDN8LJ5Uh8bfDmV1JOhni8aAhlkPNusjcMFev2N1Q81HCvMwFZyhl5jjnaB gnZ2hE9Klt9V2usUaKCCa/vW+O848rLiRiZgWQvXs5+IejvVaaUbMybLPlFfVYaWrG8ZvH oxpaARZo66iKSjh3dLHyLaP1t+DRn7HlYQSLAU3kxsYQxNP1g6Q66MosMP0nIQfDcj+G+7 /HjV0uhnVsKcWkOhbGOP7PYUa+5+QnZySSv1KKhoMZTyQlIM6N+G9MKN2ejekxYYjUciUV 39R8EMWzcmz45PRqKtKdSq7+6z6gb5ONMt/7fDVG8NsBRCEixcaarePgp7pUgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+X32XH6VuoP/m+i4G5sTyEy7atc1IdVs8QvJDCvSrBw=; b=PnRt0gwEqRdl9uXuDpNQOLfvoGnNOMwwwrOufLenlNiLis+yBYv6tiDe6EGi/ttbpSHM59 pOkUcB32t5MtOuUjVYDVo2zUn2A/Ftjb6D/xecF0LKpMoRomOM7fp6MzB6oVX7VIuQ9Qkl 3wEInqWb5a2EGAKjbJVoZgXe+ubYMATY1Ow26aBAJV5vzIQ4RUglczjVerSzZHxbx88VGB ZAMWBfYSXHu7XnUQh6R8o1skqygLMztltkwRB3blMsIU5Zw1flVyh4DL3LvA6lD5W4iacd 2iHcS0kTQRe4dQW2gNFDbM3og4FsLLDN2EB/q6qDSDbICOhM/uTGSnP1ONsMtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727745586; a=rsa-sha256; cv=none; b=bN1/l0BFywAZTkNHKAvyJSXAY+6pCZcteRf+JZ0q0Q5tTIO1zKBklmMIFFDr3kDhdfsjkR p3xKOLT871u9HQnArMJ8cJwx2jlnKvfMb0cYgJ6g6TUFdjUTQNzpjsFxbwZxcl0dtJs4zl X2n/xrIiV/bQlonUpFju8LSIo26sWmS7LDZCcEmTHgWPHzMmIBcvghaZ/yTy/EFu/XjG/J 0tv+VnvFvVGJFC0JfCes9LXpU9GkQljPrwFWH6YLdFFk5NZWUDDLQu5Pd0LRBdyJk65jBi A5Lqyj0VVVhJuCjM3LD7bH6W3tLoOT9MjCykPn8BWoPgZ47bxoS/sRsS8cSKCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHg8f49vzzHGq; Tue, 1 Oct 2024 01:19:46 +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 4911JkKB016802; Tue, 1 Oct 2024 01:19:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4911Jk59016799; Tue, 1 Oct 2024 01:19:46 GMT (envelope-from git) Date: Tue, 1 Oct 2024 01:19:46 GMT Message-Id: <202410010119.4911Jk59016799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3d77026d8a48 - stable/13 - libm: fma: correct zero sign with small inputs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3d77026d8a48a8d056a145b56f288f838c159afc Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3d77026d8a48a8d056a145b56f288f838c159afc commit 3d77026d8a48a8d056a145b56f288f838c159afc Author: Steve Kargl AuthorDate: 2024-06-16 23:41:38 +0000 Commit: Ed Maste CommitDate: 2024-10-01 01:19:13 +0000 libm: fma: correct zero sign with small inputs This is a fixed version of 888796ade284. PR: 277783 Reported by: Victor Stinner Reviewed by: emaste MFC after: 1 week (cherry picked from commit 888796ade2842486d3167067e8034254c38aadd3) (cherry picked from commit e77ad954bb825983b4346b9cc646c9c910b1be24) (cherry picked from commit 34f746cc7f8a8dd261027a8b392b76e70adc8438) (cherry picked from commit dc39004bc670fe33ae6759816380c93a37268dd6) --- lib/msun/src/s_fma.c | 4 ++-- lib/msun/src/s_fmal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 017067c6c92a..fb12c0369fec 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -261,14 +261,14 @@ fma(double x, double y, double z) spread = ex + ey; - if (r.hi == 0.0) { + if (r.hi == 0.0 && xy.lo == 0) { /* * When the addends cancel to 0, ensure that the result has * the correct sign. */ fesetround(oround); volatile double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexp(xy.lo, spread)); + return (xy.hi + vzs); } if (oround != FE_TONEAREST) { diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index acaaaaf3678d..f7aa42287d7a 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -242,14 +242,14 @@ fmal(long double x, long double y, long double z) spread = ex + ey; - if (r.hi == 0.0) { + if (r.hi == 0.0 && xy.lo == 0) { /* * When the addends cancel to 0, ensure that the result has * the correct sign. */ fesetround(oround); volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexpl(xy.lo, spread)); + return (xy.hi + vzs); } if (oround != FE_TONEAREST) { From nobody Tue Oct 1 04:29:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlMf0BHmz5YBMS; Tue, 01 Oct 2024 04:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHlMd71ntz4M5Y; Tue, 1 Oct 2024 04:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FsNhEtkE35S0hBjx3u87AkHlMq8Y5Ip2rHz1UqdSmM=; b=Rvc2JcODbFmpcqBJSY7lNF0hU0Ws9Hhv7619+vj6LtO/73hz3Qeo1V0S39ZoGlOUhFdcVd lO/e2pHcoKnmKYpNNToZjWyaHKiaoZaipAS/Ny3JWc/O8oZ9Vy4tS1nCbcyPRHKjdm1SdG j5teqPfztqU/lvwT6wVnyTtjMS9C1t64iz5JwZ9MXtoPcuP3wD5UuQB4GYluxenoUgY7nx kPkhsVpCkuEsJe2apZ2jvbA2hRAoZAR7fUYiyuPUbgSY4uev62zSri60YbdapTuVDJcJcO 2+J+jbq6Ayi6N6eXfDhdsqWsS1QgX68OW+B2jmpo3/y/n6nvEXJzV5ZReh8DaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FsNhEtkE35S0hBjx3u87AkHlMq8Y5Ip2rHz1UqdSmM=; b=vZXytXnRRbsc9GGvP8sSSrifW4zl1Xm4wyY3EIJkTFw+qDCDJv5wtUxGSeEvGdMEGbuVB/ dTJnoo37ZWEpkXXvAM1mk4pLaNEqn8vWcpuBx2ji0+qs01IEN6fjtmhIGPxqVIerioQ52x ruzq5oJ7rScBN/l+UxKukgTjPLd8i0CbwZwFx7kwwe1oEvqlCsk4uMuuIXEuRAf0np+GTY ViqnPSloSmUyQKvQ/6SWltU5LoMTRLOGMpfEq046h55n0mQDFoq/yUpaNEbdUqgtLIIKSD WtodYz/ni5BSdb3gDprAJOuKPUF+lFhNXITuSseq0x6/JDKI/7fGrULg64Yhmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727756973; a=rsa-sha256; cv=none; b=cV8FlPEHTZWhhTRGn9q0OQqKuIxlbCPNLr7NGzU9UYsEwapEGcCj/C0NyBHsEjETqWSBOD DcpuPSyXOLCYgov3BkPrAnuaI4adKDa93Y4rE/GYTNBMacYPNU9X0y8O9uWiGijQOtP+2K 6Iv+OOGSkxelyLnLUeiI262pxzqaFbKaoOGiO9BzqzNxRUwevpHV0JUZtYHSSpYXFajm9J J/GmprxVV4yt4NRXz9IZ6y96wLnBmDIwd16mLT/Db8EmVVe+09g4GMl2xBmb1QSbmcSpcD 39UNeGVK4rLOfMDgRK1qKS5YyLSwJSNqzy5GNPefhxe3RrfujN+ljft1tfPZMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlMd6dH7zNMv; Tue, 1 Oct 2024 04:29: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 4914TXcC039221; Tue, 1 Oct 2024 04:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914TWZd039214; Tue, 1 Oct 2024 04:29:32 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:29:32 GMT Message-Id: <202410010429.4914TWZd039214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: aff29dd3641d - stable/14 - wpa: Import 2.11 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aff29dd3641d2ab3c67b82772f4b76ba3171e757 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=aff29dd3641d2ab3c67b82772f4b76ba3171e757 commit aff29dd3641d2ab3c67b82772f4b76ba3171e757 Author: Cy Schubert AuthorDate: 2024-07-21 18:59:44 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:28:54 +0000 wpa: Import 2.11 Following is a changelog of new features and fixes to wpa: hostapd: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * HE/IEEE 802.11ax/Wi-Fi 6 - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * SAE: add support for fetching the password from a RADIUS server * support OpenSSL 3.0 API changes * support background radar detection and CAC with some additional drivers * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) * EAP-SIM/AKA: support IMSI privacy * improve 4-way handshake operations - use Secure=1 in message 3 during PTK rekeying * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases to avoid interoperability issues * support new SAE AKM suites with variable length keys * support new AKM for 802.1X/EAP with SHA384 * extend PASN support for secure ranging * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) - this is based on additional details being added in the IEEE 802.11 standard - the new implementation is not backwards compatible * improved ACS to cover additional channel types/bandwidths * extended Multiple BSSID support * fix beacon protection with FT protocol (incorrect BIGTK was provided) * support unsynchronized service discovery (USD) * add preliminary support for RADIUS/TLS * add support for explicit SSID protection in 4-way handshake (a mitigation for CVE-2023-52424; disabled by default for now, can be enabled with ssid_protection=1) * fix SAE H2E rejected groups validation to avoid downgrade attacks * use stricter validation for some RADIUS messages * a large number of other fixes, cleanup, and extensions wpa_supplicant: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * MACsec - add support for GCM-AES-256 cipher suite - remove incorrect EAP Session-Id length constraint - add hardware offload support for additional drivers * HE/IEEE 802.11ax/Wi-Fi 6 - support BSS color updates - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * support OpenSSL 3.0 API changes * improve EAP-TLS support for TLSv1.3 * EAP-SIM/AKA: support IMSI privacy * improve mitigation against DoS attacks when PMF is used * improve 4-way handshake operations - discard unencrypted EAPOL frames in additional cases - use Secure=1 in message 2 during PTK rekeying * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases to avoid interoperability issues * support new SAE AKM suites with variable length keys * support new AKM for 802.1X/EAP with SHA384 * improve cross-AKM roaming with driver-based SME/BSS selection * PASN - extend support for secure ranging - allow PASN implementation to be used with external programs for Wi-Fi Aware * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) - this is based on additional details being added in the IEEE 802.11 standard - the new implementation is not backwards compatible, but PMKSA caching with FT-EAP was, and still is, disabled by default * support a pregenerated MAC (mac_addr=3) as an alternative mechanism for using per-network random MAC addresses * EAP-PEAP: require Phase 2 authentication by default (phase2_auth=1) to improve security for still unfortunately common invalid configurations that do not set ca_cert * extend SCS support for QoS Characteristics * extend MSCS support * support unsynchronized service discovery (USD) * add support for explicit SSID protection in 4-way handshake (a mitigation for CVE-2023-52424; disabled by default for now, can be enabled with ssid_protection=1) - in addition, verify SSID after key setup when beacon protection is used * fix SAE H2E rejected groups validation to avoid downgrade attacks * a large number of other fixes, cleanup, and extensions Merge commit '6377230b3cf4f238dcd0dc2d76ff25943d3040e5' (cherry picked from commit a90b9d0159070121c221b966469c3e36d912bf82) --- contrib/wpa/CONTRIBUTIONS | 2 +- contrib/wpa/README | 2 +- contrib/wpa/hostapd/Android.mk | 28 +- contrib/wpa/hostapd/ChangeLog | 37 + contrib/wpa/hostapd/Makefile | 30 +- contrib/wpa/hostapd/README | 2 +- contrib/wpa/hostapd/android.config | 6 + contrib/wpa/hostapd/config_file.c | 481 +- contrib/wpa/hostapd/config_file.h | 7 +- contrib/wpa/hostapd/ctrl_iface.c | 1460 +++-- contrib/wpa/hostapd/defconfig | 21 +- contrib/wpa/hostapd/hostapd.conf | 356 +- contrib/wpa/hostapd/hostapd.eap_user | 4 +- contrib/wpa/hostapd/hostapd_cli.c | 217 +- contrib/wpa/hostapd/logwatch/hostapd | 65 - contrib/wpa/hostapd/main.c | 142 +- contrib/wpa/hs20/client/Android.mk | 10 + contrib/wpa/hs20/client/est.c | 37 +- contrib/wpa/hs20/client/osu_client.c | 115 +- contrib/wpa/hs20/client/spp_client.c | 1 - contrib/wpa/src/Makefile | 2 +- contrib/wpa/src/ap/acs.c | 568 +- contrib/wpa/src/ap/acs.h | 3 + contrib/wpa/src/ap/airtime_policy.c | 2 +- contrib/wpa/src/ap/ap_config.c | 205 +- contrib/wpa/src/ap/ap_config.h | 226 +- contrib/wpa/src/ap/ap_drv_ops.c | 359 +- contrib/wpa/src/ap/ap_drv_ops.h | 84 +- contrib/wpa/src/ap/ap_list.c | 6 +- contrib/wpa/src/ap/ap_mlme.c | 4 +- contrib/wpa/src/ap/authsrv.c | 94 + contrib/wpa/src/ap/beacon.c | 1212 +++- contrib/wpa/src/ap/beacon.h | 4 + contrib/wpa/src/ap/bss_load.c | 2 +- contrib/wpa/src/ap/comeback_token.c | 139 + contrib/wpa/src/ap/comeback_token.h | 21 + contrib/wpa/src/ap/ctrl_iface_ap.c | 599 +- contrib/wpa/src/ap/ctrl_iface_ap.h | 17 + contrib/wpa/src/ap/dfs.c | 608 +- contrib/wpa/src/ap/dpp_hostapd.c | 1417 ++++- contrib/wpa/src/ap/dpp_hostapd.h | 5 + contrib/wpa/src/ap/drv_callbacks.c | 881 ++- contrib/wpa/src/ap/fils_hlp.c | 10 +- contrib/wpa/src/ap/gas_query_ap.c | 10 +- contrib/wpa/src/ap/gas_serv.c | 11 +- contrib/wpa/src/ap/gas_serv.h | 2 +- contrib/wpa/src/ap/hostapd.c | 1441 ++++- contrib/wpa/src/ap/hostapd.h | 169 +- contrib/wpa/src/ap/hw_features.c | 233 +- contrib/wpa/src/ap/hw_features.h | 12 + contrib/wpa/src/ap/ieee802_11.c | 4030 ++++++++----- contrib/wpa/src/ap/ieee802_11.h | 83 +- contrib/wpa/src/ap/ieee802_11_auth.c | 162 +- contrib/wpa/src/ap/ieee802_11_auth.h | 5 +- contrib/wpa/src/ap/ieee802_11_eht.c | 1405 +++++ contrib/wpa/src/ap/ieee802_11_he.c | 87 +- contrib/wpa/src/ap/ieee802_11_ht.c | 5 +- contrib/wpa/src/ap/ieee802_11_shared.c | 215 +- contrib/wpa/src/ap/ieee802_11_vht.c | 32 +- contrib/wpa/src/ap/ieee802_1x.c | 233 +- contrib/wpa/src/ap/ieee802_1x.h | 2 +- contrib/wpa/src/ap/nan_usd_ap.c | 267 + contrib/wpa/src/ap/nan_usd_ap.h | 46 + contrib/wpa/src/ap/ndisc_snoop.c | 1 + contrib/wpa/src/ap/neighbor_db.c | 74 +- contrib/wpa/src/ap/neighbor_db.h | 1 + contrib/wpa/src/ap/pmksa_cache_auth.c | 32 +- contrib/wpa/src/ap/pmksa_cache_auth.h | 4 + contrib/wpa/src/ap/preauth_auth.c | 4 +- contrib/wpa/src/ap/rrm.c | 121 + contrib/wpa/src/ap/rrm.h | 2 + contrib/wpa/src/ap/sta_info.c | 469 +- contrib/wpa/src/ap/sta_info.h | 96 +- contrib/wpa/src/ap/utils.c | 14 +- contrib/wpa/src/ap/wmm.c | 7 - contrib/wpa/src/ap/wnm_ap.c | 216 +- contrib/wpa/src/ap/wpa_auth.c | 2459 ++++++-- contrib/wpa/src/ap/wpa_auth.h | 103 +- contrib/wpa/src/ap/wpa_auth_ft.c | 615 +- contrib/wpa/src/ap/wpa_auth_glue.c | 269 +- contrib/wpa/src/ap/wpa_auth_i.h | 47 +- contrib/wpa/src/ap/wpa_auth_ie.c | 95 +- contrib/wpa/src/ap/wpa_auth_kay.c | 45 +- contrib/wpa/src/ap/wps_hostapd.c | 5 +- contrib/wpa/src/ap/x_snoop.c | 5 + contrib/wpa/src/build.rules | 2 +- contrib/wpa/src/common/brcm_vendor.h | 8 +- contrib/wpa/src/common/common_module_tests.c | 2 +- contrib/wpa/src/common/defs.h | 67 +- contrib/wpa/src/common/dpp.c | 883 ++- contrib/wpa/src/common/dpp.h | 132 +- contrib/wpa/src/common/dpp_crypto.c | 239 +- contrib/wpa/src/common/dpp_i.h | 19 +- contrib/wpa/src/common/dpp_pkex.c | 59 +- contrib/wpa/src/common/dpp_reconfig.c | 18 +- contrib/wpa/src/common/dpp_tcp.c | 916 ++- contrib/wpa/src/common/dragonfly.c | 9 +- contrib/wpa/src/common/gas_server.c | 79 +- contrib/wpa/src/common/gas_server.h | 5 +- contrib/wpa/src/common/hw_features_common.c | 303 +- contrib/wpa/src/common/hw_features_common.h | 12 +- contrib/wpa/src/common/ieee802_11_common.c | 1090 +++- contrib/wpa/src/common/ieee802_11_common.h | 89 +- contrib/wpa/src/common/ieee802_11_defs.h | 722 ++- contrib/wpa/src/common/nan.h | 98 + contrib/wpa/src/common/nan_de.c | 1395 +++++ contrib/wpa/src/common/nan_de.h | 145 + contrib/wpa/src/common/ocv.c | 5 +- contrib/wpa/src/common/ptksa_cache.c | 74 +- contrib/wpa/src/common/ptksa_cache.h | 47 +- contrib/wpa/src/common/qca-vendor.h | 6323 +++++++++++++++++++- contrib/wpa/src/common/sae.c | 139 +- contrib/wpa/src/common/sae.h | 14 +- contrib/wpa/src/common/version.h | 2 +- contrib/wpa/src/common/wpa_common.c | 995 ++- contrib/wpa/src/common/wpa_common.h | 134 +- contrib/wpa/src/common/wpa_ctrl.c | 16 +- contrib/wpa/src/common/wpa_ctrl.h | 36 + contrib/wpa/src/crypto/crypto.h | 117 +- contrib/wpa/src/crypto/crypto_gnutls.c | 5 + contrib/wpa/src/crypto/crypto_internal.c | 5 + contrib/wpa/src/crypto/crypto_libtomcrypt.c | 5 + contrib/wpa/src/crypto/crypto_linux.c | 5 + contrib/wpa/src/crypto/crypto_module_tests.c | 281 + contrib/wpa/src/crypto/crypto_nettle.c | 5 + contrib/wpa/src/crypto/crypto_none.c | 5 + contrib/wpa/src/crypto/crypto_openssl.c | 2622 +++++++- contrib/wpa/src/crypto/crypto_wolfssl.c | 2043 ++++++- contrib/wpa/src/crypto/fips_prf_internal.c | 11 +- contrib/wpa/src/crypto/fips_prf_openssl.c | 15 + contrib/wpa/src/crypto/sha1-pbkdf2.c | 3 + contrib/wpa/src/crypto/sha256-internal.c | 3 - contrib/wpa/src/crypto/sha256.c | 21 +- contrib/wpa/src/crypto/sha384.c | 6 +- contrib/wpa/src/crypto/sha512-internal.c | 3 - contrib/wpa/src/crypto/sha512.c | 6 +- contrib/wpa/src/crypto/tls.h | 18 +- contrib/wpa/src/crypto/tls_gnutls.c | 1 + contrib/wpa/src/crypto/tls_internal.c | 11 +- contrib/wpa/src/crypto/tls_none.c | 1 + contrib/wpa/src/crypto/tls_openssl.c | 564 +- contrib/wpa/src/crypto/tls_openssl_ocsp.c | 26 +- contrib/wpa/src/crypto/tls_wolfssl.c | 284 +- contrib/wpa/src/drivers/driver.h | 964 ++- contrib/wpa/src/drivers/driver_atheros.c | 31 +- contrib/wpa/src/drivers/driver_bsd.c | 16 +- contrib/wpa/src/drivers/driver_common.c | 44 + contrib/wpa/src/drivers/driver_hostap.c | 20 +- contrib/wpa/src/drivers/driver_macsec_linux.c | 76 +- contrib/wpa/src/drivers/driver_macsec_qca.c | 4 +- contrib/wpa/src/drivers/driver_ndis.c | 8 +- contrib/wpa/src/drivers/driver_nl80211.c | 3443 ++++++++--- contrib/wpa/src/drivers/driver_nl80211.h | 113 +- contrib/wpa/src/drivers/driver_nl80211_capa.c | 354 +- contrib/wpa/src/drivers/driver_nl80211_event.c | 1291 +++- contrib/wpa/src/drivers/driver_nl80211_scan.c | 127 +- contrib/wpa/src/drivers/driver_roboswitch.c | 2 +- contrib/wpa/src/drivers/driver_wext.c | 11 +- contrib/wpa/src/drivers/driver_wired.c | 2 +- contrib/wpa/src/drivers/linux_ioctl.c | 11 +- contrib/wpa/src/drivers/ndis_events.c | 5 +- contrib/wpa/src/drivers/netlink.c | 6 +- contrib/wpa/src/drivers/nl80211_copy.h | 626 +- contrib/wpa/src/eap_common/eap_defs.h | 2 +- contrib/wpa/src/eap_common/eap_pwd_common.c | 23 +- contrib/wpa/src/eap_common/eap_sake_common.c | 19 +- contrib/wpa/src/eap_peer/eap.c | 44 + contrib/wpa/src/eap_peer/eap_aka.c | 198 +- contrib/wpa/src/eap_peer/eap_config.h | 46 +- contrib/wpa/src/eap_peer/eap_fast.c | 14 +- contrib/wpa/src/eap_peer/eap_i.h | 9 + contrib/wpa/src/eap_peer/eap_mschapv2.c | 30 +- contrib/wpa/src/eap_peer/eap_peap.c | 40 +- contrib/wpa/src/eap_peer/eap_pwd.c | 33 +- contrib/wpa/src/eap_peer/eap_sim.c | 202 +- contrib/wpa/src/eap_peer/eap_teap.c | 61 +- contrib/wpa/src/eap_peer/eap_tls.c | 15 +- contrib/wpa/src/eap_peer/eap_tls_common.c | 27 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 5 + contrib/wpa/src/eap_peer/eap_ttls.c | 32 +- contrib/wpa/src/eap_peer/eap_wsc.c | 14 +- contrib/wpa/src/eap_server/eap.h | 12 + contrib/wpa/src/eap_server/eap_i.h | 7 + contrib/wpa/src/eap_server/eap_server_aka.c | 126 +- contrib/wpa/src/eap_server/eap_server_eke.c | 1 + contrib/wpa/src/eap_server/eap_server_fast.c | 14 +- contrib/wpa/src/eap_server/eap_server_mschapv2.c | 28 +- contrib/wpa/src/eap_server/eap_server_peap.c | 18 + contrib/wpa/src/eap_server/eap_server_pwd.c | 33 +- contrib/wpa/src/eap_server/eap_server_sim.c | 133 +- contrib/wpa/src/eap_server/eap_server_teap.c | 39 +- contrib/wpa/src/eap_server/eap_server_tls.c | 10 +- contrib/wpa/src/eap_server/eap_server_tls_common.c | 18 +- contrib/wpa/src/eap_server/eap_server_ttls.c | 3 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 + contrib/wpa/src/eapol_auth/eapol_auth_sm.c | 26 +- contrib/wpa/src/eapol_auth/eapol_auth_sm.h | 5 +- contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h | 4 + contrib/wpa/src/eapol_supp/eapol_supp_sm.c | 17 +- contrib/wpa/src/eapol_supp/eapol_supp_sm.h | 18 +- contrib/wpa/src/fst/fst_group.c | 12 +- contrib/wpa/src/fst/fst_iface.c | 2 +- contrib/wpa/src/fst/fst_session.c | 6 +- contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 9 +- contrib/wpa/src/l2_packet/l2_packet_linux.c | 4 +- contrib/wpa/src/p2p/p2p.c | 123 +- contrib/wpa/src/p2p/p2p.h | 12 +- contrib/wpa/src/p2p/p2p_build.c | 20 +- contrib/wpa/src/p2p/p2p_dev_disc.c | 10 +- contrib/wpa/src/p2p/p2p_go_neg.c | 121 +- contrib/wpa/src/p2p/p2p_group.c | 14 +- contrib/wpa/src/p2p/p2p_i.h | 19 +- contrib/wpa/src/p2p/p2p_invitation.c | 31 +- contrib/wpa/src/p2p/p2p_parse.c | 27 +- contrib/wpa/src/p2p/p2p_pd.c | 43 +- contrib/wpa/src/p2p/p2p_sd.c | 23 +- contrib/wpa/src/p2p/p2p_utils.c | 84 +- contrib/wpa/src/pae/ieee802_1x_cp.c | 15 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 74 +- contrib/wpa/src/pae/ieee802_1x_kay.h | 5 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.c | 20 + contrib/wpa/src/pae/ieee802_1x_secy_ops.h | 1 + contrib/wpa/src/pasn/Makefile | 16 + contrib/wpa/src/pasn/pasn_common.c | 232 + contrib/wpa/src/pasn/pasn_common.h | 228 + contrib/wpa/src/pasn/pasn_initiator.c | 1406 +++++ contrib/wpa/src/pasn/pasn_responder.c | 1032 ++++ contrib/wpa/src/radius/radius.c | 297 +- contrib/wpa/src/radius/radius.h | 35 +- contrib/wpa/src/radius/radius_client.c | 789 ++- contrib/wpa/src/radius/radius_client.h | 27 +- contrib/wpa/src/radius/radius_das.c | 10 + contrib/wpa/src/radius/radius_server.c | 15 + contrib/wpa/src/rsn_supp/pmksa_cache.c | 260 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 105 +- contrib/wpa/src/rsn_supp/preauth.c | 19 +- contrib/wpa/src/rsn_supp/tdls.c | 332 +- contrib/wpa/src/rsn_supp/wpa.c | 2190 +++++-- contrib/wpa/src/rsn_supp/wpa.h | 88 +- contrib/wpa/src/rsn_supp/wpa_ft.c | 328 +- contrib/wpa/src/rsn_supp/wpa_i.h | 65 +- contrib/wpa/src/rsn_supp/wpa_ie.c | 36 +- contrib/wpa/src/tls/libtommath.c | 8 - contrib/wpa/src/tls/pkcs1.c | 6 +- contrib/wpa/src/tls/tlsv1_client_read.c | 3 +- contrib/wpa/src/tls/tlsv1_common.c | 6 +- contrib/wpa/src/tls/tlsv1_common.h | 3 +- contrib/wpa/src/tls/tlsv1_server_write.c | 2 +- contrib/wpa/src/utils/browser.c | 10 + contrib/wpa/src/utils/common.c | 15 +- contrib/wpa/src/utils/common.h | 38 + contrib/wpa/src/utils/crc32.c | 2 +- contrib/wpa/src/utils/crc32.h | 2 +- contrib/wpa/src/utils/http-utils.h | 1 + contrib/wpa/src/utils/http_curl.c | 73 +- contrib/wpa/src/utils/ip_addr.c | 19 + contrib/wpa/src/utils/ip_addr.h | 2 + contrib/wpa/src/utils/os.h | 42 +- contrib/wpa/src/utils/os_unix.c | 195 +- contrib/wpa/src/utils/trace.c | 6 +- contrib/wpa/src/utils/wpa_debug.c | 10 +- contrib/wpa/src/utils/wpa_debug.h | 1 + contrib/wpa/src/utils/wpabuf.h | 6 + contrib/wpa/src/wps/ndef.c | 6 + contrib/wpa/src/wps/wps.c | 5 +- contrib/wpa/src/wps/wps.h | 5 + contrib/wpa/src/wps/wps_attr_parse.c | 13 +- contrib/wpa/src/wps/wps_enrollee.c | 6 +- contrib/wpa/src/wps/wps_er.c | 4 +- contrib/wpa/src/wps/wps_i.h | 1 + contrib/wpa/src/wps/wps_registrar.c | 15 +- contrib/wpa/wpa_supplicant/Android.mk | 228 +- contrib/wpa/wpa_supplicant/ChangeLog | 50 + contrib/wpa/wpa_supplicant/Makefile | 308 +- contrib/wpa/wpa_supplicant/README | 4 +- contrib/wpa/wpa_supplicant/README-HS20 | 33 +- contrib/wpa/wpa_supplicant/README-NAN-USD | 147 + contrib/wpa/wpa_supplicant/README-WPS | 24 +- contrib/wpa/wpa_supplicant/android.config | 15 + contrib/wpa/wpa_supplicant/ap.c | 293 +- contrib/wpa/wpa_supplicant/ap.h | 24 +- contrib/wpa/wpa_supplicant/bgscan.h | 2 +- contrib/wpa/wpa_supplicant/bgscan_learn.c | 10 +- contrib/wpa/wpa_supplicant/bgscan_simple.c | 64 +- contrib/wpa/wpa_supplicant/bss.c | 563 +- contrib/wpa/wpa_supplicant/bss.h | 29 + contrib/wpa/wpa_supplicant/bssid_ignore.c | 30 +- contrib/wpa/wpa_supplicant/config.c | 487 +- contrib/wpa/wpa_supplicant/config.h | 150 +- contrib/wpa/wpa_supplicant/config_file.c | 108 +- contrib/wpa/wpa_supplicant/config_none.c | 3 +- contrib/wpa/wpa_supplicant/config_ssid.h | 114 +- contrib/wpa/wpa_supplicant/config_winreg.c | 5 +- contrib/wpa/wpa_supplicant/ctrl_iface.c | 1707 +++++- contrib/wpa/wpa_supplicant/ctrl_iface.h | 2 + contrib/wpa/wpa_supplicant/ctrl_iface_unix.c | 3 + .../wpa/wpa_supplicant/dbus/dbus_dict_helpers.c | 100 + .../wpa/wpa_supplicant/dbus/dbus_dict_helpers.h | 9 + contrib/wpa/wpa_supplicant/dbus/dbus_new.c | 142 +- contrib/wpa/wpa_supplicant/dbus/dbus_new.h | 24 + .../wpa/wpa_supplicant/dbus/dbus_new_handlers.c | 784 ++- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.h | 7 + .../wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 94 +- contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c | 209 +- contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h | 5 + .../wpa/wpa_supplicant/dbus/dbus_new_introspect.c | 2 +- contrib/wpa/wpa_supplicant/defconfig | 53 + .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 48 +- contrib/wpa/wpa_supplicant/dpp_supplicant.c | 2184 ++++++- contrib/wpa/wpa_supplicant/dpp_supplicant.h | 5 + contrib/wpa/wpa_supplicant/driver_i.h | 124 +- contrib/wpa/wpa_supplicant/eapol_test.c | 146 +- contrib/wpa/wpa_supplicant/events.c | 1741 +++++- contrib/wpa/wpa_supplicant/examples/dpp-nfc.py | 10 +- contrib/wpa/wpa_supplicant/gas_query.c | 56 +- contrib/wpa/wpa_supplicant/hs20_supplicant.c | 17 +- contrib/wpa/wpa_supplicant/ibss_rsn.c | 32 +- contrib/wpa/wpa_supplicant/ibss_rsn.h | 3 +- contrib/wpa/wpa_supplicant/interworking.c | 124 +- contrib/wpa/wpa_supplicant/main.c | 2 + contrib/wpa/wpa_supplicant/mbo.c | 25 +- contrib/wpa/wpa_supplicant/mesh.c | 16 +- contrib/wpa/wpa_supplicant/mesh_mpm.c | 74 +- contrib/wpa/wpa_supplicant/mesh_rsn.c | 27 +- contrib/wpa/wpa_supplicant/nan_usd.c | 513 ++ contrib/wpa/wpa_supplicant/nan_usd.h | 46 + contrib/wpa/wpa_supplicant/notify.c | 103 +- contrib/wpa/wpa_supplicant/notify.h | 14 +- contrib/wpa/wpa_supplicant/offchannel.c | 10 +- contrib/wpa/wpa_supplicant/op_classes.c | 150 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 483 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 13 +- contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c | 14 +- contrib/wpa/wpa_supplicant/pasn_supplicant.c | 1712 ++---- contrib/wpa/wpa_supplicant/preauth_test.c | 8 +- contrib/wpa/wpa_supplicant/robust_av.c | 341 +- contrib/wpa/wpa_supplicant/rrm.c | 132 +- contrib/wpa/wpa_supplicant/scan.c | 774 ++- contrib/wpa/wpa_supplicant/scan.h | 30 +- contrib/wpa/wpa_supplicant/sme.c | 948 ++- contrib/wpa/wpa_supplicant/sme.h | 14 +- .../systemd/wpa_supplicant-nl80211.service.arg.in | 2 +- .../systemd/wpa_supplicant.service.arg.in | 2 +- contrib/wpa/wpa_supplicant/utils/log2pcap.py | 9 +- contrib/wpa/wpa_supplicant/wmm_ac.c | 6 +- contrib/wpa/wpa_supplicant/wnm_sta.c | 532 +- contrib/wpa/wpa_supplicant/wnm_sta.h | 30 +- contrib/wpa/wpa_supplicant/wpa_cli.c | 144 +- contrib/wpa/wpa_supplicant/wpa_passphrase.c | 25 +- contrib/wpa/wpa_supplicant/wpa_priv.c | 11 +- contrib/wpa/wpa_supplicant/wpa_supplicant.c | 1679 ++++-- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 109 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 286 +- .../wpa_supplicant/wpa_supplicant_template.conf | 2 + contrib/wpa/wpa_supplicant/wpas_glue.c | 159 +- contrib/wpa/wpa_supplicant/wpas_glue.h | 2 + contrib/wpa/wpa_supplicant/wpas_kay.c | 53 +- contrib/wpa/wpa_supplicant/wpas_module_tests.c | 3 + contrib/wpa/wpa_supplicant/wps_supplicant.c | 166 +- contrib/wpa/wpa_supplicant/wps_supplicant.h | 13 + share/mk/src.libnames.mk | 4 + usr.sbin/wpa/Makefile.inc | 1 - usr.sbin/wpa/hostapd/Makefile | 3 +- usr.sbin/wpa/src/Makefile | 1 + usr.sbin/wpa/src/pasn/Makefile | 20 + usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 366 files changed, 66259 insertions(+), 12716 deletions(-) diff --git a/contrib/wpa/CONTRIBUTIONS b/contrib/wpa/CONTRIBUTIONS index b2064dc83443..6c8187cb190d 100644 --- a/contrib/wpa/CONTRIBUTIONS +++ b/contrib/wpa/CONTRIBUTIONS @@ -37,7 +37,7 @@ without moderation. You can subscribe to the list at this address: http://lists.infradead.org/mailman/listinfo/hostap The message should contain an inlined patch against the current -development branch (i.e., the master branch of +development branch (i.e., the main branch of git://w1.fi/hostap.git). Please make sure the software you use for sending the patch does not corrupt whitespace. If that cannot be fixed for some reason, it is better to include an attached version of the diff --git a/contrib/wpa/README b/contrib/wpa/README index 1470c4f23582..8392bb354fac 100644 --- a/contrib/wpa/README +++ b/contrib/wpa/README @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2022, Jouni Malinen and contributors +Copyright (c) 2002-2024, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with diff --git a/contrib/wpa/hostapd/Android.mk b/contrib/wpa/hostapd/Android.mk index bf26e41c6b23..573564d5b0de 100644 --- a/contrib/wpa/hostapd/Android.mk +++ b/contrib/wpa/hostapd/Android.mk @@ -154,6 +154,7 @@ OBJS += src/utils/crc32.c OBJS += src/common/ieee802_11_common.c OBJS += src/common/wpa_common.c OBJS += src/common/hw_features_common.c +OBJS += src/common/ptksa_cache.c OBJS += src/eapol_auth/eapol_auth_sm.c @@ -237,6 +238,8 @@ L_CFLAGS += -DCONFIG_OCV OBJS += src/common/ocv.c endif +NEED_AES_UNWRAP=y + ifdef CONFIG_IEEE80211R L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP OBJS += src/ap/wpa_auth_ft.c @@ -256,6 +259,7 @@ L_CFLAGS += -DCONFIG_SAE OBJS += src/common/sae.c ifdef CONFIG_SAE_PK L_CFLAGS += -DCONFIG_SAE_PK +NEED_AES_SIV=y OBJS += src/common/sae_pk.c endif NEED_ECC=y @@ -294,6 +298,12 @@ ifdef CONFIG_IEEE80211AC L_CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +L_CFLAGS += -DCONFIG_IEEE80211BE +OBJS += src/ap/ieee802_11_eht.c +endif + ifdef CONFIG_IEEE80211AX L_CFLAGS += -DCONFIG_IEEE80211AX endif @@ -572,6 +582,12 @@ L_CFLAGS += -DCONFIG_DPP3 endif endif +ifdef CONFIG_NAN_USD +OBJS += src/common/nan_de.c +OBJS += src/ap/nan_usd_ap.c +L_CFLAGS += -DCONFIG_NAN_USD +endif + ifdef CONFIG_PASN L_CFLAGS += -DCONFIG_PASN L_CFLAGS += -DCONFIG_PTKSA_CACHE @@ -579,7 +595,6 @@ NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA384_KDF=y NEED_SHA256=y NEED_SHA384=y -OBJS += src/common/ptksa_cache.c endif ifdef CONFIG_EAP_IKEV2 @@ -632,6 +647,11 @@ ifdef CHAP OBJS += src/eap_common/chap.c endif +ifdef CONFIG_RADIUS_TLS +TLS_FUNCS=y +L_CFLAGS += -DCONFIG_RADIUS_TLS +endif + ifdef TLS_FUNCS NEED_DES=y # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) @@ -653,6 +673,7 @@ L_CFLAGS += -DCONFIG_TLSV12 endif ifeq ($(CONFIG_TLS), openssl) +L_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 ifdef TLS_FUNCS OBJS += src/crypto/tls_openssl.c OBJS += src/crypto/tls_openssl_ocsp.c @@ -825,7 +846,9 @@ endif ifdef NEED_AES_ENCBLOCK AESOBJS += src/crypto/aes-encblock.c endif +ifneq ($(CONFIG_TLS), openssl) AESOBJS += src/crypto/aes-omac1.c +endif ifdef NEED_AES_UNWRAP ifneq ($(CONFIG_TLS), openssl) NEED_AES_DEC=y @@ -1026,6 +1049,9 @@ endif ifdef NEED_AP_MLME OBJS += src/ap/wmm.c OBJS += src/ap/ap_list.c +OBJS += src/ap/comeback_token.c +OBJS += src/pasn/pasn_responder.c +OBJS += src/pasn/pasn_common.c OBJS += src/ap/ieee802_11.c OBJS += src/ap/hw_features.c OBJS += src/ap/dfs.c diff --git a/contrib/wpa/hostapd/ChangeLog b/contrib/wpa/hostapd/ChangeLog index 279298e4d4d4..1c8240d333c4 100644 --- a/contrib/wpa/hostapd/ChangeLog +++ b/contrib/wpa/hostapd/ChangeLog @@ -1,5 +1,42 @@ ChangeLog for hostapd +2024-07-20 - v2.11 + * Wi-Fi Easy Connect + - add support for DPP release 3 + - allow Configurator parameters to be provided during config exchange + * HE/IEEE 802.11ax/Wi-Fi 6 + - various fixes + * EHT/IEEE 802.11be/Wi-Fi 7 + - add preliminary support + * SAE: add support for fetching the password from a RADIUS server + * support OpenSSL 3.0 API changes + * support background radar detection and CAC with some additional + drivers + * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) + * EAP-SIM/AKA: support IMSI privacy + * improve 4-way handshake operations + - use Secure=1 in message 3 during PTK rekeying + * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases + to avoid interoperability issues + * support new SAE AKM suites with variable length keys + * support new AKM for 802.1X/EAP with SHA384 + * extend PASN support for secure ranging + * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) + - this is based on additional details being added in the IEEE 802.11 + standard + - the new implementation is not backwards compatible + * improved ACS to cover additional channel types/bandwidths + * extended Multiple BSSID support + * fix beacon protection with FT protocol (incorrect BIGTK was provided) + * support unsynchronized service discovery (USD) + * add preliminary support for RADIUS/TLS + * add support for explicit SSID protection in 4-way handshake + (a mitigation for CVE-2023-52424; disabled by default for now, can be + enabled with ssid_protection=1) + * fix SAE H2E rejected groups validation to avoid downgrade attacks + * use stricter validation for some RADIUS messages + * a large number of other fixes, cleanup, and extensions + 2022-01-16 - v2.10 * SAE changes - improved protection against side channel attacks diff --git a/contrib/wpa/hostapd/Makefile b/contrib/wpa/hostapd/Makefile index e37c13b27a6e..ca4439234a11 100644 --- a/contrib/wpa/hostapd/Makefile +++ b/contrib/wpa/hostapd/Makefile @@ -84,6 +84,7 @@ OBJS += ../src/ap/beacon.o OBJS += ../src/ap/bss_load.o OBJS += ../src/ap/neighbor_db.o OBJS += ../src/ap/rrm.o +OBJS += ../src/common/ptksa_cache.o OBJS_c = hostapd_cli.o OBJS_c += ../src/common/wpa_ctrl.o @@ -167,7 +168,7 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.o ifdef CONFIG_CODE_COVERAGE -CFLAGS += -O0 -fprofile-arcs -ftest-coverage +CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE LIBS += -lgcov LIBS_c += -lgcov LIBS_h += -lgcov @@ -276,6 +277,8 @@ CFLAGS += -DCONFIG_OCV OBJS += ../src/common/ocv.o endif +NEED_AES_UNWRAP=y + ifdef CONFIG_IEEE80211R CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP OBJS += ../src/ap/wpa_auth_ft.o @@ -295,6 +298,7 @@ CFLAGS += -DCONFIG_SAE OBJS += ../src/common/sae.o ifdef CONFIG_SAE_PK CFLAGS += -DCONFIG_SAE_PK +NEED_AES_SIV=y OBJS += ../src/common/sae_pk.o endif NEED_ECC=y @@ -339,6 +343,12 @@ ifdef CONFIG_IEEE80211AC CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +CFLAGS += -DCONFIG_IEEE80211BE +OBJS += ../src/ap/ieee802_11_eht.o +endif + ifdef CONFIG_IEEE80211AX CFLAGS += -DCONFIG_IEEE80211AX OBJS += ../src/ap/ieee802_11_he.o @@ -598,6 +608,12 @@ CFLAGS += -DCONFIG_DPP3 endif endif +ifdef CONFIG_NAN_USD +OBJS += ../src/common/nan_de.o +OBJS += ../src/ap/nan_usd_ap.o +CFLAGS += -DCONFIG_NAN_USD +endif + ifdef CONFIG_PASN CFLAGS += -DCONFIG_PASN CFLAGS += -DCONFIG_PTKSA_CACHE @@ -605,7 +621,6 @@ NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA384_KDF=y NEED_SHA256=y NEED_SHA384=y -OBJS += ../src/common/ptksa_cache.o endif ifdef CONFIG_EAP_IKEV2 @@ -667,6 +682,11 @@ ifdef CHAP OBJS += ../src/eap_common/chap.o endif +ifdef CONFIG_RADIUS_TLS +TLS_FUNCS=y +CFLAGS += -DCONFIG_RADIUS_TLS +endif + ifdef TLS_FUNCS NEED_DES=y # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) @@ -708,6 +728,7 @@ endif endif ifeq ($(CONFIG_TLS), openssl) +CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 CONFIG_CRYPTO=openssl ifdef TLS_FUNCS OBJS += ../src/crypto/tls_openssl.o @@ -932,11 +953,13 @@ endif ifdef NEED_AES_ENCBLOCK AESOBJS += ../src/crypto/aes-encblock.o endif +ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), wolfssl) AESOBJS += ../src/crypto/aes-omac1.o endif endif +endif ifdef NEED_AES_UNWRAP ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) @@ -1172,6 +1195,9 @@ endif ifdef NEED_AP_MLME OBJS += ../src/ap/wmm.o OBJS += ../src/ap/ap_list.o +OBJS += ../src/ap/comeback_token.o +OBJS += ../src/pasn/pasn_responder.o +OBJS += ../src/pasn/pasn_common.o OBJS += ../src/ap/ieee802_11.o OBJS += ../src/ap/hw_features.o OBJS += ../src/ap/dfs.o diff --git a/contrib/wpa/hostapd/README b/contrib/wpa/hostapd/README index 739c964d44d8..1a0248fce422 100644 --- a/contrib/wpa/hostapd/README +++ b/contrib/wpa/hostapd/README @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2022, Jouni Malinen and contributors +Copyright (c) 2002-2024, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with diff --git a/contrib/wpa/hostapd/android.config b/contrib/wpa/hostapd/android.config index c8b3afabef8d..522de87266d5 100644 --- a/contrib/wpa/hostapd/android.config +++ b/contrib/wpa/hostapd/android.config @@ -121,6 +121,9 @@ CONFIG_PKCS12=y # Build IPv6 support for RADIUS operations CONFIG_IPV6=y +# Include support fo RADIUS/TLS into the RADIUS client +#CONFIG_RADIUS_TLS=y + # IEEE Std 802.11r-2008 (Fast BSS Transition) #CONFIG_IEEE80211R=y @@ -212,3 +215,6 @@ CONFIG_NO_RANDOM_POOL=y # release under this optional build parameter. This functionality is subject to # be completely removed in a future release. CONFIG_WEP=y + +# Wi-Fi Aware unsynchronized service discovery (NAN USD) +#CONFIG_NAN_USD=y diff --git a/contrib/wpa/hostapd/config_file.c b/contrib/wpa/hostapd/config_file.c index b14728d1b507..3fb059770d49 100644 --- a/contrib/wpa/hostapd/config_file.c +++ b/contrib/wpa/hostapd/config_file.c @@ -1,6 +1,6 @@ /* * hostapd / Configuration file parser - * Copyright (c) 2003-2018, Jouni Malinen + * Copyright (c) 2003-2024, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -118,52 +118,6 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss, #endif /* CONFIG_NO_VLAN */ -int hostapd_acl_comp(const void *a, const void *b) -{ - const struct mac_acl_entry *aa = a; - const struct mac_acl_entry *bb = b; - return os_memcmp(aa->addr, bb->addr, sizeof(macaddr)); -} - - -int hostapd_add_acl_maclist(struct mac_acl_entry **acl, int *num, - int vlan_id, const u8 *addr) -{ - struct mac_acl_entry *newacl; - - newacl = os_realloc_array(*acl, *num + 1, sizeof(**acl)); - if (!newacl) { - wpa_printf(MSG_ERROR, "MAC list reallocation failed"); - return -1; - } - - *acl = newacl; - os_memcpy((*acl)[*num].addr, addr, ETH_ALEN); - os_memset(&(*acl)[*num].vlan_id, 0, sizeof((*acl)[*num].vlan_id)); - (*acl)[*num].vlan_id.untagged = vlan_id; - (*acl)[*num].vlan_id.notempty = !!vlan_id; - (*num)++; - - return 0; -} - - -void hostapd_remove_acl_mac(struct mac_acl_entry **acl, int *num, - const u8 *addr) -{ - int i = 0; - - while (i < *num) { - if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == 0) { - os_remove_in_array(*acl, *num, sizeof(**acl), i); - (*num)--; - } else { - i++; - } - } -} - - static int hostapd_config_read_maclist(const char *fname, struct mac_acl_entry **acl, int *num) { @@ -713,6 +667,10 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) val |= WPA_KEY_MGMT_FT_IEEE8021X_SHA384; #endif /* CONFIG_SHA384 */ #endif /* CONFIG_IEEE80211R_AP */ +#ifdef CONFIG_SHA384 + else if (os_strcmp(start, "WPA-EAP-SHA384") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SHA384; +#endif /* CONFIG_SHA384 */ else if (os_strcmp(start, "WPA-PSK-SHA256") == 0) val |= WPA_KEY_MGMT_PSK_SHA256; else if (os_strcmp(start, "WPA-EAP-SHA256") == 0) @@ -720,8 +678,12 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) #ifdef CONFIG_SAE else if (os_strcmp(start, "SAE") == 0) val |= WPA_KEY_MGMT_SAE; + else if (os_strcmp(start, "SAE-EXT-KEY") == 0) + val |= WPA_KEY_MGMT_SAE_EXT_KEY; else if (os_strcmp(start, "FT-SAE") == 0) val |= WPA_KEY_MGMT_FT_SAE; + else if (os_strcmp(start, "FT-SAE-EXT-KEY") == 0) + val |= WPA_KEY_MGMT_FT_SAE_EXT_KEY; #endif /* CONFIG_SAE */ #ifdef CONFIG_SUITEB else if (os_strcmp(start, "WPA-EAP-SUITE-B") == 0) @@ -1058,6 +1020,78 @@ static int add_r1kh(struct hostapd_bss_config *bss, char *value) return 0; } + + +int hostapd_config_read_rxkh_file(struct hostapd_bss_config *conf, + const char *fname) +{ + FILE *f; + char buf[256], *pos; + int line = 0, errors = 0; + + if (!fname) + return 0; + + f = fopen(fname, "r"); + if (!f) { + wpa_printf(MSG_ERROR, "rxkh file '%s' not found.", fname); + return -1; + } + + while (fgets(buf, sizeof(buf), f)) { + line++; + + if (buf[0] == '#') + continue; + pos = buf; + while (*pos != '\0') { + if (*pos == '\n') { + *pos = '\0'; + break; + } + pos++; + } + if (buf[0] == '\0') + continue; + + pos = os_strchr(buf, '='); + if (!pos) { + wpa_printf(MSG_ERROR, "Line %d: Invalid line '%s'", + line, buf); + errors++; + continue; + } + *pos = '\0'; + pos++; + + if (os_strcmp(buf, "r0kh") == 0) { + if (add_r0kh(conf, pos) < 0) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid r0kh '%s'", + line, pos); + errors++; + } + } else if (os_strcmp(buf, "r1kh") == 0) { + if (add_r1kh(conf, pos) < 0) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid r1kh '%s'", + line, pos); + errors++; + } + } + } + + fclose(f); + + if (errors) { + wpa_printf(MSG_ERROR, + "%d errors in configuring RxKHs from '%s'", + errors, fname); + return -1; + } + return 0; +} + #endif /* CONFIG_IEEE80211R_AP */ @@ -1644,6 +1678,8 @@ static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf, int line) return 0; } +#endif /* CONFIG_INTERWORKING */ + static int parse_qos_map_set(struct hostapd_bss_config *bss, char *buf, int line) @@ -1685,8 +1721,6 @@ static int parse_qos_map_set(struct hostapd_bss_config *bss, return 0; } -#endif /* CONFIG_INTERWORKING */ - #ifdef CONFIG_HS20 static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf, @@ -2197,6 +2231,7 @@ static int add_airtime_weight(struct hostapd_bss_config *bss, char *value) *** 122364 LINES SKIPPED *** From nobody Tue Oct 1 04:29:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlMg2FJbz5YBHK; Tue, 01 Oct 2024 04:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHlMg0v0Rz4M3Z; Tue, 1 Oct 2024 04:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLe9JT5ojI1KDghKsSg1q8OZeqztO5KOm1uAWHKSw24=; b=nIHawDE8hK9oSfSEFLhsdE2dSAW11a8Y/QQY5V12DNjn8I2G2Bb/m1UI+0wqFj8zebw+XI AjpFr88EWeW70hHJX6IBDPWtC7Y4jEb4cYwTIdY0M0yFZpuJjhFW8ew3v+gceqPKuY+sWv WLV1J677W9oX79ofLX1Qz3x7rMtDg9Dpau069ckWD8DOVQXiIsNbwwC6Uwb07NNR/k3shB HJ2XiMz4Ppg29Uz5oSdezfzkyRwVfhWKfm5WfsiZkZNm/KXzjICVriziJJQ3SfMCFbl+Gl i6yzQB3xoUzDdXMwqQh6lfeSeUYopEWcY1JAEqKW0AKoVLcmJeUKi4K4xNSDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLe9JT5ojI1KDghKsSg1q8OZeqztO5KOm1uAWHKSw24=; b=TeqwiSbmocpZfah7hb3JMuv0BuHwx/S45N7eEodxagkoPX7M8/m6MjBBLPZB99VZLbIGUo UWtrDDMeifGDX0b0XRT28Y2JZk1oY8Yzv9hOcOo/TfqQuSWK7LCKDaBGW8sDmoKo1VkUPY U9ohtNzv3v96sX2X1lwoWjYETxQIBJBjQL5enBheZzzmSk9IJmLa3oJfkFvxGBY1atIYpA UhAPvq/rZWWdnveql4eIKZyO3TC9Lr0gX46S5ELKuxsv2XJmZcq+FeKbSYC0Ys20us8nqN LYtXAm++DC9KKvI6kI6yyCh5C2pLWxkIkhsiLP9Phy2Ne1pz18bDYV8u2o7oaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727756975; a=rsa-sha256; cv=none; b=U8ceitiYvi+s91mIEIS5iQxWykkE+m0SFSnwMP+PGGvBXMlfdLsBibEiQqs9cUT3I9+u1S BYxr7EcGCWHIS9+ZNg2G/I7ajOs49W1FCktKuDO5yJJxOYG7DLB5nVeG45RyLuggQ6rGiI 56gicdfmbn7c6wbCnyHo78XMsHn2j6JLWwW+1aPbcX4bdUggfCTGN/nzwT9VpoPLGXLW2s H+gIVK5dZIeiz8XG9JYzugPx6Czpud82mj6tnDJA52DTANxcX9zmZxovDgC2fH9NrfzmjY Z713txgnFKsAttWDadSJ3Hws6xOX2awaG7tQ0iM4iua0Ofx0I+dJLBGGA2k6Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlMg0SNqzMvC; Tue, 1 Oct 2024 04:29: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 4914TYO4039260; Tue, 1 Oct 2024 04:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914TYQT039257; Tue, 1 Oct 2024 04:29:34 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:29:34 GMT Message-Id: <202410010429.4914TYQT039257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: dbb02466420b - stable/14 - wpa: Fix gcc build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dbb02466420b6c799277046cbc2f55ad3d8357e3 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=dbb02466420b6c799277046cbc2f55ad3d8357e3 commit dbb02466420b6c799277046cbc2f55ad3d8357e3 Author: Cy Schubert AuthorDate: 2024-07-24 15:04:33 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:28:54 +0000 wpa: Fix gcc build Order of libraries still matters with GCC toolchains. Moving the wpapasn library before the wpacommon specification resolves the link problem. This issue was not detected by make universe. Fixes: a90b9d015907 (cherry picked from commit 8880825df1f805fc02dbb8476df8183d4ec3781c) --- usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index a107157fbf73..3cb1d1c18689 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -52,7 +52,7 @@ CFLAGS+=-DCONFIG_BACKEND_FILE LIBADD+=pcap util wpadrivers wpaeapol_supp \ wpaeap_server \ wpaeap_peer wpaeap_common wpal2_packet wparsn_supp wpatls wpawps \ - wpacommon wpacrypto wpautils wpapasn + wpapasn wpacommon wpacrypto wpautils # User customizations to the wpa_supplicant build environment CFLAGS+=${WPA_SUPPLICANT_CFLAGS} From nobody Tue Oct 1 04:29:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlMh2bnsz5YBHN; Tue, 01 Oct 2024 04:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHlMh1X50z4MJs; Tue, 1 Oct 2024 04:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=itkvDfNnN/nyC6rr6xJZ7RbSYyO+oLXFA3vM56DUnfA=; b=M7MvQ6u34lFhYb3fxb5wJ3fwR+P68eOxVCxecrNlYbZGjBowQRGEn3IiywQVLi2Umh2oAG iPE9fKQlHTUkt1D0ju/tLgXJM5y0OqkVzVS6hamR7qZY8IWDw04HOwv56wB0XRrY6Sj26v 65yF/zoLwrSbNG2pc8Ej9cAtUOFJ8LYxD+wgHVVcYYDSS7fmb9YUvBKMEDQvJAOEpIreFx Ko4fsM2xGKk/NImsXi34s8LV4Zo//PrD0qSCahKgG9bRNJp213CTDDKLG7mM6c2eDmeIsA RCmOnxXg6+EYnhIMyzG9jDeukHPiZ63jkahijnpF8F6DVa7BQHIBK9dmqHS2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727756976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=itkvDfNnN/nyC6rr6xJZ7RbSYyO+oLXFA3vM56DUnfA=; b=WI7201CIIQ00pSvI7wUteyU7cItJFU08aPk9Df17FWEpVR3BBLcCezXhLnx1qAysanLPVE /8Tn4NiRwTTA0eVYsngetquSQxWrcGMs2a7ZGjEBVtWepEZb7j6txXslfvM3LkeBSFPuHu o8AUZORgM8hLCuN/sEHdF633jNDT4ObFpxHntg5pmAjiqL7Q/ooVmvuvrQzo2uB+jz7kn5 5l+RO2t7W8+F+ttyN2ayYTLx0dmbmxO648jtYzz1I/+OKgR0MRUNAjmYaGRDPYOw+fkQWY ffb4nUhcMOfjDhApDKkcczM7w+AnwsHFYnTFOxGM+eWRr1dCFI+iHoTwOLsjnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727756976; a=rsa-sha256; cv=none; b=yhYNWIHnXYjUZ76jHHRaxWNPMEaCE+RZBntPc6QU9wlRIM9o5XOzX3IBI+66SUDKVZHqX4 xqJyZSe/AOUYghGgAZpBkFr20zA0IFUJE2WktxBgmcEEsNq6VabiO3zPs2QKjdgpQDwJ+P wl4nK/J8YHZ3TnkDsUPhy8a5nQ4ZXoZUWJ046V4y0BMfWzhAdPegKP0C8IvMMUZOVODZjP 7cX5ypa8h6W+lNOckhUmN0L+uxkalLQU4ykI067L0wLxXTeBzEU1yvVknhGvVZIzVcCXrd 1F71h5PvtqD6kqxxYAAAnsbO36zXc+lFAdKS7ZIhz8wTA2XqPeg2yuH+yFv+cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlMh1843zMwl; Tue, 1 Oct 2024 04:29: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 4914TaEP039308; Tue, 1 Oct 2024 04:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914TawJ039305; Tue, 1 Oct 2024 04:29:36 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:29:36 GMT Message-Id: <202410010429.4914TawJ039305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 4bb56e2a6520 - stable/14 - ntp: Improve descriptions in man pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4bb56e2a6520efd3472589b4bf70ebc0669e3be6 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4bb56e2a6520efd3472589b4bf70ebc0669e3be6 commit 4bb56e2a6520efd3472589b4bf70ebc0669e3be6 Author: Alexander Ziaee AuthorDate: 2024-08-05 19:37:42 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:28:54 +0000 ntp: Improve descriptions in man pages + ntpd added to ntp.conf(5) description (search keywords) + expand NTP so these pages are shown when `apropos time` + "standard" => "reference" for increased consistency - removed redundant or duplicated search keywords ntp.org bug: https://bugs.ntp.org/show_bug.cgi?id=3936 Reviewed by: Harlan Stenn Reviewed by: Cy Schubert (cherry picked from commit c7a33fe37d7688cb21c743f68256680e003210ad) --- contrib/ntp/ntpd/ntp.conf.def | 2 +- contrib/ntp/ntpd/ntp.keys.def | 2 +- contrib/ntp/ntpd/ntpd-opts.def | 2 +- contrib/ntp/ntpq/ntpq-opts.def | 2 +- contrib/ntp/sntp/sntp-opts.def | 2 +- contrib/ntp/util/ntp-keygen-opts.def | 2 +- usr.sbin/ntp/doc/ntp-keygen.8 | 2 +- usr.sbin/ntp/doc/ntp.conf.5 | 2 +- usr.sbin/ntp/doc/ntp.keys.5 | 2 +- usr.sbin/ntp/doc/ntpd.8 | 2 +- usr.sbin/ntp/doc/ntpq.8 | 2 +- usr.sbin/ntp/doc/sntp.8 | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def index 444e3b35e351..aba3c25ab464 100644 --- a/contrib/ntp/ntpd/ntp.conf.def +++ b/contrib/ntp/ntpd/ntp.conf.def @@ -9,7 +9,7 @@ autogen definitions options; // file name. prog-name = "ntp.conf"; file-path = "/etc/ntp.conf"; -prog-title = "Network Time Protocol (NTP) daemon configuration file format"; +prog-title = "Network Time Protocol daemon (ntpd) configuration format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntp.keys.def b/contrib/ntp/ntpd/ntp.keys.def index e73ce4d06a1b..b0c9717e5906 100644 --- a/contrib/ntp/ntpd/ntp.keys.def +++ b/contrib/ntp/ntpd/ntp.keys.def @@ -10,7 +10,7 @@ autogen definitions options; // file name. prog-name = "ntp.keys"; file-path = "/etc/ntp.keys"; -prog-title = "NTP symmetric key file format"; +prog-title = "Network Time Protocol symmetric key format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntpd-opts.def b/contrib/ntp/ntpd/ntpd-opts.def index 00d35115dc43..6d4952a637c2 100644 --- a/contrib/ntp/ntpd/ntpd-opts.def +++ b/contrib/ntp/ntpd/ntpd-opts.def @@ -5,7 +5,7 @@ autogen definitions options; #include copyright.def prog-name = "ntpd"; -prog-title = "NTP daemon program"; +prog-title = "set clock via Network Time Protocol daemon"; argument = "[ ... ]"; #include ntpdbase-opts.def diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def index 85655a9d66cc..1189e81efe40 100644 --- a/contrib/ntp/ntpq/ntpq-opts.def +++ b/contrib/ntp/ntpq/ntpq-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntpq"; -prog-title = "standard NTP query program"; +prog-title = "query Network Time Protocol servers"; argument = '[ host ...]'; flag = { diff --git a/contrib/ntp/sntp/sntp-opts.def b/contrib/ntp/sntp/sntp-opts.def index 7664b1bf08b9..d468b6ef8bf5 100644 --- a/contrib/ntp/sntp/sntp-opts.def +++ b/contrib/ntp/sntp/sntp-opts.def @@ -6,7 +6,7 @@ autogen definitions options; #include copyright.def prog-name = "sntp"; -prog-title = "standard Simple Network Time Protocol client program"; +prog-title = "reference Simple Network Time Protocol client"; argument = '[ hostname-or-IP ...]'; #include homerc.def diff --git a/contrib/ntp/util/ntp-keygen-opts.def b/contrib/ntp/util/ntp-keygen-opts.def index 632dbbec778d..5c06bded15fd 100644 --- a/contrib/ntp/util/ntp-keygen-opts.def +++ b/contrib/ntp/util/ntp-keygen-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntp-keygen"; -prog-title = "Create a NTP host key"; +prog-title = "create a Network Time Protocol host key"; package = ntp; include = '#include '; diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8 index ad7b844d27de..3e8ffd9dbf58 100644 --- a/usr.sbin/ntp/doc/ntp-keygen.8 +++ b/usr.sbin/ntp/doc/ntp-keygen.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp-keygen -.Nd Create a NTP host key +.Nd create a Network Time Protocol host key .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5 index 9e23a2294c48..71fb7c668db2 100644 --- a/usr.sbin/ntp/doc/ntp.conf.5 +++ b/usr.sbin/ntp/doc/ntp.conf.5 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp.conf -.Nd Network Time Protocol (NTP) daemon configuration file format +.Nd Network Time Protocol daemon (ntpd) configuration format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntp.keys.5 b/usr.sbin/ntp/doc/ntp.keys.5 index d235f3b5f7dd..6bec2880163e 100644 --- a/usr.sbin/ntp/doc/ntp.keys.5 +++ b/usr.sbin/ntp/doc/ntp.keys.5 @@ -12,7 +12,7 @@ .Sh NAME .Nm ntp.keys -.Nd NTP symmetric key file format +.Nd Network Time Protocol symmetric key format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntpd.8 b/usr.sbin/ntp/doc/ntpd.8 index 74bc07793048..83beac3632a9 100644 --- a/usr.sbin/ntp/doc/ntpd.8 +++ b/usr.sbin/ntp/doc/ntpd.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpd -.Nd NTP daemon program +.Nd set clock via Network Time Protocol daemon .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntpq.8 b/usr.sbin/ntp/doc/ntpq.8 index e6c66ed71d97..21f15926a0ab 100644 --- a/usr.sbin/ntp/doc/ntpq.8 +++ b/usr.sbin/ntp/doc/ntpq.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpq -.Nd standard NTP query program +.Nd query Network Time Protocol servers .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/sntp.8 b/usr.sbin/ntp/doc/sntp.8 index 94c3c2816035..4509b6efa222 100644 --- a/usr.sbin/ntp/doc/sntp.8 +++ b/usr.sbin/ntp/doc/sntp.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm sntp -.Nd standard Simple Network Time Protocol client program +.Nd reference Simple Network Time Protocol client .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options From nobody Tue Oct 1 04:30:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlNW1df7z5YBBh; Tue, 01 Oct 2024 04:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHlNW19Q6z4MsM; Tue, 1 Oct 2024 04:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0tIzBd+P+FjjMfuFv/pT/6CZDwdwG+/x9BgjHm8+7GU=; b=E1P4avf2ZWbntgwmy6K73CUsr9L+qlKNliu0sH97EAXnOMIfES+fbuUaQZhPcuwwteOQPw f8jqDc0Ew+85iyiZXTvE0RJNQhH4cIA8g9+mBRD5UfgIXeCq1EbdfgCqACVgc1KJzbfj1U Gh2duVi/1kdgiigEID1BG+nbE85jHXrifjGjJ6kDKyCLP6jrNdm+cscBJGkZFTaYw2xHFy 8UfTsa9oLhDWLjwEa/qey0q9gVRdmGADEGbk1bm4XM6EcOO9P3AV/RbP5nsOKuS7oKAxHR MXc3ULYpcWNR6WznTPmypucocpdWC5rmU3290NYRCssE8jmlvU9oOZUMx0q1UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0tIzBd+P+FjjMfuFv/pT/6CZDwdwG+/x9BgjHm8+7GU=; b=Xv3PgoqvMr8O5Va0cZCCPJReaRuB6YWVa3kQhlW/bkcA2D9Kh+hBPBrgpISdRW/y6xULQB DwLFaVJ9ARztc8vV2YObt52I32Ho/oHlzNwDGauBOlDJgaYYr48aRb9cGvthRxmD2TeIFA Wfd99XRGoi85r1/aUi2Ol7+YRzw6B2Yz4wFKMOIdcZstCMCgRP9hlY1AEDvMMixphI4O5D aw3WuUCF9YYf5GPqdHK63eWi1TAM8gPyQsNc8M+/XXax7yfEmqxPlsPvzidGE8bUE8saq9 qHP8zxofPn/P68RZear6V/K2i9YP0A0iMhwP1VfDH2IeqXVHDGhMhFTpuuXSMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727757019; a=rsa-sha256; cv=none; b=dTXOzgdD6jC1QzfeOe08joPkLHD9QBlSaHUJbK+FTekXz/6OwzzgMGGUSLX16FbeNHyeuF he8sdtuBMMKQ9ar5X8FXLKqH6jlS6doQszUEQBNbUHX3wJL2GJUl1soJWVI6b8hmkJuJcD N2dOYtD3Oysiy2UYa8avx5wHhrcu/hC88zpjMcK5AeXpLUB/JfkpbDfyXk6cewp3/WDDcF rlNMxsHJj+EA10aTLkcdksDtTO9Jhz+r9zQ/GcvE6OR+M2rNDhtBmBJXugfyHfQ4ZbtTnt QZx+tG2xm4c2/vm4VlKtIBnlaKEjkuj8vLTmAVp7kUm837MemNm97hgkRzZ4JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlNW0mNCzNBx; Tue, 1 Oct 2024 04:30:19 +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 4914UJwW048099; Tue, 1 Oct 2024 04:30:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914UHe8048088; Tue, 1 Oct 2024 04:30:17 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:30:17 GMT Message-Id: <202410010430.4914UHe8048088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 87b2a3073aaf - stable/13 - wpa: Import 2.11 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87b2a3073aafe52aeaa966abf12b79e8f029622d Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=87b2a3073aafe52aeaa966abf12b79e8f029622d commit 87b2a3073aafe52aeaa966abf12b79e8f029622d Author: Cy Schubert AuthorDate: 2024-07-21 18:59:44 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:29:48 +0000 wpa: Import 2.11 Following is a changelog of new features and fixes to wpa: hostapd: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * HE/IEEE 802.11ax/Wi-Fi 6 - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * SAE: add support for fetching the password from a RADIUS server * support OpenSSL 3.0 API changes * support background radar detection and CAC with some additional drivers * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) * EAP-SIM/AKA: support IMSI privacy * improve 4-way handshake operations - use Secure=1 in message 3 during PTK rekeying * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases to avoid interoperability issues * support new SAE AKM suites with variable length keys * support new AKM for 802.1X/EAP with SHA384 * extend PASN support for secure ranging * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) - this is based on additional details being added in the IEEE 802.11 standard - the new implementation is not backwards compatible * improved ACS to cover additional channel types/bandwidths * extended Multiple BSSID support * fix beacon protection with FT protocol (incorrect BIGTK was provided) * support unsynchronized service discovery (USD) * add preliminary support for RADIUS/TLS * add support for explicit SSID protection in 4-way handshake (a mitigation for CVE-2023-52424; disabled by default for now, can be enabled with ssid_protection=1) * fix SAE H2E rejected groups validation to avoid downgrade attacks * use stricter validation for some RADIUS messages * a large number of other fixes, cleanup, and extensions wpa_supplicant: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * MACsec - add support for GCM-AES-256 cipher suite - remove incorrect EAP Session-Id length constraint - add hardware offload support for additional drivers * HE/IEEE 802.11ax/Wi-Fi 6 - support BSS color updates - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * support OpenSSL 3.0 API changes * improve EAP-TLS support for TLSv1.3 * EAP-SIM/AKA: support IMSI privacy * improve mitigation against DoS attacks when PMF is used * improve 4-way handshake operations - discard unencrypted EAPOL frames in additional cases - use Secure=1 in message 2 during PTK rekeying * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases to avoid interoperability issues * support new SAE AKM suites with variable length keys * support new AKM for 802.1X/EAP with SHA384 * improve cross-AKM roaming with driver-based SME/BSS selection * PASN - extend support for secure ranging - allow PASN implementation to be used with external programs for Wi-Fi Aware * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) - this is based on additional details being added in the IEEE 802.11 standard - the new implementation is not backwards compatible, but PMKSA caching with FT-EAP was, and still is, disabled by default * support a pregenerated MAC (mac_addr=3) as an alternative mechanism for using per-network random MAC addresses * EAP-PEAP: require Phase 2 authentication by default (phase2_auth=1) to improve security for still unfortunately common invalid configurations that do not set ca_cert * extend SCS support for QoS Characteristics * extend MSCS support * support unsynchronized service discovery (USD) * add support for explicit SSID protection in 4-way handshake (a mitigation for CVE-2023-52424; disabled by default for now, can be enabled with ssid_protection=1) - in addition, verify SSID after key setup when beacon protection is used * fix SAE H2E rejected groups validation to avoid downgrade attacks * a large number of other fixes, cleanup, and extensions Merge commit '6377230b3cf4f238dcd0dc2d76ff25943d3040e5' (cherry picked from commit a90b9d0159070121c221b966469c3e36d912bf82) --- contrib/wpa/CONTRIBUTIONS | 2 +- contrib/wpa/README | 2 +- contrib/wpa/hostapd/Android.mk | 28 +- contrib/wpa/hostapd/ChangeLog | 37 + contrib/wpa/hostapd/Makefile | 30 +- contrib/wpa/hostapd/README | 2 +- contrib/wpa/hostapd/android.config | 6 + contrib/wpa/hostapd/config_file.c | 481 +- contrib/wpa/hostapd/config_file.h | 7 +- contrib/wpa/hostapd/ctrl_iface.c | 1460 +++-- contrib/wpa/hostapd/defconfig | 21 +- contrib/wpa/hostapd/hostapd.conf | 356 +- contrib/wpa/hostapd/hostapd.eap_user | 4 +- contrib/wpa/hostapd/hostapd_cli.c | 217 +- contrib/wpa/hostapd/logwatch/hostapd | 65 - contrib/wpa/hostapd/main.c | 142 +- contrib/wpa/hs20/client/Android.mk | 10 + contrib/wpa/hs20/client/est.c | 37 +- contrib/wpa/hs20/client/osu_client.c | 115 +- contrib/wpa/hs20/client/spp_client.c | 1 - contrib/wpa/src/Makefile | 2 +- contrib/wpa/src/ap/acs.c | 568 +- contrib/wpa/src/ap/acs.h | 3 + contrib/wpa/src/ap/airtime_policy.c | 2 +- contrib/wpa/src/ap/ap_config.c | 205 +- contrib/wpa/src/ap/ap_config.h | 226 +- contrib/wpa/src/ap/ap_drv_ops.c | 359 +- contrib/wpa/src/ap/ap_drv_ops.h | 84 +- contrib/wpa/src/ap/ap_list.c | 6 +- contrib/wpa/src/ap/ap_mlme.c | 4 +- contrib/wpa/src/ap/authsrv.c | 94 + contrib/wpa/src/ap/beacon.c | 1212 +++- contrib/wpa/src/ap/beacon.h | 4 + contrib/wpa/src/ap/bss_load.c | 2 +- contrib/wpa/src/ap/comeback_token.c | 139 + contrib/wpa/src/ap/comeback_token.h | 21 + contrib/wpa/src/ap/ctrl_iface_ap.c | 599 +- contrib/wpa/src/ap/ctrl_iface_ap.h | 17 + contrib/wpa/src/ap/dfs.c | 608 +- contrib/wpa/src/ap/dpp_hostapd.c | 1417 ++++- contrib/wpa/src/ap/dpp_hostapd.h | 5 + contrib/wpa/src/ap/drv_callbacks.c | 881 ++- contrib/wpa/src/ap/fils_hlp.c | 10 +- contrib/wpa/src/ap/gas_query_ap.c | 10 +- contrib/wpa/src/ap/gas_serv.c | 11 +- contrib/wpa/src/ap/gas_serv.h | 2 +- contrib/wpa/src/ap/hostapd.c | 1441 ++++- contrib/wpa/src/ap/hostapd.h | 169 +- contrib/wpa/src/ap/hw_features.c | 233 +- contrib/wpa/src/ap/hw_features.h | 12 + contrib/wpa/src/ap/ieee802_11.c | 4030 ++++++++----- contrib/wpa/src/ap/ieee802_11.h | 83 +- contrib/wpa/src/ap/ieee802_11_auth.c | 162 +- contrib/wpa/src/ap/ieee802_11_auth.h | 5 +- contrib/wpa/src/ap/ieee802_11_eht.c | 1405 +++++ contrib/wpa/src/ap/ieee802_11_he.c | 87 +- contrib/wpa/src/ap/ieee802_11_ht.c | 5 +- contrib/wpa/src/ap/ieee802_11_shared.c | 215 +- contrib/wpa/src/ap/ieee802_11_vht.c | 32 +- contrib/wpa/src/ap/ieee802_1x.c | 233 +- contrib/wpa/src/ap/ieee802_1x.h | 2 +- contrib/wpa/src/ap/nan_usd_ap.c | 267 + contrib/wpa/src/ap/nan_usd_ap.h | 46 + contrib/wpa/src/ap/ndisc_snoop.c | 1 + contrib/wpa/src/ap/neighbor_db.c | 74 +- contrib/wpa/src/ap/neighbor_db.h | 1 + contrib/wpa/src/ap/pmksa_cache_auth.c | 32 +- contrib/wpa/src/ap/pmksa_cache_auth.h | 4 + contrib/wpa/src/ap/preauth_auth.c | 4 +- contrib/wpa/src/ap/rrm.c | 121 + contrib/wpa/src/ap/rrm.h | 2 + contrib/wpa/src/ap/sta_info.c | 469 +- contrib/wpa/src/ap/sta_info.h | 96 +- contrib/wpa/src/ap/utils.c | 14 +- contrib/wpa/src/ap/wmm.c | 7 - contrib/wpa/src/ap/wnm_ap.c | 216 +- contrib/wpa/src/ap/wpa_auth.c | 2459 ++++++-- contrib/wpa/src/ap/wpa_auth.h | 103 +- contrib/wpa/src/ap/wpa_auth_ft.c | 615 +- contrib/wpa/src/ap/wpa_auth_glue.c | 269 +- contrib/wpa/src/ap/wpa_auth_i.h | 47 +- contrib/wpa/src/ap/wpa_auth_ie.c | 95 +- contrib/wpa/src/ap/wpa_auth_kay.c | 45 +- contrib/wpa/src/ap/wps_hostapd.c | 5 +- contrib/wpa/src/ap/x_snoop.c | 5 + contrib/wpa/src/build.rules | 2 +- contrib/wpa/src/common/brcm_vendor.h | 8 +- contrib/wpa/src/common/common_module_tests.c | 2 +- contrib/wpa/src/common/defs.h | 67 +- contrib/wpa/src/common/dpp.c | 883 ++- contrib/wpa/src/common/dpp.h | 132 +- contrib/wpa/src/common/dpp_crypto.c | 239 +- contrib/wpa/src/common/dpp_i.h | 19 +- contrib/wpa/src/common/dpp_pkex.c | 59 +- contrib/wpa/src/common/dpp_reconfig.c | 18 +- contrib/wpa/src/common/dpp_tcp.c | 916 ++- contrib/wpa/src/common/dragonfly.c | 9 +- contrib/wpa/src/common/gas_server.c | 79 +- contrib/wpa/src/common/gas_server.h | 5 +- contrib/wpa/src/common/hw_features_common.c | 303 +- contrib/wpa/src/common/hw_features_common.h | 12 +- contrib/wpa/src/common/ieee802_11_common.c | 1090 +++- contrib/wpa/src/common/ieee802_11_common.h | 89 +- contrib/wpa/src/common/ieee802_11_defs.h | 722 ++- contrib/wpa/src/common/nan.h | 98 + contrib/wpa/src/common/nan_de.c | 1395 +++++ contrib/wpa/src/common/nan_de.h | 145 + contrib/wpa/src/common/ocv.c | 5 +- contrib/wpa/src/common/ptksa_cache.c | 74 +- contrib/wpa/src/common/ptksa_cache.h | 47 +- contrib/wpa/src/common/qca-vendor.h | 6323 +++++++++++++++++++- contrib/wpa/src/common/sae.c | 139 +- contrib/wpa/src/common/sae.h | 14 +- contrib/wpa/src/common/version.h | 2 +- contrib/wpa/src/common/wpa_common.c | 995 ++- contrib/wpa/src/common/wpa_common.h | 134 +- contrib/wpa/src/common/wpa_ctrl.c | 16 +- contrib/wpa/src/common/wpa_ctrl.h | 36 + contrib/wpa/src/crypto/crypto.h | 117 +- contrib/wpa/src/crypto/crypto_gnutls.c | 5 + contrib/wpa/src/crypto/crypto_internal.c | 5 + contrib/wpa/src/crypto/crypto_libtomcrypt.c | 5 + contrib/wpa/src/crypto/crypto_linux.c | 5 + contrib/wpa/src/crypto/crypto_module_tests.c | 281 + contrib/wpa/src/crypto/crypto_nettle.c | 5 + contrib/wpa/src/crypto/crypto_none.c | 5 + contrib/wpa/src/crypto/crypto_openssl.c | 2622 +++++++- contrib/wpa/src/crypto/crypto_wolfssl.c | 2043 ++++++- contrib/wpa/src/crypto/fips_prf_internal.c | 11 +- contrib/wpa/src/crypto/fips_prf_openssl.c | 15 + contrib/wpa/src/crypto/sha1-pbkdf2.c | 3 + contrib/wpa/src/crypto/sha256-internal.c | 3 - contrib/wpa/src/crypto/sha256.c | 21 +- contrib/wpa/src/crypto/sha384.c | 6 +- contrib/wpa/src/crypto/sha512-internal.c | 3 - contrib/wpa/src/crypto/sha512.c | 6 +- contrib/wpa/src/crypto/tls.h | 18 +- contrib/wpa/src/crypto/tls_gnutls.c | 1 + contrib/wpa/src/crypto/tls_internal.c | 11 +- contrib/wpa/src/crypto/tls_none.c | 1 + contrib/wpa/src/crypto/tls_openssl.c | 564 +- contrib/wpa/src/crypto/tls_openssl_ocsp.c | 26 +- contrib/wpa/src/crypto/tls_wolfssl.c | 284 +- contrib/wpa/src/drivers/driver.h | 964 ++- contrib/wpa/src/drivers/driver_atheros.c | 31 +- contrib/wpa/src/drivers/driver_bsd.c | 16 +- contrib/wpa/src/drivers/driver_common.c | 44 + contrib/wpa/src/drivers/driver_hostap.c | 20 +- contrib/wpa/src/drivers/driver_macsec_linux.c | 76 +- contrib/wpa/src/drivers/driver_macsec_qca.c | 4 +- contrib/wpa/src/drivers/driver_ndis.c | 8 +- contrib/wpa/src/drivers/driver_nl80211.c | 3443 ++++++++--- contrib/wpa/src/drivers/driver_nl80211.h | 113 +- contrib/wpa/src/drivers/driver_nl80211_capa.c | 354 +- contrib/wpa/src/drivers/driver_nl80211_event.c | 1291 +++- contrib/wpa/src/drivers/driver_nl80211_scan.c | 127 +- contrib/wpa/src/drivers/driver_roboswitch.c | 2 +- contrib/wpa/src/drivers/driver_wext.c | 11 +- contrib/wpa/src/drivers/driver_wired.c | 2 +- contrib/wpa/src/drivers/linux_ioctl.c | 11 +- contrib/wpa/src/drivers/ndis_events.c | 5 +- contrib/wpa/src/drivers/netlink.c | 6 +- contrib/wpa/src/drivers/nl80211_copy.h | 626 +- contrib/wpa/src/eap_common/eap_defs.h | 2 +- contrib/wpa/src/eap_common/eap_pwd_common.c | 23 +- contrib/wpa/src/eap_common/eap_sake_common.c | 19 +- contrib/wpa/src/eap_peer/eap.c | 44 + contrib/wpa/src/eap_peer/eap_aka.c | 198 +- contrib/wpa/src/eap_peer/eap_config.h | 46 +- contrib/wpa/src/eap_peer/eap_fast.c | 14 +- contrib/wpa/src/eap_peer/eap_i.h | 9 + contrib/wpa/src/eap_peer/eap_mschapv2.c | 30 +- contrib/wpa/src/eap_peer/eap_peap.c | 40 +- contrib/wpa/src/eap_peer/eap_pwd.c | 33 +- contrib/wpa/src/eap_peer/eap_sim.c | 202 +- contrib/wpa/src/eap_peer/eap_teap.c | 61 +- contrib/wpa/src/eap_peer/eap_tls.c | 15 +- contrib/wpa/src/eap_peer/eap_tls_common.c | 27 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 5 + contrib/wpa/src/eap_peer/eap_ttls.c | 32 +- contrib/wpa/src/eap_peer/eap_wsc.c | 14 +- contrib/wpa/src/eap_server/eap.h | 12 + contrib/wpa/src/eap_server/eap_i.h | 7 + contrib/wpa/src/eap_server/eap_server_aka.c | 126 +- contrib/wpa/src/eap_server/eap_server_eke.c | 1 + contrib/wpa/src/eap_server/eap_server_fast.c | 14 +- contrib/wpa/src/eap_server/eap_server_mschapv2.c | 28 +- contrib/wpa/src/eap_server/eap_server_peap.c | 18 + contrib/wpa/src/eap_server/eap_server_pwd.c | 33 +- contrib/wpa/src/eap_server/eap_server_sim.c | 133 +- contrib/wpa/src/eap_server/eap_server_teap.c | 39 +- contrib/wpa/src/eap_server/eap_server_tls.c | 10 +- contrib/wpa/src/eap_server/eap_server_tls_common.c | 18 +- contrib/wpa/src/eap_server/eap_server_ttls.c | 3 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 + contrib/wpa/src/eapol_auth/eapol_auth_sm.c | 26 +- contrib/wpa/src/eapol_auth/eapol_auth_sm.h | 5 +- contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h | 4 + contrib/wpa/src/eapol_supp/eapol_supp_sm.c | 17 +- contrib/wpa/src/eapol_supp/eapol_supp_sm.h | 18 +- contrib/wpa/src/fst/fst_group.c | 12 +- contrib/wpa/src/fst/fst_iface.c | 2 +- contrib/wpa/src/fst/fst_session.c | 6 +- contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 9 +- contrib/wpa/src/l2_packet/l2_packet_linux.c | 4 +- contrib/wpa/src/p2p/p2p.c | 123 +- contrib/wpa/src/p2p/p2p.h | 12 +- contrib/wpa/src/p2p/p2p_build.c | 20 +- contrib/wpa/src/p2p/p2p_dev_disc.c | 10 +- contrib/wpa/src/p2p/p2p_go_neg.c | 121 +- contrib/wpa/src/p2p/p2p_group.c | 14 +- contrib/wpa/src/p2p/p2p_i.h | 19 +- contrib/wpa/src/p2p/p2p_invitation.c | 31 +- contrib/wpa/src/p2p/p2p_parse.c | 27 +- contrib/wpa/src/p2p/p2p_pd.c | 43 +- contrib/wpa/src/p2p/p2p_sd.c | 23 +- contrib/wpa/src/p2p/p2p_utils.c | 84 +- contrib/wpa/src/pae/ieee802_1x_cp.c | 15 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 74 +- contrib/wpa/src/pae/ieee802_1x_kay.h | 5 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.c | 20 + contrib/wpa/src/pae/ieee802_1x_secy_ops.h | 1 + contrib/wpa/src/pasn/Makefile | 16 + contrib/wpa/src/pasn/pasn_common.c | 232 + contrib/wpa/src/pasn/pasn_common.h | 228 + contrib/wpa/src/pasn/pasn_initiator.c | 1406 +++++ contrib/wpa/src/pasn/pasn_responder.c | 1032 ++++ contrib/wpa/src/radius/radius.c | 297 +- contrib/wpa/src/radius/radius.h | 35 +- contrib/wpa/src/radius/radius_client.c | 789 ++- contrib/wpa/src/radius/radius_client.h | 27 +- contrib/wpa/src/radius/radius_das.c | 10 + contrib/wpa/src/radius/radius_server.c | 15 + contrib/wpa/src/rsn_supp/pmksa_cache.c | 260 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 105 +- contrib/wpa/src/rsn_supp/preauth.c | 19 +- contrib/wpa/src/rsn_supp/tdls.c | 332 +- contrib/wpa/src/rsn_supp/wpa.c | 2190 +++++-- contrib/wpa/src/rsn_supp/wpa.h | 88 +- contrib/wpa/src/rsn_supp/wpa_ft.c | 328 +- contrib/wpa/src/rsn_supp/wpa_i.h | 65 +- contrib/wpa/src/rsn_supp/wpa_ie.c | 36 +- contrib/wpa/src/tls/libtommath.c | 8 - contrib/wpa/src/tls/pkcs1.c | 6 +- contrib/wpa/src/tls/tlsv1_client_read.c | 3 +- contrib/wpa/src/tls/tlsv1_common.c | 6 +- contrib/wpa/src/tls/tlsv1_common.h | 3 +- contrib/wpa/src/tls/tlsv1_server_write.c | 2 +- contrib/wpa/src/utils/browser.c | 10 + contrib/wpa/src/utils/common.c | 15 +- contrib/wpa/src/utils/common.h | 38 + contrib/wpa/src/utils/crc32.c | 2 +- contrib/wpa/src/utils/crc32.h | 2 +- contrib/wpa/src/utils/http-utils.h | 1 + contrib/wpa/src/utils/http_curl.c | 73 +- contrib/wpa/src/utils/ip_addr.c | 19 + contrib/wpa/src/utils/ip_addr.h | 2 + contrib/wpa/src/utils/os.h | 42 +- contrib/wpa/src/utils/os_unix.c | 195 +- contrib/wpa/src/utils/trace.c | 6 +- contrib/wpa/src/utils/wpa_debug.c | 10 +- contrib/wpa/src/utils/wpa_debug.h | 1 + contrib/wpa/src/utils/wpabuf.h | 6 + contrib/wpa/src/wps/ndef.c | 6 + contrib/wpa/src/wps/wps.c | 5 +- contrib/wpa/src/wps/wps.h | 5 + contrib/wpa/src/wps/wps_attr_parse.c | 13 +- contrib/wpa/src/wps/wps_enrollee.c | 6 +- contrib/wpa/src/wps/wps_er.c | 4 +- contrib/wpa/src/wps/wps_i.h | 1 + contrib/wpa/src/wps/wps_registrar.c | 15 +- contrib/wpa/wpa_supplicant/Android.mk | 228 +- contrib/wpa/wpa_supplicant/ChangeLog | 50 + contrib/wpa/wpa_supplicant/Makefile | 308 +- contrib/wpa/wpa_supplicant/README | 4 +- contrib/wpa/wpa_supplicant/README-HS20 | 33 +- contrib/wpa/wpa_supplicant/README-NAN-USD | 147 + contrib/wpa/wpa_supplicant/README-WPS | 24 +- contrib/wpa/wpa_supplicant/android.config | 15 + contrib/wpa/wpa_supplicant/ap.c | 293 +- contrib/wpa/wpa_supplicant/ap.h | 24 +- contrib/wpa/wpa_supplicant/bgscan.h | 2 +- contrib/wpa/wpa_supplicant/bgscan_learn.c | 10 +- contrib/wpa/wpa_supplicant/bgscan_simple.c | 64 +- contrib/wpa/wpa_supplicant/bss.c | 563 +- contrib/wpa/wpa_supplicant/bss.h | 29 + contrib/wpa/wpa_supplicant/bssid_ignore.c | 30 +- contrib/wpa/wpa_supplicant/config.c | 487 +- contrib/wpa/wpa_supplicant/config.h | 150 +- contrib/wpa/wpa_supplicant/config_file.c | 108 +- contrib/wpa/wpa_supplicant/config_none.c | 3 +- contrib/wpa/wpa_supplicant/config_ssid.h | 114 +- contrib/wpa/wpa_supplicant/config_winreg.c | 5 +- contrib/wpa/wpa_supplicant/ctrl_iface.c | 1707 +++++- contrib/wpa/wpa_supplicant/ctrl_iface.h | 2 + contrib/wpa/wpa_supplicant/ctrl_iface_unix.c | 3 + .../wpa/wpa_supplicant/dbus/dbus_dict_helpers.c | 100 + .../wpa/wpa_supplicant/dbus/dbus_dict_helpers.h | 9 + contrib/wpa/wpa_supplicant/dbus/dbus_new.c | 142 +- contrib/wpa/wpa_supplicant/dbus/dbus_new.h | 24 + .../wpa/wpa_supplicant/dbus/dbus_new_handlers.c | 784 ++- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.h | 7 + .../wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 94 +- contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c | 209 +- contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h | 5 + .../wpa/wpa_supplicant/dbus/dbus_new_introspect.c | 2 +- contrib/wpa/wpa_supplicant/defconfig | 53 + .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 48 +- contrib/wpa/wpa_supplicant/dpp_supplicant.c | 2184 ++++++- contrib/wpa/wpa_supplicant/dpp_supplicant.h | 5 + contrib/wpa/wpa_supplicant/driver_i.h | 124 +- contrib/wpa/wpa_supplicant/eapol_test.c | 146 +- contrib/wpa/wpa_supplicant/events.c | 1741 +++++- contrib/wpa/wpa_supplicant/examples/dpp-nfc.py | 10 +- contrib/wpa/wpa_supplicant/gas_query.c | 56 +- contrib/wpa/wpa_supplicant/hs20_supplicant.c | 17 +- contrib/wpa/wpa_supplicant/ibss_rsn.c | 32 +- contrib/wpa/wpa_supplicant/ibss_rsn.h | 3 +- contrib/wpa/wpa_supplicant/interworking.c | 124 +- contrib/wpa/wpa_supplicant/main.c | 2 + contrib/wpa/wpa_supplicant/mbo.c | 25 +- contrib/wpa/wpa_supplicant/mesh.c | 16 +- contrib/wpa/wpa_supplicant/mesh_mpm.c | 74 +- contrib/wpa/wpa_supplicant/mesh_rsn.c | 27 +- contrib/wpa/wpa_supplicant/nan_usd.c | 513 ++ contrib/wpa/wpa_supplicant/nan_usd.h | 46 + contrib/wpa/wpa_supplicant/notify.c | 103 +- contrib/wpa/wpa_supplicant/notify.h | 14 +- contrib/wpa/wpa_supplicant/offchannel.c | 10 +- contrib/wpa/wpa_supplicant/op_classes.c | 150 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 483 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 13 +- contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c | 14 +- contrib/wpa/wpa_supplicant/pasn_supplicant.c | 1712 ++---- contrib/wpa/wpa_supplicant/preauth_test.c | 8 +- contrib/wpa/wpa_supplicant/robust_av.c | 341 +- contrib/wpa/wpa_supplicant/rrm.c | 132 +- contrib/wpa/wpa_supplicant/scan.c | 774 ++- contrib/wpa/wpa_supplicant/scan.h | 30 +- contrib/wpa/wpa_supplicant/sme.c | 948 ++- contrib/wpa/wpa_supplicant/sme.h | 14 +- .../systemd/wpa_supplicant-nl80211.service.arg.in | 2 +- .../systemd/wpa_supplicant.service.arg.in | 2 +- contrib/wpa/wpa_supplicant/utils/log2pcap.py | 9 +- contrib/wpa/wpa_supplicant/wmm_ac.c | 6 +- contrib/wpa/wpa_supplicant/wnm_sta.c | 532 +- contrib/wpa/wpa_supplicant/wnm_sta.h | 30 +- contrib/wpa/wpa_supplicant/wpa_cli.c | 144 +- contrib/wpa/wpa_supplicant/wpa_passphrase.c | 25 +- contrib/wpa/wpa_supplicant/wpa_priv.c | 11 +- contrib/wpa/wpa_supplicant/wpa_supplicant.c | 1679 ++++-- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 109 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 286 +- .../wpa_supplicant/wpa_supplicant_template.conf | 2 + contrib/wpa/wpa_supplicant/wpas_glue.c | 159 +- contrib/wpa/wpa_supplicant/wpas_glue.h | 2 + contrib/wpa/wpa_supplicant/wpas_kay.c | 53 +- contrib/wpa/wpa_supplicant/wpas_module_tests.c | 3 + contrib/wpa/wpa_supplicant/wps_supplicant.c | 166 +- contrib/wpa/wpa_supplicant/wps_supplicant.h | 13 + share/mk/src.libnames.mk | 4 + usr.sbin/wpa/Makefile.inc | 1 - usr.sbin/wpa/hostapd/Makefile | 3 +- usr.sbin/wpa/src/Makefile | 1 + usr.sbin/wpa/src/pasn/Makefile | 20 + usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 366 files changed, 66259 insertions(+), 12716 deletions(-) diff --git a/contrib/wpa/CONTRIBUTIONS b/contrib/wpa/CONTRIBUTIONS index b2064dc83443..6c8187cb190d 100644 --- a/contrib/wpa/CONTRIBUTIONS +++ b/contrib/wpa/CONTRIBUTIONS @@ -37,7 +37,7 @@ without moderation. You can subscribe to the list at this address: http://lists.infradead.org/mailman/listinfo/hostap The message should contain an inlined patch against the current -development branch (i.e., the master branch of +development branch (i.e., the main branch of git://w1.fi/hostap.git). Please make sure the software you use for sending the patch does not corrupt whitespace. If that cannot be fixed for some reason, it is better to include an attached version of the diff --git a/contrib/wpa/README b/contrib/wpa/README index 1470c4f23582..8392bb354fac 100644 --- a/contrib/wpa/README +++ b/contrib/wpa/README @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2022, Jouni Malinen and contributors +Copyright (c) 2002-2024, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with diff --git a/contrib/wpa/hostapd/Android.mk b/contrib/wpa/hostapd/Android.mk index bf26e41c6b23..573564d5b0de 100644 --- a/contrib/wpa/hostapd/Android.mk +++ b/contrib/wpa/hostapd/Android.mk @@ -154,6 +154,7 @@ OBJS += src/utils/crc32.c OBJS += src/common/ieee802_11_common.c OBJS += src/common/wpa_common.c OBJS += src/common/hw_features_common.c +OBJS += src/common/ptksa_cache.c OBJS += src/eapol_auth/eapol_auth_sm.c @@ -237,6 +238,8 @@ L_CFLAGS += -DCONFIG_OCV OBJS += src/common/ocv.c endif +NEED_AES_UNWRAP=y + ifdef CONFIG_IEEE80211R L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP OBJS += src/ap/wpa_auth_ft.c @@ -256,6 +259,7 @@ L_CFLAGS += -DCONFIG_SAE OBJS += src/common/sae.c ifdef CONFIG_SAE_PK L_CFLAGS += -DCONFIG_SAE_PK +NEED_AES_SIV=y OBJS += src/common/sae_pk.c endif NEED_ECC=y @@ -294,6 +298,12 @@ ifdef CONFIG_IEEE80211AC L_CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +L_CFLAGS += -DCONFIG_IEEE80211BE +OBJS += src/ap/ieee802_11_eht.c +endif + ifdef CONFIG_IEEE80211AX L_CFLAGS += -DCONFIG_IEEE80211AX endif @@ -572,6 +582,12 @@ L_CFLAGS += -DCONFIG_DPP3 endif endif +ifdef CONFIG_NAN_USD +OBJS += src/common/nan_de.c +OBJS += src/ap/nan_usd_ap.c +L_CFLAGS += -DCONFIG_NAN_USD +endif + ifdef CONFIG_PASN L_CFLAGS += -DCONFIG_PASN L_CFLAGS += -DCONFIG_PTKSA_CACHE @@ -579,7 +595,6 @@ NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA384_KDF=y NEED_SHA256=y NEED_SHA384=y -OBJS += src/common/ptksa_cache.c endif ifdef CONFIG_EAP_IKEV2 @@ -632,6 +647,11 @@ ifdef CHAP OBJS += src/eap_common/chap.c endif +ifdef CONFIG_RADIUS_TLS +TLS_FUNCS=y +L_CFLAGS += -DCONFIG_RADIUS_TLS +endif + ifdef TLS_FUNCS NEED_DES=y # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) @@ -653,6 +673,7 @@ L_CFLAGS += -DCONFIG_TLSV12 endif ifeq ($(CONFIG_TLS), openssl) +L_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 ifdef TLS_FUNCS OBJS += src/crypto/tls_openssl.c OBJS += src/crypto/tls_openssl_ocsp.c @@ -825,7 +846,9 @@ endif ifdef NEED_AES_ENCBLOCK AESOBJS += src/crypto/aes-encblock.c endif +ifneq ($(CONFIG_TLS), openssl) AESOBJS += src/crypto/aes-omac1.c +endif ifdef NEED_AES_UNWRAP ifneq ($(CONFIG_TLS), openssl) NEED_AES_DEC=y @@ -1026,6 +1049,9 @@ endif ifdef NEED_AP_MLME OBJS += src/ap/wmm.c OBJS += src/ap/ap_list.c +OBJS += src/ap/comeback_token.c +OBJS += src/pasn/pasn_responder.c +OBJS += src/pasn/pasn_common.c OBJS += src/ap/ieee802_11.c OBJS += src/ap/hw_features.c OBJS += src/ap/dfs.c diff --git a/contrib/wpa/hostapd/ChangeLog b/contrib/wpa/hostapd/ChangeLog index 279298e4d4d4..1c8240d333c4 100644 --- a/contrib/wpa/hostapd/ChangeLog +++ b/contrib/wpa/hostapd/ChangeLog @@ -1,5 +1,42 @@ ChangeLog for hostapd +2024-07-20 - v2.11 + * Wi-Fi Easy Connect + - add support for DPP release 3 + - allow Configurator parameters to be provided during config exchange + * HE/IEEE 802.11ax/Wi-Fi 6 + - various fixes + * EHT/IEEE 802.11be/Wi-Fi 7 + - add preliminary support + * SAE: add support for fetching the password from a RADIUS server + * support OpenSSL 3.0 API changes + * support background radar detection and CAC with some additional + drivers + * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) + * EAP-SIM/AKA: support IMSI privacy + * improve 4-way handshake operations + - use Secure=1 in message 3 during PTK rekeying + * OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases + to avoid interoperability issues + * support new SAE AKM suites with variable length keys + * support new AKM for 802.1X/EAP with SHA384 + * extend PASN support for secure ranging + * FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP) + - this is based on additional details being added in the IEEE 802.11 + standard + - the new implementation is not backwards compatible + * improved ACS to cover additional channel types/bandwidths + * extended Multiple BSSID support + * fix beacon protection with FT protocol (incorrect BIGTK was provided) + * support unsynchronized service discovery (USD) + * add preliminary support for RADIUS/TLS + * add support for explicit SSID protection in 4-way handshake + (a mitigation for CVE-2023-52424; disabled by default for now, can be + enabled with ssid_protection=1) + * fix SAE H2E rejected groups validation to avoid downgrade attacks + * use stricter validation for some RADIUS messages + * a large number of other fixes, cleanup, and extensions + 2022-01-16 - v2.10 * SAE changes - improved protection against side channel attacks diff --git a/contrib/wpa/hostapd/Makefile b/contrib/wpa/hostapd/Makefile index e37c13b27a6e..ca4439234a11 100644 --- a/contrib/wpa/hostapd/Makefile +++ b/contrib/wpa/hostapd/Makefile @@ -84,6 +84,7 @@ OBJS += ../src/ap/beacon.o OBJS += ../src/ap/bss_load.o OBJS += ../src/ap/neighbor_db.o OBJS += ../src/ap/rrm.o +OBJS += ../src/common/ptksa_cache.o OBJS_c = hostapd_cli.o OBJS_c += ../src/common/wpa_ctrl.o @@ -167,7 +168,7 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.o ifdef CONFIG_CODE_COVERAGE -CFLAGS += -O0 -fprofile-arcs -ftest-coverage +CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE LIBS += -lgcov LIBS_c += -lgcov LIBS_h += -lgcov @@ -276,6 +277,8 @@ CFLAGS += -DCONFIG_OCV OBJS += ../src/common/ocv.o endif +NEED_AES_UNWRAP=y + ifdef CONFIG_IEEE80211R CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP OBJS += ../src/ap/wpa_auth_ft.o @@ -295,6 +298,7 @@ CFLAGS += -DCONFIG_SAE OBJS += ../src/common/sae.o ifdef CONFIG_SAE_PK CFLAGS += -DCONFIG_SAE_PK +NEED_AES_SIV=y OBJS += ../src/common/sae_pk.o endif NEED_ECC=y @@ -339,6 +343,12 @@ ifdef CONFIG_IEEE80211AC CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +CFLAGS += -DCONFIG_IEEE80211BE +OBJS += ../src/ap/ieee802_11_eht.o +endif + ifdef CONFIG_IEEE80211AX CFLAGS += -DCONFIG_IEEE80211AX OBJS += ../src/ap/ieee802_11_he.o @@ -598,6 +608,12 @@ CFLAGS += -DCONFIG_DPP3 endif endif +ifdef CONFIG_NAN_USD +OBJS += ../src/common/nan_de.o +OBJS += ../src/ap/nan_usd_ap.o +CFLAGS += -DCONFIG_NAN_USD +endif + ifdef CONFIG_PASN CFLAGS += -DCONFIG_PASN CFLAGS += -DCONFIG_PTKSA_CACHE @@ -605,7 +621,6 @@ NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA384_KDF=y NEED_SHA256=y NEED_SHA384=y -OBJS += ../src/common/ptksa_cache.o endif ifdef CONFIG_EAP_IKEV2 @@ -667,6 +682,11 @@ ifdef CHAP OBJS += ../src/eap_common/chap.o endif +ifdef CONFIG_RADIUS_TLS +TLS_FUNCS=y +CFLAGS += -DCONFIG_RADIUS_TLS +endif + ifdef TLS_FUNCS NEED_DES=y # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) @@ -708,6 +728,7 @@ endif endif ifeq ($(CONFIG_TLS), openssl) +CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 CONFIG_CRYPTO=openssl ifdef TLS_FUNCS OBJS += ../src/crypto/tls_openssl.o @@ -932,11 +953,13 @@ endif ifdef NEED_AES_ENCBLOCK AESOBJS += ../src/crypto/aes-encblock.o endif +ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), wolfssl) AESOBJS += ../src/crypto/aes-omac1.o endif endif +endif ifdef NEED_AES_UNWRAP ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) @@ -1172,6 +1195,9 @@ endif ifdef NEED_AP_MLME OBJS += ../src/ap/wmm.o OBJS += ../src/ap/ap_list.o +OBJS += ../src/ap/comeback_token.o +OBJS += ../src/pasn/pasn_responder.o +OBJS += ../src/pasn/pasn_common.o OBJS += ../src/ap/ieee802_11.o OBJS += ../src/ap/hw_features.o OBJS += ../src/ap/dfs.o diff --git a/contrib/wpa/hostapd/README b/contrib/wpa/hostapd/README index 739c964d44d8..1a0248fce422 100644 --- a/contrib/wpa/hostapd/README +++ b/contrib/wpa/hostapd/README @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2022, Jouni Malinen and contributors +Copyright (c) 2002-2024, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with diff --git a/contrib/wpa/hostapd/android.config b/contrib/wpa/hostapd/android.config index c8b3afabef8d..522de87266d5 100644 --- a/contrib/wpa/hostapd/android.config +++ b/contrib/wpa/hostapd/android.config @@ -121,6 +121,9 @@ CONFIG_PKCS12=y # Build IPv6 support for RADIUS operations CONFIG_IPV6=y +# Include support fo RADIUS/TLS into the RADIUS client +#CONFIG_RADIUS_TLS=y + # IEEE Std 802.11r-2008 (Fast BSS Transition) #CONFIG_IEEE80211R=y @@ -212,3 +215,6 @@ CONFIG_NO_RANDOM_POOL=y # release under this optional build parameter. This functionality is subject to # be completely removed in a future release. CONFIG_WEP=y + +# Wi-Fi Aware unsynchronized service discovery (NAN USD) +#CONFIG_NAN_USD=y diff --git a/contrib/wpa/hostapd/config_file.c b/contrib/wpa/hostapd/config_file.c index b14728d1b507..3fb059770d49 100644 --- a/contrib/wpa/hostapd/config_file.c +++ b/contrib/wpa/hostapd/config_file.c @@ -1,6 +1,6 @@ /* * hostapd / Configuration file parser - * Copyright (c) 2003-2018, Jouni Malinen + * Copyright (c) 2003-2024, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -118,52 +118,6 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss, #endif /* CONFIG_NO_VLAN */ -int hostapd_acl_comp(const void *a, const void *b) -{ - const struct mac_acl_entry *aa = a; - const struct mac_acl_entry *bb = b; - return os_memcmp(aa->addr, bb->addr, sizeof(macaddr)); -} - - -int hostapd_add_acl_maclist(struct mac_acl_entry **acl, int *num, - int vlan_id, const u8 *addr) -{ - struct mac_acl_entry *newacl; - - newacl = os_realloc_array(*acl, *num + 1, sizeof(**acl)); - if (!newacl) { - wpa_printf(MSG_ERROR, "MAC list reallocation failed"); - return -1; - } - - *acl = newacl; - os_memcpy((*acl)[*num].addr, addr, ETH_ALEN); - os_memset(&(*acl)[*num].vlan_id, 0, sizeof((*acl)[*num].vlan_id)); - (*acl)[*num].vlan_id.untagged = vlan_id; - (*acl)[*num].vlan_id.notempty = !!vlan_id; - (*num)++; - - return 0; -} - - -void hostapd_remove_acl_mac(struct mac_acl_entry **acl, int *num, - const u8 *addr) -{ - int i = 0; - - while (i < *num) { - if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == 0) { - os_remove_in_array(*acl, *num, sizeof(**acl), i); - (*num)--; - } else { - i++; - } - } -} - - static int hostapd_config_read_maclist(const char *fname, struct mac_acl_entry **acl, int *num) { @@ -713,6 +667,10 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) val |= WPA_KEY_MGMT_FT_IEEE8021X_SHA384; #endif /* CONFIG_SHA384 */ #endif /* CONFIG_IEEE80211R_AP */ +#ifdef CONFIG_SHA384 + else if (os_strcmp(start, "WPA-EAP-SHA384") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SHA384; +#endif /* CONFIG_SHA384 */ else if (os_strcmp(start, "WPA-PSK-SHA256") == 0) val |= WPA_KEY_MGMT_PSK_SHA256; else if (os_strcmp(start, "WPA-EAP-SHA256") == 0) @@ -720,8 +678,12 @@ static int hostapd_config_parse_key_mgmt(int line, const char *value) #ifdef CONFIG_SAE else if (os_strcmp(start, "SAE") == 0) val |= WPA_KEY_MGMT_SAE; + else if (os_strcmp(start, "SAE-EXT-KEY") == 0) + val |= WPA_KEY_MGMT_SAE_EXT_KEY; else if (os_strcmp(start, "FT-SAE") == 0) val |= WPA_KEY_MGMT_FT_SAE; + else if (os_strcmp(start, "FT-SAE-EXT-KEY") == 0) + val |= WPA_KEY_MGMT_FT_SAE_EXT_KEY; #endif /* CONFIG_SAE */ #ifdef CONFIG_SUITEB else if (os_strcmp(start, "WPA-EAP-SUITE-B") == 0) @@ -1058,6 +1020,78 @@ static int add_r1kh(struct hostapd_bss_config *bss, char *value) return 0; } + + +int hostapd_config_read_rxkh_file(struct hostapd_bss_config *conf, + const char *fname) +{ + FILE *f; + char buf[256], *pos; + int line = 0, errors = 0; + + if (!fname) + return 0; + + f = fopen(fname, "r"); + if (!f) { + wpa_printf(MSG_ERROR, "rxkh file '%s' not found.", fname); + return -1; + } + + while (fgets(buf, sizeof(buf), f)) { + line++; + + if (buf[0] == '#') + continue; + pos = buf; + while (*pos != '\0') { + if (*pos == '\n') { + *pos = '\0'; + break; + } + pos++; + } + if (buf[0] == '\0') + continue; + + pos = os_strchr(buf, '='); + if (!pos) { + wpa_printf(MSG_ERROR, "Line %d: Invalid line '%s'", + line, buf); + errors++; + continue; + } + *pos = '\0'; + pos++; + + if (os_strcmp(buf, "r0kh") == 0) { + if (add_r0kh(conf, pos) < 0) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid r0kh '%s'", + line, pos); + errors++; + } + } else if (os_strcmp(buf, "r1kh") == 0) { + if (add_r1kh(conf, pos) < 0) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid r1kh '%s'", + line, pos); + errors++; + } + } + } + + fclose(f); + + if (errors) { + wpa_printf(MSG_ERROR, + "%d errors in configuring RxKHs from '%s'", + errors, fname); + return -1; + } + return 0; +} + #endif /* CONFIG_IEEE80211R_AP */ @@ -1644,6 +1678,8 @@ static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf, int line) return 0; } +#endif /* CONFIG_INTERWORKING */ + static int parse_qos_map_set(struct hostapd_bss_config *bss, char *buf, int line) @@ -1685,8 +1721,6 @@ static int parse_qos_map_set(struct hostapd_bss_config *bss, return 0; } -#endif /* CONFIG_INTERWORKING */ - #ifdef CONFIG_HS20 static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf, @@ -2197,6 +2231,7 @@ static int add_airtime_weight(struct hostapd_bss_config *bss, char *value) *** 122364 LINES SKIPPED *** From nobody Tue Oct 1 04:30:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlNX2xkkz5YBHY; Tue, 01 Oct 2024 04:30: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 4XHlNX1qS7z4Mkg; Tue, 1 Oct 2024 04:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPYdJibu4ldnsndAsI5Oig5qImVdtV9G1J4UUwhRsXY=; b=F4bO9tsc1hPXz8reA4gB4q6cmjulNeVrT7a08tGXyJuOqy95Gt6N2v58/GzwMLgCAElZY2 JB1fDy5q7TxinCW32ETqMIqbI41fnS4LhjVGW160+AMnnjsfOSsLFqKP0RWh85hfmtvWxI qSgEfCaWZa4+Bd56bsJ+n2hxJl2m66VRUyU2tTmBvZYQOm+r7faV2HGuM1IesJrfewiJ/J H8oFpdWKgnNyeapXpioTN8yxDm+OyP3U48kfiVg3gTqHxC8LFO7DjIuCynrpOBSjyF0Smt 0FdQNeaW2coKehDbJ0woyHRu3tKvGJPgPHA6QW4+ogzNZMVpu6Yc52FFwUG1wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPYdJibu4ldnsndAsI5Oig5qImVdtV9G1J4UUwhRsXY=; b=oIbLepIORGQK/Q02MPNHN7rSiPH+DbBuLFaUrkFn9xh3kZupdWNrfkgqGuB1z7GISODMr9 Q6LHfirZp7AyxKt25QFdMt5Vagm4zxeuyNUYm4GBWRGZnol7n+M4n63qcEi351SFqfzCFI Txc7/B0Dhf5BLj10RI7FZxf9WeUXFDX82Oi6fps1bJz/B44qPoCkhefyGaTT1sSHWr+f9h +uGjQneyKijHQQ01ZNWyAb+dKXGxaFhYFGevBdoNg5LKu4fMiideAxZBU40TDa/gPqWd/A ouOixUoS2iMv8vQDM+czAD1nrBRCGnksn6P5rXeWbwf7RkJzG1HGRE1nrIcYng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727757020; a=rsa-sha256; cv=none; b=JbwVraBZazN5I0IjmMJYBFdb2dlIRCiVQB0Y1SjjCWvxo9xKhlXWbWlevXtgzw5W0yI+Ik e8TqqAUxADbhO76n2/ui0qvkEHPtQ+NcdKDYwCqfARJ8x02S3OCEoSbz6IbqSjqspj7dH6 YW/ahlnD/ofRs3UVWAZ2t6XIqVlCiRr8iKr+SAjztpyM4JeRvGCn+QpFWBf9ILpT55t92i vN2+aSTiRrtfIN1z1LGmkCL9//uZ/vRbbAhfTZHiJK9C3rhquMlpnBHwlxzwHyu6AWE7kz d1OcBbBDQXmPtu14jQQNRpXyxcJMx0A7ActWY+G517AFQ3NCnfOPW0VYO0zV3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlNX1Qv9zNMw; Tue, 1 Oct 2024 04:30: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 4914UKdI048138; Tue, 1 Oct 2024 04:30:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914UKBM048135; Tue, 1 Oct 2024 04:30:20 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:30:20 GMT Message-Id: <202410010430.4914UKBM048135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: b4e224360e92 - stable/13 - wpa: Fix gcc build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b4e224360e92f8ddd63360c0017273ccdac6324b Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b4e224360e92f8ddd63360c0017273ccdac6324b commit b4e224360e92f8ddd63360c0017273ccdac6324b Author: Cy Schubert AuthorDate: 2024-07-24 15:04:33 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:29:48 +0000 wpa: Fix gcc build Order of libraries still matters with GCC toolchains. Moving the wpapasn library before the wpacommon specification resolves the link problem. This issue was not detected by make universe. Fixes: a90b9d015907 (cherry picked from commit 8880825df1f805fc02dbb8476df8183d4ec3781c) --- usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index a107157fbf73..3cb1d1c18689 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -52,7 +52,7 @@ CFLAGS+=-DCONFIG_BACKEND_FILE LIBADD+=pcap util wpadrivers wpaeapol_supp \ wpaeap_server \ wpaeap_peer wpaeap_common wpal2_packet wparsn_supp wpatls wpawps \ - wpacommon wpacrypto wpautils wpapasn + wpapasn wpacommon wpacrypto wpautils # User customizations to the wpa_supplicant build environment CFLAGS+=${WPA_SUPPLICANT_CFLAGS} From nobody Tue Oct 1 04:30:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XHlNY6p2Qz5YBFS; Tue, 01 Oct 2024 04:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHlNY4349z4MnH; Tue, 1 Oct 2024 04:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6vJ8w2Qnt7dZ5YR4d02rQ14RqjAhfwkDCFA1ZIYrBs=; b=oRR1FcyH5Pf7iuSTU+VxTILUC8NyuDPQnzG6Fh76wjl4ab1k9R3tDKehiEnVXsriYGErdm DVM3dOBqJJedBXOQQHHL7XuDMijGl5GJHSerXOmPIMskL6qcKNFon+0iNqZa/AB4O5Ft7R OxAcogFgqBSN9imvcfzbwcLP3NQRLQjVrux5UcONnJhXvr9VkcL0JXxBt9YeSnrVMZ1CKt 6YfFy844p6DeFInx/NyHg8ntGdWfopKGVdjkCSvtruFURJFeiQwuVPFpPF3iUZ7Zz36QHA PDxsPa3y6Tt4bD9wfw2kba3FPJcDEraSzXr0gY1v/Ty/GbP52umgoI6BY+s8SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727757021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6vJ8w2Qnt7dZ5YR4d02rQ14RqjAhfwkDCFA1ZIYrBs=; b=er1EnW9hxGhmgEBrIWm7N8BS7FTCQWqVRu6XMofXKSxAhjqxXPfuwt1u8cEyickg0VL5mk pIQh5q9pFK6yJavqnBMaJ7+fwJ19sNu6SN83JeQ2wdgdXwKpTkWlmA3QLskF3QWgGv1YDM 3AWfiJpTkBf6/DJM93qK7jmynLOcV6FSxKvml+IG3Xnnff3d+c2RbUI/rdJYAC1eZ4aoyH LKvuxyYsSRADcLjVlH/yocPy8IcHlbVD02fMeKsVHi970JeC4imAv0dwuS8kwE3bC8dd7H t+4i+BLsmELsTd0isaU7psaRyqbzNVosWI3acoBP3jq8lp3BZpqeKG625HuFZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727757021; a=rsa-sha256; cv=none; b=s5WroMubC1J+z4wXE2C931rLvVbpk5JNu/dQaTbRIn77M2CCHGCkkjqlZ+cbl6mVPPwN1Q Th0YVrwWFCv2Yvrvf1m+BE+ZfBFFpIyGjg51767lSd9pdfyqcGu9AkKQSM8Mr2Z34fX1LM VC4c4nAyOkcmvag043gCL+w9BrRpSek48W3PRvorhNZRev5SJvtutBbrW9iUrpTFZEyWPU B9AgPpLHcYWKSFtT6LN/fOVuvhubNoKWQzT/gDiqPUznQi5ZcNNNgPMCvQfK0RJAioEQZq 4QpAldwtv8Ltnp+orl5FBfMYuwcTUfmK5Li9AvHVIkZnwAw1hSnuue/Pg2/Z1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XHlNY2pVMzNMx; Tue, 1 Oct 2024 04:30:21 +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 4914ULMM048183; Tue, 1 Oct 2024 04:30:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4914UL85048180; Tue, 1 Oct 2024 04:30:21 GMT (envelope-from git) Date: Tue, 1 Oct 2024 04:30:21 GMT Message-Id: <202410010430.4914UL85048180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 33ad485f47a5 - stable/13 - ntp: Improve descriptions in man pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33ad485f47a51057bf5af9e45f4f32fc610f469e Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=33ad485f47a51057bf5af9e45f4f32fc610f469e commit 33ad485f47a51057bf5af9e45f4f32fc610f469e Author: Alexander Ziaee AuthorDate: 2024-08-05 19:37:42 +0000 Commit: Cy Schubert CommitDate: 2024-10-01 04:29:48 +0000 ntp: Improve descriptions in man pages + ntpd added to ntp.conf(5) description (search keywords) + expand NTP so these pages are shown when `apropos time` + "standard" => "reference" for increased consistency - removed redundant or duplicated search keywords ntp.org bug: https://bugs.ntp.org/show_bug.cgi?id=3936 Reviewed by: Harlan Stenn Reviewed by: Cy Schubert (cherry picked from commit c7a33fe37d7688cb21c743f68256680e003210ad) --- contrib/ntp/ntpd/ntp.conf.def | 2 +- contrib/ntp/ntpd/ntp.keys.def | 2 +- contrib/ntp/ntpd/ntpd-opts.def | 2 +- contrib/ntp/ntpq/ntpq-opts.def | 2 +- contrib/ntp/sntp/sntp-opts.def | 2 +- contrib/ntp/util/ntp-keygen-opts.def | 2 +- usr.sbin/ntp/doc/ntp-keygen.8 | 2 +- usr.sbin/ntp/doc/ntp.conf.5 | 2 +- usr.sbin/ntp/doc/ntp.keys.5 | 2 +- usr.sbin/ntp/doc/ntpd.8 | 2 +- usr.sbin/ntp/doc/ntpq.8 | 2 +- usr.sbin/ntp/doc/sntp.8 | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def index 444e3b35e351..aba3c25ab464 100644 --- a/contrib/ntp/ntpd/ntp.conf.def +++ b/contrib/ntp/ntpd/ntp.conf.def @@ -9,7 +9,7 @@ autogen definitions options; // file name. prog-name = "ntp.conf"; file-path = "/etc/ntp.conf"; -prog-title = "Network Time Protocol (NTP) daemon configuration file format"; +prog-title = "Network Time Protocol daemon (ntpd) configuration format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntp.keys.def b/contrib/ntp/ntpd/ntp.keys.def index e73ce4d06a1b..b0c9717e5906 100644 --- a/contrib/ntp/ntpd/ntp.keys.def +++ b/contrib/ntp/ntpd/ntp.keys.def @@ -10,7 +10,7 @@ autogen definitions options; // file name. prog-name = "ntp.keys"; file-path = "/etc/ntp.keys"; -prog-title = "NTP symmetric key file format"; +prog-title = "Network Time Protocol symmetric key format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntpd-opts.def b/contrib/ntp/ntpd/ntpd-opts.def index 00d35115dc43..6d4952a637c2 100644 --- a/contrib/ntp/ntpd/ntpd-opts.def +++ b/contrib/ntp/ntpd/ntpd-opts.def @@ -5,7 +5,7 @@ autogen definitions options; #include copyright.def prog-name = "ntpd"; -prog-title = "NTP daemon program"; +prog-title = "set clock via Network Time Protocol daemon"; argument = "[ ... ]"; #include ntpdbase-opts.def diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def index 85655a9d66cc..1189e81efe40 100644 --- a/contrib/ntp/ntpq/ntpq-opts.def +++ b/contrib/ntp/ntpq/ntpq-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntpq"; -prog-title = "standard NTP query program"; +prog-title = "query Network Time Protocol servers"; argument = '[ host ...]'; flag = { diff --git a/contrib/ntp/sntp/sntp-opts.def b/contrib/ntp/sntp/sntp-opts.def index 7664b1bf08b9..d468b6ef8bf5 100644 --- a/contrib/ntp/sntp/sntp-opts.def +++ b/contrib/ntp/sntp/sntp-opts.def @@ -6,7 +6,7 @@ autogen definitions options; #include copyright.def prog-name = "sntp"; -prog-title = "standard Simple Network Time Protocol client program"; +prog-title = "reference Simple Network Time Protocol client"; argument = '[ hostname-or-IP ...]'; #include homerc.def diff --git a/contrib/ntp/util/ntp-keygen-opts.def b/contrib/ntp/util/ntp-keygen-opts.def index 632dbbec778d..5c06bded15fd 100644 --- a/contrib/ntp/util/ntp-keygen-opts.def +++ b/contrib/ntp/util/ntp-keygen-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntp-keygen"; -prog-title = "Create a NTP host key"; +prog-title = "create a Network Time Protocol host key"; package = ntp; include = '#include '; diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8 index ad7b844d27de..3e8ffd9dbf58 100644 --- a/usr.sbin/ntp/doc/ntp-keygen.8 +++ b/usr.sbin/ntp/doc/ntp-keygen.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp-keygen -.Nd Create a NTP host key +.Nd create a Network Time Protocol host key .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5 index 9e23a2294c48..71fb7c668db2 100644 --- a/usr.sbin/ntp/doc/ntp.conf.5 +++ b/usr.sbin/ntp/doc/ntp.conf.5 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp.conf -.Nd Network Time Protocol (NTP) daemon configuration file format +.Nd Network Time Protocol daemon (ntpd) configuration format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntp.keys.5 b/usr.sbin/ntp/doc/ntp.keys.5 index d235f3b5f7dd..6bec2880163e 100644 --- a/usr.sbin/ntp/doc/ntp.keys.5 +++ b/usr.sbin/ntp/doc/ntp.keys.5 @@ -12,7 +12,7 @@ .Sh NAME .Nm ntp.keys -.Nd NTP symmetric key file format +.Nd Network Time Protocol symmetric key format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntpd.8 b/usr.sbin/ntp/doc/ntpd.8 index 74bc07793048..83beac3632a9 100644 --- a/usr.sbin/ntp/doc/ntpd.8 +++ b/usr.sbin/ntp/doc/ntpd.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpd -.Nd NTP daemon program +.Nd set clock via Network Time Protocol daemon .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntpq.8 b/usr.sbin/ntp/doc/ntpq.8 index e6c66ed71d97..21f15926a0ab 100644 --- a/usr.sbin/ntp/doc/ntpq.8 +++ b/usr.sbin/ntp/doc/ntpq.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpq -.Nd standard NTP query program +.Nd query Network Time Protocol servers .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/sntp.8 b/usr.sbin/ntp/doc/sntp.8 index 94c3c2816035..4509b6efa222 100644 --- a/usr.sbin/ntp/doc/sntp.8 +++ b/usr.sbin/ntp/doc/sntp.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm sntp -.Nd standard Simple Network Time Protocol client program +.Nd reference Simple Network Time Protocol client .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options From nobody Wed Oct 2 09:15:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTgJ2WYwz5YFDR; Wed, 02 Oct 2024 09:15: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 4XJTgJ211mz4qdx; Wed, 2 Oct 2024 09:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727860540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfoxD8Tl3D8+dPBlfpT33D3SQZ2bS60sFOn23J4VPG0=; b=UqPPB2raWsb+poS6JrQMP3Es66/tVs2S33Xix+PwQteS0cyU832rhrnPQXSSIy8Nvjdn1o 3ec1k8b7Nfib9gPrp2HaG+ky+kYvntfczlnURhnuqHtsnf0oFeeDqU5LhatltJ+yoCkrEE yvWRARCtZlA/UUO6+DhFVcC5BRL9iWkvlcKzc56zUYKCpPOrQxPSjddCjUqYx4s5nwZ7x8 6jBfo911QYsiBZ6fcsDSqZKzSDVSgv+ZoGFLquR9lovXnY5dVnpiGJ5gxc9oiR4g+34Jaf lsPvrrd9Pum0/lhPpL2FFADBrI3fYQ1OCiJGIpOKvRjIUnu8MPvTScx2kEe5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727860540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xfoxD8Tl3D8+dPBlfpT33D3SQZ2bS60sFOn23J4VPG0=; b=DTTQUNuwTt5OAwG04ywZ387RPuSG+ZMV+gN3uL1TMZj9deZkSoS0GI9cnJbUFybtOT+gxY naijmRFmuy4+doEOKOQWwhrsK5N5x6mGb7P+IbWSFP0rBIeoaEXCPDxcgLsFfC/O7lPrpf A9IEBa3Nm5npvfddrrg7OHyiN1dc2D2EK7sGauR7eWtK/HFv+UEiEwsBkN/OZJXuqZeJx2 g4s2Ho2EvQxc+IQox1XPQ1qXKJdULTrfLeJAZEs5PTISXm5oIFLxrZUQS6xWAKBfz5XI5g D3Yw1FUVzqu5LvRhwlcZ9cTZGvZoLaRBGCyrfE9aj60lOavk8ft/blwSoFuBig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727860540; a=rsa-sha256; cv=none; b=sYu9VPiuM+9bROU4Z4lwi0wDyRGXoWTG7Q+lQBh3mSRzANB6GlzEPKyVJ175W+dANrOe2T cSrFDfMIrsdJkyQOY2MDAPwS/Z+KLwvJPp4fFsQAJU8j4hwH+fo8IvSO8XmTxKbYQNniCM /n79SlRwXFEB6kWGCqaJJk0zUr8qKo0/ixjL+8KlTTP0BbBIp1SNGo4Ux1tZqusjpDnOzP GKLZ4ZA5w4gn8GUoFq7EQdLMR0iCd4RRV2cfwg5OvLqrlDHRZShm5jIC+F98ujdsmoZ+5e A9M7Tk1jczEcExScIjJG9B/QTnA0bIOgxV7RIgMI2Sb+DVZj648vUa0uU4zQcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTgJ1cCJz1F0B; Wed, 2 Oct 2024 09:15: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 4929FeF9072511; Wed, 2 Oct 2024 09:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929FeIE072508; Wed, 2 Oct 2024 09:15:40 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:15:40 GMT Message-Id: <202410020915.4929FeIE072508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2ab84513e930 - stable/14 - rc.d/dnctl: Chmod +x for consistency with other rc scripts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ab84513e93076331aa698e36ca8781c02b3c3ed Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ab84513e93076331aa698e36ca8781c02b3c3ed commit 2ab84513e93076331aa698e36ca8781c02b3c3ed Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-22 11:35:50 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:11:20 +0000 rc.d/dnctl: Chmod +x for consistency with other rc scripts MFC after: 1 week Approved by: bnovkov (cherry picked from commit 91fac46bf7cff03c3471422c67281041c5fa0f1f) --- libexec/rc/rc.d/dnctl | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/libexec/rc/rc.d/dnctl b/libexec/rc/rc.d/dnctl old mode 100644 new mode 100755 From nobody Wed Oct 2 09:15:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTgK5HC8z5YFG7; Wed, 02 Oct 2024 09:15: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 4XJTgK33jqz4qPb; Wed, 2 Oct 2024 09:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727860541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YQpNmxIV2N/stdHoOcVrRJtQoUh13DmPk9un/5/XMIs=; b=k6Q6ME0Nsf4qxyDQOTkTAEAyQdSEoEhcXZN+KpWav7+sw67nrjfDtnaVn3BxS53H2Mijua q09l30JeKu5u7cuZGwHIoWAl+QND0GbeAqkFfgzR0OgqasPj9UTlp+tgsFh4a0C/tVmax4 EtyjO6ZQIjyFPLcpcKLEcrCopCp2ZTZ4B1QaDjN+8HEcyOAGdVFn282ha7UWSs9m69ALaU EiLy4o+kQOjWJqQAGKWEvQaaMpsIxGN+qBv+0V5dmqBr6Xz7eR6h9tm+jPyl91eneSl0xx X8xWU8oQH6S/v5q3Y0O1WsDzB0BoEgzCmipzawdWV621E4/NDtWxai48k4eznQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727860541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YQpNmxIV2N/stdHoOcVrRJtQoUh13DmPk9un/5/XMIs=; b=Q1JVvvARncTM6zcu4cvwTfJejioeeLD2AkC087yoyKKNe5VjrSri1Y7TGCSUpS2u/ytW7h tAIvy4oMHby/x2snJVLdQ3o8WxjMNlzaULJmx8Ts7odXaODrOS5e2aTe4JSNPCoaUBaIGa amPC3+HWRpqScXeL6yOYGuw9Qs1JqPZjUFcnLtbeyGcaAwLjSUKfMYRaldSduO7IVGdmau bgYD3TXNa2cqEOQL0skiy03TY2Ou05Bl6kYNkOpgihmyB9mQBcBd4Pt3f4+0bcc+MlSzza 3KoG75JNFBeu22cAWTzq+f4Lq6tF1kHmUcKaA1QOgY7hgStt/0+pSaYfXFmlsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727860541; a=rsa-sha256; cv=none; b=v5oxnmX2Xwm09QZ7D7hCMRHIgy8vEyavYMfgpvIRHJVof+uh1fnr7+fa1JmFciq5tSeA9F IVdmL3KuOSu4yrOEDHN50JHazhtl4Lw3i/lRgKX6hkuEIsMBrPuenjtl6NuL3c9MccZXK0 Q4B2KNkJSDywQE5ltu0771D2BqMTanYpC7WKn73nJFw6x/Vuj1Tj7f+2Ip7olL5L23DT7l yIW83fzJNxUzGaYTI5M90LOiPldCbmde4+wqAeEoXl/EVo4cOse+56TIdjr1tDqUGJ0DLo oTu3xpVTwmzkMew7br2Qp0Zq945guIXJ621mIjcuRJKcV6cFqyb9XctRqP1GsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTgK2gKGz1FF6; Wed, 2 Oct 2024 09:15: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 4929Ff6x072571; Wed, 2 Oct 2024 09:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929Ff8J072568; Wed, 2 Oct 2024 09:15:41 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:15:41 GMT Message-Id: <202410020915.4929Ff8J072568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 422394b81b1b - stable/14 - rc.subr.8: Do not use mdoc macros for Bl width List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 422394b81b1b7e06aac2e977591301437ea3e3f3 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=422394b81b1b7e06aac2e977591301437ea3e3f3 commit 422394b81b1b7e06aac2e977591301437ea3e3f3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-22 11:42:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:13:20 +0000 rc.subr.8: Do not use mdoc macros for Bl width Macros do not expand there. MFC after: 1 week (cherry picked from commit 859868156a1658af71d57ee6c77c10fc192aa74a) --- share/man/man8/rc.subr.8 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index a32347a09eb2..8da84bb39d6b 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 18, 2024 +.Dd September 22, 2024 .Dt RC.SUBR 8 .Os .Sh NAME @@ -114,7 +114,7 @@ The .Ar action argument may be one of the following: -.Bl -tag -width ".Cm remove" +.Bl -tag -width "remove" .It Cm add .Ar file is now being backed up by or possibly re-entered into this backup mechanism. @@ -345,7 +345,7 @@ scripts to be implemented in a small amount of shell code. .Ar argument is searched for in the list of supported commands, which may be one of: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "restart" -offset indent .It Cm start Start the service. This should check that the service is to be started as specified by @@ -381,7 +381,7 @@ If or .Va procname is set, also support: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "status" -offset indent .It Cm poll Wait for the command to exit. .It Cm status @@ -393,7 +393,7 @@ Other supported commands are listed in the optional variable .Pp .Ar argument may have one of the following prefixes which alters its operation: -.Bl -tag -width ".Li force" -offset indent +.Bl -tag -width "force" -offset indent .It Li fast Skip the check for an existing running process, and sets @@ -437,7 +437,7 @@ but only certain small classes of them. .Ic run_rc_command uses the following shell variables to control its behaviour. Unless otherwise stated, these are optional. -.Bl -tag -width ".Va procname" -offset indent +.Bl -tag -width "procname" -offset indent .It Va name The name of this script. This is not optional. @@ -727,7 +727,7 @@ if .Ar argument Ns Va _cmd is not defined, then a default method is provided by .Ic run_rc_command : -.Bl -tag -width ".Sy Argument" -offset indent +.Bl -tag -width "Argument" -offset indent .It Sy Argument .Sy Default method .It Cm start @@ -796,7 +796,7 @@ The following variables are available to the methods as well as after .Ic run_rc_command has completed: -.Bl -tag -width ".Va rc_service" -offset indent +.Bl -tag -width "rc_service" -offset indent .It Va rc_arg Argument provided to .Ic run_rc_command , @@ -937,7 +937,7 @@ and then .Ar message . .El .Sh FILES -.Bl -tag -width ".Pa /etc/rc.subr" -compact +.Bl -tag -width "/etc/rc.subr" -compact .It Pa /etc/rc.subr The .Nm From nobody Wed Oct 2 09:29:52 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzh2qZGz5YG3w; Wed, 02 Oct 2024 09:29: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 4XJTzh259qz3wtj; Wed, 2 Oct 2024 09:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mwWUc+b93Qzfs1TWflF4fIecxNpu15v2WJ8bsa2Ilxs=; b=nrp+AdMXR95UCjAW4ARYfPx5PxuuaeRx30UMgbx5PEO291+C1IWJFQ1/aaGL4K8s0U2tdW 1wDSbNPpqx2IDnyCDiVYQxBkzgXtQM0ydNnHtv4gFjMsQQAi/Id6ktekKxtUh9odHkGd6c vWKoz3sfGr5ke63b2rwO1BOmsv9QQU4bzWpR1kJEYbaORyWgs2wvVVv4imnjk5aVbE2yYS V8WBrdPq7bf8xTVHITfBdFTONV1Tdtl+HO4h1A7E0U0b1/XzJwZEm8nZdm6RCrmu/YrGkg t5dEefcWN1NL9eUFY/1AZNDxVMsvCSj5focW7oSSa16QffJJv4UAw7WTVzROvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mwWUc+b93Qzfs1TWflF4fIecxNpu15v2WJ8bsa2Ilxs=; b=yKiDEfy/3tVMcOex6rxLDzqBJFNwBFR0WUXqnFWSUUdU0d/Z77MbnxJSQWIudL8C/X7uo8 5zSS1eZpg/7VUH13HGxd1TjqlQL2tDK3fHWVaEu8WB9aLfx9ItRTT9K3hQQl1sxatPaYEM pr68DWKiZNJsDhrHacxFEoqT3tzxymEhs1/cJw60HE1bGfdojzMZe0OaWWLo8f5DmmeEJL 3aZK/rJZEhj0+WQeh8g/F/LF/NFKNlPhzYXCX3HNgIstX0hUPLSmNoeFN1fJVzKsfrzTuf zRhnUkBb5b7VCR7c0oMrrSI9NVlqih5a1fDFS3oTL8vAHAjKbMTlrAfjbONWXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861392; a=rsa-sha256; cv=none; b=GGs2RWSLV2VSainz3EaPJh7q8Wu366TLJnDf0d2Mb7+z8IPocq+MIgkVbcTkPWQ35ge7An 74kAz8ZNxbW0xH2C26SBPUctyNdZl7kGX/sootZ48wJJ33HF9u9iaPiJzXMFGa7pGM0KsM 4Rby+h5bnFmU80qaLvsDfwLtc4xy2uOsXXzW9zvgmJNESRK/Xs8wjsw8N9PD/9lEtjNp1p DKYGrrgTCkv6D6yg0CJDKIzGmgpsjh9VxPBE6MtkqVXrtLHUuMqWcPj0hjY91VVCYyxu/S aH3t1ekRd1YA3knPVPn1cQ1Pi4wLX82d3qYA0lK08t8rN/KXvIT+4EPFh47T6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzh1hjDz1FFm; Wed, 2 Oct 2024 09:29: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 4929TqiW090147; Wed, 2 Oct 2024 09:29:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929Tq46090144; Wed, 2 Oct 2024 09:29:52 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:52 GMT Message-Id: <202410020929.4929Tq46090144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: cd28988c0b0a - stable/14 - rc.8: Remove false information about rc.d/local List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cd28988c0b0ad9ecc1d891935a3387187efef4ce Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=cd28988c0b0ad9ecc1d891935a3387187efef4ce commit cd28988c0b0ad9ecc1d891935a3387187efef4ce Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-20 09:07:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:24:34 +0000 rc.8: Remove false information about rc.d/local It does not handle scripts in /usr/local/etc/rc.d/. Instead, it takes care of /etc/rc.local and /etc/rc.shutdown.local. MFC after: 2 weeks (cherry picked from commit 9dc67a70650b99872316d7ff95ef45ea4c5b455a) --- share/man/man8/rc.8 | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index 2097c85fdc4d..fa736ce50394 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -31,6 +31,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" .Dd June 1, 2023 +.Dd September 20, 2024 .Dt RC 8 .Os .Sh NAME @@ -447,18 +448,6 @@ is not set, when going from single-user to multi-user mode for example, the script does not do anything. .Pp The -.Pa /etc/rc.d/local -script can execute scripts from multiple -.Nm rc.d/ -directories. -The default location includes -.Pa /usr/local/etc/rc.d/ , -but these may be overridden with the -.Va local_startup -.Xr rc.conf 5 -variable. -.Pp -The .Pa /etc/rc.d/serial script is used to set any special configurations for serial devices. .Pp From nobody Wed Oct 2 09:29:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzj3xY5z5YG3y; Wed, 02 Oct 2024 09:29: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 4XJTzj3P1dz3wrD; Wed, 2 Oct 2024 09:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGEX3D7GSe834O3VZ0HFmx72cTZv9hI4CM63yFqQinI=; b=DPAn9vEyoWk/dFinG+ghYow1aSO1fhmF5sNOo7sTUFvKtJvTO9LxENn3akGUK7gog2paLY rjoxgG2ID44oWSK+k/obFn3T0Kc/fA3jzQf5AffFIl9vS8P7UNhWsdhYMf3WMcEw7G+k8p kpuQd/tw2D29Z0GJrwZ2fXQEU+PCDpPpI45INXl6dAcSd3LWWg3eT/6RYpv8dOGkuFckNp 58WxLw3CCZbtioVIYxWKwo+PYYL264YXjROBVweUBbL6Jq6RuMdGGkkU6W8+Wx7qtniLLk xkBr09mg5uUjXkoY88j/7yFvK3fJ6f+4yf+k1qnJUiV78r8sB9cKybTVyuFcBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGEX3D7GSe834O3VZ0HFmx72cTZv9hI4CM63yFqQinI=; b=Y0zL/0Dd0BxDGBN4Lhn21l4pogLY87bBGJfGjC0hq3/iXoWohnDr69mUzCN6tnol4U0bBS Zr/4B5Plfj0FTL1xhisUp13Cz4Zd/2f+LxSJG37/gJ2iYO0HLRkNICnbc3bq+jNld4kVM7 xFWbXhcDGhKCJW1fKbgY4AbVYoXRWpWqV45KDlrc0joRRrmMPCWE7fBgOUS7V6GYVAd4hr yDsM+OJkONGW+uJTZOA7NxI1ElHQ34mXCC5rzrvwWzVgoO++uRruVheqirQCVS4BAYXk8r LzI5Z7q/H4NVtcc0hwGZwajnaxen/TQDaZZIMlii/zTwFTEdgKM0K80aFymiSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861393; a=rsa-sha256; cv=none; b=PjBG0X4mvaislH4/y+xGCVkJjZUsAeB82VklaNQQBEbE1dPWbu9ZN/r/Esgj6fTUmb+Vwm 3OiNlG2tD6QfnumoO3s3ltOFRfQs1+9N3Z2Jb/nKbb39+KqkH4JsF4avAcC0wUmqJCpI9T jJza1Gut3yot3kDzY0uxuN7elufcVQWAEXCpwGhyko3Lm1MOMybJduORqmjCYg8OxjYGEF 3COVR2Z7HpWlCcSGfj+0mO9GJP1XWFlSY9v9LfTcMim84l4OANChI4WwzSL9vZv3Nnv5+r noHw/CQRW8BDDiiJJd5pXW0mwvqK6L9qekV9lGijcLVBfSEjP4HrfPF3+sM8eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzj300tz1FBd; Wed, 2 Oct 2024 09:29: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 4929TrR7090207; Wed, 2 Oct 2024 09:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929Trg8090204; Wed, 2 Oct 2024 09:29:53 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:53 GMT Message-Id: <202410020929.4929Trg8090204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e3b57f1485e7 - stable/14 - rc.subr: Consistently use an absolute path for sysrc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e3b57f1485e7e1aed0285b953c4cca746c78a938 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b57f1485e7e1aed0285b953c4cca746c78a938 commit e3b57f1485e7e1aed0285b953c4cca746c78a938 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-20 09:27:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:27:00 +0000 rc.subr: Consistently use an absolute path for sysrc MFC after: 2 weeks Approved by: christos (cherry picked from commit 401516dbc54e4a4cba3085cd605fbf6cf8293b79) --- libexec/rc/rc.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 05d46f74e598..5140f2a1addc 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1113,8 +1113,8 @@ run_rc_command() delete) _files= - for _file in $(sysrc -lEs "$name"); do - _out=$(sysrc -Fif $_file "$rcvar") && _files="$_files $_file" + for _file in $(/usr/sbin/sysrc -lEs "$name"); do + _out=$(/usr/sbin/sysrc -Fif $_file "$rcvar") && _files="$_files $_file" done /usr/sbin/sysrc -x "$rcvar" && echo "$rcvar deleted in ${_files# }" # delete file in rc.conf.d if desired and empty. From nobody Wed Oct 2 09:29:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzk6YGFz5YG1X; Wed, 02 Oct 2024 09:29: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 4XJTzk4LvWz3wrd; Wed, 2 Oct 2024 09:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLYliVKb9JgvDKshNsPQFTof7ysZHkl8mBupU6jRJhY=; b=w8fNrsbKYpYw/4XufX2PMLIwbmPY2BD99l7jhCtGyVhdLghys5PLgkjQ7hTCuxUFRYfLQY bCZ6tb2ODwb9ouUDDeDNQFtyqta5rnoJ4B5qX7ydh0aWg6b5mP7G6udNV3gLfm5dPWpZLT lFXHk0gUbMmggLY+vVVPRCCJyj4MlPigFq27CUYUSOGCzrjG8aUpB2TfL3hVOneCG6GvuE IjKt2GE8vYASV37sUkUDqDpoEqEDJNLI21AaW1xoztlCYVoYeOzG9Je4f4HE2r09/0iRto SEn3D23fOt6o20CrmJD+UUXb8PW8jAGnUE+ky0NHliAtH/WOOHeI0oWXLPn93w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLYliVKb9JgvDKshNsPQFTof7ysZHkl8mBupU6jRJhY=; b=sAEPuoBYpjeuNG9w7ogNhO93zazD7KElxne6QLSUc06/ZxFNn07OnWTUUn/kzQfL//gMeT bd9DCCp7Tnah+13YazDMg+q0/rt0n6S9J5LO3sM2fed57xlAz66uPv52/kxgZf7J03UEOM od2R0a6QMu62mISZpBnvZPiujiOACM9T/bQEWEFYFAx5Dlk5WCuNqgT7yZ+sxHcoHwW81m Ybs6SJ9h65d5bJkIlR+PzylyYJjwDBJn6ESAofhC1LlZwQ3Jtb3+iXB3BRhB8xvPxb/HCo qr3RqiuxKoT5Vs1J83kNYm42tfgt/r2Onb2RtkEmf01FfofCviZk55oI2nX1jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861394; a=rsa-sha256; cv=none; b=Mtn6H7SnQ/DUHmK0WubKQvbHig0HhMWFBK2BT0EIVIM3Tf4j7plC/1WDxy+5KH5mMt/yxS ntY+KbSIQSAVBpxRpO6/8fNtrwpIz9fEfSa/0LO3W3tuEUvquw0rtIhbCY2cM8hPG4dYjm 3VrYWopvMNuRlW5Op/zYLhS6aXV9RHPoVKZauAct/30o35nJ7zjp1eaARrGkTo2XPxs6MB UBm6vtxaXFTkuPGud7iW7lAuyFX+9zdabSaxFh98OuP1A+q9nY/8SdJVywwx2i31/EwdTn I0zlfUEvXvkXKtQaCdoF5yYOTClXQwifk1ESF1/9th9xe122wFdvF4NduQffZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzk3mrDz1F8f; Wed, 2 Oct 2024 09:29: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 4929TsSA090275; Wed, 2 Oct 2024 09:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929TsVs090272; Wed, 2 Oct 2024 09:29:54 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:54 GMT Message-Id: <202410020929.4929TsVs090272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a12fc31ce9e1 - stable/14 - rc.subr.8: Fix the Bl macro of a list which is actually a table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a12fc31ce9e1d8668aeb7e6832fc188777a4da99 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=a12fc31ce9e1d8668aeb7e6832fc188777a4da99 commit a12fc31ce9e1d8668aeb7e6832fc188777a4da99 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-22 18:21:17 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:27:14 +0000 rc.subr.8: Fix the Bl macro of a list which is actually a table MFC after: 2 weeks (cherry picked from commit 6e414739fc95663836a5a10a8cf13e0211fd5efc) --- share/man/man8/rc.subr.8 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 8da84bb39d6b..2dd46cf50c2b 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -727,17 +727,16 @@ if .Ar argument Ns Va _cmd is not defined, then a default method is provided by .Ic run_rc_command : -.Bl -tag -width "Argument" -offset indent -.It Sy Argument -.Sy Default method -.It Cm start +.Bl -column "Argument" "Default Method" -offset indent +.It Sy Argument Ta Sy Default method +.It Cm start Ta If .Va command is not running and .Ic checkyesno Va rcvar succeeds, start .Va command . -.It Cm stop +.It Cm stop Ta Determine the PIDs of .Va command with @@ -749,7 +748,7 @@ or those PIDs, and run .Ic wait_for_pids on those PIDs. -.It Cm reload +.It Cm reload Ta Similar to .Cm stop , except that it uses @@ -766,21 +765,21 @@ It can be enabled via if appropriate: .Pp .Dl "extra_commands=reload" -.It Cm restart +.It Cm restart Ta Runs the .Cm stop method, then the .Cm start method. -.It Cm status +.It Cm status Ta Show the PID of .Va command , or some other script specific status operation. -.It Cm poll +.It Cm poll Ta Wait for .Va command to exit. -.It Cm rcvar +.It Cm rcvar Ta Display which .Xr rc.conf 5 variable is used (if any). From nobody Wed Oct 2 09:29:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzl461Pz5YG42; Wed, 02 Oct 2024 09:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJTzl1T60z3wxX; Wed, 2 Oct 2024 09:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvpIu9ypIhANOCGzI1ktKH7F+8vwhoeo0iowxvQJjMc=; b=scLQEBHfzzfH0Mlwn358GRpDcNG6rPaVScR7NvSdcDhjH5rMbmaQk3uWrsKIYVMKRkaSeK Rbq2CwfL4i6SXeFCvJymJr6ZQ3uvBw1v8M8BNOB/cOI+gQmuXKYKsAUP9s8qN6P2CU/Xoz q7NCViALj22Obz8YR2UhCr4VFCC5eVPUN8dVy76SvIHA/4Gx3cfrfvczuxK8uRfPgaH6P4 fNm/psNXa9DtIKxw0a3qz1qy9z2gf00L2H5o1JJ8tSIeh/+M0nZ2QMQ3JmbjJpbhHJYUR2 ibsLUzY5fr4BBXCVRLIXhUrgaHX6eRSp6FfQaPzqCQcir+R9O9J88ko9RRFvxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvpIu9ypIhANOCGzI1ktKH7F+8vwhoeo0iowxvQJjMc=; b=iXRaGkccseDtSnCR2MRkNGVe0fIywWORYyQy5L3Sqc+tTEt9kz55qVcqzzIdc+mWi5xsjv rGRvxhAJmFVMY1jMljWPhsmy0+H1YbQuQcNrN/8tOK8ZVazxr9mRC6uNe2A7mEPji/pxul th+qg89Y7ZetvtD6f2TGinwVG0zxWIGNS6TYwLaUDMNmrYl2AtHsSexs4uDIsHKUc9w/tz e9nRueHCX99+bs6GNLCW8cJ9yFpN2DwN2X7kLA1TUz3c/LwFUVV7gQdfgyF1t80izO0h5F tQRtQ3lH9Ww9M7v4XuWa0MK5JceB6nQoZWj/kZi9zIAcr7PCJCldAFRn8wm81A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861395; a=rsa-sha256; cv=none; b=sXr12abd7hQnvV8F3QE+/KVmobuUW5IVtYNUnBPm0YLUL3JORfTWdPsvlkf3TO7K3AgcYo tiOP/UKEICPlMS1aCgsfartSmuC+07uvMQdQc5S7p6iNMJzDtoZScmy1paWMwv3rcpe5sh hnDsyA8oly85gUpKCEP4F0HPivBeV9ElfGqFC8gDcD59AsP7KX0p7cfR/IrGbSjRlHzFrI O9hKxxr5JnAE7LFN/Aequ5w74wZButKBSW74WtmTMElQ6/+6VuJxHfObDK2ytJOoQFuswx XxN63pdNhSjwcvjXcii9mVraCevaVILWFRv1OWC+TYjIufyIlCLDDxDmE8e2fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzl13jnz1Dxb; Wed, 2 Oct 2024 09:29: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 4929Ttio090397; Wed, 2 Oct 2024 09:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929Tt9a090394; Wed, 2 Oct 2024 09:29:55 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:55 GMT Message-Id: <202410020929.4929Tt9a090394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b13093260ad4 - stable/13 - rc.subr.8: Do not use mdoc macros for Bl width List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b13093260ad4122ff1e875df9eaee0d243d9e46e Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b13093260ad4122ff1e875df9eaee0d243d9e46e commit b13093260ad4122ff1e875df9eaee0d243d9e46e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-22 11:42:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:22:58 +0000 rc.subr.8: Do not use mdoc macros for Bl width Macros do not expand there. MFC after: 1 week (cherry picked from commit 859868156a1658af71d57ee6c77c10fc192aa74a) --- share/man/man8/rc.subr.8 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 9126cc5e8ac6..888e9f914b99 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 18, 2024 +.Dd September 22, 2024 .Dt RC.SUBR 8 .Os .Sh NAME @@ -114,7 +114,7 @@ The .Ar action argument may be one of the following: -.Bl -tag -width ".Cm remove" +.Bl -tag -width "remove" .It Cm add .Ar file is now being backed up by or possibly re-entered into this backup mechanism. @@ -345,7 +345,7 @@ scripts to be implemented in a small amount of shell code. .Ar argument is searched for in the list of supported commands, which may be one of: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "restart" -offset indent .It Cm start Start the service. This should check that the service is to be started as specified by @@ -381,7 +381,7 @@ If or .Va procname is set, also support: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "status" -offset indent .It Cm poll Wait for the command to exit. .It Cm status @@ -393,7 +393,7 @@ Other supported commands are listed in the optional variable .Pp .Ar argument may have one of the following prefixes which alters its operation: -.Bl -tag -width ".Li force" -offset indent +.Bl -tag -width "force" -offset indent .It Li fast Skip the check for an existing running process, and sets @@ -437,7 +437,7 @@ but only certain small classes of them. .Ic run_rc_command uses the following shell variables to control its behaviour. Unless otherwise stated, these are optional. -.Bl -tag -width ".Va procname" -offset indent +.Bl -tag -width "procname" -offset indent .It Va name The name of this script. This is not optional. @@ -724,7 +724,7 @@ if .Ar argument Ns Va _cmd is not defined, then a default method is provided by .Ic run_rc_command : -.Bl -tag -width ".Sy Argument" -offset indent +.Bl -tag -width "Argument" -offset indent .It Sy Argument .Sy Default method .It Cm start @@ -793,7 +793,7 @@ The following variables are available to the methods as well as after .Ic run_rc_command has completed: -.Bl -tag -width ".Va rc_service" -offset indent +.Bl -tag -width "rc_service" -offset indent .It Va rc_arg Argument provided to .Ic run_rc_command , @@ -934,7 +934,7 @@ and then .Ar message . .El .Sh FILES -.Bl -tag -width ".Pa /etc/rc.subr" -compact +.Bl -tag -width "/etc/rc.subr" -compact .It Pa /etc/rc.subr The .Nm From nobody Wed Oct 2 09:29:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzm41P5z5YG1Y; Wed, 02 Oct 2024 09:29: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 4XJTzm2MbHz3wmQ; Wed, 2 Oct 2024 09:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJrGyawM3JJ4xKjIRXhoSsporJaWQtv9Y+OZ+wQ5jsg=; b=yIFcCrAf7fGzeZyXubEUegdZSm5/DImaHguF8cafxjJe+KWeeaUM3azbQzxpiSdmIApCvD WHPiGUZaYCzs4LqK11uFSKBvMpXHfd/pzF9kmTbXS88nhvosQjFbyHu/3ocDIeADq3S7V9 Gu3ZuNRY+Kt0a0kyrTAmQkWOOHp65VWnZdoXv02MAU8JPes4eAOpgEFGtLXm7bJ0TAwH20 RLrc+RnAwDacBfnzwqdyK+s5sb4O/6a5geXVE2QwgpIk9qMeNtI1MUSc3CxY+9NRHf2UIS m879rJPExvyPEAQXL6/S9zofz1pa53QkwH7W2YsY3U5lczrR0DD5yp62iPukhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJrGyawM3JJ4xKjIRXhoSsporJaWQtv9Y+OZ+wQ5jsg=; b=IN9XkNiKvXER2u/iS3Ss31K1WZ5Ad40gmBQDEDz9jNtBNvSzh9m6jYtxP7jdGz9+tmskom h+G4Jo0fysZRcGhFu8m85kMzwDytsjm4ls9/MM1T7ujEt70ma+YEHB1dwVVbSfZG+bNHuT TOH71AfmHWY2Rw4Kz9uwucZQ4MSGD36/E+QfHTHIA0nh9/jQP+nSV+OMGg+6DJ1BI/9KpA 6iKq9Ba+IiDAjzP44yvhjmA2LFHM92BauyC+TmpuTLiK4jJfDScfK7KcnOPVxPOfQDkSpw rOUn7NMLs3U5ZBKcdRltil/nP1AOQ+DpJ9Mw/V7oMs3+Q268hy4ayXFVeZPTpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861396; a=rsa-sha256; cv=none; b=mD2px1fY8DBF6b1FM7NQ4NmEw8GZTe4/aGTVw4Cwblg/KncHk5tkL7rlMlMWrTsNjzlRgH PLp3Nu19byZqBf4DarwKCSByitkaAqapuhvcIvU0BquhGsHjfLO4lOsj5FKL33SB8A4Yqv ivMs5RPGcuHfvpU4dwWzN+M0ydpXPM8je3rNwfFDK72OUePVF91ZTZQbI7kQjV9kCdw+pB O/J5xRmF1eR8yv5wXZgrMkRRjL/IhZIhFYflyBRpwwMQBIdZ3qDsbM1ru/ff5xhDvGXfE4 9kNMI6SJFhRiTjPJtuMzrxmJC3DMPGLLeGBeHKKbUH/PS7hO6bhETlIp9I9q3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzm1zX2z1FBf; Wed, 2 Oct 2024 09:29: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 4929Tu26090475; Wed, 2 Oct 2024 09:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929TuPC090472; Wed, 2 Oct 2024 09:29:56 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:56 GMT Message-Id: <202410020929.4929TuPC090472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: d51260ef9447 - stable/13 - rc.8: Remove false information about rc.d/local List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d51260ef94479a5e967d2b9eca74abc29c57d65c Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=d51260ef94479a5e967d2b9eca74abc29c57d65c commit d51260ef94479a5e967d2b9eca74abc29c57d65c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-20 09:07:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:25:33 +0000 rc.8: Remove false information about rc.d/local It does not handle scripts in /usr/local/etc/rc.d/. Instead, it takes care of /etc/rc.local and /etc/rc.shutdown.local. MFC after: 2 weeks (cherry picked from commit 9dc67a70650b99872316d7ff95ef45ea4c5b455a) --- share/man/man8/rc.8 | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index 2097c85fdc4d..104dbbcdfbc9 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -30,7 +30,7 @@ .\" .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" -.Dd June 1, 2023 +.Dd September 20, 2024 .Dt RC 8 .Os .Sh NAME @@ -447,18 +447,6 @@ is not set, when going from single-user to multi-user mode for example, the script does not do anything. .Pp The -.Pa /etc/rc.d/local -script can execute scripts from multiple -.Nm rc.d/ -directories. -The default location includes -.Pa /usr/local/etc/rc.d/ , -but these may be overridden with the -.Va local_startup -.Xr rc.conf 5 -variable. -.Pp -The .Pa /etc/rc.d/serial script is used to set any special configurations for serial devices. .Pp From nobody Wed Oct 2 09:29:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzn71Skz5YGBh; Wed, 02 Oct 2024 09:29: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 4XJTzn3C0gz3wqd; Wed, 2 Oct 2024 09:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yNZbfLTwQWrqaBy4qgdSO9Fp0r0i5SDzW/vO1caM8T4=; b=TccJPPlBc3twy4nChshZNx72bv55PVY8C4W4jzFcQTxG+dY1FNgXJXIyrOBVr1wrKuRjvB TlwM7TEY3slaOZIWYKGzeOaiNy7Kwl4eHOYktpPQ0TZKRiA7YDd7OIBwaBPEYZL4VqbE65 jzyrDepKXDyIgKCU+JviPEIh5J+j3aweNB8nEnZnJMV0BZBrbgrtDHcaktNlXatxyKWUq2 27NQ2hQd9XLJZCKNkuWkpv4G2MTbqxQAWvkbn7X80gpI0nXQs/Yts0RGVab/JBzARblFEb FIFsSzcLItUMQ/hHPuQtssPsMSN2LcOhzn3yXcscwGNDn7hcg19Y/kvpgG0L/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yNZbfLTwQWrqaBy4qgdSO9Fp0r0i5SDzW/vO1caM8T4=; b=RhMnx7bH3ElTQdYhMMU75arqRczPBm8xs3hoewq3V5mX4Racc2bNHgTpphfXy9tKjSWEUp weTl90cOINjb25t7J6W8NTLnavi9HchKRDDtRjQvGfQWopqldCT6nXT6UA86bM5Al7oVHt Z43WtgE71CxxhfBKnOBkV7DJZlwdLxyctMOWBfU5Zmkf8iTBrd8GIOKII+R3wrMqbyOi/V Ji7YTHczsDi3r2TjAdz7alRGVNWwyZA404NgFo9ZpsdZtx9xn2qNa5kH+ETG2S8bPx+viG XIyg0IW2y9j/pil+Jidqu2ruQA4mZFoB4opsgIIB+AEmANd7vuUGjFhc3MjIcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861397; a=rsa-sha256; cv=none; b=x5FPrRRrX/TQiYDOPmwxbfhF0w3qmOKTimEr/lWR9NTFaedvHrC2vfJoMRQFkJaTB0KJP1 ShQz2YhhJ4+4lNhmOeJMT0ngDD03mgqCZQeZXlCeMAd4BOKoDFC/mcGGsojJWZ5GFGv14y Bp/g5SNCSZ2jlB1oyTn8NhfaTN0HVeJLswtahLTlxDtTqX2Xwk64J4wU83dwOnP74MPOdp w03Kur0PS7vo7h5ErEK8vI0Jxbet6TyU+uZHmFvvSZYcE4i1KUxl7LGdo2+gwk5furX2Ss dkuI9P66vfCjxIPUkl6qYyapsXbp5LkpAKVZKFzDFsxEwFCudljc8kEaTb4YTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzn2q3Jz1Fg6; Wed, 2 Oct 2024 09:29:57 +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 4929Tvil090533; Wed, 2 Oct 2024 09:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929TvTO090530; Wed, 2 Oct 2024 09:29:57 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:57 GMT Message-Id: <202410020929.4929TvTO090530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 35d8a02eead8 - stable/13 - rc.subr: Consistently use an absolute path for sysrc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35d8a02eead8a3fb4da232ad27935834d135b3ae Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=35d8a02eead8a3fb4da232ad27935834d135b3ae commit 35d8a02eead8a3fb4da232ad27935834d135b3ae Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-20 09:27:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:27:05 +0000 rc.subr: Consistently use an absolute path for sysrc MFC after: 2 weeks Approved by: christos (cherry picked from commit 401516dbc54e4a4cba3085cd605fbf6cf8293b79) --- libexec/rc/rc.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index f1eeb81a5d39..99dcc41c50a1 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1086,8 +1086,8 @@ run_rc_command() delete) _files= - for _file in $(sysrc -lEs "$name"); do - _out=$(sysrc -Fif $_file "$rcvar") && _files="$_files $_file" + for _file in $(/usr/sbin/sysrc -lEs "$name"); do + _out=$(/usr/sbin/sysrc -Fif $_file "$rcvar") && _files="$_files $_file" done /usr/sbin/sysrc -x "$rcvar" && echo "$rcvar deleted in ${_files# }" # delete file in rc.conf.d if desired and empty. From nobody Wed Oct 2 09:29:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJTzp6d2yz5YFwR; Wed, 02 Oct 2024 09:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJTzp4GRzz3x1Q; Wed, 2 Oct 2024 09:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJQUQG8Ih54zP/ZJieztQKmcgfhxm4bfu1OUqPQ5xE0=; b=NH0u3k2mwqzV0BVq8B5LAG8TT2qYk/O0KhlKYGO8rjfTHT3MpxhlO3qtTwG5058uQg5kPD m805APJ9RuQi8BN+08o61sBHLf5P/rFvFA/G35pHvdN2E4F8IVzyMjGzAxIYIuZKgttK87 KMXUUU2FPWywIU+LGKp29Jxbm28/Wp66R3fkoMtEgjVAM8KLL3gO/UZYmo0K8oRG687RUK gge+JeOtQg1IyrIhWQa7/w2Ip9y7xrhVBUM74pg4jefrwLvsraIXKsOIx5mB8ysGl2BtMm W6N5+Z9kzRAi2aVCSzG0br1eF4UcJg5Og4halGGODTE6oBJUnajvbIzAQwDdGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727861398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJQUQG8Ih54zP/ZJieztQKmcgfhxm4bfu1OUqPQ5xE0=; b=h3xbUnzaOkV0Jd9/ZtPriDRQgbMkC87W1t79gG94BBzjjGwOnpvDQSFiWTmBYFMeon2RBj Mh3KZtqtPFbVVGkFgDye2YRCsn2fG+TAv54JxVivxozlJVaRJwlHqXzv1XAX19Lur3eELZ 52CwDl4E1Sncmtjd9Lk1Ri29kiDakNYrDzR+XHzdym7Z13le6WLlxV3ysc4NUgtKi4v1UX VXdHUcBBxWNTgHSBj+rYjvVQr6fw1+MuPVl1hbVxrfyXZ+MGbb9hsQhAx6EkOBEX7RHrHg gfV++3+5jAa8HYZDMwV/1n1hnooYegdUZ60IPqZVGCjxdkuC9+aBz5RyEJQSKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727861398; a=rsa-sha256; cv=none; b=r2pUGoB8LAAaEnb6upmq2v/EknQ5iBRlg1drCzT5pPHaUXzW9UF/Wqb9EhXrExzobh7vTq DwWTEoFms90LakTDqzS/YIFKVMWreEt2PrjtVjscgwSyZOv+nuIeXcA1/YlSNbgtsL6kfY SVnFtU+uc8fq1EuFh5qn6Ba1FJDGTlRl3AYiE0+Ta6IqOdkm7jffGvnULky3kjp522Xvzh eH3rl6Cd94IZKSjp/qK7/Mf+OZYQ5q/h4cn0C39Nq7kANV4+fxa9uxihjmS+AtINddUUAq jj76RNg8CL7FVJ2iflEAR3vc/gkGb7EK5LYOnwFs3TdfnNSkyKC9iLle0uysYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJTzp3t6jz1FBg; Wed, 2 Oct 2024 09:29:58 +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 4929TwQ0090600; Wed, 2 Oct 2024 09:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4929TwEZ090597; Wed, 2 Oct 2024 09:29:58 GMT (envelope-from git) Date: Wed, 2 Oct 2024 09:29:58 GMT Message-Id: <202410020929.4929TwEZ090597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 416612c63772 - stable/13 - rc.subr.8: Fix the Bl macro of a list which is actually a table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 416612c6377266f20def000ea0b68d04d1ed8bd6 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=416612c6377266f20def000ea0b68d04d1ed8bd6 commit 416612c6377266f20def000ea0b68d04d1ed8bd6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-09-22 18:21:17 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-02 09:27:12 +0000 rc.subr.8: Fix the Bl macro of a list which is actually a table MFC after: 2 weeks (cherry picked from commit 6e414739fc95663836a5a10a8cf13e0211fd5efc) --- share/man/man8/rc.subr.8 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 888e9f914b99..b506eb1d6ee3 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -724,17 +724,16 @@ if .Ar argument Ns Va _cmd is not defined, then a default method is provided by .Ic run_rc_command : -.Bl -tag -width "Argument" -offset indent -.It Sy Argument -.Sy Default method -.It Cm start +.Bl -column "Argument" "Default Method" -offset indent +.It Sy Argument Ta Sy Default method +.It Cm start Ta If .Va command is not running and .Ic checkyesno Va rcvar succeeds, start .Va command . -.It Cm stop +.It Cm stop Ta Determine the PIDs of .Va command with @@ -746,7 +745,7 @@ or those PIDs, and run .Ic wait_for_pids on those PIDs. -.It Cm reload +.It Cm reload Ta Similar to .Cm stop , except that it uses @@ -763,21 +762,21 @@ It can be enabled via if appropriate: .Pp .Dl "extra_commands=reload" -.It Cm restart +.It Cm restart Ta Runs the .Cm stop method, then the .Cm start method. -.It Cm status +.It Cm status Ta Show the PID of .Va command , or some other script specific status operation. -.It Cm poll +.It Cm poll Ta Wait for .Va command to exit. -.It Cm rcvar +.It Cm rcvar Ta Display which .Xr rc.conf 5 variable is used (if any). From nobody Wed Oct 2 19:53:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq15NJcz5Y1Rq; Wed, 02 Oct 2024 19:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlq14pHwz4Xm8; Wed, 2 Oct 2024 19:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLvi/ICzF+SIaG1X+j+gNN5xaEr6eIWpbwC/sclZkgQ=; b=VJVQjVLJdU4CYY1GiO4Pj5YOZIbXHb7I5zqzFfi6uDIgQ2C8bYe3aC2wAqeA868LTTsvrs phRe01HBpP9RV07GW20bxPKy7DXdfn/oSO+y3EzPfnHy26UDn+dTBzMYoOT9z796/orXYx tBqM9sHxz/aqt7ciVcE0ijsXHX9ZjGkB9XEttseyYTfpb7VVXIWBIGA4e0y2Bxqr+lSfYy 2MxEVddGmlBRszzuHCq91/651RHuiDebYzByTpBbqZY86DROdR+BEk4UM9dyP46FUjYUkH NWOR72G9ajGgU41myyNrO65IrsyC+3H+/Xxsbp4hwoorps1r9oc4b5EzUiPJSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLvi/ICzF+SIaG1X+j+gNN5xaEr6eIWpbwC/sclZkgQ=; b=jvBKpZC+EZKa6Or4c/Tvh+E+w7vRR55PSe6X+t25zA5soijRmj9Hye5S/TbMV3f3XY85aQ 8BKkqKb1ARaqpTH3FgAkRmLsgFm1CswMpEX8saFNuFXJSdUpdawXasGFBjq7F2rKA1JBLB wINpA/LIJVkl07vwCbkg08VrzPlQ2CVPgNAvuH5xMrcSnd6Fd9QGYZRLTGI36WTQ+HcDol p8xs+SEBMRgOzl8V/HuQKKZMPAwA1RF+VQHmerdOjpdGthGZ9UXIzbYboCxm4ZPW1VlDv7 YQ316ieYJx2Nc7DtIctIVVYR6jLMuof0mrPwC3N7QDfyrdexSF5IWdxUlqwFbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898797; a=rsa-sha256; cv=none; b=XZK4aQWcnjrQpKVCKMFL/zK3RtYrYR9Wl67wO5cJmiPjPNVAeqP+k4lKCaK7Vshd0g0Oon QUX4vvc+msCazDOS5T36/Q2dufTGMvSYTCKOh7wqwS9r6YRxDU1xx2v5pO9qrxionATW2L aPXJZ2linbb2A/j7URbaqCRa21ctULcrZO8Ww83QDi3SrG6TS7EU8vv4V1v+mkKJjOKTTH vsEzvnQkhB85o8ogS3XSCnvBe7275cSZgFrtwNyYF7Hskl/zuAExSpKAew7kVQ8sKowBYp ufFZrp/Cu2EwfkYzDuJmCszn0UiCheMbDCFt3MQISjMF61gXBYfx19qK/cXFzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq145g4zKcD; Wed, 2 Oct 2024 19:53:17 +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 492JrHnO060486; Wed, 2 Oct 2024 19:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrHao060483; Wed, 2 Oct 2024 19:53:17 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:17 GMT Message-Id: <202410021953.492JrHao060483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2726df27627b - stable/14 - e1000: Add sysctls for some missing MAC stats List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2726df27627b4674246db5e56cb3ec98f797b587 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2726df27627b4674246db5e56cb3ec98f797b587 commit 2726df27627b4674246db5e56cb3ec98f797b587 Author: Kevin Bowling AuthorDate: 2024-09-24 09:39:33 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:51:43 +0000 e1000: Add sysctls for some missing MAC stats Sponsored by: Blue Box Systems (cherry picked from commit aa7d086ad94642fa40375db9976177fc9e54a2cf) --- sys/dev/e1000/if_em.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e2d8535143ef..5fb46c9f6dce 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4304,6 +4304,10 @@ em_update_stats_counters(struct e1000_softc *sc) sc->stats.roc += E1000_READ_REG(&sc->hw, E1000_ROC); sc->stats.rjc += E1000_READ_REG(&sc->hw, E1000_RJC); + sc->stats.mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC); + sc->stats.mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC); + sc->stats.mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC); + sc->stats.tor += E1000_READ_REG(&sc->hw, E1000_TORH); sc->stats.tot += E1000_READ_REG(&sc->hw, E1000_TOTH); @@ -4520,6 +4524,9 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &sc->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &sc->stats.rnbc, "Receive No Buffers"); @@ -4560,6 +4567,18 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &sc->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", From nobody Wed Oct 2 19:53:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq25P5mz5Y1dN; Wed, 02 Oct 2024 19:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlq24nhsz4Xm9; Wed, 2 Oct 2024 19:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+DMTW5+gN21DrlXyYSWvERaTtZjiwQBVOJ8mB1ZuQGk=; b=lb3zSBHmYyj8ueL7CBMyZtLvcIKqeEzHR43I1qn97eUDgDxpMlyqsMyEYHNt/vgNcCWQoE klUFNXgFPdltI6iuzKr+uOc45woza617h7k+ncGHpJzthjoNvVb7Wr2Jx45uxaBIB3x3Ar PfYK3OSd1zeYMKLWNjuPmV9pf2hkpghhk+C+8NN56bucyT7v2fjRAxdBVRH2g/X3OrNXo6 Ln2AQp29ywx3wpQ93ADEBsu8GURgCuINAAdYljtwlay+sPuM3SUQa44vxWcX2/2WhiSMs1 nI/uSLzANhXHv3BxO+WyZkepPTJ5qVu5x1Zuhy475rAtCnSHa1YNGAFt8/iw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+DMTW5+gN21DrlXyYSWvERaTtZjiwQBVOJ8mB1ZuQGk=; b=tTGDshprlesZemKq98QT6qD1swEAnchHFSxqRJWYT16RqDLchv8bsJiy5UUN5UQ62vHzYQ Ot9i5twPUI31Ax2wt+nq5vdtb3UzIxH0iCaLzPjRsWkLHv+ADTp6YcCiPciZOdb0fdv4lP IwRJV0QIWh9zg1gZePeysE248GSWR/P/pNKHlp657eXWLUhJrnatjA/YuJLiBI1SO+SS6t LIRUB9/kRYCdrngf+bc/1CQcInHNqRuMwc82OiMFBjzMEFdbpCnxLR8snFbBfbscDy33yT +k2VsItq+N/UwMk+/5EkBRH/EYccfhaH4T65QZfllztIgkr8VPXVwnE4MSAY8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898798; a=rsa-sha256; cv=none; b=GRuQJMY1UlvZHF3Hof0+IaclxP/OPLFTHACWKvzFZhXPhnj0rOeruJUQSSyKCM354IqFnI A53GXlRZIkA69gtD1LpiopzgVxloRdBkgk8HvnLoGjwWBTQ+hT/d72ACBDUk+is5+SACDG elRHtRzD44jhKq18V6QK+4NlKMmuP3+Xy9lQJ5TCXz0m+EJ+J6TPii9ybLuBsE1YDlLN1x 5eM4y6qrYmliJhFyb2qlpwec2e33IEV4AXW6X+ygsQFC/33cs2wkuX6Ot7hc81TQnvNQLR OlxaTUXr44AKWKnSz5ypolfkQ5FQjbqjbK8smEzgZaFCvxw38rgIpkH4HogX8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq24PQZzJng; Wed, 2 Oct 2024 19:53:18 +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 492JrIu9060528; Wed, 2 Oct 2024 19:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrI5f060525; Wed, 2 Oct 2024 19:53:18 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:18 GMT Message-Id: <202410021953.492JrI5f060525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 4ce45606add9 - stable/14 - e1000: Handle igb EEE sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ce45606add99d568d5b7ae6354c18a378e29482 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=4ce45606add99d568d5b7ae6354c18a378e29482 commit 4ce45606add99d568d5b7ae6354c18a378e29482 Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:02 +0000 e1000: Handle igb EEE sysctl Sponsored by: Blue Box Systems (cherry picked from commit 2e78e568c268e4ba846ab140d9ac6b42886f8ec7) --- sys/dev/e1000/if_em.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 5fb46c9f6dce..d06627bcfda1 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1094,7 +1094,10 @@ em_if_attach_pre(if_ctx_t ctx) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - hw->dev_spec.ich8lan.eee_disable = eee_setting; + if (hw->mac.type < igb_mac_min) + hw->dev_spec.ich8lan.eee_disable = eee_setting; + else + hw->dev_spec._82575.eee_disable = eee_setting; SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); @@ -4981,11 +4984,17 @@ em_sysctl_eee(SYSCTL_HANDLER_ARGS) struct e1000_softc *sc = (struct e1000_softc *) arg1; int error, value; - value = sc->hw.dev_spec.ich8lan.eee_disable; + if (sc->hw.mac.type < igb_mac_min) + value = sc->hw.dev_spec.ich8lan.eee_disable; + else + value = sc->hw.dev_spec._82575.eee_disable; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); - sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + if (sc->hw.mac.type < igb_mac_min) + sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + else + sc->hw.dev_spec._82575.eee_disable = (value != 0); em_if_init(sc->ctx); return (0); From nobody Wed Oct 2 19:53:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq44xtVz5Y1dP; Wed, 02 Oct 2024 19:53: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 4XJlq369MGz4Xjy; Wed, 2 Oct 2024 19:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/rRNzM4ocTI6OhkbVboczRSeRKa/QI6QxBqx19JuUMM=; b=UuLHEgiI4FVSUpcX526Bf3OxWMKRiAQNZ2qSBiCvtZRnArdceJnPtjTqMq9Vg7sGdRTGEA E5VI5YA3knp6Cir1iRi65NQ0BTWP/nywK5023ZDEcAYaQIXsKKfW49R0+mAd7PsbFS/aB7 aclPeIWZt94kZixXi5VShsfCoaDb0we9AOZi8Tr6e4WZNuB6k0x2234sOTKUoe0+8xpfG3 6zv8FGTzgV4TGjdSitaAmSwtvHFucAeLM24VPbytYgBbgPgk14Zj8M5w2rQTqj3SIyI8CS Fd6zB39/WG7vx2AArkYiO4VQrmVL+xjsaa8mwIhHLb8TbleCeONqfIxJe9PJ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/rRNzM4ocTI6OhkbVboczRSeRKa/QI6QxBqx19JuUMM=; b=UiWbVPLEUZ1xBoermaoR9dvnFDMpoaDhuFfoz8cmbcs0ag+rfem2EzHLLCBDR6klGbTefz GqGO8VeSB1zqizIvMU1oUHq9ayXYPAj2S4QfLnP0Fu0vzz+72P95i7h0zMhEe1y2Z5Tu+D Ew07d6I9nOVoorCz7/mZOgZDjENwqscXcJpBinaht79O9QrbxeoYwLGDWUAYa81U+vFvmZ 1tJz1ZbxbOqzhHbnWkc1TwlQ6jr3Iopm0u2GCK4BVnIWq5ynyBi7cRhMF87BrdsY65J5/M /eR5vdgzQMaB6aRYOxeFtkbNgzl5pSoJ1mrH3xRoyGBYS7f9NdnXVxmRtzyNIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898799; a=rsa-sha256; cv=none; b=pk+M8q8RYZIB4B775zkuMXq6hYMyVx9sIQ3Xyy04owdS73FWJdm2OPKxIKO3Kjg3k/G5GR 5taUuOE8PzfFlJV8/a1fTHrQDbszkoirOqOtHh5vAbuboZHDDt817UBr24YkKGedK0sFO3 /APGxFa2/a1tELaS/pzfWRKrEIr77/dgynFsCrLEn7S0BNF7IaeQ0ePt6yALUFM+dXicYR nlPjf8G0gqgZag2llOjNBegN0n4ds6X5o/jwI6jIqce9/j2py+8/Z7RWtotxAp83ZeJAFg qIv20DkFL8/L4mTj5wQPaVOyAh0NvzP/qa3dL0YxVTvmnjFs0atomi0LzSkETA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq35lMlzJnh; Wed, 2 Oct 2024 19:53:19 +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 492JrJh4060576; Wed, 2 Oct 2024 19:53:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrJM7060573; Wed, 2 Oct 2024 19:53:19 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:19 GMT Message-Id: <202410021953.492JrJM7060573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 262f8dd6143e - stable/14 - e1000: Add sysctl for igb(4) DMA Coalesce List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 262f8dd6143e2cedea055763c5a453dedd449f85 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=262f8dd6143e2cedea055763c5a453dedd449f85 commit 262f8dd6143e2cedea055763c5a453dedd449f85 Author: Kevin Bowling AuthorDate: 2024-09-24 10:25:24 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:13 +0000 e1000: Add sysctl for igb(4) DMA Coalesce This feature can increase efficiency at the expense of latency It does not work well with the default interrupt delay, but expose the otherwise unconnected code in the driver in case people want to experiment. See https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf Sponsored by: Blue Box Systems (cherry picked from commit c9021340a3266f924bf721182f14f2d265d8a82c) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index d06627bcfda1..ad12171487f6 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -354,6 +354,7 @@ static void em_enable_vectors_82574(if_ctx_t); static int em_set_flowcntl(SYSCTL_HANDLER_ARGS); static int em_sysctl_eee(SYSCTL_HANDLER_ARGS); +static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS); static void em_if_led_func(if_ctx_t, int); static int em_get_regs(SYSCTL_HANDLER_ARGS); @@ -855,6 +856,12 @@ em_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_get_rs, "I", "Dump RS indexes"); + if (hw->mac.type >= e1000_i350) { + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, + igb_sysctl_dmac, "I", "DMA Coalesce"); + } + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -4973,6 +4980,55 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +/* + * Manage DMA Coalesce: + * Control values: + * 0/1 - off/on + * Legal timer values are: + * 250,500,1000-10000 in thousands + */ +static int +igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc = (struct e1000_softc *) arg1; + int error; + + error = sysctl_handle_int(oidp, &sc->dmac, 0, req); + + if ((error) || (req->newptr == NULL)) + return (error); + + switch (sc->dmac) { + case 0: + /* Disabling */ + break; + case 1: /* Just enable and use default */ + sc->dmac = 1000; + break; + case 250: + case 500: + case 1000: + case 2000: + case 3000: + case 4000: + case 5000: + case 6000: + case 7000: + case 8000: + case 9000: + case 10000: + /* Legal values - allow */ + break; + default: + /* Do nothing, illegal value */ + sc->dmac = 0; + return (EINVAL); + } + /* Reinit the interface */ + em_if_init(sc->ctx); + return (error); +} + /* * Manage Energy Efficient Ethernet: * Control values: From nobody Wed Oct 2 19:53:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq52qPvz5Y1dS; Wed, 02 Oct 2024 19:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlq46pvXz4Xxl; Wed, 2 Oct 2024 19:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pzwSMT1SnOFmckZ+NpcOnPUkNfHnw9WL5HMMmt2ZpRM=; b=h4GT2ChHhN1frCcxIA1eLFnBoeY9xYFgv6My9/WlAOcopWkqGF7J3YxYOE5U2uISkzX0m4 H+jrRg1nODum2Fv6HM1B6tbEhcD+XLzKt0+KjXIGsdwcOn61HT2KTC4zBFjfaEwVN82qmT S2xMzt0sTJc+hSJN2myvXziwZrqrRG8CRe0iLmUYGaYI1mdIUnG/vCAW3xP5k7le01BBzr KxVgBhA1FDd7Avl3OCnVbEmsisN1Z8igmViUcvvmu9cRbAk5xF0iumKpatcP2K6GqxVa0j 6glzXnYuIpXWdwV/OPkt8nzB7P22adeQ4h2gPO3T7gFJ5/dminRR8XDpC7eo6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pzwSMT1SnOFmckZ+NpcOnPUkNfHnw9WL5HMMmt2ZpRM=; b=drQ14YgMg7YbXo/kXMSnUTPSuUFK7H15KVCe5XXMcZ9fJNfQQHhJetqU8hTUpSs+nLxf2s w1VVwiTPDuSuebl2JGmWFGX2Ygnejh13aD+NpIpNb5LPYG+PHjVRS9Ijqto2xmeLKqb9fS zuY2Cgxh1aOCjjVxxGNuRyT2vm5GQsiIu1CArjbXUmeFMRMpRn5rokMg8HZfQtWtYAjCU5 9oRKSIJvjjQnjQ973A9Mz8fVEA+y9v3gohw03V9n6sKAdFTOS71uYrh2rI5qPaonopUX4W Y0s0stOWEAU9TPIbK06fy4eJRzjz5CHN+Bax7NcXt2t9UrTP1NYjPbVZcL3vBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898801; a=rsa-sha256; cv=none; b=CJXh8Ym2IQk5tUxdrn8drGSQMU8ulRHb4UOeRSTPVvT9V4mBpp8/sPUQWAuPJcpg9cl0Wp 3NDlC6ObeePpiyebH+r+Y0rTREaSrZDd7UxbuaLf0oXSk+lOpxKALoZPcoiRcCLIu3Ozh0 1m/McwBFdzEBrEOHSkWePjYjFX5d0jgATvZJBBrYOyfxyGNSVe6BQHk4qcSiZ3A/RsmTHP +HbT6SmfnQV1HlgKMVdz9HXHz+Hft8gLQReg5IEmbQydC5gg5QHl9sleXnjbWp6DqwohrH pVHK2XFD5eZjTsVhNPj53b7Z8MLyGngvZ9Hgxc/ypv0XGy4PNFj8FFOYZZIdPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq46R20zKnd; Wed, 2 Oct 2024 19:53: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 492JrKR5060622; Wed, 2 Oct 2024 19:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrKe6060619; Wed, 2 Oct 2024 19:53:20 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:20 GMT Message-Id: <202410021953.492JrKe6060619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e0a44adb80e0 - stable/14 - e1000: Delay safe_pause switch until SI_SUB_CLOCKS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0a44adb80e00e05649bc064d9014b3fec8d0980 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e0a44adb80e00e05649bc064d9014b3fec8d0980 commit e0a44adb80e00e05649bc064d9014b3fec8d0980 Author: Joyu Liao AuthorDate: 2024-09-25 09:19:13 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:27 +0000 e1000: Delay safe_pause switch until SI_SUB_CLOCKS Based on sysinit_sub_id, SI_SUB_CLOCKS is after SI_SUB_CONFIGURE. SI_SUB_CONFIGURE  = 0x3800000,  /* Configure devices */   At this stage, the variable “cold” will be set to 0. SI_SUB_CLOCKS    = 0x4800000,  /* real-time and stat clocks*/ At this stage, the clock configuration will be done, and the real-time clock can be used. In the e1000 driver, if the API safe_pause_* are called between SI_SUB_CONFIGURE and SI_SUB_CLOCKS stages, it will choose the wrong clock source. The API safe_pause_* uses “cold” the value of which is updated in SI_SUB_CONFIGURE, to decide if the real-time clock source is ready. However, the real-time clock is not ready til the SI_SUB_CLOCKS routines are done. Obtained from: Juniper Networks Differential Revision: https://reviews.freebsd.org/D42920 (cherry picked from commit 930a1e6f3d2dd629774f1b48b1acf7ba482ab659) --- sys/dev/e1000/e1000_osdep.c | 10 ++++++++++ sys/dev/e1000/e1000_osdep.h | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/e1000_osdep.c b/sys/dev/e1000/e1000_osdep.c index 8016ee352068..8b598f18cf12 100644 --- a/sys/dev/e1000/e1000_osdep.c +++ b/sys/dev/e1000/e1000_osdep.c @@ -34,6 +34,16 @@ #include "e1000_api.h" +int e1000_use_pause_delay = 0; + +static void +e1000_enable_pause_delay(void *use_pause_delay) +{ + *((int *)use_pause_delay) = 1; +} + +SYSINIT(enable_pause_delay, SI_SUB_CLOCKS, SI_ORDER_ANY, e1000_enable_pause_delay, &e1000_use_pause_delay); + /* * NOTE: the following routines using the e1000 * naming style are provided to the shared diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h index bddb97afd8b9..893979025f01 100644 --- a/sys/dev/e1000/e1000_osdep.h +++ b/sys/dev/e1000/e1000_osdep.h @@ -79,9 +79,11 @@ ms_scale(int x) { } } +extern int e1000_use_pause_delay; + static inline void safe_pause_us(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x); } else { pause("e1000_delay", max(1, x/(1000000/hz))); @@ -90,7 +92,7 @@ safe_pause_us(int x) { static inline void safe_pause_ms(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x*1000); } else { pause("e1000_delay", ms_scale(x)); From nobody Wed Oct 2 19:53:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq62Dnzz5Y1Ry; Wed, 02 Oct 2024 19:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlq612T0z4Xy3; Wed, 2 Oct 2024 19:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cb7c1P8d5J2Z7j/ye/LscShG0cwctRTToq6jxEEksQI=; b=xynfG5y7jt2wJ8QSqivxJcPP4hMEN9r7pvNdt3e6GIFF/80L/ngoVkehoz/+esSO7NQ/iA O5oM3ITiBTl+1CsvWyWj+z05PVqsY2gUTwLr53pKBS/Q02vv2RCb50OHXeF4dpOmRiMNMf KOnkgLoDnOkefUL4WH9AtPjp6OthYyo8wwDgQwlLbOnDYY+jm9QlOkrIQl5dK2BHFsSaZz mm0ra0euK12OmYNRnkw5evaOPhe73RRo79HBAYWp4AfLlrWqshiewDJ2MVkBLxuLvTCYrg E2E8WlzO7N0GqceaE5szZJtgvfVRHjyaOkly8mHVNFxfH4FXFES+zkRqphJ9EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cb7c1P8d5J2Z7j/ye/LscShG0cwctRTToq6jxEEksQI=; b=yRrY2tVltDQvV+GIoAYUDLqtPty1ZBKn65z+5wgrADoGQqNFu++LBqEPQlLcezqWTAsOt6 oNIkugavBtKwax0K4tfuB/SLRGq68Z41tzJ8HWKCBB3Hnjtz5whoG05xTsJ/Or68Owfvoq l8W19cZRckkdvic6sS6HzGwxSue1HGIANTUgnPz8JkSbQTm5hJ56C5SKLEjkWBcubZUQwA iZOrSqMakkdBG7kInHShwuS9/4LEfLMm9Qmpp5tky30dm0vhLctecnR67QUoRi6LvAmoaI EIUyDoaL9odG8P5JFc9ROqLGmcOk/wWbR5MrYu3ET0TiLP2eVhRC3D4Ldy7ckw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898802; a=rsa-sha256; cv=none; b=M/4+0L/YD5X6JikYxW6+sD7ir+RTs6CxDnK/BSREMcm12NdMwLEsYBnXV/aWUBB7MT1ixF 1+Pn6OhqArrBSuwFSngKfGOo2NftIfQcGPZvMvTdXTkXwc/k6Vri8HwZ9432J8GNCsveYC EZ4iys5tnzedX1s+Hn3a0i/RlkCspR7K+2vod9/uZ8aSNJd1HIp/HutgNeLtuYhigfGbdC +W5cwVkaUTlnNAZ4fu9MumBi+Y13yMAvjdM/QsdsojsqHh2odqbcbDXJJ41kBpSPKcJhCp 6GbyjUtuo+agOzvFNEMdbTCJUAVotz5Sv0uuBPwjv+07Hs79mYFbg/Y03ZWqhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq60bFxzKHD; Wed, 2 Oct 2024 19:53:22 +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 492JrLlq060665; Wed, 2 Oct 2024 19:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrLDI060661; Wed, 2 Oct 2024 19:53:21 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:21 GMT Message-Id: <202410021953.492JrLDI060661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d3c81ec4e90d - stable/14 - iflib: Simplify iflib_legacy_setup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 commit d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 Author: Krzysztof Galazka AuthorDate: 2024-09-25 20:28:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:39 +0000 iflib: Simplify iflib_legacy_setup Follow the pattern from iflib_irq_alloc_generic function and use iflib_fast_intr as a handler for RX only interrupts. Also remove some intermediate variables and use consistent way for referencing queue's structures. Signed-off-by: Krzysztof Galazka Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46061 (cherry picked from commit 36a001923836e280e750b76947b8705fcc47b0b7) --- sys/net/iflib.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 8cb0d0610a21..fa6227f3f80a 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6424,15 +6424,11 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * device_t dev; struct grouptask *gtask; struct resource *res; - struct taskqgroup *tqg; - void *q; int err, tqrid; bool rx_only; - q = &ctx->ifc_rxqs[0]; - info = &rxq[0].ifr_filter_info; - gtask = &rxq[0].ifr_task; - tqg = qgroup_if_io_tqg; + info = &rxq->ifr_filter_info; + gtask = &rxq->ifr_task; tqrid = *rid; rx_only = (ctx->ifc_sctx->isc_flags & IFLIB_SINGLE_IRQ_RX_ONLY) != 0; @@ -6440,17 +6436,17 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; - info->ifi_ctx = rx_only ? ctx : q; + info->ifi_ctx = rxq; dev = ctx->ifc_dev; /* We allocate a single interrupt resource */ - err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr_ctx : + err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr : iflib_fast_intr_rxtx, NULL, info, name); if (err != 0) return (err); - NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, q); + NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, rxq); res = irq->ii_res; - taskqgroup_attach(tqg, gtask, q, dev, res, name); + taskqgroup_attach(qgroup_if_io_tqg, gtask, rxq, dev, res, name); GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, dev, res, From nobody Wed Oct 2 19:53:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlq738jdz5Y1Ps; Wed, 02 Oct 2024 19:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlq71zgMz4Y1D; Wed, 2 Oct 2024 19:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsmA+nL/XvHXHuIotDlu4bVlKRdA8pzUhfCZ5YNZm/I=; b=iiNqZBb+M9SWDbDLmkEhPGza0jnaYygZ3oIoWD56PU3SKH6EBrYemjzrNVcB+njX7DwZlh 3uf0A5KR/TsCW83Jvgrkd2zNK8Tx6SADehfvZEkJM6PKCogo3dXJa3tm7bcF8GUepzcR+r ZGqQFdh2tWJ7coimfqHBstv6aIRvTXbKpOY5m389mPtfjPjBCDW7MV63MSITpuaNqZksKc rSgiGFzdavTNjS8pdOxLUxw6QUx+UowXIy7vhbzENs9ZPYlnDXwqnpeqLYRM1yajPurasc LUSRz1W9Z9ZHalvr0TnxvUATGLo7Z/WoWjLlW+ZVDSOL/yIaOjZsme0wnONBVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsmA+nL/XvHXHuIotDlu4bVlKRdA8pzUhfCZ5YNZm/I=; b=fuCQxCNJvDhXvHZoo6ar3YPYyDTbQxshZuOGztlKNgjQeNIyKJZOl8nRM+U/oUtq5IjlTZ 0Pozta8HoQ5kQaw/nxa1anlMzB7jqCELqocJqSnBTe/FpGs1GTImm2EzTlLERbQlUsK+uv v8/hPllnqcWjErtBnWm5mkN6hwevcHefNppGuFzKIiUzu0JvcQd+mrV19N95BlkHN76LhH LYQHc2smjvdo8lsdR4ZgTpD7rFlnxRlFElyNP+p1eCt42ZC38SSBkzJFwwPQARcdnZK74W /nQTGuGaVKnY0iZT3JhW9Bpq+X3euI0pFbjKFl/y5GH30xjJ65AVXowgPifrkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898803; a=rsa-sha256; cv=none; b=R4Igkr7gXwdC/j3O/mUlnDW8xsLW3JCeB6v+01UIbnlTP8WPduoODqDkKAr4nhwZ0Mf2eQ BuykpuMU8MaTbRxmlraSc5+aEjsk2OVLBhk5d/5UqO/I6SCFi8WmcX1XEm+KWcl9axG2Bz FpQ1JpKcz/I7lft5sASn3CmgxArm4Y3TONqIKgAdf++n8xkiY48llH8jF361ECuLZScLQJ 4qY7Hi8L3AfnQ2QQfSxCebHb0pFwp/1sRu7gUqy9cUCQSHLhD3TNQpRpaHZ6BIAZ/lqAqO h6axqJ3+iM6OOw4hEIXg2A4UoJ9ek+DYL7labjTIpCHSmFXsrwrqrXI7kfeCuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlq71X41zKWW; Wed, 2 Oct 2024 19:53: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 492JrN9a060720; Wed, 2 Oct 2024 19:53:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrNhn060717; Wed, 2 Oct 2024 19:53:23 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:23 GMT Message-Id: <202410021953.492JrNhn060717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b3834306579f - stable/14 - pci_iov: Add a device_printf if out of bus numbers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b3834306579f3a59338f3faed3f588b30a56317e Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b3834306579f3a59338f3faed3f588b30a56317e commit b3834306579f3a59338f3faed3f588b30a56317e Author: Val Packett AuthorDate: 2024-09-25 22:17:16 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:53 +0000 pci_iov: Add a device_printf if out of bus numbers Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20591 (cherry picked from commit 6a4f0c063718781c5e3eddbeff0da7b89d290d1e) --- sys/dev/pci/pci_iov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index ff3ac0e64271..60325e8cd491 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -736,6 +736,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) /* We don't yet support allocating extra bus numbers for VFs. */ if (pci_get_bus(dev) != PCI_RID2BUS(last_rid)) { + device_printf(dev, "not enough PCIe bus numbers for VFs\n"); error = ENOSPC; goto out; } From nobody Wed Oct 2 19:54:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlrp2V5Pz5Y1BR; Wed, 02 Oct 2024 19:54: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 4XJlrp1y9cz4Z1x; Wed, 2 Oct 2024 19:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+2yUzSZgO15uSDfX3JJBPbPYTEAMsfv3uP0bip2Gy0=; b=oMsqs5V2UnJ+TezWsMjvzxYyJDviXwRFNLoK3NeHuhKZTLhdZd6DKVa55tywgm8LiWM6EF jMCA/QQCmK8xDP03RzovpHMig9XQAMMpFdz5dCtaRqwAioNDZ2RM/uKk4Mr9gqUfhbUMYQ QR9R78pJdfKDwdJsinjBCrxGxbS43x/TrrW3b0FjVOUsFs/AyqVst8EUmt3VW7MclBQFzC Ztzav/qIU4eUnd/YYZGz9jbq9hbLWqecNodgY0ytWWqJsAKGxFg0E6oGs+Fw1b/O3sU/24 lM6ED4ZntetE3vlUKBT9t8OfrqSJg+/hTmK5nzbx3zkldJY4NfHhNPMSKz2ysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+2yUzSZgO15uSDfX3JJBPbPYTEAMsfv3uP0bip2Gy0=; b=yeMgwYXiDG2bVy+v5QA4UJlAUyUtWRuSAhCMSOwKjo6s/eCYDL3yLgLDMAvkD46crC+2kq NaQEYoYAFSLbZBZwac7XS324uq5ppPXdnX22lq/yYmJRtfH587eaI9wR7ph/IiTq97Owdz Y2t/rcqHBF659CU2xrO70GQQoP+YY6pMpxa4plNjRBuPA1ksIJmNKDwKGDfr6WW8w0He1u s+F+pToSkDU9RolE7e1LZLmEkOmj0oY4MXpfGRiOJZqQhpRDwSJ2tPz7j0ygunUp1YEHCj E+IZ5saR5m8kYCQ9OaWSZsIxARL78G+Cvme36vcv8fTWtvoaslLBRR6t7FP+UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898890; a=rsa-sha256; cv=none; b=WN8O3cbYRZYxi5BY9YAeffiTv8QFiEqgbF4lXKORqMg+Hfi3AC5TANvAb61k7vcnxE/9Lf P6mEZp8bh2vRySe22q+HPitYI93wTX+kkNWQeI4s1ArmpvjYFctkWKQ5JFglyiLMDVDkzQ I72MSCxFANoYHnGGhAYX4qKYSyi62JnjDgKsq7XzN/9JzvoPzbQyHKVa/pXkNlPMSFkzyZ do4bfXSyOXm96mZ5S7VaoRGn5F3U0ys61kOIWa8y24EnQjvKU4tvADXN2nab+aut3q4H2J cySe7kuakhPcNGCtSQGTmLcgK9i5X+X5/U8ngjTC0FPFeRMP/OdrrH8orazH6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlrp1PWJzJnj; Wed, 2 Oct 2024 19:54: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 492Jsow2061142; Wed, 2 Oct 2024 19:54:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Jso4D061139; Wed, 2 Oct 2024 19:54:50 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:54:50 GMT Message-Id: <202410021954.492Jso4D061139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e86189c62b22 - stable/13 - e1000: Add sysctls for some missing MAC stats List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e86189c62b22e7ec2bde6ea2cdbc4e356307cbc2 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e86189c62b22e7ec2bde6ea2cdbc4e356307cbc2 commit e86189c62b22e7ec2bde6ea2cdbc4e356307cbc2 Author: Kevin Bowling AuthorDate: 2024-09-24 09:39:33 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:54:34 +0000 e1000: Add sysctls for some missing MAC stats Sponsored by: Blue Box Systems (cherry picked from commit aa7d086ad94642fa40375db9976177fc9e54a2cf) --- sys/dev/e1000/if_em.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index bf612d465ef0..97b298d2ec6f 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4306,6 +4306,10 @@ em_update_stats_counters(struct e1000_softc *sc) sc->stats.roc += E1000_READ_REG(&sc->hw, E1000_ROC); sc->stats.rjc += E1000_READ_REG(&sc->hw, E1000_RJC); + sc->stats.mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC); + sc->stats.mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC); + sc->stats.mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC); + sc->stats.tor += E1000_READ_REG(&sc->hw, E1000_TORH); sc->stats.tot += E1000_READ_REG(&sc->hw, E1000_TOTH); @@ -4522,6 +4526,9 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &sc->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &sc->stats.rnbc, "Receive No Buffers"); @@ -4562,6 +4569,18 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &sc->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", From nobody Wed Oct 2 19:55:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlt74LNXz5Y1NZ; Wed, 02 Oct 2024 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlt73mD1z4ZZK; Wed, 2 Oct 2024 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iFFAYWFaQcLkSAMlPbSWfu9yirTlCaku1NBhNQTh9O0=; b=rXrRSKpG4FsyHgQKhA5d/8ffzK8haOqsuJxF8Vh27QMDCoew7eiL5VfIq70l74Xc9Z52r2 UEX0zelUKWwspEx88nD6kwZBeD1iyZq2saZsKOw9Y3ka4V1ZT1Me2DwN+oCLpwNcm3K35h bq93/d88OhwsxIvT8BEqupGRFXHJGJ+JQzZT4hKRgT2aTop7sjeT2yXw10b0qQQahReXy+ /INMiSqUKY3FBAzjcu4rMKQ4IeAB1shOahdG4Nhdch8fqfzjNqzYaB5yKGP3aqbe/2DEsV qTBUSuLTucmYlg7kOdKNmxJj2aTlypDuQG2hyLheBScyFfgBVuJ9gOXAsdZasg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iFFAYWFaQcLkSAMlPbSWfu9yirTlCaku1NBhNQTh9O0=; b=DFAxpc4x98MvAjy7EDdW5LLY5+sJ/JdSHFTQ5kjKFE6+rhlPYpz1E7i2oFo/rD3Q8XKS5Q pgDhZcoSEbkOyQ824oCbJRCrDkDQkaGHki1OCdhGHwaxjfDhbYojV4Hnrwq3MLaiGfsdXj VJxo1R302L30G0ud68c21wdPlveS2m0cl3AMEZpDUM9WArqCzEOZuiTYY280Xfi7SvrA/n lqaRmlJ18yPwg+KsQyZTpcQ0q4dGC6N1diuX2gKynZLdZmB2rWlc1BSi6b2SD8qNzcVeRw foK4zZGru1q9xeawDvRJYcmERqwKt4pS88zV3iOUqBuZjNQBW1HYXuks60wfEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898959; a=rsa-sha256; cv=none; b=b/gQAVv29riFH4yF22KyyT/Po3XHLi6wSn9nwIAUCdcOQlTErYa+HDvCmJv5zIGP8xrALU hdtK3eXnbib3mxUCatYejOIccQAc2TEeskq1DNOYb5xJMu0sG4LBMLlJYQffBHFcn+iyUI kg8+hvakOfnYK2Ll6kqk7nnn8Yr6hvIhJ4hTw2L9k32nkPCJ6W7HW8fqMUv+370PHHn9bC /7zuvDCLuVq11ATEtPdTi6j/TPeK5+XeXy0WE1ia3yckNjZgccl2wKU/AH3OtIaFTtwKln EfB/5G5Q7z3oCEHok9dmqoTfvHq0NSTEdkEtavPLwrzPCat9rs8DGpjAHH8ywA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlt73GfQzKTP; Wed, 2 Oct 2024 19:55:59 +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 492JtxFK061461; Wed, 2 Oct 2024 19:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JtxAe061458; Wed, 2 Oct 2024 19:55:59 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:55:59 GMT Message-Id: <202410021955.492JtxAe061458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 999b6a9818ef - stable/13 - e1000: Handle igb EEE sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 999b6a9818ef872278fa12b92bd738e3ebfbe7de Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=999b6a9818ef872278fa12b92bd738e3ebfbe7de commit 999b6a9818ef872278fa12b92bd738e3ebfbe7de Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:01 +0000 e1000: Handle igb EEE sysctl Sponsored by: Blue Box Systems (cherry picked from commit 2e78e568c268e4ba846ab140d9ac6b42886f8ec7) --- sys/dev/e1000/if_em.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 97b298d2ec6f..c328d03dca83 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1096,7 +1096,10 @@ em_if_attach_pre(if_ctx_t ctx) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - hw->dev_spec.ich8lan.eee_disable = eee_setting; + if (hw->mac.type < igb_mac_min) + hw->dev_spec.ich8lan.eee_disable = eee_setting; + else + hw->dev_spec._82575.eee_disable = eee_setting; SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); @@ -4983,11 +4986,17 @@ em_sysctl_eee(SYSCTL_HANDLER_ARGS) struct e1000_softc *sc = (struct e1000_softc *) arg1; int error, value; - value = sc->hw.dev_spec.ich8lan.eee_disable; + if (sc->hw.mac.type < igb_mac_min) + value = sc->hw.dev_spec.ich8lan.eee_disable; + else + value = sc->hw.dev_spec._82575.eee_disable; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); - sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + if (sc->hw.mac.type < igb_mac_min) + sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + else + sc->hw.dev_spec._82575.eee_disable = (value != 0); em_if_init(sc->ctx); return (0); From nobody Wed Oct 2 19:56:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlt859l7z5Y1YW; Wed, 02 Oct 2024 19:56: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 4XJlt84c21z4ZTn; Wed, 2 Oct 2024 19:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpHopi0as5pl8d4+RmePhiq519uSKuVUaIagrgudd2s=; b=XwaHRoCzEV2RugoZ6Lz4qp+PqABFzbmakJDfHcXcVAtGqM4W8e/ix91vSslCn2C650GQlN kDAgME1Uu7zBHmufqvbBn5OBicjwGjI/k/gp2pXquqULVReaA4ZncVHM5hZnWh7fR4yv3a ATVElaGYQX/Of7WVkU094rNmQIq4obGnArbp5afCiNsDvoBXipeNpoJ14lqCAVI7rNxpZ8 y15aJ3EtO2WDzzmLoYBPpv+T+khU+huCKmXHwYDPpebo/J9QChPSWTAyp/g799Ux+YcbQ8 Yo4B6aIe1J1Xal9Xp22anZ4iQ2aXQeL9UQJxJcjf0mILP82cVegfVsvsne6O9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpHopi0as5pl8d4+RmePhiq519uSKuVUaIagrgudd2s=; b=nFW2Fi1joXEh6sZOQ9b64S8Lh16VPSc1MRJuyH1iGXZTY7Ja51m2JMnlFuZhadytjzMjpl KR4Ij0Pf1K1dlOVKFTFhIBcTYDT2v6FVQl6BtbyGoCbG4TeWUBCs1m7bKWYVOW3oGH125q pVly4PbSRk3BY6AmmbQGItCKH1KGujtEnazwrzONObUQUe8phC7e0MqhCySfjnU3+NebUv L811HngDDDGSFb++PuJKpTX1FlqSuEJhbpyrNUEaNLV8RdhcRAbBWZn+0Vax3oMpOk+gEC yRVtwHhybr1Kb8yonk4Vt98vO4wMYfkMkkRY/auhIxL9rOQl1eGHYZh4SDvK7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898960; a=rsa-sha256; cv=none; b=j1M+MYDdaJONUcbNhchPAf1ID2duG8jFv7nKomODmP6d6JQJi3Y7tKM/MdaWe6/mWFZW2G ulSPKbC1UrGbzwVj6pSF6UNq5mr6m6fTiVZBPH4xb4t9p9v3h7blLprRBkj8yxjY08i7yd wrgVl7GrIOXOmtsdJu0G4YwRFSbfaxIzZ2yyETzDCjgtDXDuLGL2pMKPrYGnOatw0PyQVf GcaQJtj463aHJcJJeus+J+VMGGakiksicRbAeVQXbFDHC1/kvB4xZ4CfZmI86laaNFEw8j Laq2cQafoR3NO3L8V484zEyCfEjYzbXaOBd1eJUPjMeYeKP1ceVCnKgSzZMVcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlt84CKLzKHF; Wed, 2 Oct 2024 19:56: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 492Ju09S061527; Wed, 2 Oct 2024 19:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Ju0Nr061524; Wed, 2 Oct 2024 19:56:00 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:56:00 GMT Message-Id: <202410021956.492Ju0Nr061524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 8688a242b515 - stable/13 - e1000: Add sysctl for igb(4) DMA Coalesce List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8688a242b51535c0860e06a98ca00bd94fc95254 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8688a242b51535c0860e06a98ca00bd94fc95254 commit 8688a242b51535c0860e06a98ca00bd94fc95254 Author: Kevin Bowling AuthorDate: 2024-09-24 10:25:24 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:12 +0000 e1000: Add sysctl for igb(4) DMA Coalesce This feature can increase efficiency at the expense of latency It does not work well with the default interrupt delay, but expose the otherwise unconnected code in the driver in case people want to experiment. See https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf Sponsored by: Blue Box Systems (cherry picked from commit c9021340a3266f924bf721182f14f2d265d8a82c) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index c328d03dca83..6d9eedae3df4 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -354,6 +354,7 @@ static void em_enable_vectors_82574(if_ctx_t); static int em_set_flowcntl(SYSCTL_HANDLER_ARGS); static int em_sysctl_eee(SYSCTL_HANDLER_ARGS); +static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS); static void em_if_led_func(if_ctx_t, int); static int em_get_regs(SYSCTL_HANDLER_ARGS); @@ -857,6 +858,12 @@ em_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_get_rs, "I", "Dump RS indexes"); + if (hw->mac.type >= e1000_i350) { + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, + igb_sysctl_dmac, "I", "DMA Coalesce"); + } + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -4975,6 +4982,55 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +/* + * Manage DMA Coalesce: + * Control values: + * 0/1 - off/on + * Legal timer values are: + * 250,500,1000-10000 in thousands + */ +static int +igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc = (struct e1000_softc *) arg1; + int error; + + error = sysctl_handle_int(oidp, &sc->dmac, 0, req); + + if ((error) || (req->newptr == NULL)) + return (error); + + switch (sc->dmac) { + case 0: + /* Disabling */ + break; + case 1: /* Just enable and use default */ + sc->dmac = 1000; + break; + case 250: + case 500: + case 1000: + case 2000: + case 3000: + case 4000: + case 5000: + case 6000: + case 7000: + case 8000: + case 9000: + case 10000: + /* Legal values - allow */ + break; + default: + /* Do nothing, illegal value */ + sc->dmac = 0; + return (EINVAL); + } + /* Reinit the interface */ + em_if_init(sc->ctx); + return (error); +} + /* * Manage Energy Efficient Ethernet: * Control values: From nobody Wed Oct 2 19:56:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJltB0M2Sz5Y1Bd; Wed, 02 Oct 2024 19:56: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 4XJlt968q4z4ZZd; Wed, 2 Oct 2024 19:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LX2wJHmvKpRNU7Osoi4YEk74szlAd/R9w2Um6AYRFk=; b=tR9MCd8Fwc5B72Yi6mT/b+qMJuGi53LbhQD4BGmv2/WVnB3ikaJOz/a65QeBQLUFf/ClUq IcOlbLBn2SL1vwrs0COENLAmBfYT1qbuzvfLerp6IB3Zyym8EW8H8E86I7eMY6xFKVHiIg qdIekBreNXbBNZ1Ip6xM4Gf6C32gvFGCtdastgjxCnH024I50df4ViT/4SfpysYMmAJeIA zApassZ3J5O2IlaJ4mQ/az4985BtETaDgQ0tSUyD/9kATBzybM32+99oJNbZjxC7WzfiTq kTJL5309jI1+juRWZRFOZlQSQB2N8125AQO2CQzC38Rg3Hs0T0svxRXveLCDVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LX2wJHmvKpRNU7Osoi4YEk74szlAd/R9w2Um6AYRFk=; b=A2lKZVa0stuMwg2Ybw3tbCjRpfF6V2Ef8VgBZ/b+SgePCATJHyTydq+rSQRZ1I6VUmtpFA rExExWjzDStQXgPgKSqpTlBAQ7tF79yDClJUempmY3vuAXl0Sq3WtA+gL9ijnZINC/LuPB ymC2OaZdTjczDS9pakOTyk9LR+klP2btOOuk17XHWVwZDuaIkhptvC/ZP0w5Jgd2QYpyLj ZOIed6JcgbioaLuZXxmjVzJZYuwDL2xU3aTVO8KCKtQ5g90hyFGVNyli8e+Hi5EKaolvHu 2Dwn6zSfFZlr0Z+SrWSEssrujTdmO5zxqd6HEG667CFEgq6uUQcXYJ+GkloCqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898961; a=rsa-sha256; cv=none; b=xqutvpGZL/Nw6b/VOthKSc4fTOS6qAbP5MeR5Gu37kO/xL4mRZQ4yRnrPY3T0nwswocIBt iELvv7lxpX2xbLBZDi+qOSOW+VpKP4N+nA5Ov4rYeL7kESbZU/6Ge0tsUTKO7qWFJzvsHJ AFzkiFkijF2lyJNtM0M/DB827bbf+eRPR/REa9umsSuyQEQtrLvgq3WvVqL1OE5Dr08xxm /V5dEtP/vj0PUNkoFGHtV++0FQmYJNkNG3P3KILxISv7p5BD8gxvR9qKwJMiT29wOzNI4V 77XX5L+QLkUdCeEzJUnFUnEJ/3J/VluV9til1aCdrx84xg3U9hBvEpp9peLV5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlt95BrGzKTQ; Wed, 2 Oct 2024 19:56: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 492Ju1Pf061572; Wed, 2 Oct 2024 19:56:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Ju1UG061569; Wed, 2 Oct 2024 19:56:01 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:56:01 GMT Message-Id: <202410021956.492Ju1UG061569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2e3489289853 - stable/13 - e1000: Delay safe_pause switch until SI_SUB_CLOCKS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2e3489289853557277c29fce1a9816918cba576e Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3489289853557277c29fce1a9816918cba576e commit 2e3489289853557277c29fce1a9816918cba576e Author: Joyu Liao AuthorDate: 2024-09-25 09:19:13 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:23 +0000 e1000: Delay safe_pause switch until SI_SUB_CLOCKS Based on sysinit_sub_id, SI_SUB_CLOCKS is after SI_SUB_CONFIGURE. SI_SUB_CONFIGURE  = 0x3800000,  /* Configure devices */   At this stage, the variable “cold” will be set to 0. SI_SUB_CLOCKS    = 0x4800000,  /* real-time and stat clocks*/ At this stage, the clock configuration will be done, and the real-time clock can be used. In the e1000 driver, if the API safe_pause_* are called between SI_SUB_CONFIGURE and SI_SUB_CLOCKS stages, it will choose the wrong clock source. The API safe_pause_* uses “cold” the value of which is updated in SI_SUB_CONFIGURE, to decide if the real-time clock source is ready. However, the real-time clock is not ready til the SI_SUB_CLOCKS routines are done. Obtained from: Juniper Networks Differential Revision: https://reviews.freebsd.org/D42920 (cherry picked from commit 930a1e6f3d2dd629774f1b48b1acf7ba482ab659) --- sys/dev/e1000/e1000_osdep.c | 10 ++++++++++ sys/dev/e1000/e1000_osdep.h | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/e1000_osdep.c b/sys/dev/e1000/e1000_osdep.c index 8016ee352068..8b598f18cf12 100644 --- a/sys/dev/e1000/e1000_osdep.c +++ b/sys/dev/e1000/e1000_osdep.c @@ -34,6 +34,16 @@ #include "e1000_api.h" +int e1000_use_pause_delay = 0; + +static void +e1000_enable_pause_delay(void *use_pause_delay) +{ + *((int *)use_pause_delay) = 1; +} + +SYSINIT(enable_pause_delay, SI_SUB_CLOCKS, SI_ORDER_ANY, e1000_enable_pause_delay, &e1000_use_pause_delay); + /* * NOTE: the following routines using the e1000 * naming style are provided to the shared diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h index 2af2746dfadf..a64344a24998 100644 --- a/sys/dev/e1000/e1000_osdep.h +++ b/sys/dev/e1000/e1000_osdep.h @@ -79,9 +79,11 @@ ms_scale(int x) { } } +extern int e1000_use_pause_delay; + static inline void safe_pause_us(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x); } else { pause("e1000_delay", max(1, x/(1000000/hz))); @@ -90,7 +92,7 @@ safe_pause_us(int x) { static inline void safe_pause_ms(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x*1000); } else { pause("e1000_delay", ms_scale(x)); From nobody Wed Oct 2 19:56:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJltC2GvZz5Y1bh; Wed, 02 Oct 2024 19:56: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 4XJltB6g2Dz4ZYW; Wed, 2 Oct 2024 19:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVNROi03aguIIdU9Rh/DUU0IyEUzGK+0QmA4gUx96SA=; b=hNKQifwDorel39fJiVZpHCdx+23RLU2UmYAcX7mT+ihYPqtnQwzJuDkS4WTY0rCh9H8g0I S06BGjP2cKjGnu+S6tTF3e41xfmb20QVODx7pp7ozaWc1fUJgHw6uvNXcpm/Kooy0CIXHV IthkRTiMoWu199XDPOhGc5tk1BbMzvvTUpl4+RILSqkoFOjTqO/0Na+pCCLSKx/FF1aJ7T TvdEKgOQ/+jbspW86TH0diQ39/Ngk3UIgdvC51r/eq9ojFrUw+Eg97BkoqNRXWaaynG8IB Tf/2Ds+ATGyr7+09JOoUin9QJsxJ/9udFmpuyAkBhNuCr+TtpDux2IXiOwokeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVNROi03aguIIdU9Rh/DUU0IyEUzGK+0QmA4gUx96SA=; b=inGa1rJxL4+D9p4N8MmumKVSMxkJLpkK16Dsy9067E0bimjxb2MOwK+oRc1lLshFe3uMIZ Ai/qOojAaW24S/YrR8PlI2tF7KPofcYXNW1hx6BU4/mLZ/g4hx3K7XZ816IGZt1Q5hO9u3 VaOiMcKhYQiDjzsmohyWDeaS+tBFLTD/pjSLy4flIvl325dbGUPLkSY62ppPLcctynCVUL sPHdQaLTkvwzW+MJd0IRQJaoT7VPZZXC+TP9YLnkC21yk0gsPhZqpbom+Gy549nk64FCEE xxU3RphgNDcaPi92BFsggY5tEeu//S6aFB3P1EPnKd43q9FXcMvQo5ah62NtdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898963; a=rsa-sha256; cv=none; b=GIxsQIZAZB74+YcvAHgIgDTBxZ6c9iQHlQolj2iu++foN9o5cDlD3hTViOo3d8B+p8EJg9 v2Iwf8FZYC7au2nBMaKCnQAsxbrdQ526ms17zamKDZwzM/b7BAW3/hUsgK0YH4/Cstg3W2 ubzGHm/h/jGPt+Te3/PgRqKSIdBM1ziGbXL/yHvVinA+kcLKkc0ZpFMhRm58nSghbkWuXL kVA45X7yE/4I/fvGk2zf7Ko7cKpqsZA82ledjutn5ERmS6yIFb5MErUQk7LzLFksG6OE02 nB0CHFzXASDsS+xqbmMJi/Su3eHYd8tla4Lt3VNKRvSy/BFcPel7vuda3dMOXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJltB6Cw4zKYd; Wed, 2 Oct 2024 19:56: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 492Ju2in061612; Wed, 2 Oct 2024 19:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Ju2cl061609; Wed, 2 Oct 2024 19:56:02 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:56:02 GMT Message-Id: <202410021956.492Ju2cl061609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: fa0f7eefb92b - stable/13 - iflib: Simplify iflib_legacy_setup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa0f7eefb92b01fc55358b59f2d65581edfa07bf Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fa0f7eefb92b01fc55358b59f2d65581edfa07bf commit fa0f7eefb92b01fc55358b59f2d65581edfa07bf Author: Krzysztof Galazka AuthorDate: 2024-09-25 20:28:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:36 +0000 iflib: Simplify iflib_legacy_setup Follow the pattern from iflib_irq_alloc_generic function and use iflib_fast_intr as a handler for RX only interrupts. Also remove some intermediate variables and use consistent way for referencing queue's structures. Signed-off-by: Krzysztof Galazka Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46061 (cherry picked from commit 36a001923836e280e750b76947b8705fcc47b0b7) --- sys/net/iflib.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 252fb3b529ed..6f91c0c7f2d8 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6652,15 +6652,11 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * device_t dev; struct grouptask *gtask; struct resource *res; - struct taskqgroup *tqg; - void *q; int err, tqrid; bool rx_only; - q = &ctx->ifc_rxqs[0]; - info = &rxq[0].ifr_filter_info; - gtask = &rxq[0].ifr_task; - tqg = qgroup_if_io_tqg; + info = &rxq->ifr_filter_info; + gtask = &rxq->ifr_task; tqrid = *rid; rx_only = (ctx->ifc_sctx->isc_flags & IFLIB_SINGLE_IRQ_RX_ONLY) != 0; @@ -6668,17 +6664,17 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; - info->ifi_ctx = rx_only ? ctx : q; + info->ifi_ctx = rxq; dev = ctx->ifc_dev; /* We allocate a single interrupt resource */ - err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr_ctx : + err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr : iflib_fast_intr_rxtx, NULL, info, name); if (err != 0) return (err); - NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, q); + NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, rxq); res = irq->ii_res; - taskqgroup_attach(tqg, gtask, q, dev, res, name); + taskqgroup_attach(qgroup_if_io_tqg, gtask, rxq, dev, res, name); GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, dev, res, From nobody Wed Oct 2 19:56:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJltD2g3cz5Y1Bf; Wed, 02 Oct 2024 19:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJltD0VMWz4ZKG; Wed, 2 Oct 2024 19:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6N46ssnz8pdTNgmow0iuCgS2l/boXmhX3JvjJBOUSM=; b=fLBodcMEP5aAqX42BqdcwyWPEeu/N1c937EdSDQVku9ZeXyhPIQDzZYWyGusOKfV/ROa3d yoDQYV/7v11dqgitWpzkyCvfZAkNor+7q5hVQFeA2Mz0BHBB28ANrh+DB4e5/VawZlx6XJ 5u3+2SLZXA4Lh13m3JWH7a9Nr4PVq6m3U+PW1PPxqJrjS5T/s+l0zpZOTv5mks4n2hSABu 53lqHqeG2T4P7EaAKymWy2hv8XfUwTi7yH+/pIca6ivZKsc7C2mqejNVshZvhg1r1LYY1W LdvvxryUZs/qgTFYtKBp3xQwZklnmyUSfw2h9/FlL+K/ygvbN9AE9XsW2nr7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6N46ssnz8pdTNgmow0iuCgS2l/boXmhX3JvjJBOUSM=; b=iKmTIUN/yV/m2y6waN4a+aoy67D6wDQlcGTH/MrALJ7PgVXureZPsZavCn5US/Qq1KkxId H26Ull6Uuv+Juv1m63LFzOH8AyIyQ964RDKsUvXR/+paCwLtw6cPPst+S/9mpzVCA2PiK2 n4gXjfeSE6DB34Oe2i5GvRiy9c3gXpjmtPBUH/eSj5lEqD29B17Ug8WWmc/KNOoy/D6VqD BMydjjtMjkx9FbDkZyiHgXSEHWstGvre8701fCLOkOmsCmrSFxj++zeN2ut9xa+OYfb9xH Q66N9mrXmeKGMmUBKL3E3d0UXUudiHFJ6ju7gGuHvUoShu8AI43oQLdYWj12fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898964; a=rsa-sha256; cv=none; b=dgavAQBob04MnLWQV1F2bGcfVhyZZ+SardxGhC8rVWxrRwFPnahZ+yQHzC9XaxC+gdzTM1 QcmehyGFza0Ws9CVoiEiKmBcH87o8AtW9CBc264pHZ695RM9Cl5+Xuh31b/iXXaRu/MVnc AQ6I98k9gSqt6catGorNaDGblJy7d8e0wp7fINNy0ac0n8vJ1LmazK5rFDOpBJRo6ea7d1 u3IomCIssF8S791iaoCrf+2M+E9DKLXH6ILseUt7h07UuCPqX9zB6OZJ0dgpNrtR4XlLh6 B7bz3OOtYA1O/mMDJ2vzxFTVpuE9B4o2LsZ90/TBloBRnsZepkOCliwQo2ierg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJltD06wRzKTR; Wed, 2 Oct 2024 19:56:04 +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 492Ju38I061669; Wed, 2 Oct 2024 19:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Ju30F061666; Wed, 2 Oct 2024 19:56:03 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:56:03 GMT Message-Id: <202410021956.492Ju30F061666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 37bea3b062ea - stable/13 - pci_iov: Add a device_printf if out of bus numbers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 37bea3b062eaeff8c015d628981ab97cc9c90e56 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=37bea3b062eaeff8c015d628981ab97cc9c90e56 commit 37bea3b062eaeff8c015d628981ab97cc9c90e56 Author: Val Packett AuthorDate: 2024-09-25 22:17:16 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:48 +0000 pci_iov: Add a device_printf if out of bus numbers Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20591 (cherry picked from commit 6a4f0c063718781c5e3eddbeff0da7b89d290d1e) --- sys/dev/pci/pci_iov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index db7210cb729a..90e4e8e5d0b7 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -732,6 +732,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) /* We don't yet support allocating extra bus numbers for VFs. */ if (pci_get_bus(dev) != PCI_RID2BUS(last_rid)) { + device_printf(dev, "not enough PCIe bus numbers for VFs\n"); error = ENOSPC; goto out; } From nobody Wed Oct 2 20:37:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJmnt6YSZz5Y3kW; Wed, 02 Oct 2024 20:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJmnt5zm4z4fyf; Wed, 2 Oct 2024 20:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727901442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXUUiBjLZgdJAdJLPxu76zMLNPTUxjJ/dUIzVM2bRxg=; b=pLdv6a1cQeMP+zHKrVvRwBo4Yit2SAz+nFvRsurtsS7bvhNuS/AlX+1dEeTRebf7Sp4BS1 mALtv8HwRsLQQKKMB+HsQyx/M6RYKYvEOKoJoHFRDBPJgwTyS1Y+oCweUcWBBCGXa+nqot ZosTesud3ruTW7LcEWwj+1ogdN+LxKsW8EUO3UXJrrzIs2SyBsHOF7shrPZXBCDMkP4E8G P0/S8J6t4e1kdxaMeKQIaFRJ2bQFNYhCihzspk+E839I4ynAJFgZBAADFm6cQJvr1wksnR u8VmP3tRU+c14UpGAOVZjU7LRS8QVOVVmiAOaNmrKN2iS4Y22z1FoEW32Hgkyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727901442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXUUiBjLZgdJAdJLPxu76zMLNPTUxjJ/dUIzVM2bRxg=; b=F8erM4GxjJXXCAiz//3c6cbvQxOL96Ei1bCw4vw/ShEtEAyzSDBcoob3HnNUw8m6LHKZIW i9vXz0CzUjhG58Wkv6njnOp+yc/ElBb9um/NGTRYVLd9lTepE0vScf1elmVl/c7cnJqulQ OrsXosv3MMthRJOb+rpiNAwKPfBuBrhBYHiD3HY2q5fE+cENF0JyjLpP9hzmiKGdsoSSRN hX9hNdJSp5ObGRG7+e7v8c14rpAAVMmm+4FN9f9YlCUq6+NxRigpIMUVIHkvdrOd5JQ2Eq QnHtb31Lz/576ATUtRLJsiZfyxwEdEEUj5N/ClBlttL2ogmpZEDik71uVp2RqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727901442; a=rsa-sha256; cv=none; b=njiPVjjb/FuzL6UB8PfM00PhhdFrWCnyaTKtKr8XBOiBOVBpw6uu+8+42a5BIBm9Pkymbn dCtnwxViWUhXmeICM9cY6DGsaZPeNEupBSDENAY94OKvSZ51iDQNkt+OuRNxmzvowGzqJY drpljIFy4vd81g2mhJJr1QyWSx6XcJqFvSxCMA66B7SRwB+KgKIReqsxi8XuimWxT0wO1B cM+AoHnik7nANbCiTqHkhf4tB1DIF0xBVAgcgav+caEK55fdJq2zLY39yNjQWs5Ue169oU RjCpqvjA3bPIkq0+aIFOBC4/aU/VLtP0r+rYSrQ8jLIx122yeXXOAolc/3KNeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJmnt596wzLXs; Wed, 2 Oct 2024 20:37:22 +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 492KbMJj030095; Wed, 2 Oct 2024 20:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492KbMbO030092; Wed, 2 Oct 2024 20:37:22 GMT (envelope-from git) Date: Wed, 2 Oct 2024 20:37:22 GMT Message-Id: <202410022037.492KbMbO030092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ed03c3099086 - stable/14 - bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ed03c309908687bdb9f71dc6d9c9c8a92c54fc20 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ed03c309908687bdb9f71dc6d9c9c8a92c54fc20 commit ed03c309908687bdb9f71dc6d9c9c8a92c54fc20 Author: Pierre Pronchery AuthorDate: 2024-08-27 13:57:32 +0000 Commit: Ed Maste CommitDate: 2024-10-02 20:37:09 +0000 bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() Avoid a race condition when accessing guest memory, by reading memory contents only once. This has also been applied to _vq_record() in sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion. Reported by: Synacktiv Reviewed by: markj Security: HYP-10 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45735 (cherry picked from commit 869d760cb9d7a307faa2fbe8c1c2b238a81b74d4) --- sys/dev/beri/virtio/virtio.c | 11 ++++++++--- usr.sbin/bhyve/virtio.c | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/dev/beri/virtio/virtio.c b/sys/dev/beri/virtio/virtio.c index c249d1c9d37b..7302bc39d799 100644 --- a/sys/dev/beri/virtio/virtio.c +++ b/sys/dev/beri/virtio/virtio.c @@ -107,12 +107,17 @@ paddr_unmap(void *phys, uint32_t size) static inline void _vq_record(uint32_t offs, int i, volatile struct vring_desc *vd, struct iovec *iov, int n_iov, uint16_t *flags) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_map(offs, be64toh(vd->addr), - be32toh(vd->len)); - iov[i].iov_len = be32toh(vd->len); + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_base = paddr_map(offs, be64toh(addr), + be32toh(len)); + iov[i].iov_len = be32toh(len); if (flags != NULL) flags[i] = be16toh(vd->flags); } diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 0aeafa011bbc..5e8f8a8d322a 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -217,10 +217,15 @@ static inline void _vq_record(int i, struct vring_desc *vd, struct vmctx *ctx, struct iovec *iov, int n_iov, struct vi_req *reqp) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_guest2host(ctx, vd->addr, vd->len); - iov[i].iov_len = vd->len; + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_len = len; + iov[i].iov_base = paddr_guest2host(ctx, addr, len); if ((vd->flags & VRING_DESC_F_WRITE) == 0) reqp->readable++; else From nobody Wed Oct 2 20:38:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJmq73m3Wz5Y444; Wed, 02 Oct 2024 20:38: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 4XJmq72DgHz4gK5; Wed, 2 Oct 2024 20:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727901507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yucrtEe3Stqhl8+v/gVPdZgmnG57fY/pVOgsAsAmI18=; b=vqnJrgPR7aIH52/lY57AoIx29vcgh4nKI+NwEwZaBaok5T4xQCRoPKwhXsN/23TIcPulVI 5qNE6fh9SOohgrgEe0JsqL3Vdc2PAOEEuIuMSCoYKYTlCaEKdCwj6yTFiwxTpOiLLq5uWG jEBynct/n5Uf8IFHKKUdajM3KBuAg5C+V+GOrOz2X2eWCpfbGO7qEFm+cS/LGb56OPt5Xh 7HWgb3GleUf1W1EzgD5PVj5XjKXc2gvoStg47jxwMq+jXufLWsQmYGxZ7hya4k+MIY4k0x oF4Ckl/DuDuNmkX1Vhpr1CAwSao0uvKKSTNMmLCuW/82N01E66ZFviJTnS0KiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727901507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yucrtEe3Stqhl8+v/gVPdZgmnG57fY/pVOgsAsAmI18=; b=m3hf6qDbvgBlDk7kv92xrsvNOuF0yCUL6ihLslYMLD/PbBhhj7dMAHZpCrkdr/ZqkPYiXT 0Bz35wgA5QKj+vz9eYNti256m3Sbe4whzdDP2q1S2EhaIe2vAM/zQOT6OAwCmhgXQZQgQ2 ZiNDfmruhWGlQwpjHFOw1KLRSFJppRAGtAu4/xtf7Q4LZ4ckW6mreMrOUlJmwmG9aKx7xM LO5hbCNqRa3w+I07voSsgyfjKhkB2Nl4PpKtZyrVzfW+qqWj+Mk4njhia3iYbSjHjQ8s8P CVH6GFzhtaQBD2nSc1VseeGyJyU0ZSXfNOI9oi/EHLJBnFcxz60Ac7p/iAs/PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727901507; a=rsa-sha256; cv=none; b=cqbvaj3LTTUq/GbzlFvMbykm4ZJ7tpY3PkYqQGEOwT9tSPq2XABSzf+hsVIJSrxUNWl6o1 5GJHJnweTDf5Ka6exTAyMO3syCewNl/s5MIL2w6UzDhQFzlaceAk+odRoOJNpjGE1JPvNr Yj0hZ9U/0bIO/c6g2sRYZPfLT3WFR98sbVUpZA0KNeAx55oAt7YA1EmxmtIXSAXn1xjKie 9q8vobPoViFQ4HgSHcleC3mmXUnqvLrprYMb/y78ZQCmZNa9V4TVlUvOkT/mM+uJJMpiLW lx2aYxK043jf2Z/9JyAUvOxMgwId+1gDRk0ZAzvj6bKFdl6ljhIHo2nOnz6X9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJmq700pbzLM3; Wed, 2 Oct 2024 20:38:27 +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 492KcQ7T030358; Wed, 2 Oct 2024 20:38:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492KcQ92030355; Wed, 2 Oct 2024 20:38:26 GMT (envelope-from git) Date: Wed, 2 Oct 2024 20:38:26 GMT Message-Id: <202410022038.492KcQ92030355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6eb7879f4261 - stable/13 - bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6eb7879f426129aa38f4e8b0d57ab7456e4eb351 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6eb7879f426129aa38f4e8b0d57ab7456e4eb351 commit 6eb7879f426129aa38f4e8b0d57ab7456e4eb351 Author: Pierre Pronchery AuthorDate: 2024-08-27 13:57:32 +0000 Commit: Ed Maste CommitDate: 2024-10-02 20:37:49 +0000 bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() Avoid a race condition when accessing guest memory, by reading memory contents only once. This has also been applied to _vq_record() in sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion. Reported by: Synacktiv Reviewed by: markj Security: HYP-10 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45735 (cherry picked from commit 869d760cb9d7a307faa2fbe8c1c2b238a81b74d4) (cherry picked from commit ed03c309908687bdb9f71dc6d9c9c8a92c54fc20) --- sys/dev/beri/virtio/virtio.c | 11 ++++++++--- usr.sbin/bhyve/virtio.c | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/dev/beri/virtio/virtio.c b/sys/dev/beri/virtio/virtio.c index c249d1c9d37b..7302bc39d799 100644 --- a/sys/dev/beri/virtio/virtio.c +++ b/sys/dev/beri/virtio/virtio.c @@ -107,12 +107,17 @@ paddr_unmap(void *phys, uint32_t size) static inline void _vq_record(uint32_t offs, int i, volatile struct vring_desc *vd, struct iovec *iov, int n_iov, uint16_t *flags) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_map(offs, be64toh(vd->addr), - be32toh(vd->len)); - iov[i].iov_len = be32toh(vd->len); + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_base = paddr_map(offs, be64toh(addr), + be32toh(len)); + iov[i].iov_len = be32toh(len); if (flags != NULL) flags[i] = be16toh(vd->flags); } diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 5294da670677..d11f5683e7b7 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -215,10 +215,15 @@ static inline void _vq_record(int i, struct vring_desc *vd, struct vmctx *ctx, struct iovec *iov, int n_iov, struct vi_req *reqp) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_guest2host(ctx, vd->addr, vd->len); - iov[i].iov_len = vd->len; + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_len = len; + iov[i].iov_base = paddr_guest2host(ctx, addr, len); if ((vd->flags & VRING_DESC_F_WRITE) == 0) reqp->readable++; else From nobody Thu Oct 3 22:51:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKRjn2V38z5XRpx; Thu, 03 Oct 2024 22:51: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 4XKRjn1dYfz4PHt; Thu, 3 Oct 2024 22:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727995869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bp4LAUfdOgNgE8E+f4RjRYqDI12Ywk1Cahj8/FDmT8=; b=SG6BrH2KCd0VI2W/dAMUIuARtGTP7A7WVEjzFm0NBLaPALRgR9CRZvJZvue8gTTOFWxFs8 zEwVw59JX1T6bLGEVZVc8l3mOPUJi5+EEMvGImq5J2bDJZBqXIrlKKPMzgfSipZPIRpDcC 2FTWdamGOXk7Ve7++CxsSjFpBqIBopYuLiL20Uk1tSs5jDzQ6eEDSnLXys/pdbgo7sHQVh ZxlvPqn2RzHnLmHDZoK0RgEfB8najtL4UL2RXKOP1tLbTvUZvF1LF5IoCNCvCg/R7R2GAj 5QmJJ8GePpSRc0HEF9IbHUlF9Ccu7E58YTMZ5dobxqXleJorLiA6sS7YsF5nLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727995869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bp4LAUfdOgNgE8E+f4RjRYqDI12Ywk1Cahj8/FDmT8=; b=JGaf0RDPtmxF0KhR780CF2k7yUm1E796dXOPQoT+aOYiMSn9uJADi5oglKmXZmu4WndlQv 2P8U77qzvNC4gjDaIkji8zAd5+5msjyAEbLuy4lzFl4U/CUlvU0qGvMK9i1qkwN65RNj0T PTTqbZGSvhOyCAIg7LyeUqiXT6fQj6RENSHYEJW27QWRJgVcwBq9E7rpzkx/2OgdZdM0wE qjyaTFAraU0oRYc/Q/aCLuFWWsZ9By+8EKkOy60zp2GvB6g6R4y/WfRqG0ru1DTEvgYjN+ HJRMBd/senMaXHpPPkWdkXYv9YAiKVvYJmO+3IVbV8NXGUdcrIWdvzORDpH1vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727995869; a=rsa-sha256; cv=none; b=skkMUZIyWWxKo6NMopNJ9Cg4aO6K03DjIi6omv6VBDw+Ni633KhffnReuplUyx70S8lakU eLRv74i4YSXfbGe2H/uA61AYLVKAEg8VrETP9Br++5LCGbD6ElPwdcUGTdYu+XVfg8pdm/ aU3oztnj76PGrDQg8euCG1ZfR69AZMmaKSEgcSBYxXS8FGIfjCPF5W6Zv9RpPIY/9IjDMg DTOuee4/XC/+Uq1FcTbtgQPF1T+ECaIBk4UKt494ADSibvBcSKE//6mseTsFQWc69ZuyTy HhivH4EW6+r9exIA9RXRzOEpn7o3RM4lYKCbVFggxjypJ4DhPcFOHpPl1utJNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKRjn1DZnz18cw; Thu, 3 Oct 2024 22:51: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 493Mp9l0017063; Thu, 3 Oct 2024 22:51:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 493Mp9nG017060; Thu, 3 Oct 2024 22:51:09 GMT (envelope-from git) Date: Thu, 3 Oct 2024 22:51:09 GMT Message-Id: <202410032251.493Mp9nG017060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8375d2b9c653 - stable/13 - agp.4: Add a deprecation notice to the man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8375d2b9c653b77dcfe887c51eee16c52f585012 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8375d2b9c653b77dcfe887c51eee16c52f585012 commit 8375d2b9c653b77dcfe887c51eee16c52f585012 Author: Mark Johnston AuthorDate: 2024-09-19 10:06:49 +0000 Commit: Mark Johnston CommitDate: 2024-10-03 22:50:57 +0000 agp.4: Add a deprecation notice to the man page The driver is giant-locked and thus already prints a deprecation warning when attaching. The device file interface was broken in 14.0 and 14.1, see commit 12500c14281d, but it took a very long time for anyone to notice, and in that case it was only because of some code which probes all device files. Relnotes: yes Reviewed by: imp, jhb, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46542 (cherry picked from commit 0abe2d3903cc4569705d491f8ac6d2edea01c26f) --- share/man/man4/agp.4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/man/man4/agp.4 b/share/man/man4/agp.4 index 40da98a6b3f3..8fea599a9b3d 100644 --- a/share/man/man4/agp.4 +++ b/share/man/man4/agp.4 @@ -30,6 +30,11 @@ .Nd "generic interface to the Accelerated Graphics Port (AGP)" .Sh SYNOPSIS .Cd "device agp" +.Sh DEPRECATION NOTICE +The +.Nm +driver is slated to be removed in +.Fx 15.0 . .Sh DESCRIPTION The .Nm From nobody Fri Oct 4 06:41:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKf8p6jM2z5Y1hy; Fri, 04 Oct 2024 06:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKf8p67TPz3wkX; Fri, 4 Oct 2024 06:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2pCUj/4sTQIFPcD04qco6g3iWXUFhW3m15eLuLQxU3k=; b=qBLNUGvSsUreJQwxOA1MvEy1gHyhy/c5s89QcdS0KdXuIcL5I3SgRZq05MVHenlbvOxmEy b6xsHcwNKQ0YcyqbUEAop8DfyEKpPJ476kVaFWrBaftluE3nWzpB6sdZw9SBiEK8Q70k7w 2mVlmFN/cn9PqGOFIUm8nnSmYb0Y21Kv7J39GPhICkbn6d6+yczUKzt3hDkCf2O5rx9HhO AMfmhspHuArALnFsOBR0cDOVeB2VaNY+CQG9nlrjZwix3ASc3tdzi4gD6HDN4DWJVF8wT/ +kK8ymdVImGtcApxFoxLxDThaCGHtiWSnrNbdZpT+yEtcr/swB4ao2AXk+uZ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2pCUj/4sTQIFPcD04qco6g3iWXUFhW3m15eLuLQxU3k=; b=AMNxcChem2ykALQyLJYHKusif79c1tVU3Cyx/mNaIej+EutNzDnV4LlxVdb3YHBDH9aXRP l6fmsFc4v/XymjqJP9mbWNVTCDgPJgYCezC2JjBP+NYUeu3WrxFHJL2g39/qb1WCv2/OQI 1LFV8xl/V2N3KqB6Ch5tV2CAPPTK4MJ0i9LuSzceYK/8zs2PRgVGM/tf/wRU5R71VEv+qb r3cQSHamCuqFsNJNFOjTt5ySkLjc+/l5epUCKNdRZ2HoT1fSMeMH13p7Em7mpsaLnWTlex xLqGg1qSkVyLWjpxhU4j2HVJu5Ts+JGJLtHA+S2rf+PEfMUgiXhDOhV7p3lwXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728024106; a=rsa-sha256; cv=none; b=Qyo1RKWWIPjvtUEzxEwF4kqSefc0ccG1xlDXy9/TgPF/tcOaY3H2K1D0HrPxkeepua6Q56 79Hz/LVBEh6w5rUJjveioLHLpupFvOm2xGaTy329ZaK2Q1dFR+cncW0+ingjp2SmRfbBGH DQLmfBP1/FFoI6XzYSqRYgkks5RlFClMewNvOR44Mx4+4SoEFnri6ZivdzCCpklzLf1/V5 nG6ugyluEUvmLHY37ZSWKpRcMkY2APkkj7XTNBMOMlr2m/MKmby4OHOetx5F+Qi9K3ZATh b+uJjU5CsdmX4nFTmUYIdkWkzozQYAji1xcteR3AhLA7Wt6Rk5iBE5j0eLXDTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKf8p5kx6zNJ4; Fri, 4 Oct 2024 06:41:46 +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 4946fkiC013822; Fri, 4 Oct 2024 06:41:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4946fkna013819; Fri, 4 Oct 2024 06:41:46 GMT (envelope-from git) Date: Fri, 4 Oct 2024 06:41:46 GMT Message-Id: <202410040641.4946fkna013819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e31c5d398138 - stable/14 - e1000: Clean up legacy absolute and packet timers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e31c5d398138c14be0a262af331bd823785f61d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e31c5d398138c14be0a262af331bd823785f61d9 commit e31c5d398138c14be0a262af331bd823785f61d9 Author: Kevin Bowling AuthorDate: 2024-09-27 06:08:01 +0000 Commit: Kevin Bowling CommitDate: 2024-10-04 06:41:20 +0000 e1000: Clean up legacy absolute and packet timers The absolute and packet timers only apply to lem and em with some only applying to the later. This cleans up the sysctl tree to only show these where applicable and stops writing to unexpected registers for igb. Sponsored by: BBOX.io (cherry picked from commit 1c578f1c93112d3d53820f8b6b411488b83f0ab2) --- sys/dev/e1000/if_em.c | 116 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index ad12171487f6..cdadec17e355 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1033,27 +1033,25 @@ em_if_attach_pre(if_ctx_t ctx) e1000_get_bus_info(hw); /* Set up some sysctls for the tunable interrupt delays */ - em_add_int_delay_sysctl(sc, "rx_int_delay", - "receive interrupt delay in usecs", &sc->rx_int_delay, - E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_int_delay", - "transmit interrupt delay in usecs", &sc->tx_int_delay, - E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &sc->rx_abs_int_delay, - E1000_REGISTER(hw, E1000_RADV), - em_rx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &sc->tx_abs_int_delay, - E1000_REGISTER(hw, E1000_TADV), - em_tx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "itr", - "interrupt delay limit in usecs/4", - &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), - DEFAULT_ITR); + if (hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_int_delay", + "receive interrupt delay in usecs", &sc->rx_int_delay, + E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_int_delay", + "transmit interrupt delay in usecs", &sc->tx_int_delay, + E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); + } + if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_abs_int_delay", + "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_abs_int_delay", + "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "itr", + "interrupt delay limit in usecs/4", &sc->tx_itr, + E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + } hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; @@ -2287,18 +2285,19 @@ igb_configure_queues(struct e1000_softc *sc) break; } - /* Set the starting interrupt rate */ - if (em_max_interrupt_rate > 0) + /* Set the igb starting interrupt rate */ + if (em_max_interrupt_rate > 0) { newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; - if (hw->mac.type == e1000_82575) - newitr |= newitr << 16; - else - newitr |= E1000_EITR_CNT_IGNR; + if (hw->mac.type == e1000_82575) + newitr |= newitr << 16; + else + newitr |= E1000_EITR_CNT_IGNR; - for (int i = 0; i < sc->rx_num_queues; i++) { - rx_que = &sc->rx_queues[i]; - E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + for (int i = 0; i < sc->rx_num_queues; i++) { + rx_que = &sc->rx_queues[i]; + E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + } } return; @@ -3274,12 +3273,16 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; } - E1000_WRITE_REG(hw, E1000_TIPG, tipg); - E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + if (hw->mac.type < igb_mac_min) { + E1000_WRITE_REG(hw, E1000_TIPG, tipg); + E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + + if (sc->tx_int_delay.value > 0) + sc->txd_cmd |= E1000_TXD_CMD_IDE; + } - if(hw->mac.type >= e1000_82540) - E1000_WRITE_REG(hw, E1000_TADV, - sc->tx_abs_int_delay.value); + if (hw->mac.type >= e1000_82540) + E1000_WRITE_REG(hw, E1000_TADV, sc->tx_abs_int_delay.value); if (hw->mac.type == e1000_82571 || hw->mac.type == e1000_82572) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); @@ -3304,16 +3307,13 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TARC(0), tarc); } - if (sc->tx_int_delay.value > 0) - sc->txd_cmd |= E1000_TXD_CMD_IDE; - /* Program the Transmit Control Register */ tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (hw->mac.type >= e1000_82571) + if (hw->mac.type >= e1000_82571 && hw->mac.type < igb_mac_min) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ @@ -3381,17 +3381,29 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (hw->mac.type >= e1000_82540) { - E1000_WRITE_REG(hw, E1000_RADV, - sc->rx_abs_int_delay.value); + /* lem/em default interrupt moderation */ + if (hw->mac.type < igb_mac_min) { + if (hw->mac.type >= e1000_82540) { + E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + /* + * Set the interrupt throttling rate. Value is calculated + * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + */ + E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + } + + /* XXX TEMPORARY WORKAROUND: on some systems with 82573 + * long latencies are observed, like Lenovo X60. This + * change eliminates the problem, but since having positive + * values in RDTR is a known source of problems on other + * platforms another solution is being sought. */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + if (hw->mac.type == e1000_82573) + E1000_WRITE_REG(hw, E1000_RDTR, 0x20); + else + E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); } - E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); if (hw->mac.type >= em_mac_min) { uint32_t rfctl; @@ -3441,16 +3453,6 @@ em_initialize_receive_unit(if_ctx_t ctx) } E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); - /* - * XXX TEMPORARY WORKAROUND: on some systems with 82573 - * long latencies are observed, like Lenovo X60. This - * change eliminates the problem, but since having positive - * values in RDTR is a known source of problems on other - * platforms another solution is being sought. - */ - if (hw->mac.type == e1000_82573) - E1000_WRITE_REG(hw, E1000_RDTR, 0x20); - for (i = 0, que = sc->rx_queues; i < sc->rx_num_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; /* Setup the Base and Length of the Rx Descriptor Ring */ From nobody Fri Oct 4 06:41:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKf8r2Zksz5Y1cc; Fri, 04 Oct 2024 06:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKf8r0PCxz3x4l; Fri, 4 Oct 2024 06:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pkmcxd+6Us61eX9IqyHQy4PGURlmsJTzwiAeVn+uEHE=; b=KrIQQWcvSMMeWR6Whe+MIGtiWxUHnjp7gU3Myz16u4vgHwT319GYIlfDKJoRqnEoV6EqFF mqT7PGz2gkk03zakHHV5a8085g2/vcsz9DTaEDZ9dWupxi7QhweIY8Y3etbcwetNsGK5nB MIIqMePeyAl2k/Xw7rJm/niMDFbAHaqhngjdTPP549Q0PtskgIZIjvv3RBoM7yZqjpkXnT 94+vx6HL9OtdAWe+ufNdCJFO0M+o6Kdujtyewa6t2/Y5twevV/dBn/twvWKeNVIPfDIQXJ M8PlGdp8yH4m62Xj2fgiv4f0D8t5xdsAJepiTnrjKvc0yvIZMWG0XhjqssRC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pkmcxd+6Us61eX9IqyHQy4PGURlmsJTzwiAeVn+uEHE=; b=srHCfHyGlOBLNhufVFoTGfmnYZwr5jFND5/ksitT+sKTvuh2cfJCzunkERQmtiVSsyer7P ORc5VtwlCjUlDOna4ywxuAmufCRJFYprKVERf/P53atiBrAKP4Ph8y5XF0110tmYkYsi5R CE2mXZ3d2vqW+EdFHTZ9t/UsusueqJrbN7XRK2fuGBHgQ0aUMeWPI9kcPwO/fPwjUEmRTa kRef8gUROeRtLUIRAA/ynYJhVj2fw+ct8Kb8fyAKPUYEcPi/MtZ+rIJlpDToQMbvw5iqEv Q0MXsQr0azniICwMAaszqmCC35muTBVKRlDcLFGZKdT6PPX4sJn9lhb1nY0T+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728024108; a=rsa-sha256; cv=none; b=etD8Kb7jWx3UXDnhasY9Hj4nrsIsaqW0JLuJvJy3dqG3qYXKQqcNbagFyq0yQqImwUiEGj wBXd1h5ssEuU7KA6Sdv3GYgoOXjq8RBD/G+xjEypKAnNm5Bbwxh8eWD4hC0OKw0y25D+9c 6QBLiWsBOR/TDwAkaru7Y2sDREBgKRWOkCBNAqFsAhR3y77lEnmtD3Q3XN8l658Sce2dF8 mn0gkRFs9QUidvaoW4xAB0sesBV517etnOfKzMhwUZnwMnB1OHOjeT8wktQ3ul6v6c9doW 4RGSs9+iJ4e/uqWFcWqR+DFkxhFkiXULXkhVYPdBVDt343ewJb414PtppWpG/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKf8r00sDzNJ6; Fri, 4 Oct 2024 06:41: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 4946flxX013873; Fri, 4 Oct 2024 06:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4946flwj013870; Fri, 4 Oct 2024 06:41:47 GMT (envelope-from git) Date: Fri, 4 Oct 2024 06:41:47 GMT Message-Id: <202410040641.4946flwj013870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 88cd12ec4248 - stable/14 - e1000: Clean up ITR/EITR in preparation for AIM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 88cd12ec4248a92921cacdf618a6384ca5ed0248 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=88cd12ec4248a92921cacdf618a6384ca5ed0248 commit 88cd12ec4248a92921cacdf618a6384ca5ed0248 Author: Kevin Bowling AuthorDate: 2024-09-27 08:03:31 +0000 Commit: Kevin Bowling CommitDate: 2024-10-04 06:41:34 +0000 e1000: Clean up ITR/EITR in preparation for AIM Provide macros to derive the various needed values and make it a bit more clear the differences between em and igb. The igb default EITR was not landing at the right offset. Respect the 'max_interrupt_rate' tunable. Sponsored by: BBOX.io (cherry picked from commit 9bf9164fc8aad1ca828c725413e06462aef1e4dd) --- sys/dev/e1000/if_em.c | 20 ++++++++------------ sys/dev/e1000/if_em.h | 11 +++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index cdadec17e355..b9c6131e6741 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -499,9 +499,6 @@ static driver_t igb_if_driver = { #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -551,7 +548,7 @@ SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, /* ** Tuneable Interrupt rate */ -static int em_max_interrupt_rate = 8000; +static int em_max_interrupt_rate = EM_INTS_PER_SEC; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -1050,7 +1047,8 @@ em_if_attach_pre(if_ctx_t ctx) E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + E1000_REGISTER(hw, E1000_ITR), + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -2287,7 +2285,7 @@ igb_configure_queues(struct e1000_softc *sc) /* Set the igb starting interrupt rate */ if (em_max_interrupt_rate > 0) { - newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; + newitr = IGB_INTS_TO_EITR(em_max_interrupt_rate); if (hw->mac.type == e1000_82575) newitr |= newitr << 16; @@ -3386,11 +3384,9 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type >= e1000_82540) { E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + /* Set the default interrupt throttling rate */ + E1000_WRITE_REG(hw, E1000_ITR, + EM_INTS_TO_ITR(em_max_interrupt_rate)); } /* XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -3418,7 +3414,7 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type == e1000_82574) { for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), - DEFAULT_ITR); + EM_INTS_TO_ITR(em_max_interrupt_rate)); /* Disable accelerated acknowledge */ rfctl |= E1000_RFCTL_ACK_DIS; } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 244762e8ed0d..7219dc57c333 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -244,8 +244,15 @@ #define IGB_MEDIA_RESET (1 << 0) /* Define the starting Interrupt rate per Queue */ -#define IGB_INTS_PER_SEC 8000 -#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2) +#define EM_INTS_PER_SEC 8000 +#define EM_INTS_MULTIPLIER 256 +#define EM_ITR_DIVIDEND 1000000000 +#define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER)) +#define IGB_ITR_DIVIDEND 1000000 +#define IGB_ITR_SHIFT 2 +#define IGB_QVECTOR_MASK 0x7FFC +#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_ITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 From nobody Fri Oct 4 06:42:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKf9t1YxWz5Y1d6; Fri, 04 Oct 2024 06:42: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 4XKf9t11Nlz3y2h; Fri, 4 Oct 2024 06:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RiFY/ZTCmc5Guae3nQc/cuR0cbF1EG9aiR2Bctvd3+Y=; b=nwNN5x+qRdRt54wVRtERElLroF2hdbFCrXmrJxxj3KGhLctaDT7pDyGASc20aboIGOin8c kRLBAuwcUVAU8ObMijcGnAoFV27XZH9JBxq7T95CMsuOEEpujTHB4zXLdbvZVs7reS/bzs ww0/HJGJn+BdeTDvuMZ/xTlCzI8cbYqZFrPeYPJINSlIXBZ5wQLiwZ9t3RPG956fUTfKQJ tWDH8AVnvWcEuI7QShsuWwB3y088kQVo3yzOoXOXwfkuqnY1RGfkTxVXAIaUQvRpMl/rr9 gjrLJirIJ5WFDeAgKsUyYxQyNyr2pgWLQbv3XPNo0VQYg1I7VRV+j7fpQ8W5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RiFY/ZTCmc5Guae3nQc/cuR0cbF1EG9aiR2Bctvd3+Y=; b=uc+N+jxAthn/3OaTXHOrXvMiLKCQjvMCCz6CpB2EJdhBRtBfNqWuD6xDl+RnLie6zz4z1r Yr2OZc5CrJR8hZhSx2UTm6OVphcD8wtViuX7cS0MtyOfRlkw8RcfG8P0g/BqaS10dzgCtQ MqTUTlb/vzxUPkdRvcp+6FHVOYCQpXj2N1z3Y3u10Rne57rEjHqUEvyAeeRSLFgsL1p7Ik kipcvTgWFTEQgbEkLRNVvsoHUGpg356uhZQw//UarsqiS/tHit0GgJNUAlL0+ERD1fDeGq wAKj3gM5c9QplUHYJXlevfVStENAfKXriorjbUpeLdYQtJ0BRfpZ8BhEzXHuEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728024162; a=rsa-sha256; cv=none; b=x0J9oHKqOKgog/KpPvefIWVAG/N45D20RLnmrw2mXSU1QKWeYYO0Sx535qy82zr55uJisF V0JcmoxQMcrnBpAiJaKij9048LbWy+EKQlOqIpkXLwo/YznzuSOSRtKsaFQPabA35DhI35 BkgfUABKlviJk2yfNKRmamp8onkn1AOmb9dFrJI+7Ly+qv9SwZZqtZ1Q4juh8XUlR1kz/C rQwV3i2DrsCOGe4u7cNVnNuLvtOiwBbBX/no2H8zJmq18soutiZO5PdN1eMISWdEugPrLy PHCtOy8J39EuBBrpzlRJ74LMgcEwUMwnHN74sYNTXyabyPWwgJ9c2jb/DATpJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKf9t044dzNJJ; Fri, 4 Oct 2024 06:42: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 4946gf8V016634; Fri, 4 Oct 2024 06:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4946gfZC016631; Fri, 4 Oct 2024 06:42:41 GMT (envelope-from git) Date: Fri, 4 Oct 2024 06:42:41 GMT Message-Id: <202410040642.4946gfZC016631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6ccd24f18376 - stable/13 - e1000: Clean up legacy absolute and packet timers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ccd24f18376fb44285509a2e3c6469bdebdc108 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6ccd24f18376fb44285509a2e3c6469bdebdc108 commit 6ccd24f18376fb44285509a2e3c6469bdebdc108 Author: Kevin Bowling AuthorDate: 2024-09-27 06:08:01 +0000 Commit: Kevin Bowling CommitDate: 2024-10-04 06:42:10 +0000 e1000: Clean up legacy absolute and packet timers The absolute and packet timers only apply to lem and em with some only applying to the later. This cleans up the sysctl tree to only show these where applicable and stops writing to unexpected registers for igb. Sponsored by: BBOX.io (cherry picked from commit 1c578f1c93112d3d53820f8b6b411488b83f0ab2) --- sys/dev/e1000/if_em.c | 116 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 6d9eedae3df4..8a3178d737b2 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1035,27 +1035,25 @@ em_if_attach_pre(if_ctx_t ctx) e1000_get_bus_info(hw); /* Set up some sysctls for the tunable interrupt delays */ - em_add_int_delay_sysctl(sc, "rx_int_delay", - "receive interrupt delay in usecs", &sc->rx_int_delay, - E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_int_delay", - "transmit interrupt delay in usecs", &sc->tx_int_delay, - E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &sc->rx_abs_int_delay, - E1000_REGISTER(hw, E1000_RADV), - em_rx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &sc->tx_abs_int_delay, - E1000_REGISTER(hw, E1000_TADV), - em_tx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "itr", - "interrupt delay limit in usecs/4", - &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), - DEFAULT_ITR); + if (hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_int_delay", + "receive interrupt delay in usecs", &sc->rx_int_delay, + E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_int_delay", + "transmit interrupt delay in usecs", &sc->tx_int_delay, + E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); + } + if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_abs_int_delay", + "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_abs_int_delay", + "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "itr", + "interrupt delay limit in usecs/4", &sc->tx_itr, + E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + } hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; @@ -2289,18 +2287,19 @@ igb_configure_queues(struct e1000_softc *sc) break; } - /* Set the starting interrupt rate */ - if (em_max_interrupt_rate > 0) + /* Set the igb starting interrupt rate */ + if (em_max_interrupt_rate > 0) { newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; - if (hw->mac.type == e1000_82575) - newitr |= newitr << 16; - else - newitr |= E1000_EITR_CNT_IGNR; + if (hw->mac.type == e1000_82575) + newitr |= newitr << 16; + else + newitr |= E1000_EITR_CNT_IGNR; - for (int i = 0; i < sc->rx_num_queues; i++) { - rx_que = &sc->rx_queues[i]; - E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + for (int i = 0; i < sc->rx_num_queues; i++) { + rx_que = &sc->rx_queues[i]; + E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + } } return; @@ -3276,12 +3275,16 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; } - E1000_WRITE_REG(hw, E1000_TIPG, tipg); - E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + if (hw->mac.type < igb_mac_min) { + E1000_WRITE_REG(hw, E1000_TIPG, tipg); + E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + + if (sc->tx_int_delay.value > 0) + sc->txd_cmd |= E1000_TXD_CMD_IDE; + } - if(hw->mac.type >= e1000_82540) - E1000_WRITE_REG(hw, E1000_TADV, - sc->tx_abs_int_delay.value); + if (hw->mac.type >= e1000_82540) + E1000_WRITE_REG(hw, E1000_TADV, sc->tx_abs_int_delay.value); if (hw->mac.type == e1000_82571 || hw->mac.type == e1000_82572) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); @@ -3306,16 +3309,13 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TARC(0), tarc); } - if (sc->tx_int_delay.value > 0) - sc->txd_cmd |= E1000_TXD_CMD_IDE; - /* Program the Transmit Control Register */ tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (hw->mac.type >= e1000_82571) + if (hw->mac.type >= e1000_82571 && hw->mac.type < igb_mac_min) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ @@ -3383,17 +3383,29 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (hw->mac.type >= e1000_82540) { - E1000_WRITE_REG(hw, E1000_RADV, - sc->rx_abs_int_delay.value); + /* lem/em default interrupt moderation */ + if (hw->mac.type < igb_mac_min) { + if (hw->mac.type >= e1000_82540) { + E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + /* + * Set the interrupt throttling rate. Value is calculated + * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + */ + E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + } + + /* XXX TEMPORARY WORKAROUND: on some systems with 82573 + * long latencies are observed, like Lenovo X60. This + * change eliminates the problem, but since having positive + * values in RDTR is a known source of problems on other + * platforms another solution is being sought. */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + if (hw->mac.type == e1000_82573) + E1000_WRITE_REG(hw, E1000_RDTR, 0x20); + else + E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); } - E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); if (hw->mac.type >= em_mac_min) { uint32_t rfctl; @@ -3443,16 +3455,6 @@ em_initialize_receive_unit(if_ctx_t ctx) } E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); - /* - * XXX TEMPORARY WORKAROUND: on some systems with 82573 - * long latencies are observed, like Lenovo X60. This - * change eliminates the problem, but since having positive - * values in RDTR is a known source of problems on other - * platforms another solution is being sought. - */ - if (hw->mac.type == e1000_82573) - E1000_WRITE_REG(hw, E1000_RDTR, 0x20); - for (i = 0, que = sc->rx_queues; i < sc->rx_num_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; /* Setup the Base and Length of the Rx Descriptor Ring */ From nobody Fri Oct 4 06:42:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKf9v27jLz5Y258; Fri, 04 Oct 2024 06:42: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 4XKf9v1X8Mz3y0y; Fri, 4 Oct 2024 06:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlz13UzUnx9VCQA3Q8xhbKAIunXYgxSc3f9mler0pgk=; b=IEyZeuJUnC3Skd7BDYW7/FRpNE/19uvH0xBzavTPXrehUDZxFlahqwhbc6HbJFbGp1Vvjn DZ70j2KiMRTJHUrJmUGEp/61QI0pTic0NXL/3R0EpVpHbv8w7e+KQOfLpPlyT0ZB0GECVt P+StmvegWNwTxz1Fi9IpqMLGWMr23ywKvEEKhlo6IVHQZ1Ci26p4OaDIV9pDFmKuV+C6r9 pOmvSWGP/+3QFglr5I5rqm9G6TF3UNbImMNVsaZMhV7gKAUWrIdGY83yXmz5xANYAtbws6 GexHmf6IpZ/aoCOC+76NtYG+w00JX++Se8zdBjjOqb+A9IqvP4UN6eJykstPIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728024163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlz13UzUnx9VCQA3Q8xhbKAIunXYgxSc3f9mler0pgk=; b=I3w7JV71/SngOr42zoRdlvg7NaCXcVJfhbPTZYW0LjVaX/Qhs0xlkWFGIAAwLsRtJ3tS68 MRfS3dJmMf2//+1GrS/d1w+KiuGX+15QjVxCROOtU1Pl5/UiNW67Oe2o15vkBt0OBDGDTA BDgI+vrR4hirTDBUSYJyhayfRP41QbcGAecbelZgipsTYUNC7F8Xbujjlrtmmon/X4+ES4 aW2NDNzrMC4e2B2vI8s1yOHevx7L3kaYk8Rfdjnw1RxnRS28U3sA2XYh8hk2vvqi6frql2 qTl7vHTWrv6gxLZ5U1ur2zswnvMFmoG3XnXKN+ob8z3LY+Ffu0uXRnBt0K2EUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728024163; a=rsa-sha256; cv=none; b=l62p2XX7rTpfNbJPEUbF9o/peSETbf5FtQ8umWtdXN1k25Fw6mQu3EdFi7lgohxAAh4Pt9 /DRXS5EfMH1jStpFclwWl14sq81wqroPUKTgwtG4v3odfP0trc93B0mCCwcVx9zaO85HKb 95buiz5usd1Iof+nZu4YRHGKChKCCIp/6mlSlZ+tT2CX/Yrd5R+xcolc/tLh10dvRqyTW3 dC4+bcsOdLkVFx9B8Gik2pdpGuE7AKUhyJoar/ByhLPyi5UZGMSm4mquHPYICYqZ0JwWdv IufDWkI9i1jE2Dm4VACJgYn4DligZXtR5sDEK+9rKpRsRRE8VYfuZ3kZwilr0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKf9v17H8zPJc; Fri, 4 Oct 2024 06:42: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 4946ghME016685; Fri, 4 Oct 2024 06:42:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4946ghEB016682; Fri, 4 Oct 2024 06:42:43 GMT (envelope-from git) Date: Fri, 4 Oct 2024 06:42:43 GMT Message-Id: <202410040642.4946ghEB016682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 94227aef87bd - stable/13 - e1000: Clean up ITR/EITR in preparation for AIM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 94227aef87bd5233b0996d9ff23d1f839229b20f Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=94227aef87bd5233b0996d9ff23d1f839229b20f commit 94227aef87bd5233b0996d9ff23d1f839229b20f Author: Kevin Bowling AuthorDate: 2024-09-27 08:03:31 +0000 Commit: Kevin Bowling CommitDate: 2024-10-04 06:42:31 +0000 e1000: Clean up ITR/EITR in preparation for AIM Provide macros to derive the various needed values and make it a bit more clear the differences between em and igb. The igb default EITR was not landing at the right offset. Respect the 'max_interrupt_rate' tunable. Sponsored by: BBOX.io (cherry picked from commit 9bf9164fc8aad1ca828c725413e06462aef1e4dd) --- sys/dev/e1000/if_em.c | 20 ++++++++------------ sys/dev/e1000/if_em.h | 11 +++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8a3178d737b2..41d3ba093bab 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -501,9 +501,6 @@ static driver_t igb_if_driver = { #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -553,7 +550,7 @@ SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, /* ** Tuneable Interrupt rate */ -static int em_max_interrupt_rate = 8000; +static int em_max_interrupt_rate = EM_INTS_PER_SEC; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -1052,7 +1049,8 @@ em_if_attach_pre(if_ctx_t ctx) E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + E1000_REGISTER(hw, E1000_ITR), + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -2289,7 +2287,7 @@ igb_configure_queues(struct e1000_softc *sc) /* Set the igb starting interrupt rate */ if (em_max_interrupt_rate > 0) { - newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; + newitr = IGB_INTS_TO_EITR(em_max_interrupt_rate); if (hw->mac.type == e1000_82575) newitr |= newitr << 16; @@ -3388,11 +3386,9 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type >= e1000_82540) { E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + /* Set the default interrupt throttling rate */ + E1000_WRITE_REG(hw, E1000_ITR, + EM_INTS_TO_ITR(em_max_interrupt_rate)); } /* XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -3420,7 +3416,7 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type == e1000_82574) { for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), - DEFAULT_ITR); + EM_INTS_TO_ITR(em_max_interrupt_rate)); /* Disable accelerated acknowledge */ rfctl |= E1000_RFCTL_ACK_DIS; } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 244762e8ed0d..7219dc57c333 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -244,8 +244,15 @@ #define IGB_MEDIA_RESET (1 << 0) /* Define the starting Interrupt rate per Queue */ -#define IGB_INTS_PER_SEC 8000 -#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2) +#define EM_INTS_PER_SEC 8000 +#define EM_INTS_MULTIPLIER 256 +#define EM_ITR_DIVIDEND 1000000000 +#define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER)) +#define IGB_ITR_DIVIDEND 1000000 +#define IGB_ITR_SHIFT 2 +#define IGB_QVECTOR_MASK 0x7FFC +#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_ITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 From nobody Fri Oct 4 08:33:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhdX0LYnz5Y8Kp; Fri, 04 Oct 2024 08:33: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 4XKhdW6kXjz46Qb; Fri, 4 Oct 2024 08:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ohwn7d1RG4zvEXbE8/VyaqmsQ8R/sZvNluYpQ2z75iI=; b=gZKr0Y3BhgSbr+GyInJCuvQTEZjrf7zi502q0bcAkeR7Xo05X5nhSll5qk/aqUliMbXuiK 0YBistiI0MYWoE+uR3ABS/a+FYnNkhWj6d5uQ+D5Sg3LOfWD8zEC/KNxjXYbR8JQY5y4Kh edYA5tNXsGeEesIDxtmZg5Sk1P/jlQPlSZIO2Z+CV/xJsFsWWnrzX3rB2eWsu/f/lSuBnS UH9dkr4bvDQkxtcMrLMYZBG6NIHeRy0O8EkBxhP6dmCZ3Z3y2iNevGAaHeha40jiNnO+D3 HOYLiEHt+DPPRzObF7qp6HC7+HarFw+cd0e6U6qcIsOTV6HE9rXXiQA0QLzCwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ohwn7d1RG4zvEXbE8/VyaqmsQ8R/sZvNluYpQ2z75iI=; b=lLZXckrjKk0j3unMyHiQBUXYVi0QEk1iDZigZ99Fk7U6JGinSl33X2uUEPd3ZjxlQz98a5 6lsfMiyHOPbmEJnN6U36xAM+HWWwXrk+i2FpmvOZ0NFRujmBOW/BhI1g6TuFV7vmtT9UeU ZZ7LkHURHzia/3uDqT1LPJGa/99L2zxPlL1pbBD40xz3R991goTLEbCUcLxdZwJrmUHRo5 XO0FCx3Dc5FiAwzBOXyrUwxXZ05mZJFoc2VBzPli9WV4xDxWNFsgc6hYo4qcVX85xR6MYy 1RZX/6XUC5w5VJxw+S/MFl/bWNqbLnlEBijHFe/StiSzbE4THEvbDXAKOSGn6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728030799; a=rsa-sha256; cv=none; b=nybV5LSfgu/lVqoSRLzDzsmknUn4IJmFm+kDB8yiGVBDOyD+b8zTUC58FpvtCzndViKjly DgCcHf6FL33GRg7g/TB6Dn2zWnLrKYZmp42eG5RxsXS9nJl7/7CojCdZXeg4kXAZebS6OM 05NYQ6/Y0/4qJAkbvemuZjOLIdx3nzL+ZEZZ0HiHCIVc+leA/AH05JLGgRdfs/t42jHFEH NOLLlnJg+Aco10L+EhnNWyzguGq/yRJBwMBhIyiRX90NDmP43ZgfECDaPPfPYwWrqRnsk6 MqWJcoaurEnpUUMzCeXo6AlzpcNrRaNRt4zpfNcXDEUMb9hlu+s1KfhU6qBdQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhdW6D1nzS0f; Fri, 4 Oct 2024 08:33:19 +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 4948XJb4003120; Fri, 4 Oct 2024 08:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948XJ1J003117; Fri, 4 Oct 2024 08:33:19 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:33:19 GMT Message-Id: <202410040833.4948XJ1J003117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 290a02913765 - stable/14 - extattr(9): Mention system namespace restrictions in a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 290a029137657e5af0918c9546e6fc880d3ea867 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=290a029137657e5af0918c9546e6fc880d3ea867 commit 290a029137657e5af0918c9546e6fc880d3ea867 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:12:51 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-04 08:33:05 +0000 extattr(9): Mention system namespace restrictions in a jail Reported by: netchild Reviewed by: gbe Differential revision: https://reviews.freebsd.org/D41676 MFC after: 1 week (cherry picked from commit 315d7bbbb4e4b35d195a0a74ede229b1f64d42cc) --- share/man/man9/extattr.9 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index 3a49746d1eb1..c765a55e9059 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 23, 1999 +.Dd September 1, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -54,6 +54,10 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. +By default processes in a +.Xr jail 8 +can not access to the system attribute data unless allow.extattr +configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of the meta-data, in the style of @@ -77,6 +81,7 @@ Appropriate vnode extended attribute calls are: and .Xr VOP_SETEXTATTR 9 . .Sh SEE ALSO +.Xr jail 8 , .Xr VFS 9 , .Xr VFS_EXTATTRCTL 9 , .Xr VOP_GETEXTATTR 9 , From nobody Fri Oct 4 08:33:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhdY1PJ8z5Y8ZW; Fri, 04 Oct 2024 08:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKhdY0kc1z46Kt; Fri, 4 Oct 2024 08:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VcGw/BJ7NF+ly2ctxXFrJ//xAR3CIcVGo+L955xUUO0=; b=g2/D9fuuY1n2OKBHu3BVzqhRKJC9Xe6fBXouu0bt5Ih+a47vVcZ5bTM7YyDHCTJpfZAMnC v1m5QVm/fCAGRfkZ7bDpPgqW4NdjXXjTFilvoXSqf01QX/f1P3+g0n3CABRZ7jGoiK8hbR AjvgzMmXLLSXZTI1pFfLH00fPQsPpsy3XRjvtRtR30yHRtU5CXMSPpjtMsdQoOG5DQy0wh o6JLAsjmpsP5eOOKW7x3AFtAEzIRB8puNE8uGfQyGgY3tyKRUQKquzsRwzH94GlnjNUFA0 1cRjsJ4roN2qxkeyJisLm94quI9ezJqTHAK/ca3oYgzrNzUH7IvW6SwNHMHLiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VcGw/BJ7NF+ly2ctxXFrJ//xAR3CIcVGo+L955xUUO0=; b=W6Z6DCWMlEtw+gOJPXgTYVanfWYjs0k9WXkRBfp1eoJFHXCfsMkUrp8A7SjOifbshZM7NF zNARiffrFmLJUNHE1Hx/zWFoqXPAlRSmf12YI8XGfgAJPQVNgkpjT7+dTOFcS56q0wV87t xRoWRWhqs9T6PGOuadNci/Q8gSEBlfrbMW8loisorqsJlTy6e0N3xVbbkonQGvDpiAdySn CBuxd1T2H7NbJWfImvnKakXH8xag11HpKamP2TWkojZQuSNwbIkb57wHgUderXIoWyBbv3 liIG542w4w028Xw6MJnRuMcRZhUFWzgbhN+Qpz3c/AQjwmDmlAWd2B+/5I4Egg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728030801; a=rsa-sha256; cv=none; b=XKDxxMtRZdYAwfgAFdDl0ntVNkKsW7TRTjv6ACZUBl4liigVGII9rPBuYh5DxH//ZVsYyO vkJpAxUC1CsEkNBGMoeBWMPS1LFMDwkOnyChZ7EwGwqTKs0GbwfoB/YFhCQKCvV4ZQx7CT rgH3y9HU64XSezuEcBEQ9jcqAO+jeHTGFNqdrlFdRV3kTPCXVn89SOQPZtI9+L+rbvA5Cc YQKN4gJKQv2WxXIGPRgw/u2HgNFNsnAMwNjX21DdibIYyD7o6DmNnbpogVojQ0QZo7gB+I dgDdBJXTFMjZo6NQcuzaoDScz0pW/WpbemY2m+1kCg6Csb2zKrvpw+xfCj5IgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhdY0LCtzS0g; Fri, 4 Oct 2024 08:33:21 +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 4948XKjU003175; Fri, 4 Oct 2024 08:33:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948XKif003172; Fri, 4 Oct 2024 08:33:20 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:33:20 GMT Message-Id: <202410040833.4948XKif003172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ffa1a342697d - stable/14 - extattr.9: Improve the fragment about jail(8) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ffa1a342697d7bfc53bf2e0c467fee3ed475a858 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ffa1a342697d7bfc53bf2e0c467fee3ed475a858 commit ffa1a342697d7bfc53bf2e0c467fee3ed475a858 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-05 09:59:35 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-04 08:33:05 +0000 extattr.9: Improve the fragment about jail(8) Fixes: 315d7bbbb4e4 extattr(9): Mention system namespace restrictions MFC after: 1 week (cherry picked from commit e8fc6a9980d9367f6fd4fee795a35e104104397e) --- share/man/man9/extattr.9 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index c765a55e9059..8ccc0b77be09 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2023 +.Dd September 5, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -54,9 +54,10 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. -By default processes in a +By default, processes in a .Xr jail 8 -can not access to the system attribute data unless allow.extattr +cannot access the system attribute data unless the +.Va allow.extattr configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of From nobody Fri Oct 4 08:33:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhdb2mFYz5Y8Ps; Fri, 04 Oct 2024 08:33:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKhdb027jz46R6; Fri, 4 Oct 2024 08:33:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bozT/+rNZrED3XaVUWZYPZtEGt/bXVjFD7Vu/KSmfhQ=; b=tNs5XoSaDzbM7wj1OCmEWfPtcozyBqCf/MQZzsAlgZZlaVwvNDbpnmXUx1lGB0ns6owR17 a3Vymhm0vkUp7upL5w0r+h5qp/hRr8oYhp6Ssc6KcGqLrp6nHwf7UmwjJuJKknxQJ/EKMs 85kJBauOGcahTRAfAhEqnv/zGO9CKi1rdZIKt1VjcRkGfnMyIhyhdCoz+Wu0yXDU+S8fXU aAbQxFedQn+iY9IKIIyY9XUdNKDnAqBrD7IQUZ8ZtFl7iKr2wDi+2wZxDTTuwpfoTHxQb2 jv9URGx4C/vppc9C5eGMcWcbmGx9/b4GrIfM29uOVieEVhS2GIz++9z7G6oNyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bozT/+rNZrED3XaVUWZYPZtEGt/bXVjFD7Vu/KSmfhQ=; b=KmiQ248oyV6WqvQBX9r+1ih5+Wm1jljUm05DZbjfUlEDQUJH7n1FHqFK+A4IdRs8l62bVk +abC4F5NLORhDLDXmXJX6wWdYzFnVbllow7fvIeVswBTHVSff/TpkZSLz1iZ9qUvlp8Sxl j8IbcsuNSpKx+/JvUOHqZVnl+9/INvKsbb4p2T5h3/vCyKZR7IOMlcBgMPEgCwD5RGqpQ5 6RUNy8IsJZcj8SZ+diQH+0MAx9V3yNcX00PQW2MF/wY5IDh5Uhq3MbtQp1C/ATetDdRDaB 1Q1RLeYdk1NG0vdOXndvcKKdla45Z1N5hWE9iCSV2PXNd2p91Kr+MtkK7JDeDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728030803; a=rsa-sha256; cv=none; b=Tz0v9B5qzmdhLVd5itqc+v6AXqfJ+jtC4jpW7CERYUWpyOhgDhLjh5HMvD6oATUUZe/Y62 FbterCFJY9A6Y4gYe6Glf9OYTWkNMNqOTbIDcK+dLfdzWBCBrT8rNYjbSReu3lE0vQXnXo 0aAZTdPDE66bouVPWd3ekhd/CkOvnsm+SQjA1hVRjQBEcj/yuK9007yrYaxtqAS20BZrtR 5iuID4orppEM9zsHfWUqOaV7XBIvWrYiUmxhoQ35rjYMdeQckYG+2gTyJ3Gh/V7Cnz9GD0 d0d60YTSlRzmbPGuDq059oySEwQd/mDRqkX2ATrM5pcYZTCIsrrl37z4l80maA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhdZ6jYszRWt; Fri, 4 Oct 2024 08:33:22 +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 4948XMoN003321; Fri, 4 Oct 2024 08:33:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948XMaH003318; Fri, 4 Oct 2024 08:33:22 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:33:22 GMT Message-Id: <202410040833.4948XMaH003318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ca2d3fdff035 - stable/13 - extattr(9): Mention system namespace restrictions in a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca2d3fdff03597d9df4ff871170453cd76513e5c Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ca2d3fdff03597d9df4ff871170453cd76513e5c commit ca2d3fdff03597d9df4ff871170453cd76513e5c Author: Dmitry Chagin AuthorDate: 2023-09-01 08:12:51 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-04 08:33:11 +0000 extattr(9): Mention system namespace restrictions in a jail Reported by: netchild Reviewed by: gbe Differential revision: https://reviews.freebsd.org/D41676 MFC after: 1 week (cherry picked from commit 315d7bbbb4e4b35d195a0a74ede229b1f64d42cc) --- share/man/man9/extattr.9 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index 3a49746d1eb1..c765a55e9059 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 23, 1999 +.Dd September 1, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -54,6 +54,10 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. +By default processes in a +.Xr jail 8 +can not access to the system attribute data unless allow.extattr +configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of the meta-data, in the style of @@ -77,6 +81,7 @@ Appropriate vnode extended attribute calls are: and .Xr VOP_SETEXTATTR 9 . .Sh SEE ALSO +.Xr jail 8 , .Xr VFS 9 , .Xr VFS_EXTATTRCTL 9 , .Xr VOP_GETEXTATTR 9 , From nobody Fri Oct 4 08:33:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhdc37g9z5Y8XZ; Fri, 04 Oct 2024 08:33: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 4XKhdc1LhWz46LK; Fri, 4 Oct 2024 08:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oX7mW/SUQDC9K7o9b3p6UjzP0yOuzDnZNPtw7hm4guE=; b=R1FYLO84y6/kmu3KsctsL16XHhnR6Dbt64+jBMqtQwaDcy3Rhbqe3RpePu/PPEInUlZlzj Qly5y5sYliclZfU5ftjwpn9xEsTfaHW6oktCtR3JGrLRBM+h9QFhNE/cOvKEQF/w+aH2or 6GpJBgCIS8wBfDeI8UnmWWMcf9CKJtBcHruUDYJDPxRF8o5OWLCuT6m4hJk2A1NVssrDSK jqhnuFzcM+jA1Wd3vkiZBM7jErNhnuXZ+e/HtJ8HK4GhlG77QVozL3IdLuf9YbSYvQuzox zDgpa/4EMOMcp3cGx3r2l4Up8oEmbsJ281nCnFOdvwI6nkvv/N3moQNuwe33SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728030804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oX7mW/SUQDC9K7o9b3p6UjzP0yOuzDnZNPtw7hm4guE=; b=xJFWsBAH0ZWNtth6oDy4W0U6YCHaiqPpbutj3M7LZ905ApRd6EfWTYN2Pn9WSYjN/IhXPe G1FoNI1tY8RKnGrSZuRWS4NPN0PWIpQzINqGLr+rRIdc1J6mJIYIxlTXBVA6K8WsJH2t6c XRK6xXaTdSm05b5JunhLwRuJ4m0CwShLIlN6QA9z8QMiu9QkKPmd0nn49Emz5q7qt6fxHU 6Wd8KzNvb4qNNqlq7tunrA68c3b/HW1zXdq8yZVNKlM/ku4rIduh6VgM4Uv2qqFZ20DXc4 tNab/bVcFCyzFN2M1DeouDdhQNiwYViURHYLsZM2gIV2nrkQNZjQ5eXurb/XeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728030804; a=rsa-sha256; cv=none; b=dogrVT5uT/iIx2y6qJm92hBUwXNuKIWHsrqCmjHeo+TbvusFJS6VlDeicMD1RaYxpNmwsg UQF6+6aJLq9FbhwjsHXh9VaHi3c/GJcHHRmrMXbFXHsbzhLZxwXh2CoBN6EeGdJL2gwxM3 x5zENSz6GfCpk3kJ3b8bPKzFydET+5/Gw+9hcwYXoEgq2qfTjJ1VFw4vKGL058+t//wINH eigYkxRl7EuS6rgZ4uhsYLX2NoZcJgPzFeoaoRa5ZBKS76stvPJRNHCPsBDjcG4/LFXNDh SMbrE5ecJGDnv5WNVBtHP5tP3DAYQD4xK7sKJnnPcairZVe0iuQ7IaJ1zumlnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhdc0y9zzRb1; Fri, 4 Oct 2024 08:33: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 4948XOO4003366; Fri, 4 Oct 2024 08:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948XNtX003363; Fri, 4 Oct 2024 08:33:23 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:33:23 GMT Message-Id: <202410040833.4948XNtX003363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: bb91fa71bbb7 - stable/13 - extattr.9: Improve the fragment about jail(8) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb91fa71bbb7de8ee7b624ca313d73c91594cdb8 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=bb91fa71bbb7de8ee7b624ca313d73c91594cdb8 commit bb91fa71bbb7de8ee7b624ca313d73c91594cdb8 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-09-05 09:59:35 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-04 08:33:11 +0000 extattr.9: Improve the fragment about jail(8) Fixes: 315d7bbbb4e4 extattr(9): Mention system namespace restrictions MFC after: 1 week (cherry picked from commit e8fc6a9980d9367f6fd4fee795a35e104104397e) --- share/man/man9/extattr.9 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index c765a55e9059..8ccc0b77be09 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2023 +.Dd September 5, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -54,9 +54,10 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. -By default processes in a +By default, processes in a .Xr jail 8 -can not access to the system attribute data unless allow.extattr +cannot access the system attribute data unless the +.Va allow.extattr configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of From nobody Fri Oct 4 08:45:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhvR0z07z5Y99q; Fri, 04 Oct 2024 08:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKhvR0PDpz47nZ; Fri, 4 Oct 2024 08:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RebegqqSwgkGXVLX/cWYtW3hcAI3t4u3o78UiP63qT4=; b=f2Y/jhR1GXG53gnPbqTcpzJxhYguP5aVtOW6Z5iQAbVUFzuRwOAL9pnO63cDdJniajCjyB 4m1eaPXMnhjx4CWBKMSvpMca2RJ8FpwZxgvpcVI/4+b0u+PmjDsr1bXsGbFmavzy0d3nQN XDplr+iVDxVjW0GIHWvjMDHWZwBpISByxlXuKVzkUV9O5wiFhTHTkJXgjEjghK3MA3EwqJ XYqRp/6TM/ZmK1CsUn+pfRdn5dUAwQvm+/V2T4wD9nqvzozZVfDZ198YNO4R36HVsMLtBJ 5WxqCc8VYm+cVHy58r9ANqrutSqON/lIWIchZmqQz3wVbdn5uQw5w+wXI8q0zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RebegqqSwgkGXVLX/cWYtW3hcAI3t4u3o78UiP63qT4=; b=Q9dhRJh/s5/9P5z1CN3EClsgwmnFMsd+a6qkSIxRu+J10wneOXJSoAw+0MGV9vukmLknrc dLpmmxtIZA8jA/OM1rdcoPzZ7YDu7LUgzjkMBnhgpoOQIeC+W6zRVk2+3MJYu3TtaU2Q4y u/lshNQiDTNZzNQ5+qrMwNI1dsYOytDHx2HiXkwW3GPCNnbsR2PSHpN+hGG1vvvHEiqXpX MmhLVc6xO+HdDPA0Hok9CzEdkS4qvXueSGycwMAlrqOaf1jZ9iLY+NLtj2x2O438JGzkm1 leBzmsQbYzd2jcHlnnlxOsWwkiqtpiKZdt56kygzZLyYEc5tVFbIIcwzji8Tlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728031523; a=rsa-sha256; cv=none; b=xjpA49xOJ1leUiZuOMH7L7Rn7PowDVWTdwbpeu/DOHSEEolOLabF3J6iEBU1FkJaJGjCXS xpw8i7wfYvbLBhnqeLr3GTAmMBaCO/0i+RXYXcnIZv6K7wgl5k1o6dVhdBZ8yFypIqZK+I 1OuJfj70hqN1Dw2ip5wCDQxYfnP51qEb+bo8kHVHmfWcByEua72u/PjmHf6/41orQC9Xb5 EwuRsT4a3wKKkYgk/YzxPGOee72cu1nJycnAu5fmTGudBFoBYD26HVk/e+/h+TD6lS4V+3 RC/m9d27sNMjJ0L4Fq0FdvQEvS8JpSvb3cL8KlRWK0EsP3QDQqj39/Z1oK1ezA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhvQ6b5RzRXQ; Fri, 4 Oct 2024 08:45:22 +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 4948jMnu020771; Fri, 4 Oct 2024 08:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948jMOs020768; Fri, 4 Oct 2024 08:45:22 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:45:22 GMT Message-Id: <202410040845.4948jMOs020768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 6bffebee7e57 - stable/13 - bitset: Fix __BIT_FFS_AT()'s herald comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6bffebee7e576553006b108ed7e8518164101502 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6bffebee7e576553006b108ed7e8518164101502 commit 6bffebee7e576553006b108ed7e8518164101502 Author: Olivier Certner AuthorDate: 2024-06-03 19:22:12 +0000 Commit: Olivier Certner CommitDate: 2024-10-04 08:44:18 +0000 bitset: Fix __BIT_FFS_AT()'s herald comment The manual page is correct though. No functional change. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 3 days Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation (cherry picked from commit f3ab0d86e8070c73bf2e2852341f8e5c709f5682) Approved by: emaste (mentor) --- sys/sys/bitset.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 5ff2bb76a4ab..2e15df7de4dd 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -220,8 +220,9 @@ } while (0) /* - * Note that `start` and the returned value from __BIT_FFS_AT are - * 1-based bit indices. + * 'start' and 'end' are 0-based bit (runtime) indices. Note that, as for ffs(), + * the returned index is 1-based, 0 being reserved to indicate that no bits are + * set. */ #define __BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ From nobody Fri Oct 4 08:45:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhvS1nG8z5Y99r; Fri, 04 Oct 2024 08:45: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 4XKhvS0NvRz47x2; Fri, 4 Oct 2024 08:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E1ALgzKNY7s2L56Oi2hPBWrnVq+6sCiBtrp70TN+yI=; b=v91TiALjq1hFG1GypHCcMfpHed69sfBQyZjQA1lxn5ew92iBbfeYCFVgOyLOTPRgeOYKPO /GaiZo/J+wXN6W6w8qJwejn7BwofCRtDgPpCEI6u1jW77KsydtJk7L05W7V+vGP7amQTSg 08OPfLmeHmJuUzMBvYhuEuqxmiSlsTBA/CYnqhssK7h6eu3BNsBTb+BG4sypVdg2QtxGw4 McsmaA2Be4z8labq+blecnXx5SSuuISdh1rswYSd4QcXeruy8VK4JxtGCo0cjb3oiDnY9H jRPjebv/zQAWq3Ti/1X9QddkJ8vJX1aOe3r5QOrk03pYPPuzggh+1p/onCbUgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E1ALgzKNY7s2L56Oi2hPBWrnVq+6sCiBtrp70TN+yI=; b=JETNy1U6Ust0W/ESWxmazt9F6PXN306sQUz4VcMsXJbgCR9ORJouBY8sk8qstPowEt8r21 Kys0cygSzSw1wR28pbpJu4nnzkhrl7GTQR5NYjyQ8TTEahRJYVTBK00cFLiz2W/dOkV+CE PCnfJKcg2WSMCvkglA+9gMR+CxqVI19O0d6Atz5ivK9qLpoliAHGRNNvlKmLou6VHs60Ta uyartbrW4Z8q2lvQccE7KdamCyvmlK/s4G9ilng1VLUPbSm1pF7X2UOUszL06YM1Ais/FU ds40qV37lkiMkkmMxpKXQ5xMf9L3r0+ZrYfPhWMvynyGj+kivBscd1s7PvOTaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728031524; a=rsa-sha256; cv=none; b=UCng5JZQ4pQKgbObUmXMtXtkznmPpm8FYSQ9SbdP3MRCzNjjmt8cHVgdvHjbwIz/VUFT+A 0ZG+c9eyR2/y0yJlL2N6MsCb0H4K8Y/T7W7dqZxycFDYmSxQqe0ygh7se592Qo1PKg0wRB GJlt3l7HOmDi4IwLe2TLWcDKsmS+0dPNYavFYr7MmGPn8VCfbtAstH+Yx4GRha/VwYEjj+ 5G21cn8zGzo33sths1IUAhgIshlIbtRvZhGCt46K10AXRaHnALYJ2/nRUpsbU34nbofGsD T+ENxUBgTgzbrrsPTvVbE+DapsazTunP9sgUjCBQ9VoT6GUpWlVNj57JnOH8Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhvS001YzRXR; Fri, 4 Oct 2024 08:45: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 4948jNWZ020819; Fri, 4 Oct 2024 08:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948jNYm020816; Fri, 4 Oct 2024 08:45:23 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:45:23 GMT Message-Id: <202410040845.4948jNYm020816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: c6ec13c12901 - stable/13 - bitset: __BIT_FFS_AT(): Fix herald comment, take 2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6ec13c12901ca3eab0f610742df7b0292e9b830 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c6ec13c12901ca3eab0f610742df7b0292e9b830 commit c6ec13c12901ca3eab0f610742df7b0292e9b830 Author: Olivier Certner AuthorDate: 2024-09-03 10:08:49 +0000 Commit: Olivier Certner CommitDate: 2024-10-04 08:44:23 +0000 bitset: __BIT_FFS_AT(): Fix herald comment, take 2 Remove the reference to the nonexistent 'end' parameter. While here, rephrase a bit. I did the initial comment fix (commit "bitset: Fix __BIT_FFS_AT()'s herald comment", f3ab0d86e8070c73) as part of an experiment introducing macros to operate on ranges of bits in a bitset and subject to a predicate (a generalization of some code used in some pending modifications of the ULE scheduler), which was finally ditched as being too verbose and impractical to use. I however then forgot to remove the reference to 'end'. No functional change. Noted by: emaste Approved by: emaste (mentor) MFC after: 3 days MFC with: f3ab0d86e807 Sponsored by: The FreeBSD Foundation (cherry picked from commit ad4cf76ec4d4524381350e77b02b9abe24eb4b02) Approved by: emaste (mentor) --- sys/sys/bitset.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 2e15df7de4dd..16bccbdcaf0b 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -220,9 +220,8 @@ } while (0) /* - * 'start' and 'end' are 0-based bit (runtime) indices. Note that, as for ffs(), - * the returned index is 1-based, 0 being reserved to indicate that no bits are - * set. + * 'start' is a 0-based bit index. By contrast, and as for ffs(), the returned + * index is 1-based, 0 being reserved to indicate that no bits are set. */ #define __BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ From nobody Fri Oct 4 08:45:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhvr0Z2mz5Y8rQ; Fri, 04 Oct 2024 08:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKhvq75Psz48sL; Fri, 4 Oct 2024 08:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tezcUkJWP4FUphq58FqMaNOI5U4dCp3nrP0jAmiOad0=; b=oAkKigUxeFIN2gDn+WpZ6Tg+4qXUK8Vp0Es79f8fIMj09t5lqHh5wGI8NhXqec1jb0jE7c ltWQUFKXP6UAMDf7he2NSAvCxRBlIWtAYuYlDUKwYbLlMfJlsLqgfPwDjlGutyQzvEVjgf NFohRW79ex+G2AuHZ/mc5Nd/cdu8N1kBp0CNj9W3ilkK4r2i0ZKFF7xD9SEuvOS+H+gGm6 IW6jp2tsdZ11Src9MS1KL5wlyyJ1wKLZVzcAQ0C5uwCqWHrP+GDU9cuHTkwmT4ig2LPTuw hgVdTGDNev8PLeVgy8FgPbkrgsE/ArdwWVsuPvxaC639zSY9yXPGtcFxlwZ0Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tezcUkJWP4FUphq58FqMaNOI5U4dCp3nrP0jAmiOad0=; b=OCAbFZaHLvbxOvDk8I6lVk5Gq7VEQ4Vtlp6bFYsylFNRv6SlpfkaTLi8HcuVrJTsxTSbHd 3+w+0wdIJQT69TSs143J0ZrTEnMmdTItv+3j8EC1iNa8vBOSCs9UEyMwGAG8XL4Z0KlEGg rIUEYYPAkicFYUeth2uozNEVzAkmN9Zlk11rdyHVHvgwLI/y/3V/d/lCOfMXgzimMB3Ov4 n1Hmg+PhKPLD1hGSXi/itWbu0BwkxBThr2cVfnhFcsW1efvctbkKBJsax2fAES1jBeKtSr lZGo7OfTRVuHju2Tp+x2NEZ9A683BpWgu1KoFgNRHpGtZZ3ogOMWMuSRF3KwpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728031544; a=rsa-sha256; cv=none; b=SxqM4jvJ0pPCpp8RPMyUCzIVPSLpWUziznYJiLA4V31r0UypU273Sl479tXgevId9Ii6gm u8lf8xjLIVr3JhgKtcVt4OghnWtUVzv55dDZezNcpmemjB/8E5zXH3BdWUUiIko/jV8TKS 0yOvSLPQfR5SSFVugHAUlxZEnuMG97MMtd+6uFIPj88+dd4yjAdgG9V4MONRW2RDdufvJz BF/HLnFDTDKCCQK/tIYbMoJC3LPsWTYsIi91obHX4u6BbJFFmB123YZrxmQKLi7D9No510 olHcSvUhPPG51e13cJDjFjRRHlI14qkPYqJJyTwqOm0YGZNZZobBBTRxnj76Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhvq6hRxzRqB; Fri, 4 Oct 2024 08:45: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 4948jhbn020997; Fri, 4 Oct 2024 08:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948jhhw020994; Fri, 4 Oct 2024 08:45:43 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:45:43 GMT Message-Id: <202410040845.4948jhhw020994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: e6dc191e43ac - stable/14 - bitset: Fix __BIT_FFS_AT()'s herald comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6dc191e43ac25492890a1227983de5e2d811db8 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e6dc191e43ac25492890a1227983de5e2d811db8 commit e6dc191e43ac25492890a1227983de5e2d811db8 Author: Olivier Certner AuthorDate: 2024-06-03 19:22:12 +0000 Commit: Olivier Certner CommitDate: 2024-10-04 08:42:41 +0000 bitset: Fix __BIT_FFS_AT()'s herald comment The manual page is correct though. No functional change. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 3 days Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation (cherry picked from commit f3ab0d86e8070c73bf2e2852341f8e5c709f5682) Approved by: emaste (mentor) --- sys/sys/bitset.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 4afac9b172e8..2b26e8bcdbf9 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -232,8 +232,9 @@ } while (0) /* - * Note that `start` and the returned value from __BIT_FFS_AT are - * 1-based bit indices. + * 'start' and 'end' are 0-based bit (runtime) indices. Note that, as for ffs(), + * the returned index is 1-based, 0 being reserved to indicate that no bits are + * set. */ #define __BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ From nobody Fri Oct 4 08:45:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKhvs2D9Pz5Y9B2; Fri, 04 Oct 2024 08:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKhvs119Sz48Yd; Fri, 4 Oct 2024 08:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RBkk5q61hn7qE3aT5YtL6o0hYLw71Tg4JvS+pHbN9yg=; b=jUpR0qq8yrHVGR0rDe9S7mdOkmjNez+2kOcljGsAg2N8AxuuGhYOAbbFQQOBDjswcSXg/I IT+7ukBirf6uXT3Paqc9OBn71OxJU1lF94rBMbzPKRYU3fOJy72HNvMMM6bRBL1IQ1i0Tn QMwpd++nkozfX6OgzTzcL1UCaOrSNZAZSOSyglkrjwPAUh2OQ7rdM+xUm2SyqzMSTl2iru N/gCZANK8wP+k/DH+JH4P0uV9tPnF+pNxSzcVO/PozwoMjfTL9YyRTzsIzmataG7yNbK0h V09GJ7ny3L/Z2c6dfeILVpXQpjdz7asG8iE7bUA0rsBM/KwIpDvLS8wva+W4ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728031545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RBkk5q61hn7qE3aT5YtL6o0hYLw71Tg4JvS+pHbN9yg=; b=Ci/irX9XKeQSaNQuQVCc7pyd5Vl83i1eU2lsUL+sc2DaB/9zbGYq4U82rRBHXIv+58TCMt JmGNhuI3WLIicCdkEfbicSGu1tltz4zzoLmzKwUmhkI7BL5X2NNAum72hSjLP6/IAInlU3 58BKXoT6MIVc3TiFJ+IJEwX+EG29xlNatADv6vNCQXV14wX+/dYlZA/F/TC3gcHTPSct8k zKgWCEReiwq4rL8u/NlJD9tV/1gQe+6XYzMwtUu0ADoEWT34UR0EkSp38y5XXQuTWhXoib ayQLrPheGlcpANklRkT3Q55hfyxpP6xEmP30a7Cv6r1BdNndN3ezT13L7krsRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728031545; a=rsa-sha256; cv=none; b=cPa1yGCH5l6mqmMWucOAFyMHlRMlL90dih+1w2iXaSUEH/QIspgeKwz8ibvN4DogR5KVqU oi/2i4RJRV5Qe29/erOs3/rvQTGCO0eR2X6BPMSTJeKKRflGp7Ii4r7m9BJ9ECkM0X400g za0g1wVTrhFK9TT8s2SRYyyG8JERHw8fgcGRVD+jsetUpij9PBKVLRzuVixJfdJohexuR2 R9TYXdu7zuAHoY7DHmIqLGlu7czrDZ6HmEFN4hBzgMlsXuoTVCW6pI4fMUvsSJsRrqtkVn Ebx8ZuCRkxrCvtc6NfXtBXqEbyL45n+wDcKSbLHPhD0ePfG7k6xmgU1d+mJI4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKhvs0HYxzSDb; Fri, 4 Oct 2024 08:45:45 +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 4948jiuq021045; Fri, 4 Oct 2024 08:45:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4948jiNo021042; Fri, 4 Oct 2024 08:45:44 GMT (envelope-from git) Date: Fri, 4 Oct 2024 08:45:44 GMT Message-Id: <202410040845.4948jiNo021042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: a257beee44ab - stable/14 - bitset: __BIT_FFS_AT(): Fix herald comment, take 2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a257beee44abaffac0cc087d8492499740359922 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a257beee44abaffac0cc087d8492499740359922 commit a257beee44abaffac0cc087d8492499740359922 Author: Olivier Certner AuthorDate: 2024-09-03 10:08:49 +0000 Commit: Olivier Certner CommitDate: 2024-10-04 08:42:46 +0000 bitset: __BIT_FFS_AT(): Fix herald comment, take 2 Remove the reference to the nonexistent 'end' parameter. While here, rephrase a bit. I did the initial comment fix (commit "bitset: Fix __BIT_FFS_AT()'s herald comment", f3ab0d86e8070c73) as part of an experiment introducing macros to operate on ranges of bits in a bitset and subject to a predicate (a generalization of some code used in some pending modifications of the ULE scheduler), which was finally ditched as being too verbose and impractical to use. I however then forgot to remove the reference to 'end'. No functional change. Noted by: emaste Approved by: emaste (mentor) MFC after: 3 days MFC with: f3ab0d86e807 Sponsored by: The FreeBSD Foundation (cherry picked from commit ad4cf76ec4d4524381350e77b02b9abe24eb4b02) Approved by: emaste (mentor) --- sys/sys/bitset.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h index 2b26e8bcdbf9..d7e0b4cd7e41 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -232,9 +232,8 @@ } while (0) /* - * 'start' and 'end' are 0-based bit (runtime) indices. Note that, as for ffs(), - * the returned index is 1-based, 0 being reserved to indicate that no bits are - * set. + * 'start' is a 0-based bit index. By contrast, and as for ffs(), the returned + * index is 1-based, 0 being reserved to indicate that no bits are set. */ #define __BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ From nobody Fri Oct 4 15:56:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTQ31rxz5Xxj7; Fri, 04 Oct 2024 15:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKtTQ2Dlzz4148; Fri, 4 Oct 2024 15:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6GUpWaf0d680nwdLEus8cgjge/JDuQksPyuu2GMJK0c=; b=eq+AKqKKKrhjU/XQEuukL6oDpgGAe6ipQxDwR+3KFZw0W5brN8QkZOZJ3iJyasjuEz2oA6 xDj6xvKWZiTjMz0f2Vs1MJ+X5FCP6KLxjxwHY4Hhiy4u4G+0EvN5/K0b+UtG1GkfcAlLhT B6jalVn0GNcd/ab9chh7hoIc2JLS/+TUk1Lcu8dkylzzH1MQNHEIGbFL2zooQr8LVtp37p gOrZVvjcHnPof4fmmBryycb41khrs8K5fB1gfZKTdJDnkYrZXZA4xmnUJthNtf4NrZAtde pO+OwyxR9I7PKqz8BIsi3UxfnbLZYt/HAli75K4Ur3hrXwxkjlP86s0OPFWTKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6GUpWaf0d680nwdLEus8cgjge/JDuQksPyuu2GMJK0c=; b=Z+JaZrLQYYn8j8Zn5FKgE3PnAqYBrIndfyl/ki/sMo/jCc6dzMhNCxSDlvuSwEzOvycNOm d9PcF0HtFAF/nQKJs6K5FTOyX1nXFtG3Kr7C2BHRg58rLZDGgGKxgkTbU4YsgNipE5dbEU ww96s9gUT7duF/Isa1Css+Duxv88gmVRXNER7f/hEoaLmAqXSt9WYPZiLrujJ4UO5gE8mR cRTu6Ku9QeOSRxO09/gfJXJW6e+JnKEZ/3eZeoSayyEgKvQl93+OHCUykUu2gSiv5nV8CH rBZV7DX27eohygXL52/Oyxbxb/HApR4MqSEa6uvOF88ofjfM9m34lCCEJSDeUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057418; a=rsa-sha256; cv=none; b=kVQhUShbmmBGcnqN4pMn6JG7Sdyfnhf0eZRUxQFKLvjlRWGTK0Uy1mgsSQdrknN+8+0Z3B mvwi53GppZd2GBWvh780tGMU/Sh0n/nIMaq1/epUfe36e7pqZ3BDBs/+IQQKdai6wCH9pV RFERhEiQUT9qBzGMNxmYGekm2ZlXikafNlpdgBsJCdxtZVaNigBh5uOCFJeHwtU+XRVgW/ jFEB/UBcH9DdYmiQYP4lHxTa0LYAvivIsSL0bItPNqCSzoadcO9JOdMLhrGDZU5fonBeD6 PAO+u3jb72gOOJ8OuY17Lb3J+wkprEowPgB3Jgf0+biI7lCe/pzxHeXCTzQs7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTQ1l2mzhCT; Fri, 4 Oct 2024 15:56:58 +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 494FuwoQ048224; Fri, 4 Oct 2024 15:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fuw46048221; Fri, 4 Oct 2024 15:56:58 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:56:58 GMT Message-Id: <202410041556.494Fuw46048221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 92af7c97e197 - stable/14 - agp.4: Add a deprecation notice to the man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 92af7c97e197bb47be85030102f1a0ffbf3eb608 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=92af7c97e197bb47be85030102f1a0ffbf3eb608 commit 92af7c97e197bb47be85030102f1a0ffbf3eb608 Author: Mark Johnston AuthorDate: 2024-09-19 10:06:49 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 agp.4: Add a deprecation notice to the man page The driver is giant-locked and thus already prints a deprecation warning when attaching. The device file interface was broken in 14.0 and 14.1, see commit 12500c14281d, but it took a very long time for anyone to notice, and in that case it was only because of some code which probes all device files. Relnotes: yes Reviewed by: imp, jhb, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46542 (cherry picked from commit 0abe2d3903cc4569705d491f8ac6d2edea01c26f) --- share/man/man4/agp.4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/man/man4/agp.4 b/share/man/man4/agp.4 index de19349caa08..2aeb01850085 100644 --- a/share/man/man4/agp.4 +++ b/share/man/man4/agp.4 @@ -30,6 +30,11 @@ .Nd "generic interface to the Accelerated Graphics Port (AGP)" .Sh SYNOPSIS .Cd "device agp" +.Sh DEPRECATION NOTICE +The +.Nm +driver is slated to be removed in +.Fx 15.0 . .Sh DESCRIPTION The .Nm From nobody Fri Oct 4 15:56:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTR3ccyz5Xy2p; Fri, 04 Oct 2024 15:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKtTR2nzMz40qQ; Fri, 4 Oct 2024 15:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qF901b3462kKdYStOAqfzovyg7ISG6ktbFXM9UhEhnI=; b=h3hGFJmFg4JQ9v20+tdzrbgncKtOmJCjhfw2m5hh22iSefuazEJm9ru2CPo8EW1x1lFlf+ 4913AGv65YI43vLo6hz2vnuigFitO0JbS9m7M8fSg12g5reQbe5I0GAnHNVYUqmf6JjGa7 nQBgZcqx9WpcrIKOEqXMZqogXb0MnwAxzzRBNYKTa6EmtJVVGJMWKqRpnXiC7XhA35RocP B4VoboRP4aHrZIPq1RJC/Nm62hlBsXzowQB8rPXQ8uIvIWAsSreF0+O5WeSpcmjAlQqoF+ I3EsqOeTP05anE7qsY9mcAkBM6QpbMlOT0M8IZbFRcfQInA2/YUivo2k0sqO+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qF901b3462kKdYStOAqfzovyg7ISG6ktbFXM9UhEhnI=; b=YdohVXGrxCyDmH+ry4zt36LZ6EtLGHTXYoPm/uHgzWc+uRzhOUALisEFIdt0UWxJjp9I8W KpU+FflhMfQK3G83SarrDe+T5iV63i+DPXJfDPAUJ7EOYnUbLxVCqWz7YkOpsSm8DGsb4f UkFvqfJjLSwMnWILV86GL3JxhOSA7yv8cy/RG8norLgjul7ZWhrGFDECREQIugY6/YB+2F ZnLoGLqksWdBrTbyP0vcLUQJIi/OHB4U122PKbMvwoh8O/SzeugmkSrBkgiV3pi9vP3zRT f2DEkPsnAsL9g7irTuxg8UtsKWcMsxLbNX+jjtm84sx/86Enn6WAnEWNsQ8Qrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057419; a=rsa-sha256; cv=none; b=Ic7/Pv7CP/Hl6VfUU6La3n6J2dpdIZOsYqW9efjwJxXWfmuX4moymQ0tCOi3YCPr7fbbgs 0uottFKtIN1oQFLaLyrVBC0Y9f2N1izFAKCXXIMxc54onI0OShvlF4ND20z6KNWKvMzl0o u0Fpui3D8Y7zXgJVKObxrCuf3hUSKiOm/8ibVjOo9OzTG430FxCv3CkBTQNq5zEcNGPsFt AZWX725ymI//wm6dhdkWwn5WECcmYQBwzl+dBA34MJnZ+WNrWnQ7jhHoAVxaoP1abfQ6KH 5jMZxWooHmE1OM5HgZWQ6bhnl5J39yQLEGpk95y73km3ATtCcOyfUZIrJxcR7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTR2N3mzhFx; Fri, 4 Oct 2024 15:56:59 +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 494FuxNR048279; Fri, 4 Oct 2024 15:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494FuxO7048276; Fri, 4 Oct 2024 15:56:59 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:56:59 GMT Message-Id: <202410041556.494FuxO7048276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 893caa2ab166 - stable/14 - netmap: Make the memory ops function pointer table const List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 893caa2ab166b8d6428483172bcd61156407652f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=893caa2ab166b8d6428483172bcd61156407652f commit 893caa2ab166b8d6428483172bcd61156407652f Author: Mark Johnston AuthorDate: 2024-09-19 09:56:30 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 netmap: Make the memory ops function pointer table const No functional change intended. Reviewed by: vmaffione MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46664 (cherry picked from commit 1ae4951ba7bb203d9a29892792960f0869759d35) --- sys/dev/netmap/netmap_mem2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 23954b377f9b..1ba966e7666a 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -179,7 +179,7 @@ struct netmap_mem_d { /* list of all existing allocators, sorted by nm_id */ struct netmap_mem_d *prev, *next; - struct netmap_mem_ops *ops; + const struct netmap_mem_ops *ops; struct netmap_obj_params params[NETMAP_POOLS_NR]; @@ -533,7 +533,7 @@ static struct netmap_obj_params netmap_min_priv_params[NETMAP_POOLS_NR] = { * running in netmap mode. * Virtual (VALE) ports will have each its own allocator. */ -extern struct netmap_mem_ops netmap_mem_global_ops; /* forward */ +extern const struct netmap_mem_ops netmap_mem_global_ops; /* forward */ struct netmap_mem_d nm_mem = { /* Our memory allocator. */ .pools = { [NETMAP_IF_POOL] = { @@ -1670,7 +1670,7 @@ error: */ static void * _netmap_mem_private_new(size_t size, struct netmap_obj_params *p, int grp_id, - struct netmap_mem_ops *ops, uint64_t memtotal, int *perr) + const struct netmap_mem_ops *ops, uint64_t memtotal, int *perr) { struct netmap_mem_d *d = NULL; int i, err = 0; @@ -2177,7 +2177,7 @@ netmap_mem2_deref(struct netmap_mem_d *nmd, struct netmap_adapter *na) } -struct netmap_mem_ops netmap_mem_global_ops = { +const struct netmap_mem_ops netmap_mem_global_ops = { .nmd_get_lut = netmap_mem2_get_lut, .nmd_get_info = netmap_mem2_get_info, .nmd_ofstophys = netmap_mem2_ofstophys, From nobody Fri Oct 4 15:57:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTS6L1yz5XxWp; Fri, 04 Oct 2024 15:57: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 4XKtTS48BBz4173; Fri, 4 Oct 2024 15:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1KPO9t6YTq8L/oONu9jN4u27Z1AsLhTf7TS55K0T0l8=; b=qF4yonHd4wvCVttxzIzifijQjjESyeTmoCZw8v/lZburIfZw176toXNi0x/yhsRVTOkTYQ s/pd4RbeADH4/eUvHAvsv2ZYUArLPsmpVT15GjY0rorXfjF9NQiJYIG/zTY0hUiViKNp3Y BkqZiib8bDsgsHpc48KUIdVeqIP6lzyz2ocaefPjEfMBgyTGqb/zvCRHwet5m4+O+zShro uWjpRDcogVt1cS9iDcEqek/bYNjwIiCaGMRyfewbKsRnyHEnziGXXojjwGHrlKKBhVoJKa kx3N+CZCaFGbX+8wvq0loEuHoqoJZ1N03wZHSp2kVPukGTO5nt3+9L9F0Tna9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1KPO9t6YTq8L/oONu9jN4u27Z1AsLhTf7TS55K0T0l8=; b=X6Mf1yWKx9Y2sJa0UhaFi12dYVPeh0nSb22He79Mzv31g6xjrwwMY8Iztf2IwO5joUV7YE OdvMbbmYLUK8CmeubKEq/Zqtw4oIPurJT6qk8TSzQT+/kbvXAj0Zpdch7+FgTSMIBlMFfn SPj5QmZJjU4KzSJEcGP4Q4bcln3CCyBU0yJjv5Cn9Uk5tO3OY9rI4XePjCpzU0D1gvsoi5 5yAr89dAoRv0xIMCVJ14afoFNBb1p+tzzHxRtvBrMe6/A/h5hwtLEkhmAsyTg+OF1syxxg C1G7VbWYHHqGPnTJxtzVRLzcbAHqGLr4fm2TdyA3dmJgh5xDPIf0JaOH9ySUJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057420; a=rsa-sha256; cv=none; b=DAd2euNaJkItU6qleCGLWxil4ymKXq3kBN3M8tUagFEowsXKa1kTuNLOW4xtP61zYxtL1i RAfF70rVr19JhKvZ++3kCltq3vpGhUUOekaNZaDf1zcaxH9klaF8V//9P0Lax6atWqxEDz ILXZO0J2yU2RymRRw1NZGRlANO/Yv8YxlwtjtENKkzc+TfVY/sxL5XBgF6l0FxYmxToIS3 vRKPWQ26xSvuqeEocUzbkiq1XpRW6l11ETymRLZvRJnYsJLKNUVF4pWGnjY5Jbxf56k5fs Vlv47i3J5Cgxe59r9lMWH69QRzBj4jDs0ieDJDHJtODN9Vhz6eLc2cnrZG97Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTS3kp0zhFy; Fri, 4 Oct 2024 15:57: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 494Fv0GA048333; Fri, 4 Oct 2024 15:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fv0Wj048330; Fri, 4 Oct 2024 15:57:00 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:57:00 GMT Message-Id: <202410041557.494Fv0Wj048330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7ebda9886eda - stable/14 - iflib: Use if_alloc_dev() to allocate the ifnet List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ebda9886eda8956df5a24423396a52ffce5e4e6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7ebda9886eda8956df5a24423396a52ffce5e4e6 commit 7ebda9886eda8956df5a24423396a52ffce5e4e6 Author: Mark Johnston AuthorDate: 2024-09-19 09:21:05 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 iflib: Use if_alloc_dev() to allocate the ifnet This ensures that the ifnet's NUMA affinity is accurate. Reviewed by: kbowling MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46667 (cherry picked from commit 767723ddebe9c76a2d4a45a50d9b0efc9f2f91d7) --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index fa6227f3f80a..a2e2c3efa1ad 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -5750,7 +5750,7 @@ iflib_register(if_ctx_t ctx) CTX_LOCK_INIT(ctx); STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev)); - ifp = ctx->ifc_ifp = if_alloc(IFT_ETHER); + ifp = ctx->ifc_ifp = if_alloc_dev(IFT_ETHER, dev); /* * Initialize our context's device specific methods From nobody Fri Oct 4 15:57:02 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTV73knz5XxWr; Fri, 04 Oct 2024 15:57: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 4XKtTV5nV4z40tj; Fri, 4 Oct 2024 15:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PcVQFr8NBuu2BT3zk0LMukNNl/MOHP0H4iDrl+9/FdM=; b=QAXnsIgM0GoB10+Np170V2jT37l8KbhgweHOXuhIZvQBnliHd3w32EkX1WV2EmPDUYJS4t gmsZCOfxLnLgOYel/TWEyBOcfdoAYJ5HHUwAz/naH+KG5o9Xnc9jJlZa4TKlCVgUuBcisd 68qJ8ggAshtcm1dDBamDn9qlnb2xb6bGslgOcJ3k9Lw0BfjiydKYyICrdwBVuSzpwLpG3X 57zx2BbNiPwiLrdqwUvy+3WHW45t35c08W2rsQieYSfJwIN5aTGWpJx1o9GxjpZGyqHEa8 vVAITVo2nORshviXYRBUFozi9VoZ+QVvpYBuAmEgARLp6q3FtC2b1nTdxpA78A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PcVQFr8NBuu2BT3zk0LMukNNl/MOHP0H4iDrl+9/FdM=; b=bXo2A2rw7A2Mv6AxJQASO2hREdvCY+ummylTFIt/NTYMSxWWKEslnG6hFgTb22MGgHYtR1 oqkpFPwqAXEynqdAIn4/BULKzh7/xTSS/qr3OqQVBWRm2qLoHuBzcgiLV6KK5CMD5VjNFN qjeyVPj3oGKlhBFEQp2IXaxlQLyNr/KFOO2z9ZjcugxCssBkn2msdSQNOndcWIfozL1gUQ FZ/pm0NvHq4TUzlDHtqJzfd7LImiXXKMmAnf4vibbnFqlduE+Th/+HYWCNyuHerR3+oTps g5acTLJj/2x1G5JdsARQKNPq5VgrFwFqj3wthKlLmm10cHXciSO7CLTxZPr04g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057422; a=rsa-sha256; cv=none; b=d7IcwvfntWDF+ohNdjnGchAmNhCZIM9FEaeP8bhUw7TvPX9KRiqZ4RRetinkrfxY8NAlni xbkU0VbeDCkhPt3tVtf5MYDjSlM103OIoiGM2zbBonPoBUfDc/0l0ryWF77sVYathBStQ5 M7COqGeBNJ+QsK0iPfxOolUgmNZLMwQQHq7NlGXIbwoLRlGVih2Wunj39lvqASwg/TrInq TSASfkpmgeQMQakbzjNMdcyAqEwsj6N+SOgPB6DXBo+fbDT2jRMnYqTuK5+cpQs+f0tdIN S7W55eHnXNGNBWGnbZgrNPrBV53QhQarO2pYRmoJWqrZuArYV8Pu9WEqeI/trw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTV5MlQzhCV; Fri, 4 Oct 2024 15:57: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 494Fv2OP048424; Fri, 4 Oct 2024 15:57:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fv2mT048421; Fri, 4 Oct 2024 15:57:02 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:57:02 GMT Message-Id: <202410041557.494Fv2mT048421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: af2f923ed093 - stable/14 - dtrace_test: Remove the dependency on dtraceall List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af2f923ed093200529e9f68ca7436dffd7a68dd3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=af2f923ed093200529e9f68ca7436dffd7a68dd3 commit af2f923ed093200529e9f68ca7436dffd7a68dd3 Author: Mark Johnston AuthorDate: 2024-09-19 09:21:55 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 dtrace_test: Remove the dependency on dtraceall FBT refuses to create probes in modules which depend on dtrace(all), but dtrace_test is a convenient place to add functions specifically for testing dtrace. The dependency on dtraceall is not needed, so just remove it. In fact, it can be useful to test SDT probe creation by loading dtrace_test with and without dtraceall loaded. Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46673 (cherry picked from commit 5bd7b976c1214cd6357b74f491753a331f9b7c99) --- sys/cddl/dev/dtrace/dtrace_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/cddl/dev/dtrace/dtrace_test.c b/sys/cddl/dev/dtrace/dtrace_test.c index 2a599b1f0ce5..6c4fcc8d4080 100644 --- a/sys/cddl/dev/dtrace/dtrace_test.c +++ b/sys/cddl/dev/dtrace/dtrace_test.c @@ -106,4 +106,3 @@ dtrace_test_modevent(module_t mod, int type, void *data) DEV_MODULE(dtrace_test, dtrace_test_modevent, NULL); MODULE_VERSION(dtrace_test, 1); -MODULE_DEPEND(dtrace_test, dtraceall, 1, 1, 1); From nobody Fri Oct 4 15:57:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTV0QFGz5Xxfh; Fri, 04 Oct 2024 15:57: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 4XKtTT507sz40qy; Fri, 4 Oct 2024 15:57:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cc0rKOhcxbWP70VPZ2vXADyFeEIwXZbXDFd/GJdNYKc=; b=u34Yd0J+82gvkBwPpFjhly390mf8piaWFOufTLjtjid+K05owyWbzoepB6SydA8ySGKoEW CjJohrSeRPSfpvZEjWzuXWP3mgXxF/BcLrDKbqawaK56U5mO/Ler6Lj0cJCBrQm9e65wqo t0jv4jye0lplvF4NiWLB7BVrgFQE3QHTDJeTF1ykb3E+817H1lhbiQsb3sJ9bHFMHkXUVs GlFDEoY9/StF9KG3r8uvij+HAN39w8f3VSnN6TPHwKr/QuywTn2NKHxscFEGAj78VlPr01 hU7ig0PTmVC9Zymbmn6eqoSRdLiPOaYTCdKqCle1c5GRC9s0HuM1yFxzT17lNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cc0rKOhcxbWP70VPZ2vXADyFeEIwXZbXDFd/GJdNYKc=; b=Nop5Bx6Ak3l74HdaKS222W+rOeJcGEtkFJ8VY8phaQmhz1Fh/iudg98xk0wxeRy5IEK8ub bE9yvFEkHvhDkh+ij/55dZXDILmi5izmN7XT7CPGtr4U0/uNyhIaQA7DOcwINAOVCvicXy EBJCpx2nfpqp7OZilGgoLDYEHIqzqLYxSnNxfvARnX14v6aEIPxLJWhGbMzz+NoTZKH8lL bg20H4u0P1UhfkTb7zMS8kib8osQbknpZfEwaGZ9QmOycCYmieyNgeJ4m+pBdRTaPqXwyR KJDJ5+xaFQqUnng+LYWbQu1zZi5++2UDMUYeIKn9Kr5z7KZTpgwGf6X/+GRBCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057421; a=rsa-sha256; cv=none; b=eixVfMDODBPhajlsB8CEcImX/ScEWZ69Kf18efXkHKlGQhSkfUo29DoR37eygtVsS2T3Go PG0ehuD215x1LU/boCnErQgh0R8bMaTlv0E19lpH/PpuFaxqbLC2VpHdibWoFwmF79sNf5 J3NRyddjL5EcwlCxnX0QYOy28SPXxbGnQcHTso+qfF8agaE7Wzu2PJDTfPdp1cGA4VhacR FRs5B2fO9+l0kqm3pikqRcPP+8gDHvFk9ukhPElv88k+aRYCJzaDPyQOBffyQUyIljzIWj 2egIkOsCwQUsQuBi+yniGsO3hUjw3/4s2JrNplRUtf8MvWibdkWZxrmoHAf8dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTT4KBJzhG0; Fri, 4 Oct 2024 15:57: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 494Fv1Qk048375; Fri, 4 Oct 2024 15:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fv10p048372; Fri, 4 Oct 2024 15:57:01 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:57:01 GMT Message-Id: <202410041557.494Fv10p048372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8b1d908cdeb7 - stable/14 - dtrace/amd64: Fix probe argument fetching List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b1d908cdeb7fb236011ed9c42517ce0ee9c9613 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b1d908cdeb7fb236011ed9c42517ce0ee9c9613 commit 8b1d908cdeb7fb236011ed9c42517ce0ee9c9613 Author: Mark Johnston AuthorDate: 2024-09-19 09:21:38 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 dtrace/amd64: Fix probe argument fetching dtrace_getarg() previously walked the call stack looking for a frame matching the dtrace_invop_callsite symbol, in order to look for a trapframe corresponding to an invop (i.e., FBT or kinst) probe. Commit 3ba8e9dc4a0e broke this in some cases by breaking the expected alignment of the dtrace_invop_callsite symbol. Rather than groveling around the stack to find invop probe arguments, simply use the trapframe reference saved by dtrace_invop(). This is simpler and less fragile. Reported by: avg Reviewed by: avg MFC after: 2 weeks Fixes: 3ba8e9dc4a0e ("dtrace/amd64: Implement emulation of call instructions") Differential Revision: https://reviews.freebsd.org/D46672 (cherry picked from commit 9aabab09c4e163fa8187b265d6836d822516b1c9) --- sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 77 ++++++++++++++-------------------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 9db5a16190db..83d34abbd270 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -32,6 +32,8 @@ #include #include +#include + #include #include #include @@ -355,6 +357,7 @@ zero: uint64_t dtrace_getarg(int arg, int aframes) { + struct thread *td; uintptr_t val; struct amd64_frame *fp = (struct amd64_frame *)dtrace_getfp(); uintptr_t *stack; @@ -366,57 +369,39 @@ dtrace_getarg(int arg, int aframes) */ int inreg = 5; - for (i = 1; i <= aframes; i++) { - fp = fp->f_frame; - - if (roundup2(fp->f_retaddr, 16) == - (long)dtrace_invop_callsite) { - /* - * In the case of amd64, we will use the pointer to the - * regs structure that was pushed when we took the - * trap. To get this structure, we must increment - * beyond the frame structure, and then again beyond - * the calling RIP stored in dtrace_invop(). If the - * argument that we're seeking is passed on the stack, - * we'll pull the true stack pointer out of the saved - * registers and decrement our argument by the number - * of arguments passed in registers; if the argument - * we're seeking is passed in registers, we can just - * load it directly. - */ - struct trapframe *tf = (struct trapframe *)&fp[1]; - - if (arg <= inreg) { - switch (arg) { - case 0: - stack = (uintptr_t *)&tf->tf_rdi; - break; - case 1: - stack = (uintptr_t *)&tf->tf_rsi; - break; - case 2: - stack = (uintptr_t *)&tf->tf_rdx; - break; - case 3: - stack = (uintptr_t *)&tf->tf_rcx; - break; - case 4: - stack = (uintptr_t *)&tf->tf_r8; - break; - case 5: - stack = (uintptr_t *)&tf->tf_r9; - break; - } - arg = 0; - } else { - stack = (uintptr_t *)(tf->tf_rsp); - arg -= inreg; + /* + * Did we arrive here via dtrace_invop()? We can simply fetch arguments + * from the trap frame if so. + */ + td = curthread; + if (td->t_dtrace_trapframe != NULL) { + struct trapframe *tf = td->t_dtrace_trapframe; + + if (arg <= inreg) { + switch (arg) { + case 0: + return (tf->tf_rdi); + case 1: + return (tf->tf_rsi); + case 2: + return (tf->tf_rdx); + case 3: + return (tf->tf_rcx); + case 4: + return (tf->tf_r8); + case 5: + return (tf->tf_r9); } - goto load; } + arg -= inreg; + stack = (uintptr_t *)tf->tf_rsp; + goto load; } + for (i = 1; i <= aframes; i++) + fp = fp->f_frame; + /* * We know that we did not come through a trap to get into * dtrace_probe() -- the provider simply called dtrace_probe() From nobody Fri Oct 4 15:57:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTX0mh2z5Xy0b; Fri, 04 Oct 2024 15:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKtTW6rhqz417l; Fri, 4 Oct 2024 15:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqs26qWP7xFwOZL9EhJDtz0jx52BzYhKoRtImSN7H00=; b=fTkARb7LvuA3WZZSF30iERfSaD9lov2VFNbUhMo2OWTbez37WnexzxdHf9/Afx94DhNGyK Q8r+nZQKNJR/Tyacs2XiqoQ1zzLT73GmWFg+WOjinSNLuLBMtGhLOrIv4CrtYo/OS23u4O OZLhN6B/y91YblF3Twn7EheVAOXclpKbLXQPWw8BdFYkGOxLk+IBW2Ta6RoxpncbKDMieY eDMyl0CoWfdgj/t3HX0fjMi76M8dAbJMssVZh1fPtbVn3fFUXXrI8Q0tiFkRHR4UtfLfpl PaF6JIWKN6aAHThH4jvsSQOLiKL0FKR3qs27tTHobtHSfufnvmczsrmaKHSFkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqs26qWP7xFwOZL9EhJDtz0jx52BzYhKoRtImSN7H00=; b=g1T+KVKnVE9MGZcEp+3qpPHX9ANSSpf555desmWuYK06k2ravahkEVtLXBddIoARRfQsGk MEjUawq6S1C9qqdl4RnOSgxffo59HSfDw8IW2psTlPkc8/qof+vK/uNv/FnOXyJh5HYS3V KJPscx7hImO4ySqbhjH1VMU3VWHfKjd02PisyM/D3KCL3UE4ktz8TA4mAuVOSA2NxNz2Zh B6phYpKt6aKDEYhvAtysOKvNI68AgizYfigG9F+k+UrsAnJPDwmMxBv61ICp5RQ0w4jxM3 s0vgGkIrEZcfs97seAsMQ4jmdh1O02pWzIDMK8nFRp43zLSxb58EcktiLxqi2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057424; a=rsa-sha256; cv=none; b=BZqY54JWx2jbLCfmxfKBuMc2DAGnzTnXQ/bsKQ/tJIWwu0JExZYlwkyqRmZQwYNj5/Et1x RG8PIKyKVoTPJuflx28DXW3s00Nz1xGcTXKkg7gTGfFwaifuheO7S2C2hQbka278+9RDQr JRweIqg5RA/jys1jSmCYGx/emdSunZEMgjkTsLrTr3e9KVwcw3Oadm+1tKB4gvghHG/xky IaFUaGznfNixPs0dL+5xoGaYHulv1KYtLNhMu4lxLaNM/IYUVUr6V6ycQlyQCPYPkq8xLH 2lwiQ9V+5qUOF07EL8dJny9Ga0D0/fxqZcNBf/91/S83C/kuuX9rP7bxQtYaGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTW5wgjzhG1; Fri, 4 Oct 2024 15:57: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 494Fv3e2048487; Fri, 4 Oct 2024 15:57:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fv3tl048484; Fri, 4 Oct 2024 15:57:03 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:57:03 GMT Message-Id: <202410041557.494Fv3tl048484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 37a29946b91b - stable/14 - dtrace tests: Add a test case which validates FBT probe arguments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37a29946b91b1360102ff9cc33eaf352a2f17726 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=37a29946b91b1360102ff9cc33eaf352a2f17726 commit 37a29946b91b1360102ff9cc33eaf352a2f17726 Author: Mark Johnston AuthorDate: 2024-09-19 09:22:03 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 dtrace tests: Add a test case which validates FBT probe arguments Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46674 (cherry picked from commit d439598dd0d341b0c0b77151ba904e09c42f8421) --- .../test/tst/common/fbtprovider/tst.argtest.ksh | 34 ++++++++++++++++++++++ .../tst/common/fbtprovider/tst.argtest.ksh.out | 3 ++ .../dtrace/tests/common/fbtprovider/Makefile | 2 ++ sys/cddl/dev/dtrace/dtrace_test.c | 28 ++++++++++++++++-- 4 files changed, 64 insertions(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh new file mode 100644 index 000000000000..dc3641b01101 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh @@ -0,0 +1,34 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2024 Mark Johnston +# + +dtrace=$1 + +$dtrace -q -s /dev/stdin -c "sysctl debug.dtracetest.fbttest=1" <<__EOF__ +fbt:dtrace_test:fbttest:entry +{ + printf("%d %d %d %d %d %d %d %d %d %d\n", args[0], args[1], args[2], + args[3], args[4], args[5], args[6], args[7], args[8], args[9]); +} +__EOF__ diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh.out new file mode 100644 index 000000000000..301e154b3339 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/fbtprovider/tst.argtest.ksh.out @@ -0,0 +1,3 @@ +debug.dtracetest.fbttest: 0 -> 0 +1 2 3 4 5 6 7 8 9 10 + diff --git a/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile b/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile index 4aaf2013d59f..14394f9681eb 100644 --- a/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile +++ b/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile @@ -7,6 +7,8 @@ PACKAGE= tests ${PACKAGE}FILES= \ err.D_PDESC_ZERO.notreturn.d \ + tst.argtest.ksh \ + tst.argtest.ksh.out \ tst.basic.d \ tst.functionentry.d \ tst.functionreturnvalue.d \ diff --git a/sys/cddl/dev/dtrace/dtrace_test.c b/sys/cddl/dev/dtrace/dtrace_test.c index 6c4fcc8d4080..ee9c63034ed9 100644 --- a/sys/cddl/dev/dtrace/dtrace_test.c +++ b/sys/cddl/dev/dtrace/dtrace_test.c @@ -51,13 +51,27 @@ typedef struct vnode vnode_t; vnode_t dummy; vnode_t *rootvp = &dummy; +enum argtest { + ARGTEST_SDT, + ARGTEST_FBT, +}; + +extern void fbttest(int, int, int, int, int, int, int, int, int, int); + +void __noinline +fbttest(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) +{ + printf("fbttest(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", + a, b, c, d, e, f, g, h, i, j); +} + /* * Test SDT probes with more than 5 arguments. On amd64, such probes require * special handling since only the first 5 arguments will be passed to * dtrace_probe() in registers; the rest must be fetched off the stack. */ static int -dtrace_test_sdttest(SYSCTL_HANDLER_ARGS) +dtrace_test_argtest(SYSCTL_HANDLER_ARGS) { int val, error; @@ -68,7 +82,10 @@ dtrace_test_sdttest(SYSCTL_HANDLER_ARGS) else if (val == 0) return (0); - SDT_PROBE7(test, , , sdttest, 1, 2, 3, 4, 5, 6, 7); + if (arg2 == ARGTEST_SDT) + SDT_PROBE7(test, , , sdttest, 1, 2, 3, 4, 5, 6, 7); + else + fbttest(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); return (error); } @@ -78,8 +95,13 @@ static SYSCTL_NODE(_debug, OID_AUTO, dtracetest, ""); SYSCTL_PROC(_debug_dtracetest, OID_AUTO, sdttest, - CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, dtrace_test_sdttest, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, ARGTEST_SDT, + dtrace_test_argtest, "I", "Trigger the SDT test probe"); +SYSCTL_PROC(_debug_dtracetest, OID_AUTO, fbttest, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, ARGTEST_FBT, + dtrace_test_argtest, + "I", "Trigger the FBT test probe"); static int dtrace_test_modevent(module_t mod, int type, void *data) From nobody Fri Oct 4 15:57:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKtTY12Ssz5Xy5J; Fri, 04 Oct 2024 15:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKtTY0CfSz41Ch; Fri, 4 Oct 2024 15:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/aQA7JrtHdYcuCS6UnSJgFy+83Yx91+Ssb3aeH+u6fo=; b=Afjym/brtTVgJIbqZ/+xiNxvpGAlaxTn79ODRFBheNm/oWfbfFgOfP/hcwBnGxib2Licoj 4qiHAq1Zh3NrxGBDvdpWGri00tIFLi3cUhmuBoMC7gp68CeygJ90xswZW5bOPdfi6ADOQA s0AbdAsOd/qOMjGEw8ErDoJH65rw3fWEgeRlp99ONPsMsd8Ool/dKLWsa5Wz6ywLQL32Lh AWiJAvTC5drSum0jNhkOFsktB17GQGBnjbBXL+OWiSLHJ9NHNqaMXfnRM7rFHUuUC00PcT C/LMDMtK4vMxUlL+dYMagfVkTp4RCDqGP+brTQ4lRMhP58YbXRoUEagAZFID5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/aQA7JrtHdYcuCS6UnSJgFy+83Yx91+Ssb3aeH+u6fo=; b=ed0w96Slt88r8w2+esMlNG9z5mgSrqe/O6rb0LnX9b3FZfvQufy21oc1841nLooicwlKcz EXLOtlDgT25BjrUwrod67NfvfCUjKqw1/wL2ptgH+85S+50BilwhDV4n18YkSvFLUyDmKb i8KgOoL/XyPx21c4yafQXMauZAILyJwjKbhSV/2RD+FJ/j23BSwbhmUjpNQKJpL3uc0q39 hutZahnfeBr9QanqpzNEjYKkkbA9Q3X+4Q9hiCOunalvWakU5kgBrr8tCqnNHTF1odr0jg REnEyYMjfNGjVnhECz+Bz8V04YzAb5lm+xKFip+cSOKo8t1FowZnYyWgNsZGeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057425; a=rsa-sha256; cv=none; b=WK9JSJh4HXYGGC98I9rS1ToP3JqOWEv/nSrDb5RPXS9vvmIHIDQ+YSt3iwXz1n/g6BDViL JvXl30qcSriBwPb2IX3wTRiHm8moVsVKZ6r0YWuwKE3iNM5I2c/c+Y+qTlmpDgTUsxNdAg Os1mRHPS+KqyPkB1y7k/py7nSpRWPx5qdgPmpPB7hUtXdqsJAVmIVoGJDCkuY54e69GQwF uEqLKz6ZbFrGF4xJGo3jiUOg+i+PquYMAvU740i1Hsh3T5GDcZTZ3PTK2O56FyW3a86bz6 O+pYK1bbYW1uRGQRRzMil9ixZWLU4HzgINpDcGeSsunfN3L/ozBl9v4pCA5uJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKtTX6wmLzgnm; Fri, 4 Oct 2024 15:57:04 +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 494Fv4St048531; Fri, 4 Oct 2024 15:57:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494Fv4lL048528; Fri, 4 Oct 2024 15:57:04 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:57:04 GMT Message-Id: <202410041557.494Fv4lL048528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c27106d925cd - stable/14 - dtrace/amd64: Remove the dtrace_invop_callsite symbol List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c27106d925cde6384252d9cdcd4df560375a50dd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c27106d925cde6384252d9cdcd4df560375a50dd commit c27106d925cde6384252d9cdcd4df560375a50dd Author: Mark Johnston AuthorDate: 2024-09-19 09:22:13 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 dtrace/amd64: Remove the dtrace_invop_callsite symbol It is not needed after commit 7e80fd5ef397. No functional change intended. Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46675 (cherry picked from commit 06e7bc83f6a49b99f87ad1a6034e2fad54ebe7f3) --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 2 ++ sys/cddl/dev/dtrace/amd64/dtrace_asm.S | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 98ae9eba120a..263b254b9021 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2400,8 +2400,10 @@ extern int dtrace_mach_aframes(void); #if defined(__i386) || defined(__amd64) extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); +#ifdef __i386 extern void dtrace_invop_callsite(void); #endif +#endif extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); extern void dtrace_invop_remove(int (*)(uintptr_t, struct trapframe *, uintptr_t)); diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_asm.S b/sys/cddl/dev/dtrace/amd64/dtrace_asm.S index 0c8cd9a83d01..4c18fbf08220 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_asm.S +++ b/sys/cddl/dev/dtrace/amd64/dtrace_asm.S @@ -56,9 +56,6 @@ swapgs; \ 1: addq $TF_RIP,%rsp; -.globl dtrace_invop_callsite -.type dtrace_invop_callsite,@function - ENTRY(dtrace_invop_start) /* @@ -78,7 +75,6 @@ movq %rsp, %rdx call dtrace_invop -dtrace_invop_callsite: addq $16, %rsp cmpl $DTRACE_INVOP_PUSHL_EBP, %eax From nobody Sat Oct 5 07:11:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGm75MDnz5XrZ9; Sat, 05 Oct 2024 07:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGm744H8z4Mrx; Sat, 5 Oct 2024 07:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bY8BRN3zlNgtflLajxdiCklEVcO+IgcLqrV4nf3pFmM=; b=gX06AV1zASJn8ZDs+7z1929/UnjcTkDfuI0hXf/uhTJJIuJ3HHTEhFXT033Rmv/vIYLkpe vaGP1Zr9zjfgu/hgBoaHtiC5si1xKq0ijSPs7SvLiRrSclQCMzB+X84DZSV0w38o7/Ophv cA4RYzLyEYVF1kgBNVrJW/HDk/EPvdVCSthwK9RItoQBNj8KRkq19GFHJxHvYykJzEAeXY VfnMM49yqOit0nRiHcAm3cOnn1EJEEuG17GfS/re5ItfXGX7UDkExUMkP6L/N8ymD/b22M 9dyYdZBaoqNrIPr3ajG/FgTA3Xifv7YlwoDJggBwcSl4+kvfcF/W7fZmCJju0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bY8BRN3zlNgtflLajxdiCklEVcO+IgcLqrV4nf3pFmM=; b=WIGcU7d9WnB5UEcUY2DV2Q62N3YMZLk1D97mTuX/R+jeMbkGDsuLZxvSEklJOIpGeQDGqx KChl5UjMz2WTuiBFAzaBZfsdDBmmtTHbg1EfxYDEQvP4wZHyoQtN9FiAJ72wBamWMWDdu/ oMKN066BLaftSnmeeHbxfifJn2jWTe5Q2EviPjPYq/pLZAejpaLN0AjQoGzeFe7IeHR2JA HpxJP56EaBn7HZuHZb1rcBYNsNEeW1IvelxZSlph273R1uKelkU6rckW52QSuh7CcL03xA jHRvNIc+AH7+Tg3obV5VOUNCJPCx0hQVo5FHHPUIKulUfZZQjJ94iaBQj68ZJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112263; a=rsa-sha256; cv=none; b=vjyv0qjcUubP9/Qi/I0/P8cDtpmPid4tMLVIPz1oGInSAhSqI8nzM9EAMZJcHBfzHHPVHw on8k574HJKkH1Pmhke+3lmB7X/bMmxqj7A2VN4h3XFqpn+0z30FdCf612RDe097JQsaJU1 Sm8cQOXS6AhzZulCi5t1ncZ8/iwzFQorHDE8k0YyPjcIh8J0HK/ww/GiTxr5y/ZwvGOXaq 4ZodbIEL70XI4W4qBFlxmcRYFQm/78wpDbwDW20gnSTPIg//s4BZAWddMftcqjTVOmGbZ5 jk8rNXSApD0/+h8CBigOUYHlN5Rs2m0SSNilPeTvNLwayeCH5HU9M8QypSrF+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGm73gQJz18L6; Sat, 5 Oct 2024 07:11: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 4957B3aq000664; Sat, 5 Oct 2024 07:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B3pp000661; Sat, 5 Oct 2024 07:11:03 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:03 GMT Message-Id: <202410050711.4957B3pp000661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1508dce2502d - stable/14 - procfs: ensure that RLIMIT_IDENT is properly updated when a limit is added List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1508dce2502d3afd4863595c94624ff71d2883c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1508dce2502d3afd4863595c94624ff71d2883c0 commit 1508dce2502d3afd4863595c94624ff71d2883c0 Author: Konstantin Belousov AuthorDate: 2024-09-20 15:04:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:53 +0000 procfs: ensure that RLIMIT_IDENT is properly updated when a limit is added (cherry picked from commit c84d8db0ab3d02f65422e8dcdc1f911cc15a04ec) --- sys/fs/procfs/procfs_rlimit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/fs/procfs/procfs_rlimit.c b/sys/fs/procfs/procfs_rlimit.c index 3100bb0d6966..3dccf7889a0c 100644 --- a/sys/fs/procfs/procfs_rlimit.c +++ b/sys/fs/procfs/procfs_rlimit.c @@ -59,6 +59,9 @@ #include #include +_Static_assert(nitems(rlimit_ident) == RLIM_NLIMITS, + "resource.h RLIMIT_IDENT needs update"); + int procfs_doprocrlimit(PFS_FILL_ARGS) { From nobody Sat Oct 5 07:11:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGm902mGz5XrcW; Sat, 05 Oct 2024 07:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGm850VHz4Ms0; Sat, 5 Oct 2024 07:11:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ad/Owq6o7EOvm6ScNvYD3gnyYtMdZ5dYlPYhabpZDcI=; b=ddlP/EOc0W0qHPSGgjgqTmQ1/TtCyyEs5JcOuQZ0GYSWRWaubUdnl8+yuM/8dDttWaBvZy nM1NyJMtOQ5b944gerJSV9UqCPkrzDs7oSEIfy6kf0XAFgfZWaSe327svEMPAOfSTCdx4a mY4k43MYsU1a1VepwpzqXaG/5ptxFlcUd6mt31qfrrkjm1Ma8Mo93Yu+A+i5y9KOctGZTY r4M/3VJVwd6zPBszsf00DHYJr41cEzsdFD4PDK5PjGvBzqp58fmDWbSYEK+mxYD42GMFmq ht2I/jr6SO8cMVnTnorMB9tis6BASAgIQ4K2hsfbY3aduXy6wOt+n4Ba68bmsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ad/Owq6o7EOvm6ScNvYD3gnyYtMdZ5dYlPYhabpZDcI=; b=ZRMAOCJ6s8xeOHA4FAWD40vQAY5ijmx2KsoQpbysYD1ZUs5O40cXyvyEQA16l8nv2383ga PDpm/0v61H4MEWaTIWmgJcPOCCgc7lHT8SfGCgMj2JSD2lPLwg/HzmXvebbusEy8myWpBv Y/jlXsKrjMe06se+PXX3sYnwkK/pWXQny90pqvFR7jSuFsHhaOBk2uMMVJssEEvdnkFkb4 u6ezOQ7NOkJu0r50o4QVlTp3KRYO1mw013t3222LtaExUhW9ONEpd5SxoalPLCnAY1JbV3 wFYM3q+uqCOkkbW0V0UxomGoZu8y5IJgUIIIs532+OZRLHTJPb43dmG/eiYsTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112264; a=rsa-sha256; cv=none; b=WVCnFTPSxepBrLereX4w0X6FMFsImr1BiUeenHNpHmkv4lOOS2kJFl9QUPCirP69+PGYNs OjbTwGAYazr71I306cS/HOv13Opfd3tDanijUUtI8imZ2B1c1LgvddOzopwg7Bze6CgwGK DueK1Dvq1zWYwPacT9IEYGL5m/wPKTLrzYZqo8UFDpz10uD6dzjQTrnxz+1sF3MmyC7s1y gbXMCYzZh/eAmAH2GRNioeKSZKrwbAYlAnqEAEs85rhI7+wdsStpubjf1KeWn5vOTLlfFR SIluLfluPxKU9j08DeRoLASl9LDdZT/4kb2NR8K/Ot8E4I6ipWByEUQgu+wEdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGm84brZz17r7; Sat, 5 Oct 2024 07:11:04 +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 4957B4fM000697; Sat, 5 Oct 2024 07:11:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B4pX000694; Sat, 5 Oct 2024 07:11:04 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:04 GMT Message-Id: <202410050711.4957B4pX000694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 81c47bfc700d - stable/14 - amd64/mp_machdep.c: style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 81c47bfc700dbce884e015f88d629938aefb0f6b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=81c47bfc700dbce884e015f88d629938aefb0f6b commit 81c47bfc700dbce884e015f88d629938aefb0f6b Author: Konstantin Belousov AuthorDate: 2024-10-01 11:32:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:53 +0000 amd64/mp_machdep.c: style (cherry picked from commit c2fe7156e992a295756206f59c282b9e971b8c91) --- sys/amd64/amd64/mp_machdep.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 12abb8b6bf8b..00e99f9df192 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -102,16 +102,15 @@ void *bootpcpu; extern u_int mptramp_la57; extern u_int mptramp_nx; -smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown = &smp_targeted_tlb_shootdown_native; +smp_targeted_tlb_shootdown_t smp_targeted_tlb_shootdown = + &smp_targeted_tlb_shootdown_native; + /* * Local data and functions. */ static int start_ap(int apic_id, vm_paddr_t boot_address); -void -smp_targeted_tlb_shootdown_native(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, - smp_invl_cb_t curcpu_cb, enum invl_op_codes op); /* * Initialize the IPI handlers and start up the AP's. */ @@ -586,8 +585,8 @@ invl_scoreboard_slot(u_int cpu) * completion. */ void -smp_targeted_tlb_shootdown_native(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, - smp_invl_cb_t curcpu_cb, enum invl_op_codes op) +smp_targeted_tlb_shootdown_native(pmap_t pmap, vm_offset_t addr1, + vm_offset_t addr2, smp_invl_cb_t curcpu_cb, enum invl_op_codes op) { cpuset_t mask; uint32_t generation, *p_cpudone; From nobody Sat Oct 5 07:11:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmB1rzJz5Xr71; Sat, 05 Oct 2024 07:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGm960dDz4N4v; Sat, 5 Oct 2024 07:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTkCrKykXhNV1qOJIB4+Kc2DE+7P0LJYk4BOs7BNGV4=; b=ZAP75rZpfO5lDFbfPPDF15uPMGv+JcGQ4x/b4GxT0BgUYgSeqKwhrwgOZxatIlehhSDbww hmjKYLieOR+0EtsrpcoloMmt2o5Eq/yjOmUyF4a4I6sHTjOPQQ9JO+O7Lnsp9hxaGDrIYI 3S20b9Ak4BH4NFxBkEgrC5Aw/0shFsYNHVdTg0tushrhJDVfBdkXXx0pTJxOncHStwqcTg hy/dE/5gSG4vwpJjLmKgLM6TL6EVXPaYRj1uT11EB1/3qKP3DNI5SHrguV1VcgaEtXGSkE /tqhbPrumjc7on7wPc6qAGPaKL8+hp0D5NKfxDsWilt7EOndgyzJkYm5vCRw7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LTkCrKykXhNV1qOJIB4+Kc2DE+7P0LJYk4BOs7BNGV4=; b=SyIlM0diiLMuXoDGl7mSP5XUKhJw/HNPxpnmn9wx8uOGYIZtZl6yYhdDYL2e4ETwSfEb2H qHFkE/YJyFzUcjJYbB5PrFFm9SYAl8dJ/Lq/2qUivAIvuERiVukfcGpANcm7tsRcPn4CUd XQNXZ1j5DlXeCFL+CP8i5hllYf/MTnuXMGbFb1xamLYQc0GTHfkIyyI4AEHRhkYgvRF2Om A3OnODNmliQsVse1T4fVCOcAqPkuEzaAnK/OqwklzqlOyw0Y1pAb9VPk6jv2xbEgPif3XJ KeUxq6OXu3pMFUw7rLf5KVPoV5LjOHl7JrN8oVSklcNsiFlm94pEAI3jQWJ/xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112265; a=rsa-sha256; cv=none; b=EcpVE/GKQ1qxGu0eKAxk72omNhSsK682goIkIfrbiVyNlTwhCd9baPgTZolBWyxwr8R2Wl bPXMPf5z+khlmd/cW8jecgS266gkznjLT7bUkEBdl8ouYIduzs07WYNJRlGkWsSJen0qCC H65/cTNWDQa/uZSvCbp2I6KMkGnFTqk2dhoKI47ONgFJpopFf0PRrh9WNudDXc6wwlyzoV P0t4inF/C9wUyHFSg9m5fDWBdGfyRltk00t7OtdJvD63Va+s1fLD8BFmg4/FYmQf4kVnYD JFqWRKAUtgdpBzRMENERNMKJmvjDk+64RG1dVzpiokXnnerJ81DAHWvixQ5U6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGm95bCKz17r8; Sat, 5 Oct 2024 07:11:05 +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 4957B53p000733; Sat, 5 Oct 2024 07:11:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B5Pr000730; Sat, 5 Oct 2024 07:11:05 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:05 GMT Message-Id: <202410050711.4957B5Pr000730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4cb8ec6c6f81 - stable/14 - vm_map: add vm_map_find_locked(9) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4cb8ec6c6f81243da158def4525f92c6dc7b964b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb8ec6c6f81243da158def4525f92c6dc7b964b commit 4cb8ec6c6f81243da158def4525f92c6dc7b964b Author: Konstantin Belousov AuthorDate: 2024-09-15 06:29:28 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 vm_map: add vm_map_find_locked(9) (cherry picked from commit 0ecbb28ce351652b3a2dae271eedf1eb3aa65400) --- sys/vm/vm_map.c | 50 +++++++++++++++++++++++++++++++++----------------- sys/vm/vm_map.h | 2 ++ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 97b96a46e4b2..28cf309f86c3 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2113,9 +2113,24 @@ vm_map_find_aligned(vm_map_t map, vm_offset_t *addr, vm_size_t length, */ int vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, - vm_offset_t *addr, /* IN/OUT */ - vm_size_t length, vm_offset_t max_addr, int find_space, - vm_prot_t prot, vm_prot_t max, int cow) + vm_offset_t *addr, /* IN/OUT */ + vm_size_t length, vm_offset_t max_addr, int find_space, + vm_prot_t prot, vm_prot_t max, int cow) +{ + int rv; + + vm_map_lock(map); + rv = vm_map_find_locked(map, object, offset, addr, length, max_addr, + find_space, prot, max, cow); + vm_map_unlock(map); + return (rv); +} + +int +vm_map_find_locked(vm_map_t map, vm_object_t object, vm_ooffset_t offset, + vm_offset_t *addr, /* IN/OUT */ + vm_size_t length, vm_offset_t max_addr, int find_space, + vm_prot_t prot, vm_prot_t max, int cow) { vm_offset_t alignment, curr_min_addr, min_addr; int gap, pidx, rv, try; @@ -2123,7 +2138,7 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, KASSERT((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 || object == NULL, - ("vm_map_find: non-NULL backing object for stack")); + ("non-NULL backing object for stack")); MPASS((cow & MAP_REMAP) == 0 || (find_space == VMFS_NO_SPACE && (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0)); if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || @@ -2146,7 +2161,6 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, (map->flags & MAP_ASLR_IGNSTART) != 0) curr_min_addr = min_addr = vm_map_min(map); try = 0; - vm_map_lock(map); if (cluster) { curr_min_addr = map->anon_loc; if (curr_min_addr == 0) @@ -2217,8 +2231,7 @@ again: MPASS(try == 1); goto again; } - rv = KERN_NO_SPACE; - goto done; + return (KERN_NO_SPACE); } } @@ -2232,16 +2245,14 @@ again: try = 0; goto again; } - goto done; + return (rv); } } else if ((cow & MAP_REMAP) != 0) { - if (!vm_map_range_valid(map, *addr, *addr + length)) { - rv = KERN_INVALID_ADDRESS; - goto done; - } + if (!vm_map_range_valid(map, *addr, *addr + length)) + return (KERN_INVALID_ADDRESS); rv = vm_map_delete(map, *addr, *addr + length); if (rv != KERN_SUCCESS) - goto done; + return (rv); } if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) { rv = vm_map_stack_locked(map, *addr, length, sgrowsiz, prot, @@ -2250,10 +2261,15 @@ again: rv = vm_map_insert(map, object, offset, *addr, *addr + length, prot, max, cow); } - if (rv == KERN_SUCCESS && update_anon) - map->anon_loc = *addr + length; -done: - vm_map_unlock(map); + + /* + * Update the starting address for clustered anonymous memory mappings + * if a starting address was not previously defined or an ASLR restart + * placed an anonymous memory mapping at a lower address. + */ + if (update_anon && rv == KERN_SUCCESS && (map->anon_loc == 0 || + *addr < map->anon_loc)) + map->anon_loc = *addr; return (rv); } diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index c0b3be886505..5d41f892e83d 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -475,6 +475,8 @@ boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_find_locked(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, + vm_size_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); int vm_map_find_aligned(vm_map_t map, vm_offset_t *addr, vm_size_t length, From nobody Sat Oct 5 07:11:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmC15LJz5XrRR; Sat, 05 Oct 2024 07:11:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmB6gkwz4Mgn; Sat, 5 Oct 2024 07:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeWyt4fiK2xTbky0JOshv2gULmM3hf9wxJqHtjo76Fc=; b=OWpNtf1t4EczACI7UWfxuLyDkUJ912GSmwh7euj9hT9jiSiViMADvZsFcHUuR1Q/3gKNM0 AZhsX1g/g+nYd2vuHbpx6eFgA9sMzA+CuNn96wDrMitr13DAXgVQz/sxr7ePIPHhImppuT ae2BRfRUa7AxI5mUXJ9gKSAy6DEC6ttouGZ4RMOkKF/8LFZLwzZ4XxmbQUtxNLnfbI21+O GtfINP5HOHaJpn8CxY/ynND24Hz7HcVT8PuxdmNn68C6TzGW0oWnvfVdJtUOYUsuh+sn8T tmdpgKBEvrLJF/ckzUUmNZ1sKMdrqKrKYsWnH+oBqdgZ422bRa4Y/GioiYtgnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeWyt4fiK2xTbky0JOshv2gULmM3hf9wxJqHtjo76Fc=; b=DEnpMqtrzCv0k8ljpQrTUURlvjT93ssG8KTNFwn/HibKaszY1xd/Ib2+cCNUiYhl7FH+SF V/Vbo0uOPBBw3IEjwGuugN8LVkvpEN+acP9iAqDO90Trmi7/iHo8u0qOfUmhKsFQZY3lQV seRxoIiCriMx3p8BZ2U+lfjWDoIxmizOwBl8vlh8ft3BoFBwbIyioaYqMHiNbfseDoEBsQ ZTIXDtXGQyDdgEpISqqIYAm2jmdEzsjH/0snL4F0lqI55rU/YIfIfKVT6fn923yCoTn74z R5PpO+CjjWmI4gAVgwfULov6GaqUg/SBB4sfzL/+E9TqbkdUI1uJnAO9qQ2O3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112266; a=rsa-sha256; cv=none; b=sns+bwB6lLh3NDXcR/6VzRUBORfE1+h3wF4W+KQTmB+bbS32npOT7twZMbyKYbUgxeUK5d 7MsblQx781Y3n/Fy6THii4/BCtL1LXe0RejEpMhlU5fXqtlVemtvjMihQLgvLTqPuu3OXy BUbRkww+S2PCOxG1KxFlnmd4Jq/hY5rKRLasnL8xbWW2Kp56NtmcnYZEcIFyb/tS6eDR8K KJJGXU8bokWT40rVOZUiebufxYKXqtGBm/OkjesUOLa+CSklcoWgBbNzYNq59EOfgdZNoH ZE336qG/uOGz7JsMLX2rYwZ4Z1FRyuGjD6MGe+SBWHeyDgehmEIGU7UrCNB3KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmB6F43z17j3; Sat, 5 Oct 2024 07:11:06 +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 4957B69R000769; Sat, 5 Oct 2024 07:11:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B6Is000766; Sat, 5 Oct 2024 07:11:06 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:06 GMT Message-Id: <202410050711.4957B6Is000766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b7eecc86c3bd - stable/14 - kernel: add RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b7eecc86c3bdf124ca64e2cdc65e05a2093614a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b7eecc86c3bdf124ca64e2cdc65e05a2093614a7 commit b7eecc86c3bdf124ca64e2cdc65e05a2093614a7 Author: Konstantin Belousov AuthorDate: 2024-09-10 03:57:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 kernel: add RLIMIT_PIPEBUF (cherry picked from commit 3458bbd397783f3bb62713c54ae87f19eeb98dc0) --- sys/kern/kern_resource.c | 7 +++++++ sys/kern/sys_pipe.c | 16 ++++++++++++++++ sys/sys/pipe.h | 1 + sys/sys/resource.h | 3 ++- sys/sys/resourcevar.h | 2 ++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index ac086618b8b1..f3755d625572 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1610,3 +1610,10 @@ chgumtxcnt(struct uidinfo *uip, int diff, rlim_t max) return (chglimit(uip, &uip->ui_umtxcnt, diff, max, "umtxcnt")); } + +int +chgpipecnt(struct uidinfo *uip, int diff, rlim_t max) +{ + + return (chglimit(uip, &uip->ui_pipecnt, diff, max, "pipecnt")); +} diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 4c6f010a03f6..dc8b9ca2c9af 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -376,6 +376,7 @@ pipe_paircreate(struct thread *td, struct pipepair **p_pp) #endif rpipe = &pp->pp_rpipe; wpipe = &pp->pp_wpipe; + pp->pp_owner = crhold(td->td_ucred); knlist_init_mtx(&rpipe->pipe_sel.si_note, PIPE_MTX(rpipe)); knlist_init_mtx(&wpipe->pipe_sel.si_note, PIPE_MTX(wpipe)); @@ -409,6 +410,7 @@ pipe_paircreate(struct thread *td, struct pipepair **p_pp) fail: knlist_destroy(&rpipe->pipe_sel.si_note); knlist_destroy(&wpipe->pipe_sel.si_note); + crfree(pp->pp_owner); #ifdef MAC mac_pipe_destroy(pp); #endif @@ -575,9 +577,20 @@ retry: size = round_page(size); buffer = (caddr_t) vm_map_min(pipe_map); + if (!chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo, + size, lim_cur(curthread, RLIMIT_PIPEBUF))) { + if (cpipe->pipe_buffer.buffer == NULL && + size > SMALL_PIPE_SIZE) { + size = SMALL_PIPE_SIZE; + goto retry; + } + return (ENOMEM); + } + error = vm_map_find(pipe_map, NULL, 0, (vm_offset_t *)&buffer, size, 0, VMFS_ANY_SPACE, VM_PROT_RW, VM_PROT_RW, 0); if (error != KERN_SUCCESS) { + chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo, -size, 0); if (cpipe->pipe_buffer.buffer == NULL && size > SMALL_PIPE_SIZE) { size = SMALL_PIPE_SIZE; @@ -1646,6 +1659,8 @@ pipe_free_kmem(struct pipe *cpipe) if (cpipe->pipe_buffer.buffer != NULL) { atomic_subtract_long(&amountpipekva, cpipe->pipe_buffer.size); + chgpipecnt(cpipe->pipe_pair->pp_owner->cr_uidinfo, + -cpipe->pipe_buffer.size, 0); vm_map_remove(pipe_map, (vm_offset_t)cpipe->pipe_buffer.buffer, (vm_offset_t)cpipe->pipe_buffer.buffer + cpipe->pipe_buffer.size); @@ -1732,6 +1747,7 @@ pipeclose(struct pipe *cpipe) */ if (ppipe->pipe_present == PIPE_FINALIZED) { PIPE_UNLOCK(cpipe); + crfree(cpipe->pipe_pair->pp_owner); #ifdef MAC mac_pipe_destroy(pp); #endif diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h index 61fb57480605..0f35316432eb 100644 --- a/sys/sys/pipe.h +++ b/sys/sys/pipe.h @@ -136,6 +136,7 @@ struct pipepair { struct pipe pp_wpipe; struct mtx pp_mtx; struct label *pp_label; + struct ucred *pp_owner; /* to dec pipe usage count */ }; #define PIPE_MTX(pipe) (&(pipe)->pipe_pair->pp_mtx) diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 5100501fb2b8..3b582e83d553 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -116,8 +116,9 @@ struct __wrusage { #define RLIMIT_SWAP 12 /* swap used */ #define RLIMIT_KQUEUES 13 /* kqueues allocated */ #define RLIMIT_UMTXP 14 /* process-shared umtx */ +#define RLIMIT_PIPEBUF 15 /* pipes/fifos buffers */ -#define RLIM_NLIMITS 15 /* number of resource limits */ +#define RLIM_NLIMITS 16 /* number of resource limits */ #define RLIM_INFINITY ((rlim_t)(((__uint64_t)1 << 63) - 1)) #define RLIM_SAVED_MAX RLIM_INFINITY diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 49119651665e..8449201dee67 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -123,6 +123,7 @@ struct uidinfo { long ui_ptscnt; /* (b) number of pseudo-terminals */ long ui_kqcnt; /* (b) number of kqueues */ long ui_umtxcnt; /* (b) number of shared umtxs */ + long ui_pipecnt; /* (b) consumption of pipe buffers */ uid_t ui_uid; /* (a) uid */ u_int ui_ref; /* (b) reference count */ #ifdef RACCT @@ -144,6 +145,7 @@ int chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to, rlim_t maxval); int chgptscnt(struct uidinfo *uip, int diff, rlim_t maxval); int chgumtxcnt(struct uidinfo *uip, int diff, rlim_t maxval); +int chgpipecnt(struct uidinfo *uip, int diff, rlim_t max); int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, struct rlimit *limp); struct plimit From nobody Sat Oct 5 07:11:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmD4BkRz5XrcZ; Sat, 05 Oct 2024 07:11: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 4XLGmD0w6Zz4N6T; Sat, 5 Oct 2024 07:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Hmv+6K/IR35/2QzSuI4wHj+c9NaZNWHO7agMg0+IR0=; b=d0c+w22LJy1uTJa/eCkPdHG5N9c8NspiD5ABTjXAEUltvJHsOyTWGypeCKy/CpEw/s3EAx vmS8J4bAKWIz7901xq8+ftCz6pHIUuQWK4kMWOCGv2+n6X+uelhiGpu25g5VBET5ljpgUC LUsqjluf5B20KTOCeR6vzsy+8WAmVhJTKjC7IhfzNiqftC44oR1rUw2AIJXGYsVxqdwhSf 5hWQ2DIdrqodqftK9B5ebH1NFDaPAR/dlVCrcoWDriwyP6MqXkiyaUS+8Hu1Hf204etz1C bm9hCtymn7lzNiSVzYIgLmX1SC2N1TxvXA9tCNj0AHgOT47tgdjUn/FLZXg9Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Hmv+6K/IR35/2QzSuI4wHj+c9NaZNWHO7agMg0+IR0=; b=awsTlgYdUd6u/eO045wAFoBrPa+SJa1OpASDKQue7GAVosxJZq/KgKHbe+lVeJEQkVudES OBoz+kaqtWQOacbAOw8sPR3+p3YLIJ1nTmW9KbDy0Y6JXpwcY9VSMefpTaLzmP/q//fqff KbUMis1Au6O17IwCfb+nBHlgFB/JziusZ1LfvD1rPu0E0iaEEFKLftWQuCdmverPv+6Bj4 NbK8k6AQ7OizvU+1Se9mekDkIVrZ+u91KW5l1uGYncWMhjgRZ7/9rfKdzdU8Gg1ndvDKKE zUSvPAn3J7fn/Kxe9zpP93znMDNAKLeHmVGE4Cv1fau962tgk2bbY4YR6D0ifg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112268; a=rsa-sha256; cv=none; b=ZNdLd2h9OZocID9uQX/mWu/QqHCUhD1vhms9fFWlTI8d5LQ482+MwUCf9u1pf4Nl4L2KRa sD3BJ5kmFgijaviv5Xl/pJdYeyzo/8TFYzjsPkYL2eA+rXQyHu/sC99O1Ngvp/vIbRpeWt cpQxT5ZE3N50CU7o4aEIGxkRxDveAFOqAUo8EfFXqMDN8GD/4H9dL25xSzxYN1de5TnsTZ ob0BoLjNqDlLzE/vwSEjNUCLdqYVs/hZLlFM3NIQPxHUGkc+SDaCI4VPv6S+iC4txRH/4j +Mxai1x6GbnctBbf3S2jOLIRQCf0HIb5w9RftmAo6dvQjJWqNmfGn8jc1dmFcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmD0QnYz17pC; Sat, 5 Oct 2024 07:11:08 +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 4957B7L0000809; Sat, 5 Oct 2024 07:11:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B7B4000806; Sat, 5 Oct 2024 07:11:07 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:07 GMT Message-Id: <202410050711.4957B7B4000806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d20f0dae2f97 - stable/14 - getrlimit(2): document RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d20f0dae2f97185cc53bda3fd3245453a77277f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d20f0dae2f97185cc53bda3fd3245453a77277f6 commit d20f0dae2f97185cc53bda3fd3245453a77277f6 Author: Konstantin Belousov AuthorDate: 2024-09-10 04:11:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 getrlimit(2): document RLIMIT_PIPEBUF (cherry picked from commit 54a8d1fbbf65e976132809718525ba051a5525cf) --- lib/libc/sys/getrlimit.2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index 2e79b3000c69..dc8653076dba 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -86,6 +86,16 @@ The maximum number of open files for this process. The maximum number of simultaneous processes for this user id. .It Dv RLIMIT_NPTS The maximum number of pseudo-terminals this user id is allowed to create. +.It Dv RLIMIT_PIPEBUF +The maximum total size of in-kernel buffers for bi-directional pipes/fifos +that this user id is allowed to consume. +The buffers for kernel FIFOs created on the first open of a filesystem +object created by +.Pq Xr mkfifo 2 +are also charged to the user ID of the process opening it, +not the FIFO's filesystem owner. +Despite somewhat unexpected, this is in fact fair, since user of the fifo +is not necessary its creator. .It Dv RLIMIT_RSS When there is memory pressure and swap is available, prioritize eviction of a process' resident pages beyond this amount (in bytes). From nobody Sat Oct 5 07:11:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmF4PmJz5XrXM; Sat, 05 Oct 2024 07:11: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 4XLGmF1v9Xz4Mml; Sat, 5 Oct 2024 07:11:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXyY+je3A+E8KFC/NU+dGkuCVDG2RceVHJj0x+6e/Kg=; b=aUQhfO0cVt4uF3892Af0779Tc+2G/nzPqwfdJUza72mLNuF7AaJXIsLE5M6okQsf2zrXyt 4SZL4yqiRWJQVmbOdeBenjbSkLP4DSwfYhxU2EBgQfEgoF64cPHaGFPpTfY0u1tnQjUq4z n5731h4SUHRCb80iw0eIwzLNAgKEY5gZRUWUg31T+Nby5xNkV7bxev0Jq96lq7fSUYSlKJ hbex83m+WQv9uBo8Sihz8kkcdXuGrxRrygegwsPyi0ZEvoJsB1Acx1BVrxW9MX/ThoMAL4 AS9N1owVA7apWRTCzJjcpvSvv6v7oavyhj6lfYMn7Ndb6Ym4Ap1oJCLgh30seg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXyY+je3A+E8KFC/NU+dGkuCVDG2RceVHJj0x+6e/Kg=; b=X6CUFiMFIaNCiYRKX8dLQs/zFRb0MQLUb9eVtgPtyoKKcUwY9HDktWhSMdnMPl0uqQH5M8 Kmf1uqefvtL12xVk82migYeGhJmHYfhBkE/otVNh0IngmKjpF/HIO5E+mwBhe5tI1BaMw8 hC3k+o18ckguQ/2/DyJ//rkK6LT4550LDURHAfqMPqbTZ1rVMyCLl0lJG9nM6A257qxBZj afOiOreZz2kPZ1oSR+Q7+ZYtCFuQAWZk2KHIwCWx1p1evvgvx8VLRluSVpS1N4YhXSvRC/ 6klIr8AM5slzg+ukP+3+R/FlaZqfUF8H4uS1UTS0XLi1AaCUOh2aVyPxds2NuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112269; a=rsa-sha256; cv=none; b=QQ7PEhm5ZUSkisyOoLTgwWW93MMgGf6w14+1SIlxzv12PwOG2HrAZgg5co8aNV2X3q8vWH VOn8nHz/BQqdzMha9kAYb8Ugx44Zs6RJd5uu588fmcGFuKx8G8swZrQNrr134uo6e+TWdL 41oGIqlavg7dIhP/vHUptJK9KtndzPDy1rTij4sHn78sl10UAXaFFs8D0pDTgDU+X7kEb1 Mh2qyddOWzKKX/djikya5kyi/wFrMQUGCEtNrKdU9Ier3F4uA3BjVWZKCABbDEpIHMZ4sv Yr5JMe1juWq7eV/WJfpN7n6ldfnqtKVXeFS3oR9VogLdYwX/7I2cpvIlIytq9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmF17Jsz183Y; Sat, 5 Oct 2024 07:11: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 4957B91m000847; Sat, 5 Oct 2024 07:11:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957B97G000844; Sat, 5 Oct 2024 07:11:09 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:09 GMT Message-Id: <202410050711.4957B97G000844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a03f7c040ce7 - stable/14 - libutil: support RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a03f7c040ce7b836b7e0dedfca76b28d2b8a5464 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a03f7c040ce7b836b7e0dedfca76b28d2b8a5464 commit a03f7c040ce7b836b7e0dedfca76b28d2b8a5464 Author: Konstantin Belousov AuthorDate: 2024-09-10 04:13:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 libutil: support RLIMIT_PIPEBUF (cherry picked from commit a4c04958f526a0dba353b54641dc5d2806984d02) --- lib/libutil/login.conf.5 | 1 + lib/libutil/login_class.3 | 1 + lib/libutil/login_class.c | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index a749fe5519ab..b1e7211e4c18 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -204,6 +204,7 @@ login environment. .It "pseudoterminals number Maximum number of pseudo-terminals." .It "swapuse size Maximum swap space size limit." .It "umtxp number Maximum number of process-shared pthread locks." +.It "pipebuf" size Maximum size of pipe buffers." .El .Pp These resource limit entries actually specify both the maximum diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3 index b67301f5a5a6..46e6a70f8ca8 100644 --- a/lib/libutil/login_class.3 +++ b/lib/libutil/login_class.3 @@ -118,6 +118,7 @@ pseudoterminals RLIMIT_NPTS swapuse RLIMIT_SWAP kqueues RLIMIT_KQUEUES umtxp RLIMIT_UMTXP +pipebuf RLIMIT_PIPEBUF .Ed .It LOGIN_SETPRIORITY Set the scheduling priority for the current process based on the diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index eb16ad501881..172da78aaf17 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -66,6 +66,7 @@ static struct login_res { { "swapuse", login_getcapsize, RLIMIT_SWAP }, { "kqueues", login_getcapsize, RLIMIT_KQUEUES }, { "umtxp", login_getcapnum, RLIMIT_UMTXP }, + { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF }, { NULL, 0, 0 } }; From nobody Sat Oct 5 07:11:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmG6CNfz5Xrck; Sat, 05 Oct 2024 07:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmG2bfpz4Mqp; Sat, 5 Oct 2024 07:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvP7lZEOce2d9nfPYZk+6zor0KiDPi+9S0JwgK3OFAE=; b=IRZpQIlvtjDNRfYMnnxPE8MlFMKLnzGFBYwuHUKyynurG1U/kP3DNsuo2Jf6UaWeX3dgTk EpH2q2HEfcmyEJ8/y0yUKHOUBh/7F0hJJwbAeNbVPycnVhxcC0gysdrXJe6oCvmoBVdTDc lMVmBES3fmKCjKWP01oM72Fd60tIe4FJLO0iokkV+iX4KP84IALkltXo6arO5i7M6S9COp MTS8swmeIXcRYbl2NGF2fsgqE6LGP51XumzEOjdzmAKimXVJXjwVL5e3rm9sFtJ8/czhnk WoQ146yptq5rQBqWg+kauXqSQlJLtPzdv6s+jNRNVFejDIe2TpwMIrC8qCooBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvP7lZEOce2d9nfPYZk+6zor0KiDPi+9S0JwgK3OFAE=; b=C8EIDt0ZjYpuzQchpAlxsYFu0fnV/ppdwwEjEv3H5C6btT29HEJkvFowkk3eekFppv5pCF azAk+QNtn4AVNRosfEpk5+2mo5vLK8FI3DpcG8Hc8HA8M+W4PBkX7/mP1LgPjBSh55o4/6 W7s5q0D+CCIT9+85bBDaTKddoMsDpdBwklko0Ibr/QNmrl4PpGjCOaORS0Pl61pnPhZ7dY 5bnqOimTVuQ7kYXQOUS/FkSY3JqmZmvlhQx1NmIBqSH/bx8/74Lh9oYGE0nZa9L9PHufCG Bm3aIz30lXOIYsL4q7r/TRL7pdVbN1V1iIr/WUjVUkbElSTLFGGhWaXFAYndOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112270; a=rsa-sha256; cv=none; b=V0u0pDYEo3xdDbq4FKkIGdx8hHP0ynDC8MXlA34f0dQJRLTGsoCGJLQoYmEGn9J7kGYrc3 myovzgfr+uFCp0RVi5iiFVQpAQddUA/TcPICOwxbxqqZii9PaIvboAKCxl6aCIIBKQGqGR bO5tAHLzG4M63WAD6iRkiMJ3HbAwm/lCpQKOzBAIfpxxAUjR9E+jcrmPlSX1mxA2aOBI3o Oa1c/wvsbXfDIOnlkz6BLdEh/owgw5gUyumTSlWVlEuo2hYBfye1Xl66D9jYVFz36fcnB9 AVdVOGBm5f9RCeu7hTRRqff0Cs9mdCKgo+woIzSaCO1hvzgNpQxbMfMM0AQdgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmG2Cwzz183Z; Sat, 5 Oct 2024 07:11:10 +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 4957BAHk000883; Sat, 5 Oct 2024 07:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BApl000880; Sat, 5 Oct 2024 07:11:10 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:10 GMT Message-Id: <202410050711.4957BApl000880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d5ed8778bf3b - stable/14 - bin/sh: support RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d5ed8778bf3b808d637c7913da66dc31b892e5f7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d5ed8778bf3b808d637c7913da66dc31b892e5f7 commit d5ed8778bf3b808d637c7913da66dc31b892e5f7 Author: Konstantin Belousov AuthorDate: 2024-09-10 04:12:27 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 bin/sh: support RLIMIT_PIPEBUF (cherry picked from commit 5d92f20c7d316aca521d4db4c1dab0f2d0e92c36) --- bin/sh/miscbltin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 5d5c137a7d11..39b3effb99df 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -489,6 +489,9 @@ static const struct limits limits[] = { #endif #ifdef RLIMIT_UMTXP { "umtx shared locks", (char *)0, RLIMIT_UMTXP, 1, 'o' }, +#endif +#ifdef RLIMIT_PIPEBUF + { "pipebuf", (char *)0, RLIMIT_PIPEBUF, 1024, 'y' }, #endif { (char *) 0, (char *)0, 0, 0, '\0' } }; @@ -525,7 +528,7 @@ ulimitcmd(int argc __unused, char **argv __unused) struct rlimit limit; what = 'f'; - while ((optc = nextopt("HSatfdsmcnuvlbpwko")) != '\0') + while ((optc = nextopt("HSatfdsmcnuvlbpwkoy")) != '\0') switch (optc) { case 'H': how = HARD; From nobody Sat Oct 5 07:11:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmK1HVNz5Xrcs; Sat, 05 Oct 2024 07:11: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 4XLGmJ4qb0z4MtR; Sat, 5 Oct 2024 07:11:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0krlek7twBAhzrPaABqGKakp3+sV+Y6/MlqN2u8Vd8Y=; b=vSpwrWeBontqWuVLeE2VzefBHKxwEpvCXkzp08ZWoqymT2LZpALHoW7mS9uHy6s66NfbYk Zc6JQZQ4LlEzmO9zoC4JTFpMbCl0SdMeSE65l20t2ieFyTFdmOydUP0wOToJxGUUUTN42c laU+UB/lpHIiEg9Ftsd4b1TXSyKezbW+chnOr0mDsUPqv35OiS3akmIkA5xYCHk/Hjwlmk GKgZF/iTBDONlvlpD5N+fFouz2pfQiao4uFTEUBfhbaKcntkcz+BZmwDTrgVz6NitKeRK6 CRo/EXUyynP+jIs0IFupM/C70r2eD+8EJCsnWkzkff/2CLTuXBH7PKhI3uUyuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0krlek7twBAhzrPaABqGKakp3+sV+Y6/MlqN2u8Vd8Y=; b=hkT74KJLRs+S+24vgu98CUyILvJGiTSyCEctx4F7DrdpZ9Fe/7QqpU0R9XmL9NCxzyt47T h5DFQDE4iZCAM5QtCnCrdlLdLw+DAcpne0OUHcKGj8pmXe1jY0voBFS3Z8BR35vgVh7kM8 lqRyX3gec1AAuxBoyA+nXjnckHxWzo4+XndW7KN5OPfsNUcQT13z0ik9/7lVSEWYDhgEgC rZ7jxIZ1/h9G/GMoGnRsLq8OcCrvJxcgQJJ2QvN4OgEqJ1fPuIEETP321DMs8WEFkcjidH c1oCLlPUJAz3u1nGJtOb8ZGWLzcpzr17jgTlTmV/TshtHCMbA6m8+dRsjvifsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112272; a=rsa-sha256; cv=none; b=kfni6xC3TN/nmj9nrV/2vqysrtlyw223efxt9db5KCw/Bi0Ck73VG5lkJQphJpJNqsZyYB +0ninYgHw57Q9TGw5ZQvCrXByXYY6zon0uxL7TXXsAkRUcwkg/XdMkDzt/ZDL/uX6ogURs htrBZeUM8quQAAWYVGHB8cbqTsgos+xgXfuNsfcefxZPUo179lZm6LaW/hx4wCQOIcqLIq /pCbMQcqOBczGUd9khiN/iR198gqDNxD1rA06iXVdHQp4D54gpvTYiugXZpaIKOotxQKS7 tqUuNtLVHYBF8Wk9bOyGvV/QpybFiA/6v9ZDfMTUfD1kOrdnjfmClJdgq8BUiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmJ4P6Mz17pD; Sat, 5 Oct 2024 07:11: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 4957BCfI000971; Sat, 5 Oct 2024 07:11:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BCUt000968; Sat, 5 Oct 2024 07:11:12 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:12 GMT Message-Id: <202410050711.4957BCUt000968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 524b9810de6a - stable/14 - login.conf: add a placeholder for the pipebuf limit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 524b9810de6a7cb60cfad94217e0e7f79e227669 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=524b9810de6a7cb60cfad94217e0e7f79e227669 commit 524b9810de6a7cb60cfad94217e0e7f79e227669 Author: Konstantin Belousov AuthorDate: 2024-09-11 14:48:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 login.conf: add a placeholder for the pipebuf limit (cherry picked from commit b029e29e0d8b928de2da50014d81799dfb5c9047) --- usr.bin/login/login.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 50a2ba9ffb5e..1069da17b4db 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -44,6 +44,7 @@ default:\ :pseudoterminals=unlimited:\ :kqueues=unlimited:\ :umtxp=unlimited:\ + :pipebuf=unlimited:\ :priority=0:\ :ignoretime@:\ :umask=022:\ From nobody Sat Oct 5 07:11:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmJ0sW9z5XrZL; Sat, 05 Oct 2024 07:11: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 4XLGmH3jRzz4N79; Sat, 5 Oct 2024 07:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efF7fKsnrHKtwCAWtdGO0Sv0pKpmgyoYgKEBP0HnnTY=; b=LhnmMUNuTJQO8iCsPHJS51NS8/Reuh6SYAFmr9J8ZjhWhYwGqf2ZYL5uzWFketjXs/iK66 TfDrv8kGep1+8ScFiKPbHn3EthJGdHpZtFYyamYJfzp20Tp7LXc+ZJcoBVwEbGa0qJxP6b 3zeOXZZ9mxI5ObrLeebMvQfrcbHxLmn8/4xbJT6AHVi06xtKMgQ3SsbhQoOxovahBTi8Dz swGmwnn1Qfnv8QkSE4NE+P0p7tbD7taQeCubyQ6eymFBRXeXCfzmkuBsF7j8vTAopJxl09 krNoz6WGpvM4UGyAs8VwKObVTHVn6YAM7N1+UEw/SrzdOzJRcOkUCF17VNf7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efF7fKsnrHKtwCAWtdGO0Sv0pKpmgyoYgKEBP0HnnTY=; b=kZxscyi/CRZ8fEBYYGmTg1wwknJEodpDOT0Ix9lET8bl0kPg/cD5JqnGAHzheNTdusVpNI Qm+W7OCeCNan3CEDDG0LGT1jwkTaLe8ZOc8wyu15ClxEH6prvAzha3S4NJdJufw1jYQSl6 9r9z60Q/sRXhBJ1aO7hnjSRLh0O1+KCeUp5qVW77W/aRWQvScK9XKcQII9iGHl2HUTBPXV HUAu/7mawd7Wiq35SHAbeFS2J4hpQJKHLQoY/qyKfnJ/yeF0RjOs/o25MFpxed8KWNMu6K rZzu4J0dDArWxY9CPGFQ8qXjqemAUQGSzgHNnirPNUlk5+Ot5YHZkmZAdaU6kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112271; a=rsa-sha256; cv=none; b=yxpD3Xhxkfb+PZaOHPASC3j2IqQwryEdP2xNtV1+dSYPf2djaem3kVwNOFFTjvWoRroJYC vQXG/nLzypt/i9H2erUaQegUGE76lY15hApbELYdhzGlMFZua3K/OWvHtqAoVHOtGwhknG vceo2hqcmWN8MXNKC0Y7SvmP4iV83vHZ5h7aphwrnoo8QNJNegYJR1ojhLomqDgBCcAloS tf2FO4IlK1aJJoCMg1N74MY/5uy5vEkmnG9duvhOkJSETHJA5d8pF24KITVTSDpX5ZkfF4 dSWsNVXBHDf9F/qKq8tXUFADToOMNGysJB7x8b7oAAqfx1yT96Ewh8nDR3ccLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmH3FQCz17j5; Sat, 5 Oct 2024 07:11:11 +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 4957BBfJ000920; Sat, 5 Oct 2024 07:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BBJQ000917; Sat, 5 Oct 2024 07:11:11 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:11 GMT Message-Id: <202410050711.4957BBJQ000917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 25902860b270 - stable/14 - usr.bin/limits: support RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25902860b2707ab840543eadb3d4e6bcdd8fee01 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25902860b2707ab840543eadb3d4e6bcdd8fee01 commit 25902860b2707ab840543eadb3d4e6bcdd8fee01 Author: Konstantin Belousov AuthorDate: 2024-09-10 04:13:46 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 usr.bin/limits: support RLIMIT_PIPEBUF (cherry picked from commit f54f41403d149e867b896ae753a0e7e2b0c738b0) --- usr.bin/limits/limits.1 | 6 +++++- usr.bin/limits/limits.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1 index 86df08b41058..0e374acd991b 100644 --- a/usr.bin/limits/limits.1 +++ b/usr.bin/limits/limits.1 @@ -32,7 +32,7 @@ .Nm .Op Fl C Ar class | Fl U Ar user .Op Fl SHB -.Op Fl bcdfklmnopstuvw Op Ar val +.Op Fl bcdfklmnopstuvwy Op Ar val .Op Fl E .Oo .Op Ar name Ns = Ns Ar value ... @@ -280,6 +280,10 @@ space. Select or set the .Va swapuse resource limit. +.It Fl y Op Ar val +Select or set the +.Va pipebuf +resource limit. .El .Pp Valid values for diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index 68b1853651b9..c53066b52a9f 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -91,6 +91,7 @@ static struct { { " swapuse%-4s %8s", " kB\n", 1024 }, { " kqueues%-4s %8s", "\n", 1 }, { " umtxp%-4s %8s", "\n", 1 }, + { " pipebuf%-4s %8s", " kB\n", 1024 }, } }, { "sh", "unlimited", "", " -H", " -S", "", @@ -110,6 +111,7 @@ static struct { { "ulimit%s -w %s", ";\n", 1024 }, { "ulimit%s -k %s", ";\n", 1 }, { "ulimit%s -o %s", ";\n", 1 }, + { "ulimit%s -y %s", ";\n", 1024 }, } }, { "csh", "unlimited", "", " -h", "", NULL, @@ -242,6 +244,7 @@ static struct { { "swapuse", login_getcapsize }, { "kqueues", login_getcapnum }, { "umtxp", login_getcapnum }, + { "pipebuf", login_getcapnum }, }; /* @@ -252,7 +255,7 @@ static struct { * to be modified accordingly! */ -#define RCS_STRING "tfdscmlunbvpwko" +#define RCS_STRING "tfdscmlunbvpwkoy" static rlim_t resource_num(int which, int ch, const char *str); static void usage(void) __dead2; @@ -292,7 +295,7 @@ main(int argc, char *argv[]) pid = -1; optarg = NULL; while ((ch = getopt(argc, argv, - ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:")) != -1) { + ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:y:")) != -1) { switch(ch) { case 'a': doall = 1; @@ -623,6 +626,7 @@ resource_num(int which, int ch, const char *str) case RLIMIT_SBSIZE: case RLIMIT_VMEM: case RLIMIT_SWAP: + case RLIMIT_PIPEBUF: errno = 0; res = 0; while (*s) { From nobody Sat Oct 5 07:11:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmL1YNlz5Xr1w; Sat, 05 Oct 2024 07:11: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 4XLGmK6C89z4NCF; Sat, 5 Oct 2024 07:11:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q38ZK69lAkwG2hIZGhMv76MmFiu/PDBf4Sb0vYl2/Js=; b=oq1dXaLfwn26YFzHlr8Pucj9YL1RQC/lMZXV0j5IU0qPQ946uDr9QTMf3sa71JGiiisYmO fP8e0FnhlIRUV6dSMex+kfDgW41DAYfguZ+ArlQFQ4keCmrBaLULIvBlc8MQj8SRYzEYV+ J+LPap21GJS5MdhiS8CtBhv5k7HQebx9CPy1l0JbgWXzGZDW7Lm0GlmTd79IKjzjIcbmcc xXgYX/MmpINBEGRVqnLsM3k/CwNeiBPm/iamIVyL62gmqPOipWCpGBjFYjzv3q/7YUyp4k t9IeQHRZ+R3GGsFd4mH75qyuE19+mH+WricJ1RafvjP6JgNixCFNcA/FtaBJ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q38ZK69lAkwG2hIZGhMv76MmFiu/PDBf4Sb0vYl2/Js=; b=mIOuYUveI0JuAUlqR3irrAvqxVx9nQeuDsjlfUUY4VQO2/n5/xWyj86U/PTfllFipvb39B lNQeMg8H0C1tN/vnDl7VTL4jugqydytXb4ZsE6TmgIKhShej1p5FI+Gzx1R8kJlKV2xSj9 GYQyql1uhDbgoTlZpk87fQcJXNq8Z5wbZpjN4tOVV1KebKto9b03hRtu9DcyS1aH9gsDe3 jQDPDve0EN3eg60Vy6wtGemkWJigfZZtvnvsnGrn3Ihs7AiMQ9Bgy5rEKUU4tfUGjwCd9E HVXeebXZn/waHKbqFfBSbdp0ubJsa8yAMrrMLDflaEC6XuaJMLQyCuJR51fdlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112273; a=rsa-sha256; cv=none; b=K4P/Wwg60E/ZbrSQ0P69hcs0VXT/BoFXrvoVxl/LQhfpkHbiqUgDJ74Lj7uD75OC5moIBU JqjCekznrYGbTsDIhnNThrt36QeGPXJg26vpqnXKz2PB/1uulIPWM7xDGW0TPG7TtxwvVr 6MUFIFru6B0vkpBEIl5VRYFRunuHVDwu8wZfozchcVBSDyIlAhoOu+DKFaivRaXJBcdhsb bgWutqPT3N6A2y5MMVTQUy9l78/sCuXc5IeM3a88z3Gtwppy+RBK7WlC43pyitbQAc12nr HFnMyeWnT2gyHM6q64q9MEpt0F8bJwSn0K0eQgICJSLm7QxHbplV1+IZrmYRwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmK5Yykz17m3; Sat, 5 Oct 2024 07:11: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 4957BDXP001007; Sat, 5 Oct 2024 07:11:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BDwP001004; Sat, 5 Oct 2024 07:11:13 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:13 GMT Message-Id: <202410050711.4957BDwP001004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6600090e678e - stable/14 - procstat: support RLIMIT_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6600090e678ef46264383b70222cd3886c0dbbc7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6600090e678ef46264383b70222cd3886c0dbbc7 commit 6600090e678ef46264383b70222cd3886c0dbbc7 Author: Konstantin Belousov AuthorDate: 2024-09-14 13:13:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 procstat: support RLIMIT_PIPEBUF (cherry picked from commit 80133d678ecbddb382174a4d48305a7b8cb932e5) --- usr.bin/procstat/procstat_rlimit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/procstat/procstat_rlimit.c b/usr.bin/procstat/procstat_rlimit.c index f930d5b0aee0..ee94213b5e74 100644 --- a/usr.bin/procstat/procstat_rlimit.c +++ b/usr.bin/procstat/procstat_rlimit.c @@ -64,6 +64,7 @@ static struct { {"swapuse", "B "}, {"kqueues", " "}, {"umtxp", " "}, + {"pipebuf", "B "}, }; _Static_assert(nitems(rlimit_param) == RLIM_NLIMITS, From nobody Sat Oct 5 07:11:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmM3zNhz5Xrcx; Sat, 05 Oct 2024 07:11: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 4XLGmM1g33z4NCk; Sat, 5 Oct 2024 07:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hz74zFawtXNPGO0a4t+AgnasFAm+h/cC4wwLTQCm78U=; b=NKfMiE8pXtSrJED9wjpwcRwaZEFvvQ0+nPiWPYhNg0xIwXYIMEjBZ8P+iXPB0McAZgv/gr zdtgP1IAnuUdU4JDS5V84dsdMLs00Rhrt923igXXtSzWM9H8Nfz2JrLE6rBvTcxiOrexke TbrfIpemLv5xTksE0VzRo8yQwd7VfjxGEjrAg5+dL1p9uOd6c+CwqOcrV4StyHcwjuclnV 0NmTyvScIlhMEZERd8rj9Rv1htuwT+Al1VtkfBoiQqP1TLuT7H8MxtuaMvOci0PxWco7eD IuRt7Z1iOR1/XQZNrRTm0k6r2hYwgBCZZujKXbWtg+FBnGlJGTOTF249AsdZ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hz74zFawtXNPGO0a4t+AgnasFAm+h/cC4wwLTQCm78U=; b=ItG9qQjh69D1fWGwM50ESWcPUq/zGu9liVeXR7X8If9+gPXZ4mvfvFEI/lk2dPN48W7IDu 7AUfya0cfwjJH/z4s3ma9uK6++GHSAhCJDms2xsd2O8s5NwOp4dBMERPMUzIv6GWlPTb2N aDsqfaV/fmSm9DnCxaIxEeiO5ap+0U2wsfUddz7jnXaU0Xz951MQCPoLR6OtMdscVIo+2m v8NPbBctbJxM2gD8XSmsiCVZkjh4n2/CQNEe0Qivpsw+nJrtHNxqBnkS7xNzPcJ5fQbRho motUekbhAjIZQEpc+TDqBFL3/cwkhVyTqUYm0vS3aYFPQQeN90/A5UhBRNtSsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112275; a=rsa-sha256; cv=none; b=CFlEfG8pVNKBx8yiDY4KN9dVBSB1+OpQCu7gug4clGwWaa+0Is7U6j1aXo/V4OKfCDD8++ hoGNlUsUZgPhpKPKf4v5Rs4c1ycCAkvqOekJDx6YqA1mhSwzecQhSOfkQXjQWOR4BAPsgm rMFKhw04hIyJc3iYlvrQ3x5E8jYlkWgFIbQszsPGVqHKy52mBJsmn0cMvasliTzaGztcnB 2AeR7pSrGYjiJ9SaGUifCVifFcVhNAc8nql5E5f7eibbTqyXyd7Ezpd/yA6pC+/vLU8WhB yIbnvvssxWWzrIRFhznuxoMNe3RH0T2gUI5ia+bc/HeO3Hq5wT34vIX9T9EXaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmL6jRhz17rB; Sat, 5 Oct 2024 07:11: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 4957BEYg001043; Sat, 5 Oct 2024 07:11:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BECm001040; Sat, 5 Oct 2024 07:11:14 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:14 GMT Message-Id: <202410050711.4957BECm001040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fd9babb1b85f - stable/14 - privs: add PRIV_PIPEBUF List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fd9babb1b85f097d70d3c345b973b9b35a3b3c69 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fd9babb1b85f097d70d3c345b973b9b35a3b3c69 commit fd9babb1b85f097d70d3c345b973b9b35a3b3c69 Author: Konstantin Belousov AuthorDate: 2024-09-15 06:38:41 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 privs: add PRIV_PIPEBUF (cherry picked from commit 8ae779832c6fee0588274af3c48cc643022787e6) --- sys/sys/priv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/priv.h b/sys/sys/priv.h index a61de8d32fe0..fd0f7dd213ff 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -426,11 +426,13 @@ */ #define PRIV_VM86_INTCALL 550 /* Allow invoking vm86 int handlers. */ +#define PRIV_PIPEBUF 560 /* Allow to allocate reserved pipebuf + space */ + /* * Set of reserved privilege values, which will be allocated to code as * needed, in order to avoid renumbering later privileges due to insertion. */ -#define _PRIV_RESERVED0 560 #define _PRIV_RESERVED1 561 #define _PRIV_RESERVED2 562 #define _PRIV_RESERVED3 563 From nobody Sat Oct 5 07:11:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmR5gLsz5Xrgk; Sat, 05 Oct 2024 07:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmR0dcQz4N8t; Sat, 5 Oct 2024 07:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXr/fOgA0PhnLygP0HDAZvQu6w+sWveGdM2r7VzBubs=; b=KKl69zoaf8RtkeL8O2GyX9LD5ss7zCxwlsCAVr756A72bpvmPdZbZTI/RqPm+aeW260dW6 f77ANpusA+OzBF6qU1fvaCYbKIR3fGOBd7xjN5iMR6Fia1cGzMnetgEGys3G3LdUzhlneV siAwaTxPUtN5IIV6vw0S2jvfLjAvUspK3Mjl/kPAk1J7v291RDaKUwljKITg8OyWYgy0i7 +bAv+WQ7krVjqF68hcFeI22pPwRbrvfXJmYpzwA0Jhe1yIXKm+0SxyNf798zVZHXoSZtfe aYMqIr1HLWbfRyZ4lr76EyfnGjW9cWzudyTzmUSgPaRH1HKvoGGxWybpbDiRQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXr/fOgA0PhnLygP0HDAZvQu6w+sWveGdM2r7VzBubs=; b=S9tYoqgZwjyDiO6+6rSubPuJzQI5hM3BLZE+WCRt1BwlbYWKMNrVFB2u+zVJUX7l8MlHr7 fbailMUwvTUjI5G7RhTI1cw8m+4HweTKqNRD8INJlcgRVUIV8CnmhG8THhbqxjbj+ijtcN CBHYzbosTQp7kBSQpTChOiT0n+MVrA+WeUtjwcewUiaa8IJWNX0L/YgB8fXaRaxCpL5D7h 0EpoXC5adzSxwt7CBMiimQih5ZYmOIPeHVSNdAmZVBtwG8zdkTcGHL4AFcS5iI0l63dHJw PnQwmXAKNn8Ff9e7ONhz4PBY6sa2j2q1NZrlrc5Aa5Fo/bsBN6s+F2NyGV81/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112279; a=rsa-sha256; cv=none; b=gMXEpTJAckcHkaZAEANoOKIZl2PPzKcQPChJLFLmg40amCgnyJYfu0G64z22HhmmJw6BIJ cYqLDsnSUhhh7uAtpuaUPxbBcAg/u9aORBlsSwTNaxP3N5KSrmA/viiycmh3HuPbjllKWZ ZEcVTAiSO/c4GM1vAwue8m1qFEwRoC62vmiUgPdvsBtZXg+9PKCPjiMwfviPz1DKpdsXV1 ySiNeSiBYHlJqDwqv8oZ3LEcOUiY+whKKkbB4VcfAZ4VqMuiKfzGleE9OrpuWwvvZ3JQy+ LZ/Onts/oOZalCtEliMbmRi/7yhj95PnQfurC3OrVquCOeFY2+Mh4LvbncZeag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmQ32v8z17m5; Sat, 5 Oct 2024 07:11:18 +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 4957BIMb001208; Sat, 5 Oct 2024 07:11:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BIYB001205; Sat, 5 Oct 2024 07:11:18 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:18 GMT Message-Id: <202410050711.4957BIYB001205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a8c663bb4261 - stable/14 - pipespace_new(): decrease uidinfo pipebuf usage if reservation check failed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8c663bb42612afb58965c091846ee026bc702fc Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c663bb42612afb58965c091846ee026bc702fc commit a8c663bb42612afb58965c091846ee026bc702fc Author: Konstantin Belousov AuthorDate: 2024-09-20 12:58:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 pipespace_new(): decrease uidinfo pipebuf usage if reservation check failed (cherry picked from commit 40769168a5ee227b96ea91768555eef332a0dc26) --- sys/kern/sys_pipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 380bc165cef5..20bedd665ca5 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -596,6 +596,7 @@ retry: if (priv_check(curthread, PRIV_PIPEBUF) != 0 && maxpipekva / 100 * (100 - pipebuf_reserv) < amountpipekva + size) { vm_map_unlock(pipe_map); + chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo, -size, 0); if (cpipe->pipe_buffer.buffer == NULL && size > SMALL_PIPE_SIZE) { size = SMALL_PIPE_SIZE; From nobody Sat Oct 5 07:11:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmR0Ysxz5XrRh; Sat, 05 Oct 2024 07:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmP2Qg3z4NNv; Sat, 5 Oct 2024 07:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CF9xFNOUrJJlLg2uEOkJ0Rl2ZjPjWPse0JCHC+ielwg=; b=mBqzuk2XWzj6SY8YYjkSXzXUsBU45Do9bbapRyGzh4tORnfrX2YHDF0ymLZTUY11mZxXm3 7XhgpMVoLK2PZdDLPYFjyBWISMQNFW4g7xiUFB8DlzbOAm6S4wtrHN5jXDGx41HhMdQm5x ouByBJFRDsngqpHS2DgTeNnpGzF9mOz0XrweQevNcp0rVeB33HmCrFDDyZB3+LSfgHf5SO TQESQzWrtKzVx/wBNJAYnQ8rWcM3vkGzQBWgTUkZCP3z4xfxl1RFaQ7DH+eRgjEhpskFXI 7rPbESGetPPLsZXbDVTAd5QCQ0EpU0EzmgAKI1v3SSh3GCIul08ZniIKMG9kwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CF9xFNOUrJJlLg2uEOkJ0Rl2ZjPjWPse0JCHC+ielwg=; b=AIhSQA8BUem6bJngOj95nTzuczm73PyHuSv2HWobO8VJDK4g4jAGOD8fBgNQWt1V42jqiV b+n4b2TGwIY6iQRmuygbRCgJHWs3gvXZp2hpgbm3ZYEbdh8N18ChWp+s+gwL8gPdd+5sC/ UDIyp0j+MUFb+aqUzNgwwKjfdejjBb8ODDFXAXFL0Zaa6omJarKcTq5rZOsZy73ya+nkUk pVdx/ts5N3RtiOO/t0RFpvdin5Mi13qqf+tEV90tPT/r0ciTJuWChNE3C4PZO/SpcIEyEW znTJ79TzoGOFFODMHBUe0/bXu5Tpzw9lpxzPW40tmwpUmTWBUt0xIHAClzLywA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112277; a=rsa-sha256; cv=none; b=JvWISdFZeo+LnLcyKG1jqAo3PAqJ0L3ML2HyDFW1Q/AXDM7KltrLef2/o/bL6NnVbvvwcc XoYFTSVOZ49RgFrUgiA+WSe2fWzhviHjOVNRSGQsgAMBr3kdZ6Ytn7Vh3oeRSSyjhCZbUC InvtKpM1L+R19lz/Yd6QHxtAKgCiM/waVl0oENn3tfdSGG0OGAyOMiXxs83ZJTkjX36l5U rUEGQh1mcGZmL6oCLdp6X5Q42ii/meZaBmmWGewGZFcbSBIaENe0pk0/jDWpOjgkHT2yD2 gLBoaaQIcncWUh2//EJ2QUB3wHBFOLk4JvSmvyMR3BgyPXyz09at3vls6lEzwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmP1sHsz17pH; Sat, 5 Oct 2024 07:11:17 +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 4957BHQB001154; Sat, 5 Oct 2024 07:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BH2v001151; Sat, 5 Oct 2024 07:11:17 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:17 GMT Message-Id: <202410050711.4957BH2v001151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6536b979b856 - stable/14 - pipe: use pipe subsystem KVA counter instead of pipe_map size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6536b979b856096809d46e92039a7a51e0b646d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6536b979b856096809d46e92039a7a51e0b646d9 commit 6536b979b856096809d46e92039a7a51e0b646d9 Author: Konstantin Belousov AuthorDate: 2024-09-20 11:59:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 pipe: use pipe subsystem KVA counter instead of pipe_map size (cherry picked from commit d6074f73af5c813524022cf6ee7dab9c4cbe44be) --- sys/kern/sys_pipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 2e5eafee9fa6..380bc165cef5 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -593,9 +593,8 @@ retry: } vm_map_lock(pipe_map); - if (priv_check(curthread, PRIV_PIPEBUF) != 0 && - (vm_map_max(pipe_map) - vm_map_min(pipe_map)) * - (100 - pipebuf_reserv) / 100 < pipe_map->size + size) { + if (priv_check(curthread, PRIV_PIPEBUF) != 0 && maxpipekva / 100 * + (100 - pipebuf_reserv) < amountpipekva + size) { vm_map_unlock(pipe_map); if (cpipe->pipe_buffer.buffer == NULL && size > SMALL_PIPE_SIZE) { From nobody Sat Oct 5 07:11:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmT1ZpCz5XrPk; Sat, 05 Oct 2024 07:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmS60QCz4NPG; Sat, 5 Oct 2024 07:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3ii8knhvh4rRMANC3hS1X44xhMSSeEQ9ztiPjpPBT0=; b=JhwcGqu2CJZ3m3eCAtC4ZZDTa5Zl6tKvzSGEJ4xxfCBqUTocP6FUztD91q2RLVW/djYCmJ qisrKrdxpSkC9hLrwdr8/W9GWPsQqlvrcK1nIjyH7qASS/E1VgIaEVu+9QcuWJarnvcpFa iNfDVdncxBhylV8Go96uk4Ng1CNhOv084YMJYryN5ddmaukC8YKUqoUoSC0O5H33+GbG7D EHcYAPMq7bfDuvWPFiwQdIlLDMpjq4b+771cKp6/aN+hZKv0GBxhyjHQz1wLulHhi3jZll 0WRS9JnFHdT0X6kLh9CT3RFaU89Va6dgNT6W9oQ+DQVNGw/otyDaOUpLpB9OoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3ii8knhvh4rRMANC3hS1X44xhMSSeEQ9ztiPjpPBT0=; b=n0htbbnuCMDjiVf8i2352AKS/6m/y4YJgiOH90ra0z0URRvS4q9uCo7CLgxk0EA49I3aYk tc2mroOIKJI9nbjbZhHmSlhhEsZWJe8F7WpgGD4lgLPTYEpIYO9TcGkXMiONWAPIozuPIP Z34zCx28aFVfpF7V0jyZmIAkI2BYdA2cBMJ3nN2TTaWtjSPLKalndNhIBANsyLFvZnfcqG ltDHX/D+I3cfwDs4+vO3JqbzuCm/csxhNLm4vSHJrBvCk95Loa7ENT8kjjW+RG4jLX5c4f vs5oxGNJL7/iDbchNwJKBCxqGWD5L4rD7V6evLTV3dLCgHuHki40K6QCAuGQvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112280; a=rsa-sha256; cv=none; b=XzTi3zy0TIO680gc6lYcVdmwtqvDKByt9OZCtBY42jXpcUbUk1xv1bv4c36G1E13CMypJm lE1T6iGYyzSYsj/p0ycL3L4lh59ty41yqGVVrB+AKyURDq8orV7syCRwc8UkB4LMPoh7vF OFOapMvUQKo52uy1fWEAUQQwe258BdAwEt+OsKJrye+tjHZ5FE4wJCYHobuEiz8azAOoeD waBC+TacvRM/HIzinknIOVqsbYY1H++sVhxkAKiXSd3ehd9z9tQeErhVvxdbBdjSlkS/3r MCWtvMsAwHS3HzbaPkSM4tg9XOZd3ZsdWTHH/KcYMkzYmad7YyZhy+tkoyu2zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmS5TjFz1861; Sat, 5 Oct 2024 07:11: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 4957BKtU001310; Sat, 5 Oct 2024 07:11:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BKfa001307; Sat, 5 Oct 2024 07:11:20 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:20 GMT Message-Id: <202410050711.4957BKfa001307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4a337ee7ef4c - stable/14 - uifree(9): report non-zero values for all shared resources List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a337ee7ef4cdf1492dd5d79e80434d8e68e233a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4a337ee7ef4cdf1492dd5d79e80434d8e68e233a commit 4a337ee7ef4cdf1492dd5d79e80434d8e68e233a Author: Konstantin Belousov AuthorDate: 2024-09-20 18:48:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 uifree(9): report non-zero values for all shared resources (cherry picked from commit af96ccc6a5083ae9ed62dbb1d72674ca75948707) --- sys/kern/kern_resource.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index f3755d625572..6b9930962859 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1513,6 +1513,18 @@ uifree(struct uidinfo *uip) if (uip->ui_vmsize != 0) printf("freeing uidinfo: uid = %d, swapuse = %lld\n", uip->ui_uid, (unsigned long long)uip->ui_vmsize); + if (uip->ui_ptscnt != 0) + printf("freeing uidinfo: uid = %d, ptscnt = %ld\n", + uip->ui_uid, uip->ui_ptscnt); + if (uip->ui_kqcnt != 0) + printf("freeing uidinfo: uid = %d, kqcnt = %ld\n", + uip->ui_uid, uip->ui_kqcnt); + if (uip->ui_umtxcnt != 0) + printf("freeing uidinfo: uid = %d, umtxcnt = %ld\n", + uip->ui_uid, uip->ui_umtxcnt); + if (uip->ui_pipecnt != 0) + printf("freeing uidinfo: uid = %d, pipecnt = %ld\n", + uip->ui_uid, uip->ui_pipecnt); free(uip, M_UIDINFO); } From nobody Sat Oct 5 07:11:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmT19cQz5XrZW; Sat, 05 Oct 2024 07:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmR4sYrz4NJd; Sat, 5 Oct 2024 07:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/rxdc/H1fwUOgmtZgw3jHPllFFc+Ivfhc8WKmtjh9E=; b=bn6Xfigi6I6SYFXMO8dCXA2rozEclfZvfnY0gN1ouy697fxH0hHrFr015gGzGM/4jxZQYp saBfBEWFkr9IMK+FbUFrqdiyNNEMc4sfzSI0NPmMd7CPujleRUahmDNaJSl1spjp23KdRN zq6kCxzwUaXaoUYiE7ESR13spMIHYjKdLwW7I6mt3aYKwpZN3qSxAcSEO2Ymr+gAhJKTDh 81EZfMvIzNQ+L8nmQBuEp5is7yNh2qm/Z/mOpUu2+3uItj70ZONiUkEymhbRoeKAQcdQ13 uX8ggE3S9u9gbPMSyPh17wJuqG3psD/qCkU6gFf7mJ1VV2VUHZmN1YP6vRnf/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/rxdc/H1fwUOgmtZgw3jHPllFFc+Ivfhc8WKmtjh9E=; b=RuG07tPxPQrKljk9onWBDGB6CTtUvUhiQRuWOR9a99CkIUxoAOmkAceao7RxLbm88mMhQ2 OK92mdvFekaQSI9s8X+kc+Rinw2tbilFiuulPY97WAD1QianSIZug/uKoNlngBVLnfq6Vj b8WW4i/852KLwvgNZHDSQjUTcfrfJq2zeUPFONsmDt9ag7016E1CywPzwMcyJJuhv1GraQ wY/xu0cDQBBp6OrRkKFLtYg1zUry+xY8nvkwPSAoCDrWn1GCn6NMckt3f0H0MGues0Bh7d ddWfW2YMAdckX7pM/JDWWKnyNr4nLudDCtZ8z1bEDtPURGruWAA4okyUeIS/vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112279; a=rsa-sha256; cv=none; b=rqFG9h6d5zaIF857NJMr+6OdRbmSzMEMzEBor4oOEsfaGZk2TznLh+Vu3BNt1LF1axYao8 cnvn9XORmiYKa/cHZY9gz0JLzCF73Qc9sFpid8OKSq4cm3fqWuaRQYrecyDPz93ypFA39i zqbNbLNhRgAjNlv0DLJSCmOuF0v1GjzPSzfs3xpp7Tz4GB72YMPw8lMVPZ9R0AyA5YaL3E CdCWhZWti/XdykkQvmYNKFYvqst7423iZVibMpK5+ZPpz0xiSFjJIeK54Nvsn/sfgCLuMf 8SKqtFsTX7fifQpGi0lDTX++zTPrN+cHCZCNpaUHuOO7YjlGijAEVAmu+GoA4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmR4FTSz1860; Sat, 5 Oct 2024 07:11:19 +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 4957BJM6001259; Sat, 5 Oct 2024 07:11:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BJsm001256; Sat, 5 Oct 2024 07:11:19 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:19 GMT Message-Id: <202410050711.4957BJsm001256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c15b2e046e8c - stable/14 - sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c15b2e046e8cb84c5bdae98ee742b477dab7ff24 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c15b2e046e8cb84c5bdae98ee742b477dab7ff24 commit c15b2e046e8cb84c5bdae98ee742b477dab7ff24 Author: Konstantin Belousov AuthorDate: 2024-09-20 18:48:19 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf (cherry picked from commit a52b30ff98cdab82af140285fa7fcdf1036fef27) --- sys/kern/sys_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 20bedd665ca5..c34c7b24a269 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1678,7 +1678,7 @@ pipe_free_kmem(struct pipe *cpipe) if (cpipe->pipe_buffer.buffer != NULL) { atomic_subtract_long(&amountpipekva, cpipe->pipe_buffer.size); - chgpipecnt(cpipe->pipe_pair->pp_owner->cr_uidinfo, + chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo, -cpipe->pipe_buffer.size, 0); vm_map_remove(pipe_map, (vm_offset_t)cpipe->pipe_buffer.buffer, From nobody Sat Oct 5 07:11:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmN3Gdvz5Xrd0; Sat, 05 Oct 2024 07:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmN14Qkz4Mf0; Sat, 5 Oct 2024 07:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iau3Lmk/wrzWdhOd7q1yop8AyFIm29YpRN+d4jC8DuM=; b=a6y6Laartk07Z6mDT+4gvn9gv5X7laBgLa9pl8dkk+yn1/00qHWT6V70eMCRsaJRVgmzA0 zDHce7nqF+U0d+R5taVzT2PiyEWWSHSI5M/+wlNRbx/jGuUH30zL/S8r0w+xxPJktMLiFn 4oKzpWz7dek1I8mmmXUanJBBu4D2+MttUREmVlETPnxHmJXvE7kPXft/UvAVrPo0czfLHI hFQ3hOvlgANZEJmKj8GJdzXRCbTXlXEy3/a0j9o2mMIBKOSHQiLa8K1gWNaAzJKV82+pS6 DN6Dt702hAFbnc+OZlMoqVwR8NhmURNU68I8CMXyVk2DnOjtGGTRmCOJCB7x4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iau3Lmk/wrzWdhOd7q1yop8AyFIm29YpRN+d4jC8DuM=; b=pYBe3K+U9jKD9f0s4wHnrpPAGBVICP22a4AtmJa+Q06T32nu3jcBwCCTLrHBCgaHYsvnzt p77G0ZecdCjKWc9GhJxN3/tyU/gun807clRZ7wbWxol/DXWxyHgDKFwUTBVQbuXcoWwj2J ugnCNSVmTSsEbDhxYadXisQ1kvR0PXbAZ/agOOeneDiie9DF1TpeGJjCsFeUUbVJvoh6GS 1XF/GiOFyrYVGprpFi9C0IKCFeFNR45YXJ0Eeb8S0BQJdzvm28yvicI6xpftXHKSE1BBTf WgAGkawI8YpnXoYK/0+SFeEV9SKCNQEnwmp7av7jTmmD8gCIQ8kRyMX2jbd3TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112276; a=rsa-sha256; cv=none; b=Fdmbxe3OMugWlUAdcTMklQUG49+6/7c4ghFyL25KY9cvj8mdEUK2QrboEarfzvR3L4V/FD PVONNt2LQAxtR3h14AmI42NFoaXmPqkw2jRqEtPIreE9ndf9KD/sMTbjjmaliz1hUdX+OJ pjzt+YEyNlUGmJRyi1voUp+brFAe41rBDrVriipvVBgTAFZ+b2xOXbKP3Uw195W7WQCT+1 uVs+kvjowYp/+rcSK/dcxfK19QYHvxLemhhsYJJRKYgS4C69V7XOK7AiRaOw6foofmJHJs Jo1h/jlFZScMk/nynZp02VEmgpOaViGgzOSPn+e2H35+vw93HH9/gbDJMvK4Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmN0bcPz185v; Sat, 5 Oct 2024 07:11:16 +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 4957BGr5001097; Sat, 5 Oct 2024 07:11:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BGaU001094; Sat, 5 Oct 2024 07:11:16 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:16 GMT Message-Id: <202410050711.4957BGaU001094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d532d9926ee7 - stable/14 - pipes: reserve configured percentage of buffers zone to superuser List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d532d9926ee74a05b03db9064196b3831c082bee Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d532d9926ee74a05b03db9064196b3831c082bee commit d532d9926ee74a05b03db9064196b3831c082bee Author: Konstantin Belousov AuthorDate: 2024-09-15 06:57:34 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 pipes: reserve configured percentage of buffers zone to superuser (cherry picked from commit 7672cbef2c1e1267e42bb3aad6a6da9380f4347f) --- sys/kern/sys_pipe.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index dc8b9ca2c9af..2e5eafee9fa6 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -104,6 +104,7 @@ #include #include #include +#include #include #include #include @@ -207,6 +208,7 @@ static int pipeallocfail; static int piperesizefail; static int piperesizeallowed = 1; static long pipe_mindirect = PIPE_MINDIRECT; +static int pipebuf_reserv = 2; SYSCTL_LONG(_kern_ipc, OID_AUTO, maxpipekva, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &maxpipekva, 0, "Pipe KVA limit"); @@ -220,6 +222,9 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizefail, CTLFLAG_RD, &piperesizefail, 0, "Pipe resize failures"); SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizeallowed, CTLFLAG_RW, &piperesizeallowed, 0, "Pipe resizing allowed"); +SYSCTL_INT(_kern_ipc, OID_AUTO, pipebuf_reserv, CTLFLAG_RW, + &pipebuf_reserv, 0, + "Superuser-reserved percentage of the pipe buffers space"); static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); @@ -587,8 +592,22 @@ retry: return (ENOMEM); } - error = vm_map_find(pipe_map, NULL, 0, (vm_offset_t *)&buffer, size, 0, - VMFS_ANY_SPACE, VM_PROT_RW, VM_PROT_RW, 0); + vm_map_lock(pipe_map); + if (priv_check(curthread, PRIV_PIPEBUF) != 0 && + (vm_map_max(pipe_map) - vm_map_min(pipe_map)) * + (100 - pipebuf_reserv) / 100 < pipe_map->size + size) { + vm_map_unlock(pipe_map); + if (cpipe->pipe_buffer.buffer == NULL && + size > SMALL_PIPE_SIZE) { + size = SMALL_PIPE_SIZE; + pipefragretry++; + goto retry; + } + return (ENOMEM); + } + error = vm_map_find_locked(pipe_map, NULL, 0, (vm_offset_t *)&buffer, + size, 0, VMFS_ANY_SPACE, VM_PROT_RW, VM_PROT_RW, 0); + vm_map_unlock(pipe_map); if (error != KERN_SUCCESS) { chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo, -size, 0); if (cpipe->pipe_buffer.buffer == NULL && From nobody Sat Oct 5 07:11:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmV5ysQz5XrYC; Sat, 05 Oct 2024 07:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmV1nGnz4NK0; Sat, 5 Oct 2024 07:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fp+HnmCbfJyjg2EWEPy5kw0l/ZOWDj7MvhxcoYtN2w0=; b=WYGW5pfnMZiU88DXIIT/wG/y4wMWSD8mlv1CqK/xnFsNBcbV36fv3LKmjSTbkHg01J4+nG 4kt+Jlr1AAqqQZfvV85drMdhoJlsT0eUiBMN44jbQdUii1bOUIvbefW2uNvBalO9D8IzyN WkVAqrBQ7g3zys0G7Y3CBpmnGVt5ULPN5UNlMSoUUNOncS27A8Tu6GxiaaxkS0sVpihGvM DmhbMFvX8HLUAqQUrW7sX9kDAmgWrbnJphtgWBoEaV60ZuwM7VuKvp911T28UBOsliu3WZ KHz89x3Gui0eaflyXZGF/I5jEYv+GftZXWXwHkjjWlo3JxY4pax88l/cOBbCjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fp+HnmCbfJyjg2EWEPy5kw0l/ZOWDj7MvhxcoYtN2w0=; b=Z/QsGb97miPtF+7MYp8lTo2E11UNBeMfhCnlBayeVJqdTrKhRdhYpeFjhJLa4QL1eImkqF ZE6dyIaj6FXQT4AVMMHKQEEdh5X4F8YvOuH4CDFuC6ZjxqP50hzi7NWwr57/kEr6H7mKNg +AQO99ur0S1ekg7b/J5sut2jkoEU9AIYr89PoCC8Qp/vICFmy1FMh4WaSO6rcU9v0L8+O0 bt11ZpX50n6vpU3rGYx08QPoidSh5xr24f8MUqp706TyW3Eab+zIsnHyQz/W7UzHJg9TvG CzZ9CCYrWOWYnGzfwJvIFttjPeFWTuHKhDbo+Vn87vm2wSG2zEcNIOWJzwzb5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112282; a=rsa-sha256; cv=none; b=IC5v+7L/sLWLC4wgd8Ky10yj9sw+LHE9YYrV8qn+/m28YcnHcHzkrbMhGYVo4DY/Ylg/FG MODmdYYDmHpBOD+0hA/qTPJUu7s6OhtZYpq/aukFY9tKj116vAyqw/A7xMOAAFlbm8h+7i s0n/Rkt5Ejlb66QQ2wIZ8N6ocQsJaHG6ZLl5nBcnXuj3PbO8Wkb3gYeYjVy/EjwEBhCd/E ER4Fz3YTAdB5YOGzMWdgwm2H0HqSQLsSiCG6uht/EUSrfkhn+ctkRdgFGE0HjJ4tsKVpk6 fYcTRN4iSS0MmFGvKDAywoELpB2u5yOPC1mRJjXunQY6qcWhela1GzCKIHEkUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmT6RQqz17pM; Sat, 5 Oct 2024 07:11:21 +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 4957BLJm001357; Sat, 5 Oct 2024 07:11:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BLgN001354; Sat, 5 Oct 2024 07:11:21 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:21 GMT Message-Id: <202410050711.4957BLgN001354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fc9070bf1d16 - stable/14 - procfs rlimit: handle pipebuf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fc9070bf1d16916de11f69dfc1011284d975040e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fc9070bf1d16916de11f69dfc1011284d975040e commit fc9070bf1d16916de11f69dfc1011284d975040e Author: Konstantin Belousov AuthorDate: 2024-09-20 15:04:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 procfs rlimit: handle pipebuf (cherry picked from commit 2c1963d46335576d29fe21a4e7b424c47b711ef4) --- sys/sys/resource.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 3b582e83d553..0c6b34f7ca0f 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -129,7 +129,7 @@ struct __wrusage { */ #ifdef _RLIMIT_IDENT -static const char *rlimit_ident[RLIM_NLIMITS] = { +static const char *rlimit_ident[] = { "cpu", "fsize", "data", @@ -145,6 +145,7 @@ static const char *rlimit_ident[RLIM_NLIMITS] = { "swap", "kqueues", "umtx", + "pipebuf", }; #endif From nobody Sat Oct 5 07:11:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmW2DDsz5XrPt; Sat, 05 Oct 2024 07:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmW0dR9z4NF1; Sat, 5 Oct 2024 07:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Cl5rPdnxEXBVYzR8PY8Y4iKKW8JiCyfjmNgRHYC9HA=; b=evb896bM6/34NBtfMu7SHq5Q18yTC6GBX7gbGBroyDuq2O/8Hp3lMRm2Shbbpn1Z0Gh4TE SBEQNb0oJo/caeFxYZTd89Vx3+aiMDTtbeVIb/0OdgnT6ehm1Hcv1r6v1aGVh5HLqI51Ju QNMu76djdqeLVgKd3rLswDfPTMKVMXh0q6HEv9BOynT7MhpZmJHS5tDeaZOQp6uNKN/o3W y4BEV+eHNqbrTvW/G7SqjY3LcIEoIs1186aYgObrEbSW7gq5sx/bctLY5DuYOJJ3L+U/Wn zWd3hg+0Br1ikb9Id+MjNqnkvPpllKAAiRCID55YaHX1eYypikgr+vqp0WIEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Cl5rPdnxEXBVYzR8PY8Y4iKKW8JiCyfjmNgRHYC9HA=; b=wuKoW81SkcPNSudF/38BV9JUCvn8LpDMMFCo9NO6RwPnZH5wpDafj1RkwBz5sBA3sxtV9p QXIzYQO3xWnpYH+uBvie8INxV7XLQNA6KqTFlMo2AKYpSRpEBQS2ayAK4zcxWdYyWbicuc jtpZy6mDukBWSolCfhLm2ucb6Bu8p5OVOtx3aQKPVuZOe/2R3APnkq4bLq6VcnNtYzEthK 29Sn22mH3IlsPJJDt0zGIalqe9OyY/krXyAr+oQ0ShsbvJJuyyN6YdwTDMH06K0oD0uNLr rq7iOL1iRLCuP4p0sAfWR4ENJOF0liGCcjqihVPdKkuegjqrelwzRy0594BJng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112283; a=rsa-sha256; cv=none; b=PWJDoKfdLAORIX86YCBi0kRIn9rP8zTRPBgk1COS8XKYAsbtwNLK8rdzTn0NZWlbBcthE1 Twan6TPe8RumqcRiBuTbs1dx0UP8afTjF8QsDz4fGjj6FV16B/K3rBF1tpEkcveUMcjnXe 5ZfECLHZDiScHOx1epeG669nGDLFu/Mb9G8hj+YPvXEkrgB4R9SL83VvM3B/rRPWBizQZU p4ssjCHU/J66pgnS2JSE+BmGUp00+fvrtUs5QZO63uOHeaR6YOCrqJjO1OIMv2sOrZBZZJ +lAWp2RFDFsGcWLmehcxVfmOjQi4toE+TTs54eaoX7WSOH22asWevMm6EHqmXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmW0Fz8z1862; Sat, 5 Oct 2024 07:11: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 4957BMZ6001399; Sat, 5 Oct 2024 07:11:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BM2p001396; Sat, 5 Oct 2024 07:11:22 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:22 GMT Message-Id: <202410050711.4957BM2p001396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e05087ee1c7b - stable/14 - Add proc_nfiles(9) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e05087ee1c7b850a331b8a326c9b21b05cfefa5e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e05087ee1c7b850a331b8a326c9b21b05cfefa5e commit e05087ee1c7b850a331b8a326c9b21b05cfefa5e Author: Konstantin Belousov AuthorDate: 2024-09-20 16:28:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 Add proc_nfiles(9) (cherry picked from commit 9c3e516ad08145ad47248633b54fd1b7fc0ef981) --- sys/kern/kern_descrip.c | 44 +++++++++++++++++++++++++++++++++----------- sys/sys/filedesc.h | 2 ++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 35e9afea4625..9036e3a25ab8 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -4331,21 +4331,13 @@ filedesc_to_leader_share(struct filedesc_to_leader *fdtol, struct filedesc *fdp) } static int -sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) +filedesc_nfiles(struct filedesc *fdp) { NDSLOTTYPE *map; - struct filedesc *fdp; - u_int namelen; int count, off, minoff; - namelen = arg2; - if (namelen != 1) - return (EINVAL); - - if (*(int *)arg1 != 0) - return (EINVAL); - - fdp = curproc->p_fd; + if (fdp == NULL) + return (0); count = 0; FILEDESC_SLOCK(fdp); map = fdp->fd_map; @@ -4353,7 +4345,37 @@ sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) for (minoff = NDSLOT(0); off >= minoff; --off) count += bitcountl(map[off]); FILEDESC_SUNLOCK(fdp); + return (count); +} + +int +proc_nfiles(struct proc *p) +{ + struct filedesc *fdp; + int res; + + PROC_LOCK(p); + fdp = fdhold(p); + PROC_UNLOCK(p); + res = filedesc_nfiles(fdp); + fddrop(fdp); + return (res); +} + +static int +sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) +{ + u_int namelen; + int count; + + namelen = arg2; + if (namelen != 1) + return (EINVAL); + + if (*(int *)arg1 != 0) + return (EINVAL); + count = filedesc_nfiles(curproc->p_fd); return (SYSCTL_OUT(req, &count, sizeof(count))); } diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 06e086fba152..c0fb4e3834e1 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -337,6 +337,8 @@ fd_modified(struct filedesc *fdp, int fd, seqc_t seqc) } #endif +int proc_nfiles(struct proc *p); + /* cdir/rdir/jdir manipulation functions. */ struct pwddesc *pdcopy(struct pwddesc *pdp); void pdescfree(struct thread *td); From nobody Sat Oct 5 07:11:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmY074Mz5XrQ3; Sat, 05 Oct 2024 07:11: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 4XLGmX1W5xz4NVb; Sat, 5 Oct 2024 07:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oic9JqzOrVEb0IAkdeSvIRgRXWLe+FegaWq7hSov1kc=; b=xtQs1kIcJY76f5Aj0USD9fRRWN0HK2WOiThRieERaQa74HgT0aHg/3C4fl6+E9+Tw6Ljg7 mTkl5iuVa4lOSd7/CVTFKoXQdII5Mfe6A9PX8d0ZjYInWLDeRBoRMoi5NzxidUeCzSeZJN Pe3NxGho/RhEwn7U3LU8NnsGV6FQPngWaCD+xludaGjj9JDAATBzGW2vhko5WxpqE1PlxZ R4nAZpL1v0aEYuo+/oSHd+aT6g83o6szJh4J5GLojW7ExvmFhbKED7VgFud8HbMzbQwLtL CQRPDEHlYjkeRLfRiLGJECTzRS00zZsTmxjxXn8W91iJsPa3AqrIdt49U5RlIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oic9JqzOrVEb0IAkdeSvIRgRXWLe+FegaWq7hSov1kc=; b=jf7bdfSfXUi6uyd8MUBYeZAA8MbfnZv3wz+89mSLtioAxJ2Dw4iB2Bn/49b1O1LTatgMKp JJHGOxUQWlBTmsq9678cwmW3U+iaBkSBDSnDsr5wZH6+ggBc3My9aW0Xr1GtvuuN7Ho8L6 bLV28GgttjnKlIv/IVel4Rmw+WSEehyyQiRNEVz+imJT2L61+RVkuRrU0DQDHbeSXYMWOt x/YQxFMORcKswrkgPjl18xnFtDbHQJ3m/bT1PRkc13tFFR7Cs/pDwkwvaqDjKbI7CjC3UL 7fwwA4x71aUfTB4iJpPQpa5zSiFaKVdb9WQazL1N+g1DhDq86WAGB/Jom1QLZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112284; a=rsa-sha256; cv=none; b=J3zndI6lfxYVIGYTaD7ayDGxrzlY7qyPmvoGkWuKu//c3aLkLVMnawrgFmCVOh0flBCeuZ 0IR3CgDEpwQ2g+Sox5x9ZFNzxhM1LoifM8rEFaI3sOkRBOidMJa4yjrVCLP8d59fv9RDlM lgxnp4ze+P8d3BqPtHCi9Oh6+g7EOYTMUR55gdvIXcm3qz79bFRVD5txReHCJ0HwcYcXz4 f/5cEUaE+hKw9FynkS2mz6LYTnfIF8P8uq7qjF0GC+o6SnYbXyyQ40Ya4ezgDM1Wuf6v2A sZzNuqKQlCwEEww9ul82w/7G+tGvxJZhB5Xv3I96yKpL1Eyx6nYAQFVdBEAvwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmX15xfz17j8; Sat, 5 Oct 2024 07:11: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 4957BO9Q001432; Sat, 5 Oct 2024 07:11:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BO82001429; Sat, 5 Oct 2024 07:11:24 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:24 GMT Message-Id: <202410050711.4957BO82001429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7c41d08320a1 - stable/14 - Add getrlimitusage(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7c41d08320a18634a32bba727dc5f9f78086e746 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7c41d08320a18634a32bba727dc5f9f78086e746 commit 7c41d08320a18634a32bba727dc5f9f78086e746 Author: Konstantin Belousov AuthorDate: 2024-09-20 15:18:38 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 Add getrlimitusage(2) (cherry picked from commit f028f44ef3cb10aafadf8b9f29954ed58bd88c70) --- sys/kern/kern_resource.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.master | 7 +++ sys/sys/resource.h | 3 ++ 3 files changed, 125 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 6b9930962859..b4548b38f633 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,7 @@ #include #include #include +#include static MALLOC_DEFINE(M_PLIMIT, "plimit", "plimit structures"); static MALLOC_DEFINE(M_UIDINFO, "uidinfo", "uidinfo structures"); @@ -807,6 +809,119 @@ sys_getrlimit(struct thread *td, struct getrlimit_args *uap) return (error); } +static int +getrlimitusage_one(struct proc *p, u_int which, int flags, rlim_t *res) +{ + struct thread *td; + struct uidinfo *ui; + struct vmspace *vm; + uid_t uid; + int error; + + error = 0; + PROC_LOCK(p); + uid = (flags & GETRLIMITUSAGE_EUID) == 0 ? p->p_ucred->cr_ruid : + p->p_ucred->cr_uid; + PROC_UNLOCK(p); + + ui = uifind(uid); + vm = vmspace_acquire_ref(p); + + switch (which) { + case RLIMIT_CPU: + PROC_LOCK(p); + PROC_STATLOCK(p); + FOREACH_THREAD_IN_PROC(p, td) + ruxagg(p, td); + *res = p->p_rux.rux_runtime; + PROC_STATUNLOCK(p); + PROC_UNLOCK(p); + *res /= cpu_tickrate(); + break; + case RLIMIT_FSIZE: + error = ENXIO; + break; + case RLIMIT_DATA: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_dsize * PAGE_SIZE; + break; + case RLIMIT_STACK: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_ssize * PAGE_SIZE; + break; + case RLIMIT_CORE: + error = ENXIO; + break; + case RLIMIT_RSS: + if (vm == NULL) + error = ENXIO; + else + *res = vmspace_resident_count(vm) * PAGE_SIZE; + break; + case RLIMIT_MEMLOCK: + if (vm == NULL) + error = ENXIO; + else + *res = pmap_wired_count(vmspace_pmap(vm)) * PAGE_SIZE; + break; + case RLIMIT_NPROC: + *res = ui->ui_proccnt; + break; + case RLIMIT_NOFILE: + *res = proc_nfiles(p); + break; + case RLIMIT_SBSIZE: + *res = ui->ui_sbsize; + break; + case RLIMIT_VMEM: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_map.size; + break; + case RLIMIT_NPTS: + *res = ui->ui_ptscnt; + break; + case RLIMIT_SWAP: + *res = ui->ui_vmsize; + break; + case RLIMIT_KQUEUES: + *res = ui->ui_kqcnt; + break; + case RLIMIT_UMTXP: + *res = ui->ui_umtxcnt; + break; + case RLIMIT_PIPEBUF: + *res = ui->ui_pipecnt; + break; + default: + error = EINVAL; + break; + } + + vmspace_free(vm); + uifree(ui); + return (error); +} + +int +sys_getrlimitusage(struct thread *td, struct getrlimitusage_args *uap) +{ + rlim_t res; + int error; + + if ((uap->flags & ~(GETRLIMITUSAGE_EUID)) != 0) + return (EINVAL); + error = getrlimitusage_one(curproc, uap->which, uap->flags, &res); + if (error == 0) + error = copyout(&res, uap->res, sizeof(res)); + return (error); +} + /* * Transform the running time and tick information for children of proc p * into user and system time usage. diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 47b67e4dbaa7..825ab1a4536c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3347,5 +3347,12 @@ uintptr_t idx2 ); } +589 AUE_NULL STD|CAPENABLED { + int getrlimitusage( + u_int which, + int flags, + _Out_ rlim_t *res + ); + } ; vim: syntax=off diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 0c6b34f7ca0f..77119a1e5302 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -173,6 +173,9 @@ struct loadavg { #define CP_IDLE 4 #define CPUSTATES 5 +/* getrlimitusage flags */ +#define GETRLIMITUSAGE_EUID 0x0001 + #endif /* __BSD_VISIBLE */ #ifdef _KERNEL From nobody Sat Oct 5 07:11:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmY64ycz5XrdN; Sat, 05 Oct 2024 07:11: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 4XLGmY3TLdz4NVv; Sat, 5 Oct 2024 07:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3zj1mUZyM7EGdCkntHqWPeFZd74/KbFjh9xVvuaqjM=; b=Z3J1tHUdbpfa9eungijSUHRwY4sUE9nX0/wymb07KNCfPBKRfBjVfXdgnBGE/hIOdJkOOd a6Bhw6/47vm2YT/2mFVOWaabM6ojYxkDrrRsUj7vfgUr0mpXFGV+Y0vJiW2kqRgnR3F0bv R5iIpECTqg/+kw37Agdyu4N2NGfifcN+M6Ls9H9YHgwbnKzwkr6tgZMTtdR4a6V+XxsuWF LoVDsu33UTEmiqirqnN3cQaIqku4rzWz9RyhUwziTxHKE5es+SVRWfovSxn8i/Hi564+XH 9f/exsYi9m//wgblTARiG/JzdzECqNX1K0/j2uJMO46MiCp4cfR0WMGFBdCF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3zj1mUZyM7EGdCkntHqWPeFZd74/KbFjh9xVvuaqjM=; b=G1wjepOwR1IXaILYa8NB7s3tsPHXP4l2Jggvvuw8qKLcfFzV8WR4slva0LDsW2ItdEEOay 2+oqMJe4E+2q6/I+SrCKjxdaWH7BbvaKT42DCVASUySJUVg4WUgPMn7E6ziUs0bU6i8V06 xE6CIgynspGjEccp5Eo1CoADGuhzgvvBOVJDdknZZSIed14t164OcErd8fRXHahmgiWFPH wigLgTm90/YQDBcSnkI2IxA1wdRe/SmvgCpxNfYAhB+tiuPRcL5OIsLAuSQc9CJLVzQ2Ij HltpMsw0sMQT9A4kE+YMWrdeH3x6A3yB6chbt6Tg1b6pzHdi8AYyt25NpKgIdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112285; a=rsa-sha256; cv=none; b=enrWDpSoCRGRsdmlzCqJQSPRDGsFg/ST85iKfu/ZwOIZpSTfc5XPRKgmbkdkD3ew9FJKUV jn5TGA2ZgyJu0HhmUsm589ziMBv35VrjPWNbGNsVfUfLfHbp+Laf1NmVi7eYWupGnNsxai l0QOtCC6gYVigAtDD9ynhnJh1hB3rYo5hopW+bYBZggSQ5xM0H3UqNp+Z867UIvDeBMVFC wN4U1YEnASaNq1GzeJ2ozWemGSi9VHvlDAfiFJXUWa+/m4WdpaSaLxbLTk7Jxup/huMLFu Mf960RsTdqHpxwvbvvWphocqXq78N9vZqeWyNRdo/Hj6DgbDN9n1xi8iWADT7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmY2Lnsz18Hb; Sat, 5 Oct 2024 07:11: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 4957BPYA001472; Sat, 5 Oct 2024 07:11:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BPZt001469; Sat, 5 Oct 2024 07:11:25 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:25 GMT Message-Id: <202410050711.4957BPZt001469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: dac3b7e394fd - stable/14 - Userspace enablement for getrlimitusage(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dac3b7e394fdf98fdea05608e80f2b24f5ba8e9e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dac3b7e394fdf98fdea05608e80f2b24f5ba8e9e commit dac3b7e394fdf98fdea05608e80f2b24f5ba8e9e Author: Konstantin Belousov AuthorDate: 2024-09-20 15:22:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:55 +0000 Userspace enablement for getrlimitusage(2) (cherry picked from commit 9b29fc89ae20a22516f54e146bfdfa0cfcd60b8b) --- lib/libc/sys/Symbol.map | 3 ++- sys/sys/resource.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 6c79f89016d1..d6126fd952fd 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -425,7 +425,8 @@ FBSD_1.7 { }; FBSD_1.8 { - kcmp; + getrlimitusage; + kcmp; }; FBSDprivate_1.0 { diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 77119a1e5302..cb36c505beca 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -192,6 +192,9 @@ int getrlimit(int, struct rlimit *); int getrusage(int, struct rusage *); int setpriority(int, int, int); int setrlimit(int, const struct rlimit *); +#if __BSD_VISIBLE +int getrlimitusage(unsigned which, int flags, rlim_t *res); +#endif __END_DECLS #endif /* _KERNEL */ From nobody Sat Oct 5 07:11:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmb6Dxpz5XrVB; Sat, 05 Oct 2024 07:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmb4R6qz4NQp; Sat, 5 Oct 2024 07:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ciE7+qpZ40fYjwJAkNgfOt1SCq+jOEA1x/G965FyEsk=; b=E718+EVaextippSd+xWNcP8N5b9Xl0tKYQbKoSYXHxFQkRC+gs+89Gsk2OXwWyrHfbXZ9V CHnC1vvmgy4cTxZsxQgMnmXdyiGT5g/a7/YByhVtkoRtHxrpLQ3A/+zqIRv2KgnX7QjKe1 oDUaFY5dEBfFTGCoRI2QBstpA+ZwiOEaG/9xZ+5XgWjieR5n1u4uiDYHARC6kJ+r7ta1KR S/COadMQBL8FMJZUesRiszQV/ipvo0gOfnh8uTlIxawbJI/EHTlqIkgJ4lFI7oYv8dvKZY V73IjKlRj7dmJeLC3NHEmeIKzcxlnC4FBqkiAzq9jbgsesx+sr+0Pg60Kuw7/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ciE7+qpZ40fYjwJAkNgfOt1SCq+jOEA1x/G965FyEsk=; b=lvr/0R+L4NnApM33h1qAa8fIlzGeIkW7qs52sfDGfP8W/nP3h30o3/SsMG+8lZhMsJGKp7 3p3dnu/C74KYmxNyonDJXYYlG/CTQGHyw4zXdwYJMD5tq2teqJFIpJA/sn5GcZPPkageL7 /Bti9NMnmmLr2WSnRN6K2vBdBbLx7SSoNTyapE47MYUiKTRrzcvbbmJ6Uvml129ONMMU/o oZOtWetNPgD2P1GgveDvl+ZNnQesWGqkCjCoFElpOWM9oSUYrTkEtHh84vE4eypoemPpJg x4yL2uqKuOV+7enzZrDXuSK3oyN1bunxx/nn+QMQ+9TaLmf1KJ9SjPYGHnH15g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112287; a=rsa-sha256; cv=none; b=MgolJv/w3TMPm83u92uGSKiXnAw/ZY7kEGYeJwA8m0++arz5wSKw0WjmB6KkRJgvjtshWk FW6IhBi8B9sarMW0KNSlqghNxyxyMhSNzIDBj5gWMb1MJHTJZYI0fXnlUKCuTjKF5bA/pC sm1FqhKIiFtpEi1xt+2ikMjGFk9S4jmK6dtOV2EH/1hsm2y8pJTY4ZfLoMOvAA3Xh5DIhW UfMw6rXcdcizQdQkMtIz0OWz0MgKJ7GpMOuiMdqYD5D0QRH6aeRN2UNTZG51yPyuhy66gD etJS4iwotzHG4On+jhWa9YPFbEcRTFIneeembFpTjwbNFcAK2XXoIc+fwsZm0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmb42vyz17mC; Sat, 5 Oct 2024 07:11:27 +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 4957BRwg001546; Sat, 5 Oct 2024 07:11:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BRMN001543; Sat, 5 Oct 2024 07:11:27 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:27 GMT Message-Id: <202410050711.4957BRMN001543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d9aa256201b8 - stable/14 - sysctl: add KERN_PROC_RLIMIT_USAGE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d9aa256201b8d149907d490029d5a3ea123a3d89 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d9aa256201b8d149907d490029d5a3ea123a3d89 commit d9aa256201b8d149907d490029d5a3ea123a3d89 Author: Konstantin Belousov AuthorDate: 2024-09-22 17:01:56 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 sysctl: add KERN_PROC_RLIMIT_USAGE (cherry picked from commit c85d3064c454bde9f1c0cfbb6f42c0ac9fa229e9) --- sys/kern/kern_resource.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/sysctl.h | 1 + 2 files changed, 51 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index b4548b38f633..9729bf987aa6 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1744,3 +1744,53 @@ chgpipecnt(struct uidinfo *uip, int diff, rlim_t max) return (chglimit(uip, &uip->ui_pipecnt, diff, max, "pipecnt")); } + +static int +sysctl_kern_proc_rlimit_usage(SYSCTL_HANDLER_ARGS) +{ + rlim_t resval[RLIM_NLIMITS]; + struct proc *p; + size_t len; + int error, *name, i; + + name = (int *)arg1; + if ((u_int)arg2 != 1 && (u_int)arg2 != 2) + return (EINVAL); + if (req->newptr != NULL) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_WANTREAD, &p); + if (error != 0) + return (error); + + if ((u_int)arg2 == 1) { + len = sizeof(resval); + memset(resval, 0, sizeof(resval)); + for (i = 0; i < RLIM_NLIMITS; i++) { + error = getrlimitusage_one(p, (unsigned)i, 0, + &resval[i]); + if (error == ENXIO) { + resval[i] = -1; + error = 0; + } else if (error != 0) { + break; + } + } + } else { + len = sizeof(resval[0]); + error = getrlimitusage_one(p, (unsigned)name[1], 0, + &resval[0]); + if (error == ENXIO) { + resval[0] = -1; + error = 0; + } + } + if (error == 0) + error = SYSCTL_OUT(req, resval, len); + PRELE(p); + return (error); +} +static SYSCTL_NODE(_kern_proc, KERN_PROC_RLIMIT_USAGE, rlimit_usage, + CTLFLAG_RD | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + sysctl_kern_proc_rlimit_usage, + "Process limited resources usage info"); diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 0cfa2a7bd245..a446d6701cfa 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1042,6 +1042,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define KERN_PROC_NFDS 43 /* number of open file descriptors */ #define KERN_PROC_SIGFASTBLK 44 /* address of fastsigblk magic word */ #define KERN_PROC_VM_LAYOUT 45 /* virtual address space layout info */ +#define KERN_PROC_RLIMIT_USAGE 46 /* array of rlim_t */ /* * KERN_IPC identifiers From nobody Sat Oct 5 07:11:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmZ73Nzz5XrjS; Sat, 05 Oct 2024 07:11: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 4XLGmZ3nC5z4NS9; Sat, 5 Oct 2024 07:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOSsNA5zMhu5sYrDRpwa50zep3kdLV7YM0zWuR6n5jI=; b=HJsMEww+AePu9+11p2ZfjhdDL2HpeAGFBMLbu3GaiOmSA4AaOvq/y8JSGvADhCl9fUt5Jd AjdpZgUVeOts17ReL7IZNn2NW+Fddjho/3o7Bdy5NZCCqB2JfiMu/+rQRikJL4g6Sx8Q2u up/8HGfJW/Kwu+d54f/DMi2NTBllF9mWpBdUgrG+eSxznCTU9arTHDDHN4RWx6fQx/MI2C gPg667xJhtpKgmAnQjgMmHEr+LmrZUwhh1aFCMCzch5J/XexfG+pjm8aVFRlNk9Ju4mXBq qzyGhClw6kvsh3Rz3Kw0cpmwTmbfG8WFDZs4PKlkfi/wJSP/YeVVRVRo75M33w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOSsNA5zMhu5sYrDRpwa50zep3kdLV7YM0zWuR6n5jI=; b=KT36adeCUdMnxaH9t5xcdQbZBC0J8+dun+Rm5JymJ3XJSsy+sD0AHAzpAknapf7zCBCMbS 2ewz5OLD89YAlwyQkc8NV23L+AUz4DfTbwk1rCPQGTNQn67aX+maZKhmh+t545Mn1X7XTg UJkPMAaNnvLq69IBDRSgCfXjZUP7CRzL1OSsrLzlv8SYvjhAKeyTJWtuu0DSagKAj2p4Xs dh9v/Q2NpY1RNQp/p9vj9tLap0nnxknbtPmuejbbr/XHbnIfHgy59JCgIyh2GXGBI8V6Mt 4FWWoYhkTNHjUcMFB2rkeG1AKo0k72wryePDL3+3g9EtIdiCpQ7n5l2CZR/fig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112286; a=rsa-sha256; cv=none; b=MGnF7OwWPVsrRVyCdvY5N1V4pxP5Jbc3Sf9MnAp1PWOjwLjlvsqcSCboFQrvzUpKUBdOO/ JycwUvaPcb1X+qodfEKQlubs69yqnCb9gFKnN4oeYZCFSuncQ6GfOYV09NFLpf6IDznLaZ RzYzq5T/B0YKBHwBsNN93TbbWt1qw0BkGXI47lZXD1qctgUbdQo+Nh42FM4XbHS1DdmIbF Ax3s5MB2Y7H9byQAAh4yBiMaNBoUM8P70LmafDIrsBRmb/8GKEQz7cUrUzL5+VMAmeuezj zGFOuIIk2Cgb/3IheqTAhrzFzlCKWYlg0njmoNx5DfGPKLXvWqFjNFZiqZxN3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmZ3NdRz17pN; Sat, 5 Oct 2024 07:11: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 4957BQIo001502; Sat, 5 Oct 2024 07:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BQEk001499; Sat, 5 Oct 2024 07:11:26 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:26 GMT Message-Id: <202410050711.4957BQEk001499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a23e9b154d67 - stable/14 - Regen List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a23e9b154d677c20515d5d640d5c8e6dd8628a74 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a23e9b154d677c20515d5d640d5c8e6dd8628a74 commit a23e9b154d677c20515d5d640d5c8e6dd8628a74 Author: Konstantin Belousov AuthorDate: 2024-09-27 15:06:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 Regen --- sys/compat/freebsd32/freebsd32_syscall.h | 3 ++- sys/compat/freebsd32/freebsd32_syscalls.c | 1 + sys/compat/freebsd32/freebsd32_sysent.c | 1 + sys/compat/freebsd32/freebsd32_systrace_args.c | 30 ++++++++++++++++++++++++++ sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 30 ++++++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 7 ++++++ 10 files changed, 77 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 26b47e766d4a..01c1a5c515d8 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -507,4 +507,5 @@ #define FREEBSD32_SYS_freebsd32_timerfd_gettime 586 #define FREEBSD32_SYS_freebsd32_timerfd_settime 587 #define FREEBSD32_SYS_kcmp 588 -#define FREEBSD32_SYS_MAXSYSCALL 589 +#define FREEBSD32_SYS_getrlimitusage 589 +#define FREEBSD32_SYS_MAXSYSCALL 590 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 8511d56552e6..6d50f7c03626 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -594,4 +594,5 @@ const char *freebsd32_syscallnames[] = { "freebsd32_timerfd_gettime", /* 586 = freebsd32_timerfd_gettime */ "freebsd32_timerfd_settime", /* 587 = freebsd32_timerfd_settime */ "kcmp", /* 588 = kcmp */ + "getrlimitusage", /* 589 = getrlimitusage */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index df4ec684ccb1..3d4916427475 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -650,4 +650,5 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_timerfd_gettime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = freebsd32_timerfd_gettime */ { .sy_narg = AS(freebsd32_timerfd_settime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = freebsd32_timerfd_settime */ { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ + { .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 589 = getrlimitusage */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 8bf3c29ecdbd..8f7d9edadfee 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3382,6 +3382,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 5; break; } + /* getrlimitusage */ + case 589: { + struct getrlimitusage_args *p = params; + uarg[a++] = p->which; /* u_int */ + iarg[a++] = p->flags; /* int */ + uarg[a++] = (intptr_t)p->res; /* rlim_t * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9134,6 +9143,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getrlimitusage */ + case 589: + switch (ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland rlim_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -11027,6 +11052,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getrlimitusage */ + case 589: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 319ced33efbd..e740d6ef1b72 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -649,4 +649,5 @@ struct sysent sysent[] = { { .sy_narg = AS(timerfd_gettime_args), .sy_call = (sy_call_t *)sys_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = timerfd_gettime */ { .sy_narg = AS(timerfd_settime_args), .sy_call = (sy_call_t *)sys_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = timerfd_settime */ { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ + { .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 589 = getrlimitusage */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 552d94f0d439..f21cdd66b3cf 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -594,4 +594,5 @@ const char *syscallnames[] = { "timerfd_gettime", /* 586 = timerfd_gettime */ "timerfd_settime", /* 587 = timerfd_settime */ "kcmp", /* 588 = kcmp */ + "getrlimitusage", /* 589 = getrlimitusage */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 33b723ae0c36..dd2f7a43ee78 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3469,6 +3469,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 5; break; } + /* getrlimitusage */ + case 589: { + struct getrlimitusage_args *p = params; + uarg[a++] = p->which; /* u_int */ + iarg[a++] = p->flags; /* int */ + uarg[a++] = (intptr_t)p->res; /* rlim_t * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9279,6 +9288,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getrlimitusage */ + case 589: + switch (ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland rlim_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -11262,6 +11287,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getrlimitusage */ + case 589: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 3cff10924501..2283d5bf9998 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -525,4 +525,5 @@ #define SYS_timerfd_gettime 586 #define SYS_timerfd_settime 587 #define SYS_kcmp 588 -#define SYS_MAXSYSCALL 589 +#define SYS_getrlimitusage 589 +#define SYS_MAXSYSCALL 590 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 98aa9e370d0a..901f81384561 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -430,4 +430,5 @@ MIASM = \ timerfd_create.o \ timerfd_gettime.o \ timerfd_settime.o \ - kcmp.o + kcmp.o \ + getrlimitusage.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index d96acfc47f91..f96d541aa030 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1883,6 +1883,11 @@ struct kcmp_args { char idx1_l_[PADL_(uintptr_t)]; uintptr_t idx1; char idx1_r_[PADR_(uintptr_t)]; char idx2_l_[PADL_(uintptr_t)]; uintptr_t idx2; char idx2_r_[PADR_(uintptr_t)]; }; +struct getrlimitusage_args { + char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char res_l_[PADL_(rlim_t *)]; rlim_t * res; char res_r_[PADR_(rlim_t *)]; +}; int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -2284,6 +2289,7 @@ int sys_timerfd_create(struct thread *, struct timerfd_create_args *); int sys_timerfd_gettime(struct thread *, struct timerfd_gettime_args *); int sys_timerfd_settime(struct thread *, struct timerfd_settime_args *); int sys_kcmp(struct thread *, struct kcmp_args *); +int sys_getrlimitusage(struct thread *, struct getrlimitusage_args *); #ifdef COMPAT_43 @@ -3259,6 +3265,7 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_timerfd_gettime AUE_TIMERFD #define SYS_AUE_timerfd_settime AUE_TIMERFD #define SYS_AUE_kcmp AUE_NULL +#define SYS_AUE_getrlimitusage AUE_NULL #undef PAD_ #undef PADL_ From nobody Sat Oct 5 07:11:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmd1f8Lz5XrpK; Sat, 05 Oct 2024 07:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmc5ZkRz4NYR; Sat, 5 Oct 2024 07:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8e5jfV/JmsrSgp5JUTDRib2RNNazs0ak7qMolin4E=; b=LCmcAniaNTU6c0Nsvm0ihd6TvtWQh9yFmtCrfYbz9gsEE5astvgPDthV+jxOR607EWkFMK BYwQIGiUPleBD4mcOhexyxGaWdnsxoUuyM+05ofMWofmRdEC+6okeD+LhHDwLn5a+R9EX6 e0RkZs/52w5YQZIZZiRaVNj/OHFe8YR9QoIGDPS4JN1++ySCfCqFcGKX+0AoEtln9EtE2r qpelm9iQ937rq7ynsVtBp4YBxu59jmte3gGPS+PWu3MiIaYlrxZ2nmuhJRU8ri0LJ2r8Be dMdOjd7ljybMGndVdP/8iQlKHWhWivYficQ5hzk/6LSqtXDBjjtPWEoB7eFWww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8e5jfV/JmsrSgp5JUTDRib2RNNazs0ak7qMolin4E=; b=ih2hVohF6nSmsmTmrFJPecr4AAZmYD/HqKzbuPx51MUWnhq4vp/RrGXYoT8EgxTuNr2AN2 kQz8G2hie+iEPBRe61jRXU9Dlgc1SHOVli9vRn5ScONvNCdkNwKu1dUV4ZdukciBdvGSFB GbaU07dZnKnPpEnXKsZsH5TTJXrAxeXQ4eHOgd7zZwvkXiLsrawOhjVmIV1eBdvtUN0mTA wmu/zay32YrHEfKoaPIgxqpbudn04sHIuT5U/HcX91iUtRstb03yEmX/KD2SqqNyhG7Ntf rotjA8VfPuyHhXlRCHf0SLURZWtKhc20GKN7xft7tDdb02Z5N46WMg64UiWIVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112288; a=rsa-sha256; cv=none; b=cT9Mxewoyf6xFIgSmnz+fzhJLzxwGD22ZHAWEQfKpPacqQVlaWfEZoHeJLR0aAfmwOGlKn 6vWjoaPt7BjSmfYBA6CU0aY+ccR6c4azEd5Fjg02FpTM2CXvh6PahXRD0IThsIctHM85oH p/VJ5GJPt3Mtzso6m0ywg/hM0l1BUtOMrM7NIVM8bNddMdBX363LfH57PDNXXChZKcf9z8 t2PF23K/cu8WV8EkJ2KIPDjKPJAJI+ypfp9q4GHlBD8yyBUHQmbtPiK1GY9Sb9uoMdbz4g eBf2I/IrEeBmCNROkHXLo/vStS2cNQn9o6EVW5+pA8/mW6Q+tEqVbn3F5W8fLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmc54lLz17jB; Sat, 5 Oct 2024 07:11:28 +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 4957BSjr001592; Sat, 5 Oct 2024 07:11:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BSfr001589; Sat, 5 Oct 2024 07:11:28 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:28 GMT Message-Id: <202410050711.4957BSfr001589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1611738d4c4c - stable/14 - libprocstat: add procstat_getrlimitusage() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1611738d4c4c375ea79a5cc25dd4fa29670ad88c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1611738d4c4c375ea79a5cc25dd4fa29670ad88c commit 1611738d4c4c375ea79a5cc25dd4fa29670ad88c Author: Konstantin Belousov AuthorDate: 2024-09-22 17:19:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 libprocstat: add procstat_getrlimitusage() (cherry picked from commit 6126f4ea646a3c19647c3efdcf672641cff6954b) --- lib/libprocstat/Symbol.map | 5 ++++ lib/libprocstat/libprocstat.c | 53 +++++++++++++++++++++++++++++++++++++++++++ lib/libprocstat/libprocstat.h | 3 +++ 3 files changed, 61 insertions(+) diff --git a/lib/libprocstat/Symbol.map b/lib/libprocstat/Symbol.map index 4c8a0c7edefb..c2ea7e95312c 100644 --- a/lib/libprocstat/Symbol.map +++ b/lib/libprocstat/Symbol.map @@ -47,4 +47,9 @@ FBSD_1.6 { FBSD_1.7 { procstat_getadvlock; procstat_freeadvlock; +}; + +FBSD_1.8 { + procstat_getrlimitusage; + procstat_freerlimitusage; }; \ No newline at end of file diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index c6a225a021a7..fd9578e9f115 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2785,3 +2785,56 @@ procstat_freeadvlock(struct procstat *procstat __unused, free(lst); } +static rlim_t * +procstat_getrlimitusage_sysctl(pid_t pid, unsigned *cntp) +{ + int error, name[4]; + rlim_t *val; + size_t len; + + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_RLIMIT_USAGE; + name[3] = pid; + + len = 0; + error = sysctl(name, nitems(name), NULL, &len, NULL, 0); + if (error == -1) + return (NULL); + val = malloc(len); + if (val == NULL) + return (NULL); + + error = sysctl(name, nitems(name), val, &len, NULL, 0); + if (error == -1) { + free(val); + return (NULL); + } + *cntp = len / sizeof(rlim_t); + return (val); +} + +rlim_t * +procstat_getrlimitusage(struct procstat *procstat, struct kinfo_proc *kp, + unsigned int *cntp) +{ + switch (procstat->type) { + case PROCSTAT_KVM: + warnx("kvm method is not supported"); + return (NULL); + case PROCSTAT_SYSCTL: + return (procstat_getrlimitusage_sysctl(kp->ki_pid, cntp)); + case PROCSTAT_CORE: + warnx("core method is not supported"); + return (NULL); + default: + warnx("unknown access method: %d", procstat->type); + return (NULL); + } +} + +void +procstat_freerlimitusage(struct procstat *procstat __unused, rlim_t *resusage) +{ + free(resusage); +} diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h index 3d30b4db4018..99c005ff24a7 100644 --- a/lib/libprocstat/libprocstat.h +++ b/lib/libprocstat/libprocstat.h @@ -212,6 +212,7 @@ void procstat_freefiles(struct procstat *procstat, struct filestat_list *head); void procstat_freeptlwpinfo(struct procstat *procstat, struct ptrace_lwpinfo *pl); +void procstat_freerlimitusage(struct procstat *procstat, rlim_t *resusage); void procstat_freevmmap(struct procstat *procstat, struct kinfo_vmentry *vmmap); struct advlock_list *procstat_getadvlock(struct procstat *procstat); @@ -251,6 +252,8 @@ int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, char *pathname, size_t maxlen); int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, int which, struct rlimit* rlimit); +rlim_t *procstat_getrlimitusage(struct procstat *procstat, + struct kinfo_proc *kp, unsigned int *cntp); int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, unsigned short* umask); struct kinfo_vmentry *procstat_getvmmap(struct procstat *procstat, From nobody Sat Oct 5 07:11:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmf15gfz5Xrdd; Sat, 05 Oct 2024 07:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmd6GVcz4NNT; Sat, 5 Oct 2024 07:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p8HUh/oGdKCnrC36Y0EWl1I9S39DKSg1ioxPw2/Oh34=; b=oDDUVOFc81SFCaheusiVQMv2Z7YUJQfLT/AFbPKfxa/yJ3W2NiLX+A7SmN7e4Q+9UjUaUK wZ2f0wKBADCZE512+SDa0ilVHK78ijIA29zYnVmoL6wY6CAFIv4AJQ/6RWf+3tb4uILPGv wcJ+r7HNKW0Dz0/4ipRhdSI42jIfh30nMpPK8ChtftjgXJ4sierDhYzrmDVRJ/LfFQG4FS /dhpZqzXL7puyOOz314xYzKCTPpQaaYKTDqNsFGo5sO/ROSlAGSlXKR+AiwnXg9Io8l4jq NNQAFGHnkK0mC/6EJ9+LVA44+e3kEOxMSWbitm+j9zE5z7JSO/xLJMuqW84BQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p8HUh/oGdKCnrC36Y0EWl1I9S39DKSg1ioxPw2/Oh34=; b=dVE3YJJdyB2782F2WC2miEUBhYDWgaQi9jsqOVBVZR504ET5vXoSPhFo189kSZehRjfxKo RFsA8ZbZPaqPLvjGJ7CKxhO9n2B1fe8nBIggKyYnCsjbsCW4Lp4c/6jphnf9qWWkDeOXWb OM5o/TXRRR6DEf6tnzlTQfVQOIBcEnVGIXrlzBEdCrOFGn7hEhXPJCJdTI0M9Gc06cgD2J MFQm2fs4FbzQPl/acIUywdN7TbUhWxdGUrzwBWQ0boBiTPVAeMqKOU9jkHzwn38NXcoVky vWVIHdVBzcKEEzaFn1wgDWdOOdF0dSk61GXSDkLEQRHpleA9YMySjeT54PM8/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112289; a=rsa-sha256; cv=none; b=k2Xf2RTNBmvBbz1ES+aaa6Ju18lJfAqwAiRSmxLfpvb3scg4aReSMq9KmJahh0HYFB1NvD FahVc3aPwi3rKTv2IdnFHmSajK3pWIdk+irkz3i519Jl3F2CclqinMH2sQ/SfTeF0MSe8q QOdKWANs8ibsGt11K6YPT0PE4GXoZPwAGd5WhJcuZ9+7AypplxaftlU2eUndhEvd+PM1zc fZ3BaplbPGKS2EXXMKg3mqsjij3972myPqCSdr3j8swpzWPBGHVSl7XwDJWTwaJOquxM8B X7lTO4C061mUAwvS4PoVCzmQPUd5iPGP0+9dxLr9/7Ddk1KA1Ppjqb5qaPV/qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmd5thwz1866; Sat, 5 Oct 2024 07:11:29 +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 4957BTkQ001634; Sat, 5 Oct 2024 07:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BTS0001631; Sat, 5 Oct 2024 07:11:29 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:29 GMT Message-Id: <202410050711.4957BTS0001631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cc4cee6cc27d - stable/14 - procstat(1): add rlimitusage subcommand List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc4cee6cc27de8e51295c30b8d71d43032b00cf0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cc4cee6cc27de8e51295c30b8d71d43032b00cf0 commit cc4cee6cc27de8e51295c30b8d71d43032b00cf0 Author: Konstantin Belousov AuthorDate: 2024-09-22 17:55:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 procstat(1): add rlimitusage subcommand (cherry picked from commit 5ac9320ddf50702e4fe05c10adc46dcdbd8ed5ee) --- usr.bin/procstat/Makefile | 1 + usr.bin/procstat/procstat.c | 2 + usr.bin/procstat/procstat.h | 2 + usr.bin/procstat/procstat_rlimitusage.c | 76 +++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/usr.bin/procstat/Makefile b/usr.bin/procstat/Makefile index cd62c6a96674..cfd8578c0dbc 100644 --- a/usr.bin/procstat/Makefile +++ b/usr.bin/procstat/Makefile @@ -17,6 +17,7 @@ SRCS= procstat.c \ procstat_ptlwpinfo.c \ procstat_pwdx.c \ procstat_rlimit.c \ + procstat_rlimitusage.c \ procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c index 445ea213ba2a..120a377bc756 100644 --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -116,6 +116,8 @@ static const struct procstat_cmd cmd_table[] = { PS_CMP_NORMAL }, { "rlimit", "rlimit", NULL, &procstat_rlimit, &cmdopt_none, PS_CMP_NORMAL }, + { "rlimitusage", "rlimitusage", NULL, &procstat_rlimitusage, + &cmdopt_none, PS_CMP_NORMAL }, { "rusage", "rusage", "[-Ht]", &procstat_rusage, &cmdopt_rusage, PS_CMP_NORMAL }, { "sigfastblock", "sigfastblock", NULL, &procstat_sigfastblock, diff --git a/usr.bin/procstat/procstat.h b/usr.bin/procstat/procstat.h index 0c138fa88d42..f106fac79127 100644 --- a/usr.bin/procstat/procstat.h +++ b/usr.bin/procstat/procstat.h @@ -65,6 +65,8 @@ void procstat_cs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_env(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_files(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_rlimitusage(struct procstat *procstat, + struct kinfo_proc *kipp); void procstat_pargs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_penv(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_ptlwpinfo(struct procstat *prstat, struct kinfo_proc *kipp); diff --git a/usr.bin/procstat/procstat_rlimitusage.c b/usr.bin/procstat/procstat_rlimitusage.c new file mode 100644 index 000000000000..f589edd23b02 --- /dev/null +++ b/usr.bin/procstat/procstat_rlimitusage.c @@ -0,0 +1,76 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#define _RLIMIT_IDENT +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +static const char ru[] = "resource_usage"; + +void +procstat_rlimitusage(struct procstat *procstat, struct kinfo_proc *kipp) +{ + rlim_t *resuse; + unsigned int cnt, i; + + if ((procstat_opts & PS_OPT_NOHEADER) == 0) + xo_emit("{T:/%7s %12s %4s %18s}\n", + "PID", "RESOURCE", "ID", "USAGE"); + + xo_emit("{ek:process_id/%d}", kipp->ki_pid); + + resuse = procstat_getrlimitusage(procstat, kipp, &cnt); + if (resuse == NULL) + return; + xo_open_list(ru); + for (i = 0; i < cnt; i++) { + xo_open_instance(ru); + xo_emit("{dk:process_id/%7d} ", kipp->ki_pid); + xo_emit("{:resource/%12s} ", i < nitems(rlimit_ident) ? + rlimit_ident[i] : "unknown"); + xo_emit("{:resid/%4d} ", i); + xo_emit("{:usage/%18jd}\n", (intmax_t)resuse[i]); + xo_close_instance(ru); + } + xo_close_list(ru); + procstat_freerlimitusage(procstat, resuse); +} From nobody Sat Oct 5 07:11:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmg2PRRz5Xrjj; Sat, 05 Oct 2024 07:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmg03F3z4NKn; Sat, 5 Oct 2024 07:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxPJgxPAXjvzHebxk0olVyNopZ2UZcKmf1mMGC1/mVk=; b=Xspcq4sYkyG2WPxR3xYoGUeUixnb1IORClR46gQwYHwlZllGnXq1hDqr5zjYWcQjErMzW5 yaGctnGi1QH21JITNR1lezZX+slxs6/8CGtAC+sUAKKyi4Us2keJZntnJ0VbRpmdz2yOf1 Q1wLa+06vkkI71foTzByu6t0j69sKBAPk+JBkVUvefdRcESh8iM974z/YA02W5FevmNUDl dZq1uqA2SuymdMGKFv3EZgZb7n/jYDNPeQDeEthv8zQ1AN9bEJTheFtSKiIf+Ir8X0KK8k OFgugZBfYU8WQNVWCJhjoG2WAlbWutu9YaZQFYyVHjfMKQPsfJFWlQDNrR73vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sxPJgxPAXjvzHebxk0olVyNopZ2UZcKmf1mMGC1/mVk=; b=GDe/XHmTJoiNdkuEqX4pR1Z0FSsnidGJS5IqsQfkraeKDJQ63Pg0j/5PAjr7o7d5luZi9g rfF3W2H0Xirq3E4SP0Pfcy9kvhyyIx3SCIA3gmoT1Iu9ka0iuhiFmvQ+J9JMuVZUXIAxPO 7v15skuqBCZ/hVSRC7ZPx0afolkiLK3Xwvdd+aM0VXfUM/oiUogrRMvfdkIqfok/qALgnk v0EZmR+8YlvA77Gua62ay1F99Dn9tFR6jzuyWzDNP53d0CguvgOS8h+ES30BANpgn1a9ig oPMcam3aUG6yA+IA+TuvIe0vQJjCRo4y8w6wL/p7qe4HHRr3wRWwtKpnhD1msA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112291; a=rsa-sha256; cv=none; b=Jimz9CXgGcSSm/eA5rYLq96JStIcD0miVM6F4z0KPR2BPIen+PWM6NmeAXAB+vgOMxlomK yW5oyPBgKWj2Esk37O6WnhDMBut6BwIs1tN29KXkQ4XZ9ObERZY/bRAviGO9OfzYLDoWCW MiNeNBIVsdl1pNiXdqGBoZgrF9Yem+d4VE/IQGgf1JtndHXiFQxmytW4VLSTMvnSxZAuX2 7MYRXicQvE9BMBqk7KUuz4u3nhaYYiR4kbFICmxYVa6rGs1tp/uM+PwZ3WocMMy24sQNgg UGlpcAjZatuWZ9cvux/r3DWm0+HzaApjDJNOswWDe01UMjvrnPRW2TU79ZZNtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmf6Xmkz17jC; Sat, 5 Oct 2024 07:11: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 4957BUVg001689; Sat, 5 Oct 2024 07:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BUuf001687; Sat, 5 Oct 2024 07:11:30 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:30 GMT Message-Id: <202410050711.4957BUuf001687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b0f2d76837dd - stable/14 - intel_idpgtbl.c: rename domain_* functions to dmar_* List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0f2d76837dd2a161721e9141885bca258e604ac Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f2d76837dd2a161721e9141885bca258e604ac commit b0f2d76837dd2a161721e9141885bca258e604ac Author: Konstantin Belousov AuthorDate: 2024-09-25 01:38:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 intel_idpgtbl.c: rename domain_* functions to dmar_* (cherry picked from commit 10ebd230f4d9ed5c6406037972776666a2241107) --- sys/x86/iommu/intel_ctx.c | 6 ++-- sys/x86/iommu/intel_dmar.h | 6 ++-- sys/x86/iommu/intel_idpgtbl.c | 66 +++++++++++++++++++++---------------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 9d2d607d11a6..ade3f61328d7 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -400,7 +400,7 @@ dmar_domain_alloc(struct dmar_unit *dmar, bool id_mapped) if (id_mapped) { if ((dmar->hw_ecap & DMAR_ECAP_PT) == 0) { - domain->pgtbl_obj = domain_get_idmap_pgtbl(domain, + domain->pgtbl_obj = dmar_get_idmap_pgtbl(domain, domain->iodom.end); } domain->iodom.flags |= IOMMU_DOMAIN_IDMAP; @@ -865,7 +865,7 @@ dmar_domain_unload_entry(struct iommu_map_entry *entry, bool free, iommu_domain_free_entry(entry, false); } } else { - domain_flush_iotlb_sync(domain, entry->start, entry->end - + dmar_flush_iotlb_sync(domain, entry->start, entry->end - entry->start); iommu_domain_free_entry(entry, free); } @@ -900,7 +900,7 @@ dmar_domain_unload(struct iommu_domain *iodom, entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", domain, error)); if (!unit->qi_enabled) { - domain_flush_iotlb_sync(domain, entry->start, + dmar_flush_iotlb_sync(domain, entry->start, entry->end - entry->start); TAILQ_REMOVE(entries, entry, dmamap_link); iommu_domain_free_entry(entry, true); diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index 188e40dec36c..fcdc915abcfd 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -219,10 +219,10 @@ void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit); void dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt); -vm_object_t domain_get_idmap_pgtbl(struct dmar_domain *domain, +vm_object_t dmar_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr); -void put_idmap_pgtbl(vm_object_t obj); -void domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, +void dmar_put_idmap_pgtbl(vm_object_t obj); +void dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size); int dmar_domain_alloc_pgtbl(struct dmar_domain *domain); void dmar_domain_free_pgtbl(struct dmar_domain *domain); diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 21b717f54f34..538d09649377 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -68,7 +68,7 @@ #include #include -static int domain_unmap_buf_locked(struct dmar_domain *domain, +static int dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags); /* @@ -107,7 +107,7 @@ static MALLOC_DEFINE(M_DMAR_IDPGTBL, "dmar_idpgtbl", * mapped by the page table page. */ static void -domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, +dmar_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, iommu_gaddr_t addr) { vm_page_t m1; @@ -126,7 +126,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, pg_sz = pglvl_page_size(tbl->pglvl, lvl); if (lvl != tbl->leaf) { for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) - domain_idmap_nextlvl(tbl, lvl + 1, base + i, f); + dmar_idmap_nextlvl(tbl, lvl + 1, base + i, f); } VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); pte = iommu_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); @@ -148,7 +148,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, VM_PAGE_TO_PHYS(m1)) | DMAR_PTE_R | DMAR_PTE_W; } } - /* domain_get_idmap_pgtbl flushes CPU cache if needed. */ + /* dmar_get_idmap_pgtbl flushes CPU cache if needed. */ iommu_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -162,7 +162,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, * maxaddr is typically mapped. */ vm_object_t -domain_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) +dmar_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) { struct dmar_unit *unit; struct idpgtbl *tbl; @@ -232,7 +232,7 @@ domain_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) tbl->pgtbl_obj = vm_pager_allocate(OBJT_PHYS, NULL, IDX_TO_OFF(pglvl_max_pages(tbl->pglvl)), 0, 0, NULL); VM_OBJECT_WLOCK(tbl->pgtbl_obj); - domain_idmap_nextlvl(tbl, 0, 0, 0); + dmar_idmap_nextlvl(tbl, 0, 0, 0); VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); LIST_INSERT_HEAD(&idpgtbls, tbl, link); res = tbl->pgtbl_obj; @@ -274,7 +274,7 @@ end: * Return a reference to the identity mapping page table to the cache. */ void -put_idmap_pgtbl(vm_object_t obj) +dmar_put_idmap_pgtbl(vm_object_t obj) { struct idpgtbl *tbl, *tbl1; vm_object_t rmobj; @@ -318,7 +318,7 @@ put_idmap_pgtbl(vm_object_t obj) */ static iommu_pte_t * -domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, +dmar_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf) { vm_page_t m; @@ -361,7 +361,7 @@ retry: vm_page_wire(m); sfp = NULL; - ptep = domain_pgtbl_map_pte(domain, base, lvl - 1, + ptep = dmar_pgtbl_map_pte(domain, base, lvl - 1, flags, &idx1, &sfp); if (ptep == NULL) { KASSERT(m->pindex != 0, @@ -386,7 +386,7 @@ retry: } static int -domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) { iommu_pte_t *pte; @@ -440,13 +440,13 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, ("mapping loop overflow %p %jx %jx %jx", domain, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl)); - pte = domain_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); + pte = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); if (pte == NULL) { KASSERT((flags & IOMMU_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", domain)); if (sf != NULL) iommu_unmap_pgtbl(sf); - domain_unmap_buf_locked(domain, base1, base - base1, + dmar_unmap_buf_locked(domain, base1, base - base1, flags); TD_PINNED_ASSERT; return (ENOMEM); @@ -463,7 +463,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, +dmar_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) { struct dmar_domain *domain; @@ -514,13 +514,13 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, KASSERT((flags & ~IOMMU_PGF_WAITOK) == 0, ("invalid flags %x", flags)); DMAR_DOMAIN_PGLOCK(domain); - error = domain_map_buf_locked(domain, base, size, ma, pflags, flags); + error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags); DMAR_DOMAIN_PGUNLOCK(domain); if (error != 0) return (error); if ((unit->hw_cap & DMAR_CAP_CM) != 0) - domain_flush_iotlb_sync(domain, base, size); + dmar_flush_iotlb_sync(domain, base, size); else if ((unit->hw_cap & DMAR_CAP_RWBF) != 0) { /* See 11.1 Write Buffer Flushing. */ DMAR_LOCK(unit); @@ -530,12 +530,12 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, return (0); } -static void domain_unmap_clear_pte(struct dmar_domain *domain, +static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_fs); static void -domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags) { struct sf_buf *sf; @@ -543,12 +543,12 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, vm_pindex_t idx; sf = NULL; - pde = domain_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); - domain_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); + pde = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); + dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); } static void -domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, +dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) { vm_page_t m; @@ -569,14 +569,14 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); - domain_free_pgtbl_pde(domain, base, lvl - 1, flags); + dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); } /* * Assumes that the unmap is never partial. */ static int -domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { iommu_pte_t *pte; @@ -620,14 +620,14 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, pg_sz = domain_page_size(domain, lvl); if (pg_sz > size) continue; - pte = domain_pgtbl_map_pte(domain, base, lvl, flags, + pte = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); KASSERT(pte != NULL, ("sleeping or page missed %p %jx %d 0x%x", domain, (uintmax_t)base, lvl, flags)); if ((pte->pte & DMAR_PTE_SP) != 0 || lvl == domain->pglvl - 1) { - domain_unmap_clear_pte(domain, base, lvl, + dmar_unmap_clear_pte(domain, base, lvl, flags, pte, &sf, false); break; } @@ -648,7 +648,7 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, +dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { struct dmar_domain *domain; @@ -657,7 +657,7 @@ domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, domain = IODOM2DOM(iodom); DMAR_DOMAIN_PGLOCK(domain); - error = domain_unmap_buf_locked(domain, base, size, flags); + error = dmar_unmap_buf_locked(domain, base, size, flags); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } @@ -701,7 +701,7 @@ dmar_domain_free_pgtbl(struct dmar_domain *domain) domain->pgtbl_obj = NULL; if ((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0) { - put_idmap_pgtbl(obj); + dmar_put_idmap_pgtbl(obj); domain->iodom.flags &= ~IOMMU_DOMAIN_IDMAP; return; } @@ -717,7 +717,7 @@ dmar_domain_free_pgtbl(struct dmar_domain *domain) } static inline uint64_t -domain_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) +dmar_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) { uint64_t iotlbr; @@ -733,7 +733,7 @@ domain_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) } void -domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size) { struct dmar_unit *unit; @@ -747,7 +747,7 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iro = DMAR_ECAP_IRO(unit->hw_ecap) * 16; DMAR_LOCK(unit); if ((unit->hw_cap & DMAR_CAP_PSI) == 0 || size > 2 * 1024 * 1024) { - iotlbr = domain_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_DOM | + iotlbr = dmar_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_DOM | DMAR_IOTLB_DID(domain->domain), iro); KASSERT((iotlbr & DMAR_IOTLB_IAIG_MASK) != DMAR_IOTLB_IAIG_INVLD, @@ -757,7 +757,7 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, for (; size > 0; base += isize, size -= isize) { am = calc_am(unit, base, size, &isize); dmar_write8(unit, iro, base | am); - iotlbr = domain_wait_iotlb_flush(unit, + iotlbr = dmar_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_PAGE | DMAR_IOTLB_DID(domain->domain), iro); KASSERT((iotlbr & DMAR_IOTLB_IAIG_MASK) != @@ -779,6 +779,6 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, } const struct iommu_domain_map_ops dmar_domain_map_ops = { - .map = domain_map_buf, - .unmap = domain_unmap_buf, + .map = dmar_map_buf, + .unmap = dmar_unmap_buf, }; From nobody Sat Oct 5 07:11:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmh4FgVz5Xrmc; Sat, 05 Oct 2024 07:11: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 4XLGmh1KFtz4Nc0; Sat, 5 Oct 2024 07:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfwAle2T8qzdPiA5g8VKAIkWHrGSWbS5dSKClPLI0mw=; b=yY94mnmQm2cZQ4oAmfIPZWqHxzfxXeDm5l1uJZ74JYpam3KDIcPqg5mqj8KQLpfMNcDiCg uDvEeLHhsDiFOZwg3ygDNs02P1ErJ2LjMRUAGHnJ45dSGZsBHvIclOBDaTJ21kePmBmvxl eWCCnFh+XWJLtdJbKEvhGTnmiuCQQ0ZHzaVSsRkFADX3Z5mtm3p6Rh4fXYKTzi1tS3jlMb yEDerMwIGL1W8JbHarPLsrF8kxUoInbuSOuFdVLHqX06H46ySch4QWH5E2jpFqCRF49nxr MZmmDI0ku5vc+CuTIPO2xhGtePkoRn6KxWQtU0BSDiltVHwfLG8x2+eLi90HMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfwAle2T8qzdPiA5g8VKAIkWHrGSWbS5dSKClPLI0mw=; b=fvIaCwiyRYDMw6m3uNGIpe1ullxY3nhlYQJ1KC+BwL1/swbhLp62b2P9u827idNh0YzaJt yqpa8cmtOAYwc2egJCB7Gzf9lau6R7cWtutsuTMbi0frW23aA0nBy4be+mdU8xYRyuQl/s 6ilFgI8G/6PkjRQY2T6p7L5hgkT6su/LW7ETi4SBWVSKOkmUdOVPqZTU9z+r9nM5cQmyCM UFyqCzoq86NEsr7r13BDbXFJdtXiJHMYybbR2jCMNpyhMy0oCoY/r3Zpz15u0bm4GB9qjc 1IGkTplmLhXuVM8xmOKQiIdLmXJCe4VBOOV9cxx3q3qMxrvGVr9wI7iQ/y1vTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112292; a=rsa-sha256; cv=none; b=eXjJ13X87xIu5U4ZbCdC6BBtpykutjOylHQOrxXOhpkmhQWxFZtYQna9PNv0sV2OHQJmzb KH7uCP4OZ61eX8Jgilur8T3/c2/fdNTHJm0WFpO6W/xXi9sQ6oQwLMzGy46v7xyGq+QG2B xP5O7UVNNMFALvVS4UHgTUxB0fUEwRPWU2Zd6xNgn6O/RD3L2HX14Hd/wbN2b6TNr4QoCn cO6SaYnGmm8k2WXg/iZIAP5rtrNRp0YaeBnnyRXrMkHV4FSXF8VA6jqLwLrV8m6kdfJtXn uEbHL4HPWtcHpJgS8jEIMU8WDrwC4387CE8aQUo2rAfW4cs6PMeMpoBVpSLiWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmh0Y8lz17mF; Sat, 5 Oct 2024 07:11: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 4957BV4s001752; Sat, 5 Oct 2024 07:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BVVH001749; Sat, 5 Oct 2024 07:11:31 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:31 GMT Message-Id: <202410050711.4957BVVH001749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5e70f9aa9eec - stable/14 - iommu: add per-unit sysctls reporting the state of DMA and interrupt remapping List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e70f9aa9eecc1f7ad177575720281af8b8747d6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5e70f9aa9eecc1f7ad177575720281af8b8747d6 commit 5e70f9aa9eecc1f7ad177575720281af8b8747d6 Author: Konstantin Belousov AuthorDate: 2024-09-27 01:17:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 iommu: add per-unit sysctls reporting the state of DMA and interrupt remapping (cherry picked from commit d50403a6919a641abfb0da4d60eb58ce42302de5) --- sys/arm64/iommu/iommu.c | 2 ++ sys/dev/iommu/busdma_iommu.c | 4 ++++ sys/dev/iommu/iommu.h | 1 + sys/x86/iommu/intel_drv.c | 2 ++ sys/x86/iommu/intel_intrmap.c | 5 ++++- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index d876d443ffa0..cdff7cdf4ae2 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -456,6 +456,7 @@ iommu_register(struct iommu_unit *iommu) LIST_INSERT_HEAD(&iommu_list, entry, next); IOMMU_LIST_UNLOCK(); + sysctl_ctx_init(&iommu->sysctl_ctx); iommu_init_busdma(iommu); return (0); @@ -476,6 +477,7 @@ iommu_unregister(struct iommu_unit *iommu) IOMMU_LIST_UNLOCK(); iommu_fini_busdma(iommu); + sysctl_ctx_free(&iommu->sysctl_ctx); mtx_destroy(&iommu->lock); diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index 0d86ff0d4468..f3b58306d6af 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -974,6 +974,10 @@ iommu_init_busdma(struct iommu_unit *unit) error = TUNABLE_INT_FETCH("hw.iommu.dma", &unit->dma_enabled); if (error == 0) /* compatibility */ TUNABLE_INT_FETCH("hw.dmar.dma", &unit->dma_enabled); + SYSCTL_ADD_INT(&unit->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(unit->dev)), + OID_AUTO, "dma", CTLFLAG_RD, &unit->dma_enabled, 0, + "DMA ops enabled"); TAILQ_INIT(&unit->delayed_maps); TASK_INIT(&unit->dmamap_load_task, 0, iommu_bus_task_dmamap, unit); unit->delayed_taskqueue = taskqueue_create("iommu", M_WAITOK, diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 9845b09e8732..957d4e14e8e2 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -67,6 +67,7 @@ struct iommu_unit { struct mtx lock; device_t dev; int unit; + struct sysctl_ctx_list sysctl_ctx; int dma_enabled; diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 05fb49538add..cc16759ebe34 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -256,6 +256,7 @@ dmar_release_resources(device_t dev, struct dmar_unit *unit) vm_object_deallocate(unit->ctx_obj); unit->ctx_obj = NULL; } + sysctl_ctx_free(&unit->iommu.sysctl_ctx); } #ifdef DEV_APIC @@ -337,6 +338,7 @@ dmar_attach(device_t dev) unit = device_get_softc(dev); unit->iommu.unit = device_get_unit(dev); unit->iommu.dev = dev; + sysctl_ctx_init(&unit->iommu.sysctl_ctx); dmaru = dmar_find_by_index(unit->iommu.unit); if (dmaru == NULL) return (EINVAL); diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index d2f8f8df4691..122b92827b77 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -326,7 +326,10 @@ clp2(u_int v) int dmar_init_irt(struct dmar_unit *unit) { - + SYSCTL_ADD_INT(&unit->iommu.sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(unit->iommu.dev)), + OID_AUTO, "ir", CTLFLAG_RD, &unit->ir_enabled, 0, + "Interrupt remapping ops enabled"); if ((unit->hw_ecap & DMAR_ECAP_IR) == 0) return (0); unit->ir_enabled = 1; From nobody Sat Oct 5 07:11:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmj48Yhz5Xrjp; Sat, 05 Oct 2024 07:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmj2Xgwz4NWn; Sat, 5 Oct 2024 07:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzFgqae46VxOIBJpNV3k3xycuEuj3rbfubgFIIlRk3k=; b=mnks2xRWlZ08jI26O5pXbomsI+fgiM6WPz3icrC4DAvny50JsFRU1Dh2KmhKe9v+5Xb8qa L2VbAFvdJFH5PLsDNRTO/yv8QhE5U+ojodu6E4gx5M8NC7fKLGNVJZJKClr3Lsauvcn+ye K1ch89ZyT8VPJ2Pfo/aULna0rZ5EifPaHNep78Mxg753XgvrZa/FpNNOXZbskHb5CyVXN1 b9bNUlSmqrvcRes32jdgRkm/3MN8gQwt4osZQTlQAUpGNxOLHkcLoXuzMOXiFilFDQTVSF u0XKcT40EbOkwn9VNm1Gh5YILmzoXXe3921rV6W1hZtJl3NlvY6jOKSzbYfl4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzFgqae46VxOIBJpNV3k3xycuEuj3rbfubgFIIlRk3k=; b=vUvTJic8HQCwMhvJA+DffMc7sizLgbIXuegLWEodtNaLgxk0tTwQhqmIjItxImfNBC6hAb TfxzUEq3X2nAyeQADHvlxSE8upj25388oJHotTmiVGmvKBRbKgQC7U1omGIB0F5U2ob1Cc 5+UNWgPMDwBiXte3tn/Kpyxg7jFpq0KYV7GftJQiTnMjK50WEmmQg5mvNXf27UlJ4lrOHS vrYb0RwTqcBbyFzLk88f8LWuIzMcRtue6VBfrjcFMVHo5TJ1YhJa646eod0JRfX8ohMMen g728rT66CVjOPk6/6PN0B5wkP96UcbvSfQ8uICZAd8IRACJjBg5h113jF0ySIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112293; a=rsa-sha256; cv=none; b=lIbLrw+YO87XjjGXrhLShFemYkVHDYYsENLhtN91IEl9qOsAvdCAmwWjtHwQVx2Kdv4f2z rO6hgxTgvu2uduGmw0JaZCoDbFxYeJFm+iou0yPX3RaTHZN/EqtpxK8bibz1Nvy8wKxlwl 5WHtOgKWstnULsNyZFy6QpC6/k+gF2VATW9xkrTzrkbr7BzXJCVtGb1tycFwoj65pw/E9d LTtxpvafKk+/qefd3kz/qJpAqXnsEgx4UDJ5kZuoot6I0rPWWZd8DbR8gQEs1Q6RpTPNPd Rw3hDD599W7H0lhQTO7JIIsPhqt4WwE1i/AyMYIfBlwbEJ9+Z6EH2IUPcVdKAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmj1Twcz183p; Sat, 5 Oct 2024 07:11: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 4957BX5S001804; Sat, 5 Oct 2024 07:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BXDP001801; Sat, 5 Oct 2024 07:11:33 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:33 GMT Message-Id: <202410050711.4957BXDP001801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a5943b6e503d - stable/14 - iommu: change iommu_domain_map_ops to take iommu_map_entry List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a5943b6e503df1b75436f85ca7efa7e94c631a24 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a5943b6e503df1b75436f85ca7efa7e94c631a24 commit a5943b6e503df1b75436f85ca7efa7e94c631a24 Author: Konstantin Belousov AuthorDate: 2024-09-25 01:47:54 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 iommu: change iommu_domain_map_ops to take iommu_map_entry (cherry picked from commit bdd5eb33cacdbf174980b999c77847d0903fc12e) --- sys/arm64/iommu/iommu.c | 25 +++++++++++-------------- sys/dev/iommu/iommu.h | 8 ++++---- sys/dev/iommu/iommu_gas.c | 12 +++++------- sys/x86/iommu/intel_ctx.c | 4 ++-- sys/x86/iommu/intel_idpgtbl.c | 15 ++++++++++----- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index cdff7cdf4ae2..eb682a4a623f 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -81,22 +81,21 @@ struct iommu_entry { static LIST_HEAD(, iommu_entry) iommu_list = LIST_HEAD_INITIALIZER(iommu_list); static int -iommu_domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) +iommu_domain_unmap_buf(struct iommu_domain *iodom, + struct iommu_map_entry *entry, int flags) { struct iommu_unit *iommu; int error; iommu = iodom->iommu; - - error = IOMMU_UNMAP(iommu->dev, iodom, base, size); - + error = IOMMU_UNMAP(iommu->dev, iodom, entry->start, entry->end - + entry->start); return (error); } static int -iommu_domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) +iommu_domain_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t eflags, int flags) { struct iommu_unit *iommu; vm_prot_t prot; @@ -111,12 +110,10 @@ iommu_domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, if (eflags & IOMMU_MAP_ENTRY_WRITE) prot |= VM_PROT_WRITE; - va = base; - + va = entry->start; iommu = iodom->iommu; - - error = IOMMU_MAP(iommu->dev, iodom, va, ma, size, prot); - + error = IOMMU_MAP(iommu->dev, iodom, va, ma, entry->end - + entry->start, prot); return (error); } @@ -429,8 +426,8 @@ iommu_domain_unload(struct iommu_domain *iodom, TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0, ("not mapped entry %p %p", iodom, entry)); - error = iodom->ops->unmap(iodom, entry->start, entry->end - - entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); + error = iodom->ops->unmap(iodom, entry, + cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", iodom, error)); TAILQ_REMOVE(entries, entry, dmamap_link); iommu_domain_free_entry(entry, true); diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 957d4e14e8e2..84d8c3680b71 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -86,10 +86,10 @@ struct iommu_unit { }; struct iommu_domain_map_ops { - int (*map)(struct iommu_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags); - int (*unmap)(struct iommu_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, int flags); + int (*map)(struct iommu_domain *domain, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t pflags, int flags); + int (*unmap)(struct iommu_domain *domain, struct iommu_map_entry *entry, + int flags); }; /* diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 4b6141b981da..26ac38da3c4f 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -826,8 +826,7 @@ iommu_gas_map(struct iommu_domain *domain, entry->flags |= eflags; IOMMU_DOMAIN_UNLOCK(domain); - error = domain->ops->map(domain, entry->start, - entry->end - entry->start, ma, eflags, + error = domain->ops->map(domain, entry, ma, eflags, ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); if (error == ENOMEM) { iommu_domain_unload_entry(entry, true, @@ -868,9 +867,9 @@ iommu_gas_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry, if (entry->end == entry->start) return (0); - error = domain->ops->map(domain, entry->start, - entry->end - entry->start, ma + OFF_TO_IDX(start - entry->start), - eflags, ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); + error = domain->ops->map(domain, entry, + ma + OFF_TO_IDX(start - entry->start), eflags, + ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); if (error == ENOMEM) { iommu_domain_unload_entry(entry, false, (flags & IOMMU_MF_CANWAIT) != 0); @@ -979,8 +978,7 @@ iommu_unmap_msi(struct iommu_ctx *ctx) if (entry == NULL) return; - domain->ops->unmap(domain, entry->start, entry->end - - entry->start, IOMMU_PGF_WAITOK); + domain->ops->unmap(domain, entry, IOMMU_PGF_WAITOK); iommu_gas_free_space(entry); diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index ade3f61328d7..bdb5f8740bf2 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -896,8 +896,8 @@ dmar_domain_unload(struct iommu_domain *iodom, TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0, ("not mapped entry %p %p", domain, entry)); - error = iodom->ops->unmap(iodom, entry->start, entry->end - - entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); + error = iodom->ops->unmap(iodom, entry, + cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", domain, error)); if (!unit->qi_enabled) { dmar_flush_iotlb_sync(domain, entry->start, diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 538d09649377..a949e38cc9b1 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -463,14 +463,18 @@ dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -dmar_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) +dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t eflags, int flags) { struct dmar_domain *domain; struct dmar_unit *unit; + iommu_gaddr_t base, size; uint64_t pflags; int error; + base = entry->start; + size = entry->end - entry->start; + pflags = ((eflags & IOMMU_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & IOMMU_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & IOMMU_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) | @@ -648,8 +652,8 @@ dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) +dmar_unmap_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + int flags) { struct dmar_domain *domain; int error; @@ -657,7 +661,8 @@ dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, domain = IODOM2DOM(iodom); DMAR_DOMAIN_PGLOCK(domain); - error = dmar_unmap_buf_locked(domain, base, size, flags); + error = dmar_unmap_buf_locked(domain, entry->start, entry->end - + entry->start, flags); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } From nobody Sat Oct 5 07:11:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGml6kDzz5XrVX; Sat, 05 Oct 2024 07:11: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 4XLGml38BQz4NZd; Sat, 5 Oct 2024 07:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I4M26U1c4xyYVcwBUCu9OyaJMiW0X6nmQRTdnXmoL/c=; b=IK0E56271XO7vx+VY0wSNQmZWUbPeXVIRJGB/dwaIxO2z2gMJa6ogGmIAbC8sD2kZWM2q5 HOaB6VIOA1/nkR0TrPNPoBTFRt/y+v6/iynnRM39KNAl7d0tJt4kJZbSUdWC5gJw/6nuWU +VDG+AzwT0+rKLTEeNgCM1Zb3EA1EJ7v7wEz2R5ca5QO+ThTOvItZJlXH24sUIjqC4btZy q5vQp9M0PhVskbIluV726d7YnLgfum74fEuDrc7insOmilnyxY+BD2wnvU/KYVOyj/LOMC /TfR9dPAUUp/PGeLDCr64QhFFThr5+kHNHP+2QdtXB1CtGEbSqz5mmzxZZE8mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I4M26U1c4xyYVcwBUCu9OyaJMiW0X6nmQRTdnXmoL/c=; b=C+WReJTcsm6zso0jvFw+8lUwCNVeK12XW6ofUE/6idbfNBhjBXSpxlv90yIX20MIl2KXEh ZNkTwLBQC6kR0zLkRa3hDi5MdiFg9RHqgHoxehN+OlcU7t3dODP4y4mrPE+B0dOaNBJIHK hn53JW5SZNXXcxJaDargKqPaaYqHsvzOuGWWaV1lsqD+ctu1Craa5IiCfu1RFF2hqsKUbN nVujcRtbl2a0WJ+MDnNGMPFP70EpMObzOhj3Q+w2A1CqIm1nhXlu8pIl/ZfR6alJnbE9aW gs7dGlvjg7LKz0QUttzx6ovph4D5Igg/aW9rLXnPkBNKWwQqTrYtaDHxpRoNGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112295; a=rsa-sha256; cv=none; b=UtgU9SPKfnHKTLpjTAimq+/v5ImDyF/hW0j0A6WJAEDpmOAi0VEFsJi/ywv/pD8YUNNdcH eOkeVK7A25YrlaSuROOOd5HTcdMmu2dgWQqWoc5PuwHF5gT0XRvcbcZbVfzPbftLU6lXOt 03qWcfs0QdGQ+T77Xkex7Qi3vB7kyFLEmgXhoDh1HirvMbAe3ZVQiHd5kXO41TbmodbSG2 Fk8k7rlspcJjVI1iqwJWYr4GHCsDYjHwzCLSMeAFqEWaa9Ai7tH0tjYHIs1ODmCZDrwdTB 1PriHyH7qvWApXCzd86q9E9i1Oko6LtMIrUOvfF2SljnLw/wc/vz1OFhIpnM5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGml2mXsz17pP; Sat, 5 Oct 2024 07:11: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 4957BZxm001929; Sat, 5 Oct 2024 07:11:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BZah001926; Sat, 5 Oct 2024 07:11:35 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:35 GMT Message-Id: <202410050711.4957BZah001926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0c7e13cfe204 - stable/14 - iommu: extend iommu_map_entry to store the list of associated freed page table pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c7e13cfe2045fb17a0583d0a2a1f685225bf7d5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7e13cfe2045fb17a0583d0a2a1f685225bf7d5 commit 0c7e13cfe2045fb17a0583d0a2a1f685225bf7d5 Author: Konstantin Belousov AuthorDate: 2024-09-25 01:50:34 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 iommu: extend iommu_map_entry to store the list of associated freed page table pages (cherry picked from commit f713ed6694d949ec37365533afbb47c04f919572) --- sys/dev/iommu/iommu.h | 3 +++ sys/dev/iommu/iommu_gas.c | 14 +++++++++++--- sys/x86/iommu/intel_idpgtbl.c | 4 ++-- sys/x86/iommu/iommu_utils.c | 15 +++++++++++---- sys/x86/iommu/x86_iommu.h | 3 ++- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 84d8c3680b71..73d0a6f1279b 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -31,6 +31,8 @@ #ifndef _DEV_IOMMU_IOMMU_H_ #define _DEV_IOMMU_IOMMU_H_ +#include +#include #include struct bus_dma_tag_common; @@ -61,6 +63,7 @@ struct iommu_map_entry { RB_ENTRY(iommu_map_entry) rb_entry; /* Links for domain entries */ struct iommu_domain *domain; struct iommu_qi_genseq gseq; + struct spglist pgtbl_free; }; struct iommu_unit { diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 26ac38da3c4f..d97bdee47b28 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -96,9 +96,12 @@ iommu_gas_alloc_entry(struct iommu_domain *domain, u_int flags) res = uma_zalloc(iommu_map_entry_zone, ((flags & IOMMU_PGF_WAITOK) != 0 ? M_WAITOK : M_NOWAIT) | M_ZERO); - if (res != NULL && domain != NULL) { - res->domain = domain; - atomic_add_int(&domain->entries_cnt, 1); + if (res != NULL) { + SLIST_INIT(&res->pgtbl_free); + if (domain != NULL) { + res->domain = domain; + atomic_add_int(&domain->entries_cnt, 1); + } } return (res); } @@ -107,7 +110,12 @@ void iommu_gas_free_entry(struct iommu_map_entry *entry) { struct iommu_domain *domain; + int n __unused; + n = vm_page_free_pages_toq(&entry->pgtbl_free, false); +#if defined(__i386__) || defined(__amd64__) + atomic_subtract_int(&iommu_tbl_pagecnt, n); +#endif domain = entry->domain; if (domain != NULL) atomic_subtract_int(&domain->entries_cnt, 1); diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index a949e38cc9b1..9dc7a2d58b3f 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -368,7 +368,7 @@ retry: ("loosing root page %p", domain)); vm_page_unwire_noq(m); iommu_pgfree(domain->pgtbl_obj, m->pindex, - flags); + flags, NULL); return (NULL); } dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | @@ -572,7 +572,7 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, NULL); dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); } diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index 2011c632f770..8ff15cc86cb8 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -109,7 +109,8 @@ iommu_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) } void -iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) +iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags, + struct iommu_map_entry *entry) { vm_page_t m; @@ -117,8 +118,13 @@ iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) VM_OBJECT_WLOCK(obj); m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); if (m != NULL) { - vm_page_free(m); - atomic_subtract_int(&iommu_tbl_pagecnt, 1); + if (entry == NULL) { + vm_page_free(m); + atomic_subtract_int(&iommu_tbl_pagecnt, 1); + } else { + vm_page_remove_xbusy(m); /* keep page busy */ + SLIST_INSERT_HEAD(&entry->pgtbl_free, m, plinks.s.ss); + } } if ((flags & IOMMU_PGF_OBJL) == 0) VM_OBJECT_WUNLOCK(obj); @@ -154,7 +160,8 @@ iommu_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, sched_unpin(); if (allocated) { VM_OBJECT_ASSERT_WLOCKED(obj); - iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); + iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL, + NULL); } if ((flags & IOMMU_PGF_OBJL) == 0) VM_OBJECT_WUNLOCK(obj); diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h index a1ed5c71c513..4d0ac8351e2e 100644 --- a/sys/x86/iommu/x86_iommu.h +++ b/sys/x86/iommu/x86_iommu.h @@ -48,7 +48,8 @@ struct vm_object; struct vm_page *iommu_pgalloc(struct vm_object *obj, vm_pindex_t idx, int flags); -void iommu_pgfree(struct vm_object *obj, vm_pindex_t idx, int flags); +void iommu_pgfree(struct vm_object *obj, vm_pindex_t idx, int flags, + struct iommu_map_entry *entry); void *iommu_map_pgtbl(struct vm_object *obj, vm_pindex_t idx, int flags, struct sf_buf **sf); void iommu_unmap_pgtbl(struct sf_buf *sf); From nobody Sat Oct 5 07:11:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmk6Cg5z5XrVW; Sat, 05 Oct 2024 07:11: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 4XLGmk2Wyzz4NL1; Sat, 5 Oct 2024 07:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i18UpfiN+NBaCD0m2v0f+T1cHlCcQVdKsT7As8DT4Vc=; b=d5HgT/M18m42tXCZXEEDBsK9ZySUtD/GRloey/mYYg+aMsiVaYVv3dYyWW31UK+Cn++y3j 5i4Bii4epO85jCAsaDsxhncd3acnsT2GznwcA4yOlP83R4j4BWBamGgVBmwGnzy83KDxjV T+rp5Jdr9aRD4o0BZrn2YDZrEK0qlDDlqZdKvsNqPEzlWiCeRYDdra0q1beUgIUW10F1Cs rk48cCPgmHYVALqgxFdm83ybfroAVlcSb3PoGOMn8aHOJQrTsbU/N4IkmLQ6EyTSblC93h 3AyN0F7CAU1HG/w7IcSVXDBlnJgTa0FERSWLf5ysJEQRTgM3zGIqQPfFu3PBDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i18UpfiN+NBaCD0m2v0f+T1cHlCcQVdKsT7As8DT4Vc=; b=iaQh3uHeqs5TWdYsa0xAPV8mDpDIOOQIWPjcsgveRUs5mOnDTPNVt9yXLDkpGS3yt56dq6 Wd25zeKB4F6XjBuCCTU1+vis+ovQ9KtAsf6TgFKEb3cOjO+u8A1dnN2FZYo0aGWpiuSPML 4D17EPJYJKtGKvoJgSjxHV4H0biyW50/Hppb45VC5n+4/ouA7ZlrDRS5UTSkumIJf7MVLQ yZcEmrL9VXciDSuhCKm6w9Gh6oB2/nhNivpCkahzz7UkP9wkH2vpxRb+SPdonMHDZ7v+gK Sg9B0EV9qarFSXtcnkcN+gSspWdiQlD+G723jekWTHT6gvDDrSS1Rfu7tKbXKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112294; a=rsa-sha256; cv=none; b=LnKod52/8HyulSVkQmwdcxC/bxf1fx2HWvyw8eGjo6P9uFzWQpZfFRlR4nijKLqy7QvrM1 7aCQrxbvopvtEG/jnFMYPeCVau4FK6dgqQ7U8zB74dEiwjU9s1yZWjHu+Hw3oYuRIex3XV UbsUTM49quoMfN63hJY0FZriZrZuYEk7JcVd0owVkp3X01fujqgOa+d03tqMaKv5Uw3yjw EDoRGrP9aRTXe01GQJenJA9PoChOTxoal86LZTID8jb1dyTLoHLwFbFaC4R3UsZ7vug/kr naN9/EdA+W9yLAHR8jpkSCnwsbMHL7CgJwUfKBLzGqiX+7/7NrUt/UalBlQcuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmk28HSz183q; Sat, 5 Oct 2024 07:11: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 4957BYFG001853; Sat, 5 Oct 2024 07:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BYT1001849; Sat, 5 Oct 2024 07:11:34 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:34 GMT Message-Id: <202410050711.4957BYT1001849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b0e45fea61a5 - stable/14 - vm_page_free_pages_toq(): return the count of freed pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0e45fea61a53bf7831e9a8de356cfda055e1d44 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e45fea61a53bf7831e9a8de356cfda055e1d44 commit b0e45fea61a53bf7831e9a8de356cfda055e1d44 Author: Konstantin Belousov AuthorDate: 2024-09-27 16:20:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 vm_page_free_pages_toq(): return the count of freed pages (cherry picked from commit 1784fb44498da8007fb8cd8ee5060894eb5fe1e6) --- sys/vm/vm_page.c | 5 +++-- sys/vm/vm_page.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 8496a39154de..fe104e1e87af 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -3993,14 +3993,14 @@ vm_page_free_toq(vm_page_t m) * from any VM object. In other words, this is equivalent to * calling vm_page_free_toq() for each page of a list of VM objects. */ -void +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) { vm_page_t m; int count; if (SLIST_EMPTY(free)) - return; + return (0); count = 0; while ((m = SLIST_FIRST(free)) != NULL) { @@ -4011,6 +4011,7 @@ vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) if (update_wire_count) vm_wire_sub(count); + return (count); } /* diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index a1df6f736aee..68f68d62d2be 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -706,7 +706,7 @@ int vm_page_is_valid(vm_page_t, int, int); void vm_page_test_dirty(vm_page_t); vm_page_bits_t vm_page_bits(int base, int size); void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); -void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); void vm_page_dirty_KBI(vm_page_t m); void vm_page_lock_KBI(vm_page_t m, const char *file, int line); From nobody Sat Oct 5 07:11:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmn1bztz5XrS5; Sat, 05 Oct 2024 07:11: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 4XLGmm4X4Nz4Nt3; Sat, 5 Oct 2024 07:11:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RRFM/B68ZU+XPKWnunKb3C27XnPyU02IK0D8fY67HI=; b=peg9ZqnuB7gwBLtNtQl4oBcS64LI5vqOGIp7FWtX2NgEP5ulzNHcVpZ2lnhAolgGOV96Jl 0juhK8tICanouQ++a5fT0WFBk4MlJKm/fqcNH905p0HVU9lJjGC+vL444Gsq0LwFvcUZ+K EjFqPqQDiUNI5Sk/Z6xyXVgI6qoTKFf10+Lc98vnzPdAPOjwWxLuWms4ocMFHaFWKLpgY8 EAwow7J80d0WuyxTb15TW0mNPxUzcsCTHu6S6Rymk9MGWyOjV2eOiVN/yab/FZKBCqBZZ6 DZSebChdgwY+ALWWgGBjX/92mDHqo+7PsIHTPrwPuUS6XDabom5n8ixD1wxaEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RRFM/B68ZU+XPKWnunKb3C27XnPyU02IK0D8fY67HI=; b=Quu9fAASF93Z23oTqrm+SJaeSqdulLKhGCeNU45pcNoXSQap+f7olv4iTojtIQ5H0kKYDt LZNgyywYcXShI9vS9JNlnbvubTbKUpNvaNHxaWauhXDf5nrxvDc5fPlWMhHSFTVNSWux+W JMCEyOvNATorKm0GdhiD/eJTUhaiSs4v1T/78H0tX2TNuPciTM4as5tLuEslrGZqyu+XaW 5xvalAEtk5cbsU3PQsay29ME5MJU1SfyUsvsZMySjtGoRuLG8Q6C56jTxYr2BPJVMO0/L1 g6WwpVkOSn37WNM5z+WvBFWAbCRamDTg/SrlP/NvUy7BCzwS5uOtFkg0mJTLGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112296; a=rsa-sha256; cv=none; b=c2t4imW6a8XdmS2M6ZMKGZZQwQ+oTkGWXRKdPaEHES3/e+wElert5pcdYd3+FgEyqwbwid Es9yttg8JGPdL1VQywvpDjHCv7pTShVg2hgtDSocnnRMiwBtkWqhc4m5LUmhgQlKXJqzz+ JY+rR5yTudw8/3jipWQERyWDZZHYrJTxEishefakPXe2wbysx63ikdktnbX1uOi3PMpCv3 AmQv57QKfOBvW1i61pGm33OkFl8xgi2j7F57mY97uibezf6SV60rC9R6D5G6JV6hr4GHGz PLxJafWU/bxLfQ43EzF7wz5JfLclW5+TNGWOmZoOe4Xib62CX80nJ93ig+bofA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmm482qz17pR; Sat, 5 Oct 2024 07:11: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 4957BaEf002001; Sat, 5 Oct 2024 07:11:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BaWr001998; Sat, 5 Oct 2024 07:11:36 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:36 GMT Message-Id: <202410050711.4957BaWr001998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 938cac4bdf17 - stable/14 - dmar: on unmap, postpone freeing page table pages after the invalidation is done List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 938cac4bdf17188644512d5bbaba6768940fc423 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=938cac4bdf17188644512d5bbaba6768940fc423 commit 938cac4bdf17188644512d5bbaba6768940fc423 Author: Konstantin Belousov AuthorDate: 2024-09-25 03:54:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:56 +0000 dmar: on unmap, postpone freeing page table pages after the invalidation is done (cherry picked from commit 3848dc4fe6f37cbcfaea29eb94fa560a503f60ab) --- sys/x86/iommu/intel_idpgtbl.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 9dc7a2d58b3f..e1b89571971b 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -69,7 +69,8 @@ #include static int dmar_unmap_buf_locked(struct dmar_domain *domain, - iommu_gaddr_t base, iommu_gaddr_t size, int flags); + iommu_gaddr_t base, iommu_gaddr_t size, int flags, + struct iommu_map_entry *entry); /* * The cache of the identity mapping page tables for the DMARs. Using @@ -387,7 +388,8 @@ retry: static int dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) + iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags, + struct iommu_map_entry *entry) { iommu_pte_t *pte; struct sf_buf *sf; @@ -447,7 +449,7 @@ dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, if (sf != NULL) iommu_unmap_pgtbl(sf); dmar_unmap_buf_locked(domain, base1, base - base1, - flags); + flags, entry); TD_PINNED_ASSERT; return (ENOMEM); } @@ -518,7 +520,8 @@ dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, KASSERT((flags & ~IOMMU_PGF_WAITOK) == 0, ("invalid flags %x", flags)); DMAR_DOMAIN_PGLOCK(domain); - error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags); + error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags, + entry); DMAR_DOMAIN_PGUNLOCK(domain); if (error != 0) return (error); @@ -536,11 +539,11 @@ dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, - struct sf_buf **sf, bool free_fs); + struct sf_buf **sf, struct iommu_map_entry *entry, bool free_fs); static void dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, - int lvl, int flags) + int lvl, int flags, struct iommu_map_entry *entry) { struct sf_buf *sf; iommu_pte_t *pde; @@ -548,12 +551,14 @@ dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, sf = NULL; pde = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); - dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); + dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, + entry, true); } static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, - int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) + int flags, iommu_pte_t *pte, struct sf_buf **sf, + struct iommu_map_entry *entry, bool free_sf) { vm_page_t m; @@ -572,8 +577,8 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, NULL); - dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, entry); + dmar_free_pgtbl_pde(domain, base, lvl - 1, flags, entry); } /* @@ -581,7 +586,7 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, */ static int dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) + iommu_gaddr_t size, int flags, struct iommu_map_entry *entry) { iommu_pte_t *pte; struct sf_buf *sf; @@ -632,7 +637,7 @@ dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, if ((pte->pte & DMAR_PTE_SP) != 0 || lvl == domain->pglvl - 1) { dmar_unmap_clear_pte(domain, base, lvl, - flags, pte, &sf, false); + flags, pte, &sf, entry, false); break; } } @@ -662,7 +667,7 @@ dmar_unmap_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, DMAR_DOMAIN_PGLOCK(domain); error = dmar_unmap_buf_locked(domain, entry->start, entry->end - - entry->start, flags); + entry->start, flags, entry); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } From nobody Sat Oct 5 07:11:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmn6lGNz5XrS8; Sat, 05 Oct 2024 07:11: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 4XLGmn5WrTz4NnR; Sat, 5 Oct 2024 07:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kB57xkWRR6CS+HkK3bEdaXXs+mfLgzCo962Ne9uELMw=; b=ZKdaDvK5fr3sudjQLJI+wHIBEq/UWw//WqRrBR1aDeF7Cxri6fkV5SiE/xPuoWD7ksKMhz Y5RJj3HyU34Xz7bV++nQO2sFPwqZO5yKNxIWFwDHWBDs8V1p0YZBwWdsNiva5p7azvvQnb Poxg6V+GxgKlsorFtJtyhMh3AeosLPtTGyA+2AsfcM9sWme0TaL+MH3agBnmCzjFSWnWem GJS04k6ws9r8nO5AR3oqqvwkP5+2g0XMmbsh/8KZyh+ZS94AojO0pgcjkExYQBx7h803X0 nQvy7tZoBIpo4dxW6ZMeWo19PfO0eL9nbnxJ8zVPKKAj8cCIFJ7eSpmu4+S02A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kB57xkWRR6CS+HkK3bEdaXXs+mfLgzCo962Ne9uELMw=; b=HUSBZ1UrHv26XT39nOngmuCgF3wEg+sJwQNYALSc0QKb6CR57VioZ9anai4yW5FQoiRwGj N/UMbotbAa3bqK78O82+ipxekhVNb3Tdzz6dpeH5hYyKE/zo6sh1DThKhuIkyZVHmqip4i S8bEPIrp/OH84kCHBdZ1tQOgOAIHkLg0lmXYz4HF7Ut1WwuKJ5oUMZwZ0Dz7Ie40cnadHe Po7a+Y4N4qgyH6/6EXT0ee30EK2pdyx2IERj+on6Rgzql8Nmbcba/1s3KX8J9b841dwp+f atqWDOMPQGMxY4UpaueAkLjDoUlWpLmwzMk5L4H2BGE411kMz/54fUH1VAK1EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112297; a=rsa-sha256; cv=none; b=pLnDTYeoXI1e0IhHt+QAhWccL5AZlkQLfS4lZ/GST/bmvBZc0LrEviCsXUynBOEa8UsMa8 6HeNcKlSRxojMShe8cwMdtiyalp34/doT8Xw1Pa6OFi+DPjjG62BXrZFvTNo2t7xqLaVuE aFIqugzop2X/MMeMguUCLSjKNXq56IYJDiGK+Dz/Gtbn5lq+wesubXCleskMNnicg8JD6C 2cverBaCEzEJDzw2VophWjQlB2aKjzFXehOGXF9CTkA2G4r1b4Pex/5p4HVwJNOwjNEFST wcOcfp/iKYVzsWbowtRUEw64IWhP29JKWKlqISF6lVq+g2S6Po7fUehr1qf+Og== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmn581Sz1869; Sat, 5 Oct 2024 07:11: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 4957BbQh002043; Sat, 5 Oct 2024 07:11:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BbVE002040; Sat, 5 Oct 2024 07:11:37 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:37 GMT Message-Id: <202410050711.4957BbVE002040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a67cc4b031ab - stable/14 - hyperv: call smp_targeted_tlb_shootdown_native() with pin List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a67cc4b031ab01a2defcfb6f3d23cc0363f0c2ac Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a67cc4b031ab01a2defcfb6f3d23cc0363f0c2ac commit a67cc4b031ab01a2defcfb6f3d23cc0363f0c2ac Author: Konstantin Belousov AuthorDate: 2024-10-01 11:45:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:57 +0000 hyperv: call smp_targeted_tlb_shootdown_native() with pin (cherry picked from commit 6dcffb980fa3026092f79107ee7668918c9f5490) --- sys/dev/hyperv/vmbus/hyperv_mmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/hyperv/vmbus/hyperv_mmu.c b/sys/dev/hyperv/vmbus/hyperv_mmu.c index 7c29fe294093..8e982974161c 100644 --- a/sys/dev/hyperv/vmbus/hyperv_mmu.c +++ b/sys/dev/hyperv/vmbus/hyperv_mmu.c @@ -241,7 +241,6 @@ do_ex_hypercall: critical_exit(); return; native: - sched_unpin(); critical_exit(); return smp_targeted_tlb_shootdown_native(pmap, addr1, addr2, curcpu_cb, op); From nobody Sun Oct 6 03:49:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpF01FBhz5YCGX; Sun, 06 Oct 2024 03:49: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 4XLpF00Vmqz4FT2; Sun, 6 Oct 2024 03:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCwTavNGVBdwcH1lPCCkxsKs8Li089NvR/FJKY07JRU=; b=cv0bsBaez2kT7TF4KG2S7KkvufOh0iuo0uQObQGXtOMvHRQUX6FydPQcvlsH719i0X4CoD WU46dyykdQEQ6BkhRZKL+hlJW08J7ddUxpd3h9+dKkihU85XueqvlqfeddausMMpEdpvMw eYORvy8IBBhXDMq698nOx9wSY16LygiHoynqUp6TA58Za9bJ7nN5rAy35Tw71MIxE0e98S 2Go+NyyM9nHy6KYrS8jNGwBQGF+OnVsSt8Pp+mKgeuYuMvEZ6qBCJAZxSIprCrmHO1cHyp AG9NXZKbhXwqUj5lA431yDdCrKl41p5zhMa6awMPgyk6GRn6acB+UjVg7z/Olw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCwTavNGVBdwcH1lPCCkxsKs8Li089NvR/FJKY07JRU=; b=suCAF5thfQP8BSIk9LBkryC5nOMwnalK3QA17OfSpAshMhjpNtiDOfArsQOpZ1i3FGsAOG YQEmc3ojK6qSHn7I1mFr55B3VlJsw6qFFZXd1IHUS4ndzFw8vuH9vyvo1dXoYHTcOLBrFg Wixzm+V+CWuyCTchFyd3cBmpd0ZNZucEhM2vSfqFmHN226GaFCLKO1v+F1QUBcf2McyxLo Tjnnln9PUblQ4bXcAjkD/6C5V1pbYTZVQSOSl7yszpCInGmZrKLY1EUgBpM56aMyXfQ4tN AaN5SwU3sHEjl+YslvoQFtMuDAZLNiWNwvDFwsZZ1hDBBsIg40Rez3JkraFOLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186564; a=rsa-sha256; cv=none; b=duCw1RUyxQR2eZ7HFWMB/874B3r7QJrAMNlh5up8JwDwdRHKwtkEPhba901LNWcW8fixxz IrB/IJjmIvaZmj6dsWBVKN1OUi7TdAsUE4UtdZTdToVHUUUNhZipVITQmyR9CqJAHBMRda BdjObdYpl9Dxif83UrCoyiMW0XgOW+hc6zpdeoTELtaH74DmLVOYJoSgUwTtV3yB1ZGxBY eWkNwlPD0yD28TYU2BtTC1dXFE1j0TFC3uSQDha/QSo+Ac5ntOWrQdJPkBc5Qkm2pcOozo 07hvc+jeEp+xbqlMiAM8FS6OqbEzTMT7UsVHDRUG5aHHNBut/8NHhTA/IvQlhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpF005xkzmMl; Sun, 6 Oct 2024 03:49: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 4963nNTu091853; Sun, 6 Oct 2024 03:49:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963nNcE091850; Sun, 6 Oct 2024 03:49:23 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:49:23 GMT Message-Id: <202410060349.4963nNcE091850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 941833b9bb8a - stable/14 - ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 941833b9bb8a3ab063189e02eed6860bfabd5f73 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=941833b9bb8a3ab063189e02eed6860bfabd5f73 commit 941833b9bb8a3ab063189e02eed6860bfabd5f73 Author: Kevin Bowling AuthorDate: 2024-09-29 04:15:53 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:48:42 +0000 ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs These are more succinct than jumping through the function pointers directly and add some additional error handling. (cherry picked from commit 1e3b1870ad2a426de6e3f5445211b698f20f7f1f) --- sys/dev/ixgbe/if_sriov.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 6a2dad4bca42..0916ae1ac7cc 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool); + ixgbe_write_mbx(hw, &msg, 1, vf->pool); } static inline void @@ -595,8 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE, - vf->pool); + error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; From nobody Sun Oct 6 03:49:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpF1261Zz5YCPk; Sun, 06 Oct 2024 03:49: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 4XLpF11Z9Bz4FVc; Sun, 6 Oct 2024 03:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v610Wb5j2mtlREzhUvSoWHTplQIGtsovQ/g4QYGg36M=; b=C3/D1QAAJokNsSqyOZDj3MPO5lXxQXU2f1VTKAJwdnTl7Bw7ZoFWIant4g2zpHdmGEroFJ atFDvrZLID96ufAIwNcnPYutMav3FiUkQIQBYFIY+iA5Z1T2O8DFUfcCCIwblkoe2P8tFZ kE7kcPipWz41Q+5I3wifSL5ogDCm1SALFUpXrnyUJtlgQtxDNs22J+FODZfwi6aU409Pib a3JqnYNd2lGrSd0vqlgjp4kdXujuYlTK9UHTGjYUzq7Rsu2g3KlY+uTZ3w2mOaZSuvRGks cGXv8Heip5NyzDMHhWb8/bsKVjdp2MwRtrHlumb2WIFBofNOKydgMg0XiqaK+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v610Wb5j2mtlREzhUvSoWHTplQIGtsovQ/g4QYGg36M=; b=Wbz79zOX0FkbgkwQNrFSCOn63yGJAi4jTA3VySBYfyjKND46opq1yDY3EHO1/miBNuJy49 qNZ5tCDptW4B0VynB2dnDMgwHncm6qc+kCmcJcnPg1rg0xkkn5E/ehTdJ12ZoH2P9CVSVq 3+7no2Tuv6sSRP8j1lVGe5m7YOOafQR8nAGgmsBzy48wCHkJh9Ara+LnSFuKg2zcuI7qXa zGSK74oFR/SV/SlsPTyevCjg9oHey7JFskdbyoCBCxSRUZhL/35rkgrbwp1w2X65X7A8mQ dofc/gKIKybLVyo5EY5DwMoBAEGdrZf9BfYyUvunmv5gDaHnSeagen+tTBbSuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186565; a=rsa-sha256; cv=none; b=HBGfk9TtF4ulz5wO5tlU6c5VV1GweFALHaJWe9+IW1KBYBg2GO6GmewpXfyV/FI5JWM4gN uAdi4Zn+x9C+8iKbUiy5DOdjSk5YJmGoWB6H5+L/IUAQ3vF+bvEAFj5s+CDWCAL9sSMAcE F9jZ88k78AN0uY+6P42RwBTG0CFxMxq2KPt5rBiSI4zl++sZhEmdR+BLTMd3wUdqrArbJ8 KBxnTIihyePAOLAMibl9j5MIbX33YPx0u95D66C2B0HVPQLMdVh4PcZ+LMfQUgKt68q/3g Aowhm9Ek7lrqBe75zt1fQRHcZ3yMVRHCEsRV/qZov50gODXYdYV6Jj2JY1MDKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpF117WZzm7j; Sun, 6 Oct 2024 03:49: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 4963nP5V091905; Sun, 6 Oct 2024 03:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963nPmN091902; Sun, 6 Oct 2024 03:49:25 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:49:25 GMT Message-Id: <202410060349.4963nPmN091902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f75c75d94841 - stable/14 - igc: Remove non-existent legacy absolute and packet timers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f75c75d94841ebd410ccecf7b0bf8c8faf602193 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f75c75d94841ebd410ccecf7b0bf8c8faf602193 commit f75c75d94841ebd410ccecf7b0bf8c8faf602193 Author: Kevin Bowling AuthorDate: 2024-09-29 04:32:49 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:48:55 +0000 igc: Remove non-existent legacy absolute and packet timers igc, derived from igb, does not use these registers. All interrupt timing is governed by EITR or LLI and driven by write-back. Sponsored by: BBOX.io (cherry picked from commit a40ecb6f740530fb7e6a95e702113aa3fe24d975) --- sys/dev/igc/if_igc.c | 109 ------------------------------------------------- sys/dev/igc/if_igc.h | 59 -------------------------- sys/dev/igc/igc_regs.h | 5 --- 3 files changed, 173 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index bfa33c82f7ba..c78edab5e38a 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -121,9 +121,6 @@ static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); static void igc_print_debug_info(struct igc_adapter *); static int igc_is_valid_ether_addr(u8 *); -static int igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS); -static void igc_add_int_delay_sysctl(struct igc_adapter *, const char *, - const char *, struct igc_int_delay_info *, int, int); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_adapter *); static void igc_release_hw_control(struct igc_adapter *); @@ -211,12 +208,6 @@ static driver_t igc_if_driver = { * Tunable default values. *********************************************************************/ -#define IGC_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) -#define IGC_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) - -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -229,22 +220,6 @@ static int igc_disable_crc_stripping = 0; SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); -static int igc_tx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TIDV_VAL); -static int igc_rx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RDTR_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &igc_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &igc_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); - -static int igc_tx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TADV_VAL); -static int igc_rx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RADV_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_abs_int_delay, CTLFLAG_RDTUN, - &igc_tx_abs_int_delay_dflt, 0, - "Default transmit interrupt delay limit in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, - &igc_rx_abs_int_delay_dflt, 0, - "Default receive interrupt delay limit in usecs"); - static int igc_smart_pwr_down = false; SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); @@ -536,29 +511,6 @@ igc_if_attach_pre(if_ctx_t ctx) igc_setup_msix(ctx); igc_get_bus_info(hw); - /* Set up some sysctls for the tunable interrupt delays */ - igc_add_int_delay_sysctl(adapter, "rx_int_delay", - "receive interrupt delay in usecs", &adapter->rx_int_delay, - IGC_REGISTER(hw, IGC_RDTR), igc_rx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_int_delay", - "transmit interrupt delay in usecs", &adapter->tx_int_delay, - IGC_REGISTER(hw, IGC_TIDV), igc_tx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &adapter->rx_abs_int_delay, - IGC_REGISTER(hw, IGC_RADV), - igc_rx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &adapter->tx_abs_int_delay, - IGC_REGISTER(hw, IGC_TADV), - igc_tx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "itr", - "interrupt delay limit in usecs/4", - &adapter->tx_itr, - IGC_REGISTER(hw, IGC_ITR), - DEFAULT_ITR); - hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; @@ -2015,12 +1967,6 @@ igc_initialize_receive_unit(if_ctx_t ctx) if (!igc_disable_crc_stripping) rctl |= IGC_RCTL_SECRC; - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - IGC_WRITE_REG(hw, IGC_ITR, DEFAULT_ITR); - rxcsum = IGC_READ_REG(hw, IGC_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM) { rxcsum |= IGC_RXCSUM_CRCOFL; @@ -2717,61 +2663,6 @@ igc_print_nvm_info(struct igc_adapter *adapter) printf("\n"); } -static int -igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS) -{ - struct igc_int_delay_info *info; - struct igc_adapter *adapter; - u32 regval; - int error, usecs, ticks; - - info = (struct igc_int_delay_info *) arg1; - usecs = info->value; - error = sysctl_handle_int(oidp, &usecs, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (usecs < 0 || usecs > IGC_TICKS_TO_USECS(65535)) - return (EINVAL); - info->value = usecs; - ticks = IGC_USECS_TO_TICKS(usecs); - if (info->offset == IGC_ITR) /* units are 256ns here */ - ticks *= 4; - - adapter = info->adapter; - - regval = IGC_READ_OFFSET(&adapter->hw, info->offset); - regval = (regval & ~0xffff) | (ticks & 0xffff); - /* Handle a few special cases. */ - switch (info->offset) { - case IGC_RDTR: - break; - case IGC_TIDV: - if (ticks == 0) { - adapter->txd_cmd &= ~IGC_TXD_CMD_IDE; - /* Don't write 0 into the TIDV register. */ - regval++; - } else - adapter->txd_cmd |= IGC_TXD_CMD_IDE; - break; - } - IGC_WRITE_OFFSET(&adapter->hw, info->offset, regval); - return (0); -} - -static void -igc_add_int_delay_sysctl(struct igc_adapter *adapter, const char *name, - const char *description, struct igc_int_delay_info *info, - int offset, int value) -{ - info->adapter = adapter; - info->offset = offset; - info->value = value; - SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), - OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - info, 0, igc_sysctl_int_delay, "I", description); -} - /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 0c22ce9f76f4..92865b5b9eb1 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -131,65 +131,6 @@ #define IGC_DEFAULT_MULTI_RXD 4096 #define IGC_MAX_RXD 4096 -/* - * IGC_TIDV_VAL - Transmit Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value delays the generation of transmit interrupts in units of - * 1.024 microseconds. Transmit interrupt reduction can improve CPU - * efficiency if properly tuned for specific network traffic. If the - * system is reporting dropped transmits, this value may be set too high - * causing the driver to run out of available transmit descriptors. - */ -#define IGC_TIDV_VAL 64 - -/* - * IGC_TADV_VAL - Transmit Absolute Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * transmit interrupt is generated. Useful only if IGC_TIDV is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is sent on the wire within the set amount of time. Proper tuning, - * along with IGC_TIDV_VAL, may improve traffic throughput in specific - * network conditions. - */ -#define IGC_TADV_VAL 64 - -/* - * IGC_RDTR_VAL - Receive Interrupt Delay Timer (Packet Timer) - * Valid Range: 0-65535 (0=off) - * Default Value: 0 - * This value delays the generation of receive interrupts in units of 1.024 - * microseconds. Receive interrupt reduction can improve CPU efficiency if - * properly tuned for specific network traffic. Increasing this value adds - * extra latency to frame reception and can end up decreasing the throughput - * of TCP traffic. If the system is reporting dropped receives, this value - * may be set too high, causing the driver to run out of available receive - * descriptors. - * - * CAUTION: When setting IGC_RDTR to a value other than 0, adapters - * may hang (stop transmitting) under certain network conditions. - * If this occurs a WATCHDOG message is logged in the system - * event log. In addition, the controller is automatically reset, - * restoring the network connection. To eliminate the potential - * for the hang ensure that IGC_RDTR is set to 0. - */ -#define IGC_RDTR_VAL 0 - -/* - * Receive Interrupt Absolute Delay Timer - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * receive interrupt is generated. Useful only if IGC_RDTR is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is received within the set amount of time. Proper tuning, - * along with IGC_RDTR, may improve traffic throughput in specific network - * conditions. - */ -#define IGC_RADV_VAL 64 - /* * This parameter controls whether or not autonegotation is enabled. * 0 - Disable autonegotiation diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index f4ded07ce6ab..26614dc33df6 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -27,7 +27,6 @@ #define IGC_CONNSW 0x00034 /* Copper/Fiber switch control - RW */ #define IGC_VET 0x00038 /* VLAN Ether Type - RW */ #define IGC_ICR 0x01500 /* Intr Cause Read - RC/W1C */ -#define IGC_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ #define IGC_ICS 0x01504 /* Intr Cause Set - WO */ #define IGC_IMS 0x01508 /* Intr Mask Set/Read - RW */ #define IGC_IMC 0x0150C /* Intr Mask Clear - WO */ @@ -78,8 +77,6 @@ #define IGC_FCRTV 0x02460 /* Flow Control Refresh Timer Value - RW */ /* Split and Replication Rx Control - RW */ #define IGC_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */ -#define IGC_RDTR 0x02820 /* Rx Delay Timer - RW */ -#define IGC_RADV 0x0282C /* Rx Interrupt Absolute Delay Timer - RW */ /* Shadow Ram Write Register - RW */ #define IGC_SRWR 0x12018 #define IGC_EEC_REG 0x12010 @@ -148,8 +145,6 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ -#define IGC_TIDV 0x03820 /* Tx Interrupt Delay Value - RW */ -#define IGC_TADV 0x0382C /* Tx Interrupt Absolute Delay Val - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Oct 6 03:49:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpF23tSyz5YCGf; Sun, 06 Oct 2024 03:49: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 4XLpF22b7Fz4FPD; Sun, 6 Oct 2024 03:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfnFFmgOBzzxphAkUhnNruB38/S4KWEaJ1JB3STr6N8=; b=U0kWXJxrCdXePZBv2Xf6FFEgGNJaSownF6ckw5CtrHm5c5ccDZHnsa2PWyIfvDRgRw/xUQ BkPvLO0actNh1+/oD4YyN+cjHe0WY2+GB4hpEFg9bS8oA4nnDkLJ5jTMm4/ErSi4I3NeFz y08dRkOhJ7lCL+oSGo1BzKVGS0vL/+FiFiQ7/4aqr1aHURE7S2X+MVXFDcB1hZsAjp/e0l i4faWkwvGt3TEbc+LAfcgIDlqxJ+xvExSAYAQohrr5VuvB3HGL3o8JjAkqmxt44v/TsQhK 5oRgN7M4OcE9KuEADoFK3nI/yGjRozQvVjmS7evcRMVcJydvHrect5ryOx1p5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QfnFFmgOBzzxphAkUhnNruB38/S4KWEaJ1JB3STr6N8=; b=bp+IjmPGnsaiWTCSpHV7/li24P0qyBt5pAToG8HYd2HvzK2EPGph/KI32nV+v2XdigkBIi DA9xizivzRwewIPIh1IWYwEOmgVoQWEjC4UwUvS06iHe/hwbmM3fCHBvEB/2fR/waIe5d3 6RAV95FTtaooHlu9sPjTylEIf80bFmCJGPgiAFziuagp5r5mUcaxntfTQDv7oBXXryMTcz iySsn77I+745OkiOwNZ8Uc5KVF1PIxa/Bn4roL8ykx0bDoY14HqhwbH5g/LfM+VdAEGBQm UXCYHydVx3Qc1o/0V/60gda75fPmAbz63mevrY5UIqZcWK3QlCS6yU9iDQxSPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186566; a=rsa-sha256; cv=none; b=R9azZQKQ11Sazw96xXk5CvpZIsr0stxzoVqklF5dvGiWwURHi1vopVKq+VwHrtQMztECBM 8ysiuI7R7IFZ5JtJUGM0xBOFJKUDndUc2rIpUL0r71WrJSSW5Iif1gMYLP64EXgRM4ac/Z iUEFO9f3K7QG3nTWvgHeYXeJn+ZGuhvDU/k9wCWY84QNdWm8GrthSx8h1Ig2cjPtjGeY+M K6Iydt7OSVZkxhuKWP7kS+kYpKzVMX4LcCvOj/B8jUTMLyEcJNL38NnFLYkYuHlYzI8jGU yDEVppp3NvaywB2YF+8xkHjT36KKWqftSdjZYtC9NPfYKxGy0WUYyhf4kmIcpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpF228c1zmmN; Sun, 6 Oct 2024 03:49: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 4963nQ1f091950; Sun, 6 Oct 2024 03:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963nQIh091947; Sun, 6 Oct 2024 03:49:26 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:49:26 GMT Message-Id: <202410060349.4963nQIh091947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 013d817b5393 - stable/14 - igc: Add NVM/firmware prints and sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 013d817b539325017e00ede97d58c8adc16dbee3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=013d817b539325017e00ede97d58c8adc16dbee3 commit 013d817b539325017e00ede97d58c8adc16dbee3 Author: Kevin Bowling AuthorDate: 2024-09-29 09:23:38 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:49:08 +0000 igc: Add NVM/firmware prints and sysctl This chipset suffered an (un)usual number of bugs and iterations. Let's add our NVM/firmware code from e1000 and the similar igc_nvm function from DPDK to keep track of issues. Sponsored by: BBOX.io (cherry picked from commit 33ed9bdca307bedb3d66a50ed7d4d7b4bf4acf39) --- sys/dev/igc/if_igc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/if_igc.h | 2 + sys/dev/igc/igc_defines.h | 28 +++++++++++-- sys/dev/igc/igc_nvm.c | 81 ++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_nvm.h | 18 ++++++++ 5 files changed, 229 insertions(+), 4 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index c78edab5e38a..006fecdab7b0 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -115,6 +115,10 @@ static void igc_update_stats_counters(struct igc_adapter *); static void igc_add_hw_stats(struct igc_adapter *adapter); static int igc_if_set_promisc(if_ctx_t ctx, int flags); static void igc_setup_vlan_hw_support(if_ctx_t ctx); +static void igc_fw_version(struct igc_adapter *); +static void igc_sbuf_fw_version(struct igc_fw_version *, struct sbuf *); +static void igc_print_fw_version(struct igc_adapter *); +static int igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS); static int igc_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); static void igc_print_nvm_info(struct igc_adapter *); static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); @@ -440,6 +444,12 @@ igc_if_attach_pre(if_ctx_t ctx) OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, + adapter, 0, igc_sysctl_print_fw_version, "A", + "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, @@ -586,6 +596,11 @@ igc_if_attach_pre(if_ctx_t ctx) goto err_late; } + /* Save the EEPROM/NVM versions */ + igc_fw_version(adapter); + + igc_print_fw_version(adapter); + /* * Get Wake-on-Lan and Management info for later use */ @@ -2612,6 +2627,95 @@ igc_add_hw_stats(struct igc_adapter *adapter) "Rx Desc Min Thresh Count"); } +static void +igc_fw_version(struct igc_adapter *sc) +{ + struct igc_hw *hw = &sc->hw; + struct igc_fw_version *fw_ver = &sc->fw_ver; + + *fw_ver = (struct igc_fw_version){0}; + + igc_get_fw_version(hw, fw_ver); +} + +static void +igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) +{ + const char *space = ""; + + if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { + sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, + fw_ver->eep_minor, fw_ver->eep_build); + space = " "; + } + + if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); + space = " "; + } + + if (fw_ver->or_valid) { + sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); + space = " "; + } + + if (fw_ver->etrack_id) + sbuf_printf(buf, "%seTrack 0x%08x", space, fw_ver->etrack_id); +} + +static void +igc_print_fw_version(struct igc_adapter *sc ) +{ + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_auto(); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return; + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + else if (sbuf_len(buf)) + device_printf(dev, "%s\n", sbuf_data(buf)); + + sbuf_delete(buf); +} + +static int +igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS) +{ + struct igc_adapter *sc = (struct igc_adapter *)arg1; + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return (ENOMEM); + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + + sbuf_delete(buf); + + return (0); +} + /********************************************************************** * * This routine provides a way to dump out the adapter eeprom, diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 92865b5b9eb1..727699baee5f 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -332,6 +332,8 @@ struct igc_adapter { u64 que_mask; + struct igc_fw_version fw_ver; + struct igc_int_delay_info tx_int_delay; struct igc_int_delay_info tx_abs_int_delay; struct igc_int_delay_info rx_int_delay; diff --git a/sys/dev/igc/igc_defines.h b/sys/dev/igc/igc_defines.h index 1701918c3a9c..e9ebd23c41c3 100644 --- a/sys/dev/igc/igc_defines.h +++ b/sys/dev/igc/igc_defines.h @@ -967,11 +967,31 @@ #define IGC_FLASH_UPDATES 2000 /* NVM Word Offsets */ -#define NVM_COMPAT 0x0003 -#define NVM_ID_LED_SETTINGS 0x0004 -#define NVM_FUTURE_INIT_WORD1 0x0019 -#define NVM_COMPAT_VALID_CSUM 0x0001 +#define NVM_COMPAT 0x0003 +#define NVM_ID_LED_SETTINGS 0x0004 +#define NVM_VERSION 0x0005 +#define NVM_FUTURE_INIT_WORD1 0x0019 +#define NVM_COMPAT_VALID_CSUM 0x0001 #define NVM_FUTURE_INIT_WORD1_VALID_CSUM 0x0040 +#define NVM_ETRACK_WORD 0x0042 +#define NVM_ETRACK_HIWORD 0x0043 +#define NVM_COMB_VER_OFF 0x0083 +#define NVM_COMB_VER_PTR 0x003d + +/* NVM version defines */ +#define NVM_MAJOR_MASK 0xF000 +#define NVM_MINOR_MASK 0x0FF0 +#define NVM_IMAGE_ID_MASK 0x000F +#define NVM_COMB_VER_MASK 0x00FF +#define NVM_MAJOR_SHIFT 12 +#define NVM_MINOR_SHIFT 4 +#define NVM_COMB_VER_SHFT 8 +#define NVM_VER_INVALID 0xFFFF +#define NVM_ETRACK_SHIFT 16 +#define NVM_ETRACK_VALID 0x8000 +#define NVM_NEW_DEC_MASK 0x0F00 +#define NVM_HEX_CONV 16 +#define NVM_HEX_TENS 10 #define NVM_INIT_CONTROL2_REG 0x000F #define NVM_INIT_CONTROL3_PORT_B 0x0014 diff --git a/sys/dev/igc/igc_nvm.c b/sys/dev/igc/igc_nvm.c index d86e04ffa0dc..b476a5fdbeac 100644 --- a/sys/dev/igc/igc_nvm.c +++ b/sys/dev/igc/igc_nvm.c @@ -716,4 +716,85 @@ static void igc_reload_nvm_generic(struct igc_hw *hw) IGC_WRITE_FLUSH(hw); } +/** + * igc_get_fw_version - Get firmware version information + * @hw: pointer to the HW structure + * @fw_vers: pointer to output version structure + * + * unsupported/not present features return 0 in version structure + **/ +void igc_get_fw_version(struct igc_hw *hw, struct igc_fw_version *fw_vers) +{ + u16 eeprom_verh, eeprom_verl, etrack_test, fw_version; + u8 q, hval, rem, result; + u16 comb_verh, comb_verl, comb_offset; + + memset(fw_vers, 0, sizeof(struct igc_fw_version)); + /* + * basic eeprom version numbers, bits used vary by part and by tool + * used to create the nvm images. Check which data format we have. + */ + switch (hw->mac.type) { + case igc_i225: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + /* find combo image version */ + hw->nvm.ops.read(hw, NVM_COMB_VER_PTR, 1, &comb_offset); + if (comb_offset && comb_offset != NVM_VER_INVALID) { + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset + 1, + 1, &comb_verh); + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset, + 1, &comb_verl); + + /* get Option Rom version if it exists and is valid */ + if (comb_verh && comb_verl && + comb_verh != NVM_VER_INVALID && + comb_verl != NVM_VER_INVALID) { + fw_vers->or_valid = true; + fw_vers->or_major = comb_verl >> + NVM_COMB_VER_SHFT; + fw_vers->or_build = (comb_verl << + NVM_COMB_VER_SHFT) | + (comb_verh >> + NVM_COMB_VER_SHFT); + fw_vers->or_patch = comb_verh & + NVM_COMB_VER_MASK; + } + } + break; + default: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + return; + } + hw->nvm.ops.read(hw, NVM_VERSION, 1, &fw_version); + fw_vers->eep_major = (fw_version & NVM_MAJOR_MASK) + >> NVM_MAJOR_SHIFT; + + /* check for old style version format in newer images*/ + if ((fw_version & NVM_NEW_DEC_MASK) == 0x0) { + eeprom_verl = (fw_version & NVM_COMB_VER_MASK); + } else { + eeprom_verl = (fw_version & NVM_MINOR_MASK) + >> NVM_MINOR_SHIFT; + } + /* Convert minor value to hex before assigning to output struct + * Val to be converted will not be higher than 99, per tool output + */ + q = eeprom_verl / NVM_HEX_CONV; + hval = q * NVM_HEX_TENS; + rem = eeprom_verl % NVM_HEX_CONV; + result = hval + rem; + fw_vers->eep_minor = result; + + if ((etrack_test & NVM_MAJOR_MASK) == NVM_ETRACK_VALID) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verl); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) + | eeprom_verl; + } else if ((etrack_test & NVM_ETRACK_VALID) == 0) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) | + eeprom_verl; + } +} diff --git a/sys/dev/igc/igc_nvm.h b/sys/dev/igc/igc_nvm.h index eae0db4b484b..b4b602af6595 100644 --- a/sys/dev/igc/igc_nvm.h +++ b/sys/dev/igc/igc_nvm.h @@ -7,6 +7,22 @@ #ifndef _IGC_NVM_H_ #define _IGC_NVM_H_ +struct igc_fw_version { + u32 etrack_id; + u16 eep_major; + u16 eep_minor; + u16 eep_build; + + u8 invm_major; + u8 invm_minor; + u8 invm_img_type; + + bool or_valid; + u16 or_major; + u16 or_build; + u16 or_patch; +}; + void igc_init_nvm_ops_generic(struct igc_hw *hw); s32 igc_null_read_nvm(struct igc_hw *hw, u16 a, u16 b, u16 *c); void igc_null_nvm_generic(struct igc_hw *hw); @@ -26,5 +42,7 @@ s32 igc_write_nvm_spi(struct igc_hw *hw, u16 offset, u16 words, u16 *data); s32 igc_update_nvm_checksum_generic(struct igc_hw *hw); void igc_release_nvm_generic(struct igc_hw *hw); +void igc_get_fw_version(struct igc_hw *hw, + struct igc_fw_version *fw_vers); #endif From nobody Sun Oct 6 03:50:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpGq24gwz5YCWw; Sun, 06 Oct 2024 03:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLpGp652Kz4GFy; Sun, 6 Oct 2024 03:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/F+yvI+ir6c9Waqq5BAiL/ODklf9zpyXB4Mtq2wKjI=; b=EZSXawwOUonHlx9x8ANEvOVl0Jxczz7seHspoxbGKfS7i75ISXprMbcO9NYZ2Kw3Eq/ln7 pTq8bHvFbbOu35nSyajGJjR+D8DWoC+eN6lsFTufCuBOXlU5/l38KqdMn/hXFziBgjbyq3 lhxCxkK465jnM6fLHz0kZmAgeL2L6EBe7sqpdriTyddyfvaGMRRpP6npaU3JNDlw/2rpDh sNSY9fXkPjnAIsoYFqF5r2NIFlR2Idtax7vCNh2TCRsHc1HhgFAHQTkngvnqcioovJ3ytU A34e6RZ/aHV+mwUK8B0By/Tmr5oHxkZCCnGDWQEMUNsHs5m8pFYRJhMQc6vYUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w/F+yvI+ir6c9Waqq5BAiL/ODklf9zpyXB4Mtq2wKjI=; b=hy5zrkZVsqvXAf6jDl3kxfw224hZQBQBwOxsvHTe72moFGyf53pHhLCCa4PyJTZNZV6Ynq jt1WXU6p4t5yeJIYe3SrX3Qc8NJJj0oBmI/95SikvEHT3Wpd8bZOjenl+K56k76sx9YxwQ BnGlgLNqMf8wGfbJV9RQvHTVMmsjmjToc7ZlNm4L5bKVlvt+ucMHPKT0wk5p2vOKRXcyiX qrMis1Tott6FTbx1vROciH1JVjeXsPHVF7mM7roah/X1YtwVMGW8UHMZAtM095YQe7FpAK 5grfI6M8nPnLDWJ3J6cb50xE5Xow/TuhWX3j/p8ONN3bMKRVYnwkFVq2DaG6hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186658; a=rsa-sha256; cv=none; b=N33osjO2AyO4m+WzF9zmLpZrbcWwRM8ap7N4M3WqnA0hSwmMQ5DngIOT6lwKOArYB4SQoX WZgrxh65H6aYZqnXXK5dDRlF2loVE6FFAbd8k64VxYi+tLN4SPEUG+ELcV2RQSCKtIE8Za O84VGdKnKl60ySoQrMw2htYnfzDgBKnLdGzkN6CurCw7UI72XOvauXsqEfTLTAB+Gu7J8b 3NELZ8Ne1tquz1JZy8wNY/ZyaGQTcXRSKi8pS084AAb+zeQBdX2REdU21ga0c/Gu8Eabu4 lhJc57A6GVgqEw5ddzeYXob0aI7Vb32hw8gXC5YHxEqxtnfdBtsOwMJQLSx6bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpGp5gN2zmKH; Sun, 6 Oct 2024 03:50:58 +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 4963owbN003105; Sun, 6 Oct 2024 03:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963ow4O003102; Sun, 6 Oct 2024 03:50:58 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:50:58 GMT Message-Id: <202410060350.4963ow4O003102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d92efc05a796 - stable/13 - ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d92efc05a79678ef60e1cbccf2afeab57871fcb0 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d92efc05a79678ef60e1cbccf2afeab57871fcb0 commit d92efc05a79678ef60e1cbccf2afeab57871fcb0 Author: Kevin Bowling AuthorDate: 2024-09-29 04:15:53 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:49:50 +0000 ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs These are more succinct than jumping through the function pointers directly and add some additional error handling. (cherry picked from commit 1e3b1870ad2a426de6e3f5445211b698f20f7f1f) --- sys/dev/ixgbe/if_sriov.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 4ee0784ba74a..b186f4decdf8 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool); + ixgbe_write_mbx(hw, &msg, 1, vf->pool); } static inline void @@ -595,8 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE, - vf->pool); + error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; From nobody Sun Oct 6 03:50:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpGr1hbmz5YCMZ; Sun, 06 Oct 2024 03:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLpGq6whtz4GNV; Sun, 6 Oct 2024 03:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7Z4uQmadT7Qtuwh3mQ1Z+Plb36+nOc2bQx4Xlmb4Ok=; b=WTW17bYpsnYUF7QSjxbyX9jYPGow7TOoTERbBSiFZ4M2Bt/ydm7ZtIE8+6GYnW7rqnoDkv IyfRo3uXoBM7dAOQw9ekffpoZSJLkU0xnL4d7wRKv/WHgW6TyPA2FFmOnKTgjDEHTjJ9k+ biSED4dJ8N7QXWk+MtyZLyG2RzkAcbI6ISBC/GHE2mBTjj+5NjLg8yyQX4NL8O8d3RfCUj vFgW/Ps6jjCKtdQbMW1um/eSx5WSW5KqwyAFE102rHc12MNBHnI5BTkemoqc3+K8ZZHJNW DSZw7DsJ6ikh/gibv6wiSfvXaZhpa/maCqSkpMTarFHN9GcpAF90llRpl1JQdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7Z4uQmadT7Qtuwh3mQ1Z+Plb36+nOc2bQx4Xlmb4Ok=; b=hCGHQSgN3WsFGnuqSGGQmwqeQ3t6nPkD+Q7l/7zTPgQEhfQ2tGckoJ2yI9jld8cUCiZcu9 vypeyXyLe21uUBm6Q3UJ4pqP1YkDLX5rWZkSPY1GXLmex85H4uKPUZe7zTXmMzxz0MPw2D lXKwd4H5Tt02xqvYR94h0bcYcFy7FzEXNNfJpZxbjOG6IdA5KT7MG28DvBcxiDOmeOLFwB aiZjzedHQ9nEDmpnQtO7Li2vU0SjQNq+4CARZ+DcRuW/u2axG2RAwuwGhOKOPREglBAPii cS2pK0W6+wkKT0Q6O4tGP4MCPPccMvoOMjscI2Ozs7NsX/Eb7Ddhms5ZqfVjIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186660; a=rsa-sha256; cv=none; b=BYtVP34AdBq5d0AsFDs3BPuaJfeHK6+2RhtUXlEhWeUZDXY66yvFfGGGisuomnf0nJq6IF TKDId4xx1VjcL6DblAHVFkS01qSC1lZ64cMfwkrjTn4hq8AJFM3fRMpDd3wV4jqtX1tP2K SnKj0qoQ/NeFoj5ESCWQ6aJKkNs8F0kSpQhuJIJ7bUhczRBhoh7+yZDojyCDNGjtvreblt vQPwmubk0mtpiK7DUNcWgiHfGU9p8f48rDHkHxXl2ybwd5za3RLOUS19JRag980gs4/hab A9wq/7FkMWWNydX60Ffcvm1FV86FI1VkRy4BeHt2BamOcDlG3T30kxATQj9X4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpGq6PmXzmMy; Sun, 6 Oct 2024 03:50:59 +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 4963oxj1003164; Sun, 6 Oct 2024 03:50:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963ox3g003161; Sun, 6 Oct 2024 03:50:59 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:50:59 GMT Message-Id: <202410060350.4963ox3g003161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 98e48cd46046 - stable/13 - igc: Remove non-existent legacy absolute and packet timers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98e48cd460465b12c39434430c3c35a6f907acb6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=98e48cd460465b12c39434430c3c35a6f907acb6 commit 98e48cd460465b12c39434430c3c35a6f907acb6 Author: Kevin Bowling AuthorDate: 2024-09-29 04:32:49 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:50:02 +0000 igc: Remove non-existent legacy absolute and packet timers igc, derived from igb, does not use these registers. All interrupt timing is governed by EITR or LLI and driven by write-back. Sponsored by: BBOX.io (cherry picked from commit a40ecb6f740530fb7e6a95e702113aa3fe24d975) --- sys/dev/igc/if_igc.c | 109 ------------------------------------------------- sys/dev/igc/if_igc.h | 59 -------------------------- sys/dev/igc/igc_regs.h | 5 --- 3 files changed, 173 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 8de044169269..19bedd52a1bc 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -121,9 +121,6 @@ static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); static void igc_print_debug_info(struct igc_adapter *); static int igc_is_valid_ether_addr(u8 *); -static int igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS); -static void igc_add_int_delay_sysctl(struct igc_adapter *, const char *, - const char *, struct igc_int_delay_info *, int, int); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_adapter *); static void igc_release_hw_control(struct igc_adapter *); @@ -212,12 +209,6 @@ static driver_t igc_if_driver = { * Tunable default values. *********************************************************************/ -#define IGC_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) -#define IGC_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) - -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -230,22 +221,6 @@ static int igc_disable_crc_stripping = 0; SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); -static int igc_tx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TIDV_VAL); -static int igc_rx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RDTR_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &igc_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &igc_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); - -static int igc_tx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TADV_VAL); -static int igc_rx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RADV_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_abs_int_delay, CTLFLAG_RDTUN, - &igc_tx_abs_int_delay_dflt, 0, - "Default transmit interrupt delay limit in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, - &igc_rx_abs_int_delay_dflt, 0, - "Default receive interrupt delay limit in usecs"); - static int igc_smart_pwr_down = false; SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); @@ -537,29 +512,6 @@ igc_if_attach_pre(if_ctx_t ctx) igc_setup_msix(ctx); igc_get_bus_info(hw); - /* Set up some sysctls for the tunable interrupt delays */ - igc_add_int_delay_sysctl(adapter, "rx_int_delay", - "receive interrupt delay in usecs", &adapter->rx_int_delay, - IGC_REGISTER(hw, IGC_RDTR), igc_rx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_int_delay", - "transmit interrupt delay in usecs", &adapter->tx_int_delay, - IGC_REGISTER(hw, IGC_TIDV), igc_tx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &adapter->rx_abs_int_delay, - IGC_REGISTER(hw, IGC_RADV), - igc_rx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &adapter->tx_abs_int_delay, - IGC_REGISTER(hw, IGC_TADV), - igc_tx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "itr", - "interrupt delay limit in usecs/4", - &adapter->tx_itr, - IGC_REGISTER(hw, IGC_ITR), - DEFAULT_ITR); - hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; @@ -2016,12 +1968,6 @@ igc_initialize_receive_unit(if_ctx_t ctx) if (!igc_disable_crc_stripping) rctl |= IGC_RCTL_SECRC; - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - IGC_WRITE_REG(hw, IGC_ITR, DEFAULT_ITR); - rxcsum = IGC_READ_REG(hw, IGC_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM) { rxcsum |= IGC_RXCSUM_CRCOFL; @@ -2718,61 +2664,6 @@ igc_print_nvm_info(struct igc_adapter *adapter) printf("\n"); } -static int -igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS) -{ - struct igc_int_delay_info *info; - struct igc_adapter *adapter; - u32 regval; - int error, usecs, ticks; - - info = (struct igc_int_delay_info *) arg1; - usecs = info->value; - error = sysctl_handle_int(oidp, &usecs, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (usecs < 0 || usecs > IGC_TICKS_TO_USECS(65535)) - return (EINVAL); - info->value = usecs; - ticks = IGC_USECS_TO_TICKS(usecs); - if (info->offset == IGC_ITR) /* units are 256ns here */ - ticks *= 4; - - adapter = info->adapter; - - regval = IGC_READ_OFFSET(&adapter->hw, info->offset); - regval = (regval & ~0xffff) | (ticks & 0xffff); - /* Handle a few special cases. */ - switch (info->offset) { - case IGC_RDTR: - break; - case IGC_TIDV: - if (ticks == 0) { - adapter->txd_cmd &= ~IGC_TXD_CMD_IDE; - /* Don't write 0 into the TIDV register. */ - regval++; - } else - adapter->txd_cmd |= IGC_TXD_CMD_IDE; - break; - } - IGC_WRITE_OFFSET(&adapter->hw, info->offset, regval); - return (0); -} - -static void -igc_add_int_delay_sysctl(struct igc_adapter *adapter, const char *name, - const char *description, struct igc_int_delay_info *info, - int offset, int value) -{ - info->adapter = adapter; - info->offset = offset; - info->value = value; - SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), - OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - info, 0, igc_sysctl_int_delay, "I", description); -} - /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index fde9429b5360..a34aa53581ba 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -131,65 +131,6 @@ #define IGC_DEFAULT_MULTI_RXD 4096 #define IGC_MAX_RXD 4096 -/* - * IGC_TIDV_VAL - Transmit Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value delays the generation of transmit interrupts in units of - * 1.024 microseconds. Transmit interrupt reduction can improve CPU - * efficiency if properly tuned for specific network traffic. If the - * system is reporting dropped transmits, this value may be set too high - * causing the driver to run out of available transmit descriptors. - */ -#define IGC_TIDV_VAL 64 - -/* - * IGC_TADV_VAL - Transmit Absolute Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * transmit interrupt is generated. Useful only if IGC_TIDV is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is sent on the wire within the set amount of time. Proper tuning, - * along with IGC_TIDV_VAL, may improve traffic throughput in specific - * network conditions. - */ -#define IGC_TADV_VAL 64 - -/* - * IGC_RDTR_VAL - Receive Interrupt Delay Timer (Packet Timer) - * Valid Range: 0-65535 (0=off) - * Default Value: 0 - * This value delays the generation of receive interrupts in units of 1.024 - * microseconds. Receive interrupt reduction can improve CPU efficiency if - * properly tuned for specific network traffic. Increasing this value adds - * extra latency to frame reception and can end up decreasing the throughput - * of TCP traffic. If the system is reporting dropped receives, this value - * may be set too high, causing the driver to run out of available receive - * descriptors. - * - * CAUTION: When setting IGC_RDTR to a value other than 0, adapters - * may hang (stop transmitting) under certain network conditions. - * If this occurs a WATCHDOG message is logged in the system - * event log. In addition, the controller is automatically reset, - * restoring the network connection. To eliminate the potential - * for the hang ensure that IGC_RDTR is set to 0. - */ -#define IGC_RDTR_VAL 0 - -/* - * Receive Interrupt Absolute Delay Timer - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * receive interrupt is generated. Useful only if IGC_RDTR is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is received within the set amount of time. Proper tuning, - * along with IGC_RDTR, may improve traffic throughput in specific network - * conditions. - */ -#define IGC_RADV_VAL 64 - /* * This parameter controls whether or not autonegotation is enabled. * 0 - Disable autonegotiation diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index f4ded07ce6ab..26614dc33df6 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -27,7 +27,6 @@ #define IGC_CONNSW 0x00034 /* Copper/Fiber switch control - RW */ #define IGC_VET 0x00038 /* VLAN Ether Type - RW */ #define IGC_ICR 0x01500 /* Intr Cause Read - RC/W1C */ -#define IGC_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ #define IGC_ICS 0x01504 /* Intr Cause Set - WO */ #define IGC_IMS 0x01508 /* Intr Mask Set/Read - RW */ #define IGC_IMC 0x0150C /* Intr Mask Clear - WO */ @@ -78,8 +77,6 @@ #define IGC_FCRTV 0x02460 /* Flow Control Refresh Timer Value - RW */ /* Split and Replication Rx Control - RW */ #define IGC_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */ -#define IGC_RDTR 0x02820 /* Rx Delay Timer - RW */ -#define IGC_RADV 0x0282C /* Rx Interrupt Absolute Delay Timer - RW */ /* Shadow Ram Write Register - RW */ #define IGC_SRWR 0x12018 #define IGC_EEC_REG 0x12010 @@ -148,8 +145,6 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ -#define IGC_TIDV 0x03820 /* Tx Interrupt Delay Value - RW */ -#define IGC_TADV 0x0382C /* Tx Interrupt Absolute Delay Val - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Oct 6 03:51:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLpGs3my2z5YCWx; Sun, 06 Oct 2024 03:51: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 4XLpGs122xz4G7N; Sun, 6 Oct 2024 03:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+ZMwRZGsBvT1TipRb5x1LIu/hqVmq3EiauOlSx5KoM=; b=KXM29xDUp47quqozdOO2aDJZGSnbCKf3JxB/UlqWwd5sKIKYFzc7akBAUXBCYKGrHdMFGX qDRBNLfGez4ypXtUGEXJ+5bGq6jKBSGkX5uVxD0X4H5yLM1l0vWmuQWC87AckaBptHdAJ8 Vw6FaBSO7a6QCkRSx/NYOn4yEoDiif34+4i5DV8yXGyhQhKnNfNGaJuZttInbl6GDDaGbX Drt5glCv0zrXIMjzQaHM40EM2TNoQZ9Tcb3n/X8TFX4oq90YUkF4uOqgqXXMHLewG3UIj2 lGD8HM5xbYWU8VtHid1LvHQsxnNwITJdORzDgDEXtKVY1MJ6cC7fjRieBDzf1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728186661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+ZMwRZGsBvT1TipRb5x1LIu/hqVmq3EiauOlSx5KoM=; b=pVRcHBj/3NpUOL4U9ZDvgFHtPkWeXqy+peCxRwNvYh5y9oLjwC+MS0bTwNvWDaFMNKZyPH e8bC9TNVpbUD5nSjiP4DKlR+NPxTFvGnQRSSl/XbktgqSTxLyO4aZd97DyvflPPkwCSi9Y 8j/+8hDO/tbaVnJy5/MGjfeu27IuU6tYoPv1hofDKQOhs1w8NG8331bf33OAkbhWJwCmvr +7/7KMj0GYk1wDbovTLWCzofK4H2Q3jiZVC5Vt4y9AvHxBq+FQMfRX00YoQkRX6Kgt/pt6 nRsDSnsmoZ0xr9MCjNbqk4mRljMoZ138JvEgCksSLdl+qeoC6//a3lVf97/4fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728186661; a=rsa-sha256; cv=none; b=GjaqxjFBIew7Pq24ID8IymQ91A+tw01buFr25nqYNfWlTAuo7ERrRJrPosESGHaqDjZlBa OT94HXA3wvpeR+3GHAb8TzeSoysdMcUmhGSXXNBg9IWByG/1nwPFMno7HqyQYnV/TdKQHD rccNf4JLWl7PLvwAbP2ljoM4e7gRZRTAj6BhtdtH1BuXm9KTdDBW23udcL//Y76Ld1OwNx vVWsSGJeR9ZW9YHSLPM+vYXLxPopzc7kupii3jk+v+jQ9eJTHwH/QN5ufwMtlVgZwZ8+hi i3S1VUHvNr9yr+qyoNAjy3iyjN2lLUHqFoiyKC2BeYbnRSfFVSy9qjLm3Lfcag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLpGs0df9zmmW; Sun, 6 Oct 2024 03:51: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 4963p0bk003215; Sun, 6 Oct 2024 03:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4963p0v2003212; Sun, 6 Oct 2024 03:51:00 GMT (envelope-from git) Date: Sun, 6 Oct 2024 03:51:00 GMT Message-Id: <202410060351.4963p0v2003212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b887b25317cb - stable/13 - igc: Add NVM/firmware prints and sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b887b25317cbc99cdfca232054fe76bbf0d06679 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b887b25317cbc99cdfca232054fe76bbf0d06679 commit b887b25317cbc99cdfca232054fe76bbf0d06679 Author: Kevin Bowling AuthorDate: 2024-09-29 09:23:38 +0000 Commit: Kevin Bowling CommitDate: 2024-10-06 03:50:14 +0000 igc: Add NVM/firmware prints and sysctl This chipset suffered an (un)usual number of bugs and iterations. Let's add our NVM/firmware code from e1000 and the similar igc_nvm function from DPDK to keep track of issues. Sponsored by: BBOX.io (cherry picked from commit 33ed9bdca307bedb3d66a50ed7d4d7b4bf4acf39) --- sys/dev/igc/if_igc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/if_igc.h | 2 + sys/dev/igc/igc_defines.h | 28 +++++++++++-- sys/dev/igc/igc_nvm.c | 81 ++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_nvm.h | 18 ++++++++ 5 files changed, 229 insertions(+), 4 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 19bedd52a1bc..1f06baee02e4 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -115,6 +115,10 @@ static void igc_update_stats_counters(struct igc_adapter *); static void igc_add_hw_stats(struct igc_adapter *adapter); static int igc_if_set_promisc(if_ctx_t ctx, int flags); static void igc_setup_vlan_hw_support(if_ctx_t ctx); +static void igc_fw_version(struct igc_adapter *); +static void igc_sbuf_fw_version(struct igc_fw_version *, struct sbuf *); +static void igc_print_fw_version(struct igc_adapter *); +static int igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS); static int igc_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); static void igc_print_nvm_info(struct igc_adapter *); static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); @@ -441,6 +445,12 @@ igc_if_attach_pre(if_ctx_t ctx) OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, + adapter, 0, igc_sysctl_print_fw_version, "A", + "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, @@ -587,6 +597,11 @@ igc_if_attach_pre(if_ctx_t ctx) goto err_late; } + /* Save the EEPROM/NVM versions */ + igc_fw_version(adapter); + + igc_print_fw_version(adapter); + /* * Get Wake-on-Lan and Management info for later use */ @@ -2613,6 +2628,95 @@ igc_add_hw_stats(struct igc_adapter *adapter) "Rx Desc Min Thresh Count"); } +static void +igc_fw_version(struct igc_adapter *sc) +{ + struct igc_hw *hw = &sc->hw; + struct igc_fw_version *fw_ver = &sc->fw_ver; + + *fw_ver = (struct igc_fw_version){0}; + + igc_get_fw_version(hw, fw_ver); +} + +static void +igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) +{ + const char *space = ""; + + if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { + sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, + fw_ver->eep_minor, fw_ver->eep_build); + space = " "; + } + + if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); + space = " "; + } + + if (fw_ver->or_valid) { + sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); + space = " "; + } + + if (fw_ver->etrack_id) + sbuf_printf(buf, "%seTrack 0x%08x", space, fw_ver->etrack_id); +} + +static void +igc_print_fw_version(struct igc_adapter *sc ) +{ + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_auto(); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return; + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + else if (sbuf_len(buf)) + device_printf(dev, "%s\n", sbuf_data(buf)); + + sbuf_delete(buf); +} + +static int +igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS) +{ + struct igc_adapter *sc = (struct igc_adapter *)arg1; + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return (ENOMEM); + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + + sbuf_delete(buf); + + return (0); +} + /********************************************************************** * * This routine provides a way to dump out the adapter eeprom, diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index a34aa53581ba..ccebe04ff185 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -332,6 +332,8 @@ struct igc_adapter { u64 que_mask; + struct igc_fw_version fw_ver; + struct igc_int_delay_info tx_int_delay; struct igc_int_delay_info tx_abs_int_delay; struct igc_int_delay_info rx_int_delay; diff --git a/sys/dev/igc/igc_defines.h b/sys/dev/igc/igc_defines.h index 1701918c3a9c..e9ebd23c41c3 100644 --- a/sys/dev/igc/igc_defines.h +++ b/sys/dev/igc/igc_defines.h @@ -967,11 +967,31 @@ #define IGC_FLASH_UPDATES 2000 /* NVM Word Offsets */ -#define NVM_COMPAT 0x0003 -#define NVM_ID_LED_SETTINGS 0x0004 -#define NVM_FUTURE_INIT_WORD1 0x0019 -#define NVM_COMPAT_VALID_CSUM 0x0001 +#define NVM_COMPAT 0x0003 +#define NVM_ID_LED_SETTINGS 0x0004 +#define NVM_VERSION 0x0005 +#define NVM_FUTURE_INIT_WORD1 0x0019 +#define NVM_COMPAT_VALID_CSUM 0x0001 #define NVM_FUTURE_INIT_WORD1_VALID_CSUM 0x0040 +#define NVM_ETRACK_WORD 0x0042 +#define NVM_ETRACK_HIWORD 0x0043 +#define NVM_COMB_VER_OFF 0x0083 +#define NVM_COMB_VER_PTR 0x003d + +/* NVM version defines */ +#define NVM_MAJOR_MASK 0xF000 +#define NVM_MINOR_MASK 0x0FF0 +#define NVM_IMAGE_ID_MASK 0x000F +#define NVM_COMB_VER_MASK 0x00FF +#define NVM_MAJOR_SHIFT 12 +#define NVM_MINOR_SHIFT 4 +#define NVM_COMB_VER_SHFT 8 +#define NVM_VER_INVALID 0xFFFF +#define NVM_ETRACK_SHIFT 16 +#define NVM_ETRACK_VALID 0x8000 +#define NVM_NEW_DEC_MASK 0x0F00 +#define NVM_HEX_CONV 16 +#define NVM_HEX_TENS 10 #define NVM_INIT_CONTROL2_REG 0x000F #define NVM_INIT_CONTROL3_PORT_B 0x0014 diff --git a/sys/dev/igc/igc_nvm.c b/sys/dev/igc/igc_nvm.c index d86e04ffa0dc..b476a5fdbeac 100644 --- a/sys/dev/igc/igc_nvm.c +++ b/sys/dev/igc/igc_nvm.c @@ -716,4 +716,85 @@ static void igc_reload_nvm_generic(struct igc_hw *hw) IGC_WRITE_FLUSH(hw); } +/** + * igc_get_fw_version - Get firmware version information + * @hw: pointer to the HW structure + * @fw_vers: pointer to output version structure + * + * unsupported/not present features return 0 in version structure + **/ +void igc_get_fw_version(struct igc_hw *hw, struct igc_fw_version *fw_vers) +{ + u16 eeprom_verh, eeprom_verl, etrack_test, fw_version; + u8 q, hval, rem, result; + u16 comb_verh, comb_verl, comb_offset; + + memset(fw_vers, 0, sizeof(struct igc_fw_version)); + /* + * basic eeprom version numbers, bits used vary by part and by tool + * used to create the nvm images. Check which data format we have. + */ + switch (hw->mac.type) { + case igc_i225: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + /* find combo image version */ + hw->nvm.ops.read(hw, NVM_COMB_VER_PTR, 1, &comb_offset); + if (comb_offset && comb_offset != NVM_VER_INVALID) { + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset + 1, + 1, &comb_verh); + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset, + 1, &comb_verl); + + /* get Option Rom version if it exists and is valid */ + if (comb_verh && comb_verl && + comb_verh != NVM_VER_INVALID && + comb_verl != NVM_VER_INVALID) { + fw_vers->or_valid = true; + fw_vers->or_major = comb_verl >> + NVM_COMB_VER_SHFT; + fw_vers->or_build = (comb_verl << + NVM_COMB_VER_SHFT) | + (comb_verh >> + NVM_COMB_VER_SHFT); + fw_vers->or_patch = comb_verh & + NVM_COMB_VER_MASK; + } + } + break; + default: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + return; + } + hw->nvm.ops.read(hw, NVM_VERSION, 1, &fw_version); + fw_vers->eep_major = (fw_version & NVM_MAJOR_MASK) + >> NVM_MAJOR_SHIFT; + + /* check for old style version format in newer images*/ + if ((fw_version & NVM_NEW_DEC_MASK) == 0x0) { + eeprom_verl = (fw_version & NVM_COMB_VER_MASK); + } else { + eeprom_verl = (fw_version & NVM_MINOR_MASK) + >> NVM_MINOR_SHIFT; + } + /* Convert minor value to hex before assigning to output struct + * Val to be converted will not be higher than 99, per tool output + */ + q = eeprom_verl / NVM_HEX_CONV; + hval = q * NVM_HEX_TENS; + rem = eeprom_verl % NVM_HEX_CONV; + result = hval + rem; + fw_vers->eep_minor = result; + + if ((etrack_test & NVM_MAJOR_MASK) == NVM_ETRACK_VALID) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verl); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) + | eeprom_verl; + } else if ((etrack_test & NVM_ETRACK_VALID) == 0) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) | + eeprom_verl; + } +} diff --git a/sys/dev/igc/igc_nvm.h b/sys/dev/igc/igc_nvm.h index eae0db4b484b..b4b602af6595 100644 --- a/sys/dev/igc/igc_nvm.h +++ b/sys/dev/igc/igc_nvm.h @@ -7,6 +7,22 @@ #ifndef _IGC_NVM_H_ #define _IGC_NVM_H_ +struct igc_fw_version { + u32 etrack_id; + u16 eep_major; + u16 eep_minor; + u16 eep_build; + + u8 invm_major; + u8 invm_minor; + u8 invm_img_type; + + bool or_valid; + u16 or_major; + u16 or_build; + u16 or_patch; +}; + void igc_init_nvm_ops_generic(struct igc_hw *hw); s32 igc_null_read_nvm(struct igc_hw *hw, u16 a, u16 b, u16 *c); void igc_null_nvm_generic(struct igc_hw *hw); @@ -26,5 +42,7 @@ s32 igc_write_nvm_spi(struct igc_hw *hw, u16 offset, u16 words, u16 *data); s32 igc_update_nvm_checksum_generic(struct igc_hw *hw); void igc_release_nvm_generic(struct igc_hw *hw); +void igc_get_fw_version(struct igc_hw *hw, + struct igc_fw_version *fw_vers); #endif From nobody Sun Oct 6 11:07:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyL6KHyz5XgLc; Sun, 06 Oct 2024 11:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLzyL5nkGz4sFk; Sun, 6 Oct 2024 11:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nt7aWhBdPRwBwaOmaRwKPcEjRqQcVRLaeUb9JiWWmC8=; b=ITHx8azr+m7nu7OPScztlk6cW31kjI21kx7lQEtY14+58RlUexcWO0CXA/il30zPdE3z+F MwgYIGu0NsTch4KBL27HNtTKNwAKK2nwH9m1Q/pYio7r169TNLi5pFEBwer8AkLwPejhEX Tk4wOLXZ73ZXEXr+5FriXH8olqYhB75ehqw3ySYYQqXLSfHUcNRYfO1CWA8jk4t/dp3pa5 bd2VMrT3Vpo5CsskqFxNttpGyxgrS7kGPdoJwqY0rBlKI3xFtZyDe45nY2XnKgdUamSSGI MbReR+9e4LC68n7e8g5BvO47hs1Nt0+n2t4rQqAx8jKnzdxJYDqln7nVX5oHSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nt7aWhBdPRwBwaOmaRwKPcEjRqQcVRLaeUb9JiWWmC8=; b=kC+dNfbD46wMnAzUjoLZ3/DNC6EzLiTHBmmiL4U3r0B65R/5hmr+pUs8TOS4gZUZ5f+QyR tU1Kr9dNvjHzn7KdFWY0fbUvacg9+NNMYD1+IQY0pnYoBAjubGgc/6DdJyh4IHvX0PVlkR iaGyP2zkiWK3+inQ44j/ORjI2hIE/5FcmeoEPOMl04IDdp6g1PXFdqbENcLRlvMhvjKJ8/ KmkjI4C21WFJnabiyrQeMy9+8DTLlAKRbg8FFiITfAfAP7aPfejq2Mv8KGyFSV+bliVW5b oyEsxQy1J8E3ErN7giSODiD2JRjwIF+ZGS7uXm0FB0XnZpqWGO2WUAkh1+xMlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212842; a=rsa-sha256; cv=none; b=sDbeM6W0J2pANAga4BHCPR+e43D1dZdoYvx+i06PKC/eEo5nfAdklDtVsg+RhqP5waTku8 S081DGFxnUcYwHq1GUU6QmNOmprQ4qIzeGm9VpHASZ+mlDN9Gu/xfQIvp5KYvRbCjd3wEF +TdLIbJrIPJ5xrVwwit9lJ1eNMUE58tvZtQMcd3QE+YxWCooWTtXWSq1MiWrI1bdbBwvyU roHDtq6U9Y5bsGrKFAda8r3K+hQ+2WXe+xxd1+PA+/Ypvtz/8iBUnEc9HPDPG5iXDJs6aI FpP41DlKvwkfocZJ8w73JIx4/hbRqOB2WVM33poIddyXHbHz73KleL3TchKyqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyL5KlSz101R; Sun, 6 Oct 2024 11:07:22 +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 496B7MuC039054; Sun, 6 Oct 2024 11:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7MKC039051; Sun, 6 Oct 2024 11:07:22 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:22 GMT Message-Id: <202410061107.496B7MKC039051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8d65747f7c6f - stable/14 - locate.updatedb: Explicitly exit from trap code. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d65747f7c6f61a0ee9304aaffcfdee9f885b9d5 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8d65747f7c6f61a0ee9304aaffcfdee9f885b9d5 commit 8d65747f7c6f61a0ee9304aaffcfdee9f885b9d5 Author: Dag-Erling Smørgrav AuthorDate: 2024-08-29 15:05:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:11:56 +0000 locate.updatedb: Explicitly exit from trap code. When a signal is trapped, the script continues after the trap code has run, unless the trap code explicitly exits. In the particular case of locate.updatedb, this is mostly harmless, except that the trap code is executed twice (once for the signal and once when we reach the end of the script), but it's still worth fixing. Furthermore, install the trap as soon as we've created the temporary directory, to minimize the window during which we can fail to clean up after ourselves if interrupted. While here, simplify the empty check at the end and make some minor style tweaks. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46475 (cherry picked from commit f62c1f3f8e91c78d402e1db4e518e4899a4ba2b9) locate.updatedb: Revert to using cat to copy the db. This script is usually run unprivileged, so install fails to create a temporary file while copying the finished database. Revert to using cat, which can overwrite the existing file as it is usually owned by the same user which is running the script. Fixes: f62c1f3f8e91 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46872 (cherry picked from commit 26bd374e72681860af4bf9d639308ad245949460) --- usr.bin/locate/locate/updatedb.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index ff7ec7f6c18e..7d42cbb2260d 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -42,13 +42,14 @@ fi # The directory containing locate subprograms : ${LIBEXECDIR:=/usr/libexec}; export LIBEXECDIR : ${TMPDIR:=/tmp}; export TMPDIR -if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXXXXXX`; then +if ! TMPDIR=$(mktemp -d $TMPDIR/locateXXXXXXXXXX); then exit 1 fi +tmp=$TMPDIR/_updatedb$$ +trap 'rc=$?; rm -f $tmp; rmdir $TMPDIR; trap - 0; exit $rc' 0 1 2 3 5 10 15 PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH - : ${mklocatedb:=locate.mklocatedb} # make locate database program : ${FCODES:=/var/db/locate.database} # the database : ${SEARCHPATHS="/"} # directories to be put in the database @@ -87,17 +88,13 @@ if [ -n "$PRUNEDIRS" ]; then done fi -tmp=$TMPDIR/_updatedb$$ -trap 'rm -f $tmp; rmdir $TMPDIR' 0 1 2 3 5 10 15 - # search locally if $find -s $SEARCHPATHS $excludes -or -print 2>/dev/null | $mklocatedb -presort > $tmp then - if [ -n "$($find $tmp -size -257c -print)" ]; then + if ! grep -aq / $tmp; then echo "updatedb: locate database $tmp is empty" >&2 exit 1 - else - cat $tmp > $FCODES # should be cp? fi + cat $tmp >$FCODES fi From nobody Sun Oct 6 11:07:23 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyM6f2Mz5XgCl; Sun, 06 Oct 2024 11:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLzyM6370z4sJF; Sun, 6 Oct 2024 11:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SydC2Byda/uCnA3+G2nHWK0oxHWc6KU1A8NzNT39msg=; b=XqxlufCx9heNBWgREoj6BCU+pgXv+a3aXrBQUGxxyKep87DdckzjNriOero60hgpVMgcfC 7yDn8p20ntR0AtRhwN+KzRQ05I07YsScZwtBiEn6b1XrAt65IE6VjDxkfP9VBYhzwLdqw+ XWL0dIUB+5YcFFaYn7+6DMQ6wgHSI/5GOGE0nL9O1v6VfYYL6//t01LoVHtKhs1LaywRn8 ZE2oz94mEk8B1U4mH+zNmhYQDOMfBMaG+cGZpPoM9spVJQGSTKMULOXwh7PSuECtT3kvkX 86mRas6FGJc0nTdTIiCkOg7+keI8f/iI3P7bWMPtvKrNtiu3chdZM0lGhon+/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SydC2Byda/uCnA3+G2nHWK0oxHWc6KU1A8NzNT39msg=; b=WF4rv2bBeXfPLsAF/YxLywWZGWPfyEqcHMteqBcKMFTJGGKHS3wEolQ96c0BjbXU33ZkDt xLzGTI0YKsHlG81fUvdQ03CWQU0FfGj4w0fiRdKR1A/I9KKYS2G3+FzoTmBZ1ZbXV6d6EA HpZSkhMQkG8aX0p4xEI4tj9oyr6CbZckxxQecaOlnlf7wqUlSj0yCUDRr3wmRr7CWMzbWG e8iFDYsg1mHDDvoOw3RTOX98gEdrShvbQB5vxnVaAMZwfjrBUorBzvcqlqn/L6mU5kZE0S wCMxG0t4wzG3BJpnJWyDkzp+ZiWF106JCBvEerhtpMt9dt0QRqsxccdJIXpWeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212843; a=rsa-sha256; cv=none; b=idwBF6CoIRdMtTn5+Zv7YnoQgAgZmTljw9jGTUn3HrdPgi6qTuvx+re4TSJbV9L9WqZfhm e85jAtTDslMLxvygGk52/A+VG1HIW2JwuSKV59UCZxFcMmgh7z27OMv2oLx2eb5c4uvrOq xcjke2IB9Goe9U9cSjZTH9+1g9XVr5xEif+UWZr0JhQuigtKDUSeUOb5QuwY74biEKwNe/ IVJu5EXxTXq18yQuR4NGrCSW0bZjjlJyxZiH+Gn2+HqaRCs5JgiSJlc2czwZGtDBBNX/X4 xR2qK6PhOjP/8Jrc+Tc5B+7hspTfDAzhghNmaWgDJEkET3UcM/prtosbogYDpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyM5dCkz10d5; Sun, 6 Oct 2024 11:07: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 496B7N4K039110; Sun, 6 Oct 2024 11:07:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7NGX039107; Sun, 6 Oct 2024 11:07:23 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:23 GMT Message-Id: <202410061107.496B7NGX039107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d2c02cfae55a - stable/14 - date: Fix a few nits. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d2c02cfae55a1ffb179b55f45a89606845e1acfb Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d2c02cfae55a1ffb179b55f45a89606845e1acfb commit d2c02cfae55a1ffb179b55f45a89606845e1acfb Author: Dag-Erling Smørgrav AuthorDate: 2024-09-04 17:32:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:12:24 +0000 date: Fix a few nits. * Don't use `asprintf()` when `strdup()` can do the job just as well. * Fix a couple of typos in a comment. Fixes: eeb04a736cb9 MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46533 (cherry picked from commit a8ddd1926a34fc20970d9ceaad71b31fc414b1c5) date: Documentation nits. * Fix spurious capitalization. * Fix inconsistent quoting. * Use `Dq` rather than ASCII double quotes. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D46622 (cherry picked from commit 355ebf80b1ed98cf7ca9c51ce7e3e6dcb376853d) --- bin/date/date.1 | 9 ++++++--- bin/date/date.c | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/date/date.1 b/bin/date/date.1 index 29cde37ca904..62d28a7df0a0 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 2, 2024 +.Dd September 10, 2024 .Dt DATE 1 .Os .Sh NAME @@ -538,8 +538,11 @@ Finally the command .Pp .Dl "TZ=America/Los_Angeles date -z Europe/Paris -j 0900" .Pp -will print the time in the "Europe/Paris" timezone when it is 9:00 in The -America/Los_Angeles timezone. +will print the time in the +.Dq Europe/Paris +timezone when it is 9:00 in the +.Dq America/Los_Angeles +timezone. .Sh DIAGNOSTICS It is invalid to combine the .Fl I diff --git a/bin/date/date.c b/bin/date/date.c index 6b6e1f69cabc..d32993dc1eda 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -395,8 +395,8 @@ strftime_ns(char * __restrict s, size_t maxsize, const char * __restrict format, bool seen_percent; seen_percent = false; - if (asprintf(&newformat, "%s", format) < 0) - err(1, "asprintf"); + if ((newformat = strdup(format)) == NULL) + err(1, "strdup"); tok = newformat; for (tok = newformat; *tok != '\0'; tok++) { switch (*tok) { @@ -418,9 +418,9 @@ strftime_ns(char * __restrict s, size_t maxsize, const char * __restrict format, suffix = tok + 1; /* * Construct a new format string from the - * prefix (i.e., the part of the old fromat + * prefix (i.e., the part of the old format * from its beginning to the currently handled - * "%N" conversion specification, the + * "%N" conversion specification), the * nanoseconds, and the suffix (i.e., the part * of the old format from the next token to the * end). From nobody Sun Oct 6 11:07:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyP1KtQz5XgYw; Sun, 06 Oct 2024 11:07: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 4XLzyP02gTz4rw3; Sun, 6 Oct 2024 11:07:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaGLmGyk+ICDZ62Tp70F+I997k3URiHdrDpJ88a/qPY=; b=bkKoacUzRjVQt/dnKXtkr4OijNuyksiHXxDYv7tIITGeboVSrAAB61Y0gkm3SGXQ8JC3// JR0i06F+YXoTOh7UecEXKgWXXWZtJlZVt4XKQPl8RO64mpXczZfqXxuQGxM1aZII+tvE/r VWyA6BPAkj+LL8o44JR2O8M5ZBWj0AwQ1d1Zb086zWEh3yO1jJxHTSyiyTK/U3qOJzFEcc CbG3h4tDbxYE8XCo+RxCVa+HRNBhMay5JEj0bNP0dZjZbLW24zkFjrC4TYLQ6X9mWuoq/m AmR6VUevd3QnTm/A8TePvzhYZm0J0YlrufyGt1jWs54hTAXOz//SkptrJPWCNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaGLmGyk+ICDZ62Tp70F+I997k3URiHdrDpJ88a/qPY=; b=jf8fXoIhie8KHt/ei54CGlEbIHvv+5ntD1ShoevxSjPu0pCPW9k/sxY91Xig3r8+eaTl2G iPk2ibnxvb7yYyTW7L5cstTEqiOIX2RG0YbSSTjzgWBvVWHEjXmfWDXfWJIRxenyXGvaPR QTpXQPFjBi6kNK8/eV6wM1HoUuB9J4N9EAWfXfrtKc44UeudaIS9Sh0xODvsSrVsotW8f+ 8n7n1xShlXg8NYGCIRPXyLVfseQxqbHM7ENn9EmtZEXYbBKVqfZxUV18yBoREHmkgY4aWE ekiYMFolMd7YYN+1LIeAF6WJKplcrLJDe+SPtnhse9bxvyGyZJ5cMWsD8TAiXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212845; a=rsa-sha256; cv=none; b=JqF3woHyRp4wQDP2gJ55OzgettPNxGQKF1QqVXpXNoNjaveh+g1/gpczKtVrKLkYkRoh/P rBRFBf8y+Qfzz4u6CtO6gi4sY3Cud9lNYJ4GIorIAymaua3h07nMLV71pRbnN0xiuqbBJd 6zMPfrwK2prBzD2LbDWlmclNuvD5+Ew2PXRPJd/nhx2yyWkfo+5xBMUzY11cB688X4wGJJ ATu4TMabFM5aldFb1n8hIsCCFVjzqggv9NhhKafHcroUwQywI3pgaUi8/KRahi6HJhSU2l a8oaVkKYsW8JrbqmqcNOsjEwbB/f1PXrSgR2htNOEwQl89wz6qqCbNs2udUsJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyN6WcLz10Sn; Sun, 6 Oct 2024 11:07: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 496B7Ow7039171; Sun, 6 Oct 2024 11:07:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7OL7039165; Sun, 6 Oct 2024 11:07:24 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:24 GMT Message-Id: <202410061107.496B7OL7039165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 113e746686db - stable/14 - Update tzcode to 2024b. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 113e746686dbd57c2700a1ece970d262ea57092f Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=113e746686dbd57c2700a1ece970d262ea57092f commit 113e746686dbd57c2700a1ece970d262ea57092f Author: Dag-Erling Smørgrav AuthorDate: 2024-09-07 13:46:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:12:49 +0000 Update tzcode to 2024b. MFC after: 3 weeks Sponsored by: Klara, Inc. Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D46565 (cherry picked from commit a979394afeb5c20fc58c5f5b005d51eb8f92f666) --- contrib/tzcode/CONTRIBUTING | 18 +- contrib/tzcode/Makefile | 412 +++++++++++++++++++++++-------------------- contrib/tzcode/NEWS | 124 ++++++++++++- contrib/tzcode/asctime.c | 19 +- contrib/tzcode/localtime.c | 87 ++------- contrib/tzcode/newctime.3 | 102 ++++++----- contrib/tzcode/newstrftime.3 | 30 ++-- contrib/tzcode/newtzset.3 | 66 +++++-- contrib/tzcode/private.h | 114 +++++++----- contrib/tzcode/theory.html | 214 ++++++++++++++-------- contrib/tzcode/tz-art.html | 5 + contrib/tzcode/tz-link.html | 113 +++++++----- contrib/tzcode/tzfile.5 | 38 ++-- contrib/tzcode/tzfile.h | 8 +- contrib/tzcode/tzselect.ksh | 125 ++++++------- contrib/tzcode/version | 2 +- contrib/tzcode/workman.sh | 3 +- contrib/tzcode/zdump.c | 10 +- contrib/tzcode/zic.8 | 52 +++--- contrib/tzcode/zic.c | 31 ++-- 20 files changed, 926 insertions(+), 647 deletions(-) diff --git a/contrib/tzcode/CONTRIBUTING b/contrib/tzcode/CONTRIBUTING index 6d800e4c03a3..f6edbd3be7d3 100644 --- a/contrib/tzcode/CONTRIBUTING +++ b/contrib/tzcode/CONTRIBUTING @@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read "Theory and pragmatics of the tz code and data" . It is also good to browse the mailing list archives - for examples of patches that tend -to work well. Additions to data should contain commentary citing -reliable sources as justification. Citations should use "https:" URLs -if available. + +for examples of patches that tend to work well. +Changes should contain commentary citing reliable sources. +Citations should use "https:" URLs if available. For changes that fix sensitive security-related bugs, please see the distribution's 'SECURITY' file. @@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful: * Edit source files. Include commentary that justifies the changes by citing reliable sources. - * Debug the changes, e.g.: + * Debug the changes locally, e.g.: - make check - make install + make TOPDIR=$PWD/tz clean check install ./zdump -v America/Los_Angeles + Although builds assume only basic POSIX, they use extra features + if available. 'make check' accesses validator.w3.org unless you + lack 'curl' or use 'make CURL=:'. If you have the latest GCC, + "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + * For each separable change, commit it in the new branch, e.g.: git add northamerica diff --git a/contrib/tzcode/Makefile b/contrib/tzcode/Makefile index d48354c72df4..0087b4596515 100644 --- a/contrib/tzcode/Makefile +++ b/contrib/tzcode/Makefile @@ -3,17 +3,17 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: -# On older platforms you may need to scrounge for a POSIX-conforming 'make'. -# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or -# /usr/xpg4/bin/make, not /usr/ccs/bin/make. +# On older platforms you may need to scrounge for POSIX conformance. +# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), +# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu11' "$@" +# make CC='gcc -std=gnu23' "$@" # -# This example script is appropriate for a pre-2017 GNU/Linux system -# where a non-default setting is needed to support this package's use of C99. +# This example script is appropriate for a circa 2024 GNU/Linux system +# where a non-default setting enables this package's optional use of C23. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,7 +53,7 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ +# The POSIXRULES macro controls interpretation of POSIX-like TZ # settings like TZ='EET-2EEST' that lack DST transition rules. # If POSIXRULES is '-', no template is installed; this is the default. # Any other value for POSIXRULES is obsolete and should not be relied on, as: @@ -132,8 +132,9 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib # Types to try, as an alternative to time_t. TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) -TIME_T_ALTERNATIVES_HEAD = int_least64_t -TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t +TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck +TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ + uint_least64_t.ck # What kind of TZif data files to generate. (TZif is the binary time # zone data format that zic generates; see Internet RFC 8536.) @@ -219,6 +220,7 @@ LDLIBS= # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) @@ -229,7 +231,7 @@ LDLIBS= # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext # -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares -# ctime_r and asctime_r incompatibly with the POSIX standard +# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ # -DHAVE_LINK=0 if your system lacks a link function @@ -261,8 +263,11 @@ LDLIBS= # -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers # with external linkage, e.g., applications cannot define 'localtime'. # -Dssize_t=long on hosts like MS-Windows that lack ssize_t -# -DSUPPORT_C89 if the tzcode library should support C89 callers+ -# However, this might trigger latent bugs in C99-or-later callers. +# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers +# Although -DSUPPORT_C89=0 might work around latent bugs in callers, +# it does not conform to POSIX. +# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ +# However, this might cause problems in POSIX.1-2024-or-later callers. # -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has # security implications and is not recommended for general use # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; @@ -274,7 +279,7 @@ LDLIBS= # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for POSIX.1-2017-style TZ strings lacking them, +# DST transitions for proleptic format TZ strings lacking them, # in the usual case where POSIXRULES is '-'. If not specified, # TZDEFRULESTRING defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. @@ -302,23 +307,25 @@ LDLIBS= # # * Options marked "*" can be omitted if your compiler is C23 compatible. # * Options marked "+" are obsolescent and are planned to be removed -# once the code assumes C99 or later, say in the year 2029. +# once the code assumes C99 or later (say in the year 2029) +# and POSIX.1-2024 or later (say in the year 2034). # # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ -Wall -Wextra \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \ -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \ -Wdeclaration-after-statement -Wdouble-promotion \ - -Wduplicated-branches -Wduplicated-cond \ + -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ - -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wmissing-declarations -Wmissing-prototypes \ + -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ @@ -327,10 +334,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # If your system has a "GMT offset" field in its "struct tm"s # (or if you decide to add such a field in your system's "time.h" file), @@ -341,9 +347,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # Similarly, if your system has a "zone abbreviation" field, define # -DTM_ZONE=tm_zone # and define NO_TM_ZONE to suppress any guessing. -# Although these two fields are not required by POSIX.1-2017, -# POSIX 202x/D4 requires them and they are widely available -# on GNU/Linux and BSD systems. +# Although POSIX.1-2024 requires these fields and they are widely available +# on GNU/Linux and BSD systems, some older systems lack them. # # The next batch of options control support for external variables # exported by tzcode. In practice these variables are less useful @@ -353,7 +358,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DHAVE_TZNAME=0 # do not support "tzname" # # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library # # -DHAVE_TZNAME=2 # support and define "tzname" -# # to the "CFLAGS=" line. "tzname" is required by POSIX.1-1988 and later. +# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 +# # and later, its contents are unspecified if you use a geographical TZ +# # and the variable is planned to be removed in a future POSIX edition. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause # # crashes when combined with some platforms' standard libraries, @@ -364,7 +371,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DUSG_COMPAT=1 # support, and variables are defined by system library # # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix -# # Systems Group code and are required by POSIX.1-2008 and later (with XSI). +# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), +# # although their contents are unspecified if you use a geographical TZ +# # and the variables are planned to be removed in a future edition of POSIX. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add @@ -428,18 +437,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # The name of a POSIX-like library archiver, its flags, C compiler, # linker flags, and 'make' utility. Ordinarily the defaults suffice. -# The commented-out values are the defaults specified by POSIX.1-202x/D4. +# The commented-out values are the defaults specified by POSIX.1-2024. #AR = ar #ARFLAGS = -rv #CC = c17 #LDFLAGS = #MAKE = make -# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in -# submake command lines. The default is no leap seconds. - -LEAPSECONDS= - # Where to fetch leap-seconds.list from. leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list @@ -461,7 +465,7 @@ ZFLAGS= # How to use zic to install TZif files. -ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # The name of a POSIX-compliant 'awk' on your system. # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. @@ -480,6 +484,7 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation # and to fetch leap-seconds.list from upstream. +# Set CURL=: to disable use of the Internet. CURL= curl # Name of GNU Privacy Guard , used to sign distributions. @@ -533,21 +538,28 @@ OK_LINE= '^'$(OK_CHAR)'*$$' # Flags to give 'tar' when making a distribution. # Try to use flags appropriate for GNU tar. -GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \ +GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ --numeric-owner --owner=0 --group=0 \ --mode=go+u,go-w --sort=name -TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ - then echo $(GNUTARFLAGS); \ - else :; \ - fi` +SETUP_TAR= \ + export LC_ALL=C && \ + if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ + TAR='tar $(GNUTARFLAGS)'; \ + else \ + TAR=tar; \ + fi # Flags to give 'gzip' when making a distribution. GZIPFLAGS= -9n # When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. # This makes it easier to see which Zone has been affected. -DIFF_TZS= diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \ - || echo ' -F^TZ=') +SETUP_DIFF_TZS = \ + if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ + DIFF_TZS='diff -u -F^TZ='; \ + else \ + DIFF_TZS='diff -u'; \ + fi # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : @@ -561,8 +573,8 @@ RANLIB= : TZCOBJS= zic.o -TZDOBJS= zdump.o localtime.o asctime.o strftime.o -DATEOBJS= date.o localtime.o strftime.o asctime.o +TZDOBJS= zdump.o localtime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o LIBSRCS= localtime.c asctime.c difftime.c strftime.c LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h @@ -579,8 +591,7 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README SECURITY theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ - check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -641,8 +652,7 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ - ` $(POSIXRULES) \ + -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -665,10 +675,10 @@ INSTALL: ALL install date.1 # and append "-dirty" if the contents do not already end in "-dirty". version: $(VERSION_DEPS) { (type git) >/dev/null 2>&1 && \ - V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ - --abbrev=7 --dirty` || \ - if test '$(VERSION)' = unknown && V=`cat $@`; then \ - case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ + V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + if test '$(VERSION)' = unknown && read -r V <$@; then \ + V=$${V%-dirty}-dirty; \ else \ V='$(VERSION)'; \ fi; } && \ @@ -678,7 +688,7 @@ version: $(VERSION_DEPS) # These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) \ - -v DATAFORM=`expr $@ : '\(.*\).zi'` \ + -v DATAFORM=$(@:.zi=) \ -v PACKRATDATA='$(PACKRATDATA)' \ -v PACKRATLIST='$(PACKRATLIST)' \ -f ziguard.awk \ @@ -687,7 +697,7 @@ vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) # This file has a version comment that attempts to capture any tailoring # via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. tzdata.zi: $(DATAFORM).zi version zishrink.awk - version=`sed 1q version` && \ + read -r version $@ + ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ TZS_NEW_DEPS = tzdata.zi zdump zic $(TZS_NEW): $(TZS_NEW_DEPS) @@ -812,20 +815,19 @@ $(TZS_NEW): $(TZS_NEW_DEPS) $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out - wd=`pwd` && \ - x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ tzdata.zi \ - | LC_ALL=C sort -t . -k 2,2` && \ + | LC_ALL=C sort -t . -k 2,2) && \ set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ ZDS="$$ZDS" $$ZDS && \ sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): touch $@ @@ -842,7 +844,7 @@ date: $(DATEOBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) tzselect: tzselect.ksh version - VERSION=`cat version` && sed \ + read -r VERSION /dev/null 2>&1 \ - || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; } + || { export LC_ALL='$(UTF8_LOCALE)'; false; }; } -check_character_set: $(ENCHILADA) +character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ @@ -882,48 +884,55 @@ check_character_set: $(ENCHILADA) } touch $@ -check_white_space: $(ENCHILADA) +white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + enchilada='$(ENCHILADA)' && \ + patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \ + $${enchilada%leap-seconds.list*} \ + $${enchilada#*leap-seconds.list}; \ } touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} -check_name_lengths: $(TDATA_TO_CHECK) backzone - ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ +name-lengths.ck: $(TDATA_TO_CHECK) backzone + :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone touch $@ +mainguard.ck: main.zi + test '$(PACKRATLIST)' || \ + cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi + touch $@ + PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ STDOFF = [-+]?[0-9:.]+ RULELESS_SAVE = (-|$(STDOFF)[sd]?) RULELESS_SLASHED_ABBRS = \ $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ -check_slashed_abbrs: $(TDATA_TO_CHECK) - ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) +slashed-abbrs.ck: $(TDATA_TO_CHECK) + :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } -check_sorted: backward backzone +sorted.ck: backward backzone $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ backward | LC_ALL=C sort -cu - $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu touch $@ -check_back: checklinks.awk $(TDATA_TO_CHECK) +back.ck: checklinks.awk $(TDATA_TO_CHECK) $(AWK) \ -v DATAFORM=$(DATAFORM) \ -v backcheck=backward \ -f checklinks.awk $(TDATA_TO_CHECK) touch $@ -check_links: checklinks.awk tzdata.zi +links.ck: checklinks.awk tzdata.zi $(AWK) \ -v DATAFORM=$(DATAFORM) \ -f checklinks.awk tzdata.zi @@ -932,26 +941,36 @@ check_links: checklinks.awk tzdata.zi # Check timestamps from now through 28 years from now, to make sure # that zonenow.tab contains all sequences of planned timestamps, # without any duplicate sequences. In theory this might require -# 2800 years but that would take a long time to check. -CHECK_NOW_TIMESTAMP = `./date +%s` +# 2800+ years but that would take a long time to check. +CHECK_NOW_TIMESTAMP = $$(./date +%s) CHECK_NOW_FUTURE_YEARS = 28 -CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 -check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab - rm -fr $@.dir - mkdir $@.dir - ./zic -d $@.dir tzdata.zi +CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60 +now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab + rm -fr $@d + mkdir $@d + ./zic -d $@d tzdata.zi now=$(CHECK_NOW_TIMESTAMP) && \ - future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ + future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \ ./zdump -i -t $$now,$$future \ - $$(find $$PWD/$@.dir/????*/ -type f) \ - >$@.dir/zdump.tab + $$(find "$$PWD/$@d"/????*/ -type f) \ + >$@d/zdump-now.tab && \ + ./zdump -i -t 0,$$future \ + $$(find "$$PWD/$@d" -name Etc -prune \ + -o -type f ! -name '*.tab' -print) \ + >$@d/zdump-1970.tab $(AWK) \ - -v zdump_table=$@.dir/zdump.tab \ + -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab - rm -fr $@.dir + $(AWK) \ + 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ + $(PRIMARY_YDATA) backward factory | \ + $(AWK) \ + -v zdump_table=$@d/zdump-1970.tab \ + -f checknow.awk + rm -fr $@d touch $@ -check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab +tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ @@ -959,26 +978,24 @@ check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab done touch $@ -check_tzs: $(TZS) $(TZS_NEW) +tzs.ck: $(TZS) $(TZS_NEW) if test -s $(TZS); then \ - $(DIFF_TZS) $(TZS) $(TZS_NEW); \ + $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \ else \ cp $(TZS_NEW) $(TZS); \ fi touch $@ check_web: $(CHECK_WEB_PAGES) -check_theory.html: theory.html -check_tz-art.html: tz-art.html -check_tz-how-to.html: tz-how-to.html -check_tz-link.html: tz-link.html -check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: - $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ - -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ +.SUFFIXES: .ck .html +.html.ck: + { ! ($(CURL) --version) >/dev/null 2>&1 || \ + $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ + -F file=@$<; } >$@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } mv $@.out $@ -check_ziguard: rearguard.zi vanguard.zi ziguard.awk +ziguard.ck: rearguard.zi vanguard.zi ziguard.awk $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ diff -u rearguard.zi - $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ @@ -987,36 +1004,35 @@ check_ziguard: rearguard.zi vanguard.zi ziguard.awk # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: check_zishrink_posix check_zishrink_right -check_zishrink_posix check_zishrink_right: \ +check_zishrink: zishrink-posix.ck zishrink-right.ck +zishrink-posix.ck zishrink-right.ck: \ zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ $(TDATA) $(DATAFORM).zi tzdata.zi - rm -fr $@.dir $@-t.dir $@-shrunk.dir - mkdir $@.dir $@-t.dir $@-shrunk.dir + rm -fr $@d t-$@d shrunk-$@d + mkdir $@d t-$@d shrunk-$@d case $@ in \ - *_right) leap='-L leapseconds';; \ + *right*) leap='-L leapseconds';; \ *) leap=;; \ esac && \ - $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ - $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ + $(ZIC) $$leap -d $@d $(DATAFORM).zi && \ + $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \ case $(DATAFORM),$(PACKRATLIST) in \ main,) \ - $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ + $(ZIC) $$leap -d t-$@d $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ - diff -r $@.dir $@-t.dir;; \ + $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \ + diff -r $@d t-$@d;; \ esac - diff -r $@.dir $@-shrunk.dir - rm -fr $@.dir $@-t.dir $@-shrunk.dir + diff -r $@d shrunk-$@d + rm -fr $@d t-$@d shrunk-$@d touch $@ clean_misc: - rm -fr check_*.dir typecheck_*.dir - rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ - check_* core typecheck_* \ + rm -fr *.ckd *.dir + rm -f *.ck *.core *.o *.out core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc - rm -fr *.dir tzdb-*/ + rm -fr tzdb-*/ rm -f *.zi $(TZS_NEW) maintainer-clean: clean @@ -1027,7 +1043,7 @@ maintainer-clean: clean names: @echo $(ENCHILADA) -public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ +public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \ tarballs signatures date.1.txt: date.1 @@ -1041,7 +1057,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + LC_ALL=C sh workman.sh $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1054,13 +1070,13 @@ SET_TIMESTAMP_N = sh -c '\ n=$$0 dest=$$1; shift; \ <"$$dest" && \ if test $$n != 0 && \ - lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \ + lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \ set x $$lsout && \ - timestamp=`expr $$7 + $$n` && \ + timestamp=$$(($$7 + $$n)) && \ echo "+ touch -md @$$timestamp $$dest" && \ touch -md @$$timestamp "$$dest"; \ else \ - newest=`ls -t "$$@" | sed 1q` && \ + newest=$$(ls -t "$$@" | sed 1q) && \ echo "+ touch -mr $$newest $$dest" && \ touch -mr "$$newest" "$$dest"; \ fi' @@ -1083,15 +1099,15 @@ SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(EIGHT_YARDS)` && \ + files=$$(git ls-files $(EIGHT_YARDS)) && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ if git diff --quiet $$file; then \ - time=`TZ=UTC0 git log -1 \ + time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ --date='format:%Y-%m-%dT%H:%M:%SZ' \ - $$file` && \ + $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ else \ @@ -1100,8 +1116,8 @@ set-timestamps.out: $(EIGHT_YARDS) done; \ fi $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) - for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ - $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + for file in $(MANTXTS); do \ + $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \ exit; \ done $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) @@ -1114,30 +1130,29 @@ set-tzs-timestamp.out: $(TZS) # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: $(VERSION_DEPS) - rm -fr public.dir - mkdir public.dir - ln $(VERSION_DEPS) public.dir - cd public.dir \ +public.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d \ && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ - public.dir/vanguard.zi public.dir/main.zi \ - public.dir/rearguard.zi; \ + for i in $(TDATA_TO_CHECK) \ + tzdata.zi vanguard.zi main.zi rearguard.zi; \ do \ - public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ + $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \ done - public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK) : : Also check 'backzone' syntax. - rm public.dir/main.zi - cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi - public.dir/zic -d public.dir/zoneinfo main.zi - rm public.dir/main.zi - cd public.dir && \ + rm $@d/main.zi + cd $@d && $(MAKE) PACKRATDATA=backzone main.zi + $@d/zic -d $@d/zoneinfo main.zi + rm $@d/main.zi + cd $@d && \ $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi - public.dir/zic -d public.dir/zoneinfo main.zi + $@d/zic -d $@d/zoneinfo main.zi : - rm -fr public.dir + rm -fr $@d touch $@ # Check that the code works under various alternative @@ -1145,46 +1160,47 @@ check_public: $(VERSION_DEPS) check_time_t_alternatives: $(TIME_T_ALTERNATIVES) $(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d case $@ in \ - int*32_t) range=-2147483648,2147483648;; \ + *32_t*) range=-2147483648,2147483648;; \ u*) range=0,4294967296;; \ *) range=-4294967296,4294967296;; \ esac && \ - wd=`pwd` && \ - zones=`$(AWK) '/^[^#]/ { print $$3 }' /dev/null; then \ quiet_option='-q'; \ else \ quiet_option=''; \ fi && \ - diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ - $@.dir/etc && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \ + $@d/etc && \ diff $$quiet_option -r \ - $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ - $@.dir/usr/share; \ + $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \ + $@d/usr/share; \ } touch $@ @@ -1199,7 +1215,7 @@ ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ version set-timestamps.out rearguard.zi vanguard.zi - VERSION=`cat version` && \ + read -r VERSION $@.out mv $@.out $@ tzdata$(VERSION).tar.gz: set-timestamps.out - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \ + $(SETUP_TAR) && \ + $$TAR -cf - $(TZDATA_DIST) | \ gzip $(GZIPFLAGS) >$@.out mv $@.out $@ @@ -1251,9 +1267,9 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. $(CREATE_EMPTY) $@.dir/pacificnew touch -mr version $@.dir/version - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - \ + $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ @@ -1269,9 +1285,14 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. + if test $(DATAFORM) = vanguard; then \ + pacificnew=; \ + else \ + pacificnew=pacificnew; \ + fi && \ cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ - `test $(DATAFORM) = vanguard || echo pacificnew` + $$pacificnew (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera @@ -1291,9 +1312,9 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out test -f $@.dir/$$file || links="$$links $$file"; \ done && \ ln $$links $@.dir - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out + $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out @@ -1301,8 +1322,8 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + $(SETUP_TAR) && \ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out mv $@.out $@ tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz @@ -1313,22 +1334,21 @@ $(ALL_ASC): $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: typecheck_long_long typecheck_unsigned -typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir - cd $@.dir && \ +typecheck: long-long.ck unsigned.ck +long-long.ck unsigned.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d && \ case $@ in \ - *_long_long) i="long long";; \ - *_unsigned ) i="unsigned" ;; \ + long-long.*) i="long long";; \ + unsigned.* ) i="unsigned" ;; \ esac && \ - typecheck_cflags='' && \ $(MAKE) \ CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ - TOPDIR="`pwd`" \ *** 2471 LINES SKIPPED *** From nobody Sun Oct 6 11:07:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyP2m34z5XffS; Sun, 06 Oct 2024 11:07: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 4XLzyP1p0Zz4rw9; Sun, 6 Oct 2024 11:07:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vq6UAL2YTyPpn+m7DdrKOrIFtWu4gQppr1+4aAMKQTQ=; b=WU1yC1H+DrBOQ8qnC2JD+8H9PH2u8GFYiRQpFmWrCgBOkqLYKu2CjsF9aA9cYGvRxdLJYn 4AFij/yJO2jlTg17UoKaDB5oWzqqRbPi0wWItBWrBIDs8B1dmZBD7OLdW+qeljYeHcrKfi GdmSBhcQxVdcq20AHei/maDbAVmdoecN8B7NXMh1KsIgpkUtaQ8QLIchK8PZRcfUiFBixF ipc2Uh7zLkyoNWR10P5iCIheSNa1aIi3em+e9O/x/9kTd4MUgc9ue64T77QjNlA5Jz6Gwv FlywHRqzM/1AtfTUKiM2sNwWwa9K/ukjCq8vPnPuwfZFqEZLMhIZPSx12xCdaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vq6UAL2YTyPpn+m7DdrKOrIFtWu4gQppr1+4aAMKQTQ=; b=sI2SB7ugW8dHgDDV5msNn+wx7SIUfKsx9j85EKR7MRfnlh2lcCdOIk4KbqwfVIl9y0bFCc 4xasfu8+6l+DOvDEUtWTCR+U8BFN8oc9dFshMpjkVA5RsbVxpzV+JuGJXKsgKtYzlateJW IGIWcPIWwz+lq9XATmSzQN1daGAPapr1rm+8BjKhs1QHh9+tY1a8DAEQz7BZmoOw77fVIi AYDDBH3DOuYy8PL+MF0PWrjPwmRoqMKZ9rdFJHdVLLAkS+a3GdD1rbRs06rBIPbCGp18Am QHZi/ve1VLXJDaeI4gMILxUdtoUHlalg36/v7fxCen423x541ZwBRnNUp67jkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212845; a=rsa-sha256; cv=none; b=irpbMDI5bTif4duU7ccEesxSsR7HqYHCaoHIKUIARJ+xeM4r3CWe0Ez/hkCrlQOwMgwrAz N2hkn9eCcrWtjYoc/Dq3i3sk/pi0TleRkD6Ua1EESQzgJ57ug7zmyVXdLDQFtvHEfRyEsL uGj0Q8sChlxyLmaSfior5z/GBcnOoxF5jTdCgftQRo7+u7IFONIGEIFUv39rb93bEP9dwk QKVC5RhbqX4LWoz/J6URA+fZIzEviHaS0cTKF6xPMiKiUzrF1QfuUsrQT6HdJa60V5dK33 XGZi7Agh/9UCYBbOeAK9MdHPaLrJ/n3s8iEc3+ijmzb0Hi83W03jG7AEDmh3eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyP0qs6z10d6; Sun, 6 Oct 2024 11:07: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 496B7Pls039272; Sun, 6 Oct 2024 11:07:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7PIv039268; Sun, 6 Oct 2024 11:07:25 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:25 GMT Message-Id: <202410061107.496B7PIv039268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: eefeb6ca68bf - stable/13 - locate.updatedb: Explicitly exit from trap code. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eefeb6ca68bf8ef42d4f98fc386288de5b2012c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=eefeb6ca68bf8ef42d4f98fc386288de5b2012c5 commit eefeb6ca68bf8ef42d4f98fc386288de5b2012c5 Author: Dag-Erling Smørgrav AuthorDate: 2024-08-29 15:05:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:16:34 +0000 locate.updatedb: Explicitly exit from trap code. When a signal is trapped, the script continues after the trap code has run, unless the trap code explicitly exits. In the particular case of locate.updatedb, this is mostly harmless, except that the trap code is executed twice (once for the signal and once when we reach the end of the script), but it's still worth fixing. Furthermore, install the trap as soon as we've created the temporary directory, to minimize the window during which we can fail to clean up after ourselves if interrupted. While here, simplify the empty check at the end and make some minor style tweaks. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46475 (cherry picked from commit f62c1f3f8e91c78d402e1db4e518e4899a4ba2b9) --- usr.bin/locate/locate/updatedb.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index e874700afdb8..846fd6dc0d7b 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -42,13 +42,14 @@ fi # The directory containing locate subprograms : ${LIBEXECDIR:=/usr/libexec}; export LIBEXECDIR : ${TMPDIR:=/tmp}; export TMPDIR -if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXXXXXX`; then +if ! TMPDIR=$(mktemp -d $TMPDIR/locateXXXXXXXXXX); then exit 1 fi +tmp=$TMPDIR/_updatedb$$ +trap 'rc=$?; rm -f $tmp; rmdir $TMPDIR; trap - 0; exit $rc' 0 1 2 3 5 10 15 PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH - : ${mklocatedb:=locate.mklocatedb} # make locate database program : ${FCODES:=/var/db/locate.database} # the database : ${SEARCHPATHS="/"} # directories to be put in the database @@ -87,17 +88,13 @@ if [ -n "$PRUNEDIRS" ]; then done fi -tmp=$TMPDIR/_updatedb$$ -trap 'rm -f $tmp; rmdir $TMPDIR' 0 1 2 3 5 10 15 - # search locally if $find -s $SEARCHPATHS $excludes -or -print 2>/dev/null | $mklocatedb -presort > $tmp then - if [ -n "$($find $tmp -size -257c -print)" ]; then + if ! grep -aq / $tmp; then echo "updatedb: locate database $tmp is empty" >&2 exit 1 - else - cat $tmp > $FCODES # should be cp? fi + install $tmp $FCODES fi From nobody Sun Oct 6 11:07:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyQ1Nw2z5XgCr; Sun, 06 Oct 2024 11:07: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 4XLzyQ0nQLz4sP5; Sun, 6 Oct 2024 11:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yc2tfFgzpSsDzECEr68gT56Xv1Vu/dPPwaiYaU2QBPs=; b=fXOdxeziUyyhke9PY1FdRazrPKBJF/svUDI71yh9MoyTbWPlfHaIBRy0VxmD3qxOp7JN49 jFQWzgE/7HA4jjhaAYEgSFLINZlqsJBBq/hSMLVEeI67z/cWqI/dxgcQrOQKqFECON8elR VI/RQIZx1EAAxiCdL5bJPEpUgCEA+Hguam/CIKSzdHJV4x8OKDZSsElHnvjMivw+7GGEfD M3Ds4ngEo5CGbHmZ4evos6hLBm5bMbveIlUhNgH9tgvRnXaEmYXCAj/RAei+rK9yPiQa5u c2pdufuWHp0+A8z75uXvJBmXvdYpwdoTYzFBdAgvsmE6EftRYD5y+15AW0GQnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yc2tfFgzpSsDzECEr68gT56Xv1Vu/dPPwaiYaU2QBPs=; b=fChvxncHE3FAQMiwYuL6loLDayKeotpfPWc6UWjH7rk9t1BeNUJ5lNczQZqekzmudfvIOv NmtRvYiviLO7fJtBeWxD03qi59KbwPum9gT/HyF9NQQ16o4baiTM3aOQ5jXLYyriis+vMH UVZ7u3o9yln61p4YqULyQLSjHM/X7jsMDUeh09F3qF4IaL9qSu2Q+W6w8Nn9qYovCiBlgd FaUB4zq3rq0UMvcsX9vIv/z41GPluCGAAh/zDsuWdDtX3SAtMR8zXGcOuSQAyWU2kO9CSy 2ogBCnTZiVPBcWZWff4TtaSBe/WSjA8JzPvECWV0vE69n+MpZD8Q7vKEP/z5QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212846; a=rsa-sha256; cv=none; b=ifnyj65UWjEsIefjavuLbMsUffDZS+P+i78Ueq32dw9l6lA6EK914XLFrB1trbWgSLd29X 3YGz2aRCQTc930wDdeYSiPZ83B9YmvUpnw7eso5gFHAFSqhCpexvyHv2mSVjNf5elSl0w0 gUbD9NkDl/HiDJDkZg+iRFKXILK4lIpGS6wPzWhGGeczlLoCtOf+kNIiFEnUIe2imiaIEi TkHKa4Zev183qFSBcHsKDT3l1oNanrMMUlu99H1b5NM+us8QWW0MmYT+aZdsFMshAtPXMa J9aUFFX5BfE805EuoMh4GbmnIfRiOrn1O52gMfVD7Lr39Vc/U2b+/INEsbKEVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyQ0Nxcz10P9; Sun, 6 Oct 2024 11:07: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 496B7PPY039317; Sun, 6 Oct 2024 11:07:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7PeK039314; Sun, 6 Oct 2024 11:07:25 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:25 GMT Message-Id: <202410061107.496B7PeK039314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2403e6d5aa9e - stable/14 - printf(): Save errno earlier. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2403e6d5aa9e8ad71c472639af7e903f16ce3b27 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2403e6d5aa9e8ad71c472639af7e903f16ce3b27 commit 2403e6d5aa9e8ad71c472639af7e903f16ce3b27 Author: Dag-Erling Smørgrav AuthorDate: 2024-09-20 16:30:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:12:49 +0000 printf(): Save errno earlier. The manual page says %m is replaced with “the string representation of the error code stored in the errno variable at the beginning of the call”. However, we don't actually save `errno` until fairly late in `__vfprintf()`. Make sure it is saved before we do anything that might perturb `errno`. MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46718 (cherry picked from commit 74f1007fcc838501c74a633792c3f01833bf65e1) --- lib/libc/stdio/local.h | 2 +- lib/libc/stdio/snprintf.c | 14 ++++++++------ lib/libc/stdio/vasprintf.c | 5 +++-- lib/libc/stdio/vdprintf.c | 3 ++- lib/libc/stdio/vfprintf.c | 20 ++++++++++---------- lib/libc/stdio/vsnprintf.c | 7 ++++--- lib/libc/stdio/vsprintf.c | 10 ++++++---- 7 files changed, 34 insertions(+), 27 deletions(-) diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index a5c465bcdcba..cbc0d29ff823 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -80,7 +80,7 @@ extern int __swsetup(FILE *); extern int __sflags(const char *, int *); extern int __ungetc(int, FILE *); extern wint_t __ungetwc(wint_t, FILE *, locale_t); -extern int __vfprintf(FILE *, locale_t, const char *, __va_list); +extern int __vfprintf(FILE *, locale_t, int, const char *, __va_list); extern int __vfscanf(FILE *, const char *, __va_list); extern int __vfwprintf(FILE *, locale_t, const wchar_t *, __va_list); extern int __vfwscanf(FILE * __restrict, locale_t, const wchar_t * __restrict, diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 270219ac61f9..60602efaf5e9 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -51,10 +51,11 @@ static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93"; int snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) { + FILE f = FAKE_FILE; + va_list ap; size_t on; + int serrno = errno; int ret; - va_list ap; - FILE f = FAKE_FILE; on = n; if (n != 0) @@ -68,7 +69,7 @@ snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, __get_locale(), fmt, ap); + ret = __vfprintf(&f, __get_locale(), serrno, fmt, ap); if (on > 0) *f._p = '\0'; va_end(ap); @@ -78,10 +79,11 @@ int snprintf_l(char * __restrict str, size_t n, locale_t locale, char const * __restrict fmt, ...) { + FILE f = FAKE_FILE; + va_list ap; size_t on; + int serrno = errno; int ret; - va_list ap; - FILE f = FAKE_FILE; FIX_LOCALE(locale); on = n; @@ -96,7 +98,7 @@ snprintf_l(char * __restrict str, size_t n, locale_t locale, f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (on > 0) *f._p = '\0'; va_end(ap); diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c index c2c6170a2382..62d8f09fc954 100644 --- a/lib/libc/stdio/vasprintf.c +++ b/lib/libc/stdio/vasprintf.c @@ -34,9 +34,9 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include -#include #include "xlocale_private.h" #include "local.h" @@ -44,6 +44,7 @@ int vasprintf_l(char **str, locale_t locale, const char *fmt, __va_list ap) { FILE f = FAKE_FILE; + int serrno = errno; int ret; FIX_LOCALE(locale); @@ -55,7 +56,7 @@ vasprintf_l(char **str, locale_t locale, const char *fmt, __va_list ap) return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (ret < 0) { free(f._bf._base); *str = NULL; diff --git a/lib/libc/stdio/vdprintf.c b/lib/libc/stdio/vdprintf.c index 3cff85aa9dc5..39fb55420953 100644 --- a/lib/libc/stdio/vdprintf.c +++ b/lib/libc/stdio/vdprintf.c @@ -46,6 +46,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap) { FILE f = FAKE_FILE; unsigned char buf[BUFSIZ]; + int serrno = errno; int ret; if (fd > SHRT_MAX) { @@ -62,7 +63,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap) f._bf._base = buf; f._bf._size = sizeof(buf); - if ((ret = __vfprintf(&f, __get_locale(), fmt, ap)) < 0) + if ((ret = __vfprintf(&f, __get_locale(), serrno, fmt, ap)) < 0) return (ret); return (__fflush(&f) ? EOF : ret); diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 0ce9d6f37569..72178c31aa94 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -71,7 +71,8 @@ static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; #include "printflocal.h" static int __sprint(FILE *, struct __suio *, locale_t); -static int __sbprintf(FILE *, locale_t, const char *, va_list) __printflike(3, 0) +static int __sbprintf(FILE *, locale_t, int, const char *, va_list) + __printflike(4, 0) __noinline; static char *__wcsconv(wchar_t *, int); @@ -172,7 +173,7 @@ __sprint(FILE *fp, struct __suio *uio, locale_t locale) * worries about ungetc buffers and so forth. */ static int -__sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap) +__sbprintf(FILE *fp, locale_t locale, int serrno, const char *fmt, va_list ap) { int ret; FILE fake = FAKE_FILE; @@ -196,7 +197,7 @@ __sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap) fake._lbfsize = 0; /* not actually used, but Just In Case */ /* do the work, then copy any error status */ - ret = __vfprintf(&fake, locale, fmt, ap); + ret = __vfprintf(&fake, locale, serrno, fmt, ap); if (ret >= 0 && __fflush(&fake)) ret = EOF; if (fake._flags & __SERR) @@ -268,8 +269,9 @@ __wcsconv(wchar_t *wcsarg, int prec) */ int vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0, - va_list ap) + va_list ap) { + int serrno = errno; int ret; FIX_LOCALE(locale); @@ -277,9 +279,9 @@ vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0, /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->_file >= 0) - ret = __sbprintf(fp, locale, fmt0, ap); + ret = __sbprintf(fp, locale, serrno, fmt0, ap); else - ret = __vfprintf(fp, locale, fmt0, ap); + ret = __vfprintf(fp, locale, serrno, fmt0, ap); FUNLOCKFILE_CANCELSAFE(); return (ret); } @@ -304,7 +306,7 @@ vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) * Non-MT-safe version */ int -__vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) +__vfprintf(FILE *fp, locale_t locale, int serrno, const char *fmt0, va_list ap) { char *fmt; /* format string */ int ch; /* character from fmt */ @@ -314,7 +316,6 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) int ret; /* return value accumulator */ int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ - int saved_errno; int error; char errnomsg[NL_TEXTMAX]; char sign; /* sign prefix (' ', '+', '-', or \0) */ @@ -466,7 +467,6 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) savserr = fp->_flags & __SERR; fp->_flags &= ~__SERR; - saved_errno = errno; convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; @@ -834,7 +834,7 @@ fp_common: break; #endif /* !NO_FLOATING_POINT */ case 'm': - error = __strerror_rl(saved_errno, errnomsg, + error = __strerror_rl(serrno, errnomsg, sizeof(errnomsg), locale); cp = error == 0 ? errnomsg : ""; size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index c80f70924a2a..d851feb4207e 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -48,12 +48,13 @@ static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93"; int vsnprintf_l(char * __restrict str, size_t n, locale_t locale, - const char * __restrict fmt, __va_list ap) + const char * __restrict fmt, __va_list ap) { + FILE f = FAKE_FILE; size_t on; + int serrno = errno; int ret; char dummy[2]; - FILE f = FAKE_FILE; FIX_LOCALE(locale); on = n; @@ -74,7 +75,7 @@ vsnprintf_l(char * __restrict str, size_t n, locale_t locale, f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (on > 0) *f._p = '\0'; return (ret); diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index f23821360b47..b39865a40e82 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -40,23 +40,25 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vsprintf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ -#include +#include #include +#include #include "local.h" #include "xlocale_private.h" int vsprintf_l(char * __restrict str, locale_t locale, - const char * __restrict fmt, __va_list ap) + const char * __restrict fmt, __va_list ap) { - int ret; FILE f = FAKE_FILE; + int serrno = errno; + int ret; FIX_LOCALE(locale); f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = INT_MAX; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); *f._p = 0; return (ret); } From nobody Sun Oct 6 11:07:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyQ5Dxrz5XgCs; Sun, 06 Oct 2024 11:07: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 4XLzyQ2JxBz4sGB; Sun, 6 Oct 2024 11:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPYY4ZPbQEdwNJEmggVkawOQWMFvIp4G/vris0K7PcQ=; b=UaYgYnXMfEJMFbC3Z7m18FLtmEJsvknpCyjHyA/qjlNgevxmKEa+ZcHqJvdHCkxDqPnJRv PVykqWejSP0fM1ZdPNxbm9k3Paj2TUEItDDyj6PbYX9JEKwRtApu0ALibV1HqLFzkJZ09P 2W/HLcqzTBgIKwBCHk0qwWict259sqGfKvfUKa2nqLUKlElR+GCzYsYCQzxiPhbFWeRe6q gaizqpdL59nVcO0n3Lmw4AkkB+6f9LQqpMc48oj24VBuW1PLZ4WZBcZqvLRzWZjuRrAd40 GMPVX0QBWOO7IskQkUlRsafJoMvUwygD/V/CmaPhhVu7TwfKfLdpJ+LaITekjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPYY4ZPbQEdwNJEmggVkawOQWMFvIp4G/vris0K7PcQ=; b=aa54OtQQOV0eTu63E6wVRTXnw/imQduWlBGPbUlZ6r5R0z5ubjbrqXCWYCfnZxmXMHEr2u XstUxeWQ3u5FArbo/BcwpAwWnjIINMEngFell4ne+es3EGynNVvXFgRxUeaFAzcJiph302 3d4RBGDr/uMCJEvOHtnkTBA8W29AgBsa6wkJF4ynQddmadSMnBJ9b19q1Pgm+oz2DfB0HY /ESWwYURDLzz/IDmKaDRsHvDBqMcbMqStl9yQLgH8zukQz4wQMKfi48F79Pdx0qBt8GEKY CGyc6UF0oIMUI1wCmcMZ4UJzR+Ewk0wZnssTfDs6rIDNkgJTY/XhXN1PD8M3/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212846; a=rsa-sha256; cv=none; b=H0FJfqO2u8J5ww/9afNR9ZBAn9un5WLxVhVnfYPH+5PUzn4PT/7qKu5DhmbkZEva0girVB 7mRCo7Xh9AjdTUeDb5DIOClxFiv2jBIx6IIyCYH+mHTTizhtkeKldbasZ8NASlZCLa19EC FajonJgagC+CwjhVbuNoBD/6WtsxviF/nJQNRGBnOquBBYQtUUpGj1hg0Ngv8lktvJbwCI wNTM0jY1rs3fVFbXnOtLCBro6TDz/BeIUHGzN4fbOgSQd+EWzj4fuPsiAO38pM/EldS4V3 FTeDgQEzFzocC3HWKZIAPvb0c4LgOSOLQOJBNqaS1XADX0UeX5zQmfq3l50aqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyQ1t13z10PB; Sun, 6 Oct 2024 11:07: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 496B7QER039374; Sun, 6 Oct 2024 11:07:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7QvW039371; Sun, 6 Oct 2024 11:07:26 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:26 GMT Message-Id: <202410061107.496B7QvW039371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 46d52461bf36 - stable/13 - locate.updatedb: Revert to using cat to copy the db. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46d52461bf36d941b817e52a637845142a90946a Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=46d52461bf36d941b817e52a637845142a90946a commit 46d52461bf36d941b817e52a637845142a90946a Author: Dag-Erling Smørgrav AuthorDate: 2024-10-02 15:54:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:16:34 +0000 locate.updatedb: Revert to using cat to copy the db. This script is usually run unprivileged, so install fails to create a temporary file while copying the finished database. Revert to using cat, which can overwrite the existing file as it is usually owned by the same user which is running the script. Fixes: f62c1f3f8e91 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46872 (cherry picked from commit 26bd374e72681860af4bf9d639308ad245949460) --- usr.bin/locate/locate/updatedb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 846fd6dc0d7b..01d993918e92 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -96,5 +96,5 @@ then echo "updatedb: locate database $tmp is empty" >&2 exit 1 fi - install $tmp $FCODES + cat $tmp >$FCODES fi From nobody Sun Oct 6 11:07:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyR40yrz5XgHx; Sun, 06 Oct 2024 11:07: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 4XLzyR2zF7z4s2h; Sun, 6 Oct 2024 11:07:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4XtunCGJZFv53baIS39V6kdiSrpXuDhWQt+qb7SWYY=; b=DbuSoGVEeNe/9LrvxkNwH7wzIgSqdKJtG8TFKXF0+8KkWLwmUuEwUOb1cbxfsnn8Ppmo+G VHPKKkKqmzXp6FjRGamTxxr34BQJ14msV30pl920Y18vavpoz3Jwokpf4Y5h+S3c78IuOB VZyk0EXlnLJiuszfw/6/hNES/aE4onDc06rDoG3ooH9SeWBkKWeA2wRW04+EOZd+Uv+JqW uV+zeumqHuYlrioQhKRBlAOosAFBIOi+uXzA9yZKqlPLTfUQ7zmLplfVijYenz6+La0CWs J1nO9xeFHywXjEDiFEwg105DVwBRpCK5C4gRBwsWopw4DJZmuhPptu/jcOhcKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4XtunCGJZFv53baIS39V6kdiSrpXuDhWQt+qb7SWYY=; b=BCuorr6r4YqFtRHsHBfRtGq/cMUwx7rzjPVm1Ipz8M5t0FanfALk042UD+GylZ5rPvKeVv W+Ga9c0T4xR3Y5wpvQM2DuxGOKb/kaDBhbn3txCC5i1Pk0Ebw7ZLLIO/KLr5qWTus8b5Pk DmTx/tJhuCa4rLPqFouYqhMUInXdMqg30SALYsctHiY9t5IOps5lG3h7pK58Zl75rUoP7C QDOmbdOf65r9QrC6wO53n6EOikPmPOr8V1RY1ZaEqixkDp2vc3fjDUQ0iBgHJnEnbklm9x nv5y8L0uzGMCqSVpV81+kSF0ur4Qa69uFmkX2SFyXGzt7eZwzjoAvByR47p3yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212847; a=rsa-sha256; cv=none; b=pG4lQUuo5utCjbj+urm/eEXN/yk8RZyawCF6xGUKq8Tri17tl6/QvUncoOUZx+3eZlf9p5 VyrFfJzQsXdCCYwr/I0LxfKtr9npm5FGlt5o3+cQXOg0zNjidK+lZMSooad00oD5KJLQFs bwBoaNGZ7i7yjbBZjivg4X0r2S3lz7jLb3NvBlUEdbSyRlDKyR/7Sp6r2Jt2d9wDFyhKfM dkiL0JCWV5xt1RgoVwhDKe4XSyKry0QT8j4LFG0XsgE425wXjjqpDVWRQBYn6yuyabIZqJ l9EczivFj23hTod88hJR4xaeS0hX8MGxnfs74iAXq1OFlwAR4HiEF4mJ199vVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyR2S40z10PC; Sun, 6 Oct 2024 11:07:27 +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 496B7Rmc039455; Sun, 6 Oct 2024 11:07:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7RZb039452; Sun, 6 Oct 2024 11:07:27 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:27 GMT Message-Id: <202410061107.496B7RZb039452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 036ce2460cbc - stable/13 - Update tzcode to 2024b. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 036ce2460cbc734af3e8f5a65e5dc1f9039fd138 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=036ce2460cbc734af3e8f5a65e5dc1f9039fd138 commit 036ce2460cbc734af3e8f5a65e5dc1f9039fd138 Author: Dag-Erling Smørgrav AuthorDate: 2024-09-07 13:46:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:16:34 +0000 Update tzcode to 2024b. MFC after: 3 weeks Sponsored by: Klara, Inc. Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D46565 (cherry picked from commit a979394afeb5c20fc58c5f5b005d51eb8f92f666) --- contrib/tzcode/CONTRIBUTING | 18 +- contrib/tzcode/Makefile | 412 +++++++++++++++++++++++-------------------- contrib/tzcode/NEWS | 124 ++++++++++++- contrib/tzcode/asctime.c | 19 +- contrib/tzcode/localtime.c | 87 ++------- contrib/tzcode/newctime.3 | 102 ++++++----- contrib/tzcode/newstrftime.3 | 30 ++-- contrib/tzcode/newtzset.3 | 66 +++++-- contrib/tzcode/private.h | 114 +++++++----- contrib/tzcode/theory.html | 214 ++++++++++++++-------- contrib/tzcode/tz-art.html | 5 + contrib/tzcode/tz-link.html | 113 +++++++----- contrib/tzcode/tzfile.5 | 38 ++-- contrib/tzcode/tzfile.h | 8 +- contrib/tzcode/tzselect.ksh | 125 ++++++------- contrib/tzcode/version | 2 +- contrib/tzcode/workman.sh | 3 +- contrib/tzcode/zdump.c | 10 +- contrib/tzcode/zic.8 | 52 +++--- contrib/tzcode/zic.c | 31 ++-- 20 files changed, 926 insertions(+), 647 deletions(-) diff --git a/contrib/tzcode/CONTRIBUTING b/contrib/tzcode/CONTRIBUTING index 6d800e4c03a3..f6edbd3be7d3 100644 --- a/contrib/tzcode/CONTRIBUTING +++ b/contrib/tzcode/CONTRIBUTING @@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read "Theory and pragmatics of the tz code and data" . It is also good to browse the mailing list archives - for examples of patches that tend -to work well. Additions to data should contain commentary citing -reliable sources as justification. Citations should use "https:" URLs -if available. + +for examples of patches that tend to work well. +Changes should contain commentary citing reliable sources. +Citations should use "https:" URLs if available. For changes that fix sensitive security-related bugs, please see the distribution's 'SECURITY' file. @@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful: * Edit source files. Include commentary that justifies the changes by citing reliable sources. - * Debug the changes, e.g.: + * Debug the changes locally, e.g.: - make check - make install + make TOPDIR=$PWD/tz clean check install ./zdump -v America/Los_Angeles + Although builds assume only basic POSIX, they use extra features + if available. 'make check' accesses validator.w3.org unless you + lack 'curl' or use 'make CURL=:'. If you have the latest GCC, + "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + * For each separable change, commit it in the new branch, e.g.: git add northamerica diff --git a/contrib/tzcode/Makefile b/contrib/tzcode/Makefile index d48354c72df4..0087b4596515 100644 --- a/contrib/tzcode/Makefile +++ b/contrib/tzcode/Makefile @@ -3,17 +3,17 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: -# On older platforms you may need to scrounge for a POSIX-conforming 'make'. -# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or -# /usr/xpg4/bin/make, not /usr/ccs/bin/make. +# On older platforms you may need to scrounge for POSIX conformance. +# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), +# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu11' "$@" +# make CC='gcc -std=gnu23' "$@" # -# This example script is appropriate for a pre-2017 GNU/Linux system -# where a non-default setting is needed to support this package's use of C99. +# This example script is appropriate for a circa 2024 GNU/Linux system +# where a non-default setting enables this package's optional use of C23. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,7 +53,7 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ +# The POSIXRULES macro controls interpretation of POSIX-like TZ # settings like TZ='EET-2EEST' that lack DST transition rules. # If POSIXRULES is '-', no template is installed; this is the default. # Any other value for POSIXRULES is obsolete and should not be relied on, as: @@ -132,8 +132,9 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib # Types to try, as an alternative to time_t. TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) -TIME_T_ALTERNATIVES_HEAD = int_least64_t -TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t +TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck +TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ + uint_least64_t.ck # What kind of TZif data files to generate. (TZif is the binary time # zone data format that zic generates; see Internet RFC 8536.) @@ -219,6 +220,7 @@ LDLIBS= # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) @@ -229,7 +231,7 @@ LDLIBS= # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext # -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares -# ctime_r and asctime_r incompatibly with the POSIX standard +# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ # -DHAVE_LINK=0 if your system lacks a link function @@ -261,8 +263,11 @@ LDLIBS= # -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers # with external linkage, e.g., applications cannot define 'localtime'. # -Dssize_t=long on hosts like MS-Windows that lack ssize_t -# -DSUPPORT_C89 if the tzcode library should support C89 callers+ -# However, this might trigger latent bugs in C99-or-later callers. +# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers +# Although -DSUPPORT_C89=0 might work around latent bugs in callers, +# it does not conform to POSIX. +# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ +# However, this might cause problems in POSIX.1-2024-or-later callers. # -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has # security implications and is not recommended for general use # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; @@ -274,7 +279,7 @@ LDLIBS= # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for POSIX.1-2017-style TZ strings lacking them, +# DST transitions for proleptic format TZ strings lacking them, # in the usual case where POSIXRULES is '-'. If not specified, # TZDEFRULESTRING defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. @@ -302,23 +307,25 @@ LDLIBS= # # * Options marked "*" can be omitted if your compiler is C23 compatible. # * Options marked "+" are obsolescent and are planned to be removed -# once the code assumes C99 or later, say in the year 2029. +# once the code assumes C99 or later (say in the year 2029) +# and POSIX.1-2024 or later (say in the year 2034). # # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ -Wall -Wextra \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \ -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \ -Wdeclaration-after-statement -Wdouble-promotion \ - -Wduplicated-branches -Wduplicated-cond \ + -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ - -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wmissing-declarations -Wmissing-prototypes \ + -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ @@ -327,10 +334,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # If your system has a "GMT offset" field in its "struct tm"s # (or if you decide to add such a field in your system's "time.h" file), @@ -341,9 +347,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # Similarly, if your system has a "zone abbreviation" field, define # -DTM_ZONE=tm_zone # and define NO_TM_ZONE to suppress any guessing. -# Although these two fields are not required by POSIX.1-2017, -# POSIX 202x/D4 requires them and they are widely available -# on GNU/Linux and BSD systems. +# Although POSIX.1-2024 requires these fields and they are widely available +# on GNU/Linux and BSD systems, some older systems lack them. # # The next batch of options control support for external variables # exported by tzcode. In practice these variables are less useful @@ -353,7 +358,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DHAVE_TZNAME=0 # do not support "tzname" # # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library # # -DHAVE_TZNAME=2 # support and define "tzname" -# # to the "CFLAGS=" line. "tzname" is required by POSIX.1-1988 and later. +# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 +# # and later, its contents are unspecified if you use a geographical TZ +# # and the variable is planned to be removed in a future POSIX edition. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause # # crashes when combined with some platforms' standard libraries, @@ -364,7 +371,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DUSG_COMPAT=1 # support, and variables are defined by system library # # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix -# # Systems Group code and are required by POSIX.1-2008 and later (with XSI). +# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), +# # although their contents are unspecified if you use a geographical TZ +# # and the variables are planned to be removed in a future edition of POSIX. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add @@ -428,18 +437,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # The name of a POSIX-like library archiver, its flags, C compiler, # linker flags, and 'make' utility. Ordinarily the defaults suffice. -# The commented-out values are the defaults specified by POSIX.1-202x/D4. +# The commented-out values are the defaults specified by POSIX.1-2024. #AR = ar #ARFLAGS = -rv #CC = c17 #LDFLAGS = #MAKE = make -# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in -# submake command lines. The default is no leap seconds. - -LEAPSECONDS= - # Where to fetch leap-seconds.list from. leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list @@ -461,7 +465,7 @@ ZFLAGS= # How to use zic to install TZif files. -ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # The name of a POSIX-compliant 'awk' on your system. # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. @@ -480,6 +484,7 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation # and to fetch leap-seconds.list from upstream. +# Set CURL=: to disable use of the Internet. CURL= curl # Name of GNU Privacy Guard , used to sign distributions. @@ -533,21 +538,28 @@ OK_LINE= '^'$(OK_CHAR)'*$$' # Flags to give 'tar' when making a distribution. # Try to use flags appropriate for GNU tar. -GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \ +GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ --numeric-owner --owner=0 --group=0 \ --mode=go+u,go-w --sort=name -TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ - then echo $(GNUTARFLAGS); \ - else :; \ - fi` +SETUP_TAR= \ + export LC_ALL=C && \ + if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ + TAR='tar $(GNUTARFLAGS)'; \ + else \ + TAR=tar; \ + fi # Flags to give 'gzip' when making a distribution. GZIPFLAGS= -9n # When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. # This makes it easier to see which Zone has been affected. -DIFF_TZS= diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \ - || echo ' -F^TZ=') +SETUP_DIFF_TZS = \ + if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ + DIFF_TZS='diff -u -F^TZ='; \ + else \ + DIFF_TZS='diff -u'; \ + fi # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : @@ -561,8 +573,8 @@ RANLIB= : TZCOBJS= zic.o -TZDOBJS= zdump.o localtime.o asctime.o strftime.o -DATEOBJS= date.o localtime.o strftime.o asctime.o +TZDOBJS= zdump.o localtime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o LIBSRCS= localtime.c asctime.c difftime.c strftime.c LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h @@ -579,8 +591,7 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README SECURITY theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ - check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -641,8 +652,7 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ - ` $(POSIXRULES) \ + -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -665,10 +675,10 @@ INSTALL: ALL install date.1 # and append "-dirty" if the contents do not already end in "-dirty". version: $(VERSION_DEPS) { (type git) >/dev/null 2>&1 && \ - V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ - --abbrev=7 --dirty` || \ - if test '$(VERSION)' = unknown && V=`cat $@`; then \ - case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ + V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + if test '$(VERSION)' = unknown && read -r V <$@; then \ + V=$${V%-dirty}-dirty; \ else \ V='$(VERSION)'; \ fi; } && \ @@ -678,7 +688,7 @@ version: $(VERSION_DEPS) # These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) \ - -v DATAFORM=`expr $@ : '\(.*\).zi'` \ + -v DATAFORM=$(@:.zi=) \ -v PACKRATDATA='$(PACKRATDATA)' \ -v PACKRATLIST='$(PACKRATLIST)' \ -f ziguard.awk \ @@ -687,7 +697,7 @@ vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) # This file has a version comment that attempts to capture any tailoring # via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. tzdata.zi: $(DATAFORM).zi version zishrink.awk - version=`sed 1q version` && \ + read -r version $@ + ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ TZS_NEW_DEPS = tzdata.zi zdump zic $(TZS_NEW): $(TZS_NEW_DEPS) @@ -812,20 +815,19 @@ $(TZS_NEW): $(TZS_NEW_DEPS) $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out - wd=`pwd` && \ - x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ tzdata.zi \ - | LC_ALL=C sort -t . -k 2,2` && \ + | LC_ALL=C sort -t . -k 2,2) && \ set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ ZDS="$$ZDS" $$ZDS && \ sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): touch $@ @@ -842,7 +844,7 @@ date: $(DATEOBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) tzselect: tzselect.ksh version - VERSION=`cat version` && sed \ + read -r VERSION /dev/null 2>&1 \ - || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; } + || { export LC_ALL='$(UTF8_LOCALE)'; false; }; } -check_character_set: $(ENCHILADA) +character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ @@ -882,48 +884,55 @@ check_character_set: $(ENCHILADA) } touch $@ -check_white_space: $(ENCHILADA) +white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + enchilada='$(ENCHILADA)' && \ + patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \ + $${enchilada%leap-seconds.list*} \ + $${enchilada#*leap-seconds.list}; \ } touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} -check_name_lengths: $(TDATA_TO_CHECK) backzone - ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ +name-lengths.ck: $(TDATA_TO_CHECK) backzone + :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone touch $@ +mainguard.ck: main.zi + test '$(PACKRATLIST)' || \ + cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi + touch $@ + PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ STDOFF = [-+]?[0-9:.]+ RULELESS_SAVE = (-|$(STDOFF)[sd]?) RULELESS_SLASHED_ABBRS = \ $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ -check_slashed_abbrs: $(TDATA_TO_CHECK) - ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) +slashed-abbrs.ck: $(TDATA_TO_CHECK) + :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } -check_sorted: backward backzone +sorted.ck: backward backzone $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ backward | LC_ALL=C sort -cu - $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu touch $@ -check_back: checklinks.awk $(TDATA_TO_CHECK) +back.ck: checklinks.awk $(TDATA_TO_CHECK) $(AWK) \ -v DATAFORM=$(DATAFORM) \ -v backcheck=backward \ -f checklinks.awk $(TDATA_TO_CHECK) touch $@ -check_links: checklinks.awk tzdata.zi +links.ck: checklinks.awk tzdata.zi $(AWK) \ -v DATAFORM=$(DATAFORM) \ -f checklinks.awk tzdata.zi @@ -932,26 +941,36 @@ check_links: checklinks.awk tzdata.zi # Check timestamps from now through 28 years from now, to make sure # that zonenow.tab contains all sequences of planned timestamps, # without any duplicate sequences. In theory this might require -# 2800 years but that would take a long time to check. -CHECK_NOW_TIMESTAMP = `./date +%s` +# 2800+ years but that would take a long time to check. +CHECK_NOW_TIMESTAMP = $$(./date +%s) CHECK_NOW_FUTURE_YEARS = 28 -CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 -check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab - rm -fr $@.dir - mkdir $@.dir - ./zic -d $@.dir tzdata.zi +CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60 +now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab + rm -fr $@d + mkdir $@d + ./zic -d $@d tzdata.zi now=$(CHECK_NOW_TIMESTAMP) && \ - future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ + future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \ ./zdump -i -t $$now,$$future \ - $$(find $$PWD/$@.dir/????*/ -type f) \ - >$@.dir/zdump.tab + $$(find "$$PWD/$@d"/????*/ -type f) \ + >$@d/zdump-now.tab && \ + ./zdump -i -t 0,$$future \ + $$(find "$$PWD/$@d" -name Etc -prune \ + -o -type f ! -name '*.tab' -print) \ + >$@d/zdump-1970.tab $(AWK) \ - -v zdump_table=$@.dir/zdump.tab \ + -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab - rm -fr $@.dir + $(AWK) \ + 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ + $(PRIMARY_YDATA) backward factory | \ + $(AWK) \ + -v zdump_table=$@d/zdump-1970.tab \ + -f checknow.awk + rm -fr $@d touch $@ -check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab +tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ @@ -959,26 +978,24 @@ check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab done touch $@ -check_tzs: $(TZS) $(TZS_NEW) +tzs.ck: $(TZS) $(TZS_NEW) if test -s $(TZS); then \ - $(DIFF_TZS) $(TZS) $(TZS_NEW); \ + $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \ else \ cp $(TZS_NEW) $(TZS); \ fi touch $@ check_web: $(CHECK_WEB_PAGES) -check_theory.html: theory.html -check_tz-art.html: tz-art.html -check_tz-how-to.html: tz-how-to.html -check_tz-link.html: tz-link.html -check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: - $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ - -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ +.SUFFIXES: .ck .html +.html.ck: + { ! ($(CURL) --version) >/dev/null 2>&1 || \ + $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ + -F file=@$<; } >$@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } mv $@.out $@ -check_ziguard: rearguard.zi vanguard.zi ziguard.awk +ziguard.ck: rearguard.zi vanguard.zi ziguard.awk $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ diff -u rearguard.zi - $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ @@ -987,36 +1004,35 @@ check_ziguard: rearguard.zi vanguard.zi ziguard.awk # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: check_zishrink_posix check_zishrink_right -check_zishrink_posix check_zishrink_right: \ +check_zishrink: zishrink-posix.ck zishrink-right.ck +zishrink-posix.ck zishrink-right.ck: \ zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ $(TDATA) $(DATAFORM).zi tzdata.zi - rm -fr $@.dir $@-t.dir $@-shrunk.dir - mkdir $@.dir $@-t.dir $@-shrunk.dir + rm -fr $@d t-$@d shrunk-$@d + mkdir $@d t-$@d shrunk-$@d case $@ in \ - *_right) leap='-L leapseconds';; \ + *right*) leap='-L leapseconds';; \ *) leap=;; \ esac && \ - $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ - $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ + $(ZIC) $$leap -d $@d $(DATAFORM).zi && \ + $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \ case $(DATAFORM),$(PACKRATLIST) in \ main,) \ - $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ + $(ZIC) $$leap -d t-$@d $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ - diff -r $@.dir $@-t.dir;; \ + $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \ + diff -r $@d t-$@d;; \ esac - diff -r $@.dir $@-shrunk.dir - rm -fr $@.dir $@-t.dir $@-shrunk.dir + diff -r $@d shrunk-$@d + rm -fr $@d t-$@d shrunk-$@d touch $@ clean_misc: - rm -fr check_*.dir typecheck_*.dir - rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ - check_* core typecheck_* \ + rm -fr *.ckd *.dir + rm -f *.ck *.core *.o *.out core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc - rm -fr *.dir tzdb-*/ + rm -fr tzdb-*/ rm -f *.zi $(TZS_NEW) maintainer-clean: clean @@ -1027,7 +1043,7 @@ maintainer-clean: clean names: @echo $(ENCHILADA) -public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ +public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \ tarballs signatures date.1.txt: date.1 @@ -1041,7 +1057,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + LC_ALL=C sh workman.sh $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1054,13 +1070,13 @@ SET_TIMESTAMP_N = sh -c '\ n=$$0 dest=$$1; shift; \ <"$$dest" && \ if test $$n != 0 && \ - lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \ + lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \ set x $$lsout && \ - timestamp=`expr $$7 + $$n` && \ + timestamp=$$(($$7 + $$n)) && \ echo "+ touch -md @$$timestamp $$dest" && \ touch -md @$$timestamp "$$dest"; \ else \ - newest=`ls -t "$$@" | sed 1q` && \ + newest=$$(ls -t "$$@" | sed 1q) && \ echo "+ touch -mr $$newest $$dest" && \ touch -mr "$$newest" "$$dest"; \ fi' @@ -1083,15 +1099,15 @@ SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(EIGHT_YARDS)` && \ + files=$$(git ls-files $(EIGHT_YARDS)) && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ if git diff --quiet $$file; then \ - time=`TZ=UTC0 git log -1 \ + time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ --date='format:%Y-%m-%dT%H:%M:%SZ' \ - $$file` && \ + $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ else \ @@ -1100,8 +1116,8 @@ set-timestamps.out: $(EIGHT_YARDS) done; \ fi $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) - for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ - $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + for file in $(MANTXTS); do \ + $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \ exit; \ done $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) @@ -1114,30 +1130,29 @@ set-tzs-timestamp.out: $(TZS) # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: $(VERSION_DEPS) - rm -fr public.dir - mkdir public.dir - ln $(VERSION_DEPS) public.dir - cd public.dir \ +public.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d \ && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ - public.dir/vanguard.zi public.dir/main.zi \ - public.dir/rearguard.zi; \ + for i in $(TDATA_TO_CHECK) \ + tzdata.zi vanguard.zi main.zi rearguard.zi; \ do \ - public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ + $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \ done - public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK) : : Also check 'backzone' syntax. - rm public.dir/main.zi - cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi - public.dir/zic -d public.dir/zoneinfo main.zi - rm public.dir/main.zi - cd public.dir && \ + rm $@d/main.zi + cd $@d && $(MAKE) PACKRATDATA=backzone main.zi + $@d/zic -d $@d/zoneinfo main.zi + rm $@d/main.zi + cd $@d && \ $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi - public.dir/zic -d public.dir/zoneinfo main.zi + $@d/zic -d $@d/zoneinfo main.zi : - rm -fr public.dir + rm -fr $@d touch $@ # Check that the code works under various alternative @@ -1145,46 +1160,47 @@ check_public: $(VERSION_DEPS) check_time_t_alternatives: $(TIME_T_ALTERNATIVES) $(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d case $@ in \ - int*32_t) range=-2147483648,2147483648;; \ + *32_t*) range=-2147483648,2147483648;; \ u*) range=0,4294967296;; \ *) range=-4294967296,4294967296;; \ esac && \ - wd=`pwd` && \ - zones=`$(AWK) '/^[^#]/ { print $$3 }' /dev/null; then \ quiet_option='-q'; \ else \ quiet_option=''; \ fi && \ - diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ - $@.dir/etc && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \ + $@d/etc && \ diff $$quiet_option -r \ - $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ - $@.dir/usr/share; \ + $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \ + $@d/usr/share; \ } touch $@ @@ -1199,7 +1215,7 @@ ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ version set-timestamps.out rearguard.zi vanguard.zi - VERSION=`cat version` && \ + read -r VERSION $@.out mv $@.out $@ tzdata$(VERSION).tar.gz: set-timestamps.out - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \ + $(SETUP_TAR) && \ + $$TAR -cf - $(TZDATA_DIST) | \ gzip $(GZIPFLAGS) >$@.out mv $@.out $@ @@ -1251,9 +1267,9 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. $(CREATE_EMPTY) $@.dir/pacificnew touch -mr version $@.dir/version - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - \ + $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ @@ -1269,9 +1285,14 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. + if test $(DATAFORM) = vanguard; then \ + pacificnew=; \ + else \ + pacificnew=pacificnew; \ + fi && \ cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ - `test $(DATAFORM) = vanguard || echo pacificnew` + $$pacificnew (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera @@ -1291,9 +1312,9 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out test -f $@.dir/$$file || links="$$links $$file"; \ done && \ ln $$links $@.dir - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out + $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out @@ -1301,8 +1322,8 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + $(SETUP_TAR) && \ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out mv $@.out $@ tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz @@ -1313,22 +1334,21 @@ $(ALL_ASC): $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: typecheck_long_long typecheck_unsigned -typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir - cd $@.dir && \ +typecheck: long-long.ck unsigned.ck +long-long.ck unsigned.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d && \ case $@ in \ - *_long_long) i="long long";; \ - *_unsigned ) i="unsigned" ;; \ + long-long.*) i="long long";; \ + unsigned.* ) i="unsigned" ;; \ esac && \ - typecheck_cflags='' && \ $(MAKE) \ CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ - TOPDIR="`pwd`" \ *** 2471 LINES SKIPPED *** From nobody Sun Oct 6 11:07:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLzyS6R5tz5XgZ4; Sun, 06 Oct 2024 11:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLzyS47TVz4s31; Sun, 6 Oct 2024 11:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RsFLR+LQ+LTxZ/HHAL7MR5KT8SGzL1zvo1VjMeufg1Q=; b=QqIr10whxUnQPD3vTQ7IT+O+/vkv/Vt+AI2hi4rmQeyah9QksFY0DyMmvEpjiycIrcYjOf 5blTOD1ipNL2CEO0PMYLmtGLl0Byhw/eEZXnyDyg5f0hi/abRyNtxOuu5xN4AB88szcQkW cm/BCiFVUx+7v47nwsiBFubgY8MuNNldVyPTmznkmyqDwVspVr7AoT029qWfzwrmTgqMI7 o2n5kLWsFWn2t18ykWPfWLCE5fbKiF1R4BHHFz9vT1Uy5wog8JNKTJm1xwaTGVlrvyGEpP hZgLeZhaPwv2oRUjALZk8MXy5gl4Z1Uy4VrKXhVBkUToi+CEAXbp2gUGKJUSzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728212848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RsFLR+LQ+LTxZ/HHAL7MR5KT8SGzL1zvo1VjMeufg1Q=; b=bu0z8TLXYMxRsJLSBAeSnksXvaFnaJV86UU+/jyNST0KET5qmgrO35PlmtKeFj0f8f/Zzk asXd8ELDli0QpH/omIhaIAYApJK2iDnakeT3fsa+QPINOvN0xvR5q1kjQP8uaKWJUHaCCU x0h0yG+EyTE4LSdMzFfT/XOI6NHIVULpQSyWc4zIik7+LfQrHMMVxvnMhgs/H7Kpc5zgMQ LXvmA5NT18wt7+JneaZ5jRLzCAQa0bgZLOHTC/TnzEQLrqTpA0Yfern+nIh8KM4XGiToSy ZQ92J8g7/OUIB+Pf5ggAd1/PDtndnBO2KsmEAD0rlLfeluhNyOM9z2pcin8C0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728212848; a=rsa-sha256; cv=none; b=nHGUoiU7Fcv5JM6//EBANB9Ve+bNftdWnHcVX6pv8LZQTX7bvg4+pbLjmdJvzYG3QTD6eN ZbomofeGLqGAlt4D00M4/fwlXlCo0PBQMKLzjq6ZZXIdBz5cEZs98ON3bpELKFvGtgjhEv bIzAuOMIP0F69K923AHwVMqvhBZpPNpTyjIrToaFed63dm2317BsQPw3E0dkePWKK/rYHL IVVMA6L3iuq8vhdTkyLBXunF9wbn4jHnn2VvH1V+xvUb/B78dGVhkYqsTyQDAerDRwOpWv 18+5ZzsIHK8it3vJQltpp6CZktay6XU/Fk1qmvgQCMfYGGGexT8sFkEoOAC3Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLzyS3l1Tz10j0; Sun, 6 Oct 2024 11:07:28 +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 496B7ScI039497; Sun, 6 Oct 2024 11:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496B7S96039494; Sun, 6 Oct 2024 11:07:28 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:07:28 GMT Message-Id: <202410061107.496B7S96039494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 3053d32194fa - stable/13 - printf(): Save errno earlier. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3053d32194fa74809235b71c0889b11a6a5f316c Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3053d32194fa74809235b71c0889b11a6a5f316c commit 3053d32194fa74809235b71c0889b11a6a5f316c Author: Dag-Erling Smørgrav AuthorDate: 2024-09-20 16:30:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-06 09:17:14 +0000 printf(): Save errno earlier. The manual page says %m is replaced with “the string representation of the error code stored in the errno variable at the beginning of the call”. However, we don't actually save `errno` until fairly late in `__vfprintf()`. Make sure it is saved before we do anything that might perturb `errno`. MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46718 (cherry picked from commit 74f1007fcc838501c74a633792c3f01833bf65e1) --- lib/libc/stdio/local.h | 2 +- lib/libc/stdio/snprintf.c | 14 ++++++++------ lib/libc/stdio/vasprintf.c | 5 +++-- lib/libc/stdio/vdprintf.c | 3 ++- lib/libc/stdio/vfprintf.c | 20 ++++++++++---------- lib/libc/stdio/vsnprintf.c | 7 ++++--- lib/libc/stdio/vsprintf.c | 10 ++++++---- 7 files changed, 34 insertions(+), 27 deletions(-) diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index a5c465bcdcba..cbc0d29ff823 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -80,7 +80,7 @@ extern int __swsetup(FILE *); extern int __sflags(const char *, int *); extern int __ungetc(int, FILE *); extern wint_t __ungetwc(wint_t, FILE *, locale_t); -extern int __vfprintf(FILE *, locale_t, const char *, __va_list); +extern int __vfprintf(FILE *, locale_t, int, const char *, __va_list); extern int __vfscanf(FILE *, const char *, __va_list); extern int __vfwprintf(FILE *, locale_t, const wchar_t *, __va_list); extern int __vfwscanf(FILE * __restrict, locale_t, const wchar_t * __restrict, diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 45a9e3d7d622..10889715e111 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -52,10 +52,11 @@ static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93"; int snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) { + FILE f = FAKE_FILE; + va_list ap; size_t on; + int serrno = errno; int ret; - va_list ap; - FILE f = FAKE_FILE; on = n; if (n != 0) @@ -69,7 +70,7 @@ snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, __get_locale(), fmt, ap); + ret = __vfprintf(&f, __get_locale(), serrno, fmt, ap); if (on > 0) *f._p = '\0'; va_end(ap); @@ -79,10 +80,11 @@ int snprintf_l(char * __restrict str, size_t n, locale_t locale, char const * __restrict fmt, ...) { + FILE f = FAKE_FILE; + va_list ap; size_t on; + int serrno = errno; int ret; - va_list ap; - FILE f = FAKE_FILE; FIX_LOCALE(locale); on = n; @@ -97,7 +99,7 @@ snprintf_l(char * __restrict str, size_t n, locale_t locale, f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (on > 0) *f._p = '\0'; va_end(ap); diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c index 2e5f8dd4107a..91748861829d 100644 --- a/lib/libc/stdio/vasprintf.c +++ b/lib/libc/stdio/vasprintf.c @@ -35,9 +35,9 @@ */ #include +#include #include #include -#include #include "xlocale_private.h" #include "local.h" @@ -45,6 +45,7 @@ int vasprintf_l(char **str, locale_t locale, const char *fmt, __va_list ap) { FILE f = FAKE_FILE; + int serrno = errno; int ret; FIX_LOCALE(locale); @@ -56,7 +57,7 @@ vasprintf_l(char **str, locale_t locale, const char *fmt, __va_list ap) return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (ret < 0) { free(f._bf._base); *str = NULL; diff --git a/lib/libc/stdio/vdprintf.c b/lib/libc/stdio/vdprintf.c index a84efaa14b4d..3d0598613b82 100644 --- a/lib/libc/stdio/vdprintf.c +++ b/lib/libc/stdio/vdprintf.c @@ -47,6 +47,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap) { FILE f = FAKE_FILE; unsigned char buf[BUFSIZ]; + int serrno = errno; int ret; if (fd > SHRT_MAX) { @@ -63,7 +64,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap) f._bf._base = buf; f._bf._size = sizeof(buf); - if ((ret = __vfprintf(&f, __get_locale(), fmt, ap)) < 0) + if ((ret = __vfprintf(&f, __get_locale(), serrno, fmt, ap)) < 0) return (ret); return (__fflush(&f) ? EOF : ret); diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index e656a2707d3a..8cc4001a93cd 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -72,7 +72,8 @@ static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; #include "printflocal.h" static int __sprint(FILE *, struct __suio *, locale_t); -static int __sbprintf(FILE *, locale_t, const char *, va_list) __printflike(3, 0) +static int __sbprintf(FILE *, locale_t, int, const char *, va_list) + __printflike(4, 0) __noinline; static char *__wcsconv(wchar_t *, int); @@ -173,7 +174,7 @@ __sprint(FILE *fp, struct __suio *uio, locale_t locale) * worries about ungetc buffers and so forth. */ static int -__sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap) +__sbprintf(FILE *fp, locale_t locale, int serrno, const char *fmt, va_list ap) { int ret; FILE fake = FAKE_FILE; @@ -197,7 +198,7 @@ __sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap) fake._lbfsize = 0; /* not actually used, but Just In Case */ /* do the work, then copy any error status */ - ret = __vfprintf(&fake, locale, fmt, ap); + ret = __vfprintf(&fake, locale, serrno, fmt, ap); if (ret >= 0 && __fflush(&fake)) ret = EOF; if (fake._flags & __SERR) @@ -269,8 +270,9 @@ __wcsconv(wchar_t *wcsarg, int prec) */ int vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0, - va_list ap) + va_list ap) { + int serrno = errno; int ret; FIX_LOCALE(locale); @@ -278,9 +280,9 @@ vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0, /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->_file >= 0) - ret = __sbprintf(fp, locale, fmt0, ap); + ret = __sbprintf(fp, locale, serrno, fmt0, ap); else - ret = __vfprintf(fp, locale, fmt0, ap); + ret = __vfprintf(fp, locale, serrno, fmt0, ap); FUNLOCKFILE_CANCELSAFE(); return (ret); } @@ -305,7 +307,7 @@ vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) * Non-MT-safe version */ int -__vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) +__vfprintf(FILE *fp, locale_t locale, int serrno, const char *fmt0, va_list ap) { char *fmt; /* format string */ int ch; /* character from fmt */ @@ -315,7 +317,6 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) int ret; /* return value accumulator */ int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ - int saved_errno; int error; char errnomsg[NL_TEXTMAX]; char sign; /* sign prefix (' ', '+', '-', or \0) */ @@ -467,7 +468,6 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) savserr = fp->_flags & __SERR; fp->_flags &= ~__SERR; - saved_errno = errno; convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; @@ -779,7 +779,7 @@ fp_common: break; #endif /* !NO_FLOATING_POINT */ case 'm': - error = __strerror_rl(saved_errno, errnomsg, + error = __strerror_rl(serrno, errnomsg, sizeof(errnomsg), locale); cp = error == 0 ? errnomsg : ""; size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index 8fc7f9fdf725..1b00e9916506 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -49,12 +49,13 @@ static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93"; int vsnprintf_l(char * __restrict str, size_t n, locale_t locale, - const char * __restrict fmt, __va_list ap) + const char * __restrict fmt, __va_list ap) { + FILE f = FAKE_FILE; size_t on; + int serrno = errno; int ret; char dummy[2]; - FILE f = FAKE_FILE; FIX_LOCALE(locale); on = n; @@ -75,7 +76,7 @@ vsnprintf_l(char * __restrict str, size_t n, locale_t locale, f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); if (on > 0) *f._p = '\0'; return (ret); diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index 68a2f70469f4..4035fc12125a 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -41,23 +41,25 @@ static char sccsid[] = "@(#)vsprintf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -#include +#include #include +#include #include "local.h" #include "xlocale_private.h" int vsprintf_l(char * __restrict str, locale_t locale, - const char * __restrict fmt, __va_list ap) + const char * __restrict fmt, __va_list ap) { - int ret; FILE f = FAKE_FILE; + int serrno = errno; + int ret; FIX_LOCALE(locale); f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = INT_MAX; - ret = __vfprintf(&f, locale, fmt, ap); + ret = __vfprintf(&f, locale, serrno, fmt, ap); *f._p = 0; return (ret); } From nobody Sun Oct 6 15:01:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM58p0dpgz5YB6W; Sun, 06 Oct 2024 15:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XM58n6B8Gz485Z; Sun, 6 Oct 2024 15:01:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ymX9h/KemfA6h7KKE7S0Zlb3iDvUacH0iDDOJNB0yd8=; b=x8Ce6iOsoVq5NurDIDha4WwbtZC8pHCmBu9oXE5imobwHk3oM9eFqja5ghykr3YSgw0UZs sL6pb2tlzI6KkhSFSIxHOTGMmUcfF38BMpUEz9cLr8ecY9otJuWEzJ7eaYBnrJ8IT7fCPy TdMGJWUtnqhqh+zIsA2q80vnrU9ZJrnr+5SdFLLJiapHLESLgnTKraXh/kLkTj8+decCyH /kHwOBCs540CYRxq/yBqwiL+HnmGXqqW7Mstp204krB95upTs9nvbKoz+npkLfDE280+X3 wMYvuYODcVtFgGFOl/Hp1onkjDPE7CLQMeyvCeEpTuQCpNdyvUJRUY129tbJrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ymX9h/KemfA6h7KKE7S0Zlb3iDvUacH0iDDOJNB0yd8=; b=QAx4qjsPVe7YKbPMW9KroJ3Qez+Hj2G7tOXyoK9WufuPFvyVuFlnG+36O1saqDjDfJrD8O ZRhwwfhOfpIcUc8LcLDgAvxySS/OKg7siO99jYgowmkmdSHGU5rlw9nn/UGu61EBD/PsoG CZgwH4eS6n9FQG6O0QqzGub6lCQLfNt6XpmJtlH+S075Vmj2opJqVATlzm5QekS9azLf1h fOMS2yM3KZsCrN9UlGaV8NSKogNFWHXdjqNDxCB1LVmlGsPFir45CCGSAQwZHEHi+OhHYv p1aPRNKLBDNVsRHDblVv9FvWs3H3QVUbutCZjK6Fo+0Yw5bRRpG1InFT76sNRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728226905; a=rsa-sha256; cv=none; b=kJV7oAc5+E1XCB9Jyerk2YE71b8vHg4j+VEG0bBMswU2uZhYSuFgrHqdw6ahcCUJa91K3i 59MAVSguMq7x3goov5v+Jo3CZcvhb2M6dCWmf0septqOLvADyNv/i3SGsTQPBY2PaZdSUD 2ogEDtmZ8mU/F6jEMNpgJ/EF5Czg+WtMeir54xAhjiyOxQWH0SwaVPdjpPnRWC0kXpBFZq HUYcAgGhDe2Ww0YaA5vH6Hz4VJcQCRxIs9Awk+NIUJ2hTiSksLvC/dUVfkpQIkBUzCcFFH IjM7TqfZ3+VbtZtxSXec7ky+JmvdoBVSL+mszo8UopNMWTNB87n/66y80Ouwgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM58n5g5nz15pk; Sun, 6 Oct 2024 15:01:45 +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 496F1jDS046879; Sun, 6 Oct 2024 15:01:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496F1j5j046876; Sun, 6 Oct 2024 15:01:45 GMT (envelope-from git) Date: Sun, 6 Oct 2024 15:01:45 GMT Message-Id: <202410061501.496F1j5j046876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2dea4de8e0f0 - stable/14 - vmm: Properly handle writes spanning across two pages in vm_handle_db List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2dea4de8e0f0ee886cf46a5ceddabd4192843445 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2dea4de8e0f0ee886cf46a5ceddabd4192843445 commit 2dea4de8e0f0ee886cf46a5ceddabd4192843445 Author: Bojan Novković AuthorDate: 2024-09-29 11:10:10 +0000 Commit: Ed Maste CommitDate: 2024-10-06 15:01:24 +0000 vmm: Properly handle writes spanning across two pages in vm_handle_db The vm_handle_db function is responsible for writing correct status register values into memory when a guest VM is being single-stepped using the RFLAGS.TF mechanism. However, it currently does not properly handle an edge case where the resulting write spans across two pages. This commit fixes this by making vm_handle_db use two vm_copy_info structs. Security: HYP-09 Reviewed by: markj (cherry picked from commit 51fda658baa3f80c9778f3a9873fbf67df87119b) --- sys/amd64/vmm/vmm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index f399f876717d..ef4c7a9af2ea 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1771,7 +1771,7 @@ vm_handle_db(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) int error, fault; uint64_t rsp; uint64_t rflags; - struct vm_copyinfo copyinfo; + struct vm_copyinfo copyinfo[2]; *retu = true; if (!vme->u.dbg.pushf_intercept || vme->u.dbg.tf_shadow_val != 0) { @@ -1780,21 +1780,21 @@ vm_handle_db(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) vm_get_register(vcpu, VM_REG_GUEST_RSP, &rsp); error = vm_copy_setup(vcpu, &vme->u.dbg.paging, rsp, sizeof(uint64_t), - VM_PROT_RW, ©info, 1, &fault); + VM_PROT_RW, copyinfo, nitems(copyinfo), &fault); if (error != 0 || fault != 0) { *retu = false; return (EINVAL); } /* Read pushed rflags value from top of stack. */ - vm_copyin(©info, &rflags, sizeof(uint64_t)); + vm_copyin(copyinfo, &rflags, sizeof(uint64_t)); /* Clear TF bit. */ rflags &= ~(PSL_T); /* Write updated value back to memory. */ - vm_copyout(&rflags, ©info, sizeof(uint64_t)); - vm_copy_teardown(©info, 1); + vm_copyout(&rflags, copyinfo, sizeof(uint64_t)); + vm_copy_teardown(copyinfo, nitems(copyinfo)); return (0); } From nobody Sun Oct 6 15:01:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM58q11rzz5YBFh; Sun, 06 Oct 2024 15:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XM58p74Gpz487v; Sun, 6 Oct 2024 15:01:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jU5eNg8LDnGs7hfLS3P+FdmmyP9qxf+fY0chGH0iCjk=; b=Nd6CZUWw4h7k1z1stYV+6rkjfXBRGO6zvRBjl5BRM0UNNbzjzSiS6Fqxv1n3/UNHAqJsMQ M+vt1YDLr5EWv8Q6FhJWEdyhJQ+QHF/RfDC5pCIjfidBogqpQwajWYDzefDBTSmJH/kX4M a2fht/DdQQ8XwfhDrd0fIJBdh34np6xXJRUHhdhl2J6kQc4hnt2348uKXFQ92R69LC1fZz LfnqMDctw+HfByROs7j6c1GrRy4nGWNEX5GP2pqsFg7zLLyGgTHn1n1lCYOVkIYAFLxNKt CYS/VrC574PLcFgGLz0zdb2jPKlP6pyCjnW08TZ9Q872uS6tpA8fD4w4r+NQxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jU5eNg8LDnGs7hfLS3P+FdmmyP9qxf+fY0chGH0iCjk=; b=VW68SNDwyzxB9lXddMtYRE44sytuZXMDA5QEO5HF6eoNTJDFUeIFoC4IcNSl8y5nb9pPMS mI5hahT2GFXTOq5O/N6NQRUU5UBguVUgElOIWkld4RYFULfHsDEKysA1+AVJs1EWnAqyMs 7+nY7h8EF+szo8zvwxWBExFJiQC0CQLpLfWVbske2bQ6WtCi6HVnzlgS4B6ZeXlxjFy26P WvbVv089mU7YA7vTSSE0l6AYCg1LDQVD5eKExUIBvUQjwz4o+A2ic4uMFOBVBq6AJUq0NB GRJ3kB9J5XpecuFE+ipVtImtBpzVdpEBFK5SCLpyx64Nym2TdDleoOFHJ0vG/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728226907; a=rsa-sha256; cv=none; b=sWsoC5kyft8AZgfY4FAdxFt42hX8KDvJkSLO0t7Rn97yPWNqyLJEidcozpEb3M7IgrN7hc XPCpZUxpo6X5m6JMSg7pZ5nCrQoOixqUYukSk8aHWcGMy4F56L+6wbPB+BW6fnrVZSShpQ dy+jnPpybaqRc92hRFzdQLNt086sFSgcxXI+E2w6q10YeFuV/WvhsPl93UUh196kK9SZ5V zFsQenq4cypOIMaigu8fvsFZydTdyHdJrFpAmpOy7cv6C7Nhz1ZFaY/I3jSMlstEjdbFB7 43I/RAff5dF+GaPaZhklTbAKQDQR1nKu5ct3ymudbFqWCCd7sNUqG8qLqDXuvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM58p6hNLz16JZ; Sun, 6 Oct 2024 15:01:46 +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 496F1k8J046930; Sun, 6 Oct 2024 15:01:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496F1k0Q046927; Sun, 6 Oct 2024 15:01:46 GMT (envelope-from git) Date: Sun, 6 Oct 2024 15:01:46 GMT Message-Id: <202410061501.496F1k0Q046927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f8db6fb90e73 - stable/14 - vmm: avoid potential KASSERT kernel panic in vm_handle_db List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f8db6fb90e739293d6d72310fa554ede072f8232 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f8db6fb90e739293d6d72310fa554ede072f8232 commit f8db6fb90e739293d6d72310fa554ede072f8232 Author: Pierre Pronchery AuthorDate: 2024-07-25 14:40:35 +0000 Commit: Ed Maste CommitDate: 2024-10-06 15:01:24 +0000 vmm: avoid potential KASSERT kernel panic in vm_handle_db If the guest VM emits the exit code VM_EXITCODE_DB the kernel will execute the function named vm_handle_db. If the value of rsp is not page aligned and if rsp+sizeof(uint64_t) spans across two pages, the function vm_copy_setup will need two structs vm_copyinfo to prepare the copy operation. For instance is rsp value is 0xFFC, two vm_copyinfo objects are needed: * address=0xFFC, len=4 * address=0x1000, len=4 The vulnerability was addressed by commit 51fda658baa ("vmm: Properly handle writes spanning across two pages in vm_handle_db"). Still, replace the KASSERT with an error return as a more defensive approach. Reported by: Synacktiv Reviewed by markj, emaste Security: HYP-09 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46133 (cherry picked from commit d19fa9c1b72bc52e51524abcc59ad844012ec365) --- sys/amd64/vmm/vmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index ef4c7a9af2ea..677dcd05b9b2 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -2786,7 +2786,8 @@ vm_copy_setup(struct vcpu *vcpu, struct vm_guest_paging *paging, nused = 0; remaining = len; while (remaining > 0) { - KASSERT(nused < num_copyinfo, ("insufficient vm_copyinfo")); + if (nused >= num_copyinfo) + return (EFAULT); error = vm_gla2gpa(vcpu, paging, gla, prot, &gpa, fault); if (error || *fault) return (error); From nobody Sun Oct 6 15:03:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM5BH4xptz5YBJG; Sun, 06 Oct 2024 15:03: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 4XM5BH4C81z49CV; Sun, 6 Oct 2024 15:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQ5fCNWx0/WH5N3vCgugXCP5a9I4MnhFgx1+yX6cbV0=; b=RyCC5kvhywrz0hrszt5TcPgsWxE55B2tH8yWKeZwmYvYMk42GqyKId8vyZA8bwwmIinqS0 LKn5ZftNhR3iGBF3ZMfj9gzE9/BKWgphOVwGFiRkGAcIY1vSUl8bxgqHo2//zJvKXm5BeC ClFzf7V5NKJ/LUEi3vKJTflJ1F3y5wSxMeBgcB7QFplnKYDHQP7AcSl8m0+D6JOfcLmRFf ru06rULiolIC3jOGIbm/nvd4cG9M6scBmqqc8zwe6U3PdzJ2sxFHWlOeubKOehNEOWiPWo a+L9NCTEptD+/NIKI4X3I/GXN3Y6JrSa5OuGu6TQZF4oy9tO/geQ7Wze32h7wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728226983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQ5fCNWx0/WH5N3vCgugXCP5a9I4MnhFgx1+yX6cbV0=; b=ZGglryaK47VKrworBMxczOqcia3cvSfC2ue0GYndSmz7iJLJeQCq/Rhez+JRPdtiKqi2zP ASVFElgSy9eOkN5kpGe37+5s6OrC5V7vNOirQDRs0crLXQFeNqRTzFz1+icBWDAGtW1QaN yD+ATOqjbD+HWTjiOFoFW3I7W10Sx36qFiaYEjpj1gbmRw9V7toZs6EminAlA5ydY2Cmw2 5QSDn6ZA41UCzj+I9RpZnAjy9GLsYL7nIfxgO0IUoTRRyl64XZsZ5DWFV0P75awM//MqDn H94M4h8WxfyjslXhl8PilbPnQylH8vpiurRfHbpbqto+i9Y+5ZKj90Oqix+boA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728226983; a=rsa-sha256; cv=none; b=TcbNJ/gBkhmYHX2AryWblflz+pEw3WJo3LTNaZNrmpp8xVN9eGtEpPyhHS6OmtsSgfwxIx d/UMa+MfNFN0RTKBonCBs4nnFoAtutFRza3eW3+UpJZRaBDSpDvuZCBYLHPUnd3n0dl5Ub 9HtMLYNNizk0ExhsGQ67rOYohqwjhZ83AnDKVQhiwRt7nfYwR8EXEkb/yTbu4h1Fln5c9b 80Z8fK9SfQWLk3mcFnwjGfsee/6PrwpFKCVv0F1SqqxW/Pw/0mfEGNsFjirWxwB8BHK8pd YzkcazCQo79IVvQxarHgj8ldtsXIPQlxatiZbsis6ucwG7e3pUcPnK4I8FybAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM5BH3hTlz16fb; Sun, 6 Oct 2024 15:03: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 496F33Qw048264; Sun, 6 Oct 2024 15:03:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496F337v048261; Sun, 6 Oct 2024 15:03:03 GMT (envelope-from git) Date: Sun, 6 Oct 2024 15:03:03 GMT Message-Id: <202410061503.496F337v048261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ca3d8480ec0c - stable/13 - vmm: avoid potential KASSERT kernel panic in vm_handle_db List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca3d8480ec0c06fc74ea95fbf074b975802ecf30 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ca3d8480ec0c06fc74ea95fbf074b975802ecf30 commit ca3d8480ec0c06fc74ea95fbf074b975802ecf30 Author: Pierre Pronchery AuthorDate: 2024-07-25 14:40:35 +0000 Commit: Ed Maste CommitDate: 2024-10-06 15:02:51 +0000 vmm: avoid potential KASSERT kernel panic in vm_handle_db If the guest VM emits the exit code VM_EXITCODE_DB the kernel will execute the function named vm_handle_db. If the value of rsp is not page aligned and if rsp+sizeof(uint64_t) spans across two pages, the function vm_copy_setup will need two structs vm_copyinfo to prepare the copy operation. For instance is rsp value is 0xFFC, two vm_copyinfo objects are needed: * address=0xFFC, len=4 * address=0x1000, len=4 The vulnerability was addressed by commit 51fda658baa ("vmm: Properly handle writes spanning across two pages in vm_handle_db"). Still, replace the KASSERT with an error return as a more defensive approach. Reported by: Synacktiv Reviewed by markj, emaste Security: HYP-09 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46133 (cherry picked from commit d19fa9c1b72bc52e51524abcc59ad844012ec365) (cherry picked from commit f8db6fb90e739293d6d72310fa554ede072f8232) --- sys/amd64/vmm/vmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index ac2dd4142dd0..1bf2077ef2a1 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -2728,7 +2728,8 @@ vm_copy_setup(struct vcpu *vcpu, struct vm_guest_paging *paging, nused = 0; remaining = len; while (remaining > 0) { - KASSERT(nused < num_copyinfo, ("insufficient vm_copyinfo")); + if (nused >= num_copyinfo) + return (EFAULT); error = vm_gla2gpa(vcpu, paging, gla, prot, &gpa, fault); if (error || *fault) return (error); From nobody Sun Oct 6 15:04:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM5DF10ZFz5YB4D; Sun, 06 Oct 2024 15:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XM5DF05Thz4B1K; Sun, 6 Oct 2024 15:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728227085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20spB0Xmg39lijxycCqO2YSsOL2kZpq/S9Lgl2OVEOo=; b=wjKIuOFcdw0gUpAcX6HysL1TRP/GtejXCAwXv+b1Fue4mNM9pPPZE0LdaUs1cuCB3VJl++ JkKuLc1J9TGRbJOBX+eeYuN3ptDWZ9W/h6c7fvVU3PMV7d4mcD3sgvxjCtYtVxzHOGOOrH 67iqR4iq4vQBlxeK31QFMHOz4oMWsVXo+10zPVL5KEXOSyT1pHe0GD598b91iu358UdtgM IxB7+71AzkQ+6iV/8YO/04WzpSSTku9/62YXV6beJqGmkkZ9XqIyo8BxIOT4Az6kJ8xbIT /GZRjsYex4NV7BIXvnK6JnYYGY27PWrhjwgmhJ8muHoyWVvpKU7u3/WauDO3og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728227085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20spB0Xmg39lijxycCqO2YSsOL2kZpq/S9Lgl2OVEOo=; b=NbtOINW5L9023M01yRa7czyLd4h1/pWPrOCY5j2cyyAVYJf5GOOpJPn4Rs5staFmvnMNf6 6Zl1Prn2Bn3kYIswV1CtqAoaYpeV+Jzh8Ne2uzHxpgB7Lu0K7W0azY1iYsS6KBS8UPywTC qRg6+Bx8xkWdHFj1AVp+koD+vdh1nengozZXMnhLk/tMC2+SL5T7sJ+EuuGVYzPEAMBJo/ oDmbMXFRY2d8YGnkuz938pg4v7WBriUaEtxoVZ4MQyz5NWVJIW3qcVY4Zw/XeSKJC3dRq3 gaEiux2s5rRlyPa13PFv25MMncTasV/4qww1lnDPXDqnvBc+3KyUOxih4Fd6fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728227085; a=rsa-sha256; cv=none; b=QjKkbe0XSUi+xsOnbcRsr4sl/AhNr1yZHSdxi2pBbcANXD9BwZX0t+H716e0X0KiD5cO4m ArntSExhbsQyP1+PiFQ610pmUIXSlGvOajJomkaW+Sn6w6obyT43F2K73HyoB+0mzKwm86 eGdIM0yF3fJ7ijbqKVqBY5GxkWyE7ArSOb7S33uuICbpc4RwyYEmWsJvwxsm/eqyvQu5xm yvA+V5XzpVeIGNtbFyUPHZ1I3vq5ixtYDTF4O15zpEw3hhl6jaTSWzfugMFsrn4ymKkV7R gqEWsGij/mvDrJ4GVyF1i69XAlHJl+kpx7119FamRD3pwzqNVPkty97Rh9hY8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM5DD6pc0z16Jt; Sun, 6 Oct 2024 15:04: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 496F4iaZ048599; Sun, 6 Oct 2024 15:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496F4iDJ048596; Sun, 6 Oct 2024 15:04:44 GMT (envelope-from git) Date: Sun, 6 Oct 2024 15:04:44 GMT Message-Id: <202410061504.496F4iDJ048596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 757bbf484c0b - stable/14 - bhyve: improve bounds checks in hda_codec List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 757bbf484c0bab2c4c7b504017079cceb833f7ae Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=757bbf484c0bab2c4c7b504017079cceb833f7ae commit 757bbf484c0bab2c4c7b504017079cceb833f7ae Author: Pierre Pronchery AuthorDate: 2024-07-24 14:56:54 +0000 Commit: Ed Maste CommitDate: 2024-10-06 15:04:29 +0000 bhyve: improve bounds checks in hda_codec The function hda_codec_command is vulnerable to buffer over-read, the payload value is extracted from the command and used as an array index without any validation. Fortunately, the payload value is capped at 255, so the information disclosure is limited and only a small part of .rodata of bhyve binary can be disclosed. The risk is low because the leaked information is not sensitive. An attacker may be able to validate the version of the bhyve binary using this information disclosure (layout of .rodata information, ex: jmp_tables) before executing an exploit. Reported by: Synacktiv Reviewed by: christos, emaste Security: HYP-13 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46098 (cherry picked from commit e94a1d6a7f2eb932850e1db418bf34d5c6991ce8) --- usr.sbin/bhyve/hda_codec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/hda_codec.c b/usr.sbin/bhyve/hda_codec.c index 1866149c020a..b7d6ec043675 100644 --- a/usr.sbin/bhyve/hda_codec.c +++ b/usr.sbin/bhyve/hda_codec.c @@ -521,7 +521,6 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) payload = cmd_data & 0xffff; } - assert(cad == hci->cad); assert(hci); hops = hci->hops; @@ -530,7 +529,10 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) sc = (struct hda_codec_softc *)hci->priv; assert(sc); - assert(nid < sc->no_nodes); + if (cad != hci->cad || nid >= sc->no_nodes) { + DPRINTF("Invalid command data"); + return (-1); + } if (!hops->response) { DPRINTF("The controller ops does not implement \ @@ -540,7 +542,8 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) switch (verb) { case HDA_CMD_VERB_GET_PARAMETER: - res = sc->get_parameters[nid][payload]; + if (payload < HDA_CODEC_PARAMS_COUNT) + res = sc->get_parameters[nid][payload]; break; case HDA_CMD_VERB_GET_CONN_LIST_ENTRY: res = sc->conn_list[nid][0]; From nobody Sun Oct 6 15:06:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM5Gc5rB6z5Y9x4; Sun, 06 Oct 2024 15:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XM5Gc3mvdz4BpG; Sun, 6 Oct 2024 15:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728227208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NTgafyVM5mYp15AcTV3u5pr2cdLaZn8aBb1OuIBkZ8=; b=kSdrbdDhePJVp5ptsuH052p8Txg4EDAJW4bBwnDx26StuVwppX0DG92tpRXZ5EC7ilPvSS 583Fl5BRdJeecMN4xryZpCpupDmEdSTVKHd0quX4xiisdtiM5KPhITjcofarsju4kA61Gk FSCfvUacMczHctuNR30fTf+nDZXtgdBDWgxxcqUsTUcVR1yAsUG9mcXp0ENlF1QdKxGKxQ wvBEbt9mwb+CQwseVaIPZez7nTcaPBbU8rVkMnc5Uu7okkd4+HMJsifuHn9jVXomLuHZe1 fdJVoh2XHZGdZfYXdDbFBOB+UicbJxy2T9JPZ2myWt2GSAJyDgT9mj772QUkBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728227208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NTgafyVM5mYp15AcTV3u5pr2cdLaZn8aBb1OuIBkZ8=; b=VzaP1JsX8/AcP9i6wMeqOeh1EYbGMDh4nYDfJOs0BGiBlgAkhMfVa+VmWjcT6NRbwSXb7D GuRWtcvSomo4kPDwMhXIF0vPx+pIbI92E1jsd2MO2iXajrBBiookk2sKg+V4qbLJukkzpZ CpWnXO0yZazovqLc2NuCdRErgxM9YAc0hBewueZDWdaKaikvdduq2fyBXAKmyle42ZV2Ne 087sd+G1Ot8qHQW4pyD+RQkf9/VNuQlm7f/F5RmT8/rjhBe4p1Ehab248xwiWhBfJA3hhM oK2i+DbLM+v5TFqrPtJUYXevOoYiFWSghPLP6dO0rKA+gb/XQN517+yxmK/DKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728227208; a=rsa-sha256; cv=none; b=A5iq8fGFts91TaWl8FF+J2AT3xS1qNPHIWrVYu5bgKgiCwnrjUg/YMd/cHQqUxMbn6QpzH N3k+r7/6qKDp4ZziwMx1J/PgYPXtdPT8DPJbeZejkvY2/mW9Puv73QR5jdvVwZL5uFE6dl 8AfgTgOKJTfafjf4djuKT0IKrT8Jaj7dagXpSIhCd8ZgjqrP8BowQPuJmZ+pDmKumhL/vp CoARCDZgHJEQzmcrqgUTTR0fSo5wCrvXri/uzHRWCdEn6jbhQV/j8/eCYaZHA1y1JRRDbh 7bwLPnzfc+ubzWBQsgHH3dhFfRAJoT9ofgmocGrM95M0OyGTnFghsiZAC31tTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM5Gc3KQZz15Yp; Sun, 6 Oct 2024 15:06: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 496F6mgX049074; Sun, 6 Oct 2024 15:06:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496F6mh6049071; Sun, 6 Oct 2024 15:06:48 GMT (envelope-from git) Date: Sun, 6 Oct 2024 15:06:48 GMT Message-Id: <202410061506.496F6mh6049071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6cb1995a66ae - stable/13 - bhyve: improve bounds checks in hda_codec List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6cb1995a66aec98261256bc4da3eedfe840e1ab9 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6cb1995a66aec98261256bc4da3eedfe840e1ab9 commit 6cb1995a66aec98261256bc4da3eedfe840e1ab9 Author: Pierre Pronchery AuthorDate: 2024-07-24 14:56:54 +0000 Commit: Ed Maste CommitDate: 2024-10-06 15:05:09 +0000 bhyve: improve bounds checks in hda_codec The function hda_codec_command is vulnerable to buffer over-read, the payload value is extracted from the command and used as an array index without any validation. Fortunately, the payload value is capped at 255, so the information disclosure is limited and only a small part of .rodata of bhyve binary can be disclosed. The risk is low because the leaked information is not sensitive. An attacker may be able to validate the version of the bhyve binary using this information disclosure (layout of .rodata information, ex: jmp_tables) before executing an exploit. Reported by: Synacktiv Reviewed by: christos, emaste Security: HYP-13 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46098 (cherry picked from commit e94a1d6a7f2eb932850e1db418bf34d5c6991ce8) (cherry picked from commit 757bbf484c0bab2c4c7b504017079cceb833f7ae) --- usr.sbin/bhyve/hda_codec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/hda_codec.c b/usr.sbin/bhyve/hda_codec.c index 1866149c020a..b7d6ec043675 100644 --- a/usr.sbin/bhyve/hda_codec.c +++ b/usr.sbin/bhyve/hda_codec.c @@ -521,7 +521,6 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) payload = cmd_data & 0xffff; } - assert(cad == hci->cad); assert(hci); hops = hci->hops; @@ -530,7 +529,10 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) sc = (struct hda_codec_softc *)hci->priv; assert(sc); - assert(nid < sc->no_nodes); + if (cad != hci->cad || nid >= sc->no_nodes) { + DPRINTF("Invalid command data"); + return (-1); + } if (!hops->response) { DPRINTF("The controller ops does not implement \ @@ -540,7 +542,8 @@ hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) switch (verb) { case HDA_CMD_VERB_GET_PARAMETER: - res = sc->get_parameters[nid][payload]; + if (payload < HDA_CODEC_PARAMS_COUNT) + res = sc->get_parameters[nid][payload]; break; case HDA_CMD_VERB_GET_CONN_LIST_ENTRY: res = sc->conn_list[nid][0];