From nobody Sun Oct 1 00:22:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RylC631CPz4w2gV; Sun, 1 Oct 2023 00:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RylC62TkWz4LGc; Sun, 1 Oct 2023 00:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696119730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDfLT55oIesf1Nu30UAME1FOmoNkYK78z7QUyE0Ohd0=; b=urhTioD+2xWLlXOgiS4kxbN4geI3ihV3pPcn13sTQsVkQ3uE2INKfK2qiXWS8TyOPetk24 tfo9ZytEx4hxl3dWNYEzVavpdVhzjcFlMYeBYLgiglNOz1ApSHU8T5W3+honzUCAVmII9e sg+yBfeZ+YSulsAydLdfAKxg4p8uvnNmwKNA34L8lvB4QyY9q619AMMyl9oKHdB2bJ2lC1 +vgRi8qm0X1XkAk8lVGvRwD2a5AagVBd3y1oWvUHM95uIuLFFUkD40nd3s2OuXreFUgEo1 P3XW5u9DKkhKK1euRdCNVJlfnXFVMPz4Xbqawe9q+WL5gQjWYhZNRVrgH9nIZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696119730; a=rsa-sha256; cv=none; b=KURGI3le8EJwFdh4tfF5OCnh0jCksE5vDzqS6pOabLQGXDaLG8CXn56HvDJplXBdsWINxi 42iXLuVl4BtAvBk2NPsoLE/K14XBsBvqqvMjurpA9fFfn42GCXHhmQvS7fVJA0gNSqoi6j /hdw2bPovLdNB/60Ao8jStkUmAuGq6JiKuIWwuv/tsqdjx1Br+NKc8rCD/0UrONcHfGkgs spnGEwh323n81S2lVPPbPEmSfgJ1Xvu7/TBt7ryNWIzO3BCVKesPAgNLdLyU8Ive4WjJOd PA4yJ/IBGhx593xjC7v5eyZP42o76Rr+uoby772Pu16dA8F5xzspdz/+hvTeVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696119730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDfLT55oIesf1Nu30UAME1FOmoNkYK78z7QUyE0Ohd0=; b=gK9M5yX69P2rzZ/dNU2Rgqk6Yte5PwJ+eMZbrW2mVbtIu0XdWNlp35mhANt/BWieDGJq78 PlK0eFW2QQlj+tDRPp0EQqUAc5MmGjrNS4swFFW5rZztnJR7KWvA+aPkoixURbjngG5O/c 5jCWTOnfIjM94il9aXq/IWatpUXFnDez/h3yEPi1n5lzyGex34sqp3Z0YJjPCz6j4UvdGm pweuXEPEOY4V6fkZSrIxVAt+DR83BClGpFn9/QQ83CFThmY6UWO7+e2DEd86bVeWKYuAXB KIoxQ8IqS5k85vQTTfeafw4t7PSACIS51L376wgCGBCOxpFY/7DtSF3Psiq+MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RylC61XrJz17Y4; Sun, 1 Oct 2023 00:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3910MA4r093440; Sun, 1 Oct 2023 00:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3910MAlp093437; Sun, 1 Oct 2023 00:22:10 GMT (envelope-from git) Date: Sun, 1 Oct 2023 00:22:10 GMT Message-Id: <202310010022.3910MAlp093437@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: f21f0d2e16af - stable/14 - arp(8): fix by-interface and by-host filtering when using netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f21f0d2e16af702c53bc150c6c23d1bc99399bcd Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f21f0d2e16af702c53bc150c6c23d1bc99399bcd commit f21f0d2e16af702c53bc150c6c23d1bc99399bcd Author: R. Christian McDonald AuthorDate: 2023-09-14 07:07:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-30 13:26:12 +0000 arp(8): fix by-interface and by-host filtering when using netlink arp(8) has traditionally supported filtering by interface via -i and by hostname. However, this functionality was omitted from the initial netlink-ification of arp. This patch re-introduces this filtering functionality. This patch also improves by-interface filtering by storing and using the ifindex of the requested interface for filtering instead of comparing interface name strings Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 79278872ad966e5f54805efbeb692c8cbc0306c8) --- usr.sbin/arp/arp.c | 34 +++++++++++++++------------------- usr.sbin/arp/arp.h | 2 ++ usr.sbin/arp/arp_netlink.c | 8 ++++++++ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 02b2bb1ac4f8..9a19d792f788 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -98,8 +98,6 @@ static int get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr); static int set_rtsock(struct sockaddr_in *dst, struct sockaddr_dl *sdl_m, char *host); -static char *rifname; - struct if_nameindex *ifnameindex; struct arp_opts opts = {}; @@ -146,7 +144,7 @@ main(int argc, char *argv[]) SETFUNC(F_FILESET); break; case 'i': - rifname = optarg; + opts.rifname = optarg; break; case '?': default: @@ -157,15 +155,15 @@ main(int argc, char *argv[]) if (!func) func = F_GET; - if (rifname) { + if (opts.rifname) { if (func != F_GET && !(func == F_DELETE && opts.aflag)) xo_errx(1, "-i not applicable to this operation"); - if (if_nametoindex(rifname) == 0) { + if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) { if (errno == ENXIO) xo_errx(1, "interface %s does not exist", - rifname); + opts.rifname); else - xo_err(1, "if_nametoindex(%s)", rifname); + xo_err(1, "if_nametoindex(%s)", opts.rifname); } } switch (func) { @@ -179,7 +177,7 @@ main(int argc, char *argv[]) xo_open_list("arp-cache"); struct in_addr all_addrs = {}; - print_entries(0, all_addrs); + print_entries(opts.rifindex, all_addrs); xo_close_list("arp-cache"); xo_close_container("arp"); @@ -448,13 +446,13 @@ get(char *host) xo_open_container("arp"); xo_open_list("arp-cache"); - found = print_entries(0, addr->sin_addr); + found = print_entries(opts.rifindex, addr->sin_addr); if (found == 0) { xo_emit("{d:hostname/%s} ({d:ip-address/%s}) -- no entry", host, inet_ntoa(addr->sin_addr)); - if (rifname) - xo_emit(" on {d:interface/%s}", rifname); + if (opts.rifname) + xo_emit(" on {d:interface/%s}", opts.rifname); xo_emit("\n"); } @@ -552,7 +550,6 @@ search(u_long addr, action_fn *action) struct rt_msghdr *rtm; struct sockaddr_in *sin2; struct sockaddr_dl *sdl; - char ifname[IF_NAMESIZE]; int st, found_entry = 0; mib[0] = CTL_NET; @@ -586,14 +583,13 @@ search(u_long addr, action_fn *action) rtm = (struct rt_msghdr *)next; sin2 = (struct sockaddr_in *)(rtm + 1); sdl = (struct sockaddr_dl *)((char *)sin2 + SA_SIZE(sin2)); - if (rifname && if_indextoname(sdl->sdl_index, ifname) && - strcmp(ifname, rifname)) + if (opts.rifindex && + (opts.rifindex != sdl->sdl_index)) continue; - if (addr) { - if (addr != sin2->sin_addr.s_addr) - continue; - found_entry = 1; - } + if (addr && + (addr != sin2->sin_addr.s_addr)) + continue; + found_entry = 1; (*action)(sdl, sin2, rtm); } free(buf); diff --git a/usr.sbin/arp/arp.h b/usr.sbin/arp/arp.h index a7de3a1a3024..487863be43e7 100644 --- a/usr.sbin/arp/arp.h +++ b/usr.sbin/arp/arp.h @@ -10,6 +10,8 @@ struct arp_opts { bool nflag; time_t expire_time; int flags; + char *rifname; + unsigned int rifindex; }; extern struct arp_opts opts; diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index 4e5c8f3d9940..40b5367f330d 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -281,6 +281,7 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) struct ndmsg *ndmsg = snl_reserve_msg_object(&nw, struct ndmsg); if (ndmsg != NULL) { ndmsg->ndm_family = AF_INET; + /* let kernel filter results by interface if provided */ ndmsg->ndm_ifindex = ifindex; } @@ -296,6 +297,7 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) while ((hdr = snl_read_reply_multi(&ss_req, nlmsg_seq, &e)) != NULL) { struct snl_parsed_neigh neigh = {}; + struct sockaddr_in *neighaddr; if (!snl_parse_nlmsg(&ss_req, hdr, &snl_rtm_neigh_parser, &neigh)) continue; @@ -307,6 +309,12 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) continue; } + /* filter results based on host if provided */ + neighaddr = (struct sockaddr_in *)neigh.nda_dst; + if (addr.s_addr && + (addr.s_addr != neighaddr->sin_addr.s_addr)) + continue; + print_entry(&neigh, &link); count++; snl_clear_lb(&ss_req); From nobody Sun Oct 1 04:41:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ryryt5jnDz4wHG9; Sun, 1 Oct 2023 04:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ryryt5D8Dz3DNv; Sun, 1 Oct 2023 04:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696135318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okEzIn0baRUBYj4N0V0ESunPZg6HUi7fdIh0nAcQzi8=; b=KdWSPWOeidJeK3+jX2aovL0Z2h5/4bWu6VF1c5MESRzSGh/mCmZYJxv5E24XuS3TGTyLgi oEXcahdgzTtYK9J96cMgZ1/4M+fn1YDi8VYWkTI0Cj4tIihcwM/+GNOudQ15q1hiZwu/3y ScQCfuQynmJULwzTE3Y/TD04dzjn5DF9ZnBg3C92wz3M7jBXeNfr/+LMo+GxKD7z0G+4Mt Ufmyexmxp0zrvRADAAZdI8X0uyqXSqj5WZeNig6ihzcMJlHIspU48SPqjw+9qzyaPMkg3w KOQPoLq8pcrzVxhLsPWp3HTcgs4VAu/4Lbo7cshM3cAMOmXbZruyNOHo50mYfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696135318; a=rsa-sha256; cv=none; b=hivmey3rGmjvE6cTuoh9YE92SMg4U2yzJZmcaMOqWT87yWF/H2fEdMmCRt7wByb28CuCNw /HiuEqTWiQpQkcVd+ofEYWLPdKtlKm8nffwTb6IkluiS7+pkFjev9/0EoeNY10wFiQD4ms mCKtseV2id3VW6bdq9fBL4n2ev5IK9MyAjkInTxj6M3ZTxvK6KB1nro7M8IlxLBMxH7N8M mYBzZiiMD8ScKEItnoDGB14rE8+aCdx7rg9X6VpfK74FJG3ZHJ+ZFzYKgfPixZO0cZf0WD Z59eVGzgwV5ONajb3qd/z3ULLcBwMmi+g27dqVk9Dn10CZz0NX+4mmDuxoQt4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696135318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okEzIn0baRUBYj4N0V0ESunPZg6HUi7fdIh0nAcQzi8=; b=GFnE15qAlxzX8aCUHuBniJ6CKf/IL/1bjQjGRxaMUrdCVbjLOcoQ/4qb9V7uwNs13YNtzf W426uiV+6EQ0mkF7NkYELKn9NdtHSxXPJRzIksNYoLFq/4ChQ4KBBUjOQHn4eGIgufxfMy vyNOZznloLeKW3qwU19MeYLL9qSjGox1FQw1JWGrYzFMB/aSkThgcqChYGvUB9X4JC9pJa z2hX7Dzb65HMmkCN1WabBXV+kWFQaQmwcL1lT6/6Y9MRQRglSDP8TIT5CMNF/Zxw75stv7 38hkyMLapHOCRYRcSWkcdICf5LuKBpvQ3A9byVkD9VWnKc2PYiuQQI6FC7j4ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ryryt4GjPz1rt; Sun, 1 Oct 2023 04:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3914fw0R023889; Sun, 1 Oct 2023 04:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3914fwVS023886; Sun, 1 Oct 2023 04:41:58 GMT (envelope-from git) Date: Sun, 1 Oct 2023 04:41:58 GMT Message-Id: <202310010441.3914fwVS023886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7454117918cd - releng/14.0 - timerfd: Namespace pollution adjustments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7454117918cd9f7900d92513a7a4e3ed361987bc Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7454117918cd9f7900d92513a7a4e3ed361987bc commit 7454117918cd9f7900d92513a7a4e3ed361987bc Author: Jake Freeland AuthorDate: 2023-09-17 15:02:09 +0000 Commit: Warner Losh CommitDate: 2023-10-01 04:40:03 +0000 timerfd: Namespace pollution adjustments Do not pollute userspace with , instead declare struct thread when _KERNEL is defined. Include instead of . This causes intentional namespace pollution that mimics Linux. g/musl libcs include in their , exposing clock gettime, settime functions and CLOCK_ macro constants. Ports like Chromium expect this namespace pollution and fail without it. MFC After: 3 days Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D41641 (cherry picked from commit fb5daae920bae84e3eec8175bf9e46304c3b2ae6) (cherry picked from commit 8bcf9a87c79d8de05bc79ff2f8530bf4a52162ca) Approved-by: re (gjb) --- sys/sys/timerfd.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/sys/timerfd.h b/sys/sys/timerfd.h index 8cb9939ba60f..cace3b71498c 100644 --- a/sys/sys/timerfd.h +++ b/sys/sys/timerfd.h @@ -30,8 +30,12 @@ #include #include -#include -#include +/* + * We only need , but glibc pollutes the namespace + * with . This pollution is expected by most programs, so + * reproduce it by including here. + */ +#include typedef uint64_t timerfd_t; @@ -54,6 +58,8 @@ __END_DECLS #else /* _KERNEL */ +struct thread; + int kern_timerfd_create(struct thread *td, int clockid, int flags); int kern_timerfd_gettime(struct thread *td, int fd, struct itimerspec *curr_value); From nobody Sun Oct 1 04:46:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rys3s52pvz4wH8l; Sun, 1 Oct 2023 04:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rys3s4QMsz3Dbn; Sun, 1 Oct 2023 04:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696135577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xk+upWZE07s7AiiIIl1rlXC/RbSdSeny5MFmjFg9hT8=; b=O3yITLXhDkKW5j9Un/rHf1YOS+n4sIKRz4n+b5VVUGN6PC4lBomrO/E3NGWP6Ijhq/zPwt BLxKNwuNYCdcbHW5wu+Ypvbf8qZviUNHNl642IZwHoprYffdN+DIwd9Mu+JTcgkUtlFREA gkK7Vz/b7PrMhdKYox+uu5YlGgCHhGplgD41bPRkIzedevq71H8BCOPVNaK7o7q5mOZQYW uDBID/Mm8hCQjwG4P7M1VATSjSGPm5ARPO2j6k/1cHMpRzduGnNdxH+6E3RK7HHImbcEXQ fJ8e0T/1aZAU1yfJs/ThERF+O5t+eZuO99f0FAHxJCbQLcHrdJQlnbbqOB8S8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696135577; a=rsa-sha256; cv=none; b=B+CsaEkZ0rPCzJbWy+RZEvkwee6k9Zk3LenxiNAzYO/4t/8e1eUx5AS66L5qcLj0a4djtO 2qhhIDIvtW8Lu1Po5xPDdTlVcNugZ45R8Q1lui6PKCmCKkoXisxdBmP88lhMWrdhLY1Cr9 hPMVwgJLaMtMfOPMloS1bl42kLpOQQDb0gv2pzzrWR+BsxHbuNfkN4WPcMHiIy8doJg8MO YGye9N69JtZ3Bjinjmc47++zHV7VFnmb/cz4u5rbP3FjRvSb1q1/PPpI6YRoBz2iNf/dIV uMObcHc0KJN+OWAKjyFGDXfq2eRVQFuE1+r0fWlnI2wp72Nhgr7HR3W54OlSGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696135577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xk+upWZE07s7AiiIIl1rlXC/RbSdSeny5MFmjFg9hT8=; b=ni2bE9C2COh//XyscLjYIP8VVYHR5KiPViExL4X977ZWMC1QoHoj96Pvr4T9wMYFGCDAVo zUN9eAxf9usIGS5uGEzaauMD7RJ13ryvQXs9+O7GWAuZtt2fFaFqj2gerYu4PT0T7ZQrfm DcGbrg5N7EUF1lDwuNas185erJO2tFUDPWBxP5JO3KLwLbda2tgfZCFltUwGOp5T+r9UkV r5iOabJ+JWNYjsJMHjZDJso7JVWBK/J8dOmjAYJ8S6Od/gcVsLpZqCD6+viwJJyrI5FBvU 6Gmy3S25ek1lh/fBEElMR3zRKzjBRqC2T9eKiZb0HiMZUIbqrIl7GUC7WCpUpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rys3s3Tq4z268; Sun, 1 Oct 2023 04:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3914kHtg026926; Sun, 1 Oct 2023 04:46:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3914kHPQ026923; Sun, 1 Oct 2023 04:46:17 GMT (envelope-from git) Date: Sun, 1 Oct 2023 04:46:17 GMT Message-Id: <202310010446.3914kHPQ026923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 408daf2caa92 - releng/14.0 - regcomp: use unsigned char when testing for escapes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 408daf2caa9273b1cbdc8223a3da6e179e922fc2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=408daf2caa9273b1cbdc8223a3da6e179e922fc2 commit 408daf2caa9273b1cbdc8223a3da6e179e922fc2 Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Kyle Evans CommitDate: 2023-10-01 04:46:02 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Approved by: re (gjb) Obtained from: NetBSD (cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0) (cherry picked from commit 56b09feb23d98fcd0c4aed8d4f907a5a2f6b5ea9) --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 791755ceb14d..42fa1b99e58e 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -828,10 +828,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -992,7 +992,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1302,7 +1302,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Sun Oct 1 07:05:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ryw855d6Gz4wPqR; Sun, 1 Oct 2023 07:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ryw8555Yvz3NNd; Sun, 1 Oct 2023 07:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696143909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23RhBupbGqpOYOXqDNWgTycqHM670LhPyDshfFzU41s=; b=tQRnOwV30HSh2ggRct9koo8OuUpQ8rKYOCfdchJT/bfqZ/94dk4/jtjik9pIS0VELv4HHA Tw/wLSwd5q4q2JbqiW3Jsk8IOQ0o0Zfe/nEElX5a0ZgOfzFYUX5EdLbKqhaH49MMIdgOlo /Ch5OaNuInPmRVjmETZHfGKCHye5ssc43+jpeU31TkU3lNmEpYpBnrzhBr1GUIdO0eDTrA OvOqizpgZG5jLQatVKp42//4exBbLhPM1iUvK4GmzFdowkvU5sMzKeBZvcigVLj911L4gv raYfPEo0jqQ5RDPayzr6xeqfYOMWRBSe/px9bSI9fI1CCfqAIGfekIE+TJZ1Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696143909; a=rsa-sha256; cv=none; b=tO6R1/Un+idqPchLe841XMZmShqS2J3j5KZkLhFc5a+sbEu9O9rDbmv+Xg6CRKy+yFzURM cuytr03CiQrQnHD+zwMFcdFbKZd3VsDZqAO7tW9sVk3p2+QOE2wSQab2L0y83/beaZXtOP twP4IC0BpgKSaB4AfKGwQ7NkmbJQZwRxqec+AfJ2YD5z/iy7bEo5iIPSpiWrqGY8nnOlNc UmeRjssz1TTtTDAsiPH3Kw58T2tw88B0YplpnkvwewhZvszuIOMQFiyC/scT8j8hsuwAvY DstFw85ITSe8mmNen20Iq4DjQ5B1RRCY7J6tlpleNvn2wWnnrglOsHS7lovEEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696143909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23RhBupbGqpOYOXqDNWgTycqHM670LhPyDshfFzU41s=; b=iyVRS6mOSt6GTC6CA4FjbePkbGUUIigQ7k6xjzb387mI1GdzhDO8yQO+XzjInheL9GyAV7 SNHDnQyqwZ6b2Nar5GvH9Rc5CJlglsysNsu/tXIq/yfoiFE26iO1mSiAcyBkdbtv2chWJQ 3WiDCBvYO1QMIkqHM2PnN5tqcV7OhoAu0Wp8rKjjpDhUs3UrhRSUU0h14CCrxbwjwKyLjh Cw34jiwTrVHw2wUlCvI/c1RMnMAnWEiKEiA7w/e53ukHT7haaM7loqLJ9lhg9nbYgZ3hm+ VzHe52PLooe9sMOjqzf9FujWiWqsNvOtctMOXfbGCcWIVZ7aU9N4tdQYIc6/KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ryw853t60z4dX; Sun, 1 Oct 2023 07:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391759V9059250; Sun, 1 Oct 2023 07:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3917592x059247; Sun, 1 Oct 2023 07:05:09 GMT (envelope-from git) Date: Sun, 1 Oct 2023 07:05:09 GMT Message-Id: <202310010705.3917592x059247@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: e6d405e2bad2 - releng/14.0 - arp(8): fix by-interface and by-host filtering when using netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e6d405e2bad22fd98f6296a793ad0c97776fe03c Auto-Submitted: auto-generated The branch releng/14.0 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e6d405e2bad22fd98f6296a793ad0c97776fe03c commit e6d405e2bad22fd98f6296a793ad0c97776fe03c Author: R. Christian McDonald AuthorDate: 2023-09-14 07:07:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-01 07:04:45 +0000 arp(8): fix by-interface and by-host filtering when using netlink arp(8) has traditionally supported filtering by interface via -i and by hostname. However, this functionality was omitted from the initial netlink-ification of arp. This patch re-introduces this filtering functionality. This patch also improves by-interface filtering by storing and using the ifindex of the requested interface for filtering instead of comparing interface name strings Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Approved by: re (gjb) (cherry picked from commit 79278872ad966e5f54805efbeb692c8cbc0306c8) (cherry picked from commit f21f0d2e16af702c53bc150c6c23d1bc99399bcd) --- usr.sbin/arp/arp.c | 34 +++++++++++++++------------------- usr.sbin/arp/arp.h | 2 ++ usr.sbin/arp/arp_netlink.c | 8 ++++++++ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 02b2bb1ac4f8..9a19d792f788 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -98,8 +98,6 @@ static int get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr); static int set_rtsock(struct sockaddr_in *dst, struct sockaddr_dl *sdl_m, char *host); -static char *rifname; - struct if_nameindex *ifnameindex; struct arp_opts opts = {}; @@ -146,7 +144,7 @@ main(int argc, char *argv[]) SETFUNC(F_FILESET); break; case 'i': - rifname = optarg; + opts.rifname = optarg; break; case '?': default: @@ -157,15 +155,15 @@ main(int argc, char *argv[]) if (!func) func = F_GET; - if (rifname) { + if (opts.rifname) { if (func != F_GET && !(func == F_DELETE && opts.aflag)) xo_errx(1, "-i not applicable to this operation"); - if (if_nametoindex(rifname) == 0) { + if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) { if (errno == ENXIO) xo_errx(1, "interface %s does not exist", - rifname); + opts.rifname); else - xo_err(1, "if_nametoindex(%s)", rifname); + xo_err(1, "if_nametoindex(%s)", opts.rifname); } } switch (func) { @@ -179,7 +177,7 @@ main(int argc, char *argv[]) xo_open_list("arp-cache"); struct in_addr all_addrs = {}; - print_entries(0, all_addrs); + print_entries(opts.rifindex, all_addrs); xo_close_list("arp-cache"); xo_close_container("arp"); @@ -448,13 +446,13 @@ get(char *host) xo_open_container("arp"); xo_open_list("arp-cache"); - found = print_entries(0, addr->sin_addr); + found = print_entries(opts.rifindex, addr->sin_addr); if (found == 0) { xo_emit("{d:hostname/%s} ({d:ip-address/%s}) -- no entry", host, inet_ntoa(addr->sin_addr)); - if (rifname) - xo_emit(" on {d:interface/%s}", rifname); + if (opts.rifname) + xo_emit(" on {d:interface/%s}", opts.rifname); xo_emit("\n"); } @@ -552,7 +550,6 @@ search(u_long addr, action_fn *action) struct rt_msghdr *rtm; struct sockaddr_in *sin2; struct sockaddr_dl *sdl; - char ifname[IF_NAMESIZE]; int st, found_entry = 0; mib[0] = CTL_NET; @@ -586,14 +583,13 @@ search(u_long addr, action_fn *action) rtm = (struct rt_msghdr *)next; sin2 = (struct sockaddr_in *)(rtm + 1); sdl = (struct sockaddr_dl *)((char *)sin2 + SA_SIZE(sin2)); - if (rifname && if_indextoname(sdl->sdl_index, ifname) && - strcmp(ifname, rifname)) + if (opts.rifindex && + (opts.rifindex != sdl->sdl_index)) continue; - if (addr) { - if (addr != sin2->sin_addr.s_addr) - continue; - found_entry = 1; - } + if (addr && + (addr != sin2->sin_addr.s_addr)) + continue; + found_entry = 1; (*action)(sdl, sin2, rtm); } free(buf); diff --git a/usr.sbin/arp/arp.h b/usr.sbin/arp/arp.h index a7de3a1a3024..487863be43e7 100644 --- a/usr.sbin/arp/arp.h +++ b/usr.sbin/arp/arp.h @@ -10,6 +10,8 @@ struct arp_opts { bool nflag; time_t expire_time; int flags; + char *rifname; + unsigned int rifindex; }; extern struct arp_opts opts; diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index 4e5c8f3d9940..40b5367f330d 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -281,6 +281,7 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) struct ndmsg *ndmsg = snl_reserve_msg_object(&nw, struct ndmsg); if (ndmsg != NULL) { ndmsg->ndm_family = AF_INET; + /* let kernel filter results by interface if provided */ ndmsg->ndm_ifindex = ifindex; } @@ -296,6 +297,7 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) while ((hdr = snl_read_reply_multi(&ss_req, nlmsg_seq, &e)) != NULL) { struct snl_parsed_neigh neigh = {}; + struct sockaddr_in *neighaddr; if (!snl_parse_nlmsg(&ss_req, hdr, &snl_rtm_neigh_parser, &neigh)) continue; @@ -307,6 +309,12 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) continue; } + /* filter results based on host if provided */ + neighaddr = (struct sockaddr_in *)neigh.nda_dst; + if (addr.s_addr && + (addr.s_addr != neighaddr->sin_addr.s_addr)) + continue; + print_entry(&neigh, &link); count++; snl_clear_lb(&ss_req); From nobody Sun Oct 1 13:07:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rz49y0flHz4vGpR; Sun, 1 Oct 2023 13:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rz49y06dbz4NyD; Sun, 1 Oct 2023 13:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696165638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=geFe3S4PGQUUYJewWC2StnHlHvkCVj/PlNUbLUOZ8lw=; b=xPWAazZEImvbH/WJ68rsHLxd/JeOqCsPbxZWvII+uNCrJYIsvdhq/SfLOjceTrAgOBtF8e Re7g8hVQn5g3DKlNmQ/OMjSkoPp+QOIHEatJk8NmapBRiwqTDRLGTBYKRX2PrH1Pt93Svn F8q50NWs0chEEB8JHc6e8WSOV330s+aG1du0CdqoH7sGc6pWTN3D1j60+aVVqPyO7Zulyo FLZ45HCZiJlRXTUd5jz7+b79uCKPc3HERAgaRWPlRnVmIYfOvjh5xpDn+TcDybhyskUsw1 /10Yss58x8ES+Ec4u4e+uJn42/sWAWpQXPxZJrCu/xES2xkx89ey3/0eT1BYjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696165638; a=rsa-sha256; cv=none; b=hBZqyR3SmP6N13acbN7+mrWld8w9qtAFI1gwa7fUxMq+5xkdfJ97IpKzI9GXMawKgsQl5J wIRRUU/876WYG0jSfxYbLRXg8ZAQ31IO+r2u379lyj4vEAR5Gt4Nu+p3ZP3MYccDF2c/bS /F9Ik5x+foZBHhdX7KC+OMRuZecvKDjKn0OuoN2WwtbkhIaY9EqVMa0WvDTx75lJQ5RVO/ 0JBB3Q7mQB2GWzsjxaMeWQCn0PX8aQ7eO+VwMxhRSVeG9lI5KeZUX/KsV3ysC1LCMQtomW 1irQoZdI/4KfeTuHtilagNWuW+DhIyvVolhYniK14zJc1eJ5y4hQgWV4Ks/VNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696165638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=geFe3S4PGQUUYJewWC2StnHlHvkCVj/PlNUbLUOZ8lw=; b=KNhGpblp7wSu9dCrnkVu96MVBXJtJRsU0Z4hOy1YphjG6K5KmFYBVQV6vrxluAgXeUh2fX OuJ/iQ7jgN9MoGCwLrlp+sei172OU8s6/Je7/xOY7T07yuteZVRn8QdRgCQY7RCLCIx1Sj uG9Leh54N1dXe2iO6j903Hw1CXAAyT1YOp3Yifjx98UEE/oM4KqA3+B2kN3F9ASOm9eic/ quM1MqXF2DJBMlg4rgh7Th6lW0k+DS0ah+zpj1j2RV6cIXe7bT/3ej4S8E9U9JhV4NiCoT kjSrQTPoLacwQr/yyd4tUrRR6NdniPPI11v+v1KUkqqOSBo5QKZYvvhADCnVeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rz49x6HHvzWNF; Sun, 1 Oct 2023 13:07:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391D7Hss058537; Sun, 1 Oct 2023 13:07:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391D7Hta058534; Sun, 1 Oct 2023 13:07:17 GMT (envelope-from git) Date: Sun, 1 Oct 2023 13:07:17 GMT Message-Id: <202310011307.391D7Hta058534@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: bc412215646c - stable/14 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bc412215646cbb21529156d08fbbb7bbf5028c26 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bc412215646cbb21529156d08fbbb7bbf5028c26 commit bc412215646cbb21529156d08fbbb7bbf5028c26 Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-10-01 13:06:44 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 9cdff05c24e4..b9b277cca1c8 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2903,7 +2903,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Sun Oct 1 13:07:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rz49z24LSz4vGvy; Sun, 1 Oct 2023 13:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rz49z1FNGz4Nyl; Sun, 1 Oct 2023 13:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696165639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjG92aV2me+XfPCPlkFCz5N2zF+JZ6XjrSpsUgBO4uY=; b=SP99PJbzyAEYVq5c3vvKV7kdPSm0/mIZJ1NykXFLsmTuOM9lUi3wPUfobrIpR9afddI2K8 F+lTBAciOB5kAZF9k8q+1aWpS6mwLb3JRcYPygCdyjU02tjkUH8bdESXgFeF+/lHa/XDOK eynAqBBAHm+aqEV2lR3lX3ITE/JRT9aPlysZskGbZ+3AulKrXfVZu/mKiVeri8OkTP7SrE GHDVtoZsYdRZWH+rrDsWkg3ls7IZzJss3xhIMVIjpGO2T47Y+S9A/Hyvb33wjzYf5gkidu M05d9jnciGm6x/aYEyzTpi8RRX780Um5qNbZzTlJTMNTQsqxX0CiUcSAU7cxSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696165639; a=rsa-sha256; cv=none; b=cM3/xr7kOlRnsbhXFLG2OIDQ1PgxP0dVKhfndC2I6QEwmtA7biLINdxdqjyg6qtc6UlD7P Cm5bVmGu94t3amByr3HqHu1ZvhUjajpen44N6+OMxr5l2VUQme2Ch9EtZ51k57WQSH34sJ mBWyZ5jgM/PvQmqhxcfSKKDCJp5GjPd2rtvMMg3HsSY8lDSl5nYNVVJ4jyA6e2lDw+WVCZ IRaYdqm+S0Yhg7TwzH8LSYmbe8pwhWPa+eZ95c/12xIIkXcf/zVSkZiNccGg5xouN/7UUJ xSyNFXF1+8riBU47eRHrrHv9XeDvH1LqOP+VpXTovYs8C0/VET+HNSmcp7Dybw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696165639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjG92aV2me+XfPCPlkFCz5N2zF+JZ6XjrSpsUgBO4uY=; b=d4yB3eTRwRVbpTe8ViKWw63CLikkzpn3BnRPZFgL56UBvTTmGy0mzIB+Sl7jQDWoG7eQbZ 5RZEeO9QsVmnOlhdXFPlcjoqgOHZDH7oNF4ORq4hMN81Fz4OU0876sXzISrsqE+LwgaOa+ aas4MHjf6J6HQWLyn0iqXVBgdmShjd5PgdLpKpd/rnqQo4LSkAw7uGk1c+4GHVA5k1eg+H TSY+8C66a2EXYpGlBGS6CsU8J5OCcw4JoSEfTBAUJGq800MPYVpSWiL2+/zIm94/x7i31c SERXzUjroDqT5+sE7Req9uegjiz6i+TlBc6KG9v9sc0mqNrZkzgND9EtVwAe3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rz49z07zXzWcV; Sun, 1 Oct 2023 13:07:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391D7IcZ058594; Sun, 1 Oct 2023 13:07:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391D7Iw9058591; Sun, 1 Oct 2023 13:07:18 GMT (envelope-from git) Date: Sun, 1 Oct 2023 13:07:18 GMT Message-Id: <202310011307.391D7Iw9058591@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: 48316eed02bd - stable/14 - pf: add note about changes ported from OpenBSD after 4.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 48316eed02bd6d31d2aa5cbcb77cda33625aed8e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=48316eed02bd6d31d2aa5cbcb77cda33625aed8e commit 48316eed02bd6d31d2aa5cbcb77cda33625aed8e Author: Ed Maste AuthorDate: 2023-09-27 17:59:30 +0000 Commit: Ed Maste CommitDate: 2023-10-01 13:06:44 +0000 pf: add note about changes ported from OpenBSD after 4.5 The last comprehensive sync with OpenBSD's pf corresponds to OpenBSD 4.5, but many changes have been ported over since then. Reviewed by: kp, gbe, Kajetan Staszkiewicz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42002 (cherry picked from commit 3e609fd481c07802fe837ed834c3710b8c19493c) --- share/man/man4/pf.4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 4055c66fbbce..4f0ff50d3db5 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -1219,6 +1219,9 @@ and then .Pp This implementation is derived from .Ox 4.5 . +A number of individual features, improvements, bug fixes and security fixes +have been ported from later versions of +.Ox . It has been heavily modified to be capable of running in multithreaded .Fx kernel and scale its performance on multiple CPUs. From nobody Sun Oct 1 16:31:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rz8j05VhGz4vWKD; Sun, 1 Oct 2023 16:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rz8j053hZz3QWV; Sun, 1 Oct 2023 16:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696177860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hJIxSNctamg7y0/LwFUfKzkfOLkEjzHa8ml4051FfQo=; b=u8IRKd2W4Rg9jieBb/cM5NK4sxGhMq4Ln/UUv5Ua7FDsfWwP3uPSH4U5jsBxdDOqTtvlZp bWUVVO/2A8waiPB5oMklAuiR0l9IaSU+usRLm6/tY+19dNiUnWMzOoUTOACH0JrhAyybCr 1F7OplDBhH8EzSBaVgNE85N9dAzXhJnV3kKc0J8Nlhr0VW+f16MO0s08a/+R35QBo/AMel JdTokiuK+2O/XGo3Uf9MMW6mkUrY9y3tt99ePc2Fg9pE7W5hVcgeF8Out5XZgfrpJSLsGZ 9IPUWDd2BXfd87dxxDlysyhBIlD20HsjlBF8Rwqw5j5f6+DQFXTg+FIblT17nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696177860; a=rsa-sha256; cv=none; b=cZPIu89ACYzTLyO+0yTHA86hcehiW2OSrwi0bBL8ilLVCCmAl3JuU13DeB2KRz1qFzdPIf hsxdDQTRZI0p1esaSqbSqycEq/ebglJbo03U2V4A5gXZwWVdR0Xr0YKBSai42kZSv+ZSRg uBPg7Ljhtc71gOFNpLn3QjAsHLDjJuxPyl/jPR+tzU9T4uHinbaYIbOTmdYzrq6nY1HkDK PmpHgNy2ktggixelN/wROzPKO/xwCj5wliJrpOWslRZRoeQZg6hoWD8W/nEqIly+8243Ge LKFTGdEkrl0a4QOSak080OL+uspVvUmZ1qVQwsYql8lAtzUuLD2rPYkSs85UBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696177860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hJIxSNctamg7y0/LwFUfKzkfOLkEjzHa8ml4051FfQo=; b=yz9xErM5JrmZjGy0dB+mstx2HMSiz0KyP7Sa+W5mnvE5JGAgz+I7KzcYD78LtxLZs5ZrB3 jjbve0QCkfsUwffYgJWazaUXbpgR1buM+SBta9/65J8VZri2ZXXC6jX+NpYoCWbZAsCVlR KK9w6ubiGYfwZfF7RFU4HTCHSF0v4fzpVxPApqSYdN/CPfwKR11PFtioEJgSv8G41APxY3 N97Z1f+sAXE6PWfub+vlhtaEGb3g+6YPIJ+gY64x+iFqnq73SY8TjeBvAmf9MUb8Y4xYiX IJA3wrs//+uzfFsys6PSRoXjgUXALenW7ly8RCXXn2m11g7TPY+VJZUFrONnLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rz8j0476wzcF3; Sun, 1 Oct 2023 16:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391GV0VW098853; Sun, 1 Oct 2023 16:31:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391GV0Ow098850; Sun, 1 Oct 2023 16:31:00 GMT (envelope-from git) Date: Sun, 1 Oct 2023 16:31:00 GMT Message-Id: <202310011631.391GV0Ow098850@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: 4719202d8cff - releng/14.0 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4719202d8cffdcae1645b2bf508ba6097e912b77 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4719202d8cffdcae1645b2bf508ba6097e912b77 commit 4719202d8cffdcae1645b2bf508ba6097e912b77 Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-10-01 16:28:04 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) (cherry picked from commit bc412215646cbb21529156d08fbbb7bbf5028c26) Approved by: re (gjb) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 9cdff05c24e4..b9b277cca1c8 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2903,7 +2903,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Sun Oct 1 16:33:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rz8lW6fKYz4vWlB; Sun, 1 Oct 2023 16:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rz8lW688rz3Qt6; Sun, 1 Oct 2023 16:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696177991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVoyy+9NOVuV1ro0IGc7AI55uL8P08OY/EdaF4yK/ak=; b=ZZ0192LcCbJa1Clifn82mubqWLPb7mh9ki0Zq2b53wcbRlY3mgbWvdf4WfsMRkltwIFZ2H ACmHE6Gpa/A9P7kIxsQJ+ovC2eNy/s8DGERNdQD03Uu3PvQ7DOio3kLbzlZN8HkjYZd5cz bfrfW4Z8XgasRI8DOU/vJpk9YUGwcxebww4+k7KH2jihoXLn8dCUG1o9cQGuAkhfSPLPGz 6kG6S6W3VNo48qe4u+4xT10u8S7xyjnbVi/SzTiuBjQlfXDUhGuS4YFrM6IIEmUmRWMokk hnU1bjipJbJe6Lqpo3EaHFxpXdcBZSqKgHGxkSlamblIZXBJK6+igkEwITWfQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696177991; a=rsa-sha256; cv=none; b=xWjJifABfUZJi5O9XcnFvQ93Urvi1vrury8HCQ6clm3GZ/j4TLRU4XegdXphnDEFP7maEj O45rqVyfkhdB8XImQLfErwNGYmhLdOR28EUSLLKBHZnlks9+NIYogz46SYRzT8fLPEv5Ke iGfSNbfDyFIyM8etvDNj6yQ1uQktUqVHW54EV5mC0NODLz10lhtM9mhGqct4oKfBt8vUsT APbs0PsOi9UJbLTCWhU/cany9JWNpk2Yj4GVNEqgaT/HRato+yCxR9wAUby2yEwlxgEFhF /h9sg+gMJ1o+4nclNkemTachPFUICQBLrfCggCu4W3tgvnNKeUMSxJ6SoIZdPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696177991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVoyy+9NOVuV1ro0IGc7AI55uL8P08OY/EdaF4yK/ak=; b=HjLPkKdX4w3F/TQgZUTlzmUSMCsn30jwudZFGmWcYGYaABrWhfe2dVNXZGjEvb4MDFHCRH hjzrkqiJGfRY0+FjuMUXFrDTBZk2UUzf6aIyvRu6nGrdlnMwEcck/LycJ9U+XvID5jmhdP RwoEwaowW+SRXkf5BuQV0pynNRJ9ETfDspL9NmL3Rn5wAshkc9ultOlTZbdyTaWHEv5K/e PoS6tyLWi9ADLOyVYMsmIClhluKsZX7yzTMgAwJpoKCiITw/NUWuvuv8vTolF7AR9gFaNq nHDv2xFLITCuoJdNi0qVboPkVQkUqrGJid4HjXx+n925C6MQt6N02fOgHMEAPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rz8lW5BdJzcvn; Sun, 1 Oct 2023 16:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391GXBV7005681; Sun, 1 Oct 2023 16:33:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391GXBtg005678; Sun, 1 Oct 2023 16:33:11 GMT (envelope-from git) Date: Sun, 1 Oct 2023 16:33:11 GMT Message-Id: <202310011633.391GXBtg005678@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: 774cc6348a50 - stable/13 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 774cc6348a50c13b952e9f36ef8395f9b48733db Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=774cc6348a50c13b952e9f36ef8395f9b48733db commit 774cc6348a50c13b952e9f36ef8395f9b48733db Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-10-01 16:33:03 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 9cdff05c24e4..b9b277cca1c8 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2903,7 +2903,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Sun Oct 1 16:34:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rz8mc2DKzz4vX2K; Sun, 1 Oct 2023 16:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rz8mc1jvHz3RJk; Sun, 1 Oct 2023 16:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696178048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HQ28zKlhBJhFiBAzN0GVRdVXY/CND/wUEHCVsB3AVa0=; b=S7Olr1aex417ncn+69FJoubtNWU1Cvl5T8LVpUTiJShabSjS7/VDlD5XZMrajWmHWYkq4m hJjueTOBaWkZP9vpuidTkeJ9IBLg7zthdg6a25t56IpQrpMeSeNvF26ByJ79k7z1fUUIIv yBtKyV+SJtdcLqVjpAFtLbfmwDYsVbI9o+/5P9v1DOHPN4x07RKdeDUfQSYUbuM3jsBpxE D0QYmuzoFH1gIXhkP/hxAOmxV/q2a97ZeokAbZAnXtctrScyjC7ZZPEZV1IqbIfTV51hjE ec6rW6nNYkha5hEJKAT1XNHVsUrupi00ibK8ZZVkszCzNMuuKLZmnhWCMI2qBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696178048; a=rsa-sha256; cv=none; b=DwPJaUG8JpQX19SqI+3+2N7liwUHFLxXkPLNZqrK3p7F6/IP2Yq26gTx5DKPtHs+l9k2ut uZN/xCSF9ClELtdYtS4Bu8tsT/9ID7rJjCpRLnULoclviv20vTY0kMXV7S7a54UZ070dAU wKxxxiayBgnNbti/6UxJEB/PGFiKVkSEIQL0OGGNElF+FloccPpC8lSQIHcz64g+rQUIdV jxS9wDMIMYzY/UWKhjGGJ1pUzuVt1W5Jxo+mFCpSDa681uTy/qzpbxrKi+Yqm6/A5kvQak gAr5j8mxiAR9bd2PJM2eQt/QVIcx0j18d6fDkzyFpi6dOXcofAxSNZN7ojercg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696178048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HQ28zKlhBJhFiBAzN0GVRdVXY/CND/wUEHCVsB3AVa0=; b=ff7gK+UZuSDWqQk72VQVYgly3dFmPIca0s16j0FarQwTJXL40VryqtqFIaREf4zAF355m6 1nac6zYeEkLFMc4anvetVLXIzBlyd0a4Yy7AnUtkNdfCBJbBXVqZLskO/E6ujoWV5kYAZ/ 5ZDBWzMsYmpoJb+kfuuhbvJGKvkxegIQ6q85gMMxunPTUUFer8TPcJzTSTosxFaWY8ELLc PdVTXi4i+aOrLHrDRsjmT3eplBJVWmSxRQPknmuPiM5CUbbCFXR+3/saqJxKdV6t+bXW0R zqLSWrCGSC7sXVyKRdsC6rW64NZo2WHzYbH45XK9u0oL7lujghKvcyy9jjFxAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rz8mc0mZhzcmC; Sun, 1 Oct 2023 16:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391GY8Pd005939; Sun, 1 Oct 2023 16:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391GY8qh005936; Sun, 1 Oct 2023 16:34:08 GMT (envelope-from git) Date: Sun, 1 Oct 2023 16:34:08 GMT Message-Id: <202310011634.391GY8qh005936@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: 274281864fc0 - stable/12 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/12 X-Git-Reftype: branch X-Git-Commit: 274281864fc03c62443677751bf3036fbbf9d778 Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=274281864fc03c62443677751bf3036fbbf9d778 commit 274281864fc03c62443677751bf3036fbbf9d778 Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-10-01 16:33:56 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 0641aa41921c..a01e81d7be49 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2905,7 +2905,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Sun Oct 1 17:30:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzB1P1JB6z4vZqh; Sun, 1 Oct 2023 17:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzB1P0Q7Dz3YR5; Sun, 1 Oct 2023 17:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTxHh98fHcDjo/DetIg9fBqmFIi22j9crEXjZlfigYA=; b=J0EQsjUYlXfCroUO52acfg4JMB/E6K97dbXCH/z02rDgyprhAXIC7MLjOlj7xy+Um1FsEP ZnssPWldx5LGllz9VVi0W1poxEczghi1+Yqu64AqD/MalTfPN4YDo0zP323XzESWuQBQZc KDWd5+haph4HtLwZ57eIAZsUC573cnyhWAYxK2lnbIDfyICJbijqymCFy4+hh3Ocm1ckB4 +pwGQU+tDwWxw5VJ2uq+dWfXijaOfHuHAY5czCJA7/UDJKvrxaj+0n46bcP0FfGhxYKWX8 YOolm53PI/XTzN9J1fvHS4nuxt/K7zVllmsIT0dByPPyxKpt/fP9jXr5SMA9og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696181417; a=rsa-sha256; cv=none; b=NeZPxZwH1IF7rwDxkRN944f8uw22LA0stcVOj10Tu+rUVjVTkcX/+Sjly9p8riYyYuxZaM fv7yiJ45NKBfGpSRvO4FVb7PoUt+d58ScsGRLih6PB1UVsHNrgSlXTnGtxcwo5Q0bIqs+1 CvznYuvHEf8fpJCbIV/ktSkiHi2FzTFps7oRuhyDu8lAOc0TMTM6MFDl81+7CRmB0xPARs cdWk/foLExSVgSPJaSw+dBpy4HeMUQYrui4OkMzquq/6pdrt0Dzwd/BJMXOJaZVL4/56ss 1FCXvg1gLRaySD67KRHDB1ThuKoCvzM5TsMtmpDeXsPvnpEYusBzBs1wACXqRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTxHh98fHcDjo/DetIg9fBqmFIi22j9crEXjZlfigYA=; b=knBnFzVKnNShJDIRnsyqmZ4dFiLnYIRHhNzfP5sfiAYYcWhxaun0rRTTlQrQJKeu68NxM0 MSCj5uROgRAZ9w1IsovVQiwkn74nVHL4xiJZdtM+rrg14XG5qDYUiXIjAHGiqqXJEUWbqv YnF+wHQsC3EZZOHlWq3C5JLBngsk7x3wzWL0eCPmhdQurDax0HSUFD2/1BdECAW+NG5oSQ 64Gog1l1WjMU6Wuzr5rHaadF/W/U7cWDkSuzF16V1roas2RTbRkC7BpXVnMFu3/XdCNa3i 5S8vA2L2ZNKSoV8tnAO+InKitpY1FHcUzcoYdxF//ZpQfxwCWD9KnPhrQwhm5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzB1N6cYFzf5W; Sun, 1 Oct 2023 17:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391HUGRp097917; Sun, 1 Oct 2023 17:30:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391HUG5I097907; Sun, 1 Oct 2023 17:30:16 GMT (envelope-from git) Date: Sun, 1 Oct 2023 17:30:16 GMT Message-Id: <202310011730.391HUG5I097907@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: a39ddf881ad8 - stable/14 - freebsd-update: Allow for upper/lowercase y/n List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a39ddf881ad8530013c5e4cc5f84b3a6b58cca51 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a39ddf881ad8530013c5e4cc5f84b3a6b58cca51 commit a39ddf881ad8530013c5e4cc5f84b3a6b58cca51 Author: Juraj Lutter AuthorDate: 2023-09-17 16:15:27 +0000 Commit: Ed Maste CommitDate: 2023-10-01 17:30:06 +0000 freebsd-update: Allow for upper/lowercase y/n Allow for upper/lowercase y/n in "Does this look right?" question. Reviewed by: emaste Approved by: emaste Differential revision: https://reviews.freebsd.org/D40434 (cherry picked from commit 39f4633b3d2354c01a290d5f422dce7874061769) --- usr.sbin/freebsd-update/freebsd-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index b9b277cca1c8..c6432dcd6b0e 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1202,10 +1202,10 @@ fetch_progress () { continuep () { while read -p "Does this look reasonable (y/n)? " CONTINUE; do case "${CONTINUE}" in - y*) + [yY]*) return 0 ;; - n*) + [nN]*) return 1 ;; esac From nobody Sun Oct 1 17:30:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzB254Xxyz4vZwB; Sun, 1 Oct 2023 17:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzB253l7Gz3Yks; Sun, 1 Oct 2023 17:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+xoEueE1HvHWBRLtJy72qM/H1rkWzwsAHM0kvWii0LU=; b=ZhPLGPKit7hK+2C4kfwbf/9W73FvGO522CFvTo2H29oaDRXNxwkhIrP14XVpJsacA2f9i+ SjulsYLcAM+iF4IAbXqQPOc4GyYUqJtwuz4CNbPIZGUSTAVak9N0SiW46Ai2RmJ3rGOi8w M+tjTAsY2nkNNd3AD/KTYyL24Ds1GBuq0kRovdQvjTfZ9gneORBaDe/2nHDbUvacSF2PoF sIqHicpY39kGV9PVgV892fySQXQH2Q/KW4cRYqXxRjA/ZWkV+Hr1m6ZExm7af42wpV9gRv 5Eq7nOfhBbzmP6bNfMnjsHnfF52M1yZ3z/lkH07R+aRjZIGCvfvyXcaLz8bdBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696181453; a=rsa-sha256; cv=none; b=D5MZxxmBe5Vbl1NLWqgD1nNw9/o3kvrCQYvM/iVMY2thvQEYaJD6bGkt/FzZYSGH3k9V18 DvEt6lPJJAf9j1bYza8B+Qy0pHVtG2uEeS0z4ov4RFNJTlHJgmsOrE6DTBVjuVP7CeXH+0 vdB+/yA9E+0cQMnmF1kW8pSyuiYa2hF4FCi8hUHtWErCwrzSytY/emgzxFwOd/NwBcvVst KRikmSKV/vdZ8Pl9GLL1fhURUBBEVKhf0I2L6Nv6JSywc603Sw7gJs8QLy1bqk/G5HrnwY LeXEdpoSkhNrlfOSCCaGXgK1UIUHRcWLeg9IPC8jWaXRU+xmSf6O22TkXRjmow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+xoEueE1HvHWBRLtJy72qM/H1rkWzwsAHM0kvWii0LU=; b=K0+sD0yRRXGd/0LkJjIATIlbqhjHfZpk50VBx8CuYVkHMhicoB+YdvuEbXDPoFaYPTdk+K 9Oz3/Kv5BkGMfQLRg+FQK8Oy9M/fpzUte1UWzYHrWVB6e0wRJ3uwQZyHIYBv/NICjVLvLL ifbL3oJti3sIB0fXLI2m4BL43qKY0nBM1zshWNRBBD1lIrQEWj0YVsmhMTvi6UMg1VwqK3 RR5wT8LbOzjuHHz++5nqKf+6KWY34T4ZNIA+YWJoHfQBFKSJxQbFlysziKzy+8JU7QviI3 2j+mYhmBxk/Z0rMt6JwGBHulBCxyklnsUkg9dK0nI6z3ceLSuUZLNo0O53tetQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzB252mhkzdmW; Sun, 1 Oct 2023 17:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391HUrul000573; Sun, 1 Oct 2023 17:30:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391HUrNo000570; Sun, 1 Oct 2023 17:30:53 GMT (envelope-from git) Date: Sun, 1 Oct 2023 17:30:53 GMT Message-Id: <202310011730.391HUrNo000570@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: ef295f69abbf - stable/13 - freebsd-update: Allow for upper/lowercase y/n List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ef295f69abbffb3447771a30df6906ca56a5d0c0 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ef295f69abbffb3447771a30df6906ca56a5d0c0 commit ef295f69abbffb3447771a30df6906ca56a5d0c0 Author: Juraj Lutter AuthorDate: 2023-09-17 16:15:27 +0000 Commit: Ed Maste CommitDate: 2023-10-01 17:30:35 +0000 freebsd-update: Allow for upper/lowercase y/n Allow for upper/lowercase y/n in "Does this look right?" question. Reviewed by: emaste Approved by: emaste Differential revision: https://reviews.freebsd.org/D40434 (cherry picked from commit 39f4633b3d2354c01a290d5f422dce7874061769) --- usr.sbin/freebsd-update/freebsd-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index b9b277cca1c8..c6432dcd6b0e 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1202,10 +1202,10 @@ fetch_progress () { continuep () { while read -p "Does this look reasonable (y/n)? " CONTINUE; do case "${CONTINUE}" in - y*) + [yY]*) return 0 ;; - n*) + [nN]*) return 1 ;; esac From nobody Sun Oct 1 17:31:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzB2V3xMHz4vb2g; Sun, 1 Oct 2023 17:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzB2V3Vf9z3ZDM; Sun, 1 Oct 2023 17:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCYA5XsK93v43A5dz5Tz5ow1zWk7lyl6Ge0DMR2XAUs=; b=sShMxvAgYnaCRMprX9KxZHLEOJmGnnp/Vi16bHba7DHgVaODT7X0AQilYP3GicJSXaGJNd ce/N3o5bkumfGhh27z5GmZ0rmM1dKKfxweBgtwXfEi3ZRxL5KapsPUE/DXhKHVQk/LziOR xj+TipiOdePxcX2lDzRSbMzQU7+tM6J5bc5y3ag6TvQrVVVo2wjITrgvL9RHRgjHwtfH0h klSh/KDtxTRczrOoPA6XMaTgZd2og3HU2JKp/SC2E4+c9hh6zL2TGF18/UUIBRh/VkewrK dlyMChhMQ56XCHZo6t4rEy56bba0adeqvm4prKjlSwfmICmquhGa8/ktlx50qA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696181474; a=rsa-sha256; cv=none; b=Zc+hIZQsve7u15DfBgt181Wd3YXGagbUxFRbGj3lzXJPO+fho1GE8BphOpynYI1ue3ExTm luISUK9Y8wS3x/QSOYN3n5uFKcRvqIi0up31haUL8PH+zD0EJyoCWyoTypw/Qv++Zp0/GM O6zZw9XYuL2DgY0cUx0gkCdWOm2Iunx/eUCWmz8pJRGJ6Gbjl1ORNz/0kYWy3TCF0CitR8 2BtOBROoGdAwgNsn89Wair9hkb0+MIZowxC6ae6KZBh0/jxJAGyWpxUeiv60IL+dMPIbgK WBPg0X2jYyk2QUapSVcJBR+NQ2vk5MAQcKVro1HaziKXIv3frMTbXxHTxfklKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696181474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DCYA5XsK93v43A5dz5Tz5ow1zWk7lyl6Ge0DMR2XAUs=; b=t6TrZtK0n7CAqGummjTnsbuWkleix485ubSYlfGyIDmUANra9f1rVvJk4l0820sp1Edntw 1llMA649teD+Y9MALtTLBwfQFPmjBxrJqRosWvi5dnOCazunwsjd61NT3LVd6j4p+fg0Uc 2XOQd3Y6b0UK57EFpDvuN/Bu3tFBEMEfm+xTnoKket9HMyHVi3D6a1LELyVcDVG+/TzJn9 SVV0HmmhtAJ7sIZwip/lYWAxBcQGMAMSoXiTRMK0s2gQpP0zz+tXlBHBeZmCJU8c0DfO0K YCsufF8plgZ77dxRU4tI8i/nvH02FtUhByAgsSUFTK4t14QmahzGuUAlpdaXXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzB2V2bCGzdFJ; Sun, 1 Oct 2023 17:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391HVE6L000746; Sun, 1 Oct 2023 17:31:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391HVEer000743; Sun, 1 Oct 2023 17:31:14 GMT (envelope-from git) Date: Sun, 1 Oct 2023 17:31:14 GMT Message-Id: <202310011731.391HVEer000743@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: 05f988e987f4 - stable/12 - freebsd-update: Allow for upper/lowercase y/n List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/12 X-Git-Reftype: branch X-Git-Commit: 05f988e987f42a182fdda64e83bd1cb7aba59109 Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=05f988e987f42a182fdda64e83bd1cb7aba59109 commit 05f988e987f42a182fdda64e83bd1cb7aba59109 Author: Juraj Lutter AuthorDate: 2023-09-17 16:15:27 +0000 Commit: Ed Maste CommitDate: 2023-10-01 17:30:58 +0000 freebsd-update: Allow for upper/lowercase y/n Allow for upper/lowercase y/n in "Does this look right?" question. Reviewed by: emaste Approved by: emaste Differential revision: https://reviews.freebsd.org/D40434 (cherry picked from commit 39f4633b3d2354c01a290d5f422dce7874061769) --- usr.sbin/freebsd-update/freebsd-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index a01e81d7be49..5a523775dbbb 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1204,10 +1204,10 @@ fetch_progress () { continuep () { while read -p "Does this look reasonable (y/n)? " CONTINUE; do case "${CONTINUE}" in - y*) + [yY]*) return 0 ;; - n*) + [nN]*) return 1 ;; esac From nobody Sun Oct 1 21:37:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzHVc6484z4vr3w; Sun, 1 Oct 2023 21:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzHVc5XN6z4brT; Sun, 1 Oct 2023 21:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696196248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5mvlGdzWyFVSrV/nTF+S8Sm3FkSZmEC9IeTNr3TgKg=; b=wtqcQ1stmY8JzcsY2TbeZRzs7Ny96m5wkTuwGclFZad9zeEpFiQNUpO/+6WM6EBJx/9Kje MAstnty9JlYw8b4qbjxAQWxGD29KbA7rFMQTZJDEc4PuNhrVShvjKcYrkppD3dhkEySwXi qAC1fEGEb9Oe+C2dhlHITVcF968rOZPFgf7ZVAmxEUlvax9jw7KRNDqzK4sL1LhFbSiFcG x86yL3NQf+aOkrNbuSQsaC00TLsDao9AWCdqgHKNztmUcVTYrXO27i0mICgDj0/vozjrJk u4gJqwxn1muz4mfev9npQk0fTT/5xPTiLB1on5K55KkvkFt4hDxvGcxd/bN/Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696196248; a=rsa-sha256; cv=none; b=FQerlEeyUNW97IuUg41sjXnwXPsKMMynjZ0mU95ADq+p/WTgNoME0FU7ol1Dsc3xPcKzOM QrSlK7FaNoSo/JfcL+Ohs0LwJLuhs6R7pxls89VJoaR/ZFh1RAM1Rft55i/lCYCKMh6k+B JxnZfVl1opREL8l7dDeRpazp60+UYtqjHmeWuqldmdMAGcipKlck56UCn5JznekkBVTmFe zOhvvafDU0k/fYfYd+SahMJaH7KZhwt4WDhn8MVUKhhFRUjsucppNcj5Ay4L/78Nao10TX /xtzSNoNvGHBx8TRTTpvfUbZcTFb2CD7unEyh/DYttEe00BpfNKeX3xM74X3yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696196248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5mvlGdzWyFVSrV/nTF+S8Sm3FkSZmEC9IeTNr3TgKg=; b=cRvbJX3nQ16vqatVlD77VPxmax5vssXW0V6bLiY+hqoKXvQ+7adaWU493/0d9M9fywa/fG WYb7m44KIcQ03GXFxiVduW37BiHaFWidg4eSyiWiNYhYPPGKysQRXbOux8ghWZp3I9S7om arvJuqdXv8U9vPMNIk4jsVlG1/CffdS6YcWRMh/hnI+TmJpQe7uw0nPwmmgKYwFloDonLI Kw/dPqSUft4HWGpHI6svUw6fJCgXsez2IYAkqVB/YITYGza7K7OJkL57/WEEkQVnij1Bj3 fICWQJN3ClyaBi69p7pDMaeBrVexMdVGGNPKGltbAOugb1Uyj71jBrO/qPlQyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzHVc4bMqzmNT; Sun, 1 Oct 2023 21:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 391LbSR9004355; Sun, 1 Oct 2023 21:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 391LbSul004352; Sun, 1 Oct 2023 21:37:28 GMT (envelope-from git) Date: Sun, 1 Oct 2023 21:37:28 GMT Message-Id: <202310012137.391LbSul004352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 4cf8075264c9 - main - ObsoleteFiles.inc: only leave ofwdump.8.gz when WITH_FDT is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cf8075264c9db8f3e39a1f17def58cda8803853 Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=4cf8075264c9db8f3e39a1f17def58cda8803853 commit 4cf8075264c9db8f3e39a1f17def58cda8803853 Author: Piotr Kubaj AuthorDate: 2023-10-01 21:36:37 +0000 Commit: Piotr Kubaj CommitDate: 2023-10-01 21:36:37 +0000 ObsoleteFiles.inc: only leave ofwdump.8.gz when WITH_FDT is set Approved by: mhorne Differential Revision: https://reviews.freebsd.org/D41905 MFC after: 3 days --- ObsoleteFiles.inc | 5 ----- tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ff7e4e497fad..763578aeb652 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -17664,11 +17664,6 @@ OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif -.if ${TARGET_ARCH} != "aarch64" && ${TARGET} != "arm" && \ - ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ - ${TARGET_ARCH} != "sparc64" && ${TARGET} != "mips" -OLD_FILES+=usr/share/man/man8/ofwdump.8.gz -.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 99efa469c0e7..9af0a319171a 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2015,6 +2015,10 @@ OLD_DIRS+=usr/share/examples/uefisign OLD_DIRS+=usr/share/examples/ypldap .endif +.if ${MK_FDT} == no +OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif + .if ${MK_FINGER} == no OLD_FILES+=usr/bin/finger OLD_FILES+=usr/share/man/man1/finger.1.gz From nobody Mon Oct 2 00:50:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMnb1qYbz4w33y; Mon, 2 Oct 2023 00:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMnb174gz4qVw; Mon, 2 Oct 2023 00:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FUAl6sYLLdTq2RxJHNYBSQbdBHKMC8gAlafLQ9gt1U=; b=GWpA8CnDg9XxARjUnGglXtEHUHQYfWcTK/Ww53OSMP9BZX/GSSOFfHW+0n3H+oxdtFTBkb xmNsOtNEpqN33ortWcHBW9gNgAS6BqjrFMC06Qz1ftbScdeOT02MidR7OjdxaWFfGCm4of An2ZHqlcZS8+yiwS0Uc7EU7hGEcdpjzSPenAHenwuHlmkuH+C4dTNfmkXpruHlOjUpW2ga uiqKi4p/xxOvVZQq3C/B4C3BjyjhW9XDHVZ3o9AuIC848POu8DXEGzmWnhX8CobsmBp4LT y7yIx+2nL/P+wB35S8u/0BP7RC+TRnvepvRy7GAgptF7z9UmUX6Di2jZUtV45g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207843; a=rsa-sha256; cv=none; b=hUzqzbiV9MTSN/c3Q6PeTmpNPRTwPfn6e7VNJn7msPteHKGC8AFcDsqgvXEPQPawFIgvTL 0E6D9n/uVgGBCR0zmwsZxTqCqZfXm+3zYF7Vy3klCfS8t3l6hFaYN+j5lmIAW/x5ktT/ve 1mFk6oKISK8hKltw8WSsE9Atw69kHyumvwTYk7pimbjAt39JG2B1U74AnO7V+ioxTOfz5L fGwIqP69ibtMqBJa5CVI0+de2MrxXEmHNHpoufUetxezzQQrA3DVxOXbFhLo4Mn9Dg8PM8 eFZ4rRSSgOB6RzmzxF5miJL6yGkBmE6Ea65NWHP771EX/78lEVGiSrVW5eaJ4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FUAl6sYLLdTq2RxJHNYBSQbdBHKMC8gAlafLQ9gt1U=; b=L32jGZ1bmjyjic3tDQEjz1dtlHRRtkzLUF9xfo1I8Ygv1iY01cfv1Y2ZniQ5r/Dj9L9r2I NSEUrBpzv41Q0acTQ5c9CDlKVt+dAVmnrk1xBVmacUeVJpoiYaXjy+NcMpCb93CNqhSWSz 2CJI/HqQk0NTbd4bhM4xiviHzrmGMvUDQwf/EIoelJhi423FXlJKghFqueCIYkidno0jk1 eLBoITHznUp6C1IXIFrUtWmJSHGmxnbBrUUcm9863VGZtMMR3w2wh/JCmOEBNs0QFapZWy maed0fZDH6HgvmudWfDLR39ncEUpGccIgBfRsqPeRKQnoGBLk2YeEDosDFa29g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMnb09pxzrsm; Mon, 2 Oct 2023 00:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920ogdj028326; Mon, 2 Oct 2023 00:50:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920ogxR028323; Mon, 2 Oct 2023 00:50:42 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:42 GMT Message-Id: <202310020050.3920ogxR028323@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: bffb01eda9bf - stable/14 - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bffb01eda9bffc3307ea8bf70f91087ed316e01c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bffb01eda9bffc3307ea8bf70f91087ed316e01c commit bffb01eda9bffc3307ea8bf70f91087ed316e01c Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:37 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 21a722d9593eb477f4ccdad011a2b4df0727fc62) --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 1a83fc2d8abe..019b9e80291c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -241,7 +241,7 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (netisr_setqlimit(&rtsock_nh, qlimit)); } SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Mon Oct 2 00:50:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMnc3h3pz4w326; Mon, 2 Oct 2023 00:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMnc22CXz4qms; Mon, 2 Oct 2023 00:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xAlqrjYV9GHdpoVBEQDT65zKI6SUw6E7b7SPkygDgBQ=; b=TXU2mFidcCyVlbLm18P3duBOPKovxZZ9WpQ4ZQePLyTKQQrHS270Yg8cQ919A6n1OsDBZ2 cgFms2RQZOB0e1j1UexfNyYDDfF+JD7O1FdM4NvrgmSydCWPKrZ1JshEWFrrBSfZf18o+M NdnoeXOva/pRj+iYxVJCxvs+CRMpddUHcGY5n0mRsrocAN2UNRgNhRRNNWhknguh5roUt+ MwG9Fb8H8NOh1v/VK7XxfSN52xfGT+M1epyZZ+XDADhkczK08arQ9H96o6x8urKmvZXF1X 2DjQHzWgIsQSItAw1FZqdvJEey3QSeKaRrRD4OlI66Nj+Ien3CjJrZ+A4uy0jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207844; a=rsa-sha256; cv=none; b=GlVVWEVz3WuJP1JnqG9p38IZ476KdyVPvME3GZZesFK7UxGXKIvnAsAwQx3tEVCuetSzjz 2Q1JOH3T93SbNT3A3KzM2HB7mBxhrI71yzaAI7wjQ4f1K+4wUPh1nAEm1CACyG8+Weo2lp TqZMjpYDhCz6JcrFMir04lsOkEnqzlyEHT8Daxael29cK8B4xoa/wV9n/RDttaMi/ex74f rImaDatS/UTG4S392kLqFmLA66cZn6KmxroCOCdWO1ftPJxbXhk8zs1vQ0Twgd0zhPTjY6 LiX3+iKrEEUQ2e1e405OjqsDbm8a/xW6TnYneI7FJJFK9PTEgceAKrKNRVecjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xAlqrjYV9GHdpoVBEQDT65zKI6SUw6E7b7SPkygDgBQ=; b=W0sV94TpidyFDw6jGEa5t0+RHk4czBYTqfu/p6eyeqxDH7hKJErc5tLdZFy8YQA8Rc2Kdh yUhnYXA+UbqTM5GvzcNHuIRo5jXMfjdAToqrcvGxO1zgNxVxf9PRJGUT4yfKrtJ9Ry0Iqg GRlNf5QAEG66IQj0Hkq363ND7Lg2yrJaLlyF0b6O4rkZ1FllpKh1AHTCEHOckrr/I1whVU OHnIcwAvq25pmVY3mxSyF6m1vYfNwaJulmQHvLjij4tTdp+26P7WBswAhRck9z/fV10jUk X6IenX31iUNgpQLJsttiaSRzjrzQQQ6qOMIjLzavon5fgQ2ArhDbNBCpDZN5/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMnc0p4bzrj6; Mon, 2 Oct 2023 00:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920oiuc028380; Mon, 2 Oct 2023 00:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920oiaN028377; Mon, 2 Oct 2023 00:50:44 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:44 GMT Message-Id: <202310020050.3920oiaN028377@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: da2b630c12ec - stable/14 - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: da2b630c12ec074673dfc646b2055a31b0d8d6d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=da2b630c12ec074673dfc646b2055a31b0d8d6d9 commit da2b630c12ec074673dfc646b2055a31b0d8d6d9 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:37 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 03dac3e37993801dab4418087bfedacce0526e66) --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 1d67577f8055..6e7ffedc3dcd 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -278,10 +278,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -334,7 +334,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Mon Oct 2 00:50:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMnd3LBPz4w344; Mon, 2 Oct 2023 00:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMnd2mFXz4qwC; Mon, 2 Oct 2023 00:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EneUkHx6yWCLG1fahtJbSwh+GWa/sc3mD+zY0i/KoA8=; b=h8id0B5xaoGFhvK9IReX5CCWL9mZal7GXbx7Jc3B8a1+UruEB4IKkRDc+KBPfP0lqiBtH4 +446d3eQHjsNK0SvOt//z0Zrw7o9UZN5L/czKGMIYnTXV8UqnVuWtocs/YPh3RFe+PYow8 4jLLVGalhcCDOv2B+3iJgRhi2NS8ZTfqznDpucXqpm3tLtDeioJTTiRDNcm+NueFG9G3ON 49Ckg/ABwa1u+ueOJkYx+AS0BCXcKJxvy9FNt2HKWcywu+IcR9MGeWkYlZVLET2XIJpvSJ RUfaofeFcyKIxj9znGMi1NDhJArFX/oFCwSTlOIwkY01lxE06UsIwJIiDAoItQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207845; a=rsa-sha256; cv=none; b=XT+U8LS+srQUNb24mBeN25exmqx6c7u9Kp6tiU/LMbFa3duTk69d5CUF449CxCf3AtpIV3 3FW00M897NTPObmz9RwxHNk6ifXCFC1pxVLGbBhIBQCUiZToyrW+hiNeBi/mlPYkqM0q8X os70QwH7UWnx1zutt7dR7FYvC9xQPsc6Z1GFHaKay56dYvCtMT3lVpulNH2F4S41FqSldG UcpqRAwyomXsI1NGWGcndDQoutDvkZZcfDoPaZ17cjsWMBqH09B72ZthGrbxLn8AxjKbey IGrfi0w6G7cTJ6sqk+8wOuQWoKPDXLxlIwGjh4ATXJ2Mq3bOEbY4ch4rJlIIFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EneUkHx6yWCLG1fahtJbSwh+GWa/sc3mD+zY0i/KoA8=; b=nJNvmUVhLff+DrtrP0TRNc6JKibN+nhV49SOgTOrjEJ6tZEYp29Vk8c8gc53r+x9Wwm3nn n263VRQhLSuyi4rf8SjP4+C6Gl5aOhtTRMGbc8c3mzB9p8Rl1Y05bbH9MRWRYKPhC3RYfJ wmep2BQVPylYcevFdL9sjsf2UbBVMKvQxPEDr8dN3b4K0Uvtx2CfUIDtOQz8rXnbsU3Ygj /ULPr/N6MsWxcaMT9askzwt3wPPs5bQTipwr9utyYoCj9yr0l5eKJi1zSCZHyJ7yDTsR9l XAMNmZTeMmSrlPk3/qknb3aSsSoTpqlKx6gXjXUfoTWbNM73Ar6AGImcMmKrRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMnd1qyPzrj7; Mon, 2 Oct 2023 00:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920ojn3028437; Mon, 2 Oct 2023 00:50:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920ojI0028434; Mon, 2 Oct 2023 00:50:45 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:45 GMT Message-Id: <202310020050.3920ojI0028434@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: f5f6da90597c - stable/14 - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f5f6da90597cb65ce55c4f17718a200097f6f78f Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f6da90597cb65ce55c4f17718a200097f6f78f commit f5f6da90597cb65ce55c4f17718a200097f6f78f Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:37 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 49197c391b3d49a33bcd08471bf64d533cd10f9d) --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 1cfff1870d7f..4dae28aa0544 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -91,20 +91,20 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Mon Oct 2 00:50:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMnf4FmWz4w2mY; Mon, 2 Oct 2023 00:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMnf3cgqz4r2g; Mon, 2 Oct 2023 00:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfV5+sgWPIDv1TEugCl4VAFNFgwzUjNN4OHrbSac2vs=; b=weEmm9r9mX2gSV4LfBLUiPDU8ZiGZEsxNpB0ok71R00AaovMP8ye4kUDPccwpKye4S8Ydw HYWbMSL9TK3vVFzrwhjI3y2Lje0//43b5mSvHg68ZoOBd3GKpO8NBdcjcC3W1Ivx1nZEUv LKVbDUBLZKr05ygRXli9TeGpXEFsNG/qEMXtscHOouQKA5B4tTi2fDMQafDknq8tFngsss 6PBZUTRzP110+28PmVyMjCHZF0nyNLzskI1iPmPTx9EWbbRu1lRWxYFAdpXrTOZNKwpWAg ku6UBys//Y+xtX3VnDi3Fuby3ubKTjhLEAr7/eepuuSSDt8WKgrh4NBZR0ic8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207846; a=rsa-sha256; cv=none; b=AUs8kJYe6YjAjJG9WVSKLfO7eKNfrrtta2ZJcJh47jQyi0/hfAtjiZtq0NY80Sgl90BK47 fwfgF+HYLVZFolIxwMkNu6HMrAI3GqrFhD8HLtiYGTI3zI8YBgJp+TLTw9GRn1YQYdlKUz VRmrYzsc0wXvEAHpvzZRCFx70JqAXoIQPXkbs8jlhP7uyvdSIpPv3FZB1wnCIRdBdUxnPH cG/yxq4vCB72z67ev+pkOH971dintlZ+uBkVN04Ys4sUtjk2TUdHnU4i/EyH/sw+k50VwH uaqpI5pB4JmpC+0NA9bWwCQmiM4ACLAIOLcMkSk1W35pnr5pq0ye5gZQdJe/tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfV5+sgWPIDv1TEugCl4VAFNFgwzUjNN4OHrbSac2vs=; b=ixYgj1ttwz6FUNpkc2ZaB6ADZPn4VHS2GOkzBGlLz0txytugj9Rwun9/BlWl0lONAUt1iS 5CyaY8mhya29mqBFWwbtpOC8GXDMwkW01+iP6IK1pO9H4ScouWZ+F+rBt+p38aTGeoNHft AyESZ68RBY2stVq5DlU42dtyz/F1/XnjRHaKtuYAmpMa1SJ6+X6swILs2NYGlSTMhVUMU9 bC35eylM8IwJCTvnjIscwbWIR2j2pRQO1/9s8vj6R70hqxv36+6nnZHFdg7UiYpxFAlelw xgS2Wr7fplveZb8gmGdrQvKNnMMHuRqMtrJd5Q18SAu1yrcoPwrsXJdX8oflzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMnf2jhyzrj9; Mon, 2 Oct 2023 00:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920okxY029300; Mon, 2 Oct 2023 00:50:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920okTA029297; Mon, 2 Oct 2023 00:50:46 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:46 GMT Message-Id: <202310020050.3920okTA029297@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: bb6f9a95402a - stable/14 - ipfw.8: Adjust section for loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bb6f9a95402a6c3ab8167481b81465f8ad5016fc Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bb6f9a95402a6c3ab8167481b81465f8ad5016fc commit bb6f9a95402a6c3ab8167481b81465f8ad5016fc Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:38 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D41981 (cherry picked from commit 12349f38898f231ca803dcf526bac88cb1b5cd2b) --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 1a042ae2bbbf..e62b8d6efc95 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3761,6 +3761,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4154,12 +4164,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4176,10 +4180,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Mon Oct 2 00:50:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMng5Msjz4w2wB; Mon, 2 Oct 2023 00:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMng4qJBz4r7J; Mon, 2 Oct 2023 00:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=76SIPGKLgEkL9TOLwbzKK18QPIodl+BSeDKYdEtDj7Q=; b=qg7HbjTxxUA5173vsLLRryMkiGd5xgEJD2/T937pq8ek9naB2SerzLYrWfNds12EOqgW+m I09cp1c5WwFt+mtbQ9PM8fHNT/s9TJjO9sZTuxwh6ro2BI5FXaKfolQJ7asAjLd+HA8hUk SO5BOLlX3jAdqKM1TV4WOPJtpded4oXJgKAJ6t6LqJwPBwKPswqZiN0W30zRPRrgTGjbRx 9QnbXjzlW4D5o04GgaL63aT2vc06/oGdPkaN5SYtEITZvtjS7XjbvCKjARIxmWXdAUbKu/ pdnZQNApnRG6QJPyLguGNUBvSn5kDyPI35F4lx4B+7b4xKWApFQy4GoZoxlLPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207847; a=rsa-sha256; cv=none; b=rWaoVbz3AGZAf+wZswa9zREnAUO4uVgGqvXPaUNN4VzwdvkEhHwKkzFjpl/YCPT2Cix68n W04eCBbbrQgeIdR9Zmfv7ncTZzp5Z2JJ+zZrJb6jhzxDbsBqrEjeLNuIFOInaz9XZgoxlK 0VMRabDPKfFPFuALYtrq/MuoD5pkcVZ7sVFIva00fAvbshUauBqAgf9PcZ/aYwLy2KW9N1 rzBPKfkUV5/voN/7RoFPcbFEB2PjI+6mUm65wQIV2LRuwDk7KDg5Tu/Bjuak1z5PQ1IrcP okwlWix9a78MTkaGj/RaMonif0hg6GCoztRFrlSCYuzG3Z4QOA9/ytgIqU12VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=76SIPGKLgEkL9TOLwbzKK18QPIodl+BSeDKYdEtDj7Q=; b=VqUsA7Q284/3ugl+SGrm+HXy+PVey4hbVUWYGqc3DMsnK2zHV40NqxFOF9HMH7duOjsFfB xgE+OrbN2XIFAz5qaxEmfKzWQN3MBz5gSGmJUQHPTmM/autV1AY5mvo1CLQgxoCAsQnOwo t3nrBYJVWFlPOuf2bDagF1DmIlj9t1mq53KTiUovDfbiOVxqQrj0T8ZRS51JO2QSdboKiN 45mMq8P2IE/P2V4A4xsPJGBwoBmMTRnkVOQTRfuiAtSGOl6OAZaaWANi2wZTP1InO4epN3 /umFImDGhazpVYx8CoYMzWRsKHQ5wnxezgFXdHzNRqUOUb/UETtbF8yAS4FCFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMng3jhczrGD; Mon, 2 Oct 2023 00:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920olqm029412; Mon, 2 Oct 2023 00:50:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920olZM029409; Mon, 2 Oct 2023 00:50:47 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:47 GMT Message-Id: <202310020050.3920olZM029409@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: b0f026435a15 - stable/14 - ip_mroute: Fix sysctl knobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b0f026435a150933ecb6f2d1359fd1b4898657f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f026435a150933ecb6f2d1359fd1b4898657f1 commit b0f026435a150933ecb6f2d1359fd1b4898657f1 Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:38 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 (cherry picked from commit f549e22901b3a391c76659bee55802b1214112fd) --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 2444fd9686f7..cda5f160e8fb 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -172,7 +172,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -226,7 +228,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2817,18 +2819,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) return (EINVAL); } - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Mon Oct 2 00:50:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzMnh64T3z4w2sV; Mon, 2 Oct 2023 00:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzMnh5XkHz4rJj; Mon, 2 Oct 2023 00:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1LiFaJRYd3Laq6be7RtOk7ofBo0Cc2PWUuKhMFDraU=; b=bnUVLVjKcy9kuOlvDCPJihrJzk7OQT/uF16u3BlxrZJqHznfNXY3botWdEU8aHz1xrFSdV pjVx+vXurucQww9lQc/LukCn4iPot14AbnlzJBcRKrXvx4Vl0E5Aw/DsVsK+evWKvSUeKS jV1Pjt/0FodupaWxQps+N4awkHVumWAh59s39g3PekRt1PZPEe87oMEPGRvZKRxfL7i9zf 3XfxNwmtNtRv85D/83nbDhWA3CoF7dUt5U0ANdDtl63rj1jvKEdf+U9bo3kBMJNC0PEKTR +yl26JCudrOwxowUmiw7EKW/B+G/UPU0xnhdNwu2WnKmcr2g5fzgqlMOCYjTrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696207848; a=rsa-sha256; cv=none; b=SyylPUQfu4qwFr+iVuRqDMVcPRb5+3XT1lo0ceEAtgk6gpszPo9U1N3Og+RBrSLmETjc4c ODmAfLxzvOsT5i7afLo9YQwDEVU2qE17ceQ9XPPJI0BB/xCbrHNUd9FZqA21g/RrkFN2cc G3kxeoD4id1JpMAmsDr6WoRlY8ZEAFRee1MMvxYFELbsKTV05WSmgnJuDUOyJ5+vtioKV4 n8lBsKTtpvqWgKsGgr6fV4I6YME5NGZW+5+3Aity04FKKN9mg5OhPZwR5GEe23aWEFyBVF Rs69AKZaEvNfbKgkJET1HkPwcP2BuCVOVYP8/ZVG6SagYmvqd+T8RJPXwNHm5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696207848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1LiFaJRYd3Laq6be7RtOk7ofBo0Cc2PWUuKhMFDraU=; b=qSDe9KDn/X5XUDpSfUb5PumuwSHAWYI+NHU0qW9gQjSsK6bO7RFS6PZ/NzWBcoyWXs64fw T23MdJPm9PmrVHcRxFNKebiJBfLWw8eQKmWwRohiQS7NgVa1dy6RszVhBN0bsViNXW9Che l/fWPluY3ms7dIVEp0Rl8pswl6hcYY7JO0oJ9DmsR4mgRcrfvu1KLC2rum0dE+X2uLBRS+ YtYi9tUntTkMtwBpyf5UhIXlWwzPRUI1vDCCPpUNutvjI8tHGpcK9X77aWGXnJ+yWkUvTM O+wyg+8Z6hAtM3UAVMRiNX+TUO+5h3xx02nS+/SVzXa0DAY50kOTT5IWghW9Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzMnh4fV0zrGG; Mon, 2 Oct 2023 00:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3920om1l029463; Mon, 2 Oct 2023 00:50:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3920omhH029460; Mon, 2 Oct 2023 00:50:48 GMT (envelope-from git) Date: Mon, 2 Oct 2023 00:50:48 GMT Message-Id: <202310020050.3920omhH029460@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: a9359dcde241 - stable/14 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a9359dcde241f17421a71bc8c96dee08625db9dd Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a9359dcde241f17421a71bc8c96dee08625db9dd commit a9359dcde241f17421a71bc8c96dee08625db9dd Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 00:49:38 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 (cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 35daad4715bf..69be4abb2485 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Mon Oct 2 02:53:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzQW23sSNz4w8l9; Mon, 2 Oct 2023 02:53:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzQW21Xwmz3Hyg; Mon, 2 Oct 2023 02:53:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id mt8uqaCsmmfesn93dqBm9s; Mon, 02 Oct 2023 02:53:17 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id n93bq5R3eSxZQn93cqPmq7; Mon, 02 Oct 2023 02:53:17 +0000 X-Authority-Analysis: v=2.4 cv=JbqvEGGV c=1 sm=1 tr=0 ts=651a309d a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=bhdUkHdE2iEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=mVaAT9imt_-sTEsIGqYA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 53D9B33E2; Sun, 1 Oct 2023 19:53:15 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 41C99A7C; Sun, 1 Oct 2023 19:53:15 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Zhenlei Huang cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: a9359dcde241 - stable/14 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable In-reply-to: <202310020050.3920omhH029460@gitrepo.freebsd.org> References: <202310020050.3920omhH029460@gitrepo.freebsd.org> Comments: In-reply-to Zhenlei Huang message dated "Mon, 02 Oct 2023 00:50:48 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 01 Oct 2023 19:53:15 -0700 Message-Id: <20231002025315.41C99A7C@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPTwxOQxjj/VsUT7vu59nLyivchlWK4LJEJ3OP0rVMtMCk6QTUkD+cTJGfwxkiJmi53rNwuoZp2h1fNGBXns0Gt8xBWnOCZzJMr3LGf6FiWUXulnIDqa 0onaoIchQukLemg2qO59JMfhCFvrQTY18dJ4lQeqvkr3REh+j8FDWUQ4cEOa77KgiMvo3RqodUUBAnMy/kIjhadapBSGN9mGjF+PHiNAS4x3I9qpgEILeP2r spCirwh+T02juqIS12Kw2t1cjowdO50TJE+Nc+iXFu7FdVky7XcSVEJwYJcRcM9XTGMhKfggiVQMy6Ja8Aybcquu+ZvpcuRRpBQs4gsAVlo= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RzQW21Xwmz3Hyg In message <202310020050.3920omhH029460@gitrepo.freebsd.org>, Zhenlei Huang wri tes: > The branch stable/14 has been updated by zlei: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a9359dcde241f17421a71bc8c96dee08 > 625db9dd > > commit a9359dcde241f17421a71bc8c96dee08625db9dd > Author: Zhenlei Huang > AuthorDate: 2023-09-29 00:01:43 +0000 > Commit: Zhenlei Huang > CommitDate: 2023-10-02 00:49:38 +0000 > > ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable > > The sysctl variable `net.inet.ipf.large_nat` is actually a loader > tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will > report it correctly. > > No functional change intended. > > Reviewed by: cy (for #network) > Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D42005 > > (cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) > --- > sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/n > etinet/mlfk_ipl.c > index 35daad4715bf..69be4abb2485 100644 > --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c > +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c > @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_R > D, > &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); > SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmai > n.ipf_chksrc), 0, ""); > SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmai > n.ipf_minttl), 0, ""); > -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmai > n.ipf_large_nat), 0, "large_nat"); > +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFET > CH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); > > #define CDEV_MAJOR 79 > #include > Can you also please MFC to stable/13 and 12? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Mon Oct 2 05:45:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzVKR11lbz4vc6d; Mon, 2 Oct 2023 05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzVKQ6nw9z3Xck; Mon, 2 Oct 2023 05: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=1696225515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0dLbNg3/VBgxrLITMlDjL2aSvINxeGcYeFlHhv89AyM=; b=r3GEK0OBZpYK8CDKLL/N9p+apuIxCnD8BeS62B7LSIQJBodj7Bn/xpMRI9x55FD5OUNzkP LDAhp3zNWBE+aOsHLok0WM1aproyBghSbk5kyZFWVB0XLrC5O5k6x5Bjr42KkRofH/j6DR Jg0OCl9SChaNYE2JQGKbsqV6hxi+5otN+Ay8IDCTNeudOICZJ40HNiOODWn9SOfgt0zQSu wKeW+lfKfckFVs9C3LW5t1nNe1bkuBUpmQynUqZndWObM3zb1Wp39vXwmcqQMqG4C+j+4a yICxKrpzsDnIEZb5vsgbzDE3UEna0do41zogS05dg15Uw89xAdSnNPdvRerXsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696225515; a=rsa-sha256; cv=none; b=grlIg3mGCsCdupxsU2QkMLA4BtC/5mbM8QkIysr82YwOWwD4V1GkEI36DApgmHO+FON7mK GjBa0EOHPiWCxG9u39jjRhcwCGOlCgAsBXqDTxKlavK9rMpHLxUITdi1CISrPHLE7lXgEs BzmdnuEjTef10kUHWRLip6sliNWw3u9uV6g2FEny1G+2VwuKLtTl831XQV2HxuWjB0EeOY UlNfYt6t5Nya9V731+5wcnjWxWT2NTmrX8spvUKnTovgcwfKX4yHhJFYPjsWYqNJUKXb+N cD1wF1R9YLXkGeMVGMDSWESqjIY5tjgRiXifKYfMUXOTUgKu3pyDkCNYEEhXsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696225515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0dLbNg3/VBgxrLITMlDjL2aSvINxeGcYeFlHhv89AyM=; b=uZ8jN5GfEE5+E92H4cz8j+/qaa4WndMh3xQvmLj8Zlnw9Qf67wG6Om1VKBrPXh1M6oMIxr WS6YMWhMnl5wd3RfmUTIirB2zD6cbQHxQlbo70XS/UJRb8pRDBm9SsV1OfPvQseyFDrd3a oF/7w18xh3qSIy/evuarslvHHXt2r28xU6Wzz+2Dq/lPqCFaG5091TzAPrFqjSQ0YRGglu sTXkelYVqYhzMjLg4E7J3SH9VoYE8qgw7EY31FOuSWItHO25u8LMU8kGIO6s6yoGsIZPHX hH4rDDLhBw7olJ6QPb5VHkj/N8A0B93t2hNlLPnZotdkcBfMfH96n9/QOezIbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzVKQ5SSqz108X; Mon, 2 Oct 2023 05:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3925jENl018833; Mon, 2 Oct 2023 05:45:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3925jElv018830; Mon, 2 Oct 2023 05:45:14 GMT (envelope-from git) Date: Mon, 2 Oct 2023 05:45:14 GMT Message-Id: <202310020545.3925jElv018830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 4d46ca655013 - stable/14 - linux(4): Update syscalls.master to 6.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4d46ca65501370869230f04d9b78484799dee5f5 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d46ca65501370869230f04d9b78484799dee5f5 commit 4d46ca65501370869230f04d9b78484799dee5f5 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:24:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-02 05:44:53 +0000 linux(4): Update syscalls.master to 6.5 MFC after: 1 week (cherry picked from commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5) --- sys/amd64/linux/linux_dummy_machdep.c | 2 ++ sys/amd64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/amd64/linux32/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- sys/arm64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/compat/linux/linux_dummy.c | 35 ++++++++++++++++++----- sys/i386/linux/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- 6 files changed, 231 insertions(+), 20 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 4737386cb7f7..759586d9f1fc 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -66,3 +66,5 @@ DUMMY(readahead); DUMMY(restart_syscall); /* Linux 3.15: */ DUMMY(kexec_file_load); +/* Linux 6.6: */ +DUMMY(map_shadow_stack); diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 88caaa49367b..437066d1655b 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -2059,7 +2059,7 @@ uint32_t sig ); } -; Linux 5.0: +; Linux 5.1: 335-423 AUE_NULL UNIMPL nosys 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -2078,6 +2078,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2096,6 +2097,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2105,6 +2107,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2112,12 +2115,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2126,9 +2131,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -2139,9 +2146,51 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } +453 AUE_NULL STD { + int linux_map_shadow_stack(void); + } ; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys +454 AUE_NULL UNIMPL nosys ; vim: syntax=off diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 679eda14202a..32ed678fe0c6 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2281,6 +2281,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2353,7 +2354,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2506,6 +2506,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2524,6 +2525,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2533,6 +2535,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2540,12 +2543,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2554,9 +2559,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2567,9 +2574,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index daaeeef1acc2..9ba548359c46 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -1736,6 +1736,7 @@ 294 AUE_NULL STD { int linux_kexec_file_load(void); } +; Linux 5.1: 295-423 AUE_NULL UNIMPL unimpl_md_syscall 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -1754,6 +1755,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -1772,6 +1774,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -1781,6 +1784,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -1788,12 +1792,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -1802,9 +1808,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -1815,9 +1823,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 4fdab6daab48..35d6debe0da9 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -123,21 +123,42 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +/* Linux 5.1: */ +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); +/* Linux 5.2: */ DUMMY(open_tree); DUMMY(move_mount); DUMMY(fsopen); DUMMY(fsconfig); DUMMY(fsmount); DUMMY(fspick); +/* Linux 5.3: */ DUMMY(pidfd_open); +/* Linux 5.6: */ DUMMY(openat2); DUMMY(pidfd_getfd); +/* Linux 5.10: */ DUMMY(process_madvise); +/* Linux 5.12: */ DUMMY(mount_setattr); -/* Linux 4.18: */ -DUMMY(io_pgetevents); -/* Linux 5.0: */ -DUMMY(pidfd_send_signal); -DUMMY(io_uring_setup); -DUMMY(io_uring_enter); -DUMMY(io_uring_register); +/* Linux 5.13: */ +DUMMY(landlock_create_ruleset); +DUMMY(landlock_add_rule); +DUMMY(landlock_restrict_self); +/* Linux 5.14: */ +DUMMY(memfd_secret); +DUMMY(quotactl_fd); +/* Linux 5.15: */ +DUMMY(process_mrelease); +/* Linux 5.16: */ +DUMMY(futex_waitv); +DUMMY(set_mempolicy_home_node); +/* Linux 6.5: */ +DUMMY(cachestat); +/* Linux 6.6: */ +DUMMY(fchmodat2); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 6144deeb31ab..3f37cc2fc485 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2293,6 +2293,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2365,7 +2366,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2518,6 +2518,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2536,6 +2537,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2545,6 +2547,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2552,12 +2555,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2566,9 +2571,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2579,9 +2586,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off From nobody Mon Oct 2 05:45:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzVKS0vrbz4vcCH; Mon, 2 Oct 2023 05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzVKR6vCqz3XXc; Mon, 2 Oct 2023 05: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=1696225516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV9mqmnWlSH3Gti1iCRYkye1QoB1QaPOygsB/no5/qs=; b=ViJFU579iA7uifnysgXQCaZUgeEwFWBje9bbaDdScxHSebDq4K3K6dJm3sL7wAglNurQsO b2gcXstcNMwV0+MUe4BZGy9/EhKs0WjvuRjH4DCpSmjz4xy2RM01UVCL4NrAcFl9TBy+zD xNPhoC78gQIRTPiNh4eGpMD6wLiVozsbKsr8Vx/mPLr5xYBQnbABMXpXqRznkEFMbjZ+60 kaFlFXdP9a/pJVq3U8n4gmHCLs1TH9HYh0W91jmw6AFSkPd49GcphUkJKiH71QOPELSINv WMOwfHn1NtmCzeczabj+LMAu790OQPpFeaX0P7JIsGFBUUIztCK4Txd7D18Edw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696225516; a=rsa-sha256; cv=none; b=BDi8Ju1qcuNitnwIunefThHeGFqYGFb9vnEeMa+s+JRgwDpufrWGcnxmvzWteUtgvOH09c 4XhXP8h5ae9ddSZl+KwBOx2MDST2QoaHI0MR5itMk8dxnLuW2yHlDr8U8Q6+TO8ZCVUKCf /QRkJaJnY24qMs3DI9NY1DHaAidAnyRz5CZph8kLG+hkHtzBqCZVrHrtY82pEaZtBIfCZ/ X6lUbsKnfhxwIdNaNX5oVgqT8XkeYCKzdhO8oVfXgqomwInZ+5pONpRLVxeUAqr2l7n15f HfTE9MtlFcYancXFgCSueNhEETt28eqpqqCabm5A9jKZOjQEfffvzalSfr5yhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696225516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV9mqmnWlSH3Gti1iCRYkye1QoB1QaPOygsB/no5/qs=; b=kaTaqbEVUufn8hEbyrysNQgfyndEYBuBES+2Hvk5TGhMfyYdCe0lCIY5cnWi0gFWlfmjYl r1uToA5PHrtOc8NJBdOqRWhpRZl9iJFtNh9GlKW64zMJqTYcFvfSxVex0Crnu2qJPU/lZd pnKpRZC2lrsH7r3GoFu7RbMkrAgOoteB+mNKNDBv4cJE3AmI+02b3AZmWnu+8VhAral50J m0ypqjdFhrqvf+APUhqSjQR+3y+QBmhxZYlXjaLCSlbApizOgaDcnXLSsnP31MzG+PHCbP hlipcdtG8QAuBK82vjbcw/lkMtgo6BtfRQUmoF2xFlLvo97cVJIqDs40EcH5sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzVKR5ydQz119P; Mon, 2 Oct 2023 05:45:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3925jFtN018869; Mon, 2 Oct 2023 05:45:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3925jFpR018866; Mon, 2 Oct 2023 05:45:15 GMT (envelope-from git) Date: Mon, 2 Oct 2023 05:45:15 GMT Message-Id: <202310020545.3925jFpR018866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 6f63d749febf - stable/14 - linux(4): Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f63d749febfffbf6217d9f739339d7ebd213a37 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6f63d749febfffbf6217d9f739339d7ebd213a37 commit 6f63d749febfffbf6217d9f739339d7ebd213a37 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:26:34 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-02 05:44:53 +0000 linux(4): Regen MFC after: 1 week (cherry picked from commit 28035f675b8590a24fddb418083788609ef75cc8) --- sys/amd64/linux/linux_proto.h | 55 +++++++++++++++ sys/amd64/linux/linux_syscall.h | 13 +++- sys/amd64/linux/linux_syscalls.c | 13 +++- sys/amd64/linux/linux_sysent.c | 13 +++- sys/amd64/linux/linux_systrace_args.c | 110 ++++++++++++++++++++++++++++++ sys/amd64/linux32/linux32_proto.h | 50 ++++++++++++++ sys/amd64/linux32/linux32_syscall.h | 12 +++- sys/amd64/linux32/linux32_syscalls.c | 12 +++- sys/amd64/linux32/linux32_sysent.c | 12 +++- sys/amd64/linux32/linux32_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/arm64/linux/linux_proto.h | 50 ++++++++++++++ sys/arm64/linux/linux_syscall.h | 12 +++- sys/arm64/linux/linux_syscalls.c | 12 +++- sys/arm64/linux/linux_sysent.c | 12 +++- sys/arm64/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/i386/linux/linux_proto.h | 50 ++++++++++++++ sys/i386/linux/linux_syscall.h | 12 +++- sys/i386/linux/linux_syscalls.c | 12 +++- sys/i386/linux/linux_sysent.c | 12 +++- sys/i386/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ 20 files changed, 750 insertions(+), 12 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 2a9dbf6fbe12..0759ce282499 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1405,6 +1405,39 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; +struct linux_map_shadow_stack_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1705,6 +1738,17 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); +int linux_map_shadow_stack(struct thread *, struct linux_map_shadow_stack_args *); #define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_newstat AUE_STAT @@ -2004,6 +2048,17 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL +#define LINUX_SYS_AUE_linux_map_shadow_stack AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index 4755c673ab0f..efd3413f91ce 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -343,4 +343,15 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_linux_map_shadow_stack 453 +#define LINUX_SYS_MAXSYSCALL 455 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 201daec24f67..6851612ec749 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -449,5 +449,16 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "linux_map_shadow_stack", /* 453 = linux_map_shadow_stack */ + "#454", /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 694a22060125..ecb4ebb85b3a 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -459,5 +459,16 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_map_shadow_stack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 453 = linux_map_shadow_stack */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 9d53132063fa..2b0cf1df7e40 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2751,6 +2751,61 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } + /* linux_map_shadow_stack */ + case 453: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -7181,6 +7236,39 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; + /* linux_map_shadow_stack */ + case 453: + break; default: break; }; @@ -8681,6 +8769,28 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: + /* linux_map_shadow_stack */ + case 453: default: break; }; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 8767199f2342..ae52fb81c560 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1706,6 +1706,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2071,6 +2101,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK #define LINUX32_SYS_AUE_linux_write AUE_NULL @@ -2435,6 +2475,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX32_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX32_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX32_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX32_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX32_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX32_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX32_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX32_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX32_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index e24080e3c2e7..b6d74578cdfd 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -403,4 +403,14 @@ #define LINUX32_SYS_linux_process_madvise 440 #define LINUX32_SYS_linux_epoll_pwait2_64 441 #define LINUX32_SYS_linux_mount_setattr 442 -#define LINUX32_SYS_MAXSYSCALL 444 +#define LINUX32_SYS_linux_quotactl_fd 443 +#define LINUX32_SYS_linux_landlock_create_ruleset 444 +#define LINUX32_SYS_linux_landlock_add_rule 445 +#define LINUX32_SYS_linux_landlock_restrict_self 446 +#define LINUX32_SYS_linux_memfd_secret 447 +#define LINUX32_SYS_linux_process_mrelease 448 +#define LINUX32_SYS_linux_futex_waitv 449 +#define LINUX32_SYS_linux_set_mempolicy_home_node 450 +#define LINUX32_SYS_linux_cachestat 451 +#define LINUX32_SYS_linux_fchmodat2 452 +#define LINUX32_SYS_MAXSYSCALL 454 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index cdeda60a1577..3f1e0425e224 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -449,5 +449,15 @@ const char *linux32_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index a3570b9bfe5b..c1656a124026 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -460,5 +460,15 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index de00b970027b..29940f4ed8a3 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3265,6 +3265,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -8560,6 +8610,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -10347,6 +10427,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index f24b7f25669d..d002ad5a824f 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1215,6 +1215,36 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); @@ -1466,6 +1496,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_setxattr AUE_NULL #define LINUX_SYS_AUE_linux_lsetxattr AUE_NULL #define LINUX_SYS_AUE_linux_fsetxattr AUE_NULL @@ -1716,6 +1756,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index f331bec5dc4f..c45f3ded47a2 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -291,4 +291,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index 8bf57f971c54..81fed4cc0227 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 3bc2e2ad96d9..c0b495482040 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 60daffbb420f..ff58a287ee88 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2373,6 +2373,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -6256,6 +6306,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -7541,6 +7621,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 5baec9364d5b..6cbab6b1e8d8 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1700,6 +1700,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2067,6 +2097,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_write AUE_NULL @@ -2433,6 +2473,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 96aa0fbc1815..19b1714fb5d9 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -409,4 +409,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2_64 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index ebb3fafca78d..112e6505bd00 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c293f2173e8c..5aa7f4921774 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 0bd681c68b6c..76781af18124 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3296,6 +3296,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } *** 117 LINES SKIPPED *** From nobody Mon Oct 2 08:15:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYfx69gtz4vlYq; Mon, 2 Oct 2023 08:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYfx5Cwsz4J7R; Mon, 2 Oct 2023 08:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696234537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4k/e29lN2GBPyFdEArsnSMvjsc4Fde3uOE/Eumk/WKM=; b=Bc2wZY87IfCsrQ9Gt57xVjqur8/o5oe6FWYNVPoTuu0yUASIIUNUVj7d5MWAKVKB8cQ1rl jE5TbCdI13mj6PdU1++Acvx3muZTKm9TTYqIDH+SKULgHzi8UTT85PBChaD23U/B+A0uFG gHDBl/PGS58svyG9r59XPdeUxxN3Hr2gNFi6dI5tVYQFyvmxE9fjQxteakyYaZxK9320F0 plL0Az1YBXMx75CoOzR/wCDSJAFfakBP51wpFRFPbjfL9xODY8i6eVg5Z6mBMcH/oBIFpD aIF1EtvnrRqSm+A9H079CPsiknqL+mqrzxZ5vy45Kp43deGl8dGWvkLFa1tLmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696234537; a=rsa-sha256; cv=none; b=sGf/1pnXJHO14QltkouhlDy31v4ByqVcGl76dOaFHoqdl35tjWqqWzz8c9MwIYpFigWOuw JwDLpVGWzIZLGWZIgCCcterWlvcACmbCdUsjYxDryBUfuF4rp1Fs9yQPPPeBv5nk46+GVm 75kRuLZNP2QrbPEsnJMeNVd8KTrJ697OpSAFrQOL1HvoLiyZ59/CoY+m7yibTicC1taINA VBQt/Qvg6sBy5nSBxMYiiZOLsMFCWrCZ74K4GFqVejonP4z0miZ2HImfJ50vwUj09Cwigy U5YlQwMl+8iZM1b+vVmu1/hAqjjuxKvq3+Mo47i0NbkxmJ7CFTxrxvtVBQMN3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696234537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4k/e29lN2GBPyFdEArsnSMvjsc4Fde3uOE/Eumk/WKM=; b=iHnYGVJVrU4/iOBvOtY4a4Cag/RSOFF+tdbIhOoOTrQ6qvOO1YLnb/P2cFIf54aJX0Gohw vYrbqbh9rriPoYkBumOHvv7DT75ZXNAfYyMmC82FySCsFAyZa0tJiXy06PNLugN5j1TB/z xMIeDrIoikBcIy2fQsH19LzhJXkdrthVsxx2KxwtRRTjNoXzPE7yu2W8FZ2mHYJs3vjt0m krX/F2CVQdoSPBStUxIxh5R05c8XBNG10X+Md5/v2SnDM5OGMrPK4UMjm6Y2I0PmbJCXNO YaLcA5w3ABB/tnLzYb4eli0kgI/meQVaSxMzuShf56pbyg53q40x/htPvybFXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYfx4GWKz144t; Mon, 2 Oct 2023 08:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928FbLV068988; Mon, 2 Oct 2023 08:15:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928Fb40068985; Mon, 2 Oct 2023 08:15:37 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:15:37 GMT Message-Id: <202310020815.3928Fb40068985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 87d68b131ef6 - stable/14 - copy_file_range: require CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 87d68b131ef65a0a5fb897280359e46067064a53 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=87d68b131ef65a0a5fb897280359e46067064a53 commit 87d68b131ef65a0a5fb897280359e46067064a53 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Mariusz Zaborski CommitDate: 2023-10-02 08:16:24 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: secteam Differential Revision: https://reviews.freebsd.org/D41967 (cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6) --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 06b861a2eb73..9d85a295a6ef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4899,7 +4899,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4910,7 +4911,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Mon Oct 2 08:17:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYhv2Fwqz4vmDC; Mon, 2 Oct 2023 08:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYhv1dnrz4JHj; Mon, 2 Oct 2023 08:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696234639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jzyfAB80UcPFmXz7kgpg6POlYPSV77eQ7WLuQerPxQE=; b=dOvq1D6GBtp2tRGChSiXzlVCmD5yqOrU7Z5HYrQM4OgL+b8US6/0O9gbaGK7UJ0XfUibKn Pf+v9yhRDnVuKJaFYFh31oRT3xdfgS9rDlr1+W1ngKMxdR88cha1Bx2TD/1sqUA1HJ1ptK qjJc24dgc+9kItRrxy5vpKrQjr1uLxPEzu+63DrSW7kVvX+51a5QvKCuGJDMK1UN/MxbdN EN7NYNmWVcEuKWthFgrSKDEZXE17VncBlPWg9mchmpHeoBchn2GWGP6cUogfYAc1CBCxlC uJf1g8hftbrUl7hDoU4fDET2t5woZp/jODdki04frXJJsMYwXHJWcvgdD2NoAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696234639; a=rsa-sha256; cv=none; b=VUebLNiw7Hhh5vMWOQLjIrLlKwZDhsMwWRlUctGk10cAFlusfnSa3YPNo6vCY91RIwZ2qk P/QYx4NyfZ7LyvXK7UYCyfx5M/ZwbhvG2HhaWiTBK1A0DK+f5gv2OdOcMy55qBwESgGx94 eVpDB/pP1Q4Xgkfyj9P6APyr2uCduGAwTnrfMNlgKQbsrl4BHs0qOGMkd+zop+EbnlI97m p3bfUpqETHIRsv9ukqt064FCad9WGQUepzt6hp4mvNWrgMUgsqlxpkA+Q1y7u7QZJKoPBG qkV8rsENmefAoULko2R6gLRmMiFBwBT2IpqvW/cVC83prZOv/G6r8ERFuoNqlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696234639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jzyfAB80UcPFmXz7kgpg6POlYPSV77eQ7WLuQerPxQE=; b=vrYFf6+mlaK5xiwqDM+zME4qcq9MMUOHdIQ8emmDaTMhi1PILuyM5BxXHLjFwPH4WQUdO6 KM4xcJMaw0DXDfd8qH/j69TOjmD/MRBhA1O9uIQgQ7ZSRntUafdtZFVi9f37BcZ8cWFUt+ ZbihO5FitE5ah7SZ1R0RU1vwn7h3ZwsYdDYY5BflMKSxwwVe1iIxys/4ZXGMofqiwhya5R 6Y0OjN4rvyE6M3gtujWuS4kT3jQov/I1RKYPPhhWO00UH72qv6OcTtoH7thUaIrOudjL5e xQIXeZPozp8M+GAZr8TbQYKygxCGbL4BHnCrycg9Cz8/NznyS0e8gOGnfW2p6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYhv0hJvz14H3; Mon, 2 Oct 2023 08:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928HJ1U069436; Mon, 2 Oct 2023 08:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928HI2G069433; Mon, 2 Oct 2023 08:17:18 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:17:18 GMT Message-Id: <202310020817.3928HI2G069433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 857ce53d1d46 - releng/14.0 - copy_file_range: require CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 857ce53d1d4689884b624c4ec596b1bb77843761 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=857ce53d1d4689884b624c4ec596b1bb77843761 commit 857ce53d1d4689884b624c4ec596b1bb77843761 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Mariusz Zaborski CommitDate: 2023-10-02 08:18:07 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: secteam Differential Revision: https://reviews.freebsd.org/D41967 (cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6) (cherry picked from commit 87d68b131ef65a0a5fb897280359e46067064a53) Approved by: re (gjb) --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 06b861a2eb73..9d85a295a6ef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4899,7 +4899,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4910,7 +4911,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Mon Oct 2 08:29:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYyl6sYJz4vmbX; Mon, 2 Oct 2023 08:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYyl5lzDz4KC4; Mon, 2 Oct 2023 08:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CjmppYL+alimIBFjQb5ISAh9NODQ0uu8LOCpthNf8U=; b=b1PiknFAMX05wbVOSHwpr8h8r+BcKxLBcnhJ0L8mFPdh+fi1PWZjqyiAEPttW7AJQtSXn5 D8bE/Nu4L9EF7tsFdUfRV/Gim/5QoCRnuCiV4i3WC/tKGxjC1GDuN0mAeT74UNbaTxA/nB GbSVrSjpNoTGy9xtQxn5JIRYXfnTwdTTXEPhhZs4/DKx/jyDEP4rhbHm99uyN7ctHfhKlb PIqNsJGruslzY4QoHvqtwDmPHBdJZ5Xy9fFG/5xyviw65NAcGIDa0JPVX90mRw97TezRS/ khD6A0V5Obg2x3sAbpTZ6Vln9mp3Apuk0KPSFFInQ1Lo+E/gqk+vOAAmJD/vzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235359; a=rsa-sha256; cv=none; b=rv4cybZQJetxspv72rZWaXG79uj4Ygv6Tt+VkP2nFJUVF00S+6KwUPlmgipwOB2eTl458u fgNagzO03rWbc2dk0aiOEvs12L3V9fFm6aXXujqMlBHi8xvaW47SIwof/4GG8uCHuRE6gn Z7+sN7cHQuz5cr0rtthEW4FjRszKjWiKU6Ol6+nFmnk5MFWTGy0jk6Z6zPKU25WXa/w8xP OdwfCEjrPLvHtgwqVxdDKvEOGtv0XLTrSqnNHJtY7HOJkA+00PdhbluvtSsawvsKscd06T AlFnvfq/Igcw0z5tALGZxQD414DeQZMMtYqNThoXfhVU52HI0OfGg+/P9nnOoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CjmppYL+alimIBFjQb5ISAh9NODQ0uu8LOCpthNf8U=; b=lEz2GEOQEa9XP++IRsM2yN4hynVFJBz+eELevCWtII5I+1x6MYFUFQJVnW1x2lz39e9j1o aYgMr+BlrBsvOhqGUAXtq07LJxzRYL1NCY6FpKHB8bMy6mIClBKltdyoMkZCed1BepdLE4 9SYnEhjsLoejEkseH504oT9PpgC+Lt9PvB64E64GBo9TjfA4IB58w79mN+B2kVpm0HHIDB OHawsQqZn0O7tTMulpLAh2q5H1oyk9Uvopf6C5bWyRZ4I3c3k0oNNltWBrfNEUU/mt0dkI gs3Nx7Z7DkJNPu3Jy1lrbWXmohe9ZXtFnTowsbp+9/J6B5e1XdYfd944oBxDsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYyl4qgkz14t9; Mon, 2 Oct 2023 08:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TJur086133; Mon, 2 Oct 2023 08:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TJUd086130; Mon, 2 Oct 2023 08:29:19 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:19 GMT Message-Id: <202310020829.3928TJUd086130@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: c6afda2e5a03 - stable/13 - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c6afda2e5a0389ce293d3a3ced2889979aa2e442 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c6afda2e5a0389ce293d3a3ced2889979aa2e442 commit c6afda2e5a0389ce293d3a3ced2889979aa2e442 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:22 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 21a722d9593eb477f4ccdad011a2b4df0727fc62) (cherry picked from commit bffb01eda9bffc3307ea8bf70f91087ed316e01c) --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d89d661ca99b..4da7e9e74025 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -231,7 +231,7 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (netisr_setqlimit(&rtsock_nh, qlimit)); } SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Mon Oct 2 08:29:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYyn1Fssz4vmgF; Mon, 2 Oct 2023 08:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYyn04kgz4KFn; Mon, 2 Oct 2023 08:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoYBdZgVgDA3CbOTopT7bO6ZLJRy3txlew30685bf10=; b=sVoQQgiVN4p5laO0BRYh+OPryEefXXHO1Epb5PO5V+6AREFNIPA/Gd20WzQ/kJ74Gkhcm5 EMSoE0vQcrPm5ah8ZJ19IVZfS0vL3Oe3Cg2k2tSc4vzAuhTSW8kV6llo3Wl+6EPchhkdUt G2fgg2Rn1H6Rffh9kMYjR2Hz6D9yyZyK2h0hs52kdCcH8GJqmyo2tkQTomapl6tb8kZXS6 3c1rcdrIrrTLaSyyVKetD6sZWCTQ6/FdyQKs/4tMXGK8UjY7iwhP+VSTOh/2ZJBcsSWRVe QB2dQ6O2wqJsW+eAENvvDidNyTSfiONU5yowNbdAqSz1ArwCDmn0rfN9U2Novg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235361; a=rsa-sha256; cv=none; b=iBkBwDOh/qr3BsFD7W66xIX91PkvZ4OkSczQIU+avcIiBHSei6GBteXK4WsEtpZ8nN83tq IaZ86Gg77GrROSKRgkkdXjjNSWeWE4BydZPrI9ck6SH/+bNoHjF7dBHKIN1Mhg2Da73Vxp kP9hauGO0QvaPuIcv/h7w+7ZqVs4Ai1wHDln6Cr1uCiVovwBam7XrS/VhwbKnIm6lIlS1S 1x/ljbIqaCQo+bKYxG9QolCbc4c2ix+1e2h6gnCzKemOmoS3aw+qQj3ScaDVPiEm63yk7I 40hPi0C8CaZkF+ZeOBaRzz6x1+hrv/qssMI+HK7uV3cKPWUv+UWbab7gIoKbLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uoYBdZgVgDA3CbOTopT7bO6ZLJRy3txlew30685bf10=; b=RfDkrUPCUt49GW37Qd7J9hHOZbuNuc0cTDsq8IPszCm7ZFceBhYfSv0wyyY4SzdMIuVv4k Ks/JdzeJE6z38RXNQk+3tZ3oB4u8Gg0PbFVrX8SHutyruddQGB2L9r6WFQw2kDCAGMrBW2 H9Vt9v2BxHJm2GohOTSoKxkIn/Z6Iwn6ZNi6WvTwx85roj/8i0k6d9kUi96lbaphyA6eDB 2G3FOKbpiTrCjEH6yr4tcjOcCtpmj29gemUCHbQt65JtxRBvnxbic+xbkmhhADrxe9vXq+ sH7GN5/DmPT75JMnp1J6tjWts4+otyAaR4qffRrmBMYuQkRUAExQdXnuGXjxhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYym5qzpz14pL; Mon, 2 Oct 2023 08:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TKYp086187; Mon, 2 Oct 2023 08:29:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TKba086184; Mon, 2 Oct 2023 08:29:20 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:20 GMT Message-Id: <202310020829.3928TKba086184@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: 28a80239fd6a - stable/13 - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 28a80239fd6ab2ff79af5a2b19e349fa6f1d62e9 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=28a80239fd6ab2ff79af5a2b19e349fa6f1d62e9 commit 28a80239fd6ab2ff79af5a2b19e349fa6f1d62e9 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:22 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 03dac3e37993801dab4418087bfedacce0526e66) (cherry picked from commit da2b630c12ec074673dfc646b2055a31b0d8d6d9) --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 4a92fff14e68..cfa368e7f7b0 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -482,10 +482,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -538,7 +538,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Mon Oct 2 08:29:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYyp2lNSz4vmgH; Mon, 2 Oct 2023 08:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYyp0bksz4KJQ; Mon, 2 Oct 2023 08:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kAgKVF+qRkpWMyhYcP7tO7PL2e9vQO+/prN07+8+9JQ=; b=osB6CoZGrUU8JCRCjBO2ZjLVilQBNijD5nJqEriV9pRi3LKldqwGUlTnoyNQX/bNWwRSdV 2PZx5nwR2Mo10VTb7ebj+971p/pUHyR4P8ruOqr5enklWN0xV5ZnQ4Gxcv29kbKoPZZISg BLXMEWxyapyvLfo6epognzenoGij2kJN+kgPmimvelhuppgSMXnZ0hDNTYc8TGviKk2P5h fryY3GNni3M76179jdjQBbmNYGwFbPOsgmHcxh2Iw/NbCW2NzP1RQ8ek0Nkh15LY/0P5Yu Zok+2JGVA20bmur+PQtvE9l4+Hm8mbQz8Ym8KbuMAfOg/63cERT9DBcK61LKXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235362; a=rsa-sha256; cv=none; b=ue5JXTVwor21gL7Yhf6pg7fPmafnYYrcEcePvd+VbfkXlo/KaaV9lnndzfauSsdH/S77RA Ju+ihE6y9Yp9EbmwJ/H2qPL2+NzATbc0hd4THlJBHEeaWK2Z+PWkKSiAzqPD/IvEF8gNQg gAQ60U057vqO+4IDCdTxYrTAi788ltNT81K8F4VI3SrTtbnURSzZj00m9nOIVS79ordsMN O90UONc8Z9qZJpX7CSMQ5q+5Fhii7bCDMN5EBVcacalmPgbQUwMLtbSGDDr499w7/8RuIc pcOICsqKnf2/bGuHYfW+fxwAxSK0xTUVfPSefqg0TUUATtvu7g1HZJRRaQxpZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kAgKVF+qRkpWMyhYcP7tO7PL2e9vQO+/prN07+8+9JQ=; b=vi0whvA0qUu6FVMrOa5e20TFp5BIWI69ksAf3nYD0nIC2VSb0+Jls6VUvWacX+Pi/ilCkT gUsSwhFRaYxTe3ecn5AVD+DqGdFEl9aflX9V1ZaDS5hOtJp6GSAikdkbFwzO6YwUsufLvY VH+2xjpZvIDh93v4pSkM2W0RmYs4pP7fS0kQjog0UaxfPJ8OTZpJGkQRwQj3IEaZwokW6S WqNJKnZHEGxYcDtwPFvbWOk+Kh8Qrwbaeb7rIJJmKjRxO7eZaVusJcnbuiey7jZdel+ILo l9XONnRIP2Xqn6jS5yCFbb3Xe79rgIkvz0fKnRK7Pz1uXlNtr1BKeXJ7JFyHYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYyn6WX4z14gh; Mon, 2 Oct 2023 08:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TLPV086251; Mon, 2 Oct 2023 08:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TL3H086248; Mon, 2 Oct 2023 08:29:21 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:21 GMT Message-Id: <202310020829.3928TL3H086248@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: 09f08dbe248e - stable/13 - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 09f08dbe248e6ffd031c1eff26aeacef0c6880e9 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09f08dbe248e6ffd031c1eff26aeacef0c6880e9 commit 09f08dbe248e6ffd031c1eff26aeacef0c6880e9 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:23 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 49197c391b3d49a33bcd08471bf64d533cd10f9d) (cherry picked from commit f5f6da90597cb65ce55c4f17718a200097f6f78f) --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index db898c97f504..9a7ecd506fc3 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -91,20 +91,20 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Mon Oct 2 08:29:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYyq2RXDz4vm9W; Mon, 2 Oct 2023 08:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYyq1L9Hz4KD9; Mon, 2 Oct 2023 08:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMKt8BRuOd2Br+JBbSxyNVq/YpQxqzUdXeklQgXb/d8=; b=LArPq0DXmP1w+uFdUe5NmHNQgSUc8pmYCTK2YGD6ap070UnObk+VhlXFHuNQJQ0AdvbOTc vLKr1F4JWC5EECg/WCjJm8Jo3FMNCKW1uzNH26ryg/1aabJBvRDtzaXLnG6MI1h/hUSTsW v/1zSvJGdgtgLci9qen8+xExSnNSpp1zrRL4SqqikAXGLnlshq4MjJsqO82Xyxn/uk6WCH AeIvqC/MsrGyBLA0wBqBnMWc5dlOWYmsRnP/heY6lA52efreuVc1v9jeHPD9unebUQ1BOo +5d/qZTx6vUDEbS+o5yJ1Gyvcq/BKGiDCXVoNT7ZU+UaT0IoFRRDQDU+rcYMng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235363; a=rsa-sha256; cv=none; b=e9scidsDohHIhv9FdYjAXQ5IshKlccnV/sn/XwDf3olU4jaT6vJGbboe0fiH4p02RdlzEk fwfnH1OstBYJW6aaABEh7VMLdZjJU88Zg5pj1VP2Gd0LH9nJdpqT7olykaZFP9h7f5dSg/ 19t3+6otoBEq7TfUSETEC5i7z/wqWLU0G5LYm7WvhPWzOTbAXvETm6nK8AYMB73mFYb+CK xpPdCoLiwoxigvpiLRrSZ9uVSKCRQQlMocX1YeeozKHEOeREzB1wPHu7MeqDBi60P9xBex hyNIJ8+GlOy968d8EaKUK3QNiOZGK+WReCcbzlEizvHVJQDllUZsaKB0F7/DHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMKt8BRuOd2Br+JBbSxyNVq/YpQxqzUdXeklQgXb/d8=; b=h7ALe05ZrY8gp9ItxaryFKRNKtzfZmUN2UuH6cMBJLK3zcCWwkHwQ9Emem6GP9DYD0FROQ RIwvOauUm3OUgoUYILAnlo/+fWYxbUDPZzWd6TO9FtoR2cSF4VhKDWGcGOWuM/WrzJidKP Ll/wZcXnw1vThK+L1y7KAx1uhmq8Elez0xF2rKHjgLC6a7A5AOo0FjPuMXbGSXwth1TEm0 fiu3aujV2qTLve8VcHHkUIa5GjTIK2LJmkeEPJIjfHC7P4TdPE1AuiYM51543SRF+fAhbb xyHz+lV5DA3ih4XASqR/l+ruc3DdDExvQ28WKpT4inB6mX8E1hlRmADt3OrznQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYyq0S8Kz14RW; Mon, 2 Oct 2023 08:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TMCZ086382; Mon, 2 Oct 2023 08:29:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TMPU086379; Mon, 2 Oct 2023 08:29:22 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:22 GMT Message-Id: <202310020829.3928TMPU086379@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: e31a331ddda6 - stable/13 - ipfw.8: Adjust section for loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e31a331ddda6ffcb711bb950794be5d53e537e2a Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e31a331ddda6ffcb711bb950794be5d53e537e2a commit e31a331ddda6ffcb711bb950794be5d53e537e2a Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:23 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D41981 (cherry picked from commit 12349f38898f231ca803dcf526bac88cb1b5cd2b) (cherry picked from commit bb6f9a95402a6c3ab8167481b81465f8ad5016fc) --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index efc338d40007..4a9ded2b9867 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3713,6 +3713,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4106,12 +4116,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4128,10 +4132,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Mon Oct 2 08:29:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYyr2nh3z4vmdC; Mon, 2 Oct 2023 08:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYyr2B96z4KQ7; Mon, 2 Oct 2023 08:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqrGSG6GCIxIXJryrZUscJYVAusYRNoFLP/rq6xRQf4=; b=TnDVWwubGxkH77Jl+mPTgXzhKu/rFqjR4pdYu2zNRK8u7LCM+fWvzn9ikw65PqZ2wlCS8b YGiAU3fraEz/tYzRwkzhrdg1f4l4KzJNgYt+30POvkgWRjn4HLj/s1og+YEMBK9q8JM2vk RmaFibS72wAu6rQv8o6zauCSgk25nSUcZDik/Xs+INorgb6wWoNjQEz4GubFuCZch+BMaN Rx3bWl2joVn6XDUDIiTJmvSyCn7i8uk8zDVdH2DcBGbTkh3NEI1l/iYab+fAWChME3Hh24 yiGSSuQoz+IZsABDMPX5AdvVslDqWUmUOcJpKZcB4wfiJ0/nQzPoaDGQ5QuCNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235364; a=rsa-sha256; cv=none; b=WIM5dk7OXJ1c+wAVyOS3yh8+kp/EgFi9sZ0gsbToBKZ+Sq/97kal7eciHKZocpWmhoRtjX 2W0WcBG9eBK/s5tXbR5VAL28aX7CrB3lmHaw04OXJKVHTjD2phMAc7JxctvqKiyjz4URZY BUtlmKTE53zzunyq+5Ik187AbiHDfdvQl3JxHhpPQWfYFICDbLbsl6U+Xl+0OM+dg9uHiS DaBkcubrZTLYBztzT02oRXsBQXG7rWFUgS1rI2WvdoqdKPUu04tM2JEjkIEg2Z9Sdp8GR1 pqQ4uoJVM4KZlPdViAJW4awq0k5h8ZBk8NB6LYXdZgEGJoN1EvYOYwLREntsOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqrGSG6GCIxIXJryrZUscJYVAusYRNoFLP/rq6xRQf4=; b=Gm8eWJp7Jce+1QaYKBKJg+5bk5M8pozm/2lCzXX1Pmnv3HdF3xCDSGU/3Rzwbx5x6MIypR 7BtnntjmWu0Rm8mSG6ZorCQznpkmUQ3C5feu3LoQ1IaMUGVUwfBl7n0tr6gqS4FFK0FXLn XZFNnY+U7F35RpmBJ0478Yz9MhIn8MJTtiVLpJ8MAUomSEMr1VyfiJPM23bbxnfJNlay6M orFLSQeWhnHllBGj07oQf3beorF6Qk56dlT0Cd938MyXGe3V776CbtWDxXmg8vS3EfCU/2 R3XkSpTQe3dWbN8OCzoeV/x1bGYUCKyLLe8OM1FQaxc4s3QSYuR/3Lh9ygPBCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYyr1GFLz14pM; Mon, 2 Oct 2023 08:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TOFf086444; Mon, 2 Oct 2023 08:29:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TOdS086441; Mon, 2 Oct 2023 08:29:24 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:24 GMT Message-Id: <202310020829.3928TOdS086441@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: ef3edef9ec8b - stable/13 - ip_mroute: Fix sysctl knobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ef3edef9ec8b7d19e5f66c385340604ab29ccc78 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3edef9ec8b7d19e5f66c385340604ab29ccc78 commit ef3edef9ec8b7d19e5f66c385340604ab29ccc78 Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:23 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 (cherry picked from commit f549e22901b3a391c76659bee55802b1214112fd) (cherry picked from commit b0f026435a150933ecb6f2d1359fd1b4898657f1) --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index d8c5c74231ec..ca510610e4e7 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -161,7 +161,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -234,7 +236,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2876,18 +2878,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) MFC_LOCK_INIT(); VIF_LOCK_INIT(); - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Mon Oct 2 08:29:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzYys44FWz4vmM3; Mon, 2 Oct 2023 08:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzYys3Wgpz4KWB; Mon, 2 Oct 2023 08:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+pSWsdjoq0ROvW5fJghtoLdbs4BpNPLCK242qQRbd4=; b=E0qnO+wQslslGY2LDGbH90oUDBJDvZbNR2QgnlLPBeItLhlfzwCrTUe0TTgQjJk64gnGCA K+89Y6TyV34QkQE3TpV02IAca1DKoKRMGVaNnzhe56h7dWpgone5KFg5ZxQsfX1znW3kJX A9GHx6CeFjHjDqddmUaFHGyGr0VJlKvqCqX8pdcfrOKWEHWOIq1m/QEsjnWx9gQO0sQ2UN iyCLUwc02QGIYo7LLESpj5kK4e8YXJhQcskGq5jxC1oVRTsDNkP3cj5p5zVvxvbMeCp9+3 WVkdqDs5paNxdUGNsoiHv2EpE3GHAwzjJyNfZVGHQt6Z9o/FRy0QcNC41fRNLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696235365; a=rsa-sha256; cv=none; b=gcRs2Q19cH3EQz9v1CI7Gh4enZS/dsu24YaRz8YF7zBNAuRopSPZgUvOuzczIr4B1f7kc6 2Ai7VYxiAJpXyrEI3kE4uw/TYvEd/9pdLdXTbbOO5dcqRugSTHRHnE26nW/ApKB4DrkLs1 LYgyfGDxs8qfICVMT8rK0l2W8mVMuVkckzB0MHCdIHvPxS2iF9DZj8WP0N5hc9As1+UVqa raMcErrC1CiatVJTMig/sRsA/Ysr1zDZ3Y912McjRqXyU+1TNUmCUlM14INp4thGHjbgiM poRYR3bJ9DZNycmQYvjdn5OV9Vk/DfCReMzTVJDnwSEgOU8IMXbkF670OTH4BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696235365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+pSWsdjoq0ROvW5fJghtoLdbs4BpNPLCK242qQRbd4=; b=oFZ0h109mUib0O1GoyVJws5cyevMqP7z8RC6AJfbto9lMPqvx7kr8cy+/Baq19f9Gf9TWd akdrjnD940uhQRyaggz3xDfZiMek7cuRVlZU7a3eScnbg+mv/GCukcynUGcOf5MYevI4r6 R2INXcGnZeNhSFdcVZNBpHRlcwCmO2qzg8T3mH+gXANV8MWCSY7c/UQOpmeYRAZbhMuKqY hfN4Sf6yU0bWP29mPhodutibRHUMBRuoRfo3QnXZudg6lyPj254lJ019urrblahYpZ+XsJ 16wn4nS47DC32TK6dFC8+erfAItK5yReAeMQBKDjktjEOxgqNEySz0sVWPGWhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzYys2TS2z14gj; Mon, 2 Oct 2023 08:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3928TPGq086495; Mon, 2 Oct 2023 08:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3928TPp6086492; Mon, 2 Oct 2023 08:29:25 GMT (envelope-from git) Date: Mon, 2 Oct 2023 08:29:25 GMT Message-Id: <202310020829.3928TPp6086492@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: 25c371dc559a - stable/13 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 25c371dc559a9ea23905baa5cbfed3f6d9d6eb5c Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=25c371dc559a9ea23905baa5cbfed3f6d9d6eb5c commit 25c371dc559a9ea23905baa5cbfed3f6d9d6eb5c Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 08:28:23 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 (cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) (cherry picked from commit a9359dcde241f17421a71bc8c96dee08625db9dd) --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index fcd7a94575e6..a2f1b5070818 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Mon Oct 2 09:09:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsd5gnsz4vq3y; Mon, 2 Oct 2023 09:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsd57RMz4Nq2; Mon, 2 Oct 2023 09:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkkjSYMABSEp4BeMeNo1sp1+TqxHOfH2gj+2cQ9dki0=; b=tfpGXzdhZXjhr2/TfD96wPdPdk2/zcTKpZZ9OiKI+EURD48Jdx4vsufvOU/duloSDzq+ZZ XiWHq+1dVOLv5JnjS1SUhkLuCGz/Ls+I4Ib0uW/JyVvyYVZQGdBn5n0FYW0ZRmVoabdwqn fmVEqF17LJTw5lWh7GOaEpkWDmk3NdOzio5CKfE9CJwHvMlCfFeEM+6qZswYtZ2m8DLb4L ywgsjQLwocKI4vdoDF71SsHSOYbZ9ZL3IZBshF2RH+4JjB0/yrNjyEn33GKi0BDPHdsrcy j1FXD2kveZaEO1dsEgm2FHYo3NVlxzpohfhqSmnknRdwFTMvubmcaoa+YC70YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237797; a=rsa-sha256; cv=none; b=VephHD7XRmb1b5sOCUx/wb6dPogrj97uLoWJwW19p7m09GDGtmQtkI2cSOeH5TMFESLGMN 3s6sAzqPheX0CR0b3WoTFU8mnslHigWA0wINQHXpOJNbsinZekycUYDPNaF9gnrNXLuUNu e2So1ObLduIVDVNh0YArCAfhugESNLh8musXbSQMzhNFi1bG5PD+rHO6L4qtxqoua4O0Tb S5PaNqRSxgyQmoMM7p0MSv3IX8TgXM9TBfuP1W4SVsZw+XzM8Ffi+S0C2fRYPM8iHRzwJS VeabHmpVtVsI2T/AkfchKHeKwQ1bRyegwKfpUyG8E2BwQkEJ0ErWw0sCM0reqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkkjSYMABSEp4BeMeNo1sp1+TqxHOfH2gj+2cQ9dki0=; b=A/m6USiqt9+mzi330ocjUoQgkOr8BhnLpkf1RIkhteGOLE+HGGR5h69krvRxeXQ0DppEy6 i4XKXFbzF3CBhcIa9ClnQ9FsAZP3OSe/Vc8XxfoRjOqo3Qyc5FDwg2TA8Lcf477LOGR1il D8pLPLigw4rSUW0aSoZVsE0pGkEcNYduA1LBgi0W/+VLVby6gsm03Asqu2awJHAIU6HvyA kjO9JLz9aVytM19knW0w0lq9VHIfWAGt/gWd0eXlRr21CbKxfUuzzMz47iRzz0xvaN0fnx DEgq4kdzqJ6YlzAMRLzWb7ju1dwGHz8ywxDEv+rVmuw+AK6M2KIybYd6ufPMkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzZsd48WTz15Rq; Mon, 2 Oct 2023 09:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39299vSM053683; Mon, 2 Oct 2023 09:09:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39299viG053679; Mon, 2 Oct 2023 09:09:57 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:09:57 GMT Message-Id: <202310020909.39299viG053679@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: 453abc9f3a3e - stable/12 - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 453abc9f3a3e1a305e49cbf425122352a15055fd Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=453abc9f3a3e1a305e49cbf425122352a15055fd commit 453abc9f3a3e1a305e49cbf425122352a15055fd Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:54 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 21a722d9593eb477f4ccdad011a2b4df0727fc62) (cherry picked from commit bffb01eda9bffc3307ea8bf70f91087ed316e01c) (cherry picked from commit c6afda2e5a0389ce293d3a3ced2889979aa2e442) --- sys/net/rtsock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 8009ec5dd0a2..aa2f7422d6ce 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -196,7 +196,8 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (EINVAL); return (netisr_setqlimit(&rtsock_nh, qlimit)); } -SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, CTLTYPE_INT|CTLFLAG_RW, +SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Mon Oct 2 09:09:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsf6b2Fz4vq13; Mon, 2 Oct 2023 09:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsf63zvz4PDX; Mon, 2 Oct 2023 09:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Fy2cGEFi80uNoaAn207ikUcJcDK9GWUirHoQE/VDxY=; b=HKK/IFQzL3IcCkdakvV22MAQPN16JrxP+Ku/h4YPpkJ+kU2JBPqeQ07nXKzN9Txt92Hl/R z3EFaEfjOFnrbLYiDck4L+T71v4rC/KTOmPIbIHZ68vUx3818HYtfsvmUna9krfyAmBSK8 aV2giKxupsVmJshgugp0KeDl/XPQxt2Y7kBNN53ZEw2Rt90cpkE8n03TF117IeSkrCH+cA /0JVwKwxqAud870P1MmpT3ooz83n4H2XYOOobjoUjbckAiAE0rq1zM9N8ljV93bsEsvd2W 0bnQarMEOj7JLX0TLkyEvGq/esa5/6XU0xHz5Sn9/l1WMkxjlwV0zWKZmkpILQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237798; a=rsa-sha256; cv=none; b=GH47Ur50VCI1CFDjYVT8ABMkJzNXqhAIvw1k+yRmP8oV/KFlpPLO4WkIkBNYkZiJ4IlRAh pbtbODV13D0xWPre3WpRPI700ian+9BINpcTfB4NS+s1agmYuHbPDWEeldasBDj1bf1zwg hwCkMILNFswNdV+2uX1F1ZjPrdBYl4lCRsvrAyjs9ytqsvr3vOMRcqdXXLfHdl3k8n8zKS BuIX5LWXkacZ+lnP/XfP121l8jWG33fwNxPmBGsMhlKyDYcGbmmxtJJemGuY+sbFMInirI DsZuoruWMi+svBj/2Tb9YnvQBrKx7Ie5/Zd+LScfIe8UoPhW3VF/D4YvgJe/iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Fy2cGEFi80uNoaAn207ikUcJcDK9GWUirHoQE/VDxY=; b=CyBqQpWN7q4DCM9DssZCvTwdcW7qqm7Yxb40IcIZ7QQUjmyWRiRo4nR+8toEXenci5B1+d m0NtDRWXGwE06GXoXjsQ9OSNs8vJAOjVdvvU2mRG8s6uS/GsW8GQY3QeT5w0kvhSV2waaX A2D4sc2dCKDDmyjUKF1uHU6WtbC0nJN62oe3I8OGE9cJ1VYNM2orK6jKw/cu5OTp3zepDk U95WWX1Op9wjQ6gzsvrPX4mNHTPrWGeSzaX9PE9INuQEUGYOdiUpTDPxIk0r06pqM5uBzE NhAOjhvPBzLoSfvJl6ZKkKq/oyO+aqug7mXpeOQ+6AdkRM1Jde+pKLexjlYAvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzZsf59RRz15Pv; Mon, 2 Oct 2023 09:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39299wPr053739; Mon, 2 Oct 2023 09:09:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39299web053736; Mon, 2 Oct 2023 09:09:58 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:09:58 GMT Message-Id: <202310020909.39299web053736@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: 2d43654e6aa8 - stable/12 - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2d43654e6aa8215dff11e5249bdb3518ed0fbdbd Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2d43654e6aa8215dff11e5249bdb3518ed0fbdbd commit 2d43654e6aa8215dff11e5249bdb3518ed0fbdbd Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:54 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 03dac3e37993801dab4418087bfedacce0526e66) (cherry picked from commit da2b630c12ec074673dfc646b2055a31b0d8d6d9) (cherry picked from commit 28a80239fd6ab2ff79af5a2b19e349fa6f1d62e9) --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 43d99e484fb8..b8895b4aa442 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -492,10 +492,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -548,7 +548,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Mon Oct 2 09:09:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsh1BPpz4vq7k; Mon, 2 Oct 2023 09:10:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsh0050z4PFG; Mon, 2 Oct 2023 09:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YnuyjxkIkwqPXBwITYh5raIy/+MmD+yzg/vSjg+e+HE=; b=uCV/Q+uaKjWeXh/V3fnXdxbpIybONBCsLCMWljKXJFEFliEuvKkRkuG0APj4oMgOIMdkEB 014zYg+QkwCkdt5CZThCtk3AHmIM6brT/GUVTmMIFyts4qIFS2ObVmbqb27wnaZkPyH8lt vOV1mbo3RfTU/Oly5dAOw4ayBvqrH5peNSj5UmWzzALYrINy8zsdqFF/8rLuJsQoeXNTlT crmUqvB0VhsB2SF5Zf3o33xbYFHJeAmHISACe4Elvbx+dBDVP7PiRhbLI26ECraRL9RTUa XUFo8CD7VzKSlHfrWN/YOvt2QZN1k4KlOn+uEwP/dHVcLS1X1i0prsx/JTXa2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237800; a=rsa-sha256; cv=none; b=gxvh7gN7fNlFUlseNkwjq5VPL4XockSlwoqQfXrWztsuWBGYF6FLKCMZLIiZzLW8LQ+m/i 0RElGxv5P8ga4NulpI61bHigbs43aQ2yWf15NcyQMc6biXOZNDtS0P41jM8LY6JGN96+lN wj80uwyiBumu9ZBuJv1AF6cGL2+glqrHJixAqXH8vwkkT0MDuH4+sbU8AvjIleIahc5MON K8v2dKNu+GJYP5rJCBCRuerLXkwHKSxVT1G42nfCMui2MECV+gmje08xnWzQfdXwL2mOPF dzy8PpD/0uJ176x/jo6CndtjOngqxOI9MEGbPu2edca3CP6Wb9UCZv4DE2sIiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YnuyjxkIkwqPXBwITYh5raIy/+MmD+yzg/vSjg+e+HE=; b=GQluYgPMGkgCAd3iPBbMhybX6nFwT2NpOy+h+6xOfPDzwzOTqZIIZIf3boOhELG9nIaUo9 zB5HWex/ozpBM4eSEm7cEwYd0VcwDs6EAfYJhaX18G/9pqH0HZxuCmR6VdLTriGfEqc+ov uVaIw195DGNWCHT2+3T91WEpsvZsChRLtPuSZhnfmCX+CokXkymXHTDv+ocl/eaK3IikdU bq1tCeObC1/uFb5wxOFVhuO9ZrrIaZ5+4sYMuyj6W4f8KkhP644jWbWr848ZSMRXj3xG2E 1eUj5O8St6WDD/cvRm3qt3wzMk7xcmlUI8xsi/X855q8eRiyT53ezqcNGbvCDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzZsg6C9nz15ss; Mon, 2 Oct 2023 09:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39299xWs053791; Mon, 2 Oct 2023 09:09:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39299xb3053788; Mon, 2 Oct 2023 09:09:59 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:09:59 GMT Message-Id: <202310020909.39299xb3053788@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: 8d6188b13156 - stable/12 - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8d6188b13156a4b88f7bf230eb0ef8bf38bad551 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8d6188b13156a4b88f7bf230eb0ef8bf38bad551 commit 8d6188b13156a4b88f7bf230eb0ef8bf38bad551 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:54 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 49197c391b3d49a33bcd08471bf64d533cd10f9d) (cherry picked from commit f5f6da90597cb65ce55c4f17718a200097f6f78f) (cherry picked from commit 09f08dbe248e6ffd031c1eff26aeacef0c6880e9) --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index ca8a9aa1ba13..084be4a60f05 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -96,18 +96,18 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Mon Oct 2 09:10:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsj2Y13z4vq41; Mon, 2 Oct 2023 09:10:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsj0KyWz4PC1; Mon, 2 Oct 2023 09:10:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0N4ghL047wj8eFjwSB4kbhjMigT4MSk8p8dXv9R1jdc=; b=q0UuK1Y3+MnV+WiI1Mq6rYehNpxzq+tIjPMcAVBCV+rGyzFjgJcW3Sj0jgvFu8RxHtIy3e Y60QZRCENM7F87QzcMpS/bK3lGfH1wVHqKRqialk/XJA0WMX7+kcTnt/zc6f4TZXBN2h5E TPA7FBN1Ulz/FI3z3dJ5x7W07Uw6I3ZOUfCMp/3JT6qtMk5+QBGUjQkl5VMeMkbCKB1bB0 Q1A8CTbiA9NiIyc1k2c8K97jYwBeu4CEKm7ehROBva2tDdG9RYoGt4+M3eyQFM8qn4PQFH FN0M4MMBUu/iQtR16xm6GpmDVLEzfpWs8/42/I4qHTbVwM/eTd0kYEzgJiKz7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237801; a=rsa-sha256; cv=none; b=Q5M2T2Xrevz9WoI8h02y32F+ImZUp4hIFwhAP4WsIURKCXMtgvTNb3dT+SQcnOCm2IhqvF VTzKCj9O/UBum0+3MQ1mm/9hA9MBSzi8GYodPyKYRHbXXgt3qGm228RbtuPlNX/WXbtmHf OEvZH02IwdouxdQndFzUcdVLX2MqLndlrvFvU+TEboeOddrBGxrD6NE7nLPz+2rI29biir Ko/qiv3JNxpCBwyUBeRYGEMc2mEjlY7FMQUIX7AnH9nws2pS5KtziJxGKz0msnmwUSWsmX 49r8RpbwerbD7qJt0hgFE4IYt65MWlEdOG/YkC1yL+6SFMhZUiLXSc7J0cQQtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0N4ghL047wj8eFjwSB4kbhjMigT4MSk8p8dXv9R1jdc=; b=XROR4BiF6cMglp/ek1oZEki5E2TBhooDVLgo4DJYKZ8lqcMjK9lxSwrCFmcT9l/oqHhUp/ IyDsHCleAWLh3A5HqpuIF1eryXFBxb+ePrZDGbau682MlUmcXj3pRfoUoHqw+ASQndmUry 4yNSFxPCev85ez2N4ak9s/PSXvsSmIKVhW9Af4kgFdU3m3Z53ugISXH5A5PZaAEzN7LlLr ESLEN8MT3aOZ5rv4Z+8AN7iyMoMaE8pCf+EskMpnSwptCEBDz9GEfyXOz28L5rekxsOpX+ DlgPZO+LILnr0WGP/3so5DCQB+jdIv7kr2/2Wizr2tPY2lZnsbPLlmYfnNWnXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzZsh6Y2xz15h5; Mon, 2 Oct 2023 09:10:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929A0x2055590; Mon, 2 Oct 2023 09:10:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929A0SH055587; Mon, 2 Oct 2023 09:10:00 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:10:00 GMT Message-Id: <202310020910.3929A0SH055587@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: 6b8183c70caa - stable/12 - ipfw.8: Adjust section for loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6b8183c70caaa4c8b29e8528d86ff99616da4d47 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6b8183c70caaa4c8b29e8528d86ff99616da4d47 commit 6b8183c70caaa4c8b29e8528d86ff99616da4d47 Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:55 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D41981 (cherry picked from commit 12349f38898f231ca803dcf526bac88cb1b5cd2b) (cherry picked from commit bb6f9a95402a6c3ab8167481b81465f8ad5016fc) (cherry picked from commit e31a331ddda6ffcb711bb950794be5d53e537e2a) --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 512ad5baf90e..cdf9cc29fe3b 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3683,6 +3683,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4076,12 +4086,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4098,10 +4102,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Mon Oct 2 09:10:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsk2DZjz4vplp; Mon, 2 Oct 2023 09:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsk1CJPz4PG4; Mon, 2 Oct 2023 09:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nk+Mji7ejtL42aBQCRxPf4BmeEp05g6PG5Ha/qn5W1k=; b=Pa+5lBZbUdmgFIdwPkww+e3QLGkIj3AqNDnp062p390sHpNAx3OuUfGSgfWI7tjL66yB1K GvXUq+IDUrgnAeMpdAI58eQqK9UbQgMgaBQyzybgbHM1OkQ57UujVY+HHoeG8k1RaFT/6I B1++JhHjFx1mtjdA29WWCOU0QxMvwRq1+AqWC+4dYgZwpbIObPn9RNxafdmbp2ySKRLFZb GVNhauqVyXTPizO/iGp9T4zjZ/Xwuphk41q4sacDd1rBxb22u577bbzx/KTyX8C64XRHYI 4c86FT0aJud4kqwm7BX6cI2TN485LZCviFni2Yo7c5BZ3dXieM92BB+9/hdTGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237802; a=rsa-sha256; cv=none; b=C0D5cpARn6CBpzcP/8de8CJ+Zb0zIvQso371Tjjo9PlhZ80zZ8h+rswd1oKlWKLKlLNLID RmkshGc2UFyNiD5qBPIETtGsOXNqvqfkuzaIR2gCYNX0dIhxigeMSHJyGpl7iVw0cAk6eo yF+SgNC9p4J1KEFLfyRzAALJ3Y7P8+f/DDyohXNsa/Y7wjCSDBTw70qaRGhRuyUzrlknMs Z+BrVxOFytIuu04Tab5CgULZ4/ZZwAT4/Z590k8zF2UBolWxO4KXMYn07TiQHjA4fykKZE NsksN8soLUpWBiIK6CXA+l/Z2WHOQFnaZXuEfdWs+RZuDOBZ8Q6V8Jyk33Psjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nk+Mji7ejtL42aBQCRxPf4BmeEp05g6PG5Ha/qn5W1k=; b=oNy2BOSC6+jo38GtexfbvU8NSlixuEMrY++esqJkqIYD9r97t8/XOkjuef6AT7SxRbYicd kEtAjU7GdJz/oa7r6cqfSytzgsYEF6yHd9aB1vH5lT1w8WGN8NOAgvs+SMReZD8Rcqduri s63C7jprnDtirw5dkAuXMdT8IF2lNy9/sxjAXWXZrZD4WlpyB70VCErPpxtHqKDu3pVJ0G lCQqOXUHjp1UNC7oLDCyr1P1sCEVTojPC9exAd5UZIAfeoCUsjTWaoxpuO1OYvrNKCJtvW t2r59776H3cgW11Uor57VgzE5rmVz7tSz7I5Lz2fb58bt4+X9LIgdONF1sC1Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzZsk0FDBz15Rr; Mon, 2 Oct 2023 09:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929A1Ms055861; Mon, 2 Oct 2023 09:10:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929A1tv055857; Mon, 2 Oct 2023 09:10:01 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:10:01 GMT Message-Id: <202310020910.3929A1tv055857@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: 6a6202b4cc8c - stable/12 - ip_mroute: Fix sysctl knobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6a6202b4cc8cff663c94a3f78a47d171cfe0938c Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6a6202b4cc8cff663c94a3f78a47d171cfe0938c commit 6a6202b4cc8cff663c94a3f78a47d171cfe0938c Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:55 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 (cherry picked from commit f549e22901b3a391c76659bee55802b1214112fd) (cherry picked from commit b0f026435a150933ecb6f2d1359fd1b4898657f1) (cherry picked from commit ef3edef9ec8b7d19e5f66c385340604ab29ccc78) --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 92074670cf60..fb96a9ccdb43 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -163,7 +163,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -235,7 +237,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2876,18 +2878,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) MFC_LOCK_INIT(); VIF_LOCK_INIT(); - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Mon Oct 2 09:10:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzZsl2K1bz4vpy2; Mon, 2 Oct 2023 09:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzZsl1XrYz4PPB; Mon, 2 Oct 2023 09:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVvs3I6jWAhtF3J0boYv4rGMZaajQkJP0YfTMxVDG7A=; b=T95emTNqmNs4YU4NH2bqfRNLehXaxJtHdhwuFx+pyZ1pYJyGXwIQHCXqoS1GwhTzVGSbhg +mwidwuCXP0Hlaxo+KfSA22l90K0Go53+EYHfeXNqlPUGjBWeRVddAY91b77TK0gz4fy2N glHx11Mdd0QGev32wGC3CoHNkEYnIZZ1vjc80uGVP8t1DWcRskfjozdfP2fPFvaKEFYNBH FoBbKtBP58k3Ql6b15rw+IBQfAclLdw1kCfF0wLeKv8+MlBlvm530U/hxffZSzMel9+lc5 Od/iKkTlKeLTmjW8Ko8tSkhnicRPhQ60oW4Yhn7YuISp02MD2y1NoxptHlKUbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696237803; a=rsa-sha256; cv=none; b=OpKlHfFYEhcnSh9L799oL7FepNoglPgCTmBCeoncCk8gkmla11OwasCA2V1phSWHmpELj2 hpfDNYMzwobpboEZvEPlAXjD21PnW4TBw1cRQE7B6mEgUUaXf+hOuaUW/BcG56QLCGOrHC VITJJZloxc0jVZU0AetxduYVaWLJnje/Wdr/yBVW60OOir6XDDtAPTkIabPDl4IwElpPrP OSP+kakLlsBhvqYLazzL9btmQLwiYOCINsKqaQb9EIasz+WPfL+peoyx8qgbJpt2mq5ZMY v1qOh7Fb7zgQTZydowVVe1UrwiGVEzo4rsH3gY6Rq0FpdHeLkWFLRM9lJQEomQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696237803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVvs3I6jWAhtF3J0boYv4rGMZaajQkJP0YfTMxVDG7A=; b=maX4ugvwH+0eLEcxLL6NPLokfLcj8fXVW5c0vNDB/Dd+s4ZvaVY4oK2CuaCju5tskMQfpU scVxW/m44JQRl+qGPmHultrVeZ82elXTflo+Bv+tfGvtF15vbU2Iu7mfbD4cnofUpYYqXu vcmZZS19HI9h72rkmYApCsPAGSxExvg49/1xF0DkQAEPeHvmE3o31cw82j0Mu2LHZXm2p7 SZLScBu2Y7AKb+tvnPh6on1wYETaYm/5nHCaun7SU2y8bt2QsAl1zMP9hXbqXmExbQd/Q9 4POdjA3W9MfBQ6FCdVDHpPyfCeDduldI0IzBcAGzK6msmRhD/gTFbiDSeWSt/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 4RzZsl0ckvz15h6; Mon, 2 Oct 2023 09:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929A34o056151; Mon, 2 Oct 2023 09:10:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929A3X5056147; Mon, 2 Oct 2023 09:10:03 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:10:03 GMT Message-Id: <202310020910.3929A3X5056147@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: 3f44d7870593 - stable/12 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3f44d7870593bc7fd116a27310138646a00d3fff Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3f44d7870593bc7fd116a27310138646a00d3fff commit 3f44d7870593bc7fd116a27310138646a00d3fff Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-02 09:08:55 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 (cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) (cherry picked from commit a9359dcde241f17421a71bc8c96dee08625db9dd) (cherry picked from commit 25c371dc559a9ea23905baa5cbfed3f6d9d6eb5c) --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 0b37dab558aa..33153cca246e 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -131,7 +131,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Mon Oct 2 09:33:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNf4ZVcz4vrcL; Mon, 2 Oct 2023 09:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNf461Wz4SP5; Mon, 2 Oct 2023 09:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XOVb0BZfZtmYchr/ZATklF/RV4TPWQiQaltkkSeArLA=; b=RqxqHH7HaVfENOMeDuPRJz8zFB60TzOeT8K5j+Iy+tfH5q47+xwHktnNHQIPESUop5/jsf WK7V+VVhnObQrIQiIWYnopPavpqZhbAwgebdIrAKCduAW1F7d4Tb1f7Cyb4plUQ4ZTooWH dIq8VNZsrk/iGch6PBGQqHjlOAjsVo/kdH/6nWI7r4wBQ9JS9PUfWMahmEDzgu13AJJbOo 4EqkeNz8WvoaGrFiYVmIxMRU43+qn1Zhu2FzlyDZ7cGeGswlH7CsP+VT9oQDF3wA0Yjewj 0x9YAHa+p/268NoRXkFJhiA3N71OG9JbZbq9rBLiZ4T7qrAodYYEq/6D/SlCeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239202; a=rsa-sha256; cv=none; b=T3dMPbz2Zmd/x7yo72ObLRSuq3V249y/okP1k+67t5u3C2TSbe1IRJ/pEsrUg4N8f8TtSv G7zLd4ue0kUP2c0XR/+OCBH28dsGKNUzUVtkjnL4vZNbne4TyGTQvqgQSkxp4eg8dUHVIa lAAOge8T5ThI0Czx0LUcoY+Pof8CrOFD7QNiYCkNMeLJfjVDBIAjR0uUfMJRIl5XRvmNuX 1W34wyG/8DKzEG4f2A5B8fyrzab35mViH8h/0ulSoRynLvOMO4jT3a2ykDsj6zsqEUAm+W rDrVvUGgv/YtD8nCmf1oMzFHJ0/Vaj1ZfbkvqrjcN0pvgBXeejoWuXUGPMi5ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XOVb0BZfZtmYchr/ZATklF/RV4TPWQiQaltkkSeArLA=; b=ywzVGCsU2liVcdRzNWsFDObGh2l9iIb7ZbivA56ZPZgNMLuGM2pACLyIjtpPVRplqiRhj+ I4g3taArHBNeq6ip0qgCk0918ghpM0FBcolzOIKOKAvnFF5T05j62rHhYVUieGD5+aMl0z guTlZ1Eh2enw4bFxSePZCXc/ZqGaPYB21zjzYQyOfe9/Tvknlm7F1M4JrgnoE5UC2I4LrO dfgl1zOoSgiWMTDIru07UY/RYfyjrBwLo34p1tnlemPkVAbpj2KS09GMfhqxTrh2amQzUA AEWY1kT63K3PbEvJG2ewh4OLj24hSdP+uv9X8VLnumdyAYS5cPnFUtxLUsLD6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNf38nvz16c4; Mon, 2 Oct 2023 09:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XMMM002646; Mon, 2 Oct 2023 09:33:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XMuR002643; Mon, 2 Oct 2023 09:33:22 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:22 GMT Message-Id: <202310020933.3929XMuR002643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0ac8d8d9954f - stable/14 - pf: support SCTP multihoming List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0ac8d8d9954f2d446d4fa7a5f154d55931f3d1f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0ac8d8d9954f2d446d4fa7a5f154d55931f3d1f1 commit 0ac8d8d9954f2d446d4fa7a5f154d55931f3d1f1 Author: Kristof Provost AuthorDate: 2023-08-02 17:05:00 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: support SCTP multihoming SCTP may announce additional IP addresses it'll use in the INIT/INIT_ACK chunks, or in ASCONF chunks at any time during the connection. Parse these parameters, evaluate the ruleset for the new connection and if allowed create the corresponding states. MFC after: 3 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D41637 (cherry picked from commit 10aa9ddb4d45ab0c8f56b0e91c7e8de213030c0f) --- sys/net/pfvar.h | 22 +++++- sys/netpfil/pf/pf.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++- sys/netpfil/pf/pf_norm.c | 34 +++++++-- 3 files changed, 231 insertions(+), 11 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f9cb45f696d3..ec72c1079c70 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1531,6 +1531,9 @@ struct pfi_kkif { #define PFI_IFLAG_SKIP 0x0100 /* skip filtering on interface */ #ifdef _KERNEL +struct pf_sctp_multihome_job; +TAILQ_HEAD(pf_sctp_multihome_jobs, pf_sctp_multihome_job); + struct pf_pdesc { struct { int done; @@ -1578,10 +1581,22 @@ struct pf_pdesc { #define PFDESC_SCTP_SHUTDOWN 0x0010 #define PFDESC_SCTP_SHUTDOWN_COMPLETE 0x0020 #define PFDESC_SCTP_DATA 0x0040 -#define PFDESC_SCTP_OTHER 0x0080 +#define PFDESC_SCTP_ASCONF 0x0080 +#define PFDESC_SCTP_OTHER 0x0100 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; + + struct pf_sctp_multihome_jobs sctp_multihome_jobs; +}; + +struct pf_sctp_multihome_job { + TAILQ_ENTRY(pf_sctp_multihome_job) next; + struct pf_pdesc pd; + struct pf_addr src; + struct pf_addr dst; + struct mbuf *m; }; + #endif /* flags for RDR options */ @@ -2253,6 +2268,11 @@ void pf_addr_inc(struct pf_addr *, sa_family_t); int pf_refragment6(struct ifnet *, struct mbuf **, struct m_tag *, bool); #endif /* INET6 */ +int pf_multihome_scan_init(struct mbuf *, int, int, struct pf_pdesc *, + struct pfi_kkif *); +int pf_multihome_scan_asconf(struct mbuf *, int, int, struct pf_pdesc *, + struct pfi_kkif *); + u_int32_t pf_new_isn(struct pf_kstate *); void *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *, sa_family_t); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7cee0833072b..69373b720ad9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -126,6 +126,8 @@ SDT_PROBE_DEFINE4(pf, ip, test6, done, "int", "int", "struct pf_krule *", SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_state_key_cmp *", "int", "struct pf_pdesc *", "struct pf_kstate *"); +SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", + "struct pf_krule *", "struct mbuf *", "int"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -307,6 +309,8 @@ static int pf_test_state_udp(struct pf_kstate **, static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); +static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, + struct pfi_kkif *, struct pf_kstate *); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5911,6 +5915,174 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_PASS); } +static void +pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, + struct pf_kstate *s) +{ + struct pf_sctp_multihome_job *j, *tmp; + int action;; + struct pf_kstate *sm = NULL; + struct pf_krule *ra = NULL; + struct pf_krule *r = &V_pf_default_rule; + struct pf_kruleset *rs = NULL; + + PF_RULES_RLOCK_TRACKER; + + TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + PF_RULES_RLOCK(); + action = pf_test_rule(&r, &sm, kif, + j->m, off, &j->pd, &ra, &rs, NULL); + PF_RULES_RUNLOCK(); + SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); + if (sm) + PF_STATE_UNLOCK(sm); + + free(j, M_PFTEMP); + } +} + +static int +pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, + struct pfi_kkif *kif) +{ + int off = 0; + struct pf_sctp_multihome_job *job; + + while (off < len) { + struct sctp_paramhdr h; + + if (!pf_pull_hdr(m, start + off, &h, sizeof(h), NULL, NULL, + pd->af)) + return (PF_DROP); + + /* Parameters are at least 4 bytes. */ + if (ntohs(h.param_length) < 4) + return (PF_DROP); + + switch (ntohs(h.param_type)) { + case SCTP_IPV4_ADDRESS: { + struct in_addr t; + + if (ntohs(h.param_length) != + (sizeof(struct sctp_paramhdr) + sizeof(t))) + return (PF_DROP); + + if (!pf_pull_hdr(m, start + off + sizeof(h), &t, sizeof(t), + NULL, NULL, pd->af)) + return (PF_DROP); + + /* + * Avoid duplicating states. We'll already have + * created a state based on the source address of + * the packet, but SCTP endpoints may also list this + * address again in the INIT(_ACK) parameters. + */ + if (t.s_addr == pd->src->v4.s_addr) + break; + + if (in_nullhost(t)) + t.s_addr = pd->src->v4.s_addr; + + /* + * We hold the state lock (idhash) here, which means + * that we can't acquire the keyhash, or we'll get a + * LOR (and potentially double-lock things too). We also + * can't release the state lock here, so instead we'll + * enqueue this for async handling. + * There's a relatively small race here, in that a + * packet using the new addresses could arrive already, + * but that's just though luck for it. + */ + job = malloc(sizeof(*job), M_PFTEMP, M_NOWAIT | M_ZERO); + if (! job) + return (PF_DROP); + + memcpy(&job->pd, pd, sizeof(*pd)); + + // New source address! + memcpy(&job->src, &t, sizeof(t)); + job->pd.src = &job->src; + memcpy(&job->dst, pd->dst, sizeof(job->dst)); + job->pd.dst = &job->dst; + job->m = m; + + TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); + break; + } +#ifdef INET6 + case SCTP_IPV6_ADDRESS: { + struct in6_addr t; + + if (ntohs(h.param_length) != + (sizeof(struct sctp_paramhdr) + sizeof(t))) + return (PF_DROP); + + if (!pf_pull_hdr(m, start + off + sizeof(h), &t, sizeof(t), + NULL, NULL, pd->af)) + return (PF_DROP); + if (memcmp(&t, &pd->src->v6, sizeof(t)) == 0) + break; + if (memcmp(&t, &in6addr_any, sizeof(t)) == 0) + memcpy(&t, &pd->src->v6, sizeof(t)); + + job = malloc(sizeof(*job), M_PFTEMP, M_NOWAIT | M_ZERO); + if (! job) + return (PF_DROP); + + memcpy(&job->pd, pd, sizeof(*pd)); + memcpy(&job->src, &t, sizeof(t)); + job->pd.src = &job->src; + memcpy(&job->dst, pd->dst, sizeof(job->dst)); + job->pd.dst = &job->dst; + job->m = m; + + TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); + break; + } +#endif + case SCTP_ADD_IP_ADDRESS: { + int ret; + struct sctp_asconf_paramhdr ah; + + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), + NULL, NULL, pd->af)) + return (PF_DROP); + + ret = pf_multihome_scan(m, start + off + sizeof(ah), + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif); + if (ret != PF_PASS) + return (ret); + break; + } + default: + break; + } + + off += roundup(ntohs(h.param_length), 4); + } + + return (PF_PASS); +} +int +pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, + struct pfi_kkif *kif) +{ + start += sizeof(struct sctp_init_chunk); + len -= sizeof(struct sctp_init_chunk); + + return (pf_multihome_scan(m, start, len, pd, kif)); +} + +int +pf_multihome_scan_asconf(struct mbuf *m, int start, int len, + struct pf_pdesc *pd, struct pfi_kkif *kif) +{ + start += sizeof(struct sctp_asconf_chunk); + len -= sizeof(struct sctp_asconf_chunk); + + return (pf_multihome_scan(m, start, len, pd, kif)); +} + static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) @@ -7411,6 +7583,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } memset(&pd, 0, sizeof(pd)); + TAILQ_INIT(&pd.sctp_multihome_jobs); if (default_actions != NULL) memcpy(&pd.act, default_actions, sizeof(pd.act)); pd.pf_mtag = pf_find_mtag(m); @@ -7612,6 +7785,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.act.log |= PF_LOG_FORCE; goto done; } + pd.p_len = pd.tot_len - off; + pd.sport = &pd.hdr.sctp.src_port; pd.dport = &pd.hdr.sctp.dest_port; if (pd.hdr.sctp.src_port == 0 || pd.hdr.sctp.dest_port == 0) { @@ -7895,7 +8070,7 @@ done: /* pf_route() returns unlocked. */ if (rt) { pf_route(m0, r, kif->pfik_ifp, s, &pd, inp); - return (action); + goto out; } if (pf_dummynet(&pd, s, r, m0) != 0) { action = PF_DROP; @@ -7909,6 +8084,9 @@ done: if (s) PF_STATE_UNLOCK(s); +out: + pf_sctp_multihome_delayed(&pd, off, kif, s); + return (action); } #endif /* INET */ @@ -7958,6 +8136,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } memset(&pd, 0, sizeof(pd)); + TAILQ_INIT(&pd.sctp_multihome_jobs); if (default_actions != NULL) memcpy(&pd.act, default_actions, sizeof(pd.act)); pd.pf_mtag = pf_find_mtag(m); @@ -8440,7 +8619,7 @@ done: /* pf_route6() returns unlocked. */ if (rt) { pf_route6(m0, r, kif->pfik_ifp, s, &pd, inp); - return (action); + goto out; } if (pf_dummynet(&pd, s, r, m0) != 0) { action = PF_DROP; @@ -8457,8 +8636,11 @@ done: (mtag = m_tag_find(m, PACKET_TAG_PF_REASSEMBLED, NULL)) != NULL) action = pf_refragment6(ifp, m0, mtag, pflags & PFIL_FWD); +out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); + pf_sctp_multihome_delayed(&pd, off, kif, s); + return (action); } #endif /* INET6 */ diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 8f532ad08c46..83b94db87a19 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2021,11 +2021,13 @@ pf_normalize_mss(struct mbuf *m, int off, struct pf_pdesc *pd) } static int -pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) +pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd, + struct pfi_kkif *kif) { struct sctp_chunkhdr ch = { }; int chunk_off = sizeof(struct sctphdr); int chunk_start; + int ret; while (off + chunk_off < pd->tot_len) { if (!pf_pull_hdr(m, off + chunk_off, &ch, sizeof(ch), NULL, @@ -2040,7 +2042,8 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) chunk_off += roundup(ntohs(ch.chunk_length), 4); switch (ch.chunk_type) { - case SCTP_INITIATION: { + case SCTP_INITIATION: + case SCTP_INITIATION_ACK: { struct sctp_init_chunk init; if (!pf_pull_hdr(m, off + chunk_start, &init, @@ -2064,17 +2067,24 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) * RFC 9260, Section 3.1, INIT chunks MUST have zero * verification tag. */ - if (pd->hdr.sctp.v_tag != 0) + if (ch.chunk_type == SCTP_INITIATION && + pd->hdr.sctp.v_tag != 0) return (PF_DROP); pd->sctp_initiate_tag = init.init.initiate_tag; - pd->sctp_flags |= PFDESC_SCTP_INIT; + if (ch.chunk_type == SCTP_INITIATION) + pd->sctp_flags |= PFDESC_SCTP_INIT; + else + pd->sctp_flags |= PFDESC_SCTP_INIT_ACK; + + ret = pf_multihome_scan_init(m, off + chunk_start, + ntohs(init.ch.chunk_length), pd, kif); + if (ret != PF_PASS) + return (ret); + break; } - case SCTP_INITIATION_ACK: - pd->sctp_flags |= PFDESC_SCTP_INIT_ACK; - break; case SCTP_ABORT_ASSOCIATION: pd->sctp_flags |= PFDESC_SCTP_ABORT; break; @@ -2092,6 +2102,14 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) case SCTP_DATA: pd->sctp_flags |= PFDESC_SCTP_DATA; break; + case SCTP_ASCONF: + pd->sctp_flags |= PFDESC_SCTP_ASCONF; + + ret = pf_multihome_scan_asconf(m, off + chunk_start, + ntohs(ch.chunk_length), pd, kif); + if (ret != PF_PASS) + return (ret); + break; default: pd->sctp_flags |= PFDESC_SCTP_OTHER; break; @@ -2133,7 +2151,7 @@ pf_normalize_sctp(int dir, struct pfi_kkif *kif, struct mbuf *m, int ipoff, /* Unconditionally scan the SCTP packet, because we need to look for * things like shutdown and asconf chunks. */ - if (pf_scan_sctp(m, ipoff, off, pd) != PF_PASS) + if (pf_scan_sctp(m, ipoff, off, pd, kif) != PF_PASS) goto sctp_drop; r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_SCRUB].active.ptr); From nobody Mon Oct 2 09:33:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNg5QQ7z4vrK2; Mon, 2 Oct 2023 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNg4h9cz4SZF; Mon, 2 Oct 2023 09: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=1696239203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQZr5Y3VMqejz8g73/Z80qaNb3nuUQzgRbGfpjuFxQ8=; b=SfnT8EGSBnotz25V2Ol33M3NjWBY8yh5f764MeHaZoL1CbztW9mZOfE7SEDJrh1/lWZmv7 AmnuvOgXumz2W4CDWB+ukO3rqu0z51U0q4vvaXbfQi18jCAczGYD/ZYt0r22HvG1G3UFDz 4oNl+xr/f6j1qe0BfEdwy3dtcZYVQcV2/cGAUuVggVQ91UC2T8ECQSfmXv4/lcPsHB5A9D 3CeUs18Yv4QAMepkDMN48edLgKw75kYv6fHd7Bo14gg2FWcPNDEqkz2MAqZMj4ZIXPChDc Jhn7PuOLF6SnRHNkb0wlrFOl7UMlbS+Z4H4zdPTDp7ZJFGPXiaTHsJ03+f1W9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239203; a=rsa-sha256; cv=none; b=iE7HwO3gVxcUrXY58uy7BpC0ok1BtaGH2ffzwJYN559Pp0Pu8LFz40TPzqR5CGZsArb9W7 GTwDIhACh1WKh9L4ehSBEUII4KWDNxGeymsgJpETi0h1dMPC7iCpzLewnntKlzAddDZqqJ xmy9+c/xY4XYA9GAjHOa4vDGMhzudqvw6OgDiIskd8YNXmvMI0pa1XySWPBvntN9t8c0Xc HXOsEVRpJ1r+0xKpI9oq2wr3OknR63DOJzJ/zP3d3rIDsxEOCPDLrJuaZtmCdSDSSVqNOO VvwTm3CxUXgV89hw9lJLp2vkq9x9yXqtlOnd4b40EYQXK8uVjCp2K7KmPuAGvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQZr5Y3VMqejz8g73/Z80qaNb3nuUQzgRbGfpjuFxQ8=; b=KyioNCtCWkxGvk4K5ZeQJS1uHpAA+8Fe4E9LIMI9LzfFT4itRsOdGmNw2TxXPqF+4Uw8DG A5YjlbXH58AkbneIszKmnNRGvUIHAmqsVEpMlqnCwT55fRJcofSZo1w4hR+p9cQ9YhtRH5 fnSZJdPe/t0M53SvB/a01MnW/O37JqycK6l74iYU9u2guDg8h1WeXgDZT6MIOGazOzmPed OFITf/p3NS5TxXaBFsUTKUFznVYJXGeyuPwC03l1Aby2HdIac3TBjuOm1q/+sm+izYjoQ6 Q0LXRaN/YW/JDEqgBo4Lzyj4gZ4DbYlsSBeSHZwTQzaZDhwcw5E9R1zwRuYSCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNg3m3Rz16YW; Mon, 2 Oct 2023 09:33:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XNZg002728; Mon, 2 Oct 2023 09:33:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XNvK002713; Mon, 2 Oct 2023 09:33:23 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:23 GMT Message-Id: <202310020933.3929XNvK002713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2537ad522d85 - stable/14 - pf tests: basic SCTP multihoming test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2537ad522d85be44cfe3d61a1fc873bebe0fef28 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2537ad522d85be44cfe3d61a1fc873bebe0fef28 commit 2537ad522d85be44cfe3d61a1fc873bebe0fef28 Author: Kristof Provost AuthorDate: 2023-08-02 08:44:52 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf tests: basic SCTP multihoming test The SCTP server will announce multiple addresses. Block one of them with pf, connect to the other have the client use the blocked address. pf is expected to have created state for all of the addresses announced by the server. In a separate test case add the secondary (client) IP after the connection has been established. The intent is to verify the functionality of the ASCONF chunk parsing. MFC after: 3 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D41638 (cherry picked from commit 1a28d5fea7edf200c37d14f7ed5865910664ec3d) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/sctp.py | 442 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 443 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 70c0c300d7ad..44fe95680dfb 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -40,6 +40,7 @@ ATF_TESTS_SH+= altq \ tos ATF_TESTS_PYTEST+= frag6.py +ATF_TESTS_PYTEST+= sctp.py # Tests reuse jail names and so cannot run in parallel. TEST_METADATA+= is_exclusive=true diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py new file mode 100644 index 000000000000..b24d0c414ac8 --- /dev/null +++ b/tests/sys/netpfil/pf/sctp.py @@ -0,0 +1,442 @@ +import pytest +import ctypes +import socket +import ipaddress +import re +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +import time + +SCTP_UNORDERED = 0x0400 + +SCTP_NODELAY = 0x00000004 +SCTP_SET_PEER_PRIMARY_ADDR = 0x00000006 +SCTP_PRIMARY_ADDR = 0x00000007 + +SCTP_BINDX_ADD_ADDR = 0x00008001 +SCTP_BINDX_REM_ADDR = 0x00008002 + +class sockaddr_in(ctypes.Structure): + _fields_ = [ + ('sin_len', ctypes.c_uint8), + ('sin_family', ctypes.c_uint8), + ('sin_port', ctypes.c_uint16), + ('sin_addr', ctypes.c_uint32), + ('sin_zero', ctypes.c_int8 * 8) + ] + +class sockaddr_in6(ctypes.Structure): + _fields_ = [ + ('sin6_len', ctypes.c_uint8), + ('sin6_family', ctypes.c_uint8), + ('sin6_port', ctypes.c_uint16), + ('sin6_flowinfo', ctypes.c_uint32), + ('sin6_addr', ctypes.c_uint8 * 16), + ('sin6_scope_id', ctypes.c_uint32) + ] + +class sockaddr_storage(ctypes.Union): + _fields_ = [ + ("v4", sockaddr_in), + ("v6", sockaddr_in6) + ] + +class sctp_sndrcvinfo(ctypes.Structure): + _fields_ = [ + ('sinfo_stream', ctypes.c_uint16), + ('sinfo_ssn', ctypes.c_uint16), + ('sinfo_flags', ctypes.c_uint16), + ('sinfo_ppid', ctypes.c_uint32), + ('sinfo_context', ctypes.c_uint32), + ('sinfo_timetolive', ctypes.c_uint32), + ('sinfo_tsn', ctypes.c_uint32), + ('sinfo_cumtsn', ctypes.c_uint32), + ('sinfo_assoc_id', ctypes.c_uint32), + ] + +class sctp_setprim(ctypes.Structure): + _fields_ = [ + ('ssp_addr', sockaddr_storage), + ('ssp_pad', ctypes.c_int8 * (128 - 16)), + ('ssp_assoc_id', ctypes.c_uint32), + ('ssp_padding', ctypes.c_uint32) + ] + +def to_sockaddr(ip, port): + ip = ipaddress.ip_address(ip) + + if ip.version == 4: + addr = sockaddr_in() + addr.sin_len = ctypes.sizeof(addr) + addr.sin_family = socket.AF_INET + addr.sin_port = socket.htons(port) + addr.sin_addr = socket.htonl(int.from_bytes(ip.packed, byteorder='big')) + else: + assert ip.version == 6 + + addr = sockaddr_in6() + addr.sin6_len = ctypes.sizeof(addr) + addr.sin6_family = socket.AF_INET6 + addr.sin6_port = socket.htons(port) + for i in range(0, 16): + addr.sin6_addr[i] = ip.packed[i] + + return addr + +class SCTPServer: + def __init__(self, family, port=1234): + self._libc = ctypes.CDLL("libc.so.7", use_errno=True) + + self._listen_fd = self._libc.socket(family, socket.SOCK_STREAM, socket.IPPROTO_SCTP) + if self._listen_fd == -1: + raise Exception("Failed to create socket") + + if family == socket.AF_INET: + srvaddr = sockaddr_in() + srvaddr.sin_len = ctypes.sizeof(srvaddr) + srvaddr.sin_family = socket.AF_INET + srvaddr.sin_port = socket.htons(port) + srvaddr.sin_addr = socket.INADDR_ANY + else: + srvaddr = sockaddr_in6() + srvaddr.sin6_len = ctypes.sizeof(srvaddr) + srvaddr.sin6_family = family + srvaddr.sin6_port = socket.htons(port) + # Leave sin_addr empty, because ANY is zero + + ret = self._libc.bind(self._listen_fd, ctypes.pointer(srvaddr), + ctypes.sizeof(srvaddr)) + if ret == -1: + raise Exception("Failed to bind: %d" % ctypes.get_errno()) + + ret = self._libc.listen(self._listen_fd, 2) + if ret == -1: + raise Exception("Failed to listen") + + def _to_string(self, buf): + return ''.join([chr(int.from_bytes(i, byteorder='big')) for i in buf]).rstrip('\x00') + + def accept(self, vnet): + fd = self._libc.accept(self._listen_fd, 0, 0) + if fd < 0: + raise Exception("Failed to accept") + + print("SCTPServer: connection opened") + while True: + rcvinfo = sctp_sndrcvinfo() + flags = ctypes.c_int() + buf = ctypes.create_string_buffer(128) + + # Receive a single message, and inform the other vnet about it. + ret = self._libc.sctp_recvmsg(fd, ctypes.cast(buf, ctypes.c_void_p), 128, + 0, 0, ctypes.pointer(rcvinfo), ctypes.pointer(flags)) + if ret < 0: + print("SCTPServer: connection closed") + return + if ret == 0: + continue + + rcvd = {} + rcvd['ppid'] = socket.ntohl(rcvinfo.sinfo_ppid) + rcvd['data'] = self._to_string(buf) + rcvd['len'] = ret + print(rcvd) + vnet.pipe.send(rcvd) + +class SCTPClient: + def __init__(self, ip, port=1234, fromaddr=None): + self._libc = ctypes.CDLL("libc.so.7", use_errno=True) + + if ipaddress.ip_address(ip).version == 4: + family = socket.AF_INET + else: + family = socket.AF_INET6 + + self._fd = self._libc.socket(family, socket.SOCK_STREAM, + socket.IPPROTO_SCTP) + if self._fd == -1: + raise Exception("Failed to open socket") + + if fromaddr is not None: + addr = to_sockaddr(fromaddr, 0) + + ret = self._libc.bind(self._fd, ctypes.pointer(addr), ctypes.sizeof(addr)) + if ret != 0: + print("bind() => %d", ctypes.get_errno()) + raise + + addr = to_sockaddr(ip, port) + ret = self._libc.connect(self._fd, ctypes.pointer(addr), ctypes.sizeof(addr)) + if ret == -1: + raise Exception("Failed to connect") + + # Enable NODELAY, because otherwise the sending host may wait for SACK + # on a data chunk we've removed + enable = ctypes.c_int(1) + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_NODELAY, ctypes.pointer(enable), 4) + + def newpeer(self, addr): + print("newpeer(%s)" % (addr)) + + setp = sctp_setprim() + a = to_sockaddr(addr, 0) + if type(a) is sockaddr_in: + setp.ssp_addr.v4 = a + else: + assert type(a) is sockaddr_in6 + setp.ssp_addr.v6 = a + + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_PRIMARY_ADDR, ctypes.pointer(setp), ctypes.sizeof(setp)) + if ret != 0: + print("errno %d" % ctypes.get_errno()) + raise Exception(ctypes.get_errno()) + + def newprimary(self, addr): + print("newprimary(%s)" % (addr)) + + # Strictly speaking needs to be struct sctp_setpeerprim, but that's + # identical to sctp_setprim + setp = sctp_setprim() + a = to_sockaddr(addr, 0) + if type(a) is sockaddr_in: + setp.ssp_addr.v4 = a + else: + assert type(a) is sockaddr_in6 + setp.ssp_addr.v6 = a + + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_SET_PEER_PRIMARY_ADDR, ctypes.pointer(setp), ctypes.sizeof(setp)) + if ret != 0: + print("errno %d" % ctypes.get_errno()) + raise + + def bindx(self, addr, add): + print("bindx(%s, %s)" % (addr, add)) + + addr = to_sockaddr(addr, 0) + + if add: + flag = SCTP_BINDX_ADD_ADDR + else: + flag = SCTP_BINDX_REM_ADDR + ret = self._libc.sctp_bindx(self._fd, ctypes.pointer(addr), 1, flag) + if ret != 0: + print("sctp_bindx() errno %d" % ctypes.get_errno()) + raise + + def send(self, buf, ppid, ordered=False): + flags = 0 + + if not ordered: + flags = SCTP_UNORDERED + + ppid = socket.htonl(ppid) + ret = self._libc.sctp_sendmsg(self._fd, ctypes.c_char_p(buf), len(buf), + ctypes.c_void_p(0), 0, ppid, flags, 0, 0, 0) + if ret < 0: + raise Exception("Failed to send message") + + def close(self): + self._libc.close(self._fd) + self._fd = -1 + +class TestSCTP(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + } + + def vnet2_handler(self, vnet): + # Give ourself a second IP address, for multihome testing + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s inet alias 192.0.2.3/24" % ifname) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + def test_multihome(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet proto sctp to 192.0.2.0/24"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + try: + client.newpeer("192.0.2.2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss") + ToolsHelper.print_output("/sbin/pfctl -sr -vv") + + # Check that we have a state for 192.0.2.3 and 192.0.2.2 to 192.0.2.1 + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.2:1234", states) + + @pytest.mark.require_user("root") + def test_multihome_asconf(self): + srv_vnet = self.vnet_map["vnet2"] + + # Assign a second IP to ourselves + ToolsHelper.print_output("/sbin/ifconfig %s inet alias 192.0.2.10/24" + % self.vnet.iface_alias_map["if1"].name) + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet proto sctp from 192.0.2.0/24"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234, "192.0.2.1") + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now add our second address to the connection + client.bindx("192.0.2.10", True) + + # We can still communicate + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + + # Now change to a different peer address + try: + client.newprimary("192.0.2.10") + client.send(b"!", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "!" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Ensure we have the states we'd expect + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r"all sctp 192.0.2.10:.*192.0.2.3:1234", states) + +class TestSCTPv6(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes6": [("2001:db8::1/64", "2001:db8::2/64")]}, + } + + def vnet2_handler(self, vnet): + # Give ourself a second IP address, for multihome testing + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s inet6 alias 2001:db8::3/64" % ifname) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET6, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + def test_multihome(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet6 proto sctp to 2001:db8::0/64"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("2001:db8::3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now change to a different peer address + try: + client.newpeer("2001:db8::2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Check that we have the expected states + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::2\[1234\]", states) + + @pytest.mark.require_user("root") + def test_multihome_asconf(self): + srv_vnet = self.vnet_map["vnet2"] + + # Assign a second IP to ourselves + ToolsHelper.print_output("/sbin/ifconfig %s inet6 alias 2001:db8::10/64" + % self.vnet.iface_alias_map["if1"].name) + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet6 proto sctp from 2001:db8::/64"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("2001:db8::3", 1234, "2001:db8::1") + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now add our second address to the connection + client.bindx("2001:db8::10", True) + + # We can still communicate + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + + # Now change to a different peer address + try: + client.newprimary("2001:db8::10") + client.send(b"!", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "!" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Check that we have the expected states + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) + assert re.search(r"all sctp 2001:db8::10\[.*2001:db8::3\[1234\]", states) From nobody Mon Oct 2 09:33:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNh0NDQz4vrcN; Mon, 2 Oct 2023 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNg62whz4SZM; Mon, 2 Oct 2023 09: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=1696239203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ/Lv+ndT5Ocv8/2H3DQS6s5VxFl92j2cHu+SubfDxw=; b=MtGyxAOuruyztIEPhj1c7xEUPGCXzqwfrTMSTrFfmmYGAet5E5pKZ/IS3VACBcw+9fpAok T4L6O0YLSxJebl4Qw2CC76TADoMvqTVaiclGDqpcEMZCslNQHMZnAruR4pNbxf7vgidX0z ZmONyjwgnmbacFXBoRTZk1vzpy84BQRf103bOhzElrKNjQN+VCuPw4W1ElObfn4f9wIZ6M szXKeNLfiUX4Yz+3bZvx0+kDmFmbjR+bSk6J/TZBSa7Vkcx9dSp6QPQaPf8v1fj6u5Xiue JX9Wi9WSzNwlZRawTltW35rtgzzKkj+8aDO/LCs5Arn4//vxBCJ9v3qQidSQRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239203; a=rsa-sha256; cv=none; b=d7KpnLDVxRDh+MHcQyDoRsIl69eMmlJiLG9jPHIAN7ZmNtzkeu6tyizNhzEaxGgMkbT9kk 20MouKEIsZRZHyrMQud08b3yU9vw4M4TfIIm9HJQJLSNjeaPX2n/u52YWxa9eXGMFDlwGL IysjjPmXXVSIEE7Ye14eZCBcH+Smfb/kLNTrvkw72X7giAITxI4X27FGOnhHiAGoq4wc/+ ISuNADfWiXgHLyAhQzzIDUXqnYijhHLcTwcoy/2aicCKXDeLwbIv1dIWUDDyCUlo1+PPdC SZyJPyjr4roOApqpnbPawPZ8hG4gRqS15boktQzaOY5NPMWnm9BRnvG1ae51QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQ/Lv+ndT5Ocv8/2H3DQS6s5VxFl92j2cHu+SubfDxw=; b=Ra679D4lYDS94Pz5Zh1O5T4AGkbeZmbvYxqjdqvXjXJNoxGgXbZaWdSv1kJJFkpfl8mg1L im7sMVEsgSG5BomYMnHukQ1UPMJQljpfytwNYAQzbuaL9SBSwLTazb5Nt8r3xsB7adC10M zuNKuF8j4wtb/C2vhv10qnSRCGARLW1UF9Fw/kTiZqvqCRhW9vWEvz6kEvCousQTDu5cns bXwovcgd5ikyoNOiedSQAqeTTRg0cHbewBPXzGMFw+EGqd+DKJnLugL2cTyjndLOP6SxxP uwO4gg2jHFKbQCJgkBJW34A3EPhpZsxEhvuSCdLwo1m8AGIMmhewsk7ZZl78HA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNg4kLhz16YX; Mon, 2 Oct 2023 09:33:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XNLS002814; Mon, 2 Oct 2023 09:33:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XNP0002811; Mon, 2 Oct 2023 09:33:23 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:23 GMT Message-Id: <202310020933.3929XNP0002811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 41cc99739ee6 - stable/13 - pf: support SCTP multihoming List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41cc99739ee635b7a6952ee45e1b7c9d995077aa Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=41cc99739ee635b7a6952ee45e1b7c9d995077aa commit 41cc99739ee635b7a6952ee45e1b7c9d995077aa Author: Kristof Provost AuthorDate: 2023-08-02 17:05:00 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:43 +0000 pf: support SCTP multihoming SCTP may announce additional IP addresses it'll use in the INIT/INIT_ACK chunks, or in ASCONF chunks at any time during the connection. Parse these parameters, evaluate the ruleset for the new connection and if allowed create the corresponding states. MFC after: 3 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D41637 (cherry picked from commit 10aa9ddb4d45ab0c8f56b0e91c7e8de213030c0f) --- sys/net/pfvar.h | 22 ++- sys/netpfil/pf/pf.c | 347 ++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_norm.c | 34 +++-- 3 files changed, 312 insertions(+), 91 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 4043bb8e0e54..07a4140e450f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1280,6 +1280,9 @@ struct pfi_kkif { #define PFI_IFLAG_SKIP 0x0100 /* skip filtering on interface */ #ifdef _KERNEL +struct pf_sctp_multihome_job; +TAILQ_HEAD(pf_sctp_multihome_jobs, pf_sctp_multihome_job); + struct pf_pdesc { struct { int done; @@ -1327,10 +1330,22 @@ struct pf_pdesc { #define PFDESC_SCTP_SHUTDOWN 0x0010 #define PFDESC_SCTP_SHUTDOWN_COMPLETE 0x0020 #define PFDESC_SCTP_DATA 0x0040 -#define PFDESC_SCTP_OTHER 0x0080 +#define PFDESC_SCTP_ASCONF 0x0080 +#define PFDESC_SCTP_OTHER 0x0100 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; + + struct pf_sctp_multihome_jobs sctp_multihome_jobs; +}; + +struct pf_sctp_multihome_job { + TAILQ_ENTRY(pf_sctp_multihome_job) next; + struct pf_pdesc pd; + struct pf_addr src; + struct pf_addr dst; + struct mbuf *m; }; + #endif /* flags for RDR options */ @@ -1996,6 +2011,11 @@ void pf_addr_inc(struct pf_addr *, sa_family_t); int pf_refragment6(struct ifnet *, struct mbuf **, struct m_tag *); #endif /* INET6 */ +int pf_multihome_scan_init(struct mbuf *, int, int, struct pf_pdesc *, + struct pfi_kkif *); +int pf_multihome_scan_asconf(struct mbuf *, int, int, struct pf_pdesc *, + struct pfi_kkif *); + u_int32_t pf_new_isn(struct pf_kstate *); void *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *, sa_family_t); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 51f81172bad2..cb4ab2da4633 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -118,6 +118,8 @@ SDT_PROBE_DEFINE4(pf, ip, test6, done, "int", "int", "struct pf_krule *", SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_state_key_cmp *", "int", "struct pf_pdesc *", "struct pf_kstate *"); +SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", + "struct pf_krule *", "struct mbuf *", "int"); /* * Global variables @@ -288,6 +290,8 @@ static int pf_test_state_udp(struct pf_kstate **, int, static int pf_test_state_icmp(struct pf_kstate **, int, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); +static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, + struct pfi_kkif *, struct pf_kstate *); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5253,6 +5257,255 @@ pf_test_state_udp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, return (PF_PASS); } +static int +pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, + struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) +{ + struct pf_state_key_cmp key; + struct pf_state_peer *src; //, *dst; + struct sctphdr *sh = &pd->hdr.sctp; + u_int8_t psrc; //, pdst; + + bzero(&key, sizeof(key)); + key.af = pd->af; + key.proto = IPPROTO_SCTP; + if (pd->dir == PF_IN) { /* wire side, straight */ + PF_ACPY(&key.addr[0], pd->src, key.af); + PF_ACPY(&key.addr[1], pd->dst, key.af); + key.port[0] = sh->src_port; + key.port[1] = sh->dest_port; + } else { /* stack side, reverse */ + PF_ACPY(&key.addr[1], pd->src, key.af); + PF_ACPY(&key.addr[0], pd->dst, key.af); + key.port[1] = sh->src_port; + key.port[0] = sh->dest_port; + } + + STATE_LOOKUP(kif, &key, pd->dir, *state, pd); + + if (pd->dir == (*state)->direction) { + src = &(*state)->src; + psrc = PF_PEER_SRC; + } else { + src = &(*state)->dst; + psrc = PF_PEER_DST; + } + + /* Track state. */ + if (pd->sctp_flags & PFDESC_SCTP_INIT) { + if (src->state < SCTP_COOKIE_WAIT) { + pf_set_protostate(*state, psrc, SCTP_COOKIE_WAIT); + (*state)->timeout = PFTM_TCP_OPENING; + } + } + if (pd->sctp_flags & PFDESC_SCTP_COOKIE) { + if (src->state < SCTP_ESTABLISHED) { + pf_set_protostate(*state, psrc, SCTP_ESTABLISHED); + (*state)->timeout = PFTM_TCP_ESTABLISHED; + } + } + if (pd->sctp_flags & (PFDESC_SCTP_SHUTDOWN | PFDESC_SCTP_ABORT | + PFDESC_SCTP_SHUTDOWN_COMPLETE)) { + if (src->state < SCTP_SHUTDOWN_PENDING) { + pf_set_protostate(*state, psrc, SCTP_SHUTDOWN_PENDING); + (*state)->timeout = PFTM_TCP_CLOSING; + } + } + + (*state)->expire = time_uptime; + + /* translate source/destination address, if necessary */ + if ((*state)->key[PF_SK_WIRE] != (*state)->key[PF_SK_STACK]) { + uint16_t checksum = 0; + struct pf_state_key *nk = (*state)->key[pd->didx]; + + if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || + nk->port[pd->sidx] != pd->hdr.sctp.src_port) { + pf_change_ap(m, pd->src, &pd->hdr.sctp.src_port, + pd->ip_sum, &checksum, &nk->addr[pd->sidx], + nk->port[pd->sidx], 1, pd->af); + } + + if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || + nk->port[pd->didx] != pd->hdr.sctp.dest_port) { + pf_change_ap(m, pd->dst, &pd->hdr.sctp.dest_port, + pd->ip_sum, &checksum, &nk->addr[pd->didx], + nk->port[pd->didx], 1, pd->af); + } + } + + return (PF_PASS); +} + +static void +pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, + struct pf_kstate *s) +{ + struct pf_sctp_multihome_job *j, *tmp; + int action;; + struct pf_kstate *sm = NULL; + struct pf_krule *ra = NULL; + struct pf_krule *r = &V_pf_default_rule; + struct pf_kruleset *rs = NULL; + + PF_RULES_RLOCK_TRACKER; + + TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + PF_RULES_RLOCK(); + action = pf_test_rule(&r, &sm, pd->dir, kif, + j->m, off, &j->pd, &ra, &rs, NULL); + PF_RULES_RUNLOCK(); + SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); + if (sm) + PF_STATE_UNLOCK(sm); + + free(j, M_PFTEMP); + } +} + +static int +pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, + struct pfi_kkif *kif) +{ + int off = 0; + struct pf_sctp_multihome_job *job; + + while (off < len) { + struct sctp_paramhdr h; + + if (!pf_pull_hdr(m, start + off, &h, sizeof(h), NULL, NULL, + pd->af)) + return (PF_DROP); + + /* Parameters are at least 4 bytes. */ + if (ntohs(h.param_length) < 4) + return (PF_DROP); + + switch (ntohs(h.param_type)) { + case SCTP_IPV4_ADDRESS: { + struct in_addr t; + + if (ntohs(h.param_length) != + (sizeof(struct sctp_paramhdr) + sizeof(t))) + return (PF_DROP); + + if (!pf_pull_hdr(m, start + off + sizeof(h), &t, sizeof(t), + NULL, NULL, pd->af)) + return (PF_DROP); + + /* + * Avoid duplicating states. We'll already have + * created a state based on the source address of + * the packet, but SCTP endpoints may also list this + * address again in the INIT(_ACK) parameters. + */ + if (t.s_addr == pd->src->v4.s_addr) + break; + + if (in_nullhost(t)) + t.s_addr = pd->src->v4.s_addr; + + /* + * We hold the state lock (idhash) here, which means + * that we can't acquire the keyhash, or we'll get a + * LOR (and potentially double-lock things too). We also + * can't release the state lock here, so instead we'll + * enqueue this for async handling. + * There's a relatively small race here, in that a + * packet using the new addresses could arrive already, + * but that's just though luck for it. + */ + job = malloc(sizeof(*job), M_PFTEMP, M_NOWAIT | M_ZERO); + if (! job) + return (PF_DROP); + + memcpy(&job->pd, pd, sizeof(*pd)); + + // New source address! + memcpy(&job->src, &t, sizeof(t)); + job->pd.src = &job->src; + memcpy(&job->dst, pd->dst, sizeof(job->dst)); + job->pd.dst = &job->dst; + job->m = m; + + TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); + break; + } +#ifdef INET6 + case SCTP_IPV6_ADDRESS: { + struct in6_addr t; + + if (ntohs(h.param_length) != + (sizeof(struct sctp_paramhdr) + sizeof(t))) + return (PF_DROP); + + if (!pf_pull_hdr(m, start + off + sizeof(h), &t, sizeof(t), + NULL, NULL, pd->af)) + return (PF_DROP); + if (memcmp(&t, &pd->src->v6, sizeof(t)) == 0) + break; + if (memcmp(&t, &in6addr_any, sizeof(t)) == 0) + memcpy(&t, &pd->src->v6, sizeof(t)); + + job = malloc(sizeof(*job), M_PFTEMP, M_NOWAIT | M_ZERO); + if (! job) + return (PF_DROP); + + memcpy(&job->pd, pd, sizeof(*pd)); + memcpy(&job->src, &t, sizeof(t)); + job->pd.src = &job->src; + memcpy(&job->dst, pd->dst, sizeof(job->dst)); + job->pd.dst = &job->dst; + job->m = m; + + TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); + break; + } +#endif + case SCTP_ADD_IP_ADDRESS: { + int ret; + struct sctp_asconf_paramhdr ah; + + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), + NULL, NULL, pd->af)) + return (PF_DROP); + + ret = pf_multihome_scan(m, start + off + sizeof(ah), + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif); + if (ret != PF_PASS) + return (ret); + break; + } + default: + break; + } + + off += roundup(ntohs(h.param_length), 4); + } + + return (PF_PASS); +} + +int +pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, + struct pfi_kkif *kif) +{ + start += sizeof(struct sctp_init_chunk); + len -= sizeof(struct sctp_init_chunk); + + return (pf_multihome_scan(m, start, len, pd, kif)); +} + +int +pf_multihome_scan_asconf(struct mbuf *m, int start, int len, + struct pf_pdesc *pd, struct pfi_kkif *kif) +{ + start += sizeof(struct sctp_asconf_chunk); + len -= sizeof(struct sctp_asconf_chunk); + + return (pf_multihome_scan(m, start, len, pd, kif)); +} + static int pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) @@ -5857,86 +6110,6 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif } } -static int -pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) -{ - struct pf_state_key_cmp key; - struct pf_state_peer *src; //, *dst; - struct sctphdr *sh = &pd->hdr.sctp; - u_int8_t psrc; //, pdst; - - bzero(&key, sizeof(key)); - key.af = pd->af; - key.proto = IPPROTO_SCTP; - if (pd->dir == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - key.port[0] = sh->src_port; - key.port[1] = sh->dest_port; - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); - key.port[1] = sh->src_port; - key.port[0] = sh->dest_port; - } - - STATE_LOOKUP(kif, &key, pd->dir, *state, pd); - - if (pd->dir == (*state)->direction) { - src = &(*state)->src; - psrc = PF_PEER_SRC; - } else { - src = &(*state)->dst; - psrc = PF_PEER_DST; - } - - /* Track state. */ - if (pd->sctp_flags & PFDESC_SCTP_INIT) { - if (src->state < SCTP_COOKIE_WAIT) { - pf_set_protostate(*state, psrc, SCTP_COOKIE_WAIT); - (*state)->timeout = PFTM_TCP_OPENING; - } - } - if (pd->sctp_flags & PFDESC_SCTP_COOKIE) { - if (src->state < SCTP_ESTABLISHED) { - pf_set_protostate(*state, psrc, SCTP_ESTABLISHED); - (*state)->timeout = PFTM_TCP_ESTABLISHED; - } - } - if (pd->sctp_flags & (PFDESC_SCTP_SHUTDOWN | PFDESC_SCTP_ABORT | - PFDESC_SCTP_SHUTDOWN_COMPLETE)) { - if (src->state < SCTP_SHUTDOWN_PENDING) { - pf_set_protostate(*state, psrc, SCTP_SHUTDOWN_PENDING); - (*state)->timeout = PFTM_TCP_CLOSING; - } - } - - (*state)->expire = time_uptime; - - /* translate source/destination address, if necessary */ - if ((*state)->key[PF_SK_WIRE] != (*state)->key[PF_SK_STACK]) { - uint16_t checksum = 0; - struct pf_state_key *nk = (*state)->key[pd->didx]; - - if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || - nk->port[pd->sidx] != pd->hdr.sctp.src_port) { - pf_change_ap(m, pd->src, &pd->hdr.sctp.src_port, - pd->ip_sum, &checksum, &nk->addr[pd->sidx], - nk->port[pd->sidx], 1, pd->af); - } - - if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || - nk->port[pd->didx] != pd->hdr.sctp.dest_port) { - pf_change_ap(m, pd->dst, &pd->hdr.sctp.dest_port, - pd->ip_sum, &checksum, &nk->addr[pd->didx], - nk->port[pd->didx], 1, pd->af); - } - } - - return (PF_PASS); -} - static int pf_test_state_other(struct pf_kstate **state, int direction, struct pfi_kkif *kif, struct mbuf *m, struct pf_pdesc *pd) @@ -6632,6 +6805,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * if (m->m_flags & M_SKIP_FIREWALL) return (PF_PASS); + TAILQ_INIT(&pd.sctp_multihome_jobs); pd.pf_mtag = pf_find_mtag(m); PF_RULES_RLOCK(); @@ -6793,6 +6967,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * log = action != PF_PASS; goto done; } + pd.p_len = pd.tot_len - off; + pd.sport = &pd.hdr.sctp.src_port; pd.dport = &pd.hdr.sctp.dest_port; if (pd.hdr.sctp.src_port == 0 || pd.hdr.sctp.dest_port == 0) { @@ -7054,7 +7230,7 @@ done: /* pf_route() returns unlocked. */ if (r->rt) { pf_route(m0, r, dir, kif->pfik_ifp, s, &pd, inp); - return (action); + goto out; } break; } @@ -7064,6 +7240,9 @@ done: if (s) PF_STATE_UNLOCK(s); +out: + pf_sctp_multihome_delayed(&pd, off, kif, s); + return (action); } #endif /* INET */ @@ -7091,6 +7270,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb return (PF_PASS); memset(&pd, 0, sizeof(pd)); + TAILQ_INIT(&pd.sctp_multihome_jobs); pd.pf_mtag = pf_find_mtag(m); if (pd.pf_mtag && pd.pf_mtag->flags & PF_TAG_GENERATED) @@ -7535,7 +7715,7 @@ done: /* pf_route6() returns unlocked. */ if (r->rt) { pf_route6(m0, r, dir, kif->pfik_ifp, s, &pd, inp); - return (action); + goto out; } break; } @@ -7548,8 +7728,11 @@ done: (mtag = m_tag_find(m, PF_REASSEMBLED, NULL)) != NULL) action = pf_refragment6(ifp, m0, mtag); +out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); + pf_sctp_multihome_delayed(&pd, off, kif, s); + return (action); } #endif /* INET6 */ diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 7e8baf451891..ec3f63c9f262 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1989,11 +1989,13 @@ pf_normalize_tcpopt(struct pf_krule *r, struct mbuf *m, struct tcphdr *th, } static int -pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) +pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd, + struct pfi_kkif *kif) { struct sctp_chunkhdr ch = { }; int chunk_off = sizeof(struct sctphdr); int chunk_start; + int ret; while (off + chunk_off < pd->tot_len) { if (!pf_pull_hdr(m, off + chunk_off, &ch, sizeof(ch), NULL, @@ -2008,7 +2010,8 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) chunk_off += roundup(ntohs(ch.chunk_length), 4); switch (ch.chunk_type) { - case SCTP_INITIATION: { + case SCTP_INITIATION: + case SCTP_INITIATION_ACK: { struct sctp_init_chunk init; if (!pf_pull_hdr(m, off + chunk_start, &init, @@ -2032,17 +2035,24 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) * RFC 9260, Section 3.1, INIT chunks MUST have zero * verification tag. */ - if (pd->hdr.sctp.v_tag != 0) + if (ch.chunk_type == SCTP_INITIATION && + pd->hdr.sctp.v_tag != 0) return (PF_DROP); pd->sctp_initiate_tag = init.init.initiate_tag; - pd->sctp_flags |= PFDESC_SCTP_INIT; + if (ch.chunk_type == SCTP_INITIATION) + pd->sctp_flags |= PFDESC_SCTP_INIT; + else + pd->sctp_flags |= PFDESC_SCTP_INIT_ACK; + + ret = pf_multihome_scan_init(m, off + chunk_start, + ntohs(init.ch.chunk_length), pd, kif); + if (ret != PF_PASS) + return (ret); + break; } - case SCTP_INITIATION_ACK: - pd->sctp_flags |= PFDESC_SCTP_INIT_ACK; - break; case SCTP_ABORT_ASSOCIATION: pd->sctp_flags |= PFDESC_SCTP_ABORT; break; @@ -2060,6 +2070,14 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd) case SCTP_DATA: pd->sctp_flags |= PFDESC_SCTP_DATA; break; + case SCTP_ASCONF: + pd->sctp_flags |= PFDESC_SCTP_ASCONF; + + ret = pf_multihome_scan_asconf(m, off + chunk_start, + ntohs(ch.chunk_length), pd, kif); + if (ret != PF_PASS) + return (ret); + break; default: pd->sctp_flags |= PFDESC_SCTP_OTHER; break; @@ -2101,7 +2119,7 @@ pf_normalize_sctp(int dir, struct pfi_kkif *kif, struct mbuf *m, int ipoff, /* Unconditionally scan the SCTP packet, because we need to look for * things like shutdown and asconf chunks. */ - if (pf_scan_sctp(m, ipoff, off, pd) != PF_PASS) + if (pf_scan_sctp(m, ipoff, off, pd, kif) != PF_PASS) goto sctp_drop; r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_SCRUB].active.ptr); From nobody Mon Oct 2 09:33:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNh6qlJz4vrN7; Mon, 2 Oct 2023 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNh5Ygqz4Sch; Mon, 2 Oct 2023 09: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=1696239204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIKmixR3TY9b7zaRNgCONT5rP20JLfbJ9t1+p3Hy8NE=; b=kmPK0q7kG9+BoL5buUnTJqg2BqhjrmNQ2GsXacyFiRt1P3VyHwKFnIZwQ0lOVoxwFL6jlg xTzGCkgq3PHEdZ6ivUL3TQZcq8oMSB1XANnWgrpzwn1JlehPlcJ0f8Jh1w/I4EVN+Q0Jna U7NNeOLidxMNfnnjJWlW+eXe8B4bpyHEj0h5kp/cbPC711k1SZpONrEMJTYBeoPFgrjix3 H4yR7wOERRUPZ4rOuH1F+LXjlr9wRsws4+O4SEUUv/S5i2nPaDlcH9UlWvZ3QkLaqlpdmU KzytOTTWqdp2831Ds/HrhpLb2fmh1sw+Yb8iE1mV/vE0zaAqpiMvBNeyG5EK0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239204; a=rsa-sha256; cv=none; b=wV8CIjmtudztcD22UkwlelguzLjhNcChZip2fO+nxy/9JEI2H0eVNhzspNCvjc103KW3i9 6b6fae5PPhBk9I+7IPEDAdrjju2h/K492xoz/oSrReODY9LPSqsElpqEz0jVGZ2Ptk0t8A Uf9qMnwypqeL6Rr+LYT7/gzF0zINKmqGBgZP4nWyQ2kEQc2ST5JNXuW+kXOR+VPDeTWVft tvEU1kewpCun6WtRCgSiPW/Yufl3d+POG5x9kKCfJ4e1I7KMwPdFSRPKEG9QAxs1oa1UU2 qXj4hixbS8X/K2H5GhZntLcMSTXbJTuAYUBqQ4nNWFWaFeZDxAjxTiv63Sn4FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIKmixR3TY9b7zaRNgCONT5rP20JLfbJ9t1+p3Hy8NE=; b=O7gAhLk/WTyVok52LNhZpIs9EfXSgik+hNvubjJyIACOj1nFUmFXEMQA88T/HxAhnfpRPm gEFb5tDVCIDFlm5/zU4EBjbGYt7cZKhXmYYyOqqaveVH2TpCpQFltyAnbH3hSVrSgvsJWe 9rCuonbrBjRzfPzAzrWArzPR2m1DFvUTkpA7AOtxQHLmkz93wU34Jt9Gc6EhQ8gzjry9OE i11iz6VLlvo2FscECd0YmhzQw1+16O2TbDJ5dw3+TKxMsZOC8hh37ewNwV9KsA2m8hAoCM A4CUlw1aKFg+ZrhhasUnBuXf1loBVPW8i7XC/tJ8ej8Brc/Vyitoc+RLax041Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNh4dhRz16CB; Mon, 2 Oct 2023 09:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XOxu002856; Mon, 2 Oct 2023 09:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XOVl002853; Mon, 2 Oct 2023 09:33:24 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:24 GMT Message-Id: <202310020933.3929XOVl002853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 48172aad8143 - stable/14 - pf: improve SCTP state validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 48172aad8143d72fa2af363f4b6da0bf1c522789 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=48172aad8143d72fa2af363f4b6da0bf1c522789 commit 48172aad8143d72fa2af363f4b6da0bf1c522789 Author: Kristof Provost AuthorDate: 2023-09-01 11:33:56 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: improve SCTP state validation Only create new states for INIT chunks, or when we're creating a secondary state for a multihomed association. Store and verify verification tag. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 51a78dd2764beabfd19a58b8a8b04387a547f02e) --- sys/net/pfvar.h | 8 +++++++- sys/netpfil/pf/pf.c | 25 +++++++++++++++---------- sys/netpfil/pf/pf_norm.c | 17 +++++++++++++++++ 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index ec72c1079c70..a8567ab74fe3 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -900,7 +900,10 @@ struct pf_state_scrub { #define PFSS_DATA_NOTS 0x0080 /* no timestamp on data packets */ u_int8_t pfss_ttl; /* stashed TTL */ u_int8_t pad; - u_int32_t pfss_ts_mod; /* timestamp modulation */ + union { + u_int32_t pfss_ts_mod; /* timestamp modulation */ + u_int32_t pfss_v_tag; /* SCTP verification tag */ + }; }; struct pf_state_host { @@ -1583,6 +1586,7 @@ struct pf_pdesc { #define PFDESC_SCTP_DATA 0x0040 #define PFDESC_SCTP_ASCONF 0x0080 #define PFDESC_SCTP_OTHER 0x0100 +#define PFDESC_SCTP_ADD_IP 0x0200 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; @@ -2301,6 +2305,8 @@ int pf_normalize_tcp_init(struct mbuf *, int, struct pf_pdesc *, int pf_normalize_tcp_stateful(struct mbuf *, int, struct pf_pdesc *, u_short *, struct tcphdr *, struct pf_kstate *, struct pf_state_peer *, struct pf_state_peer *, int *); +int pf_normalize_sctp_init(struct mbuf *, int, struct pf_pdesc *, + struct pf_state_peer *, struct pf_state_peer *); int pf_normalize_sctp(int, struct pfi_kkif *, struct mbuf *, int, int, void *, struct pf_pdesc *); u_int32_t diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69373b720ad9..8958579b7e63 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4904,11 +4904,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if (s->state_flags & PFSTATE_SCRUB_TCP && pf_normalize_tcp_init(m, off, pd, th, &s->src, &s->dst)) { REASON_SET(&reason, PFRES_MEMORY); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } if (s->state_flags & PFSTATE_SCRUB_TCP && s->src.scrub && pf_normalize_tcp_stateful(m, off, pd, &reason, th, s, @@ -4917,12 +4913,13 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, DPFPRINTF(PF_DEBUG_URGENT, ("pf_normalize_tcp_stateful failed on first " "pkt\n")); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } + } else if (pd->proto == IPPROTO_SCTP) { + if (pf_normalize_sctp_init(m, off, pd, &s->src, &s->dst)) + goto drop; + if (! (pd->sctp_flags & (PFDESC_SCTP_INIT | PFDESC_SCTP_ADD_IP))) + goto drop; } s->direction = pd->dir; @@ -5890,6 +5887,13 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, } } + if (src->scrub != NULL) { + if (src->scrub->pfss_v_tag == 0) { + src->scrub->pfss_v_tag = pd->hdr.sctp.v_tag; + } else if (src->scrub->pfss_v_tag != pd->hdr.sctp.v_tag) + return (PF_DROP); + } + (*state)->expire = time_uptime; /* translate source/destination address, if necessary */ @@ -5930,6 +5934,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { PF_RULES_RLOCK(); + j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; action = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 83b94db87a19..d63cf0ebe54e 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1565,11 +1565,28 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd, void pf_normalize_tcp_cleanup(struct pf_kstate *state) { + /* XXX Note: this also cleans up SCTP. */ uma_zfree(V_pf_state_scrub_z, state->src.scrub); uma_zfree(V_pf_state_scrub_z, state->dst.scrub); /* Someday... flush the TCP segment reassembly descriptors. */ } +int +pf_normalize_sctp_init(struct mbuf *m, int off, struct pf_pdesc *pd, + struct pf_state_peer *src, struct pf_state_peer *dst) +{ + src->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT); + if (src->scrub == NULL) + return (1); + + dst->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT); + if (dst->scrub == NULL) { + uma_zfree(V_pf_state_scrub_z, src); + return (1); + } + + return (0); +} int pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd, From nobody Mon Oct 2 09:33:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNh6n1Bz4vrK8; Mon, 2 Oct 2023 09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNh6C9bz4SRp; Mon, 2 Oct 2023 09: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=1696239204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIq8iSt5fMTZg7YJX0VTcDr6c87u+tQAWviaJKHjZC4=; b=ljKH1md+tt6+mlU6KfxlavxXCUW9Z+lXM2wTm0X7D4IVMnr+z/Q78sstg2ddW9S+e3kY7R t+b9Ofw+GghwanpcZDF4q+cCRp6/iQibiAauKwgMoRSTRiEhgWkrdfCAgpLLT9sZ1ON0Xk H56CdGZ9ZUq4ay/Ox2hnuklYHK2s4uZkXZSHIUeoJzsCbpsXsRzhC3vcLIlwy/A2lwDAz4 X6sXNy+Oyyc/KQ/ikYpCib6ao0BRp7QSwaeGlCwZ58KKV0m0XZwdNDbZCWFVNNxoZLuU+t blspsLHmSR8bLDUWgcRZJBHXZPK3CO6nYTD8QtZf8Ro6zGCj69vhghUD/iIgeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239204; a=rsa-sha256; cv=none; b=Ii36r0tgw87sCgaAf+g65FQPeeyG9CyXflvJLyoHZzZZ5CRAbM0CLuWLW3TjKdtR+KEhiT 110EtU4/rLicSKnN88KKs5snqcwulp8YaOnB+A7fBtI5WsHLQjdUROB+c8k2x4UEN3tbnv 9CxJ1zVHCxpAa4vKgg7SXUcby9RLOCoQivz+EFgC0KPIxv/WkzsPH0/RrYadlPQNowq9Z6 IRsrfMn4C1nqQMAEXJC/FXaHUUUBHSwLm9ZMadvbzmgWmyL0iAesf6EmjBhaAk/bXovmIl aLpF9rC2h1IE3KF2IAH8YtL8e5ORx42pE+ppV+VHu23j/yRkee11ebuKuFkxVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIq8iSt5fMTZg7YJX0VTcDr6c87u+tQAWviaJKHjZC4=; b=HApH4wMORnctvknbnt6kh5pXbpzMrn9DTQsW/3vS+Fhr/m43Q/PDMT63V9kZdUyeDM52Uv H3PD4vfvc4X31FLro2z2Kn8uO5PeNt+wQMwoEUYj7hVsNxy0fDF7CU+SRDm9COzAJmtARb zBOMU76jfzra+pjdCEpnU0Xfpo4jAYSsDvSnSNhjB334XueRWL3oZGfGs7K8msik+2qWBC cQ8nQoGvcinzuYH0N1FNPeromy4V+emIx5U0/GsN9hzAnBp4DcPyHz8H7uGcAlMnZN7WsJ 0302fsmwjuqdkjdDekO32RI4m63vEo/i9LIANNHux8T4Lu6V9MEXe2HDYWMFLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNh5H8Qz16CC; Mon, 2 Oct 2023 09:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XOIR002901; Mon, 2 Oct 2023 09:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XOJW002898; Mon, 2 Oct 2023 09:33:24 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:24 GMT Message-Id: <202310020933.3929XOJW002898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ccb5fbe99c5e - stable/13 - pf tests: basic SCTP multihoming test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ccb5fbe99c5e716dccbaac0cc381847ef48bbfef Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ccb5fbe99c5e716dccbaac0cc381847ef48bbfef commit ccb5fbe99c5e716dccbaac0cc381847ef48bbfef Author: Kristof Provost AuthorDate: 2023-08-02 08:44:52 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:43 +0000 pf tests: basic SCTP multihoming test The SCTP server will announce multiple addresses. Block one of them with pf, connect to the other have the client use the blocked address. pf is expected to have created state for all of the addresses announced by the server. In a separate test case add the secondary (client) IP after the connection has been established. The intent is to verify the functionality of the ASCONF chunk parsing. MFC after: 3 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D41638 (cherry picked from commit 1a28d5fea7edf200c37d14f7ed5865910664ec3d) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/sctp.py | 442 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 443 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 16107f1fb1e7..6b61155ec40a 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -33,6 +33,7 @@ ATF_TESTS_SH+= altq \ tos ATF_TESTS_PYTEST+= frag6.py +ATF_TESTS_PYTEST+= sctp.py # Tests reuse jail names and so cannot run in parallel. TEST_METADATA+= is_exclusive=true diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py new file mode 100644 index 000000000000..b24d0c414ac8 --- /dev/null +++ b/tests/sys/netpfil/pf/sctp.py @@ -0,0 +1,442 @@ +import pytest +import ctypes +import socket +import ipaddress +import re +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +import time + +SCTP_UNORDERED = 0x0400 + +SCTP_NODELAY = 0x00000004 +SCTP_SET_PEER_PRIMARY_ADDR = 0x00000006 +SCTP_PRIMARY_ADDR = 0x00000007 + +SCTP_BINDX_ADD_ADDR = 0x00008001 +SCTP_BINDX_REM_ADDR = 0x00008002 + +class sockaddr_in(ctypes.Structure): + _fields_ = [ + ('sin_len', ctypes.c_uint8), + ('sin_family', ctypes.c_uint8), + ('sin_port', ctypes.c_uint16), + ('sin_addr', ctypes.c_uint32), + ('sin_zero', ctypes.c_int8 * 8) + ] + +class sockaddr_in6(ctypes.Structure): + _fields_ = [ + ('sin6_len', ctypes.c_uint8), + ('sin6_family', ctypes.c_uint8), + ('sin6_port', ctypes.c_uint16), + ('sin6_flowinfo', ctypes.c_uint32), + ('sin6_addr', ctypes.c_uint8 * 16), + ('sin6_scope_id', ctypes.c_uint32) + ] + +class sockaddr_storage(ctypes.Union): + _fields_ = [ + ("v4", sockaddr_in), + ("v6", sockaddr_in6) + ] + +class sctp_sndrcvinfo(ctypes.Structure): + _fields_ = [ + ('sinfo_stream', ctypes.c_uint16), + ('sinfo_ssn', ctypes.c_uint16), + ('sinfo_flags', ctypes.c_uint16), + ('sinfo_ppid', ctypes.c_uint32), + ('sinfo_context', ctypes.c_uint32), + ('sinfo_timetolive', ctypes.c_uint32), + ('sinfo_tsn', ctypes.c_uint32), + ('sinfo_cumtsn', ctypes.c_uint32), + ('sinfo_assoc_id', ctypes.c_uint32), + ] + +class sctp_setprim(ctypes.Structure): + _fields_ = [ + ('ssp_addr', sockaddr_storage), + ('ssp_pad', ctypes.c_int8 * (128 - 16)), + ('ssp_assoc_id', ctypes.c_uint32), + ('ssp_padding', ctypes.c_uint32) + ] + +def to_sockaddr(ip, port): + ip = ipaddress.ip_address(ip) + + if ip.version == 4: + addr = sockaddr_in() + addr.sin_len = ctypes.sizeof(addr) + addr.sin_family = socket.AF_INET + addr.sin_port = socket.htons(port) + addr.sin_addr = socket.htonl(int.from_bytes(ip.packed, byteorder='big')) + else: + assert ip.version == 6 + + addr = sockaddr_in6() + addr.sin6_len = ctypes.sizeof(addr) + addr.sin6_family = socket.AF_INET6 + addr.sin6_port = socket.htons(port) + for i in range(0, 16): + addr.sin6_addr[i] = ip.packed[i] + + return addr + +class SCTPServer: + def __init__(self, family, port=1234): + self._libc = ctypes.CDLL("libc.so.7", use_errno=True) + + self._listen_fd = self._libc.socket(family, socket.SOCK_STREAM, socket.IPPROTO_SCTP) + if self._listen_fd == -1: + raise Exception("Failed to create socket") + + if family == socket.AF_INET: + srvaddr = sockaddr_in() + srvaddr.sin_len = ctypes.sizeof(srvaddr) + srvaddr.sin_family = socket.AF_INET + srvaddr.sin_port = socket.htons(port) + srvaddr.sin_addr = socket.INADDR_ANY + else: + srvaddr = sockaddr_in6() + srvaddr.sin6_len = ctypes.sizeof(srvaddr) + srvaddr.sin6_family = family + srvaddr.sin6_port = socket.htons(port) + # Leave sin_addr empty, because ANY is zero + + ret = self._libc.bind(self._listen_fd, ctypes.pointer(srvaddr), + ctypes.sizeof(srvaddr)) + if ret == -1: + raise Exception("Failed to bind: %d" % ctypes.get_errno()) + + ret = self._libc.listen(self._listen_fd, 2) + if ret == -1: + raise Exception("Failed to listen") + + def _to_string(self, buf): + return ''.join([chr(int.from_bytes(i, byteorder='big')) for i in buf]).rstrip('\x00') + + def accept(self, vnet): + fd = self._libc.accept(self._listen_fd, 0, 0) + if fd < 0: + raise Exception("Failed to accept") + + print("SCTPServer: connection opened") + while True: + rcvinfo = sctp_sndrcvinfo() + flags = ctypes.c_int() + buf = ctypes.create_string_buffer(128) + + # Receive a single message, and inform the other vnet about it. + ret = self._libc.sctp_recvmsg(fd, ctypes.cast(buf, ctypes.c_void_p), 128, + 0, 0, ctypes.pointer(rcvinfo), ctypes.pointer(flags)) + if ret < 0: + print("SCTPServer: connection closed") + return + if ret == 0: + continue + + rcvd = {} + rcvd['ppid'] = socket.ntohl(rcvinfo.sinfo_ppid) + rcvd['data'] = self._to_string(buf) + rcvd['len'] = ret + print(rcvd) + vnet.pipe.send(rcvd) + +class SCTPClient: + def __init__(self, ip, port=1234, fromaddr=None): + self._libc = ctypes.CDLL("libc.so.7", use_errno=True) + + if ipaddress.ip_address(ip).version == 4: + family = socket.AF_INET + else: + family = socket.AF_INET6 + + self._fd = self._libc.socket(family, socket.SOCK_STREAM, + socket.IPPROTO_SCTP) + if self._fd == -1: + raise Exception("Failed to open socket") + + if fromaddr is not None: + addr = to_sockaddr(fromaddr, 0) + + ret = self._libc.bind(self._fd, ctypes.pointer(addr), ctypes.sizeof(addr)) + if ret != 0: + print("bind() => %d", ctypes.get_errno()) + raise + + addr = to_sockaddr(ip, port) + ret = self._libc.connect(self._fd, ctypes.pointer(addr), ctypes.sizeof(addr)) + if ret == -1: + raise Exception("Failed to connect") + + # Enable NODELAY, because otherwise the sending host may wait for SACK + # on a data chunk we've removed + enable = ctypes.c_int(1) + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_NODELAY, ctypes.pointer(enable), 4) + + def newpeer(self, addr): + print("newpeer(%s)" % (addr)) + + setp = sctp_setprim() + a = to_sockaddr(addr, 0) + if type(a) is sockaddr_in: + setp.ssp_addr.v4 = a + else: + assert type(a) is sockaddr_in6 + setp.ssp_addr.v6 = a + + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_PRIMARY_ADDR, ctypes.pointer(setp), ctypes.sizeof(setp)) + if ret != 0: + print("errno %d" % ctypes.get_errno()) + raise Exception(ctypes.get_errno()) + + def newprimary(self, addr): + print("newprimary(%s)" % (addr)) + + # Strictly speaking needs to be struct sctp_setpeerprim, but that's + # identical to sctp_setprim + setp = sctp_setprim() + a = to_sockaddr(addr, 0) + if type(a) is sockaddr_in: + setp.ssp_addr.v4 = a + else: + assert type(a) is sockaddr_in6 + setp.ssp_addr.v6 = a + + ret = self._libc.setsockopt(self._fd, socket.IPPROTO_SCTP, + SCTP_SET_PEER_PRIMARY_ADDR, ctypes.pointer(setp), ctypes.sizeof(setp)) + if ret != 0: + print("errno %d" % ctypes.get_errno()) + raise + + def bindx(self, addr, add): + print("bindx(%s, %s)" % (addr, add)) + + addr = to_sockaddr(addr, 0) + + if add: + flag = SCTP_BINDX_ADD_ADDR + else: + flag = SCTP_BINDX_REM_ADDR + ret = self._libc.sctp_bindx(self._fd, ctypes.pointer(addr), 1, flag) + if ret != 0: + print("sctp_bindx() errno %d" % ctypes.get_errno()) + raise + + def send(self, buf, ppid, ordered=False): + flags = 0 + + if not ordered: + flags = SCTP_UNORDERED + + ppid = socket.htonl(ppid) + ret = self._libc.sctp_sendmsg(self._fd, ctypes.c_char_p(buf), len(buf), + ctypes.c_void_p(0), 0, ppid, flags, 0, 0, 0) + if ret < 0: + raise Exception("Failed to send message") + + def close(self): + self._libc.close(self._fd) + self._fd = -1 + +class TestSCTP(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + } + + def vnet2_handler(self, vnet): + # Give ourself a second IP address, for multihome testing + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s inet alias 192.0.2.3/24" % ifname) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + def test_multihome(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet proto sctp to 192.0.2.0/24"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + try: + client.newpeer("192.0.2.2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss") + ToolsHelper.print_output("/sbin/pfctl -sr -vv") + + # Check that we have a state for 192.0.2.3 and 192.0.2.2 to 192.0.2.1 + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.2:1234", states) + + @pytest.mark.require_user("root") + def test_multihome_asconf(self): + srv_vnet = self.vnet_map["vnet2"] + + # Assign a second IP to ourselves + ToolsHelper.print_output("/sbin/ifconfig %s inet alias 192.0.2.10/24" + % self.vnet.iface_alias_map["if1"].name) + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet proto sctp from 192.0.2.0/24"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234, "192.0.2.1") + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now add our second address to the connection + client.bindx("192.0.2.10", True) + + # We can still communicate + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + + # Now change to a different peer address + try: + client.newprimary("192.0.2.10") + client.send(b"!", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "!" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Ensure we have the states we'd expect + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r"all sctp 192.0.2.10:.*192.0.2.3:1234", states) + +class TestSCTPv6(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes6": [("2001:db8::1/64", "2001:db8::2/64")]}, + } + + def vnet2_handler(self, vnet): + # Give ourself a second IP address, for multihome testing + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s inet6 alias 2001:db8::3/64" % ifname) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET6, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + def test_multihome(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet6 proto sctp to 2001:db8::0/64"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("2001:db8::3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now change to a different peer address + try: + client.newpeer("2001:db8::2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Check that we have the expected states + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::2\[1234\]", states) + + @pytest.mark.require_user("root") + def test_multihome_asconf(self): + srv_vnet = self.vnet_map["vnet2"] + + # Assign a second IP to ourselves + ToolsHelper.print_output("/sbin/ifconfig %s inet6 alias 2001:db8::10/64" + % self.vnet.iface_alias_map["if1"].name) + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet6 proto sctp from 2001:db8::/64"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("2001:db8::3", 1234, "2001:db8::1") + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # Now add our second address to the connection + client.bindx("2001:db8::10", True) + + # We can still communicate + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + + # Now change to a different peer address + try: + client.newprimary("2001:db8::10") + client.send(b"!", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "!" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Check that we have the expected states + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) + assert re.search(r"all sctp 2001:db8::10\[.*2001:db8::3\[1234\]", states) From nobody Mon Oct 2 09:33:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNk1qXDz4vr3r; Mon, 2 Oct 2023 09:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNj6fYyz4SMr; Mon, 2 Oct 2023 09:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zbZAT+BID809NzDHo11CdyaNrShAl4KynROZBAeZ6Ho=; b=KEiXjmTDaIyoXyHZt/Ikvyqf9JApXCtv20nb2oqpLjP68Ny/ucQazzJheVRUtU8v4OEGNS ahPmceuNIE7BzvQW2O6sFv47nwKPilss1JjtdLr7rVVhZhSbzwYopGsS/vEcDZiJSOU/3T 4cONMvWZhDV3KqFoMmxs8AKb2Hz1w4GWcRQarmYUloXmf/jxmh+o9HetpFCDXVIrYE6SYc DwwNnWtwXQnuJcvJkVY30y8NQm2HSCpa59N0m/d19gF4MuWZKNnVhRwCL10Z8w18wO7u3R KGqQupkA1qb0m2lqdWCi/gb2Lu/dgFqAfuDpHuwEb6seaf66kE3z3ICorU+gyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239206; a=rsa-sha256; cv=none; b=rT9A4aJaQ2CspS1WwtsLcA8A/TwBBwhOOtSEiyglub/S7hYPMXGe2YZ6Bfy8oSo2IXvCJB FZ8Cbsnezrr97nYYkWBdPOoHHCdNYLsNEssTuR0H+YruJoD+DDCtzXM++FEUgEirYcpyR5 7Rn0x90Z0V6swOmI3W02uqhVZI5OYoW5qQiQPaHCXfbVIGq1iXy97b5S9lmxzTprjxAh+a zCBkh0m+vDTclEsGGSuCurKRqENmv/vlSKzWOV/1Wb80+6SLbt0nmZ6H6BrEbJMz5ESYGy ZEooCRHyqw5GPf4yS4sVKcJk5l8mcl21MHqI5rL4xP/0HCWMAapambO8IiSsrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zbZAT+BID809NzDHo11CdyaNrShAl4KynROZBAeZ6Ho=; b=FDzSB/+B19JGo1tlvHZtf+Wy7XFarWtb+ofAawqqdwuOsG4jRzoB/0l/MWbO5bKJqtleYm ZkTmX3BrRwcZVC7/+bEtyMahrMa0QkePrYSkw6QdpDjWQzcR6JHV6vho9LRiYuMTsxauQK jS1dGpNxDkBj4+VqEAkkm4d5+Lu1d4aOx9gM2ppESEVa2sEr2ftu0fpo8n8Ja4Cl4LYwl1 UqxKUzjBw36oL7bBpuZ/rFkN5fHmYXg7q/xMSYk/6cjTphxrbSaLg2q5lJHITcETF6mYuW hmdI7E9048HsR5/BG9jL26sVwMnw/79RXchnIJ+4EBXKh9OggdZauqexzdYbDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNj5XJNz16QG; Mon, 2 Oct 2023 09:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XPgB002949; Mon, 2 Oct 2023 09:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XP4f002946; Mon, 2 Oct 2023 09:33:25 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:25 GMT Message-Id: <202310020933.3929XP4f002946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 45f475427d8e - stable/14 - pf: inherit v_tag values to multihomed connections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 45f475427d8e8e1583104350699620fc8aee8735 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=45f475427d8e8e1583104350699620fc8aee8735 commit 45f475427d8e8e1583104350699620fc8aee8735 Author: Kristof Provost AuthorDate: 2023-09-04 16:00:08 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: inherit v_tag values to multihomed connections When we create a new state for an existing SCTP association inherit the v_tag values from the original connection. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit f1cc29af84475b800df5eb94ff7d5b9484ddbdac) --- sys/netpfil/pf/pf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8958579b7e63..085ab5827e26 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5939,8 +5939,12 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); - if (sm) + if (sm) { + /* Inherit v_tag values. */ + sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; + sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; PF_STATE_UNLOCK(sm); + } free(j, M_PFTEMP); } From nobody Mon Oct 2 09:33:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNk1zlvz4vrNB; Mon, 2 Oct 2023 09:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNj6vD7z4SVX; Mon, 2 Oct 2023 09:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yL8rIlziwLTNTNI4eqyIE8Pq5Au5b3he9ichrC+ZZVs=; b=mNQG82GoUr2ESqReYw8wI/CBnSdwf7/CaqHO0wih+RMf8Pk0c0j/06LH27ffBthWndT4yk 9gEgy5iMSmXOqiIgUpWrMaVDrRgo+AgzNp9xMAR7bUMWNUUEqVdBdZp10OqQ/Xa/cZPiSA 5oXzHzZVCg8Al6M8KKvk/vS2K2/E85XAB68/5eyok8mIPsAQlS1XpLI+l9Tc8x+u7GF5u6 n43drxSwnD/7nG2p0+pvXSA+FrHfO+lXNxA1DT7cPZgykvjnEkP+j8MjyC4fFh6a5LghwN 5QMDqDW/KnuyEzFaT7oUmb4wd0xD4SHctnjrfJDGWFIwuMLNWPiVdU+ncd2gFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239206; a=rsa-sha256; cv=none; b=JuJmWs/kn3/CMxpMcr0FNKfASV1DxU/W0VZFu7asj5vJjjJyAgrnLjNcNVjhm/3hAc7rIY RM0qp6kCrdVQFIF4X+YNHIY9a9ruT7FKHXuKWpyIqlQfe1JTStgi100lx28y7hAPeTcdIc rgHZQ2QSjLwxuFep8biKXeuVH44g9IIdq6xSzTwdgodDddiHRCySMwgToE+UBYov/0z6q6 +bQXhodzMGQK1UjJYYtrSLJ7wPn3k5Ttm0XzZPNKXonzb/bNas8BCoytBcszb3dnbPxFOs ZOwOuHNLfA914a04S6hJMLm+NfFtihzMrpRUVSGq/NhKD9Y/fn61ffqQHLlkDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yL8rIlziwLTNTNI4eqyIE8Pq5Au5b3he9ichrC+ZZVs=; b=UaMB9SiPwVelatGymkKEVmE1dWTKCCeBpY1WYdDCj+NoTQaouHryvpB+2Y6r7C5q9WZWEI KV6ybG3cqTPq6O4AFouAsql9U17uiMXNsCk0BsPvcBCJouHMbdY6CxNyhMTGEQ9e1x9HtV 33fxFh6RDouIGqsUd0vWzy1cPFLSQRENRobEhMvMcp/TtzkFfNjJL18BlBiKwoqCH6htcT Rc1tQWf0Zu6v0ChUvHDGI63eh40JmijknUVdloVGxWbXppmqHSvTk9w1H+gBIBkrcNR7vL sso5leSH5Zc3IUVeWoWropLyHC2jE2RdNPVRQw8JkSYeiHzNoy61uKjZlAWJqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNj5s4bz16c5; Mon, 2 Oct 2023 09:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XPPR002991; Mon, 2 Oct 2023 09:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XPPR002988; Mon, 2 Oct 2023 09:33:25 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:25 GMT Message-Id: <202310020933.3929XPPR002988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 00cd3145d4c6 - stable/13 - pf: improve SCTP state validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00cd3145d4c650446ae54007ec50745244942ef2 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=00cd3145d4c650446ae54007ec50745244942ef2 commit 00cd3145d4c650446ae54007ec50745244942ef2 Author: Kristof Provost AuthorDate: 2023-09-01 11:33:56 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:43 +0000 pf: improve SCTP state validation Only create new states for INIT chunks, or when we're creating a secondary state for a multihomed association. Store and verify verification tag. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 51a78dd2764beabfd19a58b8a8b04387a547f02e) --- sys/net/pfvar.h | 8 +++++++- sys/netpfil/pf/pf.c | 25 +++++++++++++++---------- sys/netpfil/pf/pf_norm.c | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 07a4140e450f..3cb093ba8b02 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -700,7 +700,10 @@ struct pf_state_scrub { #define PFSS_DATA_NOTS 0x0080 /* no timestamp on data packets */ u_int8_t pfss_ttl; /* stashed TTL */ u_int8_t pad; - u_int32_t pfss_ts_mod; /* timestamp modulation */ + union { + u_int32_t pfss_ts_mod; /* timestamp modulation */ + u_int32_t pfss_v_tag; /* SCTP verification tag */ + }; }; struct pf_state_host { @@ -1332,6 +1335,7 @@ struct pf_pdesc { #define PFDESC_SCTP_DATA 0x0040 #define PFDESC_SCTP_ASCONF 0x0080 #define PFDESC_SCTP_OTHER 0x0100 +#define PFDESC_SCTP_ADD_IP 0x0200 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; @@ -2044,6 +2048,8 @@ int pf_normalize_tcp_init(struct mbuf *, int, struct pf_pdesc *, int pf_normalize_tcp_stateful(struct mbuf *, int, struct pf_pdesc *, u_short *, struct tcphdr *, struct pf_kstate *, struct pf_state_peer *, struct pf_state_peer *, int *); +int pf_normalize_sctp_init(struct mbuf *, int, struct pf_pdesc *, + struct pf_state_peer *, struct pf_state_peer *); int pf_normalize_sctp(int, struct pfi_kkif *, struct mbuf *, int, int, void *, struct pf_pdesc *); u_int32_t diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index cb4ab2da4633..551bfd01732f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4340,11 +4340,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if ((pd->flags & PFDESC_TCP_NORM) && pf_normalize_tcp_init(m, off, pd, th, &s->src, &s->dst)) { REASON_SET(&reason, PFRES_MEMORY); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } if ((pd->flags & PFDESC_TCP_NORM) && s->src.scrub && pf_normalize_tcp_stateful(m, off, pd, &reason, th, s, @@ -4353,12 +4349,13 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, DPFPRINTF(PF_DEBUG_URGENT, ("pf_normalize_tcp_stateful failed on first " "pkt\n")); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } + } else if (pd->proto == IPPROTO_SCTP) { + if (pf_normalize_sctp_init(m, off, pd, &s->src, &s->dst)) + goto drop; + if (! (pd->sctp_flags & (PFDESC_SCTP_INIT | PFDESC_SCTP_ADD_IP))) + goto drop; } s->direction = pd->dir; @@ -5312,6 +5309,13 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, } } + if (src->scrub != NULL) { + if (src->scrub->pfss_v_tag == 0) { + src->scrub->pfss_v_tag = pd->hdr.sctp.v_tag; + } else if (src->scrub->pfss_v_tag != pd->hdr.sctp.v_tag) + return (PF_DROP); + } + (*state)->expire = time_uptime; /* translate source/destination address, if necessary */ @@ -5352,6 +5356,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { PF_RULES_RLOCK(); + j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; action = pf_test_rule(&r, &sm, pd->dir, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index ec3f63c9f262..a8ef4dc346b0 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1529,6 +1529,7 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd, void pf_normalize_tcp_cleanup(struct pf_kstate *state) { + /* XXX Note: this also cleans up SCTP. */ if (state->src.scrub) uma_zfree(V_pf_state_scrub_z, state->src.scrub); if (state->dst.scrub) @@ -1537,6 +1538,23 @@ pf_normalize_tcp_cleanup(struct pf_kstate *state) /* Someday... flush the TCP segment reassembly descriptors. */ } +int +pf_normalize_sctp_init(struct mbuf *m, int off, struct pf_pdesc *pd, + struct pf_state_peer *src, struct pf_state_peer *dst) +{ + src->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT); + if (src->scrub == NULL) + return (1); + + dst->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT); + if (dst->scrub == NULL) { + uma_zfree(V_pf_state_scrub_z, src); + return (1); + } + + return (0); +} + int pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd, u_short *reason, struct tcphdr *th, struct pf_kstate *state, From nobody Mon Oct 2 09:33:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNl2PRvz4vrcd; Mon, 2 Oct 2023 09:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNl1YzLz4SSy; Mon, 2 Oct 2023 09:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPsMaasfSX6HEswzQStMLLq8RGjd9q9P0aJeY3zxWno=; b=bS6CDafrMICL2WzYreJQ37YJX8JtGJ9/C6GDNRV9CFl/SSMymtfsUL2HK7ikxbo0oRFrQO dVMGIvIclhkYw7c8xnOXfK9Yrjp/E6X1viWdZ7LomZV80KrKBAToy+XydTNkbjtzIPNePO s7TunL3q+3aKEAij9v+RUCmYujYpNdHlRpe3h7C69VNdsjdHML7JzRIxmnxkhI/CVvzCWj 0y1pNNkkCWz5kuq6aZpBvJFm1/Hci/Ckd8pViUrhjZzbmhOQ4wdYTxHsYdQ8XK3tynAcfZ DGrM20zTT9NRhGoyConvimWAzrH31h4DyCjM9+zmdkuyVVMmfmwtN81X2KB5EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239207; a=rsa-sha256; cv=none; b=FTzIpYxOCaU5sPYqYV3uAb6n7wgwUjgKEGqvfwf7i6aQSNO96g8MUr6juIE+oD3NzAPbhz Hx9mYeHQrDSWtkx6dBicoFS/rwh/Mk+bbGfY6sJkFU8steI9iGpMikfGqvouLY8fnh3g70 1GfC0APR7sen2iA9XAzv0wGnDkPU5y4iQ8iJKcUo9DkHCkWqHSdybcPkNseL1o57RS6yFX nUC+hjLFdlKbJgqnuZ5gawHvPxWgPfOjg8eyItRxVZXMI9v1Zm+3CWAMQDzUlGd6qlg/Eg uU570i8BCMWXc6cjjDQN1wFiQ5/pvoSWydWbhI3FRiz1xgQ3GHgJ0OzHBRZjKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPsMaasfSX6HEswzQStMLLq8RGjd9q9P0aJeY3zxWno=; b=TZjGx9/bnkXjsxKLVb+gKYVzpyP9+GolMRiV8a7mylQYwId02o4Otxg7LT6jHGnWTZi6pG 6ungOb8/YnWeD090IGyePTV3bIs5ofGtqTtSjsKoM7CJs/YDhXosYnIrBGc82XTYuXxmSj MY4/CJVcPoMbLmgv/4Bwt/GaBa5Qu6Om5SsHvlvcQpb/wdUdz4xcfvEEG5N97shiwX0o8d OCvskoHGhuVxkpnoIN3Driyvv+bcE1QXrOjmExoH9KB4o9jXd02VcWM2tTS9AZOtKveljC x9288bc8QPoI//CPEzueBZbXrb3Q96q/VVTJtgrOudMjAwEdoESoSswqwiLKPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNk6kfZz16QH; Mon, 2 Oct 2023 09:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XQec003099; Mon, 2 Oct 2023 09:33:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XQtt003095; Mon, 2 Oct 2023 09:33:26 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:26 GMT Message-Id: <202310020933.3929XQtt003095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9febb2d3576e - stable/13 - pf: inherit v_tag values to multihomed connections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9febb2d3576e695f146a0304faff95853cc92d62 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9febb2d3576e695f146a0304faff95853cc92d62 commit 9febb2d3576e695f146a0304faff95853cc92d62 Author: Kristof Provost AuthorDate: 2023-09-04 16:00:08 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf: inherit v_tag values to multihomed connections When we create a new state for an existing SCTP association inherit the v_tag values from the original connection. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit f1cc29af84475b800df5eb94ff7d5b9484ddbdac) --- sys/netpfil/pf/pf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 551bfd01732f..be4fa4273972 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5361,8 +5361,12 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); - if (sm) + if (sm) { + /* Inherit v_tag values. */ + sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; + sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; PF_STATE_UNLOCK(sm); + } free(j, M_PFTEMP); } From nobody Mon Oct 2 09:33:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNl2RY9z4vrf6; Mon, 2 Oct 2023 09:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNl0gf8z4SbL; Mon, 2 Oct 2023 09:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V4kIhQTJwJjS0B8IzrkOxDzPF7EyBzXFn4ApqY318lw=; b=j5w/RWfhPmbLyx2yYxYLX/AcyfmGtYWR1t0+8W5Bmn9ibzB55JbxCGQMHEA2PFCRimHGXg QSJT3w/PnlpIW4zh3W7Ld0Ai4fKmjUwz2hHZrzjgSau497YdESJbJDin67zKIZPCojjo+A sMx/uHnzLTA1mHVkqmJrvAROCnGw3Q/7H0RRKO4UYDPoWmOw5BhVvIPTGNvXvtgHQYWnJF E4AQpTxs9mP8ed3/oqTadOjnmKqRtwSV4U7403w6rX2Q4mwfp73rleum8ynIY3kX13BWrn +1iujsap9XBwvEBqzxy9uabpFC5nwVvvq5p5VsuRsor1uSLjZ7ZqZVBrOKxEVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239207; a=rsa-sha256; cv=none; b=BZxOdQDqEDqjV4v4pWOiIBtmu83qe580ZgmDQ6xRsJCLvRu9Rmh5M2jfRqgqW8CKR1m2Hc ZxkqLRVOC1pFt0Ki7Mb0/secCGLCTIk+eEt7G4GTRVj6R5fKJ+d0hl39hssVuQJAbSpm+X V2p9ZiPMN9VBRoODlBjvTEKR52KwC4R5IOA0awbAoXTAcnNfw/Rzeob48W5v3k1Yix4IGi rRsHdJM+8TlLFjV7Sqat2ajy9m+2akoba6Uv4bUxmtY5m9+JewlleqSLAFjySlZoPDwaIW Vge5qJfgbHR1wE7lXBXD/ZpP/Iy0qeZSNy+5tPX4Ln7+1P4WVkRHgOX8OLEusQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V4kIhQTJwJjS0B8IzrkOxDzPF7EyBzXFn4ApqY318lw=; b=RKTxmmHvCyUsOLQh44fPdm6OWLnOAUmfeIkYWgraljBDFvwZ7ZP35D0mJrdxxkcrwuI5L0 MHat58APdf6YC2xvW+Z2/LCiAbatfJ/CsdVqDcyJnQKobX4GhRucvyPyvOmg4tmgXkYUtg 5B18MNdC0kktQcKlOA2Fxpt20ehJtXmBF8kyxjZTnAJrHIRYDgHSvNmK/VJzd+Iky8SSpF wRXAECOkDtrVD3ZjuzlBMXEwYf4z9gSPkomLGIh4N2Xuf8j/eTyZM0OiRNCObkmQjN9bsX r9A+8vi8vu5xkhfm+OIhz31frgrU26uSjDi08gS/UjbSkJV8pnnIt+q4OoSqQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNk6jW1z16c6; Mon, 2 Oct 2023 09:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XQG4003098; Mon, 2 Oct 2023 09:33:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XQ8n003071; Mon, 2 Oct 2023 09:33:26 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:26 GMT Message-Id: <202310020933.3929XQ8n003071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6d1714a44e63 - stable/14 - pf: mark removed connections within a multihome association as shutting down List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6d1714a44e634f3063f6cd0a4fab0782ddc87fe7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d1714a44e634f3063f6cd0a4fab0782ddc87fe7 commit 6d1714a44e634f3063f6cd0a4fab0782ddc87fe7 Author: Kristof Provost AuthorDate: 2023-09-05 16:30:42 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: mark removed connections within a multihome association as shutting down Parse IP removal in ASCONF chunks, find the affected state(s) and mark them as shutting down. This will cause them to time out according to PFTM_TCP_CLOSING timeouts, rather than waiting for the established session timeout. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 4d3af82f78961180149e8a579b481dc382f76eef) --- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 87 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a8567ab74fe3..15fa671ddcbe 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1599,6 +1599,7 @@ struct pf_sctp_multihome_job { struct pf_addr src; struct pf_addr dst; struct mbuf *m; + int op; }; #endif diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 085ab5827e26..6a8ba7be56cf 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5933,17 +5933,57 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { - PF_RULES_RLOCK(); - j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; - action = pf_test_rule(&r, &sm, kif, - j->m, off, &j->pd, &ra, &rs, NULL); - PF_RULES_RUNLOCK(); - SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); - if (sm) { - /* Inherit v_tag values. */ - sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; - sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; - PF_STATE_UNLOCK(sm); + switch (j->op) { + case SCTP_ADD_IP_ADDRESS: { + j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; + PF_RULES_RLOCK(); + action = pf_test_rule(&r, &sm, kif, + j->m, off, &j->pd, &ra, &rs, NULL); + PF_RULES_RUNLOCK(); + SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); + if (sm) { + /* Inherit v_tag values. */ + sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; + sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; + PF_STATE_UNLOCK(sm); + } + break; + } + case SCTP_DEL_IP_ADDRESS: { + struct pf_state_key_cmp key; + uint8_t psrc; + + bzero(&key, sizeof(key)); + key.af = j->pd.af; + key.proto = IPPROTO_SCTP; + if (j->pd.dir == PF_IN) { /* wire side, straight */ + PF_ACPY(&key.addr[0], j->pd.src, key.af); + PF_ACPY(&key.addr[1], j->pd.dst, key.af); + key.port[0] = j->pd.hdr.sctp.src_port; + key.port[1] = j->pd.hdr.sctp.dest_port; + } else { /* stack side, reverse */ + PF_ACPY(&key.addr[1], j->pd.src, key.af); + PF_ACPY(&key.addr[0], j->pd.dst, key.af); + key.port[1] = j->pd.hdr.sctp.src_port; + key.port[0] = j->pd.hdr.sctp.dest_port; + } + + sm = pf_find_state(kif, &key, j->pd.dir); + if (sm != NULL) { + PF_STATE_LOCK_ASSERT(sm); + if (j->pd.dir == sm->direction) { + psrc = PF_PEER_SRC; + } else { + psrc = PF_PEER_DST; + } + pf_set_protostate(sm, psrc, SCTP_SHUTDOWN_PENDING); + sm->timeout = PFTM_TCP_CLOSING; + PF_STATE_UNLOCK(sm); + } + break; + default: + panic("Unknown op %#x", j->op); + } } free(j, M_PFTEMP); @@ -5952,7 +5992,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, static int pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, - struct pfi_kkif *kif) + struct pfi_kkif *kif, int op) { int off = 0; struct pf_sctp_multihome_job *job; @@ -6014,6 +6054,7 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, memcpy(&job->dst, pd->dst, sizeof(job->dst)); job->pd.dst = &job->dst; job->m = m; + job->op = op; TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; @@ -6044,6 +6085,7 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, memcpy(&job->dst, pd->dst, sizeof(job->dst)); job->pd.dst = &job->dst; job->m = m; + job->op = op; TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; @@ -6058,7 +6100,22 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), - ntohs(ah.ph.param_length) - sizeof(ah), pd, kif); + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, + SCTP_ADD_IP_ADDRESS); + if (ret != PF_PASS) + return (ret); + break; + } + case SCTP_DEL_IP_ADDRESS: { + int ret; + struct sctp_asconf_paramhdr ah; + + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), + NULL, NULL, pd->af)) + return (PF_DROP); + ret = pf_multihome_scan(m, start + off + sizeof(ah), + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, + SCTP_DEL_IP_ADDRESS); if (ret != PF_PASS) return (ret); break; @@ -6079,7 +6136,7 @@ pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(m, start, len, pd, kif)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } int @@ -6089,7 +6146,7 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(m, start, len, pd, kif)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } static int From nobody Mon Oct 2 09:33:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNm2m6nz4vrKN; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNm26B0z4Sms; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DHDPqwEslfbjc6qYeBYmBmaHsXIIgNVxPEi/Ni/PH4=; b=w9S7RP5I9lZ4Dr24t7FTCBeD50eNDTj3xODJOAEYmZoXVvRFez09t+1c5MA/zGMEI/ielX zbiNumR6ApWByLMe7P6MiDPP4d7Ccd3MBE5SHKJIMDj4ghI335zoczhQ/abim06vsnEl2E Mf2kC9HKgcxt1jM7a2cnwEbbS/k1+uIc0cpF0csQUwYAmWbBnH6kROBQBfdvlAgYUeBgei 9s8MMLi3mpRkvJcKJdh6f+FM3p4cew+OwD3WaIyKQP6Zh8igbXHB2AVBZzK9NRK0MLmipq k+MpvinTOKIqeLFrAZuj7YtOxWCrtHUKUlHPLoI+ninRxslG49cq6IwDZJ9Mdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239208; a=rsa-sha256; cv=none; b=fgzlPT0+G7hsIhvp08ZN1yHEYyDEwH+Wf1w9EeztwHPwX1tCMR5Bzf27nRQheMuyxTExVD 9Q1PKi/BKeaHW6n0ic91cHdFwiOafW5tqXun8GZYXKQS2wZqdX9v0cvivvMEqxed6/DRSh Ht5PuCiDvYVIgRQYYMEM82k1VBCSjCja/jkrM0QB3zd9TrIkf32Df8+oddMqd5rxez7k4P mO3ifaJ2O6FU0NzveJX2PVumGp1q8LQ4+xts3xsvtgPblB64Wr5fCA+ePlZqaX9Zz86E6H AuyrpCy2RAIW1RefFqW6kJdfaD1QWsumlByKLpD3lBSG4n37qBMnlqdLb8SAkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DHDPqwEslfbjc6qYeBYmBmaHsXIIgNVxPEi/Ni/PH4=; b=O/4ojy7M1m0JJ59CxZxyEbX36nn4/r+cWxHw3BdO6OpVCb4sfUNCuDF/WzqmoZAI1Oe3j1 QKHjJy0dUBQwj2nKcriFtVLgt6eT9RhtW4xVA4xuCpEfzAgzUzbs425PBb7pgaj00BY13B Dhs9GtR2VSfPMBzeLXCYkaiU26tPJfMbBmsGTYv68emDv1BkHUdUlWvIg+FOeW6D/2n2Lw TAMFI4AAiwSrpUsrnw+HIEj4EMalu0lpC5+vItffHmV5xYRyZJc3K9BobTLF/1xOlv+G4P gIeUl9g0WR53FkbO3eDZNjWYsRUROrcW+PACgVtP2/SG4+/IO5sj24VdDacosw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNm0NCHz16YY; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XRf8003225; Mon, 2 Oct 2023 09:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XRNh003223; Mon, 2 Oct 2023 09:33:27 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:27 GMT Message-Id: <202310020933.3929XRNh003223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 35dd8c4e7887 - stable/14 - pf tests: extend SCTP tests to test state removal through ASCONF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35dd8c4e7887874f883668111e1c58d583d78f4b Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=35dd8c4e7887874f883668111e1c58d583d78f4b commit 35dd8c4e7887874f883668111e1c58d583d78f4b Author: Kristof Provost AuthorDate: 2023-09-05 17:00:49 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf tests: extend SCTP tests to test state removal through ASCONF pf can now mark shut down multihomed connections shutting down. Verify that pf does the right thing. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 97340b68d18bbbdebf0f73ed900c5a33894061dd) --- tests/sys/netpfil/pf/sctp.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index b24d0c414ac8..5e6dca5dd64b 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -342,6 +342,24 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.10:.*192.0.2.3:1234", states) + # Now remove 192.0.2.1 as an address + client.bindx("192.0.2.1", False) + + # We can still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] =="More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234.*SHUTDOWN", states) + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { @@ -440,3 +458,21 @@ class TestSCTPv6(VnetTestTemplate): states = ToolsHelper.get_output("/sbin/pfctl -ss") assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) assert re.search(r"all sctp 2001:db8::10\[.*2001:db8::3\[1234\]", states) + + # Now remove 2001:db8::1 as an address + client.bindx("2001:db8::1", False) + + # Wecan still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that the state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\].*SHUTDOWN", states) From nobody Mon Oct 2 09:33:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNm2nXsz4vrH3; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNm25Jvz4Sbh; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tMLM5N8tWc43jfTTtwMvD464GBxC5A1uWMf81zWjsso=; b=d6Far1a6xqVJ5hVr72dweJ4nDoQ5tErJV4ZRJRNJXPZK4oiNHLA6TKZqWSgqnK0nutc/nf bvInb45Mr0hjVhpE7kwsrvWDY/YM+daP6n7A7Xar6HREXOAWF/03JTK4k7kvim1GcDYWZl lxbn5/Q42wtj68BNJuPWIWexQPFdS5ozQmDWvddD7RpWKGkkBR0KanQC65ljkGPzeZvnoC oZuvmYPyZj0TS+y8RY6f3SrYNG+vF9QW8Uo+6z8HdH46tx7dYSGCjHRYw0ohvaeLT31kKO P4tv/eQRlIUFx6YhjDO3P8S2eO8StDlu+Oxo+DnhIHgX3Y9TLfF9bNSebpZ0hA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239208; a=rsa-sha256; cv=none; b=V2FfcjktF5/y+8VLfUSrM5PEPa78UI3IMdicqtoQ+9tIpuDRytM28q1Omt18ePt/Fw8NLk bFiFQGCTIQjgVM1UfPQBDQgzNB0uhWR3IOpuXyo6fns1XBbT6YCRmHvC7pNoJRUcvQKKfA Kn32TorHH8HJSvf5LOATM2lm9DWuddm/b99MYVQ3cHsLvganXX8gisdynlbAJ9mZlHC9d7 SEc2FbmHA3OZDfcT0/NVXcKrqJ+AoQOm9G+5+3z3A8qrg7mFbfZ99JxUusY39CFnAplWfM p22VeUUpphEWUvBzJ/0Et5dwmrRBtacTSIff8iNvXa21GnUc0e+3KEzu3N6Yfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tMLM5N8tWc43jfTTtwMvD464GBxC5A1uWMf81zWjsso=; b=ONLZs4ImMPKFRspsPmFEz9wTrvjUpvvJ18vklj60zB9vAQVK1DvKDkTTwJYTsApr7mqwfS 90Dvauws7Z0VlRBlypsc6Bb30CepFSRYokWsGUSGqMd42uUaO+Lg+NlOF2XCs/jxmxQb14 lPQS1CqkLmj+OD3ZNRMExQixwUVbgoOTSfHidsjephOGmPks0V5UqgIYGcVhzuBl1EQVk2 H9Za+B4+SM2nXM0YHpXidYW5sk12xBhtn3kK1YnkVHbkO8URcksa6BeXPn8ByQDSL2tzEl coXGQScCG3CVpDew4ik/CGzN9Bg5TE8hu7uDLnTSxmbRiZosObl1ii0AqAmEaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNm0cj6z16CD; Mon, 2 Oct 2023 09:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XRWu003226; Mon, 2 Oct 2023 09:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XRhc003217; Mon, 2 Oct 2023 09:33:27 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:27 GMT Message-Id: <202310020933.3929XRhc003217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 95f44dd698b0 - stable/13 - pf: mark removed connections within a multihome association as shutting down List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 95f44dd698b0439b51788951f840b501651ecebf Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=95f44dd698b0439b51788951f840b501651ecebf commit 95f44dd698b0439b51788951f840b501651ecebf Author: Kristof Provost AuthorDate: 2023-09-05 16:30:42 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf: mark removed connections within a multihome association as shutting down Parse IP removal in ASCONF chunks, find the affected state(s) and mark them as shutting down. This will cause them to time out according to PFTM_TCP_CLOSING timeouts, rather than waiting for the established session timeout. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 4d3af82f78961180149e8a579b481dc382f76eef) --- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 87 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 3cb093ba8b02..9c6f5bccae02 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1348,6 +1348,7 @@ struct pf_sctp_multihome_job { struct pf_addr src; struct pf_addr dst; struct mbuf *m; + int op; }; #endif diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index be4fa4273972..55942fcf4338 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5355,17 +5355,57 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { - PF_RULES_RLOCK(); - j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; - action = pf_test_rule(&r, &sm, pd->dir, kif, - j->m, off, &j->pd, &ra, &rs, NULL); - PF_RULES_RUNLOCK(); - SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); - if (sm) { - /* Inherit v_tag values. */ - sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; - sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; - PF_STATE_UNLOCK(sm); + switch (j->op) { + case SCTP_ADD_IP_ADDRESS: { + j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; + PF_RULES_RLOCK(); + action = pf_test_rule(&r, &sm, pd->dir, kif, + j->m, off, &j->pd, &ra, &rs, NULL); + PF_RULES_RUNLOCK(); + SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); + if (sm) { + /* Inherit v_tag values. */ + sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; + sm->dst.scrub->pfss_v_tag = s->dst.scrub->pfss_flags; + PF_STATE_UNLOCK(sm); + } + break; + } + case SCTP_DEL_IP_ADDRESS: { + struct pf_state_key_cmp key; + uint8_t psrc; + + bzero(&key, sizeof(key)); + key.af = j->pd.af; + key.proto = IPPROTO_SCTP; + if (j->pd.dir == PF_IN) { /* wire side, straight */ + PF_ACPY(&key.addr[0], j->pd.src, key.af); + PF_ACPY(&key.addr[1], j->pd.dst, key.af); + key.port[0] = j->pd.hdr.sctp.src_port; + key.port[1] = j->pd.hdr.sctp.dest_port; + } else { /* stack side, reverse */ + PF_ACPY(&key.addr[1], j->pd.src, key.af); + PF_ACPY(&key.addr[0], j->pd.dst, key.af); + key.port[1] = j->pd.hdr.sctp.src_port; + key.port[0] = j->pd.hdr.sctp.dest_port; + } + + sm = pf_find_state(kif, &key, j->pd.dir); + if (sm != NULL) { + PF_STATE_LOCK_ASSERT(sm); + if (j->pd.dir == sm->direction) { + psrc = PF_PEER_SRC; + } else { + psrc = PF_PEER_DST; + } + pf_set_protostate(sm, psrc, SCTP_SHUTDOWN_PENDING); + sm->timeout = PFTM_TCP_CLOSING; + PF_STATE_UNLOCK(sm); + } + break; + default: + panic("Unknown op %#x", j->op); + } } free(j, M_PFTEMP); @@ -5374,7 +5414,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, static int pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, - struct pfi_kkif *kif) + struct pfi_kkif *kif, int op) { int off = 0; struct pf_sctp_multihome_job *job; @@ -5436,6 +5476,7 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, memcpy(&job->dst, pd->dst, sizeof(job->dst)); job->pd.dst = &job->dst; job->m = m; + job->op = op; TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; @@ -5466,6 +5507,7 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, memcpy(&job->dst, pd->dst, sizeof(job->dst)); job->pd.dst = &job->dst; job->m = m; + job->op = op; TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; @@ -5480,7 +5522,22 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), - ntohs(ah.ph.param_length) - sizeof(ah), pd, kif); + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, + SCTP_ADD_IP_ADDRESS); + if (ret != PF_PASS) + return (ret); + break; + } + case SCTP_DEL_IP_ADDRESS: { + int ret; + struct sctp_asconf_paramhdr ah; + + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), + NULL, NULL, pd->af)) + return (PF_DROP); + ret = pf_multihome_scan(m, start + off + sizeof(ah), + ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, + SCTP_DEL_IP_ADDRESS); if (ret != PF_PASS) return (ret); break; @@ -5502,7 +5559,7 @@ pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(m, start, len, pd, kif)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } int @@ -5512,7 +5569,7 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(m, start, len, pd, kif)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } static int From nobody Mon Oct 2 09:33:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNn3TFjz4vrKS; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNn2g9qz4Sdy; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTYDly9RnXnbRTHVgm/bioyhgKUcspu1bOR7E/bBqIw=; b=topBRKYN7BxzGPj8aApYk4Xw1BdmwTYEp3nItcnNAp/Mv5M+GS2FS4b0VGS/CVr+SI5RcB 6QFwkpcuRZYK3ZQU+WnJJuVQYUQCusDWSxErAjCHu7nTV63/wTYXEnHeYhK2Azf2ggBYc/ QoPFePvyXAyj1NhZSnDZy4bjF8pjOtupwJvI9//FFpmAYsg+uBMHfJHXMks+Li4efJYOoo Gl1vG8HIATc0vpTEim3VTPfmqCT+jBpIhSmwk1Awy4oox2G8ZMujhp9CwieBtnzyQJPje0 J4eMNIz1mq0qr/NZjFfRejdQ3vNeCzOUFqlCOEI6l/x7rE0hh0S0JAUxe/83bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239209; a=rsa-sha256; cv=none; b=owlXc4fUsGWVJncHk7iUp+0h1LxNe8WttPPnREh6n0E+Jnh08ZT4lJPZd4wlJkq0p9eDLs zgVWOeiDyf+F5KitIi8mah4nXXCNZUwQDpHaGS5U3kSrFyOID197SNGqQB4e9UxRUXAqMM LWv3lgsBp5UQirbOXN5xYAymUUgCwd+yPgvaK6+hh8inmkCX0D0bZiLoIWpYNlAefj8e79 r9H2ItnM0p4ip+jjeNoArg2UvQPMrqG7kbCCn14NprTY/Wl6eki/v4fFKg8i3VR3scc0Fa EU/CJcvgaSFav92g4LGSQW7D5wt5lBhRzTiMsdTOn549MafSk0c4hefEOzl2Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTYDly9RnXnbRTHVgm/bioyhgKUcspu1bOR7E/bBqIw=; b=eC6TsbHAI3NA1trOMkin7l8pRcN6CIRnUXqnnPmXxFVJlhKiobeyx6e0JVP1zIA/MlXWjq xhQkpmEN4mU14duVwftb0GXTfnVHCQazvKzUd/V78KqIxBzOpjxHVsT7C+FaCn2c+ZvUh9 K3K3NvoCd5kF6h5zmCsDvVnadxi6Fl5Fd8Pr9jfpuP6eiDC0B02puYnvi4Bq9HUAYm4N6w CuPnqRjitvYuXl+5DNIznTzR/DUtpX3pASlsGZn3h8XWK4Rr6feaBlNpkt9GDsNBKRsMZ2 +kI0Lc7CC5YaTGEIfOyoehMzLwLjA4UcZ2G2s2rPd3aI6lj1N9FnUgxanLtYpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNn1T43z16Y9; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XT8V003337; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XTlq003334; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:29 GMT Message-Id: <202310020933.3929XTlq003334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: a4f506a9a610 - stable/13 - pf tests: extend SCTP tests to test state removal through ASCONF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4f506a9a61034c8bf1dae82e220a11a2c418a66 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a4f506a9a61034c8bf1dae82e220a11a2c418a66 commit a4f506a9a61034c8bf1dae82e220a11a2c418a66 Author: Kristof Provost AuthorDate: 2023-09-05 17:00:49 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf tests: extend SCTP tests to test state removal through ASCONF pf can now mark shut down multihomed connections shutting down. Verify that pf does the right thing. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 97340b68d18bbbdebf0f73ed900c5a33894061dd) --- tests/sys/netpfil/pf/sctp.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index b24d0c414ac8..5e6dca5dd64b 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -342,6 +342,24 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.10:.*192.0.2.3:1234", states) + # Now remove 192.0.2.1 as an address + client.bindx("192.0.2.1", False) + + # We can still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] =="More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234.*SHUTDOWN", states) + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { @@ -440,3 +458,21 @@ class TestSCTPv6(VnetTestTemplate): states = ToolsHelper.get_output("/sbin/pfctl -ss") assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) assert re.search(r"all sctp 2001:db8::10\[.*2001:db8::3\[1234\]", states) + + # Now remove 2001:db8::1 as an address + client.bindx("2001:db8::1", False) + + # Wecan still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that the state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\].*SHUTDOWN", states) From nobody Mon Oct 2 09:33:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNn5Nd4z4vr17; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNn3knRz4Snf; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBmj+e9Vs71rCMw+1lcyLQ8SZDGYMrVAIdEDg0t3/68=; b=BbApTQI4WpwLpeIsEVuV55EkwkG+ZXNQ9D2M0rzVpwYmDPBbkZzLtfa6iBmKPWST9eIXpN RzigEUdfiu3+nN5UBwFq5wTkGX6eP+pDrZzacvtf6WQ+xvOgjWJytO6lvPy1EbgkR4E/Dx 4rtveTBdMwuzyizYhC1qdK5wzPUv3oKEAQKxhxxjdxLJNNWKBAKRgMijZcQ9+NppAbIvKd JpVlAhlgChm9QOh4ymK7X+cXr3sR1a9eZrtGEYqlWZiIShyd3tELy0/nC4myOLom7kZqvK 1R9fc8f4v/wIvkBFqkZAAl+ruhdmTPbx1bTpmQJ/a5RovY1heLUkC+nmsCZIqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239209; a=rsa-sha256; cv=none; b=hUggAuTXMzoSD+0/huQNsC3B3Qbhi8/BRRKa6l56FJuk3MeY2O59L/ipDnSFtJ/mzx6Mcy dTLT65Z8KupqGPLTG2Hk3dSFyC+9QaONJArd4YUrXqOPniJVKM+J6SNWdM6db7y3xfVG+I 9ju3n9/+F3KPQa+BSJihBSxXwZLdDtzIJCMinjPU6UtGipa9brFkOh24NyPCk4xyM1BU39 R0oHyH5Tjbzyn32b/FxgLGdEZUc2zTDxTqrp7NehfLArYjM3F0IkXnGDzeKzD4DmACTjE7 8jZwGJT/hv3qYSUTiXjr0iOPAB5cD9EgDsKa366e9Pby/16IekmbJm8mjpGLEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PBmj+e9Vs71rCMw+1lcyLQ8SZDGYMrVAIdEDg0t3/68=; b=Vauksy6Mh7qobAspwhnQNIHibZr2LfN3K655zZqnpbbflG99a2SAzFqKirL+kTLLe4L1ZD fXZidR9Aq/ijXYjqdaTLRfsbM3vXcYdBwgm6r1xhiTsw9k4f6N5DsaYXGGFLT/S4vAuLKF v4CPfOPBLO3Z0zM1fL4pxmmL85hLifdtEhxGHvrncd4WRTaWeFRTqgIENUzM9WTdEuRcQc Yrfw393i+0DGLvxnOsQiaMQ4oNpEHjgDsy/nctoq7LVwlq0aUj0a+GvmGQJyXdYin694yY JvgqzIKFgeX8gXKsFHSIcWO2dlavTPNinnfeduRqvLUl7o87SCj7zrHGcEtWew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNn1yX2z15xV; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XTk1003336; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XTHP003326; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:29 GMT Message-Id: <202310020933.3929XTHP003326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: bcad901cbfda - stable/14 - pf: ensure 'off' is always set before use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bcad901cbfda785298740cf6e0271b874d348503 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bcad901cbfda785298740cf6e0271b874d348503 commit bcad901cbfda785298740cf6e0271b874d348503 Author: Kristof Provost AuthorDate: 2023-09-28 07:04:32 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: ensure 'off' is always set before use If we bail out early from pf_test(6)() we still need to clean up/finish SCTP multihome work, which requires the 'off' value to be set. Set it early enough. MFC after: 3 days Sponsored by: Orange Business Services (cherry picked from commit aefda9c92da6571d405e1b27c5c68333ad8bbc57) --- sys/netpfil/pf/pf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6a8ba7be56cf..9e6cd7fae492 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7698,6 +7698,9 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.af = AF_INET; pd.act.rtableid = -1; + h = mtod(m, struct ip *); + off = h->ip_hl << 2; + if (__predict_false(ip_divert_ptr != NULL) && ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); @@ -8249,6 +8252,9 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.af = AF_INET6; pd.act.rtableid = -1; + h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); + /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; @@ -8256,6 +8262,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } m = *m0; /* pf_normalize messes with m0 */ h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); /* * we do not support jumbogram. if we keep going, zero ip6_plen @@ -8272,7 +8279,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.tos = IPV6_DSCP(h); pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); - off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); pd.proto = h->ip6_nxt; do { switch (pd.proto) { From nobody Mon Oct 2 09:33:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNp5MLWz4vrfJ; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNp3zYvz4SsL; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3GD4ZxX2R/383VXRLf0pO5gY918xFnS1A0tzZiBfGI=; b=WrvOaYLjXr6u/6UIQpD9tBQN9MetFk/zAFHlniPAz0SDaiingXXPTpxcIKAp45AajP1qVg 66YcwbtBmA2xAwqEL7K4V1VfwwiZ30DCSE8x1gcaMoe2NKkT3fK5uycsDa+8PWdjRkZIDn cB3igCmsVQUP3VH6dQgVWfhgy1nhJYygt4nWX0R6NY1VTgyFC8BhMlcQV+dOnUZYx636CF QvUWFa92J5eT7BPCHHAjmteCgueQfAUNWeEVJcfBXcxonuzd2HIOgvZhZSp59d6b5dDsSN T1+YmLzOxGiPIWxSPuAv1YXuI9CD77ELx+fE6h3FGB1UNCIitnrXAmsl66/4Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239210; a=rsa-sha256; cv=none; b=L2yniY/IzsR8+1miAsUBIasujCRyZ2qelwGJ8hqfzR9OV883Ck7M1qcw+Z/78af/QUB6MV xEBSDF9AO6E41ZpFRlAS6zobcuyufpOZaHNAzSkkbBxZGhuzpXbVRcr812e8Ok9V+sJ3DH 8UkZPkWRQNgs2aIh5OdsgyfbSetB7sSSQ7ZJ6clzhDfzo/3bEQPXIu6Qe08oqRf7XFoxJh 3Xov9Wy5mRwBI+Fy1LUaEuR8PCE/qDycMnzhNtf1uD6w4qt/IZEitpr7rES1JyNN2bnhp9 OvmB0TO7dTpLsPLiCtCmfij0NX97IUum6jfy0ZFyV7NFAIA4WMxW/ZWu8+kk2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3GD4ZxX2R/383VXRLf0pO5gY918xFnS1A0tzZiBfGI=; b=HD1A0IYVwrZepE9a3rHmjl2yKbiZF27HkrS81Syc2NHxpl33tPxAzech4fzW41InJgJN0C 7Mn7QeZBYR5yiGaeMm5GdLUbv79L9Uqe9SDU8CDms1wfmthj/uBInFiZxH6XEbIQ7TcElF zd1qWbbI3Afko9KV52haqTwjrpjM72aHKWqadpbklT0nLZGM32dpxAdbZisF5NYYR3A61O IzzVjn2k2jXBcCxYm7eiF3NtjkXmZc+F8YyVjRA7vGZxECRbmzmQtmRX+7eNHiKa5kmq+Y aJ6w9hICyhBo4sgV9aZfl1ik0+ywdOitPKxZm6QF2T0hFDw/x2IbD847R3NbBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNp2pCdz16CF; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XUOg003448; Mon, 2 Oct 2023 09:33:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XU9c003444; Mon, 2 Oct 2023 09:33:30 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:30 GMT Message-Id: <202310020933.3929XU9c003444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 3ab984bbe014 - stable/14 - pf: only create sctp multihome states if we pass the packet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ab984bbe0144f029d27a9ca0628b1f47a419688 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ab984bbe0144f029d27a9ca0628b1f47a419688 commit 3ab984bbe0144f029d27a9ca0628b1f47a419688 Author: Kristof Provost AuthorDate: 2023-09-29 07:23:43 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 09:32:14 +0000 pf: only create sctp multihome states if we pass the packet If we've decided to drop the packet we shouldn't create additional states based off it. MFC after: 3 days Sponsored by: Orange Business Services (cherry picked from commit 480f62ccd8d998e4db9dc13c354a60f8f5e32a33) --- sys/netpfil/pf/pf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9e6cd7fae492..3e1c8d32add9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -310,7 +310,7 @@ static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, - struct pfi_kkif *, struct pf_kstate *); + struct pfi_kkif *, struct pf_kstate *, int); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5921,10 +5921,10 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, static void pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, - struct pf_kstate *s) + struct pf_kstate *s, int action) { struct pf_sctp_multihome_job *j, *tmp; - int action;; + int ret __unused;; struct pf_kstate *sm = NULL; struct pf_krule *ra = NULL; struct pf_krule *r = &V_pf_default_rule; @@ -5933,11 +5933,14 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + if (s == NULL || action != PF_PASS) + goto free; + switch (j->op) { case SCTP_ADD_IP_ADDRESS: { j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); - action = pf_test_rule(&r, &sm, kif, + ret = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); @@ -5986,6 +5989,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, } } +free: free(j, M_PFTEMP); } } @@ -8154,7 +8158,7 @@ done: PF_STATE_UNLOCK(s); out: - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } @@ -8711,7 +8715,7 @@ done: out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } From nobody Mon Oct 2 09:33:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNp5MMWz4vrNJ; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNp3gJNz4ScJ; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6wojtKVYg9yT4QP6OLLJPVaHnInUN9D1btF0J4fXG0=; b=r7mjATav3+vkqS5LH3WS98r6C8VAV7p5HbZBFhaFIGLkffw9NE+PmTjQwADbd0eNrhUPwa pksT0lpT/S4JQaCBBCbin23i9YL6UYks7EeOoP2FCjqLmvarPp/yjj7EkfmIku9ZCg+B6j xuRV8XkXqsNlsI8N5wATeAjX9hSI/JLMbWISj3TVb9nU00eaz0eYg643V4zSg8zBwSq/p3 72j6btqRcX08/g1gM4jDtoBmpj+SszF1yjT+9OFVH+YIAnpjHQAU5cXJ3W4WCMcMbqIZNr PIUshYiI6SntiG2Oy6LLVEYmwrCNmYat9GwWpF+E4jQMxGmgBiBNCtxRdXjNig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239210; a=rsa-sha256; cv=none; b=k6miQubbD2WrqRZ1l/exbBjLAj8BCxGwrXTAZi+tzgtLXVI9kejSjrXc6BlMdhW5N7U2pG ywqpc+Tdle+JMr/UmQR2LDMer8Ck9hVx4VBiq/wq6il+UqXP9rNiW/y7sMffiwiQ+uzP4B qmtSo6yFOsAxAgkgsrjZXGM5y1wxrBvS/caB2iC0GhoK9oSMCxOgKwcvfC2/WVrBPyX+ib DYXH0/8oq4hpRKSmzKwqD9zP4A1XluTTVHqBVxzLE5h9zebSyhwrbXgffC2EUijlaTK3k/ O0DQwti1l0yCtY8X8u3BmMMYFDXYYI5vAJHW/Or8R8afBALpwV6tlQ7dNVR2DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6wojtKVYg9yT4QP6OLLJPVaHnInUN9D1btF0J4fXG0=; b=s/Fo+Ai3Mt1rNv6dUPadqaFHFbzsAl0jAnw5HaiV/2vQ/s/loltspU5vXBk68pAUjudHfH M5wE2eVAo305NGTkEWGiyrk7zRa7VpE34ta+1cufjbmTRfELpYlVZaT1DbEom01bvZvpRi 8mhxsTgiwnujJUsjccHbEM1zb3FscEdy2PndOX7Von9GOLhZ2qjHaopgfAqg7VrLwytJqR 9c7mb80JfaXmtGRtCmMBJcxATnuQmK/s+SWeRuU3R9jTMipCFSZBvov+4c7RtbY8z1f5Hc IxPSl9/dOpBp0ysNv3jeh4mYD8z+rbux0mn84cmFkaq3AfPeomr27eh+BddG9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNp2mznz16YB; Mon, 2 Oct 2023 09:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XUD4003447; Mon, 2 Oct 2023 09:33:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XUuo003439; Mon, 2 Oct 2023 09:33:30 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:30 GMT Message-Id: <202310020933.3929XUuo003439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: cf9e678c1a84 - stable/13 - pf: ensure 'off' is always set before use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf9e678c1a8460531f42997de38c5639f6247194 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf9e678c1a8460531f42997de38c5639f6247194 commit cf9e678c1a8460531f42997de38c5639f6247194 Author: Kristof Provost AuthorDate: 2023-09-28 07:04:32 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf: ensure 'off' is always set before use If we bail out early from pf_test(6)() we still need to clean up/finish SCTP multihome work, which requires the 'off' value to be set. Set it early enough. MFC after: 3 days Sponsored by: Orange Business Services (cherry picked from commit aefda9c92da6571d405e1b27c5c68333ad8bbc57) --- sys/netpfil/pf/pf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 55942fcf4338..5f94379d58fa 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6876,6 +6876,9 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * PF_RULES_RLOCK(); + h = mtod(m, struct ip *); + off = h->ip_hl << 2; + if (__predict_false(ip_divert_ptr != NULL) && ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); @@ -7356,6 +7359,9 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb PF_RULES_RLOCK(); + h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); + /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; @@ -7363,6 +7369,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } m = *m0; /* pf_normalize messes with m0 */ h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); /* * we do not support jumbogram. if we keep going, zero ip6_plen @@ -7386,7 +7393,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.tos = IPV6_DSCP(h); pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); - off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); pd.proto = h->ip6_nxt; do { switch (pd.proto) { From nobody Mon Oct 2 09:33:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzbNq6LYnz4vrHB; Mon, 2 Oct 2023 09:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzbNq5bKBz4SlB; Mon, 2 Oct 2023 09:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Xhe6IA1r7VJwg0lyiP3xKA2kL48V48tw2LpdcvmXCE=; b=ot6/CTYCxFRHemDh8QJx8RKUTtP0bqlLvOTYCcR9Wglu0BIlH7nTGQVOyHWnqlxo87k9h6 M10QAtxZExCHEo20/S0hZsPlSWCnxLthrjNyjUGhhkVocsWQ1rkA1GTfMVRFShB63YXdbz kuSZZrZ6DTBlqUn1Z3h5/uc4lIVBrzo5UZ/sAv3k6JUFyEGwmLtT6kVjPIErKr5qnYVVH2 Ghggl0Tx02G/0Qq6PYdiwK+IGzd8kAk7as0G5OLeLqNRAvbA52R4aImzR9aFbI+lcJWFoJ 68q7fsH2c1QNzUrGuReBsvgTvXwpKjpqk/41mRODJ1Rj0aKMTYvywgkW1qqjOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239211; a=rsa-sha256; cv=none; b=CrQyuVNVcu1S+xP9UrJ1qw4YIJ/MyQZuaW2dfWoZVW1KzVGuLv3UcDPfOrC5B4S4+8++BJ 4PV7v/e/ReRTt6W8NjjB5gnU7yVIpJRTVsb79tvEdOpGY07fVR7ONhpzlysl73DfU+Zjp1 Sa/1zIXYAkWDrB5vicRrt9ZYvCVpy0aIbwZqOIQVUtmqtGV7QhCesBDUJkBOnURLY04y0R oI1QkONPvaPRtknUNI5APkPiNRqA0zj1sFrQU6XXDCoQCsa5DaEhQrAX0mFIPHqnv6Vq0D 5adMTk5A86x551m2Q/lljPRIHkFvwl1uK1kGAm0aX5bI5m8ZDDVXTbmtogX87w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Xhe6IA1r7VJwg0lyiP3xKA2kL48V48tw2LpdcvmXCE=; b=cl8sPcEQtQ/BHNPFZTtFPspuMUGBZVXeB31nkp3yXe/Gy39M1DnxCnLxd9nrdF3XJSp8H1 Hmf2Z7RjG323+tslA44dNkH1JfI2zAmnSlwbM8Unmn43jRkS/vd1gDADuWpH0UCEsxcYI9 7YT/bVkhpQ64wc1P6NPqgVBx8S6r20PXuUj6+bVxuTaLzC8ODWTlpho/Yjr6gwWr7BjgEX qOS8jIL72qB2RwgT6BLQOid4IHkylSO6wdTiK3vtevcTnzsDNpe8Z81evpuv4h53Xb6ZX0 lwY+I/dS7NLdVcoZOSDAjlPtPfUpM4fh5WNkGGrSDU2bir8jxoud9rJoRsNTYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzbNq3tmjz16LT; Mon, 2 Oct 2023 09:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XV12003559; Mon, 2 Oct 2023 09:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XVXX003540; Mon, 2 Oct 2023 09:33:31 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:31 GMT Message-Id: <202310020933.3929XVXX003540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0ca691ad1612 - stable/13 - pf: only create sctp multihome states if we pass the packet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0ca691ad161253a123d9dac9e65953fe382920a5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0ca691ad161253a123d9dac9e65953fe382920a5 commit 0ca691ad161253a123d9dac9e65953fe382920a5 Author: Kristof Provost AuthorDate: 2023-09-29 07:23:43 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf: only create sctp multihome states if we pass the packet If we've decided to drop the packet we shouldn't create additional states based off it. MFC after: 3 days Sponsored by: Orange Business Services (cherry picked from commit 480f62ccd8d998e4db9dc13c354a60f8f5e32a33) --- sys/netpfil/pf/pf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 5f94379d58fa..501d9eef57cd 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -291,7 +291,7 @@ static int pf_test_state_icmp(struct pf_kstate **, int, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, - struct pfi_kkif *, struct pf_kstate *); + struct pfi_kkif *, struct pf_kstate *, int); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5343,10 +5343,10 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, static void pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, - struct pf_kstate *s) + struct pf_kstate *s, int action) { struct pf_sctp_multihome_job *j, *tmp; - int action;; + int ret __unused;; struct pf_kstate *sm = NULL; struct pf_krule *ra = NULL; struct pf_krule *r = &V_pf_default_rule; @@ -5355,11 +5355,14 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + if (s == NULL || action != PF_PASS) + goto free; + switch (j->op) { case SCTP_ADD_IP_ADDRESS: { j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); - action = pf_test_rule(&r, &sm, pd->dir, kif, + ret = pf_test_rule(&r, &sm, pd->dir, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); @@ -5408,6 +5411,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, } } +free: free(j, M_PFTEMP); } } @@ -7310,7 +7314,7 @@ done: PF_STATE_UNLOCK(s); out: - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } @@ -7803,7 +7807,7 @@ done: out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } From nobody Mon Oct 2 11:50:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzfRB5kBgz4w0Rl; Mon, 2 Oct 2023 11:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzfRB4zCwz3HbS; Mon, 2 Oct 2023 11:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696247446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQLbI1o0wxbq+n9XEuyb6CkWdBPtJ0X3rxDQYA/j2j8=; b=acTZuUXM/PTZw1XxVhkk190h8yPcQFgyryX/raFIfo8YR98oguCaYpDOcb4wqpLwpSHKYW dEVxxQ9Owh4saTmQWxaFlOCYrRK+8vObYyXRERlKP/nqTIiEbLf3rGrHfnmbWZDWkVJjRZ cWh+iyNGMsKlNmO+pBoA5mXprvXvEF/FTN73OzpG+l4pBJA+332THdhaepcRhDI53nNaBB kDB4yKAmBDGDuWTD+kRdwKWX6RaJR9act94QV9FIfztdP5+GtOHIGkOvQfO2dhdehTDdwQ 4luyp/+taq01hhW0ixy484upbXKquoqYGiNf34fy01r9raU9Gshpn4+Xr7l59Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696247446; a=rsa-sha256; cv=none; b=BttS9IN0EpD/0NdN/mnmlPmPWIidI8B9/B6Gdq5S0kGYZ6kJkbiULoX/eK4ryidj3lUsDf FyI4HGDJebpaJUcXF6w3WCleEJnXyvyl9sR4RADbRcUGFDCA+d/md8OPRXboLLk1ZZq8Sd q4olw8m1q8y9m/hfrsf4foLYSugzP4oPeFtNYTeMQiPYXisgWJabY+e5J+YZ/7PLOVKOz0 x87geTo6gqysEPrKd6pcd6GfWO5aHA02d3fMz5O87oJ1bG+uLUJIgG2FVjt1aZyq5LFDSI 7N9YHbrZVz6969+fzjeGzUEi7FP05M0/51OpADwFGwgT9S7gBUPxCKu44OqCXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696247446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQLbI1o0wxbq+n9XEuyb6CkWdBPtJ0X3rxDQYA/j2j8=; b=DWeRYwDlmbVrokcK7VVrn8vCZuxHVL1sdiLLXCcDSzo9NBN2ksCg6YxD5cS3sQV/VyiDix 9uY9SSjnjLg32UdIQg61btjzV6AmpvVZQpbBEoPitHOZHtQzGVCqug0tvPEiUwEERMqfEy ELco9fp6bGwgpVkLBWHhRynlAsbCAFFSChdHpH1scLhfP9WtF+1ueXBSo5aLfGszFhnQCl rMwHT2YCz3LmVvgSBiGp23RpFvYB6rNHGMiF8iQruMvbifcf2xvDip/UMeQYbxMxScayKu yLp+d1fJXDrqK+XyEqvND04GvIAaLGdQdUcMWuFpfpvqzhE3hEMl4vVSIeElIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzfRB43ZJz19R9; Mon, 2 Oct 2023 11:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392BokwM028390; Mon, 2 Oct 2023 11:50:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392BokhA028387; Mon, 2 Oct 2023 11:50:46 GMT (envelope-from git) Date: Mon, 2 Oct 2023 11:50:46 GMT Message-Id: <202310021150.392BokhA028387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e61568aeeec7 - main - swap_pager: Fix a race in swap_pager_swapoff_object() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e61568aeeec7667789e6c9d4837e074edecc990e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e61568aeeec7667789e6c9d4837e074edecc990e commit e61568aeeec7667789e6c9d4837e074edecc990e Author: Mark Johnston AuthorDate: 2023-10-02 11:49:27 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 11:49:52 +0000 swap_pager: Fix a race in swap_pager_swapoff_object() When we disable swapping to a device, we scan the full VM object list looking for objects with swap trie nodes that reference the device in question. The pages corresponding to those nodes are paged in. While paging in, we drop the VM object lock. Moreover, we do not hold a reference for the object; swap_pager_swapoff_object() merely bumps the paging-in-progress counter. vm_object_terminate() waits for this counter to drain before proceeding and freeing pages. However, swap_pager_swapoff_object() decrements the counter before re-acquiring the VM object lock, which means that vm_object_terminate() can race to acquire the lock and free the pages. Then, swap_pager_swapoff_object() ends up unbusying a freed page. Fix the problem by acquiring the lock before waking up sleepers. PR: 273610 Reported by: Graham Perrin Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42029 --- sys/vm/swap_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index e548c2d16a0b..38151b3be96f 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1890,8 +1890,8 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) if (rv != VM_PAGER_OK) panic("%s: read from swap failed: %d", __func__, rv); - vm_object_pip_wakeupn(object, 1); VM_OBJECT_WLOCK(object); + vm_object_pip_wakeupn(object, 1); vm_page_xunbusy(m); /* From nobody Mon Oct 2 12:09:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzfsH2K16z4w1Nw; Mon, 2 Oct 2023 12:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzfsH1m88z3Kqf; Mon, 2 Oct 2023 12:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696248595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbxFeYwcD2kkCjy43uLku2aexFM9/bc3iUTucSb9L9s=; b=yicxgLJWc/vJ55q7JRR1IaLpMJAW9cHEa+15W9H1OW0h93E84HZIuLTBpAu5Jb35vQW4k9 jHQU9h3aHz2wCAGLwsKNZKm737Qu6CDIw36STDnxKjsyYMYAvqgTWo6iDK2WJ40BQSMP6Z 58YSQspwv/zYaHG6nU9EV18kqw1jPaKV3Et8h8f/KRjosJLjPSltfaS/tIG5rL4JkL0xkH zu5BNXE0DMsG3zD3bS/gThVrEbdQilTz03+4uhLXwIDNFbEBOqg+upRM5wzaEiMMcXmchG kg19z662McET0kxV/ctK9pmRgUqmzdchSvoCaT4h9HfxWBL1dNxRM7kcFKp9TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696248595; a=rsa-sha256; cv=none; b=PYm9+1WuiltbaAFxW2sMhnh2qi0phQqZy+N+2D5wTB35IeP3/r+bHDIaAJ6cWoCCsqPa8T HN6gzB9aQiRvYmZKUaUk2xhsEmO9vvYkEZenjZ4eTyz/q1y7ZJ5ISXa+Vhj9nchs3NCNmW uVp7AMnNW/8cqaVFQYws9gv3Qf0/LjqZqVghngg4sWFiprprrGoC7tWy5Cz6NhDUgx32rs HihzGjuP7xCmiWcTkq32yFd7I0B2ePudA3npsI9L8v91Kt6S9blub9jGi87/iYQ6HpFK/7 YnMnaSMCVdUxnIQP/3RgWBT/txE8Bag7wxqgWkE90VCzs4rx6s3bMTpzHyHElA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696248595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbxFeYwcD2kkCjy43uLku2aexFM9/bc3iUTucSb9L9s=; b=LgMBUCdqBZy/qGWUJGDvKJlxXL/HVDC1l8Xb28d2lUW9foxBZ+iV/TK/3i7Gp6ytpYk3DQ 93oWx6zhiFtCZQ94alDC51qcw6eaAs7hCjFoZpTpUur/v5+/HoJfQvlbdJafbXmrUX1Tv9 kHLhUse4/HLpTKUxk5Cpf4ahB5kEcxtBAGhwqONPJoLGcOuSohEoZk93Q6AtVFXB1PWGa5 DImFV6tEoCi2N8qf6h1BZQCpgk8U8YE36bkgk7LB5gE0EZ4moLLVaIMNjSD20zk+/Dj9hz rn+JDUMP9mATuP3ROQuzKUQ9IZpibsod2Q4m5YUzeiFgKd1XFEN9ljP0ImW1zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzfsH0pqNz1B1h; Mon, 2 Oct 2023 12:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392C9tKJ054179; Mon, 2 Oct 2023 12:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392C9t0x054176; Mon, 2 Oct 2023 12:09:55 GMT (envelope-from git) Date: Mon, 2 Oct 2023 12:09:55 GMT Message-Id: <202310021209.392C9t0x054176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d94d07d58141 - main - netdump: Check the return value of ifunit_ref() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d94d07d58141dcff48f01c6b3e5a31de9d7a7938 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d94d07d58141dcff48f01c6b3e5a31de9d7a7938 commit d94d07d58141dcff48f01c6b3e5a31de9d7a7938 Author: Mark Johnston AuthorDate: 2023-10-02 12:08:20 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 12:09:26 +0000 netdump: Check the return value of ifunit_ref() We may fail to match if the specific interface doesn't exist or was renamed. PR: 273715 Reported by: grembo MFC after: 1 week --- sys/netinet/netdump/netdump_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/netdump/netdump_client.c b/sys/netinet/netdump/netdump_client.c index 35167f690ed2..0f0cf4dbb79f 100644 --- a/sys/netinet/netdump/netdump_client.c +++ b/sys/netinet/netdump/netdump_client.c @@ -451,6 +451,8 @@ netdump_configure(struct diocskerneldump_arg *conf, struct thread *td) CURVNET_SET(vnet0); ifp = ifunit_ref(conf->kda_iface); CURVNET_RESTORE(); + if (ifp == NULL) + return (ENODEV); if (!DEBUGNET_SUPPORTED_NIC(ifp)) { if_rele(ifp); return (ENODEV); From nobody Mon Oct 2 12:56:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzgtW0stVz4w3NR; Mon, 2 Oct 2023 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzgtV6Lymz3RkV; Mon, 2 Oct 2023 12: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=1696251362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1rFiiXzi/E82UKLNQT2TY/UmFpkqy2FrY+oeFMFAjk=; b=v7FNKAgjA8+fJnErz1QbJC+RWFQlTB7fP/9W+7LLvNrqBXMeIBzvlmbzUKZxGf49aglLON FssxzQU1s5Bz1F2aCVVGTYq7zeBs1cGnf5wy0hKAdEhKb/agy3ONExHY6cibMXnzpKRb3b t/4tC5xVxuzdhsFBiNIbJATIF5XLJj4Q147oEF127sfl7/tTwzuPPltpwaoLyeOFiLAiIz 22vmEjdknLI0gwW5LtywOkFhs5VNIR8BWi8WpBqklivIJGArkzGbIM+2DLPSWOrd5eU9RD DUSRvweIgEmndRjIFO/vVQ+LTZ8ieELlsuDBL2Rg/G+/O9kW/spXWmnmF/Udsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696251362; a=rsa-sha256; cv=none; b=yNfzTPrQZxbGelf34tYOf2s42NoEM9wqE9mJILg284VZG5XgrI8oBI4xKloZnSyZcvbHar b204lsxKLszSOmQH3tmOqD0DrLr9Qf0kOFdIkedC6b2gkTRrvkxJd8KhNAgBWow6/32qww nP9h3SUPNffQsQvfR56N86F3l7p5vvE9wr22sv2FrNhsH1sZMeZ13nXmbVk7qXs83eff1S NiFiuc91CQRCouZ3cWDDvnueOegQzYZHwhO4OBFE3rOZHFukT/iH+QXhsKss7NNoKB4qH9 PxUMkLQHUBPHSAPW1tNIlS+CUd0dc70r17zrbLaZSMHa6fG0P+wHGajtHakrTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696251362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1rFiiXzi/E82UKLNQT2TY/UmFpkqy2FrY+oeFMFAjk=; b=Dw5XvSBam/pYUMgFcAsoRUlxDa2wELAyHJufSEezvHSxdlHCVyyk2dsyFtO1TKXkHUfiSO LL8GYlMsfKHdehluKU9fLQYwZsPPjPU0O99Y0FD6dcinGoD6fIB8jnbjOQGF05Y4udblqp Ixjhz+S7MTo7kXhQBUpSwP220z9GFuN4YYYMJ1KVo8pRWf3Fg8feAlo5MGBxQNt0BPcpjm oqUH2XbsqK9VriNoBv+ezf00ZjpJEm8squ8tOI2eAUlWVwziK9O3f07kXp6+kzAs7saiEQ O1ySvsJpvNv5TLLI6Md/0vXqQ5aejTL8g2p4vVJ1G0Hi2qt4K9+ZltcaJV2wuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzgtV5Rx7z1CK6; Mon, 2 Oct 2023 12:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392Cu2sg035983; Mon, 2 Oct 2023 12:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392Cu2Zu035980; Mon, 2 Oct 2023 12:56:02 GMT (envelope-from git) Date: Mon, 2 Oct 2023 12:56:02 GMT Message-Id: <202310021256.392Cu2Zu035980@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: ca79521be1b8 - stable/14 - amd64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ca79521be1b87b82381e091e36123471ca5648cc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ca79521be1b87b82381e091e36123471ca5648cc commit ca79521be1b87b82381e091e36123471ca5648cc Author: Bojan Novković AuthorDate: 2023-09-15 10:41:10 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 12:55:49 +0000 amd64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping This patch reverts the changes made in D19670 and fixes the original issue by allocating and prepopulating a leaf page table page for wired userspace 2M pages. The original issue is an edge case that creates an unmapped, wired region in userspace. Subsequent faults on this region can trigger wired superpage creation, which leads to a panic in pmap_demote_pde_locked() as the pmap does not create a leaf page table page for the wired superpage. D19670 fixed this by disallowing preemptive creation of wired superpage mappings, but that fix is currently interfering with an ongoing effort of speeding up vm_map_wire for large, contiguous entries (e.g. bhyve wiring guest memory). Reviewed by: alc, markj Sponsored by: Google, Inc. (GSoC 2023) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41132 (cherry picked from commit aa3bcaad51076ceb346fa0c64ab69a35e5241b20) --- sys/amd64/amd64/pmap.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b10997fd657b..ff83d8749313 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -7493,9 +7493,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, pd_entry_t oldpde, *pde; pt_entry_t PG_G, PG_RW, PG_V; vm_page_t mt, pdpg; + vm_page_t uwptpg; - KASSERT(pmap == kernel_pmap || (newpde & PG_W) == 0, - ("pmap_enter_pde: cannot create wired user mapping")); PG_G = pmap_global_bit(pmap); PG_RW = pmap_rw_bit(pmap); KASSERT((newpde & (pmap_modified_bit(pmap) | PG_RW)) != PG_RW, @@ -7592,6 +7591,22 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, } } + /* + * Allocate leaf ptpage for wired userspace pages. + */ + uwptpg = NULL; + if ((newpde & PG_W) != 0 && pmap != kernel_pmap) { + uwptpg = pmap_alloc_pt_page(pmap, pmap_pde_pindex(va), + VM_ALLOC_WIRED); + if (uwptpg == NULL) + return (KERN_RESOURCE_SHORTAGE); + if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { + pmap_free_pt_page(pmap, uwptpg, false); + return (KERN_RESOURCE_SHORTAGE); + } + + uwptpg->ref_count = NPTEPG; + } if ((newpde & PG_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. @@ -7599,6 +7614,14 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, if (!pmap_pv_insert_pde(pmap, va, newpde, flags, lockp)) { if (pdpg != NULL) pmap_abort_ptp(pmap, va, pdpg); + if (uwptpg != NULL) { + mt = pmap_remove_pt_page(pmap, va); + KASSERT(mt == uwptpg, + ("removed pt page %p, expected %p", mt, + uwptpg)); + uwptpg->ref_count = 1; + pmap_free_pt_page(pmap, uwptpg, false); + } CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (KERN_RESOURCE_SHORTAGE); From nobody Mon Oct 2 12:56:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzgtX0wmnz4w3W9; Mon, 2 Oct 2023 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzgtX0H6Xz3Rh9; Mon, 2 Oct 2023 12: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=1696251364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zktQO9aKE1jUtHA5ajl/JWUN5GWPWiR5Ux284IWEGWI=; b=HfKXmjdCfsb3ZAgSLwuW9Wx0ZVIsJGrQBVSX/Sjdq8wZ5kFJqVY1QpGMYfGaZ3usHspPq7 j97bMHEnb4lhx6QonpcJ1DmzRFPSg+cFn8fVrh5MM9a7mBntmyjU4oNu6TOtK8CGyxDNR0 f7Y/y9nsn6YGjJMouNu/cbF/gx8Q9y4ywy1PDNTrD2mSoW+boQ/HvTm/qOQFf14r/x3kLF JPZikuTjj9kTD7lbkhBfQMbw71QRknxRENP9EXrdmCMgQvgWgr9CWiWZF0m0zmMOE4ShC3 brEFAwurEaQB+fILXp+aQELUxy6gS8Etye9yBBi3/WnUiDVsbiQZQ/lZJedslQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696251364; a=rsa-sha256; cv=none; b=LCTqOfzSJP83ty0oGfgd5mJxS+T2gHmXZt8vdIUxhPzj4RgBvG8e2+e9R3eWn5Z4WfqDtq JgR50H3pzJ+388wp695VqF2K7kFtx66W/8zYhE3ZITLlDIrPdVnsPWImH6U4HOMK9Jdtfl DAXAMkcCdxyKNkK41XdilQ5T71s2QRQh7Uxk94tt3nuKpJ5s/4GkJhTEjbk11MNn820IsB kinTeetiENyTTMZcGHZHAzEz7au1r3Ja4hG87RPh8rrEAkBPHUuU8w5rDuhjecmJ/FnWxU o2ql9R/e/C4jwdKTr/BUDDyMwbB5CU1f5jivcvuXEO6/M0YY19dUJTK6lYXFKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696251364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zktQO9aKE1jUtHA5ajl/JWUN5GWPWiR5Ux284IWEGWI=; b=n6mmyv17AWxMcuD0sT9SNp3xU6BMfeCRZo7two0PadkTHHhUIcy8pH+534Jsc1fgWjBLwR 5ZfHIfhU2+vfRkEt2LQ11DyBh1ouO/8K5QyUTp8FLD9bOjZk2nMF6aiM4Xg8fmt7hHrk1C sP26EecyZkfFDipYqPtyJ3imfyRD58Z0VZd751g8fmaoxy22Nim79cjO8rDgXVPvxlIjWI 6mucdPKVY6Gp0h6oFRyMhlA4tVX6hBgDzlyEVpGHaGxCqqvhIxf7NPpWQk/6+O88ZKxOm8 fAh2CJzYqTfCo51BFXesGj7X62EL3wEVn5KEe+mTB+YlMgsolQheI6ULJWgp0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzgtW6FRYz1Bqd; Mon, 2 Oct 2023 12:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392Cu3Je036028; Mon, 2 Oct 2023 12:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392Cu3rH036025; Mon, 2 Oct 2023 12:56:03 GMT (envelope-from git) Date: Mon, 2 Oct 2023 12:56:03 GMT Message-Id: <202310021256.392Cu3rH036025@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: 98504b647138 - stable/14 - mlock tests: Add a regression test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 98504b647138897f9c171b6e6d348c4f7bdb3a0d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=98504b647138897f9c171b6e6d348c4f7bdb3a0d commit 98504b647138897f9c171b6e6d348c4f7bdb3a0d Author: Mark Johnston AuthorDate: 2023-09-15 16:28:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 12:55:49 +0000 mlock tests: Add a regression test The test tries to trigger creation of a superpage mapping in an mlock()ed region. MFC after: 2 weeks (cherry picked from commit 8f26ed01bd74aab21309ac04ae1d1368a6346c90) --- tests/sys/vm/mlock_test.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/tests/sys/vm/mlock_test.c b/tests/sys/vm/mlock_test.c index f0c76fe86b56..8c8ce4a2e8de 100644 --- a/tests/sys/vm/mlock_test.c +++ b/tests/sys/vm/mlock_test.c @@ -28,11 +28,15 @@ #include #include #include +#include #include #include +#include #include +#include #include +#include #include #include @@ -161,12 +165,122 @@ ATF_TC_BODY(mlock__truncate_and_unlock, tc) ATF_REQUIRE(munlock(addr, len) == 0); } +/* + * Exercise a corner case involving an interaction between mlock() and superpage + * creation: a truncation of the object backing a mapping results in the + * truncated region being unmapped by the pmap, but does not affect the logical + * mapping. In particular, the truncated region remains mlock()ed. If the + * mapping is later extended, a page fault in the formerly truncated region can + * result in superpage creation via a call to pmap_enter(psind = 1). + */ +ATF_TC(mlock__superpage_fault); +ATF_TC_HEAD(mlock__superpage_fault, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(mlock__superpage_fault, tc) +{ + struct rlimit rlim; + void *addr1, *addr2; + size_t len, pagesizes[MAXPAGESIZES]; + int count, error, shmfd; + char vec; + + count = getpagesizes(pagesizes, MAXPAGESIZES); + ATF_REQUIRE_MSG(count >= 1, + "failed to get page sizes: %s", strerror(errno)); + if (count == 1) + atf_tc_skip("system does not support multiple page sizes"); + len = pagesizes[1]; + + error = getrlimit(RLIMIT_MEMLOCK, &rlim); + ATF_REQUIRE_MSG(error == 0, "getrlimit: %s", strerror(errno)); + rlim.rlim_cur += len; + rlim.rlim_max += len; + error = setrlimit(RLIMIT_MEMLOCK, &rlim); + ATF_REQUIRE_MSG(error == 0, "setrlimit: %s", strerror(errno)); + + shmfd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600); + ATF_REQUIRE_MSG(shmfd >= 0, "shm_open: %s", strerror(errno)); + error = ftruncate(shmfd, len); + ATF_REQUIRE_MSG(error == 0, "ftruncate: %s", strerror(errno)); + + addr1 = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ALIGNED_SUPER, shmfd, 0); + ATF_REQUIRE_MSG(addr1 != MAP_FAILED, "mmap: %s", strerror(errno)); + ATF_REQUIRE_MSG(((uintptr_t)addr1 & (len - 1)) == 0, + "addr %p is misaligned", addr1); + addr2 = mmap(NULL, len, PROT_READ, + MAP_SHARED | MAP_ALIGNED_SUPER, shmfd, 0); + ATF_REQUIRE_MSG(addr2 != MAP_FAILED, "mmap: %s", strerror(errno)); + ATF_REQUIRE_MSG(((uintptr_t)addr2 & (len - 1)) == 0, + "addr %p is misaligned", addr2); + + memset(addr1, 0x42, len); + error = mincore(addr1, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + if ((vec & MINCORE_SUPER) == 0) + atf_tc_skip("initial superpage promotion failed"); + + error = mlock(addr2, len); + ATF_REQUIRE_MSG(error == 0, "mlock: %s", strerror(errno)); + error = mincore(addr2, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + ATF_REQUIRE((vec & MINCORE_SUPER) != 0); + + /* + * Free a page back to the superpage reservation, demoting both + * mappings. + */ + error = ftruncate(shmfd, len - pagesizes[0]); + ATF_REQUIRE_MSG(error == 0, "ftruncate: %s", strerror(errno)); + + /* + * Extend the mapping back to its original size. + */ + error = ftruncate(shmfd, len); + ATF_REQUIRE_MSG(error == 0, "ftruncate: %s", strerror(errno)); + + /* + * Trigger re-promotion. + */ + error = mincore(addr1, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + ATF_REQUIRE((vec & MINCORE_SUPER) == 0); + memset((char *)addr1 + len - pagesizes[0], 0x43, pagesizes[0]); + error = mincore(addr1, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + ATF_REQUIRE((vec & MINCORE_SUPER) != 0); + + /* + * Trigger a read fault, which should install a superpage mapping + * without promotion. + */ + error = mincore(addr2, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + ATF_REQUIRE((vec & MINCORE_SUPER) == 0); + (void)atomic_load( + (_Atomic int *)(void *)((char *)addr2 + len - pagesizes[0])); + error = mincore(addr2, pagesizes[0], &vec); + ATF_REQUIRE_MSG(error == 0, "mincore: %s", strerror(errno)); + ATF_REQUIRE((vec & MINCORE_SUPER) != 0); + + /* + * Trigger demotion of the wired mapping. + */ + error = munlock(addr2, pagesizes[0]); + ATF_REQUIRE_MSG(error == 0, "munlock: %s", strerror(errno)); + + ATF_REQUIRE(close(shmfd) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, mlock__copy_on_write_anon); ATF_TP_ADD_TC(tp, mlock__copy_on_write_vnode); ATF_TP_ADD_TC(tp, mlock__truncate_and_resize); ATF_TP_ADD_TC(tp, mlock__truncate_and_unlock); + ATF_TP_ADD_TC(tp, mlock__superpage_fault); return (atf_no_error()); } From nobody Mon Oct 2 13:41:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzhtl6Ngkz4w5lZ; Mon, 2 Oct 2023 13:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzhtl5pPPz3Ww9; Mon, 2 Oct 2023 13:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696254079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lrT5bdAtR6+4DsSiUPVp1jk0I5dyhKpKUvT6c3ytH78=; b=DPbbuPiNLvb7LBiTIlvupcrTxAp/MBwH1DUZxpmFfp8imYR5RDjgUILyxyZa90kHfpsQ0B rn2zkXY4ow6gxL7P2hPOEXnnZbV/QLovMxxLoe1QzlCiqsF5Zc6p1zDuvJQOkNNYHWmBbo KQjEtlegu5C3T5wuLjvRDAnMa8+Q6FI1xUi3e6z89SWffCJO6VJbX42yI83uu8zjEgM+e9 04u8hkXLVPg1faVx9d8CtYxKrERwM+BMs3+O/EDeFQ5fKMEaiZiWJRUsxtKnL1OuioNU4Y TQTlAKeBYLgJ1IkrJhJO3ZW5KlT6Lp0SNQc+u1YHHxV1yZ6qJjK5jc5vXtJ/xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696254079; a=rsa-sha256; cv=none; b=cexxSguVbOFdlhf7hNvLvBKDz1jwMid0VcTzBR0kifb2bmDdbljH3CpXSu3HnnGctmV4th 4gcoFlbzKdXakHOuKvNeaVHrmdJhyJuplmWGqInLhKtDy0YumCXUteWBV5C5+zMvQalAMV Q0FFzQFllQIglIhI4YKjs0mBAA/0IUkdd5h1FtVZi3k+qH8DSLY9if2jVjOhUU+yPBBovS 6m03SyB5V6jouFK6okiTNb3N6RN9vfNqev0XjO3RgiqgWS5EpmIB7res4/oIsnVVqLkd+r EJ/+BH4YrBq/KbZEiaxp8iizSImWReBU8otEqjZX1MjWdFhIz2H7Vavs0C1nBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696254079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lrT5bdAtR6+4DsSiUPVp1jk0I5dyhKpKUvT6c3ytH78=; b=fYt2tzoD3ENENpudx6+E+rS5TFft+FeXb4l93NtjosDEDwQcWGpogGw7sWeDzOxXEV8hxz G99L8nhDJUOaooT3PQLRk0yB2S4cUrQHyVEcCbAtNX0Yw1ZOiPAVkb3aI7g7J1Y1iC+mMZ JQGAudrNIpsnTvV3kmJMj/K36z6Pq8JwmYOsEDkMji3rKVu2MnI9HsNNIE7trzoeEkGOx9 Of0Q+vZHxG2BOtnyKcjHOvKrhF6giOZFNbTxqyU38v84rwKOSnRPRPUOKutIJM81rPbL3f VVufE0qVX2dyK5iKOlK6d4JiaMr83CIYHk7P25PchqJeMLkebcg7TFS+T8SDsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzhtl4tDXzFn; Mon, 2 Oct 2023 13:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392DfJ9T012864; Mon, 2 Oct 2023 13:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392DfJAu012861; Mon, 2 Oct 2023 13:41:19 GMT (envelope-from git) Date: Mon, 2 Oct 2023 13:41:19 GMT Message-Id: <202310021341.392DfJAu012861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 773606fcdfae - main - ofwdump: install dependent on MK_FDT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 773606fcdfae00a3f850bcd39969a63d9a8fb129 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=773606fcdfae00a3f850bcd39969a63d9a8fb129 commit 773606fcdfae00a3f850bcd39969a63d9a8fb129 Author: Mitchell Horne AuthorDate: 2023-10-02 13:40:18 +0000 Commit: Mitchell Horne CommitDate: 2023-10-02 13:40:18 +0000 ofwdump: install dependent on MK_FDT The utility depends on the presence of the openfirm(4) pseudo-device, which is gated by the FDT kernel option. The MK_FDT knob is correctly set to "yes" for FDT/OFW-enabled platforms (powerpc* included); use it to install the utility and eliminate the arch-specific Makefile logic. No functional change intended. Reviewed by: emaste, pkubaj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41977 --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + usr.sbin/Makefile | 1 + usr.sbin/Makefile.aarch64 | 1 - usr.sbin/Makefile.arm | 2 -- usr.sbin/Makefile.powerpc | 1 - usr.sbin/Makefile.riscv | 2 -- 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 9af0a319171a..fb22d56d53e0 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2016,6 +2016,7 @@ OLD_DIRS+=usr/share/examples/ypldap .endif .if ${MK_FDT} == no +OLD_FILES+=usr/sbin/ofwdump OLD_FILES+=usr/share/man/man8/ofwdump.8.gz .endif diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index b836bd412077..ca8b87a134eb 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -133,6 +133,7 @@ SUBDIR.${MK_EFI}+= efivar efidp efibootmgr efitable efiwake .if ${MK_OPENSSL} != "no" SUBDIR.${MK_EFI}+= uefisign .endif +SUBDIR.${MK_FDT}+= ofwdump SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread diff --git a/usr.sbin/Makefile.aarch64 b/usr.sbin/Makefile.aarch64 index e819369f4340..a72a085ff618 100644 --- a/usr.sbin/Makefile.aarch64 +++ b/usr.sbin/Makefile.aarch64 @@ -2,4 +2,3 @@ .if ${MK_ACPI} != "no" SUBDIR+= acpi .endif -SUBDIR+= ofwdump diff --git a/usr.sbin/Makefile.arm b/usr.sbin/Makefile.arm deleted file mode 100644 index 3767c8c9e1ca..000000000000 --- a/usr.sbin/Makefile.arm +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIR+= ofwdump diff --git a/usr.sbin/Makefile.powerpc b/usr.sbin/Makefile.powerpc index a6d5b3b35ad4..d6b05857e152 100644 --- a/usr.sbin/Makefile.powerpc +++ b/usr.sbin/Makefile.powerpc @@ -2,4 +2,3 @@ .if ${MACHINE_ARCH} != "powerpcspe" SUBDIR+= nvram .endif -SUBDIR+= ofwdump diff --git a/usr.sbin/Makefile.riscv b/usr.sbin/Makefile.riscv deleted file mode 100644 index 3767c8c9e1ca..000000000000 --- a/usr.sbin/Makefile.riscv +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIR+= ofwdump From nobody Mon Oct 2 14:06:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzjRG0dr9z4w6k8; Mon, 2 Oct 2023 14:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzjRF74Ypz3YlG; Mon, 2 Oct 2023 14:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696255562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6FHhII8e83sLatnG5C9rAdQ3uLORkN5xX2cd33YQ3c=; b=R5QJfRLUwRJ1i8ksZHw65P28oCwbdKcjRugRR/fekcPVE1t6EIm4a27RrBfwjjPoxvOt2K zxIv/YplcivFF7wBz/ymqNFW1WkgFXP/oAAO3foOXzeBPz4v+BwF9/rTZcmmzDoeyvBwNy eFPbqOF3QHhy2uvMRlecQvJwTn21RJ1TDvwCR+9//0rERR4VVc9gv49xdXg6rG0VQZBrIR PkuUeV6miYzE+XuoOAwywAn3OnCQWJCGcg5dWEX9v6khBLE5FZ8neHlH1widT78W2oW1pW 5WgoJsFXsbFHoMIdKjTwTUCL4YFLWiCZbvMTd070D8TslmRXQK+XtI7wI7d8EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696255562; a=rsa-sha256; cv=none; b=kpSPRBsyoAXW4ve0+l4PB8dxaKXOy9J1Sf/1WhbIGmwd1jlqcjmKxm62xbnkxSSXmaxi6b w2uleKxCL9MwFcS2SgECZS/uuJzmzff/ljtiwo8ER0ur2tU2CRerUi29c4N2wEtU/yzesg wEOS8ULudnGadx9UakXA3S3OhL7Ifd9NFD2vdTWbcVri0kwSesx0tuFjShagXXh9mTiQSf xhg9NLk2PS2Cf/hDtZU7anHwxtARQFTCcQYAvYd1k+aK45K7DNwn5ng7pRs9FoDQsqi5lJ +XTpfrTPWaST2NCK66OywYAv0A5AsUnYtuf9eb+LIqoSg2VxA95xdTbrhrt3gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696255562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6FHhII8e83sLatnG5C9rAdQ3uLORkN5xX2cd33YQ3c=; b=HrGduCM9laMS2dCiDeZDAt4NCMSwks2wglspGckRECdSRkK+kLD2vcANcmfCz1tuQNkcQG VHqEeNtkG93vON40jLKF2BhLLYOf325At4ko3n4yx1y3DeWQVqAckBn4CMAH6XQUjJGsyi OlG3KSQrsawTyA1EoTSAjj8+wDk5vZ2MlyNBKc6a7532LsASD6ydLrClun47ZImC1IMHX1 y33Gj1ld7BAUZx9LMnc7xItFWrhEa2R1Hur3dQKED2+Lp9gNTG+FIpaF6/13udI5DblRMG ncmlrEJSwZM4FdDNzJraIIlrNwHlTJathOKlk6rKQu/TiMGMxwcGFrSYTE3Xeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzjRF629XztS; Mon, 2 Oct 2023 14:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392E61dh052465; Mon, 2 Oct 2023 14:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392E61bQ052462; Mon, 2 Oct 2023 14:06:01 GMT (envelope-from git) Date: Mon, 2 Oct 2023 14:06:01 GMT Message-Id: <202310021406.392E61bQ052462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4ed35b7d1eb5 - main - net80211: improve ddb output for sta and rate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4ed35b7d1eb5dddfd04f574ac122651d532d2df9 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ed35b7d1eb5dddfd04f574ac122651d532d2df9 commit 4ed35b7d1eb5dddfd04f574ac122651d532d2df9 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 13:53:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-02 14:03:55 +0000 net80211: improve ddb output for sta and rate Add more missing fields to the ddb output of sta (including spares so people will notice if they use them to adjust ddb as well). There are still more missing fields (some left as reminder in an uncompiled __notyet__ block). Add _db_show_rate() to print iv_rate as well optionally including function pointers. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/net80211/ieee80211_ddb.c | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index 525814d202b1..e4a09a58049b 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -48,6 +48,7 @@ #include #include +#include #ifdef IEEE80211_SUPPORT_TDMA #include #endif @@ -327,6 +328,31 @@ _db_show_sta(const struct ieee80211_node *ni) ni->ni_vht_pad1, ni->ni_vht_spare[0], ni->ni_vht_spare[1], ni->ni_vht_spare[2], ni->ni_vht_spare[3], ni->ni_vht_spare[4], ni->ni_vht_spare[5], ni->ni_vht_spare[6], ni->ni_vht_spare[7]); + + db_printf("\tni_tx_superg[] = {"); + for (i = 0; i < WME_NUM_TID; i++) + db_printf(" %p%s", ni->ni_tx_superg[i], (i == 0) ? "" : ","); + db_printf(" }\n"); + + db_printf("\tni_rctls = %p", ni->ni_rctls); + db_printf("\tni_drv_data = %p", ni->ni_drv_data); + db_printf("\n"); + + db_printf("\tni_spare[3] = { %#jx %#jx %#jx }", + ni->ni_spare[0], ni->ni_spare[1], ni->ni_spare[2]); + db_printf("\n"); + +#ifdef __notyet__ + struct ieee80211_psq ni_psq; /* power save queue */ + struct ieee80211_nodestats ni_stats; /* per-node statistics */ + + /* quiet time IE state for the given node */ + uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ + struct ieee80211_quiet_ie ni_quiet_ie; /* last seen quiet IE */ + + /* U-APSD */ + uint8_t ni_uapsd; /* U-APSD per-node flags matching WMM STA QoS Info field */ +#endif } #ifdef IEEE80211_SUPPORT_TDMA @@ -403,6 +429,31 @@ _db_show_scan(const struct ieee80211_scan_state *ss, int showprocs) db_printf("\n"); } +static void +_db_show_rate(const struct ieee80211_ratectl *rate, const void *rs, + const int showprocs) +{ + + db_printf("\tiv_rate %p", rate); + db_printf(" iv_rs %p", rs); + db_printf("\n"); + if (showprocs) { + db_printf("\t ir_name %s", rate->ir_name); + db_printf("\n"); + DB_PRINTSYM("\t ", "ir_attach", rate->ir_attach); + DB_PRINTSYM("\t ", "ir_detach", rate->ir_detach); + DB_PRINTSYM("\t ", "ir_init", rate->ir_init); + DB_PRINTSYM("\t ", "ir_deinit", rate->ir_deinit); + DB_PRINTSYM("\t ", "ir_node_init", rate->ir_node_init); + DB_PRINTSYM("\t ", "ir_node_deinit", rate->ir_node_deinit); + DB_PRINTSYM("\t ", "ir_rate", rate->ir_rate); + DB_PRINTSYM("\t ", "ir_tx_complete", rate->ir_tx_complete); + DB_PRINTSYM("\t ", "ir_tx_update", rate->ir_tx_update); + DB_PRINTSYM("\t ", "ir_setinterval", rate->ir_setinterval); + DB_PRINTSYM("\t ", "ir_node_stats", rate->ir_node_stats); + } +} + static void _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) { @@ -569,6 +620,8 @@ _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) db_printf(" lastnonerp %d", vap->iv_lastnonerp); db_printf(" lastnonht %d", vap->iv_lastnonht); db_printf("\n"); + if (vap->iv_rate != NULL) + _db_show_rate(vap->iv_rate, vap->iv_rs, showprocs); if (showprocs) { DB_PRINTSYM("\t", "iv_key_alloc", vap->iv_key_alloc); From nobody Mon Oct 2 14:06:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzjRH1pMcz4w6kC; Mon, 2 Oct 2023 14:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzjRH0lcLz3Yqp; Mon, 2 Oct 2023 14:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696255563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YxTmVGFgkPF8qwsdIUa2KJYTj/LgcXAZZPg1ilfKj0=; b=AES7uOClVm1WLaNWFw1NmdLcYP3D+r415BGgCpYgK2bEw22IwtqTznnqzlkdkUUzjy3WSG 9+EuLR/zggNCUxvcoFOdqbird8bH0QdUaqGmqEoWIKSEtx5AmpHmXPgri2gfQoQfgNZ4VM zxAwNM8zmglYHDJSq+mwmxERCSuH0AZLuM8nQH7vswuh3jkgtIVl1//Zy5bfd44ZdvLoCn mNSxFuQCKsyXxWvefR6Xs4Jgk8EzgCiH4tQEdhnHGbqdLrU8V4NHkMvBGoEwDR3wQQtl0b h3Z2M1ViJfJUiEY20keawmgV4AkR8n4KrAsYKBc8S9CVIKXT1+Hy3FE8Ak+0Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696255563; a=rsa-sha256; cv=none; b=OSlFOhDgJDRoITPoPc+xwWHBCwTKl7sry1cQt2mL6Sprs5CF26C6kScoJnozHfgS0DxxXy eGUwHypkgVK3a/gnkFjWBRDMX7gLysJAVAe2nLOORAFDRbaFgC5WSxoJtHalmBxfcPXSzj EZyw0lJh2pZ35H6d+2uzd3gjja+oiKslat8dkofpzGUIkPoq8VuVUKP43e/uoY7zNQpRcB BCOMpsJXg22bRU4XFaFxTiba/afSpQ+4FL334kef2I4E/3InmlQ+j0L1vA2t2rHZwcr/7j gJ0K9MFLtCqzjyEStczflbiO71D45FEFWnV8gct+RPjb/Xzo58djO/q8yUoPVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696255563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YxTmVGFgkPF8qwsdIUa2KJYTj/LgcXAZZPg1ilfKj0=; b=gVr44jiOfeqQ6xk3/2AZmmih3uz/tpp0JkIidYDo8080I4xe3qh9Xifv3a5+l3Ss4mivT7 +Vxj992ZX+i2s3Pt8HHOWhS4G/M1Q/oSb8F5CQpi/q393GqohgYwBT//BxmNRt6iUCcNSz I3cgwP/9LUjzLaSR4x/Lu/teYvSDeggBSpk+uz4pR+IC5sN9JwE68kONmW67YpeinrFVYb 9sbFB0lGSFWl7EHSp6777SAkn3Fe+sGyfMZ2lhobYSB7UrIQUDcd0Gh/qyVVsO8PlALhz3 Xda1xHJ5hgycKSVLWbxS/Uqby/7lwJBwDe1zEmd8pQRPTkuoQOv+1UB+KZa/6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzjRG6NdLz17P; Mon, 2 Oct 2023 14:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392E629r052508; Mon, 2 Oct 2023 14:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392E62du052505; Mon, 2 Oct 2023 14:06:02 GMT (envelope-from git) Date: Mon, 2 Oct 2023 14:06:02 GMT Message-Id: <202310021406.392E62du052505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: db195a523f9b - main - net80211: make ieee80211_alloc_node() private List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: db195a523f9bbeb111b621d2c2c7a46d8b921631 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db195a523f9bbeb111b621d2c2c7a46d8b921631 commit db195a523f9bbeb111b621d2c2c7a46d8b921631 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 13:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-02 14:05:03 +0000 net80211: make ieee80211_alloc_node() private Looking through the allocation/free and reference cycle of nodes we have a few (publicly) (almost) unused macros and functions. Start making them private and reducing the amount of entry paths to the same/similar functionality. First is to make ieee80211_alloc_node() static as it is nowhere used in the tree outside this file. Sponsored by: The FreeBSD Foundation X-MFC: no --- sys/net80211/ieee80211_node.c | 5 ++++- sys/net80211/ieee80211_node.h | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 39b411059cf1..b7cdc5090c96 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -82,6 +82,9 @@ CTASSERT((IEEE80211_NODE_HASHSIZE & (IEEE80211_NODE_HASHSIZE-1)) == 0); static int ieee80211_sta_join1(struct ieee80211_node *); +static struct ieee80211_node *ieee80211_alloc_node( + struct ieee80211_node_table *, struct ieee80211vap *, + const uint8_t macaddr[IEEE80211_ADDR_LEN]); static struct ieee80211_node *node_alloc(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); static int node_init(struct ieee80211_node *); @@ -1396,7 +1399,7 @@ ieee80211_del_node_nt(struct ieee80211_node_table *nt, ni->ni_table = NULL; } -struct ieee80211_node * +static struct ieee80211_node * ieee80211_alloc_node(struct ieee80211_node_table *nt, struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 7c9ff70bcb71..826ecccb1238 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -395,9 +395,6 @@ struct ieee80211_node_table { int nt_inact_init; /* initial node inact setting */ }; -struct ieee80211_node *ieee80211_alloc_node(struct ieee80211_node_table *, - struct ieee80211vap *, - const uint8_t macaddr[IEEE80211_ADDR_LEN]); struct ieee80211_node *ieee80211_tmp_node(struct ieee80211vap *, const uint8_t macaddr[IEEE80211_ADDR_LEN]); struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *, From nobody Mon Oct 2 14:32:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzk1X1cZSz4w87L; Mon, 2 Oct 2023 14:32:16 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzk1X1C15z3dV0; Mon, 2 Oct 2023 14:32:16 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696257136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cWD9FljEZyM2hTfh534tZIMs2asjawHFVPq62pmT5kk=; b=pZynMQlRAp/IyxTWcPeeBB9/XbIMugsGVniaDqqnmo7ueMBp6Aj+HPw0V3JEZOCQbsurB3 haqBJ0XjBWFQAaHyD4APKLuk6mMRBpMc38Hga5m2vJTEScn/UwJsnYRl7WojlzVOVopqRi Ly0FuBinE9BrPva1WRHTq+5GDewdkmwREj9hcxvP+n6/DNTvvgDMzBYU+1wVyJqzCoC12U Bun8N2okUvlKMkIzUx0s6qzoY4UEzZ6nDXWknHPdQt95gtaIjHRoHnJIVZlptQZkgOXaFG Kbj+UwmiJob0g1e0DKRpIthYA3bMWz4GrXehGPBSzXi5Xv9lTW66sqtT86r7eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696257136; a=rsa-sha256; cv=none; b=aTWxPGJ6NBE62o+0XsOgRRARBzhevxLUNrYLY20PxZVQML9c9OTCqbOo7WEIQ5duV/5BzF ArbM9zz8Ov3C9llwPoHVjsnIS1L30rZU0cZz6r0c+DqdwKbQEi3Ok2tjPY49NXjgjjS/on H5BMtJNhJMjXnbqItsPwzDxmcjURJZeS8/95JAw8K1FOZrqWu0U5NlDzDVgwim64/RuAU9 OxNWb7Dzo0b6OCzOkj3qfovZoylESZCotX7BVRpuiP8kWPYessgorBzY35Yd63m/QJI26M D2ZVoPy9dopr4iu6jjWYRCYIHVQfvWLgUrV1agS7D/zigvG4xmheDo6msRO5yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696257136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cWD9FljEZyM2hTfh534tZIMs2asjawHFVPq62pmT5kk=; b=iUCKjuv17gIXKG0KLfy5hFlMn9Nu3kAfDm7DVPO6QK6lpse7iLHSNe/QJjM3n+OdgOyURF A1mhp4yUsbFPNzDuRR9De1DLxwvv3Pn5pn5tWS0SSZEpK8G8isu/1ToIFMtfviAc3ZIOi6 k9gWwwDnybNdIXgTtUuG/jsMG/s9+wLI7lOCE1irfYVJZgOKTATBM/QWYbT5ijy3jMR9b2 ot8U+GIkbsEOIafz9BLM5QFG0vNbO8ZRWm9rzRGNzhocblHnmR6e+u2obY5dund3OEqpgo CnVwM+VKyrttJrPVYsc72j1YcAA73yuUAzfZUD6nfCAG3aA9M/qHetHl66HLFg== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rzk1V3kGYzqh; Mon, 2 Oct 2023 14:32:14 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: git: a9359dcde241 - stable/14 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable From: Zhenlei Huang In-Reply-To: <20231002025315.41C99A7C@slippy.cwsent.com> Date: Mon, 2 Oct 2023 22:32:06 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202310020050.3920omhH029460@gitrepo.freebsd.org> <20231002025315.41C99A7C@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3696.120.41.1.4) > On Oct 2, 2023, at 10:53 AM, Cy Schubert = wrote: >=20 > In message <202310020050.3920omhH029460@gitrepo.freebsd.org>, Zhenlei = Huang=20 > wri > tes: >> The branch stable/14 has been updated by zlei: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da9359dcde241f17421a71bc8c96dee08= >> 625db9dd >>=20 >> commit a9359dcde241f17421a71bc8c96dee08625db9dd >> Author: Zhenlei Huang >> AuthorDate: 2023-09-29 00:01:43 +0000 >> Commit: Zhenlei Huang >> CommitDate: 2023-10-02 00:49:38 +0000 >>=20 >> ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable >>=20 >> The sysctl variable `net.inet.ipf.large_nat` is actually a loader >> tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` = will >> report it correctly. >>=20 >> No functional change intended. >>=20 >> Reviewed by: cy (for #network) >> Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable >> MFC after: 3 days >> Differential Revision: https://reviews.freebsd.org/D42005 >>=20 >> (cherry picked from commit = ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) >> --- >> sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c = b/sys/netpfil/ipfilter/n >> etinet/mlfk_ipl.c >> index 35daad4715bf..69be4abb2485 100644 >> --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c >> +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c >> @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, = CTLFLAG_R >> D, >> &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); >> SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, = &VNET_NAME(ipfmai >> n.ipf_chksrc), 0, ""); >> SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, = &VNET_NAME(ipfmai >> n.ipf_minttl), 0, ""); >> -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, = &VNET_NAME(ipfmai >> n.ipf_large_nat), 0, "large_nat"); >> +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | = CTLFLAG_NOFET >> CH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); >>=20 >> #define CDEV_MAJOR 79 >> #include >>=20 >=20 > Can you also please MFC to stable/13 and 12? Done! Well, I just have a ( long ) break after MFCing to stable/14 ;) >=20 >=20 > --=20 > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org >=20 > e^(i*pi)+1=3D0 >=20 >=20 >=20 > X-B=C2=9D=C4=B6=17 From nobody Mon Oct 2 14:54:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzkW435V9z4w9G4; Mon, 2 Oct 2023 14:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzkW42VlFz3g7l; Mon, 2 Oct 2023 14:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696258464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNecSndGzZ0H/Uo9dQXUGp7dBF1X2G3gcZUsinT5GOw=; b=VaGfXaFTengEKBpH2qidzRrwoYcEfmqFgeeYtPwRbThR8l0aKDjFo+SrFwPzLr/IMKlgL+ +deQIhHW2iL+aOUJ1iGtopMMpFX1bWEJvw6XgWPTeyBVGJDpAPpUXnNFYF11Jbdn1meGm+ DkZPK8xSu+RAm/usIE15dBvvTWp5BBIL4EiKgkCse5YSci3ssq4KzKwSHn3//05mmD0+Lc ZSj6Zcx3yvCOQVrCUTbEhyT13Tk26yZ2DuGK0efAymorag1aOCkHUKeAAwTbTg9rkcKMPU 3+bn7kmTNPvIIQk7hh6QiVrG8CNi3FhkU7JJpk0ZNM2OnL61klZPbWjXsfAUaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696258464; a=rsa-sha256; cv=none; b=XMu+I5Ffkm55ZDDu/dkefw/agdY7CDyp2b/NxvdDL0MynX5+w9slMKmdVj5DE6JgWQLLDA E51iNgHjTrh+syZNzRhHtrLqZwnVpu4EuKNyqqCTrDWbkSnSTEKOXtW7Ao5sQXbyMUOQzc pjWpEgN3LxGJXB2Q6UX3SVGqWGuXkcW0JruY6dVCzvRaOOb9zhT6xKwX3X3sTdAwsInl1K NMQbquEW4Wz1SaM553/9GuAAQkfXwzJGjDWRndXFn1cgbyO529KuUilN8XIKIjTAvJoj2Z U/QJZAneGCpRemHdXIm6cryLcQrUZCciOwD/9egl0UEZqzoP2EI3KltmrgGFtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696258464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNecSndGzZ0H/Uo9dQXUGp7dBF1X2G3gcZUsinT5GOw=; b=gjlb51obDv9d9Mmuunzxi3TxW5G+PQuOxMI2/e5RDkh2C6wAl0sKOAZqXSoMNqyo4DzIFm T7ETqyeQJOB8y4YCqsGHgJAy3iYjEWsUmfR6Y4q7gwOjdQxGxn8/q8welShKtSjIX7v3kU Q2RBpJRr5sTTqJCz+TDWeADiTdleLmfdSzsXSTkcpCMcLtif1YBAtB2YaT7rvtir1/50iy NJsXTo6+czjl2DvH61tXij1mIvzhMeRalXo0ycvVm/SYCVhyUeTuPbvJGhub69FAZTB4oi rW40q+NDzDUT9TewUvXu+5np1ew1fdufAjWHHheDxoIE0wOVsj3Jnqs+PBSb+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 4RzkW41FGfz1wZ; Mon, 2 Oct 2023 14:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392EsOIU035309; Mon, 2 Oct 2023 14:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392EsOgQ035306; Mon, 2 Oct 2023 14:54:24 GMT (envelope-from git) Date: Mon, 2 Oct 2023 14:54:24 GMT Message-Id: <202310021454.392EsOgQ035306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f156cd892b55 - main - net80211 / drivers: remove public use of ieee80211_node_incref() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f156cd892b55c04a39fa06d1899e6e316de77f03 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f156cd892b55c04a39fa06d1899e6e316de77f03 commit f156cd892b55c04a39fa06d1899e6e316de77f03 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 14:44:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-02 14:52:57 +0000 net80211 / drivers: remove public use of ieee80211_node_incref() ieee80211_node_incref() is the FreeBSD implementation of ieee80211_ref_node(). Not being interested in the node returned it was used as a shortcut in 3 drivers (ath, uath, wpi). Replace the call with the public KPI of ieee80211_ref_node() and ignore the result. This leaves us with the single internal call going ieee80211_ref_node() -> ieee80211_node_incref() and that should help increasing portability but also limiting the places to trace for node reference operations. Sponsored by: The FreeBSD Foundation MFC after: 4 weeks --- sys/dev/ath/if_ath_tx.c | 2 +- sys/dev/usb/wlan/if_uath.c | 2 +- sys/dev/wpi/if_wpi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 1fd3adef738e..69d0b5c00848 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -288,7 +288,7 @@ ath_txfrag_setup(struct ath_softc *sc, ath_bufhead *frags, ath_txfrag_cleanup(sc, frags, ni); break; } - ieee80211_node_incref(ni); + (void) ieee80211_ref_node(ni); TAILQ_INSERT_TAIL(frags, bf, bf_list); } ATH_TXBUF_UNLOCK(sc); diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 378dd717a3eb..04190821d9b9 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -1657,7 +1657,7 @@ uath_txfrag_setup(struct uath_softc *sc, uath_datahead *frags, uath_txfrag_cleanup(sc, frags, ni); break; } - ieee80211_node_incref(ni); + (void) ieee80211_ref_node(ni); STAILQ_INSERT_TAIL(frags, bf, next); } diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index c9c2a8f6854e..5ceb037803b8 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -2768,7 +2768,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) ring->pending = 0; sc->sc_update_tx_ring(sc, ring); } else - ieee80211_node_incref(data->ni); + (void) ieee80211_ref_node(data->ni); end: DPRINTF(sc, WPI_DEBUG_TRACE, error ? TRACE_STR_END_ERR : TRACE_STR_END, __func__); From nobody Mon Oct 2 16:02:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzm1k3Lsjz4wDNF; Mon, 2 Oct 2023 16:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzm1k2tfTz4JDq; Mon, 2 Oct 2023 16:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696262554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByPDq3R3koidvE6i+l6FqlX6aNRx4UAHlebq9R3DWqA=; b=T+2mG9ERme1GGsUzHGXF/Btks88E1jUJBVmfDKXuKyMhKzYWPYhjhbc+zPuCjW3cR2Eh0a oERRI7JyKCXkHtAwiBiV16hFHoVoxjIwfAAgum+O9fcKn4zZ7NKbfaHmdIyDK6HL5Jd7EL 3+rBPT0nBJd/4LEBNBfmzrK9a8zC8Xa8FkyYoMfQsdzQJhNQadn2lpQNpsFVcRoYznwIHI +xOBt2w02r2svlz6YxJDSQ8/efW3gjrlr2Df5I+kYgRy5Ya3CQiM9I88HvorVkhXoY21hm Aq8FeJ6an4fTboWr4F0gKxcsFumEZIe/L8NaQOfFjO//kZbvSgjl2Sx98ncPwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696262554; a=rsa-sha256; cv=none; b=TqWlH3g/anaieOJK3RbuceB1fsS9FUYSL/ig0xHz/KnB0BJQFpL86dCz7NUwuxHloKtiH1 CCZ2a7euIzKQwTTvVYL9NKFtwY3h45BP9NYnovHjk5uh/gZYUgUcoaBWWFuNpL+OkBwEvF oFXR9mBfCqfXl3QriF5HcSxKDhpf78pn7LAzNvzvxTQTb3lja41uSKnxdQKLG5qWqkIeNl IY0mKp8iCFa/b1UEihHMQjcgLaGUi1YO4E7dY1HIQgYHkn/ircYJUndIi0QvrusBFQtbwj Lct4eWc0irjCaBhBGmOSZ/BMcOq0RwcaYjJ5rvGe0HCjI5VJWUlK0y3hEL2Zxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696262554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByPDq3R3koidvE6i+l6FqlX6aNRx4UAHlebq9R3DWqA=; b=mh5lDnS7KFJbD0vGADhh7tx6pSfnxINZgy35g8xt+EsoE26swY2qHm8kH7zYyug0+d8BGj 4s93iBpXtDXeWk6RykyP5FqFTFc9llqF4mfnB2ALSjk3HWQCsBC1p1pBX9z0jm680iU0Nz mYZFtasG5txEhIKxjVKOoaKCA10ZxufBr8DrgoGj6lEM8l+NZlR7xUP8f80JNEh0Q/yRFw VnbnhwiM2/A7hWMgJrKiRHP048XL2hMLlWxSQcgbjwdXc/UwCBAolHQhFHZmQdJwBno/qx 7udqIme9aG0VdfUA+QMA0Sc+BFADJiVRPzs659b41JdjVJ1DC99bjJ4thO08xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzm1k1z0Jz45Y; Mon, 2 Oct 2023 16:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392G2Ype052399; Mon, 2 Oct 2023 16:02:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392G2YTT052396; Mon, 2 Oct 2023 16:02:34 GMT (envelope-from git) Date: Mon, 2 Oct 2023 16:02:34 GMT Message-Id: <202310021602.392G2YTT052396@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: 3f0ce63828dc - stable/13 - copy_file_range: require CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3f0ce63828dc3d4030b32ad0effb4e588af49c03 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f0ce63828dc3d4030b32ad0effb4e588af49c03 commit 3f0ce63828dc3d4030b32ad0effb4e588af49c03 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Ed Maste CommitDate: 2023-10-02 16:00:27 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: secteam Differential Revision: https://reviews.freebsd.org/D41967 (cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6) --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 594c4f5ef23a..cf733133bec0 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4886,7 +4886,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4897,7 +4898,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Mon Oct 2 16:05:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzm5R4TmGz4wDLl; Mon, 2 Oct 2023 16:05:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzm5R3fbxz4JxD; Mon, 2 Oct 2023 16:05:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696262747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PT6uWIaYLYHilwiKWaqUYLIOpOyrO0r8z2qWrdS7zso=; b=FP3zsVarw1bs43DYHerSjTMbscljvXG05bvMKx3TnbwnWrPzc/r7hgW/9s8d1rKb6NdP8S 1B0LWYsG9moK3yBwTzQ4jjXLIpji92wEfLa61oEJEpVexPMuleotp2hMvoBYbXp0vyeceu y2AHszn4USByc0ilhy5ROZE0qKz4GrRNTYc/at+jeOnIeYBTYWAnizUN1qvUn6uG7M3A9v vTGPjF+2zSstt3/R+1+gzAbCnU219Fl7U9F/IzO2YhK2PjU5zt+G6ml+5hr1hkWK61mCPK TapXTgEDFJ7aQxaE/StbBoN3RuxMvpBLIDioqt+C8dIwMjuv5LQ/unPKfu9mOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696262747; a=rsa-sha256; cv=none; b=gJ4GNTHASYw+Dv8YI9rknBc4OShiufye1pACsiqY5TR7ajPxMeifdmpIK1HRYZ97XCCgPc 50F06qg5PJBIAvFNBd81aZqe8YcP60M/KICfG4DoqRbtE0ENZ5o3B46Z2buamxOM+uY/CV sewr2ctDruV2LBN0Q1zPuid3nX4Wri/DhHIlcHjYQ1M021GLdLtGCarWOZPclL6nPQyK9A ODqODD38RD5/8kFSPGJZSJfeIJ30gGV1eIiGvj8EyqCdXSwD6DxxpGmw/53lskBWZKTeWV VT5YC/eI8NtJ7UFxcJKnCxXuASE8XYi2nXKEE8WRu96Lzws04uPsOb9E3qSWdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696262747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PT6uWIaYLYHilwiKWaqUYLIOpOyrO0r8z2qWrdS7zso=; b=SYpg2yA7hRoMz8aEG7C7n99wkI8Ne34S16VEvjXZmj7DM/uvo3Z6BA3a6iSqbE7GemV7Tj bsCGbzlCxuHAlyfNfGjngaPFhKwCMXOwj52UvtPVLjMX1v4PESNACZuztt0m4rx8l4DSPu D9YMz7dx4NHUmrkCHo2oSNwk5NmWARxlkhnNhQyH+DeRInqWLU9sMe94UNQ7AF2gpp04AW ez3r4qrAGLe1E0qc/Ci3H0rxfhDu3y7hKst5onM12qnrv+6wqBp/kI6mEuwXFjrbVXwTUq oly/jvjv796qeqGS319ko2p9mndMMe4wT9gu3ubN2qkI0pA1xHSHnCQvpHnNWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzm5R2jbkz3wY; Mon, 2 Oct 2023 16:05:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392G5lYv053063; Mon, 2 Oct 2023 16:05:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392G5lmI053060; Mon, 2 Oct 2023 16:05:47 GMT (envelope-from git) Date: Mon, 2 Oct 2023 16:05:47 GMT Message-Id: <202310021605.392G5lmI053060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7ea866eb14f8 - main - nvme: Fix memory leak in pt ioctl commands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ea866eb14f8ec869a525442c03228b6701e1dab Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7ea866eb14f8ec869a525442c03228b6701e1dab commit 7ea866eb14f8ec869a525442c03228b6701e1dab Author: David Sloan AuthorDate: 2023-09-07 16:22:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 15:50:14 +0000 nvme: Fix memory leak in pt ioctl commands When running nvme passthrough commands through the ioctl interface memory is mapped with vmapbuf() but not unmapped. This results in leaked memory whenever a process executes an nvme passthrough command with a data buffer. This can be replicated with a simple c function (error checks skipped for brevity): void leak_memory(int nvme_ns_fd, uint16_t nblocks) { struct nvme_pt_command pt = { .cmd = { .opc = NVME_OPC_READ, .cdw12 = nblocks - 1, }, .len = nblocks * 512, // Assumes devices with 512 byte lba .is_read = 1, // Reads and writes should both trigger leak } void *buf; posix_memalign(&buf, nblocks * 512); pt.buf = buf; ioctl(nvme_ns_fd, NVME_PASSTHROUGH_COMMAND, &pt); free(buf); } Signed-off-by: David Sloan PR: 273626 Reviewed by: imp, markj MFC after: 1 week --- sys/dev/nvme/nvme_ctrlr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 30a5ee81b2a4..ef4d7daa6efa 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1334,8 +1334,9 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr, mtx_sleep(pt, mtx, PRIBIO, "nvme_pt", 0); mtx_unlock(mtx); -err: if (buf != NULL) { + vunmapbuf(buf); +err: uma_zfree(pbuf_zone, buf); PRELE(curproc); } From nobody Mon Oct 2 16:13:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzmGd5LM4z4wDkr; Mon, 2 Oct 2023 16:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzmGd3vklz4LGt; Mon, 2 Oct 2023 16:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqCB4Mwn8BkjvWGJVaHaEROra8pMhzJR+ZA4b1tW43U=; b=Vb4hyI2gq/4+Ua1IiqnKuLZlNjFuCqD7JS9SAEHfcklMHzjwGzHeKlg/AdxToqiUszP2ua mn1K0leG5DCZgUM7WhtiRGvgciiELok/MzH7Eizr5a0bfW00Sx1G4MMVHKMbbSivAslg03 tlXiMLY5ZxR/64wlr55kI+njKYglny2qVGdd1dT3ic5oF+slLqRhxP2qiWOaBNdpCBBaMS QoBKvES+5qIhi0XwDAIfHckMHGZipBap8g0n6UWYe/omwaOd8bivLTCfBpHeLzfWGhlelU quuuLh7EPfnhFeNS5cFYe4KgGzwiamqJ92iWCuZoG3MyMRaFnDs7oG9+kfd/Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696263225; a=rsa-sha256; cv=none; b=TvK++d8wd8Zc6DGUHe17KPIxLLprkb9G0qHhWr2y08enWrJO3NQD3K5Sq34eLu3W9GfmQe uTBhXFG9EFch57kWbMwNCBvtgUCoaljdKWqTeIxBocSAExTKs4nbP5yg3r4Ec3rM/9UdsA zoWvrlH/H4DnLqHyRVnPYrwg5S2pog6ma9qML8B9A+whSKGjYqXSFH7diZp1UgTgB/oN1/ OBfEFSkgsBmTSf9XzKVfkO5U+dC3qRnKJytdA06RDXNNi6v5xYCKoCkauLl2/To8e2x0xy CWB+yVz3wo2lBoWIIFgADrhxebNW96dDjCLtvtZ6YVev5J+0bOnfXec48iytHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqCB4Mwn8BkjvWGJVaHaEROra8pMhzJR+ZA4b1tW43U=; b=wmXmHXWUwQ8TUgYIfNV4JNod+ufWTcOqG9F9qhOd/mxgwDHiGV1phq0rv6ec9fO7WZAqPl 1lbk4g666RLiPBt4D4FeuLODBPeQKiLU+yzxodHQGh0b6X2IoIKe5uF330taQcSKf4YbDh iTGEaqr8AGzSG+mEbi2HuSmGLS8BCKUx96JNKsjlX+o/pUU9QaL2VTrSD55TijQZRfPBn8 hLn06bYPxZRtrOJ9bKaCHyVOIEwblmgbUyaQu0Muy8XHRlrHv5GpKrsqOWLkEzmOsgQN4R Upo8fGz8ty/vezLehIEGhuVuEfJWxZZ+QjrQEgpvE4pDDb4jK5MWog9qjVIVNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzmGd30Jwz3fY; Mon, 2 Oct 2023 16:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392GDjMv068908; Mon, 2 Oct 2023 16:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392GDj7R068905; Mon, 2 Oct 2023 16:13:45 GMT (envelope-from git) Date: Mon, 2 Oct 2023 16:13:45 GMT Message-Id: <202310021613.392GDj7R068905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 1bd9ca8b7548 - main - aarch64: support BTI and pointer authentication in assembly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bd9ca8b7548e5f573ae8186f3519f4bedff3a92 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd9ca8b7548e5f573ae8186f3519f4bedff3a92 commit 1bd9ca8b7548e5f573ae8186f3519f4bedff3a92 Author: Russ Butler AuthorDate: 2021-08-28 18:57:09 +0000 Commit: Andrew Turner CommitDate: 2023-10-02 16:12:49 +0000 aarch64: support BTI and pointer authentication in assembly This change adds optional support for - Armv8.3-A Pointer Authentication (PAuth) and - Armv8.5-A Branch Target Identification (BTI) features to the perl scripts. Both features can be enabled with additional compiler flags. Unless any of these are enabled explicitly there is no code change at all. The extensions are briefly described below. Please read the appropriate chapters of the Arm Architecture Reference Manual for the complete specification. Scope ----- This change only affects generated assembly code. Armv8.3-A Pointer Authentication -------------------------------- Pointer Authentication extension supports the authentication of the contents of registers before they are used for indirect branching or load. PAuth provides a probabilistic method to detect corruption of register values. PAuth signing instructions generate a Pointer Authentication Code (PAC) based on the value of a register, a seed and a key. The generated PAC is inserted into the original value in the register. A PAuth authentication instruction recomputes the PAC, and if it matches the PAC in the register, restores its original value. In case of a mismatch, an architecturally unmapped address is generated instead. With PAuth, mitigation against ROP (Return-oriented Programming) attacks can be implemented. This is achieved by signing the contents of the link-register (LR) before it is pushed to stack. Once LR is popped, it is authenticated. This way a stack corruption which overwrites the LR on the stack is detectable. The PAuth extension adds several new instructions, some of which are not recognized by older hardware. To support a single codebase for both pre Armv8.3-A targets and newer ones, only NOP-space instructions are added by this patch. These instructions are treated as NOPs on hardware which does not support Armv8.3-A. Furthermore, this patch only considers cases where LR is saved to the stack and then restored before branching to its content. There are cases in the code where LR is pushed to stack but it is not used later. We do not address these cases as they are not affected by PAuth. There are two keys available to sign an instruction address: A and B. PACIASP and PACIBSP only differ in the used keys: A and B, respectively. The keys are typically managed by the operating system. To enable generating code for PAuth compile with -mbranch-protection=: - standard or pac-ret: add PACIASP and AUTIASP, also enables BTI (read below) - pac-ret+b-key: add PACIBSP and AUTIBSP Armv8.5-A Branch Target Identification -------------------------------------- Branch Target Identification features some new instructions which protect the execution of instructions on guarded pages which are not intended branch targets. If Armv8.5-A is supported by the hardware, execution of an instruction changes the value of PSTATE.BTYPE field. If an indirect branch lands on a guarded page the target instruction must be one of the BTI flavors, or in case of a direct call or jump it can be any other instruction. If the target instruction is not compatible with the value of PSTATE.BTYPE a Branch Target Exception is generated. In short, indirect jumps are compatible with BTI and while indirect calls are compatible with BTI and . Please refer to the specification for the details. Armv8.3-A PACIASP and PACIBSP are implicit branch target identification instructions which are equivalent with BTI c or BTI jc depending on system register configuration. BTI is used to mitigate JOP (Jump-oriented Programming) attacks by limiting the set of instructions which can be jumped to. BTI requires active linker support to mark the pages with BTI-enabled code as guarded. For ELF64 files BTI compatibility is recorded in the .note.gnu.property section. For a shared object or static binary it is required that all linked units support BTI. This means that even a single assembly file without the required note section turns-off BTI for the whole binary or shared object. The new BTI instructions are treated as NOPs on hardware which does not support Armv8.5-A or on pages which are not guarded. To insert this new and optional instruction compile with -mbranch-protection=standard (also enables PAuth) or +bti. When targeting a guarded page from a non-guarded page, weaker compatibility restrictions apply to maintain compatibility between legacy and new code. For detailed rules please refer to the Arm ARM. Compiler support ---------------- Compiler support requires understanding '-mbranch-protection=' and emitting the appropriate feature macros (__ARM_FEATURE_BTI_DEFAULT and __ARM_FEATURE_PAC_DEFAULT). The current state is the following: ------------------------------------------------------- | Compiler | -mbranch-protection | Feature macros | +----------+---------------------+--------------------+ | clang | 9.0.0 | 11.0.0 | +----------+---------------------+--------------------+ | gcc | 9 | expected in 10.1+ | ------------------------------------------------------- Available Platforms ------------------ Arm Fast Model and QEMU support both extensions. https://developer.arm.com/tools-and-software/simulation-models/fast-models https://www.qemu.org/ Implementation Notes -------------------- This change adds BTI landing pads even to assembly functions which are likely to be directly called only. In these cases, landing pads might be superfluous depending on what code the linker generates. Code size and performance impact for these cases would be negligible. Interaction with C code ----------------------- Pointer Authentication is a per-frame protection while Branch Target Identification can be turned on and off only for all code pages of a whole shared object or static binary. Because of these properties if C/C++ code is compiled without any of the above features but assembly files support any of them unconditionally there is no incompatibility between the two. Useful Links ------------ To fully understand the details of both PAuth and BTI it is advised to read the related chapters of the Arm Architecture Reference Manual (Arm ARM): https://developer.arm.com/documentation/ddi0487/latest/ Additional materials: "Providing protection for complex software" https://developer.arm.com/architectures/learn-the-architecture/providing-protection-for-complex-software Arm Compiler Reference Guide Version 6.14: -mbranch-protection https://developer.arm.com/documentation/101754/0614/armclang-Reference/armclang-Command-line-Options/-mbranch-protection?lang=en Arm C Language Extensions (ACLE) https://developer.arm.com/docs/101028/latest Addional Notes -------------- This patch is a copy of the work done by Tamas Petz in boringssl. It contains the changes from the following commits: aarch64: support BTI and pointer authentication in assembly Change-Id: I4335f92e2ccc8e209c7d68a0a79f1acdf3aeb791 URL: https://boringssl-review.googlesource.com/c/boringssl/+/42084 aarch64: Improve conditional compilation Change-Id: I14902a64e5f403c2b6a117bc9f5fb1a4f4611ebf URL: https://boringssl-review.googlesource.com/c/boringssl/+/43524 aarch64: Fix name of gnu property note section Change-Id: I6c432d1c852129e9c273f6469a8b60e3983671ec URL: https://boringssl-review.googlesource.com/c/boringssl/+/44024 Change-Id: I2d95ebc5e4aeb5610d3b226f9754ee80cf74a9af Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16674) Reviewed by: emaste, Pierre Pronchery Obtained from: OpenSSL 19e277dd19f2 Differential Revision: https://reviews.freebsd.org/D41940 --- crypto/openssl/crypto/aes/asm/aesv8-armx.pl | 18 +++++- crypto/openssl/crypto/aes/asm/vpaes-armv8.pl | 39 +++++++------ crypto/openssl/crypto/aes/build.info | 1 + crypto/openssl/crypto/arm64cpuid.pl | 10 ++++ crypto/openssl/crypto/arm_arch.h | 58 ++++++++++++++++++++ crypto/openssl/crypto/bn/asm/armv8-mont.pl | 19 +++++-- crypto/openssl/crypto/chacha/asm/chacha-armv8.pl | 18 +++--- crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl | 64 +++++++++++++--------- .../openssl/crypto/modes/asm/aes-gcm-armv8_64.pl | 6 ++ crypto/openssl/crypto/modes/asm/ghashv8-armx.pl | 11 ++++ .../openssl/crypto/poly1305/asm/poly1305-armv8.pl | 17 +++++- crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl | 30 +++++----- crypto/openssl/crypto/sha/asm/sha1-armv8.pl | 5 +- crypto/openssl/crypto/sha/asm/sha512-armv8.pl | 11 +++- crypto/openssl/crypto/sha/build.info | 1 + 15 files changed, 228 insertions(+), 80 deletions(-) diff --git a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl index 544dc7e8effe..837eb69e4aa1 100755 --- a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl +++ b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl @@ -120,6 +120,8 @@ ${prefix}_set_encrypt_key: .Lenc_key: ___ $code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 ___ @@ -295,7 +297,7 @@ $code.=<<___; ${prefix}_set_decrypt_key: ___ $code.=<<___ if ($flavour =~ /64/); - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 ___ @@ -339,7 +341,7 @@ $code.=<<___ if ($flavour !~ /64/); ___ $code.=<<___ if ($flavour =~ /64/); ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret ___ $code.=<<___; @@ -359,6 +361,11 @@ $code.=<<___; .type ${prefix}_${dir}crypt,%function .align 5 ${prefix}_${dir}crypt: +___ +$code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET +___ +$code.=<<___; ldr $rounds,[$key,#240] vld1.32 {$rndkey0},[$key],#16 vld1.8 {$inout},[$inp] @@ -442,6 +449,7 @@ $code.=<<___; ${prefix}_ecb_encrypt: ___ $code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET subs $len,$len,#16 // Original input data size bigger than 16, jump to big size processing. b.ne .Lecb_big_size @@ -1236,6 +1244,8 @@ $code.=<<___; ${prefix}_cbc_encrypt: ___ $code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 ___ @@ -1764,6 +1774,8 @@ $code.=<<___; ${prefix}_ctr32_encrypt_blocks: ___ $code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 ___ @@ -2256,6 +2268,7 @@ $code.=<<___ if ($flavour =~ /64/); ${prefix}_xts_encrypt: ___ $code.=<<___ if ($flavour =~ /64/); + AARCH64_VALID_CALL_TARGET cmp $len,#16 // Original input data size bigger than 16, jump to big size processing. b.ne .Lxts_enc_big_size @@ -2930,6 +2943,7 @@ $code.=<<___ if ($flavour =~ /64/); .type ${prefix}_xts_decrypt,%function .align 5 ${prefix}_xts_decrypt: + AARCH64_VALID_CALL_TARGET ___ $code.=<<___ if ($flavour =~ /64/); cmp $len,#16 diff --git a/crypto/openssl/crypto/aes/asm/vpaes-armv8.pl b/crypto/openssl/crypto/aes/asm/vpaes-armv8.pl index dcd5065e68c0..49988e9c2b29 100755 --- a/crypto/openssl/crypto/aes/asm/vpaes-armv8.pl +++ b/crypto/openssl/crypto/aes/asm/vpaes-armv8.pl @@ -53,6 +53,8 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\"" *STDOUT=*OUT; $code.=<<___; +#include "arm_arch.h" + .text .type _vpaes_consts,%object @@ -259,7 +261,7 @@ _vpaes_encrypt_core: .type vpaes_encrypt,%function .align 4 vpaes_encrypt: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -269,7 +271,7 @@ vpaes_encrypt: st1 {v0.16b}, [$out] ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_encrypt,.-vpaes_encrypt @@ -492,7 +494,7 @@ _vpaes_decrypt_core: .type vpaes_decrypt,%function .align 4 vpaes_decrypt: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -502,7 +504,7 @@ vpaes_decrypt: st1 {v0.16b}, [$out] ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_decrypt,.-vpaes_decrypt @@ -673,7 +675,7 @@ _vpaes_key_preheat: .type _vpaes_schedule_core,%function .align 4 _vpaes_schedule_core: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29, x30, [sp,#-16]! add x29,sp,#0 @@ -838,7 +840,7 @@ _vpaes_schedule_core: eor v6.16b, v6.16b, v6.16b // vpxor %xmm6, %xmm6, %xmm6 eor v7.16b, v7.16b, v7.16b // vpxor %xmm7, %xmm7, %xmm7 ldp x29, x30, [sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size _vpaes_schedule_core,.-_vpaes_schedule_core @@ -1051,7 +1053,7 @@ _vpaes_schedule_mangle: .type vpaes_set_encrypt_key,%function .align 4 vpaes_set_encrypt_key: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 stp d8,d9,[sp,#-16]! // ABI spec says so @@ -1067,7 +1069,7 @@ vpaes_set_encrypt_key: ldp d8,d9,[sp],#16 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_set_encrypt_key,.-vpaes_set_encrypt_key @@ -1075,7 +1077,7 @@ vpaes_set_encrypt_key: .type vpaes_set_decrypt_key,%function .align 4 vpaes_set_decrypt_key: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 stp d8,d9,[sp,#-16]! // ABI spec says so @@ -1095,7 +1097,7 @@ vpaes_set_decrypt_key: ldp d8,d9,[sp],#16 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_set_decrypt_key,.-vpaes_set_decrypt_key ___ @@ -1108,11 +1110,11 @@ $code.=<<___; .type vpaes_cbc_encrypt,%function .align 4 vpaes_cbc_encrypt: + AARCH64_SIGN_LINK_REGISTER cbz $len, .Lcbc_abort cmp w5, #0 // check direction b.eq vpaes_cbc_decrypt - .inst 0xd503233f // paciasp stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -1135,15 +1137,16 @@ vpaes_cbc_encrypt: st1 {v0.16b}, [$ivec] // write ivec ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp .Lcbc_abort: + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_cbc_encrypt,.-vpaes_cbc_encrypt .type vpaes_cbc_decrypt,%function .align 4 vpaes_cbc_decrypt: - .inst 0xd503233f // paciasp + // Not adding AARCH64_SIGN_LINK_REGISTER here because vpaes_cbc_decrypt is jumped to + // only from vpaes_cbc_encrypt which has already signed the return address. stp x29,x30,[sp,#-16]! add x29,sp,#0 stp d8,d9,[sp,#-16]! // ABI spec says so @@ -1185,7 +1188,7 @@ vpaes_cbc_decrypt: ldp d10,d11,[sp],#16 ldp d8,d9,[sp],#16 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_cbc_decrypt,.-vpaes_cbc_decrypt ___ @@ -1195,7 +1198,7 @@ $code.=<<___; .type vpaes_ecb_encrypt,%function .align 4 vpaes_ecb_encrypt: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 stp d8,d9,[sp,#-16]! // ABI spec says so @@ -1229,7 +1232,7 @@ vpaes_ecb_encrypt: ldp d10,d11,[sp],#16 ldp d8,d9,[sp],#16 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_ecb_encrypt,.-vpaes_ecb_encrypt @@ -1237,7 +1240,7 @@ vpaes_ecb_encrypt: .type vpaes_ecb_decrypt,%function .align 4 vpaes_ecb_decrypt: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 stp d8,d9,[sp,#-16]! // ABI spec says so @@ -1271,7 +1274,7 @@ vpaes_ecb_decrypt: ldp d10,d11,[sp],#16 ldp d8,d9,[sp],#16 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size vpaes_ecb_decrypt,.-vpaes_ecb_decrypt ___ diff --git a/crypto/openssl/crypto/aes/build.info b/crypto/openssl/crypto/aes/build.info index b250903fa6e2..47f99fdf3366 100644 --- a/crypto/openssl/crypto/aes/build.info +++ b/crypto/openssl/crypto/aes/build.info @@ -116,6 +116,7 @@ INCLUDE[aes-mips.o]=.. GENERATE[aesv8-armx.S]=asm/aesv8-armx.pl INCLUDE[aesv8-armx.o]=.. GENERATE[vpaes-armv8.S]=asm/vpaes-armv8.pl +INCLUDE[vpaes-armv8.o]=.. GENERATE[aes-armv4.S]=asm/aes-armv4.pl INCLUDE[aes-armv4.o]=.. diff --git a/crypto/openssl/crypto/arm64cpuid.pl b/crypto/openssl/crypto/arm64cpuid.pl index ac76dd449f37..11f0e5027942 100755 --- a/crypto/openssl/crypto/arm64cpuid.pl +++ b/crypto/openssl/crypto/arm64cpuid.pl @@ -31,6 +31,7 @@ $code.=<<___; .globl _armv7_neon_probe .type _armv7_neon_probe,%function _armv7_neon_probe: + AARCH64_VALID_CALL_TARGET orr v15.16b, v15.16b, v15.16b ret .size _armv7_neon_probe,.-_armv7_neon_probe @@ -38,6 +39,7 @@ _armv7_neon_probe: .globl _armv7_tick .type _armv7_tick,%function _armv7_tick: + AARCH64_VALID_CALL_TARGET #ifdef __APPLE__ mrs x0, CNTPCT_EL0 #else @@ -49,6 +51,7 @@ _armv7_tick: .globl _armv8_aes_probe .type _armv8_aes_probe,%function _armv8_aes_probe: + AARCH64_VALID_CALL_TARGET aese v0.16b, v0.16b ret .size _armv8_aes_probe,.-_armv8_aes_probe @@ -56,6 +59,7 @@ _armv8_aes_probe: .globl _armv8_sha1_probe .type _armv8_sha1_probe,%function _armv8_sha1_probe: + AARCH64_VALID_CALL_TARGET sha1h s0, s0 ret .size _armv8_sha1_probe,.-_armv8_sha1_probe @@ -63,6 +67,7 @@ _armv8_sha1_probe: .globl _armv8_sha256_probe .type _armv8_sha256_probe,%function _armv8_sha256_probe: + AARCH64_VALID_CALL_TARGET sha256su0 v0.4s, v0.4s ret .size _armv8_sha256_probe,.-_armv8_sha256_probe @@ -70,6 +75,7 @@ _armv8_sha256_probe: .globl _armv8_pmull_probe .type _armv8_pmull_probe,%function _armv8_pmull_probe: + AARCH64_VALID_CALL_TARGET pmull v0.1q, v0.1d, v0.1d ret .size _armv8_pmull_probe,.-_armv8_pmull_probe @@ -77,6 +83,7 @@ _armv8_pmull_probe: .globl _armv8_sha512_probe .type _armv8_sha512_probe,%function _armv8_sha512_probe: + AARCH64_VALID_CALL_TARGET .long 0xcec08000 // sha512su0 v0.2d,v0.2d ret .size _armv8_sha512_probe,.-_armv8_sha512_probe @@ -84,6 +91,7 @@ _armv8_sha512_probe: .globl _armv8_cpuid_probe .type _armv8_cpuid_probe,%function _armv8_cpuid_probe: + AARCH64_VALID_CALL_TARGET mrs x0, midr_el1 ret .size _armv8_cpuid_probe,.-_armv8_cpuid_probe @@ -92,6 +100,7 @@ _armv8_cpuid_probe: .type OPENSSL_cleanse,%function .align 5 OPENSSL_cleanse: + AARCH64_VALID_CALL_TARGET cbz x1,.Lret // len==0? cmp x1,#15 b.hi .Lot // len>15 @@ -123,6 +132,7 @@ OPENSSL_cleanse: .type CRYPTO_memcmp,%function .align 4 CRYPTO_memcmp: + AARCH64_VALID_CALL_TARGET eor w3,w3,w3 cbz x2,.Lno_data // len==0? cmp x2,#16 diff --git a/crypto/openssl/crypto/arm_arch.h b/crypto/openssl/crypto/arm_arch.h index 45d7e1556475..a815a5c72b7f 100644 --- a/crypto/openssl/crypto/arm_arch.h +++ b/crypto/openssl/crypto/arm_arch.h @@ -126,4 +126,62 @@ extern unsigned int OPENSSL_armv8_rsa_neonized; # define MIDR_IS_CPU_MODEL(midr, imp, partnum) \ (((midr) & MIDR_CPU_MODEL_MASK) == MIDR_CPU_MODEL(imp, partnum)) + +#if defined(__ASSEMBLER__) + + /* + * Support macros for + * - Armv8.3-A Pointer Authentication and + * - Armv8.5-A Branch Target Identification + * features which require emitting a .note.gnu.property section with the + * appropriate architecture-dependent feature bits set. + * Read more: "ELF for the Arm® 64-bit Architecture" + */ + +# if defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1 +# define GNU_PROPERTY_AARCH64_BTI (1 << 0) /* Has Branch Target Identification */ +# define AARCH64_VALID_CALL_TARGET hint #34 /* BTI 'c' */ +# else +# define GNU_PROPERTY_AARCH64_BTI 0 /* No Branch Target Identification */ +# define AARCH64_VALID_CALL_TARGET +# endif + +# if defined(__ARM_FEATURE_PAC_DEFAULT) && \ + (__ARM_FEATURE_PAC_DEFAULT & 1) == 1 /* Signed with A-key */ +# define GNU_PROPERTY_AARCH64_POINTER_AUTH \ + (1 << 1) /* Has Pointer Authentication */ +# define AARCH64_SIGN_LINK_REGISTER hint #25 /* PACIASP */ +# define AARCH64_VALIDATE_LINK_REGISTER hint #29 /* AUTIASP */ +# elif defined(__ARM_FEATURE_PAC_DEFAULT) && \ + (__ARM_FEATURE_PAC_DEFAULT & 2) == 2 /* Signed with B-key */ +# define GNU_PROPERTY_AARCH64_POINTER_AUTH \ + (1 << 1) /* Has Pointer Authentication */ +# define AARCH64_SIGN_LINK_REGISTER hint #27 /* PACIBSP */ +# define AARCH64_VALIDATE_LINK_REGISTER hint #31 /* AUTIBSP */ +# else +# define GNU_PROPERTY_AARCH64_POINTER_AUTH 0 /* No Pointer Authentication */ +# if GNU_PROPERTY_AARCH64_BTI != 0 +# define AARCH64_SIGN_LINK_REGISTER AARCH64_VALID_CALL_TARGET +# else +# define AARCH64_SIGN_LINK_REGISTER +# endif +# define AARCH64_VALIDATE_LINK_REGISTER +# endif + +# if GNU_PROPERTY_AARCH64_POINTER_AUTH != 0 || GNU_PROPERTY_AARCH64_BTI != 0 + .pushsection .note.gnu.property, "a"; + .balign 8; + .long 4; + .long 0x10; + .long 0x5; + .asciz "GNU"; + .long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ + .long 4; + .long (GNU_PROPERTY_AARCH64_POINTER_AUTH | GNU_PROPERTY_AARCH64_BTI); + .long 0; + .popsection; +# endif + +# endif /* defined __ASSEMBLER__ */ + #endif diff --git a/crypto/openssl/crypto/bn/asm/armv8-mont.pl b/crypto/openssl/crypto/bn/asm/armv8-mont.pl index 54d2e8245f15..21ab12bdf07e 100755 --- a/crypto/openssl/crypto/bn/asm/armv8-mont.pl +++ b/crypto/openssl/crypto/bn/asm/armv8-mont.pl @@ -67,8 +67,8 @@ $n0="x4"; # const BN_ULONG *n0, $num="x5"; # int num); $code.=<<___; +#include "arm_arch.h" #ifndef __KERNEL__ -# include "arm_arch.h" .extern OPENSSL_armv8_rsa_neonized .hidden OPENSSL_armv8_rsa_neonized #endif @@ -78,6 +78,7 @@ $code.=<<___; .type bn_mul_mont,%function .align 5 bn_mul_mont: + AARCH64_SIGN_LINK_REGISTER .Lbn_mul_mont: tst $num,#3 b.ne .Lmul_mont @@ -288,6 +289,7 @@ bn_mul_mont: mov x0,#1 ldp x23,x24,[x29,#48] ldr x29,[sp],#64 + AARCH64_VALIDATE_LINK_REGISTER ret .size bn_mul_mont,.-bn_mul_mont ___ @@ -309,6 +311,8 @@ $code.=<<___; .type bn_mul8x_mont_neon,%function .align 5 bn_mul8x_mont_neon: + // Not adding AARCH64_SIGN_LINK_REGISTER here because bn_mul8x_mont_neon is jumped to + // only from bn_mul_mont which has already signed the return address. stp x29,x30,[sp,#-80]! mov x16,sp stp d8,d9,[sp,#16] @@ -649,6 +653,7 @@ $code.=<<___; ldp d10,d11,[sp,#32] ldp d8,d9,[sp,#16] ldr x29,[sp],#80 + AARCH64_VALIDATE_LINK_REGISTER ret // bx lr .size bn_mul8x_mont_neon,.-bn_mul8x_mont_neon @@ -671,7 +676,8 @@ __bn_sqr8x_mont: cmp $ap,$bp b.ne __bn_mul4x_mont .Lsqr8x_mont: - .inst 0xd503233f // paciasp + // Not adding AARCH64_SIGN_LINK_REGISTER here because __bn_sqr8x_mont is jumped to + // only from bn_mul_mont which has already signed the return address. stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -1425,7 +1431,8 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldr x29,[sp],#128 - .inst 0xd50323bf // autiasp + // x30 is loaded earlier + AARCH64_VALIDATE_LINK_REGISTER ret .size __bn_sqr8x_mont,.-__bn_sqr8x_mont ___ @@ -1449,7 +1456,8 @@ $code.=<<___; .type __bn_mul4x_mont,%function .align 5 __bn_mul4x_mont: - .inst 0xd503233f // paciasp + // Not adding AARCH64_SIGN_LINK_REGISTER here because __bn_mul4x_mont is jumped to + // only from bn_mul_mont (or __bn_sqr8x_mont from bn_mul_mont) which has already signed the return address. stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -1883,7 +1891,8 @@ __bn_mul4x_mont: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldr x29,[sp],#128 - .inst 0xd50323bf // autiasp + // x30 loaded earlier + AARCH64_VALIDATE_LINK_REGISTER ret .size __bn_mul4x_mont,.-__bn_mul4x_mont ___ diff --git a/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl b/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl index dcdc4a04e367..e1a8b8159421 100755 --- a/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl +++ b/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl @@ -132,8 +132,8 @@ my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); } $code.=<<___; +#include "arm_arch.h" #ifndef __KERNEL__ -# include "arm_arch.h" .extern OPENSSL_armcap_P .hidden OPENSSL_armcap_P #endif @@ -153,6 +153,7 @@ $code.=<<___; .type ChaCha20_ctr32,%function .align 5 ChaCha20_ctr32: + AARCH64_SIGN_LINK_REGISTER cbz $len,.Labort cmp $len,#192 b.lo .Lshort @@ -165,7 +166,6 @@ ChaCha20_ctr32: #endif .Lshort: - .inst 0xd503233f // paciasp stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -285,8 +285,8 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 - .inst 0xd50323bf // autiasp .Labort: + AARCH64_VALIDATE_LINK_REGISTER ret .align 4 @@ -342,7 +342,7 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_ctr32,.-ChaCha20_ctr32 ___ @@ -432,8 +432,8 @@ $code.=<<___; .type ChaCha20_neon,%function .align 5 ChaCha20_neon: + AARCH64_SIGN_LINK_REGISTER .LChaCha20_neon: - .inst 0xd503233f // paciasp stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -667,7 +667,7 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .align 4 @@ -799,7 +799,7 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_neon,.-ChaCha20_neon ___ @@ -844,7 +844,7 @@ $code.=<<___; .type ChaCha20_512_neon,%function .align 5 ChaCha20_512_neon: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -1268,7 +1268,7 @@ $code.=<<___; ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_512_neon,.-ChaCha20_512_neon ___ diff --git a/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl b/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl index 81ee3947d7e4..6c5d0e8b3cf0 100755 --- a/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl +++ b/crypto/openssl/crypto/ec/asm/ecp_nistz256-armv8.pl @@ -122,7 +122,7 @@ $code.=<<___; .type ecp_nistz256_to_mont,%function .align 6 ecp_nistz256_to_mont: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -138,7 +138,7 @@ ecp_nistz256_to_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_to_mont,.-ecp_nistz256_to_mont @@ -147,7 +147,7 @@ ecp_nistz256_to_mont: .type ecp_nistz256_from_mont,%function .align 4 ecp_nistz256_from_mont: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -163,7 +163,7 @@ ecp_nistz256_from_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_from_mont,.-ecp_nistz256_from_mont @@ -173,7 +173,7 @@ ecp_nistz256_from_mont: .type ecp_nistz256_mul_mont,%function .align 4 ecp_nistz256_mul_mont: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -188,7 +188,7 @@ ecp_nistz256_mul_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_mont,.-ecp_nistz256_mul_mont @@ -197,7 +197,7 @@ ecp_nistz256_mul_mont: .type ecp_nistz256_sqr_mont,%function .align 4 ecp_nistz256_sqr_mont: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -211,7 +211,7 @@ ecp_nistz256_sqr_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_sqr_mont,.-ecp_nistz256_sqr_mont @@ -221,7 +221,7 @@ ecp_nistz256_sqr_mont: .type ecp_nistz256_add,%function .align 4 ecp_nistz256_add: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -235,7 +235,7 @@ ecp_nistz256_add: bl __ecp_nistz256_add ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_add,.-ecp_nistz256_add @@ -244,7 +244,7 @@ ecp_nistz256_add: .type ecp_nistz256_div_by_2,%function .align 4 ecp_nistz256_div_by_2: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -256,7 +256,7 @@ ecp_nistz256_div_by_2: bl __ecp_nistz256_div_by_2 ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_div_by_2,.-ecp_nistz256_div_by_2 @@ -265,7 +265,7 @@ ecp_nistz256_div_by_2: .type ecp_nistz256_mul_by_2,%function .align 4 ecp_nistz256_mul_by_2: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -281,7 +281,7 @@ ecp_nistz256_mul_by_2: bl __ecp_nistz256_add // ret = a+a // 2*a ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_by_2,.-ecp_nistz256_mul_by_2 @@ -290,7 +290,7 @@ ecp_nistz256_mul_by_2: .type ecp_nistz256_mul_by_3,%function .align 4 ecp_nistz256_mul_by_3: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -317,7 +317,7 @@ ecp_nistz256_mul_by_3: bl __ecp_nistz256_add // ret += a // 2*a+a=3*a ldp x29,x30,[sp],#16 - .inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_by_3,.-ecp_nistz256_mul_by_3 @@ -327,7 +327,7 @@ ecp_nistz256_mul_by_3: .type ecp_nistz256_sub,%function .align 4 ecp_nistz256_sub: - .inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -339,7 +339,7 @@ ecp_nistz256_sub: bl __ecp_nistz256_sub_from *** 542 LINES SKIPPED *** From nobody Mon Oct 2 16:13:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzmGf71Swz4wFBx; Mon, 2 Oct 2023 16:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzmGf4hCDz4LKQ; Mon, 2 Oct 2023 16:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiJKTxyZFxnjBsPiZbOdtAXpcW729O2bMkZm/0ep2Og=; b=TmPHRDqaw0WX8bgZrmd3eybODYMPXTcKlQ06fx5j1QH36A1SGLcBmPrA0amM0mVi6T00LE +Q+x7CMWJWTiPfoxESUXJF2zITg/fX9LWKlZNj5O5X/QhdjkpKDMYoWZq7mVW0M0cVe1Yc ELDYXSB/NRelk+i31u46hQpWWbzwbwQo+AV7WAej2SccSXwVJlkOlFH2wjrgLjATak6YBj 4wcNWkB2260gAUm/WoFL+tkJmCQN2XhjDlFIODgBxNonBjzGTxssqGXPYoeBofXtLYisRU MRlEirc7sF3Wh1liSlBdVbFijRl/tKaWbz9G6h+CsMHUfB/qrBMGs10jXKKOCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696263226; a=rsa-sha256; cv=none; b=QZxIlJNsd4AaggydKE3aweKuS1Hoqrlfvdva+kns/hwJAzgXzLcYNB9KpygYMT1pS7D7gU zEnC/HUxyPDzlvClTY459qKn3+tt17CyAuN9EhA5bZIAM/9yNOHktVOdD44GHriREy4PdF G9TYA0RyvbAKJIYT+qqp2htCbukKgYM8AxWlwWm5O1ZsweCnO0CtFTpqqzVoWA+9pHb6yl oF9/hNTQ5iGH2VgoKnOAwosSCcG1Wb0j3qgSc2treNJnNKSSbfL/BU/6AejGhWp7CbetwL PghK3oDmGVljPyLuswXuQM2RwoIYXmTDBdA7kcsGzYEkif6xg7ArnpiIm6xuZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiJKTxyZFxnjBsPiZbOdtAXpcW729O2bMkZm/0ep2Og=; b=RGS5Yfhw6ae85GONu4ELsot2whMpgAoKb/D5b0++gt81deOHxgU+MxgDWnPlokR+mGfarp js3aJlC9XoRZtLzd1eo/6/zOGC2ERWAMHPfnwzOXUatHQoQuKhP3t/3HGkxELVKBP+9mEk jFuktYsgzkFzI81E7qigWeHpPGA5YqqWgi0/QK1wRQol0A98oPT7mJE0Z5Hh+8m9ilnkD0 RQ6p3nB856nIfG75YDCXkme/kUXXccc9NaQdaRjJsYHOsVqq/W8F5XZEHb5Z5WHR4gHuEB Kr/Cgh4pVsddXJfE1JidQBQRduivwTE2c9T50BSG5fpboTRG1KUKwEXHvsuVpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzmGf3Wlsz4Ds; Mon, 2 Oct 2023 16:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392GDkju068964; Mon, 2 Oct 2023 16:13:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392GDktG068961; Mon, 2 Oct 2023 16:13:46 GMT (envelope-from git) Date: Mon, 2 Oct 2023 16:13:46 GMT Message-Id: <202310021613.392GDktG068961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 417778192361 - main - aarch64: fix branch target indications in arm64cpuid.pl and keccak1600 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41777819236110907dd4cff98ef70dfd0629f744 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=41777819236110907dd4cff98ef70dfd0629f744 commit 41777819236110907dd4cff98ef70dfd0629f744 Author: Tom Cosgrove AuthorDate: 2022-02-07 14:44:56 +0000 Commit: Andrew Turner CommitDate: 2023-10-02 16:12:49 +0000 aarch64: fix branch target indications in arm64cpuid.pl and keccak1600 Add missing AARCH64_VALID_CALL_TARGET to armv8_rng_probe(). Also add these to the functions defined by gen_random(), and note that this Perl sub prints the assembler out directly, not going via the $code xlate mechanism (and therefore coming before the include of arm_arch.h). So fix this too. In KeccakF1600_int, AARCH64_SIGN_LINK_REGISTER functions as AARCH64_VALID_CALL_TARGET on BTI-only builds, so it needs to come before the 'adr' line. Change-Id: If241efe71591c88253a3e36647ced00300c3c1a3 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17653) Obtained from: OpenSSL 3a23f01268ec --- crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl b/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl index cf54b62c636a..40f7aa7a695a 100755 --- a/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl +++ b/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl @@ -126,8 +126,8 @@ $code.=<<___; .type KeccakF1600_int,%function .align 5 KeccakF1600_int: - adr $C[2],iotas AARCH64_SIGN_LINK_REGISTER + adr $C[2],iotas stp $C[2],x30,[sp,#16] // 32 bytes on top are mine b .Loop .align 4 From nobody Mon Oct 2 16:13:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzmGh19TLz4wFF4; Mon, 2 Oct 2023 16:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzmGg5VQwz4LHB; Mon, 2 Oct 2023 16:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtAndqjK+zER+Ww6jUtAVbzKhd4ZHgq96RuFynGxS5Q=; b=DEs2KG1wNWeFI6DVASdN91cbXpKOXzSOBLt3YppFQX0UD4Lz3Tn55fboYLEJeCdoIny7EF plHPj3UHsWsHadQShaPVYlOOM2rVzKQ1FOWSHltiMd+sFn0dpMaAfmYkhmaFShZbVfAdPH waFrYlGrE3KvQX6W5QsPWvQZWd5PhJqYJQ/BCq9JhhjO7x0NkCpDBdXNoIOfZQEM9oNLC6 x+Tc+2WTozLb9tocgbfFfqSHvkyFhX8Q0VK033KW7l+ZGDjqdCBZ8iKHcV1dXquKy6z8f9 VMKko+YcLF+YntW1XmU3QcKw2aUTM/HhrqYhNCq0wTiLN22bUA5DogNbeShZ2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696263227; a=rsa-sha256; cv=none; b=nluPpKZV5VCfB+e1FQYkK3kdNe5vkw5qMGD24l/U8yVENDtNQ8fZpF4zJtqjU22S5mcgZa yOCWXG0kL0INwhE7pcEdg5RU9t94Nhm4c6NRSLFb1BHVo6X5+otoRvt+v//l9d8Cv6vyzd Xv36Tcxyn1/wxFwmLu3zjaUi1iegRXPuz4ZkEClFzVKZjt+xW3gjj2Bo9WvhRey+UMpI9a pHfK6HR6P2bVNftgubQ7R/hCuD6WSB3CpqC7Ds0zXWuh4ROryisH8uChL24tpcr1yh6WwK jBFxQzmgnC95twel74hlFSTuLnOTTUu4gD6ceOr8SXXkiv727o/Ph34Qj4Hg3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696263227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PtAndqjK+zER+Ww6jUtAVbzKhd4ZHgq96RuFynGxS5Q=; b=FrqtXi7wq9V0RHJrpenCt2IP5jhhSZL+Bz1otDJCVbuElMRO0ANqMDiFaG70CeukhBvCHO p38DSThqt1VpgLPp4cPxX1mtdt+tymRH1Vp8udiEUTJlKA+rIMVCRf4OE2gY4cj9S3N8oz EhJgLgUlLgWbWLrEZaimpR16B43XRv0VKGZaVqPe9T/2eWw6dfKN8tpI1Bm0mBNS5T9/v6 LIsNs62MdumybpneERUc4R/P/WkGJX8zeCzvrQz3sQ5pPxyv5b41J0PEusz0sMOc0XHX43 icxuzBgapJ1XOwc5Rzxfnm4CDq5PCAAdBZPEa/3SnQ08jFPDlHsMYhd8Av5EGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzmGg4Q6Nz3fZ; Mon, 2 Oct 2023 16:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392GDlWG069006; Mon, 2 Oct 2023 16:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392GDlpj069003; Mon, 2 Oct 2023 16:13:47 GMT (envelope-from git) Date: Mon, 2 Oct 2023 16:13:47 GMT Message-Id: <202310021613.392GDlpj069003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: bd9588bca05f - main - ossl: Rebuild the openssl asm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd9588bca05f5cbdeac6e5f9f426b2589301d7c6 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=bd9588bca05f5cbdeac6e5f9f426b2589301d7c6 commit bd9588bca05f5cbdeac6e5f9f426b2589301d7c6 Author: Andrew Turner AuthorDate: 2023-09-21 13:06:54 +0000 Commit: Andrew Turner CommitDate: 2023-10-02 16:12:50 +0000 ossl: Rebuild the openssl asm This adds the new BTI instructions when needed to the arm64 assembly. Sponsored by: Arm Ltd Reviewed by: Pierre Pronchery (earlier version) Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41941 --- sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S | 6 +++ sys/crypto/openssl/aarch64/aesv8-armx.S | 15 +++++- sys/crypto/openssl/aarch64/arm64cpuid.S | 10 ++++ sys/crypto/openssl/aarch64/arm_arch.h | 58 ++++++++++++++++++++++ sys/crypto/openssl/aarch64/armv8-mont.S | 19 ++++++-- sys/crypto/openssl/aarch64/chacha-armv8.S | 18 +++---- sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S | 64 +++++++++++++++---------- sys/crypto/openssl/aarch64/ghashv8-armx.S | 3 ++ sys/crypto/openssl/aarch64/keccak1600-armv8.S | 30 ++++++------ sys/crypto/openssl/aarch64/poly1305-armv8.S | 17 ++++++- sys/crypto/openssl/aarch64/sha1-armv8.S | 5 +- sys/crypto/openssl/aarch64/sha256-armv8.S | 10 ++-- sys/crypto/openssl/aarch64/sha512-armv8.S | 8 ++-- sys/crypto/openssl/aarch64/vpaes-armv8.S | 39 ++++++++------- 14 files changed, 219 insertions(+), 83 deletions(-) diff --git a/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S b/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S index eb85dbc9f996..55856548fa6f 100644 --- a/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S +++ b/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S @@ -8,6 +8,7 @@ .type aes_gcm_enc_128_kernel,%function .align 4 aes_gcm_enc_128_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L128_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 @@ -990,6 +991,7 @@ aes_gcm_enc_128_kernel: .type aes_gcm_dec_128_kernel,%function .align 4 aes_gcm_dec_128_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L128_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 @@ -1982,6 +1984,7 @@ aes_gcm_dec_128_kernel: .type aes_gcm_enc_192_kernel,%function .align 4 aes_gcm_enc_192_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L192_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 @@ -3039,6 +3042,7 @@ aes_gcm_enc_192_kernel: .type aes_gcm_dec_192_kernel,%function .align 4 aes_gcm_dec_192_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L192_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 @@ -4106,6 +4110,7 @@ aes_gcm_dec_192_kernel: .type aes_gcm_enc_256_kernel,%function .align 4 aes_gcm_enc_256_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L256_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 @@ -5230,6 +5235,7 @@ aes_gcm_enc_256_kernel: .type aes_gcm_dec_256_kernel,%function .align 4 aes_gcm_dec_256_kernel: + AARCH64_VALID_CALL_TARGET cbz x1, .L256_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 diff --git a/sys/crypto/openssl/aarch64/aesv8-armx.S b/sys/crypto/openssl/aarch64/aesv8-armx.S index d92a1d60c65c..6c6dd095fb84 100644 --- a/sys/crypto/openssl/aarch64/aesv8-armx.S +++ b/sys/crypto/openssl/aarch64/aesv8-armx.S @@ -15,6 +15,8 @@ .align 5 aes_v8_set_encrypt_key: .Lenc_key: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 mov x3,#-1 @@ -186,7 +188,7 @@ aes_v8_set_encrypt_key: .type aes_v8_set_decrypt_key,%function .align 5 aes_v8_set_decrypt_key: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 bl .Lenc_key @@ -220,13 +222,14 @@ aes_v8_set_decrypt_key: eor x0,x0,x0 // return value .Ldec_key_abort: ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key .globl aes_v8_encrypt .type aes_v8_encrypt,%function .align 5 aes_v8_encrypt: + AARCH64_VALID_CALL_TARGET ldr w3,[x2,#240] ld1 {v0.4s},[x2],#16 ld1 {v2.16b},[x0] @@ -256,6 +259,7 @@ aes_v8_encrypt: .type aes_v8_decrypt,%function .align 5 aes_v8_decrypt: + AARCH64_VALID_CALL_TARGET ldr w3,[x2,#240] ld1 {v0.4s},[x2],#16 ld1 {v2.16b},[x0] @@ -285,6 +289,7 @@ aes_v8_decrypt: .type aes_v8_ecb_encrypt,%function .align 5 aes_v8_ecb_encrypt: + AARCH64_VALID_CALL_TARGET subs x2,x2,#16 // Original input data size bigger than 16, jump to big size processing. b.ne .Lecb_big_size @@ -1031,6 +1036,8 @@ aes_v8_ecb_encrypt: .type aes_v8_cbc_encrypt,%function .align 5 aes_v8_cbc_encrypt: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 subs x2,x2,#16 @@ -1506,6 +1513,8 @@ aes_v8_cbc_encrypt: .type aes_v8_ctr32_encrypt_blocks,%function .align 5 aes_v8_ctr32_encrypt_blocks: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 ldr w5,[x3,#240] @@ -1855,6 +1864,7 @@ aes_v8_ctr32_encrypt_blocks: .type aes_v8_xts_encrypt,%function .align 5 aes_v8_xts_encrypt: + AARCH64_VALID_CALL_TARGET cmp x2,#16 // Original input data size bigger than 16, jump to big size processing. b.ne .Lxts_enc_big_size @@ -2496,6 +2506,7 @@ aes_v8_xts_encrypt: .type aes_v8_xts_decrypt,%function .align 5 aes_v8_xts_decrypt: + AARCH64_VALID_CALL_TARGET cmp x2,#16 // Original input data size bigger than 16, jump to big size processing. b.ne .Lxts_dec_big_size diff --git a/sys/crypto/openssl/aarch64/arm64cpuid.S b/sys/crypto/openssl/aarch64/arm64cpuid.S index 5ee467c7f129..52c6ee5b65d3 100644 --- a/sys/crypto/openssl/aarch64/arm64cpuid.S +++ b/sys/crypto/openssl/aarch64/arm64cpuid.S @@ -8,6 +8,7 @@ .globl _armv7_neon_probe .type _armv7_neon_probe,%function _armv7_neon_probe: + AARCH64_VALID_CALL_TARGET orr v15.16b, v15.16b, v15.16b ret .size _armv7_neon_probe,.-_armv7_neon_probe @@ -15,6 +16,7 @@ _armv7_neon_probe: .globl _armv7_tick .type _armv7_tick,%function _armv7_tick: + AARCH64_VALID_CALL_TARGET #ifdef __APPLE__ mrs x0, CNTPCT_EL0 #else @@ -26,6 +28,7 @@ _armv7_tick: .globl _armv8_aes_probe .type _armv8_aes_probe,%function _armv8_aes_probe: + AARCH64_VALID_CALL_TARGET aese v0.16b, v0.16b ret .size _armv8_aes_probe,.-_armv8_aes_probe @@ -33,6 +36,7 @@ _armv8_aes_probe: .globl _armv8_sha1_probe .type _armv8_sha1_probe,%function _armv8_sha1_probe: + AARCH64_VALID_CALL_TARGET sha1h s0, s0 ret .size _armv8_sha1_probe,.-_armv8_sha1_probe @@ -40,6 +44,7 @@ _armv8_sha1_probe: .globl _armv8_sha256_probe .type _armv8_sha256_probe,%function _armv8_sha256_probe: + AARCH64_VALID_CALL_TARGET sha256su0 v0.4s, v0.4s ret .size _armv8_sha256_probe,.-_armv8_sha256_probe @@ -47,6 +52,7 @@ _armv8_sha256_probe: .globl _armv8_pmull_probe .type _armv8_pmull_probe,%function _armv8_pmull_probe: + AARCH64_VALID_CALL_TARGET pmull v0.1q, v0.1d, v0.1d ret .size _armv8_pmull_probe,.-_armv8_pmull_probe @@ -54,6 +60,7 @@ _armv8_pmull_probe: .globl _armv8_sha512_probe .type _armv8_sha512_probe,%function _armv8_sha512_probe: + AARCH64_VALID_CALL_TARGET .long 0xcec08000 // sha512su0 v0.2d,v0.2d ret .size _armv8_sha512_probe,.-_armv8_sha512_probe @@ -61,6 +68,7 @@ _armv8_sha512_probe: .globl _armv8_cpuid_probe .type _armv8_cpuid_probe,%function _armv8_cpuid_probe: + AARCH64_VALID_CALL_TARGET mrs x0, midr_el1 ret .size _armv8_cpuid_probe,.-_armv8_cpuid_probe @@ -69,6 +77,7 @@ _armv8_cpuid_probe: .type OPENSSL_cleanse,%function .align 5 OPENSSL_cleanse: + AARCH64_VALID_CALL_TARGET cbz x1,.Lret // len==0? cmp x1,#15 b.hi .Lot // len>15 @@ -100,6 +109,7 @@ OPENSSL_cleanse: .type CRYPTO_memcmp,%function .align 4 CRYPTO_memcmp: + AARCH64_VALID_CALL_TARGET eor w3,w3,w3 cbz x2,.Lno_data // len==0? cmp x2,#16 diff --git a/sys/crypto/openssl/aarch64/arm_arch.h b/sys/crypto/openssl/aarch64/arm_arch.h index 45d7e1556475..a815a5c72b7f 100644 --- a/sys/crypto/openssl/aarch64/arm_arch.h +++ b/sys/crypto/openssl/aarch64/arm_arch.h @@ -126,4 +126,62 @@ extern unsigned int OPENSSL_armv8_rsa_neonized; # define MIDR_IS_CPU_MODEL(midr, imp, partnum) \ (((midr) & MIDR_CPU_MODEL_MASK) == MIDR_CPU_MODEL(imp, partnum)) + +#if defined(__ASSEMBLER__) + + /* + * Support macros for + * - Armv8.3-A Pointer Authentication and + * - Armv8.5-A Branch Target Identification + * features which require emitting a .note.gnu.property section with the + * appropriate architecture-dependent feature bits set. + * Read more: "ELF for the Arm® 64-bit Architecture" + */ + +# if defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1 +# define GNU_PROPERTY_AARCH64_BTI (1 << 0) /* Has Branch Target Identification */ +# define AARCH64_VALID_CALL_TARGET hint #34 /* BTI 'c' */ +# else +# define GNU_PROPERTY_AARCH64_BTI 0 /* No Branch Target Identification */ +# define AARCH64_VALID_CALL_TARGET +# endif + +# if defined(__ARM_FEATURE_PAC_DEFAULT) && \ + (__ARM_FEATURE_PAC_DEFAULT & 1) == 1 /* Signed with A-key */ +# define GNU_PROPERTY_AARCH64_POINTER_AUTH \ + (1 << 1) /* Has Pointer Authentication */ +# define AARCH64_SIGN_LINK_REGISTER hint #25 /* PACIASP */ +# define AARCH64_VALIDATE_LINK_REGISTER hint #29 /* AUTIASP */ +# elif defined(__ARM_FEATURE_PAC_DEFAULT) && \ + (__ARM_FEATURE_PAC_DEFAULT & 2) == 2 /* Signed with B-key */ +# define GNU_PROPERTY_AARCH64_POINTER_AUTH \ + (1 << 1) /* Has Pointer Authentication */ +# define AARCH64_SIGN_LINK_REGISTER hint #27 /* PACIBSP */ +# define AARCH64_VALIDATE_LINK_REGISTER hint #31 /* AUTIBSP */ +# else +# define GNU_PROPERTY_AARCH64_POINTER_AUTH 0 /* No Pointer Authentication */ +# if GNU_PROPERTY_AARCH64_BTI != 0 +# define AARCH64_SIGN_LINK_REGISTER AARCH64_VALID_CALL_TARGET +# else +# define AARCH64_SIGN_LINK_REGISTER +# endif +# define AARCH64_VALIDATE_LINK_REGISTER +# endif + +# if GNU_PROPERTY_AARCH64_POINTER_AUTH != 0 || GNU_PROPERTY_AARCH64_BTI != 0 + .pushsection .note.gnu.property, "a"; + .balign 8; + .long 4; + .long 0x10; + .long 0x5; + .asciz "GNU"; + .long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ + .long 4; + .long (GNU_PROPERTY_AARCH64_POINTER_AUTH | GNU_PROPERTY_AARCH64_BTI); + .long 0; + .popsection; +# endif + +# endif /* defined __ASSEMBLER__ */ + #endif diff --git a/sys/crypto/openssl/aarch64/armv8-mont.S b/sys/crypto/openssl/aarch64/armv8-mont.S index 4bdba95f80f8..8b85fb080aba 100644 --- a/sys/crypto/openssl/aarch64/armv8-mont.S +++ b/sys/crypto/openssl/aarch64/armv8-mont.S @@ -1,6 +1,6 @@ /* Do not modify. This file is auto-generated from armv8-mont.pl. */ +#include "arm_arch.h" #ifndef __KERNEL__ -# include "arm_arch.h" .hidden OPENSSL_armv8_rsa_neonized #endif @@ -10,6 +10,7 @@ .type bn_mul_mont,%function .align 5 bn_mul_mont: + AARCH64_SIGN_LINK_REGISTER .Lbn_mul_mont: tst x5,#3 b.ne .Lmul_mont @@ -220,11 +221,14 @@ bn_mul_mont: mov x0,#1 ldp x23,x24,[x29,#48] ldr x29,[sp],#64 + AARCH64_VALIDATE_LINK_REGISTER ret .size bn_mul_mont,.-bn_mul_mont .type bn_mul8x_mont_neon,%function .align 5 bn_mul8x_mont_neon: + // Not adding AARCH64_SIGN_LINK_REGISTER here because bn_mul8x_mont_neon is jumped to + // only from bn_mul_mont which has already signed the return address. stp x29,x30,[sp,#-80]! mov x16,sp stp d8,d9,[sp,#16] @@ -917,6 +921,7 @@ bn_mul8x_mont_neon: ldp d10,d11,[sp,#32] ldp d8,d9,[sp,#16] ldr x29,[sp],#80 + AARCH64_VALIDATE_LINK_REGISTER ret // bx lr .size bn_mul8x_mont_neon,.-bn_mul8x_mont_neon @@ -926,7 +931,8 @@ __bn_sqr8x_mont: cmp x1,x2 b.ne __bn_mul4x_mont .Lsqr8x_mont: -.inst 0xd503233f // paciasp + // Not adding AARCH64_SIGN_LINK_REGISTER here because __bn_sqr8x_mont is jumped to + // only from bn_mul_mont which has already signed the return address. stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -1677,13 +1683,15 @@ __bn_sqr8x_mont: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldr x29,[sp],#128 -.inst 0xd50323bf // autiasp + // x30 is loaded earlier + AARCH64_VALIDATE_LINK_REGISTER ret .size __bn_sqr8x_mont,.-__bn_sqr8x_mont .type __bn_mul4x_mont,%function .align 5 __bn_mul4x_mont: -.inst 0xd503233f // paciasp + // Not adding AARCH64_SIGN_LINK_REGISTER here because __bn_mul4x_mont is jumped to + // only from bn_mul_mont (or __bn_sqr8x_mont from bn_mul_mont) which has already signed the return address. stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -2117,7 +2125,8 @@ __bn_mul4x_mont: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldr x29,[sp],#128 -.inst 0xd50323bf // autiasp + // x30 loaded earlier + AARCH64_VALIDATE_LINK_REGISTER ret .size __bn_mul4x_mont,.-__bn_mul4x_mont .byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 diff --git a/sys/crypto/openssl/aarch64/chacha-armv8.S b/sys/crypto/openssl/aarch64/chacha-armv8.S index 609e34f422a2..4f9d6bd372f7 100644 --- a/sys/crypto/openssl/aarch64/chacha-armv8.S +++ b/sys/crypto/openssl/aarch64/chacha-armv8.S @@ -1,6 +1,6 @@ /* Do not modify. This file is auto-generated from chacha-armv8.pl. */ +#include "arm_arch.h" #ifndef __KERNEL__ -# include "arm_arch.h" .hidden OPENSSL_armcap_P #endif @@ -21,6 +21,7 @@ .type ChaCha20_ctr32,%function .align 5 ChaCha20_ctr32: + AARCH64_SIGN_LINK_REGISTER cbz x2,.Labort cmp x2,#192 b.lo .Lshort @@ -33,7 +34,6 @@ ChaCha20_ctr32: #endif .Lshort: -.inst 0xd503233f // paciasp stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -245,8 +245,8 @@ ChaCha20_ctr32: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp .Labort: + AARCH64_VALIDATE_LINK_REGISTER ret .align 4 @@ -302,7 +302,7 @@ ChaCha20_ctr32: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_ctr32,.-ChaCha20_ctr32 @@ -312,8 +312,8 @@ ChaCha20_ctr32: .type ChaCha20_neon,%function .align 5 ChaCha20_neon: + AARCH64_SIGN_LINK_REGISTER .LChaCha20_neon: -.inst 0xd503233f // paciasp stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -748,7 +748,7 @@ ChaCha20_neon: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .align 4 @@ -880,13 +880,13 @@ ChaCha20_neon: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_neon,.-ChaCha20_neon .type ChaCha20_512_neon,%function .align 5 ChaCha20_512_neon: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-96]! add x29,sp,#0 @@ -2030,6 +2030,6 @@ ChaCha20_512_neon: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ChaCha20_512_neon,.-ChaCha20_512_neon diff --git a/sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S b/sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S index d297ac15605c..73c367bcf1fc 100644 --- a/sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S +++ b/sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S @@ -2396,7 +2396,7 @@ ecp_nistz256_precomputed: .type ecp_nistz256_to_mont,%function .align 6 ecp_nistz256_to_mont: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -2412,7 +2412,7 @@ ecp_nistz256_to_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_to_mont,.-ecp_nistz256_to_mont @@ -2421,7 +2421,7 @@ ecp_nistz256_to_mont: .type ecp_nistz256_from_mont,%function .align 4 ecp_nistz256_from_mont: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -2437,7 +2437,7 @@ ecp_nistz256_from_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_from_mont,.-ecp_nistz256_from_mont @@ -2447,7 +2447,7 @@ ecp_nistz256_from_mont: .type ecp_nistz256_mul_mont,%function .align 4 ecp_nistz256_mul_mont: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -2462,7 +2462,7 @@ ecp_nistz256_mul_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_mont,.-ecp_nistz256_mul_mont @@ -2471,7 +2471,7 @@ ecp_nistz256_mul_mont: .type ecp_nistz256_sqr_mont,%function .align 4 ecp_nistz256_sqr_mont: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-32]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -2485,7 +2485,7 @@ ecp_nistz256_sqr_mont: ldp x19,x20,[sp,#16] ldp x29,x30,[sp],#32 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_sqr_mont,.-ecp_nistz256_sqr_mont @@ -2495,7 +2495,7 @@ ecp_nistz256_sqr_mont: .type ecp_nistz256_add,%function .align 4 ecp_nistz256_add: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2509,7 +2509,7 @@ ecp_nistz256_add: bl __ecp_nistz256_add ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_add,.-ecp_nistz256_add @@ -2518,7 +2518,7 @@ ecp_nistz256_add: .type ecp_nistz256_div_by_2,%function .align 4 ecp_nistz256_div_by_2: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2530,7 +2530,7 @@ ecp_nistz256_div_by_2: bl __ecp_nistz256_div_by_2 ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_div_by_2,.-ecp_nistz256_div_by_2 @@ -2539,7 +2539,7 @@ ecp_nistz256_div_by_2: .type ecp_nistz256_mul_by_2,%function .align 4 ecp_nistz256_mul_by_2: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2555,7 +2555,7 @@ ecp_nistz256_mul_by_2: bl __ecp_nistz256_add // ret = a+a // 2*a ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_by_2,.-ecp_nistz256_mul_by_2 @@ -2564,7 +2564,7 @@ ecp_nistz256_mul_by_2: .type ecp_nistz256_mul_by_3,%function .align 4 ecp_nistz256_mul_by_3: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2591,7 +2591,7 @@ ecp_nistz256_mul_by_3: bl __ecp_nistz256_add // ret += a // 2*a+a=3*a ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_mul_by_3,.-ecp_nistz256_mul_by_3 @@ -2601,7 +2601,7 @@ ecp_nistz256_mul_by_3: .type ecp_nistz256_sub,%function .align 4 ecp_nistz256_sub: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2613,7 +2613,7 @@ ecp_nistz256_sub: bl __ecp_nistz256_sub_from ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_sub,.-ecp_nistz256_sub @@ -2622,7 +2622,7 @@ ecp_nistz256_sub: .type ecp_nistz256_neg,%function .align 4 ecp_nistz256_neg: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -2637,7 +2637,7 @@ ecp_nistz256_neg: bl __ecp_nistz256_sub_from ldp x29,x30,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_neg,.-ecp_nistz256_neg @@ -3015,7 +3015,7 @@ __ecp_nistz256_div_by_2: .type ecp_nistz256_point_double,%function .align 5 ecp_nistz256_point_double: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-96]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -3150,14 +3150,14 @@ ecp_nistz256_point_double: ldp x19,x20,[x29,#16] ldp x21,x22,[x29,#32] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_point_double,.-ecp_nistz256_point_double .globl ecp_nistz256_point_add .type ecp_nistz256_point_add,%function .align 5 ecp_nistz256_point_add: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-96]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -3404,14 +3404,14 @@ ecp_nistz256_point_add: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#96 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_point_add,.-ecp_nistz256_point_add .globl ecp_nistz256_point_add_affine .type ecp_nistz256_point_add_affine,%function .align 5 ecp_nistz256_point_add_affine: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-80]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -3610,7 +3610,7 @@ ecp_nistz256_point_add_affine: ldp x23,x24,[x29,#48] ldp x25,x26,[x29,#64] ldp x29,x30,[sp],#80 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size ecp_nistz256_point_add_affine,.-ecp_nistz256_point_add_affine //////////////////////////////////////////////////////////////////////// @@ -3620,6 +3620,8 @@ ecp_nistz256_point_add_affine: .type ecp_nistz256_ord_mul_mont,%function .align 4 ecp_nistz256_ord_mul_mont: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-64]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -3828,6 +3830,8 @@ ecp_nistz256_ord_mul_mont: .type ecp_nistz256_ord_sqr_mont,%function .align 4 ecp_nistz256_ord_sqr_mont: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-64]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -4016,6 +4020,8 @@ ecp_nistz256_ord_sqr_mont: .type ecp_nistz256_scatter_w5,%function .align 4 ecp_nistz256_scatter_w5: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -4078,6 +4084,8 @@ ecp_nistz256_scatter_w5: .type ecp_nistz256_gather_w5,%function .align 4 ecp_nistz256_gather_w5: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -4155,6 +4163,8 @@ ecp_nistz256_gather_w5: .type ecp_nistz256_scatter_w7,%function .align 4 ecp_nistz256_scatter_w7: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 @@ -4199,6 +4209,8 @@ ecp_nistz256_scatter_w7: .type ecp_nistz256_gather_w7,%function .align 4 ecp_nistz256_gather_w7: + AARCH64_VALID_CALL_TARGET + // Armv8.3-A PAuth: even though x30 is pushed to stack it is not popped later. stp x29,x30,[sp,#-16]! add x29,sp,#0 diff --git a/sys/crypto/openssl/aarch64/ghashv8-armx.S b/sys/crypto/openssl/aarch64/ghashv8-armx.S index fe5cd49a25aa..9dec85cd4679 100644 --- a/sys/crypto/openssl/aarch64/ghashv8-armx.S +++ b/sys/crypto/openssl/aarch64/ghashv8-armx.S @@ -8,6 +8,7 @@ .type gcm_init_v8,%function .align 4 gcm_init_v8: + AARCH64_VALID_CALL_TARGET ld1 {v17.2d},[x1] //load input H movi v19.16b,#0xe1 shl v19.2d,v19.2d,#57 //0xc2.0 @@ -98,6 +99,7 @@ gcm_init_v8: .type gcm_gmult_v8,%function .align 4 gcm_gmult_v8: + AARCH64_VALID_CALL_TARGET ld1 {v17.2d},[x0] //load Xi movi v19.16b,#0xe1 ld1 {v20.2d,v21.2d},[x1] //load twisted H, ... @@ -139,6 +141,7 @@ gcm_gmult_v8: .type gcm_ghash_v8,%function .align 4 gcm_ghash_v8: + AARCH64_VALID_CALL_TARGET cmp x3,#64 b.hs .Lgcm_ghash_v8_4x ld1 {v0.2d},[x0] //load [rotated] Xi diff --git a/sys/crypto/openssl/aarch64/keccak1600-armv8.S b/sys/crypto/openssl/aarch64/keccak1600-armv8.S index cf63318a8d08..08b3cc351213 100644 --- a/sys/crypto/openssl/aarch64/keccak1600-armv8.S +++ b/sys/crypto/openssl/aarch64/keccak1600-armv8.S @@ -1,4 +1,6 @@ /* Do not modify. This file is auto-generated from keccak1600-armv8.pl. */ +#include "arm_arch.h" + .text .align 8 // strategic alignment and padding that allows to use @@ -34,8 +36,8 @@ iotas: .type KeccakF1600_int,%function .align 5 KeccakF1600_int: + AARCH64_SIGN_LINK_REGISTER adr x28,iotas -.inst 0xd503233f // paciasp stp x28,x30,[sp,#16] // 32 bytes on top are mine b .Loop .align 4 @@ -199,14 +201,14 @@ KeccakF1600_int: bne .Loop ldr x30,[sp,#24] -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size KeccakF1600_int,.-KeccakF1600_int .type KeccakF1600,%function .align 5 KeccakF1600: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -256,7 +258,7 @@ KeccakF1600: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#128 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size KeccakF1600,.-KeccakF1600 @@ -264,7 +266,7 @@ KeccakF1600: .type SHA3_absorb,%function .align 5 SHA3_absorb: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-128]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -498,14 +500,14 @@ SHA3_absorb: ldp x25,x26,[x29,#64] ldp x27,x28,[x29,#80] ldp x29,x30,[sp],#128 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size SHA3_absorb,.-SHA3_absorb .globl SHA3_squeeze .type SHA3_squeeze,%function .align 5 SHA3_squeeze: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-48]! add x29,sp,#0 stp x19,x20,[sp,#16] @@ -568,7 +570,7 @@ SHA3_squeeze: ldp x19,x20,[sp,#16] ldp x21,x22,[sp,#32] ldp x29,x30,[sp],#48 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size SHA3_squeeze,.-SHA3_squeeze .type KeccakF1600_ce,%function @@ -676,7 +678,7 @@ KeccakF1600_ce: .type KeccakF1600_cext,%function .align 5 KeccakF1600_cext: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-80]! add x29,sp,#0 stp d8,d9,[sp,#16] // per ABI requirement @@ -717,14 +719,14 @@ KeccakF1600_cext: ldp d12,d13,[sp,#48] ldp d14,d15,[sp,#64] ldr x29,[sp],#80 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size KeccakF1600_cext,.-KeccakF1600_cext .globl SHA3_absorb_cext .type SHA3_absorb_cext,%function .align 5 SHA3_absorb_cext: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-80]! add x29,sp,#0 stp d8,d9,[sp,#16] // per ABI requirement @@ -940,14 +942,14 @@ SHA3_absorb_cext: ldp d12,d13,[sp,#48] ldp d14,d15,[sp,#64] ldp x29,x30,[sp],#80 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size SHA3_absorb_cext,.-SHA3_absorb_cext .globl SHA3_squeeze_cext .type SHA3_squeeze_cext,%function .align 5 SHA3_squeeze_cext: -.inst 0xd503233f // paciasp + AARCH64_SIGN_LINK_REGISTER stp x29,x30,[sp,#-16]! add x29,sp,#0 mov x9,x0 @@ -1003,7 +1005,7 @@ SHA3_squeeze_cext: .Lsqueeze_done_ce: ldr x29,[sp],#16 -.inst 0xd50323bf // autiasp + AARCH64_VALIDATE_LINK_REGISTER ret .size SHA3_squeeze_cext,.-SHA3_squeeze_cext .byte 75,101,99,99,97,107,45,49,54,48,48,32,97,98,115,111,114,98,32,97,110,100,32,115,113,117,101,101,122,101,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 diff --git a/sys/crypto/openssl/aarch64/poly1305-armv8.S b/sys/crypto/openssl/aarch64/poly1305-armv8.S index 101e4fb40552..35de669f7398 100644 --- a/sys/crypto/openssl/aarch64/poly1305-armv8.S +++ b/sys/crypto/openssl/aarch64/poly1305-armv8.S @@ -16,6 +16,7 @@ .type poly1305_init,%function .align 5 poly1305_init: + AARCH64_VALID_CALL_TARGET cmp x1,xzr stp xzr,xzr,[x0] // zero hash value stp xzr,xzr,[x0,#16] // [along with is_base2_26] @@ -63,6 +64,9 @@ poly1305_init: .align 5 poly1305_blocks: .Lpoly1305_blocks: + // The symbol .Lpoly1305_blocks is not a .globl symbol + // but a pointer to it is returned by poly1305_init + AARCH64_VALID_CALL_TARGET ands x2,x2,#-16 b.eq .Lno_data @@ -128,6 +132,9 @@ poly1305_blocks: .align 5 poly1305_emit: .Lpoly1305_emit: + // The symbol .poly1305_emit is not a .globl symbol + // but a pointer to it is returned by poly1305_init + AARCH64_VALID_CALL_TARGET ldp x4,x5,[x0] // load hash base 2^64 ldr x6,[x0,#16] ldp x10,x11,[x2] // load nonce @@ -223,13 +230,16 @@ poly1305_splat: .align 5 poly1305_blocks_neon: .Lpoly1305_blocks_neon: + // The symbol .Lpoly1305_blocks_neon is not a .globl symbol *** 346 LINES SKIPPED *** From nobody Mon Oct 2 19:23:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzrTn6WQYz4wPRQ; Mon, 2 Oct 2023 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzrTn5xjKz4dtT; Mon, 2 Oct 2023 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OZcS0OQ8nrgDlpzkZzP6+LWAJdwKtRaugBXvr+4dTEo=; b=f/B06cBB6L/gWKVvjBYtFQUkcrUo3dk/W86enXzYo3dD7+Q/PbK+hzbUBulWP3VTiUq9zc Y8usvcwnTyTeOvtPrrmTzvrxmPp//mbxyLy8LaxNVe7It21vi3kBBqSP7bDXD09WvJwViU qURWrmYPFKiAtwWmL51l//FTFPhLdWcsBGSNX/XphJ1Eg8j84Td/YoOt4KGUgr1C3IKao7 6Fv1ib7wQO4ddzsWdxBlbEKu4HxN0BLRBWwdAvp4emImfFaFE127gwxCYAa/Je+HYTlojL ktd7irV9NR9uhF0j5f2ROO+a0x3r0wKC+///HdMdduv2bSQlwOqQ0tqopM0fFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696274621; a=rsa-sha256; cv=none; b=wiQphUzXv3o5mJ2QfcB92TbTla/aAm2ugbBvkEP81RCD56Kbr3Eu5ORAxOS9mZiV8GpJpP gjwarkAYQF9H2l4Oi6gycTtV3oDpoY7mdyFVICeqLrMaH2jEgG13FfcXzpE/bJHYhhX8dd JQhm8FqmtxbEEDrcLr1dyXgq2h1fNBQrC5PISRK+7x1Q1bwXNA+l5tNYmEsNq0OeWd3es6 kPRF8maFh1y2q7gbdwzXRm6iuRpLA+I1BYMNKkRrqeMEJw5KdJ/Gzw2gwAMOBFNJD2qoNK eZ+U4m5ZmjK00O/v1mCTsK3xRJXyAFvHtNErVcY1S156fIg33deaTypnSlIBVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OZcS0OQ8nrgDlpzkZzP6+LWAJdwKtRaugBXvr+4dTEo=; b=bayoDbI5bdop26jtN2LU6vl2HheBkQVkggafS3+Jj0a/Akp3mZJBf0IgNX1TkVdBWKXgoY Rnds+xtknU7x89bywijs10VWEtkdRrkdDdv2nya5iPhNFEtQ5RCI83GdG/jAjaX/6x/ikw 8UK8xQYiy3wakue/3r2/5ZnkNt74ERqX13is1AFnZqK4FRt52dkGG5Krj9A0tzIma6rWdZ 5VWqOuLWP/6d7zuSJqVgaXSNuGdQuuEM6e0kZiczCNHM+sw/iMD4him2bKJQGCNNmkaOgu RFEK6Kl1PFV9aejd8e8AJwQkPZFiYcJRqnSVU8PVJYqtNxlkBsVQ9/8MHg32bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzrTn4yrPz9MS; Mon, 2 Oct 2023 19:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392JNfSW085071; Mon, 2 Oct 2023 19:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392JNftV085068; Mon, 2 Oct 2023 19:23:41 GMT (envelope-from git) Date: Mon, 2 Oct 2023 19:23:41 GMT Message-Id: <202310021923.392JNftV085068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 6a5113a8a1df - releng/14.0 - MFS jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 6a5113a8a1df5f93541d2e9af48fd2127bae0793 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=6a5113a8a1df5f93541d2e9af48fd2127bae0793 commit 6a5113a8a1df5f93541d2e9af48fd2127bae0793 Author: Jamie Gritton AuthorDate: 2023-09-25 00:03:09 +0000 Commit: Jamie Gritton CommitDate: 2023-10-02 19:22:52 +0000 MFS jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) Since 13.1, /etc/rc.d/jail has looked for a per-jail config file in /etc/jail.conf.d. For RELENG 14, the ".include" directive was added to jail(8), with a sample line in the jail.conf(5) man page that includes "/etc/jail.conf.d/*.conf". These two use cases don't work together. When the jail.conf.d files are included from a master jail.conf, the files in jail.conf.d are likely to hold only partial configurations, and shouldn't be directly loaded by rc.d/jail. But there are existing configurations that depend on the current rc.d behavior. While users could be advised not to include from /etc/jail.conf.d, it's the natural choice even if not mentioned in jail.conf.5. The workaround is for rc.d/jail to continue to load the individual files, but only when /etc/jail.conf doesn't include from that directory (via a simple grep test), This allows the current use while not breaking the previous use. Approved by: re (gjb) Reported by: antranigv at freebsd.am Differential Revision: https://reviews.freebsd.org/D41962 (cherry picked from commit a2440348eed75bb7682579af0905b652747fd016) (cherry picked from commit c96d5c97bb65a1b0bc135b452f13d0ca6a8d60c9) --- libexec/rc/rc.d/jail | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index f8995c7e3b00..f12dae280bb0 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -126,7 +126,9 @@ parse_options() if [ -r "$_jconf" ]; then _conf="$_jconf" return 0 - elif [ -r "$_jconfdir" ]; then + elif [ -r "$_jconfdir" ] && ! egrep -q \ + '^\s*\.include\s*["'\'']?/etc/jail.conf.d/' "$jail_conf" \ + 2>/dev/null; then _conf="$_jconfdir" return 0 elif [ -r "$jail_conf" ]; then From nobody Mon Oct 2 19:26:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzrY45m5bz4wPg7; Mon, 2 Oct 2023 19:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzrY45DLpz4fF4; Mon, 2 Oct 2023 19:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FR2389szSRIo9wTNC2OKDl8UXeah6f//MX1d+NpAVsw=; b=sz379vMcsC/SlEQa/UIfkHYLzksgUST1MMtmP0hOUD8vMoBaBC79Mkw3RbXlm03lxZLkwf OccnIVLPz+d3+LndsXtDn10876WDBLvPCr2O0WyZ6/k4U3lMlcpm3xt24g8wWIQXch2K1Z lqvnbIRdZg2YOS487B9/5tSly45ry0fhg4JSLR/d3fhtl1bihbwJyhITdrum0kvmL28rXi 39WMH7Fd7uO8nAM8XfYvRfvTZdwxemZhMAHEIUaHplHPf+zMprfnSJ0ztYixt8lr2DcdRo CebuGO3i63Gj1Wl4jd2WKN7vRw+gNdcp4N5tccsS5/zY/oAr+ZRFMgd3Fd/24w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696274792; a=rsa-sha256; cv=none; b=M1npHvMbk2DxDzoiLdYzd9/rI7ACZzbA7zo4Wmuvz4f1r9wMMLJV2TakDyPfYpbl3KNk+i SEFCRvnmXQfqNy+XEZaR7jN0tj+tCzkpSEcmjJJvwjP3kCWNc9MOvJoAcEqGv/+UOY8XGE aGt2bmicvFoXyiQgI5VBA7+357wJvaBXiYKRQaHDRAjku/iqFBE8ttVxuzZ0koX6gMrVgT HktPr6H8r52ojm6AOYorK4vg93g8gfTpqZK0j6d6tpRbwZZcISOEUEc2q11yiHFUBq7LKC PrHwl82aiEgywFDjucc0qcksL4kIp0jsumbkZGr6Dak3kggLvp5Zhuuv5rnlkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FR2389szSRIo9wTNC2OKDl8UXeah6f//MX1d+NpAVsw=; b=neM9d65ZdES08zM11ZayVv4bVsd+A74kuTSWwAf4zF3CCNe8Y9JlzBGPWR4zAFe5gcIosz p25GH0NgipWqxP7wvYYd3tHbw26BLg6c+oEoLMtF4vB0aPYKv9jtotG/bMcS3KlEoqggAp uU92Rkr3/yjnxVuYJvTOQxLBbvQc8FkK8PhtyXeQTQFN6tV2rt89n/qDHhyo4Hv5lViNC9 9wkljLOjb0BGT4OScgsm+4plvNqkYlbqgdO5Xij4bH+vPP9s4eYsr5ZW+lyKN1MRGZokL1 +G7oDNznUMIZbOuck36KobSYIoWtqOd35LmSVKifVJOKZJ3mPx+qmgzJG2Wx6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzrY44J9Gz9FL; Mon, 2 Oct 2023 19:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392JQWsW085733; Mon, 2 Oct 2023 19:26:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392JQWfe085730; Mon, 2 Oct 2023 19:26:32 GMT (envelope-from git) Date: Mon, 2 Oct 2023 19:26:32 GMT Message-Id: <202310021926.392JQWfe085730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: b166580681e3 - main - lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b166580681e3af173ec368656019d02ba1cc55ad Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=b166580681e3af173ec368656019d02ba1cc55ad commit b166580681e3af173ec368656019d02ba1cc55ad Author: Robert Clausecker AuthorDate: 2023-07-14 11:56:12 +0000 Commit: Robert Clausecker CommitDate: 2023-10-02 19:25:21 +0000 lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was added by the example of other tests in the test suite doing the same thing and helped tremendously in development. This change was originally part of D41442 but was taken out to permit separate review as extrapolated from @ngie's request in D41349. Sponsored by: FreeBSD Foundation Approved by: ngie Differential Revision: https://reviews.freebsd.org/D41528 --- lib/libc/tests/string/memcmp_test.c | 57 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/lib/libc/tests/string/memcmp_test.c b/lib/libc/tests/string/memcmp_test.c index ab782c92f255..f42bccfca529 100644 --- a/lib/libc/tests/string/memcmp_test.c +++ b/lib/libc/tests/string/memcmp_test.c @@ -26,18 +26,21 @@ #include #include +#include #include #include #include #include +static int (*memcmp_fn)(const void *, const void *, size_t); + ATF_TC_WITHOUT_HEAD(zero); ATF_TC_BODY(zero, tc) { - assert(memcmp("a", "b", 0) == 0); - assert(memcmp("", "", 0) == 0); + assert(memcmp_fn("a", "b", 0) == 0); + assert(memcmp_fn("", "", 0) == 0); } ATF_TC_WITHOUT_HEAD(eq); @@ -49,9 +52,9 @@ ATF_TC_BODY(eq, tc) for (i = 0; i < 256; i++) data1[i] = data2[i] = i ^ 0x55; for (i = 1; i < 256; i++) - assert(memcmp(data1, data2, i) == 0); + assert(memcmp_fn(data1, data2, i) == 0); for (i = 1; i < 256; i++) - assert(memcmp(data1 + i, data2 + i, 256 - i) == 0); + assert(memcmp_fn(data1 + i, data2 + i, 256 - i) == 0); } ATF_TC_WITHOUT_HEAD(neq); @@ -65,9 +68,9 @@ ATF_TC_BODY(neq, tc) data2[i] = i ^ 0x55; } for (i = 1; i < 256; i++) - assert(memcmp(data1, data2, i) != 0); + assert(memcmp_fn(data1, data2, i) != 0); for (i = 1; i < 256; i++) - assert(memcmp(data1 + i, data2 + i, 256 - i) != 0); + assert(memcmp_fn(data1 + i, data2 + i, 256 - i) != 0); } ATF_TC_WITHOUT_HEAD(diff); @@ -81,37 +84,43 @@ ATF_TC_BODY(diff, tc) data1[128] = 255; data2[128] = 0; for (i = 1; i < 66; i++) { - assert(memcmp(data1 + 128, data2 + 128, i) == 255); - assert(memcmp(data2 + 128, data1 + 128, i) == -255); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == 255); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == -255); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == 255); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == -255); + assert(memcmp_fn(data1 + 128, data2 + 128, i) == 255); + assert(memcmp_fn(data2 + 128, data1 + 128, i) == -255); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == 255); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == -255); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == 255); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == -255); } data1[128] = 'c'; data2[128] = 'e'; for (i = 1; i < 66; i++) { - assert(memcmp(data1 + 128, data2 + 128, i) == -2); - assert(memcmp(data2 + 128, data1 + 128, i) == 2); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + assert(memcmp_fn(data1 + 128, data2 + 128, i) == -2); + assert(memcmp_fn(data2 + 128, data1 + 128, i) == 2); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == -2); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == 2); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); } memset(data1 + 129, 'A', sizeof(data1) - 129); memset(data2 + 129, 'Z', sizeof(data2) - 129); for (i = 1; i < 66; i++) { - assert(memcmp(data1 + 128, data2 + 128, i) == -2); - assert(memcmp(data2 + 128, data1 + 128, i) == 2); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2); - assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); - assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + assert(memcmp_fn(data1 + 128, data2 + 128, i) == -2); + assert(memcmp_fn(data2 + 128, data1 + 128, i) == 2); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == -2); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == 2); + assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); + assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); } } ATF_TP_ADD_TCS(tp) { + void *dl_handle; + + dl_handle = dlopen(NULL, RTLD_LAZY); + memcmp_fn = dlsym(dl_handle, "test_memcmp"); + if (memcmp_fn == NULL) + memcmp_fn = memcmp; ATF_TP_ADD_TC(tp, zero); ATF_TP_ADD_TC(tp, eq); From nobody Mon Oct 2 19:26:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzrY606Ngz4wPLt; Mon, 2 Oct 2023 19:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzrY56gN8z4fHq; Mon, 2 Oct 2023 19:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZxeFTiFKkmGRCCHruFmszZrnNM4arAP9VdVebceWCg=; b=HbQMU6FOykEc7QU5DBUq7ijm+/ytmMSBFryWnHhuIT3E7VseHizfc2ihnLSU75sjGDlyNO SH+RlUZTvq8pE2fsdw88ACOuLKgYfPfg1EmvXgeYQqs4Gt1k7J4eJt4Af6XPqZyMokY2+E Utb5uWGBIEEyKs72sucL9vJGa3+vTYi12Ri5FG8mktwtTKDg3+666C1RRnrVVGrxd8glfF 0qMG37iHdub1S2gy+/0GG69h2kpRjOawXLdjBYSDzAw1W+ZQmvrjloT3Rvs+0B3K6LK20c /1B/TV1ZMQ7xgojD01aMZusKXVgzKbUxNaDildOjPxN3jT73dq6LwIorgWGItg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696274793; a=rsa-sha256; cv=none; b=nZkvNT0xV+ocd2ePAfH+0tlcUWdcV70pFAk0aDO2y7TKvnG5Zby+DigiWREZ/H+wk4k4Va tQnHqOWkIaUn/4F8mBF1EVp12hKqCgjqydQE+4fGG2YSSL4N8Cz4FkZ77/PwVIVoP1fRPH X9CdrKpDX4g30IisqCqCIdHN4fDyJ4TxGbzTjXELyf0WH2wzoxmVl/NpfKJ/A1Y9RVGjN0 PnlqRU3hKSbjA3BVYJIwMCjnmvftfAsCMa7/fDDvz0xbhD+29hb5oFljRLIZIIqoSlJXJS OP9eYSTwEYegRiZyfPYcSveRLjI56CYwT0+G4AKitycTEYwqJzu3oiT3qAF0Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZxeFTiFKkmGRCCHruFmszZrnNM4arAP9VdVebceWCg=; b=sGR1DMcB2bWirFi2EFrHLBQyXDFYOMZ+8LU6SPcdBprtexA3PKlHsPGEdvsP1Xq1H2U52g cTm4yk/nMPuCn3fNyl9lAXIk1yGCov3d9UN6MyBNSktjmXFhbTopl+wL903xz1bAA5jVxA 5qoA/kdvP2sl5nQW0fkeRYZdKtvWsRSHQgnBa54eVo6ebi+voJZOAc9psVSGjgArFP39vx y/eYJ3I5HsPsM7M4D60dHgvsaNipRBXtL7sXJPOX6yJ+zAd3PWy9Ibm2Ch5o3dcnoSRjHf adWRUHoNe/O/GaWnqGoDmoNv7a8rdAzDkA53kcjiTvFddPb7G/IiiZJjyPUscA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzrY55Htgz8qB; Mon, 2 Oct 2023 19:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392JQXiR085790; Mon, 2 Oct 2023 19:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392JQXeV085787; Mon, 2 Oct 2023 19:26:33 GMT (envelope-from git) Date: Mon, 2 Oct 2023 19:26:33 GMT Message-Id: <202310021926.392JQXeV085787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: c6cc06d465a9 - main - lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6cc06d465a98270ef734ffec7c9012ec3a1bd17 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=c6cc06d465a98270ef734ffec7c9012ec3a1bd17 commit c6cc06d465a98270ef734ffec7c9012ec3a1bd17 Author: Robert Clausecker AuthorDate: 2023-08-30 15:30:24 +0000 Commit: Robert Clausecker CommitDate: 2023-10-02 19:25:31 +0000 lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them all. Constant-time operation is not verified for the timingsafe_* functions. Sponsored by: The FreeBSD Foundation Approved by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41528 --- lib/libc/tests/string/Makefile | 3 + lib/libc/tests/string/bcmp_test.c | 32 ++++++++++ lib/libc/tests/string/memcmp_test.c | 82 ++++++++++++++++++-------- lib/libc/tests/string/timingsafe_bcmp_test.c | 32 ++++++++++ lib/libc/tests/string/timingsafe_memcmp_test.c | 32 ++++++++++ 5 files changed, 155 insertions(+), 26 deletions(-) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index 1994b128ab57..e312787c8831 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -2,6 +2,7 @@ # ensure libc functions are tested, not clang's builtins CFLAGS+= -fno-builtin +ATF_TESTS_C+= bcmp_test ATF_TESTS_C+= ffs_test ATF_TESTS_C+= ffsl_test ATF_TESTS_C+= ffsll_test @@ -16,6 +17,8 @@ ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= strspn_test ATF_TESTS_C+= strverscmp_test ATF_TESTS_C+= strxfrm_test +ATF_TESTS_C+= timingsafe_bcmp_test +ATF_TESTS_C+= timingsafe_memcmp_test ATF_TESTS_C+= wcscasecmp_test ATF_TESTS_C+= wcscoll_test ATF_TESTS_C+= wcsnlen_test diff --git a/lib/libc/tests/string/bcmp_test.c b/lib/libc/tests/string/bcmp_test.c new file mode 100644 index 000000000000..fdf5e48b3eb4 --- /dev/null +++ b/lib/libc/tests/string/bcmp_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ + +#define MEMCMP bcmp +#define RES(x) ((x) != 0) + +#include "memcmp_test.c" diff --git a/lib/libc/tests/string/memcmp_test.c b/lib/libc/tests/string/memcmp_test.c index f42bccfca529..487abe68f421 100644 --- a/lib/libc/tests/string/memcmp_test.c +++ b/lib/libc/tests/string/memcmp_test.c @@ -1,7 +1,11 @@ /*- * Copyright (c) 2016 Jilles Tjoelker + * Copyright (c) 2023 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -33,14 +37,40 @@ #include +#ifndef MEMCMP +#define MEMCMP memcmp +#endif + +/* + * On FreeBSD we demand that memcmp returns the difference between the + * characters at the first site of mismatch. However, ISO/IEC 9899:1990 + * only specifies that a number greater than, equal to, or less than + * zero shall be returned. If a unit test for this less strict + * behaviour is desired, define RES(x) to be (((x) > 0) - ((x) < 0)). + */ +#ifndef RES +#define RES(x) (x) +#endif + static int (*memcmp_fn)(const void *, const void *, size_t); +static void +check_memcmp(const char *a, const char *b, size_t len, int expected) +{ + int got; + + got = memcmp_fn(a, b, len); + ATF_CHECK_EQ_MSG(RES(expected), RES(got), + "%s(%p, %p, %zu) gave %d, but wanted %d", + __XSTRING(MEMCMP), a, b, len, got, expected); +} + ATF_TC_WITHOUT_HEAD(zero); ATF_TC_BODY(zero, tc) { - assert(memcmp_fn("a", "b", 0) == 0); - assert(memcmp_fn("", "", 0) == 0); + check_memcmp("a", "b", 0, 0); + check_memcmp("", "", 0, 0); } ATF_TC_WITHOUT_HEAD(eq); @@ -52,9 +82,9 @@ ATF_TC_BODY(eq, tc) for (i = 0; i < 256; i++) data1[i] = data2[i] = i ^ 0x55; for (i = 1; i < 256; i++) - assert(memcmp_fn(data1, data2, i) == 0); + check_memcmp(data1, data2, i, 0); for (i = 1; i < 256; i++) - assert(memcmp_fn(data1 + i, data2 + i, 256 - i) == 0); + check_memcmp(data1 + i, data2 + i, 256 - i, 0); } ATF_TC_WITHOUT_HEAD(neq); @@ -68,9 +98,9 @@ ATF_TC_BODY(neq, tc) data2[i] = i ^ 0x55; } for (i = 1; i < 256; i++) - assert(memcmp_fn(data1, data2, i) != 0); + check_memcmp(data1, data2, i, -0x55); for (i = 1; i < 256; i++) - assert(memcmp_fn(data1 + i, data2 + i, 256 - i) != 0); + check_memcmp(data1 + i, data2 + i, 256 - i, i - (i ^ 0x55)); } ATF_TC_WITHOUT_HEAD(diff); @@ -84,32 +114,32 @@ ATF_TC_BODY(diff, tc) data1[128] = 255; data2[128] = 0; for (i = 1; i < 66; i++) { - assert(memcmp_fn(data1 + 128, data2 + 128, i) == 255); - assert(memcmp_fn(data2 + 128, data1 + 128, i) == -255); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == 255); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == -255); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == 255); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == -255); + check_memcmp(data1 + 128, data2 + 128, i, 255); + check_memcmp(data2 + 128, data1 + 128, i, -255); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i, 255); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i, -255); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i * 2, 255); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i * 2, -255); } data1[128] = 'c'; data2[128] = 'e'; for (i = 1; i < 66; i++) { - assert(memcmp_fn(data1 + 128, data2 + 128, i) == -2); - assert(memcmp_fn(data2 + 128, data1 + 128, i) == 2); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == -2); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == 2); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + check_memcmp(data1 + 128, data2 + 128, i, -2); + check_memcmp(data2 + 128, data1 + 128, i, 2); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i, -2); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i, 2); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i * 2, -2); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i * 2, 2); } memset(data1 + 129, 'A', sizeof(data1) - 129); memset(data2 + 129, 'Z', sizeof(data2) - 129); for (i = 1; i < 66; i++) { - assert(memcmp_fn(data1 + 128, data2 + 128, i) == -2); - assert(memcmp_fn(data2 + 128, data1 + 128, i) == 2); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i) == -2); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i) == 2); - assert(memcmp_fn(data1 + 129 - i, data2 + 129 - i, i * 2) == -2); - assert(memcmp_fn(data2 + 129 - i, data1 + 129 - i, i * 2) == 2); + check_memcmp(data1 + 128, data2 + 128, i, -2); + check_memcmp(data2 + 128, data1 + 128, i, 2); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i, -2); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i, 2); + check_memcmp(data1 + 129 - i, data2 + 129 - i, i * 2, -2); + check_memcmp(data2 + 129 - i, data1 + 129 - i, i * 2, 2); } } @@ -118,9 +148,9 @@ ATF_TP_ADD_TCS(tp) void *dl_handle; dl_handle = dlopen(NULL, RTLD_LAZY); - memcmp_fn = dlsym(dl_handle, "test_memcmp"); + memcmp_fn = dlsym(dl_handle, "test_" __XSTRING(MEMCMP)); if (memcmp_fn == NULL) - memcmp_fn = memcmp; + memcmp_fn = MEMCMP; ATF_TP_ADD_TC(tp, zero); ATF_TP_ADD_TC(tp, eq); diff --git a/lib/libc/tests/string/timingsafe_bcmp_test.c b/lib/libc/tests/string/timingsafe_bcmp_test.c new file mode 100644 index 000000000000..96bf789633f2 --- /dev/null +++ b/lib/libc/tests/string/timingsafe_bcmp_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ + +#define MEMCMP timingsafe_bcmp +#define RES(x) ((x) != 0) + +#include "memcmp_test.c" diff --git a/lib/libc/tests/string/timingsafe_memcmp_test.c b/lib/libc/tests/string/timingsafe_memcmp_test.c new file mode 100644 index 000000000000..5f97e41fcf8a --- /dev/null +++ b/lib/libc/tests/string/timingsafe_memcmp_test.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ + +#define MEMCMP timingsafe_memcmp +#define RES(x) (((x) > 0) - ((x) < 0)) + +#include "memcmp_test.c" From nobody Mon Oct 2 19:29:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzrcZ3KTbz4wPv5; Mon, 2 Oct 2023 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzrcZ2q6mz4fwf; Mon, 2 Oct 2023 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BvJ3MljVw4SIpYxIK8c6hPbsuT4qXkt0BBXlIaSlRI=; b=MM3RRV/O9Vo1CBwEZf6SB84jbFFQ3Z9jrTymgyDpIXUOktDIVlqKZnZ1aQSdxrLSO2WceK YSdnkdz6SuP00wBp1ATNlZZaqrPY4htjwatiwD7ki+oNGG2twYNjZu9lbtgeGH8uzrQOPa dHEzBWYThgVnPSu0wjLsYJnH2kIyTfuJSYG0FL2mAoazDTa/73MDLGvgjh143CpIEzRRZ9 vj6NESMjQMDhJPFZprMj2B8lN4rxj+fVwWfd0XHb6qqSx/0qZfJHwmaNYpS0P1H8HJPG9K QMu449mGDguPrDi3Zz/KCd/ZSDbCLa9MNKN9h2e5R4lsNaRimvdocRk6QtA7qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696274974; a=rsa-sha256; cv=none; b=TFtBER3U3mvc/S22CvU0ELqCykIqCGwGDzT0QgJUVNPxF+Y6KGqro4LmfgOi2ES6z5tsAd MvlbcEK9/fSH/EykxvopRIuiOgb3pbxiJwpJXdleRbWKWgoazJBJiJCtisnt9ykUzt8rrJ szF+vJkgThJgk8Pm3X7Ijbo2F4+uNT0uEIXlSq8zrs9McA/BIEoPO4z7VQ0lFKMm5+0NdS uLLGVw/SqaRJ+SRKfijKKhxsQSDHKjCM35z+B1nTXmMsYTC9srSJ1fXYung/6lLAbJpnG3 bGW/ysQ9ZK/WvKVv/g6g3nbeVpzWyfi4AXy/HzltPJUWgzsncJZW6Jo3QnLKPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696274974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BvJ3MljVw4SIpYxIK8c6hPbsuT4qXkt0BBXlIaSlRI=; b=K0Q2JkLbK3LusR7BJcfCdPJu4tCGaGh3x+jzAjiCnmWEv9SNzxge9/NEo5mawmbwiSDc8a bR23KWthivn3bZ/yaEqBDdXN/2JWHiq0fPcQQsTqogwrpF7qOZ5/YYoP3SXIfK5y42/CIq QyZtfH6+lc9E2IUG90nHzUitd6LSkt/ZdlqPum3bFOvOG8MRv2mjpye3LKcBbUoi6p05a0 byb/e3/iyA/WepSLUD4TGFYJ4Pk22Rc6AVbrGpFduHgqXTNZZWfGzPCMkAKV6dV9zDTBNb UEqdqM9o7dAWrBGQEB61AyScE6y6z3jbd0IEL64CWqc/CrGqd3PYvL9ICp+L7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzrcZ1tjbz8wG; Mon, 2 Oct 2023 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392JTYvX086308; Mon, 2 Oct 2023 19:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392JTYpB086305; Mon, 2 Oct 2023 19:29:34 GMT (envelope-from git) Date: Mon, 2 Oct 2023 19:29:34 GMT Message-Id: <202310021929.392JTYpB086305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ebaea1bcd2eb - main - x86: AMD Zen2: Zenbleed chicken bit mitigation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebaea1bcd2eb0aa90937637ed305184b6fedc69b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ebaea1bcd2eb0aa90937637ed305184b6fedc69b commit ebaea1bcd2eb0aa90937637ed305184b6fedc69b Author: Olivier Certner AuthorDate: 2023-09-11 14:18:30 +0000 Commit: Ed Maste CommitDate: 2023-10-02 19:29:18 +0000 x86: AMD Zen2: Zenbleed chicken bit mitigation Applies only to bare-metal Zen2 processors. The system currently automatically applies it to all of them. Tunable/sysctl 'machdep.mitigations.zenbleed.enable' can be used to forcibly enable or disable the mitigation at boot or run-time. Possible values are: 0: Mitigation disabled 1: Mitigation enabled 2: Run the automatic determination. Currently, value 2 is the default and has identical effect as value 1. This might change in the future if we choose to take into account microcode revisions in the automatic determination process. The tunable/sysctl value is simply ignored on non-applicable CPU models, which is useful to apply the same configuration on a set of machines that do not all have Zen2 processors. Trying to set it to any integer value not listed above is silently equivalent to setting it to value 2 (automatic determination). The current mitigation state can be queried through sysctl 'machdep.mitigations.zenbleed.state', which returns "Not applicable", "Mitigation enabled" or "Mitigation disabled". Note that this state is not guaranteed to be accurate in case of intervening modifications of the corresponding chicken bit directly via cpuctl(4) (this includes the cpucontrol(8) utility). Resetting the desired policy through 'machdep.mitigations.zenbleed.enable' (possibly to its current value) will reset the hardware state and ensure that the reported state is again coherent with it. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41817 --- sys/amd64/acpica/acpi_wakeup.c | 1 + sys/amd64/amd64/initcpu.c | 3 + sys/amd64/amd64/machdep.c | 4 ++ sys/dev/cpuctl/cpuctl.c | 1 + sys/x86/include/specialreg.h | 1 + sys/x86/include/x86_var.h | 3 + sys/x86/x86/cpu_machdep.c | 123 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 136 insertions(+) diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c index 3b21935255cb..0f9f987b6590 100644 --- a/sys/amd64/acpica/acpi_wakeup.c +++ b/sys/amd64/acpica/acpi_wakeup.c @@ -306,6 +306,7 @@ acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, amd64_syscall_ret_flush_l1d_recalc(); hw_ssb_recalculate(true); x86_rngds_mitg_recalculate(true); + zenbleed_check_and_apply(true); AcpiSetFirmwareWakingVector(0, 0); } else { diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index a048c08fc9ae..c5266ffcc235 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -193,6 +193,9 @@ init_amd(void) hw_lower_amd64_sharedpage = 1; } } + + /* Zenbleed. See the comments in 'cpu_machdep.c'. */ + zenbleed_check_and_apply(false); } /* diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index f39678d1f4e5..4b81f5b9671e 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1495,6 +1495,10 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", &x86_rngds_mitg_enable); + TUNABLE_INT_FETCH("machdep.mitigations.zenbleed.enable", + &zenbleed_enable); + zenbleed_sanitize_enable(); + finishidentcpu(); /* Final stage of CPU initialization */ /* diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index 9c56db1ad19a..1fa655342121 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -546,6 +546,7 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td) hw_mds_recalculate(); x86_taa_recalculate(); x86_rngds_mitg_recalculate(true); + zenbleed_check_and_apply(true); printcpuinfo(); return (0); } diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index f45990a056c8..4886430c84b6 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -1172,6 +1172,7 @@ /* MSR_DE_CFG */ #define DE_CFG_10H_12H_STACK_POINTER_JUMP_FIX_BIT 0x1 #define DE_CFG_ZEN_LOAD_STALE_DATA_FIX_BIT 0x2000 +#define DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 0x200 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */ diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index 1629236c5928..44314456d8bf 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -90,6 +90,7 @@ extern int hw_ssb_active; extern int x86_taa_enable; extern int cpu_flush_rsb_ctxsw; extern int x86_rngds_mitg_enable; +extern int zenbleed_enable; extern int cpu_amdc1e_bug; extern char bootmethod[16]; @@ -140,6 +141,8 @@ void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); void x86_rngds_mitg_recalculate(bool all_cpus); +void zenbleed_sanitize_enable(void); +void zenbleed_check_and_apply(bool all_cpus); void nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame); void nmi_call_kdb_smp(u_int type, struct trapframe *frame); void nmi_handle_intr(u_int type, struct trapframe *frame); diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index c80284cf2987..868e6e2bc365 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -1477,6 +1477,129 @@ SYSCTL_PROC(_machdep_mitigations_rngds, OID_AUTO, state, sysctl_rngds_state_handler, "A", "MCU Optimization state"); + +/* + * Zenbleed. + * + * No corresponding errata is publicly listed. AMD has issued a security + * bulletin (AMD-SB-7008), entitled "Cross-Process Information Leak". This + * document lists (as of August 2023) platform firmware's availability target + * dates, with most being November/December 2023. It will then be up to + * motherboard manufacturers to produce corresponding BIOS updates, which will + * happen with an inevitable lag. Additionally, for a variety of reasons, + * operators might not be able to apply them everywhere due. On the side of + * standalone CPU microcodes, no plans for availability have been published so + * far. However, a developer appearing to be an AMD employee has hardcoded in + * Linux revision numbers of future microcodes that are presumed to fix the + * vulnerability. + * + * Given the stability issues encountered with early microcode releases for Rome + * (the only microcode publicly released so far) and the absence of official + * communication on standalone CPU microcodes, we have opted instead for + * matching by default all AMD Zen2 processors which, according to the + * vulnerability's discoverer, are all affected (see + * https://lock.cmpxchg8b.com/zenbleed.html). This policy, also adopted by + * OpenBSD, may be overriden using the tunable/sysctl + * 'machdep.mitigations.zenbleed.enable'. We might revise it later depending on + * official statements, microcode updates' public availability and community + * assessment that they actually fix the vulnerability without any instability + * side effects. + */ + +SYSCTL_NODE(_machdep_mitigations, OID_AUTO, zenbleed, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "Zenbleed OS-triggered prevention (via chicken bit)"); + +/* 2 is auto, see below. */ +int zenbleed_enable = 2; + +void +zenbleed_sanitize_enable(void) +{ + /* Default to auto (2). */ + if (zenbleed_enable < 0 || zenbleed_enable > 2) + zenbleed_enable = 2; +} + +static bool +zenbleed_chicken_bit_applicable(void) +{ + /* Concerns only bare-metal AMD Zen2 processors. */ + return (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x17 && + CPUID_TO_MODEL(cpu_id) >= 0x30 && + vm_guest == VM_GUEST_NO); +} + +static bool +zenbleed_chicken_bit_should_enable(void) +{ + /* + * Obey tunable/sysctl. + * + * As explained above, currently, the automatic setting (2) and the "on" + * one (1) have the same effect. In the future, we might additionally + * check for specific microcode revisions as part of the automatic + * determination. + */ + return (zenbleed_enable != 0); +} + +void +zenbleed_check_and_apply(bool all_cpus) +{ + bool set; + + if (!zenbleed_chicken_bit_applicable()) + return; + + set = zenbleed_chicken_bit_should_enable(); + + x86_msr_op(MSR_DE_CFG, + (set ? MSR_OP_OR : MSR_OP_ANDNOT) | + (all_cpus ? MSR_OP_RENDEZVOUS_ALL : MSR_OP_LOCAL), + DE_CFG_ZEN2_FP_BACKUP_FIX_BIT, NULL); +} + +static int +sysctl_zenbleed_enable_handler(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = zenbleed_enable; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + zenbleed_enable = val; + zenbleed_sanitize_enable(); + zenbleed_check_and_apply(true); + return (0); +} +SYSCTL_PROC(_machdep_mitigations_zenbleed, OID_AUTO, enable, CTLTYPE_INT | + CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, NULL, 0, + sysctl_zenbleed_enable_handler, "I", + "Enable Zenbleed OS-triggered mitigation (chicken bit) " + "(0: Force disable, 1: Force enable, 2: Automatic determination)"); + +static int +sysctl_zenbleed_state_handler(SYSCTL_HANDLER_ARGS) +{ + const char *state; + + if (!zenbleed_chicken_bit_applicable()) + state = "Not applicable"; + else if (zenbleed_chicken_bit_should_enable()) + state = "Mitigation enabled"; + else + state = "Mitigation disabled"; + return (SYSCTL_OUT(req, state, strlen(state))); +} +SYSCTL_PROC(_machdep_mitigations_zenbleed, OID_AUTO, state, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + sysctl_zenbleed_state_handler, "A", + "Zenbleed OS-triggered mitigation (chicken bit) state"); + + /* * Enable and restore kernel text write permissions. * Callers must ensure that disable_wp()/restore_wp() are executed From nobody Mon Oct 2 20:38:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzt8Z0vvTz4wT3T; Mon, 2 Oct 2023 20:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzt8Z0P4Fz3KLh; Mon, 2 Oct 2023 20:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696279134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMew1gSyNVPm0xhzNs0Ur6CLjqtEyw9TPQHss5M2/sA=; b=oHdrREMmKGhdaOjmD5YhqwvAU4NO4V9e6tuvAlYtHAcST2HfQIDOjW5Zr8haWlt5RF4XFS wcdee+G4V7PS5CCW9fNnA/82/DL20dqXiJPkumeLTrA6qq54oWuIZ64vxIU8mCFPdOa6bR VUmIBzMrEdBrp3AGeu/Rnup9Av+IwcJwke0wODSMzMAxgvJUEs3eICcVS+26erUdXuqRfq iYPqEVgkVaYkQAsWaEUgcxw+1UxWVXVjuba8gdcDQxHVKU0eonJtM7JYj4JZ+6zsKUuM11 SUyp5aumxslVy7tuuC2HB4GYiasfVP8HQDkJ5bC5A3blKZGafVaYgJ/M/2FHSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696279134; a=rsa-sha256; cv=none; b=ICAF5EzBs0eh91kyF0YJ+gishfjC/n/0AY67WUCLveX7RSpghZsh/9tp6cWsHv/JjpF3x/ VmP+++tqhi/eB6+86S6qSCu2ZSOWsPRFgOW/JGf2JsPzeTrYKWHr9VhqmVcTnQwOlxnfsb MmTkCYfArpJJyb/FdM0u0evQlx0TH1evEMlKV0UglziCvfkGr17Vwda0OLRR7HuEy2uBea F44K/2P+wm5OmOEl7wl1BHoPIqL7844LBVsViCoGPOwuQCO6jRDDR5y343fgpSpBUx8jqY 4geY73oPPih3yA7iEdfSfdBgj6u5Evjxs4cBfqBDVjwthMfCas1OnFq7EM5+og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696279134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMew1gSyNVPm0xhzNs0Ur6CLjqtEyw9TPQHss5M2/sA=; b=eyjBvLbESszYkO4oVuWRXmZwBg6Nhhb6S/jfxKtRhdeKXTRZcTBDvIdw83qr10rQxWft1p FGbZJpg1qfmaY0f7R9r/Ru4k9LoDINsh2Gfw+FBsFhXdggBftXGy1H/pYdg81QxTwFCSIL CJu4JuBwpLtHINRQsR92v013YSxhnN91TwqybNn6R9Q0+kgpgqkep83ZCaDgpOLBQVriuD 8q0+4QMPE5vb/Epgkizhq0w791UoDVr2WaiPxEloNzqUD3dPKfCie8NPG61U7wb64M44HL TG04Ztdea34uAux1qRZHYd3r4EHSu61DPLqp0yImDPkEDu1Y7BV06OZWYtpwVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzt8Y6Yl0zBfK; Mon, 2 Oct 2023 20:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392Kcrbg003018; Mon, 2 Oct 2023 20:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392Kcrrf003015; Mon, 2 Oct 2023 20:38:53 GMT (envelope-from git) Date: Mon, 2 Oct 2023 20:38:53 GMT Message-Id: <202310022038.392Kcrrf003015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: bd572be78436 - main - setusercontext(): Fix gap when setting a realtime-class priority List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd572be78436473a2ad4c1b78728b739c74ef238 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bd572be78436473a2ad4c1b78728b739c74ef238 commit bd572be78436473a2ad4c1b78728b739c74ef238 Author: Olivier Certner AuthorDate: 2023-05-25 07:10:27 +0000 Commit: Ed Maste CommitDate: 2023-10-02 20:38:03 +0000 setusercontext(): Fix gap when setting a realtime-class priority The login.conf's "priority" capability allows to set priorities in the idle or realtime classes in addition to the classical nice values (-20 to 20), through a natural extension where values greater than 20 put the processes in the idle class (with priority adjusted within RTP_PRIO_MIN and RTP_PRIO_MAX, 21 being converted to 0, 22 to 1, etc.) and values lower than -20 put the process in the realtime class (with priority adjusted within RTP_PRIO_MIN and RTP_PRIO_MAX, -21 being converted to RTP_PRIO_MAX (31), -22 to 30, etc.). Before this fix, in the latter case (realtime class), -21 was converted to 30, and RTP_PRIO_MAX (31) could never be specified. While here, change the priority computation for the idle-class case to be symmetrical and use RTP_PRIO_MIN (in practice, this changes nothing at all, since RTP_PRIO_MIN is 0; but this is the correct theoretical formula, which would work as well with other values of RTP_PRIO_MIN). PR: 271727 Reviewed by: imp, kib MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40339 --- lib/libutil/login_class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index f561479690c1..90a3ec5d106a 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -452,7 +452,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (p > PRIO_MAX) { rtp.type = RTP_PRIO_IDLE; - p -= PRIO_MAX + 1; + p += RTP_PRIO_MIN - (PRIO_MAX + 1); rtp.prio = p > RTP_PRIO_MAX ? RTP_PRIO_MAX : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", @@ -460,7 +460,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in lc ? lc->lc_class : LOGIN_DEFCLASS); } else if (p < PRIO_MIN) { rtp.type = RTP_PRIO_REALTIME; - p -= PRIO_MIN - RTP_PRIO_MAX; + p += RTP_PRIO_MAX - (PRIO_MIN - 1); rtp.prio = p < RTP_PRIO_MIN ? RTP_PRIO_MIN : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", From nobody Mon Oct 2 20:46:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RztKH3vc4z4wTCd; Mon, 2 Oct 2023 20:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RztKH3S3hz3LGd; Mon, 2 Oct 2023 20:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696279587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzZ4PxZe6kv06zJ60w3qHJi9T/pg7dHv/oo5GBM7DqA=; b=d6YNT0b+I1Nqqaq0SuCbOP/MDU00x+RqtzMPHD2WlsbXHJEz3x8yH5TBAzqiALQGqrVF+j AzRH7GCFQ4DfB7zxhn1QAbYluFTSJZKPj1cy23SBHy+Y6boBhO8rKFpANUzzzAP+QmB13k deu82ls3bODE0agFcpnSVm/tMRl3fhNSvwhLUHV9OJKujPDitZdNnMqsj/+LdBjbgFCGbb 5UhLkCug6DZMnOji30fjxyVefsX4/g3Z6ly39eZOyd53MbeQcAKSSk03kDRxMUI3Kiq9oW dZobseOp1BtnFB/DFtDCewJxOluZjt7MNeWqdWHn7g7CVQ+wsb0vJVqPw905BA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696279587; a=rsa-sha256; cv=none; b=a/apnjSLcxQpn7a93EzIrPGG20Eso6exxxCShBSx4Fc9gpWxbb+UkC3ZfhPoOBP7rP0lpE xCX+4ARgrjS/y4rRhhwdFS7kAfkiZPrtXogYIJ/0GUVJuRDrsyzB90WyVjuQ2EiQKZ2yd+ 28QTu+XODm6162+71bgQ0RmU10K/SMXh1t3HOnysHzWAKAz0GajL69XHx3IEby83JntKr8 jPfP+iguUi16mU9W/C4W8JyyVxrENgV0Mm6ad9SMh1M68MB7txbiYwp0ikh9DAwWjbccp4 0BnctMql6TEEoIZkg1ihvr11/Kh+Dq30+7YCPeklaVh2gDoGHbNe4a3ZyKgEEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696279587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzZ4PxZe6kv06zJ60w3qHJi9T/pg7dHv/oo5GBM7DqA=; b=t1r+KJwQYIT7Sp+Xvq8lXNpGH1pCy1n3oZunHvadc6sETjN2XeA4Qkox2c4iJukQjr7uLV YUaVoeOJ4Yo+ItV/puIcocKzgzgJDt1++1IJCC/+QbEdB8BqLECL5mjbeFoEJuE+wlkBoY XUXY9TWQuXEeZ9gdppjW4IzZEQ8dYgTr1jEzHMee1l/xdkqENTkkNZvx+q4lDeBjTfC2IS pFQHEqKISb2kcZlXJqHQCBqDKujcvKwPUzHSm6gfjwb3iXfRF0CfZ2WUtOkXftsNt1JiZu QmVH+SajyehGyeoUpmQkShIwxmTXcU/VkZKr7U41PUJMR1lWDv91FhmzrtX+Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RztKH2WQnzBGK; Mon, 2 Oct 2023 20:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392KkRlw019805; Mon, 2 Oct 2023 20:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392KkRXW019802; Mon, 2 Oct 2023 20:46:27 GMT (envelope-from git) Date: Mon, 2 Oct 2023 20:46:27 GMT Message-Id: <202310022046.392KkRXW019802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b8c1aadef9d8 - main - login_cap.c: Don't set errno to ERANGE on memory allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8c1aadef9d80786daf731300c33d3a001261422 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b8c1aadef9d80786daf731300c33d3a001261422 commit b8c1aadef9d80786daf731300c33d3a001261422 Author: Olivier Certner AuthorDate: 2023-05-25 11:48:40 +0000 Commit: Ed Maste CommitDate: 2023-10-02 20:41:22 +0000 login_cap.c: Don't set errno to ERANGE on memory allocation failure Modified functions: login_getcaptime(), login_getcapnum(), login_getcapsize(). They all call cgetstr(), which returns -2 on such conditions and already sets errno to ENOMEM, arguably the appropriate value for these functions as well. No in-tree consumer currently checks for errno on error reported by these functions, so this change has no other code impact. Reviewed by: kib MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40342 --- lib/libutil/login_cap.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index e71d38d2d93b..aeda7d5e828b 100644 --- a/lib/libutil/login_cap.c +++ b/lib/libutil/login_cap.c @@ -650,10 +650,8 @@ login_getcaptime(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) return def; - else if (r < 0) { - errno = ERANGE; + else if (r < 0) return error; - } /* "inf" and "infinity" are special cases */ if (isinfinite(res)) @@ -735,19 +733,18 @@ login_getcapnum(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) /* * For BSDI compatibility, try for the tag= first */ - if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) { + r = cgetstr(lc->lc_cap, cap, &res); + if (r == -1) { long lval; /* string capability not present, so try for tag# as numeric */ if ((r = cgetnum(lc->lc_cap, cap, &lval)) == -1) return def; /* Not there, so return default */ - else if (r >= 0) + else if (r < 0) + return error; + else return (rlim_t)lval; - } - - if (r < 0) { - errno = ERANGE; + } else if (r < 0) return error; - } if (isinfinite(res)) return RLIM_INFINITY; @@ -786,10 +783,8 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) return def; - else if (r < 0) { - errno = ERANGE; + else if (r < 0) return error; - } if (isinfinite(res)) return RLIM_INFINITY; From nobody Mon Oct 2 20:58:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RztZj3Yqlz4wTcq; Mon, 2 Oct 2023 20:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RztZj34Q9z3M1v; Mon, 2 Oct 2023 20:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696280285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JQTiz4wMJsH2LUfGmfYtvXPrNkXtRjRFjRlZXtdt0Wc=; b=IfEsNwppaE0vomOVypaok3byiy92lXA5clZ96Fm3PoODDI0/snIwj53ceCDKM/aRANK7zH PI2g89G16DAfEKak0hnosCdrYnB1LbxCGbo4/U7SkZi2ykYIzJCQv6nQ4KYcH6JvWSuyZN DSMYN+h90kyS2UdaMR7dws26KVn4DQaSeVVcr8rfwW2eCb62HmpXQMGqItAJpc4H6ek8Q/ ah1riKEkGVuOiiMf/+5dMIOokJ0tzFz2+D8gCAE63kEwtf+7kkZqp0rhG8P3bDGZ13uU17 OUg9RY2Yip9JXKIa28AQHW+6UPnuG/3jr5Hm3nRStntw65fwcMKyrkbWTKgUag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696280285; a=rsa-sha256; cv=none; b=pf0x9gWrOt/BHzfDhMREp+Gzy0OHuKcXw6ziNoQOVxTNl7nDDgcPQK37YAXKsWwyjCHKMr FC2tpO+QaQW4PK9NJq3zW4gH1/F6ZwNOBlm7fVQGqKGtHSV2JEQQ8oSE2bTx2E6MmxLq8m nU2DJxYpQ3w9swDFrTXZdk7JD8RiL2FQNv6JnjvGdFKuum49lDJkeCdYSpRN0SjNBsTliF CB4idwbQ5knz5Chg8CwDlnuL3J6FN1WIAlILQufsO8lg7TXXlHREq+Cc9ZcFM3sFzv9SCg VTe13exLaGdDhFZ0Tjnvj9jH1F5oUJ4ihKg14+GNqXI3O7TGuVGKlzr8pjJSIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696280285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JQTiz4wMJsH2LUfGmfYtvXPrNkXtRjRFjRlZXtdt0Wc=; b=HPh1OlCidCtnEgwHriPkJKpImSllCawWNVX+afuENmZaWvBT8HvoH0t5BcmrNlU9KoHl87 M5PvoSToGhk/JoJw5JsDVjxv3AGDpQY9XU/Fxdia7bkIjHkJJ+Rzms3+d7Iu3qVDmq+2Jx RFMWswfPdsPucfTc89ZL9EqEiVXVwaiYFTAIy7OmDVquA+zmpWTXGdRrV1p94uYPnQgZbX dXFcRSPtEyMEOi4TuxaXzf2TnCj/ZItXo/CJRjw9e7bsDzPuk4JbVhKp1RrvWkyBA8LRKd ZUGX2kI7DkykIey1dlE98kCZz0D6ssLCUdxXiC2W+6itIf8dVKNE4Fc6s7MMKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RztZj29LMzCYP; Mon, 2 Oct 2023 20:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392Kw5js035989; Mon, 2 Oct 2023 20:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392Kw5dE035986; Mon, 2 Oct 2023 20:58:05 GMT (envelope-from git) Date: Mon, 2 Oct 2023 20:58:05 GMT Message-Id: <202310022058.392Kw5dE035986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c4b927c341e2 - main - geli tests: Use shorter passphrases in setkey_passphrase List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4b927c341e23eea17f75d139aafcf58545c5b0e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c4b927c341e23eea17f75d139aafcf58545c5b0e commit c4b927c341e23eea17f75d139aafcf58545c5b0e Author: Mark Johnston AuthorDate: 2023-10-02 20:55:26 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 20:57:51 +0000 geli tests: Use shorter passphrases in setkey_passphrase There is an undocumented limit on the length of a GELI passphrase, and the test exceeded that. Most of the time it worked because a nul terminator would appear early enough in the string. Reported by: Jenkins Fixes: 2b7b09ac9675 ("geli tests: Add a regression test for geli setkey -J") --- tests/sys/geom/class/eli/setkey_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/geom/class/eli/setkey_test.sh b/tests/sys/geom/class/eli/setkey_test.sh index ce3833f5fe0c..34fb8221ab04 100644 --- a/tests/sys/geom/class/eli/setkey_test.sh +++ b/tests/sys/geom/class/eli/setkey_test.sh @@ -108,9 +108,9 @@ setkey_passphrase_body() atf_check dd if=/dev/random of=rnd bs=512 count=${sectors} status=none hash1=`dd if=rnd bs=512 count=${sectors} status=none | md5` atf_check_equal 0 $? - atf_check dd if=/dev/random of=pass1 bs=512 count=32 status=none - atf_check dd if=/dev/random of=pass2 bs=512 count=32 status=none - atf_check dd if=/dev/random of=pass3 bs=512 count=32 status=none + atf_check dd if=/dev/random of=pass1 bs=512 count=1 status=none + atf_check dd if=/dev/random of=pass2 bs=512 count=1 status=none + atf_check dd if=/dev/random of=pass3 bs=512 count=1 status=none atf_check geli init -B none -J pass1 ${md} atf_check geli attach -j pass1 ${md} From nobody Mon Oct 2 21:50:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rzvlc3w10z4wWf8; Mon, 2 Oct 2023 21:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rzvlc3T1Nz3R8S; Mon, 2 Oct 2023 21:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696283452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZ5dipZEZw74N/41sRIQqxvf5uwhCo2JtwJfDjRx/u0=; b=MmBp3qvAocfi/UUwROPh5gZMXxoXnbQ05w7zOwH8K3ZNQeK2gq4WuwG9+a3VOdtg2TjOgX lUQKCx7AswFBwJdpfie09k4jMUwHI/D/YqM0GhobxJ86cbrC8CAEAk8TeqW2Oc/wikphgj OA4lT9p1VeSKsuWPV956vaLZokwRjNnJo73LQuU2sg+LNlsnNKVDw07kOvbePISg6NUBt5 52BiM78XsNAe3pqq6HZVDcBaUhXbwC4gFbuZ685ddRlNvhw2FSzkQwrUnTAQcSw7/nKzr2 T88UBXswrIQ9At/BD2kS5Zqo8B5NCfKEL3weo+Dxd5058O5dKLIk6qUVM4KwNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696283452; a=rsa-sha256; cv=none; b=Ybr2XZpmgyC3ih3xbozGajIOKf95CHCUr3aPvpPX5Di4J5XZmmMKxqT/5OJUf6XsJD0C+I LLOqMblG/Mvc24p35qOZL8HRCQckmkfAwqO7GQ+QhGf1n2FA5t5GLn9b8JoEF3B/NW4N0O AA5ROYDKLh27AOAxbmyR6H166MB2Co3v9mj6HASiem5sdqoM3YA0dFWCS1KdScP1E8woTx ll6Z89qoc2o/xuxhswYxjpduNqCf1r6/LwYnAy3KNLniyIfcF2ZDd19+ws6TFB3qm1IyqI kM9K/6C31MlZ0HAp8nYpVXZRMtZpOFhQpEWuvgDCy8U8aQh3gL8fLsGntHszIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696283452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZ5dipZEZw74N/41sRIQqxvf5uwhCo2JtwJfDjRx/u0=; b=LpUiroYq2cGIXbxnisBgATXKqbZsB/l56DLQWueipHhIQn+8nhS6PJHURI1dxoEm+jI1I3 63lYvRjqRtDw7zI8ywAUBon7oehGJ9O2eKWmcg0SLABP11SXBf50B14+QciSgJyEgsVw1H x2ieUR68qHAwva2ZohMDGCwNd4CMsZvOM/uJV5xMIZyq37Y2AKNXT/nVazWrYhEYVRoIrE 7qh/n9J6+PnVGWyI1DxV899fPRuqU1ftBgVpzL28ANJjaUSYut5etxMKsEgeUx8QJ8HSk/ hEoummlAd9Fv38wZ5tfuIN4VDKidpFNbbKLdWgQ/nc+Ceh7rHX1FG2ECJ+ck4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rzvlc2XVzzDJg; Mon, 2 Oct 2023 21:50:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392LoqNS029665; Mon, 2 Oct 2023 21:50:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392Loq9W029662; Mon, 2 Oct 2023 21:50:52 GMT (envelope-from git) Date: Mon, 2 Oct 2023 21:50:52 GMT Message-Id: <202310022150.392Loq9W029662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ccac440f7cbb - main - libprocstat: style: space after switch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccac440f7cbb013de41aa3933f3f7be77225c44f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ccac440f7cbb013de41aa3933f3f7be77225c44f commit ccac440f7cbb013de41aa3933f3f7be77225c44f Author: Brooks Davis AuthorDate: 2023-10-02 21:50:00 +0000 Commit: Brooks Davis CommitDate: 2023-10-02 21:50:00 +0000 libprocstat: style: space after switch Style demands a space after the switch keyword. Noticed reviewing code in CheriBSD that propagated the style bug. Reported by: markj Sponsored by: DARPA Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D42041 --- lib/libprocstat/libprocstat.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 0af79b6e63a0..a302310dfb9a 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -347,7 +347,7 @@ struct filestat_list * procstat_getfiles(struct procstat *procstat, struct kinfo_proc *kp, int mmapped) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getfiles_kvm(procstat, kp, mmapped)); case PROCSTAT_SYSCTL: @@ -1527,7 +1527,7 @@ procstat_get_socket_info_kvm(kvm_t *kd, struct filestat *fst, /* * Protocol specific data. */ - switch(dom.dom_family) { + switch (dom.dom_family) { case AF_INET: case AF_INET6: if (proto.pr_protocol == IPPROTO_TCP) { @@ -1600,7 +1600,7 @@ procstat_get_socket_info_sysctl(struct filestat *fst, struct sockstat *sock, /* * Protocol specific data. */ - switch(sock->dom_family) { + switch (sock->dom_family) { case AF_INET: case AF_INET6: if (sock->proto == IPPROTO_TCP) { @@ -1961,7 +1961,7 @@ procstat_getvmmap(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2066,7 +2066,7 @@ gid_t * procstat_getgroups(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getgroups_kvm(procstat->kd, kp, cntp)); case PROCSTAT_SYSCTL: @@ -2144,7 +2144,7 @@ int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, unsigned short *maskp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getumask_kvm(procstat->kd, kp, maskp)); case PROCSTAT_SYSCTL: @@ -2234,7 +2234,7 @@ int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, int which, struct rlimit* rlimit) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getrlimit_kvm(procstat->kd, kp, which, rlimit)); @@ -2293,7 +2293,7 @@ int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, char *pathname, size_t maxlen) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: /* XXX: Return empty string. */ if (maxlen > 0) @@ -2366,7 +2366,7 @@ procstat_getosrel_core(struct procstat_core *core, int *osrelp) int procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, int *osrelp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getosrel_kvm(procstat->kd, kp, osrelp)); case PROCSTAT_SYSCTL: @@ -2506,7 +2506,7 @@ Elf_Auxinfo * procstat_getauxv(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2620,7 +2620,7 @@ struct kinfo_kstack * procstat_getkstack(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2749,7 +2749,7 @@ fail: struct advlock_list * procstat_getadvlock(struct procstat *procstat) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); From nobody Mon Oct 2 22:31:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfG0SGrz4wZ6W; Mon, 2 Oct 2023 22:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfF5nx8z3Vgh; Mon, 2 Oct 2023 22:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rl9f6RVEy4dAdE4u2aH4iutMs3zv2ePOnEMSLXO36P4=; b=Y+AZf23KXZ1SCwm7o3mIMBMsgiJawfgZV48LF7kkliP2Nf9XMPY50Vs1dtznmv82B130x6 u34l6Sq4ZUS57LILUXPnjCzIE1qEoSSJiD/Vat+mDHNBqpENEHbs8wCa8gqjixIf1g7aha CEEtjDhmKPZnlN+BN9bWoSyIe41/iQHuZZXdlFg544tb4xc4zjnpnB0vuhtnZa2hxsoVmh vbfd4llKgvYT2GHf0IRh0YENdbG+eddf3+Fmc+hBZOO2z2n0KcUnazThm7AOBWbDnaDy0p FXLWGKGltW28mmhk/fpon596tpNQClmZnhrLm+7Re3d69A/43cK7LIqPKEfK/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285877; a=rsa-sha256; cv=none; b=JqeoNIa1X2vX9JjdFweHZT7QuiaKmwbASys/bwEFz+tnL2wFyR6OOxJRni14adEjBNc1Wl wmPQo0mV8Vm6r2SRxZUZ0eAhqn2FSoZLlvwWoUu+aKvRJAMzdAOLwz7FWYa8Yk9WbIuEuv hY85x9uYD0gbYIWWX0wZ2RK8/JnaHBAL/C5tNzVyGnovPNgdDoLJPRLqvVtt8d9+gL3oz+ SUJms4RIZDIjW80Dg0r1BaXRBZVKyDbI0DZV3UjY4LWnNSaJNWpbQHYaxcBPwDlfvcJG+P YgoBxhp9iE5FioMfbXCm6v90euw3TBDitfd/RPCa9TCH26FzTkwsW426KjrYeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rl9f6RVEy4dAdE4u2aH4iutMs3zv2ePOnEMSLXO36P4=; b=cCbGn7hxcVEYchOqHDDQva8XL/TZrdfSjySgeLzW8kjc3TVJA2vCJnS30JDyDkaOUHNOZL uP2cBoppcN+UOxTZMT81anMre0MF+O6gUwJ8tFl4qxqUR65NfL/Cuj7Xva334ejgjvlHoo 6EwlM8e4sys9EhDq7rePLjWWVEU9pJCXweday/5jRMk2eiLUEiSGJSd5r5NpT7CSOecOAL CgG32Mt7uBbROFiu7WEiZEFQ94Ia0J6T6D06G1TWXDFTSk5/A/S+g3DEmLD8UWp21sD7nJ NE5lMuepZ8GrzgF4zHwvX5ZKokXWMFoRHuS982O/M91Ogjfj41IiOAuZp0Li1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfF4rqVzW9t; Mon, 2 Oct 2023 22:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVHBr098914; Mon, 2 Oct 2023 22:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVHnJ098911; Mon, 2 Oct 2023 22:31:17 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:17 GMT Message-Id: <202310022231.392MVHnJ098911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6b3bb233cd0c - main - amd64 cpu_fetch_syscall_args_fallback(): fix whitespace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b3bb233cd0c3eeeb70e388a62b142b4f22b62b2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6b3bb233cd0c3eeeb70e388a62b142b4f22b62b2 commit 6b3bb233cd0c3eeeb70e388a62b142b4f22b62b2 Author: Konstantin Belousov AuthorDate: 2023-09-26 09:20:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:52 +0000 amd64 cpu_fetch_syscall_args_fallback(): fix whitespace Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- sys/amd64/amd64/trap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 4d5887369207..ef38c0789636 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -1032,10 +1032,10 @@ cpu_fetch_syscall_args_fallback(struct thread *td, struct syscall_args *sa) regcnt--; } - if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; - else - sa->callp = &p->p_sysent->sv_table[sa->code]; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; + else + sa->callp = &p->p_sysent->sv_table[sa->code]; KASSERT(sa->callp->sy_narg <= nitems(sa->args), ("Too many syscall arguments!")); @@ -1045,7 +1045,7 @@ cpu_fetch_syscall_args_fallback(struct thread *td, struct syscall_args *sa) if (sa->callp->sy_narg > regcnt) { params = (caddr_t)frame->tf_rsp + sizeof(register_t); error = copyin(params, &sa->args[regcnt], - (sa->callp->sy_narg - regcnt) * sizeof(sa->args[0])); + (sa->callp->sy_narg - regcnt) * sizeof(sa->args[0])); if (__predict_false(error != 0)) return (error); } From nobody Mon Oct 2 22:31:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfH0j5rz4wYy7; Mon, 2 Oct 2023 22:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfG75btz3Vdb; Mon, 2 Oct 2023 22:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwT7gABVdN8aT4oyJEVnaqHOz1ZzBi6lZuSViiSTBGo=; b=fsHirPz+B+ZtuYaSxqm/m991H0AuuX1u2Jk7BQHxbs9cWnr+OSI6/rTpeixtESgi6YfPlT u/RjzZdXXQuzxCx4HYcf2iWcovgkAmoEZuukfzOt9Yb4A0voSIhXSbJBVMCN0P8SzN8Po9 gI2pwVHftEiM1RBnBzYISnCw8auTE9v7rW5/02IbDtcLMTXjAVVDndG8LVr2vRguulsEtn uw+XW9W5V6WgG/HIUJt1jW5rvhN/PTPVWVOnW34g+IZaC1qcRfK+QyLLyEbm4+sEQkwoHr /QYwjqDj76yxIhS6Fcvk2cyi7noeRpYXUQNFHTacxyafy7e9QPH+Wu7qsTsMwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285879; a=rsa-sha256; cv=none; b=sKf3bwb6q1EIKx+7C1qZFBUTrTRkcJgd9XArXBHtWfN+0jm0yPyDfM9vJOfuRo5lobSRjR fiSTfIrP5LeVHI84Xf30pQ9aNoNUsp6x4tn7sgKNc1rPI183bQq8T0py6dpWXMHC3o9fAz tyo0134pCehDBVP64ucSjUEcDlKvE+TEvoZAjSdtNEFj0JMRflxUt1aUJryuLDB/Vn6E4c ieQuw+mNOYa7bMKumODpJdEJnjQAAlo7BG1VXHTjJodIdTf1dVrBj+Wdu1EDL1DoPEO/ox vaCOytCTNJh/6mWQJsl3FRPxqX3hR2ZK9H7kD7NrPwKIn+/PuBk8UDOzcS6uIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwT7gABVdN8aT4oyJEVnaqHOz1ZzBi6lZuSViiSTBGo=; b=MjGbBu/Z0OkJ2gkByvrUERpguypMUldQDIpnKlJemaagu9582J+kShEFRUQ7LcGIcxQqV9 YnCrCzzp7UwH0njHHMq7rp9v4aM82iPPMkRvx4d3JI2M/3sSqsBjFOTtWftgk+HWI/81PN AmwiyMfkxbibljx+7RdLvduTOi5tCoGys/QGld4GExIIiXCZqjODHhVDmajN2Q6eolsR/y nBLMIj6aCqIomvT6fGhDESUAmvqk4AmjQYXxKWLvXeIq/0lrT4Ln+TY73X3lIJxiWVHyhm yHWy/5iDjpexv3KpInkKCqvFEanvgcGC2+rCwW9XnlNL6Rb2JrxPg3teLoPeQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfG5zqVzVm5; Mon, 2 Oct 2023 22:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVIS7098966; Mon, 2 Oct 2023 22:31:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVIap098963; Mon, 2 Oct 2023 22:31:18 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:18 GMT Message-Id: <202310022231.392MVIap098963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 39024a891469 - main - syscalls: fix missing SIGSYS for several ENOSYS errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39024a89146902ca9aba250130b828ad9aced99d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=39024a89146902ca9aba250130b828ad9aced99d commit 39024a89146902ca9aba250130b828ad9aced99d Author: Konstantin Belousov AuthorDate: 2023-09-25 16:32:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:52 +0000 syscalls: fix missing SIGSYS for several ENOSYS errors In particular, when the syscall number is too large, or when syscall is dynamic. For that, add nosys_sysent structure to pass fake sysent to syscall top code. Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- sys/amd64/amd64/trap.c | 2 +- sys/amd64/ia32/ia32_syscall.c | 2 +- sys/arm/arm/syscall.c | 2 +- sys/arm64/arm64/elf32_machdep.c | 2 +- sys/arm64/arm64/trap.c | 2 +- sys/arm64/linux/linux_sysvec.c | 2 +- sys/i386/i386/trap.c | 2 +- sys/i386/linux/linux_sysvec.c | 2 +- sys/kern/kern_sig.c | 3 ++- sys/kern/kern_syscalls.c | 25 +++++++++++++++++++------ sys/kern/subr_syscall.c | 3 ++- sys/powerpc/powerpc/trap.c | 2 +- sys/riscv/riscv/trap.c | 2 +- sys/sys/sysent.h | 3 ++- 14 files changed, 35 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index ef38c0789636..8114105655f8 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -1033,7 +1033,7 @@ cpu_fetch_syscall_args_fallback(struct thread *td, struct syscall_args *sa) } if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c index 3fb905ab9e0a..c61587a93d1f 100644 --- a/sys/amd64/ia32/ia32_syscall.c +++ b/sys/amd64/ia32/ia32_syscall.c @@ -183,7 +183,7 @@ ia32_fetch_syscall_args(struct thread *td) params += sizeof(quad_t); } if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/arm/arm/syscall.c b/sys/arm/arm/syscall.c index 57644c023646..c440f501e834 100644 --- a/sys/arm/arm/syscall.c +++ b/sys/arm/arm/syscall.c @@ -118,7 +118,7 @@ cpu_fetch_syscall_args(struct thread *td) } p = td->td_proc; if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; error = 0; diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index e1fcb533a8cc..9cf1b2e11f8b 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -191,7 +191,7 @@ freebsd32_fetch_syscall_args(struct thread *td) } if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index c3221e9faf9f..2dda8cfc4c20 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -151,7 +151,7 @@ cpu_fetch_syscall_args(struct thread *td) } if (__predict_false(sa->code >= p->p_sysent->sv_size)) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 5f9252accb5f..19dd5866ba50 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -123,7 +123,7 @@ linux_fetch_syscall_args(struct thread *td) sa->original_code = sa->code; /* LINUXTODO: generic syscall? */ if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 172317aead29..d0ee2b30a3ce 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -1113,7 +1113,7 @@ cpu_fetch_syscall_args(struct thread *td) } if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index fe3e3f743620..a3d445951cce 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -522,7 +522,7 @@ linux_fetch_syscall_args(struct thread *td) if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 964ad2398bd9..8d0d2903bac0 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2686,7 +2686,8 @@ ptrace_syscallreq(struct thread *td, struct proc *p, audited = AUDIT_SYSCALL_ENTER(sc, td) != 0; if (!sy_thr_static) { - error = syscall_thread_enter(td, se); + error = syscall_thread_enter(td, &se); + sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; if (error != 0) { tsr->ts_ret.sr_error = error; return; diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index 78014a36b34b..f923211cb6c8 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -61,6 +61,17 @@ lkmressys(struct thread *td, struct nosys_args *args) return (nosys(td, args)); } +struct sysent nosys_sysent = { + .sy_call = (sy_call_t *)nosys, + .sy_systrace_args_func = NULL, + .sy_narg = 0, + .sy_flags = SYF_CAPENABLED, + .sy_auevent = AUE_NULL, + .sy_entry = 0, /* DTRACE_IDNONE */ + .sy_return = 0, + .sy_thrcnt = SY_THR_STATIC, +}; + static void syscall_thread_drain(struct sysent *se) { @@ -78,19 +89,21 @@ syscall_thread_drain(struct sysent *se) } int -syscall_thread_enter(struct thread *td, struct sysent *se) +syscall_thread_enter(struct thread *td, struct sysent **se) { uint32_t cnt, oldcnt; - KASSERT((se->sy_thrcnt & SY_THR_STATIC) == 0, + KASSERT(((*se)->sy_thrcnt & SY_THR_STATIC) == 0, ("%s: not a static syscall", __func__)); do { - oldcnt = se->sy_thrcnt; - if ((oldcnt & (SY_THR_DRAINING | SY_THR_ABSENT)) != 0) - return (ENOSYS); + oldcnt = (*se)->sy_thrcnt; + if ((oldcnt & (SY_THR_DRAINING | SY_THR_ABSENT)) != 0) { + *se = &nosys_sysent; + return (0); + } cnt = oldcnt + SY_THR_INCR; - } while (atomic_cmpset_acq_32(&se->sy_thrcnt, oldcnt, cnt) == 0); + } while (atomic_cmpset_acq_32(&(*se)->sy_thrcnt, oldcnt, cnt) == 0); return (0); } diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index c0262a1b1010..ff13672501b2 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -144,7 +144,8 @@ syscallenter(struct thread *td) AUDIT_SYSCALL_ENTER(sa->code, td) || !sy_thr_static)) { if (!sy_thr_static) { - error = syscall_thread_enter(td, se); + error = syscall_thread_enter(td, &se); + sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; if (error != 0) { td->td_errno = error; goto retval; diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index 1527e813647d..7f1a267f5cf2 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -694,7 +694,7 @@ cpu_fetch_syscall_args(struct thread *td) } if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index b855fcc4163a..ea48b02ba29b 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -115,7 +115,7 @@ cpu_fetch_syscall_args(struct thread *td) } if (__predict_false(sa->code >= p->p_sysent->sv_size)) - sa->callp = &p->p_sysent->sv_table[0]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 3f52848af982..3ef6b06c5545 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -191,6 +191,7 @@ struct sysentvec { extern struct sysentvec aout_sysvec; extern struct sysent sysent[]; extern const char *syscallnames[]; +extern struct sysent nosys_sysent; struct nosys_args { register_t dummy; @@ -319,7 +320,7 @@ struct nosys_args; int lkmnosys(struct thread *, struct nosys_args *); int lkmressys(struct thread *, struct nosys_args *); -int syscall_thread_enter(struct thread *td, struct sysent *se); +int syscall_thread_enter(struct thread *td, struct sysent **se); void syscall_thread_exit(struct thread *td, struct sysent *se); int shared_page_alloc(int size, int align); From nobody Mon Oct 2 22:31:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfJ19Hfz4wZ9n; Mon, 2 Oct 2023 22:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfJ0Jmpz3VqK; Mon, 2 Oct 2023 22:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aYGxtpNonPK2XeoXtfDoYSwNX2i7eddwwSj3f+byW8=; b=u19GjWh4ly5lUN80Z1VYxifAB4rRygF/WJe0WhpYvpdxtSovnNG4WoG8Z1j3wQKRLibpAC xVa6G3EYNijqTnqWW1N/zYZBIUVQpy22plk/Q7iwrGx7Bn+1OwBvl9suHZUeRoFlpF9hga AETcfGnoJ8UbiBihzDPr1d/GyhuY0WCMWOm+41cvsJctsdljEGLUfYMyCCmws2xT7/axGc fHEBOcuDgJCz8tF6GlmAiB6ZcshcDgV7crbqZjwhuSgEBNMgjwXhvaARH4zM2FcbbrET7a fM/ilFT3tKZckn+CohLej8DAWgsS16qmwBnP+vRTi+dZkIBiKA8Q3KFEbdF+xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285880; a=rsa-sha256; cv=none; b=iuE1qqKP8hBo7gbsxIs+SWCdq+hJu3YxwvveSvrRh4embOamnaY2UOpOTA5RwWKde2DuWl E3Zls/tladg4TqFjxtVB4GBWWpwZwTzzVc5A+wUns4n+SQyqz/cUU/RJTPzL2XLvdMUYEC Pfgnw59+ro99kKRlpUpzs/2Odc+I/9WEjLTD/KxUxKgLNov6avV8KYsqgz4LIJBpKb721u e2ShjvAALLCPo+CcHoluHcmT4rEzIVF7vx+hAVF9+nuJ+XeKf/MD12aCR0xAO0V8r4SaO6 v5XvUtxW1ZylMRAO+3N6SZgASSMx5GiezW6aXfOzfHFf0jxtm8OVAdBgy1YH6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aYGxtpNonPK2XeoXtfDoYSwNX2i7eddwwSj3f+byW8=; b=syWwNSr60TFR2fX06LLlugLozLBJZTtS8hsmXL0ZCfFwz91OxEFUiybJkfYyKSd/DJVSRj rjNJ7cNph//yvxcPYc2wZGC4cUU/PztyaHXahqHRfoQpu8zphW6oRueftIVOQFzifFH/5b IG8Zh/uKWPJ84hopaDy9R5TtVzCKVgVcmnivoX7YQ2AtSrOSJqdMipw8oyAqzedac6BFvJ CiaQ1RQ+i019SaxV/QWrUwXOLVjd2GLGz1W/Ta5fzhWGhK664snfEffOy+2wvl0RJd+Qa9 DqNnlGydWHbQ6nalrigggskm4y75EwUNnSTJZMSj6Vv/mzvh5tDb0SRYV5Iwgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfH6SFxzW9x; Mon, 2 Oct 2023 22:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVJRL099005; Mon, 2 Oct 2023 22:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVJuS099002; Mon, 2 Oct 2023 22:31:19 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:19 GMT Message-Id: <202310022231.392MVJuS099002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b82b4ae75250 - main - sysentvec: add SV_SIGSYS flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b82b4ae752501469053979393e33bbfa74fbc9d2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b82b4ae752501469053979393e33bbfa74fbc9d2 commit b82b4ae752501469053979393e33bbfa74fbc9d2 Author: Konstantin Belousov AuthorDate: 2023-09-25 16:33:36 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:52 +0000 sysentvec: add SV_SIGSYS flag to allow ABIs to indicate that SIGSYS is needed. Mark all native FreeBSD ABIs with the flag. This implicitly marks Linux' ABIs as not delivering SIGSYS on invalid syscall. Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- sys/amd64/amd64/elf_machdep.c | 6 ++++-- sys/arm/arm/elf_machdep.c | 2 +- sys/arm64/arm64/elf32_machdep.c | 2 +- sys/arm64/arm64/elf_machdep.c | 2 +- sys/compat/ia32/ia32_sysvec.c | 3 ++- sys/i386/i386/elf_machdep.c | 2 +- sys/kern/imgact_aout.c | 6 ++++-- sys/kern/kern_sig.c | 8 +++++--- sys/powerpc/powerpc/elf32_machdep.c | 2 +- sys/powerpc/powerpc/elf64_machdep.c | 4 ++-- sys/riscv/riscv/elf_machdep.c | 2 +- sys/sys/sysent.h | 2 +- 12 files changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 08eaa1e8ac8b..fc25decc64a2 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -80,7 +80,8 @@ struct sysentvec elf64_freebsd_sysvec_la48 = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | - SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG, + SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG | + SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, @@ -122,7 +123,8 @@ struct sysentvec elf64_freebsd_sysvec_la57 = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | - SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG, + SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG | + SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 19332d86afc3..c02e489728dd 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -87,7 +87,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_maxssiz = NULL, .sv_flags = SV_ASLR | SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | - SV_ABI_FREEBSD | SV_ILP32, + SV_ABI_FREEBSD | SV_ILP32 | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 9cf1b2e11f8b..4161f9d44ae7 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -105,7 +105,7 @@ static struct sysentvec elf32_freebsd_sysvec = { .sv_fixlimit = NULL, // XXX .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP | SV_TIMEKEEP | - SV_RNG_SEED_VER, + SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = freebsd32_set_syscall_retval, .sv_fetch_syscall_args = freebsd32_fetch_syscall_args, .sv_syscallnames = freebsd32_syscallnames, diff --git a/sys/arm64/arm64/elf_machdep.c b/sys/arm64/arm64/elf_machdep.c index 7ce521197503..dd053d4d7847 100644 --- a/sys/arm64/arm64/elf_machdep.c +++ b/sys/arm64/arm64/elf_machdep.c @@ -84,7 +84,7 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_SHP | SV_TIMEKEEP | SV_ABI_FREEBSD | SV_LP64 | - SV_ASLR | SV_RNG_SEED_VER, + SV_ASLR | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index b1f4b428a8aa..974bed85480c 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -127,7 +127,8 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_fixlimit = ia32_fixlimit, .sv_maxssiz = &ia32_maxssiz, .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 | - SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG, + SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | + SV_DSO_SIG | SV_SIGSYS, .sv_set_syscall_retval = ia32_set_syscall_retval, .sv_fetch_syscall_args = ia32_fetch_syscall_args, .sv_syscallnames = freebsd32_syscallnames, diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index 85653367c3b6..eb6ac5735e56 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -75,7 +75,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_IA32 | SV_ILP32 | - SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER, + SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index a4ac1901d50e..f1b2845349aa 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -91,7 +91,8 @@ struct sysentvec aout_sysvec = { .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, + .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32 | + SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, @@ -140,7 +141,8 @@ struct sysentvec aout_sysvec = { .sv_setregs = ia32_setregs, .sv_fixlimit = ia32_fixlimit, .sv_maxssiz = &ia32_maxssiz, - .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, + .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32 | + SV_SIGSYS, .sv_set_syscall_retval = ia32_set_syscall_retval, .sv_fetch_syscall_args = ia32_fetch_syscall_args, .sv_syscallnames = freebsd32_syscallnames, diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8d0d2903bac0..16bc1e441119 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -4219,9 +4219,11 @@ nosys(struct thread *td, struct nosys_args *args) p = td->td_proc; - PROC_LOCK(p); - tdsignal(td, SIGSYS); - PROC_UNLOCK(p); + if (SV_PROC_FLAG(p, SV_SIGSYS) != 0) { + PROC_LOCK(p); + tdsignal(td, SIGSYS); + PROC_UNLOCK(p); + } if (kern_lognosys == 1 || kern_lognosys == 3) { uprintf("pid %d comm %s: nosys %d\n", p->p_pid, p->p_comm, td->td_sa.code); diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 53af1642b6bf..fcdc1aa1e8a5 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -124,7 +124,7 @@ struct sysentvec elf32_freebsd_sysvec = { #endif .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP | SV_ASLR | - SV_TIMEKEEP | SV_RNG_SEED_VER, + SV_TIMEKEEP | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_shared_page_base = FREEBSD32_SHAREDPAGE, diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index 07c1892591d2..6edfd965b7ec 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -86,7 +86,7 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_ASLR | - SV_TIMEKEEP | SV_RNG_SEED_VER, + SV_TIMEKEEP | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, @@ -128,7 +128,7 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | - SV_TIMEKEEP | SV_RNG_SEED_VER, + SV_TIMEKEEP | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index f0732e731854..e3744aa2c9e5 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -84,7 +84,7 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_TIMEKEEP | - SV_ASLR | SV_RNG_SEED_VER, + SV_ASLR | SV_RNG_SEED_VER | SV_SIGSYS, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 3ef6b06c5545..0166523ab84e 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -164,7 +164,7 @@ struct sysentvec { #define SV_IA32 0x004000 /* Intel 32-bit executable. */ #define SV_AOUT 0x008000 /* a.out executable. */ #define SV_SHP 0x010000 /* Shared page. */ -#define SV_AVAIL1 0x020000 /* Unused */ +#define SV_SIGSYS 0x020000 /* SIGSYS for non-existing syscall */ #define SV_TIMEKEEP 0x040000 /* Shared page timehands. */ #define SV_ASLR 0x080000 /* ASLR allowed. */ #define SV_RNG_SEED_VER 0x100000 /* random(4) reseed generation. */ From nobody Mon Oct 2 22:31:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfK2F0qz4wZGr; Mon, 2 Oct 2023 22:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfK1Hn5z3W6L; Mon, 2 Oct 2023 22:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fqIfpP2OIAx4iiig2TZTCX/rSHWkVXwmh2pqAZps0mo=; b=WbtA6XlGCGffgX5wOSQgKfIb82/QBOdOI48xNq0o1cWVad/6upSQ03Txvtl18zqO63BCmY dyHesedsWFcrmBbqwzOf53XKs+4McOC+1Zsv9vp7bNOIjZoAR6gu5VYqLQZ1vNcEAWv8ud lu1/1E8RQCjYAxnB8AcjvF49Lf1X3EjlMpSaA2uU3hcQ0KldNeydpQ3eU0IpRud4algO0p sZUSSErKIkRBwpyYQUWdl19hK2IW1H+dpBN43eqOEmIVj8SCUcvUbTN1fVtS0pBZ1mKqQN uG5l9HabIxLK9wQhSgvEWuKFP3Ul9PHljAimAiCD/XAWU237AsdiIByo3Zrpyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285881; a=rsa-sha256; cv=none; b=qrSOCQiTxPyxl9gCrcAuoZ/Nz8fNAHmI6cloJScjVPdXEMw0Oz+u2mJBIyPbpw9lZNz3uI kaEm9hREFKAvxHWdM7U+AHCVxsC6yalSkBqBT8deG/O6NandaORYUOenGYxH9GDrtzCGJ3 RYZCawkWL4F2V6dtyJukVig+Uzpk6pTOzGhcD42CNlx7MNUc/i9IDHcISoxk7SFliRLKQr GzFLjiO026xrgOBYLlSBuTKFEbskIOKqLksHCIanTP89sGQyAAl4/7J9x/B3qG87Qx5WwR W52mDbOzufYa+xZtBsj14JUlA7VHbqJx5LLD3ZXTTz0KWz714AIt7A+i9XLQeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fqIfpP2OIAx4iiig2TZTCX/rSHWkVXwmh2pqAZps0mo=; b=ROiDpgv++Kaa9aaGQl5HMEMGHtrNPh79RN8FVwbg5oux3aQassUevCn4R5yeNUoJbjQaSw SqHWx2okeexr6Isr2zGF7221Vm9vd37PQW0bm69DW7b7ZmsQzalKL3w1A6pXFUUFnf+ICx KQHRREVRye+oWMkYdSSz02lmOo4YN0zoQQUE2rHvt5gpimR0S/SsLqPKI5n4lsUPCW9umS 6xNov915dGWQ69lgN96aVKtwMCWhfAW8NnubbOCJnZVw5ldKPgDb8g10X+XaGODHp0UMyx SfTSOhI0DaArQZifD7NE4xD+dU39lVGFmrmlgEyFRbnCd5bx8PJbywpLVc9esg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfK0HY0zVbk; Mon, 2 Oct 2023 22:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVKBl099060; Mon, 2 Oct 2023 22:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVK6Z099057; Mon, 2 Oct 2023 22:31:20 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:20 GMT Message-Id: <202310022231.392MVK6Z099057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5804a1623054 - main - nosys(): add kern.signosys tunable/sysctl to control SIGSYS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5804a1623054d865618d77cfac86978f03b8111a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5804a1623054d865618d77cfac86978f03b8111a commit 5804a1623054d865618d77cfac86978f03b8111a Author: Konstantin Belousov AuthorDate: 2023-09-25 16:36:04 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:53 +0000 nosys(): add kern.signosys tunable/sysctl to control SIGSYS Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- sys/kern/kern_sig.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 16bc1e441119..c847783cd3da 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -159,6 +159,10 @@ static int kern_lognosys = 0; SYSCTL_INT(_kern, OID_AUTO, lognosys, CTLFLAG_RWTUN, &kern_lognosys, 0, "Log invalid syscalls"); +static int kern_signosys = 1; +SYSCTL_INT(_kern, OID_AUTO, signosys, CTLFLAG_RWTUN, &kern_signosys, 0, + "Send SIGSYS on return from invalid syscall"); + __read_frequently bool sigfastblock_fetch_always = false; SYSCTL_BOOL(_kern, OID_AUTO, sigfastblock_fetch_always, CTLFLAG_RWTUN, &sigfastblock_fetch_always, 0, @@ -4219,7 +4223,7 @@ nosys(struct thread *td, struct nosys_args *args) p = td->td_proc; - if (SV_PROC_FLAG(p, SV_SIGSYS) != 0) { + if (SV_PROC_FLAG(p, SV_SIGSYS) != 0 && kern_signosys) { PROC_LOCK(p); tdsignal(td, SIGSYS); PROC_UNLOCK(p); From nobody Mon Oct 2 22:31:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfL3dYSz4wYv0; Mon, 2 Oct 2023 22:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfL2Y7Lz3W9C; Mon, 2 Oct 2023 22:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stl5KeLArxwt0b0+GsXh1UY31TyxrGdBrGUHf8GpRi0=; b=QCHxhZh5N6b1TDuY3h1JTsFCWAE7x3TLkD1pGkDEo25ykoMK23Dn3FJybnqKZLR3exkWq5 tLAhRoIrNmTk6FMB6AZIiqeO3+yNMfz/qt0jDuwptpfhiA0UhvIaIPzrgJN5NJ//4J6T29 c/3U4xC8euZPXj8hhTO7DQGFOAeo+8wbK4fqx/bZbm7pGI+JRGAchmBzKwBfCwEfzyyMpP pn+1yR25B0N7+WB4sdKpYDgTiLwavSjBh+2JBkOHL83nsJwyC1z6+u45SNI21395zwfRPO wUwR6G4UKtZAOrA+pYdi6skMtgTDyJaqTEjcFvxuLDyyuI60xAr3xvox/SLhQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285882; a=rsa-sha256; cv=none; b=TZ4BUyeaDBTZ89yKLtwnjOSTxnqAXhb4eVN+iEDMo6F7GePKADjR2mYpD6QiD4W+JcbN6F EcegyB4WYREqEA0XWTOak1zi1rd3d3M5KPZrOfORtReFlbTOhQ3ADX2SwwhlbjoM7VISmw rNAvNxk3O3AzMYWPixEcLig/BIQzEOeddbKIIYq18vNk6Buylui+bQLiJwKthqMYxY4yIu Kg929aHXCOvSb2sUrgPQwZFUe4/U4ei/t16OlDMGJPvDO3OEUfU3YxpaOECP4t1tgrDT7k S4JDflp2mlrT+qbw5GwsMiQciEZj0OzUXjpL1hHraAvYboEnUCyXWSFK7QfWBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stl5KeLArxwt0b0+GsXh1UY31TyxrGdBrGUHf8GpRi0=; b=jAV07tQHuIBHY3dcEUgHbPi4wjJhPx8gHtI8NlBj1sTIzGXa4RVVPJRtj5z4pVUsAdOIZN ch442elcgQ6gDcqx4OiEEQCWLLRhK4LVFwkOEAcriZDbLpRi95oYPMq6bDRav5bTVRQYeN GDp66rvII/IoAjuFgBrb6YFsdrjJDu5jqhVVFezDDssVmmmiTAwmZ9wBZvmKltJurPOGRZ ZMZNW4Ir0CMiHl1xXnmHelR7kZPUPjAhHoroiuFNOij/YVu7g1GJiWov9KVHKUFeC7cdGN 4Cg5+6i3vXPwRXPuLj9RPBvp0fe36GLS1bfSc38d4h9wvQ2pyfVTXtBz3Vbevg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfL1Yp2zW9y; Mon, 2 Oct 2023 22:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVMsB099110; Mon, 2 Oct 2023 22:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVMll099107; Mon, 2 Oct 2023 22:31:22 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:22 GMT Message-Id: <202310022231.392MVMll099107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7acc4240ce00 - main - linuxolator: fix nosys() to not send SIGSYS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7acc4240ce00af540093b47ad00be0508310b515 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7acc4240ce00af540093b47ad00be0508310b515 commit 7acc4240ce00af540093b47ad00be0508310b515 Author: Konstantin Belousov AuthorDate: 2023-09-25 16:39:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:53 +0000 linuxolator: fix nosys() to not send SIGSYS Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- sys/amd64/linux/linux_sysvec.c | 2 +- sys/amd64/linux32/linux32_sysvec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 2907323d903c..98e2a01b98db 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -159,7 +159,7 @@ linux_fetch_syscall_args(struct thread *td) if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 31436ee7162a..7104cc50735e 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -531,7 +531,7 @@ linux32_fetch_syscall_args(struct thread *td) if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; + sa->callp = &nosys_sysent; else sa->callp = &p->p_sysent->sv_table[sa->code]; From nobody Mon Oct 2 22:31:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RzwfM5d3Qz4wZGw; Mon, 2 Oct 2023 22:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RzwfM3TnRz3W21; Mon, 2 Oct 2023 22:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVVzr15WYsquMPAWP01mLs00b6xvefkr7ZfLfXFbwTc=; b=UCGNPu1ue+RHohcWpAsDO72Vkfzga0pRzPq++lUxKHT/4h6H/XsHzushol43jXQJBMRkYF zwMl/XICXBhuvg4WW3RtbhVKhiMSHMBOW08R5aYfdqK1gaV+bRmYZCPiTAKJfkortbTs/v HEh0VRSJfQzM53qDZnntl0Yc3g5v+SkG+qvuvxkCXO6BYQ/So17P8BZu8q2XUxlHNXukgM 6hW8A6j2AoutHnmkHcqG8EbfAeyil7M2baew3UuA5UnnJdmN/AowpxS8psQ2Ve2h0ncywL 7w7oRswIsv6fzqUcxfj39dokX1DDCNlejest/tYZn0L1izdEMgb4NVHn1T+RIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696285883; a=rsa-sha256; cv=none; b=O4amfqUVexup8SM9OCnoT7n5DH97Eguuyy6K5cw/bQgxyiVyw4efcUnIhcz6avmugjpDtp EPWgzffR43S8yhHVRVRu/KqjaLttcS3VsqbY2m06XLYIlcjNbMhrPZDWkxvDqJHUDfauQ6 2R9xyjjnfPzPzA/4lEtlz0ShVFmU7WotNACqVNLRnvMGWEa+7DSw06c2YtjVIwU4Nd6jT3 A6QSVC7ooyzUi0a/YUHCwe+IWrCBnygOqEgqIucw3eAczCBLcEG4vvKuv7ZyrBAjC5/s6e Vs4z5rV1bSvwT8FdZfdXxUqDd1+Co0tcfMQAuIHZO/38Z155dr4XJXB9AutZzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696285883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVVzr15WYsquMPAWP01mLs00b6xvefkr7ZfLfXFbwTc=; b=yIxZ4+/i4YiXeP595vsUJxPxbnR+ot2VP6X3sa25p3ADQqxGrcv3ouVGN9h+yC51k2bGcH 5q6/RkaEC3cKIHGuSh0aUEuaNqJAntS8yE01anrxmiX+W4xwKCUy5zE8tI6zGK8CzqlmLJ esrGIvGo1GrEH019tfceL30Vg0xLwNL5/zNN6dkFl3o4ntVtvtZ9/6twJ5gWmb9SSYJ8cL XPP2mbZVcQymLpFohvj6dHreBjZmwrtSmmfZ3WT3gVppxNTtI8BBXspJMStN2rG0yNZf7N PGktBvbQFcVXKhLVDHw9QGC9igOK20JJwgOf49g+0OJXMTW5kJ1HER0b+T/wsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RzwfM2Xb0zWB0; Mon, 2 Oct 2023 22:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 392MVNeB099146; Mon, 2 Oct 2023 22:31:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 392MVNW4099143; Mon, 2 Oct 2023 22:31:23 GMT (envelope-from git) Date: Mon, 2 Oct 2023 22:31:23 GMT Message-Id: <202310022231.392MVNW4099143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0afcac3e37e9 - main - SIGSYS: add tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0afcac3e37e911f7e387ebeb2aae19b2b00ca4cc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0afcac3e37e911f7e387ebeb2aae19b2b00ca4cc commit 0afcac3e37e911f7e387ebeb2aae19b2b00ca4cc Author: Konstantin Belousov AuthorDate: 2023-09-25 18:40:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-02 22:30:53 +0000 SIGSYS: add tests Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976 --- tests/sys/kern/Makefile | 1 + tests/sys/kern/sigsys.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index f2fe9e7008d9..6396b22005c3 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -48,6 +48,7 @@ TEST_METADATA.unix_seqpacket_test+= timeout="15" ATF_TESTS_C+= unix_socketpair_test ATF_TESTS_C+= waitpid_nohang ATF_TESTS_C+= pdeathsig +ATF_TESTS_C+= sigsys ATF_TESTS_SH+= coredump_phnum_test ATF_TESTS_SH+= sonewconn_overflow diff --git a/tests/sys/kern/sigsys.c b/tests/sys/kern/sigsys.c new file mode 100644 index 000000000000..75e3816fc158 --- /dev/null +++ b/tests/sys/kern/sigsys.c @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * SPDX-License-Identifier: BSD-2-Clause + * + * This software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + */ + +#include + +#include +#include +#include +#include +#include + +static sig_atomic_t sigsys_cnt; + +static void +sigsys_handler(int signo, siginfo_t *si, void *ucp) +{ + sigsys_cnt++; +} + +ATF_TC(sigsys_test); + +ATF_TC_HEAD(sigsys_test, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Testing delivery of SIGSYS on invalid syscalls"); +} + +ATF_TC_BODY(sigsys_test, tc) +{ + struct sigaction sa; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsys_handler; + sa.sa_flags = SA_SIGINFO; + ATF_REQUIRE(sigaction(SIGSYS, &sa, NULL) == 0); + + ATF_REQUIRE(syscall(273) == -1); /* reserved */ + ATF_CHECK_ERRNO(ENOSYS, true); + atomic_signal_fence(memory_order_seq_cst); + ATF_CHECK_EQ(1, sigsys_cnt); + + ATF_REQUIRE(syscall(440) == -1); /* SYS_kse_switchin */ + ATF_CHECK_ERRNO(ENOSYS, true); + atomic_signal_fence(memory_order_seq_cst); + ATF_CHECK_EQ(2, sigsys_cnt); + + /* Hope this is enough for say next two months */ + ATF_REQUIRE(syscall(3000000) == -1); + ATF_CHECK_ERRNO(ENOSYS, true); + atomic_signal_fence(memory_order_seq_cst); + ATF_CHECK_EQ(3, sigsys_cnt); + + ATF_REQUIRE(syscall(SYS_afs3_syscall) == -1); + ATF_CHECK_ERRNO(ENOSYS, true); + atomic_signal_fence(memory_order_seq_cst); + ATF_CHECK_EQ(4, sigsys_cnt); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, sigsys_test); + return (atf_no_error()); +} From nobody Tue Oct 3 01:10:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S00B35Xd6z4vTFk; Tue, 3 Oct 2023 01:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S00B352VPz4HyH; Tue, 3 Oct 2023 01:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696295435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D2STM9gUgRX3t+m/wA3HrK/artSCmHui56UNreVl4aA=; b=RneMIWMmYQnGrERRrsDNT/DLzuV2MJW9nJQe2pfu8Ago7taTwZgRXQG3ksm5dSKTtlP0GC 6Smxp26U+1CwpdbjYTS+cwAMWyYDfvAIPJgYirMhNAjFOdr4xZKueL3MsOKKQjkIxiBOIG OkInjiqSnI3Rn9omHH60zDugW1+25S4QltRNY46RGaBigcpQCAJsaxsZxXaX/rWbcRzaOa t1y3PAxnExNslJ7oyDKNwg2GudWtCSGUjbzRuq8+wJKsTir1VRRggiWrgRNRXN6tl6Z/z3 yZPBHtUDBkLgirwrEIauJmiEqb0oHcb7xxET7m/O4vfvW6TkiODG6IrFCMAG5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696295435; a=rsa-sha256; cv=none; b=JxTUSXQLOtVTfhLgQYThLmEaIQWr/GtV0xVs1rw8VFalDMi/Ye/ZyORw5l/HnwQ3E7rAV8 HSN7/UXnUnEJHI6iZGUl6okbG4vMZJWmEaUblW04wTUKayWFYpVsSxNaWu3e2Q2zaJu2/t IZj4L/961nXArVcyuSnkA/eA7Pxeej5bIeozYlHnIWN7w3OmAdsiyVOiz0tyGsbscJj9nh 8zTOGMEramAAyht5mZZidcTK1uGwZmK4rLt7Avzj2zDoDEuBK2KkdJLcFjMFnBzCwiHS1R BBvUP3C2rOH6gOSCKviY52yhG5eZ3eQCtmLWvX4TWUOAHHxYfN2oka6v8AlAag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696295435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D2STM9gUgRX3t+m/wA3HrK/artSCmHui56UNreVl4aA=; b=OON9vn9+IuYnzwS3rrjX3mesdJSizT/0u3VJ1ifDDQJyfVVsxYiYehE36RnLQvcBObdojS C6DOoL7WO+1nxF+zzD1g9iq573lKDQTtLMT/peuu1lZ/F5sgEdKuqT5sS7uFucNBzAP2e5 0UEtCAX+xKjFmXeMi+A0cN/bENwdDMXtf6X8+AXRvQSThbYl/8Vt6YGzzTG/XNldVV2IeC dXKG+3AquYsukAuRVuPzJYiseIljsl1EwOd7VGCVa3YX/3mCFGTp1AnLw/gZlAuVDn/lUr j4EUKqlrHrjqtf87ABhTWTT9ZPFNTyXYYzPGAQLXn+IXJcqsY/YSkIBvi8Jn7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S00B345LtzZ81; Tue, 3 Oct 2023 01:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3931AZdq061336; Tue, 3 Oct 2023 01:10:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3931AZa6061333; Tue, 3 Oct 2023 01:10:35 GMT (envelope-from git) Date: Tue, 3 Oct 2023 01:10:35 GMT Message-Id: <202310030110.3931AZa6061333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 13f188ce0b51 - stable/14 - fusefs: fix some bugs updating atime during close List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13f188ce0b51908c292cdbb85ef26962528af87b Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=13f188ce0b51908c292cdbb85ef26962528af87b commit 13f188ce0b51908c292cdbb85ef26962528af87b Author: Alan Somers AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers CommitDate: 2023-10-03 01:10:13 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) --- sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index be2885528570..21ee378b24c6 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -779,6 +779,7 @@ static int fuse_vnop_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; + struct mount *mp = vnode_mount(vp); struct ucred *cred = ap->a_cred; int fflag = ap->a_fflag; struct thread *td = ap->a_td; @@ -794,12 +795,30 @@ fuse_vnop_close(struct vop_close_args *ap) return 0; err = fuse_flush(vp, cred, pid, fflag); - if (err == 0 && (fvdat->flag & FN_ATIMECHANGE)) { + if (err == 0 && (fvdat->flag & FN_ATIMECHANGE) && !vfs_isrdonly(mp)) { struct vattr vap; + struct fuse_data *data; + int dataflags; + int access_e = 0; - VATTR_NULL(&vap); - vap.va_atime = fvdat->cached_attrs.va_atime; - err = fuse_internal_setattr(vp, &vap, td, NULL); + data = fuse_get_mpdata(mp); + dataflags = data->dataflags; + if (dataflags & FSESS_DEFAULT_PERMISSIONS) { + struct vattr va; + + fuse_internal_getattr(vp, &va, cred, td); + access_e = vaccess(vp->v_type, va.va_mode, va.va_uid, + va.va_gid, VWRITE, cred); + } + if (access_e == 0) { + VATTR_NULL(&vap); + vap.va_atime = fvdat->cached_attrs.va_atime; + /* + * Ignore errors setting when setting atime. That + * should not cause close(2) to fail. + */ + fuse_internal_setattr(vp, &vap, td, NULL); + } } /* TODO: close the file handle, if we're sure it's no longer used */ if ((fvdat->flag & FN_SIZECHANGE) != 0) { diff --git a/tests/sys/fs/fusefs/access.cc b/tests/sys/fs/fusefs/access.cc index 3d6cddb9417b..5762269fac7b 100644 --- a/tests/sys/fs/fusefs/access.cc +++ b/tests/sys/fs/fusefs/access.cc @@ -55,7 +55,7 @@ void expect_lookup(const char *relpath, uint64_t ino) } /* - * Expect tha FUSE_ACCESS will never be called for the given inode, with any + * Expect that FUSE_ACCESS will never be called for the given inode, with any * bits in the supplied access_mask set */ void expect_noaccess(uint64_t ino, mode_t access_mask) diff --git a/tests/sys/fs/fusefs/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc index 1a1ee5a54aed..4b04297d97ac 100644 --- a/tests/sys/fs/fusefs/default_permissions.cc +++ b/tests/sys/fs/fusefs/default_permissions.cc @@ -30,7 +30,7 @@ /* * Tests for the "default_permissions" mount option. They must be in their own - * file so they can be run as an unprivileged user + * file so they can be run as an unprivileged user. */ extern "C" { @@ -163,6 +163,7 @@ class Fspacectl: public DefaultPermissions {}; class Lookup: public DefaultPermissions {}; class Open: public DefaultPermissions {}; class PosixFallocate: public DefaultPermissions {}; +class Read: public DefaultPermissions {}; class Setattr: public DefaultPermissions {}; class Unlink: public DefaultPermissions {}; class Utimensat: public DefaultPermissions {}; @@ -1239,6 +1240,44 @@ TEST_F(Rename, ok_to_remove_src_because_of_stickiness) ASSERT_EQ(0, rename(FULLSRC, FULLDST)) << strerror(errno); } +// Don't update atime during close after read, if we lack permissions to write +// that file. +TEST_F(Read, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = 100; + uint8_t buf[bufsize]; + const char *CONTENTS = "abcdefgh"; + ssize_t fsize = sizeof(CONTENTS); + + expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0755, UINT64_MAX, 1); + FuseTest::expect_lookup(RELPATH, ino, S_IFREG | 0755, fsize, + 1, UINT64_MAX, 0, 0); + expect_open(ino, 0, 1); + expect_read(ino, 0, fsize, fsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(fsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + TEST_F(Setattr, ok) { const char FULLPATH[] = "mountpoint/some_file.txt"; diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index cf2159df646b..3df0420facb9 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -57,6 +57,14 @@ void expect_lookup(const char *relpath, uint64_t ino, uint64_t size) } }; +class RofsRead: public Read { +public: +virtual void SetUp() { + m_ro = true; + Read::SetUp(); +} +}; + class Read_7_8: public FuseTest { public: virtual void SetUp() { @@ -454,6 +462,47 @@ TEST_F(Read, atime_during_close) close(fd); } +/* + * When not using -o default_permissions, the daemon may make its own decisions + * regarding access permissions, and these may be unpredictable. If it rejects + * our attempt to set atime, that should not cause close(2) to fail. + */ +TEST_F(Read, atime_during_close_eacces) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + uint32_t valid = FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(EACCES))); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + ASSERT_EQ(0, close(fd)); +} + /* A cached atime should be flushed during FUSE_SETATTR */ TEST_F(Read, atime_during_setattr) { @@ -1321,6 +1370,40 @@ INSTANTIATE_TEST_SUITE_P(RA, ReadAhead, tuple(true, 1), tuple(true, 2))); +/* With read-only mounts, fuse should never update atime during close */ +TEST_F(RofsRead, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + /* fuse_init_out.time_gran controls the granularity of timestamps */ TEST_P(TimeGran, atime_during_setattr) { From nobody Tue Oct 3 01:31:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S00dz0C4wz4vVlQ; Tue, 3 Oct 2023 01:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S00dy6pWwz4KMG; Tue, 3 Oct 2023 01:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696296679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7pNO3Eh+YkwAQjzJ2PHm1dkPBiAfoDzYMoBfNWo2Sg=; b=s/y4O9GbKIMwJVBKvGHSyXvLb9k1Cctbz/mgr/Ricy22RBRBL9q0afxRsINMInb2WnJ7h7 I4V+xyzBTxpYOF43QrBGsZ/yQhjLJa0q0FeS2KBpsa1z/dXpGPxWMvKV23OAtg9cfzmJTC OIDu2qTYiAyOKuo5AGLaCnEHon9pJa6KZHom6JBYzLDaZibjtNMlYMtiWHJ7sV9K9OuI/P Gh2uaXy5a+jWOdGWfgpluIqTnVBqQemNKmSb0wz9e1K1+M7ShTy97G5VDBwyjMoxeGcKdE r+vmMGfOjoLl9fbTfV5FufuGIee5HPwoNEZOVbfkOQq6hrKtHYsI8upUQECjww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696296679; a=rsa-sha256; cv=none; b=eTJK1XvzgKF3+cbu1GDvt5PMD762LHaj7NukhVo4soMXYfzHYhVcfX5LvyrUFLpPa4hZm7 N/3GYGzzGgopQMzAWUwA26HZoGZr+N4xLAmtN98lZPafYQUtUw9BB39Atg6LitYHQbZ4hU rvuCKlSRlwx5tTIdLZzHXMAe0odI4WThwWV3+3cxX9RFZOySDX8ErQcy6EIMxqq9kMvBmV GoD/eHYgHislazujiuOE1QXZmXStsRO9CZXOlctNBZdXsi5cvM95T/ktJQfjkE8/6nBvWC pnRRKBlHHOUyhhhqRzWAm0jWS49494Ec+4dLYPwyCciZUmVPoDitPROB6UlCHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696296679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7pNO3Eh+YkwAQjzJ2PHm1dkPBiAfoDzYMoBfNWo2Sg=; b=seb4FKCFrDMy26i/ILeJg9yY9/s7NEbZTNfOzoAl1HcveS+NDYDSKcB5QnX/VMjHHWBSSH H+Y1EUJ8oIQRGQQMzqaicTHFzoIpN/r6GC5E5uPNO+2h5bSExjRCd2twVE+Y8wMuTcqnFI I3uf28r1vLCl3grqKzcmYtwF/jzosO6z+GY+e9Ou2+Ij2OfLR3sOyw+UOMcZTYSQVXtFxI NCSgNIFMD2xTOLZWQ9ecNJEnTkYJkaeGVzb/F4DsoP+qJ6LLaEI9BU7g7k+nZwVE2eQ+g3 bx1fsN8EedV8J8ZFxgQMf8zHksa81/+0rJ4Ixx/4j4o7pk9n4OmvG2s6wl4bew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S00dy5rx2zZk0; Tue, 3 Oct 2023 01:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3931VIYC096243; Tue, 3 Oct 2023 01:31:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3931VIst096240; Tue, 3 Oct 2023 01:31:18 GMT (envelope-from git) Date: Tue, 3 Oct 2023 01:31:18 GMT Message-Id: <202310030131.3931VIst096240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c70a4185c637 - stable/14 - mprutil: "fix user reply buffer (64)..." warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c70a4185c637754428f36536af3bdc9181fa5155 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c70a4185c637754428f36536af3bdc9181fa5155 commit c70a4185c637754428f36536af3bdc9181fa5155 Author: Alan Somers AuthorDate: 2023-02-22 22:06:43 +0000 Commit: Alan Somers CommitDate: 2023-10-03 01:31:12 +0000 mprutil: "fix user reply buffer (64)..." warnings Depending on the card's firmware version, it may return different length responses for MPI2_FUNCTION_IOC_FACTS. But the first part of the response contains the length of the rest, so query it first to get the length and then use that to size the buffer for the full response. Also, correctly zero-initialize MPI2_IOC_FACTS_REQUEST. It only worked by luck before. PR: 264848 Reported by: Julien Cigar Sponsored by: Axcient Reviewed by: scottl, imp Differential Revision: https://reviews.freebsd.org/D38739 (cherry picked from commit 7d154c4dc64e61af7ca536c4e9927fa07c675a83) --- sys/dev/mpr/mpr.c | 2 +- sys/dev/mpr/mpr_user.c | 4 ++-- sys/dev/mps/mps.c | 2 +- sys/dev/mps/mps_user.c | 4 ++-- usr.sbin/mpsutil/mps_cmd.c | 40 +++++++++++++++++++++++++++------------- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 72993be8834e..23f7ff0c3e9a 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1871,7 +1871,7 @@ mpr_setup_sysctl(struct mpr_softc *sc) SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, - strlen(sc->msg_version), "message interface version"); + strlen(sc->msg_version), "message interface version (deprecated)"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index d9dc3d2377a2..f2847ae36d66 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -852,7 +852,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1077,7 +1077,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 43362b96b7b6..f358ab8a73a9 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1719,7 +1719,7 @@ mps_setup_sysctl(struct mps_softc *sc) SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, - strlen(sc->msg_version), "message interface version"); + strlen(sc->msg_version), "message interface version (deprecated)"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index cf2fdb2b2adb..3d1b478d81b1 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -851,7 +851,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1005,7 +1005,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/usr.sbin/mpsutil/mps_cmd.c b/usr.sbin/mpsutil/mps_cmd.c index 448e4cea602f..2101bbba73b0 100644 --- a/usr.sbin/mpsutil/mps_cmd.c +++ b/usr.sbin/mpsutil/mps_cmd.c @@ -721,25 +721,39 @@ mps_pass_command(int fd, void *req, uint32_t req_len, void *reply, return (0); } +/* Return the length in bytes of the device's MPI2_IOC_FACTS reply */ +static size_t +mps_get_ioc_factslen(int fd) +{ + MPI2_IOC_FACTS_REQUEST req; + const size_t factslen = 4; + char factsbuf[4] = {0}; + MPI2_IOC_FACTS_REPLY *facts = (MPI2_IOC_FACTS_REPLY*)factsbuf; + int error; + + bzero(&req, sizeof(req)); + req.Function = MPI2_FUNCTION_IOC_FACTS; + error = mps_pass_command(fd, &req, sizeof(MPI2_IOC_FACTS_REQUEST), + factsbuf, factslen, NULL, 0, NULL, 0, 10); + + if (error) + return (0); + + /* The card's response is measured in dwords */ + return (facts->MsgLength * 4); +} + MPI2_IOC_FACTS_REPLY * mps_get_iocfacts(int fd) { MPI2_IOC_FACTS_REPLY *facts; MPI2_IOC_FACTS_REQUEST req; - char msgver[8], sysctlname[128]; - size_t len, factslen; + size_t factslen; int error; - snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%d.msg_version", - is_mps ? "mps" : "mpr", mps_unit); - - factslen = sizeof(MPI2_IOC_FACTS_REPLY); - len = sizeof(msgver); - error = sysctlbyname(sysctlname, msgver, &len, NULL, 0); - if (error == 0) { - if (strncmp(msgver, "2.6", sizeof(msgver)) == 0) - factslen += 4; - } + factslen = mps_get_ioc_factslen(fd); + if (factslen == 0) + return (NULL); facts = malloc(factslen); if (facts == NULL) { @@ -747,7 +761,7 @@ mps_get_iocfacts(int fd) return (NULL); } - bzero(&req, factslen); + bzero(&req, sizeof(req)); req.Function = MPI2_FUNCTION_IOC_FACTS; #if 1 From nobody Tue Oct 3 03:25:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S039q0snHz4vd4s for ; Tue, 3 Oct 2023 03:25:35 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with SMTP id 4S039p329Qz4SGF for ; Tue, 3 Oct 2023 03:25:34 +0000 (UTC) (envelope-from cperciva@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 54.86.246.204 is neither permitted nor denied by domain of cperciva@freebsd.org) smtp.mailfrom=cperciva@freebsd.org; dmarc=none Received: (qmail 94566 invoked from network); 3 Oct 2023 03:25:33 -0000 Received: from unknown (HELO dell7390.daemonology.net) (127.0.0.1) by mail.tarsnap.com with SMTP; 3 Oct 2023 03:25:33 -0000 Received: (qmail 74902 invoked from network); 3 Oct 2023 03:25:33 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 3 Oct 2023 03:25:33 -0000 Message-ID: <226ab4a0-f6c8-d5c1-e564-bde9cb4cd797@freebsd.org> Date: Mon, 2 Oct 2023 20:25:33 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: 7494fb6b7d80 - main - EC2: Flavour existing AMIs as "base" Content-Language: en-US To: Alexey Dokuchaev Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202309282218.38SMIqGH056845@gitrepo.freebsd.org> From: Colin Percival In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: / X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[54.86.246.204:from]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:14618, ipnet:54.86.0.0/16, country:US]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[cperciva]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4S039p329Qz4SGF On 9/28/23 22:52, Alexey Dokuchaev wrote: > On Thu, Sep 28, 2023 at 10:18:52PM +0000, Colin Percival wrote: >> commit 7494fb6b7d809257d4eb9eff06ce226143f27add >> >> EC2: Flavour existing AMIs as "base" > > I think it should be "flavor" since FreeBSD prefers American spelling. I understand that's a policy for FreeBSD documentation, but I'm not aware of any such policy for the FreeBSD src tree. And indeed there are thousands of behaviours, colours, and flavours in the tree, including "colours offered by the original IBM PC Color Graphics Adapter". >> @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI >> EC2_FORMAT= raw >> EC2_FSLIST= ufs zfs >> EC2_DESC= Amazon EC2 image >> +EC2_FLAVOURS= BASE > > Since other nearby values (format, filesystems) are lowercase, perhaps > it makes sense to say EC2_FLAVORS=base and :tu it when needed in the > code to keep declarations consistent and tidy. We already had "VIRTUALBOX" and "VMWARE" flavours of Vagrant (and these are all flavours of upper-cased EC2/GCE/OCI/VAGRANT/etc) so I figured that I would follow the example of being, err, consistently inconsistent. I agree that having everything in lower case would make sense though. -- Colin Percival FreeBSD Deputy Release Engineer & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Tue Oct 3 03:37:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RQ0kLxz4vdhg; Tue, 3 Oct 2023 03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RQ0Dgjz4T5n; Tue, 3 Oct 2023 03: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=1696304242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbrgW7as+VY57qeRi8psSK6PbWFeAo2hyCm1hU5hl5I=; b=D43SrgmQlERHgkvfydT6i8K4L1fuMoiFYkje4WD6XVv6e0l8Ut1A9ALjb4Sl+YnseAm7L2 p0QUqO3WDnitGKikiodAYniOcqTfJjL/mxnM+OmLWFVBXwLNkx9grY4BpMb+1xPJ1ia6hY GM3CK9fK9TxPLgv0FGaealnt579TR4FVoHRZgBk+RhtkdcgfiEtdJCycs16pQk3ySuA60O nM+L3leTymeN23GCEKMCZvEJgBZ7DsZvhI9yQKjRRCaJtzUdlL/44asGUnKxoVOL1hK3NC 5Uo+TV64jfsrNykWJfskoR+mZ01yVd4zixz7DQ5eKb0krckFXr2qwVsTs02X2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304242; a=rsa-sha256; cv=none; b=oh1t14PujIb/vkOpNTuLqWx0T1UNTT7jkYXUAV9eiCZPtU9YytQb7Rom+q6msYRvNAj3FT 4MQ/b6J114gK9c/9wiVNOSh/ibA4BuR/PgsgwDW7L/csW4yl+xz+tdX8nLw0nlNEFtLqTj W+fLAerWa1knz3YEOkMZHKOSFFif47odlZP4RvCp2w2rnOmDS2RhqScR2xPzFbTiMnGU1y 9K1/O7zcBWOTedEGvR7if3gQqwF8MZP+NWknSFZLJCREaSSwDzcj16YSWzAg7CQ//I8WvY piZkLY61lXSqar6xmwY6xdBkgXmeBM9yixykLatvgoFoTvaleETvcQ4EEgEsEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbrgW7as+VY57qeRi8psSK6PbWFeAo2hyCm1hU5hl5I=; b=dbk8veHxnmqcW12x4LAluOROIwrQZ62It+cO7rh3EC8m7bAytIs6jut72eMRuzdUAM2ALd Cc0PBT8l3iIoPpa4k432eKGDwNJ8qOPKsZmL2dq9jPTln5D0qJPdvwljmUu/MD/r7aOgQ+ yINm+a8yviX3kwJoFRleWdhSijMgAZwv0taKhNcrm0rxx0GpihEjSRpWD0Gpg8Qv1Y5fnP Pag71nBsJI1/bQfdbHf8cvYaDuhZbWQt2rWKVK3H7U255ZHhYjRbgZ1lxRg1rr4hkkaSxl txYqLHg05QiY+pTX4v7N/tJsoOjmUYEbR8+y0Oa/KBRcvuDgIylYVEGvxtv96w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RP6PMjzfPN; Tue, 3 Oct 2023 03:37:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bL5f002930; Tue, 3 Oct 2023 03:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bLah002927; Tue, 3 Oct 2023 03:37:21 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:21 GMT Message-Id: <202310030337.3933bLah002927@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: 535c90cdbcd9 - releng/14.0 - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 535c90cdbcd9eed3e0e46ad90a886ac6d0e53386 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=535c90cdbcd9eed3e0e46ad90a886ac6d0e53386 commit 535c90cdbcd9eed3e0e46ad90a886ac6d0e53386 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:16 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 21a722d9593eb477f4ccdad011a2b4df0727fc62) (cherry picked from commit bffb01eda9bffc3307ea8bf70f91087ed316e01c) --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 1a83fc2d8abe..019b9e80291c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -241,7 +241,7 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (netisr_setqlimit(&rtsock_nh, qlimit)); } SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Tue Oct 3 03:37:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RR27vMz4vdyW; Tue, 3 Oct 2023 03:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RR1L9kz4T6R; Tue, 3 Oct 2023 03:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySNtv7cOYWdCHhs00Y0HLEAu9K89zUqrMDbxom+1rJM=; b=mBm9SOWAkr6sFxcpnmtQP9Bj/KMM9hcAlYVtlXVamglo4E1nGXIfeuEPwLHD7Fie1PoSQh G9VdaxWz/B9IVDA/ytCHWsl5bc2YozGBXDWq7dcwFCps6Ap/0H/dxeESTmL8PMxffyTXqy 5Ap9bIFZCrsJtQy2759kJOFDbesSEyKSMz3O4CZaE6VLQ7jEVSXFbIkrDbhM3WzqrjvaU+ 9JRqwcfQ4kHBAFhtzqZ65YGPL9nQ205bSxTttHEDILRA689i4tATBcpJej8wIvnyQey8Zf 60NSg6441bnJPzjDTVgdzToQNwNAm+16MvZ9wIzIGp3NcKoHCt0a5KMb4olW/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304243; a=rsa-sha256; cv=none; b=KUftpMNzHIAAvsi5NBn7uhe89MPRH9Vq5Qr6rssZI8rGwwes065jX/otzXcOox42FFQe5N Rzt0zCM2M0Y5KMnTYHKZIfzD3cpL6cG6nUBDsqP1XgaSSWSM+gkNKebDudVb9p5Kaoeumt Dblj/qKM0AqK3lJRDOLjH+ZVbhXYu9SvrHZwKi/6eL5kSRkV2EdPOAeq1JKaLYwtVYcO4Z O1XzGQ9ehtMIkiuvkEpZZMSk1rb0DAjS8JHpfn1hHqVoBwLNpwNb9WVQkVMMu82CykoAH2 sE6MNgNc7ODl9mhdAhtbARtGL4fgUaMw8orNJ0qnVTrcnNNeCeN94tNGlTV25A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySNtv7cOYWdCHhs00Y0HLEAu9K89zUqrMDbxom+1rJM=; b=PdsTkBreV4NlSmUPCe4vG5yVObnqmNk2hBe2CKY2WBRrDJCWjzdgZACvvFXzirTZW5rvIi mQ1WqW4N0QwyciM1xGMWVhfqL8qLD7ia3dkD2JDd0sfiOyw56seQVAabMyVeZGzK9IvCri zBuGLORfF8JaULRxgQQdo5bfLedTE09A44VYs4UTVGoQgcKjC4PFkXt7fDC3B6CYs1NQL2 a5/Rtn2tbbnnuusSiJKqsdxlWfVBFJlfbCXUbn7KZHBxH/hvVxEa9ztQD+UW5F6X3p2FNA abYExCO1MQrWs5YaPPqvtUAJR0gYR1aTZT3lb9qh1+UWUSda6/M2iEbhTtmNoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RR0KgrzfPP; Tue, 3 Oct 2023 03:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bMLP002981; Tue, 3 Oct 2023 03:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bMvd002978; Tue, 3 Oct 2023 03:37:22 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:22 GMT Message-Id: <202310030337.3933bMvd002978@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: abd4f7d8bc57 - releng/14.0 - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: abd4f7d8bc57249b6d09be253411aecb26095d0f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=abd4f7d8bc57249b6d09be253411aecb26095d0f commit abd4f7d8bc57249b6d09be253411aecb26095d0f Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:16 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 03dac3e37993801dab4418087bfedacce0526e66) (cherry picked from commit da2b630c12ec074673dfc646b2055a31b0d8d6d9) --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 1d67577f8055..6e7ffedc3dcd 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -278,10 +278,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -334,7 +334,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Tue Oct 3 03:37:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RS4HVSz4vdWT; Tue, 3 Oct 2023 03:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RS2NB4z4Tbx; Tue, 3 Oct 2023 03:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh9ovaDRZlRmzp7l7PXxoVpj6gfdKWCQyh9r2+vTrDo=; b=vNLRShU/ARbrM/7RwqXp1QbvekDVesRnrHD8iEvm6lSUIpUon5IbfkSrWPXRf09S4BrjFe +oO0yaIMYNVvSWS84FPd9wIkI5K4P3dnXJDOvcm0WmgYpWcKo1WSIbdtZI5wfDaZNDcKJd qkzbluZ788H1Z6W1iK1CCTUFChufFL588j7Q+P2r2oDOr+eoFwmhKfWf8YOvPuJe7XbW2Z sxiXHhFG8Sf+D8t+1iDsbP4zd2kM//sf4wwAAhjEbFkQtZew9vgQrE9TM8WxTxVGq3y62B 0Xml/PnZ1e2ucY4OtrqhRAvOzbTA2cRu3LWXUNYOeaLXZm8nN2VWMGUHGfJ3sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304244; a=rsa-sha256; cv=none; b=XuuicP94MCKw21tUNMUzfhJenxBwyJi4di+xNsqUpxW9ZqsfEJMAEwRX9w634Pu9Tq3Rfv wZjVY5qlPjTeLQWqRRKf+FBBN8DaiF6zxKLlZelu52NT8tzMIsbR4uBeqm3hS0pWIEshc2 7WqF52dTAuPeqPnB2S6rSvDuGQsKCjAr+OAN7t25iBz9fkvenpfl4K+cpRS1pYxDr8W9kf Osi7+V4H/EMjRyuKzKpLsIHAn5zjSwR7Yy3Qpvok3S06Y9UFmtoDd8NqBC8GOiAR+9grdp Yo9PCxyEOi5k2vAkZKgdPBUmI1Ptxy/dLuw+oneS3Q03jblyaArxoa74nnRpPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh9ovaDRZlRmzp7l7PXxoVpj6gfdKWCQyh9r2+vTrDo=; b=cRjwqHdefdu5Dy48xmMkXTIw+FsG3Ei3k6ztJcnkB3MpZI1SDbKm7/zsmY0bSG5LGqaEyQ As3/SMS6OK29lvBeuqLvV/3HXkxuUV48smozaZfZDsk1QImxi7YbwybxJkq1uTCJLfacFP rOWmzSn1Pd6n+k4F0WiG+bDu2Ef8xm2D47Ln676Y5XlzPfs8c+IE33Xl2ZeCGZ/Q1oj19J EuTMrGeZxe00xYxb9TLFMuKXYCm09BLNqOdPgj0XF7lf11gcCwIJ+sNpcEi/07LZTcAWtE 4JUbFH1qw2xq8lksHI4xQWDUmOb5STdpsnqJU1fifj6YdbZT/752Dnyj2oPkBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RS1NZfzfLd; Tue, 3 Oct 2023 03:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bOk7003036; Tue, 3 Oct 2023 03:37:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bOge003033; Tue, 3 Oct 2023 03:37:24 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:24 GMT Message-Id: <202310030337.3933bOge003033@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: e19407fe9a63 - releng/14.0 - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e19407fe9a63a16a5e8c6a0ad94e325d5289d301 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e19407fe9a63a16a5e8c6a0ad94e325d5289d301 commit e19407fe9a63a16a5e8c6a0ad94e325d5289d301 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:16 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 (cherry picked from commit 49197c391b3d49a33bcd08471bf64d533cd10f9d) (cherry picked from commit f5f6da90597cb65ce55c4f17718a200097f6f78f) --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 1cfff1870d7f..4dae28aa0544 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -91,20 +91,20 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Tue Oct 3 03:37:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RT3wxnz4vdcT; Tue, 3 Oct 2023 03:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RT3LZXz4TWR; Tue, 3 Oct 2023 03:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ghrNR5ZmxhsmLRoi/ES58RFHptSMgj0g+P3TlySjkQ=; b=izuSCiZTwjGJ2f1Q2V2TRQbnoFvLyL2IJQKxnrpasWcsVDGvfmqP1By4D3mUDK6QaVTAxj 1nDmh3zYT3Y+kIU0MBbHo9vzjmIfNw3aDn57qK7DggY1JoNNg4mOZAyQa17x9iIzomxVU8 fPAS7HQaLNcjawWe+Js5ESiwDsbBJGHqiFtlh4fMQvFgMf4hT70vaZ7mRhNkKi0wg++KzZ /7GZa0N+GgllGy6EHIGCkkoSIRXNfd/yQiZE/kfemTsrgOth14HZdyW/9XbGo9nNa+EjR5 wmmIHHQC3Hd57qyuqNpUmNuCw2WLHQIax/LYouwvUflDEIc9ZbUDVDD+KAeo9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304245; a=rsa-sha256; cv=none; b=yEIJktroEAiMcbraNnO+kYJXwroIX9JrLZIDJXD2yLC1ziMC+OrtcmDbhUawKhSFMUarWG 2N+jhvr3m53/m52KJb+IEfpoUbbIeSQlmXSBDDPcHtxA0l/vRNQ6rkvme5aSphLGKjc/fb dVM/Gb7WntpeK+4L/V/v2EDUr7VvpEbItHq6UF+XxMRN+zlU+gZ4Ai4ZnkcWwLsuoO72wm e8Kw3IHZy7xI77ZIfOkydpQr/bocKUM2TyQ4E7F10bIXd4IUoQjCrk3xtKOWcNx+0s2NbQ c3KSH2BTW1BlrkRAFOdVW/3hlhSm2/h6BI0/nCDl0gK8TwFaHH9WirikNAmLdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ghrNR5ZmxhsmLRoi/ES58RFHptSMgj0g+P3TlySjkQ=; b=N50psH3HNBZFYqW8iT89rZNUtR185c1VXCtUaX1wXl2GhA0u289RRJzm5FJARApg2hX1aP qIrlq/ZXh4TEOKMK1Iks3HatULtnZnD9JRI1aur/MVom3f8rbeFeTrYSzfPG2B3J/1Kxx/ kdUufpFgVFbL2pKIumPcqnSv2FRHoMCExGb+u2jJZItdpR/8oc/SmXwC80FRs+7T0qqMyg zj/ON7C1diQqD9k4EdAIL92kx+AERf1+b9rgxUAUl6rdvDN1d1+fM7NoFMwVSJ3pCV33EB HVtr+TOHRGyJmxCGgYNy+dUW7Jui1N75tWTeADPWUcrWLacZsvrWS5p2z6hjnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RT2PX7zfPQ; Tue, 3 Oct 2023 03:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bPL0003086; Tue, 3 Oct 2023 03:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bPeJ003083; Tue, 3 Oct 2023 03:37:25 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:25 GMT Message-Id: <202310030337.3933bPeJ003083@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: cc30510aeb78 - releng/14.0 - ipfw.8: Adjust section for loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: cc30510aeb78d6013dfa9c137144543c2db0e4c8 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=cc30510aeb78d6013dfa9c137144543c2db0e4c8 commit cc30510aeb78d6013dfa9c137144543c2db0e4c8 Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:16 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D41981 (cherry picked from commit 12349f38898f231ca803dcf526bac88cb1b5cd2b) (cherry picked from commit bb6f9a95402a6c3ab8167481b81465f8ad5016fc) --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 1a042ae2bbbf..e62b8d6efc95 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3761,6 +3761,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4154,12 +4164,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4176,10 +4180,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Tue Oct 3 03:37:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RV4nqcz4vf26; Tue, 3 Oct 2023 03:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RV455pz4TlL; Tue, 3 Oct 2023 03:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCkG3EwHw0OAuoT6L+kxC+WFKd/fdwSeV0KNY0gOjX0=; b=dzKP/zfTrhqx0XS9KBkebWonMhgCQULzBdOBHKJZGiz9U7zHO39l1pFB1tUUaQ5cwKMUMG gI2egONJup21xBuxdxEbTtt2DSAkU6O/QWl2hxCB985XCKRqRha5cHBkDqekbm4GSan29C yFnUYsvJL5vfjF4A4dUQ3hBclvUEhXz9pNnmvETahtKDXhEf7qnWORdqJ+Z83kgyWw2mbu VIBIdrkJQ6TKRD6QA9dv/721xFxdlE/+EHdd83961DvS19NCZTpVd1eBWspgUyJkRZ+i9o iM2B0RX91OsBB0U5KRc06ILzINLfsbUmzdVcXnoekBpi71tDJpJLPsAoopo5gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304246; a=rsa-sha256; cv=none; b=CsHHgnmO78ppsTiJFFVWq2mbgNHfA0xNFVWf67jJl7rpVUOzcet7V/1U3yddsRXmH1bDKz LXCaQ+AZ1rkCHdGUmwM51IGOFfE5amBdhxkkCd1vHizBqk9tYwQt4NyCB7d7jvOgNZdzvR jTJvY/4veP8BqD8FPIlz3LD980r9/Epb9CBuakNAM9TiD+kVfiLL+Q4vBafSaz4BdSRY96 R/mIRskXVndOa9a9y32Nh8Ag6Qf1qrM21mLBPlwf9OFAJOUiZnGb5sQWv+GklkkYnaAsK7 nLelX8NTK5yHATHsMLof7sdo0SnVC9E2O2YqfIG7cqyqzHV0u/leMiT9tM8PEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCkG3EwHw0OAuoT6L+kxC+WFKd/fdwSeV0KNY0gOjX0=; b=MUijPEVZTyeCzeO8SQW7FUedayu2tw/hRse/WxS9El3U8H1aut/yadZsu76RpsTqDxPHQn H0ImyxEbMzd9nLKM6ynBPACo+u1/q/dzBOykUffi9yFyoz2WuuJOCuR5Oi1bjMcKeWklD4 rGDfpneeOw3V6sJdx82v3Iybd5w2Vjg2+5Nsi/rTdSfIQGDgoT+9uuXOVn9SxmV5DsJSQI VrDMuVaB3H4k22LV5/QSswSfl4aXPQUPTIfodjNpvRBBJAiNE8UTBpeVi4afUL3dUl+zKP pWmbQ2PEzTp5JNsbdyKsDkmec1pqK9NxANRwSF/Jb/G7XD2mBVpX960tdqndgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RV37XxzfVK; Tue, 3 Oct 2023 03:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bQ67003125; Tue, 3 Oct 2023 03:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bQ68003122; Tue, 3 Oct 2023 03:37:26 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:26 GMT Message-Id: <202310030337.3933bQ68003122@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: ea3e5ee58560 - releng/14.0 - ip_mroute: Fix sysctl knobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ea3e5ee5856008ea469fe4e90d231a36d5b432b5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ea3e5ee5856008ea469fe4e90d231a36d5b432b5 commit ea3e5ee5856008ea469fe4e90d231a36d5b432b5 Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:16 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Approved by: re (gjb) Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 (cherry picked from commit f549e22901b3a391c76659bee55802b1214112fd) (cherry picked from commit b0f026435a150933ecb6f2d1359fd1b4898657f1) --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 2444fd9686f7..cda5f160e8fb 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -172,7 +172,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -226,7 +228,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2817,18 +2819,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) return (EINVAL); } - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Tue Oct 3 03:37:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S03RW62SCz4vdtY; Tue, 3 Oct 2023 03:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S03RW5MZWz4TgK; Tue, 3 Oct 2023 03:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyxrqQTEKI/gVre2+gAIIGIf0FoKnq2C0I+hlTpXY9I=; b=u/o60xMbQFwCmF7n/DuLrWDZG97mm0Xeplwn0SYGppozEfknBSV4lbf7kfi123IuboNqRr FQTeKpdsJl8KmU0iMC4ub6gBTcCF7d+B3KLnAJHUrzelMUWNgDPvy/fdzhtmkss7vQCecd 1iLtEcdDO9/mjLfcjCUfJlyFeFSoGNo9h89YiIbSeVd8GuGQWoSLS5tDjebgtjDzmQm3Va rkXiEwTP+jtEk2/0qalAMLIu0bIy/WxGDky5nEmhTLI99jqR6+/KoGIKu+W1WHRr1VcoO+ GIJGhDw5KQ4GNqOY8pRhR3UK3sosw9xpvzxP1fY7Va0tgTTD2RiKLbmlbfs2cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696304247; a=rsa-sha256; cv=none; b=le3RH4enNjil0iihUbC/2SZSFCqiadM/0YWTA1uEuYPQGYtE9C9uEPBMU4n2r5YU6I4mdR fZ04otdruVHQYdnzKg9ecWuCEeqVvSRS7kMSzsazAImgimSAOvGyYJciIByrkOMmWVklqr IxZ1EEofIqDdMpt7XXZjDx41HybNb2WFaN9X/aAGRu6nor0OjwQfKtKbn/nVWf+Y6RfSek lyQTQPtzGRtFIxJYQ3c7e60tLjKm+qOfQeZ9NDF3TAapCP8cAUaKulxYe1w7wMYQ71N0kQ ukhgLCY9GGo3q/YeK74Fg0zfafFsSkLBsX7KNLKaRfLiAFyW59JqwnGw/3pL/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696304247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyxrqQTEKI/gVre2+gAIIGIf0FoKnq2C0I+hlTpXY9I=; b=nEmmYjF8Wqbb6+hAVmZqu98RCl2e85LkkiwBMOrZ2aGg1Bu3+BtbltaunzTeCe/CxNTZZK 1XJEPQIdvsjZUu21PeJ3Okn1hqf4g952q/kMU1G9+lX348niMsTIC4IFa+UuXnC70HZRFa +ybDVgzkbhcdTI460f/GVmQwPRwKgvs+qaN4Zid9MTNJOrCpz0IeD+N+ArTF3sxDNmu+Ik HFc+2apvAXa4Fw4hKafZ1CVHPKmOeCfHA0s86PvRdLvw5QiAhlP4oDSksESVsf8783AxNj PI9tQw5OvAO3xNb4KR43RreX6mXyQive98v48HvzLITpIOyvfmgkGyJaj88KPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S03RW4QdWzfSB; Tue, 3 Oct 2023 03:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3933bR5U003182; Tue, 3 Oct 2023 03:37:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3933bRGl003179; Tue, 3 Oct 2023 03:37:27 GMT (envelope-from git) Date: Tue, 3 Oct 2023 03:37:27 GMT Message-Id: <202310030337.3933bRGl003179@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: c920810743c6 - releng/14.0 - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c920810743c6de1f1d78936726af29752e7a0095 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c920810743c6de1f1d78936726af29752e7a0095 commit c920810743c6de1f1d78936726af29752e7a0095 Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-03 03:34:17 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Approved by: re (gjb) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 (cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e) (cherry picked from commit a9359dcde241f17421a71bc8c96dee08625db9dd) --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 35daad4715bf..69be4abb2485 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Tue Oct 3 05:54:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S06Ts1Nr7z4vnq2; Tue, 3 Oct 2023 05:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S06Ts0kMsz3DPf; Tue, 3 Oct 2023 05:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696312481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3O1zRrWIui8ZwFTyZ1J0uq2xP4RiU5wLnhO2lbCq2pQ=; b=eIVN2k4ue72VMz50/tgmTFEm3jUY3VWEoxdfKjQWcT99uCFe+ph0XYR7aLCQiwa8WwtVGb tgFEszFT88EavntQdL8vb3h3UY16ExfjesKfOONgHLJ09Tcu57/sN75YF5S/IbBpmk6RRQ nc9OmLopTKlE1a0Z7avQ/e46xRzVo8nU0xqsdOKnG1CTOLjpVfnQ0Iqfbgbf0WfYIQydcP MvBtNZY9+3hD8DNPnZhWwM0Yuki6EszJkM//Uyx59cK55bWqHEy1uhGWNnZuMV/4lBGpXt LAOkJPv8lidedOv0Nl+JaDBLTt0wTOGPgCh9JzhXQYiYyCvB2zd0TCk+jrgAXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696312481; a=rsa-sha256; cv=none; b=tbgYjr7pmksbI420QxKcDt2xXSFRy4+6AusT8wd8Q3MzDpeuqDknvE8LQIelbpoFqwOdZC 15IHMnP5ZLgOW58vF9KvDshCcjDa52GbvIcm0pWZq8nmrHRHXYjgq3Qialkhpic0roCZIR NQ+EGWSzR8J2nODILrwteOaTPw8LPw2Rzh0wSREN9TL6BbVBnw45zVfve9eNjHkZYzSluc hdjfOjJIKIBiFqn2gCKqI+tF998LitYlYkMWd5j0RUsWGtCoJmI3pDvU91K7VNT+ulWUkE aLpJVo67vnyaeCv+0syLtFUCu9TvrIOocjg893E8pRBsX+itGJcmp+gQzilqaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696312481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3O1zRrWIui8ZwFTyZ1J0uq2xP4RiU5wLnhO2lbCq2pQ=; b=KIePQr8VUJRJQUOJq9HCiwJ7EYRcmuGUb0Qxj/MsHaS5DN2hNA521Nx8mr5oZBIaIjX/1O XIE+F94oPLk6e3qKuGuKPQLEptW2wT1HAxav7zZ1Sfhq9gbGECcGWJSzYzAjZ2P2PChpJc V5Pv8hyocz1tgiLB9r/+Hojm9kI9nFqjfyV2kd2Vu/BMjPPskH6JlInYuZkJTsqOVdFr0Z HhOVRsAS9AYx3bC6AUdo6H+JnJ9Tjj1hDiW9dY+07aELneJntTIA9lgTBPS0zmiYVuKG1X EJyYF4xG11KfSi/EUDP1wmfqS2npybNTzDbMbXVSTHRrO2neQwNIpHzzwoTnVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S06Tr6tvxzjph; Tue, 3 Oct 2023 05:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3935seEq034737; Tue, 3 Oct 2023 05:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3935seMn034734; Tue, 3 Oct 2023 05:54:40 GMT (envelope-from git) Date: Tue, 3 Oct 2023 05:54:40 GMT Message-Id: <202310030554.3935seMn034734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 09f5c1e118bb - main - libfetch: don't rely on ca_root_nss for certificate validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09f5c1e118bb4eca77b83a0d08f559b20f60aa59 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=09f5c1e118bb4eca77b83a0d08f559b20f60aa59 commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59 Author: Michael Osipov AuthorDate: 2023-10-03 05:53:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-03 05:53:20 +0000 libfetch: don't rely on ca_root_nss for certificate validation Before certctl(8), there was no system trust store, and libfetch relied on the CA certificate bundle from the ca_root_nss port to verify peers. We now have a system trust store and a reliable mechanism for manipulating it (to explicitly add, remove, or revoke certificates), but if ca_root_nss is installed, libfetch will still prefer that to the system trust store. With this change, unless explicitly overridden, libfetch will rely on OpenSSL to pick up the default system trust store. PR: 256902 MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42059 --- lib/libfetch/common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index fd2091791620..dfa742577585 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -1055,8 +1055,6 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" -#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -1066,12 +1064,6 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) if (getenv("SSL_NO_VERIFY_PEER") == NULL) { ca_cert_file = getenv("SSL_CA_CERT_FILE"); - if (ca_cert_file == NULL && - access(LOCAL_CERT_FILE, R_OK) == 0) - ca_cert_file = LOCAL_CERT_FILE; - if (ca_cert_file == NULL && - access(BASE_CERT_FILE, R_OK) == 0) - ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From nobody Tue Oct 3 07:38:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S08p64gNbz4vvW6; Tue, 3 Oct 2023 07:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S08p63rvPz3PBk; Tue, 3 Oct 2023 07:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDC5yy9MxPsxExLF7NBX+KWeaVkzfKBgIa4sQoL3QZE=; b=aCfYNKvmYLulsM8IOxdtfPq2ir2jhjqn0Y3w57zi3r9OMqZx7Lm8UjpCCf0vvY5BjiHl6t eHkMyVhmK/G0Bbf+TnxCYW5mRD/DkvTaAHcuu5JdS/j7DXeiQOUH6nKE4RqN2TouaKwmtl AKU+XsxZKio1VZxsYTxrjo4n4JwQ3huZhpOXm2SHxtbnXtnRe9b1Q38EcgNR9kUwJV6S6X 4FrxUBkoc1jtlwXq++nLcPkKT/dBu5tbjIDEmDoJmmhC8j7zIX9K36968GvXdu4PGNsPGL 2z4rM8neCpRONwSsEPwBDYAU8RksGWAYKD4AqrcoZJzGoSShjBlla7j6gDOkxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696318734; a=rsa-sha256; cv=none; b=cyctNObSoSKH6zV2KAKh5NZKsKdDs41AhK3dUMk2R5mxS60yi+Rtf2Tto3EKEyXH3oL/pH FVJRRoAzI+qjzzGOgk8xyOkFyO6F/0Pwmff6kkdics669QgIdWKKEjUxHEOKlH43SkeJsa IZzAFffk1C5mYRWqAM9KX/cL8cHNDgjOUhIH+cP2CPvCdUOnsqTgUbC7ISDhINj1SXn3xQ Aeb2GCF4sBkM8Olkq5FazfVgzhHBt4AzvQqFsr8oBJkU18AOnB8BUPpR31YsBcZrLjHGiF qOv+PQc2MVjCHQltQX3xFANelxpwvjfrtaO4M1ME5zrdtvXGLFJ9YUuAbZZVyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDC5yy9MxPsxExLF7NBX+KWeaVkzfKBgIa4sQoL3QZE=; b=CfFOie10YsgcMAOsryFCPB6YIHMmJMLUcECUcc8/wUcvxQTkPKoc8pjHUvZ327JNoK82gb JEhCx39IBwm3/Kv0HigUm+cSHby7H97yg/EFDw2N5Fj2CHvnVtZ3iMCIrB1kCRDpwq+vZP jSEK9m1+VwTDb8HezRvNs9vqbuAopggS1JVVyf3A3hrMGL+3NkAofhu22FmmyE/udlcU7b Eupl/dkhw+VEy2pZN3uJsI4bMEH7d1oSBL0Y6gTrA5bhfdqJJAQWeAqXRDwFIqJG8P8j+q saIS+lZrNONCbnMNlV3JE6oH0mtySPosGHzubSN887MFCJI/T1dtcGdRv8d++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 4S08p62vnXzmK3; Tue, 3 Oct 2023 07:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937cs2i002221; Tue, 3 Oct 2023 07:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937csCA002218; Tue, 3 Oct 2023 07:38:54 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:38:54 GMT Message-Id: <202310030738.3937csCA002218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: b67c0ba46138 - main - tests: Test that SIGSYS is not delivered if kern.signosys knob is off List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b67c0ba4613861f8245ce835081311aef1c19bae Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b67c0ba4613861f8245ce835081311aef1c19bae commit b67c0ba4613861f8245ce835081311aef1c19bae Author: Dmitry Chagin AuthorDate: 2023-10-03 07:38:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 07:38:02 +0000 tests: Test that SIGSYS is not delivered if kern.signosys knob is off Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41979 MFC after: 1 week --- tests/sys/kern/Makefile | 1 + tests/sys/kern/sigsys.c | 101 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 88 insertions(+), 14 deletions(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 6396b22005c3..e449d9deeed1 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -49,6 +49,7 @@ ATF_TESTS_C+= unix_socketpair_test ATF_TESTS_C+= waitpid_nohang ATF_TESTS_C+= pdeathsig ATF_TESTS_C+= sigsys +TEST_METADATA.sigsys+= is_exclusive="true" ATF_TESTS_SH+= coredump_phnum_test ATF_TESTS_SH+= sonewconn_overflow diff --git a/tests/sys/kern/sigsys.c b/tests/sys/kern/sigsys.c index 75e3816fc158..8554a646ebc6 100644 --- a/tests/sys/kern/sigsys.c +++ b/tests/sys/kern/sigsys.c @@ -7,31 +7,29 @@ * under sponsorship from the FreeBSD Foundation. */ +#include #include +#include #include #include #include #include #include +#include static sig_atomic_t sigsys_cnt; +#define SAVEDVALUE "savedsignosys" + static void sigsys_handler(int signo, siginfo_t *si, void *ucp) { sigsys_cnt++; } -ATF_TC(sigsys_test); - -ATF_TC_HEAD(sigsys_test, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Testing delivery of SIGSYS on invalid syscalls"); -} - -ATF_TC_BODY(sigsys_test, tc) +static void +sigsys_test(int knob) { struct sigaction sa; @@ -43,27 +41,102 @@ ATF_TC_BODY(sigsys_test, tc) ATF_REQUIRE(syscall(273) == -1); /* reserved */ ATF_CHECK_ERRNO(ENOSYS, true); atomic_signal_fence(memory_order_seq_cst); - ATF_CHECK_EQ(1, sigsys_cnt); + ATF_CHECK_EQ(1 * knob, sigsys_cnt * knob); ATF_REQUIRE(syscall(440) == -1); /* SYS_kse_switchin */ ATF_CHECK_ERRNO(ENOSYS, true); atomic_signal_fence(memory_order_seq_cst); - ATF_CHECK_EQ(2, sigsys_cnt); + ATF_CHECK_EQ(2 * knob, sigsys_cnt * knob); /* Hope this is enough for say next two months */ ATF_REQUIRE(syscall(3000000) == -1); ATF_CHECK_ERRNO(ENOSYS, true); atomic_signal_fence(memory_order_seq_cst); - ATF_CHECK_EQ(3, sigsys_cnt); + ATF_CHECK_EQ(3 * knob, sigsys_cnt * knob); ATF_REQUIRE(syscall(SYS_afs3_syscall) == -1); ATF_CHECK_ERRNO(ENOSYS, true); atomic_signal_fence(memory_order_seq_cst); - ATF_CHECK_EQ(4, sigsys_cnt); + ATF_CHECK_EQ(4 * knob, sigsys_cnt * knob); +} + +static void +sysctlset(const char *name, int val) +{ + size_t oldlen; + int oldval; + char buf[80]; + + ATF_REQUIRE(sysctlbyname(name, &oldval, &oldlen, NULL, 0) == 0); + + /* Store old %name in a symlink for cleanup */ + snprintf(buf, sizeof(buf), "%d", oldval); + ATF_REQUIRE(symlink(buf, SAVEDVALUE) == 0); + + ATF_REQUIRE(sysctlbyname(name, NULL, NULL, &val, sizeof(val)) == 0); +} + +static void +sysctlcleanup(const char *name) +{ + size_t oldlen; + int n, oldval; + char buf[80]; + + if ((n = readlink(SAVEDVALUE, buf, sizeof(buf))) > 0) { + buf[MIN((size_t)n, sizeof(buf) - 1)] = '\0'; + if (sscanf(buf, "%d", &oldval) == 1) { + oldlen = sizeof(oldval); + (void)sysctlbyname(name, NULL, 0, + &oldval, oldlen); + } + } + (void)unlink(SAVEDVALUE); +} + +ATF_TC_WITH_CLEANUP(sigsys_test_on); +ATF_TC_HEAD(sigsys_test_on, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "descr", + "Testing delivery of SIGSYS on invalid syscalls"); +} + +ATF_TC_BODY(sigsys_test_on, tc) +{ + sysctlset("kern.signosys", 1); + sigsys_test(1); +} + +ATF_TC_CLEANUP(sigsys_test_on, tc) +{ + sysctlcleanup("kern.signosys"); +} + +ATF_TC_WITH_CLEANUP(sigsys_test_off); +ATF_TC_HEAD(sigsys_test_off, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "descr", + "Testing SIGSYS silence on invalid syscalls"); +} + +ATF_TC_BODY(sigsys_test_off, tc) +{ + sysctlset("kern.signosys", 0); + sigsys_test(0); +} + +ATF_TC_CLEANUP(sigsys_test_off, tc) +{ + sysctlcleanup("kern.signosys"); } ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sigsys_test); + ATF_TP_ADD_TC(tp, sigsys_test_on); + ATF_TP_ADD_TC(tp, sigsys_test_off); return (atf_no_error()); } From nobody Tue Oct 3 07:38:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S08p75lycz4vvSr; Tue, 3 Oct 2023 07:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S08p74qSFz3Nwp; Tue, 3 Oct 2023 07:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObficpXzDNnfAfq/Kdhs/q7gO2zT44OxzHOaYvbuGIU=; b=b72zmZ/QFFQBiijYWSzJlNLuVJIbV3UM17cpraJs+bcNKCB2CbTD7hnViSfwOCI429RzeQ InRydZTX9BVxUYeS5J/WZ6kG3fsvQ7NzQTuseq6dceAyO7R5UeLBwrbD9MYB4mEOfR4EFK AclXlOBmQhC0WB/ls29jgV2899q9lv2Vsandvv3BEOQv7jDMcA8FarVXsMIR0lijw1SL5i frVgV4ubK/dEd3scWBtxM57gxCSz49CjYWN5L7gTBjUOZRKVqDBbmS/3EzHYnY31odu4wa l5FjNlilX7afZwVLhxuccsRouzuabtQNTd5LSoZFHVnc9orM7E6zctgPa2dkyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696318735; a=rsa-sha256; cv=none; b=Ztgiy2YeQOqgVVzws6zEa9TzoGvUAXy2dCiL/wPhXyi9UMDKhDsbqhT4E4LivPVfyK5v5n D+9NWMj+XI1BWnK4xKK/sfbuuBGRW/QyabJe6USmX2JqL97p0R9d1u9Jr/FcW3+TjHRSQn kGomnlpPUitfOm5B0Zlv6S2dJ41bvSus04WJlgafR5wJzd6CPfQSNFDVAsgvw7I/Zbkjob 4k3QHgk1to7dfA2oS6D95lygnQPTo1kPwbe3CcgM7VoeA0BiNyavWv+5FackJoskPRT8QP NKR8k7UUd5FmvQJq8xWWivy3BE6zggei40fTTUKQT0xwEGIJfmTCxYb8Iy1Rug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObficpXzDNnfAfq/Kdhs/q7gO2zT44OxzHOaYvbuGIU=; b=rhNNzTo9b+Qhe+WGZTfwfSY6xbaL53rtrTGI6cx3RMnAQGG53DWmBHaJDJKVgGlrFVPDLN DkOaHuGghp4f+g9ox/zRO3EvEkB8uzdkppLMJAZbOCaJRcbf/N+nVegoIQj2UI1Wk9+bjY Zhk3FvFsQ555NIGsQPyBh/BYqrKtGdb6H9tT2thN5MsOMPdnYAQvj28ddR4RU4uYscB03D R27UOhs02dfsbZkSwQhliOs45uv3+m744WuL9db8YiMNSiYkYvnrPTbwJozxnazJhmrl5S uvsWZrtE1bSA4j0qxo9zvgBrGgyicjl3kMeBEXUryinPzrj8FBf+TNlwH/JmaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S08p73vf3zmXP; Tue, 3 Oct 2023 07:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937ctie002263; Tue, 3 Oct 2023 07:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937ctgh002260; Tue, 3 Oct 2023 07:38:55 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:38:55 GMT Message-Id: <202310030738.3937ctgh002260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 8e523be5a5a2 - main - linux(4): Deorbit linux_nosys from syscalls.master List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e523be5a5a2cb9660021d2de5732ee7257b2788 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8e523be5a5a2cb9660021d2de5732ee7257b2788 commit 8e523be5a5a2cb9660021d2de5732ee7257b2788 Author: Dmitry Chagin AuthorDate: 2023-10-03 07:38:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 07:38:02 +0000 linux(4): Deorbit linux_nosys from syscalls.master Differential Revision: https://reviews.freebsd.org/D41902 MFC after: 1 week --- sys/amd64/linux/syscalls.master | 7 +------ sys/amd64/linux32/syscalls.master | 7 +------ sys/arm64/linux/syscalls.master | 7 +------ sys/i386/linux/syscalls.master | 7 +------ 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 437066d1655b..8e12a539b87f 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -32,13 +32,9 @@ #include #include #include -#include #include #include -; Isn't pretty, but there seems to be no other way to trap nosys -#define nosys linux_nosys - 0 AUE_NULL NOPROTO { int read( int fd, @@ -2191,6 +2187,5 @@ 453 AUE_NULL STD { int linux_map_shadow_stack(void); } -; please, keep this line at the end. -454 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 32ed678fe0c6..7d796df1aed3 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -32,14 +32,10 @@ #include #include #include -#include #include #include #include -; Isn't pretty, but there seems to be no other way to trap nosys -#define nosys linux_nosys - 0 AUE_NULL UNIMPL setup 1 AUE_EXIT STD { void linux_exit( @@ -2616,6 +2612,5 @@ 452 AUE_NULL STD { int linux_fchmodat2(void); } - ; please, keep this line at the end. -453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 9ba548359c46..61c7499d57b3 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -9,13 +9,9 @@ #include #include #include -#include #include #include -; Isn't pretty, but there seems to be no other way to trap nosys -#define nosys linux_nosys - 0 AUE_NULL UNIMPL linux_io_setup 1 AUE_NULL UNIMPL linux_io_destroy 2 AUE_NULL UNIMPL linux_io_submit @@ -1865,6 +1861,5 @@ 452 AUE_NULL STD { int linux_fchmodat2(void); } - ; please, keep this line at the end. -453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 3f37cc2fc485..e3c39e50986c 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -32,13 +32,9 @@ #include #include #include -#include #include #include -; Isn't pretty, but there seems to be no other way to trap nosys -#define nosys linux_nosys - 0 AUE_NULL UNIMPL setup 1 AUE_EXIT STD { void linux_exit( @@ -2628,6 +2624,5 @@ 452 AUE_NULL STD { int linux_fchmodat2(void); } - ; please, keep this line at the end. -453 AUE_NULL UNIMPL nosys + ; vim: syntax=off From nobody Tue Oct 3 07:38:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S08p86prFz4vv6R; Tue, 3 Oct 2023 07:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S08p85bybz3P2g; Tue, 3 Oct 2023 07:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LciQtq1AiTHAg3ApIOxx048B2zXPUb2WyJGwEXB4Z5Q=; b=q2UEeWF/Derwbsgn4TMPRd8pm2sW38m8ZzJSJ30THrKdA2C8ZVI1pSVbVyVY6pKPYHrRJM xHz2YCqSYAaHHbDliwdH799lo+NEQDbPNLqsIA29D9bNTlfFAQBsKL3eepoaNeuxmsGZ8y 3+qoevk8Kjr0HnD8CueRvvqwZesXhDDHE3vO9NQQyEBpA78pF4PxLAYUSAgdfdLWQZdBBO D7dyHXI8FqacfW8OMNLahJQhtPi7AdaUgDKIpo9+n5AI/DVn6U4FP2hjXgC3/Lp6nhYKIq kFZKsHQsaHqxmMl+eIvKuAOLU9kOYvnRzZLxq3+8oUle2Ei9Y7/fR6qHHa4h5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696318736; a=rsa-sha256; cv=none; b=fEDXT/gFse65v5P4Sv5gNxT7dW7PRzq+x81fyj6F9vbXkyEBXpLO5HSIpUEtuoxtymnm7y u3ZrSPtkJAezTDgm9Iz/Vl5ePpP0voTwbi0CgliHVwv4ihNvB/0zf9StZjiwpf2/gafi+V BhBSnQUFViUwz7AVD+W4mzEnY0SEBLvRW/L/XL/koj+uHnZL+qA4WhALxNIcZnHii+EYVa NnNICbEq4cgUeGqETWARKF1HhCeOXC88/51DcMu4H8DidOaNrpw4pJyPIUetmkZrNGzhme VRI8UdS02MkwnFlsdqHpwMx8+8Ycsaqmx8ciWbu+fFD5ECUwxB7Ts+AQpUsNNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LciQtq1AiTHAg3ApIOxx048B2zXPUb2WyJGwEXB4Z5Q=; b=wtOk30k1WaBE15G9vjqnFb3mPE7w4bj/G6dgNhINc7s0zGP2rkX61/XQ9auMhzJSOPJemO 3iMdHpCGMMhmIMTWGRUvO8j0Dm/oBr9W1+/z2G8M83xXEO6GTVgO7d/FXiakhUR6XphleE fCLDOlFFjaMiaGr2a1adphUCEmA99mEISIkrbp6EGDsQwYfzqyg3gpNnFglakkU5IPRFFI N7mhElERHqTNsaJtxc4VLq1fOTuC8V60f23qU5vZeRRYulX3PQF1gVZXeQ50eoNQptQOyi /XXS3cEy0DmpbOQZRQsmaNQTmmMGskPN3JyQt8pgXsdFp8VlACHuQNS7Qkxw5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S08p84gdNzmM9; Tue, 3 Oct 2023 07:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937cu1c002306; Tue, 3 Oct 2023 07:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937cu20002303; Tue, 3 Oct 2023 07:38:56 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:38:56 GMT Message-Id: <202310030738.3937cu20002303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 99abee8b7be2 - main - linux(4): Regen for linux_nosys change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99abee8b7be2d19be583b942b470f7af11d32ddc Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=99abee8b7be2d19be583b942b470f7af11d32ddc commit 99abee8b7be2d19be583b942b470f7af11d32ddc Author: Dmitry Chagin AuthorDate: 2023-10-03 07:38:03 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 07:38:03 +0000 linux(4): Regen for linux_nosys change MFC after: 1 week --- sys/amd64/linux/linux_proto.h | 2 -- sys/amd64/linux/linux_syscall.h | 2 +- sys/amd64/linux/linux_syscalls.c | 2 -- sys/amd64/linux/linux_sysent.c | 3 --- sys/amd64/linux/linux_systrace_args.c | 3 --- sys/amd64/linux32/linux32_proto.h | 2 -- sys/amd64/linux32/linux32_syscall.h | 2 +- sys/amd64/linux32/linux32_syscalls.c | 2 -- sys/amd64/linux32/linux32_sysent.c | 3 --- sys/amd64/linux32/linux32_systrace_args.c | 3 --- sys/arm64/linux/linux_proto.h | 2 -- sys/arm64/linux/linux_syscall.h | 2 +- sys/arm64/linux/linux_syscalls.c | 2 -- sys/arm64/linux/linux_sysent.c | 3 --- sys/arm64/linux/linux_systrace_args.c | 3 --- sys/i386/linux/linux_proto.h | 2 -- sys/i386/linux/linux_syscall.h | 2 +- sys/i386/linux/linux_syscalls.c | 2 -- sys/i386/linux/linux_sysent.c | 3 --- sys/i386/linux/linux_systrace_args.c | 3 --- 20 files changed, 4 insertions(+), 44 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 0759ce282499..e02e1e9e64eb 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -33,7 +33,6 @@ struct thread; #define PADR_(t) 0 #endif -#define nosys linux_nosys struct linux_write_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; @@ -1438,7 +1437,6 @@ struct linux_fchmodat2_args { struct linux_map_shadow_stack_args { syscallarg_t dummy; }; -#define nosys linux_nosys int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_newstat(struct thread *, struct linux_newstat_args *); diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index efd3413f91ce..3f1198399416 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -354,4 +354,4 @@ #define LINUX_SYS_linux_cachestat 451 #define LINUX_SYS_linux_fchmodat2 452 #define LINUX_SYS_linux_map_shadow_stack 453 -#define LINUX_SYS_MAXSYSCALL 455 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 6851612ec749..eeec76f3f3b9 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -5,7 +5,6 @@ */ const char *linux_syscallnames[] = { -#define nosys linux_nosys "read", /* 0 = read */ "linux_write", /* 1 = linux_write */ "linux_open", /* 2 = linux_open */ @@ -460,5 +459,4 @@ const char *linux_syscallnames[] = { "linux_cachestat", /* 451 = linux_cachestat */ "linux_fchmodat2", /* 452 = linux_fchmodat2 */ "linux_map_shadow_stack", /* 453 = linux_map_shadow_stack */ - "#454", /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index ecb4ebb85b3a..e5a0ff377de5 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -15,7 +14,6 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { -#define nosys linux_nosys { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = read */ { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_open */ @@ -470,5 +468,4 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_map_shadow_stack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 453 = linux_map_shadow_stack */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 2b0cf1df7e40..8a350eeda6c0 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -11,7 +11,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -#define nosys linux_nosys /* read */ case 0: { struct read_args *p = params; @@ -2816,7 +2815,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* read */ case 0: switch (ndx) { @@ -7280,7 +7278,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* read */ case 0: if (ndx == 0 || ndx == 1) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index ae52fb81c560..8da298847a43 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -33,7 +33,6 @@ struct thread; #define PADR_(t) 0 #endif -#define nosys linux_nosys struct linux_exit_args { char rval_l_[PADL_(int)]; int rval; char rval_r_[PADR_(int)]; }; @@ -1736,7 +1735,6 @@ struct linux_cachestat_args { struct linux_fchmodat2_args { syscallarg_t dummy; }; -#define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); int linux_write(struct thread *, struct linux_write_args *); diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index b6d74578cdfd..c7a2e79842af 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -413,4 +413,4 @@ #define LINUX32_SYS_linux_set_mempolicy_home_node 450 #define LINUX32_SYS_linux_cachestat 451 #define LINUX32_SYS_linux_fchmodat2 452 -#define LINUX32_SYS_MAXSYSCALL 454 +#define LINUX32_SYS_MAXSYSCALL 453 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index 3f1e0425e224..3308ffeb7712 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -5,7 +5,6 @@ */ const char *linux32_syscallnames[] = { -#define nosys linux_nosys "#0", /* 0 = setup */ "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ @@ -459,5 +458,4 @@ const char *linux32_syscallnames[] = { "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ "linux_cachestat", /* 451 = linux_cachestat */ "linux_fchmodat2", /* 452 = linux_fchmodat2 */ - "#453", /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index c1656a124026..024bca613c11 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -16,7 +15,6 @@ /* The casts are bogus but will do for now. */ struct sysent linux32_sysent[] = { -#define nosys linux_nosys { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 0 = setup */ { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ @@ -470,5 +468,4 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 29940f4ed8a3..994f80b92d81 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -11,7 +11,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: { struct linux_exit_args *p = params; @@ -3325,7 +3324,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: switch (ndx) { @@ -8651,7 +8649,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: if (ndx == 0 || ndx == 1) diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index d002ad5a824f..c42de57d77c5 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -33,7 +33,6 @@ struct thread; #define PADR_(t) 0 #endif -#define nosys linux_nosys struct linux_setxattr_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; @@ -1245,7 +1244,6 @@ struct linux_cachestat_args { struct linux_fchmodat2_args { syscallarg_t dummy; }; -#define nosys linux_nosys int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); int linux_fsetxattr(struct thread *, struct linux_fsetxattr_args *); diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index c45f3ded47a2..5ddc0608aff8 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -301,4 +301,4 @@ #define LINUX_SYS_linux_set_mempolicy_home_node 450 #define LINUX_SYS_linux_cachestat 451 #define LINUX_SYS_linux_fchmodat2 452 -#define LINUX_SYS_MAXSYSCALL 454 +#define LINUX_SYS_MAXSYSCALL 453 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index 81fed4cc0227..c26519dc0a52 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -5,7 +5,6 @@ */ const char *linux_syscallnames[] = { -#define nosys linux_nosys "#0", /* 0 = linux_io_setup */ "#1", /* 1 = linux_io_destroy */ "#2", /* 2 = linux_io_submit */ @@ -459,5 +458,4 @@ const char *linux_syscallnames[] = { "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ "linux_cachestat", /* 451 = linux_cachestat */ "linux_fchmodat2", /* 452 = linux_fchmodat2 */ - "#453", /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index c0b495482040..ac93f9bb3a54 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -15,7 +14,6 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { -#define nosys linux_nosys { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 0 = linux_io_setup */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 1 = linux_io_destroy */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 2 = linux_io_submit */ @@ -469,5 +467,4 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index ff58a287ee88..151d46238d1c 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -11,7 +11,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -#define nosys linux_nosys /* linux_setxattr */ case 5: { struct linux_setxattr_args *p = params; @@ -2433,7 +2432,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_setxattr */ case 5: switch (ndx) { @@ -6347,7 +6345,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_setxattr */ case 5: if (ndx == 0 || ndx == 1) diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 6cbab6b1e8d8..8109afec72e9 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -33,7 +33,6 @@ struct thread; #define PADR_(t) 0 #endif -#define nosys linux_nosys struct linux_exit_args { char rval_l_[PADL_(int)]; int rval; char rval_r_[PADR_(int)]; }; @@ -1730,7 +1729,6 @@ struct linux_cachestat_args { struct linux_fchmodat2_args { syscallarg_t dummy; }; -#define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); int linux_write(struct thread *, struct linux_write_args *); diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 19b1714fb5d9..d82006b89847 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -419,4 +419,4 @@ #define LINUX_SYS_linux_set_mempolicy_home_node 450 #define LINUX_SYS_linux_cachestat 451 #define LINUX_SYS_linux_fchmodat2 452 -#define LINUX_SYS_MAXSYSCALL 454 +#define LINUX_SYS_MAXSYSCALL 453 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 112e6505bd00..88f362661ae2 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -5,7 +5,6 @@ */ const char *linux_syscallnames[] = { -#define nosys linux_nosys "#0", /* 0 = setup */ "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ @@ -459,5 +458,4 @@ const char *linux_syscallnames[] = { "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ "linux_cachestat", /* 451 = linux_cachestat */ "linux_fchmodat2", /* 452 = linux_fchmodat2 */ - "#453", /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 5aa7f4921774..dbba4dec3a8c 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -15,7 +14,6 @@ /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { -#define nosys linux_nosys { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 0 = setup */ { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ @@ -469,5 +467,4 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 76781af18124..70036d227707 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -11,7 +11,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: { struct linux_exit_args *p = params; @@ -3356,7 +3355,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: switch (ndx) { @@ -8707,7 +8705,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { -#define nosys linux_nosys /* linux_exit */ case 1: if (ndx == 0 || ndx == 1) From nobody Tue Oct 3 07:38:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S08pB0cWxz4vvSx; Tue, 3 Oct 2023 07:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S08p96Z1rz3PHH; Tue, 3 Oct 2023 07:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lblZeyktA0LG2NQE3SNZsea1OeNI4IBBkzVQH+ImEdY=; b=mk/l1S9ogy1jeKEdZF1+A/vFVde+c8fU3lZ3UMxBTh77pmxelhJZn7P3QKYJF87a99U6iN G4gEmJX7+Dtif8dzfFwXZMfaAgTwiKBW2rE9n4POX6OSixOgomK9UghZ0lTU9rEdzpQylf 6YDuGpLwTek8WpycNi4hNjvYiV+HYeEafiwAJHWBdHqIHjkSHVv6J2wGi3tSUf5aAEr8zC XR0B/xmqs+eqt6uyX4XILBzlsyNlhc4jXauv82aUsNif2xbIq3czh8q0i7xji7vkfuRrVb CHL6RNoCXTQpO40SkaWIS25dneL+wV+F/GZnfriQxfA3mjOEWJ4KUIGwNhAXkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696318737; a=rsa-sha256; cv=none; b=Mx9Upv/H+MJCMEiOqE0yK0lcdWTtNcYO2h6AFrTfemosg1GVBn0yy9SAlCgENVxlx9P1sU 3miueXxf0zfxs9VxgrS15puHqlC2L2n3Tmue+z1N+NzK6Nymu5FFaiAf0kynzkVs0zvzU7 DkjufPYU9zqzyc3Z2PfjJrySlG2OrPMVLWVxpLCLv2BK9NCvARb4HXMw4f9R52u1MNj+gK ec8/ZzGNeoz+8Kq2fUBdIaD+xoxB7WOBzMFftllhORgfYhvlEDyYd3a1DXbOV3iDMkDRPG OVcJQsoW06PnI3aQ2qk3qu/PeCGOyd7qTUDrqKCGIgrlfRSxTSqc1LIL6YFsEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lblZeyktA0LG2NQE3SNZsea1OeNI4IBBkzVQH+ImEdY=; b=TwFVG2ID7AETA2l7Ta0xA3YiK8gURQyRbXcfHQ+goK7TBoK5YG/vRG0qLml6jGkCTUOt73 ym7jQ2QEcLlkk9IS0vyDjZTIThEkNYsP+Fj5TngrsRqZ4JHwOUBHDSpPT60Xbts7fd8Oz0 yUXytU602oQ+Vge4n8r85riOfg/N0ox+/IzsukcyXcXoY3RJK4sGqW3+icN6ewPxZlC41D UV6t4ARqu4JgEapmvoCD+2BJ8GSV00y0Kzzgh3xt1BuR5dkccjkev0133l3gIGGrtT32bX QaA0C9R/VQubLoihrS8wL0Uwx5IfOfoMmjC2V3Pk8bMxY1G3wESO6UzcnqBl0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S08p95fYRzmMB; Tue, 3 Oct 2023 07:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937cvAQ002343; Tue, 3 Oct 2023 07:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937cv76002340; Tue, 3 Oct 2023 07:38:57 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:38:57 GMT Message-Id: <202310030738.3937cv76002340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 199e397e9bf1 - main - linux(4): Deorbit linux_nosys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 199e397e9bf1076ae905e2742ef8e294870f5b27 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=199e397e9bf1076ae905e2742ef8e294870f5b27 commit 199e397e9bf1076ae905e2742ef8e294870f5b27 Author: Dmitry Chagin AuthorDate: 2023-10-03 07:38:03 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 07:38:03 +0000 linux(4): Deorbit linux_nosys Differential Revision: https://reviews.freebsd.org/D41901 MFC after: 1 week --- sys/amd64/linux/linux_sysvec.c | 1 - sys/compat/linux/linux_misc.c | 8 -------- sys/compat/linux/linux_sysproto.h | 36 ------------------------------------ 3 files changed, 45 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 98e2a01b98db..757986f94ae1 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -65,7 +65,6 @@ #include #include #include -#include #include #include diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index cb781f3bad75..b87c05322e16 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -79,7 +79,6 @@ #include #include #include -#include #include #include @@ -1506,13 +1505,6 @@ linux_getsid(struct thread *td, struct linux_getsid_args *args) return (kern_getsid(td, args->pid)); } -int -linux_nosys(struct thread *td, struct nosys_args *ignore) -{ - - return (ENOSYS); -} - int linux_getpriority(struct thread *td, struct linux_getpriority_args *args) { diff --git a/sys/compat/linux/linux_sysproto.h b/sys/compat/linux/linux_sysproto.h index 7ad9e2068d7f..e69de29bb2d1 100644 --- a/sys/compat/linux/linux_sysproto.h +++ b/sys/compat/linux/linux_sysproto.h @@ -1,36 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 2005 Travis Poppe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer - * in this position and unchanged. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef LINUX_SYSPROTO -#define LINUX_SYSPROTO - -int linux_nosys(struct thread *, struct nosys_args *); - -#endif From nobody Tue Oct 3 07:38:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S08pC1Kcwz4vvCP; Tue, 3 Oct 2023 07:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S08pC0d3hz3PXK; Tue, 3 Oct 2023 07:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bO9LkNutaNLsF48d47LfqZGX3Gj55dG7ZZrvjkQ6AZ0=; b=vUjm9SKOJXKf6BukSMQnYJ4QbEjNRS6dbCudY/VgN8IRz5hIzGUbRF5Ah6ZInbNzX6mVj2 cGbptbQKXlzeLfqk3fiMxf+cWuBNrGWiGa667WCsDarmyr2pqCiGiK6cyL/ENtdjKafI0i JDyCbDYsFAFwLFMC38INGR/Q5G8DO3aS1fO8EOcqBwGEJE1W8Sz+RYbkNKNIJLv5cgx/eZ jwLc+m7jAgvK51zK3WdmI3d1hKiP7If/zdqY/OacF3AscoEgCHTuzfQNqnHvVeRUEdiYDk 2QLTQBxAOS21w0toJQAQqb9SQGnViYC+n8cD8PNTDQ0HJRRnrEBptWze9HdWIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696318739; a=rsa-sha256; cv=none; b=lmszBkchgRZ50/U/c5WcBuXptUigxZVWOCBscI9FP8qmryhTI5axmHhkDLMj3X9MKVjFlH lMT1vhPCKh5mdp038owcWQ25ki03Dl73HDTxwVJW+yPvFiWEflrk+kvnjalo1QP4YDOLgD 38906QQXMkOi2mFM790qbtRD6thCZs4HdnaiafI38xuBKeaHev8fOIbNSPTFi1o5hxaiku +6OaPJy6JbZdfI5QOvpM42JIP3P00TpkWpp7BUYyJCrtpR8xZWxphjhizo/l7gheHfLHqL JTK5BOFd36tyUSL8z1PTNXAy/NfTCco/mzjnfZO/3pg73lGWJcaMJ5wKL330ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696318739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bO9LkNutaNLsF48d47LfqZGX3Gj55dG7ZZrvjkQ6AZ0=; b=yrgI1RfaRc+YTX6T62zqbfUZOlju5Ysal5H/QAj3CsTV4f5InOIsLuhF16GYI+VAwic7kE XQGzILoa4Dal3Pts8rOfBZ0FqecYmpUPo+xVZijYYfh33HsQgglNmFfqV9AzK7VLMJppz5 1hRfM1KhP5ByN0zOkAEdW+7/1s8ppcPrVojk/F1KR46c4LONEQII1FPxWAwMmzLxpd5SkP oMKrNxwtWMb+x3aenNLYlOoFcZ3zR0NmHerzOzhcUvlIJLzwfAANUpz0ms6S4cmiMt+xAI cgMNRI2RsHYruXhIsEDC7RPaoxKs8uCW8Jy4Zv6nF2M+F1LdTBESS86ZVfzNzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S08pB6gjKzmd8; Tue, 3 Oct 2023 07:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937cwnH002383; Tue, 3 Oct 2023 07:38:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937cwBT002380; Tue, 3 Oct 2023 07:38:58 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:38:58 GMT Message-Id: <202310030738.3937cwBT002380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 7ec361d627fa - main - sysent: Trim trailing whitespaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ec361d627faeba2538fde88521d76e53a433359 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec361d627faeba2538fde88521d76e53a433359 commit 7ec361d627faeba2538fde88521d76e53a433359 Author: Dmitry Chagin AuthorDate: 2023-10-03 07:38:03 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 07:38:03 +0000 sysent: Trim trailing whitespaces MFC after: 1 week --- sys/sys/sysent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 0166523ab84e..a23c338f9ce2 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -223,7 +223,7 @@ struct syscall_module_data { .sy_return = 0, \ .sy_flags = 0, \ .sy_thrcnt = 0 \ -} +} #define MAKE_SYSENT(syscallname) \ static struct sysent syscallname##_sysent = SYSENT_INIT_VALS(syscallname); From nobody Tue Oct 3 07:56:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BS6SQbz4vw7W; Tue, 3 Oct 2023 07:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BS5Pt6z3S87; Tue, 3 Oct 2023 07:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hQs3/89pAIyU0KO00d6ro0P7/aC6laEpM58Em29NNv4=; b=S6biEb5aa1a1Sz/5h58NocLxI8Q7w+7Z9AfXnMd41cIerxcaEjNrf6gASr3J2LL9ln1spz dlALOAtx9wPwv5qwzFSOlcaL2YdPJE2dnvAN3Aclctsk99ftKje8SThnbaSXsXYU2kv3VN ikRREaO2GKMtIQQgUma3hoxGkIxk7J4aNbKOgfnY97Jn4Bg4kmyEkPf4p4Dnshi4Ad+xMM vhZ7Q5RXPkyNnzj2ZLvqI+BJIWkmsmp+p6H7iaxtH9V/pnEUVrF9rDSmIWc2Vd7i4lf/AY sLblYARtvqaDUgKeLGAxQj8nfNPCJoABDULkpJFPAO46Ln3WGdld/P1EZjokig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319792; a=rsa-sha256; cv=none; b=AL0ZROTry4eulPqDaek2lIhmbqRxCcOyIo/dUV0yqsRKYwfUWXOp7kIW1JBMsEK8HLzvGk c1OAAa7KlMPyATtMqvOMEc6Ezn5k9hSY2m+B+d4TJdJf5dRq71WLT5j2RPgg9p/kFtypG/ mc3Vpl3WLT//eP5yWEY2P7TEIhSdbnp3syPOJneqzUM0Uz9X+gqgcJCz0e5KGW45135WEH DXuaHdAW2rmmnZgzXGzwKdX/fgJp369mbRpki43fQNzfzS5cQIeiElZukPPWUrR+vijX9o 2z7/80AbPeqZkIE26MrGz/YBOn3npy8sazlO7S0mBwp2L0vr43Sugganp4yE0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hQs3/89pAIyU0KO00d6ro0P7/aC6laEpM58Em29NNv4=; b=sZjNgKsGkuJWYffSKfVDQmgXVWEw4azETmDdGXaDaZv/meI9402+jKsO6RcwXwpmjjUuXW yVYaXjz7rT+6Mf5T73jDLeVz39vf1LeiWa37GPldN6ojodGFCRQAGWEcgWUykwQ43y1OmP M05HoSg6u+Q0zRB5TPr7N7yvmMsONp9xW3EczKeLzByXAa45g+bquEU7Rw03uESeIhx8gu ejhV58PLHEHGeMfvvgl/wJMRQPun50MfZ0F/ph01xyx29Repqdcirc2ZVfWO+PCJAZA9Gh /4H5VWf03KUUOk/jtvbwWQASWLB/08R8pJ6veSYr3DyTXlS1PbZr8szyIph/2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BS4Sr0zmfq; Tue, 3 Oct 2023 07:56:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937uWPX035461; Tue, 3 Oct 2023 07:56:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937uWwb035458; Tue, 3 Oct 2023 07:56:32 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:32 GMT Message-Id: <202310030756.3937uWwb035458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 580d00f42fdd - main - iicbus: Move twsi under a new controller subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 580d00f42fdd94ce43583cc45fe3f1d9fdff47d4 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=580d00f42fdd94ce43583cc45fe3f1d9fdff47d4 commit 580d00f42fdd94ce43583cc45fe3f1d9fdff47d4 Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:43:37 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: Move twsi under a new controller subdirectory The folder is a mess so start moving stuff into sub-directories. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41907 --- sys/arm/allwinner/files.allwinner | 2 +- sys/arm/mv/files.arm7 | 2 +- sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 6 +++--- sys/dev/iicbus/{ => controller}/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/mv_twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/twsi.c | 2 +- sys/dev/iicbus/{ => controller}/twsi/twsi.h | 0 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/arm/allwinner/files.allwinner b/sys/arm/allwinner/files.allwinner index b5197809380d..cc609e50f2bd 100644 --- a/sys/arm/allwinner/files.allwinner +++ b/sys/arm/allwinner/files.allwinner @@ -22,7 +22,7 @@ arm/allwinner/axp81x.c optional axp81x arm/allwinner/if_awg.c optional awg syscon arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m optional a10_dmac | a31_dmac -dev/iicbus/twsi/a10_twsi.c optional twsi +dev/iicbus/controller/twsi/a10_twsi.c optional twsi dev/usb/controller/generic_ohci.c optional ohci dev/usb/controller/generic_usb_if.m optional ohci dev/usb/controller/generic_ehci.c optional ehci diff --git a/sys/arm/mv/files.arm7 b/sys/arm/mv/files.arm7 index 3eb18739532a..791046161151 100644 --- a/sys/arm/mv/files.arm7 +++ b/sys/arm/mv/files.arm7 @@ -22,7 +22,7 @@ arm/mv/rtc.c standard arm/mv/armadaxp/armadaxp_mp.c optional smp arm/mv/armadaxp/mptramp.S optional smp dev/cesa/cesa.c optional cesa -dev/iicbus/twsi/mv_twsi.c optional twsi +dev/iicbus/controller/twsi/mv_twsi.c optional twsi dev/mge/if_mge.c optional mge dev/neta/if_mvneta_fdt.c optional neta fdt dev/neta/if_mvneta.c optional neta mdio mii diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 3dc48e20b168..344dada420c9 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -93,7 +93,7 @@ dev/fdt/fdt_arm_platform.c optional platform fdt dev/video/crtc_if.m optional vt dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc -dev/iicbus/twsi/twsi.c optional twsi +dev/iicbus/controller/twsi/twsi.c optional twsi dev/ofw/ofw_pcib.c optional fdt pci dev/pci/pci_host_generic.c optional pci_host_generic pci dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index dc78840646bb..4df4f5c81bd1 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -337,9 +337,9 @@ ice_ddp.fw optional ice_ddp \ clean "ice_ddp.fw" dev/iicbus/sy8106a.c optional sy8106a fdt -dev/iicbus/twsi/mv_twsi.c optional twsi fdt -dev/iicbus/twsi/a10_twsi.c optional twsi fdt -dev/iicbus/twsi/twsi.c optional twsi fdt +dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt +dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt +dev/iicbus/controller/twsi/twsi.c optional twsi fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi diff --git a/sys/dev/iicbus/twsi/a10_twsi.c b/sys/dev/iicbus/controller/twsi/a10_twsi.c similarity index 98% rename from sys/dev/iicbus/twsi/a10_twsi.c rename to sys/dev/iicbus/controller/twsi/a10_twsi.c index 3b61d338e580..de3f6a92f44f 100644 --- a/sys/dev/iicbus/twsi/a10_twsi.c +++ b/sys/dev/iicbus/controller/twsi/a10_twsi.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/iicbus/twsi/mv_twsi.c b/sys/dev/iicbus/controller/twsi/mv_twsi.c similarity index 99% rename from sys/dev/iicbus/twsi/mv_twsi.c rename to sys/dev/iicbus/controller/twsi/mv_twsi.c index 3f50bb0c4968..35f5b0acc650 100644 --- a/sys/dev/iicbus/twsi/mv_twsi.c +++ b/sys/dev/iicbus/controller/twsi/mv_twsi.c @@ -63,7 +63,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/controller/twsi/twsi.c similarity index 99% rename from sys/dev/iicbus/twsi/twsi.c rename to sys/dev/iicbus/controller/twsi/twsi.c index 802110ed7f99..7031cce515ce 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/controller/twsi/twsi.c @@ -56,7 +56,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/controller/twsi/twsi.h similarity index 100% rename from sys/dev/iicbus/twsi/twsi.h rename to sys/dev/iicbus/controller/twsi/twsi.h From nobody Tue Oct 3 07:56:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BV08sjz4vwSY; Tue, 3 Oct 2023 07:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BT6Znyz3SDR; Tue, 3 Oct 2023 07:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aniM7Jqyv2nFwxdSYweEliyRZU0PWP/FYVZ1YA9cdoI=; b=Fq3oGEvaC316O/FjsMXRQN62dN9klzX0D5g5eZioIRNFN3NvVv4E0eiNW9HvC3GhTZ1Hqv p/MP7WVfqgqKwKm+33vG+bIuzJ84jbWuo6wYLfzTZLW+Nnw8frUdMsc35xrKZsib1qXSWe K8xYFlorqQqImcavrNK4ZSH54It28YFUjYf8HmpRjzgha1H19N6tpZfdC+7tHDloda4Q6M wvhXx3bjgPxsB6lJN+xnmZQmPwpxjTJ/6alSRne/7R474smu3T8+juqUFXvfanwrSe7LkG cLA5GdHQh5n4Kkw7X/Cz1CrSX9XskmSP/6PciK4t+va4x/Oaac3fATJEp+HCKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319793; a=rsa-sha256; cv=none; b=pKovt/xBInXOKIRSB2YsPBQBdc/ae7QcOnXGpz6HP+ntpHx7LQLUZqZAaSKqQ7rd+OTVAZ vXSi1DZYOT2/ak9yy5V8sFcc1Oxlkd7nHS0vkwx6OTBj5Wy+lsdGOw3G2RxDPQbet4rBo1 SyTTJosM54Qq9W2vMM9GNOSxvKpUuxw+4ENX6Zi0hZlP+/nFe7tC1fI9lC9zrr5GSL7xt0 jNs24WAXz+lzp7g601K7OVcuuB0p4roLFFEUmbdgM5PwXGtFwWfy6SNeQ5xDB9v4/3J9FD BhMVFP0IWpARj8NeH72/CUF+DhESrGwp3o0859WGS+YQ0ef1xvSsN+nNKgYg+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aniM7Jqyv2nFwxdSYweEliyRZU0PWP/FYVZ1YA9cdoI=; b=i10HetKWOSx4AfQ2ntwJwKltFFTC0fIoEgs/mS4i6fqgx6QA67fO9CcjZA1ZlAkwOSNW10 OVk4Lxq8sxJsc3Y3PIJ9BIkUgfL9SIYJkxeqBtmQGtPacE044W8RK0g1NX9xjoQ5YC3V46 2utJWh7FnLQiDiUdaHHSc/xlt8iil6OUFBLEOnNFwxbbA3RpZCM6iWAPe1LxQwN/f+slz/ yB0zIRjdbocExG6veCIWTiXmK9KPbuTnNwjALqfQeBJFskf/Q+bHe2WRuvWVXlc1BySWUo tBCNcLinRJDl6ozhalESJknfXZmPFemgJc/CU92HG7eWCQQHl32IGAFOZrJQ2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BT5Y2Lzn48; Tue, 3 Oct 2023 07:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937uXHB035519; Tue, 3 Oct 2023 07:56:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937uXjO035516; Tue, 3 Oct 2023 07:56:33 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:33 GMT Message-Id: <202310030756.3937uXjO035516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2f16049c985a - main - iicbus: Move remaining rtc driver into rtc subfolder List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f16049c985a364e2bd2b256f5bef9af17e10c62 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2f16049c985a364e2bd2b256f5bef9af17e10c62 commit 2f16049c985a364e2bd2b256f5bef9af17e10c62 Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:49:45 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: Move remaining rtc driver into rtc subfolder No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41908 --- sys/conf/files | 16 ++++++++-------- sys/dev/iicbus/{ => rtc}/ds1307.c | 2 +- sys/dev/iicbus/{ => rtc}/ds1307reg.h | 0 sys/dev/iicbus/{ => rtc}/ds13rtc.c | 0 sys/dev/iicbus/{ => rtc}/ds1672.c | 0 sys/dev/iicbus/{ => rtc}/ds3231.c | 2 +- sys/dev/iicbus/{ => rtc}/ds3231reg.h | 0 sys/dev/iicbus/{ => rtc}/isl12xx.c | 0 sys/dev/iicbus/{ => rtc}/nxprtc.c | 0 sys/dev/iicbus/{ => rtc}/rtc8583.c | 0 sys/dev/iicbus/{ => rtc}/s35390a.c | 0 sys/modules/i2c/ds1307/Makefile | 2 +- sys/modules/i2c/ds13rtc/Makefile | 2 +- sys/modules/i2c/ds1672/Makefile | 2 +- sys/modules/i2c/ds3231/Makefile | 2 +- sys/modules/i2c/isl12xx/Makefile | 2 +- sys/modules/i2c/nxprtc/Makefile | 2 +- sys/modules/i2c/rtc8583/Makefile | 2 +- sys/modules/i2c/s35390a/Makefile | 2 +- 19 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 4e72eac77e68..f2a3524bdb21 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1794,10 +1794,6 @@ dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ads111x.c optional ads111x -dev/iicbus/ds1307.c optional ds1307 -dev/iicbus/ds13rtc.c optional ds13rtc | ds133x | ds1374 -dev/iicbus/ds1672.c optional ds1672 -dev/iicbus/ds3231.c optional ds3231 dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic @@ -1814,7 +1810,6 @@ dev/iicbus/iicsmb.c optional iicsmb \ dev/iicbus/iicoc.c optional iicoc dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci -dev/iicbus/isl12xx.c optional isl12xx dev/iicbus/lm75.c optional lm75 dev/iicbus/max44009.c optional max44009 dev/iicbus/mux/iicmux.c optional iicmux @@ -1822,15 +1817,20 @@ dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux -dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/pcf8591.c optional pcf8591 -dev/iicbus/rtc8583.c optional rtc8583 +dev/iicbus/rtc/ds1307.c optional ds1307 +dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 +dev/iicbus/rtc/ds1672.c optional ds1672 +dev/iicbus/rtc/ds3231.c optional ds3231 +dev/iicbus/rtc/isl12xx.c optional isl12xx +dev/iicbus/rtc/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt +dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt -dev/iicbus/s35390a.c optional s35390a +dev/iicbus/rtc/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a fdt dev/iicbus/syr827.c optional syr827 fdt dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio diff --git a/sys/dev/iicbus/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c similarity index 99% rename from sys/dev/iicbus/ds1307.c rename to sys/dev/iicbus/rtc/ds1307.c index 6522b3284bf3..e8d24880571c 100644 --- a/sys/dev/iicbus/ds1307.c +++ b/sys/dev/iicbus/rtc/ds1307.c @@ -48,7 +48,7 @@ #include #endif -#include +#include #include "clock_if.h" #include "iicbus_if.h" diff --git a/sys/dev/iicbus/ds1307reg.h b/sys/dev/iicbus/rtc/ds1307reg.h similarity index 100% rename from sys/dev/iicbus/ds1307reg.h rename to sys/dev/iicbus/rtc/ds1307reg.h diff --git a/sys/dev/iicbus/ds13rtc.c b/sys/dev/iicbus/rtc/ds13rtc.c similarity index 100% rename from sys/dev/iicbus/ds13rtc.c rename to sys/dev/iicbus/rtc/ds13rtc.c diff --git a/sys/dev/iicbus/ds1672.c b/sys/dev/iicbus/rtc/ds1672.c similarity index 100% rename from sys/dev/iicbus/ds1672.c rename to sys/dev/iicbus/rtc/ds1672.c diff --git a/sys/dev/iicbus/ds3231.c b/sys/dev/iicbus/rtc/ds3231.c similarity index 99% rename from sys/dev/iicbus/ds3231.c rename to sys/dev/iicbus/rtc/ds3231.c index eb45f6fcf6e6..23e88eb7ecd3 100644 --- a/sys/dev/iicbus/ds3231.c +++ b/sys/dev/iicbus/rtc/ds3231.c @@ -47,7 +47,7 @@ #include #endif -#include +#include #include "clock_if.h" #include "iicbus_if.h" diff --git a/sys/dev/iicbus/ds3231reg.h b/sys/dev/iicbus/rtc/ds3231reg.h similarity index 100% rename from sys/dev/iicbus/ds3231reg.h rename to sys/dev/iicbus/rtc/ds3231reg.h diff --git a/sys/dev/iicbus/isl12xx.c b/sys/dev/iicbus/rtc/isl12xx.c similarity index 100% rename from sys/dev/iicbus/isl12xx.c rename to sys/dev/iicbus/rtc/isl12xx.c diff --git a/sys/dev/iicbus/nxprtc.c b/sys/dev/iicbus/rtc/nxprtc.c similarity index 100% rename from sys/dev/iicbus/nxprtc.c rename to sys/dev/iicbus/rtc/nxprtc.c diff --git a/sys/dev/iicbus/rtc8583.c b/sys/dev/iicbus/rtc/rtc8583.c similarity index 100% rename from sys/dev/iicbus/rtc8583.c rename to sys/dev/iicbus/rtc/rtc8583.c diff --git a/sys/dev/iicbus/s35390a.c b/sys/dev/iicbus/rtc/s35390a.c similarity index 100% rename from sys/dev/iicbus/s35390a.c rename to sys/dev/iicbus/rtc/s35390a.c diff --git a/sys/modules/i2c/ds1307/Makefile b/sys/modules/i2c/ds1307/Makefile index 9699a1057dc3..363aa412cbdc 100644 --- a/sys/modules/i2c/ds1307/Makefile +++ b/sys/modules/i2c/ds1307/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1307 SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds13rtc/Makefile b/sys/modules/i2c/ds13rtc/Makefile index ffeab1c12dd7..a9616765b7a5 100644 --- a/sys/modules/i2c/ds13rtc/Makefile +++ b/sys/modules/i2c/ds13rtc/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds13rtc SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds1672/Makefile b/sys/modules/i2c/ds1672/Makefile index 1b1fd9ab038c..c160e317c36d 100644 --- a/sys/modules/i2c/ds1672/Makefile +++ b/sys/modules/i2c/ds1672/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1672 SRCS = ds1672.c diff --git a/sys/modules/i2c/ds3231/Makefile b/sys/modules/i2c/ds3231/Makefile index 7548f6ef8282..4c6a7241bf76 100644 --- a/sys/modules/i2c/ds3231/Makefile +++ b/sys/modules/i2c/ds3231/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds3231 SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/isl12xx/Makefile b/sys/modules/i2c/isl12xx/Makefile index 98411b78aae6..be0b409eeff2 100644 --- a/sys/modules/i2c/isl12xx/Makefile +++ b/sys/modules/i2c/isl12xx/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = isl12xx SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/nxprtc/Makefile b/sys/modules/i2c/nxprtc/Makefile index 23efdcfe7754..3501909f6ea4 100644 --- a/sys/modules/i2c/nxprtc/Makefile +++ b/sys/modules/i2c/nxprtc/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = nxprtc SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/rtc8583/Makefile b/sys/modules/i2c/rtc8583/Makefile index 23cb48afd33c..a474da20685e 100644 --- a/sys/modules/i2c/rtc8583/Makefile +++ b/sys/modules/i2c/rtc8583/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = rtc8583 SRCS = rtc8583.c diff --git a/sys/modules/i2c/s35390a/Makefile b/sys/modules/i2c/s35390a/Makefile index d1091db58abc..e12ddeece2ec 100644 --- a/sys/modules/i2c/s35390a/Makefile +++ b/sys/modules/i2c/s35390a/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = s35390a SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h From nobody Tue Oct 3 07:56:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BW1QTdz4vwbB; Tue, 3 Oct 2023 07:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BW0Vfrz3SKJ; Tue, 3 Oct 2023 07:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BW+tv4/n6yRhaeoLHOOAv2nYqbIQNLG2YT05dZ3KwM=; b=b3W2Pl9CUHd3VxhQ2wjChwupfpX33C2yDRwDSz6qlJPaAHvpGeB0Ts4eGj4jHfNCLCIANI Oaorecw0tJ+0XOO+9DMWPFwV29CLHMYe51Au9uwFvfCzR6zBZJ4bVITL5BV96C5V8VDb6z Ek2vkbzrFApFKRkZVzV0rqFO9kgeOpTnU8jz59JsejZL3cw5uqTyhYE90CHt0saJbHYp1w dRnv2pM+cA6CaB5kiqFlkh33Uuf9cIaLTNsxY6Fs5yhnIxud969aji2gjaX+F3x64KJCuH O32i4sxH19xG1s1kxbCtYmmfGjx+HKNBL1MmH95FAwGAQ+dC7rjql/DFon+YqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319795; a=rsa-sha256; cv=none; b=ewmT6BUp1/ps0vZaX0u0WyCGgFAcApQAabVFL9oit8FDUbxmx/1AJOKD7L21c7+CvYsum2 sI5WoSg+jlozsyuTqFP3rQjChcoPZH26B6AvCr7dg6hme5BPdWDewIKdGnlJGLNKaRnXdZ UeKuy4vz47hThzGB7UZWc+47LRDlwjJw9g6234YZ0NnWuvz4QLLi6nIs0lKfcefQzmKZdc W74z4Zx100NuqW731bobNCujy8xo0usrZFA9m+K1BrVvpyUFTcM+t2R6pN4qsSgDDWXZEy i6Ppm4RRSVn2zYhfYHcBlYHObnYGvUp7P+SxKSy5LPWNB9CuBZqjm1k1kDgEWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BW+tv4/n6yRhaeoLHOOAv2nYqbIQNLG2YT05dZ3KwM=; b=FvfdGzgzm4H4ris3iG8iOaNlkdVwH8flW+4WLVANpSBIZYnVSZ4pIy14zo/lbJJ+jks/jq svxEUQw+zMA4CLE33UUQmIYmm3XLarRchL+lviLPB5lHqVgPtS/2fR5MXOc/iyEbi8ymps bfNUT/YFRPcwiCykFeOcHIGUWtt2Lx/DI/XrJHyNDBxAUbmAcVDSXF8DoTPQNDcOUhwC79 2i5c3TqdWUmSaQ7c8hnnuoWDRG6E6WGLTJulH60TLk0+ge1uRLuc+gQBbggTLoX2nIlCEm 3F3kC+Fj6VxDE9i68EEKMHAulJqlUBrA2yvqtgREEU6PhQl0CpwTFFrL/UlqFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BV6cV4zmhd; Tue, 3 Oct 2023 07:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937uYkC035567; Tue, 3 Oct 2023 07:56:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937uYi8035564; Tue, 3 Oct 2023 07:56:34 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:34 GMT Message-Id: <202310030756.3937uYi8035564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 062944cc4227 - main - iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 062944cc4227e7bd002e4de2be48ec9b710bfaa5 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=062944cc4227e7bd002e4de2be48ec9b710bfaa5 commit 062944cc4227e7bd002e4de2be48ec9b710bfaa5 Author: Emmanuel Vadot AuthorDate: 2023-09-19 07:56:02 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41909 --- sys/conf/files | 4 ++-- sys/conf/files.arm64 | 1 - sys/dev/iicbus/{ => pmic/silergy}/sy8106a.c | 0 sys/dev/iicbus/{ => pmic/silergy}/syr827.c | 0 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index f2a3524bdb21..83333e195ad0 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1831,10 +1831,10 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a -dev/iicbus/sy8106a.c optional sy8106a fdt -dev/iicbus/syr827.c optional syr827 fdt dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt +dev/iicbus/pmic/silergy/sy8106a.c optional sy8106a fdt +dev/iicbus/pmic/silergy/syr827.c optional syr827 fdt dev/igc/if_igc.c optional igc iflib pci dev/igc/igc_api.c optional igc iflib pci dev/igc/igc_base.c optional igc iflib pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 4df4f5c81bd1..d8adc54763fc 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -336,7 +336,6 @@ ice_ddp.fw optional ice_ddp \ no-obj no-implicit-rule \ clean "ice_ddp.fw" -dev/iicbus/sy8106a.c optional sy8106a fdt dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt dev/iicbus/controller/twsi/twsi.c optional twsi fdt diff --git a/sys/dev/iicbus/sy8106a.c b/sys/dev/iicbus/pmic/silergy/sy8106a.c similarity index 100% rename from sys/dev/iicbus/sy8106a.c rename to sys/dev/iicbus/pmic/silergy/sy8106a.c diff --git a/sys/dev/iicbus/syr827.c b/sys/dev/iicbus/pmic/silergy/syr827.c similarity index 100% rename from sys/dev/iicbus/syr827.c rename to sys/dev/iicbus/pmic/silergy/syr827.c From nobody Tue Oct 3 07:56:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BX1zXTz4vw7Y; Tue, 3 Oct 2023 07:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BX17BPz3SB3; Tue, 3 Oct 2023 07:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZwbshPZDSoglBrcmZ4IzbVoN2kQVNOglpryKR5NZXU=; b=TEii1GspW0Hg++kbAxXIw9OcNbNBTIpDz7YvNzf3fgszG0tmW5kshdzZfuWHtTaGK9XYHP 6aLVTjGGtJ8eDZZoHBkFZL+Ib504pGNpIhTgiLlz70uVgmAw7Mgc8ZPWr3AOIfNWialbIn C00t87UfcluUQ1T7irETZMxQhhaypnjTTWX5TIER5uj27elgyCpNNC9ZQ7OBpsXQDNwkvm O2uKjSCCk/keRuUZ1wngxQ2zEc82IqbOnGqxOemplD55By3TeRdPLQ4xDodpMu5xy3SEv4 41RwpyWO7pC0IqxrgS3WKPleAqp/ksn3dRej5/vUaVzpa+GxaDhV9O/btbqmqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319796; a=rsa-sha256; cv=none; b=rtn6auRFzSuQ59cQbvpreX+5gFQ27xmvIdHcTajWyJioG9Cj2g1hMIWuSD1P9aC6lLzWto 01EIw+V7RDOjhiSXZYXGa4DCXhHTRkpksZQ+3rbmhhx7rX5Qy/NYR31ervt032pv1f7iBV wJmfwIHs27/z9jfjyHbpvT1+p3KMoiHPYK7rR/2mW+wPEJzZOsSrsnQZ+tbH6pBh0lkNwG pgtnHZ3XDoFli0EzHPurmxIDv5/wRp/61wae+7An0bg3sOLZM6WATO5H13j/dJRAENgKGl xoObELUD6tqcMYdrQsFh4Hn3yKcx96KHss62BisZ1IuOq0UAMk/YShttm4m5RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZwbshPZDSoglBrcmZ4IzbVoN2kQVNOglpryKR5NZXU=; b=x1zV0dWccgs2M4WTh3rs0DImfCmhlbvYBPoV9HfDJFOGTJJKCgsLNCVFXq/21P3D5P35cU wRNT/VkaOeNcVUaecfnZwR507TfvkSm8LVRc6iFKN4W+gjYf/S86OVjc7hYdo4aVGfXACY IJLCZo4NobRnro6KsxaUtIKXu0FJHiRrf7gukNvW5hLOYsWqpM4zrVhVbCatUhmC+D8wmC t/jPE/7jzaGFKXF5h/BK4SQYWqa6euEEzO9TYImjpZJJzpEXCOBPdWdVIT7WeiS0UlVyJ8 FbI4zkqlTR0+Vdo9w/aFKeDXtukkJSh0m5jTt2Q2umQANxuGgCKbSPQ+dLuHSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BX09TQzmct; Tue, 3 Oct 2023 07:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937uZoM035625; Tue, 3 Oct 2023 07:56:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937uZWE035622; Tue, 3 Oct 2023 07:56:35 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:35 GMT Message-Id: <202310030756.3937uZWE035622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 22d7dd834bc5 - main - iicbus: Move adm1030 and adt746x to new pwm subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22d7dd834bc5cd189810e414701e3ad1e98102e4 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=22d7dd834bc5cd189810e414701e3ad1e98102e4 commit 22d7dd834bc5cd189810e414701e3ad1e98102e4 Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:04:02 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: Move adm1030 and adt746x to new pwm subdirectory Those are (mainly) pwm controller so move it under a new subdirectory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41910 --- sys/conf/files.powerpc | 4 ++-- sys/dev/iicbus/{ => pwm}/adm1030.c | 0 sys/dev/iicbus/{ => pwm}/adt746x.c | 0 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 48251ab07d9e..0a05b1327689 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -41,13 +41,13 @@ dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac -dev/iicbus/adm1030.c optional powermac windtunnel | adm1030 powermac -dev/iicbus/adt746x.c optional adt746x powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim +dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac +dev/iicbus/pwm/adt746x.c optional adt746x powermac dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_opal.c optional powernv ipmi dev/ice/if_ice_iflib.c optional ice pci powerpc64 | ice pci powerpc64le \ diff --git a/sys/dev/iicbus/adm1030.c b/sys/dev/iicbus/pwm/adm1030.c similarity index 100% rename from sys/dev/iicbus/adm1030.c rename to sys/dev/iicbus/pwm/adm1030.c diff --git a/sys/dev/iicbus/adt746x.c b/sys/dev/iicbus/pwm/adt746x.c similarity index 100% rename from sys/dev/iicbus/adt746x.c rename to sys/dev/iicbus/pwm/adt746x.c From nobody Tue Oct 3 07:56:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BY4jH0z4vwXj; Tue, 3 Oct 2023 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BY2CK7z3SQt; Tue, 3 Oct 2023 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4g1rc5Ot/i+b1YUMvBJWN+9gPo37LiOOix9JAIfla4=; b=j8KSVS2zI0ONhqt5MFVGU/wtXhRP0w+icXroQGX6tAV5EMvZvEvZMi3zFk4KKCTr0ZjQU5 3Q9YZ/Eh5yfHYl9KUOnvvPa/cyBi4s9wYzqs/EWV0ddO6IkxwlYhPWuMzTZ6LHkyPEP2cH H0BPnOMc27zKLGqLqyts+qMmXWKuzSsCFRKrYPNh0OPzGsbV0dMG4V7BLKYScU/3VXCxG9 sciMVq1AWdtV90QZKqU9xIQQPI6+2smzrr6fhAW0EnNPOwXLcMhY8lGZys8BZKe8VaoCqc wMZQS99eCXqTCKoTSSjAX0w+fj+Ol9IKY7Q/gBzxDgmooagdym7kgUxRlSoOlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319797; a=rsa-sha256; cv=none; b=fHPP9x2ZJsy817LUM0QUdpYFQJdvUoubN8q5QGOcUdcP6a59gkJ+H6oi1ttP3crw09zzQs oU4nZNrKRK68AooPDyclxCTFWwvfSy8sNXrZQVSKX/cwiBYcgBHoD8KAT9e6gusOkdM3N+ wz5VlZ6AIaVZlg3Jqs5xZbbgiiBipFh9dGWv27tWZiaidjt/POVjjzinHIQBAdEk0smq5u S4vQ5L2Nf0rt9SiP+0xITwy1E1kYhlVQg65+lDwjcQRw59bU98f9csilPBV7qG7MoFprHv izQTsHvcUJaljy0/I+gpV8oYOpxOjuYY7NiHdXvQ40K5kqnwvUvAkeIkOy+6FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g4g1rc5Ot/i+b1YUMvBJWN+9gPo37LiOOix9JAIfla4=; b=nnMQpa0OdOTYnfFKge9w5VKqU4qHyPsa2lzmTlOVhstuLaQ/b/xWi56D6mMdjNBqJL0oDl BsbeUdhojqYPWA73+walDUk+Kk+EbKG4wo0t+Fe5NMDsXJO58//UgLWgvpLSGtUUGR3R6g ZskVHvCJaQkHnIMiqEYMHmpDoeLHnKgj7dFwuau0YYF/mZS2ib3EvDESzoE5ydhDKbnRm6 3xjb+Z3sum4efyaoKzVYd/l6N3MPK8wyzTflDMU8ssRLNN2l8xntY5MGDum0hwHPM/kh1k R6DqCrUFt+E4tUsMzDVQ8kmapCyICNoAcvsAqhQk4JbBVQQIezqMwQacdtnfnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BY1GZRzn4h; Tue, 3 Oct 2023 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937ubpk035679; Tue, 3 Oct 2023 07:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937ubfg035676; Tue, 3 Oct 2023 07:56:37 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:37 GMT Message-Id: <202310030756.3937ubfg035676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 06589d6e029c - main - iicbus: Move ADC drivers into a new adc subfolder List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06589d6e029c6ff64a7816d743e0a508abe6193b Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=06589d6e029c6ff64a7816d743e0a508abe6193b commit 06589d6e029c6ff64a7816d743e0a508abe6193b Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:38:19 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: Move ADC drivers into a new adc subfolder No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41911 --- sys/conf/files | 6 +++--- sys/conf/files.powerpc | 2 +- sys/dev/iicbus/{ => adc}/ad7417.c | 0 sys/dev/iicbus/{ => adc}/ad7418.c | 0 sys/dev/iicbus/{ => adc}/ads111x.c | 0 sys/dev/iicbus/{ => adc}/pcf8591.c | 0 sys/modules/i2c/ads111x/Makefile | 2 +- sys/modules/i2c/pcf8591/Makefile | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 83333e195ad0..1eb6ba4ff781 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1792,8 +1792,6 @@ dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi -dev/iicbus/ad7418.c optional ad7418 -dev/iicbus/ads111x.c optional ads111x dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic @@ -1812,6 +1810,9 @@ dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci dev/iicbus/lm75.c optional lm75 dev/iicbus/max44009.c optional max44009 +dev/iicbus/adc/ad7418.c optional ad7418 +dev/iicbus/adc/ads111x.c optional ads111x +dev/iicbus/adc/pcf8591.c optional pcf8591 dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt @@ -1820,7 +1821,6 @@ dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 -dev/iicbus/pcf8591.c optional pcf8591 dev/iicbus/rtc/ds1307.c optional ds1307 dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/rtc/ds1672.c optional ds1672 diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 0a05b1327689..76a0f4d707f3 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -40,10 +40,10 @@ dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc -dev/iicbus/ad7417.c optional ad7417 powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac +dev/iicbus/adc/ad7417.c optional ad7417 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac diff --git a/sys/dev/iicbus/ad7417.c b/sys/dev/iicbus/adc/ad7417.c similarity index 100% rename from sys/dev/iicbus/ad7417.c rename to sys/dev/iicbus/adc/ad7417.c diff --git a/sys/dev/iicbus/ad7418.c b/sys/dev/iicbus/adc/ad7418.c similarity index 100% rename from sys/dev/iicbus/ad7418.c rename to sys/dev/iicbus/adc/ad7418.c diff --git a/sys/dev/iicbus/ads111x.c b/sys/dev/iicbus/adc/ads111x.c similarity index 100% rename from sys/dev/iicbus/ads111x.c rename to sys/dev/iicbus/adc/ads111x.c diff --git a/sys/dev/iicbus/pcf8591.c b/sys/dev/iicbus/adc/pcf8591.c similarity index 100% rename from sys/dev/iicbus/pcf8591.c rename to sys/dev/iicbus/adc/pcf8591.c diff --git a/sys/modules/i2c/ads111x/Makefile b/sys/modules/i2c/ads111x/Makefile index 05e2d1c0da0e..d02cb704146c 100644 --- a/sys/modules/i2c/ads111x/Makefile +++ b/sys/modules/i2c/ads111x/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= ads111x SRCS= ads111x.c diff --git a/sys/modules/i2c/pcf8591/Makefile b/sys/modules/i2c/pcf8591/Makefile index c944a2c8c66d..8f17f3dc3ae1 100644 --- a/sys/modules/i2c/pcf8591/Makefile +++ b/sys/modules/i2c/pcf8591/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= pcf8591 SRCS= pcf8591.c From nobody Tue Oct 3 07:56:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09BZ4Wjcz4vwdc; Tue, 3 Oct 2023 07:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09BZ3DFDz3Sdb; Tue, 3 Oct 2023 07:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCkbiyu7i6GR3FaYOglgGrU1WY2Mrs1ABHvuvU+lLbk=; b=tZsqoPDqE5vED/QaMQVqAWEa5j+0WAMmbMXvvNLwrYDgw6MjT7VVZeyA5ivtoZdIa43BZU ZjKVxiiLhZdldxzSHA0CiA4fFOMONQWTDpKgBs6e4y5MvXigfyEZlFKioVms5KNzpKSsDL p6PLH8uh/OoSdZbWFYJkMUMnByeoFW8OwGuU9m8TdLtRLSx4WQ4/08+3UDtgVkUVrgVQ2w 2hOSvPbMQzMuv5giSreIziwggvKBiWOJnOGr8tsJUU/NSAMDP5RG9V3wKO78jeMPtInP7S q5jIL8GsdfCicz2AQhhA/90WUsaDGOxlHaBoCXnLeX5qIyUUhHvZZi9EY2cnVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319798; a=rsa-sha256; cv=none; b=tfAJsuYghoWhrRAD+3ZtMfNiX5mJvIuLEP+giqFgU40ItuEEvisLfZkh1V2h4G4BQ4rkM9 5JyvHpZKs4l/WYGd8Zb4XqjH7B8URriAMvB9idM+Xp47rO7DhjAMUQoMBHxGpWeNEj95yb u7Q38ZOVeczfAm/8zzwBcnchEzy3iVKmyF3afzdn1ujWSyitAwPcst0Q7kqWoGwgXTIvsO MRJnGzU8W6oKol02BMwpPTZZtdUlLGxB2b1mLb+e6ykUAlZqf0KSVZvYTfgNWqtmcHBFPE wYL+OCtbJCN6uVEndh8seINkaC6v1OkVhPL4sydu3kEfyaQwOAKVnOlaGxetoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCkbiyu7i6GR3FaYOglgGrU1WY2Mrs1ABHvuvU+lLbk=; b=Ey4X9FTHlPryDw0WHJWzXqOqOguzPdGzsLyS3nQH9Bv4cVgrdwM0BOQKDsXI1IplXdBVTF hiJUDroA5PRlZi+OILC9p/3Dp+7vGgcL3XMizSTLslhdJoD5PxU7hEQsMjURSSGZ1I1oXM J3ogla4KaXsWgvTdAU4Lfzpe2NnvxYT5b+9Gkul5fs+szNQBNvzjeZhREyZAt7I3Pv0AfU e8QTjWtWaFvUEJIZQ3BlL5O7I72iARR4QPDRUB7/nwv90+K19VBMCyGiWtb1nvoX3dCFZ1 esFy0mxYeBD+v7465P2wJAEmw+qz43E5pqtyWny9PG5E6SlzYBJOj3gE6DYYFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09BZ2Hfxzn4j; Tue, 3 Oct 2023 07:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937ucUA035721; Tue, 3 Oct 2023 07:56:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937uc3V035718; Tue, 3 Oct 2023 07:56:38 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:38 GMT Message-Id: <202310030756.3937uc3V035718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 918a10c9f792 - main - iicbus: conf: Fix pcf8574 entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 918a10c9f792d2c2f78b75626f7bf2abc85a0fff Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=918a10c9f792d2c2f78b75626f7bf2abc85a0fff commit 918a10c9f792d2c2f78b75626f7bf2abc85a0fff Author: Emmanuel Vadot AuthorDate: 2023-09-19 08:39:26 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:19 +0000 iicbus: conf: Fix pcf8574 entry It lives in the gpio subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41912 --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 1eb6ba4ff781..6f1718309951 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1820,7 +1820,6 @@ dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/mux/pca954x.c optional pca954x iicbus iicmux dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/ofw_iicbus_if.m optional fdt iicbus -dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/rtc/ds1307.c optional ds1307 dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/rtc/ds1672.c optional ds1672 @@ -1831,6 +1830,7 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a +dev/iicbus/gpio/pcf8574.c optional pcf8574 dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt dev/iicbus/pmic/silergy/sy8106a.c optional sy8106a fdt From nobody Tue Oct 3 07:56:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09Bb5TZtz4vwPl; Tue, 3 Oct 2023 07:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09Bb4fypz3SYc; Tue, 3 Oct 2023 07:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dLeYF0u0PboIYdO2QEYw7eStN49lME38a7/qeRlF3IM=; b=rWOReNrlDXtIXcfXBJ5KuHZCxd/XLW5lICuTZwLIA78PuxginI7jBYKwQubY4zEJMExRqY mt21FYvNafaPsX54QQa3dn4HiViH2FbYAaQNfAT7Lsi50khB2N2xO7DhZd17adEHK+NvnP xIMFBlUuKO5uQkO42Ck3lSfur335nKkwrlTdGBfo3MDfFcNzgi7TQeA+TaTgaLuFN/qZ/n JXWeX+v1SrXvB8kIY9g3wC16j3XTQd4mfsJKF35qzH9ZtItpI6QH1DD43RrDk9apHhsbbT mAIVaul52QJevoycPWki5jQ8PGmCp9jpYw1TV5VemgTAf3AEZ9qJAdTL+2WfLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319799; a=rsa-sha256; cv=none; b=ILV/p4fyb9hWVZl11gtdjx2bPFZHJ3CQp3dyUDkmHcOpp2sVCsKSVHaF+xH/JQ09D14QKV WHDBpYHB0z0G5LgUrkApY3ikvEuBhMt1ZRRu/aT6gCWbsbaWho5DG7dgZX+YYTINSXvQ+f rJlZolym9ljVMfflQMotbHmzvww/q5/fTjWWEOdK+BgNxNsQKLuoNBJ2wqg/94FFVvxK0e JNkWrLoGc5h6PJ5jRv1pdNr/6rU8wTpH16s3FuqWyfZh7hlN4Ej3eAykwy2HpttqeEWnxj +YzEMgUiW66KETnvnqEhkbmMsT+hPT6ejsL2YqN7urY0CG7l0EAkek1lXQDlyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dLeYF0u0PboIYdO2QEYw7eStN49lME38a7/qeRlF3IM=; b=gsP1/hMz0BaL+BKJUwEzX41K93bpG0MPDXiwwsL6Vo96JzLvMHbgMA8ocaVYjSI/opIQxB 8QkykiTDaEwDFCUxxn2FHZfSVGhtv0fGOoJp7r4ZOuf9RGGihY7jsrwYkiFdxghlRITtrX EVOpOCIPtvjGQTlHRrWGOzFXdQdQyqSLKeDLjPiB/5w/Jcv5tAp9GMEXwQXP1Io3xKgqNE TULIHXJH/R3ojxVdnLwNJPf1YpX9he0QnvNPa9zfcTTqH5gLjtCaXDoEyYShKMBNKi9TIj qrTyR2WyqyFZwbx2+UwQ+qKUjxbY0AnI/z3L0//H9uO+sslPr0G04CfGrTaQFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09Bb3NTszmcv; Tue, 3 Oct 2023 07:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937udAa035782; Tue, 3 Oct 2023 07:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937udPL035779; Tue, 3 Oct 2023 07:56:39 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:39 GMT Message-Id: <202310030756.3937udPL035779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 7c569caa0a6f - main - iicbus: Move i2c sensors drivers into new sensor subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074 commit 7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074 Author: Emmanuel Vadot AuthorDate: 2023-09-19 09:51:40 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:20 +0000 iicbus: Move i2c sensors drivers into new sensor subdirectory No reason that they should live directly under iicbus Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41913 --- sys/conf/files | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/dev/iicbus/{ => sensor}/ds1631.c | 0 sys/dev/iicbus/{ => sensor}/ds1775.c | 0 sys/dev/iicbus/{ => sensor}/htu21.c | 0 sys/dev/iicbus/{ => sensor}/lm75.c | 0 sys/dev/iicbus/{ => sensor}/max44009.c | 0 sys/dev/iicbus/{ => sensor}/max6690.c | 0 sys/dev/iicbus/{ => sensor}/tmp461.c | 0 sys/modules/i2c/htu21/Makefile | 2 +- sys/modules/i2c/max44009/Makefile | 2 +- sys/modules/i2c/tmp461/Makefile | 2 +- 12 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 6f1718309951..36ba432cc93e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1792,7 +1792,6 @@ dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/acpi_iicbus.c optional acpi iicbus | acpi compat_linuxkpi -dev/iicbus/htu21.c optional htu21 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic @@ -1808,8 +1807,6 @@ dev/iicbus/iicsmb.c optional iicsmb \ dev/iicbus/iicoc.c optional iicoc dev/iicbus/iicoc_fdt.c optional iicoc fdt dev/iicbus/iicoc_pci.c optional iicoc pci -dev/iicbus/lm75.c optional lm75 -dev/iicbus/max44009.c optional max44009 dev/iicbus/adc/ad7418.c optional ad7418 dev/iicbus/adc/ads111x.c optional ads111x dev/iicbus/adc/pcf8591.c optional pcf8591 @@ -1830,6 +1827,9 @@ dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a +dev/iicbus/sensor/htu21.c optional htu21 +dev/iicbus/sensor/lm75.c optional lm75 +dev/iicbus/sensor/max44009.c optional max44009 dev/iicbus/gpio/pcf8574.c optional pcf8574 dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 76a0f4d707f3..0293efd28fbe 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -40,14 +40,14 @@ dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_power8.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc -dev/iicbus/ds1631.c optional ds1631 powermac -dev/iicbus/ds1775.c optional ds1775 powermac -dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/adc/ad7417.c optional ad7417 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/iicbus/ofw_iicbus_if.m optional iicbus aim dev/iicbus/pwm/adm1030.c optional powermac windtunnel | adm1030 powermac dev/iicbus/pwm/adt746x.c optional adt746x powermac +dev/iicbus/sensor/ds1631.c optional ds1631 powermac +dev/iicbus/sensor/ds1775.c optional ds1775 powermac +dev/iicbus/sensor/max6690.c optional max6690 powermac dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_opal.c optional powernv ipmi dev/ice/if_ice_iflib.c optional ice pci powerpc64 | ice pci powerpc64le \ diff --git a/sys/dev/iicbus/ds1631.c b/sys/dev/iicbus/sensor/ds1631.c similarity index 100% rename from sys/dev/iicbus/ds1631.c rename to sys/dev/iicbus/sensor/ds1631.c diff --git a/sys/dev/iicbus/ds1775.c b/sys/dev/iicbus/sensor/ds1775.c similarity index 100% rename from sys/dev/iicbus/ds1775.c rename to sys/dev/iicbus/sensor/ds1775.c diff --git a/sys/dev/iicbus/htu21.c b/sys/dev/iicbus/sensor/htu21.c similarity index 100% rename from sys/dev/iicbus/htu21.c rename to sys/dev/iicbus/sensor/htu21.c diff --git a/sys/dev/iicbus/lm75.c b/sys/dev/iicbus/sensor/lm75.c similarity index 100% rename from sys/dev/iicbus/lm75.c rename to sys/dev/iicbus/sensor/lm75.c diff --git a/sys/dev/iicbus/max44009.c b/sys/dev/iicbus/sensor/max44009.c similarity index 100% rename from sys/dev/iicbus/max44009.c rename to sys/dev/iicbus/sensor/max44009.c diff --git a/sys/dev/iicbus/max6690.c b/sys/dev/iicbus/sensor/max6690.c similarity index 100% rename from sys/dev/iicbus/max6690.c rename to sys/dev/iicbus/sensor/max6690.c diff --git a/sys/dev/iicbus/tmp461.c b/sys/dev/iicbus/sensor/tmp461.c similarity index 100% rename from sys/dev/iicbus/tmp461.c rename to sys/dev/iicbus/sensor/tmp461.c diff --git a/sys/modules/i2c/htu21/Makefile b/sys/modules/i2c/htu21/Makefile index a7108d62fd0b..e049139c20cf 100644 --- a/sys/modules/i2c/htu21/Makefile +++ b/sys/modules/i2c/htu21/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= htu21 SRCS= htu21.c diff --git a/sys/modules/i2c/max44009/Makefile b/sys/modules/i2c/max44009/Makefile index 42c96bbbf883..c4342b5819aa 100644 --- a/sys/modules/i2c/max44009/Makefile +++ b/sys/modules/i2c/max44009/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= max44009 SRCS= max44009.c diff --git a/sys/modules/i2c/tmp461/Makefile b/sys/modules/i2c/tmp461/Makefile index 4cd5be59fd18..9c4d6518d596 100644 --- a/sys/modules/i2c/tmp461/Makefile +++ b/sys/modules/i2c/tmp461/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD = tmp461 SRCS = tmp461.c bus_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h From nobody Tue Oct 3 07:56:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09Bc6GBcz4vwVT; Tue, 3 Oct 2023 07:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09Bc5Rwfz3Sf1; Tue, 3 Oct 2023 07:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAP96XLEzUZXBsOaFORxEDf3h+Mm5p9hplkC2Zf5hzA=; b=g+8Qz26T6biQayv5C+j3NrR6RJbRXwI8ZHxd0W8ap9fOdvTeX1oNYZCjzZJhBwkktFofHD dTMN+1CBg7opEsBbSPXyrpF22sn3bRWEUPYWq8lf2G+oVEZtzTgGCiAXCwLKI88YVxim2a wGckAoRhEiKcAtvWVO+MwdgTkQc0g1Ka3dYAuYu5WOcqhyzai6Zn7thS0pi09m141l+rH2 p1WAfg8H1M6zHphmqTqWEQ2sBrk8jcTqFgXyo0pawzPSpeKjcJ9mdPXbWKnibmUdOmc2KY ocrw1ec5gW2Pauy/3lwhSKsKzhR0e6KA0Hv3lh9nYDMSmraHNAmSpNOcgVlV1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319800; a=rsa-sha256; cv=none; b=L7ZqKeRj7cWidrGuU+Hk6fZpsK+renmUE6fmbLHyisfP4L5/spE/vjj8i/EtaHjxjxiIWn pr76fGAA8cUh33BUouDjL24irGSACYKTcGmiujIcoyymb2X6OrGmG2+YjI0tnAhU0yZOkz CETBu/6XuzVFmwt6qO38JcePaogamhIYymNWU4qhSdGo1/rpjBEt07VQaDknpmt31FX6Yl 7B3Nen3zMKf4/RBvTcOT/0NBRqOvF2NUlQkflMwT53qgGijMNJQvrT+haek87uOc+OTc0G KBMOPh2gd4azrkkBv6je1WqP9sXy0vHGCssk+yBJiCKg4dI/fnkptSBusxskhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAP96XLEzUZXBsOaFORxEDf3h+Mm5p9hplkC2Zf5hzA=; b=HQ+jAoN2Qwk/r4QcQgWqlYP0xoLbEY6S0Tt7fQC+KCqgT2c5sX/hgM1d/T3p67Or26N5Wa CfzYcMKUtUTwlGa1xk2NhPDJxpibt6tEkLej3CELGPt3vL1wpI0vF3XQc2Az0enZgQELxc F5/MmWfBOg4S9vbU3v4KUCcIhBmQbAktNqdFjkxGqonFXjWRjQ7cWDJrRzjDShx7Sv13xg JeX6Yi5uecAN3w5+/aWrXELU/Mdq19YzxtsVA0hVThkHYw9LaSe9GVxDceFsrsn3g13x2R eqocSBKtYjcgkMUIKHcRPBtgWOep23Nispd0zgyy8bPADcYTevXlS4BM1LWGaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09Bc4BkVzmtc; Tue, 3 Oct 2023 07:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937uehh035840; Tue, 3 Oct 2023 07:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937ueRv035837; Tue, 3 Oct 2023 07:56:40 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:40 GMT Message-Id: <202310030756.3937ueRv035837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 125f5c5b48b1 - main - iicbus: Move opencores i2c driver into controller subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 125f5c5b48b1fdccf364b821ce48bfdbd9687ed1 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=125f5c5b48b1fdccf364b821ce48bfdbd9687ed1 commit 125f5c5b48b1fdccf364b821ce48bfdbd9687ed1 Author: Emmanuel Vadot AuthorDate: 2023-09-19 10:06:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:20 +0000 iicbus: Move opencores i2c driver into controller subdirectory Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41914 --- sys/conf/files | 6 +++--- sys/dev/iicbus/{ => controller/opencores}/iicoc.c | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc.h | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc_fdt.c | 0 sys/dev/iicbus/{ => controller/opencores}/iicoc_pci.c | 0 sys/modules/i2c/controllers/iicoc/Makefile | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 36ba432cc93e..7701efbaac25 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1804,12 +1804,12 @@ dev/iicbus/iichid.c optional iichid acpi hid iicbus dev/iicbus/iiconf.c optional iicbus | compat_linuxkpi dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" -dev/iicbus/iicoc.c optional iicoc -dev/iicbus/iicoc_fdt.c optional iicoc fdt -dev/iicbus/iicoc_pci.c optional iicoc pci dev/iicbus/adc/ad7418.c optional ad7418 dev/iicbus/adc/ads111x.c optional ads111x dev/iicbus/adc/pcf8591.c optional pcf8591 +dev/iicbus/controller/opencores/iicoc.c optional iicoc +dev/iicbus/controller/opencores/iicoc_fdt.c optional iicoc fdt +dev/iicbus/controller/opencores/iicoc_pci.c optional iicoc pci dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt diff --git a/sys/dev/iicbus/iicoc.c b/sys/dev/iicbus/controller/opencores/iicoc.c similarity index 100% rename from sys/dev/iicbus/iicoc.c rename to sys/dev/iicbus/controller/opencores/iicoc.c diff --git a/sys/dev/iicbus/iicoc.h b/sys/dev/iicbus/controller/opencores/iicoc.h similarity index 100% rename from sys/dev/iicbus/iicoc.h rename to sys/dev/iicbus/controller/opencores/iicoc.h diff --git a/sys/dev/iicbus/iicoc_fdt.c b/sys/dev/iicbus/controller/opencores/iicoc_fdt.c similarity index 100% rename from sys/dev/iicbus/iicoc_fdt.c rename to sys/dev/iicbus/controller/opencores/iicoc_fdt.c diff --git a/sys/dev/iicbus/iicoc_pci.c b/sys/dev/iicbus/controller/opencores/iicoc_pci.c similarity index 100% rename from sys/dev/iicbus/iicoc_pci.c rename to sys/dev/iicbus/controller/opencores/iicoc_pci.c diff --git a/sys/modules/i2c/controllers/iicoc/Makefile b/sys/modules/i2c/controllers/iicoc/Makefile index f6902f1f864a..f86a6513ad22 100644 --- a/sys/modules/i2c/controllers/iicoc/Makefile +++ b/sys/modules/i2c/controllers/iicoc/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/dev/iicbus +.PATH: ${SRCTOP}/sys/dev/iicbus/controller/opencores KMOD = iicoc SRCS = device_if.h bus_if.h iicbus_if.h \ From nobody Tue Oct 3 07:56:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09Bd6PYwz4vwSp; Tue, 3 Oct 2023 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09Bd65GHz3Snh; Tue, 3 Oct 2023 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B68nzKSTXApJ13p8kKqQ91mhgzeKi3kC3o5KHMaf8y4=; b=dXPauK5CQTGqpSRVK9dj6FJMqVbDwhbsmKfAeZID1zdfvedirrAmc0GFj8cgdlgx6QCSBK PHan5SL379sS97rOmd8hKcC20K+yotTn3cpEUqb2L2PnlwI5ROnTVxxkAgnonJtKrz1yoe dB2yCwjVYWBTXOEwA0+a8B7V9P0s2b1+SdgC9RbHZDYld4luOGvszSmv2r8cMEdmVYINOk nW2bKn19t5RhHG2kLuVmYjzHNAaNNR6h1cK5eLgzwNx9LqJKVaMCKrR7TkauGBySBjSC+/ R1xD41Lfs+D79xjRFTpmdQXqnlzWW2tJGVR4w0L/eNx4jlCxQGbmkv+kyx1xBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319801; a=rsa-sha256; cv=none; b=Wh7s+sZ+H2dfVfzH/dgYCeWBpkviRAy4dlsXHz2uO/NVVJKulby+YLVb3xIWKuoz3N1QF3 IFKUR3S9jqYxeWwmb1ljxwmQtsf/xvR/KrFFTd/gyGbHEYjn+htWypcpdinsnTnZLUG+YQ jqHXi3AQRZVFvokG9ajvXjYI+5KMZe4WxLg0c/C6bvKUkxHmBeLL8zmuE2KNUe8odFD9YW KVtXbf9HDAYs+QDxmQBsC7wqCyB2+H5hIqUxYJi/71HfFzsVofL2e/hF7pp9Q4yUUb6qq/ bnEMBAR1shxpFyph6RUk08sFoTXN/0kek/KMV0o/hWAQW/2YAOAsf7RCj8M4Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B68nzKSTXApJ13p8kKqQ91mhgzeKi3kC3o5KHMaf8y4=; b=OVW30EPIIVkpevx8YdpuGlhY8iBuCYyRkdg/bpKRX6QmG77YWYn4mCnTLrInlbmRjSZv85 XF/w+/To9gOTJoh+v5XIh9cKmPvlfaHc/rzHynEcmtdY65Kslnri8jgOSpnGlRF7zvsTFy ynP/jNMFfrgDT1G19jsNLYDmHsWGGIbeupvii7gqAwVSDd1RQqWSlDb0GoereqV5XzBxJn XRvAJwZfoj0/UI5tOwRVSPUH719afZzijowc3Oba795ubL5Jn+XLK0Xu5HoBagikZP++U2 Nq/InAr+2J6Amjtvll8ycp/JTOs8DRPn2WSsy7uOckM/CdRhOFr5Kds2zcjiGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09Bd5Brczmfr; Tue, 3 Oct 2023 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937ufY0035882; Tue, 3 Oct 2023 07:56:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937ufvh035879; Tue, 3 Oct 2023 07:56:41 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:41 GMT Message-Id: <202310030756.3937ufvh035879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 137b58e4d204 - main - i2c: Add cadence iic driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 137b58e4d2044adc200d13c8989d3746a0a4bd7f Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=137b58e4d2044adc200d13c8989d3746a0a4bd7f commit 137b58e4d2044adc200d13c8989d3746a0a4bd7f Author: Emmanuel Vadot AuthorDate: 2023-09-27 05:34:38 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:20 +0000 i2c: Add cadence iic driver This IP is found in Xilinx SoC, it only been tested on ZynqMP (arm64) so only enable it there for now. Differential Revision: https://reviews.freebsd.org/D41994 --- sys/arm64/conf/std.xilinx | 3 + sys/conf/files.arm64 | 1 + sys/dev/iicbus/controller/cadence/cdnc_i2c.c | 707 +++++++++++++++++++++++++++ 3 files changed, 711 insertions(+) diff --git a/sys/arm64/conf/std.xilinx b/sys/arm64/conf/std.xilinx index cc89e8575336..50ebf5ade53b 100644 --- a/sys/arm64/conf/std.xilinx +++ b/sys/arm64/conf/std.xilinx @@ -16,4 +16,7 @@ device cgem # Cadence GEM Gigabit Ethernet device # MMC/SD/SDIO Card slot support device sdhci +# IICBUS +device cdnc_i2c + options FDT diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index d8adc54763fc..baf8734fb38f 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -696,6 +696,7 @@ arm64/rockchip/clk/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 # Xilinx arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq fdt arm/xilinx/zy7_gpio.c optional gpio soc_xilinx_zynq fdt +dev/iicbus/controller/cadence/cdnc_i2c.c optional cdnc_i2c iicbus soc_xilinx_zynq fdt dev/usb/controller/xlnx_dwc3.c optional xhci soc_xilinx_zynq fdt dev/firmware/xilinx/zynqmp_firmware.c optional fdt soc_xilinx_zynq dev/firmware/xilinx/zynqmp_firmware_if.m optional fdt soc_xilinx_zynq diff --git a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c new file mode 100644 index 000000000000..dd525071caa2 --- /dev/null +++ b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c @@ -0,0 +1,707 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019-2020 Thomas Skibo + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Cadence / Zynq i2c driver. + * + * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual. + * (v1.12.2) July 1, 2018. Xilinx doc UG585. I2C Controller is documented + * in Chapter 20. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "iicbus_if.h" + +#ifdef I2CDEBUG +#define DPRINTF(...) do { printf(__VA_ARGS__); } while (0) +#else +#define DPRINTF(...) do { } while (0) +#endif + +#if 0 +#define HWTYPE_CDNS_R1P10 1 +#endif +#define HWTYPE_CDNS_R1P14 2 + +static struct ofw_compat_data compat_data[] = { +#if 0 + {"cdns,i2c-r1p10", HWTYPE_CDNS_R1P10}, +#endif + {"cdns,i2c-r1p14", HWTYPE_CDNS_R1P14}, + {NULL, 0} +}; + +struct cdnc_i2c_softc { + device_t dev; + device_t iicbus; + struct mtx sc_mtx; + struct resource *mem_res; + struct resource *irq_res; + void *intrhandle; + + uint16_t cfg_reg_shadow; + uint16_t istat; + clk_t ref_clk; + uint32_t ref_clock_freq; + uint32_t i2c_clock_freq; + + int hwtype; + int hold; + + /* sysctls */ + unsigned int i2c_clk_real_freq; + unsigned int interrupts; + unsigned int timeout_ints; +}; + +#define I2C_SC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define I2C_SC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define I2C_SC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), NULL, MTX_DEF) +#define I2C_SC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define I2C_SC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) + +#define RD2(sc, off) (bus_read_2((sc)->mem_res, (off))) +#define WR2(sc, off, val) (bus_write_2((sc)->mem_res, (off), (val))) +#define RD1(sc, off) (bus_read_1((sc)->mem_res, (off))) +#define WR1(sc, off, val) (bus_write_1((sc)->mem_res, (off), (val))) + +/* Cadence I2C controller device registers. */ +#define CDNC_I2C_CR 0x0000 /* Config register. */ +#define CDNC_I2C_CR_DIV_A_MASK (3 << 14) +#define CDNC_I2C_CR_DIV_A_SHIFT 14 +#define CDNC_I2C_CR_DIV_A(a) ((a) << 14) +#define CDNC_I2C_CR_DIV_A_MAX 3 +#define CDNC_I2C_CR_DIV_B_MASK (0x3f << 8) +#define CDNC_I2C_CR_DIV_B_SHIFT 8 +#define CDNC_I2C_CR_DIV_B(b) ((b) << 8) +#define CDNC_I2C_CR_DIV_B_MAX 63 +#define CDNC_I2C_CR_CLR_FIFO (1 << 6) +#define CDNC_I2C_CR_SLVMON_MODE (1 << 5) +#define CDNC_I2C_CR_HOLD (1 << 4) +#define CDNC_I2C_CR_ACKEN (1 << 3) +#define CDNC_I2C_CR_NEA (1 << 2) +#define CDNC_I2C_CR_MAST (1 << 1) +#define CDNC_I2C_CR_RNW (1 << 0) + +#define CDNC_I2C_SR 0x0004 /* Status register. */ +#define CDNC_I2C_SR_BUS_ACTIVE (1 << 8) +#define CDNC_I2C_SR_RX_OVF (1 << 7) +#define CDNC_I2C_SR_TX_VALID (1 << 6) +#define CDNC_I2C_SR_RX_VALID (1 << 5) +#define CDNC_I2C_SR_RXRW (1 << 3) + +#define CDNC_I2C_ADDR 0x0008 /* i2c address register. */ +#define CDNC_I2C_DATA 0x000C /* i2c data register. */ + +#define CDNC_I2C_ISR 0x0010 /* Int status register. */ +#define CDNC_I2C_ISR_ARB_LOST (1 << 9) +#define CDNC_I2C_ISR_RX_UNDF (1 << 7) +#define CDNC_I2C_ISR_TX_OVF (1 << 6) +#define CDNC_I2C_ISR_RX_OVF (1 << 5) +#define CDNC_I2C_ISR_SLV_RDY (1 << 4) +#define CDNC_I2C_ISR_XFER_TMOUT (1 << 3) +#define CDNC_I2C_ISR_XFER_NACK (1 << 2) +#define CDNC_I2C_ISR_XFER_DATA (1 << 1) +#define CDNC_I2C_ISR_XFER_DONE (1 << 0) +#define CDNC_I2C_ISR_ALL 0x2ff +#define CDNC_I2C_TRANS_SIZE 0x0014 /* Transfer size. */ +#define CDNC_I2C_PAUSE 0x0018 /* Slv Monitor Pause reg. */ +#define CDNC_I2C_TIME_OUT 0x001C /* Time-out register. */ +#define CDNC_I2C_TIME_OUT_MIN 31 +#define CDNC_I2C_TIME_OUT_MAX 255 +#define CDNC_I2C_IMR 0x0020 /* Int mask register. */ +#define CDNC_I2C_IER 0x0024 /* Int enable register. */ +#define CDNC_I2C_IDR 0x0028 /* Int disable register. */ + +#define CDNC_I2C_FIFO_SIZE 16 +#define CDNC_I2C_DEFAULT_I2C_CLOCK 400000 /* 400Khz default */ + +#define CDNC_I2C_ISR_ERRS (CDNC_I2C_ISR_ARB_LOST | CDNC_I2C_ISR_RX_UNDF | \ + CDNC_I2C_ISR_TX_OVF | CDNC_I2C_ISR_RX_OVF | CDNC_I2C_ISR_XFER_TMOUT | \ + CDNC_I2C_ISR_XFER_NACK) + +/* Configure clock dividers. */ +static int +cdnc_i2c_set_freq(struct cdnc_i2c_softc *sc) +{ + uint32_t div_a, div_b, err, clk_out; + uint32_t best_div_a, best_div_b, best_err; + + best_div_a = 0; + best_div_b = 0; + best_err = ~0U; + + /* + * The i2c controller has a two-stage clock divider to create + * the "clock enable" signal used to sample the incoming SCL and + * SDA signals. The Clock Enable signal is divided by 22 to create + * the outgoing SCL signal. + * + * Try all div_a values and pick best match. + */ + for (div_a = 0; div_a <= CDNC_I2C_CR_DIV_A_MAX; div_a++) { + div_b = sc->ref_clock_freq / (22 * sc->i2c_clock_freq * + (div_a + 1)); + if (div_b > CDNC_I2C_CR_DIV_B_MAX) + continue; + clk_out = sc->ref_clock_freq / (22 * (div_a + 1) * + (div_b + 1)); + err = clk_out > sc->i2c_clock_freq ? + clk_out - sc->i2c_clock_freq : + sc->i2c_clock_freq - clk_out; + if (err < best_err) { + best_err = err; + best_div_a = div_a; + best_div_b = div_b; + } + } + + if (best_err == ~0U) { + device_printf(sc->dev, "cannot configure clock divider.\n"); + return (EINVAL); /* out of range */ + } + + clk_out = sc->ref_clock_freq / (22 * (best_div_a + 1) * + (best_div_b + 1)); + + DPRINTF("%s: ref_clock_freq=%d i2c_clock_freq=%d\n", __func__, + sc->ref_clock_freq, sc->i2c_clock_freq); + DPRINTF("%s: div_a=%d div_b=%d real-freq=%d\n", __func__, best_div_a, + best_div_b, clk_out); + + sc->cfg_reg_shadow &= ~(CDNC_I2C_CR_DIV_A_MASK | + CDNC_I2C_CR_DIV_B_MASK); + sc->cfg_reg_shadow |= CDNC_I2C_CR_DIV_A(best_div_a) | + CDNC_I2C_CR_DIV_B(best_div_b); + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + + sc->i2c_clk_real_freq = clk_out; + + return (0); +} + +/* Initialize hardware. */ +static int +cdnc_i2c_init_hw(struct cdnc_i2c_softc *sc) +{ + + /* Reset config register and clear FIFO. */ + sc->cfg_reg_shadow = 0; + WR2(sc, CDNC_I2C_CR, CDNC_I2C_CR_CLR_FIFO); + sc->hold = 0; + + /* Clear and disable all interrupts. */ + WR2(sc, CDNC_I2C_ISR, CDNC_I2C_ISR_ALL); + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_ALL); + + /* Max out bogus time-out register. */ + WR1(sc, CDNC_I2C_TIME_OUT, CDNC_I2C_TIME_OUT_MAX); + + /* Set up clock dividers. */ + return (cdnc_i2c_set_freq(sc)); +} + +static int +cdnc_i2c_errs(struct cdnc_i2c_softc *sc, uint16_t istat) +{ + + DPRINTF("%s: istat=0x%x\n", __func__, istat); + + /* XXX: clean up after errors. */ + + /* Reset config register and clear FIFO. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 0; + + if (istat & CDNC_I2C_ISR_XFER_TMOUT) + return (IIC_ETIMEOUT); + else if (istat & CDNC_I2C_ISR_RX_UNDF) + return (IIC_EUNDERFLOW); + else if (istat & (CDNC_I2C_ISR_RX_OVF | CDNC_I2C_ISR_TX_OVF)) + return (IIC_EOVERFLOW); + else if (istat & CDNC_I2C_ISR_XFER_NACK) + return (IIC_ENOACK); + else if (istat & CDNC_I2C_ISR_ARB_LOST) + return (IIC_EBUSERR); /* XXX: ???? */ + else + /* Should not happen */ + return (IIC_NOERR); +} + +static int +cdnc_i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + int error; + + DPRINTF("%s: speed=%d addr=0x%x\n", __func__, speed, addr); + + I2C_SC_LOCK(sc); + + sc->i2c_clock_freq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); + + error = cdnc_i2c_init_hw(sc); + + I2C_SC_UNLOCK(sc); + + return (error ? IIC_ENOTSUPP : IIC_NOERR); +} + +static void +cdnc_i2c_intr(void *arg) +{ + struct cdnc_i2c_softc *sc = (struct cdnc_i2c_softc *)arg; + uint16_t status; + + I2C_SC_LOCK(sc); + + sc->interrupts++; + + /* Read active interrupts. */ + status = RD2(sc, CDNC_I2C_ISR) & ~RD2(sc, CDNC_I2C_IMR); + + /* Clear interrupts. */ + WR2(sc, CDNC_I2C_ISR, status); + + if (status & CDNC_I2C_ISR_XFER_TMOUT) + sc->timeout_ints++; + + sc->istat |= status; + + if (status) + wakeup(sc); + + I2C_SC_UNLOCK(sc); +} + +static int +cdnc_i2c_xfer_rd(struct cdnc_i2c_softc *sc, struct iic_msg *msg) +{ + int error = IIC_NOERR; + uint16_t flags = msg->flags; + uint16_t len = msg->len; + int idx = 0, nbytes, last, first = 1; + uint16_t statr; + + DPRINTF("%s: flags=0x%x len=%d\n", __func__, flags, len); + +#if 0 + if (sc->hwtype == HWTYPE_CDNS_R1P10 && (flags & IIC_M_NOSTOP)) + return (IIC_ENOTSUPP); +#endif + + I2C_SC_ASSERT_LOCKED(sc); + + /* Program config register. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + sc->cfg_reg_shadow |= CDNC_I2C_CR_HOLD | CDNC_I2C_CR_ACKEN | + CDNC_I2C_CR_NEA | CDNC_I2C_CR_MAST | CDNC_I2C_CR_RNW; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 1; + + while (len > 0) { + nbytes = MIN(CDNC_I2C_FIFO_SIZE - 2, len); + WR1(sc, CDNC_I2C_TRANS_SIZE, nbytes); + + last = nbytes == len && !(flags & IIC_M_NOSTOP); + if (last) { + /* Clear HOLD bit on last transfer. */ + sc->cfg_reg_shadow &= ~CDNC_I2C_CR_HOLD; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + sc->hold = 0; + } + + /* Writing slv address for a start or repeated start. */ + if (first && !(flags & IIC_M_NOSTART)) + WR2(sc, CDNC_I2C_ADDR, msg->slave >> 1); + first = 0; + + /* Enable FIFO interrupts and wait. */ + if (last) + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + else + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DATA | + CDNC_I2C_ISR_ERRS); + + error = mtx_sleep(sc, &sc->sc_mtx, 0, "cdi2c", hz); + + /* Disable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_XFER_DATA | + CDNC_I2C_ISR_XFER_DONE | CDNC_I2C_ISR_ERRS); + + if (error == EWOULDBLOCK) + error = cdnc_i2c_errs(sc, CDNC_I2C_ISR_XFER_TMOUT); + else if (sc->istat & CDNC_I2C_ISR_ERRS) + error = cdnc_i2c_errs(sc, sc->istat); + sc->istat = 0; + + if (error != IIC_NOERR) + break; + + /* Read nbytes from FIFO. */ + while (nbytes-- > 0) { + statr = RD2(sc, CDNC_I2C_SR); + if (!(statr & CDNC_I2C_SR_RX_VALID)) { + printf("%s: RX FIFO underflow?\n", __func__); + break; + } + msg->buf[idx++] = RD2(sc, CDNC_I2C_DATA); + len--; + } + } + + return (error); +} + +static int +cdnc_i2c_xfer_wr(struct cdnc_i2c_softc *sc, struct iic_msg *msg) +{ + int error = IIC_NOERR; + uint16_t flags = msg->flags; + uint16_t len = msg->len; + int idx = 0, nbytes, last, first = 1; + + DPRINTF("%s: flags=0x%x len=%d\n", __func__, flags, len); + + I2C_SC_ASSERT_LOCKED(sc); + + /* Program config register. */ + sc->cfg_reg_shadow &= CDNC_I2C_CR_DIV_A_MASK | CDNC_I2C_CR_DIV_B_MASK; + sc->cfg_reg_shadow |= CDNC_I2C_CR_HOLD | CDNC_I2C_CR_ACKEN | + CDNC_I2C_CR_NEA | CDNC_I2C_CR_MAST; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow | CDNC_I2C_CR_CLR_FIFO); + sc->hold = 1; + + while (len > 0) { + /* Put as much data into fifo as you can. */ + nbytes = MIN(len, CDNC_I2C_FIFO_SIZE - + RD1(sc, CDNC_I2C_TRANS_SIZE) - 1); + len -= nbytes; + while (nbytes-- > 0) + WR2(sc, CDNC_I2C_DATA, msg->buf[idx++]); + + last = len == 0 && !(flags & IIC_M_NOSTOP); + if (last) { + /* Clear HOLD bit on last transfer. */ + sc->cfg_reg_shadow &= ~CDNC_I2C_CR_HOLD; + WR2(sc, CDNC_I2C_CR, sc->cfg_reg_shadow); + sc->hold = 0; + } + + /* Perform START if this is start or repeated start. */ + if (first && !(flags & IIC_M_NOSTART)) + WR2(sc, CDNC_I2C_ADDR, msg->slave >> 1); + first = 0; + + /* Enable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IER, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + + /* Wait for end of data transfer. */ + error = mtx_sleep(sc, &sc->sc_mtx, 0, "cdi2c", hz); + + /* Disable FIFO interrupts. */ + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_XFER_DONE | + CDNC_I2C_ISR_ERRS); + + if (error == EWOULDBLOCK) + error = cdnc_i2c_errs(sc, CDNC_I2C_ISR_XFER_TMOUT); + else if (sc->istat & CDNC_I2C_ISR_ERRS) + error = cdnc_i2c_errs(sc, sc->istat); + sc->istat = 0; + if (error) + break; + } + + return (error); +} + +static int +cdnc_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + int i, error = IIC_NOERR; + + DPRINTF("%s: nmsgs=%d\n", __func__, nmsgs); + + I2C_SC_LOCK(sc); + + for (i = 0; i < nmsgs; i++) { + DPRINTF("%s: msg[%d]: hold=%d slv=0x%x flags=0x%x len=%d\n", + __func__, i, sc->hold, msgs[i].slave, msgs[i].flags, + msgs[i].len); + + if (!sc->hold && (msgs[i].flags & IIC_M_NOSTART)) + return (IIC_ENOTSUPP); + + if (msgs[i].flags & IIC_M_RD) { + error = cdnc_i2c_xfer_rd(sc, &msgs[i]); + if (error != IIC_NOERR) + break; + } else { + error = cdnc_i2c_xfer_wr(sc, &msgs[i]); + if (error != IIC_NOERR) + break; + } + } + + I2C_SC_UNLOCK(sc); + + return (error); +} + +static void +cdnc_i2c_add_sysctls(device_t dev) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child; + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "i2c_clk_real_freq", CTLFLAG_RD, + &sc->i2c_clk_real_freq, 0, "i2c clock real frequency"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_interrupts", CTLFLAG_RD, + &sc->interrupts, 0, "interrupt calls"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_timeouts", CTLFLAG_RD, + &sc->timeout_ints, 0, "hardware timeout interrupts"); +} + + +static int +cdnc_i2c_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Cadence I2C Controller"); + + return (BUS_PROBE_DEFAULT); +} + + +static int cdnc_i2c_detach(device_t); + +static int +cdnc_i2c_attach(device_t dev) +{ + struct cdnc_i2c_softc *sc; + int rid, err; + phandle_t node; + pcell_t cell; + uint64_t freq; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + + I2C_SC_LOCK_INIT(sc); + + /* Get ref-clock and i2c-clock properties. */ + node = ofw_bus_get_node(dev); + if (OF_getprop(node, "ref-clock", &cell, sizeof(cell)) > 0) + sc->ref_clock_freq = fdt32_to_cpu(cell); + else if (clk_get_by_ofw_index(dev, node, 0, &sc->ref_clk) == 0) { + if ((err = clk_enable(sc->ref_clk)) != 0) + device_printf(dev, "Cannot enable clock. err=%d\n", + err); + else if ((err = clk_get_freq(sc->ref_clk, &freq)) != 0) + device_printf(dev, + "Cannot get clock frequency. err=%d\n", err); + else + sc->ref_clock_freq = freq; + } + else { + device_printf(dev, "must have ref-clock property\n"); + return (ENXIO); + } + if (OF_getprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) + sc->i2c_clock_freq = fdt32_to_cpu(cell); + else + sc->i2c_clock_freq = CDNC_I2C_DEFAULT_I2C_CLOCK; + + /* Get memory resource. */ + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "could not allocate memory resources.\n"); + cdnc_i2c_detach(dev); + return (ENOMEM); + } + + /* Allocate IRQ. */ + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "could not allocate IRQ resource.\n"); + cdnc_i2c_detach(dev); + return (ENOMEM); + } + + /* Activate the interrupt. */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, cdnc_i2c_intr, sc, &sc->intrhandle); + if (err) { + device_printf(dev, "could not setup IRQ.\n"); + cdnc_i2c_detach(dev); + return (err); + } + + /* Configure the device. */ + err = cdnc_i2c_init_hw(sc); + if (err) { + cdnc_i2c_detach(dev); + return (err); + } + + sc->iicbus = device_add_child(dev, "iicbus", -1); + + cdnc_i2c_add_sysctls(dev); + + /* Probe and attach iicbus when interrupts work. */ + return (bus_delayed_attach_children(dev)); +} + +static int +cdnc_i2c_detach(device_t dev) +{ + struct cdnc_i2c_softc *sc = device_get_softc(dev); + + if (device_is_attached(dev)) + bus_generic_detach(dev); + + if (sc->ref_clk != NULL) { + clk_release(sc->ref_clk); + sc->ref_clk = NULL; + } + + /* Delete iic bus. */ + if (sc->iicbus) + device_delete_child(dev, sc->iicbus); + + /* Disable hardware. */ + if (sc->mem_res != NULL) { + sc->cfg_reg_shadow = 0; + WR2(sc, CDNC_I2C_CR, CDNC_I2C_CR_CLR_FIFO); + + /* Clear and disable all interrupts. */ + WR2(sc, CDNC_I2C_ISR, CDNC_I2C_ISR_ALL); + WR2(sc, CDNC_I2C_IDR, CDNC_I2C_ISR_ALL); + } + + /* Teardown and release interrupt. */ + if (sc->irq_res != NULL) { + if (sc->intrhandle) + bus_teardown_intr(dev, sc->irq_res, sc->intrhandle); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->irq_res), sc->irq_res); + sc->irq_res = NULL; + } + + /* Release memory resource. */ + if (sc->mem_res != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + sc->mem_res = NULL; + } + + I2C_SC_LOCK_DESTROY(sc); + + return (0); +} + + +static phandle_t +cdnc_i2c_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + +static device_method_t cdnc_i2c_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, cdnc_i2c_probe), + DEVMETHOD(device_attach, cdnc_i2c_attach), + DEVMETHOD(device_detach, cdnc_i2c_detach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, cdnc_i2c_get_node), + + /* iicbus methods */ + DEVMETHOD(iicbus_callback, iicbus_null_callback), + DEVMETHOD(iicbus_reset, cdnc_i2c_reset), + DEVMETHOD(iicbus_transfer, cdnc_i2c_transfer), + + DEVMETHOD_END +}; + +static driver_t cdnc_i2c_driver = { + "cdnc_i2c", + cdnc_i2c_methods, + sizeof(struct cdnc_i2c_softc), +}; + +DRIVER_MODULE(cdnc_i2c, simplebus, cdnc_i2c_driver, NULL, NULL); +DRIVER_MODULE(ofw_iicbus, cdnc_i2c, ofw_iicbus_driver, NULL, NULL); +MODULE_DEPEND(cdnc_i2c, iicbus, 1, 1, 1); +MODULE_DEPEND(cdnc_i2c, ofw_iicbus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); From nobody Tue Oct 3 07:56:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09Bg0nTcz4vwY0; Tue, 3 Oct 2023 07:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09Bf6dHZz3Snt; Tue, 3 Oct 2023 07:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i/tRPd02dgEIVtssDy/s3l6tcRW2zQfdtRGDIU+YdbM=; b=n1ss1dINS2vHG1/+S1Wt7VWpebkFAKWGNRT9LasDCffgFfFU3SoBRYA1esFmLevrmdxWb8 CfahC+okp4eMKvOFKVrhj+BH9GXdMpbweVVdO3aaef0II2tUlQZidFIDi1pFkArxvZot+4 P1NY2qIlg6duDJgooS7Sa8CqHp88/1ZUPmzxeDPP3ojeKTW21fS+TRq7TlZBxeX+fAVNdO o8zyAQ3qytT8MQXUIhjd+YwypQuJeL/U3iuKId/GMU9zK4jzOdm2EBKz2y1DcoJOeUfb/r xtaht33Hf2FsjLTHR75LNtiTXZdlICreeg5AyQtDvYgLmtY/m5w40Pf3U9xHBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696319802; a=rsa-sha256; cv=none; b=X6T1v0sW5soMeEXZ63YtCUANe4K0xJtcEvyx1PgaGNMZJ6mg+D+xsBeQoz1FfGo49NVdh5 U0b+jH6LjwJmQS5fbigZxF8YA++/fRPlWOjNKvg+a3PI1/q3P3VHwt2Fk86eiAPSbvsTWi UtWKscDzlYFSFDSF0UjvPxnIdsx4Y/pJ4EQW8Jy6mXsdiC93+sZpmyhB3uLRaP6I6C+G38 nwCljbBCZ8OEKkAHGn6Q/K/aL7N7SxrOlrurdMkkJLpDhitf38hd3M3FYGUsQIRX56STH8 8EQhb7gxU59aOpa8zV/vu/lBvwAfYO/DJujXbT2q94cf08zdiuMyfhCSr9XxxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696319802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i/tRPd02dgEIVtssDy/s3l6tcRW2zQfdtRGDIU+YdbM=; b=SATvkflyhDaW4NL21k3R3CEDe17n6HocU+7uWP1hjKLA2eKlekk8FzQ19vWvz9wKfHUqnM C7oUAc6MiLAopivOIPGLjNsiytS9zJ6ClZ/IzEgeXEq99LCHsTvBZAhG2v9RNwpOk386+A QRd1vbeOxsjuBMKfhSRQn2sJ7VMClV8+dlWSAWCSzZvmHXArp3ktTQjfjROATDQPzwLr07 fk/w7H1Tquzo+pvEhFJQjIRPaNyQO0JYXcJ+k3FIQpYCJYXjj/XX1JmQSJHu6x8jtCw6EJ lVryrW/++LmgAzi8nNpWPk8e6CA+sdG6clYHp/jZ1vhH6veZp04DEC0NTGNP5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09Bf5jk0zn49; Tue, 3 Oct 2023 07:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3937ugRB035929; Tue, 3 Oct 2023 07:56:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3937ugOX035926; Tue, 3 Oct 2023 07:56:42 GMT (envelope-from git) Date: Tue, 3 Oct 2023 07:56:42 GMT Message-Id: <202310030756.3937ugOX035926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1d6a6a524409 - main - i2c: Add Microcrystal RV3032 RTC driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d6a6a524409662992ca96bc91ae69b2a2a5ff35 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6a6a524409662992ca96bc91ae69b2a2a5ff35 commit 1d6a6a524409662992ca96bc91ae69b2a2a5ff35 Author: Emmanuel Vadot AuthorDate: 2023-09-27 07:58:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-03 07:56:20 +0000 i2c: Add Microcrystal RV3032 RTC driver This is a simple RTC driver for the rv3032 from Microcrystal. Just the basic functionality is implemented (no timer, alarm etc ..). Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41995 --- sys/conf/files | 1 + sys/dev/iicbus/rtc/rv3032.c | 455 ++++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 3 +- sys/modules/i2c/rv3032/Makefile | 13 ++ 4 files changed, 471 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 7701efbaac25..5d5e8f30347c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1825,6 +1825,7 @@ dev/iicbus/rtc/isl12xx.c optional isl12xx dev/iicbus/rtc/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rtc8583.c optional rtc8583 +dev/iicbus/rtc/rv3032.c optional rv3032 iicbus fdt dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/rtc/s35390a.c optional s35390a dev/iicbus/sensor/htu21.c optional htu21 diff --git a/sys/dev/iicbus/rtc/rv3032.c b/sys/dev/iicbus/rtc/rv3032.c new file mode 100644 index 000000000000..67805dcb7939 --- /dev/null +++ b/sys/dev/iicbus/rtc/rv3032.c @@ -0,0 +1,455 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "clock_if.h" +#include "iicbus_if.h" + +/* Date registers */ +#define RV3032_SECS_100TH 0x00 +#define RV3032_SECS 0x01 +#define RV3032_MINS 0x02 +#define RV3032_HOURS 0x03 +#define RV3032_WEEKDAY 0x04 +#define RV3032_DATE 0x05 +#define RV3032_MONTH 0x06 +#define RV3032_YEAR 0x07 + +/* Alarm registers */ +#define RV3032_ALARM_MINUTES 0x08 +#define RV3032_ALARM_HOURS 0x09 +#define RV3032_ALARM_DATE 0x0A + +/* Periodic countdown timer registers */ +#define RV3032_TIMER_VALUE0 0x0B +#define RV3032_TIMER_VALUE1 0x0C + +/* Status register */ +#define RV3032_STATUS 0x0D +#define RV3032_STATUS_VLF (1 << 0) /* Voltage Low Flag */ +#define RV3032_STATUS_PORF (1 << 1) /* Power On Reset Flag */ +#define RV3032_STATUS_EVF (1 << 2) /* External eVent Flag */ +#define RV3032_STATUS_AF (1 << 3) /* Alarm Flag */ +#define RV3032_STATUS_TF (1 << 4) /* periodic countdown Timer Flag */ +#define RV3032_STATUS_UF (1 << 5) /* periodic time Update Flag */ +#define RV3032_STATUS_TLF (1 << 6) /* Temperature Low Flag */ +#define RV3032_STATUS_THF (1 << 7) /* Temperature High Flag */ + +/* Temperature registers */ +#define RV3032_TEMP_LSB 0x0E +#define RV3032_TEMP_LSB_BSF (1 << 0) +#define RV3032_TEMP_LSB_CLKF (1 << 1) +#define RV3032_TEMP_LSB_EEBUSY (1 << 2) +#define RV3032_TEMP_LSB_EEF (1 << 3) +#define RV3032_TEMP_LSB_MASK (0xF0) +#define RV3032_TEMP_LSB_SHIFT 4 + +#define RV3032_TEMP_MSB 0x0F + +#define TEMP_DIV 16 +#define TEMP_C_TO_K 273 + +/* Control registers */ +#define RV3032_CTRL1 0x10 +#define RV3032_CTRL1_TD_MASK 0x3 /* Timer clock frequency */ +#define RV3032_CTRL1_TD_SHIFT 0 +#define RV3032_CTRL1_TD_4096 0 +#define RV3032_CTRL1_TD_64 1 +#define RV3032_CTRL1_TD_1 2 +#define RV3032_CTRL1_TD_1_60 3 +#define RV3032_CTRL1_EERD (1 << 2) /* EEPROM memory refresh disable bit */ +#define RV3032_CTRL1_TE (1 << 3) /* Periodic countdown timer enable bit */ +#define RV3032_CTRL1_USEL (1 << 4) /* Update interrupt select bit */ +#define RV3032_CTRL1_GP0 (1 << 5) /* General Purpose bit 0 */ + +#define RV3032_CTRL2 0x11 +#define RV3032_CTRL2_STOP (1 << 0) /* Stop bit */ +#define RV3032_CTRL2_GP1 (1 << 1) /* General Purpose bit 1 */ +#define RV3032_CTRL2_EIE (1 << 2) /* External event interrupt enable bit */ +#define RV3032_CTRL2_AIE (1 << 3) /* Alarm interrupt enable bit */ +#define RV3032_CTRL2_TIE (1 << 4) /* Periodic countdown timer interrupt enable bit */ +#define RV3032_CTRL2_UIE (1 << 5) /* Periodic time update interrupt enable bit */ +#define RV3032_CTRL2_CLKIE (1 << 6) /* Interrupt Controlled Clock Output Enable bit */ +#define RV3032_CTRL3 0x12 +#define RV3032_CTRL3_TLIE (1 << 0) /* Temperature Low Interrupt Enable bit */ +#define RV3032_CTRL3_THIE (1 << 1) /* Temperature High Interrupt Enable bit */ +#define RV3032_CTRL3_TLE (1 << 2) /* Temperature Low Enable bit */ +#define RV3032_CTRL3_THE (1 << 3) /* Temperature High Enable bit */ +#define RV3032_CTRL3_BSIE (1 << 4) /* Backup Switchover Interrupt Enable bit */ + +/* EEPROM registers */ +#define RV3032_EEPROM_ADDRESS 0x3D +#define RV3032_EEPROM_DATA 0x3E +#define RV3032_EEPROM_COMMAND 0x3F +#define RV3032_EEPROM_CMD_UPDATE 0x11 +#define RV3032_EEPROM_CMD_REFRESH 0x12 +#define RV3032_EEPROM_CMD_WRITE_ONE 0x21 +#define RV3032_EEPROM_CMD_READ_ONE 0x22 + +/* PMU register */ +#define RV3032_EEPROM_PMU 0xC0 +#define RV3032_PMU_TCM_MASK 0x3 +#define RV3032_PMU_TCM_SHIFT 0 +#define RV3032_PMU_TCM_OFF 0 +#define RV3032_PMU_TCM_175V 1 +#define RV3032_PMU_TCM_30V 2 +#define RV3032_PMU_TCM_45V 3 +#define RV3032_PMU_TCR_MASK 0x3 +#define RV3032_PMU_TCR_SHIFT 2 +#define RV3032_PMU_TCR_06K 0 +#define RV3032_PMU_TCR_2K 1 +#define RV3032_PMU_TCR_7K 2 +#define RV3032_PMU_TCR_12K 3 +#define RV3032_PMU_BSM_MASK 0x3 +#define RV3032_PMU_BSM_SHIFT 4 +#define RV3032_PMU_BSM_OFF 0 +#define RV3032_PMU_BSM_DSM 1 +#define RV3032_PMU_BSM_LSM 2 +#define RV3032_PMU_BSM_OFF2 3 +#define RV3032_PMU_NCLKE (1 << 6) + +struct rv3032_softc { + device_t dev; + device_t busdev; + struct intr_config_hook init_hook; +}; + +struct rv3032_timeregs { + uint8_t secs; + uint8_t mins; + uint8_t hours; + uint8_t weekday; + uint8_t date; + uint8_t month; + uint8_t year; +}; + +static struct ofw_compat_data compat_data[] = { + {"microcrystal,rv3032", 1}, + {NULL, 0}, +}; + +static int +rv3032_update_register(struct rv3032_softc *sc, uint8_t reg, uint8_t value, uint8_t mask) +{ + int rv; + uint8_t data; + + if ((rv = iicdev_readfrom(sc->dev, reg, &data, 1, IIC_WAIT)) != 0) + return (rv); + data &= mask; + data |= value; + if ((rv = iicdev_writeto(sc->dev, reg, &data, 1, IIC_WAIT)) != 0) + return (rv); + return (0); +} + +static int +rv3032_eeprom_wait(struct rv3032_softc *sc) +{ + int rv, timeout; + uint8_t data; + + for (timeout = 1000; timeout > 0; timeout--) { + if ((rv = iicdev_readfrom(sc->dev, RV3032_TEMP_LSB, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + if ((data & RV3032_TEMP_LSB_EEBUSY) == 0) { + break; + } + } + if (timeout == 0) { + device_printf(sc->dev, "Timeout updating the eeprom\n"); + return (ETIMEDOUT); + } + /* Wait 1ms before allowing another eeprom access */ + DELAY(1000); + + return (0); +} + +static int +rv3032_eeprom_disable(struct rv3032_softc *sc) +{ + int rv; + + if ((rv = rv3032_update_register(sc, RV3032_CTRL1, RV3032_CTRL1_EERD, ~RV3032_CTRL1_EERD)) != 0) + return (rv); + /* Wait 1ms before checking EBUSY */ + DELAY(1000); + return (rv3032_eeprom_wait(sc)); +} + +static int +rv3032_eeprom_update(struct rv3032_softc *sc) +{ + int rv; + uint8_t data; + + data = RV3032_EEPROM_CMD_UPDATE; + if ((rv = iicdev_writeto(sc->dev, RV3032_EEPROM_COMMAND, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + /* Wait 1ms before checking EBUSY */ + DELAY(1000); + return (rv3032_eeprom_wait(sc)); +} + +static int +rv3032_eeprom_enable(struct rv3032_softc *sc) +{ + int rv; + + /* Restore eeprom refresh */ + if ((rv = rv3032_update_register(sc, RV3032_CTRL1, 0, ~RV3032_CTRL1_EERD)) != 0) + return (rv); + DELAY(1000); + + return (0); +} + +static int +rv3032_update_cfg(struct rv3032_softc *sc) +{ + int rv; + + if ((rv = rv3032_eeprom_disable(sc)) != 0) + return (rv); + + /* Save configuration in eeprom and re-enable it */ + if ((rv = rv3032_eeprom_update(sc)) != 0) + return (rv); + return (rv3032_eeprom_enable(sc)); +} + +static int +rv3032_temp_read(struct rv3032_softc *sc, int *temp) +{ + int rv, temp2; + uint8_t data[2]; + + if ((rv = iicdev_readfrom(sc->dev, RV3032_TEMP_LSB, &data, sizeof(data), IIC_WAIT)) != 0) + return (rv); + + /* Wait for temp to be stable */ + *temp = (((data[0] & RV3032_TEMP_LSB_MASK) >> RV3032_TEMP_LSB_SHIFT) | + (data[1] << RV3032_TEMP_LSB_SHIFT)); + do { + temp2 = *temp; + *temp = (((data[0] & RV3032_TEMP_LSB_MASK) >> RV3032_TEMP_LSB_SHIFT) | + (data[1] << RV3032_TEMP_LSB_SHIFT)); + } while (temp2 != *temp); + *temp = (*temp / TEMP_DIV) + TEMP_C_TO_K; + return (0); +} + +static int +rv3032_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + int error, temp; + struct rv3032_softc *sc; + + sc = (struct rv3032_softc *)arg1; + if (rv3032_temp_read(sc, &temp) != 0) + return (EIO); + error = sysctl_handle_int(oidp, &temp, 0, req); + + return (error); +} + +static void +rv3032_init(void *arg) +{ + struct rv3032_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; + int rv; + + sc = (struct rv3032_softc*)arg; + config_intrhook_disestablish(&sc->init_hook); + + /* Set direct switching mode */ + rv3032_update_register(sc, + RV3032_EEPROM_PMU, + RV3032_PMU_BSM_DSM << RV3032_PMU_BSM_SHIFT, + RV3032_PMU_BSM_MASK); + if ((rv = rv3032_update_cfg(sc)) != 0) { + device_printf(sc->dev, "Cannot set to DSM mode (%d)\n", rv); + return; + } + + /* Register as clock source */ + clock_register_flags(sc->dev, 1000000, CLOCKF_SETTIME_NO_ADJ); + clock_schedule(sc->dev, 1); + + ctx = device_get_sysctl_ctx(sc->dev); + tree_node = device_get_sysctl_tree(sc->dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + rv3032_temp_sysctl, "IK0", "Current temperature"); + return; +} + +static int +rv3032_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Microcrystal RV3032"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +rv3032_attach(device_t dev) +{ + struct rv3032_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->busdev = device_get_parent(sc->dev); + + sc->init_hook.ich_func = rv3032_init; + sc->init_hook.ich_arg = sc; + if (config_intrhook_establish(&sc->init_hook) != 0) + return (ENOMEM); + + return (0); +} + +static int +rv3032_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + +static int +rv3032_gettime(device_t dev, struct timespec *ts) +{ + struct rv3032_softc *sc; + struct rv3032_timeregs time_regs; + struct clocktime ct; + uint8_t status; + int rv; + + sc = device_get_softc(dev); + + if ((rv = iicdev_readfrom(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + if (status & (RV3032_STATUS_PORF | RV3032_STATUS_VLF)) + return (EINVAL); + if ((rv = iicdev_readfrom(sc->dev, RV3032_SECS, &time_regs, sizeof(time_regs), IIC_WAIT)) != 0) + return (rv); + + bzero(&ct, sizeof(ct)); + ct.sec = FROMBCD(time_regs.secs & 0x7f); + ct.min = FROMBCD(time_regs.mins & 0x7f); + ct.hour = FROMBCD(time_regs.hours & 0x3f); + ct.day = FROMBCD(time_regs.date & 0x3f); + ct.mon = FROMBCD(time_regs.month & 0x1f) - 1; + ct.year = FROMBCD(time_regs.year) + 2000; + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +rv3032_settime(device_t dev, struct timespec *ts) +{ + struct rv3032_softc *sc; + struct rv3032_timeregs time_regs; + struct clocktime ct; + uint8_t status; + int rv; + + sc = device_get_softc(dev); + if ((rv = iicdev_readfrom(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + + clock_ts_to_ct(ts, &ct); + + time_regs.secs = TOBCD(ct.sec); + time_regs.mins = TOBCD(ct.min); + time_regs.hours = TOBCD(ct.hour); + time_regs.date = TOBCD(ct.day); + time_regs.month = TOBCD(ct.mon + 1); + time_regs.year = TOBCD(ct.year - 2000); + + if ((rv = iicdev_writeto(sc->dev, RV3032_SECS, &time_regs, sizeof(time_regs), IIC_WAIT)) != 0) + return (rv); + + /* Force a power on reset event so rv3032 reload the registers */ + status &= ~(RV3032_STATUS_PORF | RV3032_STATUS_VLF); + if ((rv = iicdev_writeto(sc->dev, RV3032_STATUS, &status, sizeof(status), IIC_WAIT)) != 0) + return (rv); + return (0); +} + +static device_method_t rv3032_methods[] = { + /* device_if methods */ + DEVMETHOD(device_probe, rv3032_probe), + DEVMETHOD(device_attach, rv3032_attach), + DEVMETHOD(device_detach, rv3032_detach), + + /* clock_if methods */ + DEVMETHOD(clock_gettime, rv3032_gettime), + DEVMETHOD(clock_settime, rv3032_settime), + + DEVMETHOD_END, +}; + +static driver_t rv3032_driver = { + "rv3032", + rv3032_methods, + sizeof(struct rv3032_softc), +}; + +DRIVER_MODULE(rv3032, iicbus, rv3032_driver, NULL, NULL); +MODULE_VERSION(rv3032, 1); +MODULE_DEPEND(rv3032, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat_data); diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index b0b002b2309a..abbb390b0e07 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -28,7 +28,8 @@ SUBDIR = \ smbus \ .if !empty(OPT_FDT) -SUBDIR += rx8803 \ +SUBDIR += rv3032 \ + rx8803 \ tca64xx \ tmp461 .endif diff --git a/sys/modules/i2c/rv3032/Makefile b/sys/modules/i2c/rv3032/Makefile new file mode 100644 index 000000000000..7d3f8ac47aa6 --- /dev/null +++ b/sys/modules/i2c/rv3032/Makefile @@ -0,0 +1,13 @@ + +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc +KMOD= rv3032 +SRCS= rv3032.c + +SRCS+= bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + ofw_bus_if.h + +.include From nobody Tue Oct 3 08:26:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S09s41N23z4vxxM; Tue, 3 Oct 2023 08:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S09s40tyvz3Xs0; Tue, 3 Oct 2023 08:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696321592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6SQdw+neMnz9VCt/aZnOL0DvC3s4rsm3J/RUBs0Krs=; b=M08VlSbJ71iI/WaPkpFlaRGUdR7O/MVTW1R/wDf/7UGdpJxm/8cl+h4bJEeQaUZXmcC3EO OoFRyHtG0QVrKBqaqGfDkrawJVbK2Er5j1OoV3MuXy1AktLi3v/rzB6iWna3RQeLWCRGlg NF7yzxnNjqJEzQ6AZR+IsuaH5Jo5eGx/9hu3y1Ee/XDAxayuPjn1x9szP+pSU4w0UG1irO aXO9rfHEClzeUO6C5OC0JrDjdOTJfMJqPgfv4Gd3yv4bRm40sjcxmHwJVgWBZogMnFDk5L fM1Dibt8SN785vt4rOg/5mVMmYn+v3zd1iE9RGVVm4Lnz2e/YHebc/VEFE5tWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696321592; a=rsa-sha256; cv=none; b=D+af20omJo8OH64ZRMl6+Cmu/rYQrdKaWBGIMSwrdb+/QMXy+DYhveefn/K0SAMFuvLfVI Uw0s3cClou/lT3maE9aMCSDYnXlSXXwJuGbhXRL46x6xNltt+53EGjP4SraCKSFMA7Memx 1HPuDvUudzSUtI7/u/VwtT8tk2jSx8gug7QikU4okGiD1T1FzkdYD5Us74PAhbuiCKtU/k Ym2bXnfCjJAdOV9jKmpbN/52RbW5HJsC6lLKS3F7reG/tu37v/znOEvt7HaUnw0ODS21p/ PI2LSwg0cG7B1pWLyRRqUVhzPHQ/FTtu6SgrGCX2Soi0mPNNxD3TeV8UzTwiVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696321592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6SQdw+neMnz9VCt/aZnOL0DvC3s4rsm3J/RUBs0Krs=; b=QfEU0FzAvJbDIA4dp3VWSRMuLiNGmlPNbvIwTtWETULKnp/M0aU44cinZ773FykVu10Vmz 6HnR3P64wmAFLFbH6z26PUtwrnskjVd2v/0PEe1ALoQJPZQUMOVHRiZzuUtjhuoR0bK1cr Z6Ah5w0zqK/sojJuqWr4o3K9JJx3YKeNwE7NGLBYJ/tGJtSvDs+FtH11soWbZfTzHekl2f OkcXvQltNgxwJrsmsIS9a3GlRfrzW7vuqPIHOoVhN4W02LMqLVnKdJmM0tNyWt4i+1rXQD 1obB5f4CRCYc1LkamtiEHCqEmzz+vQ3ips4korSSxtalkDK0NU1fXCV9M9ajlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S09s373Ntznb7; Tue, 3 Oct 2023 08:26:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3938QVE7086349; Tue, 3 Oct 2023 08:26:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3938QVL8086346; Tue, 3 Oct 2023 08:26:31 GMT (envelope-from git) Date: Tue, 3 Oct 2023 08:26:31 GMT Message-Id: <202310030826.3938QVL8086346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: fbb3f13b1553 - main - linux(4): Actually delete linux_sysproto.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbb3f13b15539f223e40ff606744dc8ba1d6569f Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=fbb3f13b15539f223e40ff606744dc8ba1d6569f commit fbb3f13b15539f223e40ff606744dc8ba1d6569f Author: Dmitry Chagin AuthorDate: 2023-10-03 08:26:17 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-03 08:26:17 +0000 linux(4): Actually delete linux_sysproto.h MFC after: 1 week --- sys/compat/linux/linux_sysproto.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linux/linux_sysproto.h b/sys/compat/linux/linux_sysproto.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Tue Oct 3 13:41:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Jrs5L9Lz4wGb2; Tue, 3 Oct 2023 13:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Jrs4mFlz4f3S; Tue, 3 Oct 2023 13:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696340509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gw1F18UZC+njdtWg+ntxybyDUAuiuu96LEqldIHGK+Y=; b=aYJhOp2DME4hdXRNtEmgjo1A33+OVtwah+1tRHdFVlir6s1WHxRD5YoHAmRXYCoCftmgpV kUi2TLPV6J8N2nwWegTE4zNCiCyhAYg9l4NiWZIByiiDuvTPWqUdQ10KyQmTm3fBbfoK3L rLWnhoGcAWF5Wov6O1r8Fl7zer/1/eEEZW/ZrhAXkjXn2feK5S4WwSEOY621RbTBNQjbvx 4CMP6i4RW17r14E6DoG2oxNwYt0hBQQSHdAN1bgGZjRH8zj+/3MiXe0MYHS6x9OkI4+Rlc M9ptjck/0inJ6IhZfM8kgmGZVWAeQkxkRpVam1pvjZqIIy0gnn0TtcrE6Ep1uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696340509; a=rsa-sha256; cv=none; b=tvZul96/1meGReS9XNAniNR4G08qznvHjgKFLYNjZoFIbipF+UPkck4mkeYoRL5ak6YBMw eAC803BYeJLa8xlnvpOMjz72y6wQv7jBpDY3VaiGfuYpTwRYhjXuN3dXIEJL40nYS03P9t PM3LFD65pXHkgvE9VwIG4yF6g3AXMIx5qVpOB361ka5KDhDQfiswUq9qxcNDTSyto4ikAa EKpyWTT0TrcHsGahmaHOnz4y4+OQ8sWiwDb7Wc0GO8J32EMDpxqct3Sde4juDDMLifzFeA 5c8ljs/5VuOVzluNixvqXURWIxrRurVOGXujiFL1FUi5jbN9XLdLh9gZts5xeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696340509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gw1F18UZC+njdtWg+ntxybyDUAuiuu96LEqldIHGK+Y=; b=wFdxhfVBpChxLGqopfSYOeYFUDeyPmQAMDPUR++KLKhzCE7Z3jV9oi4iYyM8jz/hrQPiC3 yiz88MyCpidIUoiHoq6FxrLtCNSjGgqW1u3DPciLGlNy3aCZW4zDJ/gCDqwvItH7bhk/vA FDpe+JtQ3uwfEUZFmh1fxqPcmiidc+6tDptn7MvB2KEpuTDrjVi5EmHA8oVZsS9dKvXw+V pL/h8UzxOMD0Z9C4pB7gQQpih830ykUvHpXRLSbN7Nf9N8Ne2ZeNiWy4e/A2lci+MgZXau K47vVruT5/iqTb0kj9ZLQONB2BeYAVzEsrfvBotBbj06FMmfXxFE/5DH1kPWqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Jrs3dJCzxWh; Tue, 3 Oct 2023 13:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393DfnQ5015948; Tue, 3 Oct 2023 13:41:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393DfnWr015943; Tue, 3 Oct 2023 13:41:49 GMT (envelope-from git) Date: Tue, 3 Oct 2023 13:41:49 GMT Message-Id: <202310031341.393DfnWr015943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 38a375c472d2 - main - vfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38a375c472d295df41adf73c5ddd50543f9d877c Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=38a375c472d295df41adf73c5ddd50543f9d877c commit 38a375c472d295df41adf73c5ddd50543f9d877c Author: Mateusz Guzik AuthorDate: 2023-10-03 13:34:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-03 13:35:17 +0000 vfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 12b9f2d74641..7e059d374c31 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4036,7 +4036,7 @@ syscal_vfs_cache_fast_lookup(SYSCTL_HANDLER_ARGS) cache_fast_lookup_enabled_recalc(); return (error); } -SYSCTL_PROC(_vfs, OID_AUTO, cache_fast_lookup, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, +SYSCTL_PROC(_vfs_cache_param, OID_AUTO, fast_lookup, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, &cache_fast_lookup, 0, syscal_vfs_cache_fast_lookup, "IU", ""); /* From nobody Tue Oct 3 13:41:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Jrt697Qz4wGRk; Tue, 3 Oct 2023 13:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Jrt5kHdz4f40; Tue, 3 Oct 2023 13:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696340510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8MhJpizShRMhggA2n4MKi1hzlq1eKw49KiPc3UzNids=; b=O7UaSRfDtDj/TVLXTFHC+Wofa3uq2zf1np873EywTx89RCy2tIbptftbpBg8pxl2ZyVrMO DIkx3tjsW5U/DcrotZGRLXYqtCby3kXMgMaNCK4nRcNjnEon2H/hzNQK/xKXHb6TJO7sW4 5BjiHOhd+u7sIBs0oIofNkO8QL6tDVRxbYJb499OLzChIIlOCXm7F3BZKMkO1qHA6rw7to wqRUw8cU4r5poPTwkV2bgGLYOFfZHHZG2c+FhnQ7ASWeMdAlzV7BZRFUVnXTt9sSG/JHbG Fv/lLUGWRHhQOFdMpABfW4jjA4bE11V4IPzL83Wl7tKS1u0qM3kyxYuHWHaqLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696340510; a=rsa-sha256; cv=none; b=IqmI5MyWHUDEEV5G5k1j0E7vjXEbnmVjbzAC1F5bkwim6IAdz0ajaPJT6xYWJoa2F46O/u 6cR9TV9b3USKFbpXoBxpVphEUQEkQfPMIe5CxZiAkW2cGxIMX2OY/Qo9VouimboQvxjW7y 79rZRx72Lv16NPQ0lcVsmT5KDLLcXxNfVvmWQY7rxjczh4h0J7dH2ruAZXBWaG6V+1zF1N C/rTUwqE5qLPNDcaMVScz8NNGZX+VT4P//Me6F8bS5JB+TuGT7ENLv9JyVXzZqH05YTBb8 VyWQFoO8RQpJhYd3iDBllUnugcAFC93JTm4B5duKZF0lbc3jp7tehjnI91XUgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696340510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8MhJpizShRMhggA2n4MKi1hzlq1eKw49KiPc3UzNids=; b=AkmP7xpe/T3IxLaVtHfxxwayo/gAqFrUfl78nXAkTXmflo778nfpj8pzabmGyzBsEPZ5n7 O/RlwLU18qDyavUSZAJiaaPlboEriTHwhJNFqUYB3ktdsexUEa5PzeJMYMz2Vqp2RY5EVr kR+sQAzi7Phj3QlqMDpyzc5pLmd4fqOvT3aVlzbwikRVqNzDv3r3d1bqYd25ucXcT1m4RB hVwUQjGgmThgA1GnITj8BEuA4nGGxLaAxjkHyCgl2qSpCUCYwF9v/PCulqaMa/f1zq+z1d /Vvn2M5Z0/c4V+UxiBQJ57Oww9JxL862CQpATk7NzozydjcoZGtpUtfVjNGcgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Jrt4cQyzxKD; Tue, 3 Oct 2023 13:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393DfoNu016000; Tue, 3 Oct 2023 13:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393DfoNJ015997; Tue, 3 Oct 2023 13:41:50 GMT (envelope-from git) Date: Tue, 3 Oct 2023 13:41:50 GMT Message-Id: <202310031341.393DfoNJ015997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 4862e8ac0223 - main - vfs cache: describe various optimization ideas List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4862e8ac0223d7b19c8b3e070af1e2b38b18f333 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4862e8ac0223d7b19c8b3e070af1e2b38b18f333 commit 4862e8ac0223d7b19c8b3e070af1e2b38b18f333 Author: Mateusz Guzik AuthorDate: 2023-10-03 13:36:50 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-03 13:36:50 +0000 vfs cache: describe various optimization ideas While here report a sample result from running on Sapphire Rapids: An access(2) loop slapped into will-it-scale, like so: while (1) { int error = access(tmpfile, R_OK); assert(error == 0); (*iterations)++; } .. operating on /usr/obj/usr/src/amd64.amd64/sys/GENERIC/vnode_if.c In operations per second: lockless: 3462164 locked: 1362376 While the over 3.4 mln may seem like a big number, a critical look shows it should be significantly higher. A poor man's profiler, counting how many times given routine was sampled: dtrace -w -n 'profile:::profile-4999 /execname == "a.out"/ { @[sym(arg0)] = count(); } tick-5s { system("clear"); trunc(@, 40); printa("%40a %@16d\n", @); clear(@); }' [snip] kernel`kern_accessat 231 kernel`cpu_fetch_syscall_args 324 kernel`cache_fplookup_cross_mount 340 kernel`namei 346 kernel`amd64_syscall 352 kernel`tmpfs_fplookup_vexec 388 kernel`vput 467 kernel`vget_finish 499 kernel`lockmgr_unlock 529 kernel`lockmgr_slock 558 kernel`vget_prep_smr 571 kernel`vput_final 578 kernel`vdropl 1070 kernel`memcmp 1174 kernel`0xffffffff80 2080 0x0 2231 kernel`copyinstr_smap 2492 kernel`cache_fplookup 9246 --- sys/kern/vfs_cache.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 7e059d374c31..6ae4239cc11d 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -197,10 +197,85 @@ * - vnodes are subject to being recycled even if target inode is left in memory, * which loses the name cache entries when it perhaps should not. in case of tmpfs * names get duplicated -- kept by filesystem itself and namecache separately - * - struct namecache has a fixed size and comes in 2 variants, often wasting space. - * now hard to replace with malloc due to dependence on SMR. + * - struct namecache has a fixed size and comes in 2 variants, often wasting + * space. now hard to replace with malloc due to dependence on SMR, which + * requires UMA zones to opt in * - lack of better integration with the kernel also turns nullfs into a layered * filesystem instead of something which can take advantage of caching + * + * Appendix A: where is the time lost, expanding on paragraph III + * + * While some care went into optimizing lookups, there is still plenty of + * performance left on the table, most notably from single-threaded standpoint. + * Below is a woefully incomplete list of changes which can help. Ideas are + * mostly sketched out, no claim is made all kinks or prerequisites are laid + * out. + * + * Note there is performance lost all over VFS. + * + * === SMR-only lookup + * + * For commonly used ops like stat(2), when the terminal vnode *is* cached, + * lockless lookup could refrain from refing/locking the found vnode and + * instead return while within the SMR section. Then a call to, say, + * vop_stat_smr could do the work (or fail with EAGAIN), finally the result + * would be validated with seqc not changing. This would be faster + * single-threaded as it dodges atomics and would provide full scalability for + * multicore uses. This would *not* work for open(2) or other calls which need + * the vnode to hang around for the long haul, but would work for aforementioned + * stat(2) but also access(2), readlink(2), realpathat(2) and probably more. + * + * === hotpatching for sdt probes + * + * They result in *tons* of branches all over with rather regrettable codegen + * at times. Removing sdt probes altogether gives over 2% boost in lookup rate. + * Reworking the code to patch itself at runtime with asm goto would solve it. + * asm goto is fully supported by gcc and clang. + * + * === copyinstr + * + * On all architectures it operates one byte at a time, while it could be + * word-sized instead thanks to the Mycroft trick. + * + * API itself is rather pessimal for path lookup, accepting arbitrary sizes and + * *optionally* filling in the length parameter. + * + * Instead a new routine (copyinpath?) could be introduced, demanding a buffer + * size which is a multiply of the word (and never zero), with the length + * always returned. On top of it the routine could be allowed to transform the + * buffer in arbitrary ways, most notably writing past the found length (not to + * be confused with writing past buffer size) -- this would allow word-sized + * movs while checking for '\0' later. + * + * === detour through namei + * + * Currently one suffers being called from namei, which then has to check if + * things worked out locklessly. Instead the lockless lookup could be the + * actual entry point which calls what is currently namei as a fallback. + * + * === avoidable branches in cache_can_fplookup + * + * The cache_fast_lookup_enabled flag check could be hotpatchable (in fact if + * this is off, none of fplookup code should execute). + * + * Both audit and capsicum branches can be combined into one, but it requires + * paying off a lot of tech debt first. + * + * ni_startdir could be indicated with a flag in cn_flags, eliminating the + * branch. + * + * === mount stacks + * + * Crossing a mount requires checking if perhaps something is mounted on top. + * Instead, an additional entry could be added to struct mount with a pointer + * to the final mount on the stack. This would be recalculated on each + * mount/unmount. + * + * === root vnodes + * + * It could become part of the API contract to *always* have a rootvnode set in + * mnt_rootvnode. Such vnodes are annotated with VV_ROOT and vnlru would have + * to be modified to always skip them. */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, From nobody Tue Oct 3 14:07:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0KQn03sLz4wHgW; Tue, 3 Oct 2023 14:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0KQm6dhjz3Dq0; Tue, 3 Oct 2023 14:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696342064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+/zBUudgXZx+CzvliJYLsrKpQHuyQYQG1PL3sWvKMI=; b=q9UYuI2GdtZUa0gQlXy6ex5N6zYXHf/YR61priw9T7aiYp1YcWkXaqHwcIIzRNUj+iQbaU 3rzmR3dIzma2a05EWfDwz1Ir6OZTipcdX4r8wAnXRhOky0kIaN4wYX5KlmRT1QAK9VKM/3 uUWoAEc50I9ptwZCQIdSxJxmSXxOSotM/mEVOb1EoKwBGbYAw4QSzQ3rYkOS1ChFZhzRDM ls5MA6lyXT1dJYRQ36UQte1foKcEqxj7XP+hwnaxo3lmicfx9agPBsOhr7YoSPitCTfozf Q4RebY+sA9UTDx1p8wsl8z3s6TXreQelwNgDwSPU8E0mPe5z1/WiEfqcOftxVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696342064; a=rsa-sha256; cv=none; b=E3GZJl/ati42MKHccs5xwj//NLMfiOz5gIFNLzsJTAkHIAxirOvh3qaRJ4lzgU9/TK6pQn 03X51K1UKdoMQfrTsLFuBA5fYeJSB0Yr/dBiWtg3qWuYur2IID+/0tIA65xuGPv/5S/7Pv 9cozaL48m5tjn3Ao3bMoQHed6MpZYQS1+wrpAFgUCoQ/BIGGMegm0Pv8exC+Qy/+oQbqkh 5ToZvC5/hrdyg/XNArn5R6vDWNUQgrjwjsKUBGiWeOOlgHLOdls/kc2iEp3/acTqK7F9az Yx852YiQOWVfk8z+CRdIWPhFq2GfHLwso9RE2IKKMwq2mH5AHjnaduqsTdVdTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696342064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+/zBUudgXZx+CzvliJYLsrKpQHuyQYQG1PL3sWvKMI=; b=LSHEdPIKuhtfvGC77j6YXncqzxRDlomGakjqUu4QZVgNPqPAfePzHguBdUxvotMc/KqOW/ PsR2J9F49iMusDiAx0xkWgCRhc0p1oeCRa4wGSUrQp3dfb+L4H7AEukmgc0tfzgYAZ+9Ax CQQ6bnnx+f7MzGGCybALZKy8cOeWf6OfDid8md2CNXKRsunuXHBfiiJbkLPJt7bJN2mG+h wmm4OF3Rigv3SaKVHsOthfMV5Saruo48NvXcMKEH6OlZZbUl1fBwUj61CdaUl1jejFxrlB Ja+vb/pPw1dsOJgLAXRRT4p8Y7qqQhtLnuJwv72W9RE2YyAp3gC98EMwZQ77yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0KQm5h5Zzxd7; Tue, 3 Oct 2023 14:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393E7iXI052919; Tue, 3 Oct 2023 14:07:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393E7iIh052916; Tue, 3 Oct 2023 14:07:44 GMT (envelope-from git) Date: Tue, 3 Oct 2023 14:07:44 GMT Message-Id: <202310031407.393E7iIh052916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 2ed56a7bfe8d - stable/14 - Untie strchrnul() from gdb. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ed56a7bfe8ddf960709478430710c20b1222c03 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed56a7bfe8ddf960709478430710c20b1222c03 commit 2ed56a7bfe8ddf960709478430710c20b1222c03 Author: Alexander Motin AuthorDate: 2023-09-24 03:17:29 +0000 Commit: Alexander Motin CommitDate: 2023-10-03 13:57:16 +0000 Untie strchrnul() from gdb. MFC after: 10 days (cherry picked from commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74) --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 8d38b9cc8a2e..2b4bebaa6831 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4037,7 +4037,7 @@ libkern/strcasecmp.c standard libkern/strcasestr.c standard libkern/strcat.c standard libkern/strchr.c standard -libkern/strchrnul.c optional gdb +libkern/strchrnul.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard From nobody Tue Oct 3 14:07:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0KQx4SHVz4wHxT; Tue, 3 Oct 2023 14:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0KQx3ZMwz3FFQ; Tue, 3 Oct 2023 14:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696342073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JAh+iEHJxL/rv7qVY8mcR5kwRp3xSi6BrzXqeIT1ilU=; b=wslA0omqCn/UCz1T7SyBAhFp1VHYOOFpz1F/0+R1XWgiXP3Bt7JeSEconW0j4Sk558SyvV e70v58Py8lmVgPwdq+KU9R0afmd/pdST1WlEK+kstXJf0CWiNfYrSPsAq8Si7TjEaSh6hF EEEm+d7JwLdDPJqFFHTagUb1Tw0wvRxiRsWQeZ/XJjVVQsrz7hwdIDHZ4su21D6d3y2+96 7jTlc92RIryiNN7SzgfgG6pcGIeiKn4axTLdeig0ltWAYQ4QMp1krVuZczyluwKG/zqlwY mcqPhd/DIoCcynduPWWvoEvuStqqLJqEetUaiSrV4qHBBWn/lok2kEWqD4DqCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696342073; a=rsa-sha256; cv=none; b=l+XlJDTge7cjDt9NKUWpflRtnRQhaCiUdaKo5cWMySIfANul4zaEwvx6+oFcOmsBekYm9S f2oBnx38QItACWP/3iJKxKMGi5lwHicuVqtm0N2ccNY5r70yBuceckbKbQK4fWHLCobiHe hXURWJ3PlVfUC7z27zSqVBrwVpeN4aE96kDrHCTaXeT9QII9qNsJZoDmCOmFkLJMxCFO2P phZjJAbgfn9gHnWWDz+HoP1SOhiHioWeqbIGh2tCDh1sT3/+/oQ17MXVMgPoC7MlWt5WMw dtMxy+/+uZ/6zf3IotqT+9U/c49zzIzNtTfee2mlAfi+Cv6nnNCGMVc/gP556Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696342073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JAh+iEHJxL/rv7qVY8mcR5kwRp3xSi6BrzXqeIT1ilU=; b=js9uue4dfDJOPxawr54mDOPtIXkPcAIn28qoc89jbFkIeSXyBcyNRUxvuqjfEEFfQwL5Vp c5CD/DLpxcofxj3WUY3Xh1opSX274Y5MUC6BHK8xs9aadMraJrqkAAU1SAP5yOVfwJFndw 6JvzyHAhUFnendLkF8rjVP+JCyMpV6qQPRjdpd7uH4YvAdOrLGw482qYgnHQdqJtJEpDiL yLsEiVENDPg9Ob8AvfEMSmziA0jy0gdmnf7V24iwp6pj4cpZPZnd9eSy2/4Tra1Y8fUZcU 8tMJMuxK2JHlA8FHzaskywVIPIWSQjBh6gkTZfTOlYlUe553KHZZJ2vU/NleVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0KQx2db3zxxQ; Tue, 3 Oct 2023 14:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393E7rCE053056; Tue, 3 Oct 2023 14:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393E7r1K053053; Tue, 3 Oct 2023 14:07:53 GMT (envelope-from git) Date: Tue, 3 Oct 2023 14:07:53 GMT Message-Id: <202310031407.393E7r1K053053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 31b1ceddb1d3 - stable/13 - Untie strchrnul() from gdb. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 31b1ceddb1d317f165c310ba50262c566e3ce74c Auto-Submitted: auto-generated The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=31b1ceddb1d317f165c310ba50262c566e3ce74c commit 31b1ceddb1d317f165c310ba50262c566e3ce74c Author: Alexander Motin AuthorDate: 2023-09-24 03:17:29 +0000 Commit: Alexander Motin CommitDate: 2023-10-03 14:01:35 +0000 Untie strchrnul() from gdb. MFC after: 10 days (cherry picked from commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74) --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 904584885db6..5f2e09eb8c2f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4126,7 +4126,7 @@ libkern/strcasecmp.c standard libkern/strcasestr.c standard libkern/strcat.c standard libkern/strchr.c standard -libkern/strchrnul.c optional gdb +libkern/strchrnul.c standard libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard From nobody Tue Oct 3 17:19:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ph202Ryz4vlbZ; Tue, 3 Oct 2023 17:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ph16TfKz4Jtn; Tue, 3 Oct 2023 17:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696353569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uTXw+HT5TUuKJ18eF37WGJUr7M4FR3J9DycOtD9mi1I=; b=J8l2EOGZTrVPKaZVer+ft++cTF6YKdqUJsKaj40ZpnGuI5vTfrJBK6zhg9TPRklrcSRXrl F9sUBZICRSUqqTTj+IbFWx9NyyNX07g3WVrdFyB5MaBZFjWzU1uU/2WxMu5thg1MEOuhC7 ZPt4F3Ub+Uf2LlvzNKCXcmrVr3ELJWLywtDhDnRNsEuZOa10rwWV8wjL0w6ftThmEO2lzj KAl11GAz4+oNXiWMcuYK6rirh221EmaLDZnB+E+AZnE+NMDYMAPz4D40TG33iJ1ZvjoUQv IakdX5pqeHZHP3sDOVZ5hPu6BOB2MjC/TYz2acC2qLob+Kei0SU3NwasHU9yFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696353569; a=rsa-sha256; cv=none; b=P1xFIR038VI4BFUS1CvwxWX8Ak16bkYTdXYDjq7bduwZk6yxQsc7zsErkXyxaU0dHYMqUs 6tLyRWxi/N83ctrUtY/jyN3IKl5iFaGTdwGrl9KRbdM2yncbJ7m+6sKLAQ2hSStGSvYiVR uJyiaFbI32+AttNSf5k5HU3l+G6bHD1dgIDcEPpGefWd06a2uliFCZ35oLQLnQa1e3Dgr7 3UxTc1mpdmHlBn1+wKCOPBoK9B4/XqNTO8J9wszAkhrxuvrdMAQ3qM9GxJ9GkrUEl9hv4Y fYVr+uhM0q1zAiyz9f15XUTiBh96pFaszJP3n0IK6jMlybd0k2/TfAkhHa9F1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696353569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uTXw+HT5TUuKJ18eF37WGJUr7M4FR3J9DycOtD9mi1I=; b=ak2EbdbCIu8qNbL4uYzrOWOWb7p5v8hLPvUM+pwgf0xHFuD8irN0eEv3o2MdcSRiz/MKI5 pYfHGRqgN87lEOpWZ2hcuZ9IXNAjrVGDBP08KR7CClrjbuKsko19lp/fFhKSkNTYvFAIbe EybLnCL62RQRS9/T6v83XLPPow/98CZU8k2d8DadGod3V+OHkGp+jTUnk9QsnLW+50DXyO pM6vVb5FD/BfBKw5YYhfrAfR4J57yQJDFAHSAaTIAO3LWCj9qVTsPuDjbLNd4SsTfhVCUY lLH2k0etTfYlTugw00DpL4WeZcOul/LmEMBBdwQbiZfy0QwLHHs7ao5A9q7ooQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Ph15QYrz13jF; Tue, 3 Oct 2023 17:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HJTAa068787; Tue, 3 Oct 2023 17:19:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HJTuY068784; Tue, 3 Oct 2023 17:19:29 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:19:29 GMT Message-Id: <202310031719.393HJTuY068784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b4db386f9fa7 - main - dtrace: fix fbt regression for aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4db386f9fa7be9668aa09d14b0bbd048a7a7e89 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4db386f9fa7be9668aa09d14b0bbd048a7a7e89 commit b4db386f9fa7be9668aa09d14b0bbd048a7a7e89 Author: Igor Ostapenko AuthorDate: 2023-10-03 16:48:00 +0000 Commit: Mark Johnston CommitDate: 2023-10-03 17:07:41 +0000 dtrace: fix fbt regression for aarch64 fbt computes incorrect instruction position for AArch64 kernel module symbol. The issue is with the for loop, it does an extra increment of instr pointer after the required instruction is found. Hence, a wrong instruction is targeted for patching. Signed-off-by: Igor Ostapenko Fixes: 980746e5cb26 ("fbt: simplify arm64 function-prologue parsing") Reviewed by: markj Pull Request: https://github.com/freebsd/freebsd-src/pull/855 MFC after: 1 week --- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 4094ea43a9fe..44690b97f77a 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -90,7 +90,6 @@ fbt_provide_module_function(linker_file_t lf, int symindx, uint32_t *instr, *limit; const char *name; char *modname; - bool found; int offs; modname = opaque; @@ -119,16 +118,16 @@ fbt_provide_module_function(linker_file_t lf, int symindx, if ((*instr & BTI_MASK) == BTI_INSTR) instr++; - /* Look for stp (pre-indexed) operation */ - found = false; /* * If the first instruction is a nop it's a specially marked * asm function. We only support a nop first as it's not a normal * part of the function prologue. */ if (*instr == NOP_INSTR) - found = true; - for (; !found && instr < limit; instr++) { + goto found; + + /* Look for stp (pre-indexed) or sub operation */ + for (; instr < limit; instr++) { /* * Functions start with "stp xt1, xt2, [xn, ]!" or * "sub sp, sp, ". @@ -142,14 +141,14 @@ fbt_provide_module_function(linker_file_t lf, int symindx, * past the function prologue. */ if (((*instr >> ADDR_SHIFT) & ADDR_MASK) == 31) - found = true; + break; } else if ((*instr & SUB_MASK) == SUB_INSTR && ((*instr >> SUB_RD_SHIFT) & SUB_R_MASK) == 31 && ((*instr >> SUB_RN_SHIFT) & SUB_R_MASK) == 31) - found = true; + break; } - - if (!found) +found: + if (instr >= limit) return (0); fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); From nobody Tue Oct 3 17:28:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0PtZ0QS6z4vm82; Tue, 3 Oct 2023 17:28:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0PtY71lNz4KKJ; Tue, 3 Oct 2023 17:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKhdgEAswwuVSPRMl0DXAdzHVJ36RhXQFTVhXJrbIAM=; b=Hf3tn4BwU169UmDhsLfEmROAaZ74m5nwTJh0My0WwzSwGqzFfD9MCtX0QiLf6Qf+Vb4Jzh m7Vy9YZBxosJDMRrDgcozsGchiMhTzhxNAORrzMKSKTiST76Tbuxlqsi5LKqdJn5V42OGn hBrmKxsh/8PlQfcaikdH9SJbxJ7s+9hGsd62ZCyYmU8FORqBkBGlq0aZjK7zSczXDfjQ24 pkRpm5W6e3vomjK7lgLcRT9WFfiJ2qmcF96UOJFwuA2M4HJrQxjthzeg6KDNgltiiYlH5T z2ISJGfRwopioSdqu6CL613vy+HyR677NcdSnsneOi6BLiVejM6QhllEugFTrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354118; a=rsa-sha256; cv=none; b=iByDoYFHX2AYV6A+ZaoWaQ5+KlSiyAZteNX5hXvk1yAvkaudEInBiQWfI8WXzWtq/Kd5P4 fMBaNt6xyap5k9naGrx1Am7F8ceLOQJLqCX/wVnjk4QSxD7D2bbnBqik1Qs2XEi3vWllJ4 9/ugSHag88AkZzbdyJHcHO/6vCjQJz4HcLvTyneJzo3rx+SZTGY+jDbDOS1Bs016hQRhQu liLaw8uPoO5U/5ULvZd2gdDmJ2ODQ/x95nahCv/fYHemfBttQnapc8LiOIehCPdZzDaEJx GlKmq3UAvJiFkiEio/7pIMLSISHZ9n012ZJrIHM+2jIHGnE+MJhAtD4vXsn+5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKhdgEAswwuVSPRMl0DXAdzHVJ36RhXQFTVhXJrbIAM=; b=cOScnEdRSob26dA4pcIl2covNozciKGpDhuJJUrMPDO0UKWwBeVvOf6o7PCWKN46+VdHEm GNboMxDa8Afx6PRLn0+TCTfc91D8SkujIYjViWMHDpXr+Ba0La/8Xqn+eazywPMWbjC/3/ sJ1RdhBCpQ6buTGMbeYTxc7MS1E5IkrOUdSYEsjMJRYPmIsAulWFadVVQfadDCjsquaB0L EjhfW0K8K3LSAw+w7pQkw0sQ0yBZWb4KucYDfq2cH6sGrzAqa6b0Nvn7/iPsS6TsYEw9S+ QEpD95SS1Ya8Un3mXsecnj2kO9dUZTUsSRpl9Dp4V8sBryeAtDv1R1Sz6IDyYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0PtY644Jz141X; Tue, 3 Oct 2023 17:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HSb9d085443; Tue, 3 Oct 2023 17:28:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HSb0I085440; Tue, 3 Oct 2023 17:28:37 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:37 GMT Message-Id: <202310031728.393HSb0I085440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 1cc968931bef - stable/14 - release/ec2: Remove references to portsnap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1cc968931bef915dd700b5eaefc8e6bd13fdb8a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1cc968931bef915dd700b5eaefc8e6bd13fdb8a0 commit 1cc968931bef915dd700b5eaefc8e6bd13fdb8a0 Author: Mark Johnston AuthorDate: 2023-09-27 22:02:36 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:17 +0000 release/ec2: Remove references to portsnap We no longer install a default portsnap.conf, so the sed invocation just generates an error. Reviewed by: cperciva MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42003 (cherry picked from commit 63aa2e91342ead0495eada5667f413f0cf8eb56a) --- release/tools/ec2.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 71f9f5c330cb..d033739adc26 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -126,11 +126,9 @@ EOF 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config - # Use FreeBSD Update and Portsnap mirrors hosted in AWS + # Use FreeBSD Update mirrors hosted in AWS sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ ${DESTDIR}/etc/freebsd-update.conf - sed -i '' -e 's/portsnap.FreeBSD.org/aws.portsnap.FreeBSD.org/' \ - ${DESTDIR}/etc/portsnap.conf # Use the NTP service provided by Amazon sed -i '' -e 's/^pool/#pool/' \ From nobody Tue Oct 3 17:28:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ptb1SQ8z4vm86; Tue, 3 Oct 2023 17:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ptb12D8z4Kbr; Tue, 3 Oct 2023 17:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udeVRkeWmxKtdYVjz1fwTe9OSiyxR5PTM2mjDyv/nuU=; b=uVrRM1QpGW7HgFTY5AWz3ixH6QsHYv5AfW5l2nzm/Ito8UjsEdLhy0bcdweGe1EjEv2fC7 OZkjaxSX0uAuEI4ZWAxYUtCmlKS5Zq0xB98UssUJrYFy4d8j4rWQXGJLDFBh81BJpWRLKu /4tYTrCeW5OkrfiOXb1xXupXmk08bKztdNA5A5avQkodxUQh1JK6pOYsmkZNec4n3SQopl C/A+w4+AZ1fjmABlkkj9fS/8YnssSoDU+gUOpMXagq2tB7+l51cUNs6rtZjjm2+QNCIDZX Rig3E7Er7vYc4PkQ298hxmzDYUILSA6Crnqxs0xG11juUesiqLf4REDTDMvwKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354119; a=rsa-sha256; cv=none; b=v1zOj/dk6kV1oGM0uKch/MwziHOT3quFvBR+TniDCoqViwmQeASQLJuhjkHjdY6pDhYJXU FSQ+pOCVc64zBGlUSjdpjtWx93+kGnkIM/u5STVRMg+pBlROzODvZ0CHbNWqwEWevAKnOE lY8oWler63aW5wMcIVuzldAoqUMbSxOuLjfTSseAEyDrDUAxznS8E5GVWdjBAuQuSaOCVF bREtxAIc+QpPp+4ktEcsDEyl3gEjZzyRf9a7NjzhBQmxrzqftVNm2Jj2ROcwofX7QqjVHh ngYR+CGA4vM/x4OVTcaV2tV9tEIU+vQul4CBaM0o2EabPhQEzeQdd5q0VQeZpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udeVRkeWmxKtdYVjz1fwTe9OSiyxR5PTM2mjDyv/nuU=; b=e5EFlJquz2vFSScmBUOFD6hbxgbKTyhqJ/0/1N8FQYuHLNjrJIJ31k9DRIgxUDMAmxLluX SjwhOeqy9z5EP22qIRiRvszB8p732loX+STL6lxQByG2n24gQfkYtWlv2yseKUOGcYZpwD ZD9c+zsy6qr2MgNYpSA2Wo7l4FBz6dj+7P4CzCdb5aJH2VPLsJbso46CfTPowByHdxJuqk URuWAmsBdwwpOueEeIAIvOiR8ujRZRKaGBs8wtiP2XAumFp9Jaa1WHwJAS3gDKiplv+xn9 TTW9IkhGPtQI3E9k8ylFZKhPzEemf0t1x08t5n+w2Jy2EyTbyWL/TsVUZhLTUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0PtZ7242z13k6; Tue, 3 Oct 2023 17:28:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HScYi085485; Tue, 3 Oct 2023 17:28:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HScnJ085482; Tue, 3 Oct 2023 17:28:38 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:38 GMT Message-Id: <202310031728.393HScnJ085482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b9013d75c853 - stable/14 - release/Makefile.vm: Garbage collect unused bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b9013d75c8531e1eaa993321a22eb7714af10f68 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b9013d75c8531e1eaa993321a22eb7714af10f68 commit b9013d75c8531e1eaa993321a22eb7714af10f68 Author: Colin Percival AuthorDate: 2023-09-09 00:49:35 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:17 +0000 release/Makefile.vm: Garbage collect unused bits The cw*-package targets were introduced in February 2015 as part of adding support for building GCE images; but GCE support was reworked in June 2015 and the cw*-package targets were in fact never used. Remove them. The *_DISK variables were introduced in February 2015 as part of adding the cloudware-install target; this was removed in May 2016 as the cloudware images are published via the respective cloud systems and not published as disk images via the FreeBSD FTP site. As such, the *_DISK variables are not unused; remove them. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41789 (cherry picked from commit fcbeeb5ff456b2f21d19d4fc6221774b512e30b7) --- release/Makefile.vm | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index fb00804a81ec..4041ae14e2f3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,35 +26,27 @@ CLOUDWARE?= BASIC-CI \ AZURE_FORMAT= vhdf AZURE_FSLIST= ufs AZURE_DESC= Microsoft Azure platform image -AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI -BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT} EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image -EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image -GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2 OCI_FSLIST= ufs OCI_DESC= Oracle Cloud Infrastructure image -OCI_DISK= ${OSRELEASE}.${OCI_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} VAGRANT-VIRTUALBOX_FORMAT= vmdk VAGRANT-VIRTUALBOX_FSLIST= ufs VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare -VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) @@ -90,9 +82,7 @@ CLOUDTARGETS+= cw-${_CW:tl}-${_FS} CLEANDIRS+= cw-${_CW:tl}-${_FS} CLEANFILES+= ${_CW:tl}.${_FS}.img \ ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw \ - cw${_CW:tl}-package -CLOUDPACKAGE+= cw${_CW:tl}-package + ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} cw-${_CW:tl}-${_FS}: emulator-portinstall @@ -114,17 +104,6 @@ CLEANFILES+= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} cw-${_CW:tl}: cw-${_CW:tl}-${VMFS} ln -f ${${_CW:tu}${VMFS:tu}IMAGE} ${${_CW:tu}IMAGE} - -cw${_CW:tl}-package: - @# Special target to handle packaging cloud images in the formats - @# specific to each hosting provider. -.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/tools/${_CW:tl}-package.sh \ - -D ${DESTDIR} -I ${${_CW}_DISK} -S ${WORLDDIR} -.endif - touch ${.TARGET} - . endfor .endif From nobody Tue Oct 3 17:28:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ptc2l0xz4vmH5; Tue, 3 Oct 2023 17:28:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ptc2GJCz4Kfx; Tue, 3 Oct 2023 17:28:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajair3VlsEsK4LPGwNW12Vp2rVZOFHkgKJVbeKSAzUw=; b=TDGgniYXtCzl82adkwjO74Cdj8Fubflm+viLJuveNAVSskbbfZ6ekQHb7w2BONbJWffO86 baGGfEPfByNOQ3J2hMxBKBGVBbTDfNWPzMBnaeTUnEqtQifvu8kMaxZ67xBEYzxpaQ9oyZ /E6mvjzFXayOEQhQo2JewskfmiNftz5NOM3u4Hqhjx+7BQUS3mfWhRNBAlxY2okD5cMQ8R tvjtw3etm8XhFpTFB4dKBYyruUyjKj5fuITqTLDrAt2QZaalCAkY5f2Gm0LWTCwEBDW6m+ ZRFgxpunoJ7t+HEzfh5yhV77xBN0AY1125O0xPsLSkl/HAYrdhFS5UY2dJsYuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354120; a=rsa-sha256; cv=none; b=SW3m55Rs5soAsDk4Y+PDtGI9lFchUknl1sBvwOnOSzQ7ZkLQ9eNusUPkejBaz5mFVOoTsS lPGCuJ+UYlha/ohHrwdLmuqzEJhiMMXeA6qe12VYCV1pIGjSLTYI91UK0yH5lhr9qlaUH0 NeuNnDFbxkHPXmMA+6dw5BxrrxLAGkyzL9vo8hW0I4bQzKh2qd33D5GywFU4oImbA9viqP ++EAmuApdvUfZCRdvgje8IztJ84Qk01X2foyCNWD9ebrwlwYdj2pzexEsFpG7A/cXIIqnt XRbGNf28V+MlgA5yVLrN70iewz9ewefOj6I9XCDOOqRPy/n0iZgcQSn8kzFQ2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ajair3VlsEsK4LPGwNW12Vp2rVZOFHkgKJVbeKSAzUw=; b=HhAImxyiljQgT0+OruWYcKZPWU20zKWPgZoIiJof4l41H/nGJfSwVW7PyEdNKxsmNRQLI1 WEhuhHeANtVw+9Sz45A72H2sAolzUIt6JuKMZBZNk5SIhUACUxtLwO52mLEjt2nZFCFrpS TvBn4P7BRCjKM6aJ+wOaUCzDE7A+xBEeJVYpO33/abKxuNZlGKii+K3f8kBWuZ/7SzM5mk Ze0M+L+0fNTMSCZJQ1MY/PKcOkF31oTytHbNsQsct1g9dWZg13prGv/yT1dEmclHUhyUvn Rpp7Rwc2K1uFZ3noaKAiB3i1nJtdsZLGcnOpDsXuLRJG+0GX2mFccP9tKVToAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Ptc0jhRz13q1; Tue, 3 Oct 2023 17:28:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HSeYl085530; Tue, 3 Oct 2023 17:28:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HSebx085527; Tue, 3 Oct 2023 17:28:40 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:40 GMT Message-Id: <202310031728.393HSebx085527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: fec4f6a7c377 - stable/14 - release/Makefile.vm: Add support for CW flavours List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fec4f6a7c377f576c78dabe16bc632ecf20058b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fec4f6a7c377f576c78dabe16bc632ecf20058b4 commit fec4f6a7c377f576c78dabe16bc632ecf20058b4 Author: Colin Percival AuthorDate: 2023-09-09 00:51:08 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:17 +0000 release/Makefile.vm: Add support for CW flavours There are two "Vagrant" images right now: "Vagrant Image for VirtualBox" and "Vagrant Image for VMWare". Rather than listing these separately in a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then use a VAGRANT_FLAVOURS variable to identify the two versions. Add make logic to allow defaults (in this case, image format and filesystem) to be specified once for VAGRANT and inherited by both flavours. This will make future work to add flavoured EC2 images simpler. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41790 (cherry picked from commit e6eeac9b71795252b12a6b94e7a06633a9ff6e4e) --- release/Makefile.vm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 4041ae14e2f3..e7ff86c28df3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,12 +17,11 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE?= BASIC-CI \ +CLOUDWARE_TYPES?= BASIC-CI \ EC2 \ GCE \ OCI \ - VAGRANT-VIRTUALBOX \ - VAGRANT-VMWARE + VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST= ufs AZURE_DESC= Microsoft Azure platform image @@ -41,13 +40,26 @@ OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -VAGRANT-VIRTUALBOX_FORMAT= vmdk -VAGRANT-VIRTUALBOX_FSLIST= ufs +VAGRANT_FORMAT= vmdk +VAGRANT_FSLIST= ufs +VAGRANT_FLAVOURS= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VMWARE_FORMAT= vmdk -VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +.for _CWT in ${CLOUDWARE_TYPES} +. if defined(${_CWT}_FLAVOURS) +. for _CWF in ${${_CWT}_FLAVOURS} +CLOUDWARE_GEN+= ${_CWT}-${_CWF} +${_CWT}-${_CWF}_FORMAT?= ${${_CWT}_FORMAT} +${_CWT}-${_CWF}_FSLIST?= ${${_CWT}_FSLIST} +${_CWT}-${_CWF}_DESC?= ${${_CWT}_DESC} +. endfor +. else +CLOUDWARE_GEN+= ${_CWT} +. endif +.endfor +CLOUDWARE?= ${CLOUDWARE_GEN} + .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} From nobody Tue Oct 3 17:28:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ptd6Krmz4vm8D; Tue, 3 Oct 2023 17:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ptd2vQ3z4KZS; Tue, 3 Oct 2023 17:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9MKB/gdkJkUmS+XINyuVuqApocKyYNmS3Gjb6TfGaU=; b=snLWxEuozdZ+wlE/FqbynU5dTSbMaxjLQTHLaUD7sd1njvK5DAi1dbEYM9yrM0k7EPXEKY ZCa/UIZXX4DhB8jzhJ2EqS/LtORk5B7/d+ptDukni5KlrUl3KQiccwEPhWkem/+TJJLPfb ugAhQuo87cIP1xSRqQGz7afvyJFeL8r/YBGRXjYAaIaDBmzxpBNdE34AYds7R6040WJrQC /pjzmNf36uhzhPnab+jKrSGq1XBgeqjq8DYvlkRwhEjXCbThEtXGUjPyvGNF0gf0MZ5dsx 49osTNo+0Q9S8GD1Hcaikir7HEiUiVqYEeFuh5ouAWr8x2Cnlvy8lHtCB2gP1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354121; a=rsa-sha256; cv=none; b=ivok6vYSBmnRax4Zyyo4VUcQWU/lbRUc0QNJKvdiSYzam5UGyEBkL4s8RJTD29IqJXg3SI k6RU8QbTNhZxmWPWOlhfRKb8zdok7xKEwMk2qmmnDqleP+Rp+phNFQgV1GGMWrkfdoH5CG AXhHidzOTwtNcJ1RUsBfYG2KyB7/u+ZHkKqSLhrGmhP6BO/NNrK9gi0PkvDG/zJ6YXIuJp mT43WfeN5Up29MYxF4As/Z0Ke2IglfWBYWlFzdY6RT6qYVf7CHgG662WZHopbEYQszPrUH wgDF7K2hek26bwpW95EZ6IByd0pt93oWAbBJY1srx0U+XsTwtAzZOpWywgcxsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9MKB/gdkJkUmS+XINyuVuqApocKyYNmS3Gjb6TfGaU=; b=xaqy3XX+mVbyousnukIX/iNuA7Ri0m5yvVUnmaOc1gfdLROeV/D3gD8QaefBXwk6mCwm5S uDLtZ7r0ApX3Rx3z6toTJJfuOJdMBT9FR8lPbqDGHvewWmEJQrQRvlshZtiavTRqdUttRW En7X/GTL+I7ANqsnO+uAt+n3CWl0/L6YKp/gaudQ8tNYBYNbBJabrbNYoVABlFlqUHwSiu 4LatdDCsFIy5zbLnO32Tc37b75grG00kaP4OKPuHXHpuZ9thTSiwJezJQBqYTRu81rY0dO WAvUcr5PcPx+AbQAZVyEQIBkZmavpTXyDYu/1D7KsqyIOeI8sLf56al9/hnn5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Ptd1ybPz13Fl; Tue, 3 Oct 2023 17:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HSf7T085575; Tue, 3 Oct 2023 17:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HSfCb085572; Tue, 3 Oct 2023 17:28:41 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:41 GMT Message-Id: <202310031728.393HSfCb085572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a18905a9bfcc - stable/14 - EC2: Flavour existing AMIs as "base" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a18905a9bfccc962f67b8a6067e7cbd4eb2bba17 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a18905a9bfccc962f67b8a6067e7cbd4eb2bba17 commit a18905a9bfccc962f67b8a6067e7cbd4eb2bba17 Author: Colin Percival AuthorDate: 2023-09-09 00:51:57 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:18 +0000 EC2: Flavour existing AMIs as "base" Using the recently-added "cloudware flavours" mechanism, turn the existing EC2 AMIs into a new "base" flavour. The only user-visible change is that AMI names now include the word "base". releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41791 (cherry picked from commit 7494fb6b7d809257d4eb9eff06ce226143f27add) --- release/Makefile.ec2 | 16 +++++++++------- release/Makefile.vm | 1 + release/tools/{ec2.conf => ec2-base.conf} | 0 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index b3f32d0e3efb..c674c967ff57 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -51,11 +51,12 @@ cw-ec2-portinstall: @touch ${.TARGET} .for _FS in ${EC2_FSLIST} +.for _FL in ${EC2_FLAVOURS:tl} .if defined(SSMPREFIX) && !empty(SSMPREFIX) -SSMOPTS_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${_FS}/${REVISION}/${BRANCH} +SSMOPTS_${_FL}_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH} .endif -EC2AMILIST+= ec2ami-${_FS} -ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} +EC2AMILIST+= ec2ami-${_FL}-${_FS} +ec2ami-${_FL}-${_FS}: cw-ec2-${_FL}-${_FS} ${CW_EC2_PORTINSTALL} .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" @@ -75,14 +76,15 @@ ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} ${SSMOPTS_${_FS}} ${BOOTMODEOPT} --sriov --ena \ - ${.OBJDIR}/${EC2${_FS:tu}IMAGE} \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FS:tu}" \ + ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${BOOTMODEOPT} --sriov --ena \ + ${.OBJDIR}/${EC2-${_FL:tu}${_FS:tu}IMAGE} \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FL} ${_FS:tu}" \ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} .endfor +.endfor -ec2ami: ec2ami-${VMFS} +ec2ami: ec2ami-base-${VMFS} ec2amis: ${EC2AMILIST} diff --git a/release/Makefile.vm b/release/Makefile.vm index e7ff86c28df3..8828b99599e7 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image +EC2_FLAVOURS= BASE GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2.conf b/release/tools/ec2-base.conf similarity index 100% rename from release/tools/ec2.conf rename to release/tools/ec2-base.conf From nobody Tue Oct 3 17:28:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ptf4HrVz4vmH8; Tue, 3 Oct 2023 17:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ptf44GHz4KwG; Tue, 3 Oct 2023 17:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZx8YS8XpLNcoWNqZxQuGwDqtvelS3BO4w6afNPkNLc=; b=neImuwvlwAc/a4/h9Tzi8o8TnFTXkGJMIIgyr3NCdkEZzRnfmV45I+PazyuWCEKJ7cfb4L diry0aqdao7bD+4fCdGa4nDylI2i+mfEIMdKORndIUxn87ZhGA4O5VqJ3x40hLOh9IgSjR U+YV1q1weaUpNJMO2VhLBjdtqFprf7KBFeVuxUfzVsI4BY9CslArvT3jYsHkeGdKo128s9 r17H/LF9ies4SItStUaf9qarNf1kYuvppjUfC5k997Ik+pM6RbsPhSbGBSLzFcY1QKl07Q 8NgfRxNNl21CIvqfxCHzPkBhKemgNgdDi/TInO3ACNZLZTVN3WvxgHjYtgp8Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354122; a=rsa-sha256; cv=none; b=pBBBkf/X3x3b9DJf2s69XmdvkWaHMXHc+gGTl/x38VtANS4Kt2zpw+P4FmId9Qt5vFL8vZ HKqWRrfnIj4GcTpZrtwKQ+1oqGKinRZ0+kip3dcSNC/Vhl75UPbnktLn7a2bQq+X1fLRBw O/1SQ02FuxdcWkTv2DnhfcCqUEzjrnDT7Z9veNHi3qLjYgjAyY2mJD3uSvA0vhKNIQZlOr I6nd1/0J8SeUQGohPSjxEsrwqGog8qCBTmt6WgrMgdMCU24o7B2qp/0zqa5gjTxUBuMdna PstjOgo0kEPlHb3CazMtFh40trteoWAw2GQapcu28HOz5S/ThpKsAiqN/5rO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZx8YS8XpLNcoWNqZxQuGwDqtvelS3BO4w6afNPkNLc=; b=IqrZ4SYCNextRapDXyzEqUMLa4foCHc6Yp/oqk+P1nA4JNNUpqewEkdtof7DKofhpuZnOe 3dnyK4xQXbswKqu81ac2KHNS+xQiuE3ChL9ULbkVTzW60JGSWl+plPIRNVm/5CazO1wkW7 NxUUAcbGS44tGnYFAd5jVJJa4EBw1k1AC+blboYlKHZAO/b7djjPnFdhx3m/QzN4aqBE+V i0PsZ0JDHEjQn4dQtWcR0wjUOhAE6WS24XrU8xk/Xg98t7j8MJhjibmmjcNaWDxpXh1aNU RuzlVqRZJ/LAhQ/g5abBM9p7q0HPKDVgIU/JDwsUFIcRxBHNKlDHD403fLLrDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Ptf2kv5z13q2; Tue, 3 Oct 2023 17:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HSgif085626; Tue, 3 Oct 2023 17:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HSgsv085623; Tue, 3 Oct 2023 17:28:42 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:42 GMT Message-Id: <202310031728.393HSgsv085623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f4576ea0d5bc - stable/14 - EC2: Split off reusable configuration bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4576ea0d5bcc26d8ffdf033cab36c651a5f0885 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f4576ea0d5bcc26d8ffdf033cab36c651a5f0885 commit f4576ea0d5bcc26d8ffdf033cab36c651a5f0885 Author: Colin Percival AuthorDate: 2023-09-09 00:54:11 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:18 +0000 EC2: Split off reusable configuration bits Split ec2-base.conf into ec2-base.conf and a reusable ec2.conf, similar to how Vagrant flavours share a common vagrant.conf. releng/14.0 candidate. Discussed with: gjb MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41792 (cherry picked from commit fada6e2389fb62ff621a98fab7319e426da58b0b) --- release/tools/ec2-base.conf | 161 ++++++-------------------------------------- release/tools/ec2.conf | 111 ++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 142 deletions(-) diff --git a/release/tools/ec2-base.conf b/release/tools/ec2-base.conf index d033739adc26..f4c46fe285cd 100644 --- a/release/tools/ec2-base.conf +++ b/release/tools/ec2-base.conf @@ -1,78 +1,36 @@ #!/bin/sh -# -# -# Packages to install into the image we're creating. This is a deliberately -# minimalist set, providing only the packages necessary to bootstrap further -# package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ - firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ - ebsnvme-id" - -# Include the amazon-ssm-agent package in amd64 images, since some users want -# to be able to use it on systems which are not connected to the Internet. -# (It is not enabled by default, however.) This package does not exist for -# aarch64, so we have to be selective about when we install it. -if [ "${TARGET_ARCH}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" -fi - -# Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk ec2_ephemeral_swap" +. ${WORLDDIR}/release/tools/ec2.conf -# Build with a 4.9 GB partition; the growfs rc.d script will expand -# the partition to fill the root disk after the EC2 instance is launched. -# Note that if this is set to G, we will end up with an GB disk -# image since VMSIZE is the size of the filesystem partition, not the disk -# which it resides within. -export VMSIZE=5000m +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install: +# * ec2-scripts, which provides a range of EC2ification startup scripts, +# * firstboot-freebsd-update, to install security updates at first boot, +# * firstboot-pkgs, to install packages at first boot, and +# * isc-dhcp44-client, used for IPv6 network setup. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client" -# No swap space; the ec2_ephemeralswap rc.d script will allocate swap -# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances -# and the C4 compute-optimized instances don't have ephemeral disks. But -# it would be silly to bloat the image and increase costs for every instance -# just for those two families, especially since instances ranging in size -# from 1 GB of RAM to 60 GB of RAM would need different sizes of swap space -# anyway.) -export NOSWAP=YES +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \ + ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \ + growfs sshd" vm_extra_pre_umount() { - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - - # The size of the EC2 root disk can be configured at instance launch - # time; expand our filesystem to fill the disk. - echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - - # EC2 instances use DHCP to get their network configuration. IPv6 - # requires accept_rtadv. - echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf - - # Unless the system has been configured via EC2 user-data, the user - # will need to SSH in to do anything. - echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf - # The AWS CLI tools are generally useful, and small enough that they # will download quickly; but users will often override this setting # via EC2 user-data. echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf + # EC2 instances use DHCP to get their network configuration. IPv6 + # requires accept_rtadv. + echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf + # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf - # Turn off IPv6 Duplicate Address Detection; the EC2 networking - # configuration makes it unnecessary. - echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf - # Provide a script which rtsold can use to launch DHCPv6 mkdir -p ${DESTDIR}/usr/local/libexec cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' @@ -82,94 +40,13 @@ vm_extra_pre_umount() { EOF chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M - # The EC2 console is output-only, so while printing a backtrace can - # be useful, there's no point dropping into a debugger or waiting - # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf - - # The console is not interactive, so we might as well boot quickly. - echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf - echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf - - # Tell gptboot not to wait 3 seconds for a keypress which won't - # arrive either. - printf -- "-n\n" > ${DESTDIR}/boot.config - - # The emulated keyboard attached to EC2 instances is inaccessible to - # users, and there is no mouse attached at all; disable to keyboard - # and the keyboard controller (to which the mouse would attach, if - # one existed) in order to save time in device probing. - echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - - # EC2 has two consoles: An emulated serial port ("system log"), - # which has been present since 2006; and a VGA console ("instance - # screenshot") which was introduced in 2016. - echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf - - # Some older EC2 hardware used a version of Xen with a bug in its - # emulated serial port. It is not clear if EC2 still has any such - # nodes, but apply the workaround just in case. - echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - - # Load the kernel module for the Amazon "Elastic Network Adapter" - echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf - - # Use the "nda" driver for accessing NVMe disks rather than the - # historical "nvd" driver. - echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf - - # Disable KbdInteractiveAuthentication according to EC2 requirements. - sed -i '' -e \ - 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ - ${DESTDIR}/etc/ssh/sshd_config - - # Use FreeBSD Update mirrors hosted in AWS - sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ - ${DESTDIR}/etc/freebsd-update.conf - - # Use the NTP service provided by Amazon - sed -i '' -e 's/^pool/#pool/' \ - -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ - ${DESTDIR}/etc/ntp.conf - - # Provide a map for accessing Elastic File System mounts - cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' -#!/bin/sh - -if [ $# -eq 0 ]; then - # No way to know which EFS filesystems exist and are - # accessible to this EC2 instance. - exit 0 -fi - -# Provide instructions on how to mount the requested filesystem. -FS=$1 -REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` -echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" -EOF - chmod 755 ${DESTDIR}/etc/autofs/special_efs - - # The first time the AMI boots, the installed "first boot" scripts - # should be allowed to run: - # * ec2_configinit (download and process EC2 user-data) - # * ec2_fetchkey (arrange for SSH using the EC2-provided public key) - # * growfs (expand the filesystem to fill the provided disk) - # * firstboot_freebsd_update (install critical updates) - # * firstboot_pkgs (install packages) - touch ${DESTDIR}/firstboot - # Any EC2 ephemeral disks seen when the system first boots will # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen - if ! [ -z "${QEMUSTATIC}" ]; then - rm -f ${DESTDIR}/${EMULATOR} - fi - rm -f ${DESTDIR}/etc/resolv.conf + # Configuration common to all EC2 AMIs + ec2_common return 0 } diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf new file mode 100644 index 000000000000..a233bf5981c1 --- /dev/null +++ b/release/tools/ec2.conf @@ -0,0 +1,111 @@ +#!/bin/sh + +# Packages which should be installed onto all EC2 AMIs: +# * ebsnvme-id, which is very minimal and provides important EBS-specific +# functionality, +# * amazon-ssm-agent (not enabled by default, but some users need to use +# it on systems not connected to the internet). +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ebsnvme-id amazon-ssm-agent" + +# Services which should be enabled by default in rc.conf(5). +export VM_RC_LIST="dev_aws_disk ntpd" + +# Build with a 4.9 GB partition; the growfs rc.d script will expand +# the partition to fill the root disk after the EC2 instance is launched. +# Note that if this is set to G, we will end up with an GB disk +# image since VMSIZE is the size of the filesystem partition, not the disk +# which it resides within. +export VMSIZE=5000m + +# No swap space; it doesn't make sense to provision any as part of the disk +# image when we could be launching onto a system with anywhere between 0.5 +# and 4096 GB of RAM. +export NOSWAP=YES + +ec2_common() { + # Delete the pkg package and the repo database; they will likely be + # long out of date before the EC2 instance is launched. + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + + # Turn off IPv6 Duplicate Address Detection; the EC2 networking + # configuration makes it unnecessary. + echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + + # Booting quickly is more important than giving users a chance to + # access the boot loader via the serial port. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # Tell gptboot not to wait 3 seconds for a keypress which will + # never arrive. + printf -- "-n\n" > ${DESTDIR}/boot.config + + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + + # EC2 has two consoles: An emulated serial port ("system log"), + # which has been present since 2006; and a VGA console ("instance + # screenshot") which was introduced in 2016. + echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf + + # Some older EC2 hardware used a version of Xen with a bug in its + # emulated serial port. It is not clear if EC2 still has any such + # nodes, but apply the workaround just in case. + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + # Load the kernel module for the Amazon "Elastic Network Adapter" + echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + + # Use the "nda" driver for accessing NVMe disks rather than the + # historical "nvd" driver. + echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf + + # Disable KbdInteractiveAuthentication according to EC2 requirements. + sed -i '' -e \ + 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ + ${DESTDIR}/etc/ssh/sshd_config + + # Use FreeBSD Update mirrors hosted in AWS + sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ + ${DESTDIR}/etc/freebsd-update.conf + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf + + # Provide a map for accessing Elastic File System mounts + cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' +#!/bin/sh + +if [ $# -eq 0 ]; then + # No way to know which EFS filesystems exist and are + # accessible to this EC2 instance. + exit 0 +fi + +# Provide instructions on how to mount the requested filesystem. +FS=$1 +REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` +echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" +EOF + chmod 755 ${DESTDIR}/etc/autofs/special_efs + + # The first time the AMI boots, run "first boot" scripts. + touch ${DESTDIR}/firstboot + + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} From nobody Tue Oct 3 17:28:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Ptg5Gj8z4vmKh; Tue, 3 Oct 2023 17:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Ptg4Jqrz4L59; Tue, 3 Oct 2023 17:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5h8lbvQW9RHSTkMww4l4OTvxnPosv6dmjnizcfrgoRA=; b=P560mI/G/+aAU0KYhtoQbBo/jjHltDYZvPk4SDZGiWP0fzzp4LTNOz55zifvezwR3YzA58 qUm4uaJQ3hdgmBIWMpVOMihtUwpstbgj1a44H/Jby01Syau2RLYhKyY/zIlsK+G48T7jyH tSSJoYqMTv1WX8DiF3T+J17mcB2YyUpNESnXW5gdOJKW55jHNb4ioOK/IziBeY9VH12WJF 9FcrqALlDzzyP6bw9uPqMh+VbCvck86c5kV8i9M3gd+0vfYDI3QAoAiDcoWoNG3MztoXsx g6Q5Pw518/YnIaI2W1E/nO4q38xc3dJQNBPB5AhbDRH3zqhOWcBzAYe5YgnhOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354123; a=rsa-sha256; cv=none; b=TmKZbqw6OcIyN0cP72UcvhDEFdWYO2YtSpOvMm/uSHYnOvOPtYz31iauWkNpZPRSHDTXBm 7FiidxjMoekBmCXs3ElgWbgzI0k5AUqn73nBpmUP3IQjh6NMfvRB24MJREs7o16WyNW8PK hWG09JhWHuD4eq66Jg3dJHxL/fyC8J6Bzrs504Q9tBRygyiCMTjgNs8eQfZRsCa2ZfVVBb 40TSecB1sR9zX5kiegjJqlDbqrpBldl9jaSaKWdKfZK7cF3pYnRGEBEofczHSkSFmbJd02 flt4J1pp1Z26VQTi2xg4Dsv7PeuIBraxnRkB00BZlrcGIqB+QocTMy54EMPSHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5h8lbvQW9RHSTkMww4l4OTvxnPosv6dmjnizcfrgoRA=; b=bby9iGzjYIfgtOE0GMsvZVhRnNS8utFEUnnCXLWrJvbmIdy9VBdfmifVAaawS74y9+0Aqe DjUzwGqIJghbj3zf/56izUeK/5CqxBfKwHqolOerQI16L/HRbIH/aKUH+joH0hSGHzSS89 CcdIBjz+Qo0EwPadGRIBLjtrQLrGwtZhFgqJ30xSwtd3Bp8LePxk79LQy9TGWZMSNGmPRp sjvqf82lO/ZQDS0kbb8Vi6XnBiM3V03Hrxw4wRHjo3ubZdzgH6Ka0U5ubc367ddVRxM9dp tKv1SRGGrN4pnzqo43nvTtOI2MTxeFFFn4CeRylR/ILQPiQuqLjXYiXcOQSp3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Ptg3L7Wz13s7; Tue, 3 Oct 2023 17:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HShIc085669; Tue, 3 Oct 2023 17:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HShbV085666; Tue, 3 Oct 2023 17:28:43 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:28:43 GMT Message-Id: <202310031728.393HShbV085666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d9243c1ab3cd - stable/14 - EC2: Add experimental cloud-init images List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d9243c1ab3cd8e744aaf54177232cdbffa07392d Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d9243c1ab3cd8e744aaf54177232cdbffa07392d commit d9243c1ab3cd8e744aaf54177232cdbffa07392d Author: Colin Percival AuthorDate: 2023-09-09 00:55:16 +0000 Commit: Colin Percival CommitDate: 2023-10-03 17:28:18 +0000 EC2: Add experimental cloud-init images Known issues: 1. The ec2-user user is created with a homedir of /usr/home/ec2-user instead of /home/ec2-user; this appears to be a bug in cloud-init's FreeBSD support. 2. Cloud-init configures IPv4 networking but not IPv6 networking. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41793 (cherry picked from commit 1f4ce7a39f0f4b0621ff55d228014ccddb366d37) --- release/Makefile.vm | 5 +++-- release/tools/ec2-cloud-init.conf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 8828b99599e7..09e31e3c0b6f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -30,8 +30,9 @@ BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs -EC2_DESC= Amazon EC2 image -EC2_FLAVOURS= BASE +EC2_FLAVOURS= BASE CLOUD-INIT +EC2-BASE_DESC= Amazon EC2 image +EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf new file mode 100644 index 000000000000..2dd4df390fa3 --- /dev/null +++ b/release/tools/ec2-cloud-init.conf @@ -0,0 +1,31 @@ +#!/bin/sh + +. ${WORLDDIR}/release/tools/ec2.conf + +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install cloud-init. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init" + +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd" + +vm_extra_pre_umount() { + # Configuration common to all EC2 AMIs + ec2_common + + # Configure cloud-init + cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg + disable_root: true + system_info: + distro: freebsd + default_user: + name: ec2-user + lock_passwd: True + groups: [wheel] + shell: /bin/sh + # Currently broken, cloud-init hard-codes to /usr/home/* + homedir: /home/ec2-user + EOF + + return 0 +} From nobody Tue Oct 3 17:41:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Q9b0YXCz4vmyj; Tue, 3 Oct 2023 17:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Q9b05qLz4MZJ; Tue, 3 Oct 2023 17:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl/GnHTzWCGIlW0Xcm0sSEZudmwM/tQxgF8+9WbAhKo=; b=CntjhQAVLcKatvakQg5F8BA1cB2ny+z/IzZcRwFvxttNIuPwxRCPeOdcw30X5K/CCTFxvY DRe10Fa/EIwXrxxE7a1fU7DJibTsPLvh11l5uo1mRpfgL57aqnb1Nyj4RdBirgFl6u6Zha 2gHuFKjqJzJHYw5L4FoWrXKpQqmxkccZAjFc/DyWUymixpA6p01CKwE0Z6P6mt4NyvWzj0 WIXVI1deq62xrBa5NFi1HHC1O7gzt1NK8aSckgqDPU8GOn6Hbg8XUtPBKHOckoTlzxeKw9 m73GoOE3Jw/1iQAVX+zZwKjZAmGosmYNhU7V/WWtMF8JKPG/jrKpHd5Hkwj3Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696354899; a=rsa-sha256; cv=none; b=XkFkS72sKbRXPuQxXDI0MftdWLgwO/zmq+MV731XTh8ECCM/H0s7fp2o1Xhwg1lmLd+EcW U9K0GnHLJjQjHI6IreEZQUczE+MWJu0wZIqoIkV9m1yhJIb7Hvsvn1jTTDvmFdoIGJ7WF5 19HHZlZpJFSZfKXwFA7ongzOakbrqez1+gsfGyfwriV+qbqF0WDsCvdl/bjHDYcdAZQKCs d8dCG5PusbPFWOmU+ZCoEy/blPivr/J4fkS9bWhZs9aDk+NfsmvpFcPmgq/cqjMWgbI7do aACFl0CP0V9s9CvyYofXjZTSmxofK3QQuPypkQM0ciCJDMLWopQdU/nWSZqC2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696354899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl/GnHTzWCGIlW0Xcm0sSEZudmwM/tQxgF8+9WbAhKo=; b=Yr74Gsdsm4sTZLm4zhK35znCDlJXEh1PFzVEa8hXkEe/GnPT1AhP38msYaMb2IZxqUjohk es2eeB9wFNkK28DS6Q86zM9EmqHmfGaY4AdSN+KYRFGmSyh0FKxdtv5ZqeAHsan2tQPgcr EwC4Y/iNAjU17EYz14JwSSKdiOzancVXWjtNs8YwDDFnAbN3wNX851AlZdjK53dDG6VQx6 Jt5yN1kW3Jhi1fhiAYp86sANlfCH1NA/J9o3XFrs1w1QahJzZysxXr4JrhDZK9vrkRka1b 19JHL6GE1AixPLZm4DHfJTVK1BTUg9/8JHcw3ptflXvghy7aCqL8/N0JlgV92g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Q9Z6GLLz14JP; Tue, 3 Oct 2023 17:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393Hfcco012731; Tue, 3 Oct 2023 17:41:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HfcbP012728; Tue, 3 Oct 2023 17:41:38 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:41:38 GMT Message-Id: <202310031741.393HfcbP012728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5a82fc7859f7 - main - sbuf.9: Add LIBRARY section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5a82fc7859f746d95811e43b3a117b8eea297749 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=5a82fc7859f746d95811e43b3a117b8eea297749 commit 5a82fc7859f746d95811e43b3a117b8eea297749 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-10-03 17:07:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-03 17:22:24 +0000 sbuf.9: Add LIBRARY section Sponsored by: Klara, Inc. MFC after: 3 days --- share/man/man9/sbuf.9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 5ab045118f51..d4ffa050a893 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2020 +.Dd October 3, 2023 .Dt SBUF 9 .Os .Sh NAME @@ -60,6 +60,8 @@ .Nm sbuf_printf_drain , .Nm sbuf_putbuf .Nd safe string composition +.Sh LIBRARY +.Lb libsbuf .Sh SYNOPSIS .In sys/types.h .In sys/sbuf.h From nobody Tue Oct 3 17:54:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0QSK3q8vz4vn8H; Tue, 3 Oct 2023 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0QSK3Bgjz4NXk; Tue, 3 Oct 2023 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696355665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXxiQxMPH3WID9q6EsJUg+u0SbjHTP2fNXclRTTkJ9Y=; b=jPkvfe6paJ3mdGqdNkakfM21MXEDDQTUOrwgmlwsicv212Mwou+Z/Jza6rfZ7619qrnUko TfzVcRLevpkUYz+6GTlRly6qqT2lPBMaGvFBOVy7qAhfYLalviZhRCrNmX7moXiX7Md9YF pui0r+rvmewlqGktDupUZgPXGLXCfza2W+lsIzZE6u2qMBRKtMR7MM8+YXjz5BTrZQkarL 3iPbLPwOhlmVbXD6jXb09asZvsYTdx4WqO8AM2nVraeIyuu24OEPt/lGA4idLaGlD0XDS7 OlCn4n3z5nATsA+iLnbDoMVvutV8HOrQGmDWPLiVle7jM2vXbhq0mPHrUSCK8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696355665; a=rsa-sha256; cv=none; b=S9HlHgXlONnz7ke1o3pA6s1y+gA+risKfaRItARA2sE95a9wkBuUOVpRgVUis/MNvpWTm/ QC1gGpVeTxxImce+fykKttzaxif3106vnpyK0YdfheXUbGcxYqGAikwrELE8XRUUP2Aorx f048fbychU8HHzZ5ayTwmEdfyNVdo1F5a1W1ZIA92r3+IFnH2wLsHVsjxWASAmGjEKzGnq oH3AHskPXNgh8dzAB5qEhyRF/teBGC4WvqZwOiel5LtycAd5k9MOvOcblvt6RNK45AHajF 0ctHT8Lp8vwwtyFdAatXvyfDO4TTJn9wCDBcVUGAgnFQPj49ZyZeEBeIuxlAIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696355665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXxiQxMPH3WID9q6EsJUg+u0SbjHTP2fNXclRTTkJ9Y=; b=fwP6tWHB3+5s7tA1xHezWRhdwKoeLvv+svjjcOFGW21cGdOQakFlwVrWMks/CfARp4F1HV dqTcN8PMwgc6fK0XLq1tPsjL6psMvC6ieOQ4xOGUIinUkh6VKWbjzY9Jhhh5WSwhfHHoNf JgK+gyxJuo4BC5muA1iz2hRqgQtCQsbQd2bgr8CBsUh4I0fvVgik+0eb3Tcc6JPclhXmnS MyUW8zTFU2Q+UpCMplu3qfLuQY/InTINp6g4dP97ZQVP9Lp8sgHXWc37exQ3MBCu2Z1et2 E9SlbJL6Z9G0XL2Ey8Qsihdyfbyn/tMvEAjuRXpX0V2YOlfXjHGR+jlH7EiXwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0QSK2FHJz14HJ; Tue, 3 Oct 2023 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393HsPGT034954; Tue, 3 Oct 2023 17:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393HsP0B034951; Tue, 3 Oct 2023 17:54:25 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:54:25 GMT Message-Id: <202310031754.393HsP0B034951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2d5eb9b95a9d - stable/14 - ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2d5eb9b95a9d99c0a80994fc932f6ad0589f69ed Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2d5eb9b95a9d99c0a80994fc932f6ad0589f69ed commit 2d5eb9b95a9d99c0a80994fc932f6ad0589f69ed Author: Dimitry Andric AuthorDate: 2023-09-29 18:41:52 +0000 Commit: Dimitry Andric CommitDate: 2023-10-03 17:53:44 +0000 ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries PR: 273776 MFC after: 3 days (cherry picked from commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3) --- ObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index df9d286cd039..589f6b968e9d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -442,8 +442,6 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a From nobody Tue Oct 3 17:58:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0QXd2NN3z4vnLj; Tue, 3 Oct 2023 17:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0QXd1vCWz4Psk; Tue, 3 Oct 2023 17:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696355889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I19ZkBiUPT+Uyarf2bXZmuUrX5pkGsBx4MJO2LLoF8Q=; b=SFFXmIKrSRW4WLozfssu4gCd8PpvU/yTOMChbKGnig7eega2CaMtKHBR5QjrpFfwjOj87P BzhFxIMhrzVPAdn3xFx7EoZBGhd6nekBsb5RQPhOalEkM3SsZzGFlrvWpmvkFajwznqn5h T4/mHbuAuMBoN2CD/u/OkD4kyvVrYB6U1aR+LyKfGWLBlzJKs+CQv7Sp5GQIu15CDYJro7 oXKnm5zp8nMO1GDhBTZLdd9ksiOTp9l0S4s2pXi9lmwEiykBwyNmCbuL0HsoPHSiYg/Kui /eGswP+sasyDn74sAedb6v82VJ/7/ZA76RDzUVrkh6YiuqhaY5/UxIhRpDE4ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696355889; a=rsa-sha256; cv=none; b=nQZkqRCCk/ccVjuhXxEvzl1bkEQPCAaUI5MzVkRIm8vrfy4NfZq5t5CGHepQJy8OBusbYp a4LFtPHGVUAnLYDuHQnYgSl4HoEQZAqaaSrGEbynsE3tzJfRiKcpzLmyMUAWKh5gP0cbRT Yl10K559SpVVxJSP6gkKXpsROqDfovhoeaInQPEt76UtVz6JiXd9dOq2lVqVcQda61mnnD uXm2mTw5bM5X2mEQ+9z9YAehcHjngY81GWxchszh1JcIdOR5NSiIs8di7Ctmgtm2LogXuX qXCM0tXD6tDBA5FqJqpUlpOpQS7pm2sJjnK0+OF4NzAuv7lNErfVjBJbSBMDPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696355889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I19ZkBiUPT+Uyarf2bXZmuUrX5pkGsBx4MJO2LLoF8Q=; b=cSW08jZtOzobRbhIOEVwObp9bcadX65EtdqbHkpUrmqj6SF3WoC28UtKYBurnAUHcJkJ3R +fv9JsGvZNQkzGD2/1qMLH3eVthPKre45uXgT2lo/hYZopeMX6R+7etpvZxZnO30lfI3RI IsQ05EfNguUEfkjsqq3RV8TJ3OpWKVrYYwiCg7LVIhxG/GLKgHFUh9f1OSwdGwG4FYNHyz 0H5UPreMcGk8YvTKhz367t0vk2CpNWhwmkqQR8uBW2UV3Dn3IRrTk+ScQ1woTsF+E6ZbqK FKVdxI+KDcOqK0FD2oZV4XCsyzF33V+ABf6OgvU6rp/l8M3lJA78NJnK1bTtiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0QXd0z8Sz14QV; Tue, 3 Oct 2023 17:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393Hw9iZ035600; Tue, 3 Oct 2023 17:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393Hw9rW035597; Tue, 3 Oct 2023 17:58:09 GMT (envelope-from git) Date: Tue, 3 Oct 2023 17:58:09 GMT Message-Id: <202310031758.393Hw9rW035597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 03b6464b29fe - stable/13 - ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03b6464b29fe3687b17a7338a440f3bf6bd9251f Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=03b6464b29fe3687b17a7338a440f3bf6bd9251f commit 03b6464b29fe3687b17a7338a440f3bf6bd9251f Author: Dimitry Andric AuthorDate: 2023-09-29 18:41:52 +0000 Commit: Dimitry Andric CommitDate: 2023-10-03 17:53:49 +0000 ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries PR: 273776 MFC after: 3 days (cherry picked from commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3) --- ObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 55e0645f2d3a..9fa227b121a9 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -355,8 +355,6 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a From nobody Tue Oct 3 20:16:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Tbk3nCYz4vwlV; Tue, 3 Oct 2023 20:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Tbk38Dhz4g8F; Tue, 3 Oct 2023 20:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696364162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6WLgNRRaBWg4Rpi4a+cUgOebs/rBhw0Sr8knnJAGsU=; b=hBMmv0Ym8/igKDRN60gS9AgYzhnqroPCPJOF83hzlqB/Pp6f/W/FOGyh5Et+j6vXst7vDr 26RbfN6ADzcrNKjAuh/Bk/0z05DOhPVr2ENanp4AErJ4+p5l4AD7nMPHb1/JKlN5bi0tNw ncmODTH3BFmfi/EsNVm1Q2qzB0MwQaemJUr8NgQ0G9t141lxWHCsDRrqUlDN9RjtVCmQdO UfSvVbietASh23bb5bJMizkDd7ldnIGoYOt26G19ESdrNIyzn5NiaUQBQdhoW77wOZvrOe MrfB9gWUl4aN3NE/NxkQ5xvOSitS7xsakgtUs5qJ1BvkYiTpDvMvQc8vmQe/5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696364162; a=rsa-sha256; cv=none; b=MHbL1Wg4/dwbzC0P6SFoPDKNW/sftYD9TlAimYnJzZEyTlP1Gb5EuexfTU82z6sp+1yZKK U97UUPbS9L51praG7UBzg8Bi7T/Y4fHUIYo1s2Zcq6BxBdIzw99dHeupUU3htES3Yu2YCs 0wuhKzlNueTah//BpDwktcW3C+H357UaV4HEySi8T0AzNLkoi+T8copOtLaZHstoSruY3h PnbpgHr+/yGShltVJWvwdYEgkb1XF4G65kIEDIdUcaZ19kgC8LMl/R1ag12rIWjWLFpXVQ pyN2wMOny7+H15EFxGPQ7p4fWAxZEHUoMhfRcWFTLVFspDsvCPFXp7R43T0R1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696364162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6WLgNRRaBWg4Rpi4a+cUgOebs/rBhw0Sr8knnJAGsU=; b=o+rVoV+Vi+bEt/1/EgjK2vj3Bp8mKcPgjEzB9AwsrQEq8pCZFU3TuyFhShsvBKewpQz6tC bfSVWyLyyOD9d4VxjBaTgv8QavGxa2s/j+DREpyHK73yA/B5WYuoYstw0mWlQ7nVqf5c9v fTzKA7keKrevaS0Fa7c1kr4bFamceUjjJpUgtFaOSvpDdTJhPyp7pfRd6o5PePxKe1DfBb 4d+ICqY9MpmybiUpv3GaG3gEz7RZzFCOJctoJ6rtYbCCcSBsZqcK9d7tPEfUawFvOMLfXv GivyuFb65i08Wh8pBb0+uMpw+vdz4VxdyzlF94BW4KMk7eLUw453sCuLJTsr1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Tbk26Hzz17rK; Tue, 3 Oct 2023 20:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393KG2D3069664; Tue, 3 Oct 2023 20:16:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393KG2WR069661; Tue, 3 Oct 2023 20:16:02 GMT (envelope-from git) Date: Tue, 3 Oct 2023 20:16:02 GMT Message-Id: <202310032016.393KG2WR069661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 1e99b2ee9095 - main - linuxkpi: Fix uses of `pmap_change_attr()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e99b2ee90956f275c3668e92a408400f2dada1c Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=1e99b2ee90956f275c3668e92a408400f2dada1c commit 1e99b2ee90956f275c3668e92a408400f2dada1c Author: Jean-Sébastien Pédron AuthorDate: 2023-08-16 20:32:42 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-10-03 20:13:52 +0000 linuxkpi: Fix uses of `pmap_change_attr()` [Why] This function takes an offset and a length as argument, not a physical address and a number of pages. This misuse caused the `set_memory_*()` and `arch_io_reserve_memtype_wc()` functions to return EINVAL. Another problem was the fact that they returned errors as a positive integer, whereas Linux uses negative integers. [How] Physical addresses and number of pages are converted to offset+length in the `set_memory_*()` functions. `arch_io_reserve_memtype_wc()` now calls `pmap_change_attr()` directly instead of using `set_memory_wc()`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D42053 --- .../linuxkpi/common/include/asm/set_memory.h | 24 +++++++++++++++++++--- sys/compat/linuxkpi/common/include/linux/io.h | 15 ++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/asm/set_memory.h b/sys/compat/linuxkpi/common/include/asm/set_memory.h index ae50148f0314..69f659001c60 100644 --- a/sys/compat/linuxkpi/common/include/asm/set_memory.h +++ b/sys/compat/linuxkpi/common/include/asm/set_memory.h @@ -34,14 +34,26 @@ static inline int set_memory_uc(unsigned long addr, int numpages) { - return (pmap_change_attr(addr, numpages, VM_MEMATTR_UNCACHEABLE)); + vm_offset_t va; + vm_size_t len; + + va = PHYS_TO_DMAP(addr); + len = numpages << PAGE_SHIFT; + + return (-pmap_change_attr(va, len, VM_MEMATTR_UNCACHEABLE)); } static inline int set_memory_wc(unsigned long addr, int numpages) { #ifdef VM_MEMATTR_WRITE_COMBINING - return (pmap_change_attr(addr, numpages, VM_MEMATTR_WRITE_COMBINING)); + vm_offset_t va; + vm_size_t len; + + va = PHYS_TO_DMAP(addr); + len = numpages << PAGE_SHIFT; + + return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_COMBINING)); #else return (set_memory_uc(addr, numpages)); #endif @@ -50,7 +62,13 @@ set_memory_wc(unsigned long addr, int numpages) static inline int set_memory_wb(unsigned long addr, int numpages) { - return (pmap_change_attr(addr, numpages, VM_MEMATTR_WRITE_BACK)); + vm_offset_t va; + vm_size_t len; + + va = PHYS_TO_DMAP(addr); + len = numpages << PAGE_SHIFT; + + return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_BACK)); } static inline int diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index ee46d354a5ae..2345967898e6 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -532,14 +532,25 @@ void lkpi_arch_phys_wc_del(int); static inline int arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size) { + vm_offset_t va; - return (set_memory_wc(start, size >> PAGE_SHIFT)); + va = PHYS_TO_DMAP(start); + +#ifdef VM_MEMATTR_WRITE_COMBINING + return (-pmap_change_attr(va, size, VM_MEMATTR_WRITE_COMBINING)); +#else + return (-pmap_change_attr(va, size, VM_MEMATTR_UNCACHEABLE)); +#endif } static inline void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size) { - set_memory_wb(start, size >> PAGE_SHIFT); + vm_offset_t va; + + va = PHYS_TO_DMAP(start); + + pmap_change_attr(va, size, VM_MEMATTR_WRITE_BACK); } #endif From nobody Tue Oct 3 21:19:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0W1105QSz4w0vY; Tue, 3 Oct 2023 21:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0W106fHPz4l5P; Tue, 3 Oct 2023 21:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696367972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pmlsh1WqGgYjC08jqAG7GP2FDp2ZDk+yOCJZG/2ejIc=; b=IxyUUZ8hbzN/WJCOTEIPwisJmmp+5aYh2BTly4b79ybhfiRooEbmiv49uNZIlJ4IbtIRYM dsT+crpxqjBMtUK4FOFKKhbJIzrgaUNs64i4Vd7l22m8/XGAlEA43XPzBeRPpr312FkxPp J/UU+5ZZQU0E/Umy2P2U67LCTg8b6hOtNbopSFIJMXOrWD0rVEEFemG0zW4Fx7Py68VDM3 mWR8RGlaIW3lh8JzhfN0w3cxUrpi5UHfdwNHRblbjUPCPrI12mQ0gFjgQvYFZYoIjPhtl1 3EWuVH8ZotVRux909sHnFd5U0oE9pQx5/0C1dodKtHk1dUFREBXyfKSl5BgpHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696367972; a=rsa-sha256; cv=none; b=EdI9uwJBEXi2NzWxSGz1dULivAwELXFY3Oi7E6Jbos9oDwS50+EY/KcsuUivgmd8IqYYUk YKjvEUaFHlapHFwumbZtOjX1vAwGN44IjTz+J3QVCEeU73oCcf2Ly7/GYnMI6+fG31z6d3 xIp3KZTjovt3V/lMrRsBQX8Uw5lekeVG6ym5WXlhetIkAfeTpg7ssXmR+XPt7bhyyJ3UFJ HZYYuUyGxWfwC7jUOvfk7afxgDmFiT+1SFkgRbR7/7xRmNi+lZSDzWu4SGS+2UNSyb4fOU 99Mi87RNPsrp2n/s+xn3eKR94vZnh+z1KVvDYOKFWMzK9zMVi+ktAa7MMDutCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696367972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pmlsh1WqGgYjC08jqAG7GP2FDp2ZDk+yOCJZG/2ejIc=; b=HZg/sZQ45EYc9VWV/8V15OdFNjcndt5TEelXvekbP03fBk61qVCihp2sxfUgOoezrAan/Z 6ZUl7YHfuYGAAuAMg+26hgorXbeacj5ToN0bPSE733Fw2UEDw9V5SifXAoNqp1oPuWoiFV ONcSUicGgU0YflsdII8irxSVNbKydZUuUROq3rbRXZKGNRVZwXFaFoHaT8t28N+y33Cjbs ml6cFpnrdHNRFZC38MmXTLtVJq6w9Ozbvz0mLuSVOgSkL9/4/RVSEQlZZgo+W+GaG1gorH cYALPLVX2IVLZza0nB8P9GF6k8LNsCAd9OmOH2Ugw3XYNlIjd+HpBZWSh6pX5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0W105gKSz198v; Tue, 3 Oct 2023 21:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393LJWBE071513; Tue, 3 Oct 2023 21:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393LJWBa071510; Tue, 3 Oct 2023 21:19:32 GMT (envelope-from git) Date: Tue, 3 Oct 2023 21:19:32 GMT Message-Id: <202310032119.393LJWBa071510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6c38c6b1b917 - main - LinuxKPI: 802.11: fix re-creation of VAP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6c38c6b1b917957d420902213f318bf0153214f2 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c38c6b1b917957d420902213f318bf0153214f2 commit 6c38c6b1b917957d420902213f318bf0153214f2 Author: Bjoern A. Zeeb AuthorDate: 2023-10-03 21:14:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-03 21:18:29 +0000 LinuxKPI: 802.11: fix re-creation of VAP After dbf7691999abe (as indicated in that commit message) EEXISTS errors may be seen. From current investigation that is due to the single-VAP support in LinuxKPI 802.11 and the related calls to mo_start() and mo_stop() and them being disabled in ic_parent() currently. Calling mo_stop() in lkpi_ic_vap_delete() seems to fix the problem and new VAPs (wlan interfaces) can be created again after being destroyed. Fixes: dbf7691999abe ("improve lkpi_ic_vap_delete()") Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 7565f491606b..9f5f5bef7f27 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2481,6 +2481,9 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) lkpi_80211_mo_remove_interface(hw, vif); + /* Single VAP, so we can do this here. */ + lkpi_80211_mo_stop(hw); + mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); } From nobody Tue Oct 3 21:46:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Wbm52X0z4w2bK; Tue, 3 Oct 2023 21:46:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Wbm3SGLz4nht; Tue, 3 Oct 2023 21:46:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4I+KVoGjafDyDLFElG/SbvilUybYJChk1Ng1UzIXVA=; b=eYwkciy9gEzpvkxj0SwhkEeU9jf01ywdiakOSCYLB6w20SKRPxuTXGiDPHxitHG/JVshlU ha9970b88PRHhnlNillxry4xTeDr0lqiraTOY265N39lmksHZkenCJ3hf5ibAnmwg37xtm /J5EgMkQH2uWMY6i++X/maOcRTQfh2jEfBZP5whYjhVlCGl6n3kxs9V9kh5mycrGSqeynm EelZ9wyc0riV7aR6QGbNUUs+qLHyMsRq2BM4QwwAFFXv1muidKVocfXxzvvd0VKfLMZLjX fJ3rPHHjSMdE1PbWp5x9NYheauE8F+B6G+L1qB2gJ32eA6F6yIds7n/Ka8Rvsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696369572; a=rsa-sha256; cv=none; b=P+l+M51/bQNwA6woB1AOobH+/+ogtDW1A+3pPjvFtJuQ1Zb9uHr3pBvmxjozli1wqNlDiN Ku/FFNHTGCdZp4hp9i4H1d/b6sdVHEj2/aJ2niOC0fCbeX83mIR9zJdvApxFIjgRyhKuVi GGItzvz/wP2jQRXJ8Vk8El4Kiv346GW+2npvQk/xYFfpnyRGOFKvjKFq5SYU1Fu8Si5/Cd 8tt1FobC6zNLwKYnpr9+pxuSr5QyebQF2L0xUtx+talXo9jAyGn7P6X1npN/jho+J3DXtV 14S0k0p+/CstBkfz3yUdiWyI3JWbuKFL/uugr3Hh52whtyGeVP2kF4Yz9emCXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4I+KVoGjafDyDLFElG/SbvilUybYJChk1Ng1UzIXVA=; b=VgEzbMVoZgD7DoHHURW6+lxKBDx99pjPWljMgy1npyYE+8jPVUAX8vMCvGg3T/YVvnEEWa jwhvF3O00X1LP1hSrhtNnYAGcZze9WibPjfSPPs9noni56WsHl59Na99S+1zbA9pl86f0H +tDadm3AJnHkln9R+LYgRCf1brDTodYv6oarCx9hCu74ccDfIp87115GTq8Uk/0rFGZI37 cTL9adk5atBJ0p/EctIU0iyTgmPvlD+GGN+WhBaEHxX7NDujktk9fVldvuLKT13mAgInb1 aEVFWYKTWFFnW54id2tuhIR286IgPwiexFLk92Jq84I5X9z+YPWpvB1Ch76zGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Wbm2YHNz19lW; Tue, 3 Oct 2023 21:46:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393LkCiB020525; Tue, 3 Oct 2023 21:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393LkCVM020522; Tue, 3 Oct 2023 21:46:12 GMT (envelope-from git) Date: Tue, 3 Oct 2023 21:46:12 GMT Message-Id: <202310032146.393LkCVM020522@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: 1e766ebc27c6 - stable/13 - style.Makefile.5: Remove $FreeBSD$ from examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1e766ebc27c6272b169c639c3574d69c4d3e5ab3 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e766ebc27c6272b169c639c3574d69c4d3e5ab3 commit 1e766ebc27c6272b169c639c3574d69c4d3e5ab3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-07-17 13:01:52 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-03 21:46:05 +0000 style.Makefile.5: Remove $FreeBSD$ from examples MFC after: 3 days (cherry picked from commit 22faf70d7e137f39b6afe7da967679a7cdbe3507) --- share/man/man5/style.Makefile.5 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index b85fa763642e..a6162b0701eb 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -241,8 +241,6 @@ The simplest program .Pa Makefile is: .Bd -literal -offset indent -# $FreeBSD\&$ - PROG= foo \&.include @@ -252,8 +250,6 @@ The simplest library .Pa Makefile is: .Bd -literal -offset indent -# $FreeBSD\&$ - LIB= foo SHLIB_MAJOR= 1 MAN= libfoo.3 From nobody Tue Oct 3 21:46:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Wbn589Nz4w2dZ; Tue, 3 Oct 2023 21:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Wbn4Xtmz4nRk; Tue, 3 Oct 2023 21:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AcXmHSnf2NDPhIagwEhBF3B8hhzXbaso47rUs6yRHk8=; b=ihNPb4QvV61S0irUKYwiS5GLQ7dV52aDL4JgywLTFKzbfHsu74J3WslOtvsKxu2OiDYeDL Re/wV2qy+/4D8swQR2ueLn1vBaps1cxeBMhps+za7dsofG4qNun2uG0bl5FlVcI75v5nOY Fld/sR3YnlPQok6xz3xkrcI58xlRMOVxcizT0F1cKAcZNfq2+bjiBbqv1pcJ5lxLx9eqk7 +bmJR6qotehJgjmdWD7o20y3M2Nrdm7MXoDG7bQCZJyI5vcfMzoPVvEMgAL9T3r+tQZsYB 9sCBER7+SUT5OY8SRqaqVeub6FXk4IH1xEPS6VM86J7PK0kjZmGJ9Y6+I69gQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696369573; a=rsa-sha256; cv=none; b=Dq5D9RJbGpdl1kmjBP9s+KvvkrwqzznSuATgxdFwCtF9hklgJPUefuw0bVTXjjMHXHOyKH jYyVk8z701uI0a3eM4+8FwQLeOGINJ763taI71mfiABcGwnOaAkx0T4bM0DEH44CC8/Lhi 0HOCmvjCCnseOtjPVQanwARwyhAF/yBoKqG4DZ5RWpQoucx2AXxVyTNG/1GhLQmIl8nhYv TFqslRH4ZpPO63F0eyynCq2WehPwhGNNdMtnROEFGWK50j66Lid8StV8qL0W0GMtmncNcX FntxqbuCov7pK20VhKPnu1nkAiUPn+vLzo64VkadV9VVaqZvubMOM1YWO9dygw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AcXmHSnf2NDPhIagwEhBF3B8hhzXbaso47rUs6yRHk8=; b=Z3Pt3QDxIUHJVLgYmHqnondk1Z8YcJl5L37ptuiSemvArKQAgr1FQCef7wukd7DgjET8Ne wrlvPcv7ca+l7/iuRL/AuA+ue9WkT7ZHFMPpG8P/t2a0bdGiuJiPRL1zOWaEQ1is1W4yTr 9FwEFueMxig8JXn86xSCMBpdPDP6OWAAlbtzF4eUqA0lYrF2Ca8j+EC2wqNsm1OVgTfowO RkurofToMqFgN46O2F1J8os4OAEWmwGdSG/hazIDHVJShNJg+aq7tsYSBEw7W3ey8ru/Vs U0+g+dRiIeIKUZ56paJLItG4ynb3Qq1/AU15NvL0yW1e4+SyLFCOlWyv/YLiWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Wbn3YRpz19wS; Tue, 3 Oct 2023 21:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393LkDtO020574; Tue, 3 Oct 2023 21:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393LkDCn020571; Tue, 3 Oct 2023 21:46:13 GMT (envelope-from git) Date: Tue, 3 Oct 2023 21:46:13 GMT Message-Id: <202310032146.393LkDCn020571@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: 8f9d8decd448 - stable/13 - style.Makefile.5: Wordsmith .PATH description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8f9d8decd448dc1d0102379bd429bb9726133e75 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=8f9d8decd448dc1d0102379bd429bb9726133e75 commit 8f9d8decd448dc1d0102379bd429bb9726133e75 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-07-17 13:06:02 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-03 21:46:05 +0000 style.Makefile.5: Wordsmith .PATH description MFC after: 3 days Fixes: 1ac5586c6d86 style.Makefile.5: Do not require $FreeBSD$ SCM IDs (cherry picked from commit 9e850513daf9cd1db7980f1f38ef7051331293fd) --- share/man/man5/style.Makefile.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index a6162b0701eb..083847bb513c 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -41,7 +41,7 @@ source tree. .Bl -bullet .It .Cm .PATH : -comes next if needed, and is spelled +comes first if needed, and is spelled .Dq Li ".PATH: " , with a single .Tn ASCII From nobody Tue Oct 3 21:46:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Wbp2NMYz4w2vL; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Wbp1nTqz4njf; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MpCTKU2uTDkDtnurt4mYH2sXL3Jg2uGsRuft5W7XAzc=; b=HJ6nNhzfbQ3VBdO4ql+xlRp6gl3BTLKvUanOnqR9AqiJDD/a1XIge8dQ/VbCFex3zS1O2+ ZqgN0HphhT3btuuEEPJngWeYwN39Uj+dISU/g/1WfsZVKVk0ZFUA3lXFV4Kmq1k+OE3Zhl iSwULJOXCKP7SjGhBx6I/BPlHq/8woYiSH6dslGZfmpur+ax7p5ocDmxI6ZSholCnVgUWj Vrfc4UAdh+CqAlwStcYFq4DR5gasDyllbVRLKYlHHKJ22PQm5b31uykvjJO9kovwuwkjfW xJxkVyu4L4tmxPWFeQV3OiIRrD1TPTBzja6Fj9P5DRT40reNt0DZMP+spk0KbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696369574; a=rsa-sha256; cv=none; b=hnlIYHg81M3zYAANSOIx+vSkJSs7+ntM3SaevQQXVBF19F+VU4w8soDy97xAMxTa0dz8Aj IeUxye5pPo5tK4Yh74fZM4yN/zGXAt6wYYJRvcmVoh6LgHyJ+PbAUymhtIs8+2+JeRlfDk KUprwKwovOKbT6lopGZff3xnuMwXng15EHNHg6HFsySBWSkybuNiQr426Rit8LB+XIq4d0 zAxxByRP9/0JXPjCbfB9BJXRWQgzAJSXB/hA4+Qml2dPXZGoJYj9Nw0rSgXTgX3KJK2wjL pIVdLtAk4GlyXJhEf/i8AVawgPM5xOaTBHMnrDBHVmIVGho/HIlpmTz/bsUHmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MpCTKU2uTDkDtnurt4mYH2sXL3Jg2uGsRuft5W7XAzc=; b=Gb6J4BbCXAZ3UdhNWm14fdDo3oIekhmosqBwERSE/DWFI0rHfJV4pNO6jgsdPb1ODHJewz /LjaiGWmfkBVQuqePESg4/FG1SLkLWmtsbnAGYI7lyInCd0n4Q1CXar1KK3Q09yww/Dy+o ZfLjlm6iMNIUjS1KvoYwF51Fg2oK3Vpr8YfAyg9Pnrl+du2amYGIBJ9WJj1/oiN34AdbnV zsDOgZMJilufTuJ3xKw1jvBrFZmM89LErD4IrlTTS9Y1+4e2GEZpExr8/tLuKhZF0sRi5z UoN7+TzU4cz+EZBQfO7o//Eyzl4ywZG9UGqZQyzlk8vtOLOSiORI7SSd6ToRdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Wbp0tN3z1B9S; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393LkEIS020681; Tue, 3 Oct 2023 21:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393LkEKV020678; Tue, 3 Oct 2023 21:46:14 GMT (envelope-from git) Date: Tue, 3 Oct 2023 21:46:14 GMT Message-Id: <202310032146.393LkEKV020678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 63c0b60063c7 - releng/14.0 - fusefs: fix some bugs updating atime during close List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 63c0b60063c7ce1022b07879e63fcef26fc0259a Auto-Submitted: auto-generated The branch releng/14.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=63c0b60063c7ce1022b07879e63fcef26fc0259a commit 63c0b60063c7ce1022b07879e63fcef26fc0259a Author: Alan Somers AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers CommitDate: 2023-10-03 21:45:28 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones Sponsored by: Axcient Reviewed by: pfg Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient Approved by: re (gjb) (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) (cherry picked from commit 13f188ce0b51908c292cdbb85ef26962528af87b) --- sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index be2885528570..21ee378b24c6 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -779,6 +779,7 @@ static int fuse_vnop_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; + struct mount *mp = vnode_mount(vp); struct ucred *cred = ap->a_cred; int fflag = ap->a_fflag; struct thread *td = ap->a_td; @@ -794,12 +795,30 @@ fuse_vnop_close(struct vop_close_args *ap) return 0; err = fuse_flush(vp, cred, pid, fflag); - if (err == 0 && (fvdat->flag & FN_ATIMECHANGE)) { + if (err == 0 && (fvdat->flag & FN_ATIMECHANGE) && !vfs_isrdonly(mp)) { struct vattr vap; + struct fuse_data *data; + int dataflags; + int access_e = 0; - VATTR_NULL(&vap); - vap.va_atime = fvdat->cached_attrs.va_atime; - err = fuse_internal_setattr(vp, &vap, td, NULL); + data = fuse_get_mpdata(mp); + dataflags = data->dataflags; + if (dataflags & FSESS_DEFAULT_PERMISSIONS) { + struct vattr va; + + fuse_internal_getattr(vp, &va, cred, td); + access_e = vaccess(vp->v_type, va.va_mode, va.va_uid, + va.va_gid, VWRITE, cred); + } + if (access_e == 0) { + VATTR_NULL(&vap); + vap.va_atime = fvdat->cached_attrs.va_atime; + /* + * Ignore errors setting when setting atime. That + * should not cause close(2) to fail. + */ + fuse_internal_setattr(vp, &vap, td, NULL); + } } /* TODO: close the file handle, if we're sure it's no longer used */ if ((fvdat->flag & FN_SIZECHANGE) != 0) { diff --git a/tests/sys/fs/fusefs/access.cc b/tests/sys/fs/fusefs/access.cc index 3d6cddb9417b..5762269fac7b 100644 --- a/tests/sys/fs/fusefs/access.cc +++ b/tests/sys/fs/fusefs/access.cc @@ -55,7 +55,7 @@ void expect_lookup(const char *relpath, uint64_t ino) } /* - * Expect tha FUSE_ACCESS will never be called for the given inode, with any + * Expect that FUSE_ACCESS will never be called for the given inode, with any * bits in the supplied access_mask set */ void expect_noaccess(uint64_t ino, mode_t access_mask) diff --git a/tests/sys/fs/fusefs/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc index 1a1ee5a54aed..4b04297d97ac 100644 --- a/tests/sys/fs/fusefs/default_permissions.cc +++ b/tests/sys/fs/fusefs/default_permissions.cc @@ -30,7 +30,7 @@ /* * Tests for the "default_permissions" mount option. They must be in their own - * file so they can be run as an unprivileged user + * file so they can be run as an unprivileged user. */ extern "C" { @@ -163,6 +163,7 @@ class Fspacectl: public DefaultPermissions {}; class Lookup: public DefaultPermissions {}; class Open: public DefaultPermissions {}; class PosixFallocate: public DefaultPermissions {}; +class Read: public DefaultPermissions {}; class Setattr: public DefaultPermissions {}; class Unlink: public DefaultPermissions {}; class Utimensat: public DefaultPermissions {}; @@ -1239,6 +1240,44 @@ TEST_F(Rename, ok_to_remove_src_because_of_stickiness) ASSERT_EQ(0, rename(FULLSRC, FULLDST)) << strerror(errno); } +// Don't update atime during close after read, if we lack permissions to write +// that file. +TEST_F(Read, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = 100; + uint8_t buf[bufsize]; + const char *CONTENTS = "abcdefgh"; + ssize_t fsize = sizeof(CONTENTS); + + expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0755, UINT64_MAX, 1); + FuseTest::expect_lookup(RELPATH, ino, S_IFREG | 0755, fsize, + 1, UINT64_MAX, 0, 0); + expect_open(ino, 0, 1); + expect_read(ino, 0, fsize, fsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(fsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + TEST_F(Setattr, ok) { const char FULLPATH[] = "mountpoint/some_file.txt"; diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index cf2159df646b..3df0420facb9 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -57,6 +57,14 @@ void expect_lookup(const char *relpath, uint64_t ino, uint64_t size) } }; +class RofsRead: public Read { +public: +virtual void SetUp() { + m_ro = true; + Read::SetUp(); +} +}; + class Read_7_8: public FuseTest { public: virtual void SetUp() { @@ -454,6 +462,47 @@ TEST_F(Read, atime_during_close) close(fd); } +/* + * When not using -o default_permissions, the daemon may make its own decisions + * regarding access permissions, and these may be unpredictable. If it rejects + * our attempt to set atime, that should not cause close(2) to fail. + */ +TEST_F(Read, atime_during_close_eacces) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + uint32_t valid = FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(EACCES))); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + ASSERT_EQ(0, close(fd)); +} + /* A cached atime should be flushed during FUSE_SETATTR */ TEST_F(Read, atime_during_setattr) { @@ -1321,6 +1370,40 @@ INSTANTIATE_TEST_SUITE_P(RA, ReadAhead, tuple(true, 1), tuple(true, 2))); +/* With read-only mounts, fuse should never update atime during close */ +TEST_F(RofsRead, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + /* fuse_init_out.time_gran controls the granularity of timestamps */ TEST_P(TimeGran, atime_during_setattr) { From nobody Tue Oct 3 21:46:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0Wbp5vQVz4w2bR; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0Wbp5JB8z4ntd; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MG5i9R0Ljh9RFC2eX2KIIZYTKQszE+Gw8HLFqnDc4M=; b=aIFefLLhDXe1OOCQrthGA5QT53uFnR7puTetxTV5bZYfSiNV74EkxMm2MHXzq4om41pVUM VyvK8YSNwpnJscEbknY0w8zqA+s4iSHIVFyRBJ1vLcIQo5u7dmzOw7wvaVpb0d83u6J1V1 96vX0K4A32jfRw6l/XkQM67JOle2QlBad1M8/Fd2Ve+JErXaszbkIPfjieW0JYdYtc6qjC RqdYVEMG4KXstDmJzQYIs2sYAuz9ASNoF5prBha9+EO2YpKUuPrCFETEFSwvVQ7yDzXhCz emEC0Xl9zrWi+51zlhx77biV6dhLTO05Qv28RlqW5sAFy1juHwHee23oJf/FXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696369574; a=rsa-sha256; cv=none; b=RPgc/2TeCtRcjmRg20cOkCpZmdshV6KGyxCzsV6hR8KcNuwWlnT7ZY7Hgd9+m78MaPXfcU PuylkgVlDEvc1vmqgFdYH7s/6X76adULWfOIbppeSngHJNdxrK9S5m2Ku4YbfIrrmlY9vh rzWweslANMmL+CBQ967f2scwKJf6cxGTs3gNRX9Yrc3xkzVM6gvM18BVvPUJ5A4yYFZOfM xKIqmqnX5P6CGrB0g3w5oYezP1ZzTQpf0Z/U+aohP9hHnEXCMpDyPDQ6S7rdiONq9I12VL z2kPfa0jabG+G8dhUP8V18ABm/hjqhR4rIg3Lr9oS+OassXKFknZwVUmJ7e0AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696369574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1MG5i9R0Ljh9RFC2eX2KIIZYTKQszE+Gw8HLFqnDc4M=; b=fIqZnSH6I0XozcbKdyqpI3CF8ak0AK0MGBn7NDo6aZtaQzKaiW5v6DqVcyWyAmBr3DYfix dbgrDRRqz1GvoL8v4xfvmIB6nZq9hTEFyQzqqOv/rjI3luCUD48fudgi/CwK/7KVvU9mvz xmwbRbxpg6gPE99Qt9VRk/A4MTxafv3JRKUlHMhU5TRknYZc1f7IdZZkpZNNW7YSCjtON1 FH7LmmyKh9wWpq3TRkI1VsE6dE6ipI3TV0Fi15HbTwHr/VLnFy4ra4MmDguSGNLOCuHbiv hp80QTVRoHpvoN2M5XXoUQaIB/okc9fhalw4R0AHCMbeuq2253y8+GkGOOfq/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0Wbp4DS1z1B9T; Tue, 3 Oct 2023 21:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393LkEnj020726; Tue, 3 Oct 2023 21:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393LkEl8020723; Tue, 3 Oct 2023 21:46:14 GMT (envelope-from git) Date: Tue, 3 Oct 2023 21:46:14 GMT Message-Id: <202310032146.393LkEl8020723@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: 6101f8ec954d - stable/13 - style.Makefile.5: Stop documenting NO_MAN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6101f8ec954d3f56db044fc9a3bc92ce658812cc Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6101f8ec954d3f56db044fc9a3bc92ce658812cc commit 6101f8ec954d3f56db044fc9a3bc92ce658812cc Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-07-17 12:50:33 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-03 21:46:05 +0000 style.Makefile.5: Stop documenting NO_MAN NO_MAN has been an error since 2020 according to UPDATING. PR: 231357 MFC after: 3 days (cherry picked from commit 73fb7a7a7342bb590ba53e406b564df0d90c3304) --- share/man/man5/style.Makefile.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 083847bb513c..122b38cb19a4 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 18, 2021 +.Dd July 17, 2023 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -64,7 +64,7 @@ order is: .Va PROG Ns / Ns Oo Va SH Oc Ns Va LIB Ns / Ns Va SCRIPTS .Va FILES .Va LINKS -.Oo Va NO_ Oc Ns Va MAN +.Va MAN .Va MLINKS .Va INCS .Va SRCS @@ -86,7 +86,7 @@ order is: .Va INCS .Va FILES .Va LINKS -.Oo Va NO_ Oc Ns Va MAN +.Va MAN .Va MLINKS . .It Omit From nobody Tue Oct 3 22:13:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XCm6HCNz4w4Qn; Tue, 3 Oct 2023 22:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XCm5lgrz4rBq; Tue, 3 Oct 2023 22:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNLgg52i+8zMWfrjOSHpq5/d1TJ75+SWTuGeYtG2T3M=; b=mfHbvtLtnEzZtXZ73b6A/C+tOfSUml6GZ0dnig9kqMhLUBrWdRUZPMKQxqyFDTC5ARqvtS EW354jZK7sK7JHYugQmTyLLKy76qArLFyQ8ehq4C2U1z526YxOFryQH5WshVax9Il0iJtR V+P+XSRa9m5RF1ZOMVHxOTkmaYMkskKMoqpjDHGixGBXexwjJXSPapn07p/peu8HBQxmyc 0fSixYw5wE2EE0amjDzUHXPPgxyQULWX6Vaf2N9x12Y0Gw5i60B9kbRWVV7uXg6slxzqii B04tT2TiFPd7tuwPe5/RQZFIuL7krHCgew2eSaHF3KSlhE3YkReF7Z3WxgnxaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371236; a=rsa-sha256; cv=none; b=vus02HJEri3Gqy9ft1xJ88/iYqq/C6bSGJms0U4imA1FEmP/UZB3HsEJb6uebhxILwMU/M 9hND/qn2dzQuG81FQtOfkdBA828+3kHT+6UOLTvoiWEXQcR7qZMtI3Q1rUi/qMlaUBPedC VP4Xe8/JI3TclPVIbsXzRac2JIhIRYgG4dOwX0XR5cAzmhjrNBxt1ZFfhMcpNG+1YWhjr8 +dHewCwc5Efi09tcqwvqtmbftQZtC6TZ63YL8znaOOQ3BymousfGIv7EVYQo6JXto5Heng /WgIsm3qw9m6gxmSjkOi0v8fmNdKUad+VVywlcz+6SCcy/vwnu83/uaFKC7IBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNLgg52i+8zMWfrjOSHpq5/d1TJ75+SWTuGeYtG2T3M=; b=EDWMxLtI9HgUQ05YyT3T8TcofPbiI3dglupzopxKR4shcPVDvYvpSqpQQPmzY/aWJ3qxy+ UWWExDtsUsWeLaQmGGjeM2igWg0j2P6UqnI+Mk4jx/vx8bAsDrKB4utrEzngkSEjW6BsQK Qy75sQIgpmdAtx7pvKqsO/rDtr8sipYP2FVVUToT0E10ydd9HwI/7pC+OlJbQujoOEQWFN cWAYR+bvX2Nq2V+M6qMPxWtLS7HPPphg6jQfEd89twXFyJs6McPypcaZtM8vMnjswgWcEa YDqGHRMeA/st9+fw2jYo9wDWes7gq6hFUNNCJsxMac4pCRicLyj3qFZkQ7SGuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XCm4qBhz1BZT; Tue, 3 Oct 2023 22:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MDutr070936; Tue, 3 Oct 2023 22:13:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MDu1J070933; Tue, 3 Oct 2023 22:13:56 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:13:56 GMT Message-Id: <202310032213.393MDu1J070933@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: cfb624d7e250 - releng/13.2 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: cfb624d7e2507c81441bb01e0078abad25ef235d Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=cfb624d7e2507c81441bb01e0078abad25ef235d commit cfb624d7e2507c81441bb01e0078abad25ef235d Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:22:19 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Approved by: so Security: FreeBSD-EN-23:12.freebsd-update Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) (cherry picked from commit 774cc6348a50c13b952e9f36ef8395f9b48733db) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 4f779270926d..0c4053715b70 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2905,7 +2905,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Tue Oct 3 22:13:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XCp0sG2z4w4Ks; Tue, 3 Oct 2023 22:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XCp054jz4rF5; Tue, 3 Oct 2023 22:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjbxGuMErZSJSiCmQ+JaBhzTJDSzA+RwCwqnWW8HrW8=; b=A/i0e4CLBwfFUZOIpvvOI+OZVXAPV4BREoci0kBoYbYBwgWc8nXDkpeWPlg+RxInY+WsPp YUzdII1SUyivM4AKWcHeo2iuEaRk055LYVy0ZiEilV2di74cQDvFRAhrE9jfINHV4jUoRp rY8xOrRisPNFJr71jKXN0+RRk+z6TfccJGvBcBgJYbjkvf8pNmRDzIrbmzPbasjiDEUCNo 3lV2aK58fjHA9mAYkBVg5FyTO+o3uairasZ0CUsna9SVVqVFMANigEU4d68CRsLOXIk3/b /FRV82XinDtJIjWg06gm9P8QCL1HLFXwNaIUkFF1xa2tEtwpzSjYx/3g/3Q8zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371238; a=rsa-sha256; cv=none; b=I1XF2AyD0NxyaFCkk51ZUoyKQ3LJJYCLPPIQHbjre5muHkt7Debs8xovsIczWGqSSqaK7W zkOaHrmA4TSeZmVLOcJlVu0buOHPVoGQV9hj3jq5jVeZO3D7KJU4/xUcPeoT3Z8z6jhLIX YDIqh+xvMzBJ3VPZCCBNxxZ6ubK6ptT1G3rlFOjID5vw4dr8MRkVLi7PDeHElCHqex4DSv VLmUHxrbqYrdkI7UJnbLgD9exvaeGrq6V/+YvjVjegs2kZNE43iC7vDKwxxDJaFgDVpulB 9/zhu3gwNYdVaOSVFORS6cgt+IuCFh6AkZPUBW94s1Og9wrs8QFxTgKTOStg0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DjbxGuMErZSJSiCmQ+JaBhzTJDSzA+RwCwqnWW8HrW8=; b=gJfRcCi4uWRVtjylSlA7D6O0E+64KQRdYIKxs+uwLKZ6oGRnYHmmTXMRzW/TxTKzs9IhEI aR9U47YtO2PpS8oWM+yXGhxvDJTPgAjoslWrak9VP87Z8Rd239Klbl2Cn+P/tI7v7YNUVr o5Q9+KqKf+3D2afS4wjdPw0h5HB6i5s00uiqOtMxWIc9Bzp9l8Qbr+5gP9vAM6eupeBtYb Ty5Ddc2rgovrYCKDLU2R2+wyG/Hv7ilPn1A+sPztH5al8oTuo12fxszpELPqxzD+Ep6MU5 ce37+9OR2+lwJv/WD6LKFWouzecKeCuTxD8i8pnkxdvIys/DZkBrD78RV9GV4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XCn6Frzz1BXJ; Tue, 3 Oct 2023 22:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MDvDe070981; Tue, 3 Oct 2023 22:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MDvgD070978; Tue, 3 Oct 2023 22:13:57 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:13:57 GMT Message-Id: <202310032213.393MDvgD070978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 7d08a7e6908b - releng/13.2 - msdosfs: zero partially valid extended cluster List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 7d08a7e6908b3ffb72061b7517ed29814d62355b Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=7d08a7e6908b3ffb72061b7517ed29814d62355b commit 7d08a7e6908b3ffb72061b7517ed29814d62355b Author: Gordon Tetlow AuthorDate: 2023-10-03 21:23:40 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:23:40 +0000 msdosfs: zero partially valid extended cluster Approved by: so Security: FreeBSD-SA-23:12.msdosfs Security: CVE-2023-5368 --- sys/fs/msdosfs/msdosfs_denode.c | 53 +++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 030c96d6d354..37d23f2ce60b 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -384,10 +384,8 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) return (EINVAL); } - if (dep->de_FileSize < length) { - vnode_pager_setsize(DETOV(dep), length); + if (dep->de_FileSize < length) return (deextend(dep, length, cred)); - } /* * If the desired length is 0 then remember the starting cluster of @@ -496,13 +494,16 @@ int deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; + struct vnode *vp = DETOV(dep); + struct buf *bp; + off_t eof_clusteroff; u_long count; int error; /* * The root of a DOS filesystem cannot be extended. */ - if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) + if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) return (EINVAL); /* @@ -522,15 +523,47 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) if (count > pmp->pm_freeclustercount) return (ENOSPC); error = extendfile(dep, count, NULL, NULL, DE_CLEAR); - if (error) { - /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, cred); - return (error); - } + if (error != 0) + goto rewind; } + + /* + * For the case of cluster size larger than the page size, we + * need to ensure that the possibly dirty partial buffer at + * the old end of file is not filled with invalid pages by + * extension. Otherwise it has a contradictory state of + * B_CACHE | B_DELWRI but with invalid pages, and cannot be + * neither written out nor validated. + * + * Fix it by proactively clearing extended pages. Need to do + * both vfs_bio_clrbuf() to mark pages valid, and to zero + * actual buffer content which might exist in the tail of the + * already valid cluster. + */ + error = bread(vp, de_cluster(pmp, dep->de_FileSize), pmp->pm_bpcluster, + NOCRED, &bp); + if (error != 0) + goto rewind; + vfs_bio_clrbuf(bp); + eof_clusteroff = de_cn2off(pmp, de_cluster(pmp, dep->de_FileSize)); + vfs_bio_bzero_buf(bp, dep->de_FileSize - eof_clusteroff, + pmp->pm_bpcluster - dep->de_FileSize + eof_clusteroff); + if (!DOINGASYNC(vp)) + (void)bwrite(bp); + else if (vm_page_count_severe() || buf_dirty_count_severe()) + bawrite(bp); + else + bdwrite(bp); + + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); + return (deupdat(dep, !DOINGASYNC(vp))); + +rewind: + /* truncate the added clusters away again */ + (void)detrunc(dep, dep->de_FileSize, 0, cred); + return (error); } /* From nobody Tue Oct 3 22:13:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XCq1r6Tz4w4Ng; Tue, 3 Oct 2023 22:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XCq0wBHz4rFY; Tue, 3 Oct 2023 22:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1k9V5kW7d3YOiF6lgdMIAOfXUxC0uomfnbRIZ3nYbxY=; b=ThzNvVRqfzGEQuWwB22OpIyxwmunu+WNl8fq/Nq1G0Nd2nlLYvv+qTZbQToFnmbBtD8r5k RBrfqnjzgEdvsSjsey3dUOuwNf5wXawBIb6Xa1Nyo7uArrbHnNqee/lkOc5nd1sYe5NuKP pwMjOPGmpGhEvqUGnZuUDYjXm922zOYUPzIhbGQT1ro+qW7et7VO9myrVPPHOZAmheCoaw trQaUstcW8lu6lFsaP2ma14UQm4yXAl94kFHQeSP9DbOnOoqdbeAeWAeoGxucuww2E92os HNdlr++uUDQ7o/s0deYgerCU0rcz4A+d/sNkAjt7w6k0bKSUAMa/ltWXrg3xtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371239; a=rsa-sha256; cv=none; b=LaM/hfJLv+x8YOYReqQOwVGXtxmSjNyRFzy9pia+c/Da60+iIVoatnOH2KeSE2OR7rorSw pt08qNXZwpGFZIYV4aEyXuSQqtGg5a2jcfQajSzjaRGfKvKXv4JI1+I4cbwmNP/T17IXzZ eXTTY+lrNUuwRXN3oQzyZ1LCZbnlIO1GZhjcb2A6jzQ5rDzM2cpAkHTeJvQhnGxZau/u/m dASy8XIYi7Ys1J2K/fd/YZN46uEIrNDPwu7iIfvLMsHEWXo0qVm6aj2rKvLMpXgDZ4o7LR lEZ+6bqcJp9RhyHJew8ab51gFWP3Q8cz+deGCbGmn1UC0m4mOt1EtrsqXgHoSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1k9V5kW7d3YOiF6lgdMIAOfXUxC0uomfnbRIZ3nYbxY=; b=wPIkbzokatnv0axGw15mjfDCnxq4rUrF94yGfP+LBwqX5hdr/Lck9qa7RJEnRowGLMmgHO AahXQEuNbrRxy1KdBqIRbPmpyIv9MFUV8WgQqA88EgrbRyNhyt6+CimRp6IGQ8bk/+hrY7 +xfjZz9u5nxS5k+osa0Fq78yUyV6u0EMiNPFDQqUVegSrfnX7OPK58qJibM7e5FdXrc0JD MS9vwpoinAeGiUS/ouv0dP7YTJ5RU/qFlbLdINmSUQClvv0cxNuXiHeBT95VNNkHA7Pkw0 6lirDYE/PnfoNwIOnCI5T5cnPSggiC7Cmbcl940uGQgb39vqMjTQtO2X2MOr3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XCp6tZXz1Blx; Tue, 3 Oct 2023 22:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MDw8E071029; Tue, 3 Oct 2023 22:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MDwGc071026; Tue, 3 Oct 2023 22:13:58 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:13:58 GMT Message-Id: <202310032213.393MDwGc071026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 2d23f6c33431 - releng/13.2 - copy_file_range: require CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 2d23f6c33431b19d8f91ad4832db01aa25062d43 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=2d23f6c33431b19d8f91ad4832db01aa25062d43 commit 2d23f6c33431b19d8f91ad4832db01aa25062d43 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:24:41 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: so Security: FreeBSD-SA-23:13.capsicum Security: CVE-2023-5369 Differential Revision: https://reviews.freebsd.org/D41967 (cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6) (cherry picked from commit 3f0ce63828dc3d4030b32ad0effb4e588af49c03) --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3b3947b2ccb7..449c5ace6094 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4896,7 +4896,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4907,7 +4908,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Tue Oct 3 22:14:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XCr2Xvxz4w4Bh; Tue, 3 Oct 2023 22:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XCr1bK1z4rXF; Tue, 3 Oct 2023 22:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kc+UCTzy0YX8bEHQHrZSDvQxk1hjCK72V0IivmHurX0=; b=YuGlu+epNq6dCk+MOGqCSjZ4PxJslmQWS3sEFvkBIu0/hz2zxfeUBpZm31A6fu0K53R9NB tCq8x/Dz0nxtWwj3b/R8VLcVUCSOWGnN+AOgryzsQtQQpFTqyLb+dAM5z3E5fBnkBYXzoN x5BVHdbO/ShShEuMyvT8QQjkYrG54g+M2JZMhFI/dj38q0bOCRLHj4rDRq3xsu7Qxgsmru siFSXGZLLp0jb2CdiWucm+zn09vCz+eXJ1wxdvSzimccOQCFMLKrmM0We4W8k6Vb59ET46 3WMnSc2qecC2dPAeQhye9bsIDatjydkjEugIjErneWH/V9wNczhhF/W+WGlPew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371240; a=rsa-sha256; cv=none; b=W1Hxx8ywFvHsuOOTOH/bwlichNaMaPS0yeo+lJnyOphsbSBRGfrKgYUaciDumAzxFFdHy2 GR4LvxojRaLa8xDIkiXO6NIuF1w5w3Q8MhLyx4f5HRkgx1nZZdBpcRwQ/7ECVHd7Fwu/MT VLFusZLhqLgCWWiMUb9yTyKI+fsWKzg7nmOilqfFJttuRX8lsPHu1+LcIbF/iLjoUngi2U 1aopv79zwK+vDIDItQOawYGuXchNvN8uY3+TGqGNmRUyVmbaKiRHT1Y0Y9YcIKFUaFPo/I a7wAxKAIWbbbbWVaWlkC0iLIteKUQZ7wFboigOMyD2G6UttPQltiq5Q1jvfLZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kc+UCTzy0YX8bEHQHrZSDvQxk1hjCK72V0IivmHurX0=; b=ks2GD9SwTNYgPE2G04uaq6jtQCNuYrDrBy8vczPNW1I2/RGcnCVNS0ihbLqGQSE7YW7Qy1 lhD+b5GORbxH+ubFJ7BclOWw0ZqGHw6bNQyPPhCxBj+D5MCUQr1GmjJQXmofWzlWuFagXl bd0xtg6O+gRfTC2YshCyxlfWMxl7t4CUqzqZv+OVEztgtc/KQmlPe/vd9OiokLrzhYZjfC luogW+Dwd5VVgQuiLWdGd8WNS1tyXjdSmqgw2GUaHE53RGFXASF4pnhXHawJjn40cmquxT Q5mPj/X671kxF4Pvue3xlDQlFSMMLxX8iHqGGz37bjawdc9dz+Me5jN5ysWAsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XCr0h9kz1BZV; Tue, 3 Oct 2023 22:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393ME0UP071083; Tue, 3 Oct 2023 22:14:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393ME09A071078; Tue, 3 Oct 2023 22:14:00 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:00 GMT Message-Id: <202310032214.393ME09A071078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 485912e051bb - releng/13.2 - arm64: Fix errata workarounds that depend on smccc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 485912e051bbea273a480a24d7f321cc7c06f335 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=485912e051bbea273a480a24d7f321cc7c06f335 commit 485912e051bbea273a480a24d7f321cc7c06f335 Author: Andrew Turner AuthorDate: 2023-09-18 16:34:51 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:29:11 +0000 arm64: Fix errata workarounds that depend on smccc Some arm64 errata depend on calling into the firmware via the SMCCC interface. This needs to happen after the psci driver has attached as they share the interface. Fix this by allowing the workarounds to mark when they depend on device drivers attaching. This is only an issue on CPU 0 as the workarounds are applied later for the non-boot CPUs. Reviewed by: emaste Approved by: so Security: FreeBSD-SA-23:14.smccc Security: CVE-2023-5370 Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41916 (cherry picked from commit c643e82dba0b17b2716de4c9d44a3c9c547cbbd5) (cherry picked from commit 843bea18711d726cd2f0a3c3f9144b218e4de3e8) (cherry picked from commit 4df1447f2c76d0db988197f3a05d48e15f976c7c) --- sys/arm64/arm64/cpu_errata.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c index 9879e645b827..dfe93a503191 100644 --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -49,6 +49,9 @@ struct cpu_quirks { cpu_quirk_install *quirk_install; u_int midr_mask; u_int midr_value; +#define CPU_QUIRK_POST_DEVICE (1 << 0) /* After device attach */ + /* e.g. needs SMCCC */ + u_int flags; }; static enum { @@ -66,32 +69,38 @@ static struct cpu_quirks cpu_quirks[] = { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = 0, .midr_value = 0, .quirk_install = install_ssbd_workaround, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, @@ -175,8 +184,8 @@ install_thunderx_bcast_tlbi_workaround(void) } } -void -install_cpu_errata(void) +static void +install_cpu_errata_flags(u_int mask, u_int flags) { u_int midr; size_t i; @@ -185,8 +194,43 @@ install_cpu_errata(void) for (i = 0; i < nitems(cpu_quirks); i++) { if ((midr & cpu_quirks[i].midr_mask) == - cpu_quirks[i].midr_value) { + cpu_quirks[i].midr_value && + (cpu_quirks[i].flags & mask) == flags) { cpu_quirks[i].quirk_install(); } } } + +/* + * Install any CPU errata we need. On CPU 0 we only install the errata that + * don't depend on device drivers as this is called early in the boot process. + * On other CPUs the device drivers have already attached so install all + * applicable errata. + */ +void +install_cpu_errata(void) +{ + /* + * Only install early CPU errata on CPU 0, device drivers may not + * have attached and some workarounds depend on them, e.g. to query + * SMCCC. + */ + if (PCPU_GET(cpuid) == 0) { + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, 0); + } else { + install_cpu_errata_flags(0, 0); + } +} + +/* + * Install any errata workarounds that depend on device drivers, e.g. use + * SMCCC to install a workaround. + */ +static void +install_cpu_errata_late(void *dummy __unused) +{ + MPASS(PCPU_GET(cpuid) == 0); + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, CPU_QUIRK_POST_DEVICE); +} +SYSINIT(install_cpu_errata_late, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, + install_cpu_errata_late, NULL); From nobody Tue Oct 3 22:14:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XCs2wKPz4w3kH; Tue, 3 Oct 2023 22:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XCs258kz4rm8; Tue, 3 Oct 2023 22:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3u+lM7vDkSUyk4CAw9lMIABDM5JWIiMq0jhai/Tcmk=; b=ysTnmFxOgNV2HOsY8RawCcr788D6HUrfXmD4u+5q/j1Rpfmd5NPUhdZ28vf8wEAng+90HT P9sRMlYnMM1CLtdV8zTf617uwDQ7IBITjJBmACVcULEKNlW+WTV1xnApctfhJ7/ee+eSCc MEZgKKhdXSIbAji1N9HY2cnnPDDfLMboQnjQCJi6crQk533JtfQpG5XEaoOsAL/YEhATJK 96zVXH5rO1iTqC98Tuug0eoXAMo//1EFxdhE7YKHR2euoh7evcYvg7spWuOugopQnrxGJl NC20BcOQFqCkYkRX8sZ7nSBJ5vivWQM+OANclgfxO1WWqAPvVbblpHpfVsQ1lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371241; a=rsa-sha256; cv=none; b=Y531fpKzBW3UpAPexnVy1HkCZD77LLuplbX9a4FcEN5GILXerJbQ662C1+kq6g3XIMEuAS WW/898VVIPG1Ki0hQpbNmA9ZFUcFSpPkZvB6AEcBs0bKeycOyxJ+q2gOSglONxfJSoeo0i MgJmEOYMGBzySaQDdGxvTIbcMQcprGPQpoRDa8o++4nMoeufPiM0rG7jVuiNqt6JBI/PL1 C41LwgSg/qRISGbHCnK8V7/NzsijM7j0OI3iwacOh3cunXSPiBLlqHNeeXdRRUuA/B3xnd zxyKS+DWIHqBjWjEHk8Y8Km2rifI8EvFQJ1nx/NCoAu4hd0fGSKJCaDuA4p83g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3u+lM7vDkSUyk4CAw9lMIABDM5JWIiMq0jhai/Tcmk=; b=uCh5zH/aUOspoUB3JX/A6L1sdSeJcbm9csC4FyYj874Wl8w/13pqjybolAnWJBysdKRF3s XnSl21+X5U/i/WQvBEKwFjuENB93SxK+pWKEFxbKRbNMVjpsAq64GSCKBKo/fMS1MXB0Kr jJdH4hwFXo1+jRrv8OVIEc66aRrBiOBOEEkDkvWWIoC4M+cm8oeR9hjxIifKdNvlVvUh8G Jz5qhRzdZIjhWbVYP0tPaiCFSoLGgamqBTNDZnIACsZoiTUxg1+QsN2k8F7cWuZKg7jitM vEB2AfgVYVD2Wxe1FbSnjeQhLVvg9JDmhaJ26jcU5yUh2VHqnUUbqJkmzfvDwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XCs17vmz1BP7; Tue, 3 Oct 2023 22:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393ME1lU071136; Tue, 3 Oct 2023 22:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393ME151071133; Tue, 3 Oct 2023 22:14:01 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:01 GMT Message-Id: <202310032214.393ME151071133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: d20ece445acf - releng/13.2 - Add UPDATING entries and bump version. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: d20ece445acfc5d29ca096b38e30e4c0cb0b0d95 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=d20ece445acfc5d29ca096b38e30e4c0cb0b0d95 commit d20ece445acfc5d29ca096b38e30e4c0cb0b0d95 Author: Gordon Tetlow AuthorDate: 2023-10-03 21:51:35 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:51:35 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 14 ++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index ff18a91feaf9..a31fdd8cb027 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,20 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20231003: + 13.2-RELEASE-p4 FreeBSD-EN-23:12.freebsd-update + FreeBSD-SA-23:12.msdosfs + FreeBSD-SA-23:13.capsicum + FreeBSD-SA-23:14.smccc + + freebsd-update to 14.0 fails [EN-23:12.freebsd-update] + + Fix msdosfs data disclosure [SA-23:12.msdosfs] + + copy_file_range insufficient capability rights check [SA-23:13.capsicum] + + arm64 boot CPUs may lack speculative execution protections [SA-23:14.smccc] + 20230906: 13.2-RELEASE-p3 FreeBSD-EN-23:09.freebsd-update FreeBSD-EN-23:10.pci diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 31ce004e1417..c5c5d09070b8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.2" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Oct 3 22:14:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XD16CTxz4w4F9; Tue, 3 Oct 2023 22:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XD15MBbz4s7F; Tue, 3 Oct 2023 22:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDS74KMeLxvXnPYvZ/7X8C/1pnB2QK+YnREtvtRhHV0=; b=rUBbV1BkeKJlFVVZQn3vQgIbykkdomGFWcwrXVVlEGkPaUFeLy3IYKE5FeZhzhDk4Q1YrF CL/sALYxwbBKYM2uT2BX+Arulrb+vgr8Sfun9/72aM4maVnNSwLOjsv3UN3tbQTM6BNclH IIw/2Te//ru5jAVtMHl8C66Hqs519BnXCaS1r3uLcPtWHkmECST3mxRi7nNtF4Q0HT2lEi iGpPgt21a6mezYG2GbCil0nV9J3PbTlf9AYF0mAbeIr8HN8+EVL/PKmdrPPkrqzCtnjGnZ 3rRkKZ8eBHDxpSk2WYZNNWdM4uE0JeqRpfLY/2c6AOvnl9Zr1TktLCKeW7V4Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371249; a=rsa-sha256; cv=none; b=AORZn1A3FZyW0inzxF46bMJWgVfnhF3pHV9TUZ/vc58b2Y0x4AfrivVKU7pqYmAN3XybRY vO2B/SGuHb+sz4+Vm/gR2vZ23KOB2uRuL8mUtaqHMqhUYLpDL83YEbqMNy9Lpu/6xaQrPL jpWTWUKrNJyxFfkmBXEk3lOVEkE6I5tidV1xqUlE0+kbaOgQvjWh/p5E5i9pNSITRMPbT9 94GhLS3TThk3nKoctbpRG3zJ/Xp2qvUG5l9PRNIJAmsNq92KSfHPs/K6WWkF/bNFpu8pvt UZYJNNF9X3Gm9ES8Num2UhmawwMabNocP53k0yD/R9A4NT/uHHz64x+0BntlhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDS74KMeLxvXnPYvZ/7X8C/1pnB2QK+YnREtvtRhHV0=; b=RpG4iatoOP6xgdvJDZzv377x9TcZ3yv90jrvCloWnWN4HXqsDuSkEXP0kTz1S5sUByXkhH +F7d9tcUkMgGLOs0gIJHf9LL0UeWS0knYwc6WigjTpOMOIVec45dzcTcX+L/NOLn+kwhrj 2JMXXsldPDCDkzqdOsZrS8j1q69pg7zxE9OQFDQ4N3M/Ywx82eCLJZMEesJzJOXaoGR16/ A1JX7FtCvCMrXoXrC/vWJrZx8W7LzmKLGD3vCIUVImlivef2zRpwpk2wxF/xhkZX+O3/fV x2c6m7RuAZyCSMS/35p7hKizp37BTOoMm4JzVRRNT5a/8SdIAB6yAs2pYHlGIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XD14Rt3z1BrC; Tue, 3 Oct 2023 22:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393ME9So071326; Tue, 3 Oct 2023 22:14:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393ME9dY071323; Tue, 3 Oct 2023 22:14:09 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:09 GMT Message-Id: <202310032214.393ME9dY071323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 193b7e3d0af5 - releng/12.4 - freebsd-update: Fix merging already-updated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: 193b7e3d0af5205f770c30620711889eff324ae8 Auto-Submitted: auto-generated The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=193b7e3d0af5205f770c30620711889eff324ae8 commit 193b7e3d0af5205f770c30620711889eff324ae8 Author: Colin Percival AuthorDate: 2023-05-05 03:00:58 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:08:36 +0000 freebsd-update: Fix merging already-updated files When performing an "upgrade" (moving between FreeBSD releases, as opposed to "update" which merely applies security/errata updates to the installed release) FreeBSD Update: 1. Generates a list of "files needing to be merged", namely those files which don't match the version installed in the "old" release and have paths matching the MergeChanges configuration directive (by default, /boot/device.hints and everything under /etc/). and later on, 2. Compares the currently-installed files to the versions in the "new" release, removing index entries for files which "don't need to be updated because they're not changing". Unfortunately if a file falls into both of these categories -- that is to say, if a file in /etc/ is the same as the version in the new release and not the same as the version in the old release -- the resulting "merge" step saw that the file was no longer listed as being part of the new release, resulting in the file being deleted. For the first 18 years of FreeBSD Update's existence, this never happened, since $FreeBSD$ tags resulted in "new release" files always being different from any files systems would already have installed. This commit fixes this behaviour by only placing a file into the "files needing to be merged" list if it does not match the version in the old release *or* the version in the new release. Reported by: des Reviewed by: delphij (earlier version), des, emaste Approved by: so Security: FreeBSD-EN-23:09.freebsd-update Differential Revision: https://reviews.freebsd.org/D39973 (cherry picked from commit c55b7e522629cb78adeb54bd9964304481d55eab) (cherry picked from commit 5f446a12dac2a8be8a1b4fc53a383d18896df611) --- usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 9743cd652d16..57d94a25881a 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1677,11 +1677,12 @@ fetch_inspect_system () { echo "done." } -# For any paths matching ${MERGECHANGES}, compare $1 and $2 and find any -# files which differ; generate $3 containing these paths and the old hashes. +# For any paths matching ${MERGECHANGES}, compare $2 against $1 and $3 and +# find any files with values unique to $2; generate $4 containing these paths +# and their corresponding hashes from $1. fetch_filter_mergechanges () { # Pull out the paths and hashes of the files matching ${MERGECHANGES}. - for F in $1 $2; do + for F in $1 $2 $3; do for X in ${MERGECHANGES}; do grep -E "^${X}" ${F} done | @@ -1689,9 +1690,10 @@ fetch_filter_mergechanges () { sort > ${F}-values done - # Any line in $2-values which doesn't appear in $1-values and is a - # file means that we should list the path in $3. - comm -13 $1-values $2-values | + # Any line in $2-values which doesn't appear in $1-values or $3-values + # and is a file means that we should list the path in $3. + sort $1-values $3-values | + comm -13 - $2-values | fgrep '|f|' | cut -f 1 -d '|' > $2-paths @@ -1703,10 +1705,10 @@ fetch_filter_mergechanges () { while read X; do look "${X}|" $1-values | head -1 - done < $2-paths > $3 + done < $2-paths > $4 # Clean up - rm $1-values $2-values $2-paths + rm $1-values $2-values $3-values $2-paths } # For any paths matching ${UPDATEIFUNMODIFIED}, remove lines from $[123] @@ -2698,7 +2700,7 @@ upgrade_run () { # Based on ${MERGECHANGES}, generate a file tomerge-old with the # paths and hashes of old versions of files to merge. - fetch_filter_mergechanges INDEX-OLD INDEX-PRESENT tomerge-old + fetch_filter_mergechanges INDEX-OLD INDEX-PRESENT INDEX-NEW tomerge-old # Based on ${UPDATEIFUNMODIFIED}, remove lines from INDEX-* which # correspond to lines in INDEX-PRESENT with hashes not appearing From nobody Tue Oct 3 22:14:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XD30cbWz4w4Bm; Tue, 3 Oct 2023 22:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XD26WG1z4s7n; Tue, 3 Oct 2023 22:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BR/p81fNWkPFFZ9ELo3+l2Jr25F8ZKnEggakkoOf6dA=; b=pgA7XNxmyL5t5Z4REuCd6+Q7VOENGxzKtSRWJscTi5opAmrXhR+QKShGyO/E2liaxPEKWR S+DgR7LEC98pNLQ71OaHnwKIHG8s88s8sjVZNG/OJqqqkMvye+9xZNMn/p6Ib98zkfBq4P QVgEZza1sAsVKlPFl8/kOICOOKag7A3bydUpYX4kxnB7JWgjqDBnqBzXnjhW6ABQDMBWr+ q6p/Za+lFEP2KSz6JiWBJqI3NEDUL3aAV3nHMod5cCnJbgqerzM6/zjsLeteEJIVn9dHCm SrskP0w931Iemtm1F24v/7TzyNNNY4ddLHs4XP8MiWgCelG313HdOJGr2Vf5Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371251; a=rsa-sha256; cv=none; b=QsxVYoBUtwFfkegC7nrrsl7odglfW6rtw6HWg9MAZlXDY9qzpGdCsPGqlPkDvlVqZz0fFy +18Apa8QBDd8T4Gfm117Pz0QsjxSZxyThokC12HevgPGLdLf0KdJXaDu/3EDCHBRImkh4U wC9ph4GqHg2ztU04u6kWoFiLW7T1YauDT+rgQC55/NdSz7XI/5IM4zZyGs7MHMX87eVZTt 46gWxhUKzkD2KrQsurOIzlXWu3qfySJwTnPdQrtdcMzRcdIizlQBM4TB2/YszAAg9NF+RD rxieA7Zxqw9U2mQO62/XGMJr+IlTHWrqOVkopn1guESaU+gImn+KCWJqan+tWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BR/p81fNWkPFFZ9ELo3+l2Jr25F8ZKnEggakkoOf6dA=; b=fFySlpNIXsfo8qoT5K/iGAsjgK+Jobu03O/E17e1br4qT/J1Lctc6EwdrYYaDmadWbNzc+ w8cAFFOKlg/wrgvehEpOxeF4RiU/4b2bQAbyqiwYIp3jo7P8Xu7FF+BRcW90xNryMtK00i rU5tlT6/Eu0pxPczs/zPn7V01Pl6rRD5DRjuAFeEuSH4WjgUEiuC5j2YUJW+sp/jpBOdDP c2dy6lgMckpQ14c0BzKqhcvvvDs3XnGyl4b7yICFmwfbnaO9WPUGACXNBxs5Rsx1Qgo+6k QdxQDOK2RrAHWtrfuBN3id6PVPzACt82taDNrlCExoPDYjD+nf60OIDbAZa87g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XD25ZjFz1BrD; Tue, 3 Oct 2023 22:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MEA4f071374; Tue, 3 Oct 2023 22:14:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MEAxG071371; Tue, 3 Oct 2023 22:14:10 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:10 GMT Message-Id: <202310032214.393MEAxG071371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 0eb6c273622d - releng/12.4 - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: 0eb6c273622d77a89115e7d4f01609eefc50b33c Auto-Submitted: auto-generated The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=0eb6c273622d77a89115e7d4f01609eefc50b33c commit 0eb6c273622d77a89115e7d4f01609eefc50b33c Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:10:42 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Approved by: so Security: FreeBSD-EN-23:12.freebsd-update Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 (cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85) (cherry picked from commit 274281864fc03c62443677751bf3036fbbf9d778) --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 57d94a25881a..324e838fd8a7 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2892,7 +2892,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Tue Oct 3 22:14:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XD42qpFz4w3kM; Tue, 3 Oct 2023 22:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XD374Pnz4sRD; Tue, 3 Oct 2023 22:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=70wGmAoku8H9gO49mTIpzrx2sCYQ2H8Gui4zLBy/zwI=; b=KBgBClaKsKHJKzhRs3KVmR4M9/SxND7hko0u1GhCrsszzfuJW7Xft0bfMC5ucGVPxPEXaC 6d+OYj+cXgxL9LaHEq4HMMwvhPggISIzW7MfURonzmoipnW+YEpFOYHPrvzDHkIlhlIzsx HqjPJSk4qnTsmQAQ9cwICmrwe4rZkh5Hsx4QxM0PSQaQxUXOwEZ8JqSYampnzlBQus6H6Z 8NYn8CoPQ17ihMgujCmH0hJxVIT7uKGaHpNF0nPss04pCH50ppPQERmhkaYLE+iGEqxKuS /B47r7oPzojBjVbKuWwUcFnP8cnzlNAmNiN5RhWV+HPXkrS+M/UaiYNR/8UM4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371252; a=rsa-sha256; cv=none; b=BJpaqp/TxwS3TLeq+3zxv/ZhMTvA9tHbbOE0ONmthYVQaSBvite/aq7c/CDeEXWklav79W FZpUVoKCWbXr2Cx5Hfpf5wYZs7j8lmCePsfs22k/OMMAhF146AfvrKp9T/0KrfiZSDRIPx vdln5O1+MtLP4lvU+NCTlyjqasNSaFYpo6oG5G2jV2SETx9Ceold44ABfir/nk663sV1kg AUBrD4o432VBaEydX2TW6gnqPk+4/rY53H9MLFQdN9ZlPKD85SpqCkVYfThw5GkH9Dthm2 XvDnQyj9g5DWv6CTU/prK7qKolKy6sjCTm+0hGOxOdlaDO3y2NBeXXcsNL3OlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=70wGmAoku8H9gO49mTIpzrx2sCYQ2H8Gui4zLBy/zwI=; b=olS64llP7GqF4Y6WszF63SxpPPDmCqszwOKOxqbASW26wL5efM2Zwrw2zNJaBloy7u7GVi Dpll8zEyiCqjeDN8nHJUbxFqz362h8h0phWUuEhZX35mL2ue0yKWB+QkOwXsckDwcJYZmH qdRkTRh+1GLKDkJzlmmRrCmOjubQjCIj86ypHbpz7mkM06I/gVJACFgRorSqv4bMTpYNT6 gGVKSX2AxfNrhZL31iU0GzMyMhKRYcmpwhULeSETNHiRWnRypZh6+9vioemcrT9mZYvhS5 j7WsEPCQEXXdiiXlfPJCQ8nPzB9qAsswBLjskDhoQaol5ddjoXQYd19lR+XrFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XD36BHdz1C0X; Tue, 3 Oct 2023 22:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MEBIX071419; Tue, 3 Oct 2023 22:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MEBoB071416; Tue, 3 Oct 2023 22:14:11 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:11 GMT Message-Id: <202310032214.393MEBoB071416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: bb2ccf50d7f7 - releng/12.4 - msdosfs: zero partially valid extended cluster List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: bb2ccf50d7f7c740743b29a26e2444e364df431e Auto-Submitted: auto-generated The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=bb2ccf50d7f7c740743b29a26e2444e364df431e commit bb2ccf50d7f7c740743b29a26e2444e364df431e Author: Gordon Tetlow AuthorDate: 2023-10-03 21:14:47 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:14:47 +0000 msdosfs: zero partially valid extended cluster Approved by: so Security: FreeBSD-SA-23:12.msdosfs Security: CVE-2023-5368 --- sys/fs/msdosfs/msdosfs_denode.c | 53 +++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index db9e0712d2b1..3b4e809d6196 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -365,10 +365,8 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) return (EINVAL); } - if (dep->de_FileSize < length) { - vnode_pager_setsize(DETOV(dep), length); + if (dep->de_FileSize < length) return deextend(dep, length, cred); - } /* * If the desired length is 0 then remember the starting cluster of @@ -477,13 +475,16 @@ int deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; + struct vnode *vp = DETOV(dep); + struct buf *bp; + off_t eof_clusteroff; u_long count; int error; /* * The root of a DOS filesystem cannot be extended. */ - if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) + if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) return (EINVAL); /* @@ -503,15 +504,47 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) if (count > pmp->pm_freeclustercount) return (ENOSPC); error = extendfile(dep, count, NULL, NULL, DE_CLEAR); - if (error) { - /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, cred); - return (error); - } + if (error != 0) + goto rewind; } + + /* + * For the case of cluster size larger than the page size, we + * need to ensure that the possibly dirty partial buffer at + * the old end of file is not filled with invalid pages by + * extension. Otherwise it has a contradictory state of + * B_CACHE | B_DELWRI but with invalid pages, and cannot be + * neither written out nor validated. + * + * Fix it by proactively clearing extended pages. Need to do + * both vfs_bio_clrbuf() to mark pages valid, and to zero + * actual buffer content which might exist in the tail of the + * already valid cluster. + */ + error = bread(vp, de_cluster(pmp, dep->de_FileSize), pmp->pm_bpcluster, + NOCRED, &bp); + if (error != 0) + goto rewind; + vfs_bio_clrbuf(bp); + eof_clusteroff = de_cn2off(pmp, de_cluster(pmp, dep->de_FileSize)); + vfs_bio_bzero_buf(bp, dep->de_FileSize - eof_clusteroff, + pmp->pm_bpcluster - dep->de_FileSize + eof_clusteroff); + if (!DOINGASYNC(vp)) + (void)bwrite(bp); + else if (vm_page_count_severe() || buf_dirty_count_severe()) + bawrite(bp); + else + bdwrite(bp); + + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); + return (deupdat(dep, !DOINGASYNC(vp))); + +rewind: + /* truncate the added clusters away again */ + (void)detrunc(dep, dep->de_FileSize, 0, cred); + return (error); } /* From nobody Tue Oct 3 22:14:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0XD52wckz4w3wC; Tue, 3 Oct 2023 22:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0XD51Bvrz4sV1; Tue, 3 Oct 2023 22:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/mpP2sgNXJ8h1/FY+KAepxCnpumk3b9Q/F1Y0XH3Nik=; b=eJwvkw9oj46O+th/vJP8r5jHoCDwUmacwXtX/ivuC6mE8WWnXxyNm89yx4JtJsb8mMphOj bptaZIqrYRpke415+eueXFz6v5K7sNQZsuxqb6ub906bdr7TH0iXstdTyTXThjSymnJXEA T8U5YxInEujYbWTVMR9u5FacQ9BxSTo8SEBH8xgOTykhF5hrAm8Sjiwn+B1KW376/3m8uU QfVLQZ63qyThWOpv9D5HL42x4Umo3UMZolIfifYiVlvQOccIZoR0F0kuXH+c/+7hOQ1The pjazdePRHF5NduGiEN3dRI1z2+tHkK61bSZ92hg4AapVHgPPbPWKDV9E80pQnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696371253; a=rsa-sha256; cv=none; b=yjjHdZ2we69vAZCX791rLXndwKzHlOh/RBumoKiXmoz1FAfh5/f7qpbODd+5Wriz34Ni/b IEIwFzV25StQIFGG2E7WA6v1Ntn00e9NvAP5DhwynaH3PKeBp0TFCzVDY27hTDAua1E2pS ZzfAhXzzgiWZjnrUiID5Yf7bC2DrXPRV7TmhnKwdM5awM/gUo7J/mqkkUmB9iXrnY4G6xW KKd52cMR4+n0jvW+29AyYn+Ix8sisWq2qh+auKoSJ1sLWiheb/OnRbx3LVb8zPp2ITlqox MT1WnU7yV/oiao2BUTo+tJ4X70lriN/2W+Tz+LRLE004+bGi6Il9H3+Ux8jgGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696371253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/mpP2sgNXJ8h1/FY+KAepxCnpumk3b9Q/F1Y0XH3Nik=; b=qSObZfM6Cq9Ej6HWJ+vDzAj66m72+FYetPMIefcGXheYXKGV9MUkm9VuFBUQo5OBSy9D4n VqGSoCDra/zXlUnWMbSR21XvpKmYVefcFJHVPjPAUpB/LlC+a2LAASFuXk8oLYiEzMJO+h MGljYkebVWIN25D8U7Wci7W1HxGqg6sIIiszN7Nt0f2LG2dRPi6HWSXhqLJKeJieLmM2Tk 4rcYsS/41Qcl1jlQF/kJ7c2a0+nWf5MUTV2/J+h4OoYQ6B8mSpbsvwbXbbpY9nl7B5m5yM GFgrmtLFT6apOP7vlKUCM7LLCY8e+AIW697LkgOynzoTIBH8uAAP7qqD39+sIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0XD50FRFz1BZW; Tue, 3 Oct 2023 22:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 393MECwU071472; Tue, 3 Oct 2023 22:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 393MECwh071469; Tue, 3 Oct 2023 22:14:12 GMT (envelope-from git) Date: Tue, 3 Oct 2023 22:14:12 GMT Message-Id: <202310032214.393MECwh071469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: b1b39c2f2fe4 - releng/12.4 - Add UPDATING entries and bump version. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.4 X-Git-Reftype: branch X-Git-Commit: b1b39c2f2fe4067527d96dfcda70e556a817ff41 Auto-Submitted: auto-generated The branch releng/12.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=b1b39c2f2fe4067527d96dfcda70e556a817ff41 commit b1b39c2f2fe4067527d96dfcda70e556a817ff41 Author: Gordon Tetlow AuthorDate: 2023-10-03 21:19:27 +0000 Commit: Gordon Tetlow CommitDate: 2023-10-03 21:19:27 +0000 Add UPDATING entries and bump version. Approved by: so --- UPDATING | 11 +++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index ecde75536cbc..100c281c3786 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,17 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20231003: + 12.4-RELEASE-p6 FreeBSD-EN-23:09.freebsd-update + FreeBSD-EN-23:12.freebsd-update + FreeBSD-SA-23:12.msdosfs + + freebsd-update incorrectly merges files on upgrade [EN-23:09.freebsd-update] + + freebsd-update to 14.0 fails [EN-23:12.freebsd-update] + + Fix msdosfs data disclosure [SA-23:12.msdosfs] + 20230906: 12.4-RELEASE-p5 FreeBSD-SA-23:10.pf FreeBSD-SA-23:11.wifi diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index bb919a38da7d..fa6d3e9340b8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.4" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Oct 4 00:42:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bWS5mf0z4wHZQ; Wed, 4 Oct 2023 00:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bWS4nc7z4VdC; Wed, 4 Oct 2023 00:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696380164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UjlXti0T8FOimFChp6e1wZ3e7ObQM/YOqXuy3tFKHgk=; b=PfJDtSYEXa9gM8Q0lQJnDaiYsW/J2G+K5S5VFJF4k+CfVCCIVYrJVZkS4kf177P+Vu9Zp9 plmPl5ao2r9J719pTnAyPmQGJ+Pn9YYfGTfn4XhNhiDrOVaSipYlMun4RSAjlf9xSZtj9n 2/g5vNjp2BGxOzn4QPeAsMe/rmfh9SPpDOStn2ORFK69diAeFB7CRpn4RLviLLWm8n8KFf Cv21x6h/sKP+y8eQnIPFWMZ+9IpgaIp9vtmuRxHKdXrUNvx2k0j+3a6BYQVWwenCuBfEmR 8zLa9mRZI1XWgqixx/csrwcaPuH4JVvM+nh10olhAT8eg7CwqyRpiWyzHIIcKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696380164; a=rsa-sha256; cv=none; b=VvtuvEP7pQ1mtrhBQ2YPgw9kpLhuf9MDRBrDpOeBIxObjvYVlhSEasRLNTGIRiQJ7Sm1fw /j5ZQkawYkb+Mvc4+yRDKIM6w/jrfNb3fjk/YpuODWXHvlMPM46soRoJsgDbLF80goGtPw 3jIJasTLShxaUAstbJxkAGJgo8mY+aJrzqf9eVHOomEAUUUJHHqt5Um+jT15DNDrEp0G0G lpTWutiF8KLIDa6S0qXr+QAo5AVPl6pcWKxYZDn7RZ7M1GJiJAFguXFXPq9XUMhmzqhgyk U5pO3FY46LsVLghTYPzFNMh91kE9UFJns/E+tdFM3c2nwZFtZmwoRD0b6UIuZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696380164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UjlXti0T8FOimFChp6e1wZ3e7ObQM/YOqXuy3tFKHgk=; b=aUHPX21MPk9CWu/cCF2uuipAcqJ1vG/z6pyoC6PqkRyIZdns78p3lbyEbScYf8IemEl/kM jR9rLRLQte07ZN8HimeoOp31D4Vmz1P3+w5JfMNKiwwufipRu8y2WrSH3pX/+cr68+gS9p QhkUR3zup7AZAnNvpJg3z4tZ2Stdg4YTyXl7xWRp6hjFF2qxYw+NdhL/3uWhopRmIibohR fZSa5vQdIx5vouSfROlrz7zfPzXqdB5daFK9qfe7tCndwAZOBBBsxF8IoCh1ZQgYt6CZxd 9KJtxiLvnDgHe+oTyL2WHpzEKLMhRSut+9wMiQrpFa31c6QEYDtjrOp2JF1XGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bWS3qmyz2dY; Wed, 4 Oct 2023 00:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3940gitb020548; Wed, 4 Oct 2023 00:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3940giQR020545; Wed, 4 Oct 2023 00:42:44 GMT (envelope-from git) Date: Wed, 4 Oct 2023 00:42:44 GMT Message-Id: <202310040042.3940giQR020545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 56a2b5d640f7 - stable/14 - ObsoleteFiles.inc: only leave ofwdump.8.gz when WITH_FDT is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 56a2b5d640f71ce1630f923e562b5878e1b6f945 Auto-Submitted: auto-generated The branch stable/14 has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=56a2b5d640f71ce1630f923e562b5878e1b6f945 commit 56a2b5d640f71ce1630f923e562b5878e1b6f945 Author: Piotr Kubaj AuthorDate: 2023-10-01 21:36:37 +0000 Commit: Piotr Kubaj CommitDate: 2023-10-04 00:42:32 +0000 ObsoleteFiles.inc: only leave ofwdump.8.gz when WITH_FDT is set Approved by: mhorne Differential Revision: https://reviews.freebsd.org/D41905 MFC after: 3 days (cherry picked from commit 4cf8075264c9db8f3e39a1f17def58cda8803853) --- ObsoleteFiles.inc | 5 ----- tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 589f6b968e9d..6f07b70494f8 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -17648,11 +17648,6 @@ OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif -.if ${TARGET_ARCH} != "aarch64" && ${TARGET} != "arm" && \ - ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "powerpc64" && \ - ${TARGET_ARCH} != "sparc64" && ${TARGET} != "mips" -OLD_FILES+=usr/share/man/man8/ofwdump.8.gz -.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 82ea542d7f55..b782f8d102b0 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2015,6 +2015,10 @@ OLD_DIRS+=usr/share/examples/uefisign OLD_DIRS+=usr/share/examples/ypldap .endif +.if ${MK_FDT} == no +OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif + .if ${MK_FINGER} == no OLD_FILES+=usr/bin/finger OLD_FILES+=usr/share/man/man1/finger.1.gz From nobody Wed Oct 4 01:01:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxG5CYhz4wK1N; Wed, 4 Oct 2023 01:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxG52jtz4XJL; Wed, 4 Oct 2023 01:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkvRv282KAXwkdesL+E1nvmMWiIzv9GhjVXwf1Y8vfI=; b=swS63W6XTD3a5v7GSKq4/YUnw5sg6UNhWBJban7zkNPH6Basn8cISzQqSlarl/GbXbk4mv jqK418Cz1Yv81IoyViCIpBJDoC7VsWMCKzEy2amb8uS8OU6UG6sL83i0ftsDQFE8fwRLSd EJovKqOaPgpCe6aseqyzuITXl4RSFinW4YTCRDXAe9LujZEsbVrmckbXTiyf71qKYI4wHf 03rhMzZPB8BJxeDOCcQOp/tp7J1Lm+qsaoiT07R7aGo5tG+iKdA+j8bGc+gFovBMSIQ4BB 7anpvCsgev3aRl9/nGR8amA/MpcB++UmapeHy8fvFzC0Pwu02Qc4q1HbhTpI6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381298; a=rsa-sha256; cv=none; b=ZVe7DvwNCh81xNr5d0aAi2/Jawapt6Dbq0cJwjbVfXeyJakETmv5oRp9NuV129ZcIzlvhX mcG2OuNS2gvrt7lT7C9I/okNsP/UAVD8eiIVT9IjNs3FvxvscCwUZR7xrYlNK29HsOgyWW xvxUBoIvJW8mhgB0ojPPpxBlN7i1q7xo/MBZcbE+45+G4gh6kRDcDkKY/pCzLPN0ICorkY EoTC64ypC32xefG31TEW8riZXkdO5D8XzAwJUyhb3IUvNOdoEtgFtShWnD79jwReDqViMC n+yirBcm3rMJGEHYVidjUnTVbWHSicjxWXuwpZ8VLDMAQYufkIx011amkgNwgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkvRv282KAXwkdesL+E1nvmMWiIzv9GhjVXwf1Y8vfI=; b=qPKHuQpR7JNEPj3OsjlvLe9errG/+cFkes2RhNdwR8LSRsNhok7PC/PXd1xifUUAjEUaSW xVH7q4fzX7vGLnC/h5DlI8kC5cxNeCwLW4zkEw2UJRj+tD0yXIm0Zs0oeUMmSJSMpcpxO7 wot4NoCM+gloz1x3CpAMbNzHwIPsuwMezn8MgoDXN5LjW9dFLK4r1agMNNkb+RDVq4d1/G QYY6ycjwFwUYqnPEKiVjldzRxXFEON+06AB5FH2aU8mEUskh0wL2DTKI5rNXU8Qryo/WQG /78tnXziHNECgQF0OdjpZXR81/VqDIi/ZbYiGCysR/yvZSHJuMz7mMIPNTfcjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxG4701z2m5; Wed, 4 Oct 2023 01:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39411cUD049047; Wed, 4 Oct 2023 01:01:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39411cIT049044; Wed, 4 Oct 2023 01:01:38 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:01:38 GMT Message-Id: <202310040101.39411cIT049044@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: 36eb0dc68ba1 - stable/14 - sqlite3: Vendor import of sqlite3 3.43.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 36eb0dc68ba1ab12444f7ceb297e083debf69335 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=36eb0dc68ba1ab12444f7ceb297e083debf69335 commit 36eb0dc68ba1ab12444f7ceb297e083debf69335 Author: Cy Schubert AuthorDate: 2023-09-19 15:06:50 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:06 +0000 sqlite3: Vendor import of sqlite3 3.43.1 Release notes at https://www.sqlite.org/releaselog/3_43_1.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main (cherry picked from commit ec994981447e8a974426660b5071bc405280af73) --- contrib/sqlite3/Makefile.am | 2 +- contrib/sqlite3/Makefile.in | 2 +- contrib/sqlite3/Makefile.msc | 27 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1019 +++- contrib/sqlite3/sqlite3.1 | 161 +- contrib/sqlite3/sqlite3.c | 7881 +++++++++++++++++++++--------- contrib/sqlite3/sqlite3.h | 106 +- contrib/sqlite3/sqlite3ext.h | 4 + contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 20 +- contrib/sqlite3/tea/configure.ac | 2 +- contrib/sqlite3/tea/generic/tclsqlite3.c | 33 +- 14 files changed, 6509 insertions(+), 2772 deletions(-) diff --git a/contrib/sqlite3/Makefile.am b/contrib/sqlite3/Makefile.am index 694419b27dfd..1eaa560ff884 100644 --- a/contrib/sqlite3/Makefile.am +++ b/contrib/sqlite3/Makefile.am @@ -9,7 +9,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h diff --git a/contrib/sqlite3/Makefile.in b/contrib/sqlite3/Makefile.in index d45c6b8f4cde..fe708a0a9d84 100644 --- a/contrib/sqlite3/Makefile.in +++ b/contrib/sqlite3/Makefile.in @@ -371,7 +371,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 09daa867eced..13663d877757 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -52,6 +52,13 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF +# Set this non-0 to use structured exception handling (SEH) for WAL mode +# in the core library. +# +!IFNDEF USE_SEH +USE_SEH = 1 +!ENDIF + # Set this non-0 to have the shell executable link against the core dynamic # link library. # @@ -180,6 +187,12 @@ WIN32HEAP = 0 OSTRACE = 0 !ENDIF +# enable address sanitizer using ASAN=1 on the command-line. +# +!IFNDEF ASAN +ASAN = 0 +!ENDIF + # Set this to one of the following values to enable various debugging # features. Each level includes the debugging options from the previous # levels. Currently, the recognized values for DEBUG are: @@ -311,6 +324,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF +# Should structured exception handling (SEH) be enabled for WAL mode in +# the core library? +# +!IF $(USE_SEH)!=0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!ENDIF + # These are the "extended" SQLite compilation options used when compiling for # the Windows 10 platform. # @@ -718,6 +738,13 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 !ENDIF +# Address sanitizer if ASAN=1 +# +!IF $(ASAN)>0 +TCC = $(TCC) /fsanitize=address +!ENDIF + + # Compiler options needed for programs that use the readline() library. # !IFNDEF READLINE_FLAGS diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 1016e350c37f..39694c06793b 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.42.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.43.1. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.42.0' -PACKAGE_STRING='sqlite 3.42.0' +PACKAGE_VERSION='3.43.1' +PACKAGE_STRING='sqlite 3.43.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.42.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.43.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.42.0:";; + short | recursive ) echo "Configuration of sqlite 3.43.1:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.42.0 +sqlite configure 3.43.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.42.0, which was +It was created by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.42.0' + VERSION='3.43.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.42.0, which was +This file was extended by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.42.0 +sqlite config.status 3.43.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index a706a4753049..3d7da8b984c3 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.42.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.43.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 647a214226cc..6b2cdca83d6b 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -246,6 +246,7 @@ typedef unsigned char u8; #if SQLITE_OS_WINRT #include #endif +#undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #include @@ -1224,6 +1225,46 @@ static char *shellFakeSchema( return s.z; } +/* +** SQL function: strtod(X) +** +** Use the C-library strtod() function to convert string X into a double. +** Used for comparing the accuracy of SQLite's internal text-to-float conversion +** routines against the C-library. +*/ +static void shellStrtod( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + char *z = (char*)sqlite3_value_text(apVal[0]); + UNUSED_PARAMETER(nVal); + if( z==0 ) return; + sqlite3_result_double(pCtx, strtod(z,0)); +} + +/* +** SQL function: dtostr(X) +** +** Use the C-library printf() function to convert real value X into a string. +** Used for comparing the accuracy of SQLite's internal float-to-text conversion +** routines against the C-library. +*/ +static void shellDtostr( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + double r = sqlite3_value_double(apVal[0]); + int n = nVal>=2 ? sqlite3_value_int(apVal[1]) : 26; + char z[400]; + if( n<1 ) n = 1; + if( n>350 ) n = 350; + sprintf(z, "%#+.*e", n, r); + sqlite3_result_text(pCtx, z, -1, SQLITE_TRANSIENT); +} + + /* ** SQL function: shell_module_schema(X) ** @@ -1473,7 +1514,7 @@ struct DIR { #endif /* -** Provide the function prototype for the POSIX compatiable getenv() +** Provide the function prototype for the POSIX compatible getenv() ** function. This function is not thread-safe. */ @@ -1799,6 +1840,188 @@ int sqlite3MemTraceDeactivate(void){ } /************************* End ../ext/misc/memtrace.c ********************/ +/************************* Begin ../ext/misc/pcachetrace.c ******************/ +/* +** 2023-06-21 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This file implements an extension that uses the SQLITE_CONFIG_PCACHE2 +** mechanism to add a tracing layer on top of pluggable page cache of +** SQLite. If this extension is registered prior to sqlite3_initialize(), +** it will cause all page cache activities to be logged on standard output, +** or to some other FILE specified by the initializer. +** +** This file needs to be compiled into the application that uses it. +** +** This extension is used to implement the --pcachetrace option of the +** command-line shell. +*/ +#include +#include +#include + +/* The original page cache routines */ +static sqlite3_pcache_methods2 pcacheBase; +static FILE *pcachetraceOut; + +/* Methods that trace pcache activity */ +static int pcachetraceInit(void *pArg){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p)\n", pArg); + } + nRes = pcacheBase.xInit(pArg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p) -> %d\n", pArg, nRes); + } + return nRes; +} +static void pcachetraceShutdown(void *pArg){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShutdown(%p)\n", pArg); + } + pcacheBase.xShutdown(pArg); +} +static sqlite3_pcache *pcachetraceCreate(int szPage, int szExtra, int bPurge){ + sqlite3_pcache *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d)\n", + szPage, szExtra, bPurge); + } + pRes = pcacheBase.xCreate(szPage, szExtra, bPurge); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d) -> %p\n", + szPage, szExtra, bPurge, pRes); + } + return pRes; +} +static void pcachetraceCachesize(sqlite3_pcache *p, int nCachesize){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCachesize(%p, %d)\n", p, nCachesize); + } + pcacheBase.xCachesize(p, nCachesize); +} +static int pcachetracePagecount(sqlite3_pcache *p){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p)\n", p); + } + nRes = pcacheBase.xPagecount(p); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p) -> %d\n", p, nRes); + } + return nRes; +} +static sqlite3_pcache_page *pcachetraceFetch( + sqlite3_pcache *p, + unsigned key, + int crFg +){ + sqlite3_pcache_page *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d)\n", p, key, crFg); + } + pRes = pcacheBase.xFetch(p, key, crFg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d) -> %p\n", + p, key, crFg, pRes); + } + return pRes; +} +static void pcachetraceUnpin( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + int bDiscard +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xUnpin(%p, %p, %d)\n", + p, pPg, bDiscard); + } + pcacheBase.xUnpin(p, pPg, bDiscard); +} +static void pcachetraceRekey( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + unsigned oldKey, + unsigned newKey +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xRekey(%p, %p, %u, %u)\n", + p, pPg, oldKey, newKey); + } + pcacheBase.xRekey(p, pPg, oldKey, newKey); +} +static void pcachetraceTruncate(sqlite3_pcache *p, unsigned n){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xTruncate(%p, %u)\n", p, n); + } + pcacheBase.xTruncate(p, n); +} +static void pcachetraceDestroy(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xDestroy(%p)\n", p); + } + pcacheBase.xDestroy(p); +} +static void pcachetraceShrink(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShrink(%p)\n", p); + } + pcacheBase.xShrink(p); +} + +/* The substitute pcache methods */ +static sqlite3_pcache_methods2 ersaztPcacheMethods = { + 0, + 0, + pcachetraceInit, + pcachetraceShutdown, + pcachetraceCreate, + pcachetraceCachesize, + pcachetracePagecount, + pcachetraceFetch, + pcachetraceUnpin, + pcachetraceRekey, + pcachetraceTruncate, + pcachetraceDestroy, + pcachetraceShrink +}; + +/* Begin tracing memory allocations to out. */ +int sqlite3PcacheTraceActivate(FILE *out){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch==0 ){ + rc = sqlite3_config(SQLITE_CONFIG_GETPCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &ersaztPcacheMethods); + } + } + pcachetraceOut = out; + return rc; +} + +/* Deactivate memory tracing */ +int sqlite3PcacheTraceDeactivate(void){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch!=0 ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + memset(&pcacheBase, 0, sizeof(pcacheBase)); + } + } + pcachetraceOut = 0; + return rc; +} + +/************************* End ../ext/misc/pcachetrace.c ********************/ /************************* Begin ../ext/misc/shathree.c ******************/ /* ** 2017-03-08 @@ -2683,41 +2906,24 @@ static void decimal_free(Decimal *p){ } /* -** Allocate a new Decimal object. Initialize it to the number given -** by the input string. +** Allocate a new Decimal object initialized to the text in zIn[]. +** Return NULL if any kind of error occurs. */ -static Decimal *decimal_new( - sqlite3_context *pCtx, - sqlite3_value *pIn, - int nAlt, - const unsigned char *zAlt -){ - Decimal *p; - int n, i; - const unsigned char *zIn; +static Decimal *decimalNewFromText(const char *zIn, int n){ + Decimal *p = 0; + int i; int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); - if( p==0 ) goto new_no_mem; + if( p==0 ) goto new_from_text_failed; p->sign = 0; p->oom = 0; p->isInit = 1; p->isNull = 0; p->nDigit = 0; p->nFrac = 0; - if( zAlt ){ - n = nAlt, - zIn = zAlt; - }else{ - if( sqlite3_value_type(pIn)==SQLITE_NULL ){ - p->a = 0; - p->isNull = 1; - return p; - } - n = sqlite3_value_bytes(pIn); - zIn = sqlite3_value_text(pIn); - } p->a = sqlite3_malloc64( n+1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; for(i=0; isspace(zIn[i]); i++){} if( zIn[i]=='-' ){ p->sign = 1; @@ -2768,7 +2974,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memset(p->a+p->nDigit, 0, iExp); p->nDigit += iExp; } @@ -2787,7 +2993,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memmove(p->a+iExp, p->a, p->nDigit); memset(p->a, 0, iExp); p->nDigit += iExp; @@ -2796,7 +3002,76 @@ static Decimal *decimal_new( } return p; -new_no_mem: +new_from_text_failed: + if( p ){ + if( p->a ) sqlite3_free(p->a); + sqlite3_free(p); + } + return 0; +} + +/* Forward reference */ +static Decimal *decimalFromDouble(double); + +/* +** Allocate a new Decimal object from an sqlite3_value. Return a pointer +** to the new object, or NULL if there is an error. If the pCtx argument +** is not NULL, then errors are reported on it as well. +** +** If the pIn argument is SQLITE_TEXT or SQLITE_INTEGER, it is converted +** directly into a Decimal. For SQLITE_FLOAT or for SQLITE_BLOB of length +** 8 bytes, the resulting double value is expanded into its decimal equivalent. +** If pIn is NULL or if it is a BLOB that is not exactly 8 bytes in length, +** then NULL is returned. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, /* Report error here, if not null */ + sqlite3_value *pIn, /* Construct the decimal object from this */ + int bTextOnly /* Always interpret pIn as text if true */ +){ + Decimal *p = 0; + int eType = sqlite3_value_type(pIn); + if( bTextOnly && (eType==SQLITE_FLOAT || eType==SQLITE_BLOB) ){ + eType = SQLITE_TEXT; + } + switch( eType ){ + case SQLITE_TEXT: + case SQLITE_INTEGER: { + const char *zIn = (const char*)sqlite3_value_text(pIn); + int n = sqlite3_value_bytes(pIn); + p = decimalNewFromText(zIn, n); + if( p==0 ) goto new_failed; + break; + } + + case SQLITE_FLOAT: { + p = decimalFromDouble(sqlite3_value_double(pIn)); + break; + } + + case SQLITE_BLOB: { + const unsigned char *x; + unsigned int i; + sqlite3_uint64 v = 0; + double r; + + if( sqlite3_value_bytes(pIn)!=sizeof(r) ) break; + x = sqlite3_value_blob(pIn); + for(i=0; ioom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + for(nDigit=p->nDigit; nDigit>0 && p->a[nDigit-1]==0; nDigit--){} + for(nZero=0; nZeroa[nZero]==0; nZero++){} + nFrac = p->nFrac + (nDigit - p->nDigit); + nDigit -= nZero; + z = sqlite3_malloc( nDigit+20 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( nDigit==0 ){ + zero = 0; + a = &zero; + nDigit = 1; + nFrac = 0; + }else{ + a = &p->a[nZero]; + } + if( p->sign && nDigit>0 ){ + z[0] = '-'; + }else{ + z[0] = '+'; + } + z[1] = a[0]+'0'; + z[2] = '.'; + if( nDigit==1 ){ + z[3] = '0'; + i = 4; + }else{ + for(i=1; iisNull ) goto cmp_done; - pB = decimal_new(context, argv[1], 0, 0); + pB = decimal_new(context, argv[1], 1); if( pB==0 || pB->isNull ) goto cmp_done; rc = decimal_cmp(pA, pB); if( rc<0 ) rc = -1; @@ -2963,7 +3283,7 @@ static void decimal_expand(Decimal *p, int nDigit, int nFrac){ } /* -** Add the value pB into pA. +** Add the value pB into pA. A := A + B. ** ** Both pA and pB might become denormalized by this routine. */ @@ -3032,6 +3352,172 @@ static void decimal_add(Decimal *pA, Decimal *pB){ } } +/* +** Multiply A by B. A := A * B +** +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. +*/ +static void decimalMul(Decimal *pA, Decimal *pB){ + signed char *acc = 0; + int i, j, k; + int minFrac; + + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + pA->oom = 1; + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + +mul_end: + sqlite3_free(acc); +} + +/* +** Create a new Decimal object that contains an integer power of 2. +*/ +static Decimal *decimalPow2(int N){ + Decimal *pA = 0; /* The result to be returned */ + Decimal *pX = 0; /* Multiplier */ + if( N<-20000 || N>20000 ) goto pow2_fault; + pA = decimalNewFromText("1.0", 3); + if( pA==0 || pA->oom ) goto pow2_fault; + if( N==0 ) return pA; + if( N>0 ){ + pX = decimalNewFromText("2.0", 3); + }else{ + N = -N; + pX = decimalNewFromText("0.5", 3); + } + if( pX==0 || pX->oom ) goto pow2_fault; + while( 1 /* Exit by break */ ){ + if( N & 1 ){ + decimalMul(pA, pX); + if( pA->oom ) goto pow2_fault; + } + N >>= 1; + if( N==0 ) break; + decimalMul(pX, pX); + } + decimal_free(pX); + return pA; + +pow2_fault: + decimal_free(pA); + decimal_free(pX); + return 0; +} + +/* +** Use an IEEE754 binary64 ("double") to generate a new Decimal object. +*/ +static Decimal *decimalFromDouble(double r){ + sqlite3_int64 m, a; + int e; + int isNeg; + Decimal *pA; + Decimal *pX; + char zNum[100]; + if( r<0.0 ){ + isNeg = 1; + r = -r; + }else{ + isNeg = 0; + } + memcpy(&a,&r,sizeof(a)); + if( a==0 ){ + e = 0; + m = 0; + }else{ + e = a>>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + e = e - 1075; + if( e>971 ){ + return 0; /* A NaN or an Infinity */ + } + } + + /* At this point m is the integer significand and e is the exponent */ + sqlite3_snprintf(sizeof(zNum), zNum, "%lld", m); + pA = decimalNewFromText(zNum, (int)strlen(zNum)); + pX = decimalPow2(e); + decimalMul(pA, pX); + decimal_free(pX); + return pA; +} + +/* +** SQL Function: decimal(X) +** OR: decimal_exp(X) +** +** Convert input X into decimal and then back into text. +** +** If X is originally a float, then a full decimal expansion of that floating +** point value is done. Or if X is an 8-byte blob, it is interpreted +** as a float and similarly expanded. +** +** The decimal_exp(X) function returns the result in exponential notation. +** decimal(X) returns a complete decimal, without the e+NNN at the end. +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0); + UNUSED_PARAMETER(argc); + if( p ){ + if( sqlite3_user_data(context)!=0 ){ + decimal_result_sci(context, p); + }else{ + decimal_result(context, p); + } + decimal_free(p); + } +} + /* ** Compare text in decimal order. */ @@ -3042,8 +3528,8 @@ static int decimalCollFunc( ){ const unsigned char *zA = (const unsigned char*)pKey1; const unsigned char *zB = (const unsigned char*)pKey2; - Decimal *pA = decimal_new(0, 0, nKey1, zA); - Decimal *pB = decimal_new(0, 0, nKey2, zB); + Decimal *pA = decimalNewFromText((const char*)zA, nKey1); + Decimal *pB = decimalNewFromText((const char*)zB, nKey2); int rc; UNUSED_PARAMETER(notUsed); if( pA==0 || pB==0 ){ @@ -3068,8 +3554,8 @@ static void decimalAddFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); decimal_add(pA, pB); decimal_result(context, pA); @@ -3081,8 +3567,8 @@ static void decimalSubFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pB ){ pB->sign = !pB->sign; @@ -3120,7 +3606,7 @@ static void decimalSumStep( p->nFrac = 0; } if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); decimal_add(p, pArg); decimal_free(pArg); } @@ -3135,7 +3621,7 @@ static void decimalSumInverse( p = sqlite3_aggregate_context(context, sizeof(*p)); if( p==0 ) return; if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); if( pArg ) pArg->sign = !pArg->sign; decimal_add(p, pArg); decimal_free(pArg); @@ -3156,66 +3642,49 @@ static void decimalSumFinalize(sqlite3_context *context){ ** SQL Function: decimal_mul(X, Y) ** ** Return the product of X and Y. -** -** All significant digits after the decimal point are retained. -** Trailing zeros after the decimal point are omitted as long as -** the number of digits after the decimal point is no less than -** either the number of digits in either input. */ static void decimalMulFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - signed char *acc = 0; - int i, j, k; - int minFrac; + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pA==0 || pA->oom || pA->isNull || pB==0 || pB->oom || pB->isNull ){ goto mul_end; } - acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); - if( acc==0 ){ - sqlite3_result_error_nomem(context); + decimalMul(pA, pB); + if( pA->oom ){ goto mul_end; } - memset(acc, 0, pA->nDigit + pB->nDigit + 2); - minFrac = pA->nFrac; - if( pB->nFracnFrac; - for(i=pA->nDigit-1; i>=0; i--){ - signed char f = pA->a[i]; - int carry = 0, x; *** 15446 LINES SKIPPED *** From nobody Wed Oct 4 01:01:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxJ2VPDz4wK3P; Wed, 4 Oct 2023 01:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxJ1NV3z4X6D; Wed, 4 Oct 2023 01:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfejPbYfMWVbmjd1XW0bzGrT4VmvHk7ZJn59nDOI8D8=; b=L+uedOVJQiSKsAiED5tTU27aync0jPxv4tUFm4OdD8XbcFIuQNhN+jwiGgeNVzU5eGShoi DDLevehDsyKTfQpEpA2crOZP83SO3rq6vlN9/FX2UKDQsPM43WoZ3xxEgMhmdFfWQgZy6p ADOT/je95ht5W3gzQ++T2wlNx6bvug9K3mrrUNr6g0d/4LyfFA14TyLb8susYg0yVtZx5k yuFwwwNN199M3wsTVIJrdEO5tp6Vsu0XHF7kJjcmOurmlkW99QqN9G4097VY9T4ysc64iA pXXGZZ0ardeHn34D7EQMsXOLF/Ggux7XLcFPXSdm/V9SEcb9W8bp+x/Yp62YXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381300; a=rsa-sha256; cv=none; b=RPntdzzCn/HN16eORKd3LbHoiDf+gxuDEd2Ye51bIaspgWDxDdOGYy1jG81r9gl1NGjhP4 79S4xmdBdNMt/Pdq2qiauEgMLyxFt4EeMxGEPTnZTXABZp5jnQfnx9Zp5YB3yNRlmb2Gmr fTyQlJwY0yhSHNjNi7u/66xrPfFjlq9+W0H2DgA3EvJBl5v96HONnqhsGT75+WsmY6L6Ex JumshDvcRediKjNb1vBV+7spcxkTecz7WlsfAoJ3WjCNMtt57064ML/JPloJ+5OwzUy3rb W3vAnzfsqGkq1CKoqKn+qUz5zqOeC7zuKJN/hXVjlOkK/NhjwKoWsES9Dnq4SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfejPbYfMWVbmjd1XW0bzGrT4VmvHk7ZJn59nDOI8D8=; b=RznkTAUWM+6/GP92omHZSseRdF07smPJH2ArATH0LHHbNXXXV6wrRJFzJ9DQ1K1sb7mRR8 BppjfhBzqWoIJhUChFYLM8J1jcjN7yKYetmVVA8DIvIvPqI37oKNWikLWPPL6gdh3kqtOw Rqc8gayS9oYZQCg3oREo/k5FAGWoQQPRo+bNegHJpKArJHzftHNH8K8fcsqlCnth1VHQiL RHmUHj6aBhu/N5YO9AyMtu6XD4blQe4iCxA+jtcfFl24SnWcxsr0eAVBA6glfPLLwnmFCB xQcyo8lazw5sVizP86phTk48eicMuVE8/hJIg6KkeX46BAUCb2VAe4pt8V2mBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxH6lgfz35G; Wed, 4 Oct 2023 01:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39411d9H049091; Wed, 4 Oct 2023 01:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39411d48049088; Wed, 4 Oct 2023 01:01:39 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:01:39 GMT Message-Id: <202310040101.39411d48049088@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: 1b5982339ced - stable/14 - unbound: Vendor import 1.18.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1b5982339ced0f39ef588a07a3e960954e87c65e Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1b5982339ced0f39ef588a07a3e960954e87c65e commit 1b5982339ced0f39ef588a07a3e960954e87c65e Author: Cy Schubert AuthorDate: 2023-09-19 04:17:09 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:06 +0000 unbound: Vendor import 1.18.0 Release notes at https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/ Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main (cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5) --- contrib/unbound/Makefile.in | 43 +- contrib/unbound/README.md | 2 +- contrib/unbound/acx_nlnetlabs.m4 | 36 +- contrib/unbound/acx_python.m4 | 61 +- contrib/unbound/cachedb/cachedb.c | 57 +- contrib/unbound/cachedb/redis.c | 28 +- contrib/unbound/compat/getentropy_solaris.c | 2 +- contrib/unbound/config.guess | 51 +- contrib/unbound/config.h.in | 25 +- contrib/unbound/config.h.in~ | 1456 ++++++++++++++++++++ contrib/unbound/config.sub | 72 +- contrib/unbound/configure | 170 ++- contrib/unbound/configure.ac | 99 +- contrib/unbound/contrib/Dockerfile.tests | 4 +- contrib/unbound/contrib/README | 3 + contrib/unbound/contrib/aaaa-filter-iterator.patch | 4 +- contrib/unbound/contrib/unbound.init_yocto | 139 ++ contrib/unbound/daemon/acl_list.c | 2 + contrib/unbound/daemon/acl_list.h | 8 +- contrib/unbound/daemon/cachedump.c | 28 +- contrib/unbound/daemon/remote.c | 236 ++-- contrib/unbound/daemon/remote.h | 2 +- contrib/unbound/daemon/stats.c | 53 +- contrib/unbound/daemon/stats.h | 7 + contrib/unbound/daemon/worker.c | 471 ++++--- contrib/unbound/dns64/dns64.c | 4 +- contrib/unbound/dnstap/dnstap.c | 7 +- contrib/unbound/dnstap/dnstap.h | 4 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 39 +- contrib/unbound/doc/Changelog | 323 +++++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 20 + contrib/unbound/doc/example.conf.in | 32 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 58 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 147 +- contrib/unbound/edns-subnet/subnetmod.c | 27 +- contrib/unbound/iterator/iter_delegpt.c | 39 + contrib/unbound/iterator/iter_delegpt.h | 25 + contrib/unbound/iterator/iter_resptype.c | 7 + contrib/unbound/iterator/iter_scrub.c | 43 +- contrib/unbound/iterator/iter_utils.c | 43 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 259 ++-- contrib/unbound/iterator/iterator.h | 23 +- contrib/unbound/libunbound/libworker.c | 16 +- contrib/unbound/libunbound/unbound-event.h | 6 +- contrib/unbound/libunbound/unbound.h | 116 +- contrib/unbound/services/authzone.c | 10 +- contrib/unbound/services/cache/dns.c | 50 +- contrib/unbound/services/cache/infra.c | 75 +- contrib/unbound/services/cache/infra.h | 5 +- contrib/unbound/services/listen_dnsport.c | 153 +- contrib/unbound/services/localzone.c | 20 +- contrib/unbound/services/localzone.h | 2 + contrib/unbound/services/mesh.c | 385 +++--- contrib/unbound/services/mesh.h | 14 +- contrib/unbound/services/modstack.c | 10 +- contrib/unbound/services/outside_network.c | 28 + contrib/unbound/services/rpz.c | 230 +++- contrib/unbound/services/rpz.h | 16 +- contrib/unbound/sldns/rrdef.c | 12 +- contrib/unbound/sldns/rrdef.h | 7 +- contrib/unbound/sldns/str2wire.c | 94 +- contrib/unbound/sldns/str2wire.h | 4 +- contrib/unbound/sldns/wire2str.c | 19 +- contrib/unbound/smallapp/unbound-anchor.c | 3 +- contrib/unbound/smallapp/unbound-checkconf.c | 2 +- contrib/unbound/smallapp/unbound-control.c | 54 +- contrib/unbound/smallapp/unbound-host.c | 5 +- contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 + contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 ++ .../unbound/testdata/edns_downstream_cookies.rpl | 235 ++++ .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 +++ .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 + .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 + .../unbound/testdata/iter_cname_minimise_nx.rpl | 246 ++++ contrib/unbound/testdata/iter_failreply.rpl | 132 ++ contrib/unbound/testdata/iter_ignore_empty.rpl | 198 +++ contrib/unbound/testdata/iter_nat64.rpl | 117 ++ contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 ++ contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 ++ .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 +++ .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 +++ .../testdata/serve_expired_0ttl_servfail.rpl | 129 ++ .../serve_expired_cached_servfail_refresh.rpl | 145 ++ .../stat_values.tdir/stat_values_cachedb.conf | 36 + .../stat_values_downstream_cookies.conf | 32 + contrib/unbound/testdata/subnet_cached_ede.crpl | 114 ++ .../unbound/testdata/subnet_global_prefetch.crpl | 236 ++++ .../subnet_global_prefetch_always_forward.crpl | 167 +++ .../testdata/subnet_global_prefetch_expired.crpl | 241 ++++ contrib/unbound/testdata/val_any_negcache.rpl | 240 ++++ contrib/unbound/util/config_file.c | 153 +- contrib/unbound/util/config_file.h | 65 +- contrib/unbound/util/configlexer.lex | 15 +- contrib/unbound/util/configparser.y | 148 +- contrib/unbound/util/data/msgencode.c | 148 +- contrib/unbound/util/data/msgencode.h | 42 +- contrib/unbound/util/data/msgparse.c | 98 +- contrib/unbound/util/data/msgparse.h | 18 +- contrib/unbound/util/data/msgreply.c | 95 +- contrib/unbound/util/data/msgreply.h | 30 +- contrib/unbound/util/edns.c | 59 + contrib/unbound/util/edns.h | 59 + contrib/unbound/util/fptr_wlist.c | 8 + contrib/unbound/util/iana_ports.inc | 4 + contrib/unbound/util/module.c | 16 +- contrib/unbound/util/module.h | 14 +- contrib/unbound/util/net_help.c | 70 +- contrib/unbound/util/net_help.h | 23 + contrib/unbound/util/netevent.c | 229 +-- contrib/unbound/util/netevent.h | 70 +- contrib/unbound/util/regional.c | 2 +- contrib/unbound/util/rfc_1982.c | 74 + contrib/unbound/util/rfc_1982.h | 63 + contrib/unbound/util/siphash.c | 187 +++ contrib/unbound/util/siphash.h | 43 + contrib/unbound/util/storage/lruhash.c | 25 +- contrib/unbound/util/storage/lruhash.h | 5 +- contrib/unbound/util/storage/slabhash.c | 18 + contrib/unbound/util/storage/slabhash.h | 9 + contrib/unbound/util/timehist.c | 44 +- contrib/unbound/util/timeval_func.c | 113 ++ contrib/unbound/util/timeval_func.h | 53 + contrib/unbound/validator/autotrust.c | 2 + contrib/unbound/validator/val_kcache.c | 10 +- contrib/unbound/validator/val_kcache.h | 4 +- contrib/unbound/validator/val_kentry.c | 48 +- contrib/unbound/validator/val_kentry.h | 37 +- contrib/unbound/validator/val_neg.c | 7 +- contrib/unbound/validator/val_nsec.c | 19 +- contrib/unbound/validator/val_nsec.h | 5 +- contrib/unbound/validator/val_sigcrypt.c | 43 +- contrib/unbound/validator/val_utils.c | 19 +- contrib/unbound/validator/validator.c | 137 +- lib/libunbound/Makefile | 6 +- lib/libunbound/config.h | 6 +- 148 files changed, 9439 insertions(+), 1708 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index bc021aa1eb00..0a2e7f9b6f08 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -122,15 +122,15 @@ iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ services/localzone.c services/mesh.c services/modstack.c services/view.c \ -services/rpz.c \ +services/rpz.c util/rfc_1982.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/shm_side/shm_main.c services/authzone.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ -util/rtt.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ +util/rtt.c util/siphash.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/tcp_conn_limit.c \ -util/timehist.c util/tube.c util/proxy_protocol.c \ +util/timehist.c util/tube.c util/proxy_protocol.c util/timeval_func.c \ util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ validator/autotrust.c validator/val_anchor.c validator/validator.c \ validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ @@ -145,14 +145,14 @@ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ -fptr_wlist.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +fptr_wlist.lo siphash.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo tcp_conn_limit.lo timehist.lo tube.lo winsock_event.lo \ -autotrust.lo val_anchor.lo rpz.lo proxy_protocol.lo \ +autotrust.lo val_anchor.lo rpz.lo rfc_1982.lo proxy_protocol.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo $(CACHEDB_OBJ) authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo timeval_func.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -198,7 +198,7 @@ CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \ $(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ CONTROL_SRC=smallapp/unbound-control.c -CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ=unbound-control.lo CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c @@ -455,6 +455,7 @@ unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnsta dynlibmod.lo dynlibdmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h +timeval_func.lo timeval_func.o: $(srcdir)/util/timeval_func.c $(srcdir)/util/timeval_func.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -498,6 +499,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h echo "#include \"util/configyyrename.h\"" >> $@ ;\ $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ fi + @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y @-if test ! -d util; then $(INSTALL) -d util; fi @@ -516,7 +518,7 @@ distclean: clean rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) - rm -f Makefile + rm -f Makefile maintainer-clean: distclean rm -f util/configlexer.c util/configparser.c util/configparser.h @@ -649,7 +651,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed - if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp # dependency generation @@ -877,7 +879,7 @@ rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdi outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h \ @@ -915,7 +917,8 @@ config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/ut configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ @@ -928,7 +931,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/respip/respip.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h + $(srcdir)/util/tube.h $(srcdir)/util/timeval_func.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ @@ -983,7 +986,7 @@ netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/neteve $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/timeval_func.h proxy_protocol.lo proxy_protocol.o: $(srcdir)/util/proxy_protocol.c config.h \ $(srcdir)/util/proxy_protocol.h $(srcdir)/sldns/sbuffer.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ @@ -1006,6 +1009,8 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +siphash.lo siphash.o: $(srcdir)/util/siphash.c +rfc_1982.lo rfc_1982.o: $(srcdir)/util/rfc_1982.c edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ @@ -1186,7 +1191,7 @@ unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h $(srcdir)/sldns/r $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/services/outside_network.h + $(srcdir)/services/outside_network.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ @@ -1321,7 +1326,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1343,7 +1348,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/daemon/remote.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/timeval_func.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ @@ -1357,7 +1362,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1409,7 +1414,7 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/util/timeval_func.h \ $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ @@ -1417,7 +1422,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h $(srcdir)/util/timeval_func.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index c3d9bc2492ef..c220da030458 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -1,6 +1,6 @@ # Unbound -[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) diff --git a/contrib/unbound/acx_nlnetlabs.m4 b/contrib/unbound/acx_nlnetlabs.m4 index cf436ec54bb6..f27615bd8bce 100644 --- a/contrib/unbound/acx_nlnetlabs.m4 +++ b/contrib/unbound/acx_nlnetlabs.m4 @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 44 +# Version 46 +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. # 2021-08-17 fix for openssl to detect split version, with ssldir_include @@ -187,7 +189,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -233,7 +235,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -272,7 +274,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -309,7 +311,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -335,7 +337,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -345,7 +347,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -356,7 +358,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -370,7 +372,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -385,7 +387,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -413,7 +415,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -475,7 +477,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -834,7 +836,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -859,7 +861,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -923,7 +925,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else @@ -1317,7 +1319,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1355,7 +1357,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/contrib/unbound/acx_python.m4 b/contrib/unbound/acx_python.m4 index 16c0c6fd943f..c945d6c8989e 100644 --- a/contrib/unbound/acx_python.m4 +++ b/contrib/unbound/acx_python.m4 @@ -17,33 +17,62 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ PYTHON_VERSION=`$PYTHON -c "import sys; \ print(sys.version.split()[[0]])"` fi + # calculate the version number components. + [ + v="$PYTHON_VERSION" + PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi + ] - # Check if you have sysconfig - AC_MSG_CHECKING([for the sysconfig Python module]) - if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then + # For some systems, sysconfig exists, but has the wrong paths, + # on Debian 10, for python 2.7 and 3.7. So, we check the version, + # and for older versions try distutils.sysconfig first. For newer + # versions>=3.10, where distutils.sysconfig is deprecated, use + # sysconfig first and then attempt the other one. + py_distutils_first="no" + if test $PYTHON_VERSION_MAJOR -lt 3; then + py_distutils_first="yes" + fi + if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then + py_distutils_first="yes" + fi + + # Check if you have the first module + if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi + sysconfig_module="" + AC_MSG_CHECKING([for the $m Python module]) + if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then AC_MSG_RESULT([yes]) - sysconfig_module="sysconfig" - # if yes, use sysconfig, because distutils is deprecated. + sysconfig_module="$m" else AC_MSG_RESULT([no]) - # if no, try to use distutils + fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then + # if not found, try the other one. + if test -z "$sysconfig_module"; then + if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi + AC_MSG_CHECKING([for the $m2 Python module]) + if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then AC_MSG_RESULT([yes]) + sysconfig_module="$m2" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". - Please check your Python installation. The error was: - $ac_distutils_result]) + AC_MSG_ERROR([cannot import Python module "$m", or "$m2". + Please check your Python installation. The errors are: + $m + $ac_modulecheck_result1 + $m2 + $ac_modulecheck_result2]) PYTHON_VERSION="" fi - - sysconfig_module="distutils.sysconfig" fi + if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi # # Check for Python include path diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index 245daa986967..30645268ca23 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -102,7 +102,6 @@ static int testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; - (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); @@ -111,6 +110,15 @@ testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) log_err("out of memory"); return 0; } + /* Register an EDNS option (65534) to bypass the worker cache lookup + * for testing */ + if(!edns_register_option(LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST, + 1 /* bypass cache */, + 0 /* no aggregation */, env)) { + log_err("testframe_init, could not register test opcode"); + free(d); + return 0; + } lock_basic_init(&d->lock); lock_protect(&d->lock, d, sizeof(*d)); return 1; @@ -218,6 +226,8 @@ static int cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) { const char* backend_str = cfg->cachedb_backend; + if(!backend_str || *backend_str==0) + return 1; cachedb_env->backend = cachedb_find_backend(backend_str); if(!cachedb_env->backend) { log_err("cachedb: cannot find backend name '%s'", backend_str); @@ -228,7 +238,7 @@ cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) return 1; } -int +int cachedb_init(struct module_env* env, int id) { struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, @@ -267,19 +277,16 @@ cachedb_init(struct module_env* env, int id) return 1; } -void +void cachedb_deinit(struct module_env* env, int id) { struct cachedb_env* cachedb_env; if(!env || !env->modinfo[id]) return; cachedb_env = (struct cachedb_env*)env->modinfo[id]; - /* free contents */ - /* TODO */ if(cachedb_env->enabled) { (*cachedb_env->backend->deinit)(env, cachedb_env); } - free(cachedb_env); env->modinfo[id] = NULL; } @@ -406,6 +413,14 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(qstate->return_msg->rep->ttl == 0 && !qstate->env->cfg->serve_expired) return 0; + + /* The EDE is added to the out-list so it is encoded in the cached message */ + if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) { + edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch, + qstate->return_msg->rep->reason_bogus, + qstate->return_msg->rep->reason_bogus_str); + } + if(verbosity >= VERB_ALGO) log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, qstate->return_msg->rep); @@ -502,6 +517,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) { struct msg_parse* prs; struct edns_data edns; + struct edns_option* ede; uint64_t timestamp, expiry; time_t adjust; size_t lim = sldns_buffer_limit(buf); @@ -539,6 +555,24 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg) return 0; + /* We find the EDE in the in-list after parsing */ + if(qstate->env->cfg->ede && + (ede = edns_opt_list_find(edns.opt_list_in, LDNS_EDNS_EDE))) { + if(ede->opt_len >= 2) { + qstate->return_msg->rep->reason_bogus = + sldns_read_uint16(ede->opt_data); + } + /* allocate space and store the error string and it's size */ + if(ede->opt_len > 2) { + size_t ede_len = ede->opt_len - 2; + qstate->return_msg->rep->reason_bogus_str = regional_alloc( + qstate->region, sizeof(char) * (ede_len+1)); + memcpy(qstate->return_msg->rep->reason_bogus_str, + ede->opt_data+2, ede_len); + qstate->return_msg->rep->reason_bogus_str[ede_len] = 0; + } + } + qstate->return_rcode = LDNS_RCODE_NOERROR; /* see how much of the TTL expired, and remove it */ @@ -630,11 +664,15 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) * See if unbound's internal cache can answer the query */ static int -cachedb_intcache_lookup(struct module_qstate* qstate) +cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde) { uint8_t* dpname=NULL; size_t dpnamelen=0; struct dns_msg* msg; + /* for testframe bypass this lookup */ + if(cde->backend == &testframe_backend) { + return 0; + } if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo, &dpname, &dpnamelen)) return 0; /* no cache for these queries */ @@ -693,6 +731,7 @@ cachedb_handle_query(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are enabled, and skip if so */ if(!ie->enabled) { /* pass request to next module */ @@ -709,7 +748,7 @@ cachedb_handle_query(struct module_qstate* qstate, /* lookup inside unbound's internal cache. * This does not look for expired entries. */ - if(cachedb_intcache_lookup(qstate)) { + if(cachedb_intcache_lookup(qstate, ie)) { if(verbosity >= VERB_ALGO) { if(qstate->return_msg->rep) log_dns_msg("cachedb internal cache lookup", @@ -746,6 +785,7 @@ cachedb_handle_query(struct module_qstate* qstate, qstate->ext_state[id] = module_wait_module; return; } + qstate->is_cachedb_answer = 1; /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -768,6 +808,7 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are not enabled or instructed to not cache, and skip */ if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ diff --git a/contrib/unbound/cachedb/redis.c b/contrib/unbound/cachedb/redis.c index 16c3741f786b..93a575a4c6d2 100644 --- a/contrib/unbound/cachedb/redis.c +++ b/contrib/unbound/cachedb/redis.c @@ -56,6 +56,8 @@ struct redis_moddata { int numctxs; /* number of ctx entries */ const char* server_host; /* server's IP address or host name */ int server_port; /* server's TCP port */ + const char* server_path; /* server's unix path, or "", NULL if unused */ + const char* server_password; /* server's AUTH password, or "", NULL if unused */ struct timeval timeout; /* timeout for connection setup and commands */ }; @@ -67,8 +69,13 @@ redis_connect(const struct redis_moddata* moddata) { redisContext* ctx; - ctx = redisConnectWithTimeout(moddata->server_host, - moddata->server_port, moddata->timeout); + if(moddata->server_path && moddata->server_path[0]!=0) { + ctx = redisConnectUnixWithTimeout(moddata->server_path, + moddata->timeout); + } else { + ctx = redisConnectWithTimeout(moddata->server_host, + moddata->server_port, moddata->timeout); + } if(!ctx || ctx->err) { const char *errstr = "out of memory"; if(ctx) @@ -80,6 +87,17 @@ redis_connect(const struct redis_moddata* moddata) log_err("failed to set redis timeout"); goto fail; } + if(moddata->server_password && moddata->server_password[0]!=0) { + redisReply* rep; + rep = redisCommand(ctx, "AUTH %s", moddata->server_password); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to authenticate with password"); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + verbose(VERB_OPS, "Connection to Redis established"); return ctx; fail: @@ -94,7 +112,7 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) int i; struct redis_moddata* moddata = NULL; - verbose(VERB_ALGO, "redis_init"); + verbose(VERB_OPS, "Redis initialization"); moddata = calloc(1, sizeof(struct redis_moddata)); if(!moddata) { @@ -112,6 +130,8 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) * we don't have to free it in this module. */ moddata->server_host = env->cfg->redis_server_host; moddata->server_port = env->cfg->redis_server_port; + moddata->server_path = env->cfg->redis_server_path; + moddata->server_password = env->cfg->redis_server_password; moddata->timeout.tv_sec = env->cfg->redis_timeout / 1000; moddata->timeout.tv_usec = (env->cfg->redis_timeout % 1000) * 1000; for(i = 0; i < moddata->numctxs; i++) @@ -154,7 +174,7 @@ redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env) cachedb_env->backend_data; (void)env; - verbose(VERB_ALGO, "redis_deinit"); + verbose(VERB_OPS, "Redis deinitialization"); if(!moddata) return; diff --git a/contrib/unbound/compat/getentropy_solaris.c b/contrib/unbound/compat/getentropy_solaris.c index 5e3b1cbbbd30..1ff8162917b3 100644 --- a/contrib/unbound/compat/getentropy_solaris.c +++ b/contrib/unbound/compat/getentropy_solaris.c @@ -47,7 +47,7 @@ #define SHA512_Update SHA512Update #define SHA512_Final SHA512Final #else -#include "openssl/sha.h" +#include #endif #include diff --git a/contrib/unbound/config.guess b/contrib/unbound/config.guess index 980b02083815..b187213930f1 100755 --- a/contrib/unbound/config.guess +++ b/contrib/unbound/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-09-17' +timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -976,7 +976,27 @@ EOF GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1042,6 +1062,15 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -1197,7 +1226,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1338,7 +1367,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index 2caecf30d040..f31354d01408 100644 *** 18537 LINES SKIPPED *** From nobody Wed Oct 4 01:01:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxK2YK9z4wKHJ; Wed, 4 Oct 2023 01:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxK1S0Gz4XW3; Wed, 4 Oct 2023 01:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PgLbCTCV2ZdM23QuzfS8n047aArhqWbYnpXKCkuh/Es=; b=gnM985v40wX4xxmEmTUzBtoMjAD6UYGAGFfHgtm55VPjmGOngzrp4vSAUSuKoZ6AcFNaGT bKPpiC7z3J9x99LJG7AgLxrBfCePvDV4exaF0Q6Nmn1xA5TfdVDdXZjLpkw4HsB2KIyFBl ZNh6PHtK7jqw5PF/AsRK8AMQ8KNH0iNUNeKCoPs9E9dwx+k1EwEt4u+XITlJj8ZfhSxenw dj71fyvrc47iHXmHNGSzEfSzxhwuh00lUQxfgp3v12DgWQLt2Ed/DwCe/uBcPdU8fvDbEm 8mxiA49N9e5rDjWSvOeD4P23ezMtOgsa/e7+vZb6UzGnd+Tcj9mafCSj3UBxsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381301; a=rsa-sha256; cv=none; b=DfeQHpBPLtE4yGO2wkvTzLry/ww9Id7cs3NqQsmWLbGbUfcBDKTuBARiRrkrvNBKB7Ci+a WhY8uRrUgpqZn1oXKb8rlIlAPpMuKciTHPmDWDItkLLBRDkw+/OT41Cxm/bXCIOvTNXEsJ 2XSapA/nCoH6zrGxecHm1H1RbblpmDGnvjS4Kzkhy0VgybGj9MArPq+t0s3pO+tEhbogCI wWmbm4G76lTzMpDM3b3MOpZYZvDJfFozM4P/AdYvbscJMozVbTpA9nRPBf7AGcdluQHXmq trRZEQqbe1WG605rDSFZt5Tuls6ZlWnqo4DzSRuAik4gyy8Rz4b8ngR8yWO0fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PgLbCTCV2ZdM23QuzfS8n047aArhqWbYnpXKCkuh/Es=; b=We1hoe1ublotsZ8xtJC50R6gx5V43KTqCDEeelCda7FP520USdLwa24000mCJR9wJCa4bo 9NRDXTM2luRP77y5nF+zn8b9+Xu/NWON5XQIaVMzCnz5tmCA/z/NaufQEKBupooysfR4gY YIWN7d43bQIU/CTn1E/6jkKfR2nk7GlsEfz0LcsWtqStCR5WCJlCQh0b1em4pqmAMuhpd+ RqEM6HJkEHDXK5BDVEYR4bpxonssE1OZRFo13tJlxQ0rEdrmktMO8z7WHKo7jBkCFtrIhY Ii8fo46mPe0rkWR47kZy1jT9npEdF3IjFDMdIyqjhkzv6mAmxAPpLZK+ANYnPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxK0BZyz35H; Wed, 4 Oct 2023 01:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39411fx9049133; Wed, 4 Oct 2023 01:01:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39411ecJ049130; Wed, 4 Oct 2023 01:01:40 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:01:40 GMT Message-Id: <202310040101.39411ecJ049130@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: 9afc0c849e6e - stable/14 - local-unbound: remove stray config.h.in backup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 9afc0c849e6e0436351fbdaf6157d1c822793d80 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9afc0c849e6e0436351fbdaf6157d1c822793d80 commit 9afc0c849e6e0436351fbdaf6157d1c822793d80 Author: Mina Galić AuthorDate: 2023-09-20 14:39:37 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:06 +0000 local-unbound: remove stray config.h.in backup despite being ignored in our main .gitignore, such files can still be merged from vendor branches. Reviewed by: cy Fixes: 8f76bb7dad (unbound: Vendor import 1.18.0) MFC after: 2 weeks X-MFC with: 8f76bb7dad Differential Revision: https://reviews.freebsd.org/D41920 (cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe) --- contrib/unbound/config.h.in~ | 1456 ------------------------------------------ 1 file changed, 1456 deletions(-) diff --git a/contrib/unbound/config.h.in~ b/contrib/unbound/config.h.in~ deleted file mode 100644 index f31354d01408..000000000000 --- a/contrib/unbound/config.h.in~ +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* apply the noreturn attribute to a function that exits the program */ -#undef ATTR_NORETURN - -/* apply the weak attribute to a symbol */ -#undef ATTR_WEAK - -/* Directory to chroot to */ -#undef CHROOT_DIR - -/* Define this to enable client subnet option. */ -#undef CLIENT_SUBNET - -/* Do sha512 definitions in config.h */ -#undef COMPAT_SHA512 - -/* Command line arguments used with configure */ -#undef CONFCMDLINE - -/* Pathname to the Unbound configuration file */ -#undef CONFIGFILE - -/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work - */ -#undef DARWIN_BROKEN_SETREUID - -/* Whether daemon is deprecated */ -#undef DEPRECATED_DAEMON - -/* Deprecate RSA 1024 bit length, makes that an unsupported key */ -#undef DEPRECATE_RSA_1024 - -/* Define this to enable kernel based UDP source port randomization. */ -#undef DISABLE_EXPLICIT_PORT_RANDOMISATION - -/* default dnstap socket path */ -#undef DNSTAP_SOCKET_PATH - -/* Define if you want to use debug lock checking (slow). */ -#undef ENABLE_LOCK_CHECKS - -/* Define this if you enabled-allsymbols from libunbound to link binaries to - it for smaller install size, but the libunbound export table is polluted by - internal symbols */ -#undef EXPORT_ALL_SYMBOLS - -/* Define to 1 if you have the `accept4' function. */ -#undef HAVE_ACCEPT4 - -/* Define to 1 if you have the `arc4random' function. */ -#undef HAVE_ARC4RANDOM - -/* Define to 1 if you have the `arc4random_uniform' function. */ -#undef HAVE_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Whether the C compiler accepts the "format" attribute */ -#undef HAVE_ATTR_FORMAT - -/* Whether the C compiler accepts the "noreturn" attribute */ -#undef HAVE_ATTR_NORETURN - -/* Whether the C compiler accepts the "unused" attribute */ -#undef HAVE_ATTR_UNUSED - -/* Whether the C compiler accepts the "weak" attribute */ -#undef HAVE_ATTR_WEAK - -/* If we have be64toh */ -#undef HAVE_BE64TOH - -/* Define to 1 if you have the `BIO_set_callback_ex' function. */ -#undef HAVE_BIO_SET_CALLBACK_EX - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STRING_H - -/* Define to 1 if you have the `chown' function. */ -#undef HAVE_CHOWN - -/* Define to 1 if you have the `chroot' function. */ -#undef HAVE_CHROOT - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA - -/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ -#undef HAVE_CRYPTO_THREADID_SET_CALLBACK - -/* Define to 1 if you have the `ctime_r' function. */ -#undef HAVE_CTIME_R - -/* Define to 1 if you have the `daemon' function. */ -#undef HAVE_DAEMON - -/* Define to 1 if you have the declaration of `arc4random', and to 0 if you - don't. */ -#undef HAVE_DECL_ARC4RANDOM - -/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 - if you don't. */ -#undef HAVE_DECL_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if - you don't. */ -#undef HAVE_DECL_EVSIGNAL_ASSIGN - -/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_NTOP - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_PTON - -/* Define to 1 if you have the declaration of `nghttp2_session_server_new', - and to 0 if you don't. */ -#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW - -/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED25519 - -/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED448 - -/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_SECP384R1 - -/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 - if you don't. */ -#undef HAVE_DECL_NID_X9_62_PRIME256V1 - -/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you - don't. */ -#undef HAVE_DECL_REALLOCARRAY - -/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you - don't. */ -#undef HAVE_DECL_REDISCONNECT - -/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 - if you don't. */ -#undef HAVE_DECL_SK_SSL_COMP_POP_FREE - -/* Define to 1 if you have the declaration of - `SSL_COMP_get_compression_methods', and to 0 if you don't. */ -#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS - -/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to - 0 if you don't. */ -#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO - -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCAT - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCPY - -/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if - you don't. */ -#undef HAVE_DECL_XML_STOPPARSER - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `DSA_SIG_set0' function. */ -#undef HAVE_DSA_SIG_SET0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_ENDIAN_H - -/* Define to 1 if you have the `endprotoent' function. */ -#undef HAVE_ENDPROTOENT - -/* Define to 1 if you have the `endpwent' function. */ -#undef HAVE_ENDPWENT - -/* Define to 1 if you have the `endservent' function. */ -#undef HAVE_ENDSERVENT - -/* Define to 1 if you have the `ENGINE_cleanup' function. */ -#undef HAVE_ENGINE_CLEANUP - -/* Define to 1 if you have the `ERR_free_strings' function. */ -#undef HAVE_ERR_FREE_STRINGS - -/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ -#undef HAVE_ERR_LOAD_CRYPTO_STRINGS - -/* Define to 1 if you have the `event_assign' function. */ -#undef HAVE_EVENT_ASSIGN - -/* Define to 1 if you have the `event_base_free' function. */ -#undef HAVE_EVENT_BASE_FREE - -/* Define to 1 if you have the `event_base_get_method' function. */ -#undef HAVE_EVENT_BASE_GET_METHOD - -/* Define to 1 if you have the `event_base_new' function. */ -#undef HAVE_EVENT_BASE_NEW - -/* Define to 1 if you have the `event_base_once' function. */ -#undef HAVE_EVENT_BASE_ONCE - -/* Define to 1 if you have the header file. */ -#undef HAVE_EVENT_H - -/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ -#undef HAVE_EVP_AES_256_CBC - -/* Define to 1 if you have the `EVP_cleanup' function. */ -#undef HAVE_EVP_CLEANUP - -/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled' - function. */ -#undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED - -/* Define to 1 if you have the `EVP_DigestVerify' function. */ -#undef HAVE_EVP_DIGESTVERIFY - -/* Define to 1 if you have the `EVP_dss1' function. */ -#undef HAVE_EVP_DSS1 - -/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ -#undef HAVE_EVP_ENCRYPTINIT_EX - -/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ -#undef HAVE_EVP_MAC_CTX_SET_PARAMS - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#undef HAVE_EVP_MD_CTX_NEW - -/* Define to 1 if you have the `EVP_sha1' function. */ -#undef HAVE_EVP_SHA1 - -/* Define to 1 if you have the `EVP_sha256' function. */ -#undef HAVE_EVP_SHA256 - -/* Define to 1 if you have the `EVP_sha512' function. */ -#undef HAVE_EVP_SHA512 - -/* Define to 1 if you have the `ev_default_loop' function. */ -#undef HAVE_EV_DEFAULT_LOOP - -/* Define to 1 if you have the `ev_loop' function. */ -#undef HAVE_EV_LOOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXPAT_H - -/* Define to 1 if you have the `explicit_bzero' function. */ -#undef HAVE_EXPLICIT_BZERO - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the `FIPS_mode' function. */ -#undef HAVE_FIPS_MODE - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Whether getaddrinfo is available */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getauxval' function. */ -#undef HAVE_GETAUXVAL - -/* Define to 1 if you have the `getentropy' function. */ -#undef HAVE_GETENTROPY - -/* Define to 1 if you have the `getifaddrs' function. */ -#undef HAVE_GETIFADDRS - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getpwnam' function. */ -#undef HAVE_GETPWNAM - -/* Define to 1 if you have the `getrlimit' function. */ -#undef HAVE_GETRLIMIT - -/* Define to 1 if you have the `gettid' function. */ -#undef HAVE_GETTID - -/* Define to 1 if you have the `glob' function. */ -#undef HAVE_GLOB - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the `gmtime_r' function. */ -#undef HAVE_GMTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_GRP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_HIREDIS_HIREDIS_H - -/* Define to 1 if you have the `HMAC_Init_ex' function. */ -#undef HAVE_HMAC_INIT_EX - -/* If we have htobe64 */ -#undef HAVE_HTOBE64 - -/* Define to 1 if you have the header file. */ -#undef HAVE_IFADDRS_H - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the `inet_aton' function. */ -#undef HAVE_INET_ATON - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the `inet_pton' function. */ -#undef HAVE_INET_PTON - -/* Define to 1 if you have the `initgroups' function. */ -#undef HAVE_INITGROUPS - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* if the function 'ioctlsocket' is available */ -#undef HAVE_IOCTLSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_IPHLPAPI_H - -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the `kill' function. */ -#undef HAVE_KILL - -/* Use portable libbsd functions */ -#undef HAVE_LIBBSD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBKERN_OSBYTEORDER_H - -/* Define if we have LibreSSL */ -#undef HAVE_LIBRESSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NET_TSTAMP_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOGIN_CAP_H - -/* If have GNU libc compatible malloc */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETIOAPI_H - -/* Use libnettle for crypto */ -#undef HAVE_NETTLE - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_DSA_COMPAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_EDDSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define this to use nghttp2 client. */ -#undef HAVE_NGHTTP2 - -/* Define to 1 if you have the header file. */ -#undef HAVE_NGHTTP2_NGHTTP2_H - -/* Use libnss for crypto */ -#undef HAVE_NSS - -/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ -#undef HAVE_OPENSSL_ADD_ALL_DIGESTS - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_BN_H - -/* Define to 1 if you have the `OPENSSL_config' function. */ -#undef HAVE_OPENSSL_CONFIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CONF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CORE_NAMES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ENGINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ -#undef HAVE_OPENSSL_INIT_CRYPTO - -/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ -#undef HAVE_OPENSSL_INIT_SSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PARAM_BUILD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RAND_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */ -#undef HAVE_OSSL_PARAM_BLD_NEW - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if the system has the type `pthread_rwlock_t'. */ -#undef HAVE_PTHREAD_RWLOCK_T - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -#undef HAVE_PTHREAD_SPINLOCK_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define if you have Python libraries and header files. */ -#undef HAVE_PYTHON - -/* Define to 1 if you have the `random' function. */ -#undef HAVE_RANDOM - -/* Define to 1 if you have the `RAND_cleanup' function. */ -#undef HAVE_RAND_CLEANUP - -/* If we have reallocarray(3) */ -#undef HAVE_REALLOCARRAY - -/* Define to 1 if you have the `recvmsg' function. */ -#undef HAVE_RECVMSG - -/* Define to 1 if you have the `sendmsg' function. */ -#undef HAVE_SENDMSG - -/* Define to 1 if you have the `setregid' function. */ -#undef HAVE_SETREGID - -/* Define to 1 if you have the `setresgid' function. */ -#undef HAVE_SETRESGID - -/* Define to 1 if you have the `setresuid' function. */ -#undef HAVE_SETRESUID - -/* Define to 1 if you have the `setreuid' function. */ -#undef HAVE_SETREUID - -/* Define to 1 if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - -/* Define to 1 if you have the `setusercontext' function. */ -#undef HAVE_SETUSERCONTEXT - -/* Define to 1 if you have the `SHA512_Update' function. */ -#undef HAVE_SHA512_UPDATE - -/* Define to 1 if you have the `shmget' function. */ -#undef HAVE_SHMGET - -/* Define to 1 if you have the `sigprocmask' function. */ -#undef HAVE_SIGPROCMASK - -/* Define to 1 if you have the `sleep' function. */ -#undef HAVE_SLEEP - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the `socketpair' function. */ -#undef HAVE_SOCKETPAIR - -/* Using Solaris threads */ -#undef HAVE_SOLARIS_THREADS - -/* Define to 1 if you have the `srandom' function. */ -#undef HAVE_SRANDOM - -/* Define if you have the SSL libraries installed. */ -#undef HAVE_SSL - -/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_PROTOS - -/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB - -/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ -#undef HAVE_SSL_CTX_SET_CIPHERSUITES - -/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ -#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL - -/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb' - function. */ -#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB - -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ -#undef HAVE_SSL_GET0_ALPN_SELECTED - -/* Define to 1 if you have the `SSL_get0_peername' function. */ -#undef HAVE_SSL_GET0_PEERNAME - -/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ -#undef HAVE_SSL_GET1_PEER_CERTIFICATE - -/* Define to 1 if you have the `SSL_set1_host' function. */ -#undef HAVE_SSL_SET1_HOST - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strptime' function. */ -#undef HAVE_STRPTIME - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ -#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST - -/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ -#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN - -/* Define if you have Swig libraries and header files. */ -#undef HAVE_SWIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if systemd should be used */ -#undef HAVE_SYSTEMD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_ENDIAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IPC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHA2_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TARGETCONDITIONALS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Using Windows threads */ -#undef HAVE_WINDOWS_THREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if you have the `writev' function. */ -#undef HAVE_WRITEV - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ -#undef HAVE_X509_VERIFY_PARAM_SET1_HOST - -/* Define to 1 if you have the `_beginthreadex' function. */ -#undef HAVE__BEGINTHREADEX - -/* If HMAC_Init_ex() returns void */ -#undef HMAC_INIT_EX_RETURNS_VOID - -/* if lex has yylex_destroy */ -#undef LEX_HAS_YYLEX_DESTROY - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Define to the maximum message length to pass to syslog. */ -#undef MAXSYSLOGMSGLEN - -/* Define if memcmp() does not compare unsigned bytes */ -#undef MEMCMP_IS_BROKEN - -/* Define if mkdir has one argument. */ -#undef MKDIR_HAS_ONE_ARG - -/* Define if the network stack does not fully support nonblocking io (causes - lower performance). */ -#undef NONBLOCKING_IS_BROKEN - -/* Put -D_ALL_SOURCE define in config.h */ -#undef OMITTED__D_ALL_SOURCE - -/* Put -D_BSD_SOURCE define in config.h */ -#undef OMITTED__D_BSD_SOURCE - -/* Put -D_DEFAULT_SOURCE define in config.h */ -#undef OMITTED__D_DEFAULT_SOURCE - -/* Put -D_GNU_SOURCE define in config.h */ -#undef OMITTED__D_GNU_SOURCE - -/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ -#undef OMITTED__D_LARGEFILE_SOURCE_1 - -/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ -#undef OMITTED__D_POSIX_C_SOURCE_200112 - -/* Put -D_XOPEN_SOURCE=600 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_600 - -/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 - -/* Put -D__EXTENSIONS__ define in config.h */ -#undef OMITTED__D__EXTENSIONS__ - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* default pidfile location */ -#undef PIDFILE - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Return type of signal handlers, but autoconf 2.70 says 'your code may - safely assume C89 semantics that RETSIGTYPE is void.' */ -#undef RETSIGTYPE - -/* if REUSEPORT is enabled by default */ -#undef REUSEPORT_DEFAULT - -/* default rootkey location */ -#undef ROOT_ANCHOR_FILE - -/* default rootcert location */ -#undef ROOT_CERT_FILE - -/* version number for resource files */ -#undef RSRC_PACKAGE_VERSION - -/* Directory to chdir to */ -#undef RUN_DIR - -/* Shared data */ -#undef SHARE_DIR - -/* The size of `pthread_t', as computed by sizeof. */ -#undef SIZEOF_PTHREAD_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `time_t', as computed by sizeof. */ -#undef SIZEOF_TIME_T - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* define if (v)snprintf does not return length needed, (but length used) */ -#undef SNPRINTF_RET_BROKEN - -/* Define to 1 if libsodium supports sodium_set_misuse_handler */ -#undef SODIUM_MISUSE_HANDLER - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* use default strptime. */ -#undef STRPTIME_WORKS - -/* Use win32 resources and API */ -#undef UB_ON_WINDOWS - -/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ -#undef UB_SYSLOG_FACILITY - -/* default username */ -#undef UB_USERNAME - -/* use to enable lightweight alloc assertions, for debug use */ -#undef UNBOUND_ALLOC_LITE - -/* use malloc not regions, for debug use */ -#undef UNBOUND_ALLOC_NONREGIONAL - -/* use statistics for allocs and frees, for debug use */ -#undef UNBOUND_ALLOC_STATS - -/* define this to enable debug checks. */ -#undef UNBOUND_DEBUG - -/* Define to 1 to use cachedb support */ -#undef USE_CACHEDB - -/* Define to 1 to enable dnscrypt support */ -#undef USE_DNSCRYPT - -/* Define to 1 to enable dnscrypt with xchacha20 support */ -#undef USE_DNSCRYPT_XCHACHA20 - -/* Define to 1 to enable dnstap support */ -#undef USE_DNSTAP - -/* Define this to enable DSA support. */ -#undef USE_DSA - -/* Define this to enable ECDSA support. */ -#undef USE_ECDSA - -/* Define this to enable an EVP workaround for older openssl */ -#undef USE_ECDSA_EVP_WORKAROUND - -/* Define this to enable ED25519 support. */ -#undef USE_ED25519 - -/* Define this to enable ED448 support. */ -#undef USE_ED448 - -/* Define this to enable GOST support. */ -#undef USE_GOST - -/* Define to 1 to use ipsecmod support. */ -#undef USE_IPSECMOD - -/* Define to 1 to use ipset support */ -#undef USE_IPSET - -/* Define if you enable libevent */ -#undef USE_LIBEVENT - -/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a - default outgoing port range. This is only for the libunbound on Linux and - does not affect unbound resolving daemon itself. This may severely limit - the number of available outgoing ports and thus decrease randomness. Define - this only when the target system restricts (e.g. some of SELinux enabled - distributions) the use of non-ephemeral ports. */ -#undef USE_LINUX_IP_LOCAL_PORT_RANGE - -/* Define if you want to use internal select based events */ -#undef USE_MINI_EVENT - -/* Define this to enable client TCP Fast Open. */ -#undef USE_MSG_FASTOPEN - -/* Define this to enable client TCP Fast Open. */ -#undef USE_OSX_MSG_FASTOPEN - -/* Define this to use hiredis client. */ -#undef USE_REDIS - -/* Define this to enable SHA1 support. */ -#undef USE_SHA1 - -/* Define this to enable SHA256 and SHA512 support. */ -#undef USE_SHA2 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define this to enable server TCP Fast Open. */ -#undef USE_TCP_FASTOPEN - -/* Whether the windows socket API is used */ -#undef USE_WINSOCK - -/* the version of the windows API enabled */ -#undef WINVER *** 502 LINES SKIPPED *** From nobody Wed Oct 4 01:02:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxl6cgJz4wKKN; Wed, 4 Oct 2023 01:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxl6Rd3z4Xyj; Wed, 4 Oct 2023 01:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d5Leh95C3sVzv0SPErSdU4VCOvXlG88+m1OfFl9JTN0=; b=xUBpTUJJ1mgCIJ7+5xUQGYA7cPGJJkgLEfWBSUrxCbmgdAvEgQmc6ZAM2XPBkAglN68jtn 0QqtF0hkC5F/SnRf4OhQKpzWheq3Gm3fKNBUbHG1rwW25sjgTN8Z2GQAsAlnZV5l5GRTMm YFF4RTVSDFM0w7K8aer34Kya2bROda3VTtmpLxVleH/a8bikhFzNLcZVmn4eR2jbrV7H71 Zlr4xABu+lj42DL5GKoTkEEDKfY0BA2Ii6d+jehBUyxiswT2yF6VHZBlmyvgQN3MPwicGM oHCcKZVujv9UwGUGFJABjXh8AHajBQxfvLBYetM2RFuvOFVeEmfr1LDitUhGSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381323; a=rsa-sha256; cv=none; b=tP7O2Ppx0HD1R/zGUWGU5MkSZTI2K16Aa8G6hqmW09ccmgwBv/nkNAeTOTyNrmQx0Y/rxQ lkdbkpI6H+Uf0SqmEBZNjrX2xY3jV/xPKwoJcZ7nJDZYww49x1NUAhRUm51JfXCCpuOFwC kGlauPw0YJWkFarL00zVrpICRZsyGN8ADW6hvhvkGR6Jr/E86CvkUPWKJGnHeCTBFsbEHU YuQ3NLRtEmcU08xYymjqGGgXihSLojvs3F3hB3rRZcrF4hQsuGvR5U1FMJoZtwq/eiCgZn KkGwJ+kb0b0btqaUESZ8Dl4+B0jVW7sO8nX7eZ3aELcMuZeSxT8zhaiALp7ccA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d5Leh95C3sVzv0SPErSdU4VCOvXlG88+m1OfFl9JTN0=; b=eZh9/i+JKWUY9kG8toIrt3evn2j7dxvtO1uGACU7yBa/CDM0V4T+3EMD1P7ptEKUAKK1FB 5F2+WojKOLi+CpGizR0wSaNLZKD/y49Hh+DkJUmFIJBTaIqfVRD11z+GS4pQj1ykrBUkd0 XwrXCg4MDXaQjFIEvi3+ZEbQvtRLTHabrHcgo4fNXjAbe3QgNf/P8q66RJl96R5Lv6LFAT 1DoakfhIO7P1bMv1BDh0JKrn/nIqV8dMfADnPJZ8uEKfPyETZvgvJiwL8zl3nRUjuG4sWy NJ47/62whYmMkULeEZmQPeJ2FLYnRL7xk52hccDYvyZWriuG/Vy6z4vKDIdRJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxl5Bc4z33W; Wed, 4 Oct 2023 01:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394123kU050340; Wed, 4 Oct 2023 01:02:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394123ml050337; Wed, 4 Oct 2023 01:02:03 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:03 GMT Message-Id: <202310040102.394123ml050337@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: a931c02ae895 - stable/13 - sqlite3: Vendor import of sqlite3 3.43.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a931c02ae895feb259cc84ec53e44e6f6481db25 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a931c02ae895feb259cc84ec53e44e6f6481db25 commit a931c02ae895feb259cc84ec53e44e6f6481db25 Author: Cy Schubert AuthorDate: 2023-09-19 15:06:50 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:51 +0000 sqlite3: Vendor import of sqlite3 3.43.1 Release notes at https://www.sqlite.org/releaselog/3_43_1.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main (cherry picked from commit ec994981447e8a974426660b5071bc405280af73) --- contrib/sqlite3/Makefile.am | 2 +- contrib/sqlite3/Makefile.in | 2 +- contrib/sqlite3/Makefile.msc | 27 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1019 +++- contrib/sqlite3/sqlite3.1 | 161 +- contrib/sqlite3/sqlite3.c | 7881 +++++++++++++++++++++--------- contrib/sqlite3/sqlite3.h | 106 +- contrib/sqlite3/sqlite3ext.h | 4 + contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 20 +- contrib/sqlite3/tea/configure.ac | 2 +- contrib/sqlite3/tea/generic/tclsqlite3.c | 33 +- 14 files changed, 6509 insertions(+), 2772 deletions(-) diff --git a/contrib/sqlite3/Makefile.am b/contrib/sqlite3/Makefile.am index 694419b27dfd..1eaa560ff884 100644 --- a/contrib/sqlite3/Makefile.am +++ b/contrib/sqlite3/Makefile.am @@ -9,7 +9,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h diff --git a/contrib/sqlite3/Makefile.in b/contrib/sqlite3/Makefile.in index d45c6b8f4cde..fe708a0a9d84 100644 --- a/contrib/sqlite3/Makefile.in +++ b/contrib/sqlite3/Makefile.in @@ -371,7 +371,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 09daa867eced..13663d877757 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -52,6 +52,13 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF +# Set this non-0 to use structured exception handling (SEH) for WAL mode +# in the core library. +# +!IFNDEF USE_SEH +USE_SEH = 1 +!ENDIF + # Set this non-0 to have the shell executable link against the core dynamic # link library. # @@ -180,6 +187,12 @@ WIN32HEAP = 0 OSTRACE = 0 !ENDIF +# enable address sanitizer using ASAN=1 on the command-line. +# +!IFNDEF ASAN +ASAN = 0 +!ENDIF + # Set this to one of the following values to enable various debugging # features. Each level includes the debugging options from the previous # levels. Currently, the recognized values for DEBUG are: @@ -311,6 +324,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF +# Should structured exception handling (SEH) be enabled for WAL mode in +# the core library? +# +!IF $(USE_SEH)!=0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!ENDIF + # These are the "extended" SQLite compilation options used when compiling for # the Windows 10 platform. # @@ -718,6 +738,13 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 !ENDIF +# Address sanitizer if ASAN=1 +# +!IF $(ASAN)>0 +TCC = $(TCC) /fsanitize=address +!ENDIF + + # Compiler options needed for programs that use the readline() library. # !IFNDEF READLINE_FLAGS diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 1016e350c37f..39694c06793b 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.42.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.43.1. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.42.0' -PACKAGE_STRING='sqlite 3.42.0' +PACKAGE_VERSION='3.43.1' +PACKAGE_STRING='sqlite 3.43.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.42.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.43.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.42.0:";; + short | recursive ) echo "Configuration of sqlite 3.43.1:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.42.0 +sqlite configure 3.43.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.42.0, which was +It was created by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.42.0' + VERSION='3.43.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.42.0, which was +This file was extended by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.42.0 +sqlite config.status 3.43.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index a706a4753049..3d7da8b984c3 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.42.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.43.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 647a214226cc..6b2cdca83d6b 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -246,6 +246,7 @@ typedef unsigned char u8; #if SQLITE_OS_WINRT #include #endif +#undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #include @@ -1224,6 +1225,46 @@ static char *shellFakeSchema( return s.z; } +/* +** SQL function: strtod(X) +** +** Use the C-library strtod() function to convert string X into a double. +** Used for comparing the accuracy of SQLite's internal text-to-float conversion +** routines against the C-library. +*/ +static void shellStrtod( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + char *z = (char*)sqlite3_value_text(apVal[0]); + UNUSED_PARAMETER(nVal); + if( z==0 ) return; + sqlite3_result_double(pCtx, strtod(z,0)); +} + +/* +** SQL function: dtostr(X) +** +** Use the C-library printf() function to convert real value X into a string. +** Used for comparing the accuracy of SQLite's internal float-to-text conversion +** routines against the C-library. +*/ +static void shellDtostr( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + double r = sqlite3_value_double(apVal[0]); + int n = nVal>=2 ? sqlite3_value_int(apVal[1]) : 26; + char z[400]; + if( n<1 ) n = 1; + if( n>350 ) n = 350; + sprintf(z, "%#+.*e", n, r); + sqlite3_result_text(pCtx, z, -1, SQLITE_TRANSIENT); +} + + /* ** SQL function: shell_module_schema(X) ** @@ -1473,7 +1514,7 @@ struct DIR { #endif /* -** Provide the function prototype for the POSIX compatiable getenv() +** Provide the function prototype for the POSIX compatible getenv() ** function. This function is not thread-safe. */ @@ -1799,6 +1840,188 @@ int sqlite3MemTraceDeactivate(void){ } /************************* End ../ext/misc/memtrace.c ********************/ +/************************* Begin ../ext/misc/pcachetrace.c ******************/ +/* +** 2023-06-21 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This file implements an extension that uses the SQLITE_CONFIG_PCACHE2 +** mechanism to add a tracing layer on top of pluggable page cache of +** SQLite. If this extension is registered prior to sqlite3_initialize(), +** it will cause all page cache activities to be logged on standard output, +** or to some other FILE specified by the initializer. +** +** This file needs to be compiled into the application that uses it. +** +** This extension is used to implement the --pcachetrace option of the +** command-line shell. +*/ +#include +#include +#include + +/* The original page cache routines */ +static sqlite3_pcache_methods2 pcacheBase; +static FILE *pcachetraceOut; + +/* Methods that trace pcache activity */ +static int pcachetraceInit(void *pArg){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p)\n", pArg); + } + nRes = pcacheBase.xInit(pArg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p) -> %d\n", pArg, nRes); + } + return nRes; +} +static void pcachetraceShutdown(void *pArg){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShutdown(%p)\n", pArg); + } + pcacheBase.xShutdown(pArg); +} +static sqlite3_pcache *pcachetraceCreate(int szPage, int szExtra, int bPurge){ + sqlite3_pcache *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d)\n", + szPage, szExtra, bPurge); + } + pRes = pcacheBase.xCreate(szPage, szExtra, bPurge); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d) -> %p\n", + szPage, szExtra, bPurge, pRes); + } + return pRes; +} +static void pcachetraceCachesize(sqlite3_pcache *p, int nCachesize){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCachesize(%p, %d)\n", p, nCachesize); + } + pcacheBase.xCachesize(p, nCachesize); +} +static int pcachetracePagecount(sqlite3_pcache *p){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p)\n", p); + } + nRes = pcacheBase.xPagecount(p); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p) -> %d\n", p, nRes); + } + return nRes; +} +static sqlite3_pcache_page *pcachetraceFetch( + sqlite3_pcache *p, + unsigned key, + int crFg +){ + sqlite3_pcache_page *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d)\n", p, key, crFg); + } + pRes = pcacheBase.xFetch(p, key, crFg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d) -> %p\n", + p, key, crFg, pRes); + } + return pRes; +} +static void pcachetraceUnpin( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + int bDiscard +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xUnpin(%p, %p, %d)\n", + p, pPg, bDiscard); + } + pcacheBase.xUnpin(p, pPg, bDiscard); +} +static void pcachetraceRekey( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + unsigned oldKey, + unsigned newKey +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xRekey(%p, %p, %u, %u)\n", + p, pPg, oldKey, newKey); + } + pcacheBase.xRekey(p, pPg, oldKey, newKey); +} +static void pcachetraceTruncate(sqlite3_pcache *p, unsigned n){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xTruncate(%p, %u)\n", p, n); + } + pcacheBase.xTruncate(p, n); +} +static void pcachetraceDestroy(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xDestroy(%p)\n", p); + } + pcacheBase.xDestroy(p); +} +static void pcachetraceShrink(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShrink(%p)\n", p); + } + pcacheBase.xShrink(p); +} + +/* The substitute pcache methods */ +static sqlite3_pcache_methods2 ersaztPcacheMethods = { + 0, + 0, + pcachetraceInit, + pcachetraceShutdown, + pcachetraceCreate, + pcachetraceCachesize, + pcachetracePagecount, + pcachetraceFetch, + pcachetraceUnpin, + pcachetraceRekey, + pcachetraceTruncate, + pcachetraceDestroy, + pcachetraceShrink +}; + +/* Begin tracing memory allocations to out. */ +int sqlite3PcacheTraceActivate(FILE *out){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch==0 ){ + rc = sqlite3_config(SQLITE_CONFIG_GETPCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &ersaztPcacheMethods); + } + } + pcachetraceOut = out; + return rc; +} + +/* Deactivate memory tracing */ +int sqlite3PcacheTraceDeactivate(void){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch!=0 ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + memset(&pcacheBase, 0, sizeof(pcacheBase)); + } + } + pcachetraceOut = 0; + return rc; +} + +/************************* End ../ext/misc/pcachetrace.c ********************/ /************************* Begin ../ext/misc/shathree.c ******************/ /* ** 2017-03-08 @@ -2683,41 +2906,24 @@ static void decimal_free(Decimal *p){ } /* -** Allocate a new Decimal object. Initialize it to the number given -** by the input string. +** Allocate a new Decimal object initialized to the text in zIn[]. +** Return NULL if any kind of error occurs. */ -static Decimal *decimal_new( - sqlite3_context *pCtx, - sqlite3_value *pIn, - int nAlt, - const unsigned char *zAlt -){ - Decimal *p; - int n, i; - const unsigned char *zIn; +static Decimal *decimalNewFromText(const char *zIn, int n){ + Decimal *p = 0; + int i; int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); - if( p==0 ) goto new_no_mem; + if( p==0 ) goto new_from_text_failed; p->sign = 0; p->oom = 0; p->isInit = 1; p->isNull = 0; p->nDigit = 0; p->nFrac = 0; - if( zAlt ){ - n = nAlt, - zIn = zAlt; - }else{ - if( sqlite3_value_type(pIn)==SQLITE_NULL ){ - p->a = 0; - p->isNull = 1; - return p; - } - n = sqlite3_value_bytes(pIn); - zIn = sqlite3_value_text(pIn); - } p->a = sqlite3_malloc64( n+1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; for(i=0; isspace(zIn[i]); i++){} if( zIn[i]=='-' ){ p->sign = 1; @@ -2768,7 +2974,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memset(p->a+p->nDigit, 0, iExp); p->nDigit += iExp; } @@ -2787,7 +2993,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memmove(p->a+iExp, p->a, p->nDigit); memset(p->a, 0, iExp); p->nDigit += iExp; @@ -2796,7 +3002,76 @@ static Decimal *decimal_new( } return p; -new_no_mem: +new_from_text_failed: + if( p ){ + if( p->a ) sqlite3_free(p->a); + sqlite3_free(p); + } + return 0; +} + +/* Forward reference */ +static Decimal *decimalFromDouble(double); + +/* +** Allocate a new Decimal object from an sqlite3_value. Return a pointer +** to the new object, or NULL if there is an error. If the pCtx argument +** is not NULL, then errors are reported on it as well. +** +** If the pIn argument is SQLITE_TEXT or SQLITE_INTEGER, it is converted +** directly into a Decimal. For SQLITE_FLOAT or for SQLITE_BLOB of length +** 8 bytes, the resulting double value is expanded into its decimal equivalent. +** If pIn is NULL or if it is a BLOB that is not exactly 8 bytes in length, +** then NULL is returned. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, /* Report error here, if not null */ + sqlite3_value *pIn, /* Construct the decimal object from this */ + int bTextOnly /* Always interpret pIn as text if true */ +){ + Decimal *p = 0; + int eType = sqlite3_value_type(pIn); + if( bTextOnly && (eType==SQLITE_FLOAT || eType==SQLITE_BLOB) ){ + eType = SQLITE_TEXT; + } + switch( eType ){ + case SQLITE_TEXT: + case SQLITE_INTEGER: { + const char *zIn = (const char*)sqlite3_value_text(pIn); + int n = sqlite3_value_bytes(pIn); + p = decimalNewFromText(zIn, n); + if( p==0 ) goto new_failed; + break; + } + + case SQLITE_FLOAT: { + p = decimalFromDouble(sqlite3_value_double(pIn)); + break; + } + + case SQLITE_BLOB: { + const unsigned char *x; + unsigned int i; + sqlite3_uint64 v = 0; + double r; + + if( sqlite3_value_bytes(pIn)!=sizeof(r) ) break; + x = sqlite3_value_blob(pIn); + for(i=0; ioom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + for(nDigit=p->nDigit; nDigit>0 && p->a[nDigit-1]==0; nDigit--){} + for(nZero=0; nZeroa[nZero]==0; nZero++){} + nFrac = p->nFrac + (nDigit - p->nDigit); + nDigit -= nZero; + z = sqlite3_malloc( nDigit+20 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( nDigit==0 ){ + zero = 0; + a = &zero; + nDigit = 1; + nFrac = 0; + }else{ + a = &p->a[nZero]; + } + if( p->sign && nDigit>0 ){ + z[0] = '-'; + }else{ + z[0] = '+'; + } + z[1] = a[0]+'0'; + z[2] = '.'; + if( nDigit==1 ){ + z[3] = '0'; + i = 4; + }else{ + for(i=1; iisNull ) goto cmp_done; - pB = decimal_new(context, argv[1], 0, 0); + pB = decimal_new(context, argv[1], 1); if( pB==0 || pB->isNull ) goto cmp_done; rc = decimal_cmp(pA, pB); if( rc<0 ) rc = -1; @@ -2963,7 +3283,7 @@ static void decimal_expand(Decimal *p, int nDigit, int nFrac){ } /* -** Add the value pB into pA. +** Add the value pB into pA. A := A + B. ** ** Both pA and pB might become denormalized by this routine. */ @@ -3032,6 +3352,172 @@ static void decimal_add(Decimal *pA, Decimal *pB){ } } +/* +** Multiply A by B. A := A * B +** +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. +*/ +static void decimalMul(Decimal *pA, Decimal *pB){ + signed char *acc = 0; + int i, j, k; + int minFrac; + + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + pA->oom = 1; + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + +mul_end: + sqlite3_free(acc); +} + +/* +** Create a new Decimal object that contains an integer power of 2. +*/ +static Decimal *decimalPow2(int N){ + Decimal *pA = 0; /* The result to be returned */ + Decimal *pX = 0; /* Multiplier */ + if( N<-20000 || N>20000 ) goto pow2_fault; + pA = decimalNewFromText("1.0", 3); + if( pA==0 || pA->oom ) goto pow2_fault; + if( N==0 ) return pA; + if( N>0 ){ + pX = decimalNewFromText("2.0", 3); + }else{ + N = -N; + pX = decimalNewFromText("0.5", 3); + } + if( pX==0 || pX->oom ) goto pow2_fault; + while( 1 /* Exit by break */ ){ + if( N & 1 ){ + decimalMul(pA, pX); + if( pA->oom ) goto pow2_fault; + } + N >>= 1; + if( N==0 ) break; + decimalMul(pX, pX); + } + decimal_free(pX); + return pA; + +pow2_fault: + decimal_free(pA); + decimal_free(pX); + return 0; +} + +/* +** Use an IEEE754 binary64 ("double") to generate a new Decimal object. +*/ +static Decimal *decimalFromDouble(double r){ + sqlite3_int64 m, a; + int e; + int isNeg; + Decimal *pA; + Decimal *pX; + char zNum[100]; + if( r<0.0 ){ + isNeg = 1; + r = -r; + }else{ + isNeg = 0; + } + memcpy(&a,&r,sizeof(a)); + if( a==0 ){ + e = 0; + m = 0; + }else{ + e = a>>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + e = e - 1075; + if( e>971 ){ + return 0; /* A NaN or an Infinity */ + } + } + + /* At this point m is the integer significand and e is the exponent */ + sqlite3_snprintf(sizeof(zNum), zNum, "%lld", m); + pA = decimalNewFromText(zNum, (int)strlen(zNum)); + pX = decimalPow2(e); + decimalMul(pA, pX); + decimal_free(pX); + return pA; +} + +/* +** SQL Function: decimal(X) +** OR: decimal_exp(X) +** +** Convert input X into decimal and then back into text. +** +** If X is originally a float, then a full decimal expansion of that floating +** point value is done. Or if X is an 8-byte blob, it is interpreted +** as a float and similarly expanded. +** +** The decimal_exp(X) function returns the result in exponential notation. +** decimal(X) returns a complete decimal, without the e+NNN at the end. +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0); + UNUSED_PARAMETER(argc); + if( p ){ + if( sqlite3_user_data(context)!=0 ){ + decimal_result_sci(context, p); + }else{ + decimal_result(context, p); + } + decimal_free(p); + } +} + /* ** Compare text in decimal order. */ @@ -3042,8 +3528,8 @@ static int decimalCollFunc( ){ const unsigned char *zA = (const unsigned char*)pKey1; const unsigned char *zB = (const unsigned char*)pKey2; - Decimal *pA = decimal_new(0, 0, nKey1, zA); - Decimal *pB = decimal_new(0, 0, nKey2, zB); + Decimal *pA = decimalNewFromText((const char*)zA, nKey1); + Decimal *pB = decimalNewFromText((const char*)zB, nKey2); int rc; UNUSED_PARAMETER(notUsed); if( pA==0 || pB==0 ){ @@ -3068,8 +3554,8 @@ static void decimalAddFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); decimal_add(pA, pB); decimal_result(context, pA); @@ -3081,8 +3567,8 @@ static void decimalSubFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pB ){ pB->sign = !pB->sign; @@ -3120,7 +3606,7 @@ static void decimalSumStep( p->nFrac = 0; } if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); decimal_add(p, pArg); decimal_free(pArg); } @@ -3135,7 +3621,7 @@ static void decimalSumInverse( p = sqlite3_aggregate_context(context, sizeof(*p)); if( p==0 ) return; if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); if( pArg ) pArg->sign = !pArg->sign; decimal_add(p, pArg); decimal_free(pArg); @@ -3156,66 +3642,49 @@ static void decimalSumFinalize(sqlite3_context *context){ ** SQL Function: decimal_mul(X, Y) ** ** Return the product of X and Y. -** -** All significant digits after the decimal point are retained. -** Trailing zeros after the decimal point are omitted as long as -** the number of digits after the decimal point is no less than -** either the number of digits in either input. */ static void decimalMulFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - signed char *acc = 0; - int i, j, k; - int minFrac; + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pA==0 || pA->oom || pA->isNull || pB==0 || pB->oom || pB->isNull ){ goto mul_end; } - acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); - if( acc==0 ){ - sqlite3_result_error_nomem(context); + decimalMul(pA, pB); + if( pA->oom ){ goto mul_end; } - memset(acc, 0, pA->nDigit + pB->nDigit + 2); - minFrac = pA->nFrac; - if( pB->nFracnFrac; - for(i=pA->nDigit-1; i>=0; i--){ - signed char f = pA->a[i]; - int carry = 0, x; *** 15446 LINES SKIPPED *** From nobody Wed Oct 4 01:02:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxn2vXnz4wJxt; Wed, 4 Oct 2023 01:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxn1BY8z4YFY; Wed, 4 Oct 2023 01:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AG7nIizqm5+QvXUrebJLcP/b/a3P+WOvVQn+zvEBy9c=; b=qCKrX8D9wAQLo1sJwR3vDRIEmyEB0ek7v2lsP1WO823ovKjNv2UnVTsMTijlvOMIF2SBTb JUwv57GcNaHFn/VBecl57IiDwUixQ4ecZYg+6rKy8XMIHku89K641lAYkwuzvkrGhxai8f fFXbzaUx0eBGRSt0AsQTCmIAit9SxOGWuNBH9i6jIgCcZegYkYOYQggl02uZn8xLes328N qxXHM2DdN4D31MQ5brCxkXC0Yic7d0DPClukv3uogGjGduJQ1OFcgxsCRMIT6X3thQd5gs drI3it1fS/11+Xyws16bi0CuSejgcLdvFfUPOHVKdlNwJruguDKOepAXEqCpQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381325; a=rsa-sha256; cv=none; b=Ci9vb4lOZMVONBUST2qZ7Csn8qI0fnjmJuO+29DvDOqLj71bdf4wt/nObZRTHbGwzIN7oC xFOiknxNmMRiDguNhZYVgvYSnjXxTnLTeiRg4aOdev0coiSKd0/7oiK/txT8eY84Wdf7zZ PqMRvqJbz9mDIRGJF70manxbj1SG17f3bXIY+Nh7d9KKymtg/HdvwSUQpYSU5nwubVeH9J 2dgqHdZX5ezwkoPBU70Fk8V4iMgoP1ReBqbjLdwleZ8euFQDE+ig7YSMedjWu1FRgtrLeI Av4613pzvdCJj8f7xgLF6wOZBGW4hQVjH65NEXQCdRdqj5OFYWDLJia6WZQGwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AG7nIizqm5+QvXUrebJLcP/b/a3P+WOvVQn+zvEBy9c=; b=tLS0WTVuoCyxKVNHgJukmqn2uMe2K0j23ECAfpBSufVng8LLI934rxtyq2yaoBpP7oeQxn OUgrWYdOD7bJIyjuH8xFhzlYEMNsniDMiU2DnHnay5TTCkNnMgnldKv0CGSb6Q4pxlMAq0 gm/Q/OVK/YuD3RxGLPbYrHr54vLOiDy6MwhMSXx/uPfeZ4+el0xCS2mNGpeWqkCN3obKkx x12IyBTbxHjleS5iRGHPGmQOynQyiOkco02QniNd4C0c3HLA+vokaMe3+8OYW78euz/yHP 2thkoURCXwf1T7OEipydk01/PIhsnHhSI5DU+nx+CLeIPXg48+PLBGP/NDmbJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxn084Cz2TN; Wed, 4 Oct 2023 01:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394125ul050384; Wed, 4 Oct 2023 01:02:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394124Oa050379; Wed, 4 Oct 2023 01:02:04 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:04 GMT Message-Id: <202310040102.394124Oa050379@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: 4f4adb0576df - stable/13 - unbound: Vendor import 1.18.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4f4adb0576dfbcd0d956db0146c9de7e1bb71563 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4f4adb0576dfbcd0d956db0146c9de7e1bb71563 commit 4f4adb0576dfbcd0d956db0146c9de7e1bb71563 Author: Cy Schubert AuthorDate: 2023-09-19 04:17:09 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:51 +0000 unbound: Vendor import 1.18.0 Release notes at https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/ Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main (cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5) --- contrib/unbound/Makefile.in | 43 +- contrib/unbound/README.md | 2 +- contrib/unbound/acx_nlnetlabs.m4 | 36 +- contrib/unbound/acx_python.m4 | 61 +- contrib/unbound/cachedb/cachedb.c | 57 +- contrib/unbound/cachedb/redis.c | 28 +- contrib/unbound/compat/getentropy_solaris.c | 2 +- contrib/unbound/config.guess | 51 +- contrib/unbound/config.h.in | 25 +- contrib/unbound/config.h.in~ | 1456 ++++++++++++++++++++ contrib/unbound/config.sub | 72 +- contrib/unbound/configure | 170 ++- contrib/unbound/configure.ac | 99 +- contrib/unbound/contrib/Dockerfile.tests | 4 +- contrib/unbound/contrib/README | 3 + contrib/unbound/contrib/aaaa-filter-iterator.patch | 4 +- contrib/unbound/contrib/unbound.init_yocto | 139 ++ contrib/unbound/daemon/acl_list.c | 2 + contrib/unbound/daemon/acl_list.h | 8 +- contrib/unbound/daemon/cachedump.c | 28 +- contrib/unbound/daemon/remote.c | 236 ++-- contrib/unbound/daemon/remote.h | 2 +- contrib/unbound/daemon/stats.c | 53 +- contrib/unbound/daemon/stats.h | 7 + contrib/unbound/daemon/worker.c | 471 ++++--- contrib/unbound/dns64/dns64.c | 4 +- contrib/unbound/dnstap/dnstap.c | 7 +- contrib/unbound/dnstap/dnstap.h | 4 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 39 +- contrib/unbound/doc/Changelog | 323 +++++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 20 + contrib/unbound/doc/example.conf.in | 32 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 58 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 147 +- contrib/unbound/edns-subnet/subnetmod.c | 27 +- contrib/unbound/iterator/iter_delegpt.c | 39 + contrib/unbound/iterator/iter_delegpt.h | 25 + contrib/unbound/iterator/iter_resptype.c | 7 + contrib/unbound/iterator/iter_scrub.c | 43 +- contrib/unbound/iterator/iter_utils.c | 43 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 259 ++-- contrib/unbound/iterator/iterator.h | 23 +- contrib/unbound/libunbound/libworker.c | 16 +- contrib/unbound/libunbound/unbound-event.h | 6 +- contrib/unbound/libunbound/unbound.h | 116 +- contrib/unbound/services/authzone.c | 10 +- contrib/unbound/services/cache/dns.c | 50 +- contrib/unbound/services/cache/infra.c | 75 +- contrib/unbound/services/cache/infra.h | 5 +- contrib/unbound/services/listen_dnsport.c | 153 +- contrib/unbound/services/localzone.c | 20 +- contrib/unbound/services/localzone.h | 2 + contrib/unbound/services/mesh.c | 385 +++--- contrib/unbound/services/mesh.h | 14 +- contrib/unbound/services/modstack.c | 10 +- contrib/unbound/services/outside_network.c | 28 + contrib/unbound/services/rpz.c | 230 +++- contrib/unbound/services/rpz.h | 16 +- contrib/unbound/sldns/rrdef.c | 12 +- contrib/unbound/sldns/rrdef.h | 7 +- contrib/unbound/sldns/str2wire.c | 94 +- contrib/unbound/sldns/str2wire.h | 4 +- contrib/unbound/sldns/wire2str.c | 19 +- contrib/unbound/smallapp/unbound-anchor.c | 3 +- contrib/unbound/smallapp/unbound-checkconf.c | 2 +- contrib/unbound/smallapp/unbound-control.c | 54 +- contrib/unbound/smallapp/unbound-host.c | 5 +- contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 + contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 ++ .../unbound/testdata/edns_downstream_cookies.rpl | 235 ++++ .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 +++ .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 + .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 + .../unbound/testdata/iter_cname_minimise_nx.rpl | 246 ++++ contrib/unbound/testdata/iter_failreply.rpl | 132 ++ contrib/unbound/testdata/iter_ignore_empty.rpl | 198 +++ contrib/unbound/testdata/iter_nat64.rpl | 117 ++ contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 ++ contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 ++ .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 +++ .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 +++ .../testdata/serve_expired_0ttl_servfail.rpl | 129 ++ .../serve_expired_cached_servfail_refresh.rpl | 145 ++ .../stat_values.tdir/stat_values_cachedb.conf | 36 + .../stat_values_downstream_cookies.conf | 32 + contrib/unbound/testdata/subnet_cached_ede.crpl | 114 ++ .../unbound/testdata/subnet_global_prefetch.crpl | 236 ++++ .../subnet_global_prefetch_always_forward.crpl | 167 +++ .../testdata/subnet_global_prefetch_expired.crpl | 241 ++++ contrib/unbound/testdata/val_any_negcache.rpl | 240 ++++ contrib/unbound/util/config_file.c | 153 +- contrib/unbound/util/config_file.h | 65 +- contrib/unbound/util/configlexer.lex | 15 +- contrib/unbound/util/configparser.y | 148 +- contrib/unbound/util/data/msgencode.c | 148 +- contrib/unbound/util/data/msgencode.h | 42 +- contrib/unbound/util/data/msgparse.c | 98 +- contrib/unbound/util/data/msgparse.h | 18 +- contrib/unbound/util/data/msgreply.c | 95 +- contrib/unbound/util/data/msgreply.h | 30 +- contrib/unbound/util/edns.c | 59 + contrib/unbound/util/edns.h | 59 + contrib/unbound/util/fptr_wlist.c | 8 + contrib/unbound/util/iana_ports.inc | 4 + contrib/unbound/util/module.c | 16 +- contrib/unbound/util/module.h | 14 +- contrib/unbound/util/net_help.c | 70 +- contrib/unbound/util/net_help.h | 23 + contrib/unbound/util/netevent.c | 229 +-- contrib/unbound/util/netevent.h | 70 +- contrib/unbound/util/regional.c | 2 +- contrib/unbound/util/rfc_1982.c | 74 + contrib/unbound/util/rfc_1982.h | 63 + contrib/unbound/util/siphash.c | 187 +++ contrib/unbound/util/siphash.h | 43 + contrib/unbound/util/storage/lruhash.c | 25 +- contrib/unbound/util/storage/lruhash.h | 5 +- contrib/unbound/util/storage/slabhash.c | 18 + contrib/unbound/util/storage/slabhash.h | 9 + contrib/unbound/util/timehist.c | 44 +- contrib/unbound/util/timeval_func.c | 113 ++ contrib/unbound/util/timeval_func.h | 53 + contrib/unbound/validator/autotrust.c | 2 + contrib/unbound/validator/val_kcache.c | 10 +- contrib/unbound/validator/val_kcache.h | 4 +- contrib/unbound/validator/val_kentry.c | 48 +- contrib/unbound/validator/val_kentry.h | 37 +- contrib/unbound/validator/val_neg.c | 7 +- contrib/unbound/validator/val_nsec.c | 19 +- contrib/unbound/validator/val_nsec.h | 5 +- contrib/unbound/validator/val_sigcrypt.c | 43 +- contrib/unbound/validator/val_utils.c | 19 +- contrib/unbound/validator/validator.c | 137 +- lib/libunbound/Makefile | 6 +- usr.sbin/unbound/config.h | 6 +- 148 files changed, 9439 insertions(+), 1708 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index bc021aa1eb00..0a2e7f9b6f08 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -122,15 +122,15 @@ iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ services/localzone.c services/mesh.c services/modstack.c services/view.c \ -services/rpz.c \ +services/rpz.c util/rfc_1982.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/shm_side/shm_main.c services/authzone.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ -util/rtt.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ +util/rtt.c util/siphash.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/tcp_conn_limit.c \ -util/timehist.c util/tube.c util/proxy_protocol.c \ +util/timehist.c util/tube.c util/proxy_protocol.c util/timeval_func.c \ util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ validator/autotrust.c validator/val_anchor.c validator/validator.c \ validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ @@ -145,14 +145,14 @@ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ -fptr_wlist.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +fptr_wlist.lo siphash.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo tcp_conn_limit.lo timehist.lo tube.lo winsock_event.lo \ -autotrust.lo val_anchor.lo rpz.lo proxy_protocol.lo \ +autotrust.lo val_anchor.lo rpz.lo rfc_1982.lo proxy_protocol.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo $(CACHEDB_OBJ) authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo timeval_func.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -198,7 +198,7 @@ CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \ $(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ CONTROL_SRC=smallapp/unbound-control.c -CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ=unbound-control.lo CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c @@ -455,6 +455,7 @@ unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnsta dynlibmod.lo dynlibdmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h +timeval_func.lo timeval_func.o: $(srcdir)/util/timeval_func.c $(srcdir)/util/timeval_func.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -498,6 +499,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h echo "#include \"util/configyyrename.h\"" >> $@ ;\ $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ fi + @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y @-if test ! -d util; then $(INSTALL) -d util; fi @@ -516,7 +518,7 @@ distclean: clean rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) - rm -f Makefile + rm -f Makefile maintainer-clean: distclean rm -f util/configlexer.c util/configparser.c util/configparser.h @@ -649,7 +651,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed - if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp # dependency generation @@ -877,7 +879,7 @@ rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdi outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h \ @@ -915,7 +917,8 @@ config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/ut configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ @@ -928,7 +931,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/respip/respip.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h + $(srcdir)/util/tube.h $(srcdir)/util/timeval_func.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ @@ -983,7 +986,7 @@ netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/neteve $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/timeval_func.h proxy_protocol.lo proxy_protocol.o: $(srcdir)/util/proxy_protocol.c config.h \ $(srcdir)/util/proxy_protocol.h $(srcdir)/sldns/sbuffer.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ @@ -1006,6 +1009,8 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +siphash.lo siphash.o: $(srcdir)/util/siphash.c +rfc_1982.lo rfc_1982.o: $(srcdir)/util/rfc_1982.c edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ @@ -1186,7 +1191,7 @@ unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h $(srcdir)/sldns/r $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/services/outside_network.h + $(srcdir)/services/outside_network.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ @@ -1321,7 +1326,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1343,7 +1348,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/daemon/remote.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/timeval_func.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ @@ -1357,7 +1362,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1409,7 +1414,7 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/util/timeval_func.h \ $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ @@ -1417,7 +1422,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h $(srcdir)/util/timeval_func.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index c3d9bc2492ef..c220da030458 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -1,6 +1,6 @@ # Unbound -[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) diff --git a/contrib/unbound/acx_nlnetlabs.m4 b/contrib/unbound/acx_nlnetlabs.m4 index cf436ec54bb6..f27615bd8bce 100644 --- a/contrib/unbound/acx_nlnetlabs.m4 +++ b/contrib/unbound/acx_nlnetlabs.m4 @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 44 +# Version 46 +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. # 2021-08-17 fix for openssl to detect split version, with ssldir_include @@ -187,7 +189,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -233,7 +235,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -272,7 +274,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -309,7 +311,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -335,7 +337,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -345,7 +347,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -356,7 +358,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -370,7 +372,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -385,7 +387,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -413,7 +415,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -475,7 +477,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -834,7 +836,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -859,7 +861,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -923,7 +925,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else @@ -1317,7 +1319,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1355,7 +1357,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/contrib/unbound/acx_python.m4 b/contrib/unbound/acx_python.m4 index 16c0c6fd943f..c945d6c8989e 100644 --- a/contrib/unbound/acx_python.m4 +++ b/contrib/unbound/acx_python.m4 @@ -17,33 +17,62 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ PYTHON_VERSION=`$PYTHON -c "import sys; \ print(sys.version.split()[[0]])"` fi + # calculate the version number components. + [ + v="$PYTHON_VERSION" + PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi + ] - # Check if you have sysconfig - AC_MSG_CHECKING([for the sysconfig Python module]) - if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then + # For some systems, sysconfig exists, but has the wrong paths, + # on Debian 10, for python 2.7 and 3.7. So, we check the version, + # and for older versions try distutils.sysconfig first. For newer + # versions>=3.10, where distutils.sysconfig is deprecated, use + # sysconfig first and then attempt the other one. + py_distutils_first="no" + if test $PYTHON_VERSION_MAJOR -lt 3; then + py_distutils_first="yes" + fi + if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then + py_distutils_first="yes" + fi + + # Check if you have the first module + if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi + sysconfig_module="" + AC_MSG_CHECKING([for the $m Python module]) + if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then AC_MSG_RESULT([yes]) - sysconfig_module="sysconfig" - # if yes, use sysconfig, because distutils is deprecated. + sysconfig_module="$m" else AC_MSG_RESULT([no]) - # if no, try to use distutils + fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then + # if not found, try the other one. + if test -z "$sysconfig_module"; then + if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi + AC_MSG_CHECKING([for the $m2 Python module]) + if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then AC_MSG_RESULT([yes]) + sysconfig_module="$m2" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". - Please check your Python installation. The error was: - $ac_distutils_result]) + AC_MSG_ERROR([cannot import Python module "$m", or "$m2". + Please check your Python installation. The errors are: + $m + $ac_modulecheck_result1 + $m2 + $ac_modulecheck_result2]) PYTHON_VERSION="" fi - - sysconfig_module="distutils.sysconfig" fi + if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi # # Check for Python include path diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index 245daa986967..30645268ca23 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -102,7 +102,6 @@ static int testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; - (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); @@ -111,6 +110,15 @@ testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) log_err("out of memory"); return 0; } + /* Register an EDNS option (65534) to bypass the worker cache lookup + * for testing */ + if(!edns_register_option(LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST, + 1 /* bypass cache */, + 0 /* no aggregation */, env)) { + log_err("testframe_init, could not register test opcode"); + free(d); + return 0; + } lock_basic_init(&d->lock); lock_protect(&d->lock, d, sizeof(*d)); return 1; @@ -218,6 +226,8 @@ static int cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) { const char* backend_str = cfg->cachedb_backend; + if(!backend_str || *backend_str==0) + return 1; cachedb_env->backend = cachedb_find_backend(backend_str); if(!cachedb_env->backend) { log_err("cachedb: cannot find backend name '%s'", backend_str); @@ -228,7 +238,7 @@ cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) return 1; } -int +int cachedb_init(struct module_env* env, int id) { struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, @@ -267,19 +277,16 @@ cachedb_init(struct module_env* env, int id) return 1; } -void +void cachedb_deinit(struct module_env* env, int id) { struct cachedb_env* cachedb_env; if(!env || !env->modinfo[id]) return; cachedb_env = (struct cachedb_env*)env->modinfo[id]; - /* free contents */ - /* TODO */ if(cachedb_env->enabled) { (*cachedb_env->backend->deinit)(env, cachedb_env); } - free(cachedb_env); env->modinfo[id] = NULL; } @@ -406,6 +413,14 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(qstate->return_msg->rep->ttl == 0 && !qstate->env->cfg->serve_expired) return 0; + + /* The EDE is added to the out-list so it is encoded in the cached message */ + if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) { + edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch, + qstate->return_msg->rep->reason_bogus, + qstate->return_msg->rep->reason_bogus_str); + } + if(verbosity >= VERB_ALGO) log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, qstate->return_msg->rep); @@ -502,6 +517,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) { struct msg_parse* prs; struct edns_data edns; + struct edns_option* ede; uint64_t timestamp, expiry; time_t adjust; size_t lim = sldns_buffer_limit(buf); @@ -539,6 +555,24 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg) return 0; + /* We find the EDE in the in-list after parsing */ + if(qstate->env->cfg->ede && + (ede = edns_opt_list_find(edns.opt_list_in, LDNS_EDNS_EDE))) { + if(ede->opt_len >= 2) { + qstate->return_msg->rep->reason_bogus = + sldns_read_uint16(ede->opt_data); + } + /* allocate space and store the error string and it's size */ + if(ede->opt_len > 2) { + size_t ede_len = ede->opt_len - 2; + qstate->return_msg->rep->reason_bogus_str = regional_alloc( + qstate->region, sizeof(char) * (ede_len+1)); + memcpy(qstate->return_msg->rep->reason_bogus_str, + ede->opt_data+2, ede_len); + qstate->return_msg->rep->reason_bogus_str[ede_len] = 0; + } + } + qstate->return_rcode = LDNS_RCODE_NOERROR; /* see how much of the TTL expired, and remove it */ @@ -630,11 +664,15 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) * See if unbound's internal cache can answer the query */ static int -cachedb_intcache_lookup(struct module_qstate* qstate) +cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde) { uint8_t* dpname=NULL; size_t dpnamelen=0; struct dns_msg* msg; + /* for testframe bypass this lookup */ + if(cde->backend == &testframe_backend) { + return 0; + } if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo, &dpname, &dpnamelen)) return 0; /* no cache for these queries */ @@ -693,6 +731,7 @@ cachedb_handle_query(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are enabled, and skip if so */ if(!ie->enabled) { /* pass request to next module */ @@ -709,7 +748,7 @@ cachedb_handle_query(struct module_qstate* qstate, /* lookup inside unbound's internal cache. * This does not look for expired entries. */ - if(cachedb_intcache_lookup(qstate)) { + if(cachedb_intcache_lookup(qstate, ie)) { if(verbosity >= VERB_ALGO) { if(qstate->return_msg->rep) log_dns_msg("cachedb internal cache lookup", @@ -746,6 +785,7 @@ cachedb_handle_query(struct module_qstate* qstate, qstate->ext_state[id] = module_wait_module; return; } + qstate->is_cachedb_answer = 1; /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -768,6 +808,7 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are not enabled or instructed to not cache, and skip */ if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ diff --git a/contrib/unbound/cachedb/redis.c b/contrib/unbound/cachedb/redis.c index 16c3741f786b..93a575a4c6d2 100644 --- a/contrib/unbound/cachedb/redis.c +++ b/contrib/unbound/cachedb/redis.c @@ -56,6 +56,8 @@ struct redis_moddata { int numctxs; /* number of ctx entries */ const char* server_host; /* server's IP address or host name */ int server_port; /* server's TCP port */ + const char* server_path; /* server's unix path, or "", NULL if unused */ + const char* server_password; /* server's AUTH password, or "", NULL if unused */ struct timeval timeout; /* timeout for connection setup and commands */ }; @@ -67,8 +69,13 @@ redis_connect(const struct redis_moddata* moddata) { redisContext* ctx; - ctx = redisConnectWithTimeout(moddata->server_host, - moddata->server_port, moddata->timeout); + if(moddata->server_path && moddata->server_path[0]!=0) { + ctx = redisConnectUnixWithTimeout(moddata->server_path, + moddata->timeout); + } else { + ctx = redisConnectWithTimeout(moddata->server_host, + moddata->server_port, moddata->timeout); + } if(!ctx || ctx->err) { const char *errstr = "out of memory"; if(ctx) @@ -80,6 +87,17 @@ redis_connect(const struct redis_moddata* moddata) log_err("failed to set redis timeout"); goto fail; } + if(moddata->server_password && moddata->server_password[0]!=0) { + redisReply* rep; + rep = redisCommand(ctx, "AUTH %s", moddata->server_password); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to authenticate with password"); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + verbose(VERB_OPS, "Connection to Redis established"); return ctx; fail: @@ -94,7 +112,7 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) int i; struct redis_moddata* moddata = NULL; - verbose(VERB_ALGO, "redis_init"); + verbose(VERB_OPS, "Redis initialization"); moddata = calloc(1, sizeof(struct redis_moddata)); if(!moddata) { @@ -112,6 +130,8 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) * we don't have to free it in this module. */ moddata->server_host = env->cfg->redis_server_host; moddata->server_port = env->cfg->redis_server_port; + moddata->server_path = env->cfg->redis_server_path; + moddata->server_password = env->cfg->redis_server_password; moddata->timeout.tv_sec = env->cfg->redis_timeout / 1000; moddata->timeout.tv_usec = (env->cfg->redis_timeout % 1000) * 1000; for(i = 0; i < moddata->numctxs; i++) @@ -154,7 +174,7 @@ redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env) cachedb_env->backend_data; (void)env; - verbose(VERB_ALGO, "redis_deinit"); + verbose(VERB_OPS, "Redis deinitialization"); if(!moddata) return; diff --git a/contrib/unbound/compat/getentropy_solaris.c b/contrib/unbound/compat/getentropy_solaris.c index 5e3b1cbbbd30..1ff8162917b3 100644 --- a/contrib/unbound/compat/getentropy_solaris.c +++ b/contrib/unbound/compat/getentropy_solaris.c @@ -47,7 +47,7 @@ #define SHA512_Update SHA512Update #define SHA512_Final SHA512Final #else -#include "openssl/sha.h" +#include #endif #include diff --git a/contrib/unbound/config.guess b/contrib/unbound/config.guess index 980b02083815..b187213930f1 100755 --- a/contrib/unbound/config.guess +++ b/contrib/unbound/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-09-17' +timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -976,7 +976,27 @@ EOF GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1042,6 +1062,15 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -1197,7 +1226,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1338,7 +1367,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index 2caecf30d040..f31354d01408 100644 *** 18537 LINES SKIPPED *** From nobody Wed Oct 4 01:02:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0bxp3QRhz4wK3W; Wed, 4 Oct 2023 01:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0bxp2ZC1z4Y9T; Wed, 4 Oct 2023 01:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rIOpaDcpOzbIlqZsoIiqC4b1u3eoZD7+hP1Hr2TJfks=; b=PnTmrblqGKHKGmT0M7RKLafyjpcwMehxY+7LK4++LoCM8bzQnKeZ9JRElxPtO0thYvx1WC gRByuLRnzA5yPnRVBzKL/Gjk162fxexyJTcJmbZBupe0tRWqmWtl99fUyWQScs9gzRsbzR Z+CB/BUGXpL3WlOmG+jqamAncxfVBKTbgfwxuZqgGzSzFLZ9/JT6Lq/tVZFafA+tQt9PkH vWsTBEUnuKKHD+irTKPR318aARrUokpUBYISG5cAEiBYC+q6uUothQVQZcMaJ9rPwCLoKw /QPROmwOa1O6mn1FbmMDS8bLnb0H/qoecvurC2nMFb4Xra9nsYjN6IVDli5J2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381326; a=rsa-sha256; cv=none; b=BQKVqtJGKrMG431GTuM7TdQ0oHXbsqYHliYA1tL8lV8XF4FbV7F7GHmffiUQKQUdH32wyW Scqzg4ywlY6OFKZX9A+4tYuUwzHCQCHlzx0hVjqesKKO/rj44/0mVsiMOwX1/5/JvLhj41 rPIjZGGkQpjx1Y5dUfPIfQhhrgc26LySDrShrhPoObYdHJG/dGOBwq8ZSKPo5rm+KWizg4 PFv2FaV+1fLsGgKmZc7ZCkV0k2iFY7DgivzW0W4LgF7B4Zoo0WlmLDveS4SzyTEi+SEGKU 0X/BCgBpqt2sDI4fWodLFfhPqXLLThVLH5F0uL97KtVlrAIqiAa0PTDNQDHj4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rIOpaDcpOzbIlqZsoIiqC4b1u3eoZD7+hP1Hr2TJfks=; b=rBAclg+4CgxBlAEOGTlmRTAV4/bz6CNvNyn2NY0uCHkXS9EIirw1mcu+P9gO3+MsRAjpKy oURSuVDgkmJKeastw8AmwqlPhg6Mz5V6OG7432zzSisk4ic1IInYcz/cyvQTuECiYQ+WLT kNaqzq461DlwJBzreHinTJ9D7el46ppboS8efnfMP9m3D8fioYQtdbNqnnM0iA3nErCt6x KHJ3fP91Ny83NfrjhQtRibU7nrX//hI/2uWfofyowooqfTjKO67j7EI8Dp954h6vIBo0p8 /yfep10BQ/llvhqosWXKioHI0RRwXugD+GXb3AZplEJgbkRx3Hpht4nnHwzPbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0bxp17VVz2TP; Wed, 4 Oct 2023 01:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394126NI050431; Wed, 4 Oct 2023 01:02:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3941268B050428; Wed, 4 Oct 2023 01:02:06 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:06 GMT Message-Id: <202310040102.3941268B050428@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: f5a091c1f6a0 - stable/13 - local-unbound: remove stray config.h.in backup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f5a091c1f6a068cdc5c3bd23536830de9dfe7b84 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f5a091c1f6a068cdc5c3bd23536830de9dfe7b84 commit f5a091c1f6a068cdc5c3bd23536830de9dfe7b84 Author: Mina Galić AuthorDate: 2023-09-20 14:39:37 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:01:52 +0000 local-unbound: remove stray config.h.in backup despite being ignored in our main .gitignore, such files can still be merged from vendor branches. Reviewed by: cy Fixes: 8f76bb7dad (unbound: Vendor import 1.18.0) MFC after: 2 weeks X-MFC with: 8f76bb7dad Differential Revision: https://reviews.freebsd.org/D41920 (cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe) --- contrib/unbound/config.h.in~ | 1456 ------------------------------------------ 1 file changed, 1456 deletions(-) diff --git a/contrib/unbound/config.h.in~ b/contrib/unbound/config.h.in~ deleted file mode 100644 index f31354d01408..000000000000 --- a/contrib/unbound/config.h.in~ +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* apply the noreturn attribute to a function that exits the program */ -#undef ATTR_NORETURN - -/* apply the weak attribute to a symbol */ -#undef ATTR_WEAK - -/* Directory to chroot to */ -#undef CHROOT_DIR - -/* Define this to enable client subnet option. */ -#undef CLIENT_SUBNET - -/* Do sha512 definitions in config.h */ -#undef COMPAT_SHA512 - -/* Command line arguments used with configure */ -#undef CONFCMDLINE - -/* Pathname to the Unbound configuration file */ -#undef CONFIGFILE - -/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work - */ -#undef DARWIN_BROKEN_SETREUID - -/* Whether daemon is deprecated */ -#undef DEPRECATED_DAEMON - -/* Deprecate RSA 1024 bit length, makes that an unsupported key */ -#undef DEPRECATE_RSA_1024 - -/* Define this to enable kernel based UDP source port randomization. */ -#undef DISABLE_EXPLICIT_PORT_RANDOMISATION - -/* default dnstap socket path */ -#undef DNSTAP_SOCKET_PATH - -/* Define if you want to use debug lock checking (slow). */ -#undef ENABLE_LOCK_CHECKS - -/* Define this if you enabled-allsymbols from libunbound to link binaries to - it for smaller install size, but the libunbound export table is polluted by - internal symbols */ -#undef EXPORT_ALL_SYMBOLS - -/* Define to 1 if you have the `accept4' function. */ -#undef HAVE_ACCEPT4 - -/* Define to 1 if you have the `arc4random' function. */ -#undef HAVE_ARC4RANDOM - -/* Define to 1 if you have the `arc4random_uniform' function. */ -#undef HAVE_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Whether the C compiler accepts the "format" attribute */ -#undef HAVE_ATTR_FORMAT - -/* Whether the C compiler accepts the "noreturn" attribute */ -#undef HAVE_ATTR_NORETURN - -/* Whether the C compiler accepts the "unused" attribute */ -#undef HAVE_ATTR_UNUSED - -/* Whether the C compiler accepts the "weak" attribute */ -#undef HAVE_ATTR_WEAK - -/* If we have be64toh */ -#undef HAVE_BE64TOH - -/* Define to 1 if you have the `BIO_set_callback_ex' function. */ -#undef HAVE_BIO_SET_CALLBACK_EX - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STRING_H - -/* Define to 1 if you have the `chown' function. */ -#undef HAVE_CHOWN - -/* Define to 1 if you have the `chroot' function. */ -#undef HAVE_CHROOT - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA - -/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ -#undef HAVE_CRYPTO_THREADID_SET_CALLBACK - -/* Define to 1 if you have the `ctime_r' function. */ -#undef HAVE_CTIME_R - -/* Define to 1 if you have the `daemon' function. */ -#undef HAVE_DAEMON - -/* Define to 1 if you have the declaration of `arc4random', and to 0 if you - don't. */ -#undef HAVE_DECL_ARC4RANDOM - -/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 - if you don't. */ -#undef HAVE_DECL_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if - you don't. */ -#undef HAVE_DECL_EVSIGNAL_ASSIGN - -/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_NTOP - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_PTON - -/* Define to 1 if you have the declaration of `nghttp2_session_server_new', - and to 0 if you don't. */ -#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW - -/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED25519 - -/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED448 - -/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_SECP384R1 - -/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 - if you don't. */ -#undef HAVE_DECL_NID_X9_62_PRIME256V1 - -/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you - don't. */ -#undef HAVE_DECL_REALLOCARRAY - -/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you - don't. */ -#undef HAVE_DECL_REDISCONNECT - -/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 - if you don't. */ -#undef HAVE_DECL_SK_SSL_COMP_POP_FREE - -/* Define to 1 if you have the declaration of - `SSL_COMP_get_compression_methods', and to 0 if you don't. */ -#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS - -/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to - 0 if you don't. */ -#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO - -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCAT - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCPY - -/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if - you don't. */ -#undef HAVE_DECL_XML_STOPPARSER - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `DSA_SIG_set0' function. */ -#undef HAVE_DSA_SIG_SET0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_ENDIAN_H - -/* Define to 1 if you have the `endprotoent' function. */ -#undef HAVE_ENDPROTOENT - -/* Define to 1 if you have the `endpwent' function. */ -#undef HAVE_ENDPWENT - -/* Define to 1 if you have the `endservent' function. */ -#undef HAVE_ENDSERVENT - -/* Define to 1 if you have the `ENGINE_cleanup' function. */ -#undef HAVE_ENGINE_CLEANUP - -/* Define to 1 if you have the `ERR_free_strings' function. */ -#undef HAVE_ERR_FREE_STRINGS - -/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ -#undef HAVE_ERR_LOAD_CRYPTO_STRINGS - -/* Define to 1 if you have the `event_assign' function. */ -#undef HAVE_EVENT_ASSIGN - -/* Define to 1 if you have the `event_base_free' function. */ -#undef HAVE_EVENT_BASE_FREE - -/* Define to 1 if you have the `event_base_get_method' function. */ -#undef HAVE_EVENT_BASE_GET_METHOD - -/* Define to 1 if you have the `event_base_new' function. */ -#undef HAVE_EVENT_BASE_NEW - -/* Define to 1 if you have the `event_base_once' function. */ -#undef HAVE_EVENT_BASE_ONCE - -/* Define to 1 if you have the header file. */ -#undef HAVE_EVENT_H - -/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ -#undef HAVE_EVP_AES_256_CBC - -/* Define to 1 if you have the `EVP_cleanup' function. */ -#undef HAVE_EVP_CLEANUP - -/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled' - function. */ -#undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED - -/* Define to 1 if you have the `EVP_DigestVerify' function. */ -#undef HAVE_EVP_DIGESTVERIFY - -/* Define to 1 if you have the `EVP_dss1' function. */ -#undef HAVE_EVP_DSS1 - -/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ -#undef HAVE_EVP_ENCRYPTINIT_EX - -/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ -#undef HAVE_EVP_MAC_CTX_SET_PARAMS - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#undef HAVE_EVP_MD_CTX_NEW - -/* Define to 1 if you have the `EVP_sha1' function. */ -#undef HAVE_EVP_SHA1 - -/* Define to 1 if you have the `EVP_sha256' function. */ -#undef HAVE_EVP_SHA256 - -/* Define to 1 if you have the `EVP_sha512' function. */ -#undef HAVE_EVP_SHA512 - -/* Define to 1 if you have the `ev_default_loop' function. */ -#undef HAVE_EV_DEFAULT_LOOP - -/* Define to 1 if you have the `ev_loop' function. */ -#undef HAVE_EV_LOOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXPAT_H - -/* Define to 1 if you have the `explicit_bzero' function. */ -#undef HAVE_EXPLICIT_BZERO - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the `FIPS_mode' function. */ -#undef HAVE_FIPS_MODE - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Whether getaddrinfo is available */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getauxval' function. */ -#undef HAVE_GETAUXVAL - -/* Define to 1 if you have the `getentropy' function. */ -#undef HAVE_GETENTROPY - -/* Define to 1 if you have the `getifaddrs' function. */ -#undef HAVE_GETIFADDRS - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getpwnam' function. */ -#undef HAVE_GETPWNAM - -/* Define to 1 if you have the `getrlimit' function. */ -#undef HAVE_GETRLIMIT - -/* Define to 1 if you have the `gettid' function. */ -#undef HAVE_GETTID - -/* Define to 1 if you have the `glob' function. */ -#undef HAVE_GLOB - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the `gmtime_r' function. */ -#undef HAVE_GMTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_GRP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_HIREDIS_HIREDIS_H - -/* Define to 1 if you have the `HMAC_Init_ex' function. */ -#undef HAVE_HMAC_INIT_EX - -/* If we have htobe64 */ -#undef HAVE_HTOBE64 - -/* Define to 1 if you have the header file. */ -#undef HAVE_IFADDRS_H - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the `inet_aton' function. */ -#undef HAVE_INET_ATON - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the `inet_pton' function. */ -#undef HAVE_INET_PTON - -/* Define to 1 if you have the `initgroups' function. */ -#undef HAVE_INITGROUPS - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* if the function 'ioctlsocket' is available */ -#undef HAVE_IOCTLSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_IPHLPAPI_H - -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the `kill' function. */ -#undef HAVE_KILL - -/* Use portable libbsd functions */ -#undef HAVE_LIBBSD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBKERN_OSBYTEORDER_H - -/* Define if we have LibreSSL */ -#undef HAVE_LIBRESSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NET_TSTAMP_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOGIN_CAP_H - -/* If have GNU libc compatible malloc */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETIOAPI_H - -/* Use libnettle for crypto */ -#undef HAVE_NETTLE - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_DSA_COMPAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_EDDSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define this to use nghttp2 client. */ -#undef HAVE_NGHTTP2 - -/* Define to 1 if you have the header file. */ -#undef HAVE_NGHTTP2_NGHTTP2_H - -/* Use libnss for crypto */ -#undef HAVE_NSS - -/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ -#undef HAVE_OPENSSL_ADD_ALL_DIGESTS - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_BN_H - -/* Define to 1 if you have the `OPENSSL_config' function. */ -#undef HAVE_OPENSSL_CONFIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CONF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CORE_NAMES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ENGINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ -#undef HAVE_OPENSSL_INIT_CRYPTO - -/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ -#undef HAVE_OPENSSL_INIT_SSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PARAM_BUILD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RAND_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */ -#undef HAVE_OSSL_PARAM_BLD_NEW - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if the system has the type `pthread_rwlock_t'. */ -#undef HAVE_PTHREAD_RWLOCK_T - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -#undef HAVE_PTHREAD_SPINLOCK_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define if you have Python libraries and header files. */ -#undef HAVE_PYTHON - -/* Define to 1 if you have the `random' function. */ -#undef HAVE_RANDOM - -/* Define to 1 if you have the `RAND_cleanup' function. */ -#undef HAVE_RAND_CLEANUP - -/* If we have reallocarray(3) */ -#undef HAVE_REALLOCARRAY - -/* Define to 1 if you have the `recvmsg' function. */ -#undef HAVE_RECVMSG - -/* Define to 1 if you have the `sendmsg' function. */ -#undef HAVE_SENDMSG - -/* Define to 1 if you have the `setregid' function. */ -#undef HAVE_SETREGID - -/* Define to 1 if you have the `setresgid' function. */ -#undef HAVE_SETRESGID - -/* Define to 1 if you have the `setresuid' function. */ -#undef HAVE_SETRESUID - -/* Define to 1 if you have the `setreuid' function. */ -#undef HAVE_SETREUID - -/* Define to 1 if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - -/* Define to 1 if you have the `setusercontext' function. */ -#undef HAVE_SETUSERCONTEXT - -/* Define to 1 if you have the `SHA512_Update' function. */ -#undef HAVE_SHA512_UPDATE - -/* Define to 1 if you have the `shmget' function. */ -#undef HAVE_SHMGET - -/* Define to 1 if you have the `sigprocmask' function. */ -#undef HAVE_SIGPROCMASK - -/* Define to 1 if you have the `sleep' function. */ -#undef HAVE_SLEEP - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the `socketpair' function. */ -#undef HAVE_SOCKETPAIR - -/* Using Solaris threads */ -#undef HAVE_SOLARIS_THREADS - -/* Define to 1 if you have the `srandom' function. */ -#undef HAVE_SRANDOM - -/* Define if you have the SSL libraries installed. */ -#undef HAVE_SSL - -/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_PROTOS - -/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB - -/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ -#undef HAVE_SSL_CTX_SET_CIPHERSUITES - -/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ -#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL - -/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb' - function. */ -#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB - -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ -#undef HAVE_SSL_GET0_ALPN_SELECTED - -/* Define to 1 if you have the `SSL_get0_peername' function. */ -#undef HAVE_SSL_GET0_PEERNAME - -/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ -#undef HAVE_SSL_GET1_PEER_CERTIFICATE - -/* Define to 1 if you have the `SSL_set1_host' function. */ -#undef HAVE_SSL_SET1_HOST - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strptime' function. */ -#undef HAVE_STRPTIME - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ -#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST - -/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ -#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN - -/* Define if you have Swig libraries and header files. */ -#undef HAVE_SWIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if systemd should be used */ -#undef HAVE_SYSTEMD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_ENDIAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IPC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHA2_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TARGETCONDITIONALS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Using Windows threads */ -#undef HAVE_WINDOWS_THREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if you have the `writev' function. */ -#undef HAVE_WRITEV - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ -#undef HAVE_X509_VERIFY_PARAM_SET1_HOST - -/* Define to 1 if you have the `_beginthreadex' function. */ -#undef HAVE__BEGINTHREADEX - -/* If HMAC_Init_ex() returns void */ -#undef HMAC_INIT_EX_RETURNS_VOID - -/* if lex has yylex_destroy */ -#undef LEX_HAS_YYLEX_DESTROY - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Define to the maximum message length to pass to syslog. */ -#undef MAXSYSLOGMSGLEN - -/* Define if memcmp() does not compare unsigned bytes */ -#undef MEMCMP_IS_BROKEN - -/* Define if mkdir has one argument. */ -#undef MKDIR_HAS_ONE_ARG - -/* Define if the network stack does not fully support nonblocking io (causes - lower performance). */ -#undef NONBLOCKING_IS_BROKEN - -/* Put -D_ALL_SOURCE define in config.h */ -#undef OMITTED__D_ALL_SOURCE - -/* Put -D_BSD_SOURCE define in config.h */ -#undef OMITTED__D_BSD_SOURCE - -/* Put -D_DEFAULT_SOURCE define in config.h */ -#undef OMITTED__D_DEFAULT_SOURCE - -/* Put -D_GNU_SOURCE define in config.h */ -#undef OMITTED__D_GNU_SOURCE - -/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ -#undef OMITTED__D_LARGEFILE_SOURCE_1 - -/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ -#undef OMITTED__D_POSIX_C_SOURCE_200112 - -/* Put -D_XOPEN_SOURCE=600 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_600 - -/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 - -/* Put -D__EXTENSIONS__ define in config.h */ -#undef OMITTED__D__EXTENSIONS__ - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* default pidfile location */ -#undef PIDFILE - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Return type of signal handlers, but autoconf 2.70 says 'your code may - safely assume C89 semantics that RETSIGTYPE is void.' */ -#undef RETSIGTYPE - -/* if REUSEPORT is enabled by default */ -#undef REUSEPORT_DEFAULT - -/* default rootkey location */ -#undef ROOT_ANCHOR_FILE - -/* default rootcert location */ -#undef ROOT_CERT_FILE - -/* version number for resource files */ -#undef RSRC_PACKAGE_VERSION - -/* Directory to chdir to */ -#undef RUN_DIR - -/* Shared data */ -#undef SHARE_DIR - -/* The size of `pthread_t', as computed by sizeof. */ -#undef SIZEOF_PTHREAD_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `time_t', as computed by sizeof. */ -#undef SIZEOF_TIME_T - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* define if (v)snprintf does not return length needed, (but length used) */ -#undef SNPRINTF_RET_BROKEN - -/* Define to 1 if libsodium supports sodium_set_misuse_handler */ -#undef SODIUM_MISUSE_HANDLER - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* use default strptime. */ -#undef STRPTIME_WORKS - -/* Use win32 resources and API */ -#undef UB_ON_WINDOWS - -/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ -#undef UB_SYSLOG_FACILITY - -/* default username */ -#undef UB_USERNAME - -/* use to enable lightweight alloc assertions, for debug use */ -#undef UNBOUND_ALLOC_LITE - -/* use malloc not regions, for debug use */ -#undef UNBOUND_ALLOC_NONREGIONAL - -/* use statistics for allocs and frees, for debug use */ -#undef UNBOUND_ALLOC_STATS - -/* define this to enable debug checks. */ -#undef UNBOUND_DEBUG - -/* Define to 1 to use cachedb support */ -#undef USE_CACHEDB - -/* Define to 1 to enable dnscrypt support */ -#undef USE_DNSCRYPT - -/* Define to 1 to enable dnscrypt with xchacha20 support */ -#undef USE_DNSCRYPT_XCHACHA20 - -/* Define to 1 to enable dnstap support */ -#undef USE_DNSTAP - -/* Define this to enable DSA support. */ -#undef USE_DSA - -/* Define this to enable ECDSA support. */ -#undef USE_ECDSA - -/* Define this to enable an EVP workaround for older openssl */ -#undef USE_ECDSA_EVP_WORKAROUND - -/* Define this to enable ED25519 support. */ -#undef USE_ED25519 - -/* Define this to enable ED448 support. */ -#undef USE_ED448 - -/* Define this to enable GOST support. */ -#undef USE_GOST - -/* Define to 1 to use ipsecmod support. */ -#undef USE_IPSECMOD - -/* Define to 1 to use ipset support */ -#undef USE_IPSET - -/* Define if you enable libevent */ -#undef USE_LIBEVENT - -/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a - default outgoing port range. This is only for the libunbound on Linux and - does not affect unbound resolving daemon itself. This may severely limit - the number of available outgoing ports and thus decrease randomness. Define - this only when the target system restricts (e.g. some of SELinux enabled - distributions) the use of non-ephemeral ports. */ -#undef USE_LINUX_IP_LOCAL_PORT_RANGE - -/* Define if you want to use internal select based events */ -#undef USE_MINI_EVENT - -/* Define this to enable client TCP Fast Open. */ -#undef USE_MSG_FASTOPEN - -/* Define this to enable client TCP Fast Open. */ -#undef USE_OSX_MSG_FASTOPEN - -/* Define this to use hiredis client. */ -#undef USE_REDIS - -/* Define this to enable SHA1 support. */ -#undef USE_SHA1 - -/* Define this to enable SHA256 and SHA512 support. */ -#undef USE_SHA2 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define this to enable server TCP Fast Open. */ -#undef USE_TCP_FASTOPEN - -/* Whether the windows socket API is used */ -#undef USE_WINSOCK - -/* the version of the windows API enabled */ -#undef WINVER *** 502 LINES SKIPPED *** From nobody Wed Oct 4 01:02:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0byP61rPz4wJxy; Wed, 4 Oct 2023 01:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0byP5dgFz4YmC; Wed, 4 Oct 2023 01:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ouKCfhbLiC41UUXb/nYznGBn1fMXO7f/d1hOTLDRyKs=; b=Yjq1EJgCfqGzR/xwT8AbLCanB+t73QThpwrLSMP1YV/tbtzuzGw4EIt3VgabFYAFOL90QU 0vKpxWjT1FnKGZaX9MjHlTloxrCViwI4iukU3UuS15IaBdiPoOD+RcEkQk3SPRUqD7JzPH cMfJLwfn5YthHeBbcm8HnPC6wKi2M6EUzXXWQAXKkk1FmoYUBuRGROX6OXKSIhXEtOhVwN HXfSnTbN35dF8lSS/Z8Wl6/JoVGwUIHXYbuX8VyPtCGfsvvAFcOtDBIzwkpur/f0iuf+th JDOBo82RVfzq7jFPMKTsgYWborW6lEjjclehogg1KvdnrcCGLdEY7iK9fQT5wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381357; a=rsa-sha256; cv=none; b=JmYzKgzNmp1S0tTBCqH8a9UyGCbyN/6/wdP4maxHWes2TPs2OzxE1yTvEFPHyur86ea5J5 yDQABrlCN4brqcpEaRdr0/m+wXQ2DTyilnWsTyHwbQ7BN2n84R8FaZNjclDPGUFCXFLJ30 8dggaR/vylMPfht/ScVZeeU2S+HskkoiWtuO6Hd+LCNyKhkExEk7ND8BznVN7H8bNEue+2 ESlJoS0jltl3IFp4dq34Ee8TFIqnogV5rVmRFzWGGqMIXS4wheG3qWALvwQ8kVyrBEjGOB Xop3Qwny2BGBNB3xqIA3nTG/u0i7HcX198vq8YTfOD176yoIjlXcVMTruAyvwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ouKCfhbLiC41UUXb/nYznGBn1fMXO7f/d1hOTLDRyKs=; b=B+Q13x5sgScE5cYBzLlOVX1xiVOLsH0I6D92TPEW+EyvHIbDwKd9q7SN1Ai5YrwRUtdOGC DoY8LYRhhSrptbn9QdoYts1o2PPfnxnd1n5qXBcsQhltT8MyxiQqHSLKbooHOOU+XIUP7Y MXCQljU15oVwqGzcyH9YUX6IH4HGuV19zPGHVu3zdKmhH3JsAZFS89PyBwMqIauHug2Zah XUxn2SCN6xLpzP8+QerdP+MmexHSQCApgLLSCjOWl6lTu3BHXR3I5X3wIzO6VdAnEXzo6q yFzs9BaH28A5uP2974RdzOGuCeAZCAsqZAE4PXbnqIBnztVsXeKXJPmoltdXJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0byP4PgMz2Td; Wed, 4 Oct 2023 01:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39412blK054039; Wed, 4 Oct 2023 01:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39412bYe054036; Wed, 4 Oct 2023 01:02:37 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:37 GMT Message-Id: <202310040102.39412bYe054036@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: b607e17bca24 - stable/12 - sqlite3: Vendor import of sqlite3 3.43.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b607e17bca2490bd6ab14ee3ee23e95032c21e24 Auto-Submitted: auto-generated The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b607e17bca2490bd6ab14ee3ee23e95032c21e24 commit b607e17bca2490bd6ab14ee3ee23e95032c21e24 Author: Cy Schubert AuthorDate: 2023-09-19 15:06:50 +0000 Commit: Cy Schubert CommitDate: 2023-10-03 02:01:06 +0000 sqlite3: Vendor import of sqlite3 3.43.1 Release notes at https://www.sqlite.org/releaselog/3_43_1.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main (cherry picked from commit ec994981447e8a974426660b5071bc405280af73) --- contrib/sqlite3/Makefile.am | 2 +- contrib/sqlite3/Makefile.in | 2 +- contrib/sqlite3/Makefile.msc | 27 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1019 +++- contrib/sqlite3/sqlite3.1 | 161 +- contrib/sqlite3/sqlite3.c | 7881 +++++++++++++++++++++--------- contrib/sqlite3/sqlite3.h | 106 +- contrib/sqlite3/sqlite3ext.h | 4 + contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 20 +- contrib/sqlite3/tea/configure.ac | 2 +- contrib/sqlite3/tea/generic/tclsqlite3.c | 33 +- 14 files changed, 6509 insertions(+), 2772 deletions(-) diff --git a/contrib/sqlite3/Makefile.am b/contrib/sqlite3/Makefile.am index 694419b27dfd..1eaa560ff884 100644 --- a/contrib/sqlite3/Makefile.am +++ b/contrib/sqlite3/Makefile.am @@ -9,7 +9,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h diff --git a/contrib/sqlite3/Makefile.in b/contrib/sqlite3/Makefile.in index d45c6b8f4cde..fe708a0a9d84 100644 --- a/contrib/sqlite3/Makefile.in +++ b/contrib/sqlite3/Makefile.in @@ -371,7 +371,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 09daa867eced..13663d877757 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -52,6 +52,13 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF +# Set this non-0 to use structured exception handling (SEH) for WAL mode +# in the core library. +# +!IFNDEF USE_SEH +USE_SEH = 1 +!ENDIF + # Set this non-0 to have the shell executable link against the core dynamic # link library. # @@ -180,6 +187,12 @@ WIN32HEAP = 0 OSTRACE = 0 !ENDIF +# enable address sanitizer using ASAN=1 on the command-line. +# +!IFNDEF ASAN +ASAN = 0 +!ENDIF + # Set this to one of the following values to enable various debugging # features. Each level includes the debugging options from the previous # levels. Currently, the recognized values for DEBUG are: @@ -311,6 +324,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF +# Should structured exception handling (SEH) be enabled for WAL mode in +# the core library? +# +!IF $(USE_SEH)!=0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!ENDIF + # These are the "extended" SQLite compilation options used when compiling for # the Windows 10 platform. # @@ -718,6 +738,13 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 !ENDIF +# Address sanitizer if ASAN=1 +# +!IF $(ASAN)>0 +TCC = $(TCC) /fsanitize=address +!ENDIF + + # Compiler options needed for programs that use the readline() library. # !IFNDEF READLINE_FLAGS diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 1016e350c37f..39694c06793b 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.42.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.43.1. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.42.0' -PACKAGE_STRING='sqlite 3.42.0' +PACKAGE_VERSION='3.43.1' +PACKAGE_STRING='sqlite 3.43.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.42.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.43.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.42.0:";; + short | recursive ) echo "Configuration of sqlite 3.43.1:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.42.0 +sqlite configure 3.43.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.42.0, which was +It was created by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.42.0' + VERSION='3.43.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.42.0, which was +This file was extended by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.42.0 +sqlite config.status 3.43.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index a706a4753049..3d7da8b984c3 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.42.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.43.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 647a214226cc..6b2cdca83d6b 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -246,6 +246,7 @@ typedef unsigned char u8; #if SQLITE_OS_WINRT #include #endif +#undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #include @@ -1224,6 +1225,46 @@ static char *shellFakeSchema( return s.z; } +/* +** SQL function: strtod(X) +** +** Use the C-library strtod() function to convert string X into a double. +** Used for comparing the accuracy of SQLite's internal text-to-float conversion +** routines against the C-library. +*/ +static void shellStrtod( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + char *z = (char*)sqlite3_value_text(apVal[0]); + UNUSED_PARAMETER(nVal); + if( z==0 ) return; + sqlite3_result_double(pCtx, strtod(z,0)); +} + +/* +** SQL function: dtostr(X) +** +** Use the C-library printf() function to convert real value X into a string. +** Used for comparing the accuracy of SQLite's internal float-to-text conversion +** routines against the C-library. +*/ +static void shellDtostr( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + double r = sqlite3_value_double(apVal[0]); + int n = nVal>=2 ? sqlite3_value_int(apVal[1]) : 26; + char z[400]; + if( n<1 ) n = 1; + if( n>350 ) n = 350; + sprintf(z, "%#+.*e", n, r); + sqlite3_result_text(pCtx, z, -1, SQLITE_TRANSIENT); +} + + /* ** SQL function: shell_module_schema(X) ** @@ -1473,7 +1514,7 @@ struct DIR { #endif /* -** Provide the function prototype for the POSIX compatiable getenv() +** Provide the function prototype for the POSIX compatible getenv() ** function. This function is not thread-safe. */ @@ -1799,6 +1840,188 @@ int sqlite3MemTraceDeactivate(void){ } /************************* End ../ext/misc/memtrace.c ********************/ +/************************* Begin ../ext/misc/pcachetrace.c ******************/ +/* +** 2023-06-21 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This file implements an extension that uses the SQLITE_CONFIG_PCACHE2 +** mechanism to add a tracing layer on top of pluggable page cache of +** SQLite. If this extension is registered prior to sqlite3_initialize(), +** it will cause all page cache activities to be logged on standard output, +** or to some other FILE specified by the initializer. +** +** This file needs to be compiled into the application that uses it. +** +** This extension is used to implement the --pcachetrace option of the +** command-line shell. +*/ +#include +#include +#include + +/* The original page cache routines */ +static sqlite3_pcache_methods2 pcacheBase; +static FILE *pcachetraceOut; + +/* Methods that trace pcache activity */ +static int pcachetraceInit(void *pArg){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p)\n", pArg); + } + nRes = pcacheBase.xInit(pArg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p) -> %d\n", pArg, nRes); + } + return nRes; +} +static void pcachetraceShutdown(void *pArg){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShutdown(%p)\n", pArg); + } + pcacheBase.xShutdown(pArg); +} +static sqlite3_pcache *pcachetraceCreate(int szPage, int szExtra, int bPurge){ + sqlite3_pcache *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d)\n", + szPage, szExtra, bPurge); + } + pRes = pcacheBase.xCreate(szPage, szExtra, bPurge); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d) -> %p\n", + szPage, szExtra, bPurge, pRes); + } + return pRes; +} +static void pcachetraceCachesize(sqlite3_pcache *p, int nCachesize){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCachesize(%p, %d)\n", p, nCachesize); + } + pcacheBase.xCachesize(p, nCachesize); +} +static int pcachetracePagecount(sqlite3_pcache *p){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p)\n", p); + } + nRes = pcacheBase.xPagecount(p); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p) -> %d\n", p, nRes); + } + return nRes; +} +static sqlite3_pcache_page *pcachetraceFetch( + sqlite3_pcache *p, + unsigned key, + int crFg +){ + sqlite3_pcache_page *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d)\n", p, key, crFg); + } + pRes = pcacheBase.xFetch(p, key, crFg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d) -> %p\n", + p, key, crFg, pRes); + } + return pRes; +} +static void pcachetraceUnpin( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + int bDiscard +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xUnpin(%p, %p, %d)\n", + p, pPg, bDiscard); + } + pcacheBase.xUnpin(p, pPg, bDiscard); +} +static void pcachetraceRekey( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + unsigned oldKey, + unsigned newKey +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xRekey(%p, %p, %u, %u)\n", + p, pPg, oldKey, newKey); + } + pcacheBase.xRekey(p, pPg, oldKey, newKey); +} +static void pcachetraceTruncate(sqlite3_pcache *p, unsigned n){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xTruncate(%p, %u)\n", p, n); + } + pcacheBase.xTruncate(p, n); +} +static void pcachetraceDestroy(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xDestroy(%p)\n", p); + } + pcacheBase.xDestroy(p); +} +static void pcachetraceShrink(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShrink(%p)\n", p); + } + pcacheBase.xShrink(p); +} + +/* The substitute pcache methods */ +static sqlite3_pcache_methods2 ersaztPcacheMethods = { + 0, + 0, + pcachetraceInit, + pcachetraceShutdown, + pcachetraceCreate, + pcachetraceCachesize, + pcachetracePagecount, + pcachetraceFetch, + pcachetraceUnpin, + pcachetraceRekey, + pcachetraceTruncate, + pcachetraceDestroy, + pcachetraceShrink +}; + +/* Begin tracing memory allocations to out. */ +int sqlite3PcacheTraceActivate(FILE *out){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch==0 ){ + rc = sqlite3_config(SQLITE_CONFIG_GETPCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &ersaztPcacheMethods); + } + } + pcachetraceOut = out; + return rc; +} + +/* Deactivate memory tracing */ +int sqlite3PcacheTraceDeactivate(void){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch!=0 ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + memset(&pcacheBase, 0, sizeof(pcacheBase)); + } + } + pcachetraceOut = 0; + return rc; +} + +/************************* End ../ext/misc/pcachetrace.c ********************/ /************************* Begin ../ext/misc/shathree.c ******************/ /* ** 2017-03-08 @@ -2683,41 +2906,24 @@ static void decimal_free(Decimal *p){ } /* -** Allocate a new Decimal object. Initialize it to the number given -** by the input string. +** Allocate a new Decimal object initialized to the text in zIn[]. +** Return NULL if any kind of error occurs. */ -static Decimal *decimal_new( - sqlite3_context *pCtx, - sqlite3_value *pIn, - int nAlt, - const unsigned char *zAlt -){ - Decimal *p; - int n, i; - const unsigned char *zIn; +static Decimal *decimalNewFromText(const char *zIn, int n){ + Decimal *p = 0; + int i; int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); - if( p==0 ) goto new_no_mem; + if( p==0 ) goto new_from_text_failed; p->sign = 0; p->oom = 0; p->isInit = 1; p->isNull = 0; p->nDigit = 0; p->nFrac = 0; - if( zAlt ){ - n = nAlt, - zIn = zAlt; - }else{ - if( sqlite3_value_type(pIn)==SQLITE_NULL ){ - p->a = 0; - p->isNull = 1; - return p; - } - n = sqlite3_value_bytes(pIn); - zIn = sqlite3_value_text(pIn); - } p->a = sqlite3_malloc64( n+1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; for(i=0; isspace(zIn[i]); i++){} if( zIn[i]=='-' ){ p->sign = 1; @@ -2768,7 +2974,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memset(p->a+p->nDigit, 0, iExp); p->nDigit += iExp; } @@ -2787,7 +2993,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memmove(p->a+iExp, p->a, p->nDigit); memset(p->a, 0, iExp); p->nDigit += iExp; @@ -2796,7 +3002,76 @@ static Decimal *decimal_new( } return p; -new_no_mem: +new_from_text_failed: + if( p ){ + if( p->a ) sqlite3_free(p->a); + sqlite3_free(p); + } + return 0; +} + +/* Forward reference */ +static Decimal *decimalFromDouble(double); + +/* +** Allocate a new Decimal object from an sqlite3_value. Return a pointer +** to the new object, or NULL if there is an error. If the pCtx argument +** is not NULL, then errors are reported on it as well. +** +** If the pIn argument is SQLITE_TEXT or SQLITE_INTEGER, it is converted +** directly into a Decimal. For SQLITE_FLOAT or for SQLITE_BLOB of length +** 8 bytes, the resulting double value is expanded into its decimal equivalent. +** If pIn is NULL or if it is a BLOB that is not exactly 8 bytes in length, +** then NULL is returned. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, /* Report error here, if not null */ + sqlite3_value *pIn, /* Construct the decimal object from this */ + int bTextOnly /* Always interpret pIn as text if true */ +){ + Decimal *p = 0; + int eType = sqlite3_value_type(pIn); + if( bTextOnly && (eType==SQLITE_FLOAT || eType==SQLITE_BLOB) ){ + eType = SQLITE_TEXT; + } + switch( eType ){ + case SQLITE_TEXT: + case SQLITE_INTEGER: { + const char *zIn = (const char*)sqlite3_value_text(pIn); + int n = sqlite3_value_bytes(pIn); + p = decimalNewFromText(zIn, n); + if( p==0 ) goto new_failed; + break; + } + + case SQLITE_FLOAT: { + p = decimalFromDouble(sqlite3_value_double(pIn)); + break; + } + + case SQLITE_BLOB: { + const unsigned char *x; + unsigned int i; + sqlite3_uint64 v = 0; + double r; + + if( sqlite3_value_bytes(pIn)!=sizeof(r) ) break; + x = sqlite3_value_blob(pIn); + for(i=0; ioom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + for(nDigit=p->nDigit; nDigit>0 && p->a[nDigit-1]==0; nDigit--){} + for(nZero=0; nZeroa[nZero]==0; nZero++){} + nFrac = p->nFrac + (nDigit - p->nDigit); + nDigit -= nZero; + z = sqlite3_malloc( nDigit+20 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( nDigit==0 ){ + zero = 0; + a = &zero; + nDigit = 1; + nFrac = 0; + }else{ + a = &p->a[nZero]; + } + if( p->sign && nDigit>0 ){ + z[0] = '-'; + }else{ + z[0] = '+'; + } + z[1] = a[0]+'0'; + z[2] = '.'; + if( nDigit==1 ){ + z[3] = '0'; + i = 4; + }else{ + for(i=1; iisNull ) goto cmp_done; - pB = decimal_new(context, argv[1], 0, 0); + pB = decimal_new(context, argv[1], 1); if( pB==0 || pB->isNull ) goto cmp_done; rc = decimal_cmp(pA, pB); if( rc<0 ) rc = -1; @@ -2963,7 +3283,7 @@ static void decimal_expand(Decimal *p, int nDigit, int nFrac){ } /* -** Add the value pB into pA. +** Add the value pB into pA. A := A + B. ** ** Both pA and pB might become denormalized by this routine. */ @@ -3032,6 +3352,172 @@ static void decimal_add(Decimal *pA, Decimal *pB){ } } +/* +** Multiply A by B. A := A * B +** +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. +*/ +static void decimalMul(Decimal *pA, Decimal *pB){ + signed char *acc = 0; + int i, j, k; + int minFrac; + + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + pA->oom = 1; + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + +mul_end: + sqlite3_free(acc); +} + +/* +** Create a new Decimal object that contains an integer power of 2. +*/ +static Decimal *decimalPow2(int N){ + Decimal *pA = 0; /* The result to be returned */ + Decimal *pX = 0; /* Multiplier */ + if( N<-20000 || N>20000 ) goto pow2_fault; + pA = decimalNewFromText("1.0", 3); + if( pA==0 || pA->oom ) goto pow2_fault; + if( N==0 ) return pA; + if( N>0 ){ + pX = decimalNewFromText("2.0", 3); + }else{ + N = -N; + pX = decimalNewFromText("0.5", 3); + } + if( pX==0 || pX->oom ) goto pow2_fault; + while( 1 /* Exit by break */ ){ + if( N & 1 ){ + decimalMul(pA, pX); + if( pA->oom ) goto pow2_fault; + } + N >>= 1; + if( N==0 ) break; + decimalMul(pX, pX); + } + decimal_free(pX); + return pA; + +pow2_fault: + decimal_free(pA); + decimal_free(pX); + return 0; +} + +/* +** Use an IEEE754 binary64 ("double") to generate a new Decimal object. +*/ +static Decimal *decimalFromDouble(double r){ + sqlite3_int64 m, a; + int e; + int isNeg; + Decimal *pA; + Decimal *pX; + char zNum[100]; + if( r<0.0 ){ + isNeg = 1; + r = -r; + }else{ + isNeg = 0; + } + memcpy(&a,&r,sizeof(a)); + if( a==0 ){ + e = 0; + m = 0; + }else{ + e = a>>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + e = e - 1075; + if( e>971 ){ + return 0; /* A NaN or an Infinity */ + } + } + + /* At this point m is the integer significand and e is the exponent */ + sqlite3_snprintf(sizeof(zNum), zNum, "%lld", m); + pA = decimalNewFromText(zNum, (int)strlen(zNum)); + pX = decimalPow2(e); + decimalMul(pA, pX); + decimal_free(pX); + return pA; +} + +/* +** SQL Function: decimal(X) +** OR: decimal_exp(X) +** +** Convert input X into decimal and then back into text. +** +** If X is originally a float, then a full decimal expansion of that floating +** point value is done. Or if X is an 8-byte blob, it is interpreted +** as a float and similarly expanded. +** +** The decimal_exp(X) function returns the result in exponential notation. +** decimal(X) returns a complete decimal, without the e+NNN at the end. +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0); + UNUSED_PARAMETER(argc); + if( p ){ + if( sqlite3_user_data(context)!=0 ){ + decimal_result_sci(context, p); + }else{ + decimal_result(context, p); + } + decimal_free(p); + } +} + /* ** Compare text in decimal order. */ @@ -3042,8 +3528,8 @@ static int decimalCollFunc( ){ const unsigned char *zA = (const unsigned char*)pKey1; const unsigned char *zB = (const unsigned char*)pKey2; - Decimal *pA = decimal_new(0, 0, nKey1, zA); - Decimal *pB = decimal_new(0, 0, nKey2, zB); + Decimal *pA = decimalNewFromText((const char*)zA, nKey1); + Decimal *pB = decimalNewFromText((const char*)zB, nKey2); int rc; UNUSED_PARAMETER(notUsed); if( pA==0 || pB==0 ){ @@ -3068,8 +3554,8 @@ static void decimalAddFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); decimal_add(pA, pB); decimal_result(context, pA); @@ -3081,8 +3567,8 @@ static void decimalSubFunc( int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pB ){ pB->sign = !pB->sign; @@ -3120,7 +3606,7 @@ static void decimalSumStep( p->nFrac = 0; } if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); decimal_add(p, pArg); decimal_free(pArg); } @@ -3135,7 +3621,7 @@ static void decimalSumInverse( p = sqlite3_aggregate_context(context, sizeof(*p)); if( p==0 ) return; if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); if( pArg ) pArg->sign = !pArg->sign; decimal_add(p, pArg); decimal_free(pArg); @@ -3156,66 +3642,49 @@ static void decimalSumFinalize(sqlite3_context *context){ ** SQL Function: decimal_mul(X, Y) ** ** Return the product of X and Y. -** -** All significant digits after the decimal point are retained. -** Trailing zeros after the decimal point are omitted as long as -** the number of digits after the decimal point is no less than -** either the number of digits in either input. */ static void decimalMulFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - signed char *acc = 0; - int i, j, k; - int minFrac; + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pA==0 || pA->oom || pA->isNull || pB==0 || pB->oom || pB->isNull ){ goto mul_end; } - acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); - if( acc==0 ){ - sqlite3_result_error_nomem(context); + decimalMul(pA, pB); + if( pA->oom ){ goto mul_end; } - memset(acc, 0, pA->nDigit + pB->nDigit + 2); - minFrac = pA->nFrac; - if( pB->nFracnFrac; - for(i=pA->nDigit-1; i>=0; i--){ - signed char f = pA->a[i]; - int carry = 0, x; *** 15446 LINES SKIPPED *** From nobody Wed Oct 4 01:02:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0byR1jxvz4wK3h; Wed, 4 Oct 2023 01:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0byR0ldDz4YmX; Wed, 4 Oct 2023 01:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N97iUOcZ//5VQDAOHBPRcSqaW7qdmiTjhUzFaB8/f0o=; b=QqDrr1k/VEDuE1KVwmAB8u57gmFXBzp3XZDdhYojY10ztPNcSbJ3ZYpMiUdo5E17n3saWV Zw5wDECxUNtQL+r3l1WoKw+ZftFTuBqNgmzA3w1IOMUTRgw2+RaXFBhOh1g1wjV5rj+Vlh ihphztkrgTMZn5mnEw4bnFj+JsesRvsBs0AsO9lPtCXfXTFll98C7Go3rNO4NWGRske5KW y4A4bwZs1BdPc31PSn8QM6CIUIDxhRjqjqdkPGvY4p+8Ybv1rRUbSKPGPt6DoCVK+GlkZ6 6jDRUziXTKpiAuDpYlY0DNPqaI7PLoXSjJKYaPr+kL1AfD/5asmNzxyRsnixLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381359; a=rsa-sha256; cv=none; b=q83meDIHmrhd7RllfpK0ijdeNQtlhsHl1c5gcx38cjtzTZZfXvPMynrHyKbnQq07vbIiUs ohXU4QHJaxUnsvQ/9E2VwlNkP8WQu+JUb+Uql6ojonwWnxPe3Ay156U4TtqrIHxnm/HRV6 IE0s69uqt+EucZqrWltTr0JgmiE6WSDz4q72jOvi5ZqRSRJ8uVtvL8xPdF89dgU/ecZday ra/O18EN9T6rZNam+KYzmaru8qBLO4jZax2taCoDydkHMYdZuxqP8UnWQQtIHL4SeQtKL3 qPhRjW8ccSqSA99cmzDlJXk80ZEguZryBtQtb//+GUADxEABc1E6iSF8XobGiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N97iUOcZ//5VQDAOHBPRcSqaW7qdmiTjhUzFaB8/f0o=; b=Zm49MP53jGe+Ff40zDL2unlT6hqvmywd85aiytFx5x3Q1VmJexy3/XmyuF0B8tmjs1Vhvr GIOy+W4EbdK4R5s5Sa9mBNeVmZcsvLeycGZaZWtTgpuVCCPVscqCsCxRdiVpaZ2WheOlVc csxFz6BSoGb5VX3hRzMqMJxpKVRfS3dc634Bwex/XAG+X375d6NApoBbuz/I+SRwDtNIbo vKOyB8Wa2BXVDmCHeK5jtPDm6nuJUi9L4lgR1+RJBp3Pv4jYLoHqS26cekjvX9OSfalr91 xplr9LxuMUhJ+JmJEtpB59WdLQLDu6++s+6TWM149gMOYR5BuOQ5zopd0wXVwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0byQ6sgdz2fT; Wed, 4 Oct 2023 01:02:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39412cfp054083; Wed, 4 Oct 2023 01:02:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39412clW054079; Wed, 4 Oct 2023 01:02:38 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:38 GMT Message-Id: <202310040102.39412clW054079@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: 8ac4404ce27b - stable/12 - unbound: Vendor import 1.18.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8ac4404ce27b180cca79e5e6e188616bbf30b2c5 Auto-Submitted: auto-generated The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8ac4404ce27b180cca79e5e6e188616bbf30b2c5 commit 8ac4404ce27b180cca79e5e6e188616bbf30b2c5 Author: Cy Schubert AuthorDate: 2023-09-19 04:17:09 +0000 Commit: Cy Schubert CommitDate: 2023-10-03 02:01:07 +0000 unbound: Vendor import 1.18.0 Release notes at https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/ Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main (cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5) --- contrib/unbound/Makefile.in | 43 +- contrib/unbound/README.md | 2 +- contrib/unbound/acx_nlnetlabs.m4 | 36 +- contrib/unbound/acx_python.m4 | 61 +- contrib/unbound/cachedb/cachedb.c | 57 +- contrib/unbound/cachedb/redis.c | 28 +- contrib/unbound/compat/getentropy_solaris.c | 2 +- contrib/unbound/config.guess | 51 +- contrib/unbound/config.h.in | 25 +- contrib/unbound/config.h.in~ | 1456 ++++++++++++++++++++ contrib/unbound/config.sub | 72 +- contrib/unbound/configure | 170 ++- contrib/unbound/configure.ac | 99 +- contrib/unbound/contrib/Dockerfile.tests | 4 +- contrib/unbound/contrib/README | 3 + contrib/unbound/contrib/aaaa-filter-iterator.patch | 4 +- contrib/unbound/contrib/unbound.init_yocto | 139 ++ contrib/unbound/daemon/acl_list.c | 2 + contrib/unbound/daemon/acl_list.h | 8 +- contrib/unbound/daemon/cachedump.c | 28 +- contrib/unbound/daemon/remote.c | 236 ++-- contrib/unbound/daemon/remote.h | 2 +- contrib/unbound/daemon/stats.c | 53 +- contrib/unbound/daemon/stats.h | 7 + contrib/unbound/daemon/worker.c | 471 ++++--- contrib/unbound/dns64/dns64.c | 4 +- contrib/unbound/dnstap/dnstap.c | 7 +- contrib/unbound/dnstap/dnstap.h | 4 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 39 +- contrib/unbound/doc/Changelog | 323 +++++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 20 + contrib/unbound/doc/example.conf.in | 32 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 58 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 147 +- contrib/unbound/edns-subnet/subnetmod.c | 27 +- contrib/unbound/iterator/iter_delegpt.c | 39 + contrib/unbound/iterator/iter_delegpt.h | 25 + contrib/unbound/iterator/iter_resptype.c | 7 + contrib/unbound/iterator/iter_scrub.c | 43 +- contrib/unbound/iterator/iter_utils.c | 43 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 259 ++-- contrib/unbound/iterator/iterator.h | 23 +- contrib/unbound/libunbound/libworker.c | 16 +- contrib/unbound/libunbound/unbound-event.h | 6 +- contrib/unbound/libunbound/unbound.h | 116 +- contrib/unbound/services/authzone.c | 10 +- contrib/unbound/services/cache/dns.c | 50 +- contrib/unbound/services/cache/infra.c | 75 +- contrib/unbound/services/cache/infra.h | 5 +- contrib/unbound/services/listen_dnsport.c | 153 +- contrib/unbound/services/localzone.c | 20 +- contrib/unbound/services/localzone.h | 2 + contrib/unbound/services/mesh.c | 385 +++--- contrib/unbound/services/mesh.h | 14 +- contrib/unbound/services/modstack.c | 10 +- contrib/unbound/services/outside_network.c | 28 + contrib/unbound/services/rpz.c | 230 +++- contrib/unbound/services/rpz.h | 16 +- contrib/unbound/sldns/rrdef.c | 12 +- contrib/unbound/sldns/rrdef.h | 7 +- contrib/unbound/sldns/str2wire.c | 94 +- contrib/unbound/sldns/str2wire.h | 4 +- contrib/unbound/sldns/wire2str.c | 19 +- contrib/unbound/smallapp/unbound-anchor.c | 3 +- contrib/unbound/smallapp/unbound-checkconf.c | 2 +- contrib/unbound/smallapp/unbound-control.c | 54 +- contrib/unbound/smallapp/unbound-host.c | 5 +- contrib/unbound/testdata/00-lint.tdir/00-lint.pre | 14 + contrib/unbound/testdata/cachedb_cached_ede.crpl | 91 ++ .../unbound/testdata/edns_downstream_cookies.rpl | 235 ++++ .../testdata/ip_ratelimit.tdir/ip_ratelimit.conf | 28 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.dsc | 16 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.post | 13 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.pre | 24 + .../testdata/ip_ratelimit.tdir/ip_ratelimit.test | 165 +++ .../testdata/ip_ratelimit.tdir/unbound_control.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_control.pem | 22 + .../testdata/ip_ratelimit.tdir/unbound_server.key | 39 + .../testdata/ip_ratelimit.tdir/unbound_server.pem | 22 + .../unbound/testdata/iter_cname_minimise_nx.rpl | 246 ++++ contrib/unbound/testdata/iter_failreply.rpl | 132 ++ contrib/unbound/testdata/iter_ignore_empty.rpl | 198 +++ contrib/unbound/testdata/iter_nat64.rpl | 117 ++ contrib/unbound/testdata/iter_nat64_prefix.rpl | 119 ++ contrib/unbound/testdata/iter_nat64_prefix48.rpl | 118 ++ .../unbound/testdata/serve_expired_0ttl_nodata.rpl | 154 +++ .../testdata/serve_expired_0ttl_nxdomain.rpl | 154 +++ .../testdata/serve_expired_0ttl_servfail.rpl | 129 ++ .../serve_expired_cached_servfail_refresh.rpl | 145 ++ .../stat_values.tdir/stat_values_cachedb.conf | 36 + .../stat_values_downstream_cookies.conf | 32 + contrib/unbound/testdata/subnet_cached_ede.crpl | 114 ++ .../unbound/testdata/subnet_global_prefetch.crpl | 236 ++++ .../subnet_global_prefetch_always_forward.crpl | 167 +++ .../testdata/subnet_global_prefetch_expired.crpl | 241 ++++ contrib/unbound/testdata/val_any_negcache.rpl | 240 ++++ contrib/unbound/util/config_file.c | 153 +- contrib/unbound/util/config_file.h | 65 +- contrib/unbound/util/configlexer.lex | 15 +- contrib/unbound/util/configparser.y | 148 +- contrib/unbound/util/data/msgencode.c | 148 +- contrib/unbound/util/data/msgencode.h | 42 +- contrib/unbound/util/data/msgparse.c | 98 +- contrib/unbound/util/data/msgparse.h | 18 +- contrib/unbound/util/data/msgreply.c | 95 +- contrib/unbound/util/data/msgreply.h | 30 +- contrib/unbound/util/edns.c | 59 + contrib/unbound/util/edns.h | 59 + contrib/unbound/util/fptr_wlist.c | 8 + contrib/unbound/util/iana_ports.inc | 4 + contrib/unbound/util/module.c | 16 +- contrib/unbound/util/module.h | 14 +- contrib/unbound/util/net_help.c | 70 +- contrib/unbound/util/net_help.h | 23 + contrib/unbound/util/netevent.c | 229 +-- contrib/unbound/util/netevent.h | 70 +- contrib/unbound/util/regional.c | 2 +- contrib/unbound/util/rfc_1982.c | 74 + contrib/unbound/util/rfc_1982.h | 63 + contrib/unbound/util/siphash.c | 187 +++ contrib/unbound/util/siphash.h | 43 + contrib/unbound/util/storage/lruhash.c | 25 +- contrib/unbound/util/storage/lruhash.h | 5 +- contrib/unbound/util/storage/slabhash.c | 18 + contrib/unbound/util/storage/slabhash.h | 9 + contrib/unbound/util/timehist.c | 44 +- contrib/unbound/util/timeval_func.c | 113 ++ contrib/unbound/util/timeval_func.h | 53 + contrib/unbound/validator/autotrust.c | 2 + contrib/unbound/validator/val_kcache.c | 10 +- contrib/unbound/validator/val_kcache.h | 4 +- contrib/unbound/validator/val_kentry.c | 48 +- contrib/unbound/validator/val_kentry.h | 37 +- contrib/unbound/validator/val_neg.c | 7 +- contrib/unbound/validator/val_nsec.c | 19 +- contrib/unbound/validator/val_nsec.h | 5 +- contrib/unbound/validator/val_sigcrypt.c | 43 +- contrib/unbound/validator/val_utils.c | 19 +- contrib/unbound/validator/validator.c | 137 +- lib/libunbound/Makefile | 6 +- usr.sbin/unbound/config.h | 6 +- 148 files changed, 9439 insertions(+), 1708 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index bc021aa1eb00..0a2e7f9b6f08 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -122,15 +122,15 @@ iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ services/localzone.c services/mesh.c services/modstack.c services/view.c \ -services/rpz.c \ +services/rpz.c util/rfc_1982.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/shm_side/shm_main.c services/authzone.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ -util/rtt.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ +util/rtt.c util/siphash.c util/edns.c util/storage/dnstree.c util/storage/lookup3.c \ util/storage/lruhash.c util/storage/slabhash.c util/tcp_conn_limit.c \ -util/timehist.c util/tube.c util/proxy_protocol.c \ +util/timehist.c util/tube.c util/proxy_protocol.c util/timeval_func.c \ util/ub_event.c util/ub_event_pluggable.c util/winsock_event.c \ validator/autotrust.c validator/val_anchor.c validator/validator.c \ validator/val_kcache.c validator/val_kentry.c validator/val_neg.c \ @@ -145,14 +145,14 @@ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ -fptr_wlist.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +fptr_wlist.lo siphash.lo edns.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo tcp_conn_limit.lo timehist.lo tube.lo winsock_event.lo \ -autotrust.lo val_anchor.lo rpz.lo proxy_protocol.lo \ +autotrust.lo val_anchor.lo rpz.lo rfc_1982.lo proxy_protocol.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo $(CACHEDB_OBJ) authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo timeval_func.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -198,7 +198,7 @@ CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \ $(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ CONTROL_SRC=smallapp/unbound-control.c -CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ=unbound-control.lo CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c @@ -455,6 +455,7 @@ unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnsta dynlibmod.lo dynlibdmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h +timeval_func.lo timeval_func.o: $(srcdir)/util/timeval_func.c $(srcdir)/util/timeval_func.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -498,6 +499,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h echo "#include \"util/configyyrename.h\"" >> $@ ;\ $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ fi + @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y @-if test ! -d util; then $(INSTALL) -d util; fi @@ -516,7 +518,7 @@ distclean: clean rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) - rm -f Makefile + rm -f Makefile maintainer-clean: distclean rm -f util/configlexer.c util/configparser.c util/configparser.h @@ -649,7 +651,7 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) $(UNBOUND_EVENT_UNINSTA iana_update: curl -o port-numbers.tmp https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed - if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc rm -f port-numbers.tmp # dependency generation @@ -877,7 +879,7 @@ rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdi outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h \ @@ -915,7 +917,8 @@ config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/ut configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ @@ -928,7 +931,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/respip/respip.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h + $(srcdir)/util/tube.h $(srcdir)/util/timeval_func.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ @@ -983,7 +986,7 @@ netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/neteve $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/timeval_func.h proxy_protocol.lo proxy_protocol.o: $(srcdir)/util/proxy_protocol.c config.h \ $(srcdir)/util/proxy_protocol.h $(srcdir)/sldns/sbuffer.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ @@ -1006,6 +1009,8 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +siphash.lo siphash.o: $(srcdir)/util/siphash.c +rfc_1982.lo rfc_1982.o: $(srcdir)/util/rfc_1982.c edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ @@ -1186,7 +1191,7 @@ unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h $(srcdir)/sldns/r $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/services/outside_network.h + $(srcdir)/services/outside_network.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ @@ -1321,7 +1326,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1343,7 +1348,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/daemon/remote.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/timeval_func.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ @@ -1357,7 +1362,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/timeval_func.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ @@ -1409,7 +1414,7 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/util/timeval_func.h \ $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ @@ -1417,7 +1422,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/edns.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h $(srcdir)/util/timeval_func.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ diff --git a/contrib/unbound/README.md b/contrib/unbound/README.md index c3d9bc2492ef..c220da030458 100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@ -1,6 +1,6 @@ # Unbound -[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) [![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) [![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) diff --git a/contrib/unbound/acx_nlnetlabs.m4 b/contrib/unbound/acx_nlnetlabs.m4 index cf436ec54bb6..f27615bd8bce 100644 --- a/contrib/unbound/acx_nlnetlabs.m4 +++ b/contrib/unbound/acx_nlnetlabs.m4 @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 44 +# Version 46 +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. # 2021-08-17 fix for openssl to detect split version, with ssldir_include @@ -187,7 +189,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -233,7 +235,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -272,7 +274,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -309,7 +311,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -335,7 +337,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -345,7 +347,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -356,7 +358,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -370,7 +372,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -385,7 +387,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -413,7 +415,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -475,7 +477,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -834,7 +836,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -859,7 +861,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -923,7 +925,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else @@ -1317,7 +1319,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1355,7 +1357,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/contrib/unbound/acx_python.m4 b/contrib/unbound/acx_python.m4 index 16c0c6fd943f..c945d6c8989e 100644 --- a/contrib/unbound/acx_python.m4 +++ b/contrib/unbound/acx_python.m4 @@ -17,33 +17,62 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ PYTHON_VERSION=`$PYTHON -c "import sys; \ print(sys.version.split()[[0]])"` fi + # calculate the version number components. + [ + v="$PYTHON_VERSION" + PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi + v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` + PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` + if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi + ] - # Check if you have sysconfig - AC_MSG_CHECKING([for the sysconfig Python module]) - if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then + # For some systems, sysconfig exists, but has the wrong paths, + # on Debian 10, for python 2.7 and 3.7. So, we check the version, + # and for older versions try distutils.sysconfig first. For newer + # versions>=3.10, where distutils.sysconfig is deprecated, use + # sysconfig first and then attempt the other one. + py_distutils_first="no" + if test $PYTHON_VERSION_MAJOR -lt 3; then + py_distutils_first="yes" + fi + if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then + py_distutils_first="yes" + fi + + # Check if you have the first module + if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi + sysconfig_module="" + AC_MSG_CHECKING([for the $m Python module]) + if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then AC_MSG_RESULT([yes]) - sysconfig_module="sysconfig" - # if yes, use sysconfig, because distutils is deprecated. + sysconfig_module="$m" else AC_MSG_RESULT([no]) - # if no, try to use distutils + fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then + # if not found, try the other one. + if test -z "$sysconfig_module"; then + if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi + AC_MSG_CHECKING([for the $m2 Python module]) + if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then AC_MSG_RESULT([yes]) + sysconfig_module="$m2" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". - Please check your Python installation. The error was: - $ac_distutils_result]) + AC_MSG_ERROR([cannot import Python module "$m", or "$m2". + Please check your Python installation. The errors are: + $m + $ac_modulecheck_result1 + $m2 + $ac_modulecheck_result2]) PYTHON_VERSION="" fi - - sysconfig_module="distutils.sysconfig" fi + if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi # # Check for Python include path diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index 245daa986967..30645268ca23 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -102,7 +102,6 @@ static int testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; - (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); @@ -111,6 +110,15 @@ testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) log_err("out of memory"); return 0; } + /* Register an EDNS option (65534) to bypass the worker cache lookup + * for testing */ + if(!edns_register_option(LDNS_EDNS_UNBOUND_CACHEDB_TESTFRAME_TEST, + 1 /* bypass cache */, + 0 /* no aggregation */, env)) { + log_err("testframe_init, could not register test opcode"); + free(d); + return 0; + } lock_basic_init(&d->lock); lock_protect(&d->lock, d, sizeof(*d)); return 1; @@ -218,6 +226,8 @@ static int cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) { const char* backend_str = cfg->cachedb_backend; + if(!backend_str || *backend_str==0) + return 1; cachedb_env->backend = cachedb_find_backend(backend_str); if(!cachedb_env->backend) { log_err("cachedb: cannot find backend name '%s'", backend_str); @@ -228,7 +238,7 @@ cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg) return 1; } -int +int cachedb_init(struct module_env* env, int id) { struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1, @@ -267,19 +277,16 @@ cachedb_init(struct module_env* env, int id) return 1; } -void +void cachedb_deinit(struct module_env* env, int id) { struct cachedb_env* cachedb_env; if(!env || !env->modinfo[id]) return; cachedb_env = (struct cachedb_env*)env->modinfo[id]; - /* free contents */ - /* TODO */ if(cachedb_env->enabled) { (*cachedb_env->backend->deinit)(env, cachedb_env); } - free(cachedb_env); env->modinfo[id] = NULL; } @@ -406,6 +413,14 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(qstate->return_msg->rep->ttl == 0 && !qstate->env->cfg->serve_expired) return 0; + + /* The EDE is added to the out-list so it is encoded in the cached message */ + if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) { + edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch, + qstate->return_msg->rep->reason_bogus, + qstate->return_msg->rep->reason_bogus_str); + } + if(verbosity >= VERB_ALGO) log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo, qstate->return_msg->rep); @@ -502,6 +517,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) { struct msg_parse* prs; struct edns_data edns; + struct edns_option* ede; uint64_t timestamp, expiry; time_t adjust; size_t lim = sldns_buffer_limit(buf); @@ -539,6 +555,24 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf) if(!qstate->return_msg) return 0; + /* We find the EDE in the in-list after parsing */ + if(qstate->env->cfg->ede && + (ede = edns_opt_list_find(edns.opt_list_in, LDNS_EDNS_EDE))) { + if(ede->opt_len >= 2) { + qstate->return_msg->rep->reason_bogus = + sldns_read_uint16(ede->opt_data); + } + /* allocate space and store the error string and it's size */ + if(ede->opt_len > 2) { + size_t ede_len = ede->opt_len - 2; + qstate->return_msg->rep->reason_bogus_str = regional_alloc( + qstate->region, sizeof(char) * (ede_len+1)); + memcpy(qstate->return_msg->rep->reason_bogus_str, + ede->opt_data+2, ede_len); + qstate->return_msg->rep->reason_bogus_str[ede_len] = 0; + } + } + qstate->return_rcode = LDNS_RCODE_NOERROR; /* see how much of the TTL expired, and remove it */ @@ -630,11 +664,15 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie) * See if unbound's internal cache can answer the query */ static int -cachedb_intcache_lookup(struct module_qstate* qstate) +cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde) { uint8_t* dpname=NULL; size_t dpnamelen=0; struct dns_msg* msg; + /* for testframe bypass this lookup */ + if(cde->backend == &testframe_backend) { + return 0; + } if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo, &dpname, &dpnamelen)) return 0; /* no cache for these queries */ @@ -693,6 +731,7 @@ cachedb_handle_query(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are enabled, and skip if so */ if(!ie->enabled) { /* pass request to next module */ @@ -709,7 +748,7 @@ cachedb_handle_query(struct module_qstate* qstate, /* lookup inside unbound's internal cache. * This does not look for expired entries. */ - if(cachedb_intcache_lookup(qstate)) { + if(cachedb_intcache_lookup(qstate, ie)) { if(verbosity >= VERB_ALGO) { if(qstate->return_msg->rep) log_dns_msg("cachedb internal cache lookup", @@ -746,6 +785,7 @@ cachedb_handle_query(struct module_qstate* qstate, qstate->ext_state[id] = module_wait_module; return; } + qstate->is_cachedb_answer = 1; /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -768,6 +808,7 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { + qstate->is_cachedb_answer = 0; /* check if we are not enabled or instructed to not cache, and skip */ if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ diff --git a/contrib/unbound/cachedb/redis.c b/contrib/unbound/cachedb/redis.c index 16c3741f786b..93a575a4c6d2 100644 --- a/contrib/unbound/cachedb/redis.c +++ b/contrib/unbound/cachedb/redis.c @@ -56,6 +56,8 @@ struct redis_moddata { int numctxs; /* number of ctx entries */ const char* server_host; /* server's IP address or host name */ int server_port; /* server's TCP port */ + const char* server_path; /* server's unix path, or "", NULL if unused */ + const char* server_password; /* server's AUTH password, or "", NULL if unused */ struct timeval timeout; /* timeout for connection setup and commands */ }; @@ -67,8 +69,13 @@ redis_connect(const struct redis_moddata* moddata) { redisContext* ctx; - ctx = redisConnectWithTimeout(moddata->server_host, - moddata->server_port, moddata->timeout); + if(moddata->server_path && moddata->server_path[0]!=0) { + ctx = redisConnectUnixWithTimeout(moddata->server_path, + moddata->timeout); + } else { + ctx = redisConnectWithTimeout(moddata->server_host, + moddata->server_port, moddata->timeout); + } if(!ctx || ctx->err) { const char *errstr = "out of memory"; if(ctx) @@ -80,6 +87,17 @@ redis_connect(const struct redis_moddata* moddata) log_err("failed to set redis timeout"); goto fail; } + if(moddata->server_password && moddata->server_password[0]!=0) { + redisReply* rep; + rep = redisCommand(ctx, "AUTH %s", moddata->server_password); + if(!rep || rep->type == REDIS_REPLY_ERROR) { + log_err("failed to authenticate with password"); + freeReplyObject(rep); + goto fail; + } + freeReplyObject(rep); + } + verbose(VERB_OPS, "Connection to Redis established"); return ctx; fail: @@ -94,7 +112,7 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) int i; struct redis_moddata* moddata = NULL; - verbose(VERB_ALGO, "redis_init"); + verbose(VERB_OPS, "Redis initialization"); moddata = calloc(1, sizeof(struct redis_moddata)); if(!moddata) { @@ -112,6 +130,8 @@ redis_init(struct module_env* env, struct cachedb_env* cachedb_env) * we don't have to free it in this module. */ moddata->server_host = env->cfg->redis_server_host; moddata->server_port = env->cfg->redis_server_port; + moddata->server_path = env->cfg->redis_server_path; + moddata->server_password = env->cfg->redis_server_password; moddata->timeout.tv_sec = env->cfg->redis_timeout / 1000; moddata->timeout.tv_usec = (env->cfg->redis_timeout % 1000) * 1000; for(i = 0; i < moddata->numctxs; i++) @@ -154,7 +174,7 @@ redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env) cachedb_env->backend_data; (void)env; - verbose(VERB_ALGO, "redis_deinit"); + verbose(VERB_OPS, "Redis deinitialization"); if(!moddata) return; diff --git a/contrib/unbound/compat/getentropy_solaris.c b/contrib/unbound/compat/getentropy_solaris.c index 5e3b1cbbbd30..1ff8162917b3 100644 --- a/contrib/unbound/compat/getentropy_solaris.c +++ b/contrib/unbound/compat/getentropy_solaris.c @@ -47,7 +47,7 @@ #define SHA512_Update SHA512Update #define SHA512_Final SHA512Final #else -#include "openssl/sha.h" +#include #endif #include diff --git a/contrib/unbound/config.guess b/contrib/unbound/config.guess index 980b02083815..b187213930f1 100755 --- a/contrib/unbound/config.guess +++ b/contrib/unbound/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-09-17' +timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -976,7 +976,27 @@ EOF GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1042,6 +1062,15 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -1197,7 +1226,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1338,7 +1367,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in index 2caecf30d040..f31354d01408 100644 *** 18537 LINES SKIPPED *** From nobody Wed Oct 4 01:02:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0byS3yvPz4wKKq; Wed, 4 Oct 2023 01:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0byS1VXLz4YkP; Wed, 4 Oct 2023 01:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZlLdOEcW7jgqrX96UtIlDWIpouh96ttHiYvP3uA6qA=; b=CJI8/39ON7ZOnkoDTOMKh9BjWkF+bDuq33aDxZsHjlIAOMVoO8+ZPumb72EiTbgffWpryW N25jG1sr1q7nyrghnqTJ/2E8S8KoqJs517UH8RnntHijkUxiLB/4vhctzs3LfZTMN1pu8A 7QcuvHlmFQja2BKNUbTmcKcWCPn/FFH0RlhXS48IolwlIgEh+V9tB1OHW8Q8S6zQde7xdj uujxL1Owm+JKGehEr2POyNJqZvp6LgSZP4aNcgTUMO7rOGeMeyx6sbzPyMJIxxiDhJ6MdB Y01CGAd1kOenjFiZV2ep6aIMQLuaTuaES4bLvvprCy5Clu+HSYrRn1Pp19Q0TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696381360; a=rsa-sha256; cv=none; b=q2ABTXCz4bce2y2XgVCxjVbbys8NtYrhnhx9d7uS8Luz5VroePFwdPGCwuX1TaEoffgbrc UdqnhurTrlIZ80KbxCS50Zu0f6TTau3KfKFuFTLE9m+CD9YRJf2FFSYvfbqin+15BfSPFZ yVHzNJoDfvKe9mSv+IK+CSCjM6/698lcRnqXrfS8/XlxYchXWJFM/w68mvZdG/kdBYA/tX t9djA7wYOb0YSUPbopXwsF8m81A66zRsylrZ2q0KXQLjUKiwwsvHtxlp8dIEhI6RxtWscr Bt4KTmhA25x48wLzCuLLLwpiNjHz0+fw3EVMcJ8UpwIkGJ4nfYJ2OL2+I2G4NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696381360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BZlLdOEcW7jgqrX96UtIlDWIpouh96ttHiYvP3uA6qA=; b=s8OgWorrHV4hjUJkRJ9mFY2FPFgCt/hVoB+XeZPQNemb0qI5J8L0cu8p5ct1hzvzj98PsR I5JRUY8g82+/P45gPBDvy0F5I6uz59fOvMvKRFqxkNBrSGVcWiPuXCMPEuo5wugrIZHT7p H2VUPUqs4fcuKGQ5HdcAQEn9qvpVmvjPU/AgQFATq/MdwQNJxImSgMk66At7hoDHRwGMjk nmYBpeqC8S7IKPSAkepnucGrG3fvcz70Ef9t0uCpqhzeD/suY+D7QZWX82Z6O60T4j9u7e 8lIrbdt3V4PBsDtFKvO6u1RfL5tfCgk2N4rTRNFMheDuidzYpT5nwrtV7nxW0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0byS0Nmvz35W; Wed, 4 Oct 2023 01:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39412exg054130; Wed, 4 Oct 2023 01:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39412dCk054127; Wed, 4 Oct 2023 01:02:39 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:02:39 GMT Message-Id: <202310040102.39412dCk054127@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: 757524b3db9a - stable/12 - local-unbound: remove stray config.h.in backup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 757524b3db9a4cfcd7ad503f8791b7230e7b03a5 Auto-Submitted: auto-generated The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=757524b3db9a4cfcd7ad503f8791b7230e7b03a5 commit 757524b3db9a4cfcd7ad503f8791b7230e7b03a5 Author: Mina Galić AuthorDate: 2023-09-20 14:39:37 +0000 Commit: Cy Schubert CommitDate: 2023-10-04 01:00:54 +0000 local-unbound: remove stray config.h.in backup despite being ignored in our main .gitignore, such files can still be merged from vendor branches. Reviewed by: cy Fixes: 8f76bb7dad (unbound: Vendor import 1.18.0) MFC after: 2 weeks X-MFC with: 8f76bb7dad Differential Revision: https://reviews.freebsd.org/D41920 (cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe) --- contrib/unbound/config.h.in~ | 1456 ------------------------------------------ 1 file changed, 1456 deletions(-) diff --git a/contrib/unbound/config.h.in~ b/contrib/unbound/config.h.in~ deleted file mode 100644 index f31354d01408..000000000000 --- a/contrib/unbound/config.h.in~ +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* apply the noreturn attribute to a function that exits the program */ -#undef ATTR_NORETURN - -/* apply the weak attribute to a symbol */ -#undef ATTR_WEAK - -/* Directory to chroot to */ -#undef CHROOT_DIR - -/* Define this to enable client subnet option. */ -#undef CLIENT_SUBNET - -/* Do sha512 definitions in config.h */ -#undef COMPAT_SHA512 - -/* Command line arguments used with configure */ -#undef CONFCMDLINE - -/* Pathname to the Unbound configuration file */ -#undef CONFIGFILE - -/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work - */ -#undef DARWIN_BROKEN_SETREUID - -/* Whether daemon is deprecated */ -#undef DEPRECATED_DAEMON - -/* Deprecate RSA 1024 bit length, makes that an unsupported key */ -#undef DEPRECATE_RSA_1024 - -/* Define this to enable kernel based UDP source port randomization. */ -#undef DISABLE_EXPLICIT_PORT_RANDOMISATION - -/* default dnstap socket path */ -#undef DNSTAP_SOCKET_PATH - -/* Define if you want to use debug lock checking (slow). */ -#undef ENABLE_LOCK_CHECKS - -/* Define this if you enabled-allsymbols from libunbound to link binaries to - it for smaller install size, but the libunbound export table is polluted by - internal symbols */ -#undef EXPORT_ALL_SYMBOLS - -/* Define to 1 if you have the `accept4' function. */ -#undef HAVE_ACCEPT4 - -/* Define to 1 if you have the `arc4random' function. */ -#undef HAVE_ARC4RANDOM - -/* Define to 1 if you have the `arc4random_uniform' function. */ -#undef HAVE_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Whether the C compiler accepts the "format" attribute */ -#undef HAVE_ATTR_FORMAT - -/* Whether the C compiler accepts the "noreturn" attribute */ -#undef HAVE_ATTR_NORETURN - -/* Whether the C compiler accepts the "unused" attribute */ -#undef HAVE_ATTR_UNUSED - -/* Whether the C compiler accepts the "weak" attribute */ -#undef HAVE_ATTR_WEAK - -/* If we have be64toh */ -#undef HAVE_BE64TOH - -/* Define to 1 if you have the `BIO_set_callback_ex' function. */ -#undef HAVE_BIO_SET_CALLBACK_EX - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STRING_H - -/* Define to 1 if you have the `chown' function. */ -#undef HAVE_CHOWN - -/* Define to 1 if you have the `chroot' function. */ -#undef HAVE_CHROOT - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA - -/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ -#undef HAVE_CRYPTO_THREADID_SET_CALLBACK - -/* Define to 1 if you have the `ctime_r' function. */ -#undef HAVE_CTIME_R - -/* Define to 1 if you have the `daemon' function. */ -#undef HAVE_DAEMON - -/* Define to 1 if you have the declaration of `arc4random', and to 0 if you - don't. */ -#undef HAVE_DECL_ARC4RANDOM - -/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 - if you don't. */ -#undef HAVE_DECL_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if - you don't. */ -#undef HAVE_DECL_EVSIGNAL_ASSIGN - -/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_NTOP - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_PTON - -/* Define to 1 if you have the declaration of `nghttp2_session_server_new', - and to 0 if you don't. */ -#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW - -/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED25519 - -/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED448 - -/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_SECP384R1 - -/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 - if you don't. */ -#undef HAVE_DECL_NID_X9_62_PRIME256V1 - -/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you - don't. */ -#undef HAVE_DECL_REALLOCARRAY - -/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you - don't. */ -#undef HAVE_DECL_REDISCONNECT - -/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 - if you don't. */ -#undef HAVE_DECL_SK_SSL_COMP_POP_FREE - -/* Define to 1 if you have the declaration of - `SSL_COMP_get_compression_methods', and to 0 if you don't. */ -#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS - -/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to - 0 if you don't. */ -#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO - -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCAT - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCPY - -/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if - you don't. */ -#undef HAVE_DECL_XML_STOPPARSER - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `DSA_SIG_set0' function. */ -#undef HAVE_DSA_SIG_SET0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_ENDIAN_H - -/* Define to 1 if you have the `endprotoent' function. */ -#undef HAVE_ENDPROTOENT - -/* Define to 1 if you have the `endpwent' function. */ -#undef HAVE_ENDPWENT - -/* Define to 1 if you have the `endservent' function. */ -#undef HAVE_ENDSERVENT - -/* Define to 1 if you have the `ENGINE_cleanup' function. */ -#undef HAVE_ENGINE_CLEANUP - -/* Define to 1 if you have the `ERR_free_strings' function. */ -#undef HAVE_ERR_FREE_STRINGS - -/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ -#undef HAVE_ERR_LOAD_CRYPTO_STRINGS - -/* Define to 1 if you have the `event_assign' function. */ -#undef HAVE_EVENT_ASSIGN - -/* Define to 1 if you have the `event_base_free' function. */ -#undef HAVE_EVENT_BASE_FREE - -/* Define to 1 if you have the `event_base_get_method' function. */ -#undef HAVE_EVENT_BASE_GET_METHOD - -/* Define to 1 if you have the `event_base_new' function. */ -#undef HAVE_EVENT_BASE_NEW - -/* Define to 1 if you have the `event_base_once' function. */ -#undef HAVE_EVENT_BASE_ONCE - -/* Define to 1 if you have the header file. */ -#undef HAVE_EVENT_H - -/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ -#undef HAVE_EVP_AES_256_CBC - -/* Define to 1 if you have the `EVP_cleanup' function. */ -#undef HAVE_EVP_CLEANUP - -/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled' - function. */ -#undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED - -/* Define to 1 if you have the `EVP_DigestVerify' function. */ -#undef HAVE_EVP_DIGESTVERIFY - -/* Define to 1 if you have the `EVP_dss1' function. */ -#undef HAVE_EVP_DSS1 - -/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ -#undef HAVE_EVP_ENCRYPTINIT_EX - -/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ -#undef HAVE_EVP_MAC_CTX_SET_PARAMS - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#undef HAVE_EVP_MD_CTX_NEW - -/* Define to 1 if you have the `EVP_sha1' function. */ -#undef HAVE_EVP_SHA1 - -/* Define to 1 if you have the `EVP_sha256' function. */ -#undef HAVE_EVP_SHA256 - -/* Define to 1 if you have the `EVP_sha512' function. */ -#undef HAVE_EVP_SHA512 - -/* Define to 1 if you have the `ev_default_loop' function. */ -#undef HAVE_EV_DEFAULT_LOOP - -/* Define to 1 if you have the `ev_loop' function. */ -#undef HAVE_EV_LOOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXPAT_H - -/* Define to 1 if you have the `explicit_bzero' function. */ -#undef HAVE_EXPLICIT_BZERO - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the `FIPS_mode' function. */ -#undef HAVE_FIPS_MODE - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Whether getaddrinfo is available */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getauxval' function. */ -#undef HAVE_GETAUXVAL - -/* Define to 1 if you have the `getentropy' function. */ -#undef HAVE_GETENTROPY - -/* Define to 1 if you have the `getifaddrs' function. */ -#undef HAVE_GETIFADDRS - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getpwnam' function. */ -#undef HAVE_GETPWNAM - -/* Define to 1 if you have the `getrlimit' function. */ -#undef HAVE_GETRLIMIT - -/* Define to 1 if you have the `gettid' function. */ -#undef HAVE_GETTID - -/* Define to 1 if you have the `glob' function. */ -#undef HAVE_GLOB - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the `gmtime_r' function. */ -#undef HAVE_GMTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_GRP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_HIREDIS_HIREDIS_H - -/* Define to 1 if you have the `HMAC_Init_ex' function. */ -#undef HAVE_HMAC_INIT_EX - -/* If we have htobe64 */ -#undef HAVE_HTOBE64 - -/* Define to 1 if you have the header file. */ -#undef HAVE_IFADDRS_H - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the `inet_aton' function. */ -#undef HAVE_INET_ATON - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the `inet_pton' function. */ -#undef HAVE_INET_PTON - -/* Define to 1 if you have the `initgroups' function. */ -#undef HAVE_INITGROUPS - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* if the function 'ioctlsocket' is available */ -#undef HAVE_IOCTLSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_IPHLPAPI_H - -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the `kill' function. */ -#undef HAVE_KILL - -/* Use portable libbsd functions */ -#undef HAVE_LIBBSD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBKERN_OSBYTEORDER_H - -/* Define if we have LibreSSL */ -#undef HAVE_LIBRESSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NET_TSTAMP_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOGIN_CAP_H - -/* If have GNU libc compatible malloc */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETIOAPI_H - -/* Use libnettle for crypto */ -#undef HAVE_NETTLE - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_DSA_COMPAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_EDDSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define this to use nghttp2 client. */ -#undef HAVE_NGHTTP2 - -/* Define to 1 if you have the header file. */ -#undef HAVE_NGHTTP2_NGHTTP2_H - -/* Use libnss for crypto */ -#undef HAVE_NSS - -/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ -#undef HAVE_OPENSSL_ADD_ALL_DIGESTS - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_BN_H - -/* Define to 1 if you have the `OPENSSL_config' function. */ -#undef HAVE_OPENSSL_CONFIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CONF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CORE_NAMES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ENGINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ -#undef HAVE_OPENSSL_INIT_CRYPTO - -/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ -#undef HAVE_OPENSSL_INIT_SSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PARAM_BUILD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RAND_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */ -#undef HAVE_OSSL_PARAM_BLD_NEW - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if the system has the type `pthread_rwlock_t'. */ -#undef HAVE_PTHREAD_RWLOCK_T - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -#undef HAVE_PTHREAD_SPINLOCK_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define if you have Python libraries and header files. */ -#undef HAVE_PYTHON - -/* Define to 1 if you have the `random' function. */ -#undef HAVE_RANDOM - -/* Define to 1 if you have the `RAND_cleanup' function. */ -#undef HAVE_RAND_CLEANUP - -/* If we have reallocarray(3) */ -#undef HAVE_REALLOCARRAY - -/* Define to 1 if you have the `recvmsg' function. */ -#undef HAVE_RECVMSG - -/* Define to 1 if you have the `sendmsg' function. */ -#undef HAVE_SENDMSG - -/* Define to 1 if you have the `setregid' function. */ -#undef HAVE_SETREGID - -/* Define to 1 if you have the `setresgid' function. */ -#undef HAVE_SETRESGID - -/* Define to 1 if you have the `setresuid' function. */ -#undef HAVE_SETRESUID - -/* Define to 1 if you have the `setreuid' function. */ -#undef HAVE_SETREUID - -/* Define to 1 if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - -/* Define to 1 if you have the `setusercontext' function. */ -#undef HAVE_SETUSERCONTEXT - -/* Define to 1 if you have the `SHA512_Update' function. */ -#undef HAVE_SHA512_UPDATE - -/* Define to 1 if you have the `shmget' function. */ -#undef HAVE_SHMGET - -/* Define to 1 if you have the `sigprocmask' function. */ -#undef HAVE_SIGPROCMASK - -/* Define to 1 if you have the `sleep' function. */ -#undef HAVE_SLEEP - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the `socketpair' function. */ -#undef HAVE_SOCKETPAIR - -/* Using Solaris threads */ -#undef HAVE_SOLARIS_THREADS - -/* Define to 1 if you have the `srandom' function. */ -#undef HAVE_SRANDOM - -/* Define if you have the SSL libraries installed. */ -#undef HAVE_SSL - -/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_PROTOS - -/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB - -/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ -#undef HAVE_SSL_CTX_SET_CIPHERSUITES - -/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ -#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL - -/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb' - function. */ -#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB - -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ -#undef HAVE_SSL_GET0_ALPN_SELECTED - -/* Define to 1 if you have the `SSL_get0_peername' function. */ -#undef HAVE_SSL_GET0_PEERNAME - -/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ -#undef HAVE_SSL_GET1_PEER_CERTIFICATE - -/* Define to 1 if you have the `SSL_set1_host' function. */ -#undef HAVE_SSL_SET1_HOST - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strptime' function. */ -#undef HAVE_STRPTIME - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ -#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST - -/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ -#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN - -/* Define if you have Swig libraries and header files. */ -#undef HAVE_SWIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if systemd should be used */ -#undef HAVE_SYSTEMD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_ENDIAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IPC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHA2_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TARGETCONDITIONALS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Using Windows threads */ -#undef HAVE_WINDOWS_THREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if you have the `writev' function. */ -#undef HAVE_WRITEV - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ -#undef HAVE_X509_VERIFY_PARAM_SET1_HOST - -/* Define to 1 if you have the `_beginthreadex' function. */ -#undef HAVE__BEGINTHREADEX - -/* If HMAC_Init_ex() returns void */ -#undef HMAC_INIT_EX_RETURNS_VOID - -/* if lex has yylex_destroy */ -#undef LEX_HAS_YYLEX_DESTROY - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Define to the maximum message length to pass to syslog. */ -#undef MAXSYSLOGMSGLEN - -/* Define if memcmp() does not compare unsigned bytes */ -#undef MEMCMP_IS_BROKEN - -/* Define if mkdir has one argument. */ -#undef MKDIR_HAS_ONE_ARG - -/* Define if the network stack does not fully support nonblocking io (causes - lower performance). */ -#undef NONBLOCKING_IS_BROKEN - -/* Put -D_ALL_SOURCE define in config.h */ -#undef OMITTED__D_ALL_SOURCE - -/* Put -D_BSD_SOURCE define in config.h */ -#undef OMITTED__D_BSD_SOURCE - -/* Put -D_DEFAULT_SOURCE define in config.h */ -#undef OMITTED__D_DEFAULT_SOURCE - -/* Put -D_GNU_SOURCE define in config.h */ -#undef OMITTED__D_GNU_SOURCE - -/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ -#undef OMITTED__D_LARGEFILE_SOURCE_1 - -/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ -#undef OMITTED__D_POSIX_C_SOURCE_200112 - -/* Put -D_XOPEN_SOURCE=600 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_600 - -/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 - -/* Put -D__EXTENSIONS__ define in config.h */ -#undef OMITTED__D__EXTENSIONS__ - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* default pidfile location */ -#undef PIDFILE - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Return type of signal handlers, but autoconf 2.70 says 'your code may - safely assume C89 semantics that RETSIGTYPE is void.' */ -#undef RETSIGTYPE - -/* if REUSEPORT is enabled by default */ -#undef REUSEPORT_DEFAULT - -/* default rootkey location */ -#undef ROOT_ANCHOR_FILE - -/* default rootcert location */ -#undef ROOT_CERT_FILE - -/* version number for resource files */ -#undef RSRC_PACKAGE_VERSION - -/* Directory to chdir to */ -#undef RUN_DIR - -/* Shared data */ -#undef SHARE_DIR - -/* The size of `pthread_t', as computed by sizeof. */ -#undef SIZEOF_PTHREAD_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `time_t', as computed by sizeof. */ -#undef SIZEOF_TIME_T - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* define if (v)snprintf does not return length needed, (but length used) */ -#undef SNPRINTF_RET_BROKEN - -/* Define to 1 if libsodium supports sodium_set_misuse_handler */ -#undef SODIUM_MISUSE_HANDLER - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* use default strptime. */ -#undef STRPTIME_WORKS - -/* Use win32 resources and API */ -#undef UB_ON_WINDOWS - -/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ -#undef UB_SYSLOG_FACILITY - -/* default username */ -#undef UB_USERNAME - -/* use to enable lightweight alloc assertions, for debug use */ -#undef UNBOUND_ALLOC_LITE - -/* use malloc not regions, for debug use */ -#undef UNBOUND_ALLOC_NONREGIONAL - -/* use statistics for allocs and frees, for debug use */ -#undef UNBOUND_ALLOC_STATS - -/* define this to enable debug checks. */ -#undef UNBOUND_DEBUG - -/* Define to 1 to use cachedb support */ -#undef USE_CACHEDB - -/* Define to 1 to enable dnscrypt support */ -#undef USE_DNSCRYPT - -/* Define to 1 to enable dnscrypt with xchacha20 support */ -#undef USE_DNSCRYPT_XCHACHA20 - -/* Define to 1 to enable dnstap support */ -#undef USE_DNSTAP - -/* Define this to enable DSA support. */ -#undef USE_DSA - -/* Define this to enable ECDSA support. */ -#undef USE_ECDSA - -/* Define this to enable an EVP workaround for older openssl */ -#undef USE_ECDSA_EVP_WORKAROUND - -/* Define this to enable ED25519 support. */ -#undef USE_ED25519 - -/* Define this to enable ED448 support. */ -#undef USE_ED448 - -/* Define this to enable GOST support. */ -#undef USE_GOST - -/* Define to 1 to use ipsecmod support. */ -#undef USE_IPSECMOD - -/* Define to 1 to use ipset support */ -#undef USE_IPSET - -/* Define if you enable libevent */ -#undef USE_LIBEVENT - -/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a - default outgoing port range. This is only for the libunbound on Linux and - does not affect unbound resolving daemon itself. This may severely limit - the number of available outgoing ports and thus decrease randomness. Define - this only when the target system restricts (e.g. some of SELinux enabled - distributions) the use of non-ephemeral ports. */ -#undef USE_LINUX_IP_LOCAL_PORT_RANGE - -/* Define if you want to use internal select based events */ -#undef USE_MINI_EVENT - -/* Define this to enable client TCP Fast Open. */ -#undef USE_MSG_FASTOPEN - -/* Define this to enable client TCP Fast Open. */ -#undef USE_OSX_MSG_FASTOPEN - -/* Define this to use hiredis client. */ -#undef USE_REDIS - -/* Define this to enable SHA1 support. */ -#undef USE_SHA1 - -/* Define this to enable SHA256 and SHA512 support. */ -#undef USE_SHA2 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define this to enable server TCP Fast Open. */ -#undef USE_TCP_FASTOPEN - -/* Whether the windows socket API is used */ -#undef USE_WINSOCK - -/* the version of the windows API enabled */ -#undef WINVER *** 502 LINES SKIPPED *** From nobody Wed Oct 4 01:44:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0ctS3B0kz4wMw8; Wed, 4 Oct 2023 01:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0ctS2MTTz4cqW; Wed, 4 Oct 2023 01:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696383856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AevzWiONsOLrj+rkJtTnkOUWNw5rJ2WTAJh/ZW3FxU=; b=EdXWXuCcb3H+9GHfI3ufBDv7QGL+QToVeDzbnG7Jyhe6b98OgmvrE0qCLJFZDUUytP66TV SFebOEOv6cHHbTyBsmrrwHfiNYSdzRhiEWiNE9tzEWZicMR6agNownHStKEuDngX5T1i6g K50sHFaEphA+Og71rm0bdPxJk8LLGTgvqbYRVAq9tmekT67Gbd2iPJxelkoq7DaW6KFL+h V37uqYXnnWmD2NqG3Ow7zahCL/HJcEJttEpm6gC9HZ8vosX33y1VaNziaP22K/nU3Ny7FK x4FwBjYmprOs0vs8InscXhabq5WKWZUIE9+mODHgsaEPg+lwdFofcG7YEhUwbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696383856; a=rsa-sha256; cv=none; b=ZpuyNIZ+MD0hX+ShrFmwCxmHdZXKpgCLML8XBlXjtLxA+gNqRiBcEpGaLbzAhOD4wk3IgH tBwtC9dm8QoqF96MachHMhSoeIk3kKx8LJDX1mIOXvM+KzIXArk+b7xQUceYXfeeO7gwd9 ZtALbUChUJhzTt7uNo76onJ+5jt7Kbo4xqVormuSv+7iCQ6m7gH+fBb8dJZasWwEo1jTyx 4/r6juWqqL1+IP8ad364GBqwROqT/2XwAP/pd8Gc39z4Pixw925Viw6QSUctLTwHtXUZdt XqtNLfV4z0nZ4vUhO1nD54vnhVe5aFkPfXwg2FJ/PuOm31F/kg0O4G7N9kjrvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696383856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AevzWiONsOLrj+rkJtTnkOUWNw5rJ2WTAJh/ZW3FxU=; b=ON9Zo8f2PT/bo+MUkmgOf7F+TL2hefgZrIPOwW2CC+mzSN4JbFQA8P8QEl/C55KOeZkhe/ B/JPCbN+epKuuPEsBDKAQl6xfYbGWkYpfWEaqpgbOFJ4UcU7hj1dsfkFcFNCNNhb7s8xQC E+sXdPlyaoGdYM5a8gym2QD29F7rF9A2Lbxv/xfMZTTKpEASX4o0InAyyBQY+8AoFY8MGS d1aoYe2UwOeUhZdJC/AIKkniPgO/iDUZX8MdKd3ZGdzC745cGrVe6F9qnaOl+z0p00jMKA Mfy/UTq4UTJbQd12uQJORth6UTlJV4KHr/0cZY08TeetFdQZkfLFltTtJnKFfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0ctS1R1Pz40s; Wed, 4 Oct 2023 01:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3941iGSo020570; Wed, 4 Oct 2023 01:44:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3941iGcU020567; Wed, 4 Oct 2023 01:44:16 GMT (envelope-from git) Date: Wed, 4 Oct 2023 01:44:16 GMT Message-Id: <202310040144.3941iGcU020567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 05a0e28167d5 - stable/13 - xhci: Add support for 64-bit DMA in generic XHCI controller driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05a0e28167d5ab68762ad0a56d6dc9af4ed48d55 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=05a0e28167d5ab68762ad0a56d6dc9af4ed48d55 commit 05a0e28167d5ab68762ad0a56d6dc9af4ed48d55 Author: Stephen J. Kiernan AuthorDate: 2023-08-11 16:06:02 +0000 Commit: Kyle Evans CommitDate: 2023-10-04 01:42:34 +0000 xhci: Add support for 64-bit DMA in generic XHCI controller driver The XHCI controller on 64-bit SoCs need to use 64-bit DMA. Add a quirk to tell the generic XHCI driver that 32-bit DMA needs to be used, if there are any that may need to use 32-bit DMA only. PR: 274237 Reviewed by: andrew Obtained from: Juniper Networks, Inc. (cherry picked from commit 332af8c25dfc9857e997817281d7b7fa406783ef) --- sys/dev/usb/controller/generic_xhci.c | 9 ++++++++- sys/dev/usb/controller/generic_xhci_fdt.c | 20 +++++++++++++++----- sys/dev/usb/controller/xhci.h | 1 + 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/controller/generic_xhci.c b/sys/dev/usb/controller/generic_xhci.c index e0caf8f42af5..e89d1bc84497 100644 --- a/sys/dev/usb/controller/generic_xhci.c +++ b/sys/dev/usb/controller/generic_xhci.c @@ -61,7 +61,13 @@ #include "generic_xhci.h" +#if __SIZEOF_LONG__ == 8 +#define IS_DMA_32B 0 +#elif __SIZEOF_LONG__ == 4 #define IS_DMA_32B 1 +#else +#error unsupported long size +#endif int generic_xhci_attach(device_t dev) @@ -114,7 +120,8 @@ generic_xhci_attach(device_t dev) return (err); } - err = xhci_init(sc, dev, IS_DMA_32B); + err = xhci_init(sc, dev, + (sc->sc_quirks & XHCI_QUIRK_DMA_32B) == 0 ? IS_DMA_32B : 1); if (err != 0) { device_printf(dev, "Failed to init XHCI, with error %d\n", err); generic_xhci_detach(dev); diff --git a/sys/dev/usb/controller/generic_xhci_fdt.c b/sys/dev/usb/controller/generic_xhci_fdt.c index 8af9591a86b4..c850d2fb1314 100644 --- a/sys/dev/usb/controller/generic_xhci_fdt.c +++ b/sys/dev/usb/controller/generic_xhci_fdt.c @@ -55,12 +55,16 @@ #include "generic_xhci.h" +/* Flags for the OFW compat data table */ +#define XHCI_FDT_MATCH 0x01 +#define XHCI_FDT_32BIT_DMA 0x02 /* Controller needs 32-bit DMA */ + static struct ofw_compat_data compat_data[] = { - {"marvell,armada-380-xhci", true}, - {"marvell,armada3700-xhci", true}, - {"marvell,armada-8k-xhci", true}, - {"generic-xhci", true}, - {NULL, false} + {"marvell,armada-380-xhci", XHCI_FDT_MATCH}, + {"marvell,armada3700-xhci", XHCI_FDT_MATCH}, + {"marvell,armada-8k-xhci", XHCI_FDT_MATCH}, + {"generic-xhci", XHCI_FDT_MATCH}, + {NULL, 0} }; static int @@ -81,14 +85,20 @@ generic_xhci_fdt_probe(device_t dev) static int generic_xhci_fdt_attach(device_t dev) { + struct xhci_softc *sc = device_get_softc(dev); phandle_t node; phy_t phy; + int flags; node = ofw_bus_get_node(dev); if (phy_get_by_ofw_property(dev, node, "usb-phy", &phy) == 0) if (phy_enable(phy) != 0) device_printf(dev, "Cannot enable phy\n"); + flags = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + if ((flags & XHCI_FDT_32BIT_DMA) != 0) + sc->sc_quirks |= XHCI_QUIRK_DMA_32B; + return (generic_xhci_attach(dev)); } diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index 0be0d185a869..3758815238ad 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -488,6 +488,7 @@ typedef int (xhci_port_route_t)(device_t, uint32_t, uint32_t); enum xhci_quirks { XHCI_QUIRK_DISABLE_PORT_PED = 0x00000001, + XHCI_QUIRK_DMA_32B = 0x00000002, }; struct xhci_softc { From nobody Wed Oct 4 03:38:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0gQd1gb9z4wXl4; Wed, 4 Oct 2023 03:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0gQd18ljz3K1N; Wed, 4 Oct 2023 03:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696390729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF+8AURP7+ygXK1zMYN6F3YATjvj7aKfucCghI1UWFE=; b=UBcTiGYpMZyViPTTum2JkYNajbhuoqsiGOhckKzgOgYlVzFO7PRgryIl6CnHNBpkSvpPbW BEuiQ7Jz5e8Yxz9LuliCXXdXvUAu4MFtSWTCWIMjFTBwbSO7eYaA2kZLzAnRkmRghe8KxB nMj1dH9h9G6o5x7l695bygNjNuJIJigZ5rXq98sx8LBqLc/339LrqhTIASAtZckrGJRYo4 vNA8SiIpn+w7ZV/pqHcmznvrvXnvubFZKyA0d9N7dDvyS0lnKXeSwuqr2Nu9levYTtexUj RvZzAtiuHIOwtOYqQpo5jfZRHFLs6YQ424XScy4EFFhdsYTiHoZbGZaCr2nwaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696390729; a=rsa-sha256; cv=none; b=aIGIQ03wRKGEL16nucFz3ZOnVa4zMNviEKZWK2453VRGDIj+yfq0+qfIrr5Q32qpJFhH0m 3bW/dcXged+fyHy+rdk7L+B/hoDDV54+G6wmJ2nkTwm454q7xQqbRqDnpH6Fbs9ovwZPAV wUlNDfO8YlhJRrFldCtnQZ5P1xLwdt1RdPHSVh9w8dus2SAjRo8MufbOE5o5pWXmD2Myop CjIltf+20M1TrOvLMWeTeVA+ACzrriZJgZohInVeEBKo9CWUcS5VvcdN6fs51kyTFsXrZ9 9R3JLUeOVsVUR27M3IqtGcgGozQJ9BlNP2+F9ZcWF6tGgsbS/wsro9R0fiDQWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696390729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF+8AURP7+ygXK1zMYN6F3YATjvj7aKfucCghI1UWFE=; b=R6GuI1jbk73oaEDWxKxlR2y32wVSK+8FGRR+UPdlT6iK0Ae9P5hyXAIG2IuuWajE766v6d ykH14ouTDy0dy+cGF/LdfRydhV+Mak3BFq6fAPG1oAykz+sAnyuHO1G0tJ8k9s36sjH5Qh b21665iguhbLLPTIUoLjMtObnNRTY771mZqIRwOsTXNoZtxfX0eNlExXO71X95R6LfzbCn M4I+tRzpXXtW5vqix8rmaR35r5p1vgBW9jph4C9BSzQgWYn+0OAx0kI7fwGdH7j9GrPVAo jF593+8quxiiZBVDCIwYckiforkTpeQj5b1KRkKeLK2lkB3PHy1mKNrV5snpbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0gQc6v1zz74Q; Wed, 4 Oct 2023 03:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3943cmZO005729; Wed, 4 Oct 2023 03:38:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3943cmZ8005726; Wed, 4 Oct 2023 03:38:48 GMT (envelope-from git) Date: Wed, 4 Oct 2023 03:38:48 GMT Message-Id: <202310040338.3943cmZ8005726@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: a2c359c0f771 - stable/13 - gve: Make LRO work for jumbo packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2c359c0f7715507f6a49a911becbd50a8521b9a Auto-Submitted: auto-generated The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c359c0f7715507f6a49a911becbd50a8521b9a commit a2c359c0f7715507f6a49a911becbd50a8521b9a Author: Shailend Chand AuthorDate: 2023-09-07 13:28:26 +0000 Commit: Xin LI CommitDate: 2023-10-04 03:38:44 +0000 gve: Make LRO work for jumbo packets Each Rx descriptor points to a packet buffer of size 2K, which means that MTUs greater than 2K see multi-descriptor packets. The TCP-hood of such packets was being incorrectly determined by looking for a flag on the last descriptor instead of the first descriptor. Also fixed and progressed the version number. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41754 (cherry picked from commit 5f62584a9adb7887bae33af617cfa4f43017abf8) --- sys/dev/gve/gve.h | 1 + sys/dev/gve/gve_main.c | 8 ++++---- sys/dev/gve/gve_rx.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 61781cddee94..c446199dff2d 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -164,6 +164,7 @@ struct gve_rx_ctx { struct mbuf *mbuf_tail; uint32_t total_size; uint8_t frag_cnt; + bool is_tcp; bool drop_pkt; }; diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index c3ee6d5c3433..cd7849778bce 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -31,10 +31,10 @@ #include "gve.h" #include "gve_adminq.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.0.0\n" -#define GVE_VERSION_MAJOR 0 -#define GVE_VERSION_MINOR 9 -#define GVE_VERSION_SUB 0 +#define GVE_DRIVER_VERSION "GVE-FBSD-1.0.1\n" +#define GVE_VERSION_MAJOR 1 +#define GVE_VERSION_MINOR 0 +#define GVE_VERSION_SUB 1 #define GVE_DEFAULT_RX_COPYBREAK 256 diff --git a/sys/dev/gve/gve_rx.c b/sys/dev/gve/gve_rx.c index f5d8fd7a7b75..9be96cf1ee3a 100644 --- a/sys/dev/gve/gve_rx.c +++ b/sys/dev/gve/gve_rx.c @@ -546,6 +546,7 @@ gve_rx(struct gve_priv *priv, struct gve_rx_ring *rx, struct gve_rx_desc *desc, if (is_first_frag) { mbuf->m_pkthdr.rcvif = priv->ifp; + ctx->is_tcp = desc->flags_seq & GVE_RXF_TCP; if (gve_needs_rss(desc->flags_seq)) { gve_set_rss_type(desc->flags_seq, mbuf); @@ -567,7 +568,7 @@ gve_rx(struct gve_priv *priv, struct gve_rx_ring *rx, struct gve_rx_desc *desc, do_if_input = true; if (((if_getcapenable(priv->ifp) & IFCAP_LRO) != 0) && /* LRO is enabled */ - (desc->flags_seq & GVE_RXF_TCP) && /* pkt is a TCP pkt */ + (ctx->is_tcp) && /* pkt is a TCP pkt */ ((mbuf->m_pkthdr.csum_flags & CSUM_DATA_VALID) != 0) && /* NIC verified csum */ (rx->lro.lro_cnt != 0) && /* LRO resources exist */ (tcp_lro_rx(&rx->lro, mbuf, 0) == 0)) From nobody Wed Oct 4 09:35:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0qKp4Hy7z4vYVG; Wed, 4 Oct 2023 09:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0qKp3pWKz4N8r; Wed, 4 Oct 2023 09:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696412110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3kqE9X1D2mpOn2YGuXaCUrgfPqjhmYqKU+ngT1gc9k=; b=EaW7TKyQ/28fQSmLHzWhRu9JAW2Vo3mvaR7KVT5aB9PwiGCASAwMYHkC+dXl/0J1iKrto+ K9d1YAQnwhqYTQWE/YdKLs3SSsXkAlSZGOus84GGFJbkbYbnN3W9q1Lq6UuFth76pW0TJe ZQHXDC+Xy70+RSGC6U9qUE2aUjvXxbYarvS8dU9wP1o5Ht5onukyUfW6ZppDkNAkR7bA5g M2nWRN/pMKaxX92YFWbbrKhJDGrgZuN5PcQ+rXZ8suj91OiH6EKYAxpRbWbghDirie5gsH Dh2k5IOsrrrxIDvUNxRRP6dqh/LVFubyEs7ohl2sIyiSHx9pYh/0Tr2PEwYZ9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696412110; a=rsa-sha256; cv=none; b=iebrk/xBiGoREIJJrC17DJNR/kwApWn2wjPO26EVIlwHIRdNdrqNjBPUlOYDoF0FJdiHXd FNkWb7hK0sVjwi1DFUAFwopGd4kMCfwieQLeD/vNFeioSErnNTzTAm6FZRQ4sZjad9Xe/H NDKdU5wQPRMASh2XbmM2aNVeqdNM+z7wScLxX84u//vaDYnfqDkX5x3oBn0pu3kyeg74/+ s7aOUyVPNkyMUu+Cnw68HPPsuvoUaS6MgjSRfjLVODtM21XJ4D9OPEdXsSgzvg76c3ork2 AU/3tdl2IV8KFWaHPSA5LxoBIRG17Lz53mR5rIJl0F9akr550KpDeJx8BsgFlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696412110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3kqE9X1D2mpOn2YGuXaCUrgfPqjhmYqKU+ngT1gc9k=; b=fV1NrYhAyZ219zm3l5slqkwPz10kNjq5tqjmhXgHqhhpG1xiEKkNMde7IQ0nvVLpWYlRdC tGfZE7VQNvuShNORfiCh2+7AmCv9SqljJGQ+s6EqRS16PCRVUYMKUzCb3N7lHBKFvSJenl lxEQf8/qqMhV1qNtkmHQKfvweMzYJ45HHq/+IyByJe5lz0kMCU8X64FTnASdaPJwXN3yG/ 7dH//DGb3Fo7zqK/Mo32toUgbiX2go5qalNY2uRFST9gHAJz4uLhxHSezvvPA3E6uRSfij SQusjkw5Xs5cH6wqvyvztdyGxZ7Vu8hWPci6sNVS9890Uuoz0JF2q4kFTNEAjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0qKp2tfnzXfk; Wed, 4 Oct 2023 09:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3949ZAbT001274; Wed, 4 Oct 2023 09:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3949ZAlD001271; Wed, 4 Oct 2023 09:35:10 GMT (envelope-from git) Date: Wed, 4 Oct 2023 09:35:10 GMT Message-Id: <202310040935.3949ZAlD001271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 74c2461386ea - main - pf: cope with missing rpool.cur List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74c2461386ea5eeb41e674df6b16a44b0509a882 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=74c2461386ea5eeb41e674df6b16a44b0509a882 commit 74c2461386ea5eeb41e674df6b16a44b0509a882 Author: Kristof Provost AuthorDate: 2023-10-03 15:11:44 +0000 Commit: Kristof Provost CommitDate: 2023-10-04 08:16:03 +0000 pf: cope with missing rpool.cur If we're evaluating a pfsync'd state (and have different rules on both ends) our state may point to the default rule, which does not have rpool.cur set. As a result we can end up dereferencing a NULL pointer. Explicitly check for this when we try to re-construct the route-to interface. Also add a test case which can trigger this issue. MFC after: 3 days See also: https://redmine.pfsense.org/issues/14804 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 9 ++-- tests/sys/netpfil/pf/pfsync.sh | 96 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3e1c8d32add9..fae0bd2854f9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6978,7 +6978,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -7035,9 +7035,10 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, s->rt_addr.v4.s_addr; ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) { ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; + } PF_STATE_UNLOCK(s); } @@ -7191,7 +7192,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -7249,7 +7250,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, &s->rt_addr, AF_INET6); ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; } diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 80b81205b59d..5d30f5b44888 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -826,6 +826,101 @@ basic_ipv6_cleanup() pfsynct_cleanup } +atf_test_case "route_to" "cleanup" +route_to_head() +{ + atf_set descr 'Test route-to with default rule' + atf_set require.user root + atf_set require.progs scapy +} + +route_to_body() +{ + pfsynct_init + + epair_sync=$(vnet_mkepair) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + epair_out_one=$(vnet_mkepair) + epair_out_two=$(vnet_mkepair) + + vnet_mkjail one ${epair_one}a ${epair_sync}a ${epair_out_one}a + vnet_mkjail two ${epair_two}a ${epair_sync}b ${epair_out_two}a + + # pfsync interface + jexec one ifconfig ${epair_sync}a 192.0.2.1/24 up + jexec one ifconfig ${epair_one}a 198.51.100.1/24 up + jexec one ifconfig ${epair_out_one}a 203.0.113.1/24 up + jexec one ifconfig ${epair_out_one}a name outif + jexec one sysctl net.inet.ip.forwarding=1 + jexec one arp -s 203.0.113.254 00:01:02:03:04:05 + jexec one ifconfig pfsync0 \ + syncdev ${epair_sync}a \ + maxupd 1 \ + up + + jexec two ifconfig ${epair_sync}b 192.0.2.2/24 up + jexec two ifconfig ${epair_two}a 198.51.100.2/24 up + jexec two ifconfig ${epair_out_two}a 203.0.113.2/24 up + #jexec two ifconfig ${epair_out_two}a name outif + jexec two sysctl net.inet.ip.forwarding=1 + jexec two arp -s 203.0.113.254 00:01:02:03:04:05 + jexec two ifconfig pfsync0 \ + syncdev ${epair_sync}b \ + maxupd 1 \ + up + + # Enable pf! + jexec one pfctl -e + pft_set_rules one \ + "set skip on ${epair_sync}a" \ + "pass out route-to (outif 203.0.113.254)" + jexec two pfctl -e + + # Make sure we have different rulesets so the synced state is associated with + # V_pf_default_rule + pft_set_rules two \ + "set skip on ${epair_sync}b" \ + "pass out route-to (outif 203.0.113.254)" \ + "pass out proto tcp" + + ifconfig ${epair_one}b 198.51.100.254/24 up + ifconfig ${epair_two}b 198.51.100.253/24 up + route add -net 203.0.113.0/24 198.51.100.1 + ifconfig ${epair_two}b up + ifconfig ${epair_out_one}b up + ifconfig ${epair_out_two}b up + + atf_check -s exit:0 env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_one}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_one}b + + # Allow time for sync + ifconfig ${epair_one}b inet 198.51.100.254 -alias + route del -net 203.0.113.0/24 198.51.100.1 + route add -net 203.0.113.0/24 198.51.100.2 + + sleep 2 + + # Now try to trigger the state on the other pfsync member + env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_two}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_two}b + + true +} + +route_to_cleanup() +{ + pfsynct_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -838,4 +933,5 @@ atf_init_test_cases() atf_add_test_case "timeout" atf_add_test_case "basic_ipv6_unicast" atf_add_test_case "basic_ipv6" + atf_add_test_case "route_to" } From nobody Wed Oct 4 10:19:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0rJk6sYVz4vdF3; Wed, 4 Oct 2023 10:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0rJk6NdNz4T6F; Wed, 4 Oct 2023 10:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696414758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v8jy7vbGaE3w+rhldBLj8eXQMmSQWSo67HCzqU3PB6g=; b=hzpGwsVH4+3i9IgAIxWFxFRqsF7C5DOiWHC2KXPGlcu+tnTt/D7b7jXzTJIaYIR4QwfmzN cyskZKbUEf+JKsslA80leaTVZ73o8MTrvjXOb5Uck95v++dWxF3GnRT1SAhyn9y9TrWS20 KomDxy8ZgAFcLEGWIz3hrr8Srsup3akRtgovInI4MG8SCZCwytcSrX5eS5n24c+cQQPfEX VHH8bh0eDLsn3ulRbZgm0awh1URcjg4/fQaiU9oBmbiwLrrkQPIxcmYDw5ahFrBl7vy+Qb Hh9dk8cuLKK9MLKfTccfwvJxv6gwuuP7k3u7N6KauPKqASutTXABLSjYyzf0Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696414758; a=rsa-sha256; cv=none; b=RXTp3QhiQrtDrz8LKAfjc0yAJ6mTgQSQe65dxCv/yWvJE3zqwa6UwAtjLqprreZKjMfCzZ EttLAZs4IzLF8ZIdegaP6nBV+1EIfaysmlIdldufmNNv+NNYUfhe+cbuYTALSLAuKAhOBx gTLJ7vMRuo+R+XRODtFMarKyNEss3KqV9Vz01D0vFguHCT3Do7vlE01+nj9MlyYPDJszTI n/kVrEl6bbcf91VrbmkMtuNaKLmcCn4vEonPCMDoVhiN62eHvl2287TdD1TJQuBt9NWU8a QAXwshFq4yl41MH1sKfRqjZryOmTmQEraa8gKX0lByafX2xrf03izblcV6wDtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696414758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v8jy7vbGaE3w+rhldBLj8eXQMmSQWSo67HCzqU3PB6g=; b=VjPV4B5UobFAr7nIvvqH99NxMp3dArhuUQhnaq75YKrgPiMHIbJnUpNQFlEdH4sCjYeHMe 3Xj71GW6V9PiVVlaq4W3RIXKrRjf95HbGd1MzqywSFj/FTJEXr+pxRM+TN+kT7x0kvpi+w 8aG2rqg6pw+tlkQHFKeP7TV9cut0vbgMpd7V6XEnC2O5vUnrdllPRil9knmCEef3LFcm1I 091kWDjJnXba4gUCHcEjokCu00buXxbSw45DIPSCVxCdmPwdGjmPQTuekEPLx/s+mM4aJd /PyjaYS8/te50ylhx5DSClqLWKuMeIbPamlTMyMu4xU6XN9NU2mVAZVT2UEj+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0rJk5RqszYPD; Wed, 4 Oct 2023 10:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394AJI6s069309; Wed, 4 Oct 2023 10:19:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394AJI3C069306; Wed, 4 Oct 2023 10:19:18 GMT (envelope-from git) Date: Wed, 4 Oct 2023 10:19:18 GMT Message-Id: <202310041019.394AJI3C069306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f06c92854474 - main - LinuxKPI: remove dummy headers with implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f06c928544747326c04f84c582bcd5fda0d7bb91 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f06c928544747326c04f84c582bcd5fda0d7bb91 commit f06c928544747326c04f84c582bcd5fda0d7bb91 Author: Bjoern A. Zeeb AuthorDate: 2023-10-04 10:17:21 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 10:17:21 +0000 LinuxKPI: remove dummy headers with implementations Both agp_backend.h and utsname.h have an implementation in common/ these days so the dummy headers are no longer needed. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/dummy/include/linux/agp_backend.h | 0 sys/compat/linuxkpi/dummy/include/linux/utsname.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/agp_backend.h b/sys/compat/linuxkpi/dummy/include/linux/agp_backend.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/compat/linuxkpi/dummy/include/linux/utsname.h b/sys/compat/linuxkpi/dummy/include/linux/utsname.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Wed Oct 4 11:23:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0skz1L2qz4vkYt; Wed, 4 Oct 2023 11:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0skz0qPXz4bFc; Wed, 4 Oct 2023 11:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pi3+aoL3T2v0wd4sSDFFsUsuC/PWaRha+bJPNepM7zY=; b=PDzth4hGHRSuIEbgbarDnZaQKysMt/mrExgPZFvKlyhbd10TeFvxFLLC4yx/yTCC83XzgP F7XDzcddbhp+IqcQ5bVL8RNMUcQMvy3qI2AOQ/XUElvwPEpWPAhIHpV1lDqEPnl/GLv5BZ 9b1x0iVoaMsPacY11MzQADIVd2lVpE1HV+dkfOCdDEypgLoCw2GDGYxfoC6hDuAjB2SvoI aD47pKars3uNljekQVG5uu/AZudq9o/V41Fk08p5fMUufMb6Iuu/RVwOqr7h/aXvfzvZTe HNKtPCKzx4aRwgVfioV4Qwhh4EFXztpA87ey8GnmxSSaSMpFZAs2RJpt9ypgww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418619; a=rsa-sha256; cv=none; b=EtGMCKTgAsmSyLu1L6P7UI6+MDNSylCcuUyBRSt5AxojaWV7lLroARg0NEzTF4vXAJmgU1 ORxYO/U7Ghdw23AUA1BQpvhJc4JDjif/Eq3ORVorjwUV+gGZs4bR+tAN+S41kNwlmHKZ4E tqEfkHWNLeQqPpXnZ/8ChS5G6W7FPsTomGVHjwuxXo0LroT4rgaQU2Z56FNJl7mEkT/aSw NPhwkR1vC8opsOZ9JhH8vCO+tfPxGVfBe6pdmga/0QMkQu2RxCoJt9GEh+QCuLHmQtcxDf v7wozrjlYCykkHhhGyZ47MbrQ428md09x0SNAoI2RnHlYdXc5hXq3I7YLo4SeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pi3+aoL3T2v0wd4sSDFFsUsuC/PWaRha+bJPNepM7zY=; b=ygjTUGAUjnbvdRIlSFSI/YSplqMAcO0a7pq13lXZ6892q6WWv2ccaMMLg2zZlbEgwKplf1 98NqUvQ830gApI0Trd0XPl4M9g1RxFoj/yl6CoxVr0gMjcIITvk+2aplQY+uMib1Jh9jyg xBVxporMoCwWftOpG3teBqXvEMg6ycr5CFD9GpaBEZuPqh7TUO35oAYxZV7zLQhOwjLuej wfi9EoxHOZKYn3X4k8lh9oH7pH7GTMdOoKNeuBJob77/DyfG1ncTnOH3g43rlVIKZHouzW mFUFfPYuVvaTIS4OzZU3NKQi2wJJOO4SAJC3QJpjF7mdSs1ZfOR5bmWUYr9srQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sky6zXxzbK5; Wed, 4 Oct 2023 11:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNcRO084464; Wed, 4 Oct 2023 11:23:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNcW7084461; Wed, 4 Oct 2023 11:23:38 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:38 GMT Message-Id: <202310041123.394BNcW7084461@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: b0e0774daccc - stable/13 - dtrace_proc.4: Fix the description of pr_sname List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b0e0774dacccf52992a862c78fee09f2f30bbe29 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e0774dacccf52992a862c78fee09f2f30bbe29 commit b0e0774dacccf52992a862c78fee09f2f30bbe29 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-03-03 10:14:41 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 10:48:20 +0000 dtrace_proc.4: Fix the description of pr_sname MFC after: 2 weeks Sponsored by: Klara Inc. Sponsored by: ELW – Entsorgungsbetriebe der Landeshauptstadt Wiesbaden (cherry picked from commit 0ea0a371d2e0f821e4bd7e1c90c772781d80975e) --- share/man/man4/dtrace_proc.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/dtrace_proc.4 b/share/man/man4/dtrace_proc.4 index 355ba63af1bd..5e217eb0e205 100644 --- a/share/man/man4/dtrace_proc.4 +++ b/share/man/man4/dtrace_proc.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2016 +.Dd March 3, 2023 .Dt DTRACE_PROC 4 .Os .Sh NAME @@ -186,7 +186,7 @@ Real scheduling priority of the thread. Currently always 0. .It Vt char pr_sname Currently always -.Ql ? . +.Ql \&? . .It Vt short pr_syscall Currently always 0. .It Vt uintptr_t pr_addr From nobody Wed Oct 4 11:23:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl02YNNz4vkhP; Wed, 4 Oct 2023 11:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl01rGBz4bJJ; Wed, 4 Oct 2023 11:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shuaA6w/RJmKnp+b3Ve6tvxqs+MR6N4wiMVrYPiLJWw=; b=YssHH7l63mn2dSHk3M5rbocCWQhdfJelgYMp8oPbWZfL89DiJ/FdOdpIEpCj1M6UQo3Eez FKJMSHXUaHr3LdzlISGn3G55mvftdH5JBAL7+8lyEoG868q2cMmjF6vdc6MugyXNqDcxLS 2hUX9UWXKWX4sibVXmPwUulCYOrgfTO1R0Cwwo/FFRruQcZc4uQxcjLJ8Q8yQkxf/Uiobc JCcE5cnarCI3YjU4SbjZQuIBRML0QN/UL1k7kt2fgGdfsvNKI3U7WAfL0TxkMxmeAOcATP 9KtLBciJvqWxGCbbET1ZkUxez7SH3OEDcFflbfseLVtUG0wxcq7Au8HcLBKIXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418620; a=rsa-sha256; cv=none; b=N1KWbKM5vJqlfOEI83AguQxAgOysqwk1qiDrlAZoT9cv/w34Vz4BCbphZoTkxwaQhW7V4d uH0UCJLufVXKYpcX7COWWnU9t5ChjGVljRN3eRc1bcyywvaSg+K6mvppy3GPgAkw1YpsJ8 MtzkGGb2o4yqRX+2W8vDUbYnDKDpSDmOa4hGIn/fk4wlU4btSx7uxzrEe7o3zdACSFh4Ql nTZmah9RQqvaAcOQHz62LLWhNWt4cFFoBIZv4n0Y1cT4AVVrBMX0hxCHAe+XlNcLqeFwDq NkR01iUpQIR4TD1heeTCQ0AVF2OQbnf75gKRO7+PbvoKY0VaMqfLmI4MAif8YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shuaA6w/RJmKnp+b3Ve6tvxqs+MR6N4wiMVrYPiLJWw=; b=K79eL1C6IL95UUPsmT+C1viqFnWZgdLj66uyDcNLFyfrbHx/rVUixSJaQU87WYBD/ODBPp i/46nEggNWQGgNnTPsHEhA5Y3B1c+2NbOOM5rDR8f/5tL9sA9oabdVwUaqJ2O2xoR86JpG dQCvp0le1eOgQuEHEa310NFO7buG7C08Rxsl5l9Bf4Su1Zr+zdoyiCVcx4I5vP6jX1Mf0s GyBG8ZS6ZucWmJGIY9DU5e2hk5GZwBKVAMbpgAREp0mMrs/rDsS7vqxbnHbLju5WvbWWWA W/UN3c/ajyq6hR+Y0JkKeM56CXBd2sffYN1Nnby8szwLwmNAfbiE5xouIYjm8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl00vTJzbdW; Wed, 4 Oct 2023 11:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNe7K084525; Wed, 4 Oct 2023 11:23:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNePj084522; Wed, 4 Oct 2023 11:23:40 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:40 GMT Message-Id: <202310041123.394BNePj084522@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: 65b22ee09319 - stable/13 - date.1: Examples: Use syntax that is also compatible with csh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 65b22ee0931970896f1189e9f620d9895f9d4070 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=65b22ee0931970896f1189e9f620d9895f9d4070 commit 65b22ee0931970896f1189e9f620d9895f9d4070 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-02-27 16:34:00 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 10:51:32 +0000 date.1: Examples: Use syntax that is also compatible with csh MFC after: 1 month Sponsored by: Klara Inc. (cherry picked from commit de7a6b6fd04ee686364883a817a4b707e3567d27) --- bin/date/date.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/date/date.1 b/bin/date/date.1 index 850e37bba0ac..39a314214da6 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -31,7 +31,7 @@ .\" .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" -.Dd May 31, 2022 +.Dd February 27, 2023 .Dt DATE 1 .Os .Sh NAME @@ -453,7 +453,7 @@ will display .Pp Finally the command: .Pp -.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`LC_ALL=C date`"" ""+%s""" +.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`env LC_ALL=C date`"" ""+%s""" .Pp can be used to parse the output from .Nm From nobody Wed Oct 4 11:23:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl14tbRz4vkfC; Wed, 4 Oct 2023 11:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl13JcPz4bc3; Wed, 4 Oct 2023 11:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ERQJrJfWPkVRBnNtanC6bccir6xO5cmKgclZoDscFA=; b=XSMb5rmTPhSEXGuDX+0JAv4wbnA1drxPtPy9DKuTwmaU/+4o7FRNrpVfEUV83yOrGQGSGa GKnGYE05DqRuDNKteVctaOCohfDsG3gLVx3OV6EIY4CjnVqtVhuVo067G9h54QvWAJ0g2M U9TMHjmiaxbh7dVFfze3ReXOfRbLyFAFUN9V2nuh/ENm0JQWe+FCHFQ5jgtjIcZa/XrsmN jeKMk16/EFpQR/aKq086Sk7WkJMYobJ3mgrMNAWcLNtzKECzGpMjKQ18f3ik0//6abZ44v 0ANUpqF6Pg/TC0rD+IgydQtad50wZxuhisF5Cdh2ghstmKVgCdiICqfoSgngdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418621; a=rsa-sha256; cv=none; b=tnAcQWiXkdaXaLPwl8XE9ITm8GRxnDksZvOp3X6d8X0CP3xR1TjG9eaAq5FZwZXJUpLC+Z y+YzeEityDdQnGWjJlLMk+nMxKl6/ikRg39N7ec+THDF9Oex2w+vMKFxl46PMdN+RLnz39 9mXv/WKs9vOSMQNfC/wxX/c9thofNxdtlEeWRLNly3Un5Kp8BuElG65+U+UBLeSF7SJZiG tjpoWAro4zu5/f7gvGBMEroSPTkn9bA+0JMdn+d2/Yk1LwKTAN7eO5qHWmPqKNaUkjrgUk FhDGxd5sctIAZDSTQ5M5Zuu8WI1ius3CsYD0DzKD5xpIoMUvYpAVPmQBEBb5DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ERQJrJfWPkVRBnNtanC6bccir6xO5cmKgclZoDscFA=; b=c255+uxLHRBrnhifP5gIATpJoxo8HPtvoCkAs7rqH6aUu8QnDT6dnyMH+NRSAHv7xg2t49 3xG7ZdiGEnwJFjt6/ecz8mTgCEXTbL+P9guvJwC99tvPEFKoS0nP0RCz6ATZagZF7W0zxL 4M6AszCbLQvgrRYZ5JXyPz3V4JhkXEQ7M+ioK530eHdoH1wyphxn8j5dOTb/RokoEfPSac 8Ce8IL1v6uEA87fTJnOHjEn2f0xKQRe7fgpFWsHjbJ0tNrjth7Pi4X/UfMpIJGRenjNQW0 4ao5OsaOTNjBJHy4ENHP9shn+AANWrALQYZKOxiXv5paN2SQMsG6/Ne0dU8Rxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl11mBszbkb; Wed, 4 Oct 2023 11:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNfAB084582; Wed, 4 Oct 2023 11:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNfKF084579; Wed, 4 Oct 2023 11:23:41 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:41 GMT Message-Id: <202310041123.394BNfKF084579@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: f15d8ede5166 - stable/13 - powerd.8: Provide a whole path to power_profile for clarity List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f15d8ede5166e361c6e881f031b2aaa9f9042d8c Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f15d8ede5166e361c6e881f031b2aaa9f9042d8c commit f15d8ede5166e361c6e881f031b2aaa9f9042d8c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-02-25 16:28:49 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:10:42 +0000 powerd.8: Provide a whole path to power_profile for clarity MFC after: 3 weeks (cherry picked from commit 28111ddf9ee6d14eea6941a66168f2aeb361746d) --- usr.sbin/powerd/powerd.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/powerd/powerd.8 b/usr.sbin/powerd/powerd.8 index e9beef44e63a..43442a38b97f 100644 --- a/usr.sbin/powerd/powerd.8 +++ b/usr.sbin/powerd/powerd.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 6, 2021 +.Dd February 25, 2023 .Dt POWERD 8 .Os .Sh NAME @@ -168,7 +168,7 @@ utility should also power down idle disks and other components besides the CPU. If .Nm is used with -.Pa power_profile , +.Pa /etc/rc.d/power_profile , they may override each other. .Pp The From nobody Wed Oct 4 11:23:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl23znwz4vkVB; Wed, 4 Oct 2023 11:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl23VtKz4blx; Wed, 4 Oct 2023 11:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4K6juzbhnQrMr+cNGyPBRrMWKr50d6RuMzVJoPoFKgs=; b=WToZwS+aGG1Z6+Oy8gZrDT3oFchJhf/cz5ipQRLMZ+h9RMm9AuQxtsS9yvD4ISQNmcad+2 3zp0Vvn6NtR8AcQhPZuOuKyzDF3K8s5j3lnOWKH/HUWLPVcbaybO6OtGn/RB7TU0OFNene s1inuxqSXb7stKK6PC3PI3jzuBXFTXBd+QmdF3C1FlLQr3FF5oS1oyvbOAiGRoQIcmfUw8 MTE2vCiip9tW2Z+xfnFfPIXnx2hLOd9cDvqNYwJ56YNloiXavM8hrVwWKCZXh/dtwdbEXG IpMYwkpflU0YwVHOrP+5/Hv2uVXLlRHmIrkUAo054Hh7AUZsBP2mVLwG2Hz0Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418622; a=rsa-sha256; cv=none; b=cvJp/VF64qbUTeg40Gckf+fUQm1EWMCNnXpjy7f1i/Yg4f6+0gnOvQtDd5qfLkc11dASaH YTMXJQxTCwpLYf+EluCbd5WxbbGVAtA0uLTu6VjFwFiaLSm3wSWLo4/5E8R2BYvQOWxpWy CPMJoIu06JoCoyGOHW2O8wsWQZsi/eJVWKt7OYFDYaEJt/wdbSNeIWlbRR9favSZZZKgpF 9MAyS2qxatT9nOspImzAf5waQJ9455WI+Zh+a0G1YJQ9MrZj1rqjn7nIWExR+Vj2D3+ao9 rr0NJOYJW5TfRjitZ9hSpkE3lM7FNye2zYHsJUCC0qryTmHXcBaLmuKanQcR+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4K6juzbhnQrMr+cNGyPBRrMWKr50d6RuMzVJoPoFKgs=; b=NLDIJZFE7O1YeLFrY5Z9QTcKKCZXh+3/ZmdUtpN5egZTpD0QnzCFWATo5y+V9L8P4i5fBL FMCz+/xUEcVdvmQT8WtXnwnWe8fAtOP0RTon2RJTNNqEpYXZ1+UjWQslc2t9fTv3EF9vZw 3g7kKZ97FIwCBXZAK4rhHMWJPa3LfAz/HcDkKaQXDfCcx/AHORvx91oeNseTIHT8WpzkTF UWTUaq0YO40IJCxV9WsrocYQjeb0c7gjdqPiQlEqcjD6p8NOCntEjQBE07kuK/TuUx1Do0 Le8plDox15fl3aQLTDVyepuhDDxgeQ0fDf5vvFkWGZa75LZsYfNk5SrcOoQYog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl22X81zbjg; Wed, 4 Oct 2023 11:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNgt1084627; Wed, 4 Oct 2023 11:23:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNgKi084624; Wed, 4 Oct 2023 11:23:42 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:42 GMT Message-Id: <202310041123.394BNgKi084624@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: b10a23df1cc2 - stable/13 - ifconfig.8: Improve readability of vlanproto's description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b10a23df1cc231aa8ae2ae345b12823afa658979 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=b10a23df1cc231aa8ae2ae345b12823afa658979 commit b10a23df1cc231aa8ae2ae345b12823afa658979 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-08-19 16:17:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:11:05 +0000 ifconfig.8: Improve readability of vlanproto's description Sponsored by: Klara Inc. MFC after: 1 week (cherry picked from commit 197947e0a3b27b0eb455fdcd29def867efe582e6) --- sbin/ifconfig/ifconfig.8 | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index f4d49be0abb9..f280a263cb51 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd June 20, 2023 +.Dd February 1, 2023 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2887,17 +2887,15 @@ must both be set at the same time. .It Cm vlanproto Ar vlan_proto Set the VLAN encapsulation protocol to .Ar vlan_proto . -Supported encapsulation protocols are currently -.Dq 802.1Q -and -.Dq 802.1ad . -The default encapsulation protocol is -.Dq 802.1Q . -The -.Dq 802.1ad -protocol is also commonly known as -.Dq QinQ ; -either name can be used. +Supported encapsulation protocols are currently: +.Bl -tag +.It Cm 802.1Q +Default. +.It Cm 802.1ad +.It Cm QinQ +Same as +.Cm 802.1ad . +.El .It Cm vlanpcp Ar priority_code_point Priority code point .Pq Dv PCP From nobody Wed Oct 4 11:23:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl35KPwz4vk64; Wed, 4 Oct 2023 11:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl34kDzz4bXc; Wed, 4 Oct 2023 11:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3HMoOXocNzDDY3Ku4v4lgq/ebkjA2S7xt0RxT4Xfw+k=; b=WOPPsQNr6riau0fZgo02ZhsMJWQHHHbzq6umbJXb4Rk8OSrDNfaawdpn6lzMt8KrCQKUpX KMlAU4aBlbDAUrGEYa5CiPXBVp4BSb8KdD47B9t0yNPjFRArEqr+qJaTDHrHp5grKWlN4C NY/zrBJpwtk6zaU+TLzvJLCpXKWUcMglroBC+sPceMP9LgQjYabMaEojEKZHdIb6xwNTT4 M6QhRMvVVdSjKDGoZWMLSlT5Iwj7roi9ucndfBDanJdZoubtgAZo0v7MKrKqVkmqE4ce4O X40PVLSw1IiWAHBYKkvOCq8XkZ5nZ/o/xJb96I3Wv1LFQua+IYQ2+rdgV9k1kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418623; a=rsa-sha256; cv=none; b=W3foDNtpuNqle52+TkfKEye+3Fxy/x9YmDlenAX2Z/ri6iix4mwB5qdxLUCgYS6smUoVjl LUnujmN1UO2JYI7i9nOb2CVAFSgihM0WAF56TyN8bZPhmDLQH6HCh5TwcjxVbwkYhUytMU tJ+6qNPVXn3fd1I6/hhFir8UzlRstSBzDyZObIAIIePFVU56FYJPwLN4YVVAGBHJzxDFiD Lcg/FRCkCyn+NamYKHyAccjMSv5v50RAV4uTym1DNPJvUZ41gFMbEMJZEkFrmJdDSDNIH6 QXsZE8KCohBawNTw6ZU7cL1cHUb/egVdtHz5nYJNBkqDj8U2mDL/903JwUy5Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3HMoOXocNzDDY3Ku4v4lgq/ebkjA2S7xt0RxT4Xfw+k=; b=eLHbIVTRqeFTJa8NSHdk6M1RGsMqZueRNc9G4mrCOrtunZp+T+p5OeQ2ly/vLzBsuSVCKM BAb3n3FPrPXdEGvOytOow2gBY3islV8KTuIuGfd2HVmDJsvMb6M8swEOpNAYuN9j0FwP0G 6/czaQSDzYuWXVnmydyjmwy2e1zfP9LIFvmqnghMU5j48dhBtIe/O8NoNeE6sKsZJz9A7J hcTbhV2NGdZ154VbTkQVJe7vTQ1fvsLsXL8KVmyBFG5+btAetWDEdZ5T3koSoI9AftGeGo wIffB8nMxGDkdAmaJzU4fEzjsPue5UibGf6auZ3j40dNZmjNDFYrI9duWDCqwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl33n4Yzbjh; Wed, 4 Oct 2023 11:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNhhi084674; Wed, 4 Oct 2023 11:23:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNhSH084671; Wed, 4 Oct 2023 11:23:43 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:43 GMT Message-Id: <202310041123.394BNhSH084671@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: 6d5f98380ecf - stable/13 - exports.5: Clean up EXAMPLES and STANDARDS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6d5f98380ecf7544c50a156928219c684ac73205 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d5f98380ecf7544c50a156928219c684ac73205 commit 6d5f98380ecf7544c50a156928219c684ac73205 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-08-16 13:03:20 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:11:13 +0000 exports.5: Clean up EXAMPLES and STANDARDS There was a missing sentence in the description of the second mount entry in the example. Fix that and some other bits in the EXAMPLES section. Also, make the STANDARDS section a bit more readable. MFC after: 1 week Sponsored by: Klara Inc. (cherry picked from commit f9572577cf5f28d8e7592b4f1fb24c54e8e79783) --- usr.sbin/mountd/exports.5 | 48 ++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5 index 714e5e72b884..56facef29a12 100644 --- a/usr.sbin/mountd/exports.5 +++ b/usr.sbin/mountd/exports.5 @@ -27,7 +27,7 @@ .\" .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" -.Dd November 9, 2021 +.Dd August 16, 2022 .Dt EXPORTS 5 .Os .Sh NAME @@ -411,6 +411,13 @@ file. the default remote mount-point file .El .Sh EXAMPLES +Given that +.Pa /usr , /u , /a +and +.Pa /u2 +are +local file system mount points, let's consider the following example: +.Pp .Bd -literal -offset indent /usr /usr/local -maproot=0:10 friends /usr -maproot=daemon grumpy.cis.uoguelph.ca 131.104.48.16 @@ -427,27 +434,21 @@ V4: / -sec=krb5:krb5i:krb5p -network 131.104.48 -mask 255.255.255.0 V4: / -sec=sys:krb5:krb5i:krb5p grumpy.cis.uoguelph.ca .Ed .Pp -Given that -.Pa /usr , /u , /a -and -.Pa /u2 -are -local file system mount points, the above example specifies the following: -.Pp -The file system rooted at +The file systems rooted at .Pa /usr -is exported to hosts -.Em friends -where friends is specified in the netgroup file +and +.Pa /usr/local +are exported to hosts within the +.Dq friends +network group with users mapped to their remote credentials and root mapped to UID 0 and group 10. -It is exported read-write and the hosts in -.Dq friends -can mount either +They are exported read-write and the hosts in +.Dq friends . +.Pp +The file system rooted at .Pa /usr -or -.Pa /usr/local . -It is exported to +is exported to .Em 131.104.48.16 and .Em grumpy.cis.uoguelph.ca @@ -590,12 +591,21 @@ afterwards, whereas NFSv3 rejects the mount request. .Xr rpc.tlsservd 8 , .Xr showmount 8 .Sh STANDARDS -The implementation is based on the specification in +The implementation is based on the following documents: +.Bl -dash +.It .Rs .%T "Network File System Protocol Specification, Appendix A, RFC 1094" +.Re +.It +.Rs .%T "NFS: Network File System Version 3, Appendix I, RFC 1813" +.Re +.It +.Rs .%T "Towards Remote Procedure Call Encryption By Default, RFC nnnn" .Re +.El .Sh BUGS The export options are tied to the local mount points in the kernel and must be non-contradictory for any exported subdirectory of the local From nobody Wed Oct 4 11:23:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl45xzWz4vkZ2; Wed, 4 Oct 2023 11:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl45NjBz4brj; Wed, 4 Oct 2023 11:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9nAsIKFRdNinjquat/Bm6akci/B2WBNEMlKQBI7w/c=; b=YnPdnE1sB+rmClIm/IaFOWqy/DJoFTIxtmoEpWVb/B+S2s09XEg+S0OKHySqm7cw0oqSif 62ZBzajgrLobJsCXlw+ZDORUH9Ek5cUtr+6c1J3i2u3ow0VQB7PSIlldV9xyg2cZrnIqAh lTjZ2kO9D4eiWPHvutwceDFpDGEwXQhx3TQOqye+JXiuXmHlx0Rtv8pcxhIkv8Csu9NBCS hjsmt4Io4XXhjl4tkjSUi7xNFgVY14zqIvzWpayfBKFIKiJ3aKIbxgC2ugJXlfxRt1e2OG FLuU6TyYUxqYbR+OC3Lp2BfNKWke2wx2dT72bxv95g2Kf+Dw8ansT3Vltmuidg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418624; a=rsa-sha256; cv=none; b=UCPNl/pfsfMmMXtBIpJDfnpmsALra+nKMMcI0KGhj1sxEeE9V2PPEUb2dZLzvwvYUYFyvm zZ+MUy35scZrNxemEiOWEEzMSt5I7hldIP5Y6yRwwIuc2ECGmf9rdUhdAXLP+JmQipzCjq PMneLy9C1XbSaBYyA5x0RkZ3kw6ulV3ZK01l794Lnte+L5HxcayFLX0+C9jVkX3ia+YVo0 qJU8ycYMXqtEYWXsTE0mMKheRPJjxdDdc29goPoPTH+TS9q2x3bxL8Oa1NIa/oWPFy0nhZ /90G2MBCL4d+Oq+WsADAAg2rTr1+Nr1jb9c47t1otV6iV0wX56CMMptEtW6pBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w9nAsIKFRdNinjquat/Bm6akci/B2WBNEMlKQBI7w/c=; b=WFNBhfNxQAfFd4L3eLoxkT6Pg0m7HZoxmzcFG6kYhdvUztvgu66N2k9YyeWXoCj5ODCbbS 7o4i97Sji4NWul9BhAqvu8CVSQSHk9CIBJImzo4Qsjx4tY1fiM2q9uCBf7jgGOFYGVyvmE ysSC0THC2K3u3NUArUPTsGav8pZQrGPpxaAvrUS4mU5bkIUKZxVWYMhXreFZViareUojkj 8h+5mOUxCwViPE536ziHGkABp2MQ932LYGOFoY8DjwxxlT6BDG7SuGnZ9fq1HtlC+Pd7qb QFnVqUDfXhiSwIoyvCZ0MeK+2TDKghY+9vUzG5M4/5gHOfmrclbByM16C1fvOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl44VRPzbdX; Wed, 4 Oct 2023 11:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNicg084737; Wed, 4 Oct 2023 11:23:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNiRV084734; Wed, 4 Oct 2023 11:23:44 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:44 GMT Message-Id: <202310041123.394BNiRV084734@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: 220af70281c5 - stable/13 - rc: Start testing the rc(8) framework (beginning with *_oomprotect) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 220af70281c5c04610f6bf4ce904e269d1532992 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=220af70281c5c04610f6bf4ce904e269d1532992 commit 220af70281c5c04610f6bf4ce904e269d1532992 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-07 18:24:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:11:18 +0000 rc: Start testing the rc(8) framework (beginning with *_oomprotect) This change adds 2 tests to make sure that the *_oomprotect variable sets the protection against OOM killer properly within rc(8) scripts. This is also adding the first tests for the rc(8) framework. More tests will be added as we go. PR: 256148 Approved by: des MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35745 (cherry picked from commit e7437ae907c89bf85a99c5cbb7ddd194a1ff1354) --- etc/mtree/BSD.tests.dist | 2 + libexec/rc/Makefile | 3 ++ libexec/rc/tests/Makefile | 3 ++ libexec/rc/tests/rc_subr_test.sh | 103 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 39d1e7801619..46a305aec62d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -429,6 +429,8 @@ atf-sh .. .. + rc + .. rtld-elf .. tftpd diff --git a/libexec/rc/Makefile b/libexec/rc/Makefile index 9383ab124839..4f9d374c8f15 100644 --- a/libexec/rc/Makefile +++ b/libexec/rc/Makefile @@ -23,4 +23,7 @@ CONFETCDEFAULTSPACKAGE= rc SUBDIR+= rc.d +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/libexec/rc/tests/Makefile b/libexec/rc/tests/Makefile new file mode 100644 index 000000000000..c44c6db90b77 --- /dev/null +++ b/libexec/rc/tests/Makefile @@ -0,0 +1,3 @@ +ATF_TESTS_SH+= rc_subr_test + +.include diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh new file mode 100644 index 000000000000..0ca790e39a14 --- /dev/null +++ b/libexec/rc/tests/rc_subr_test.sh @@ -0,0 +1,103 @@ +# +# Copyright 2022 Mateusz Piotrowski <0mp@FreeBSD.org> +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# 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. +# + +atf_test_case oomprotect_all +oomprotect_all_head() +{ + atf_set "descr" "Verify that \${name}_oomprotect=all protects " \ + "the command and all its current and future children" + atf_set "require.user" "root" # For protect(1). +} + +oomprotect_all_body() +{ + __name="$(atf_get ident)" + __pidfile="$(mktemp -t "${__name}.pid")" + __childpidfile="$(mktemp -t "${__name}.childpid")" + __script=$(mktemp -t "${__name}.script") + + cat >> "$__script" <<-'LITERAL' + . /etc/rc.subr + name="$1" + pidfile="$2" + _childpidfile="$3" + _rc_arg="$4" + setvar "${name}_oomprotect" all + command="/usr/sbin/daemon" + command_args="-P $pidfile -p $_childpidfile -- /bin/sleep 5" + run_rc_command "$_rc_arg" + LITERAL + + atf_check -s exit:0 -o inline:"Starting ${__name}.\n" -e empty \ + /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestart + atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ + ps -p "$(cat "$__pidfile")" -ax -o flags,flags2 + atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ + ps -p "$(cat "$__childpidfile")" -ax -o flags,flags2 + atf_check -s exit:0 -o ignore -e empty \ + /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestop +} + +atf_test_case oomprotect_yes +oomprotect_yes_head() +{ + atf_set "descr" "Verify that \${name}_oomprotect=yes protects " \ + "the command but not its children" + atf_set "require.user" "root" # For protect(1). +} + +oomprotect_yes_body() +{ + __name="$(atf_get ident)" + __pidfile="$(mktemp -t "${__name}.pid")" + __script=$(mktemp -t "${__name}.script") + + cat >> "$__script" <<-'LITERAL' + . /etc/rc.subr + name="$1" + pidfile="$2" + _rc_arg="$3" + setvar "${name}_oomprotect" yes + procname="/bin/sleep" + command="/usr/sbin/daemon" + command_args="-p $pidfile -- $procname 5" + run_rc_command "$_rc_arg" + LITERAL + + atf_check -s exit:0 -o inline:"Starting ${__name}.\n" -e empty \ + /bin/sh "$__script" "$__name" "$__pidfile" onestart + atf_check -s exit:0 -o match:'^..1..... .......0$' -e empty \ + ps -p "$(cat "$__pidfile")" -ax -o flags,flags2 + atf_check -s exit:0 -o ignore -e empty \ + /bin/sh "$__script" "$__name" "$__pidfile" onestop +} + +atf_init_test_cases() +{ + atf_add_test_case oomprotect_all + atf_add_test_case oomprotect_yes +} From nobody Wed Oct 4 11:23:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl60N1sz4vkZ4; Wed, 4 Oct 2023 11:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl56j51z4bvf; Wed, 4 Oct 2023 11:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Haaok4PZuxstGosXfTr0GsJD3okoIUryjRe0Y7Bft04=; b=xvD3f15oCSUDOzqgLmgQ9gr/tPK9dyqUY4eAfyOiaQ3rH648ajIbMZruOT3FcVo6tvsj1s LrQDI2WozEoToGH3UtijKps47TFVaekxnJ4TpJZrsE/THXm6mOWqNf5p/bM4+9JND3TV30 UTMoJaJoz1EzvQPSZjW4PDlFUIuI4oiPUDjQvcNTO586h3UxsCcGB+lEPPhaJMcS1L/BRH wkrVX+A/4PUvHrTOz46wfOmynoWNRIZvo6J3VJQe/ULbQzt7C6qt13hjZP8xYB9FoLIIEI usyztuuveUAe3uhWJqn1GMpYEud2Ae4F6JvS9Ya7hbHLY46Z/4ltma8e6MWKNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418625; a=rsa-sha256; cv=none; b=AUQgEype5x5MULW+epxCuGpFmwhoP3HUE1Sy1coXDO30+tJhmlMVhyESkRAKPLLoHB//AV W5EwxVCtsUQKBBn97yFvNfsDIMBY7AmNiMsW2lqy4wxkpGhkUDWh7qHnIt0IjFXhoaqBeD oiqZdXZuWE6kwYnSXmslJx75SZEy0IteHT8grkZ/vETKdXAn5bz9xp2lBJx8gyK0Gp8aR6 hxrrM9fnUnKb3pGcoCg6ybBs7PRCBP44/rS2cXvX1brCXrE4HzJX7Oq00t3xO0dshZyy74 ELeOs3ur8aryy43Rf1s9/r2qDIBPwXCbyMrCXijaXAl9GFVPEasFUAm/hjtS2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Haaok4PZuxstGosXfTr0GsJD3okoIUryjRe0Y7Bft04=; b=P+yOKVZiu+WMHgr33bp4boHac0HSqze350+K6FaIDObaAL7Ip8bRF/HWhyCogHp1WxXkkh jhfMWjzFBHDVujU/vwLjOuR5993Q+sZZLYWt7PbsGU/Hvg0V38Bx0jk8vAbkMEcCIlxu32 mg3A76nWvp5CtKj8oP67FAJYL2HMKaWuS1xuoOL5Qvc5kxVaGPZ+iIVfpWeqHNkMRE4b4z 3irujBNp5IChFBBnZLFkqalPRNByKggg9XqaLgdB5K6jiwNgKI8cOney9z23CRELGOutgN 8+b5Eg4LvJ1LJA6RFeRSxIj2rRDY1xI5TmoVx3z6h5uoqMIbF7AsRCDG20mcOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl55Vd9zbK6; Wed, 4 Oct 2023 11:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNjAO084777; Wed, 4 Oct 2023 11:23:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNjJP084775; Wed, 4 Oct 2023 11:23:45 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:45 GMT Message-Id: <202310041123.394BNjJP084775@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: a22d61c6918c - stable/13 - gmirror.8: Remove references rc.early List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a22d61c6918c0f76ac7af2c82bc2a87a780f70b9 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=a22d61c6918c0f76ac7af2c82bc2a87a780f70b9 commit a22d61c6918c0f76ac7af2c82bc2a87a780f70b9 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 19:43:14 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:11:41 +0000 gmirror.8: Remove references rc.early The manual page of gmirror describes how gmirror providers can be used for kernel dumps. Unfortunately, the instruction references /etc/rc.early, which is no longer a part of rc(8). Remove references to rc.early and suggest creating an rc(8) service script instead. Future work: In the Problem Report on Bugzilla, Lawrence Chen suggested adding example rc(8) scripts to the gmirror. However, those examples need to be tested before they become official reference examples in the base. Also, those scripts should probably land directly to /etc/rc.d, /usr/share/examples/rc.d, or /usr/share/examples/gmirror instead of the gmirror manual page. PR: 178818 Reported by: Lawrence Chen Fixes: dd2b024a336f Removal of early.sh MFC after: 1 week (cherry picked from commit a848315f68047ae46a5d96cbc7a890e645ce646f) --- lib/geom/mirror/gmirror.8 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/geom/mirror/gmirror.8 b/lib/geom/mirror/gmirror.8 index 22639646a4b5..af9ad87f22d0 100644 --- a/lib/geom/mirror/gmirror.8 +++ b/lib/geom/mirror/gmirror.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 30, 2017 +.Dd July 21, 2022 .Dt GMIRROR 8 .Os .Sh NAME @@ -386,21 +386,26 @@ Reading a dump from the mirror on boot will only work if the balance algorithm is used (that way .Nm will read only from the component with the highest priority). -If you use a different balance algorithm, you should add: +If you use a different balance algorithm, you should create an +.Xr rc 8 +script that sets the balance algorithm to +.Cm prefer , +for example with the following command: .Bd -literal -offset indent gmirror configure -b prefer data .Ed .Pp -to the -.Pa /etc/rc.early -script and: +Make sure that +.Xr rcorder 8 +schedules the new script before +.Xr savecore 8 . +The desired balance algorithm can be restored later on +by placing the following command in +.Xr rc.local 8 : .Bd -literal -offset indent gmirror configure -b round-robin data .Ed .Pp -to the -.Pa /etc/rc.local -script. The decision which component to choose for dumping is made when .Xr dumpon 8 is called. From nobody Wed Oct 4 11:23:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl7231Tz4vkVJ; Wed, 4 Oct 2023 11:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl70Pc7z4bxd; Wed, 4 Oct 2023 11:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yG6bAA1hkA0ojLltVMQ6/9fArmWzZQKq5AjyNqOLTNE=; b=gD0UgitDAsKFoI7ZbNYim7f+ycgYs0ng0MFmvZyHi/3/hppfCAUFqFCX3KD/VOyAmo9rza J748KnWZZRtSdy3BYog5EQJS4epVWAJdxfMB2c6Y9+5Ev3LAU8mJrLgpZKr3zJtdG/3Mvm lzwdN3EDck8OcMpANloFW+8UfkMA5m0UuQ9XR/YDVoKMgpqfk7ztmZsOC+CFr2Iof6IQ1E QqR2ooKVAIrX2aYNluKNOts5xrfF8mWxBfSoWDqEXyZWTDCcjGX/HLQMJlzSqFFRr+nwci Dk/iZFxv4vX9CkGrjixNn665OZvC1RSTH4tpVxdTFMDTof6MALVzxDfifP/wMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418627; a=rsa-sha256; cv=none; b=PYhvLNw3pG8nN5fMF9kgmOlCXAkV9q8rOKC7MO6wmk0rsDuvjLTsQp6kkfaX9+MEzGfXwi Uyi5U52VwwE/mvxupU539I9S0oxYIYVgkp/4p0t94lYlJOsyO037hT9aIJnl5X40PFBDFp jfVG5KhDM+oQgk9Y5o9YBUroha8v+M3RhJDLflpwZEv3R/qAq0eLTd+5ZAvU6flrN5L1Ym x9KPfYsmM16KrRvHYegzrXLK7WJ+mKn8r21/Q+mDyIuqDBDAT2/PReCu+06GqjewpUh8Zs LY5jm6IlAUZlzXzBEn8faNAPdYYQ/EdUg3dege70Nh9iRd8x7CGI5jKzxthBPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yG6bAA1hkA0ojLltVMQ6/9fArmWzZQKq5AjyNqOLTNE=; b=J51jxJAR5ceavoz7mS665JdFgCg70I/997/YyrvzGk3qaAU8JTP/EnSHS2fTsmKSUBzOWu H9ZXG7eeXaILsJwfjbahrCKLqOnFop4JzpShIqNsioAAqOn22McGMldd/Xt2MOb8toI/k6 G0+fVsGLnxTBHhpdjaNEIQ57DI9Vb4yTItecLpHlNb+1qtB3NCxtlzRnUeXiphXpX67Hk0 83WnEAeasaBMb1Nv+lSfSS8xTc49UePm9iJI62Z2txbA03OO8ACF+ZZnJYl9LX80UGRmLX 8MwdYQ+7Qd8RrMHPreSKPzWoF3T5RQ9MU58p61zqencj2N0egwmgOyHNBcei/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 4S0sl66csGzbc4; Wed, 4 Oct 2023 11:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNkLD084824; Wed, 4 Oct 2023 11:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNk8e084821; Wed, 4 Oct 2023 11:23:46 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:46 GMT Message-Id: <202310041123.394BNk8e084821@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: 8ed7602b4e0b - stable/13 - development.7: Remove CVS and SVN cross-references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8ed7602b4e0b33e5fd397fad17bea71d14234a85 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ed7602b4e0b33e5fd397fad17bea71d14234a85 commit 8ed7602b4e0b33e5fd397fad17bea71d14234a85 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 18:33:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:12:07 +0000 development.7: Remove CVS and SVN cross-references Instead, point to the homepages of the projects. MFC after: 1 week (cherry picked from commit abfa92dee642a3687aaef107203e69722a16ef8c) --- share/man/man7/development.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index f4d0fd300c40..3c8442e36e2f 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -194,9 +194,9 @@ December 2002. It was since extensively modified by .An Eitan Adler Aq Mt eadler@FreeBSD.org to reflect the repository conversion from -.Xr cvs 1 +.Lk https://www.nongnu.org/cvs/ CVS to -.Xr svn 1 . +.Lk https://subversion.apache.org/ Subversion . It was rewritten from scratch by .An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org for From nobody Wed Oct 4 11:23:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl82DRJz4vkZC; Wed, 4 Oct 2023 11:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl81Hg4z4bhk; Wed, 4 Oct 2023 11:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jltlKwlQCxQeL0DZ/tS4CBnwrzGYdtqGpOThO+1pVo=; b=lw+/XteVWUPLPG+scLJT6Ig0FtpYZ0waX9mSCdoynXK5cqpPx/MClEM17tp4Xggu29/1Qm Z79+58M1ChX6i2HmafCPnfLp3o7874kpr7LIQS8Ii4dELOH3bMNVNSv0YCQznYhC0T25VO NEwJbVep1FYDPVELBgB/iCFYM5oWGR6r9vxlRmmQSPhi/0qUcYun5GWJH1Ntru2hfItXHi TOks06LirIL3GPtx2hJk4a+2ph2BNQcLLVqQ0GpuTne7cmo16Av7B1BcldFOca0+hiNOF8 uC35qHG4h2g7NStdRqXPnw9IX4lb0y/6iCzCVxIL9Q1f7Cnolf+W6xMYtHq5jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418628; a=rsa-sha256; cv=none; b=Erx+suzl4naB9z9wcB/TMGu8VJooHMxmKw/yleq1ytNy/cMCnqNhUAFmj4lD9MrT3vWWgz 6FQFukPwBY4Aia4Z/lltkgAQdB3EC43s33E0r4xz9ZXKKeNRgOTnrUfY55ATRUP3LUIrgy rPvn7tTpQbKL8sEGSG1WWI3eajslp8ertR7jcO9ZjEYtbyyqtjtI316x2Zq/LE1gZf71WV hCW3U/EFhwFIWhNFtiE2rfe2BiHAftrNtGg7gSRNBjkiUs605TxRV23V2Jt5cmmQZT6p+5 4wjA2N9t2duzcWJnafRQlh3kdU2ohEYz+nkBUm49DoIP8l8UYm6EdCnZr/Qs9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jltlKwlQCxQeL0DZ/tS4CBnwrzGYdtqGpOThO+1pVo=; b=FBByWyZw3C5bpepaxbNDkVWi265ckqG+LNsSVR0zNwXoOSYon0641Tc0euxnfPRmUGTJxV B3N+DppufCE7uF1c3y3saPC2AnaRMFTf4JtFSgIDtryehqNSgwQs0ld61ASMnhpWLwnzpa h9+BHviXI58aXyXRTDKwt90AHi3C8Vrkif8jeTZbBDu347XzCXUCKJw8TTOkjXQmN64MBj 5qHak2NFvD8idkQF2BWgdd5jkuhKU1O7XSBFJDG0X90lkAsvI6y2MVs8ACBNtXmmVHMYF9 t9rI2h/NxTCAv/TDsPYGZBepifWYAW90oJLyQHmN6pEauLwNEC4lMjgHUu2DCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl80Hn3zbV0; Wed, 4 Oct 2023 11:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNlLo084863; Wed, 4 Oct 2023 11:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNl0i084860; Wed, 4 Oct 2023 11:23:47 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:47 GMT Message-Id: <202310041123.394BNl0i084860@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: 2575844bf968 - stable/13 - release.7: Update EMDEDDEDPORTS documentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2575844bf968c633562e0cdd1a25cc7d52ad0b81 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=2575844bf968c633562e0cdd1a25cc7d52ad0b81 commit 2575844bf968c633562e0cdd1a25cc7d52ad0b81 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 18:21:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:12:56 +0000 release.7: Update EMDEDDEDPORTS documentation EMDEDDEDPORTS does not contain devel/subversion anymore. Fixes: a03128832c6c In extra_chroot_setup(), use 'uname -U' to determine OSVERSION. MFC after: 1 week (cherry picked from commit 6542fd4b959fa2919b39690ea3ea83e55848e091) --- share/man/man7/release.7 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index c183ac2a2d92..b68e0b65f24b 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 4, 2021 +.Dd July 21, 2022 .Dt RELEASE 7 .Os .Sh NAME @@ -332,9 +332,6 @@ directory in Set to the list of any ports that are required for the target device in the format of .Fa category/port . -The -.Fa devel/subversion -port is built by default. .It Va EMBEDDED_TARGET When set, its value is passed to .Xr make 1 From nobody Wed Oct 4 11:23:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0sl92KDFz4vk6F; Wed, 4 Oct 2023 11:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0sl91rvBz4c4b; Wed, 4 Oct 2023 11:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rurIMIbIzAQy3EV7G0yjWD21DPOf0uMys0onaIlhoMQ=; b=Ti2jHGGShQYG1vdTlH/BMaww0Mgi00DzQEQ33ihzQwIVFFzH8ZttWiECa9gM/pjt3tMLe3 WTbLTMuVHu74GHE/3D4FOK5ck59RAFwi3RLSiPqEAZDA4f/ZojiT0vvfpqcmFfYYiNyyqQ vR/wL3HNhNeAyj2WTraxq9PpBvw0XGEAGRigQyN7EfVa1zd9UEXZjgV/i4zHx2TmhDqEOk 3yQqc56y4FfSiQ3hOft9ZZ5gFK3VnPnFAo8FfwyrQBPQ8JnMpA6oV0l/cDbgq6/4FNc9LI wNNDdPB1R4bwQRk6jNxQtaGXFNFLJ7vad3R3dZpx6oATvMLdQy587GjRylMsqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418629; a=rsa-sha256; cv=none; b=Tse/C50oTVJcBhzTa8iaNYquLZQ95JZkNssmSt4wXx6rhZ2+fJvhUOUOSoOPGLKNwdd3BE gVOUK5NC8yQwl4p+JGh1ZE7/R+9HMS12pgmtFZVK5Ka+sj7Mn5SBTc74D71vCpsdH+yzLL pMFSZp7n/mgVkGpgvwLMGYww1Lj3lBRL3hBxuvEKTWBOukUjvIzdtSeJM22Z9UVfUqMs7A OgziVR8uiygJ1MHz64X23+r7HHsOYquILlraYPtEeEGLkKazuBLnF7b25DbPQE0u8Aj6F9 w+Bc1Zqeb/K3iaFSNhky4qKj5EShU1s591V9D2iRa6jr69zu1qZYcejXuJS3Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rurIMIbIzAQy3EV7G0yjWD21DPOf0uMys0onaIlhoMQ=; b=C2WFUEQs7DNpewHtdPxyirc/Mg3oDwDGg6KxOZlJk+z+vM9CWP7iDIgIjFjBSg8SyX78kC vE6O92nPuW08RTLOVmfkzUR2EU0YGPwB+EmJZrqifn2Z5JbFMoNddQQo7ArJEGM9lQFtwC Uqjo+Dscyv/N5pn7JmjlW6cIGsiqQWx8CvGQOUgDltbMPtqDkKKztPnuyG2gY+mFf7qARf hnA9KFheK2Hgg/Gx2V41Yno2V2r5KiI4r0qHdcf7PhcgPTk195qqPXKUvsADy0rj2hr9DQ 7M54Ph+PJWe1mBGCJ06itMXXwTTTkYJyes1DJ84TF4ZCfh83ae9pWIlj6HBO8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0sl90v1nzbTF; Wed, 4 Oct 2023 11:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNnSP084902; Wed, 4 Oct 2023 11:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNnVE084899; Wed, 4 Oct 2023 11:23:49 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:49 GMT Message-Id: <202310041123.394BNnVE084899@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: 9131b0a7f485 - stable/13 - release.7: Remove Subversion references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 9131b0a7f48539b4d32b407652cae6083ab11d47 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=9131b0a7f48539b4d32b407652cae6083ab11d47 commit 9131b0a7f48539b4d32b407652cae6083ab11d47 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 18:25:58 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:13:00 +0000 release.7: Remove Subversion references MFC after: 1 week (cherry picked from commit d3d60927950be441b05ec9317a23c4cbdd91f3c1) --- share/man/man7/release.7 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index b68e0b65f24b..548ba540f6c0 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -674,12 +674,7 @@ cd /usr/src/release sh release.sh .Ed .Pp -Optionally, a configuration file can be used customize the release build, -such as the subversion revision to use, the branch of the subversion tree for -.Li src/ , -.Li ports/ , -and -.Li doc/ . +Optionally, a configuration file can be used to customize the release build: .Bd -literal -offset indent cd /usr/src/release sh release.sh -c $HOME/release.conf From nobody Wed Oct 4 11:23:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slB3zxxz4vkbm; Wed, 4 Oct 2023 11:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slB33dPz4cJD; Wed, 4 Oct 2023 11:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKd8BWXux8+0OjHKEzGtm71YxeB3qDMmD9G+onHcf48=; b=V3XvmHviUzzRkpQTBoK2e9pKxXGyj2m3IhNv8+6nmPLb9tfZv59Whvb/NHF8jaMXKpG7BO i46ilxAwFrrVZ1zg5i3rg6rsAoOKXSLtvtxZ2JjFVL5JAMh7svKaKmc9qBdItQCOGfCmsB Pod8HcbIwH0Zz6p3Q6FwOCXX1pA+DOCfma9QsJNWwLtb7QHtPPTtx38mnNZsBrV20bDHfg +j31ZHsxEACvmLzW/u9TgiGac+QVdnepJQFooVbdWMk424hZIMVYey0mg2eX+pVtsjBC3v bNvQeCe6TILwYDNgFcdGHAAWOJ0RuMB583FTl4NzZ2zHYGkn0c+I1kutsneWRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418630; a=rsa-sha256; cv=none; b=EJo/6pg75BhDctu4IuRvsMUHkMsZTRlluD3yZKl+FtQ/B6sINg0QcRMbje44/eRGB8UMLO Xm9L5Mt0oJwaSfYZCESQmGiXxerHcF0h7TUvTOqf87UWi1ASYvx3ALrAxCGMHpwW7nYblx 4RV1hnTVKuBNy5aNWEHIskT+ijUhVXQq5kD0+A4QOAobmxAVNDkWERA0bdKRD3NbiWmOAX Q80b8fd5OXGo/7Tf2Wa+C7TDlRSpJYSE80ZT0edl7HviVMhrb49VQoZHrFfG4hWV2I6zNP V9VYNxp9MjLaCL6dgbCA8Rbveug/YdtotavgTWEKeWDy7sss6s4EvFWu1B+eeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKd8BWXux8+0OjHKEzGtm71YxeB3qDMmD9G+onHcf48=; b=Ger2h1BsFmEhpkrZZouBIxxSO7ECmm+rxlaIrOyBwuzLrsHFRpuvWVdoovf60EvDH5Ladf EsURYIxm9b9VVOn6xGsm+6NFCPvyz7aPLF7ZCHA4Kh55yISQO/bn5xhC2pmOJjm7f9uyC5 KSyzwPNPk5su762+iGtjmYUTLQhhdmS0FUUqdWFPYoAVivjJ5XaEsTWKTqI7UOpcczjA2S vFuxVpyLkAoPsDH5HM+/ZcVx+qS4keMKz4NW5sRBCPTZJDGSlq2AkiF3Ezy1h7gw21VMt/ uv1LdU9vv7p3FYGj/JYO2bRr+WaRdBGrRdlE+1W/+TGMaM6p3/usBqw9SHXtDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slB26ngzbK7; Wed, 4 Oct 2023 11:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNoNX084947; Wed, 4 Oct 2023 11:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNoRt084944; Wed, 4 Oct 2023 11:23:50 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:50 GMT Message-Id: <202310041123.394BNoRt084944@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: 4f9dbf7d5d09 - stable/13 - pw.8: Refernece to openssl-passwd(1) and crypt(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4f9dbf7d5d0904a9292e403107f1ffe9bf2494b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f9dbf7d5d0904a9292e403107f1ffe9bf2494b6 commit 4f9dbf7d5d0904a9292e403107f1ffe9bf2494b6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 17:59:19 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:13:24 +0000 pw.8: Refernece to openssl-passwd(1) and crypt(3) It may be unclear how to generate an encrypted password hash for -H, so point users to openssl-passwd(1) and crypt(3). MFC after: 2 weeks (cherry picked from commit adf9cd56fa8421ffbf2d9c74ada547bdbfa8b143) --- usr.sbin/pw/pw.8 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8 index 871880b54f37..5d461fc6464e 100644 --- a/usr.sbin/pw/pw.8 +++ b/usr.sbin/pw/pw.8 @@ -539,6 +539,11 @@ This is like .Fl h , but the password should be supplied already encrypted in a form suitable for writing directly to the password database. +See +.Xr openssl-passwd 1 +and +.Xr crypt 3 +for more details about generating an encrypted password hash. .El .Pp It is possible to use From nobody Wed Oct 4 11:23:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slC6ySwz4vkHq; Wed, 4 Oct 2023 11:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slC46RYz4cP6; Wed, 4 Oct 2023 11:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAonIyeDXBBYyxq3mHdy6CSNxjZdIrp/sHtEVW5K8CQ=; b=TcwSG4Jp8mVl6LlB5rI4Ggdt8EiEu0LbnwlJNOIwCz0jhwgmpJWlvgX3eSjOV1S/+/AHnM O8LsZzxj6LxQBtdN5qKfU/H25hh8T4m5IriIu+QAOb7NNklCDgC1qe6s0irykZf0qVqRF1 +EDuJaTP+YGVInvLE85kjW41SYZuOwTKBRN9U6L9tGWd5nGeRZT0S/4Q2UigVNU3QyJ5lN WyBTtbHrSZ0BW0ryUJF2Z+4JNbQCdXcKLyEWl9UvPXCvjjSk68RCnkLyoNHOOsz/0r0mtE KcMebIrCdM23jWANV9O5xPC4s+sysqXvyO/moSumpLWGH3NaDH4A4Iv8pP2vkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418631; a=rsa-sha256; cv=none; b=P6vsfrbGiZ1rPQnwg+Q+uZBCC51/F8gqxW7sOZcZJldboz1GPHmvRPONpsBeAiu/j8p7vC LnkUI8a81TES55SDQDY5cPSYbQdXLM3BSQcy0nX3scxCHbhqd4Hg5Jreq3nl5LfAo5F/hh wr+Iw16URthEgjI3H4kTEEGa/8GWeUEMYW89rdf8i8kCXRgojARj5TzWJ7TICK630GXjED nC6y4UT0B40T64+ViAHq8h+ZJPSVezfGf8IBPoMX/hr7QRvmOVed+a5wDx+k1JseFfFr78 3QAx92Mj0Dfa5cYfTE1PETL0eTCp3VTf1QQs+FfdIeMllH2Vqnd2Equh04pE/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAonIyeDXBBYyxq3mHdy6CSNxjZdIrp/sHtEVW5K8CQ=; b=gBu8bCWmORTlsiyeiLqFUhX2Pxyf2pk2EvTyYQ0d260vZ5+HlScmUYQCyTIRiWbiDwMTLE wdwsnqlfx5gjBfj1gGrpdsnTIJ9WP9q09ynP0WclBnn0Nb/TaLlGLpT5JNzvfeEQNlyRXf ex9vyUi/8/sZ09LlA4W04P1+4if5yd1ie8a2CWV+O/tEwIB2lxylMcDdiT0MEFzeLDPud6 r1wiFo+eJEe3lFyMNoqwqbvdt4NpbMt2qhJRGvyeyZso/RX51guhOdWJxLeprmoAHZxMiQ c37SFGlcjyX+cQMU1WIyaghTF765pwWgQrdj5hfx0FM4BhCV46RHN7cPKoaumA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slC2wzfzbY4; Wed, 4 Oct 2023 11:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNpUA084992; Wed, 4 Oct 2023 11:23:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNpHt084989; Wed, 4 Oct 2023 11:23:51 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:51 GMT Message-Id: <202310041123.394BNpHt084989@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: 24319ec19e1c - stable/13 - vtfontcvt.8: Improve synopsis and -f documentation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 24319ec19e1c44637d836f757b79aac5a29e4298 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=24319ec19e1c44637d836f757b79aac5a29e4298 commit 24319ec19e1c44637d836f757b79aac5a29e4298 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-19 14:28:22 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:05 +0000 vtfontcvt.8: Improve synopsis and -f documentation MFC after: 2 weeks (cherry picked from commit b38e3722f5df6260a4ec70c9c3cbc00ecf169129) --- usr.bin/vtfontcvt/vtfontcvt.8 | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.8 b/usr.bin/vtfontcvt/vtfontcvt.8 index 1c007d344650..427afb0645d3 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.8 +++ b/usr.bin/vtfontcvt/vtfontcvt.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 2, 2020 +.Dd July 19, 2022 .Dt VTFONTCVT 8 .Os .Sh NAME @@ -31,7 +31,7 @@ .Sh SYNOPSIS .Nm .Op Fl n -.Op Fl f Ar font Ns | Ns Ar source Ns | Ns Ar compressed-source +.Op Fl f Ar format .Op Fl h Ar height .Fl o Ar output_file .Op Fl v @@ -42,22 +42,35 @@ The .Nm utility reads source font files in either BDF or Unifont HEX format and -outputs a binary font file, C source, or C source with font data compressed -by using LZ4 compression method. -The output in C source is intended to be used to embed the font into program -binary. -The binary font file is for use by -.Xr vt 4 . -HEX format files must have the file extension +outputs a file in one of the available output formats. +.Pp +HEX format files +.Po Ar normal_font +and +.Ar bold_font Pc +must have the file extension .Pa .hex . .Pp The following options are available: -.Bl -tag -width "12345678" -.It Fl f Ar font Ns | Ns Ar source Ns | Ns Ar compressed-source +.Bl -tag -width "-o output_file" +.It Fl f Ar format Specify the output format. -The default is binary -.Ar font -file. +Available formats are: +.Bl -tag -width "compressed-source" +.It Cm compressed-source +C source with font data compressed by using LZ4 compression method. +.It Cm font +A binary font file +.Pq default . +.It Cm source +C source. +.El +.Pp +The output in C source is intended to be used to embed the font into program +binary. +.Pp +The binary font file is for use by +.Xr vt 4 . .It Fl h Ar height Set font height. The default is 16. From nobody Wed Oct 4 11:23:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slF3659z4vkZM; Wed, 4 Oct 2023 11:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slD4vGcz4cRg; Wed, 4 Oct 2023 11:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NQDYMZlkos/zKhkLAL2V4CjnyjNFpOvxu0NYeGjqSp4=; b=aI+MvBcHmRMpYEE/97qT3f0gTyBuHEsCE7J++OPsMBNLI4/BvXU6uG5n965a6SYU4U0aq8 5gm85GZKXRoi+UGDMAIE83Vcj7hGFiCxFI1KmSlq7sWZjTgtueUhW1y5Cm0UHKoL2wGKJp KzYeDt8KlM5YdPqUYPosLQDDkiRfPCLFR5Q6oYI2EQXE5/CPGHTy/PS80lB14FwmwZ4SEe 8rr24274G8FrjE5mx+ApzP+JEsgOZvmvhISWOjGd/FYc9rB0b4KInswgvuNgzZa9eVkWVh iADjfIxye1L3OJF8yaWekXJT+42SySUreWN3dzBqo1JD/O61I+NnGBQFsVU4Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418632; a=rsa-sha256; cv=none; b=tTpf1FGSZHdhu4mXNkA1MUNo4X6LRLsGEpn3DR0YtLVNWqp0yO5JhCeztV2npW2SF3mgjq rR/do52jajLY7MteTwX9Ky3cwH3x2jnVV1W2ZG8zcs/xiojuEauWy95CXpHHZo95ncfJb0 pNPxHQlNupYxE3uo3nuK/Dc1Xlg3eszlerZxVf6lqalmsj04OK+Wv2bwRR0YP7gGVMJ48e azgxjSIok+12MvtXPVoxWKP4Guj8iL778Cfk1xrkOBdq7BUhKbOw03Y5a5JQg/JoXp/2nT KgEkKQIv5S8g/T7T7tF1C1RfD/ZzUQz0Ow/e5oqvdicXEFLE0wYJmoKxZNENIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NQDYMZlkos/zKhkLAL2V4CjnyjNFpOvxu0NYeGjqSp4=; b=A4N8h6u5S9z98WPh36bizlHxnAN000c4VwmFBPnGgiin2woV+SZBq53n0A51XTRZdpO8Oi UnAzCn9wc4jqDvWeIwCUNY3+bdizTBLQHecDwL4l6Cb1NCwWL8CqRr4IYt/GMyP/mlNlgA zp/pmu+5cRR1RflSTplp0FgmLQs/PMAZHKP+S4/VRe0OJo8H/nDdTw6FmRLgV+ja4i0BfV lPW137RqUL3ShkQGbvc5SebBtH2uU2sUqk12VJvkfTDVQITb6pMJ84zHwLrisLZCNoeRDQ oC1UTofipyWGuFW7bSpfKhcxQiGVq9svsZlelF0zOeMPHdi2DOGV/Exm7txqRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slD3zYszbc5; Wed, 4 Oct 2023 11:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNqog085028; Wed, 4 Oct 2023 11:23:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNqku085025; Wed, 4 Oct 2023 11:23:52 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:52 GMT Message-Id: <202310041123.394BNqku085025@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: c0141df5f433 - stable/13 - vtfontcvt.8: Sort synopsis List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c0141df5f43310e031b96891efb856f0ce42d020 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=c0141df5f43310e031b96891efb856f0ce42d020 commit c0141df5f43310e031b96891efb856f0ce42d020 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-19 14:32:26 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:10 +0000 vtfontcvt.8: Sort synopsis MFC after: 2 weeks (cherry picked from commit e0bd2ab2eb4a379e73ebd5ca0fd80c3d6ceee5ee) --- usr.bin/vtfontcvt/vtfontcvt.8 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.8 b/usr.bin/vtfontcvt/vtfontcvt.8 index 427afb0645d3..7ca0564481d1 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.8 +++ b/usr.bin/vtfontcvt/vtfontcvt.8 @@ -30,12 +30,11 @@ .Nd "convert font files for use by the video console" .Sh SYNOPSIS .Nm -.Op Fl n +.Op Fl nv .Op Fl f Ar format .Op Fl h Ar height -.Fl o Ar output_file -.Op Fl v .Op Fl w Ar width +.Fl o Ar output_file .Ar normal_font .Op Ar bold_font .Sh DESCRIPTION From nobody Wed Oct 4 11:23:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slG0YZ0z4vkfW; Wed, 4 Oct 2023 11:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slF6BlPz4cF1; Wed, 4 Oct 2023 11:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JliU+yi+iXxezi2TAoDQzVPczRvEJZrH/Ccn9UpV9DA=; b=v/z6thpqofmdkEcYmYFQjRHrWs/2cbMuAGsSnI0q8IUzu3/i/zsWbsCTpE99TsWG6exWgC pmWlKyYBG1srD3I+5oTUOvYD4UVR9povnfy0WB9YfckrR/j8PegPC0C0zZ/LFNHi7V4u1a m7mjPAocckrqNPk7vPUmnHc5Hc3LeaBpPOacPmAsODGYI4Kcbnyykx0igrkKWVWs28kJ6Z m7ZyoJKyLY8eWmofhQQlNVG31m+BxwBAzwSxafkV7LNv+564aTTU/4tYto1KmdEHdrdkbc TyuffyzULETYhLA5qfSpq7xzK3YvCx8x1SU2n7/Gy7DI/dWHJkEvXrZRtRIOPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418633; a=rsa-sha256; cv=none; b=X1jWp85cFUgQr29Fqd6jjBkz3Pn4qUK8FUhjwF7j8fzmzz7BhJnGSMd9n7jb/gsG0/D2sl gNR4nSnlsuEqAIfzsMArPF8E+GEF+noiWo8cdIojfG31zzg2PrjosHRbXhQ3HuPTkxXwsd aRoBrEqOdpVqBxCksieea9dRUP4n+6bqe2u0tdLFFMFlfdzuRFpTH2I11PwCQWQq+RV+kM PSJCCRJJ0IS3Cq5H1N1i17jb39a2NRiD43bzoE/LI30w9oGQ04EJyLuHkxQH8xMskL4qcn XIhhpcVuvGG/qO1dJn/OS1kbF0nkfHDNXiRBvf1X7mKHy5YzmxPyn+E/Khq7MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JliU+yi+iXxezi2TAoDQzVPczRvEJZrH/Ccn9UpV9DA=; b=xq1mFek557N//Jg5ijdItGjAKBdi+OsCEqhjMTUqYNMMZui0XGugHIuw6CuFecDUqrAxeu QLT23KYQCukBOoPzspi26nGruODJpFacK7GUqJMW7fKkfWtUHNKSyNLraOFVoTRONscKzH gTdQ4f4WuxzydRQAFvMs/V28oRj/li6UNH58+/KYZHqb10UP3RUejLkKl6IZNlEH7ishyT pJ3hEPtoIpJKBg0SdDPneYS7++ICRf5rZF/6OIk8+2w9IDCnjDGGL93ETb3nP0im46qvYr QtWNZWKJtl0wj9jLH5vE3rZbEY24wv1gdAzRDL1G0/5HyoNFgofyK9d5wcnyXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slF5Gpdzbc6; Wed, 4 Oct 2023 11:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNrfN085079; Wed, 4 Oct 2023 11:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNrrl085076; Wed, 4 Oct 2023 11:23:53 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:53 GMT Message-Id: <202310041123.394BNrrl085076@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: f787c870f6f6 - stable/13 - vtfontcvt.8: Use D1 instead of Ql for readability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f787c870f6f67a8b8640e856085b8bfdccca72ac Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f787c870f6f67a8b8640e856085b8bfdccca72ac commit f787c870f6f67a8b8640e856085b8bfdccca72ac Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-19 14:32:41 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:14 +0000 vtfontcvt.8: Use D1 instead of Ql for readability MFC after: 2 weeks (cherry picked from commit cad64622ca704145f7fe108b3a3f3c52d1796e25) --- usr.bin/vtfontcvt/vtfontcvt.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.8 b/usr.bin/vtfontcvt/vtfontcvt.8 index 7ca0564481d1..1e643f175668 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.8 +++ b/usr.bin/vtfontcvt/vtfontcvt.8 @@ -74,7 +74,7 @@ The binary font file is for use by Set font height. The default is 16. Font height is set automatically for BDF files and for HEX files that have a -.Ql # Height: Ar height +.D1 # Height: Ar height comment before any font data. .It Fl n Do not apply output filtering with C source output. @@ -86,7 +86,7 @@ Display verbose statistics about the converted font. Set font width. The default is 8. Font width is set automatically for BDF files and for HEX files that have a -.Ql # Width: Ar width +.D1 # Width: Ar width comment before any font data. .El .Sh SEE ALSO From nobody Wed Oct 4 11:23:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slH0jgtz4vkhx; Wed, 4 Oct 2023 11:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slH07kfz4cHs; Wed, 4 Oct 2023 11:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQQa6BePPfcbxqZMmrPC5cNtCwQFjRD4M36NAi9axDo=; b=RYNbALKnMeU/NhnsIMJMc9QlS5thOVnE7BhfaGgmpq8Y6bT/lA9yGLf2bVdoSUcSE5AXWn OADYYMUArXPyfgdhEYshRlSDDX3ihCp+A6n22kGskkT/BWU0qunNoEXBp/GMn1hAGXoDZ1 D7jnksvL65uHem2flxddOEuDfoeKwwJ6tg8Ql2SvAotDc2jVV9vbOTCVQbraO0nf/SH4rg 3hyn924vBJdtiJcvQeRZNnGbZ0sAduJuaJQwMHL68ldAxyZA/eqoTDrg4zVZlw+OmrKqlA V00YrKxF+249lsGORjgt3LEWJHXucJBbQzhpycPha2+XEH7VjWQhLmcgsall6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418635; a=rsa-sha256; cv=none; b=hmmJmRS11BdaXTjE0CMOHUXcv66QPHrb6vmTNiFd+a4bTGqr+l+Q6etsipHelW5EHVjxoZ 6hXHcm+z/Du7PL7UYymllYSKQ9reywdQqS6Fj2STVKtGLiIV+GGYTkWo8K20E23ftsSVOw AW5XP4Zi7VhGJkEYASreFA+jN9i/RPzhTJac++Vo7XnJvQiS81DkePVoND23+GzVbQxaxA mQrhpEXDnXJNE/q92s24fSZd1PyhuGeeR6zGCWThqUcwDRAS/mW9gZJfZEPtYy7KQ4WRWd qtWbzhCDO4Tjspz9cAKkzIWxYuzh4k9oSVOMS2qE2ZyuLOxIWugPOg8s7OKPDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQQa6BePPfcbxqZMmrPC5cNtCwQFjRD4M36NAi9axDo=; b=cfJeJHhynByIjoqqcH59hn0ZFRzMa7SgR5QlAzEq/4T1H5jhpbr5ZHYPdRy1xLQnUNDdxA P7XUzv3XtWCSJWAcAR4KR7QVgxqHb4KwTIM16siD/oyLkXXZSdOXpvslXesGwfNpysxd5T vAALPsgjCkNXZOwzrPSn6iHJ4yeVfO+wqdGsNuW2hytny/cKwlhF/gJsMOA/Vsc7SqNfsm CySCKtPTjDgFLTZi/xWcsHfKWsqVj2MoAfAjdtdVelwgVNWxZ+C1pl2s9f51GlNd53L2KD MhUy/hvdGyIbneHCIqychTkN86fsPUPFES0frN3VlVnr5MSO/Xu5ZRPcMMjFeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slG6L9WzbY5; Wed, 4 Oct 2023 11:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNs4C085130; Wed, 4 Oct 2023 11:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNsis085127; Wed, 4 Oct 2023 11:23:54 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:54 GMT Message-Id: <202310041123.394BNsis085127@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: 237ce4092c23 - stable/13 - vtfontcvt(8): Update usage() to match vtfontcvt.8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 237ce4092c23b9c9e66316ecfa88c355ee3d9c8b Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=237ce4092c23b9c9e66316ecfa88c355ee3d9c8b commit 237ce4092c23b9c9e66316ecfa88c355ee3d9c8b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-19 14:34:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:18 +0000 vtfontcvt(8): Update usage() to match vtfontcvt.8 MFC after: 2 weeks (cherry picked from commit ef2d0816dd0b28560309612b75b301e7f179db8f) --- usr.bin/vtfontcvt/vtfontcvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c index 54635f54ae7a..d68516dda360 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.c +++ b/usr.bin/vtfontcvt/vtfontcvt.c @@ -178,8 +178,8 @@ usage(void) { (void)fprintf(stderr, "usage: vtfontcvt " - "[-n] [-f font|source|compressed-source] [-w width] [-h height]\n" - "\t[-v] -o output_file normal.bdf [bold.bdf]\n"); + "[-nv] [-f format] [-h height] [-w width]\n" + "\t-o output_file normal_font [bold_font]\n"); exit(1); } From nobody Wed Oct 4 11:23:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slJ2K0Kz4vkfc; Wed, 4 Oct 2023 11:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slJ0v19z4cNQ; Wed, 4 Oct 2023 11:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vtrS0kePUUWkoveHpXYzS06D9UvQlYikvORt9PYGosU=; b=YiQmfaL35O3YpfUAwoyMC3MWtaTA9uFDULmb6oLBi8lKKqTRdGdOAB5PhLjXYx5QSYGLtC CpapAu8tWqqor2ISKcu4Imx+0iMQt1yUGctYIKl5Nu4+0fLZM4Rm5C3woBQGIuOvoHeKjb iDuEv3wIhwNh+zUHdVpktKH7XQFc8I1K/MZ5ve8GZ5/RZtO0uYff/tZybp8x6r3l+8iAfl vA9vnoSXTJm4TFzBXDBBGz7WMiqznmsgpVXKsxfW14x0/wpRElXypoPX3vrkNlvK+yneQ9 ybu5+sbY/Rd3dXUQJ23VPPF9/k/F9ev7u9eSo1p137zkuq/280tFcCMWRd2r2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418636; a=rsa-sha256; cv=none; b=jnYkLjS3d3/I5fY0B+cGbBZwKX9GX6HybNm1bgVNQ4gtvI+k95sBoXq1ai7+PcuzXy8HTn iibt9K53uPyOgXDEqZbyP5gUjxQRgygTETw2nMC9WRCagZVe+iTdaBpmMiZ7PipB4Wxko5 xB7uai6ZpwdpWpvtD2yFIGkK0VstZH2e9cGGVikPq1rtzCebjGQZsGBfZYnPSlGC+uIOvM T7aralW9VGIa1fPm1LegYEIagA80mYHvNye/mh1P9XQopQ/eo+ejUP5yZcdkZhXc+fIgQa tGx2W/PAIOGMyA60GnGtSHlq3RqU/UrRyV/VBgqjtTqL+xc3/NdO6pLhbD+PRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vtrS0kePUUWkoveHpXYzS06D9UvQlYikvORt9PYGosU=; b=XGB4OJq0j/hJ871Er2JvsQ6wRe94fJLM6QCQD3qU+sefSkyD5SpYqv/IZewZr4tGL3Ylfk /wD1UNNlvcg2okDHerxksHHvreKrRaQiAj80AB9fVPvapx/LFjXEi8IxxobL3Wn30NyfLU jQofAaVDPmbqMxtk4IeI3ZrQbrmI6I0a7ZSmnthmWHz9vxxeYYRlkhJ7pWg/TAywaCgvd+ SfudtlJmP+cBxJFFEV/ZmTlxymSs8WkTt/cgVYQkgvtKDDmItH50qGimzJgLF/S9WRrd8O Qye1nKb0cEfqUeDsJCCFhtVFxP8I4wH2GPLlAqhGuEHkUnUT07MJRMCEHuiNlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slH70TYzbjj; Wed, 4 Oct 2023 11:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNt1j085183; Wed, 4 Oct 2023 11:23:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNtAn085180; Wed, 4 Oct 2023 11:23:55 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:55 GMT Message-Id: <202310041123.394BNtAn085180@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: 4ae02ef76df4 - stable/13 - clock_gettime.2: Add cross references and fix linter warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4ae02ef76df4ad151ba927480351b9c8298fafa9 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4ae02ef76df4ad151ba927480351b9c8298fafa9 commit 4ae02ef76df4ad151ba927480351b9c8298fafa9 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-08 19:51:03 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:43 +0000 clock_gettime.2: Add cross references and fix linter warnings MFC after: 3 days (cherry picked from commit 13a9da7d5550392a754fcc72d8ec74c0ddbec26f) --- lib/libc/sys/clock_gettime.2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2 index 49b6bab13762..7b325a2bb394 100644 --- a/lib/libc/sys/clock_gettime.2 +++ b/lib/libc/sys/clock_gettime.2 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 30, 2021 +.Dd July 8, 2022 .Dt CLOCK_GETTIME 2 .Os .Sh NAME @@ -130,7 +130,9 @@ struct timespec { .Pp Only the super-user may set the time of day, using only .Fa CLOCK_REALTIME . -If the system securelevel is greater than 1 (see +If the system +.Xr securelevel 7 +is greater than 1 (see .Xr init 8 ) , the time may only be advanced. This limitation is imposed to prevent a malicious super-user @@ -183,7 +185,9 @@ The clock IDs .Fa CLOCK_UPTIME_FAST , .Fa CLOCK_UPTIME_PRECISE , .Fa CLOCK_SECOND -are FreeBSD extensions to the POSIX interface. +are +.Fx +extensions to the POSIX interface. .Sh HISTORY The .Fn clock_gettime , From nobody Wed Oct 4 11:23:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slK5T8Nz4vkby; Wed, 4 Oct 2023 11:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slK27KMz4cNm; Wed, 4 Oct 2023 11:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VyqZl+C2zDUuTgT6HExGxJR8mQtfqa/E34aUxCAM2Ns=; b=gjCCgqt1plHJGoI98H50xIurJoyIvlsRO/0ptkHIuN/sCrsXejb/gCxdVZDVnF9dSFEepO uSj0FEoSnYG7QntsXcRHTIOF3a2DJEVlZJxs8tJlxylyIklJm7lqc0liWsYY/HrGJweFYI X8CcTgHwh0qcprmXiejSROnORTlQuxJSieJnwCgt6IY/h2fI7Fk8Kg3rGEekklG8hsKQE6 QUsn6d+Y4XIkK3HAQ7JKb+K8br42DPpK79UkRXJcP3BP2xFnSWoaazMqL3HZiMgqQnHxEE D4Xpptz8DFXJpwPTdgnCOzfr98fKZe581sZlmFz/VrIjDDAgQxul2qe4pJz6hA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418637; a=rsa-sha256; cv=none; b=VOqc0i7OfxTHzH8RV3AOyAZCPpL9WuFXTXTB1SHgOQ7KQOy3bEVuwglfwrUm2p+3VPYKOJ X7euHS8wyprw3/gv/IfNg+O8t+dN4e1NQiVwKqvem2+oyhfP9KQh6UXYGAFIgu1pUqj2ve TvgVOPK2EJrs+2opV8WvY+pUHt7OY4u1pQdlaU6PqcIrNCLIzdkfUKmE5cM/kkJj1Fa++O WpOexZ/z/qgBW2aoU5tyrNXxwHm4TXKcJwN74hcu+h5luFMJIPuQse9dd9xK5YMtwyiO+J BnhFYCVff2EAAJKmMVnEfQjVIZJk8axFUt+fJZXLCZLLFoOULJ4K5KgDXx4gEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VyqZl+C2zDUuTgT6HExGxJR8mQtfqa/E34aUxCAM2Ns=; b=dgcVJE0gHP9rKWVvEylLnqI7FwioEPdvIOmyOJakbQkBOppGOULsDlJl/nzym/MBUA5Hw1 tkq+tfAs7Pbugr936gNwmycNj5GQntIQlkEw3UuxRInzP5AQ4dISxvDEdwRveyJY/TNlHw 58xmk+I2eCGU0s5uXwXOzKJz9fUeoiP3fXmUWr6ia6RTmVLGg9jD6PHgb0Af7s8S87vDhI k5I0TwJflo17+5JOJ4Fa2HePSysveVZd/LOKFyPbv7laC/mP1GkXF8UUXT6A4d7GmHYS5f bTCmxGuEdEZu+jRArEyTIlE47VdP4VN2SBDsadMu7DJZDWMsq4SEihsSE5i0QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slK1D65zbY6; Wed, 4 Oct 2023 11:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNvrp085222; Wed, 4 Oct 2023 11:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNvh9085219; Wed, 4 Oct 2023 11:23:57 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:57 GMT Message-Id: <202310041123.394BNvh9085219@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: 755710da7177 - stable/13 - rc.subr: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 755710da7177487d7af95aa640fb43f19ae197a2 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=755710da7177487d7af95aa640fb43f19ae197a2 commit 755710da7177487d7af95aa640fb43f19ae197a2 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-08 19:34:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:52 +0000 rc.subr: Fix a typo MFC after: 3 days (cherry picked from commit 7f6754d9659183a0c56fe76044d7826ca849675f) --- libexec/rc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 37a614e122a4..032d7b261bc2 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -863,7 +863,7 @@ startmsg() # ($sig_stop defaults to TERM.) # # reload Similar to stop, except use $sig_reload instead, -# and doesn't wait_for_pids. +# and don't wait_for_pids. # $sig_reload defaults to HUP. # Note that `reload' isn't provided by default, # it should be enabled via $extra_commands. From nobody Wed Oct 4 11:23:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slL3pnWz4vkfd; Wed, 4 Oct 2023 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slL36pcz4cVx; Wed, 4 Oct 2023 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avZo3lhRdTrwNiCETgv8I0pq3FTZE+/207jE7G6XugY=; b=KTDmXmo7nb0udSCm+0JuTqRvDRag5roWIAhiFhRRpr7YmBuujf1PHwKyDq7uYkI63uQJtY leJZ9S9rmK4dJNBxjNfQTluOwpufL9RLpKnNn8zNZm5OQ0034l9Y0ZUPCIcYSGeolg9N2t bHRx+RqHHpsGbSAHv5aPN6c/IldOtQMlUqT8exTISFzA32bMsS11FbKR9qUzqjmnx0Q7Yp VV2CZsvsF7hbaYnThZ0DkiAMi4VC6i5zSgi/uXkUpBLtTCMvzDh+c2dRgbSHf7lKRHmq0a w/QiapWMTJDUAHOr9TmCTTAkrtCXxSZQ+wFvHl/8mYWYYU6sgFWP/+OPCaTasw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418638; a=rsa-sha256; cv=none; b=eOnddFRb1ivVw9ZJ5/N0Ekue2UCBer8om4KkN7JugxR4zAd4WC0A3XNeGkL61tFyDxuHIX jMwLtX1C7xOaiLdTceOQPW5QpMnqXWcN/qg/SV8ygqiTnYKQ3Bduhj0XD0s1rO9K9A1z64 vygTierR8vdpcGStiJJtbd7xXWLVtB/gW4EHFAxqJDm4NG/AD11edJbdb7PZOviRL0abtC P+wqozqbF0BG/PbKHtEnPSN6Q+LcwqHkJEPbbOqL8zfBU31yPo7X7u6n1rVEcgYIxJbkGq SAO/jre3iqOw1YRSufbA5EzYdtNKw4u/o5K1ZyE1pBIipoZ0pJJell0vS8e+iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avZo3lhRdTrwNiCETgv8I0pq3FTZE+/207jE7G6XugY=; b=jECFqpklBn6ksZjUPke4ZHmpxdDHBhWNQQa9w1UJiyHFc8SByghllVT9tvgjrPKvKhaLp5 SYwaFIldz6DI1Leeg6v43sz6KxWu9iB+zwOTTTkT4/ZhF8fSTiTK/fTCFWA3liF7PUUjrj 1HCI4NwxpGoykw+KBBAdOvVD+7yMwlbGGPnQHn1I2MclUg3k5qyk5+1HeFQNU201hjiS2m i4yNvGqyFjtenKt9o/x48vOhUBQ/STNL18bDm/Nj4Ht54lJlGiqhvG1g9mYi/VJEHNriyt fMyA/2CtllQesG6eQQCf+Z5b0JGyZlFikm1eszHBr943OGo6Tsf7IMNmg/LTyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slL2Cw6zbc7; Wed, 4 Oct 2023 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNwEC085271; Wed, 4 Oct 2023 11:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNwtQ085268; Wed, 4 Oct 2023 11:23:58 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:58 GMT Message-Id: <202310041123.394BNwtQ085268@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: 873117aefd2a - stable/13 - swapinfo.8: Mention BLOCKSIZE in the ENVIRONMENT section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 873117aefd2a3b796cc82942a885f066b1d6bf5d Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=873117aefd2a3b796cc82942a885f066b1d6bf5d commit 873117aefd2a3b796cc82942a885f066b1d6bf5d Author: Felix Johnson AuthorDate: 2022-07-08 19:33:02 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:14:57 +0000 swapinfo.8: Mention BLOCKSIZE in the ENVIRONMENT section Copy the ENVIRONMENT section from df(1) to swapinfo(8), except that the --si option is removed for swapinfo. PR: 235225 Reported by: 0mp MFC after: 3 days (cherry picked from commit 39ad6e289f062fc8da239c0372f49b21f0911060) --- usr.sbin/pstat/pstat.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pstat/pstat.8 b/usr.sbin/pstat/pstat.8 index 9cf0e7ef340b..2075718626a3 100644 --- a/usr.sbin/pstat/pstat.8 +++ b/usr.sbin/pstat/pstat.8 @@ -34,7 +34,7 @@ .\" .\" @(#)pstat.8 8.5 (Berkeley) 5/13/94 .\" -.Dd October 11, 2014 +.Dd July 8, 2022 .Dt PSTAT 8 .Os .Sh NAME @@ -228,6 +228,26 @@ is also specified, extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. .El +.Sh ENVIRONMENT +.Bl -tag -width BLOCKSIZE +.It Ev BLOCKSIZE +If the environment variable +.Ev BLOCKSIZE +is set, and the +.Fl h , k , +or +.Fl m +options are not specified, the block counts will be displayed in units of +that block size. +If +.Ev BLOCKSIZE +is not set, and the +.Fl h , k , +or +.Fl m +options are not specified, the block counts will be displayed in 512-byte +blocks. +.El .Sh SEE ALSO .Xr ps 1 , .Xr systat 1 , From nobody Wed Oct 4 11:23:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slM5T42z4vkrH; Wed, 4 Oct 2023 11:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slM40z2z4cRS; Wed, 4 Oct 2023 11:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cywZZExTN/1uceJIhr7HH6n4Y/pv6yakq0uH6McNj9s=; b=BLi8Ew9sdRB2hJ8iWPiXimBk7LRsql0XfmdC1DilLc5Wv1vb1yGubHRybgZ6VkETVp4kN0 u5TIZ8OqbrxUFaar/GUvYs2loM8FeRHNXgtlw2xavqxUTGWelWjYcxyqFbsnrosDb+Oioj 6xAdvHP/tyBdjLPM1R00a2o4LFt6Wiluq8K+/eAE0p7i0eJGJZSG5FQ4WJRmBE2f3E25y3 fLqc/HZ3FGI17mQm7ymW7pfo1KyvBTrL2YOJC+lg1JvJl7aTyAlv7cNyvTKqpw5zSPpYE1 f425VwoKjbyQ7cb7riTH1puicgzvSPZiNJ8BKf5UJijw7fUNjf2iVDQ2G9kseQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418639; a=rsa-sha256; cv=none; b=CsRIbpwUfCCXTmPk4jdc7iptso0/UrqUz16jTZIjyw78PjK+nd3G+NQnsplrM+v4ioNBSY Lhg1PMOS5UykVbSG+R6r2o0uqTbSaGnuJUWlBNHYKSJxRDmj8/9Q4K2Dg8GkKE6vpk2ptS kHPiHXDLMHvr9daa/VPnVi9JqrtMfCMRIO8sX9tl8y+uY4h9Nd1Ec2AH05nc7H6hdju1K1 lqtKFRrieDTaXSa4aZZOqkOiwE+lspaJQ2UwcRPPzPmQXs7d2EIx1WLCg+YuuK5b0sdP1l zkvn6iiarqedEqWut7D3yoISMrdQ1nKabGbKCa0ZvdjsEMZQoCjDKnBEp1nbyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cywZZExTN/1uceJIhr7HH6n4Y/pv6yakq0uH6McNj9s=; b=Co8Cl5WtHmY80nxZuL1CClGuZLWd3lm7dpXhb3TyXslTiuRuCvAWWt2Dwtksa+wpX1gIHK Z2N4EneHr+duNswlneecLeht0je8kEDBQGbT73mt/M5eZB6CKu51Yn4ZA8C0SoAHNyVpL4 bZfEzzreDPvxBDK7nbTTxkZKtKsVzb/V0KC3U9DWrau9ab26U0n+PqgEeQfXDeIl2t4yIW YQ36dNcEko1cTXbKSPJExGDRpF1qPTyZSJINRzjz5/yvzE1Qbwq2u6tg6/rQ5E9bedzvvq zpB06W8xQ8tw/R188E28iB7M4+YaeJ8lsfJDW7quaSouUMuTkV9BtpgmibZB9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slM33f6zbdY; Wed, 4 Oct 2023 11:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BNxsV085322; Wed, 4 Oct 2023 11:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BNxUe085319; Wed, 4 Oct 2023 11:23:59 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:23:59 GMT Message-Id: <202310041123.394BNxUe085319@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: aafabde86ea6 - stable/13 - jail.conf.5: List configuration and example files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: aafabde86ea6c43cf9c2da26109e9799665ebcef Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=aafabde86ea6c43cf9c2da26109e9799665ebcef commit aafabde86ea6c43cf9c2da26109e9799665ebcef Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-08 08:43:37 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:15:18 +0000 jail.conf.5: List configuration and example files MFC after: 3 days (cherry picked from commit ccee95df52c2477d5580024758ab57ee9775da6a) --- usr.sbin/jail/jail.conf.5 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/jail/jail.conf.5 b/usr.sbin/jail/jail.conf.5 index f08ba569b3cf..824ae66d3061 100644 --- a/usr.sbin/jail/jail.conf.5 +++ b/usr.sbin/jail/jail.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 6, 2019 +.Dd July 8, 2022 .Dt JAIL.CONF 5 .Os .Sh NAME @@ -175,6 +175,13 @@ shell formats: .Pp Comments are legal wherever whitespace is allowed, i.e. anywhere except in the middle of a string or a token. +.Sh FILES +.Bl -tag -width "indent" -compact +.It Pa /etc/jail.conf +.It Pa /etc/jail.*.conf +.It Pa /etc/jail.conf.d/*.conf +.It Pa /usr/share/examples/jails/ +.El .Sh EXAMPLES .Bd -literal # Typical static defaults: From nobody Wed Oct 4 11:24:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slN666Rz4vkrL; Wed, 4 Oct 2023 11:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slN58JRz4cV0; Wed, 4 Oct 2023 11:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rA0rCNUNzUcDkgOv8991jUpQe62B46MQQHBYy6rwWQ=; b=HCv0OSLBTnf+xXu3rdNVJBfhSqaFIt5dmmCnD1QGcyscaco2+cCZnH0vi1xHHO43jFgj/E FaX/7YkQVy4KRT/GLaFxPBjbVfm+i//NcOqVZbU34EQnRJsXOcjiooA5xz1DT9YTJuTtCK LgaBOJnns5/wm0NKc9J9atJTQy6mWwZeJ/udjsixfqe18xvLI04qU828aCc53evlyaCuXR GcnPziqRMRt3eFgfOoqBR6ELAIWIjdH33hJQ007h07rLziQqLPG9RFxN4az0mh2WjLuNKz sWiyWF1xGBGVLlhMGLAOKBDhAbDLqnx82vEiZCZYHrz/7BmYh36YJEGtD8O6aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418640; a=rsa-sha256; cv=none; b=UCerZS/EEHQsiaD3M9WACVmtRseEj53R4h8Bls09D4dvmUyzI/pTC2Jv1b2F375rVi8jXy fcZIbkvjSuEjoqpHgpM+SM5mo/r52+ATVu0Y7O89L+b5XZoWWvoKDY6qBVK9BW3a8cm+GR Fmjx/tWyIH9nbCR6PCHyYxThm28jRyDGFwWxYVlC8Lw5gO8ePj4hYLfsu3ruEHbipSkyj4 NYa7hOpvymMpyaPZvXtHuL4wInks6KO+5Qcew3s6zqD1bCGDd0FkPWQuG+/8ti3qe7QFIE rcG8Z36LmK3o0iEJKCmGWCG8nR9MaSrv6c1sogK0RLredmd+iHEwg8074ZfOdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rA0rCNUNzUcDkgOv8991jUpQe62B46MQQHBYy6rwWQ=; b=KI+2FPndSbjmxQqA48Nic4iNgTnu4uLnGtLh4KtMyiCXjI3cnsp703ZL0TzlvBhxQrnQvZ vBCBL+oBxw8TWO2senJLaEwCsGwPBXAu4vVO7K0IGJQOOGiejtTcpZCKhUXC1uwAozqXul /BrlLqDSulVoEw6GLZNzrMAraFu5/Pb4JbyGCU9tWW/M3sqdkjS2Vkt8FvcBweAeXUkblb 40Tgp0mSJEyVXz08pxewChwOHzGSmcEusK8bfRR0WUGOqrLMyCi4z68wkpAAE5bOnlWUTS +l+E5vEqQUL68nEhl192he4Go6trIjGrTb7zHXRkxlH0XEAuB6bRyY9nu5HF9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slN4FC6zbV1; Wed, 4 Oct 2023 11:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BO0Ru085377; Wed, 4 Oct 2023 11:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BO0jC085374; Wed, 4 Oct 2023 11:24:00 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:24:00 GMT Message-Id: <202310041124.394BO0jC085374@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: afc5d2b0d0ec - stable/13 - rc.conf.5: Add /etc/rc.conf.d/ to FILES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: afc5d2b0d0ecda6fce00a56ec08d6cb1ee7a472d Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=afc5d2b0d0ecda6fce00a56ec08d6cb1ee7a472d commit afc5d2b0d0ecda6fce00a56ec08d6cb1ee7a472d Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-07 18:07:43 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:15:21 +0000 rc.conf.5: Add /etc/rc.conf.d/ to FILES While here, fix the -width argument. MFC after: 3 days (cherry picked from commit a6e734d779b3b5f5679588c1e6f66d0d1533fcbf) --- share/man/man5/rc.conf.5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 035cd20631b5..666ccbbc6b6e 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -4715,11 +4715,12 @@ to unlock an encrypted dataset. The default is 10. .El .Sh FILES -.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact +.Bl -tag -width "/etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf .It Pa /etc/defaults/vendor.conf .It Pa /etc/rc.conf .It Pa /etc/rc.conf.local +.It Pa /etc/rc.conf.d/ .El .Sh SEE ALSO .Xr chmod 1 , From nobody Wed Oct 4 11:24:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slQ1M59z4vknj; Wed, 4 Oct 2023 11:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slP6DL9z4cZN; Wed, 4 Oct 2023 11:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gj14O2ehaRViQw5H4kYzfd/gw0F39UUJ4JqlRqqdEBk=; b=M+PnTw30/dMcPa5SdrD1++/mYLm7O+ALy7npUUel+k9bsQcKBx7LPeJBJnkkggKyay0wGJ JGU1zJ2b2vyFyKdD1CEwkqdl2z2HEscyl45RnWFv91sm0cS6n+w4MHrTcT6k0iLgTXD8zv bb79zhyXVfb0TLWLgyj4snrxEXqV5nwSKCKvAVuCVCWV029ibSqDcVLTyam34ScGOOco4m QFbdsmyU7cZDcYPtpOTF8NV1kRxD2JaAm5opuJqweR4oPBHL8wnaAzImbxNvUedmaTCXPW U8GfnYNSnIsEmEOsBJQNGIlMYbGZUBbhxnHmSGPe/9fMQ0sa3mrqTEFAIep3vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418641; a=rsa-sha256; cv=none; b=fD6Wo148P79/KRGws3w8f9Sat08Qfg650wdgVtArSfM37yQmD1vXIkxxUOHGnIGLy5dGeo V2czbxnEQaJnIJCLx58HZgC0HDx9tFq+dY/F4S7ED10gOO+bNJEK02nx7YGLUy5Zl1qDj1 2iW6k/rnYDEArv29WWxqwluxinltSTd+2ZYke2iIHNQlMRSxJC9m4SjMWhzNK4mInUukar 0ZsGfosxi3EuJLrUZouLT9vOOQFvwJrYmqjvvukhN2H/I9+2Ft3sg6aZNW7yINH6LK4Xk4 nVzDeoIDCayzSuhc2DoTz3QXAisp0xL1tZpyM+ljgU2Y69TnXtbnmL/ldv5rHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gj14O2ehaRViQw5H4kYzfd/gw0F39UUJ4JqlRqqdEBk=; b=wchUKFWDiSS3p277EMf0aO75aCm6QicaYeDP9tUB/ywB2BCr4FM7d/y+8HDLYVPL6bc1qH tYGhgAfxMLlUey8WFCOMOc5jw+VRpyDAtv/PTZ8vZZ4nD6kQX1jnm8Wu2oeS1igHPJn7o+ HuKfLrRe/gv2LgHJuFa3kIuQMyYau+Hj++0zOqhyOrD1h3aHoZ9u2favt5rZr/3MVjwnJx VDnkZBh1NwantgsWf9DeU2MviqWAvP3ORBogBW7E0OL0fibsaJ2uxuAIcNRude+/6GR/nM +bcNGh7ziPh7S0Kx/MXEHUbYRmMNGFNZAQiOmpx8rzkio1pF4ZnNOUMBZEEjeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slP5L9Bzbc8; Wed, 4 Oct 2023 11:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BO1pP085413; Wed, 4 Oct 2023 11:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BO17i085410; Wed, 4 Oct 2023 11:24:01 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:24:01 GMT Message-Id: <202310041124.394BO17i085410@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: 41d03ea794c5 - stable/13 - banner: Correct history. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 41d03ea794c569c4a2f6ea386ea96e62c0967cce Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=41d03ea794c569c4a2f6ea386ea96e62c0967cce commit 41d03ea794c569c4a2f6ea386ea96e62c0967cce Author: Warner Losh AuthorDate: 2021-06-21 14:16:10 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:17:44 +0000 banner: Correct history. Banner appeared in the 6th edition of AT&T Research unit. It was subsequently on all the Berkeley tapes, as well as PWB, System III and System V. The PWB/AT&T and BSD banner programs were different, and the current FreeBSD banner program shares many elements of the 3BSD one, though the font has changed. Sponsored by: Netflix (cherry picked from commit b77e235dd52a682c11ddd93256b3848cdc6f1d72) --- usr.bin/banner/banner.6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/banner/banner.6 b/usr.bin/banner/banner.6 index 2a5cbe599c9d..a1a8e9f0b379 100644 --- a/usr.bin/banner/banner.6 +++ b/usr.bin/banner/banner.6 @@ -27,7 +27,7 @@ .\" .\" From: @(#)banner.6 8.2 (Berkeley) 4/29/95 .\" -.Dd May 26, 2020 +.Dd June 21, 2021 .Dt BANNER 6 .Os .Sh NAME @@ -63,7 +63,7 @@ suitable for a narrow terminal. The .Nm utility first appeared in -.Bx 4.4 . +.At 6 . .Sh AUTHORS .An Mark Horton .Sh BUGS From nobody Wed Oct 4 11:24:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slR2jq8z4vkZm; Wed, 4 Oct 2023 11:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slR0CW7z4cmW; Wed, 4 Oct 2023 11:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOUluiEStHWQrdj1RRQ3pcxsfofHg/KUbbmWwS9J2Gk=; b=arYuBKra0UKCCsmGZI7LiKXBPVJacM0ogLRn4VfYAkSzoWWi1KO/Eza1n/PSKwKlOcnxR4 ozuNh0fhWAGqeL2mQ6R1OeDejU1FguCnutRtFAmlRCgFxuE+LhcQlxnAqqUPZER2ARfbi3 sUd3vNf7Kx5U/dNomXknM2xKCvOnWDnLweiAsn6/I2LIwTg39PRMy0Vyft1VsuS52tKlcl s5PWUeNATOzNj6oyAKWUmq3JOjts1KZYaAC5R0jiZuoT+vUHOrmey/oLqf5RAL3hyLVy8L Ng5ce/JREtZQ5nBscv2ACpSJg4/JNCIp1+/SzOwEFoMu3jmLhBUrtoIQikSoHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418643; a=rsa-sha256; cv=none; b=lwNSSb1eHeD49D1Y5mYYI//G8ZaJfpDn6eqYa652eVKoBWxyREelkQHuq/FPpAE/a8HvHc uS8aiHFSnLOYQ5r+Hy2gT6ZttbKSn/mmo8u4F4o4bKoIc9BG0NgeaTi7ntodwaaQdjBI4X T0j0sNuVJH2BwmLR9wA6cl7ZwzVSwl8lA/vur8IuZMOBaXj2IQ/t3jw4Mnc8U7wuJCMmdZ mSFgm+ES8mWhvk4MBbtW/uFNhxq2dX/kz7MEhyn2UaRyXKAUTwvRaJ7IFa0CUEbLu2np4O lZWLK8FP/be8EVQVcWJQ8jTNm5GYcRb8I3I5pYHQbdk/6zkd5WA/MVCO8kSZbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOUluiEStHWQrdj1RRQ3pcxsfofHg/KUbbmWwS9J2Gk=; b=L9XEqfkM6mc8kiY+4DnGiAO4dEW+DhMURnfn4S61PQy5918Y2viDmzapCqCDg3cK4oZ0Kq K+P7Qu8zC+MHgLyxerLkr60Oofj4qZ3goXwFEF8OEdTYc17qlO8LtwSX0roITMnw0bDT4o MnFUSvv1hNVUtjLFugBo2VTYFZKQjCAQ0ixrK/WeN6SjFdx2R5s4PRpYd9YimE6Wh6YNwm Q9yAPKlPMI/L0+N8oXER5q6SqI/nSefT5fqNEFvI1RGXnkToIiF68HkQlWsmTc1bfh7f9O 0I5xm7TO7nydVbyr4mEWV4hLTWx99lKsxz8yBpUOPsnqWUCHNwjCtCEHAw6jhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slQ6R5szbkc; Wed, 4 Oct 2023 11:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BO2nO085449; Wed, 4 Oct 2023 11:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BO25m085446; Wed, 4 Oct 2023 11:24:02 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:24:02 GMT Message-Id: <202310041124.394BO25m085446@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: 5d26c78b507b - stable/13 - basename: fix history List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5d26c78b507bf76353b339a78623851801842e94 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d26c78b507bf76353b339a78623851801842e94 commit 5d26c78b507bf76353b339a78623851801842e94 Author: Warner Losh AuthorDate: 2021-06-21 14:23:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:18:39 +0000 basename: fix history Basename(1) first appeared in the 7th edition. It was not in the 6th edition, or PWB releases. It's on all the subsequent descendants. Dirname(1) first appeared in System III, and was later picked up in 4.3-Reno and 8th edition research unix (though was not in 4.1BSD where the bulk of 8th edition came from). In System III and V8 it was a shell script, though the BSD version is in C. Sponsored by: Netflix (cherry picked from commit f394c73666ba375cbd6114950b1b1ea5943185a8) --- usr.bin/basename/basename.1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/basename/basename.1 b/usr.bin/basename/basename.1 index 9d459abee4fc..d15de2c19edf 100644 --- a/usr.bin/basename/basename.1 +++ b/usr.bin/basename/basename.1 @@ -30,7 +30,7 @@ .\" .\" @(#)basename.1 8.2 (Berkeley) 4/18/94 .\" -.Dd May 26, 2020 +.Dd June 21, 2021 .Dt BASENAME 1 .Os .Sh NAME @@ -113,7 +113,9 @@ compatible. .Sh HISTORY The .Nm -and +utility first appeared in +.At 7 . +The .Nm dirname -utilities first appeared in -.Bx 4.4 . +utility first appeared in +.At III . From nobody Wed Oct 4 11:24:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0slS2GvJz4vkJ1; Wed, 4 Oct 2023 11:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0slS149lz4crS; Wed, 4 Oct 2023 11:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+A03gZZLZ/gwroZqkPDuEZkWxQtNwnxXZ0HHxgbpxk=; b=Y7qFF04pYftr0v/CpeJ/QFlIyYwIvzDNkbqRky6bVadiSbwKN/0jUN+nQYVUQSPhixe7+S chXpzbQ0G2fo38gqcI5WrnxFifSFaHebb1BYchbt3bd3sD8icJ0P4msZ9Y57Fcf0h3on0L f+ozeLxQDfSu/tGznAvM12OupCShEUct7pZEjS0/ua4/XVojBngG5VD3c/X+uTOn4cePTk N9lZNUqssUqJ40afGr+NVhPgjj4fgibgQgK+Up/Gv0NzQGoZ1qQX1X9XXuSfrpPAqunyDE ICmT5P0pcz06FShBgawkqnYXMttu9bpKYg/zIDdFT9CelVvSu9qt2ZEP3SP1Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696418644; a=rsa-sha256; cv=none; b=A6QMHLOMY8jrABgP97MY9DocBO/tQw+o07XfPubI2hZj4VF3XbuiWpg/58oML+u4l7KYvh jc21gUlVVjy0qEjuoRO59OYX0yKDRy7HKANCssUEYyggjDV3JBq97J7lAjuTo2awbghliS pkC6lfQKQI+BCW6AW9dhf75WeVn51ypw4tqDr/kw3QzwNr38t8HeTfIqPkJanfciusJABy cbfLk+k34m3leEkct1bWWdBs1Y6DchPCemMFD8GDNlgYj/dsge9rbK3vcBBpEfmUjvB1Fm SdjLEKn9P7x/dyA0H740BQz/RGRJi6Kk7YEV0RhL3JTODNRh2hteQphVqUThtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696418644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+A03gZZLZ/gwroZqkPDuEZkWxQtNwnxXZ0HHxgbpxk=; b=Otu9Gl5TcCOXmaPDrr3yY+TPF4dC5KHLNgGsUOGX7DJKDZZIqKddfYg5Ec2OJCprfeM9dW kjrtIyGdA9SEt86m+3NHWBUZNUGwtlbBql/uDHEIp90bzJOqmWFfWZ7WhQJ0LHXaNPJP9B 5ax0i3sD5cwcdiS2+WDpeEXZCdmxjcV7JTEBDRPXZ1UFlPaTN/wS2NVqtr5FNNso+GeY+I MRVDsK+tRSHOgrjYg7FDp4l3zDWvrkgc4rDFZ39r50fBkHPM/gl1vle50G9pM6mLYzixfH Mq94LOi+8cF9yX4vEYAgMxT4FYhmTum7OZHkfPM1QPKKQcWjayAeJ2dOAqs8PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0slS09kczbc9; Wed, 4 Oct 2023 11:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394BO3JS085494; Wed, 4 Oct 2023 11:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394BO3rM085491; Wed, 4 Oct 2023 11:24:03 GMT (envelope-from git) Date: Wed, 4 Oct 2023 11:24:03 GMT Message-Id: <202310041124.394BO3rM085491@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: db91ad364211 - stable/13 - manpages: Fix use of At macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: db91ad364211e68e44661c0e0018bab14c824698 Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=db91ad364211e68e44661c0e0018bab14c824698 commit db91ad364211e68e44661c0e0018bab14c824698 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-03 23:03:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-04 11:18:49 +0000 manpages: Fix use of At macro The versions for the At macro from 1 to 7 must be prefixed with "v". MFC after: 3 days (cherry picked from commit 8b73b57c1b4bae9c9862d7655f86d1610f32f083) --- usr.bin/banner/banner.6 | 2 +- usr.bin/basename/basename.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/banner/banner.6 b/usr.bin/banner/banner.6 index a1a8e9f0b379..8c3ad5e29bc3 100644 --- a/usr.bin/banner/banner.6 +++ b/usr.bin/banner/banner.6 @@ -63,7 +63,7 @@ suitable for a narrow terminal. The .Nm utility first appeared in -.At 6 . +.At v6 . .Sh AUTHORS .An Mark Horton .Sh BUGS diff --git a/usr.bin/basename/basename.1 b/usr.bin/basename/basename.1 index d15de2c19edf..2bbb31e16094 100644 --- a/usr.bin/basename/basename.1 +++ b/usr.bin/basename/basename.1 @@ -114,7 +114,7 @@ compatible. The .Nm utility first appeared in -.At 7 . +.At v7 . The .Nm dirname utility first appeared in From nobody Wed Oct 4 12:02:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tbT1QS8z4vnjb for ; Wed, 4 Oct 2023 12:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tbS6fC8z3Gkc; Wed, 4 Oct 2023 12:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696420932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cq2g5Bz1wJ11Wu852eOCAGgeO9YYip3UDFQTJ4ykcBE=; b=xas3Ger16tmCqZUvsxQHtbZ1GsEeGxjpcmcAqYZUD8VNhhrh8odGPmRSYVQnYabjAXtDKP xF0QacxJOdMDkLq7Q3t2z+Jx+IpM4v5RIgnMybtxco/YbhxFAlRQ1NfJsz2fhHRKHimrHo Gnk1oE34eyQLLxXBO1G9BdUEmCcUuKpBmqO0K4/pIsJMDVVCf3ppaP1cV1c2GCRZ7GU+e1 7ddvf5dz4WrApCXaCXpqYEn6OS4WbxaTOSbZGVbyjQ7ofyybYyxHxG0ayxtwPQl/FSjQbF rL5+AslmAPu+X5sm+ciGsTdEy+0wOSlC5ZlgqqmrFKW1fPrUvkEclL/C2jfDiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696420932; a=rsa-sha256; cv=none; b=IClzWoZD4zdIfArRAeRQD3POp2ZU3puIX5O7KTvQHCIp8cr9W+/t31naSns/CZjzebWt2L xDI/g5MtxY0dwB9zre07JoGNE3Cd/Uu11H2ZzT12fiazkd6nByKkMq0AxjC/xMtWHmTsRs MCUMjxcc/3H3Y1jpzFrGMKL93n/gwnwmIg8YHXHk8It9bbdZRU0KACV4hElv7QJNt8lZOs IkvB9S5D8LMlF7I/KkeIt8u3373afPTTkWXy0qsBgkuq4dCezxQ4L+QAozDxnwYPm03Zc8 6aYRz0U/mk+K+h2Hj3/6G8Ba6ZENJrCUu5O18KqrOwqyTJeGFRLgMtWUcQUP/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696420932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cq2g5Bz1wJ11Wu852eOCAGgeO9YYip3UDFQTJ4ykcBE=; b=Q86wzp8q4b16+YGgruHQZLf+hXe/qkpJO5LOKS5zQLjOf96xdy9EDvT9OJepcJhB9RmFqC NA0LVOSSqiPhOB/feYCjTkZiq96ujq0uASWm1T4QYO6Lp3hwunwOqQpTDd7L/lzWw20UrA hs8TSMGuoPf9Ur9z6NcX8IhwUr3f5sHNShds6NZ8y0OPcGzI5EZc6wmqKU/fUX1c6A7fZt MP8Jbei518ei30JD/Fwjwa/mkKKUvrSLYCqmKoqheL4YcYmkTCe+pwTZPrc7FLNlmqRV9g u+3Dxfge8401xk+yG1eOF6Rxs4bXYzAGO5ZvzRCJyMyiQCthEQvi1xOFOFY02w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tbS5lm0zcTj; Wed, 4 Oct 2023 12:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C2CUk051877; Wed, 4 Oct 2023 12:02:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C2C8K051876; Wed, 4 Oct 2023 12:02:12 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:02:12 GMT Message-Id: <202310041202.394C2C8K051876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: e13538856479..f795e90a11c6 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: f795e90a11c683d64bacc260fb7feab705b220b1 X-Git-Oldrev: e13538856479ff79ca6642e53dddf8a593deb2c9 X-Git-Newrev: f795e90a11c683d64bacc260fb7feab705b220b1 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=e13538856479..f795e90a11c6 fe4d055b36b8 Report ashift of L2ARC devices in zdb 249d759caf81 Fix invalid pointer access in trace_dbuf.h 4e16964e1c15 Add '-u' - nomount flag for zfs set e69ade32e116 contrib: bash_completion.d: make install destination vendor dependent e14293a4e56e contrib: debian: switch to dh-sequence-dkms eb955f6e930e contrib: debian: drop bashcompletion mangling after install f795e90a11c6 Add BTI landing pads to the AArch64 SHA2 assembly From nobody Wed Oct 4 12:07:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tk12Qkcz4vp3k for ; Wed, 4 Oct 2023 12:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tk11tScz3H9g; Wed, 4 Oct 2023 12:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Iv3+tJvETfrukR5UeUT5ZVMvRFFgVeUh1R/qr7WJsU=; b=NVNJJ/PaJ6jDqncB+/irdHX/yUNUt+hPcnSUiocQuY4zdiF92yupVtBB09DGOaBBUm/Lef LYUGT9YifkpMuJ+rAx8lzga+bD4rlTWH+EtQ8aQAi7902nOHWh5d69goALYiYg1LDrRVdx LsFhEbiAEJEI+q9cmbA3qNph9DrBu6NhgYBgRtIJDv3a5y7p1S0WdjZdYU3ZC4bcP4ZmD4 9iJXab2crSn7POudHlVAwzq8I6k7jjfVdAi15aPbvs+CHVaIMGrTqUupfVZLVqu8UZFIFS ys6RvDaUqkhfCU/dHTcXnvO9v2jkc2r/M8fqWrs7Es0cs/w9i1b7MkZy7nV25A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421273; a=rsa-sha256; cv=none; b=byIkbUih1PTdXC4xVxcBMpWcWJkgGYt97nSoi3SUasfH7qa9Vk2naEHhqfknxlXJ+WUFe/ kML5N33m/sbs8BXhIiws2lS/Y9nlWbtkmT7NU9VFLsUBLfnhRMtpRgsC3PJUp0IIJ+4eWo Khe4ZjtA0WddB/XHMnqGgrrJ5GihE+EnwEGXrZ7+bnwslFIwg1MZM82OboavUDd39yMTRX Qy332c9Y498NasCz+pam0VxUFCjkBhHv0479pyoGTzulX+x5TTQl7dfNqVe9OeVliKvihO 0HRWmCjwW7UuwlG6IO/72IByRkVBW+X0q70iQ2izO5wR1YaNA6eGA7LMxluGdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Iv3+tJvETfrukR5UeUT5ZVMvRFFgVeUh1R/qr7WJsU=; b=hQPVWZqtcWwmABdNg15XSh2clZ9n58agJJfF3LaAVlXUKHH/J9iaK8gMmxsYj+iMiLbfLa hEas0NjlBcGOQ4GPHimV1Z6C5w/fHt9tRMiEvsIz5Yo/s5x5G6TANVrvtMJHIHiFtAJmub HvVKNna9xFGAXKas2zDXMmiBMjBd7hrjy4YeNhdMbDIBfwGQRrdbdxdrnq66woBmwj7oBp qyD8BqkqsJDItTi961r0VgHt9Ei05BNpYqegJV1KQdRsf2dQe88yYt/9fTvL1m7e5ML8dI xh9PSMqd9oWxywBsYs3/oRi1tUnLXcoea9fuz9X0rKG9X3jiZsQ+MNVBWYS6tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tk10fg6zcV2; Wed, 4 Oct 2023 12:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C7qcM052742; Wed, 4 Oct 2023 12:07:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C7qhV052741; Wed, 4 Oct 2023 12:07:52 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:07:52 GMT Message-Id: <202310041207.394C7qhV052741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 78f30535bcdb..b3ced7f26826 - vendor/openssh - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openssh X-Git-Reftype: branch X-Git-Commit: b3ced7f26826767e378a5970a65d875fc1cad61e X-Git-Oldrev: 78f30535bcdb64cf743b416327ecb0f00e25b2aa X-Git-Newrev: b3ced7f26826767e378a5970a65d875fc1cad61e Auto-Submitted: auto-generated The branch vendor/openssh has been updated by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=78f30535bcdb..b3ced7f26826 b3ced7f26826 Vendor import of OpenSSH 9.5p1 From nobody Wed Oct 4 12:07:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tk75n5rz4vp8N for ; Wed, 4 Oct 2023 12:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tk75BNpz3Hdp; Wed, 4 Oct 2023 12: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=1696421279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWAUiQArMO3sTFaUH2+cr2xUVXe6cTouUEZqsbPoCJ8=; b=ksbkZfqDn2Mq7WsXN/EUCl2pey0BmU22qvm5DnH7dNTwQklnGjc2mT0wDJ98pJpL4FrY9F YRv3XMg0pZMQHp+Z6TBguOa6xqDsY4m7x/FR2kdY6uJlDjz0cxFehkaTVUCl1tjE58an7h acr5k+OzenpmGiPZ5lqvGZzPQlXNXMCbcSN4zFgyr9nXfIO4WVnZvr//hMP4lv09NCfVx9 BpdrkqUBDzl16fEP8PqZ1zpyezn/umsV2aaXfgj42irLEXe4ybp7lIyv/8H/19wWBRQPY1 BqS3K9sJmHFoIN+PRIf0DFbW8WGoBRdnv8SunWnirteHk+U72i//qR02me5SXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421279; a=rsa-sha256; cv=none; b=QDGGdbdUAkEo5YYDIySoBnqU8BWuVVpjpe8D38wdHAdJAiHdUpCIX3NZuPg4fOLtcaB3TR 2beXWf+J4nNxUAASToAnybX4n34MsEpqaGPggXalREQTSJjiMjkGoYhtPzagiRb3zjZME6 6l8Jgypc1fVheqoPqyHY2z3re6bx4ztWViO2wH8aWjYE9yVS9J3ZOUN1jrYMG1D7d/9QUT 7d9uX/R07ocpjmJWUG01anuKb0ZXJxiuHXL0/JDQpNq3WFMb40Wi7uVPn5ioobgfWrj5/+ /v8f6hykSAzcnOGCWpu2WYEsJ59aQAu4gz3E5Wa2bytfV9nIt1tT5kL35zPKYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWAUiQArMO3sTFaUH2+cr2xUVXe6cTouUEZqsbPoCJ8=; b=Rn9n90CEhPgpXksOj3z0XyJA1gJqdwT3Mv1IRKzFQYmT3C9DHHuex99JMi9ejs9IVr+zP3 vsku0aU5zWrl5R00wwQsOQJMWfiiwS+umBdRqCLZUMOQal2ssBR+MtSANWXN6LtwcbOTw1 D0jh8GN02Yg0uZScBccKjvjGmig85jqzLkxG3mXDgXe+H4GW7f4rSs0bdebdyeYTNx2yaJ nEzxjU1x1Ns/hV2EnmK63SKkykH3aiThz2Q+a+jrtd3QcQhGYvFb+sTI28mywcSN1ka0Mm d00VjTZz/ZFqAZCQlbXSTO18gUgWD4x+6mK2Ves82t36kuIu/ZRXSTkmYpXTsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tk74FK8zcV3; Wed, 4 Oct 2023 12:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C7xpn052845; Wed, 4 Oct 2023 12:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C7xN0052844; Wed, 4 Oct 2023 12:07:59 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:07:59 GMT Message-Id: <202310041207.394C7xN0052844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 765e38619023 - Create tag vendor/openssh/9.5p1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/tags/vendor/openssh/9.5p1 X-Git-Reftype: annotated tag X-Git-Commit: 765e38619023559f45e1737250dea45a87db9ecb Auto-Submitted: auto-generated The annotated tag vendor/openssh/9.5p1 has been created by emaste: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openssh/9.5p1 tag vendor/openssh/9.5p1 Tagger: Ed Maste TaggerDate: 2023-10-04 12:07:43 +0000 Tag OpenSSH 9.5p1 commit b3ced7f26826767e378a5970a65d875fc1cad61e Author: Ed Maste AuthorDate: 2023-10-04 12:06:41 +0000 Commit: Ed Maste CommitDate: 2023-10-04 12:06:41 +0000 Vendor import of OpenSSH 9.5p1 From nobody Wed Oct 4 12:08:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tl54Dvqz4vp1d; Wed, 4 Oct 2023 12:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tl53gPBz3Hlt; Wed, 4 Oct 2023 12: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=1696421329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAGinDsszOYA/A/pCbmrodbNuLMk/es6iJ/R9qm+TzE=; b=bCTHYHOcLi1vKrmSTh3kykTzrp+FZ0grDuLJeCMEa8R8ch1UxDqxCLK8dtnD5sKuzUEmWL wWwNzYkSFFtn0KSyszWnhGy3wzgEi2Ho/5IJr+HTRrxARYykFb1x8E1AxVI+/+T3NjZbAm TQ55fxTTaWQeEOpiiz/AZQat10Avo+QWkPa8u9EyFul8KdF2j+Uk49cfgz9Pyf6bic6EFi P7XhbscxmREpSQkvC3OMwfCtTzYdlQZ1E3IhY4CxZht1m8UwZm6LR6C/+Z7HO84xudYbB0 XV0t3GDFoAmzo1F0nLBd3gT9sqYTJNG1i6d56uB7PqrINgWZClfRfBmn+rt1GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421329; a=rsa-sha256; cv=none; b=Tt+axftRG0Q7P+W9lozRawo/YEbytpqI6V+YM5oW34/33ZSQo23PjPCgffrAYWa00xuBZM itM13rkuOoh0TnwxRZogH1bvod5THwkwULp/40WFoOVVIQXQIYVe4mjw6CGA7DxAO8TpL1 tLJQZ/eUnMdn7lFDWrWPhYRjEb4pQtRMPFqir4j6SOyuTeswntNpcxzqG77I5ZESAvFCGn 1fJGNOdCw7q8WTm89yqJAgcbMM3VdZJX2usU9n6UuYxSf6c7wStO/rKSUPPRbeuU+3nHpk qAs8QoHkl0gUc0ZzRbwWR6SduECkGQNzfOA3DYXtjBq7ML7sVNgba7bNjHoATw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yAGinDsszOYA/A/pCbmrodbNuLMk/es6iJ/R9qm+TzE=; b=Y06OHH/ZTjZ+Shx8ZW/6GFOuVhlNGZC8dwJb3mqYooIemFQgCSU6/q9hdCtQgp+utwDKio 2eJh10wI+xri3dh73leIIZyl/owcTc5HSdsa0Iwv6kSO09bx0TD/aDAFtRcBZKkevLFHUH AZ107PNp7r/YjKJJTZjZKnu+2WPqe1QXJpHnC1879Fn7nLTMEWppzZliZOeXL43bEWDjvX TbjF5V+yaLJpuP09v8wENDYnXPBWHLvcazkdue0s93ec0b0x4XBMuHVZ+JTsFr4YauEi4Z XQfF7lD+LJACXkDW3mpVq5g2/T2GI1xKh8w84TsrpTg6FXaLZ8t+y46NGUyVDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tl52hd6zcV4; Wed, 4 Oct 2023 12:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8new053134; Wed, 4 Oct 2023 12:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8nbT053131; Wed, 4 Oct 2023 12:08:49 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:49 GMT Message-Id: <202310041208.394C8nbT053131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 21a42a7c22c9 - stable/13 - vfs: drop one vnode list lock trip during vnlru free recycle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 21a42a7c22c9bf921ba9d250c81bd41e70c63ea9 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=21a42a7c22c9bf921ba9d250c81bd41e70c63ea9 commit 21a42a7c22c9bf921ba9d250c81bd41e70c63ea9 Author: Mateusz Guzik AuthorDate: 2023-09-14 14:35:40 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:15 +0000 vfs: drop one vnode list lock trip during vnlru free recycle vnlru_free_impl would take the lock prior to returning even though most frequent caller does not need it. Unsurprisingly vnode_list mtx is the primary bottleneck when recycling and avoiding the useless lock trip helps. Setting maxvnodes to 400000 and running 20 parallel finds each with a dedicated directory tree of 1 million vnodes in total: before: 4.50s user 1225.71s system 1979% cpu 1:02.14 total after: 4.20s user 806.23s system 1973% cpu 41.059 total That's 34% reduction in total real time. With this the block *remains* the primary bottleneck when running on ZFS. (cherry picked from commit 74be676d87745eb727642f6f8329236c848929d5) --- sys/kern/vfs_subr.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 209d6ac37cda..40f7a6d33c20 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1278,13 +1278,14 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) mtx_assert(&vnode_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; + if (count == 0) { + mtx_unlock(&vnode_list_mtx); + return (0); + } ocount = count; retried = false; vp = mvp; for (;;) { - if (count == 0) { - break; - } vp = TAILQ_NEXT(vp, v_vnodelist); if (__predict_false(vp == NULL)) { /* @@ -1307,6 +1308,7 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); TAILQ_INSERT_TAIL(&vnode_list, mvp, v_vnodelist); + mtx_unlock(&vnode_list_mtx); break; } if (__predict_false(vp->v_type == VMARKER)) @@ -1354,18 +1356,28 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ vtryrecycle(vp); count--; + if (count == 0) { + break; + } mtx_lock(&vnode_list_mtx); vp = mvp; } + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); return (ocount - count); } +/* + * XXX: returns without vnode_list_mtx locked! + */ static int vnlru_free_locked(int count) { + int ret; mtx_assert(&vnode_list_mtx, MA_OWNED); - return (vnlru_free_impl(count, NULL, vnode_list_free_marker)); + ret = vnlru_free_impl(count, NULL, vnode_list_free_marker); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); + return (ret); } void @@ -1377,7 +1389,7 @@ vnlru_free_vfsops(int count, struct vfsops *mnt_op, struct vnode *mvp) VNPASS(mvp->v_type == VMARKER, mvp); mtx_lock(&vnode_list_mtx); vnlru_free_impl(count, mnt_op, mvp); - mtx_unlock(&vnode_list_mtx); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); } /* @@ -1549,7 +1561,7 @@ vnlru_under_unlocked(u_long rnumvnodes, u_long limit) } static void -vnlru_kick(void) +vnlru_kick_locked(void) { mtx_assert(&vnode_list_mtx, MA_OWNED); @@ -1559,6 +1571,15 @@ vnlru_kick(void) } } +static void +vnlru_kick(void) +{ + + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); + mtx_unlock(&vnode_list_mtx); +} + static void vnlru_proc(void) { @@ -1589,6 +1610,7 @@ vnlru_proc(void) */ if (rnumvnodes > desiredvnodes) { vnlru_free_locked(rnumvnodes - desiredvnodes); + mtx_lock(&vnode_list_mtx); rnumvnodes = atomic_load_long(&numvnodes); } /* @@ -1767,6 +1789,7 @@ vn_alloc_hard(struct mount *mp) rnumvnodes = atomic_load_long(&numvnodes); if (rnumvnodes + 1 < desiredvnodes) { vn_alloc_cyclecount = 0; + mtx_unlock(&vnode_list_mtx); goto alloc; } rfreevnodes = vnlru_read_freevnodes(); @@ -1786,22 +1809,26 @@ vn_alloc_hard(struct mount *mp) */ if (vnlru_free_locked(1) > 0) goto alloc; + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); if (mp == NULL || (mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { /* * Wait for space for a new vnode. */ - vnlru_kick(); + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); vn_alloc_sleeps++; msleep(&vnlruproc_sig, &vnode_list_mtx, PVFS, "vlruwk", hz); if (atomic_load_long(&numvnodes) + 1 > desiredvnodes && vnlru_read_freevnodes() > 1) vnlru_free_locked(1); + else + mtx_unlock(&vnode_list_mtx); } alloc: + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) vnlru_kick(); - mtx_unlock(&vnode_list_mtx); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Wed Oct 4 12:08:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tl65VVTz4vntJ; Wed, 4 Oct 2023 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tl64T0Mz3Hyg; Wed, 4 Oct 2023 12: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=1696421330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDc9Y/2q3KcFnS3Kc1le+XlTyD46WJXOK2prC3mke68=; b=JfADtfVTbuiF97ahdl+Xr7CvtLkbCjq/MytfxdP8zlPG7oTMezqeMfkzkX2xIJd6LRtPgy tTHpV1COEQPNo615tzXhggerX+WmH+3z4KOMuY+j+1Vqnc8+M48kpvSbtpvOliwa5BQ3wW +mmi9KojiJKiKvDxsp8wFkznrX81CLfaY+ujgaxXpQukrTCCwkTu7CqIsubL6l6JsEMnY3 kvUCfjrL/MEP8ZtUIV++UXzQCxNebTRAy7poCxNgD/OR0GZUnWLM6XvoMQW975vs4WRfcY Fy6gIgbVbSbu3bjNp9JZKmLCbVTv3ndHxOEMpXm2NhBJw3zsg3ulu0wYPrG3zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421330; a=rsa-sha256; cv=none; b=dHbVyej3bF3Be1QsJtCdcMOgW6omzlLamIjkek2Lmy03PDJCfKScpnKlUupMZ64x/Pqwrn /hx3WeNqxinKvh3KG/ngjov0THbXcgFXYek/OsTWv7TPQShka9i4sI8Vguj5cG8C2i8jmi NEqlpuCiX/abpNHh9fQGpr0lpgdBBGs7SLv74TwfaaMch8hybgnb4fAbOOsJRH3+GpTRRS IJjsh0agsv8WdA88BnaJ+zRFGmHpZOhU7FlMphOBdZGFpw6nbzuQDjoa9P3TzDxzBtKHHD vBoy/BOrJCx+zP3e+m3TW738lYK85B/bxqpDQJ1nkqZqhMum/pbNtnvD0cfyKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDc9Y/2q3KcFnS3Kc1le+XlTyD46WJXOK2prC3mke68=; b=X9wu4L1fy/+7ASwT1r2UvFi7h4PmZwpni0jFRItu8I2e5tXfvqFkSsJ9t/8hfeJ50ve7/V DEC5lZNBp+ftwPERq9ffAldcrohVfvcC5cu8NQQjs3CG1LeWmVnMu2oWGVKiSzlMtrwZB5 5y1tlvL5w2hE6dmhsgAokBas39PXxq4n6nhWs8taiU/KJNXE2mE4ev/iXvw0K28exoNzBF 4RXIt3GdvDlAHD74VaydNq3oSJL0p/NzDvjJMUKmEPILESpawmVH/J+vVZGvcDujO3n0ho /h7R/u6iHfYZpeH0hzsKram88ZGOw06Gj8sfNua5flKRvUBsn8pqJ4I9Rg9H5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tl63Z2qzcM6; Wed, 4 Oct 2023 12:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8oXN053188; Wed, 4 Oct 2023 12:08:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8or7053185; Wed, 4 Oct 2023 12:08:50 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:50 GMT Message-Id: <202310041208.394C8or7053185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 3a99c0acc1e6 - stable/13 - vfs: don't kick vnlru if it is already running List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3a99c0acc1e6184862ab83b173fe740ccff9c3f6 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3a99c0acc1e6184862ab83b173fe740ccff9c3f6 commit 3a99c0acc1e6184862ab83b173fe740ccff9c3f6 Author: Mateusz Guzik AuthorDate: 2023-09-14 16:27:47 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:15 +0000 vfs: don't kick vnlru if it is already running Further shaves some lock trips. (cherry picked from commit 76f1153790b6d2e1a4f0389c3ac24e41d08f9ba6) --- sys/kern/vfs_subr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 40f7a6d33c20..f58c8920dc4f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1572,9 +1572,11 @@ vnlru_kick_locked(void) } static void -vnlru_kick(void) +vnlru_kick_cond(void) { + if (vnlruproc_sig) + return; mtx_lock(&vnode_list_mtx); vnlru_kick_locked(); mtx_unlock(&vnode_list_mtx); @@ -1828,7 +1830,7 @@ alloc: mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) - vnlru_kick(); + vnlru_kick_cond(); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Wed Oct 4 12:08:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tl75mTCz4vpBf; Wed, 4 Oct 2023 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tl75GjWz3HxG; Wed, 4 Oct 2023 12:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd0D7zwQxz9L6Q+UfBVk0T1SzMMJqkKZX/rvOPNLQM0=; b=CgM+WJQRo2pdDvKpeEsY2tYWegJfSpoUELc0GbtmleTF4whkQG1b8DgV6qAYmJR3SqTN8+ XU305FEBxQh3SRKtjO2FklxH8TtHzu5lSJkJptVBb9+Wxkoxl4LjHIZvi2ityUcmVuT/Pv 6Cg4B7gTPDh7J4vykFywQYUm0x3/uitPwGuQq6kBDmq3hszAYLtVeMWPSVwYPhnxaCZWb2 jx050oHd7gt2kyHh+CjtecP28Rxohh4HdoowXqDhfn4ogab8umJhn6l3d2ksE4XrJe4u3c DqAkTEwF9r6uYTIYU9PsKgk5NuVwt7dJrB5Q1tJhaJex9Fpb5fBtmvSAdzttgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421331; a=rsa-sha256; cv=none; b=h22KgH0DvvFW8TVfu2YfG5tIuRg2/0XYapB0orlcs9pgALrhkCXDMNCO1k4OZqN1qoKWtz fIpo4/FFaLsZmenj+4Y5OBYn62E9GccMOoRaSXHntpsw+npxUJUi+d0g1LaR+Wr+LvFjl5 s2UWH0tUoW1ee4b+sJqhlUwzNrlUNPHWrsr4qe9hA/kYouNqnnz/5NHCcaWinfpgXtRQrM D0nbBErss0GUI9TSxzhzYJ2C+9+1AYOz1IPtxiclE9w5Xe7mABDptWvN6ZL2AWZO/Afdt8 4EI3Sac1BdAzjeJjAnA7CrQk8xJYUnMcbkNe9oP1YQEUbWCyajVP9qVGwyIPAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd0D7zwQxz9L6Q+UfBVk0T1SzMMJqkKZX/rvOPNLQM0=; b=mNdGknqixOrysJ+aBMDnoX7DTqEyFHvczP9AymAWnK2kFqv1ztcW9IUeDMIp70M10/ROWW 7WduAlWIm/aVlOSlqUbxoKI7tBZrmAzOCuAQs2G6pEmym6t5EpvA7sxYjilUv4vLQSKYk0 TPejFqzN4btcbhILvAPDLJoeQ04fKbcSNJixpT2pNPFkNT0O+oaqCKcDYzQu0ih5Ynqkaj 8k2C16ewvFXqHpWcTPKXrf/zQyfIKLdH9AFpAQIsvAs6vS+pwhlDYHvVseClS8f6HrpskF 0Qp+hpTvfe80UMPGOhflwbWk8BdFeUBKVbgXyEU5eNw/I/sr7dea3p8aHG4reg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tl74MR9zc3W; Wed, 4 Oct 2023 12:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8pZX053236; Wed, 4 Oct 2023 12:08:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8pnv053233; Wed, 4 Oct 2023 12:08:51 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:51 GMT Message-Id: <202310041208.394C8pnv053233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 2167265cb801 - stable/13 - vfs: fix stale comment about freevnodes management List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2167265cb801f1eeea3a1dd768fa1d9779d10a6e Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2167265cb801f1eeea3a1dd768fa1d9779d10a6e commit 2167265cb801f1eeea3a1dd768fa1d9779d10a6e Author: Mateusz Guzik AuthorDate: 2023-09-14 17:28:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:15 +0000 vfs: fix stale comment about freevnodes management (cherry picked from commit 9dc0c983b0931f359c2ff10d47ad835ef74e929a) --- sys/kern/vfs_subr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f58c8920dc4f..41fd5052968c 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1459,12 +1459,12 @@ static struct proc *vnlruproc; static int vnlruproc_sig; /* - * The main freevnodes counter is only updated when threads requeue their vnode - * batches. CPUs are conditionally walked to compute a more accurate total. + * The main freevnodes counter is only updated when a counter local to CPU + * diverges from 0 by more than VNLRU_FREEVNODES_SLOP. CPUs are conditionally + * walked to compute a more accurate total. * - * Limit how much of a slop are we willing to tolerate. Note: the actual value - * at any given moment can still exceed slop, but it should not be by significant - * margin in practice. + * Note: the actual value at any given moment can still exceed slop, but it + * should not be by significant margin in practice. */ #define VNLRU_FREEVNODES_SLOP 126 From nobody Wed Oct 4 12:08:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tl873Wkz4vnyh; Wed, 4 Oct 2023 12:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tl86Fnhz3Hvb; Wed, 4 Oct 2023 12:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebp/+qN2Jxf3oblh2sgqfXCthVGfQ/HQkPsnuXrplsM=; b=M7hc1FJaHmNM5HmT5/5rnuXx2x1/gEC1V8N3NtI0iLlKgOOWe/qLQDubargmW9zRImQXar JMvrkRvpj5Dh/7GbgTzHbs7Htdbm6jLWdiuffjq4s7+JS19KcwfmzXw2sAs3rK/OMa/uPu rWQJc/boSXUUKHOLSnqZ6TH0YGs6HvFOFSSq7wFjOeS+03vz7hkMDPoKI9+mg3RNHRh9rE J7f0GOpo2RmaVDIe9YDGgFfVQ7J7+v5I+OtU0+fOuOiLt5l4PPjwOf3QyKP2FyWK9Zo9l7 Dl580GQZQhBFAaWnwIVfT7MqgyjdF4JRBU7yDkbwns1wGLSFMIY+XHTia1gNVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421332; a=rsa-sha256; cv=none; b=RV0F3QBSO+ZyJo59ieAr4Pyyznqppq/s/sDNbQl7bdpo0Vavx+zW1q3ApHdB2PuncJbJcL ckGZSWK6xrmIr8y0fg4HWA1ftu96jx8kDNNIJ7qguHyXL7VWzesI4kxSWgHy1aCc/JwOzo Q70H/PUWKCklw3EfVwPEKjdpI2fLb7lNO3Cw47xIBlOfRHtBt13F/teV4UF6recUS+OIXf BRrZ8XlADu/jOs994/lFudtu2Nc+A5wK9e6uXTpf37Z0i/i7cQmxpQ+uSlsuktHp/Q93Ep IDt7UbPoufHPDFK0m2mOsCrXUWf6SGBtnsT223JUSYgco23Gu+2WuD/u0EItqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebp/+qN2Jxf3oblh2sgqfXCthVGfQ/HQkPsnuXrplsM=; b=IBj48nPcYVsneAqs1oHMyJm5uaKgPajuWBUjwiYACCrcxzAaspD0jOrE+bjRkLd/V4xs60 zP213EJgkrFaOtod+VFoAOGQ2M1u8pJEycTZz/P3H65RMlhpxH0lA1Gpy9jim45IxFh7N8 Rhr/qjYPKC4lwAJ6Akydlp2y1WrDgCriuXSgc1A7SNNro5pUOFTPZLkmOzk8MfMzXxnB7a eJ7wQDdpuSQLMpUDpQwbAnNkomRpI1UBymQan5Cba0PTqiJa11L5kUgbGbK1UlqRwNTA0P JF3OBpEzLOXGKXIf5qRP4S3cE+kyM/uXj5tykwRLmlf6K9Xhul06kL0K6E4Pvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tl85Lw7zcgT; Wed, 4 Oct 2023 12:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8q5W053272; Wed, 4 Oct 2023 12:08:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8qhN053269; Wed, 4 Oct 2023 12:08:52 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:52 GMT Message-Id: <202310041208.394C8qhN053269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 1573dad63632 - stable/13 - vfs: retire vnlru_under_unlocked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1573dad63632b2545516e3aa9b5bfc9a0f06281a Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1573dad63632b2545516e3aa9b5bfc9a0f06281a commit 1573dad63632b2545516e3aa9b5bfc9a0f06281a Author: Mateusz Guzik AuthorDate: 2023-09-14 23:05:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:16 +0000 vfs: retire vnlru_under_unlocked It only looks at the centralized value which in corner cases can end up being negative. (cherry picked from commit ba5dc166e0f390c703042910b637a83c705c8af3) --- sys/kern/vfs_subr.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 41fd5052968c..04bc26014db7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1543,23 +1543,6 @@ vnlru_under(u_long rnumvnodes, u_long limit) return (space < limit); } -static bool -vnlru_under_unlocked(u_long rnumvnodes, u_long limit) -{ - long rfreevnodes, space; - - if (__predict_false(rnumvnodes > desiredvnodes)) - return (true); - - space = desiredvnodes - rnumvnodes; - if (space < limit) { - rfreevnodes = atomic_load_long(&freevnodes); - if (rfreevnodes > wantfreevnodes) - space += rfreevnodes - wantfreevnodes; - } - return (space < limit); -} - static void vnlru_kick_locked(void) { @@ -1842,7 +1825,7 @@ vn_alloc(struct mount *mp) if (__predict_false(vn_alloc_cyclecount != 0)) return (vn_alloc_hard(mp)); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; - if (__predict_false(vnlru_under_unlocked(rnumvnodes, vlowat))) { + if (__predict_false(vnlru_under(rnumvnodes, vlowat))) { atomic_subtract_long(&numvnodes, 1); return (vn_alloc_hard(mp)); } From nobody Wed Oct 4 12:08:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlB0v20z4vp8q; Wed, 4 Oct 2023 12:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlB05qNz3J6R; Wed, 4 Oct 2023 12:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHW7+htdkuGB3MFLq0rlOMghg17f0BHPeuNvcIgTsWE=; b=WswfLSv4NBJ9Q54BY+drIorliSDyFntsZzxMeuruG4dBeFYFgV8PKdYx3D1SPs8K46sfph XBB/rwg09U1fOJOLHw9D28cHIsckHKuW/OuekCjqzSC7CzgmNGve0a+ytECcUcZnIH5Ggw qjTUHlv2LyLZltfKPqr7cdZbdT/eZz07nQQ+9QTRnzxRDw0lFOGrfTPuB807/syykEPuky AK6yJSeIVgoinNlH9yI1ghN1vV9QFmubIyb4DitvCbdPMs4MCgrtVvmRGVQ+KX0dHycD4P F/dcEFEpwZf1tbZugEJ20qmORW7VVaJRCM2cpDMCIf6gvW9K1BVSMzgr1JEvnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421334; a=rsa-sha256; cv=none; b=j8hlqQvLwafcbuDuOs9EJXeFdMZbzyWACQti6So6keB7xRJfakqiZfcA6Mj/j2K+mg6CTd 2+W11qEh8Sk9fPCD7Wi+hJJRuDXW6RGOkTQ05wa3FuYR3h4l6vKqdmuGl3wQr1GRwLWJG0 pJNUmheVO3cTrpo6lYUUM1KIyABnqOgyZ5Wum+NYopAEGlYNQ+kVmPuoePS4Hdp39q2D8z dFVMFhN6bf+GAF3dNY5J0+8nGLuY6FU5qVxoPuadUIEkJBSIfFlsPf0phCt9fYwiZHrlW0 XHWxPcxXic9N0AehXaeQD/zQFxcFq7kS8TW/28Ye5aM3r7ur8LcA4LFijWjQXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHW7+htdkuGB3MFLq0rlOMghg17f0BHPeuNvcIgTsWE=; b=wvG74z/Iv0ctF2W5OMlSZyJwyRCrNg0IJFX+f6CE20DBB2n2HRJaDD29HYQVHLUEUEzBh0 y+J/BLhegIrcfxWLs0L8BZNwleI7AZEvky0TG986o1o+7saAYpGZUZhuj4rID/Qbms/mTi MbCIE1sFcWpZjs4jqsU+Wg5/zKpSlHeQS1ig5irJGYgIUtqsITDmuAWWfNMGFYUBCkdbhT rcAMNB++cpkefngQ0/He5kdN4lhzpoPvU3HFBSXnphX4nkImgXQUzOwhskbG/jqraG2Xfq AUu1XhPyLb3t9U09rQbNhvxyW5Jb1pwcshu/we+QFsk5+qwYo+X30498DNhh5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tl968cbzccN; Wed, 4 Oct 2023 12:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8rTe053324; Wed, 4 Oct 2023 12:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8rED053321; Wed, 4 Oct 2023 12:08:53 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:53 GMT Message-Id: <202310041208.394C8rED053321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: e863caad0e74 - stable/13 - vfs: use vnlru_read_freevnodes for the freevnodes sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e863caad0e749e0c1b9e18bcb97e52297c71acb7 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e863caad0e749e0c1b9e18bcb97e52297c71acb7 commit e863caad0e749e0c1b9e18bcb97e52297c71acb7 Author: Mateusz Guzik AuthorDate: 2023-09-14 23:53:11 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:16 +0000 vfs: use vnlru_read_freevnodes for the freevnodes sysctl For a more accurate result. (cherry picked from commit 03bfee175269960c67cab64d761bbb5eb9ac5878) --- sys/kern/vfs_subr.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 04bc26014db7..2fc5c1ef7a91 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -183,8 +183,6 @@ static struct vnode *vnode_list_reclaim_marker; */ static long wantfreevnodes; static long __exclusive_cache_line freevnodes; -SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, - &freevnodes, 0, "Number of \"free\" vnodes"); static long freevnodes_old; static counter_u64_t recycles_count; @@ -349,6 +347,19 @@ SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); +static int +sysctl_freevnodes(SYSCTL_HANDLER_ARGS) +{ + u_long rfreevnodes; + + rfreevnodes = vnlru_read_freevnodes(); + return (sysctl_handle_long(oidp, &rfreevnodes, 0, req)); +} + +SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes"); + static int sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) { From nobody Wed Oct 4 12:08:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlC3xdjz4vpBm; Wed, 4 Oct 2023 12:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlC1HVWz3JF6; Wed, 4 Oct 2023 12:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421335; h=from:from:reply-to:subject:subject: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/86dGbqBqYVv+Q/RTAM3IcZlVAJYIoMv304aUdUJRQ=; b=s8JuZOxXoV0OQNcQYe448SLm+4OJkajXhuaOfx3fiT5A62rT9F4plWNBe4hX0oQYl07d5x see8ka2En5ZUBR31SKtOtwxbooNBFN1kegY98INipeNhQA62l2c4sOG0EKLXYnzEbDVtHw zISRYf4jpR2M/9sDI5T986R8dK+02JVD3gljGohmO3jmmvlOO0XkSHa9nC17IfgPxJgLRd y1LsPmkBjTqe88V8zzThWJchdgeL7Fp4sDTTeDT1RJG/bVB3GGUOjZcJeOpL6uXWd7xtpk yjyGg0cjpHv2OZHnskYNTuObEWH57hbbEniC/gUw8BHfDQeKuMaKVCBaMvjYtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421335; a=rsa-sha256; cv=none; b=qON+n36LmwHrdIzfmyBJW698uPiKyUBEu9MB9lPoyWAhkpnh8XKkHwpMmvYa4fjPxg0JZ9 SsC508kZC3fvLKXRafn/9h0iBd8Hb9PPWRbtAtwM0UrnZ43O4u9A26Pi10ui5yIPC5RVZd myKbrwBZJ/gUDnO+Z/CfWhFv+iniFVCSD1U02HqIRiGLw2oIQctjbeAVpYGWCXqoc3k7HX V71MVU3BWseyvuPuIYs/jK9UNjvLyAH3CqNEVnZBJFyS9ExRzNHRgHFzQME0JCMVou5i8y 4ucqMtG2dwc0hx8vfyfeyB6ooE8pNwcdrt8OEoxfqOyLATTP9VpWWZ8RL/afBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421335; h=from:from:reply-to:subject:subject: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/86dGbqBqYVv+Q/RTAM3IcZlVAJYIoMv304aUdUJRQ=; b=WRMdj0FVmAf0fTIFhGld1j5AHMhHZXRvaV/h4DIOy4KHC7aobl6974S2lCDiddp+s6vHqH W8b45JslWOJb9YZg0BDsreKwt3w4OADd52gst9FipSaMbPDv3hMBJiLwbXg3Osz9xO776m WFMgI03zCvBg6/8YeZmtLku9+l/1R05J5Nh4c0OjotjxCpHQ3BbsrBRyClNjvLa+p1QWxm ap1DkLDpHFhxuSxtUFP4r3hONW7IVxvjnSv+x+PRTQC+lWMsS6bVCEV1zym8/Yh3TCe8nF UbKWlQeMg3MUvO2Z2naIA3ubFH1PxbehzhfiuRYACAJSCyJ/SpzKlD92uxdhyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlC0FWRzc3X; Wed, 4 Oct 2023 12:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8sgd053363; Wed, 4 Oct 2023 12:08:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8sge053360; Wed, 4 Oct 2023 12:08:54 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:54 GMT Message-Id: <202310041208.394C8sge053360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 067133ad6024 - stable/13 - vfs: retire kern.minvnodes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 067133ad6024f5d41ed7fa34009a6bbf6b4ffc7c Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=067133ad6024f5d41ed7fa34009a6bbf6b4ffc7c commit 067133ad6024f5d41ed7fa34009a6bbf6b4ffc7c Author: Mateusz Guzik AuthorDate: 2023-09-16 07:33:36 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:04:16 +0000 vfs: retire kern.minvnodes It was marked as legacy in 2005. (cherry picked from commit 2a689cadf092a3319d7619c3f4aa242011c20c8e) --- sys/kern/vfs_subr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2fc5c1ef7a91..c41798c56e18 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -384,8 +384,6 @@ SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); -SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, - &wantfreevnodes, 0, "Old name for vfs.wantfreevnodes (legacy)"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); From nobody Wed Oct 4 12:08:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlD3KJwz4vp6R; Wed, 4 Oct 2023 12:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlD24KFz3JD3; Wed, 4 Oct 2023 12:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUcN/kKWa+sMgQ3uxU+34oWS5fL0naiXyAlxWADfJGI=; b=Vl3vh8tDlELpuOMhrZ0JUTyf1qAUeKxh6J1LwYk5VD6wEG8uikVQdzTRgd41Ur4vOzp4H+ 8pJP43DMaMyZs3v/JO+puP8Ydc6mgVTew+7+7L05ADLlCQ+BrmYlUlb3dlLohRh72W5LTt 9zJ9/Z9opaYTm6ugrE+4ZkbZsFCRn3d03dbWI/ePEL2z4JsG207HnI7huhglV5hsYXmjX8 COUy3dIYIufxil0o5AIbLNOyDhtSDEE7u/bxM0SAeTb3DVNP3YpGTQHhanSfZM8lFrlmkS n09Cq+6V4WvX1Jixo6EFVdRcuQ/Qsy/CfWSo4Cu9+wesqDgrTxIZ+Gi75+VfZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421336; a=rsa-sha256; cv=none; b=CB1Kx1/M/mM+WWAGZ3U3ftubqxEdMHVgKG67lPj/DsSZDBCTG5bpgGzv0FxRNsBoaLlmEV yROvkKKepva/CKXOvpNXnvAetjUjUWQkdUsyvYl2ycIri1SymyKj1PUuNEV9VmI4wEKzjl 1ilecbfDBnknvB9fYs91UIIXyCb5qM3BMFdzrD0Vhhzq4B6AgFCdmOT1qwszoY4afGQHex ELvES3P8baDhtOHV8BX0NGgQ6i7UY2bKkkTu1waPPreF8JZx07QzB+eRy4+l2nmOlcoOWs L/KAZTEEe8a690uuljbZsHUmLSd1cxhjAGHDtlZxDMoIoz5m2MhLWeYgXP/UmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUcN/kKWa+sMgQ3uxU+34oWS5fL0naiXyAlxWADfJGI=; b=nwhOGBzqGxazR91iOeOFECOdOxNll75WwIpbxWvd0VOsNLK1qMD7EprOBj0tLKwD0L3e+j qThm0Z+234aQCgS492H/OFPHZ2m6JNbn57kFEQIEnjh9+WRYO9DI3+mR4tjBfu1Hv7MNRr xws7V7NQ2nIBW9yKpdIvdHvlivOTziXo3YSIbv90Fh9EueCQTuKtl5u0xk6yRH2kL5zIxs dL5c9dzD78mh/DKaqbPjfckojUusb1czKjtTa/XzHharE76xVK2WgG8SwPjafmkVykLg5a kbyYBu/qe0hmlEaR1zI/vBMiNDjhqelcKbGCujrMY0/qRJzhdwlIv43nmnSYtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlD1BNzzcgV; Wed, 4 Oct 2023 12:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8uRM053408; Wed, 4 Oct 2023 12:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8uGP053405; Wed, 4 Oct 2023 12:08:56 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:56 GMT Message-Id: <202310041208.394C8uGP053405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 77a8bd148796 - stable/13 - vfs: group vnode-related sysctls under vfs.vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 77a8bd1487966357dcb16cc27bbf269d9922e5a2 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=77a8bd1487966357dcb16cc27bbf269d9922e5a2 commit 77a8bd1487966357dcb16cc27bbf269d9922e5a2 Author: Mateusz Guzik AuthorDate: 2023-09-15 21:08:38 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:56 +0000 vfs: group vnode-related sysctls under vfs.vnode Instead of having things scattered through vfs, debug and kern trees. Old names remain for compatibility. Sample output of "sysctl vfs.vnode": vfs.vnode.vnlru.failed_runs: 0 vfs.vnode.vnlru.recycles_free: 0 vfs.vnode.vnlru.recycles: 0 vfs.vnode.stats.alloc_sleeps: 0 vfs.vnode.stats.free: 1310 vfs.vnode.stats.skipped_requeues: 0 vfs.vnode.stats.created: 1686 vfs.vnode.stats.count: 1641 vfs.vnode.param.wantfree: 2097152 vfs.vnode.param.limit: 8388608 (cherry picked from commit d3e6478912431309aad36211b6c39b0d741312dc) --- sys/kern/vfs_subr.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c41798c56e18..8c8f69c88726 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -125,6 +125,15 @@ static int v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, daddr_t startlbn, daddr_t endlbn); static void vnlru_recalc(void); +static SYSCTL_NODE(_vfs, OID_AUTO, vnode, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration and statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, param, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, vnlru, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode recycling"); + /* * Number of vnodes in existence. Increased whenever getnewvnode() * allocates a new vnode, decreased in vdropl() for VIRF_DOOMED vnode. @@ -132,10 +141,14 @@ static void vnlru_recalc(void); static u_long __exclusive_cache_line numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, + "Number of vnodes in existence (legacy)"); +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, count, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); static counter_u64_t vnodes_created; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + "Number of vnodes created by getnewvnode (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, created, CTLFLAG_RD, &vnodes_created, "Number of vnodes created by getnewvnode"); /* @@ -187,14 +200,18 @@ static long freevnodes_old; static counter_u64_t recycles_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, + "Number of vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, "Number of vnodes recycled to meet vnode cache targets"); static counter_u64_t recycles_free_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, + "Number of free vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, "Number of free vnodes recycled to meet vnode cache targets"); static counter_u64_t vnode_skipped_requeues; -SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnode_skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, "Number of times LRU requeue was skipped due to lock contention"); static u_long deferred_inact; @@ -344,6 +361,9 @@ sysctl_maxvnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, + "LU", "Target for maximum number of vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, limit, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); @@ -357,6 +377,9 @@ sysctl_freevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_stats, OID_AUTO, free, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, "LU", "Number of \"free\" vnodes"); @@ -381,12 +404,17 @@ sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, + "LU", "Target for minimum number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, wantfree, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); +SYSCTL_INT(_vfs_vnode_vnlru, OID_AUTO, failed_runs, CTLFLAG_RD | CTLFLAG_STATS, + &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); static int sysctl_try_reclaim_vnode(SYSCTL_HANDLER_ARGS) @@ -1771,7 +1799,7 @@ vtryrecycle(struct vnode *vp) static u_long vn_alloc_cyclecount; static u_long vn_alloc_sleeps; -SYSCTL_ULONG(_vfs, OID_AUTO, vnode_alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, "Number of times vnode allocation blocked waiting on vnlru"); static struct vnode * __noinline From nobody Wed Oct 4 12:08:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlF3vxmz4vp1v; Wed, 4 Oct 2023 12:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlF3GdHz3JLj; Wed, 4 Oct 2023 12:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3nx/FhuVbLjKwTFEeDlEQoPvtle8T/eKJfLOLKGquY=; b=dz5KmZIkLjoizAJ9sWgHYbHbB//0EqbWhmcib3NuV85bzVTDdzI5nJw/BkzdmTNfrvfaHs UJrDJ5J61KB4KmuYzDnLOFBe1U8Z5qSs4d0C9jtppbTdOGuItrlhCpvaFe2uxg/iRZpAcH cbxHsukwvT1Nt2TC/kOdjJiLy1JZJHkHa/YJrl3K/P8+U4/pVRWK7YZkJiUaPk+kDpvXX7 u3bkfgOVIikVGN6pfYo94PYnx/FYvJdPhrcyGKvPn6bjgfxxxopVZtjL/UKjWWFPHF/l11 gMa232gJnq4vJpZ1GPrdf0lA9GB6scy616Z05Ec1jks7iSsCWuAp7CdRC34ZLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421337; a=rsa-sha256; cv=none; b=wFmlbMgIGuoOw/zG9+9yi09hWJaUV7+DJJrhoOKIGkitgH5ZlR9a31/T0javkccjMdz3oG ym2nwBLpu5eq0fsLMZcQnKBkmfN6MWvz4zbbsf2/eChFAb+V8XdOdYTsCN1rccH7yuf45L zXrLgMcgRJBk8udTeG9huhDxzjBTcw3HVhgZbNVjeVGy1VgLa4ET0ORkbWVumHUD5lhAG1 Lq7WFtlYej+GUjYgXivP+zFQxbSe6+1jvgZt4Y/zyQPB21xodIMk3twe9wjNBzY5bt8p52 wFCt2jQmpkg11HINzmyvE2/iOSUKoTefqPDGQrv2qOXTX5F514LAItSW5nrP6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3nx/FhuVbLjKwTFEeDlEQoPvtle8T/eKJfLOLKGquY=; b=xJPC186BgPBuW8GOgoPF9Qc/6hQ5JARoQLOP//hdJAtmwmz8xHUipjQi4oR/xnGwRcksjY 5UBI3KcKlSVloXL4K5kOY3KTdjnIHbF0tbxUAAuTLXGBP5JdYl2B4lg4dkLhKonax4MVpp 2HU9ZwN5SZ0fJWKXam39VIFVPJ9+gQBby76zikID+t3t1gdkzzMj1MHAgbfHWt0spOG6iM sslETYKb5HMurZjMRLGHpBf7lf7/iCRykMwDoehfBEjoj/nmaC0I7YFJL7dyfm4CJwSe7K Nq84JTRNnbkCLC49aPS1rLqw8VCoobyrOe5zfrS9W6NvMG8AZteTDYp1HJ6W4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlF2KkRzcWl; Wed, 4 Oct 2023 12:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8vw5053449; Wed, 4 Oct 2023 12:08:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8vYY053446; Wed, 4 Oct 2023 12:08:57 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:57 GMT Message-Id: <202310041208.394C8vYY053446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 99496960345e - stable/13 - vfs: s/u_long vstir/bool vstir/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 99496960345e0400ab10e03b1ff580bdc4bfec1f Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=99496960345e0400ab10e03b1ff580bdc4bfec1f commit 99496960345e0400ab10e03b1ff580bdc4bfec1f Author: Mateusz Guzik AuthorDate: 2023-09-16 08:19:24 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:58 +0000 vfs: s/u_long vstir/bool vstir/ (cherry picked from commit 509d843a982b39a531a558c65794ffffcdf93ae8) --- sys/kern/vfs_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8c8f69c88726..b125438923bf 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -324,7 +324,7 @@ u_long desiredvnodes; static u_long gapvnodes; /* gap between wanted and desired */ static u_long vhiwat; /* enough extras after expansion */ static u_long vlowat; /* minimal extras before expansion */ -static u_long vstir; /* nonzero to stir non-free vnodes */ +static bool vstir; /* nonzero to stir non-free vnodes */ static volatile int vsmalltrigger = 8; /* pref to keep if > this many pages */ static u_long vnlru_read_freevnodes(void); @@ -1644,7 +1644,7 @@ vnlru_proc(void) */ if (vstir && force == 0) { force = 1; - vstir = 0; + vstir = false; } if (force == 0 && !vnlru_under(rnumvnodes, vlowat)) { vnlruproc_sig = 0; @@ -1817,7 +1817,7 @@ vn_alloc_hard(struct mount *mp) rfreevnodes = vnlru_read_freevnodes(); if (vn_alloc_cyclecount++ >= rfreevnodes) { vn_alloc_cyclecount = 0; - vstir = 1; + vstir = true; } /* * Grow the vnode cache if it will not be above its target max From nobody Wed Oct 4 12:08:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlG5XrYz4vp20; Wed, 4 Oct 2023 12:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlG4KCWz3JTl; Wed, 4 Oct 2023 12:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gipxOST8gE/Q+sOGL2qFGRvmAA6Tvw/LjGcQKS00EpU=; b=JYmI1bPCsy+dzyngtrSTf98S9bvPg3+4432OaxYNp/9BmfJ6V1ANMLBfEztcqYfr5taJXp lF2OhJIjU1U6j7LyErxnkb8zOaP7quXgOGuUfRRHNcYspw5DOP0s+Nulbd/xbUd3R2SEiS Wj0zThswMYJCm1EG9bx67xOvfMUh8gzMz8JDmfFVqMWKxJF96VuuL81QeVZkN5X1PUFj2p mkfLpeFSXoznKe6bZnVT+acfE7wqUVexy6EMf991aElKAnPJfGtjEbqHfn4l9sP1D3HyKN XUUxXShk4EBr1qinXRZ6uj63cEPCmW02nHGweqT+JYrySPHdyLmeCcsiMBoblA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421338; a=rsa-sha256; cv=none; b=KX/eqqTARUGa6OE7h4AhdsdxFm5Dseynk8sJ6gN1lCkd/Hwaum4JZDBZgzgD0G7JwC62RF +6tUZbTsoyVxXI1I6EGGdK7h7lIKZvkxYJerhozV2C1E1nwADjToFqJ5nL9A701hwH4zVa D199UleJB4W07JjuwDqmkGdVZd2b0brW3KCEDMzpUqr9Pf7afShgNxpEDZyGhMCDgCXPc8 6ITL6zHQDAThNEJ5mVDguxnwc3YWpkZG/72/lKMiKdAId6JNjtmqjuXdypwd0+xNDbFMK4 KplV0q+RG+jxxMCdYJVcwpAI6aVFjSBoofj7B10h0jxPosBptax923AofxDsIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gipxOST8gE/Q+sOGL2qFGRvmAA6Tvw/LjGcQKS00EpU=; b=DB8Xrhz3IK1Ll6qTIqWuoDH/XI8aFfBfrC5xwizzlH5SJWaG+QwXmE4Rg/bApPXZ4hNtWS qv+IG6182242ZxSrP0W/lllGxmm0Nyp9zc5Y/fuT0N8i6+lD8L8H/soJV1FJRgEiU6SjDz mxObzLa2D5skrTh7P1E/mtlaFZx5e/mJiTIH1CFBy6Zw1pzfqR59KL3WRZr+/Hcr2sZ+qb uc+i/eFKIAjeX5A7HS9WwHmtCec54SHzNfacEVvR/VsjXJgh6WHgEeZR0wJJnT3cCZK+W7 W5mU8TTTiuLESXLfZwW9K3KGpiL5s1SOBQcHL/gf5s2TL+PeJGWM3tJTJ6iW2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlG3L4kzccP; Wed, 4 Oct 2023 12:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8wq4053486; Wed, 4 Oct 2023 12:08:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8wNB053483; Wed, 4 Oct 2023 12:08:58 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:58 GMT Message-Id: <202310041208.394C8wNB053483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 4bddcc418971 - stable/13 - vfs: stabilize freevnodes_old List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4bddcc418971bf21fb5e760248045f8a222a9a80 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4bddcc418971bf21fb5e760248045f8a222a9a80 commit 4bddcc418971bf21fb5e760248045f8a222a9a80 Author: Mateusz Guzik AuthorDate: 2023-09-16 15:41:12 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:58 +0000 vfs: stabilize freevnodes_old In face of parallel callers. (cherry picked from commit ef89b78bb1f60484cc743fa590d623ad896ca8e9) --- sys/kern/vfs_subr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b125438923bf..37554858173f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1545,21 +1545,22 @@ vfs_freevnodes_dec(void) static u_long vnlru_read_freevnodes(void) { - long slop, rfreevnodes; + long slop, rfreevnodes, rfreevnodes_old; int cpu; rfreevnodes = atomic_load_long(&freevnodes); + rfreevnodes_old = atomic_load_long(&freevnodes_old); - if (rfreevnodes > freevnodes_old) - slop = rfreevnodes - freevnodes_old; + if (rfreevnodes > rfreevnodes_old) + slop = rfreevnodes - rfreevnodes_old; else - slop = freevnodes_old - rfreevnodes; + slop = rfreevnodes_old - rfreevnodes; if (slop < VNLRU_FREEVNODES_SLOP) return (rfreevnodes >= 0 ? rfreevnodes : 0); - freevnodes_old = rfreevnodes; CPU_FOREACH(cpu) { - freevnodes_old += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; + rfreevnodes += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; } + atomic_store_long(&freevnodes_old, rfreevnodes); return (freevnodes_old >= 0 ? freevnodes_old : 0); } From nobody Wed Oct 4 12:08:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlH6M8Hz4vpFC; Wed, 4 Oct 2023 12:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlH5XZ6z3JQ3; Wed, 4 Oct 2023 12:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UsCxaAQ52WH3gXEYXB3bpopmG0cpHYTQDWSeKbhh5Uk=; b=ImjxzRmnb/snvkuUvl67/heMk/+XX44g0RtIyLGSiG8209j7mPn9nO6p9nKBcBM0T1pz9L eaOLxYec7z5Gz0VVDdWa+/G9SZWm68T9p32jveAOj2wYVbKc+MUkw7uONbWqC2wqP8mGzW jrXC/4k/kzvbtaWlW13jE0j51JxpXTZKp+Z48ghgqFOB3QQSQgkh41pmaTU5sjJojRDszb CWjnLfAwhfgpBNNJ8HFBKbjI1Vxi3XPlV8EgjfSfU3AU8vx1wJCH/EhAqk0QqtBX3wmltx dyt+FOmYmMkmQIQ7igS1Ao4HIBBbhDpegkZGL3XC03xPu8KtGYHauWiZ5jLSxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421339; a=rsa-sha256; cv=none; b=sKW/Ffj1j2HaWLGq218cDT+RolYnS3hDptWDg8rGnx+3+JyCf9c6CWafnwKYITtVxI7+1G aYFtCxB+2gWRzeUcliG7qCY0CV3OW24kwMxuINUK2dj+WVRaajbFCw1tHbD+SMPf3XQqq7 lEwlNxOgU9YgrUeFGOdse1cQgPUyWQZpDX9lb/UjmOM7ls9N6+HsfICArk7VwJObFjmeLp Tge9CTnDWqkrOiJHhVPnRqDc3qQxFTRyTeiWOqOPnRhpk1EaNjICGKeIrzOZpmcZ4RG0kP hsr3hX9E1/gB6VIA7MFNXLudyMBHVZyNttDHuGJ3pxG//jvuSY8ij300mw3zZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UsCxaAQ52WH3gXEYXB3bpopmG0cpHYTQDWSeKbhh5Uk=; b=ZRWG08vpsuaLR4J+0kw/2IyyO737Nkv/cDcV3S9A8wafgvGU3/MOEXhzCP/XKs+Z7QLIFe c9BAFOhN1aZOVLI+QNl5VEH4vxMr+JWSyyN5W/ya+Q1ZVXQ78rHOOmZ9mxXatHdNX164js DYKgj+LqTKWo/YpMjdEdgRgj17xWIvKIorg6dkcDvVwvmyLf17TU4YpHDcMwXOow9hqbsB Gj6I3le2cm2WuzeptAnp5CYv9L94fSpL/LYen3Ou7N5VM+uQ8WZrinSA8XRNyc0eYfp+gV a8BeXQ99iBfycxCW92ZqIVaeppi6WNnE9DYf0arJwMGM+Cl5VHqovuMWQ/HaLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlH4ZVGzcWm; Wed, 4 Oct 2023 12:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C8xhP053557; Wed, 4 Oct 2023 12:08:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C8xl9053553; Wed, 4 Oct 2023 12:08:59 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:08:59 GMT Message-Id: <202310041208.394C8xl9053553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 7110784928f9 - stable/13 - vfs: count how many times vnlru got woken up due to vnode shortage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7110784928f9fc9dccbf9315230eabbd57a24702 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7110784928f9fc9dccbf9315230eabbd57a24702 commit 7110784928f9fc9dccbf9315230eabbd57a24702 Author: Mateusz Guzik AuthorDate: 2023-09-16 17:26:39 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:58 +0000 vfs: count how many times vnlru got woken up due to vnode shortage (cherry picked from commit 9080190b970c7026695571f90b95fdcf7056ec67) --- sys/kern/vfs_subr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 37554858173f..7d8e6c6c6cc5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1494,6 +1494,10 @@ vnlru_recalc(void) */ static struct proc *vnlruproc; static int vnlruproc_sig; +static u_long vnlruproc_kicks; + +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, kicks, CTLFLAG_RD, &vnlruproc_kicks, 0, + "Number of times vnlru got woken up due to vnode shortage"); /* * The main freevnodes counter is only updated when a counter local to CPU @@ -1588,6 +1592,7 @@ vnlru_kick_locked(void) mtx_assert(&vnode_list_mtx, MA_OWNED); if (vnlruproc_sig == 0) { vnlruproc_sig = 1; + vnlruproc_kicks++; wakeup(vnlruproc); } } From nobody Wed Oct 4 12:09:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlK2vSlz4vp90; Wed, 4 Oct 2023 12:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlJ6brqz3JVX; Wed, 4 Oct 2023 12:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZLfdZ0njH2L1zL6QPRIlsbzydtKUoGhXXCiegzEf5OU=; b=smSte5hmJsG0jt+8pNV5n4qT0x4v/yu/MoVvAzg2GzwLDgf6XyF06boVO4x7rw3EzgyTVI ahwL+1nhXQqdzDQ/Flk37CzFjJnribOFa9IfP20ID+Hcu+7W8pGcfxokzBEcXQbJCky5VL S9H1RWP9QbfDlF4UC5AZAqSHLXYUaOhVDPmWC++G7g9DJYimb3bDL7VCxucVbiMvDjoSjQ zxBjHBLZywIUws44IirhKqHvQfC2hxVM1F0X3uBhVbvgKUwVhpEZ7cGVnZeIRgwQauMIMs TswVxkteBOQ3LlI7j/Xoo2+87mJ6VKCAineFcWAt6RMvtY3gfFbjCCMnktZkbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421340; a=rsa-sha256; cv=none; b=A+jZJAm4eT7e82pOVG3UgP51vi5v2Loo1W+QxEtK5sbZidICe197tt3xW7jviZ31JSw0Lx tG8oERTq/KR/JLLWAF4Iq5gRvK1ZxBl8r4KZBg0CmxvMUjBi1FDFHa8Y2IP0s75ZT0Wr8c Uhl4mTqgqMqpxoufMtVR5dFKffHDvm/5x364UioHEpBu+igGYXth/qhElq6zb85st2vU6s F/RF4fT9LZFh/yms2DzB5kaAeS8111w8nUK5Wmn0SQP7TP1AjH5n3ZSIudavDTHzqmFF2G rhh6Lmh+Fs3oBmHNnZ+4qdLz3hey1ocerRxd1L4ZQkFT+HnomjfKkToe9vlrrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZLfdZ0njH2L1zL6QPRIlsbzydtKUoGhXXCiegzEf5OU=; b=IEl4BKeb0bAO8mmxmKbzgWZZCTN/CN0vUkDsUPByCgBeq831rG1bsCdGujXkDQYGAXd//d v0ZXw8BpjhoBZb5eE0H5SJrxyO1XonSp2Y9+ag8lT58OqaQUkpagXCzoh+a5XIwP+bfImy aeC6w9LmCQGnPV0d4jgN2vRTNQdezE1IfH6/GmiIDuxV73WB9azyQOcuCijLj8ql2ZWj+G shnN4ny47YPU86byb1qDxNKwYeaUtmnckn7Ur03tcKN5DgS4T6sa06WZbR6D8SrB9Cc2nE vVN7bDoPOR4DUAvTXUvz7arUlaW9CgLk6lX5YYN3r8megvTXKXdwVU/QCUn3EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlJ5jhxzcgW; Wed, 4 Oct 2023 12:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C90ml053628; Wed, 4 Oct 2023 12:09:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C900T053625; Wed, 4 Oct 2023 12:09:00 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:09:00 GMT Message-Id: <202310041209.394C900T053625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 8d5b00a5713d - stable/13 - vfs cache: fix a hang when bumping vnode limit too high List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d5b00a5713d91c18fa726fe832fb4df3751b419 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5b00a5713d91c18fa726fe832fb4df3751b419 commit 8d5b00a5713d91c18fa726fe832fb4df3751b419 Author: Mateusz Guzik AuthorDate: 2023-09-02 14:27:33 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:58 +0000 vfs cache: fix a hang when bumping vnode limit too high Overflow in cache_changesize would make the value flip to 0 and stay there as 0 << 1 does not do anything. Note callers limit the outcome to something below u_int. Also note there entire vnode handling thing both in vfs layer as a whole and this file can't decide whether to long, u_long or u_int. (cherry picked from commit 32988c1499f8698b41e15ed40a46d271e757bba3) --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 62698cdb2141..151d0d2ac8a1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2601,10 +2601,10 @@ cache_enter_time_flags(struct vnode *dvp, struct vnode *vp, struct componentname cache_enter_time(dvp, vp, cnp, tsp, dtsp); } -static u_int -cache_roundup_2(u_int val) +static u_long +cache_roundup_2(u_long val) { - u_int res; + u_long res; for (res = 1; res <= val; res <<= 1) continue; @@ -2620,7 +2620,7 @@ nchinittbl(u_long elements, u_long *hashmask) hashsize = cache_roundup_2(elements) / 2; - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); + hashtbl = malloc(hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); for (i = 0; i < hashsize; i++) CK_SLIST_INIT(&hashtbl[i]); *hashmask = hashsize - 1; @@ -2766,7 +2766,7 @@ cache_changesize(u_long newmaxvnodes) struct namecache *ncp; uint32_t hash; u_long newncsize; - int i; + u_long i; newncsize = newmaxvnodes * ncsizefactor; newmaxvnodes = cache_roundup_2(newmaxvnodes * 2); From nobody Wed Oct 4 12:09:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0tlL1nX3z4vpFD; Wed, 4 Oct 2023 12:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0tlL0XkJz3JVl; Wed, 4 Oct 2023 12:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W04a02gVMJZMWWAcDO2ZFRnlrsoSdTuJi7cBu7S6UAk=; b=WU5NS5H2sMYBctGnhu/Ruz8+sud5aAoFzKsJgxN/6hKBw86aGuOyCWg5ARwQfPAxsmlxsT 1bu/e5ifNjbfs+nQhJD59NBXwnwNujByY6Y33EQNpjv8dxV3dtoeqt7aJ+qu4JdFy6DFLG tkdZPsDVNcXKwOooZLymBxQRpzAbrpXZxp7X/rmpAaIbbXZsx+te6zEnxAoPbKxX1oVftd 2f9wE8143v2oUlAFMmcYdIrBb3irtVWqj+StsTjpmGk0WAnjamCuK9ecY3RmSTTG2prKx+ tnn6cVaqRbxH4Iz0gSapxp/CVCnFZO1MqXMfbJoNyieUjBBTXjtLYuw7DL0bFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696421342; a=rsa-sha256; cv=none; b=vg05RT1ozFkFbpnpesaV3SJ7SZ8C1lgkb4cc5uDe8nB8ybng+/tCkbk+ELAO7DZgra+5rP 0oUIoZWPJssWzdjhWWly2q6gTY9nhXTojzoH+taRytXMiGDlw2u27d/oZgVarivIQF8yH3 QB1j89UqFzWyWZoiC1eJttWI37y6Dp3jGRp1ezUg52HjM99TBZ6KazZi/XzEf3OiRmdf+4 CNGT1MMNeLZcXX69KF4i/vNduRjx1jmqJHofIC7jUajnlE7VWr7guTGcFcZKlFEg+xWsUQ OCGipZgNLkXqaZyZQl2EZNAUPx+Z0qqPB9HNf7GgV91cz8Mx8qOoSaVCwkUCjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696421342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W04a02gVMJZMWWAcDO2ZFRnlrsoSdTuJi7cBu7S6UAk=; b=DPcts7CCVfU7xcEazWVb+gQTZWpYiA0dBqVMHMYVTRLVfab63IS5STyiz9sJ8EUTGimQMM lcdCqW9xTpldN9FPzRoHkmQLDGycL72CrdfE3aNNik0H8LjOus+ZGYi/RyZP3P0FcdstJT tugPchYT1l3p/b5d24MkizzvyzUr/I1jwVDtoRzn/za5J9Wli/7UBZiPAoYS7jheXNdsTQ uMNvhbdKFt/DML5XQvirR479/dlHQvwxQYbijBS0y2ebQ7Dw46lL3YnTf+RTYW+vxaspov qYTnvSBOOTr02ZP87bBItXCnRKWXpAZE/d/pILCTZgFS8m0DCW7BFAefKRSRag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0tlK6mNrzcJH; Wed, 4 Oct 2023 12:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394C91JJ053679; Wed, 4 Oct 2023 12:09:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394C91de053676; Wed, 4 Oct 2023 12:09:01 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:09:01 GMT Message-Id: <202310041209.394C91de053676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 46cc15529fbf - stable/13 - vfs cache: garbage collect the fullpathfail2 counter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46cc15529fbfee0df5a124a3221c4446f0902fe3 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=46cc15529fbfee0df5a124a3221c4446f0902fe3 commit 46cc15529fbfee0df5a124a3221c4446f0902fe3 Author: Mateusz Guzik AuthorDate: 2023-09-14 20:25:54 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-04 12:05:59 +0000 vfs cache: garbage collect the fullpathfail2 counter The conditions it checks cannot legally be true (modulo races against forced unmount), so assert on it instead. (cherry picked from commit 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2) --- sys/kern/vfs_cache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 151d0d2ac8a1..a50e8010fb88 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -546,7 +546,6 @@ STATNODE_COUNTER(negzaps, numnegzaps, STATNODE_COUNTER(neghits, numneghits, "Number of cache hits (negative)"); /* These count for vn_getcwd(), too. */ STATNODE_COUNTER(fullpathcalls, numfullpathcalls, "Number of fullpath search calls"); -STATNODE_COUNTER(fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE_COUNTER(fullpathfail2, numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); @@ -3384,14 +3383,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, vp = vp1; continue; } - if (vp->v_type != VDIR) { - vrele(vp); - counter_u64_add(numfullpathfail1, 1); - error = ENOTDIR; - SDT_PROBE3(vfs, namecache, fullpath, return, - error, vp, NULL); - break; - } + VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp); error = vn_vptocnp(&vp, buf, &buflen); if (error) break; From nobody Wed Oct 4 12:28:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0vBF1Yygz4vqYS; Wed, 4 Oct 2023 12:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0vBF1GGlz3N8T; Wed, 4 Oct 2023 12:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696422533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZ6Jow8lcVUZllkP3NeVZC0ppf9Ib+Y1JtP4+GQVvmw=; b=fODdoOKxrdLcJEMY/8qGRqUWnGp4MLdEQOcc8Q5cnjkjLpmPIrgcVfJ+ldHrguXA/kvCTf fX5BoZ4W9U6+4mA/TG1viyB2rxNeWeTNkOszCkctaYPggr4MSLS9G3/3SIOitYzleE4ZWl DjJl28E300UxmRIwdgfS3Q+y49rhpfEoJCUGL3weZL6MR+EDvIlMMWSkLHld4x39LO5DTy Q159USakgF/qoUuVKjr18YV2lauy4+TZoK7AD4kqdzgVsksBZeAanbgYr3Wzd2rZdAvu2C /+3HwwjfzN7ay1vBL9tuyjmibWMvaaAkTeq10lVLh/cpufHOti3KqCbs5/sUTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696422533; a=rsa-sha256; cv=none; b=xxZinrNRLUyUPD6jkR3rr1frLSjNXriN/ugsiimlO1cviXQACWd9oazmGh3zsDLXHO2fhx tAk4Qw4bVYzwb+CCIxTmrLf7dZ87BS8gM2Oyhsr2lBV+zQfvqGpQQqnTmfUNsca3jpjtd2 wK9f1UbRtT/rrA6wggcAkzSGKaQK7z2x+7e0O8ANhTZVBwJijZr5+N8WHNmePiHVbpt34z jp5LbpkYTz483tyVh6KmBrTp+nX9hzYFWiT/leySr4f22DP5FrQ51+4xuB5240oUI1IveX ++so1w3SCgP+08M7k2Qc2hgEvAgLObac6BJmwC5Hus+/PoTXsf0oT0Oimpgs1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696422533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YZ6Jow8lcVUZllkP3NeVZC0ppf9Ib+Y1JtP4+GQVvmw=; b=mpNKWLap0NkjXRFbvbyFcOzHP0w2yMF8G9VbfSXeWMCx3q/GXFC/LwI/32hs+WvSj+uWw+ UEdFQok39P4snZ+gsHP+F92Ayu9zlyk6YwZNwjlF8yme1FAlGwIyFZwmaXVp3x56puSH8B PMdIsecJO6XlT99gZe8SjT0PA9C8ZhyBeAOA4KRbs+QXYpJXOyyZ4BTDSSOvfp/eynP9BW 7jCQ4c8pmUS3ddsxBfJGnMJ5kyx6c72MSApC0Ikkd1zOQ1FCAXmueS6C8OQYw/xvlv9Xwf ZEKpFMSO7kBnoqY5HcwH6LeQBLDGXsrlAmZMSjTBAVnxckfR59J0C5gqGOIhtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0vBF0L0Xzcyr; Wed, 4 Oct 2023 12:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394CSqGl086866; Wed, 4 Oct 2023 12:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394CSkXP086856; Wed, 4 Oct 2023 12:28:46 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:28:46 GMT Message-Id: <202310041228.394CSkXP086856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: f7f4bd06a8d4 - main - zfs: merge openzfs/zfs@f795e90a1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7f4bd06a8d4e5d1e92d0d2905a68a2a03ed9c0c Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f7f4bd06a8d4e5d1e92d0d2905a68a2a03ed9c0c commit f7f4bd06a8d4e5d1e92d0d2905a68a2a03ed9c0c Merge: f06c92854474 f795e90a11c6 Author: Martin Matuska AuthorDate: 2023-10-04 12:02:37 +0000 Commit: Martin Matuska CommitDate: 2023-10-04 12:08:42 +0000 zfs: merge openzfs/zfs@f795e90a1 Notable upstream pull request merges: #15322 4e16964e1 Add '-u' - nomount flag for zfs set #15331 fe4d055b3 Report ashift of L2ARC devices in zdb #15333 249d759ca Fix invalid pointer access in trace_dbuf.h #15339 f795e90a1 Add BTI landing pads to the AArch64 SHA2 assembly Obtained from: OpenZFS OpenZFS commit: f795e90a11c683d64bacc260fb7feab705b220b1 sys/contrib/openzfs/cmd/zdb/zdb.c | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 48 ++++++---- sys/contrib/openzfs/config/zfs-build.m4 | 11 +++ .../openzfs/contrib/bash_completion.d/Makefile.am | 2 - sys/contrib/openzfs/contrib/debian/control | 2 +- .../contrib/debian/openzfs-zfsutils.install | 1 - sys/contrib/openzfs/contrib/debian/rules.in | 5 - sys/contrib/openzfs/include/libzfs.h | 8 ++ .../openzfs/include/os/linux/zfs/sys/trace_dbuf.h | 8 +- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 7 ++ sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 27 ++++-- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 18 +++- sys/contrib/openzfs/man/man7/zfsprops.7 | 26 +++++- sys/contrib/openzfs/man/man8/zfs-set.8 | 7 ++ .../module/icp/asm-aarch64/sha2/sha256-armv8.S | 3 + .../module/icp/asm-aarch64/sha2/sha512-armv8.S | 2 + sys/contrib/openzfs/module/zfs/vdev_label.c | 10 ++ sys/contrib/openzfs/tests/runfiles/common.run | 2 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 2 +- .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + .../cli_root/zfs_set/zfs_set_nomount.ksh | 103 +++++++++++++++++++++ sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 23 files changed, 253 insertions(+), 48 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh index 000000000000,ebf08711423c..ebf08711423c mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh diff --cc sys/modules/zfs/zfs_config.h index b77a32e4754c,000000000000..b355e0cd6d0f mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1149 -1,0 +1,1149 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + *** 230 LINES SKIPPED *** From nobody Wed Oct 4 12:53:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0vkg4HYJz4vsqb for ; Wed, 4 Oct 2023 12:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0vkg3j4Kz3QkR; Wed, 4 Oct 2023 12:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696424011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SBAcZTQrBj6wgg1fP3zgtfK9zNEoT9ZulK1knC9jdMc=; b=HLb3162YwsvBhz8NZYJv6+n8kFl0mmTVf4A/scOvn525TdLW3usUeI4RJ3hLniFhQcIbas c9x3224iEnjstLId7q8SRSWOObsAgierAOeG+0ALu5MsYbx4Rfgtc1f0sGVCgZ4cIuNtF2 QkhGe+np8O6Gq7NV5NTwh3vDOeDgWiwqYI364QYUGN4PJMv4VpggukYnmRWpqrc3Ex3Gl/ 3fKEvUgsogPzWC9vN+C7gOCqvDV2ZK3hKArbi44cc/WH2mSld0BAqJTY1+9th/yaQ/97qV HfMxkIZJlKAe2kg/JAWE29Bepd7ZsG5sVqcHDFN9p4pzK0/ugc7NIrN6cYCzFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696424011; a=rsa-sha256; cv=none; b=gIjiq8C4H55S5SQH6fMwbQh+PMOIENwhQD+zojHfwOMwkyW9XfEX5+iq76h6Ai1cW+cR9S Zq5V/i/wloFc5fehOaWD8FwQlDW3h3eqbH2H4i3rRNmTtrqeS8vMy/b16HtSicNyKiCnOG PNhUFSl/50lwo3wWqSrRiIchny1AAH95Gb+lONT3yd+q2D1L2XCe37EDCNc7talPYEIJab pzl/MVulQMbLvRHcptVGsSd4pVDaPihDJ+jQiMoiJB4lPQO0SsRq6geZ2216lkOnxudbb8 tezgKcG//uG0pH2DoBM4CxR8UWKhaMsDjKdSW9GEWx0VbfxVl868BMRHZpDEoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696424011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SBAcZTQrBj6wgg1fP3zgtfK9zNEoT9ZulK1knC9jdMc=; b=jgs+hG7mnSlRqXNY1Szp/VA1V7uLL3KkrORHQ1itX3jWwqB9Jd6Optp/coI6Tl7e+QprUp g/EH5fUss5Snjb72bT3NIFP6glaxME4cFfhyZsw/cCuwrYdZ+xGNWJqG4t+6FHmYQd0HLp Gr8yz7SvxHPxqBArcqagcFEIRqMPGTodQO8z4aLh6SHHAwCaSpvAF3BM2RMNTxt8zrTzJa YuASqNYE5TrR52AUzJ7Cz74Z8hTGw0w03DZNIaLysToKdvlaKYqhqf+MD2Y3gJcDlmbQuF iiHV116BlNV3RRpMp9ih6qE/1xqdltrEWcqGQSpvTdBFE8baBtWJH+ocOYct/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 4S0vkg2lmnzf0b; Wed, 4 Oct 2023 12:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394CrVpJ035883; Wed, 4 Oct 2023 12:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394CrVAm035882; Wed, 4 Oct 2023 12:53:31 GMT (envelope-from git) Date: Wed, 4 Oct 2023 12:53:31 GMT Message-Id: <202310041253.394CrVAm035882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 5f30698670de..8015e2ea66b4 - vendor/openzfs/zfs-2.2-release - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/zfs-2.2-release X-Git-Reftype: branch X-Git-Commit: 8015e2ea66b4f6233877fef29a8a35594f33558d X-Git-Oldrev: 5f30698670dec3fc2085663677021f0a592cf081 X-Git-Newrev: 8015e2ea66b4f6233877fef29a8a35594f33558d Auto-Submitted: auto-generated The branch vendor/openzfs/zfs-2.2-release has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=5f30698670de..8015e2ea66b4 0aabd6b48228 ZIL: Avoid dbuf_read() in ztest_get_data() 0ce1b2ca1930 Invoke zdb by guid to avoid import errors 8526b12f3d6f Set timeout before creating pool in test ba4dbbdae7d8 ZTS: Add additional exceptions 99dc1fc34067 ZTS: Fix introduced test bug in block_cloning_copyfilerange d38f4664a6ef Reduce trim min size even lower for tests to reduce flakiness 9e36c5769fe1 Don't allocate from new metaslabs 229ca7d738cc Fix ENOSPC for extended quota b34bf2d5f615 Tweak rebuild in-flight hard limit 3079bf2e6c07 Restrict short block cloning requests 608741d062fe Report ashift of L2ARC devices in zdb 0d870a17750f Fix invalid pointer access in trace_dbuf.h db5c3b4c767f contrib: bash_completion.d: make install destination vendor dependent 7b1d421adfaf contrib: debian: switch to dh-sequence-dkms b04b13ae79e5 contrib: debian: drop bashcompletion mangling after install e9dc31c74e7b Update the behavior of mountpoint property c53bc3837cb6 Improve the handling of sharesmb,sharenfs properties 8015e2ea66b4 Add '-u' - nomount flag for zfs set From nobody Wed Oct 4 13:23:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wP73v4jz4vvqx; Wed, 4 Oct 2023 13:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wP73Zshz3Vs7; Wed, 4 Oct 2023 13:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696425803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DfNci7wwEyT1/N//GBp0S1VmgwMNBBrcA3/Gw/dU3l8=; b=urWXJCi6WtUMJv9CaO6Zog8xbjIgSMQPF5C5/P+NOOFwXAq2389lJ/QTBS6gZMGbo2K0KK zwmUr5MZfdty0btEoYZ0vhkM0dTa3FnWpeMgHnlTxq/ZGlD6GwozqRy1KUo9Xi6TxY6o55 cggE+9STMCDfQGqEJEoU/Qf0ie5dhUuS+bDUSwZtGxgTgvYPtvvxGkmCI6mojpMyIPS/Tt fagM55/TRuQyZ04nv5zJiThDWT43MF8a0gvF180cEV7SPjvtVRGOZGV9jgW8kUdJ5vDjOR dakRQoWSii6HaK8ArKyzFiWu1oFWtdmpxwrGDiaHgfExWG+3USfj8PI+cnc6bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696425803; a=rsa-sha256; cv=none; b=bbUhI2J3FXOieo0LlaAVrfNOYguOrah8j42ic7FyE0/tR+R5M1v+COudrGsU8/SJsO9NsG mkfX+4hQAHSTAc8gWkZ1vhEyKFR0eyGUdRjTmhl4YlMLKBLATi+AGN5wIHvE0RjPe6mZMu dlR/qBs+V3W5qK3VHiaOruqztMo2RlfuVKfD1sVmB88FW1uc4VHo5N7dxrCZug1ETlbK6J esFY50UDfMGoKjLCcBUb9fqp/dmRvz4D0ExUTfSFF36igIvnkBfwmBP7YVKZH9gyBwijx5 2G4ngdni39+F4eIhPqjViVp8PEfRBW4TH74sSQRMVwrMuuDcp7PqiiMDullagg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696425803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DfNci7wwEyT1/N//GBp0S1VmgwMNBBrcA3/Gw/dU3l8=; b=kTygdxzvP0S6Y88w1Wl9eJkm1vUBT7RZH0rIwFXKvez+DhpxZbUSp0+o+3TNaTBKPUqlj6 sw2gWLoNw8cbrxERJid1ufBbY38Z0d5PtnBCX2GAxuDOGjmpK1lgjNGfuH0W2+JmMWiuQH 09RDyuP9jMFfIMu0Q9/N4qH0hMZ9g46jfCTaczWwX0lZ4tI94mRYo9loyTWDbPwVi84lBH 9rDEEgU7AIrnu9ctoYe8fkMS97XKiegvLhpbjDVasYU6zJz7ExpQwPZdg3zr0lMLI8RWhW fDBYCY0RXei0RNdwVYnpRMsjwyU5VCYjGe4/wvysroC/z25hntPvWL6dwI+O/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 4S0wP72bYqzfRb; Wed, 4 Oct 2023 13:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DNN9u086354; Wed, 4 Oct 2023 13:23:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394DNHB5086343; Wed, 4 Oct 2023 13:23:17 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:23:17 GMT Message-Id: <202310041323.394DNHB5086343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: a21cb0234b89 - stable/14 - zfs: merge openzfs/zfs@8015e2ea6 (zfs-2.2-release) into stable/14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a21cb0234b896d8e524840d8b06927f5e8ee1b13 Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=a21cb0234b896d8e524840d8b06927f5e8ee1b13 commit a21cb0234b896d8e524840d8b06927f5e8ee1b13 Merge: 9afc0c849e6e 8015e2ea66b4 Author: Martin Matuska AuthorDate: 2023-10-04 12:54:05 +0000 Commit: Martin Matuska CommitDate: 2023-10-04 13:03:41 +0000 zfs: merge openzfs/zfs@8015e2ea6 (zfs-2.2-release) into stable/14 Notable upstream pull request merges: #15240 e9dc31c74 Update the behavior of mountpoint property #15240 c53bc3837 Improve the handling of sharesmb,sharenfs properties #15298 0ce1b2ca1 Invoke zdb by guid to avoid import errors #15301 0aabd6b48 ZIL: Avoid dbuf_read() in ztest_get_data() #15308 9e36c576f Don't allocate from new metaslabs #15312 229ca7d73 Fix ENOSPC for extended quota #15321 3079bf2e6 Restrict short block cloning requests #15322 8015e2ea6 Add '-u' - nomount flag for zfs set #15324 b34bf2d5f Tweak rebuild in-flight hard limit #15331 608741d06 Report ashift of L2ARC devices in zdb #15333 0d870a177 Fix invalid pointer access in trace_dbuf.h Obtained from: OpenZFS OpenZFS commit: 8015e2ea66b4f6233877fef29a8a35594f33558d sys/contrib/openzfs/cmd/zdb/zdb.c | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 52 ++++++----- sys/contrib/openzfs/cmd/ztest.c | 24 ++--- sys/contrib/openzfs/config/zfs-build.m4 | 11 +++ .../openzfs/contrib/bash_completion.d/Makefile.am | 2 - sys/contrib/openzfs/contrib/debian/control | 2 +- .../contrib/debian/openzfs-zfsutils.install | 1 - sys/contrib/openzfs/contrib/debian/rules.in | 5 - sys/contrib/openzfs/include/libzfs.h | 8 ++ .../openzfs/include/os/linux/zfs/sys/trace_dbuf.h | 8 +- sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 3 +- sys/contrib/openzfs/lib/libshare/os/linux/nfs.c | 47 +++++++++- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 7 ++ sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 46 +++++---- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 18 +++- sys/contrib/openzfs/man/man7/zfsprops.7 | 26 +++++- sys/contrib/openzfs/man/man8/zfs-set.8 | 7 ++ sys/contrib/openzfs/module/zfs/dsl_dir.c | 22 ++--- sys/contrib/openzfs/module/zfs/metaslab.c | 9 ++ sys/contrib/openzfs/module/zfs/vdev_label.c | 10 ++ sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 4 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 13 +++ sys/contrib/openzfs/tests/runfiles/common.run | 2 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 2 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 4 +- .../openzfs/tests/zfs-tests/tests/Makefile.am | 1 + ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 5 +- .../cli_root/zfs_mount/zfs_mount_006_pos.ksh | 2 +- .../cli_root/zfs_mount/zfs_mount_008_pos.ksh | 4 +- .../cli_root/zfs_mount/zfs_mount_012_pos.ksh | 15 ++- .../cli_root/zfs_set/mountpoint_002_pos.ksh | 12 ++- .../cli_root/zfs_set/zfs_set_003_neg.ksh | 10 +- .../cli_root/zfs_set/zfs_set_nomount.ksh | 103 +++++++++++++++++++++ .../cli_root/zpool_trim/zpool_trim_partial.ksh | 2 +- .../zpool_trim/zpool_trim_verify_trimmed.ksh | 2 +- .../tests/functional/no_space/enospc_rm.ksh | 12 ++- .../tests/functional/trim/autotrim_config.ksh | 2 +- .../tests/functional/trim/autotrim_integrity.ksh | 2 +- .../functional/trim/autotrim_trim_integrity.ksh | 2 +- .../tests/functional/trim/trim_config.ksh | 2 +- .../tests/functional/trim/trim_integrity.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 43 files changed, 398 insertions(+), 121 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh index 000000000000,ebf08711423c..ebf08711423c mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh diff --cc sys/modules/zfs/zfs_config.h index 059989a79d1c,000000000000..3d527ecbd00f mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1134 -1,0 +1,1134 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ *** 243 LINES SKIPPED *** From nobody Wed Oct 4 13:43:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrV0WdLz4vxtJ; Wed, 4 Oct 2023 13:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrV028Sz3YT7; Wed, 4 Oct 2023 13:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJGzwB+iwIADL9nHlsCMBWC7CnP5/8/AuReKmHAbQ6M=; b=EvpE9dIEQypfg6/wgA1WTjjUolxAGcdobTocHxO2XO0sbEkwAhGDOZVKUxwJ85SpMF59+8 gN+9kb3Z7FM+oY8uAfwbZMw2xGb4CN41m+SFLC6vEsvTB3+uBzWPO5j/wg8zXBxk1PgGgS rpblKnQ4rU2mhYoSGswsf82X1RWzblxYUeol11vaCj/0HIZ8GOeQUzu5eQVbwy0rl7xpCX cK7ypk6ALo3cOB+SR6wa8jIDx7xZT4iYD60JCa22Dhd1882fgDGErEhYR3viGBnVVug3yn vuYznDuJu73wvrRLniYN4pW1DjAbYWmML2JQDKGhL5iIabywQWvY26sfRQZXfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427018; a=rsa-sha256; cv=none; b=nxLU7+zxlU7LZxscs6474omBndnwFWI7o8HWVbHLdJxPNmkeNSvgZ1XI1LJdcCIV3R1q2J 3cQhk0O+YnSTWZ22gCdREEjbIJiu1o03qQ2QgvZHzabLiRHfLDOBYYKmLQorAU3QdmtHpI GCEjPcbUI8KBkh7T3tYpHjqSzjFAYOQIOwTy4p7nP7C+Do/A14WUGwTKQRu8dKepgrP3jr g+o6413iPPRQ5F0iwjq7J3rDSItd4eHI7G+mSHWOlmNVdzJy0aWpwFn7rRn+gzTOoNsGh2 +XEzRgQaaZ4jbja5n1fs4cHdqPQMgu12v/6sm5TJoUVR7zdebi+PxQH5ZA3+GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJGzwB+iwIADL9nHlsCMBWC7CnP5/8/AuReKmHAbQ6M=; b=xKm7IDXylTITOj5iYkEWfSFqWjoCf77S1Wjai+EBO6BgF4CZAEGa/SAkdAuBO6RL2pG505 n/MrGXovyTncENIXwbWL6a/w3FTJy/ljipSbkrwwm2MRCn6xhy8DI2szDqALcyQKITPbP+ d3M5FEKab6P5ZtWq0uFpFmPe9N/twBVJesJ073RfMeo71ckl+37xTSRmnRS9sRSUscuw0g m7G1/X129SReC2iV6bLFZkDEn2RTb9rnN+771zrT/8//mROKOWohuECpwwC8ZW0Tf3NFlX YCud9j9cVjM9+FTLNuGOSrXxVbI9z2tM3+lXZVs4FT8NiezpfLGkn1GPwSo6RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrT6BPHzfxD; Wed, 4 Oct 2023 13:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Dhbda019688; Wed, 4 Oct 2023 13:43:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhbjo019685; Wed, 4 Oct 2023 13:43:37 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:37 GMT Message-Id: <202310041343.394Dhbjo019685@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: 32ca3712a8c4 - stable/13 - hdac: Defer interrupt allocation in hdac_attach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 32ca3712a8c4295d14770ad9cc55c1c837d834ad Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=32ca3712a8c4295d14770ad9cc55c1c837d834ad commit 32ca3712a8c4295d14770ad9cc55c1c837d834ad Author: Mark Johnston AuthorDate: 2023-09-27 12:23:58 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:43:14 +0000 hdac: Defer interrupt allocation in hdac_attach() hdac_attach() registers an interrupt handler before allocating various driver resources which are accessed by the interrupt handler. On some platforms we observe what appear to be spurious interrupts upon a cold boot, resulting in panics. Partially work around the problem by deferring irq allocation until after other resources are allocated. I think this is not a complete solution, but is correct and sufficient to work around the problems reported in the PR. PR: 268393 Tested by: Alexander Sherikov Tested by: Oleh Hushchenkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41883 (cherry picked from commit 015daf5221f7588b9258fe0242cee09bde39fe21) --- sys/dev/sound/pci/hda/hdac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 82b1baacfa98..3d2c4001d68d 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1272,9 +1272,6 @@ hdac_attach(device_t dev) /* Allocate resources */ result = hdac_mem_alloc(sc); - if (result != 0) - goto hdac_attach_fail; - result = hdac_irq_alloc(sc); if (result != 0) goto hdac_attach_fail; @@ -1349,6 +1346,10 @@ hdac_attach(device_t dev) hdac_corb_init(sc); hdac_rirb_init(sc); + result = hdac_irq_alloc(sc); + if (result != 0) + goto hdac_attach_fail; + /* Defer remaining of initialization until interrupts are enabled */ sc->intrhook.ich_func = hdac_attach2; sc->intrhook.ich_arg = (void *)sc; From nobody Wed Oct 4 13:43:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrW1VDxz4vxYp; Wed, 4 Oct 2023 13:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrW13hPz3Yfh; Wed, 4 Oct 2023 13:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5byqIyyg53WnMmbqRabjQjwqr+UARw7E5shuTbU+QTI=; b=M6llblw7pSlIcL+tt+OD/PtXkJrpAzehO3okkH+3iy/CUv6wx8zbwdivaHhHc71pmHKYxe w7O0np7n8T3QRmaxRmvr6ovnffA4DW0VizSxkfZWTHuusLtcWQngMgLOPNWTwBMnCmgd+L STDsk4bNO2GEvoxZUtn/tR7HPOngurlIizpdd+SbhP9blvPDZBllNIGmzGA+nsfeVGOHiW 31S9McpGqUlOp9SOinzvOjtX/X2yo+ayj7RKFlLmnmtcA02n4lYZ8l87YtQDpTDMg7qxy7 r7HkXpvGjj2IFTndpop6tZf48QckCsGg/E1dU4e5s7kDpkaunB5XTtCE7KxeYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427019; a=rsa-sha256; cv=none; b=VOgzucAx2G65Z3KMnjVkWeS8fsk68rokOUTCqzr6Z0Gf8SPecpXXtLTSgXPeCkVB0KGPti TrWIyRgvda/sU4WqD7HGt5FfGzETCPpglBwpCnKUPezp8AkhIZowg0M8jSooBo04TO8uLJ ha3WhsETyLjd+A0fvLnRmK8UmvNEboRYRz+Rn5kdqIkToJp6+SfXi1BknCJnK27Q1xRHdm ufKRTOlXPS7A8d+3h5jI9xAkVJjg3nA6CaQvqOOZ4kzoJY9RPFcuk6GFMFJyGPrRgwynj4 ZShTDwUjaDGiDKFmVVb1m2ytbilWs9prmi+iZsbhNHTx6dW1ibJNi+8Yppoo5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5byqIyyg53WnMmbqRabjQjwqr+UARw7E5shuTbU+QTI=; b=TxHVTK3jtAdt5fsr2hyeSek6VZWiNA5c9vId6nVZOwPfWXsF0GBSmNestXnkqUeCe7y+TZ G75sQe/iGnH/vfdXjiWOwzNxqoXZv0DfEEgPCr87IgIfErw/N3hTqQXMWtnNGJqXmu8X63 /GTByYzGrf/8/vfTLDrNQNiQjsj8Y1k6Vhi0XLbX1J5kupg0UM6TGRkrvGIzyeSsJ6KrFX IxYm7Lu+D1g9o1NyKiV2kzhiVK4ZRRBPX8Zdapm+mJ0EMy3fBTyG1Zyk+I7kK3txFg362F xJD/Qqdi3F/2a3+mlO3ajy12ULEpHDPVhiediBjL4rKcxG5DQlkFWFfJYpmwOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrW08CmzgB5; Wed, 4 Oct 2023 13:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhcfE019745; Wed, 4 Oct 2023 13:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394DhcVE019742; Wed, 4 Oct 2023 13:43:38 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:38 GMT Message-Id: <202310041343.394DhcVE019742@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: 2464d8c5e296 - stable/13 - glabel.8: Warn against using generic labels on a shared device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2464d8c5e296a02de882310398e73077225cac00 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2464d8c5e296a02de882310398e73077225cac00 commit 2464d8c5e296a02de882310398e73077225cac00 Author: Mark Johnston AuthorDate: 2022-05-26 13:48:17 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:43:22 +0000 glabel.8: Warn against using generic labels on a shared device Also suggest against creating a generic label on a device which already contains a filesystem. PR: 264166 Reviewed by: imp, delphij, Pau Amma MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35326 (cherry picked from commit 81f36fbc98dd74ca923938e0329919d426811b0c) --- lib/geom/label/glabel.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index 5283a604e45b..a23f425bc5e1 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2017 +.Dd September 27, 2023 .Dt GLABEL 8 .Os .Sh NAME @@ -141,6 +141,26 @@ Generic labels created and managed solely by are created in the .Pa /dev/label/ directory. +Note that generic, automatic labels occupy some space on the device +and thus should not be added to a device already containing a file system. +In particular, +.Nm +reserves the last sector of the device to store the label information. +If the device already contains a file system, +.Nm +will overwrite the last sector, possibly damaging the file system, and the +file system may later overwrite the label sector. +Instead, create a label before initializing the file system, and initialize +that file system on the device created by +.Nm +under the +.Pa /dev/label/ +directory. +Then the file system will correctly account for the space occupied by the +generic label, +since the +.Nm +device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their From nobody Wed Oct 4 13:43:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrd6Ddzz4vxqw; Wed, 4 Oct 2023 13:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrd5jxqz3Ysj; Wed, 4 Oct 2023 13:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsfwIJ/vMpctys7mlcxneyq+o1hbK+OFVags1MF3gAM=; b=M6vgbdXSILCBe/00SV5vGi1RKvVjU2YbIyXt4AbSZBwR8RfXg/iIiyvTRDmAIVJFx1Rfom Ao5M7VioqLMIdPaEk0MrDDgsJpmqydcKojyF5BpBzskSlSUx5hwgGolN2CbZqLvB6OPwnK 9soKQt2FIFvSYkd00roiRRcCpdBBbZ3BTV5HXjmXZjOqIDl6609an15hqIuqjwV+LGAOBD fF4cnP95l6FWQLe2s7vkcsFHDpB3c2Kbk23WlKr5oFfRXf6wA8NiPQxNPkp6s8pwvy5Gp5 oRSbPi9fjuXBwoID/G8W/0CvMJzXm2FP8Jp3l2JJV54xwQFztvDycnLnS936+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427025; a=rsa-sha256; cv=none; b=QpxrjVML1vrYEyHxDWnr0ksVzOodRzRJdQKPq4VaiFeLw/NdcEeZkj8x8X3Hv9kgFMrxwH W9DNAZ03QtF9CkihVfKPw/5G+3yxmZ5Z9yw3cHTSDKsJCHAVDS3OciViSGLnO2yzE2Lz6l 8nh52p9CoRnScJIOoTpD0kJRAo+tQl1CHwHw1McaOT0nyXsuS0DHBaxUaoYdlqI5ZlASRW VtRo+GBIcuBpVaPoIoYR4Vjqo3peDyRfEjsRJTgfukDWWLrZPIjv7WvMNzNGjx5Uv7CEZH 4cuXSojtuq69UxSsPOY6Z6Rlin5IX0j7IuFTZ3hxieiFgZzgzgSQv1n6ccj47w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsfwIJ/vMpctys7mlcxneyq+o1hbK+OFVags1MF3gAM=; b=w6nDXaxHDJ2Nv5Ck5GifyDKNEtvG8Dw5xVPlHZxDwOWCcgdvUmIvj+/R+V6S2FmBbPf3PL DWH8ergOGQXmRN/ye4dTUR50vMSv8ETxGNSKC2iFZrd3chf4hxgQMR9QpZ0SJ7qywgoNJs FFAB5bTB68wZ6nNok5f5864h6gKqbV5XYzqGIBeI9qq42jR4DiN/hSWs5h73RVSFq/us95 G/4VRZs3357a6jfsT47SiGMaf2UDUH2plkZcCl50uw/K+dOfKEL1sEbRAAAZKI0n3u+POj KCzRn0H8Frr0WryUsE2wJ6notxP/Rt/wFtEWGIPvkshABRXkwX3NM89BCryaTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrd4klTzfxG; Wed, 4 Oct 2023 13:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhjXI019957; Wed, 4 Oct 2023 13:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhj8L019954; Wed, 4 Oct 2023 13:43:45 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:45 GMT Message-Id: <202310041343.394Dhj8L019954@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: b11568083f09 - stable/14 - glabel.8: Warn against using generic labels on a shared device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b11568083f09f48caf11d78d25ab58fc65793bcf Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b11568083f09f48caf11d78d25ab58fc65793bcf commit b11568083f09f48caf11d78d25ab58fc65793bcf Author: Mark Johnston AuthorDate: 2022-05-26 13:48:17 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:41:29 +0000 glabel.8: Warn against using generic labels on a shared device Also suggest against creating a generic label on a device which already contains a filesystem. PR: 264166 Reviewed by: imp, delphij, Pau Amma MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35326 (cherry picked from commit 81f36fbc98dd74ca923938e0329919d426811b0c) --- lib/geom/label/glabel.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index 5283a604e45b..a23f425bc5e1 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2017 +.Dd September 27, 2023 .Dt GLABEL 8 .Os .Sh NAME @@ -141,6 +141,26 @@ Generic labels created and managed solely by are created in the .Pa /dev/label/ directory. +Note that generic, automatic labels occupy some space on the device +and thus should not be added to a device already containing a file system. +In particular, +.Nm +reserves the last sector of the device to store the label information. +If the device already contains a file system, +.Nm +will overwrite the last sector, possibly damaging the file system, and the +file system may later overwrite the label sector. +Instead, create a label before initializing the file system, and initialize +that file system on the device created by +.Nm +under the +.Pa /dev/label/ +directory. +Then the file system will correctly account for the space occupied by the +generic label, +since the +.Nm +device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their From nobody Wed Oct 4 13:43:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrg2Zsjz4vxr1; Wed, 4 Oct 2023 13:43:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrf6NQzz3ZCB; Wed, 4 Oct 2023 13:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P93G1fDDQDRwDw92xAaoRr4PWQKXkpbxypcCPjzRXpg=; b=ZkewE/ESP+3Csl6O8A6r019vKHWJQ0YwdPzM/NIrCgmOWkjVrC2tvI7d/33fQKhhEebU9O 42LtIX16j69hsYZnqLzfkjZ3K4jfM9rno3imLkk2opuwOyz92c/cDiyjjNgneQqD6nMdK3 kgbC9MWrlONqhRQeN+DhtblN060b9T+GwlFRqEjw8sV21PbppaAGFGf8IZcs+jEq3JdVQM VetJzA1xIu4u3OsxegAHOMzk90lVvN8aI7X4Ga91suDJnuKK8vGTn40AhMtBHcemHTGkyd f62DEPI4CPpbfb0MJ5MJ2IAhMre0Lf35c9xi2xL/9b/VUfNvOIfit0PmgcDQjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427026; a=rsa-sha256; cv=none; b=gCvwABx+VVftkl00s/vvZSdOIVd7rOPrLsSrfXTwkgRNWMC4bi2eEiYFQqS1+5MuaTjvIO r+zvry09bqKsO9AElgxkwpCiUQ4/oRfSTqN/Qo573o2iwr7xGJRh/9O5lOX9RA6Z51yW7j dLNon9N11YpSQLYO5wMAU4h7++RUsiIhsTLYL/8wE3N462ujDBwymSQiSeobhhax5uJnnK tg7bnXVellLvmn8majkL6iS7PjkRr79OLJQelFbF8JaGAq0KoDFsGuzur7kyxeAfBWiAwu 1cf1KC9hmRbnvzRpt4VZ+Z4wYD3jqVet+aWPkVokyviFVKKhgkGpimMar16Bog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P93G1fDDQDRwDw92xAaoRr4PWQKXkpbxypcCPjzRXpg=; b=H+OpNE/phD9itat+Iyb9FyZK6WmB3gftF+VMQKU0YVMEGnsi+sNMJvvt/b9zzC/qcRdM5O n/fseZB4zqiyuo9H+QRY63GNxoP1Gzw4RdLOHjAfrTaJ/mdE4OcGqmz17a7U+5fveBllk6 C10FNaKDUMcSvhxKdY2gVxcIaDVAKRUfzVd8FpCD+iwSg/l2lZFKZKUiQY77tE2jtoziXM QoDlipepTH+7uJZnv7/ZZIf39DmH7852GXwvzRwOGGxe0CByDLr0NTO2qws1/XK03PJFIf 88X5dDwn4Ndq1n9LMp725c+KF2NcueN2iLNc2IRupmMJW+gOn3aJMGYDf0c1IA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrf5L6pzfYS; Wed, 4 Oct 2023 13:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhkQT020004; Wed, 4 Oct 2023 13:43:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhku4020001; Wed, 4 Oct 2023 13:43:46 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:46 GMT Message-Id: <202310041343.394Dhku4020001@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: 20c494a9d3f2 - stable/14 - unix: Fix a lock order reveral List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 20c494a9d3f20e2942c99ca517d0e983a0ac73e8 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=20c494a9d3f20e2942c99ca517d0e983a0ac73e8 commit 20c494a9d3f20e2942c99ca517d0e983a0ac73e8 Author: Mark Johnston AuthorDate: 2023-09-27 12:24:11 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:41:38 +0000 unix: Fix a lock order reveral Running the test suite yields: lock order reversal: 1st 0xfffff80004bc6700 unp (unp, sleep mutex) @ sys/kern/uipc_usrreq.c:390 2nd 0xffffffff81a94b30 unp_link_rwlock (unp_link_rwlock, rw) @ sys/kern/uipc_usrreq.c:2934 lock order unp -> unp_link_rwlock attempted at: 0xffffffff80bc216e at witness_checkorder+0xbbe 0xffffffff80b493a5 at _rw_wlock_cookie+0x65 0xffffffff80c0a8e2 at unp_discard+0x22 0xffffffff80c0a888 at unp_freerights+0x38 0xffffffff80c09fdd at unp_scan+0x9d 0xffffffff80c0f9a7 at uipc_sosend_dgram+0x727 0xffffffff80c00a79 at sousrsend+0x79 0xffffffff80c072d0 at kern_sendit+0x1c0 0xffffffff80c074d7 at sendit+0xb7 0xffffffff80c076f3 at sys_sendmsg+0x63 0xffffffff8104d957 at amd64_syscall+0x6b7 0xffffffff8101f9eb at fast_syscall_common+0xf8 This happens when uipc_sosend_dgram() discards a control message because the receive socket buffer is full. The overflow handling frees internalized file references in the socket buffer before freeing mbufs. It does this with socket PCBs locked, leading to the LOR. Defer handling of file references until the PCBs are unlocked. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41884 (cherry picked from commit 61a14ddfe012ca7b57a101725e5c654269f200ca) --- sys/kern/uipc_usrreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 291ff7cf8cae..f12693f3982a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1332,8 +1332,10 @@ uipc_sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, } else { soroverflow_locked(so2); error = ENOBUFS; - if (f->m_next->m_type == MT_CONTROL) - unp_scan(f->m_next, unp_freerights); + if (f->m_next->m_type == MT_CONTROL) { + c = f->m_next; + f->m_next = NULL; + } } if (addr != NULL) From nobody Wed Oct 4 13:43:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrh0mPmz4vxZ1; Wed, 4 Oct 2023 13:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrh08DRz3Z0D; Wed, 4 Oct 2023 13:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5chuR6igoSf7D4ruDgLB/MJw9DjaukEnMrYUU8iKISU=; b=eQJqkomlrWLZE6GOlCtCxMbLm9+ZNNivy7lBRY18sxheNuA82727SvF8a1HwvtRidZQ0MZ Img+cRyg5UCK+RASfBzmP+Bno2JiEDM7eUMMNTZhdpkly5hNKK2l8KQ/6gw0mBMu8rWjsb TNyrhz5EGR8tY1/mRMtpDyisHfub6r+N/dY8qOW+RUwwRdl10laFRYgjTJHTmUgSqrXlej czjgi1eMZ396DwAqZyUzuYz08BVHERt8cknaSVObThHH1X94WDS+Hv3pkRBMlK2GcysmNY WbOLN8UrwjSwzmyeHoLReu7fwrTtYhelEk2v59nXmnQgoAvMSsCIGXqpjTLOTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427028; a=rsa-sha256; cv=none; b=P+sHVrkqZVocdrdAZVhdi+K/rsJo4q72iwfZeqqVRqgZxMfjDzAuOQtER7Qw5jcM2K1VEA asO5qZJXpXTFX3VlkT7ZTysNzbhnCu3ECav6aooBUc0XvagY/I3DkOzaevHEDfNsXgNOcy qaAO6QCSNLC1Oq/xObSBvy1Ln/+m4x0NdwzJRMuohnicJtHzBXGn4X7WDAjEwMGUo/QBW3 X/6RktOP27Ms6iyNPdSyv6AwK0XtWsbGLW28m2cszo6SdmZDM2Rw+SlcNe/5h4ebKTBCus FPhxst038KzUIom7cW0zhdmb3yVyW+9TVVjvYH2VU0Nc9nVeWOcwd5gjTlpbeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5chuR6igoSf7D4ruDgLB/MJw9DjaukEnMrYUU8iKISU=; b=Kmk9HGE44JI6UM7C75WA2oebO2pd9/lm7grKtBPe5jqYxjeTtlo1JGrXoNPstxrU0TtovZ wNJPK3FqlGvTnd1nrWXbxaMHo2lgh7hzTyO4cRnGM3mtZCNxcDkzCuo1IRjiVA1XTZo+g9 HqTbq/EFPlTTkIX11IzdHqUOQyokF6FbcwKbfsxAicC25WdNgxwi0prA4HNNY+0L0czPJy RQ4OsYio4sfmcxZRQTfvy7FYrGiiGzlkagvz9CRiFqcJlgJiPh2wSZ6QTaJzMID/O5yvy/ QBTJdcKLYNqHL+JjKr2wmz8tKWu4TnkCzct7GaJaO9kq9vgnI/NxfNfKqobZhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrg6JllzfxH; Wed, 4 Oct 2023 13:43:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhlwC020049; Wed, 4 Oct 2023 13:43:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394DhlRM020046; Wed, 4 Oct 2023 13:43:47 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:47 GMT Message-Id: <202310041343.394DhlRM020046@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: 1e8737f4e884 - stable/14 - hdac: Defer interrupt allocation in hdac_attach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1e8737f4e884fdf4b966056662e4e6003d3379d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1e8737f4e884fdf4b966056662e4e6003d3379d9 commit 1e8737f4e884fdf4b966056662e4e6003d3379d9 Author: Mark Johnston AuthorDate: 2023-09-27 12:23:58 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:41:52 +0000 hdac: Defer interrupt allocation in hdac_attach() hdac_attach() registers an interrupt handler before allocating various driver resources which are accessed by the interrupt handler. On some platforms we observe what appear to be spurious interrupts upon a cold boot, resulting in panics. Partially work around the problem by deferring irq allocation until after other resources are allocated. I think this is not a complete solution, but is correct and sufficient to work around the problems reported in the PR. PR: 268393 Tested by: Alexander Sherikov Tested by: Oleh Hushchenkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41883 (cherry picked from commit 015daf5221f7588b9258fe0242cee09bde39fe21) --- sys/dev/sound/pci/hda/hdac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 422f7f930ea5..2cf9239499af 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1270,9 +1270,6 @@ hdac_attach(device_t dev) /* Allocate resources */ result = hdac_mem_alloc(sc); - if (result != 0) - goto hdac_attach_fail; - result = hdac_irq_alloc(sc); if (result != 0) goto hdac_attach_fail; @@ -1347,6 +1344,10 @@ hdac_attach(device_t dev) hdac_corb_init(sc); hdac_rirb_init(sc); + result = hdac_irq_alloc(sc); + if (result != 0) + goto hdac_attach_fail; + /* Defer remaining of initialization until interrupts are enabled */ sc->intrhook.ich_func = hdac_attach2; sc->intrhook.ich_arg = (void *)sc; From nobody Wed Oct 4 13:43:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrj1wsXz4vy0B; Wed, 4 Oct 2023 13:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrj1D63z3ZJB; Wed, 4 Oct 2023 13:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpWBeyxmzn3nVz8tCP84aDVExSsU9SvLp7aatm61g10=; b=mR9h2MPqtm6vnJCx9fVoRSeQe5WySnuubdwj0r0vC/YI3HyCycdbK+s1dlHHWc75X9j8c5 1m3wClObHb2AvnTz43zmDQkeEYHVHwWzyXiSrn3Af9sBKcLt2HEz/N6ogoLskbdJRbvx2T yFjlUG1yzLyxuqReBBvnleIDd/fM41NSq2NbjLD7ez1u4n+lInyG1Tpj0XHNE0VCdLgjry eyHwhdmvHTy7PvfhM7ExpWFXpeEmYrCCJLwDKsMRRSpakqBXjNqEE91rdgqa2jad+XqPNK Txwcx1NEdhwrieVQDXoK6BXmU/V17OxJhciQbC67z5WjEdr8/LcUOfMEPOu8YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427029; a=rsa-sha256; cv=none; b=gUMu0UbccddAy8H6Dti6wkogSnunDZAvNq+30HbEci3Au5qEyMp++Shll54vevYQIZPGQW /9x0qUqKDdvZshFlgZk9dbCiirXcxOt187pe8+Hkxnyp4JAFmegjR0bhJHmrDzyT34J6dq 8wC9W88iV1sK9SYM2N2Y/4sVCGW7HG5UaxBTZhNqpEqKuJ2VnIEWF7PPeazZUcn6gg+0rI PsZNJ1MmXNpuTTIqa+vJOuCWodGz8GB8TJfVpVWir3xINKOb0OZfTJqOY8rXwRQ7VllVEV 2jWDhBu5kKTJDMFupO+TXJIwzrDhlgdbypvkdeY4MeznMKtNBhAKzfG2L2+RUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpWBeyxmzn3nVz8tCP84aDVExSsU9SvLp7aatm61g10=; b=O1bdjnTBsFNawWaYmsAdQGXgVCcBZjJovMuFQiZzT+dff8oYNruUitwyiW3ak5wTfu8dkA f6S+eUxeuzlCklp04FD77nuMxOpikR79cetPw3hH8zz5/Rffd1dpXH5Rvu7IqjhwEDA4ot OAr3XHDPW1p6cZDah/BtiDFRfulftEYHD6DI8NEHmaflRf0YKR5JSb4O0MV/gt/76vxoaC K9loN604glnes541AjDuVDcxnVQpXdVPrSvcV4CICPEkrDWsmM2xU4mxYb7GjdSYllRoNn Z+j4v4w8x0FWmtKLlz+ynfUc4rvBHj3UahHtb6IksxI4Ho30KPGpYBP/W+R2IA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrj0DggzfYT; Wed, 4 Oct 2023 13:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Dhmqb020110; Wed, 4 Oct 2023 13:43:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhmte020107; Wed, 4 Oct 2023 13:43:48 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:48 GMT Message-Id: <202310041343.394Dhmte020107@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: d4a5d7a15544 - stable/14 - makefs/zfs tests: Run zdb prior to importing makefs-created pools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d4a5d7a15544d5e561f4235b9b40457e2c52626a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a5d7a15544d5e561f4235b9b40457e2c52626a commit d4a5d7a15544d5e561f4235b9b40457e2c52626a Author: Mark Johnston AuthorDate: 2023-09-27 15:58:34 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:42:07 +0000 makefs/zfs tests: Run zdb prior to importing makefs-created pools zdb contains quite a few assertions that can help catch bugs. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 87534f95dd2ed51e01165e0072cb1c7790809a8b) --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 250a313481d9..e8da4cc87055 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -56,6 +56,8 @@ import_image() { atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ mdconfig -a -f $TEST_IMAGE + atf_check -o ignore -e empty -s exit:0 \ + zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd $ZFS_POOL_NAME atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME echo "$ZFS_POOL_NAME" > $TEST_ZFS_POOL_NAME } From nobody Wed Oct 4 13:43:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrk2hXPz4vxc0; Wed, 4 Oct 2023 13:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrk28f9z3ZPM; Wed, 4 Oct 2023 13:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWJ7qYG6mpGD6Qj7Tb6r5O0R8YAj/Tkhxl6k55z+j8A=; b=beNdBsh1AInZrQgPGeoT76ZE6VuvbfPF4fraRRm97lD+h1qosHvTIrPLSUheiQ6mzaBZwC zpnWMp9gFadXuKzAcw5aWXkWbWYWTQzD8wApnr24ii5UO13/v54eJEBbc3LcjZG3dzLAYL UiqBfmDog6bS89O/4QJjRoE5uAvzUiLwog8PSTOADaTTgFGpLrHpQo3IuARvDRerR6tk6e YZDDwL69wA4DOx3Kd5A3j0+X2ig8he8c8u9pGtqKLS3nooYqjwqdWbCrHuZ4yllf0DgvoQ zP33olcMKO4bh/h+x0UsQL/SNNUNhsX4RW/q/Uf6j845lKuEx0Vc3x+1yZ5l/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427030; a=rsa-sha256; cv=none; b=dWD/T99w/yYT/odmWlKPhl6XTW/EUhEOv8E34tdnHBlSzT/7EvJMpBr4XLhoB3DfXFUcga e03obhJg74JO9/UW1Lj+qASXGjDIrTmsLa1TJCC5wRYIVaAvGeJ8pMgUz9MrDMCvVzP15N IxrpjMXoG8dLmprpifY8Hr9eTxM6NwPF9IC+rwxMpH2OGpYfWz2QFi21BcA8jZCHCiR8wn nniswF2CWvbk6HZYfLasBPS++A0y08L9OKoPVN4MrM7PEYrpmNcaXKxkpJTGlwjlAUYiZ+ w9IBMw2GqlzMDc5or5k05hNhyE9hfR7yhoQtXmcjrcGfxT0IA7J5yCktrvzk9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tWJ7qYG6mpGD6Qj7Tb6r5O0R8YAj/Tkhxl6k55z+j8A=; b=lfrHN44qJqFP2kWdK+7jhWQkicWauFmWhV8qutazN8X/HiexmPmVnVt9xdZNCpOHQhaBdb feZIaRApqGo7wIFncswsakiO9nUczJHgf0McBnAddSSBGRdSmkuwaj8zRO7qQN1WvtAB0E FWx8g7b/onXaw7QmBxLFTZtSWdratztdKPPmBeCZPsYhuVCJiohNhwDujv2iarEqDDnh1X btdXEjprvW1WmYMPPwVg8Ox4OSUf9cy3sL9c8dSLbtZn9Du4620lL4IE6DE2vvhQPFmC6M Jt1lklpQmwwI8WH6eRAjiYgU9YVq5T0M1iCHPvD2xJwqCmxPDon4hr6wpQQhHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrk1C3qzfxJ; Wed, 4 Oct 2023 13:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhoE6020164; Wed, 4 Oct 2023 13:43:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394DhoPq020161; Wed, 4 Oct 2023 13:43:50 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:50 GMT Message-Id: <202310041343.394DhoPq020161@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: ea5173e57255 - stable/14 - makefs/zfs: Set the objset block pointer fill field correctly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ea5173e5725564da4b95a5b98410b8cd43520dab Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ea5173e5725564da4b95a5b98410b8cd43520dab commit ea5173e5725564da4b95a5b98410b8cd43520dab Author: Mark Johnston AuthorDate: 2023-09-27 15:56:33 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:42:14 +0000 makefs/zfs: Set the objset block pointer fill field correctly It is supposed to contain the number of objects allocated from the set, excluding the meta dnode. Reported by: mav MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 46402fd21631b7d4686f8c341d92db6bcb190e5d) --- usr.sbin/makefs/zfs/objset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/objset.c b/usr.sbin/makefs/zfs/objset.c index 22277c150712..3e3dcdeced4b 100644 --- a/usr.sbin/makefs/zfs/objset.c +++ b/usr.sbin/makefs/zfs/objset.c @@ -121,6 +121,7 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, STAILQ_FOREACH_SAFE(chunk, &os->dnodechunks, next, tmp) { unsigned int i; + assert(chunk->nextfree > 0); assert(chunk->nextfree <= os->dnodecount); assert(chunk->nextfree <= DNODES_PER_CHUNK); @@ -149,8 +150,8 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, * Write the object set itself. The saved block pointer will be copied * into the referencing DSL dataset or the uberblocks. */ - vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, 1, - os->phys, os->osblksz, os->osloc, &os->osbp); + vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, + os->dnodecount - 1, os->phys, os->osblksz, os->osloc, &os->osbp); } void From nobody Wed Oct 4 13:43:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrl4Jrdz4vy6q; Wed, 4 Oct 2023 13:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrl3MGyz3ZV6; Wed, 4 Oct 2023 13:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfVa7/K29DLL/m7xWZKxldsc0pBv+yd4ItMiYbOfZYE=; b=gOVdCEVGYP+6PScpGNY0eOl7UVKXEoCQQ7HJRlFm/i1JBKUZhvcuUwTw7JEWeLGKtt4E/G hykWJFBTc5YvSNZNo2PfT0OUZjxYL5rPlD+Nb8qCncTn5x/Ul6yFoiWCOCBgoweG4VeD41 ekmFo5HP8g/iWfugobQP88AID4VegQNFJcYIYsxgnFCiFdKyi73gWSLWUn+fvJP9MWseqW YGcSwjBBlgLZym5Snq5kt+bp8nvLxOYqsPnj3CxhL98N7lVP6gyMXqGc+tEgoM/OhnH2kY sm1lSFAuzKoLZYmwMZs4Quohcny+9J1GTrDGQDQ8iJBN2xwShwee/7rQ/XlVlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427031; a=rsa-sha256; cv=none; b=t3GfJbKitXZj+YSR2zK6HpKwO/hZ2CghM6ILEQclrhjYTcFiEE4rXrz4+nKwnUcR5Er3ng mGVkGQ9tV6n47hqmCIjeYa3tSRNg2QWIXgvn+LgC4uXVFeKq6kDnDskZeC6ldxy6Ok1Sgr qYAbjId8D4gitcfzTGtE5vnlDNCUlCob0YhE2ya2Hh/DR/8rNoeV1FZBPR2oxAIeQTRXIH eWNJ/NfZZFNNlnT1st0foky3dD/vcLo9etzE4yP5cf//v1DLm7eQH+g/yPgfBL7UeZW5az nmFYL3IITMxnpXhjnCcrWw+BUrmJeK25Qi6BjbSQMJTGH3dUZVsSKGCd9ytTVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfVa7/K29DLL/m7xWZKxldsc0pBv+yd4ItMiYbOfZYE=; b=YNE4HWw0oBEYeqKPBUfLWcu1k0qztmzXlRAA5FsfM5drF/WZ8rEC2wWZsUiGtsHUJQC8RJ Xjigo6fEJ6XrtUdtL+qOMs/L1CA9F8ECbsqW05ExUFihOyjb9nH7SWH7sSgT4bR+o9zj2M 4LVKWrBH73pG4T2wiZYb+l4muHJaJI+5ZhmFTVPiSyzn7+/ZA0TbiKfiWrG2LbX3NE2rR4 0nBHXbeMDIouL/2WVwuJUxNmlCfewCchiyoH9GbHyhJ8NV1+cJmdqx3Rl+O35kUMiduZDj 7uARsv5hUepLDveNqFZqjExh+NPCAaSXLNy11BLEsyoN7GBDdpfwGNipbLHtuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrl29Zgzfvk; Wed, 4 Oct 2023 13:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394DhpYb020206; Wed, 4 Oct 2023 13:43:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhpw3020203; Wed, 4 Oct 2023 13:43:51 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:51 GMT Message-Id: <202310041343.394Dhpw3020203@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: 0074d0551ded - stable/14 - makefs/zfs: Remove a nonsensical comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0074d0551ded1652155a23c6a8d04043c8ede1fd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0074d0551ded1652155a23c6a8d04043c8ede1fd commit 0074d0551ded1652155a23c6a8d04043c8ede1fd Author: Mark Johnston AuthorDate: 2023-09-27 22:21:37 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:42:23 +0000 makefs/zfs: Remove a nonsensical comment When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Though, it could possibly be used when building other types of filesystems. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d) --- usr.sbin/makefs/zfs/fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index a4968d5f91e8..0d85ea8eb9d8 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -551,8 +551,6 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) /* * Fill up our buffer, handling partial reads. - * - * It might be profitable to use copy_file_range(2) here. */ sofar = 0; target = MIN(size - foff, (off_t)bufsz); From nobody Wed Oct 4 13:43:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrn0m4Qz4vxc7; Wed, 4 Oct 2023 13:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrm4lLwz3ZKf; Wed, 4 Oct 2023 13:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LtBwPaYbrfPUMHCemnmgwz+Effm6KjLLNZINHzvYBk=; b=G7EBxa5DYpKzHLeHcl2MQZkjpRqPHx1yzUcpslnGMXGBT3h9rl3XloLc9Uxrbz038ZzHQ+ fYhz4HsMrIZps52lXJn8AXl1rng9SrThB6YtRJY1MKj4FV7AONeJqroEjj3asFxuiCUILO xY8KsWiSEmcqx1jq277X97BuhubvtqC6Ce4Y6UpmS4oxQlSa1NkO8jQWTMhehsGZWVCUs2 FgMX3iEPkUr7hoxU+X4qV7aRkfVKLIt9Gw7uzPmBiEbbFqk/210I5dFEdrCao53U2flcvR TSU0ioAzTPyzbkQs1vk+vM7sm03U5K1nk0GtUrrzDiPZ/PssMogApCjfTzvCeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427032; a=rsa-sha256; cv=none; b=R6qoszgRnFQ9SRKPfQwJ+TodX5vlNoloLtLDOGVFiqDAyitOyh7rKJ96ZCVEQ132/ORtjF 0x9xvvaC30Ki+388Dvw1eZ5Ljl+AyRgxOU/K4vrFblG7XbCIVaU4eqU95BWh/SGx4wS7Bv sGgmIxTIoPyAV6zkMU4FkJegCre6AVOaw38eoFq5CDnwL0VSzHL9aozqHSZLwL/10CU+s+ J11xVrNR9B9On3MUtqA2PgjNUrtdnJ4t6UJZUvSkolIW9t3Vqkd/nr6soLBtMLxN7y3HwM mXZa6morrVAimlso7vfEfIaC569ihy+yZtG39jPpIMkXVhvCslcO/Or5Dq359A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LtBwPaYbrfPUMHCemnmgwz+Effm6KjLLNZINHzvYBk=; b=g8w0NiN/O9FNSSYl0WiAEtUBM4sSL6ISw3STnngMULdTZFwvf7PTnQU66d3vKDWwwemkSB RQVEe8CLhcLQ9l/Trg1ZqW8MQK9zE/u5j2PJbjrqkgflrRRS5Rfxc8AiuKlZ8IB8CFAkre NiGioVd8g/UStX+hBRVcYlCbUrreZx7zMEyDJM0C44suTnb1sfaX+Jhirk2SL4PRmryQ6A 2p4h5Hp7vW7Xspz3+SyweyOUZwa1k0WDMDDAsCaGOonmtmryEoKG7TePKrBj7wzQKHI8iM 7JI6qZ2LeAXbTcaEFxG2AML4lk2xGIw/tw/sd4RWu23QgclvSmlsGGBNMGvceQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrm34Q8zfYV; Wed, 4 Oct 2023 13:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Dhqpe020272; Wed, 4 Oct 2023 13:43:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Dhqr1020269; Wed, 4 Oct 2023 13:43:52 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:52 GMT Message-Id: <202310041343.394Dhqr1020269@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: 5175923ef4ac - stable/14 - makefs/zfs: Ensure that the last block of a file has the right size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5175923ef4acb6faff370177fb60700721f13f92 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5175923ef4acb6faff370177fb60700721f13f92 commit 5175923ef4acb6faff370177fb60700721f13f92 Author: Mark Johnston AuthorDate: 2023-09-28 20:16:17 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:42:37 +0000 makefs/zfs: Ensure that the last block of a file has the right size When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for each block. The space allocator rounds up to the nearest block size, but for files larger than the maximum size, this can result in the last block having a smaller logical size than the rest of the blocks belonging to that dnode. This violates some ZFS invariants when appending to that file. Modify fs_populate_file() to use the same block size for the final block. Reported by: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit ef20cd33d3287ebead0d30f2e177fc57a97dc2d5) --- usr.sbin/makefs/zfs/fs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index 0d85ea8eb9d8..b0a4c639f256 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -515,7 +515,7 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) uint64_t dnid; ssize_t n; size_t bufsz; - off_t size, target; + off_t nbytes, reqbytes, size; int fd; assert(cur->type == S_IFREG); @@ -546,29 +546,30 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) bufsz = sizeof(zfs->filebuf); size = cur->inode->st.st_size; c = dnode_cursor_init(zfs, arg->fs->os, dnode, size, 0); - for (off_t foff = 0; foff < size; foff += target) { + for (off_t foff = 0; foff < size; foff += nbytes) { off_t loc, sofar; /* * Fill up our buffer, handling partial reads. */ sofar = 0; - target = MIN(size - foff, (off_t)bufsz); + nbytes = MIN(size - foff, (off_t)bufsz); do { - n = read(fd, buf + sofar, target); + n = read(fd, buf + sofar, nbytes); if (n < 0) err(1, "reading from '%s'", cur->name); if (n == 0) errx(1, "unexpected EOF reading '%s'", cur->name); sofar += n; - } while (sofar < target); + } while (sofar < nbytes); - if (target < (off_t)bufsz) - memset(buf + target, 0, bufsz - target); + if (nbytes < (off_t)bufsz) + memset(buf + nbytes, 0, bufsz - nbytes); - loc = objset_space_alloc(zfs, arg->fs->os, &target); - vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, target, loc, + reqbytes = foff == 0 ? nbytes : MAXBLOCKSIZE; + loc = objset_space_alloc(zfs, arg->fs->os, &reqbytes); + vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, reqbytes, loc, dnode_cursor_next(zfs, c, foff)); } eclose(fd); From nobody Wed Oct 4 13:43:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0wrn61yQz4vy0L; Wed, 4 Oct 2023 13:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0wrn5Y1hz3ZVs; Wed, 4 Oct 2023 13:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPe4SvYTRjfO4mStTe2tEQd7NG30LTz/BWFVQy95Cqk=; b=j7HdQKye4egbQURTArCy6gZcySV/WhtSxW6xeIzOxQUUK0GAFCb6h9zuq2w3K76vQUfDhF XAeRcY6oJKv+0aaMbs6MDNTgJW5oC1dVmoQj1iwk+3I3kSCoajKZ8UuiM6b1q26fO7vMlI jZdXNRPOMGmeGDPM7/9mg+zkDNkI4yxgE/cPkfCcQ5E71sabCpTYkFV6HzKjTvnctWMdV1 JTVXgd5gnqCElZt99V0uv8+UWam6PCET//fvACGfuurSPRNr8kzKwuejDRynPit+ApsLXV Xtyf2jSexT1jdCS0cTnXIpZcVtx4EGOkI3D5E2/DwoSLOf5q8fl9KHexiaN3bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696427033; a=rsa-sha256; cv=none; b=bvAgRIKZTu/zQEO/tpWCvRU42FT0UAgldt6mZ3+g9zF/LWhiSra8FEObuvP/Vt/Fhc4dRL hhP7erEZAI5kp4CcjpVOMGpYBOFtKuhMJ5zOeCAFLfGISfiCR9iWrGCCSwFJfRU66c6/UQ JUpG+9ZIJGaBykCs/42forbx/zcTh73UZheflU9fw/I4NmGM8pLK6Ws4HNcYrzOdoobruj r/sdCpPl+DVxkge6A9DCtsCdu1ptUShmODKgrav70hM8/BFg+1hnawr3pWuf29UHCaE5tT RNR3I5YbLORC3kzE6YEgBG4OWJ8gnYKchR697NtS1B+EUpeHa9acKUIvN4Rp/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696427033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPe4SvYTRjfO4mStTe2tEQd7NG30LTz/BWFVQy95Cqk=; b=reSjjJbX8oIM+DBnGMuWASX2azVC8/mLpTiDaMexZbrsIRfql0bz6PxV+PROlwWjfWS9dp 7mykAbC6wBaJSiJU+HyRz3mdi5HHEvuP/eQBk/li9zTYJtjmvopbJBeckgoqcTlBiHTblp DLgFPW9yd/dJWf8XfH9GfFwwVYnkkbY8SYXy9/DlQuurIwEhn/OXwveGj7IXW6gyQKWbbg Hl3mkJpc00/g7nHzJ7qG2yxXykhfa4GDgN+Z/ABICFJakjtrfHTIMijPKUOvrlAz6D9vLn wcVtZiDNY78QG/TU9hTtK9Rrv5ce6p1k899YAuZCx2+T/1B7Jm786HDc0AnQkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0wrn4ZY5zfxK; Wed, 4 Oct 2023 13:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Dhr1m020339; Wed, 4 Oct 2023 13:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394DhrBA020336; Wed, 4 Oct 2023 13:43:53 GMT (envelope-from git) Date: Wed, 4 Oct 2023 13:43:53 GMT Message-Id: <202310041343.394DhrBA020336@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: 162787ac4947 - stable/14 - makefs/zfs tests: Add a test case which appends to a file after import List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 162787ac494720edcae8bf2fd26b8a8f952f55fc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=162787ac494720edcae8bf2fd26b8a8f952f55fc commit 162787ac494720edcae8bf2fd26b8a8f952f55fc Author: Mark Johnston AuthorDate: 2023-09-28 20:25:06 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 13:42:48 +0000 makefs/zfs tests: Add a test case which appends to a file after import MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit b6da7f2fd127f447aa20843666b98d3a1d07b8c9) --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index e8da4cc87055..9173600dc555 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -191,6 +191,40 @@ empty_fs_cleanup() common_cleanup } +atf_test_case file_extend cleanup +file_extend_body() +{ + local i start + + create_test_dirs + + # Create a file slightly longer than the maximum block size. + start=132 + dd if=/dev/random of=${TEST_INPUTS_DIR}/foo bs=1k count=$start + md5 -q ${TEST_INPUTS_DIR}/foo > foo.md5 + + atf_check $MAKEFS -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ + $TEST_IMAGE $TEST_INPUTS_DIR + + import_image + + check_image_contents + + i=0 + while [ $i -lt 1000 ]; do + dd if=/dev/random of=${TEST_MOUNT_DIR}/foo bs=1k count=1 \ + seek=$(($i + $start)) conv=notrunc + # Make sure that the first $start blocks are unmodified. + dd if=${TEST_MOUNT_DIR}/foo bs=1k count=$start of=foo.copy + atf_check -o file:foo.md5 md5 -q foo.copy + i=$(($i + 1)) + done +} +file_extend_cleanup() +{ + common_cleanup +} + atf_test_case file_sizes cleanup file_sizes_body() { @@ -699,6 +733,7 @@ atf_init_test_cases() atf_add_test_case dataset_removal atf_add_test_case empty_dir atf_add_test_case empty_fs + atf_add_test_case file_extend atf_add_test_case file_sizes atf_add_test_case hard_links atf_add_test_case indirect_dnode_array From nobody Wed Oct 4 14:46:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0yDz5rQyz4w3dW; Wed, 4 Oct 2023 14:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0yDz5BVsz4Fgm; Wed, 4 Oct 2023 14:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696430787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wxlh9G7bxMXjVnCnW+E+DyQiarMe5SX94EhKGeA3SYI=; b=IlZPXrkjroON4hJbH5IqtNcz9tu5Z+Dhj8tUmWnE9pNC4TBLXqzwcHk8f/uJmfFLzKLBq5 KqBJW0AwEeHFqd0Mw9skv5fMZ2Kkvd3xDbrlaYtWFgVZXSE3gz4yxCYH4hY0HcVBh4Jytv Hc+E7+0khYVsLgjmjmqY+QfzlHZGsfft12L7L/4+Ly3Xkg8SBct0QjlAkofsEqrcIN0kHK xX6t6PiHVNGIYHY32d3eKEnI4V0pu6eiG7+MCSCocx5ZZsCncbR4ByFCOCnB8Ph8dmwWG7 FIStklLD4xUocwNJBBrIBp4H9dZAUuKbj9kJSBORVqCuZ/ElQkm6cXdbKoCbjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696430787; a=rsa-sha256; cv=none; b=c5SfFSWZaenUakkLyCz0xc46pUEAZZ1xHuWyTmI37sK8EjSpSWMkEtZ+hKZ6ymT3Tfgk70 MAVOT2KGJAaYhGOqlPMgdDas4m5gMwMNDVkwxGFANsSvJtMQUseQEtkW9sJzl43/uUamzl G22vcQsysfx0OESqzIP/jUcHyz1TVIwVKH6mtMLy04AIGcibpGhmu2b86t7ShcM97PsWlN ZoIS6KfNv7HzzmMpwPLrqxIE53op0um4u/G/QEcXXU9sBT4+BolgitEPAGWpeJnFS7l/IA YQ7y3OLQrARAsgyMqq3DfJv1h3Npw/SC++aECj7EIuTQJLnxWH+PcYrAq7aURg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696430787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wxlh9G7bxMXjVnCnW+E+DyQiarMe5SX94EhKGeA3SYI=; b=P6hdOboWx+4k9stcXGmXvTGOUqeINwXhQTwO0dEV6uBp7a3f6vrPDbvgt0M2b1CqOqwvQj ndE9g2HOm/S9t94QrX2Ekd2o4YfDIcKczpf123J3PR0hwxxFNcslp4CYEPs5+fjJTH/GoF Up4gHUHjCu8terjEyId7rFbY2cy8BSLbll8lmwi3jp66Q+Fqp3JOXj+4f8jYgJWIlrPSMN P0pXg2C0KK4M1prGdYRAOzXkE2sY91pu8XXTNdFgsPsNMauRXTMhYn4fwy4bXOUUI2/aRe /gkizIR1+e/tq4s+IQpFiNhmSWCll0/E+KpTsT3da8odtyWV6DpduuyLB9iIrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0yDz4Dt4zhVl; Wed, 4 Oct 2023 14:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394EkRIx020216; Wed, 4 Oct 2023 14:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394EkRsU020213; Wed, 4 Oct 2023 14:46:27 GMT (envelope-from git) Date: Wed, 4 Oct 2023 14:46:27 GMT Message-Id: <202310041446.394EkRsU020213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 30beebe444f5 - main - freebsd-update: add a note about when files may be deleted List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30beebe444f5f415a388be9df91107246bd32674 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=30beebe444f5f415a388be9df91107246bd32674 commit 30beebe444f5f415a388be9df91107246bd32674 Author: Ed Maste AuthorDate: 2023-09-29 15:47:41 +0000 Commit: Ed Maste CommitDate: 2023-10-04 14:45:57 +0000 freebsd-update: add a note about when files may be deleted Files under /var/db/freebsd-update are required during the upgrade process, and to support rollback. They may be deleted if no upgrade is in progress and rollback will not be required. PR: 273601 Reviewed by: bcr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42022 --- usr.sbin/freebsd-update/freebsd-update.8 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.8 b/usr.sbin/freebsd-update/freebsd-update.8 index 471ae359c917..0d50ac8822de 100644 --- a/usr.sbin/freebsd-update/freebsd-update.8 +++ b/usr.sbin/freebsd-update/freebsd-update.8 @@ -23,7 +23,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 10, 2022 +.Dd October 4, 2023 .Dt FREEBSD-UPDATE 8 .Os .Sh NAME @@ -251,7 +251,11 @@ configuration file. .It Pa /var/db/freebsd-update/ Default location where .Nm -stores temporary files and downloaded updates. +stores temporary files, downloaded updates, and files required for rollback. +All files under +.Pa /var/db/freebsd-update/ +may be deleted if an upgrade is not in progress and rollback will not be +required. .El .Sh SEE ALSO .Xr freebsd-version 1 , From nobody Wed Oct 4 15:08:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0ykN4qsYz4w5Qt; Wed, 4 Oct 2023 15:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0ykN44NZz4KCq; Wed, 4 Oct 2023 15: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=1696432108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoYmcyjYN8WKFxddYBHIWiyDU2UVCpG5GdXPogn5syA=; b=qGd+3GOQ+3qlB/a2Ci522zY3Zlk5kba7Tj69Ggc32lKCoduADtqNO6otzmOpmGbwmm5WYx yehxp6z4X7NT3f2rS1xPUtiIOCSlshU3Zov9995cSDLumkl2Q+VAJ5Dmbzdv3yftW7x7tA dS5bo8vUokETfM8KkK2ztHH6+t4vjL8XDDUWZnExk9J2vTsqa6dm8xCeL5TVPG9P9/T8N1 EWyMUjCS4DOs5CceU+jJwbiSyU7FsfhXpAFf8cQ3thiGhAy/lDFdUJ3tBwZUiGyNAzEQez c9lrzCiL7CiMHh5xqwbJSkb7H173fT2uG7ji3ZTjfcjxrVyNQICjgNKTBPKamQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696432108; a=rsa-sha256; cv=none; b=q7ErFt9vTxUi/slrlrtUrMXg+xpAkBsCfMTnz4mAhg5/R0ft4gTPI7Ym2YfDnlyTi6bAmh tRIHEnwDhzwdi3yG913wVVhkRB5+yUIfwalBHj0l0tg4/r8tSrDPL1pfXsyFqmgEyRaGOP 7MfFkZrimKxcomvd0opCldS3cecTwOwT2QQOdzQGfcw1pHoTLMHJNhuRPMwpFWUffgfZOb waUDqWgfQ0JiTGWxqDk02BO2iQ7QReTcQxokKobkby7zlyoSgrGx/TYJgoXZhrkouuZn1t nEm2ooirbNoliKePZbrcO06TwykGLi8bxGPFDSkM4/o7QDn+li2QGjXKRYYE7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696432108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoYmcyjYN8WKFxddYBHIWiyDU2UVCpG5GdXPogn5syA=; b=JzHmOhVUjOGEWXjdA4k37tLxBR8Ka/jGNyi2puOI71LYphkbYf6aD8yMsubZGsPzQTkIwg EQtgBwerTe/31CKijCs/UsOi5DFtVtce0urCA52+ob61F4uBRrgUVJNilUy8V9yRuVrHCM +gFuq7WMpvCWYXjtUV15dU6lVRR9m5876MiKndua40bAMGUXFDcyfes9ZQdbJUMsEc6lw0 WfUL5dpdN++8GGWQ285em81DddsJig2888TOAiIY+QP3iUf4Jsn8rrC0Lkbs+7P8huaU6V oMLlpFRrZH/c9lFmWeC/XhA8CA/VNCkeP3I2l65tCHPsLt82Gp1a7540Pi3ICQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0ykN37CmzjBw; Wed, 4 Oct 2023 15:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394F8STj053708; Wed, 4 Oct 2023 15:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394F8SAr053705; Wed, 4 Oct 2023 15:08:28 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:08:28 GMT Message-Id: <202310041508.394F8SAr053705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6962da914dd5 - main - axge: Add support for AX88179A List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6962da914dd511349b219241e92b32329be76fc6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6962da914dd511349b219241e92b32329be76fc6 commit 6962da914dd511349b219241e92b32329be76fc6 Author: Damien Broka AuthorDate: 2023-09-19 16:26:06 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 15:08:06 +0000 axge: Add support for AX88179A The AX88179A has two firmware modes, one of which is backward compatible with existing AX88178A/179 driver. The active firmware mode can be controlled through a register. Update axge(4) man page to mention 179A support and ensure that, when bound to a AX88179A, the driver activates the compatible firmware mode. Reviewed by: markj Pull Request: https://github.com/freebsd/freebsd-src/pull/854 MFC after: 1 week --- share/man/man4/axge.4 | 12 ++++++------ sys/dev/usb/net/if_axge.c | 39 +++++++++++++++++++++++++++++++-------- sys/dev/usb/net/if_axgereg.h | 7 +++++++ 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/share/man/man4/axge.4 b/share/man/man4/axge.4 index d42a1a233c59..9ca268d6ff83 100644 --- a/share/man/man4/axge.4 +++ b/share/man/man4/axge.4 @@ -28,12 +28,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 24, 2015 +.Dd October 4, 2023 .Dt AXGE 4 .Os .Sh NAME .Nm axge -.Nd "ASIX Electronics AX88178A/AX88179 USB Gigabit Ethernet driver" +.Nd "ASIX Electronics AX88178A/179/179A USB Gigabit Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -59,13 +59,13 @@ if_axge_load="YES" The .Nm driver provides support for USB Gigabit Ethernet adapters based on the ASIX -Electronics AX88179 USB 3.0 and AX88178A USB 2.0 chipsets. +Electronics AX88179/AX88179A USB 3.0 and AX88178A USB 2.0 chipsets. .Pp -The AX88179 and AX88178A contain a 10/100/1000 Ethernet MAC with a GMII -interface for interfacing with the Gigabit Ethernet PHY. +The AX88179, AX88179A and AX88178A contain a 10/100/1000 Ethernet MAC with a +GMII interface for interfacing with the Gigabit Ethernet PHY. .Pp These devices will operate with both USB 1.x and USB 2.0 controllers, and the -AX88179 will operate with USB 3.0 controllers. +AX88179/AX88179A will operate with USB 3.0 controllers. Packets are received and transmitted over separate USB bulk transfer endpoints. .Pp The diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c index 385a982afd9d..cae1d61feb34 100644 --- a/sys/dev/usb/net/if_axge.c +++ b/sys/dev/usb/net/if_axge.c @@ -28,7 +28,8 @@ #include /* - * ASIX Electronics AX88178A/AX88179 USB 2.0/3.0 gigabit ethernet driver. + * ASIX Electronics AX88178A/AX88179/AX88179A USB 2.0/3.0 gigabit ethernet + * driver. */ #include @@ -70,13 +71,15 @@ */ static const STRUCT_USB_HOST_ID axge_devs[] = { -#define AXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } - AXGE_DEV(ASIX, AX88178A), - AXGE_DEV(ASIX, AX88179), - AXGE_DEV(BELKIN, B2B128), - AXGE_DEV(DLINK, DUB1312), - AXGE_DEV(LENOVO, GIGALAN), - AXGE_DEV(SITECOMEU, LN032), +#define AXGE_DEV(v,p,i,...) \ + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i), __VA_ARGS__ } + AXGE_DEV(ASIX, AX88178A, AXGE_FLAG_178A), + AXGE_DEV(ASIX, AX88179, AXGE_FLAG_179, USB_DEV_BCD_LTEQ(0x0100)), + AXGE_DEV(ASIX, AX88179, AXGE_FLAG_179A, USB_DEV_BCD_GTEQ(0x0200)), + AXGE_DEV(BELKIN, B2B128, AXGE_FLAG_179), + AXGE_DEV(DLINK, DUB1312, AXGE_FLAG_179), + AXGE_DEV(LENOVO, GIGALAN, AXGE_FLAG_179), + AXGE_DEV(SITECOMEU, LN032, AXGE_FLAG_179), #undef AXGE_DEV }; @@ -410,6 +413,24 @@ axge_chip_init(struct axge_softc *sc) axge_write_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_CLK_SELECT, AXGE_CLK_SELECT_ACS | AXGE_CLK_SELECT_BCS); uether_pause(&sc->sc_ue, hz / 10); + + if ((sc->sc_flags & AXGE_FLAG_179A) != 0) { + /* + * 179A chip has two firmware modes that each use different + * transfer layouts for Ethernet over USB. The newer fw mode has + * larger rx packet headers which seem to + * accomodate for ethernet frames up to 9K length and a VLAN + * field for hardware tagging, but is not backward compatible + * with 178A/179 bulk transfer code due to the change in size + * and field alignments. The other fw mode uses the same packet + * headers as the older 178A/179 chips, which this driver uses. + * + * As we do not currently have VLAN hw tagging or jumbo support + * in this driver anyway, we're ok forcing 179A into its compat + * mode by default. + */ + axge_write_cmd_1(sc, AXGE_FW_MODE, AXGE_FW_MODE_178A179, 0); + } } static void @@ -551,6 +572,8 @@ axge_attach(device_t dev) device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + sc->sc_flags = USB_GET_DRIVER_INFO(uaa); + iface_index = AXGE_IFACE_IDX; error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, axge_config, AXGE_N_TRANSFER, sc, &sc->sc_mtx); diff --git a/sys/dev/usb/net/if_axgereg.h b/sys/dev/usb/net/if_axgereg.h index ea7a2c4a98b8..87e662b6cbc1 100644 --- a/sys/dev/usb/net/if_axgereg.h +++ b/sys/dev/usb/net/if_axgereg.h @@ -32,10 +32,14 @@ #define AXGE_ACCESS_EEPROM 0x04 #define AXGE_ACCESS_EFUSE 0x05 #define AXGE_RELOAD_EEPROM_EFUSE 0x06 +#define AXGE_FW_MODE 0x08 #define AXGE_WRITE_EFUSE_EN 0x09 #define AXGE_WRITE_EFUSE_DIS 0x0A #define AXGE_ACCESS_MFAB 0x10 +#define AXGE_FW_MODE_178A179 0x0000 +#define AXGE_FW_MODE_179A 0x0001 + /* Physical link status register */ #define AXGE_PLSR 0x02 #define PLSR_USB_FS 0x01 @@ -202,6 +206,9 @@ struct axge_softc { int sc_flags; #define AXGE_FLAG_LINK 0x0001 /* got a link */ +#define AXGE_FLAG_178A 0x1000 /* AX88178A */ +#define AXGE_FLAG_179 0x2000 /* AX88179 */ +#define AXGE_FLAG_179A 0x4000 /* AX88179A */ }; #define AXGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) From nobody Wed Oct 4 15:23:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3s3PCdz4w6WX; Wed, 4 Oct 2023 15:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3s2f4Dz4M8C; Wed, 4 Oct 2023 15:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Z+DafY4N/G8pVLlHXvn43bQWGeT7Gh/XF8pYhkpLSk=; b=TOmbPqq2wftROd8wxS0qPBHgG2DcWQ0BhuS9cFpNHPOvtWVYqfV0FDyUlvzjHJ9kt/dEvI 8XS4oXBYsu29CvuUv+NsVIvaWHXlOqEbgk10rsakJJX6cNFbeHoLjNrH9Zb/MnZjJliV7y J8Q8xU7kwEh3ANved069wBL6SSwZ7mdIQGs6yEhuqPQWi8XwDlzdFSBRVKQhppYiq/e98C cx7ge8OvpQSSH+b8mkOmonejbPiXEVcfG8fDic62CVDLCSCMzRSoW/6qBp2E7cmMVjTC73 Bk5+nkQT7CvR0xJg8/40Nnu3TDUmVIX3UInZT5KaCqbJ5Q/Gl9MbUmp4YQjkjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433017; a=rsa-sha256; cv=none; b=gTHsBOqETD4rEFLHhf9Q6LdaeoFasbIr/U+nMZAocHaCNda2kWDR4xwhpRYm20U8+Bxb7Q aqUw9NtmE/+V6ZN3yhzgrkfYNhbgMnY/qJ6NTb3qs3TSw+D7umHzWbOpkxyuX9aOE4Z4iE qig30yKeu1iZd/Kw+Q+zwpl/gtqMFCvH544kpFp96UAeqyrXuBQJc78JVTuTYs0tRF/qBB mytTq9fcB8b014JpJThS7doQm9RYoPQjWFs6Ht5lSU3AYBKm8fMQpqAcc9wN4mBSkTGU4b fi9T1zE4LiDenvwAW8g7V5hrZxszQWb3wUXbNhHw8A7NqEHkaq3A5tf2XedHKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Z+DafY4N/G8pVLlHXvn43bQWGeT7Gh/XF8pYhkpLSk=; b=dvLEESX7yf7ldSvrft98uHNn44sS+2SZ8TcgLu5TgAHeQGhpw9uJ0Zza/fLvbSzjZvLACu cGTdCk82pEvo+GzvVNxcxa6WI+AF5gc8jzLucMyzp9DvZbTJ18D+9ekP94P3ss7zaV/QAF 26FCcRZ7VGEVr6+eDOZW3slU2XdwZ491wKohBpXH9Kjsz8sqy17LXyyIdAFk+hXH0l8Adi AvjY1Zsba4RpXiceU8DeS9EKPSmEKgTvRjveiNNdu86r/yOIFqO0VUJuQtAJ2fHebfwMMN l2BWwlJVpjBYlWc11sAgKNyPmpWEEXAMEsM4uD+2+IOO0q/Jv2nxEmu5gbNe9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3s1jjBzjJb; Wed, 4 Oct 2023 15:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNbs3086607; Wed, 4 Oct 2023 15:23:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNb7U086604; Wed, 4 Oct 2023 15:23:37 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:37 GMT Message-Id: <202310041523.394FNb7U086604@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: 54523452030a - stable/14 - tools/wlanstats: fix -Wunused-but-set-variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 54523452030a7490b93b7cee2b827886becd8960 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=54523452030a7490b93b7cee2b827886becd8960 commit 54523452030a7490b93b7cee2b827886becd8960 Author: Bjoern A. Zeeb AuthorDate: 2023-09-11 14:11:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:17 +0000 tools/wlanstats: fix -Wunused-but-set-variable The "allnodes" code is currently #if 0 so also #if 0 the setting of the command line option and variable in order to keep wlanstats compiling. Sponsored by: The FreeBSD Foundation (cherry picked from commit 530c13c5401c1f29f8325cf851d96778852a1ba3) --- tools/tools/net80211/wlanstats/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/tools/net80211/wlanstats/main.c b/tools/tools/net80211/wlanstats/main.c index 4c0cf4db0505..ac100a70622e 100644 --- a/tools/tools/net80211/wlanstats/main.c +++ b/tools/tools/net80211/wlanstats/main.c @@ -168,18 +168,26 @@ main(int argc, char *argv[]) struct ether_addr *ea; const uint8_t *mac = NULL; const char *ifname; +#if 0 int allnodes = 0; +#endif int c, mode; ifname = getenv("WLAN"); if (ifname == NULL) ifname = "wlan0"; wf = wlanstats_new(ifname, getfmt("default")); +#if 0 while ((c = getopt(argc, argv, "ahi:lm:o:")) != -1) { +#else + while ((c = getopt(argc, argv, "hi:lm:o:")) != -1) { +#endif switch (c) { +#if 0 case 'a': allnodes++; break; +#endif case 'h': usage(); exit(0); From nobody Wed Oct 4 15:23:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3t584kz4w6GN; Wed, 4 Oct 2023 15:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3t4SjPz4MHs; Wed, 4 Oct 2023 15:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5BxVnPaVmmSPBK5qaIcYQCnopMnqc+KX4rwJ8suPr4=; b=jbNrXMpe66yESNobF8BcaI5DGqNNpzoXH6zN3B/WxBGoNDDWvvTq+k7eMvrSt+MyE5Ks3X 0z+9aLqce8YzyL7kdiOpcA/O2+LkWLA8B0RkdWSwWmtXPQu0F1sgW/AozffL4/KnYsQuNw clOHJC+EUq8h1uWJ0kFzhbB65FbfI/kVRxQ73/uClCnIMkX3foxCDvpb3jGMjbLig11BK6 OvcOaAakYPUsNxMmxh32iUxcXbMGqKzc9xpC7w/iWbfJ4yMKVDsRrwSoTfKamcB6fm3iNZ Ue//dayuLofRHIZUVvBlaQrlU9VfRXMwrcP4ghd763256YyO2z93ITf5gxkBTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433018; a=rsa-sha256; cv=none; b=pq5F57laj7HdZbA/9P9mT9nVdccJqb9jLxUuFCv7diGUVuc0r/aZFQtJxlZYpO9lGYRGs3 Yvg7XxmVyQUYl6T2bE0q9Ok85umTv0cvtdwoJyZ7ACevfetAgFGxWaSRq0iulMcnLxbf9+ ytzJezJdA2evtnIGYAxdp6R1xmK0EqGVjyx1O+RDF6NWu7sG8lxkuflGeGNsXBcuM8xGf4 d1ucmnMN9uSLfr1PAzk7MkIefFDU8rcuxbp8N3xMBjGix9hAtU8QxsVk+nnRsltbkD+st+ yGTEGlCtRvfZnHU819q3eCWi9wMcpQuoh20E+R95PHMaZwRlFIvCrszbfMzFAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5BxVnPaVmmSPBK5qaIcYQCnopMnqc+KX4rwJ8suPr4=; b=R00P9UmJChy8EeDnjA4Z4+KOBMkMuFAoLaTruxRCvsd/7BbXasYjvu8SS3/DvCin1RWKBY 2ET2b/tWsvxRYx9UUlopQiRAUegtDIlvEj7u94EJRwPdHIs1ttIZcS6z6nwcEtc91uDTTK 9+VWdqxgVWIyPsuz+sHNvQ7GOXqKohP+v89ZtRqhgwzBw0SrL5GfGOVns4lguUxMCuHjKk UzT6bsSeaqHtvOSq+DwY6F8iwK17rlmdUUfhwZo0IZeVWQHnCh6FmB3aZVmsO5gUZwTEpr kq81sbWqk1w2rFhwAJvwK/Easr0s9DE6iZQ6jnGm3gaJkkO3IOYyyceNWXBFBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3t2kk1zjdJ; Wed, 4 Oct 2023 15:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNc5D086656; Wed, 4 Oct 2023 15:23:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNcef086653; Wed, 4 Oct 2023 15:23:38 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:38 GMT Message-Id: <202310041523.394FNcef086653@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: 76a10a216784 - stable/14 - net80211: fix ddb print alignment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 76a10a216784f5c11939244c269a43759870ea68 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=76a10a216784f5c11939244c269a43759870ea68 commit 76a10a216784f5c11939244c269a43759870ea68 Author: Bjoern A. Zeeb AuthorDate: 2023-09-11 14:23:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:17 +0000 net80211: fix ddb print alignment Add missing \ts after new lines to properly align output of ddb show commands. Sponsored by: The FreeBSD Foundation (cherry picked from commit c45d05b71817e478953d6f235d921c2b4acc82de) --- sys/net80211/ieee80211_ddb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index 7a6ee49d7705..4e2df134c7a9 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -506,7 +506,7 @@ _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) db_printf(" ht_sta_assoc %u", vap->iv_ht_sta_assoc); db_printf(" ht40_sta_assoc %u", vap->iv_ht40_sta_assoc); db_printf("\n"); - db_printf(" nonerpsta %u", vap->iv_nonerpsta); + db_printf("\tnonerpsta %u", vap->iv_nonerpsta); db_printf(" longslotsta %u", vap->iv_longslotsta); db_printf(" lastnonerp %d", vap->iv_lastnonerp); db_printf(" lastnonht %d", vap->iv_lastnonht); @@ -550,7 +550,7 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, db_printf(" phytype %d", ic->ic_phytype); db_printf(" opmode %s", ieee80211_opmode_name[ic->ic_opmode]); db_printf("\n"); - db_printf(" inact %p", &ic->ic_inact); + db_printf("\tinact %p", &ic->ic_inact); db_printf("\n"); db_printf("\tflags=%b\n", ic->ic_flags, IEEE80211_F_BITS); From nobody Wed Oct 4 15:23:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3v5PGTz4w6dh; Wed, 4 Oct 2023 15:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3v4pFkz4MJP; Wed, 4 Oct 2023 15:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAZknI050IRJHKENpKa6+6QbtVCgMsAbGNzamiB4z1Q=; b=nijWvdf3ujLbXVmfwb+L3WHkgxvTZTW64eDEyeV9rB4LVSRr462v4r0iH7g8tHeu/0NOrr FtNrsXqIjChSa33BJSmEuhSmC4AG+rIdHkb2PwMRLWwUrxUO7EAVn899X9oUU5/ELcbvcR DxiZzsTqSeWnzM9/0wzhU+H5DyFKLgJyg07nb/FkHqFoKwJBfR2T4imFOlKVItwMUti0H/ MuSPz/MePcroN+DOphWwM0p0fVjc9EwCEkJfABclZ+khjkciKEpPATHe3YR3qDWg/hsnBY WZcOTQjEQae3diMtDDfn607aOLOv+BjL3pCC4tfFyLsAyamaqtoWF2CUk1qYgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433019; a=rsa-sha256; cv=none; b=f32oO++mXyN+C43rgCuUjfyuV2vJDK/+nnT5GHz1b95nkss+ACes4bMNQWungAJWtriEye gSc/UH6/eUIGlCRnPqHBjm29kC907MFGd8Aho4eIILf6p4UDBhkpRDXCTOVFVk9NKWF++t us60rmCrKJ51sGFkSICG6gV+ERbq8wrNiA6xzq78SMa9eOXO7pk58hSZTzPC1zTRyW7hri 0JS7X0vvZJrwCWzhXW59yQ/pvgudpEsYTISmxil0JxdRqmSz9/1dlLLdVm6AW0hMTIJWPd /QkkCqQtWds85YzPrN6431gMJW3X4N8VZ8AhNPU6K0GaFS9GDF+t867djmw1qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAZknI050IRJHKENpKa6+6QbtVCgMsAbGNzamiB4z1Q=; b=NeaCp8dNemn/gMEzVhThyJ2gHHaF2mpqjewGlAx7WatrNtzYA8LhzyYlDzRFRi+mMxnvfb Tc+9X41QtiysSSdbRsAhDnd2WXmH3TQBQPDBrq3JnGx91Acpb3GF3K1QwNGo0ZpmqzmJQo FJ1rT+DKrO1wjusn1Wr1Za64zHIJP7glRc7E41XetGF+x8T98zcT2FfWwxrom65ffZiu7Q sAPpds1WEfdcNfcPN3BvD8wgKtWAp4kvwVriOiLj//9CCjjAjRKPoRcup3v6pd0gZTNbFe R7EbP/LjSznSKpuUEfVpL7psmVg7SopRtdyo3gyGZsQbJwmE+4LIthHJTh7bjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3v3j3SzjdK; Wed, 4 Oct 2023 15:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNde5086698; Wed, 4 Oct 2023 15:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNdi0086695; Wed, 4 Oct 2023 15:23:39 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:39 GMT Message-Id: <202310041523.394FNdi0086695@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: 20ca85c50d78 - stable/14 - net80211: improve scan debugging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 20ca85c50d782dab4bf4306db4ac0e6164a42b53 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=20ca85c50d782dab4bf4306db4ac0e6164a42b53 commit 20ca85c50d782dab4bf4306db4ac0e6164a42b53 Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:36:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:17 +0000 net80211: improve scan debugging While debugging other problems I ran into the case where net80211 was thinking a scan was ongoing and new scans could not be started but given other logging there was clearly no more scan running. It was hard after the fact to quickly determine enough state to reconstruct or validate assumptions. Improve a MSG_SCAN debug logging and implement _db_show_scan() ddb output which can be printed along with show com /S or /a. Sponsored by: The FreeBSD Foundation (cherry picked from commit 33396ec29f1daae31f4738f0da98dce168ca73c6) --- sys/net80211/ieee80211_ddb.c | 74 ++++++++++++++++++++++++++++++++++++++---- sys/net80211/ieee80211_ioctl.c | 6 ++-- sys/net80211/ieee80211_scan.h | 6 +++- 3 files changed, 77 insertions(+), 9 deletions(-) diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index 4e2df134c7a9..525814d202b1 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -67,7 +67,7 @@ static void _db_show_sta(const struct ieee80211_node *); static void _db_show_vap(const struct ieee80211vap *, int, int); static void _db_show_com(const struct ieee80211com *, - int showvaps, int showsta, int showmesh, int showprocs); + int showvaps, int showsta, int showmesh, int showprocs, int); static void _db_show_all_vaps(void *, struct ieee80211com *); @@ -132,7 +132,7 @@ DB_SHOW_COMMAND(vap, db_show_vap) DB_SHOW_COMMAND(com, db_show_com) { const struct ieee80211com *ic; - int i, showprocs = 0, showvaps = 0, showsta = 0, showmesh = 0; + int i, showprocs = 0, showvaps = 0, showsta = 0, showmesh = 0, showscan = 0; if (!have_addr) { db_printf("usage: show com \n"); @@ -141,7 +141,10 @@ DB_SHOW_COMMAND(com, db_show_com) for (i = 0; modif[i] != '\0'; i++) switch (modif[i]) { case 'a': - showsta = showmesh = showvaps = showprocs = 1; + showsta = showmesh = showvaps = showprocs = showscan = 1; + break; + case 'S': + showscan = 1; break; case 's': showsta = 1; @@ -158,7 +161,7 @@ DB_SHOW_COMMAND(com, db_show_com) } ic = (const struct ieee80211com *) addr; - _db_show_com(ic, showvaps, showsta, showmesh, showprocs); + _db_show_com(ic, showvaps, showsta, showmesh, showprocs, showscan); } DB_SHOW_ALL_COMMAND(vaps, db_show_all_vaps) @@ -345,6 +348,61 @@ _db_show_tdma(const char *sep, const struct ieee80211_tdma_state *ts, int showpr } #endif /* IEEE80211_SUPPORT_TDMA */ +static void +_db_show_scan(const struct ieee80211_scan_state *ss, int showprocs) +{ + int i; + const struct ieee80211_scanner *ss_ops; + + db_printf("SCAN %p:", ss); + db_printf(" vap %p ic %p", ss->ss_vap, ss->ss_ic); + db_printf("\n"); + + db_printf("\tss_ops %p (%s) ss_priv %p", + ss->ss_ops, ss->ss_ops->scan_name, ss->ss_priv); + db_printf("\n"); + if (showprocs) { + ss_ops = ss->ss_ops; + DB_PRINTSYM("\t", "scan_attach", ss_ops->scan_attach); + DB_PRINTSYM("\t", "scan_detach", ss_ops->scan_detach); + DB_PRINTSYM("\t", "scan_start", ss_ops->scan_start); + DB_PRINTSYM("\t", "scan_restart", ss_ops->scan_restart); + DB_PRINTSYM("\t", "scan_cancel", ss_ops->scan_cancel); + DB_PRINTSYM("\t", "scan_end", ss_ops->scan_end); + DB_PRINTSYM("\t", "scan_flush", ss_ops->scan_flush); + DB_PRINTSYM("\t", "scan_pickchan", ss_ops->scan_pickchan); + DB_PRINTSYM("\t", "scan_add", ss_ops->scan_add); + DB_PRINTSYM("\t", "scan_age", ss_ops->scan_age); + DB_PRINTSYM("\t", "scan_assoc_fail", ss_ops->scan_assoc_fail); + DB_PRINTSYM("\t", "scan_assoc_success", ss_ops->scan_assoc_success); + DB_PRINTSYM("\t", "scan_iterate", ss_ops->scan_iterate); + DB_PRINTSYM("\t", "scan_spare0", ss_ops->scan_spare0); + DB_PRINTSYM("\t", "scan_spare1", ss_ops->scan_spare1); + DB_PRINTSYM("\t", "scan_spare2", ss_ops->scan_spare2); + DB_PRINTSYM("\t", "scan_spare3", ss_ops->scan_spare3); + } + + db_printf("\tss_flags %b", ss->ss_flags, IEEE80211_SS_FLAGS_BITS); + db_printf("\n"); + + db_printf("\tss_nssid %u", ss->ss_nssid); + for (i = 0; i < ss->ss_nssid && i < IEEE80211_SCAN_MAX_SSID; i++) + _db_show_ssid(" ss_nssid[%d]", i, + ss->ss_ssid[i].len, ss->ss_ssid[i].ssid); + db_printf("\n"); + + db_printf("\tss_chans:\n"); + for (i = 0; i < ss->ss_last && i < IEEE80211_SCAN_MAX; i++) { + db_printf("\t%-3d", i); + _db_show_channel(" ", ss->ss_chans[i]); + db_printf("\n"); + } + + db_printf("\tss_next %u ss_last %u ss_mindwell %lu ss_maxdwell %lu", + ss->ss_next, ss->ss_last, ss->ss_mindwell, ss->ss_maxdwell); + db_printf("\n"); +} + static void _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) { @@ -532,7 +590,7 @@ _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) static void _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, - int showmesh, int showprocs) + int showmesh, int showprocs, int showscan) { struct ieee80211vap *vap; @@ -679,6 +737,10 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, DB_PRINTSYM("\t", "ic_addba_response", ic->ic_addba_response); DB_PRINTSYM("\t", "ic_addba_stop", ic->ic_addba_stop); } + if (showscan) { + db_printf("\n"); + _db_show_scan(ic->ic_scan, showprocs); + } if (showvaps && !TAILQ_EMPTY(&ic->ic_vaps)) { db_printf("\n"); TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) @@ -707,7 +769,7 @@ _db_show_all_vaps(void *arg, struct ieee80211com *ic) db_printf(" %s(%p)", if_name(vap->iv_ifp), vap); db_printf("\n"); } else - _db_show_com(ic, 1, 1, 1, 1); + _db_show_com(ic, 1, 1, 1, 1, 1); } static void diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 6fe39f588bab..674d163e3e67 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -2590,8 +2590,10 @@ ieee80211_scanreq(struct ieee80211vap *vap, struct ieee80211_scan_req *sr) sr->sr_flags |= IEEE80211_IOC_SCAN_NOPICK; IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: flags 0x%x%s duration 0x%x mindwell %u maxdwell %u nssid %d\n", - __func__, sr->sr_flags, + "%s: vap %p iv_state %#x (%s) flags 0x%x%s " + "duration 0x%x mindwell %u maxdwell %u nssid %d\n", + __func__, vap, vap->iv_state, ieee80211_state_name[vap->iv_state], + sr->sr_flags, (vap->iv_ifp->if_flags & IFF_UP) == 0 ? " (!IFF_UP)" : "", sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, sr->sr_nssid); /* diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index 4274f3948db6..a33864b102e2 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -147,6 +147,10 @@ struct ieee80211_scan_state { unsigned long ss_maxdwell; /* max dwell on channel */ }; +#define IEEE80211_SS_FLAGS_BITS \ + "\20\1NOPICK\2ACTIVE\3PICK1ST\4BGSCAN\5ONCE\6NOBCAST\7NOJOIN" \ + "\15GOTPICK" + /* * The upper 16 bits of the flags word is used to communicate * information to the scanning code that is NOT recorded in @@ -328,7 +332,7 @@ struct ieee80211_scanner { void (*scan_spare0)(void); void (*scan_spare1)(void); void (*scan_spare2)(void); - void (*scan_spare4)(void); + void (*scan_spare3)(void); }; void ieee80211_scanner_register(enum ieee80211_opmode, const struct ieee80211_scanner *); From nobody Wed Oct 4 15:23:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3w6VRlz4w6dk; Wed, 4 Oct 2023 15:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3w5hysz4MpV; Wed, 4 Oct 2023 15:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOM0k4kV4SvhZmqk7gObb3Kv6iv+MMZ2EtW4wIG2uMc=; b=lMVZU1piDiu6huzBXNZvfek/nOO9VIrEoEz8O4APkuCnt6+oE9gsHXpjkqWsoJBxeVmowN 7joeAHbGfeCTTfu+7E7LfmpEOx0bxwqUw/wFbaRdfJ+e8grN+0FWmZsV7LmgXOVfcdpMzz SD7arOwVmzfL9xO0FMfdeEr6xrsRB55FmwJurh3C1TwYITC9feLScHy5oV6+U86zQW8W53 sl5VVAXthJd415G1IWJ2az6hyvThzHuHgPI/yOBDrvEET4OWqXUI0SF32Y3ypyt8gm9W/U 61z9HKeYq8e1JJSEEJE6YgYMQU7t+954qlpEyxcya1s/RlONzV9T2RnHsYVYBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433020; a=rsa-sha256; cv=none; b=SjxKEgev2zNP+fo1HVhoSMRJENFFqVB8btFsF+Drt2wnKZiq/V/ESP185GeehyuOkVjwqI KIhQ+MhV1kZbPeMmuVCgo40X/6sf+dYPadSYsBtMtky+vDJHni5m/AhiiF0M+we9+PexVV 1n4f8rqJEkZwYTBOf/LrbmkdUf/A3l9A7TdpOiRz4UC0DyvYg2pd/5JuoimLqiQF5BPsmS 1ySaMd43pAb/5qV52DXNyxBL3tKDvu2/y1k2vzredc//DrXkeJBXtBrJ2kaNKUhFCB3UG2 Q3JE6haz/Vmof6R1gPznn7iXsDu+D3PET0B6iUO4lIuHSODTQK1yClXS0f0tRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOM0k4kV4SvhZmqk7gObb3Kv6iv+MMZ2EtW4wIG2uMc=; b=jxQaERitG14LeKfIFYkuHPjzV07izpX9/LNnlCwK8khhO5yGpRvxQcPuILjEshjtm3and8 X3bzw7YYScQCWLlCC2Mk8ilUPjgtO2BAxHJwyp7Zu4JhPebrtG3jmUjqKnsMHGQ2j2r3fT 0D/LcaDa3HYpcnEAiy8+L1BsYEgMC35Q3QS+0J4g+SARsaz2MH6Q0l/I2LLLAl4GB4NKaY huLjQCoI9Q26k/ycavQKANeRWHI4yzbCHwLianUXyLWwRckYayYm/IYewh+Kr9D6gVuNS3 pNmH198sDtihyMpm2jg5pdQVK0is2iSLHRstQpKd/XGWCHVCXBZmWkaONYVdTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3w4kf6zjSP; Wed, 4 Oct 2023 15:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNe9i086749; Wed, 4 Oct 2023 15:23:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNemi086746; Wed, 4 Oct 2023 15:23:40 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:40 GMT Message-Id: <202310041523.394FNemi086746@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: 32d951c53f44 - stable/14 - net80211: mark argument to scan_curchan_task() __unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 32d951c53f443a4b7533b5f5099d464fa38f19a8 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=32d951c53f443a4b7533b5f5099d464fa38f19a8 commit 32d951c53f443a4b7533b5f5099d464fa38f19a8 Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:34:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:17 +0000 net80211: mark argument to scan_curchan_task() __unused Mostly as documentation mark an unused argument to scan_curchan_task() as __unused. We may possibly want to check all callers in the future and see if the argument was supposed to be useful or should be entirely removed. Sponsored by: The FreeBSD Foundation (cherry picked from commit 778da03b1271f52051620ec9b053524727961c9e) --- sys/net80211/ieee80211_scan_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index ac97b7c14cbc..0aaa80a6c48d 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -674,7 +674,7 @@ scan_start(void *arg, int pending) } static void -scan_curchan_task(void *arg, int pending) +scan_curchan_task(void *arg, int pending __unused) { struct ieee80211_scan_state *ss = arg; struct scan_state *ss_priv = SCAN_PRIVATE(ss); From nobody Wed Oct 4 15:23:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3y109Pz4w6dl; Wed, 4 Oct 2023 15:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3x6R1Lz4Mrt; Wed, 4 Oct 2023 15:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IdrQ8ZHkKO6Q39UEELiNEeDLpndMoh0zeRR7jwcD6eE=; b=rITh1tMNKURlIkf6p6zY0Qrppr0JoCDlb713sKpsxX/do9W6qUbc/NBEICeAQqc+tJux83 zi5YIDmLxZRcDWp4UqjVpKjPtQGFDCZh6TFqU5WQ1lw8/8NrRoHGM26JugajoBRWKz/oGR qbplxpyFnUMTcIYqZeXYbgWGPdYd+oeOcV6ismlNhFXwPqgKYiyxd3C0JfLWGNAp8CQCkX MNs/nGePNh7jKiwsd1X0QRDLUKyAxYjAxKm62hm7X3zzgOkmcTgPZjJEFhx8w60ByHgu4w adw4lPTYgs4E9TgjMZ2DUc0+1D3mDGtl/fc5KqS8Dkv1GPS8uamlyOBjAb2JmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433021; a=rsa-sha256; cv=none; b=aelkf0b3LEivcyp8yLNIllGUs/9WA/cULtmUueNSuP1sjVdeu93vqzw1yaBba1AlnNXZtw xKozvWa/ucTr4KqqoEQX7+891bd+fTtgEaPMlj/mioxSOKd3CBT0jiwvFMaeYm7aJH7r2z 4BwxcqTiJDBfe1kilPbhFQCqWwDXrgzqmvr7JaO1DyzMHNcFANC+m/J1kuAGeqcL1dL4ss FjuCXoMk+2TTn4u3E/4YeMqJYZX3YbmfzivdyHTDeLCzInmf6UKaZpAwjTBW0Oxv5GvL94 yZzHxEgO6FxKV0XnWpkh2xoKzuPa3Z3+W8zTAlFHLIfUjV0NjeV9nS648Ukl2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IdrQ8ZHkKO6Q39UEELiNEeDLpndMoh0zeRR7jwcD6eE=; b=AjcY7UbrzJx0Ms1W16CcLjdBqFrbfzNNGbJv/Yys8kPpRw798IOziQOh86VlzlEoUCjc7m jNK31/hL00KJTmve3UCB6uS7Flp87WM8yc74GmCipLcYQNePcVncaed+182ooLb+BLaLyf JVkYfQWTl5r3gRstL7TQ4OrX2RA8thXJhV6nqw1Ez258cmmwVUlOTaA8QYfPIyeUENHTJf faw+qU+pMAeEpizT8rV+CGS6wCKQ+6jBc08QXBxGVQVKfCSZBtxbDpzIE6Z9Bx7yCH/4Jm GzAP1Q57RzPy/cwSxsFco4ZRQ9DBw9GOoC0HN2EV0AALF6hNT0AQs/yrgn3Y3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3x5XSnzjBJ; Wed, 4 Oct 2023 15:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNfin086810; Wed, 4 Oct 2023 15:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNfr9086807; Wed, 4 Oct 2023 15:23:41 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:41 GMT Message-Id: <202310041523.394FNfr9086807@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: b011575ecd8b - stable/14 - net80211: improve ddb output for sta and rate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: b011575ecd8b442d5f9d697ef88fed84f3c651ef Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b011575ecd8b442d5f9d697ef88fed84f3c651ef commit b011575ecd8b442d5f9d697ef88fed84f3c651ef Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 13:53:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:17 +0000 net80211: improve ddb output for sta and rate Add more missing fields to the ddb output of sta (including spares so people will notice if they use them to adjust ddb as well). There are still more missing fields (some left as reminder in an uncompiled __notyet__ block). Add _db_show_rate() to print iv_rate as well optionally including function pointers. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ed35b7d1eb5dddfd04f574ac122651d532d2df9) --- sys/net80211/ieee80211_ddb.c | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index 525814d202b1..e4a09a58049b 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -48,6 +48,7 @@ #include #include +#include #ifdef IEEE80211_SUPPORT_TDMA #include #endif @@ -327,6 +328,31 @@ _db_show_sta(const struct ieee80211_node *ni) ni->ni_vht_pad1, ni->ni_vht_spare[0], ni->ni_vht_spare[1], ni->ni_vht_spare[2], ni->ni_vht_spare[3], ni->ni_vht_spare[4], ni->ni_vht_spare[5], ni->ni_vht_spare[6], ni->ni_vht_spare[7]); + + db_printf("\tni_tx_superg[] = {"); + for (i = 0; i < WME_NUM_TID; i++) + db_printf(" %p%s", ni->ni_tx_superg[i], (i == 0) ? "" : ","); + db_printf(" }\n"); + + db_printf("\tni_rctls = %p", ni->ni_rctls); + db_printf("\tni_drv_data = %p", ni->ni_drv_data); + db_printf("\n"); + + db_printf("\tni_spare[3] = { %#jx %#jx %#jx }", + ni->ni_spare[0], ni->ni_spare[1], ni->ni_spare[2]); + db_printf("\n"); + +#ifdef __notyet__ + struct ieee80211_psq ni_psq; /* power save queue */ + struct ieee80211_nodestats ni_stats; /* per-node statistics */ + + /* quiet time IE state for the given node */ + uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ + struct ieee80211_quiet_ie ni_quiet_ie; /* last seen quiet IE */ + + /* U-APSD */ + uint8_t ni_uapsd; /* U-APSD per-node flags matching WMM STA QoS Info field */ +#endif } #ifdef IEEE80211_SUPPORT_TDMA @@ -403,6 +429,31 @@ _db_show_scan(const struct ieee80211_scan_state *ss, int showprocs) db_printf("\n"); } +static void +_db_show_rate(const struct ieee80211_ratectl *rate, const void *rs, + const int showprocs) +{ + + db_printf("\tiv_rate %p", rate); + db_printf(" iv_rs %p", rs); + db_printf("\n"); + if (showprocs) { + db_printf("\t ir_name %s", rate->ir_name); + db_printf("\n"); + DB_PRINTSYM("\t ", "ir_attach", rate->ir_attach); + DB_PRINTSYM("\t ", "ir_detach", rate->ir_detach); + DB_PRINTSYM("\t ", "ir_init", rate->ir_init); + DB_PRINTSYM("\t ", "ir_deinit", rate->ir_deinit); + DB_PRINTSYM("\t ", "ir_node_init", rate->ir_node_init); + DB_PRINTSYM("\t ", "ir_node_deinit", rate->ir_node_deinit); + DB_PRINTSYM("\t ", "ir_rate", rate->ir_rate); + DB_PRINTSYM("\t ", "ir_tx_complete", rate->ir_tx_complete); + DB_PRINTSYM("\t ", "ir_tx_update", rate->ir_tx_update); + DB_PRINTSYM("\t ", "ir_setinterval", rate->ir_setinterval); + DB_PRINTSYM("\t ", "ir_node_stats", rate->ir_node_stats); + } +} + static void _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) { @@ -569,6 +620,8 @@ _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) db_printf(" lastnonerp %d", vap->iv_lastnonerp); db_printf(" lastnonht %d", vap->iv_lastnonht); db_printf("\n"); + if (vap->iv_rate != NULL) + _db_show_rate(vap->iv_rate, vap->iv_rs, showprocs); if (showprocs) { DB_PRINTSYM("\t", "iv_key_alloc", vap->iv_key_alloc); From nobody Wed Oct 4 15:23:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z3z1yqTz4w6QT; Wed, 4 Oct 2023 15:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z3z0LbYz4Ml0; Wed, 4 Oct 2023 15:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqgSCC54bhwHJNsif5Asp6eR+o+y7caihu6+wWcXrtc=; b=FcmliHtghKWXAdbErukTYeNeGNgSs3LGOzI1rDodH6O/fxG+wNPyUeU+jcvkX85D5xSaZI 5gAHWGxyNW3BqHtioK3VxbWTkK5tsGWXPxlEAuRgKsdkMRxw1I2nQe8MkEE8iMb3mn2Hfj sAbPYB+M8rMdUi4dlLlBRPY7u+y/Z1XtQLepYJ6UhwXFKPoz4pNV1PhE1LKRVlxU8CKExt fRMVPtM2/Kmez8VxyJvd+ijdOBFBdB61lW9pAuoJkbh6dqlC2ciQ11+hssGglKUnJJ8YjO bdsrrJ5n28TPiR5E8SAnxHsn/+1RfW9xa28Xx6NgJzwHPgIsSyLTMkc+SfGuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433023; a=rsa-sha256; cv=none; b=WpvPFeBGEEYEFk0Nvd3zgo7ABaC0/mZVlwrHVAygzSDSF3aUsTVWBHl1m9DhisWOQ0G4ur +1rjmoI18m2in4ouw0Fc+4QhcJps5o4/PAlXHaoU3osRhhC+6rFqzV54SXiZupGWDyizXc F03dLc6JIN2ivegc5hay2/ozg0e/WwLtfgb1UeS3ypZIZ/CSfujC3pjSxXa0w8U08awOJ0 z04cmrlQvRPwhCGiohZmyEIzY5H20/K/a0UsiNnLrygo6CG7WhVERCkqYiN05MxWHkGLhF beyzj7ZbdosQgWuKmgRVCO35TOWQ7vYLG7+j3oxnN/KDxdmqPzW8N+aX2afb3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqgSCC54bhwHJNsif5Asp6eR+o+y7caihu6+wWcXrtc=; b=OmauEb8JdzI10K5LcazLlB4eQ4gvPhS98WjY3nqGXRVvBnJZ3l+acXk8m/kS0pvMaI8wYn pJPjWJa5G90FlbggAXTd5zEjE238gsVEwtHth35tSVa7KKz5YUF1luhNjwHNXMFD6jI3st A7H9JFqdKdUKvds3nCI3zlom8DsUA3EEX3aPvwBpXol5ET8l8He1YvonlbMb77ga9tx/LR o0zFkQd4YcbALdlkMTTye6mFTQxblau0TvZgRnnOD1lWMMl31ggurVuMorpWu5IzUJHV26 NG+DS7Eucs384uFOjarvIlqwWDM1gaR3r4ft/eHT3TfkGS+Ve2DI74yl8jHBdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z3y6YgLzjVJ; Wed, 4 Oct 2023 15:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNgLK086855; Wed, 4 Oct 2023 15:23:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNg8A086852; Wed, 4 Oct 2023 15:23:42 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:42 GMT Message-Id: <202310041523.394FNg8A086852@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: 6104a9f9c520 - stable/14 - net80211: introduce two extra ieee80211_notify_scan_done() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 6104a9f9c5206c9ba23eec29217dff642f26722c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6104a9f9c5206c9ba23eec29217dff642f26722c commit 6104a9f9c5206c9ba23eec29217dff642f26722c Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 11:51:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 net80211: introduce two extra ieee80211_notify_scan_done() We have multiple problems with scanning currently, one being that an initial scan restarts itself and we are unable to start another scan. wpa_supplicant in that case never shows scan results. Starting wpa_cli you may see: <3>CTRL-EVENT-SCAN-FAILED ret=-1 retry=1 messages. Add two extra calls to ieee80211_notify_scan_done() at the end of scans (before possible restarts). That will get wpa_supplicant to get scan results and possibly start associating to a BSSID and get us out of scan. This is kind-of a bandaid but on short notice may help to improve the situation for some. Based on analysis by: enweiwu Submitted by: enweiwu (initial version) Sponsored by: The FreeBSD Foundation Tested by: cy, (others I cannot find email/PR for anymore) Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D38661 (cherry picked from commit 3f382eb23b9fee75d05276a44feb5351d956238e) --- sys/net80211/ieee80211_scan_sw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 0aaa80a6c48d..62f6bf24d42a 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -388,9 +388,10 @@ ieee80211_swscan_bg_scan(const struct ieee80211_scanner *scan, * scan_start method to populate it. */ ss->ss_next = 0; - if (ss->ss_last != 0) + if (ss->ss_last != 0) { + ieee80211_notify_scan_done(vap); ss->ss_ops->scan_restart(ss, vap); - else { + } else { ss->ss_ops->scan_start(ss, vap); #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(vap)) @@ -857,6 +858,7 @@ scan_end(struct ieee80211_scan_state *ss, int scandone) else vap->iv_stats.is_scan_passive++; + ieee80211_notify_scan_done(vap); ss->ss_ops->scan_restart(ss, vap); /* XXX? */ ieee80211_runtask(ic, &ss_priv->ss_scan_start); IEEE80211_UNLOCK(ic); From nobody Wed Oct 4 15:23:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z401tFBz4w6LX; Wed, 4 Oct 2023 15:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z401M25z4N1H; Wed, 4 Oct 2023 15:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9DfLnf+PLEa86eARgEDePZua4X/MnV1hiaQeNuE5A0o=; b=cRUMDhBvS2WPfh/56+uHKBnnOwvi9V+/DwRIPGBbq6XZ7pm2wZale88rAUyntCzYnPqms0 DxwYs3Abaz8Q+DN2QzG44Fq4g6m1GAb5W8I9F0dNh4sPp8y32qvHlISHie9CR94qFMizyF +BEyANSUY9+SKOE9ySKxYjXLWPOqq/b4n/2Y6bAaKqRtm2kA/j+NChVZbsj7V2vPeCxP+3 RSwDQNIRMzOjp8BodLOhRuKeeQAbrHgwEfYjD35PASrWZcdAkfKOi8uDZkDHbLuhOdjNVO 1OYFksClQ8WI+5bo6wpZyuVrIb79WIXcLX3FVYy8oJc8HJKm9n5fMwWFaHuw9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433024; a=rsa-sha256; cv=none; b=CRtYNkdAxDIFYcJdaVknmMlbyfgbTUH7HUQk2P4dseBsowAU1beLuqG1t6feU5TOjHmnkf jlxUkqcJ4baFwxhLYClbIkGwcLpF/ChFESjXJejnRQyZnHQtothR7JL5Z23nC1i5AkMo49 7dT3YhNNn+Yq0J4JiUOKn2amO21K3ZjI0jnmjyrP31+xSUxxhuYw7AoS5+OH7LF9tcit14 sScDYTViDHfqa+44kQdP2Mlf+jHPq7m/x5corBzs9/NFvjm6hItvxWQZArxZeqpr9Vyh8p ABUXYMMrtzryCRN9haWZ06D/XKxEReb8e3UnObv5d9X3nvbnlLcTGJaPATc/jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9DfLnf+PLEa86eARgEDePZua4X/MnV1hiaQeNuE5A0o=; b=L23gM2HHW/O2kjKGXYpEkdDQCAEDHp+N+2G6/siTA8JRqMAZNzj1j9VG49H41Y6o6T5Fc6 wvWjyMoXrsezI/ATIxM1jJHZ08nHlCmlncggyLr7Mu+S3jPpdXvPaMEz8EA1g03ws3txVS Z0UtZm2CsXWEbptlRW2HIQ03xEdfQP/A6yis9/w/3mnVRF2GHXXywZFxx0IOUZy3HptW8C B9ememwXQPN3ZXp/O6Q7s2aHkpV5MqbTTqoyjEjU/XUuC2Lm0HNRvoTKcUfPre45wqtThP p93kgCB2LPwxhuuzzn7x6WtpiNC/FKNvnUwAY5FamAwOdkSfcdJLFEOEdnr+5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z400RYBzjmC; Wed, 4 Oct 2023 15:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNhqm086903; Wed, 4 Oct 2023 15:23:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNh54086900; Wed, 4 Oct 2023 15:23:43 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:43 GMT Message-Id: <202310041523.394FNh54086900@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: 46e5d2b0c6e0 - stable/14 - LinuxKPI: skbuff: remove assumption about mac_header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=46e5d2b0c6e01fd0789a6ef543c8b9f52852301b commit 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b Author: Bjoern A. Zeeb AuthorDate: 2023-09-08 12:47:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 LinuxKPI: skbuff: remove assumption about mac_header It seems the mac_header can be set to offset 0 for frames received. Remove the warning splattering messages to the console for each packet. Sponsored by: The FreeBSD Foundation (cherry picked from commit f0e59b6903c881859d7f4eaf269b2336b774c7bc) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index c917b3f09ac9..f8ce212e7853 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -935,10 +935,9 @@ static inline uint8_t * skb_mac_header(const struct sk_buff *skb) { SKB_TRACE(skb); - /* Make sure the mac_header was set as otherwise we return garbage. */ - WARN_ON(skb->mac_header == 0); return (skb->head + skb->mac_header); } + static inline void skb_reset_mac_header(struct sk_buff *skb) { From nobody Wed Oct 4 15:23:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z415Ws3z4w6Gl; Wed, 4 Oct 2023 15:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z41425jz4N09; Wed, 4 Oct 2023 15:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QFPv8hV7J9GIFiK8Y4UBLNCaogaNWuT5VniC+tvsi00=; b=XGq2uzbm0llfI0zGNlx/tfHOUXc/QJcLIBgR1YSMo3v34EgV4m1WhgimmpDBrpaN+xLhhx BmSVvaA3bgnaC1cqtQsXkhEwgWpB8q5nuX7JxsY0jpcj6VZiiaWCPK1fODxfo8LYpIjNfh UcfrTMyRZh1BzmH1xS0vKCItgvKhkECDet4brxaNVSwza2gtCIlQUdyQ4GMSkNVBuAHAEM Z869pVMe43ZmvE8XMovNpFZqm6cMDSVhtV2aHy77H+3feZWuP9n3iiZ1LfiHODUM17KxQY SrQUUbuPwOGIN524SkDktgx3RqcSNZn9hL/MNhwv+hWOi+81nvM/T1iuT+238Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433025; a=rsa-sha256; cv=none; b=Q0RGUB+Q26IizoOhp2NrlwAcoEw3DtEwWZNPnmRsDbpeZkar7P7OqRsWoCUcDBgz/BaLFO FxQ5bgu98uos1HUQ598cY/O9kOp3kqiFGKuHtOe5Wq2jMRHqk4WlFziAiUhpfpxdiM0Ejr SeUihBj3CXLT+Sf+wPg2ae/pBM/+3WVOMyLeyEAp/Oaulb2u1DkIpc/Xw2yjPRCFm55CeN mvKObdWTW20lt3xLJIcwk0emK9RHivXE3vkd+KNfKOF8/vTHmxwk3Ga95FYkaVYSLrGSj2 qEtU8pR5cPxd34LNUcBfnOLkD4PIhCCAk/FuD7XFFeFPFDcOt7YNlhvJ4yLo1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QFPv8hV7J9GIFiK8Y4UBLNCaogaNWuT5VniC+tvsi00=; b=RmDr2BwLmGfp5H5rrKkD5hz5c9ceweF5Zb6G5xdFhSqEy0ccY7G1pBjzvlCVcwA3j+xtfR 4tM+UZO0MrpPoVJQBDE8yCS0KRv9ZRShHoloJzSUep5ZZ23i6o1GNmGtee8CaskYBYlT+v ULbT1PN5tGwQ+CEuRtZHTF3xuwD5seBaCKFgiSLzQazNuQrV20tblJ6HZcOOt4rMlH2xk9 96K0EoXXuadUSaQIryikMJ5xRUzF7IwAL3UpITR1ZbHznFTOrCMO3NzFDKOljT29gtQO6S hAcTOBBlTYlxcvtJi8cfQKisxlv+90Da5U15cQMTC5bskhk2sywez9LpDvdeeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z411YFTzjJf; Wed, 4 Oct 2023 15:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNjsE086963; Wed, 4 Oct 2023 15:23:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNjmq086960; Wed, 4 Oct 2023 15:23:45 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:45 GMT Message-Id: <202310041523.394FNjmq086960@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: 204fb7d8530e - stable/14 - LinuxKPI: 802.11: make sure bssid for scans (probe_req) is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 204fb7d8530e6c097ff0142959a3f7d55cf7e375 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=204fb7d8530e6c097ff0142959a3f7d55cf7e375 commit 204fb7d8530e6c097ff0142959a3f7d55cf7e375 Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:48:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 LinuxKPI: 802.11: make sure bssid for scans (probe_req) is set In b0f73768220e9 we added bssid[] to struct cfg80211_scan_request likely while working on mt76 and did not need it (yet) back then. iwlwifi started to use the field in Linux f1fec51cda70f (April 2023). Without it set firmware crashes when trying to send probe requests ((empty) SSID also given to hw_scan). For now always set the field to the wildcard BSSID. Sponsored by: The FreeBSD Foundation (cherry picked from commit e1e90be05017c335862c938fd9d577e56f02af30) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 51d5bc2c4fc1..4b9cc598740b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2728,6 +2728,7 @@ sw_scan: memcpy(hw_req->req.mac_addr, xxx, IEEE80211_ADDR_LEN); memset(hw_req->req.mac_addr_mask, 0xxx, IEEE80211_ADDR_LEN); #endif + eth_broadcast_addr(hw_req->req.bssid); hw_req->req.n_channels = nchan; cpp = (struct linuxkpi_ieee80211_channel **)(hw_req + 1); From nobody Wed Oct 4 15:23:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z425PZyz4w6Lh; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z423NVpz4N22; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KRc3ZZrm/ueSzHHT9qjr+dNFrf+Q6yPrbw8FI4XsIY=; b=WtFnqD+UnTCoDkndcMlIitax17w2C0DAMp3Ybh2ELISbWKaDYk/oiH+VYRT7gO0TjXOgdf iVZmYycZSBLpUlmlzmky2Y9EIYCBjqx5D+kKtULJfuDB3Y56B1rxxBmN1EloEVXWt5ZSa7 8+cWriRcY5aFBSOBTloi7bkLmBoWKx0SZJJ6uQR4aYpadQSe6ptWVzSLRKv5rjw5PpxTjM uC9EYpiaQBLGiAr5PdenjvK5goB2rbCrGcpH0yBZZLwcKTYmf6lyQxj4XvQZqu6YzOtui/ Rjco/p5YEHecer5oiz8rbDII8VdJg5T0EwIDBfUcARnNXaXSV2C0ZYUQuX3C7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433026; a=rsa-sha256; cv=none; b=eZGrsCrZl5fU0gGUoXQm0FD4Obi7jxNgjJXdQD5k72nR4jugZY528mVYEVxmj72BBf4+aA KLTVnKvsvnQpwK+Ll7SHVPxqyTK2k1tGSHzWJZCGLStwwSPxZoNxmBjRV8QsVF0V1BY3Z6 a76TL4T8Rz2oPjspC+djmCc3cTcDrQnt7pjUxACYlAhb/VMXdrXqmJgh3/80kksuD/unAa OUZ4QPAAZAixHdqKBAmT+eBshXHYiKDR7IpQE9GhL29OoRArkfXCISzSK2f339YRLxa4A8 Oiy3SJkmoEPy/2ptk/FX7ps/hSjoumdSdLr95qPT963EQfgM1WkqN7DKXyn1iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KRc3ZZrm/ueSzHHT9qjr+dNFrf+Q6yPrbw8FI4XsIY=; b=glmn+f9T29hpmqXLA5yVgCn3Pf/LrUczGyUtQrLH4s6U/pA8i5iIHL2PGhOQBG1SOx8cUY bSgqB0N0C9yT2/kABMhFcWwxVYTSPtzDgMhO+mGaYQD6RY0n5I9X+InnNHycwTG9PhgO0n 65OVP4YBYOOpCPs18GLuVe7OWFzrDmRcfSAvapuz2mHf2E8/mCSdyp8RZjXcsx3VKqZT1S Mi7ghjF+as8FlyUXjRTOUtPj2fwIXqFdUSHOVNa6cL9+u0k2AWCYlmVpsEbw/I7t4AYZ2C ///3e66mJJn7u7E4L0bCoy4BEJrNmDG4EgqSgG6ThBmSkrT/5wacP19LqaPI2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z422VSCzjdQ; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNksc087012; Wed, 4 Oct 2023 15:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNk6n087009; Wed, 4 Oct 2023 15:23:46 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:46 GMT Message-Id: <202310041523.394FNk6n087009@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: a513f65b92b6 - stable/14 - iwlwifi: fix a bug in iwl_ssid_exist() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: a513f65b92b672830c89acfa04b93c3b77d3f97d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a513f65b92b672830c89acfa04b93c3b77d3f97d commit a513f65b92b672830c89acfa04b93c3b77d3f97d Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:22:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 iwlwifi: fix a bug in iwl_ssid_exist() Rather than always comparing a given SSID to the first SSID of the IE list, compare it to the the iterator one. That way duplicates can be found. Sponsored by: The FreeBSD Foundation (cherry picked from commit ee7077f24f5b02bde8cf5c202848128f18733398) --- sys/contrib/dev/iwlwifi/mvm/scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/mvm/scan.c b/sys/contrib/dev/iwlwifi/mvm/scan.c index a4077053e374..8c5d6860914b 100644 --- a/sys/contrib/dev/iwlwifi/mvm/scan.c +++ b/sys/contrib/dev/iwlwifi/mvm/scan.c @@ -447,7 +447,11 @@ static int iwl_ssid_exist(u8 *ssid, u8 ssid_len, struct iwl_ssid_ie *ssid_list) if (!ssid_list[i].len) break; if (ssid_list[i].len == ssid_len && +#if defined(__linux__) !memcmp(ssid_list->ssid, ssid, ssid_len)) +#elif defined(__FreeBSD__) + !memcmp(ssid_list[i].ssid, ssid, ssid_len)) +#endif return i; } return -1; From nobody Wed Oct 4 15:23:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z435JcTz4w6Wt; Wed, 4 Oct 2023 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z434C72z4NFP; Wed, 4 Oct 2023 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WJat4+HeVrCMHUFygXH4Zz/mcS2FHQtDBujj8TFzIzc=; b=jxJG/2+P7bVpU2ec+9uB9g9V+qaw+jL+NwJqjLuqqIkC2EUhInzpyaG16OnbzPafhoGyvC qLf0KgxIHiWXKPWiGsTuPKsjylA+1fSEyyW/IWcA5Dt2O46u1wfFi+tOzIkcnTI1svg3ZX yUBRlnKlFrkBRSQldCSYMugOB687/t9sgTuG9o1EVqqD0GwpwYRetZXN36sgbv1DFb1okU cfMSPZ24iNe8Ap/upzWpAmOyzwZyPFUsV+Su9O5dFfYdupYvnj0omYAaPSnRrqz3KqsH2x YbOkTA0kCXwadgN0NB5SiqYYmE8MmrzIfECstbA3x9c40XB5ssW/+U2FReYd2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433027; a=rsa-sha256; cv=none; b=F29f4raWkiMkzk/MORyV0WUqUmaaJ0+sX8AOjD3h1E0rKmQKa23IAP4LDap9VRuNOIk5DG kzx+zUJw8UnMEFTqRK22Ta9tHxl1zq81mHBBc2Sj6wYi5X4sOSVYVjwYDOnAQNjbCAMu3r ympPw4wgqu3ScddlxCpbSwWpU3BSuF7fwSKCOrUSYRBPAphh4XkqHEua2rsZdsentTjhdY u4+SEWbW80TTtcy51yM/O2ByRqsTF6M8wmbOhv+0QtGMOShg3/xqIwuMSOzVcapXLOqURJ lTgFgOSQ6yaCnQ4DMYM0UuRxkQRCHLhH+NzfdLnXwdNxtgAq8XFTY2p3e0nSDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WJat4+HeVrCMHUFygXH4Zz/mcS2FHQtDBujj8TFzIzc=; b=oKSxNlWa9Ak/TkTxRvZ0PZJWD/FkWAgex9L83JpHGsDcKg2HA181z+WK7vazRssd8B5SOC yw1i7bZKfoDHZpOMInWUevw2tqtn/OeNChXzABUyf9zl9hJW0osX4Rn7SFrhGppm53kLGz iyi/mnqhnIA5gOQyJJR2OOmqZQVphbob3575nRtbPDXnAh0l1cU/iq9rtjqTf1eYEA2DrL js3BjBIO91QoNsuSQUPJO5B0LkvOlwmEpNaBx/8vEyZbK4FbPyvl/Z5iCL+T2lgMDSHQsU WZCtJoD2peZ3SMszGcHM+9sf2w+ASDqpI+gRRx0zWZ2EPAYcuQdSAfPsTjqcAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z433Hd6zj7X; Wed, 4 Oct 2023 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNlJH087073; Wed, 4 Oct 2023 15:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNls2087070; Wed, 4 Oct 2023 15:23:47 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:47 GMT Message-Id: <202310041523.394FNls2087070@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: 96655d8a7db4 - stable/14 - LinuxKPI: 802.11: fix counting the number of supbands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 96655d8a7db48f0944aebf07ffdcaa8a23aaa35a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=96655d8a7db48f0944aebf07ffdcaa8a23aaa35a commit 96655d8a7db48f0944aebf07ffdcaa8a23aaa35a Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:57:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 LinuxKPI: 802.11: fix counting the number of supbands While the main purpose was to assign an(y) early chandef with the loop, later additions made use of it to also count supbands as well as to initialise max_rates. Due to the main goal we can exit the loop early and not properly count and initialise supbands and max_rates. Move the terminating condition into the loop and make it a continue rather than ending the loop. Fixes: d9945d7821b9b ("improve hw_scan") Sponsored by: The FreeBSD Foundation (cherry picked from commit f454a4a10dc027474a85269cb4a3f50bbbf90528) --- sys/compat/linuxkpi/common/src/linux_80211.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4b9cc598740b..cb919bfd3f5b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3760,8 +3760,7 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) * in any band so we can scale [(ext) sup rates] IE(s) accordingly. */ lhw->supbands = lhw->max_rates = 0; - for (band = 0; band < NUM_NL80211_BANDS && - hw->conf.chandef.chan == NULL; band++) { + for (band = 0; band < NUM_NL80211_BANDS; band++) { struct ieee80211_supported_band *supband; struct linuxkpi_ieee80211_channel *channels; @@ -3772,6 +3771,10 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) lhw->supbands++; lhw->max_rates = max(lhw->max_rates, supband->n_bitrates); + /* If we have a channel, we need to keep counting supbands. */ + if (hw->conf.chandef.chan != NULL) + continue; + channels = supband->channels; for (i = 0; i < supband->n_channels; i++) { From nobody Wed Oct 4 15:23:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z446LWlz4w6hb; Wed, 4 Oct 2023 15:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z4459QXz4N7k; Wed, 4 Oct 2023 15:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvcVcLH6dVp7+ffpTcZ4WW0eQX+ru0Xdlt7B2+HSJQI=; b=DDe3QEIVP+WOhBuGg77vqJy84wKLYiwgn66luZ2NIzcpi629IWoAZ49HSzP4b75RdyyKAz zCjv7Oimd/7y6agg4KX8IZeeCwZ3lNQPAXXfDok4MC8cFhQEf4aMwgtnpl9mDBVH7VGvLA 6ZuLPJOfbyJvsJSRvYnM/J48QPcw56k15IP50NznHUGOUgM34PI93jEH8CHPDeg1W9CZCl TIzQRt+CNqhvjSVeLJcFs6xs+LFl9Fh3T9ZsyJnO1X0f+FoRSqE5J6QXcVKjjA8BIe40jH 3V4D9mziEWpwRYrRvAPgcw01qclXJ7/vsHJewAubm47cOGj8K3tuoXEaDg7m5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433028; a=rsa-sha256; cv=none; b=GINE3ylkQJjg3Ptx7nleChhngCh8Pf7FAur6pBw6Hx1Z7EZh7aBng5WD4dnoGCPjTsKyex XolSCXkFrDrmKfxFCmIXsQeXKTQPdkdFWf1v/mhhBf2yb4FaTmVlkS8ulAnvGvbVYFOzLM mTZ/2K8iNcXgceVFY67RQ8/oZOaJR8zGhIs0a9R3GcpWtFTisWTF0mRFENg1lPep7+XyCk 07aM2yBcZFLnzdB7vnmhYwZ3ZO+75y9VC94T2yXa7jkGZ0RRw2VwhWal2DrWh4QAf5MZZM BQH+4VnxIoVCUCj8AQs3agMHExCJkdrsn1CQGL/jb/UWS25rGJg+LZVe/dbavQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TvcVcLH6dVp7+ffpTcZ4WW0eQX+ru0Xdlt7B2+HSJQI=; b=DINxSaN4uuttyWAuw/vxggqoMFWi6gzy7YP4MxGN+kWP1KOF/SCT34+3/Sez4DmAZTXILI xYLLB+udk1o8kpPimffyoGv2MW3KY/F5En4AHUeWFhBF6KB39xibkPM2Ou2e+2dC16mjU7 RgcWjNJMQzdF25zL0fZ189jHLCpTGk0g/1zaGWZDHgQmdrCllVr6HyS/Vk0UBamjQcN/fV l4r6W2V1ziexcWzjOa4MLi+69LXGR2t6ezKvwe/oI/OQbqCxuv420fUEFSxZbFsHFrd0pU RWyakM2TUsd5PUT2l96yUqrIJCqo8y6q9WD406anrwbQXK0zo40rAljYxbt+ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z444G62zjdR; Wed, 4 Oct 2023 15:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNmqQ087129; Wed, 4 Oct 2023 15:23:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNmu6087126; Wed, 4 Oct 2023 15:23:48 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:48 GMT Message-Id: <202310041523.394FNmu6087126@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: 493d6255434c - stable/14 - net80211 / drivers: remove public use of ieee80211_node_incref() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 493d6255434ce70ea99b1ccdbea5c88169013bd2 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=493d6255434ce70ea99b1ccdbea5c88169013bd2 commit 493d6255434ce70ea99b1ccdbea5c88169013bd2 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 14:44:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 net80211 / drivers: remove public use of ieee80211_node_incref() ieee80211_node_incref() is the FreeBSD implementation of ieee80211_ref_node(). Not being interested in the node returned it was used as a shortcut in 3 drivers (ath, uath, wpi). Replace the call with the public KPI of ieee80211_ref_node() and ignore the result. This leaves us with the single internal call going ieee80211_ref_node() -> ieee80211_node_incref() and that should help increasing portability but also limiting the places to trace for node reference operations. Sponsored by: The FreeBSD Foundation (cherry picked from commit f156cd892b55c04a39fa06d1899e6e316de77f03) --- sys/dev/ath/if_ath_tx.c | 2 +- sys/dev/usb/wlan/if_uath.c | 2 +- sys/dev/wpi/if_wpi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 1fd3adef738e..69d0b5c00848 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -288,7 +288,7 @@ ath_txfrag_setup(struct ath_softc *sc, ath_bufhead *frags, ath_txfrag_cleanup(sc, frags, ni); break; } - ieee80211_node_incref(ni); + (void) ieee80211_ref_node(ni); TAILQ_INSERT_TAIL(frags, bf, bf_list); } ATH_TXBUF_UNLOCK(sc); diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 378dd717a3eb..04190821d9b9 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -1657,7 +1657,7 @@ uath_txfrag_setup(struct uath_softc *sc, uath_datahead *frags, uath_txfrag_cleanup(sc, frags, ni); break; } - ieee80211_node_incref(ni); + (void) ieee80211_ref_node(ni); STAILQ_INSERT_TAIL(frags, bf, next); } diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index c9c2a8f6854e..5ceb037803b8 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -2768,7 +2768,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) ring->pending = 0; sc->sc_update_tx_ring(sc, ring); } else - ieee80211_node_incref(data->ni); + (void) ieee80211_ref_node(data->ni); end: DPRINTF(sc, WPI_DEBUG_TRACE, error ? TRACE_STR_END_ERR : TRACE_STR_END, __func__); From nobody Wed Oct 4 15:23:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z460pZYz4w6Gt; Wed, 4 Oct 2023 15:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z456w8jz4NLt; Wed, 4 Oct 2023 15:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UQAlD/10d3EQPdvWY9Y/KRD39Tfw1tJ6b3eJzxNCIPw=; b=ByQVeRx6O6jXczpzxQdAjhiA4Y4hjoNByYVBMYV4bO957IiacbrSiU4NLZKRbHjzmhMmgP yNUKEFO7QeVVlu8b52zEeF96FjRAbdwRra4l0n/G3KlydamYzThiOomCGlnyTDjYzEnwRi PlZhzoHfi2++3hLqtXVZ3lb5QO5dCNR+qDeHCjazINoR+zSUC5u0x/Ify3BAzSjapBf3nT 2CaGi+kf8bGhku9wBnGyHNwUcVVbsHqmKVcaeHinzsqbZ1WZmDRyTAPD6py1+gMUMTsP/Y quHekKX6U8tu9NTI3sZ95EAQ1++MGrXTDpUDACT+fCiKDY68LmJI4/bwdAHZCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433030; a=rsa-sha256; cv=none; b=dq3InMsoorfbSGprscE+8/FnFAvETT7tCTjRt7sfFZ0i6Htkl83wVDBIIb/7AHOjU+Ql6y h19HQFKHNAejE2agG4UeGI2N4qLAPZbSK09YYFnEBgAz9N/w9Od9Q9a4mLRNvv+ggYTTFh URY5wDQZmlSRpwOdwIkGHUSv9FP+2cjiHvckUDUh68u6ZuHnSBfpT4/kZRwhpK3WNccmVH Ew43LYu1NGmzvpglBsH+03VMqskmj7LA6M0b+IeShnUrH9aNPREayrexlCGZhhVFsnCZLD uVUhthiVoTuzYQOsa6N3cbllaT+/HHK9bwPH94pmjT70Ynwq+jH+tKAt8gOuNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UQAlD/10d3EQPdvWY9Y/KRD39Tfw1tJ6b3eJzxNCIPw=; b=LkWrJvFI1nmG25nt7TP1tRUY4E7SdZFCwW2PgIoMCuaGljL31RcKi7VdJjz4e98cJVafUY r8lwTZB5sfkbP8jOpAko4mSpVSG4CxgjqQFQBkwVaBz3N4dnbP/qIsNpuj9eGAapwNZj6N MUO9jGzfP8FUS7sv9eiOAHYbbubzvddjfwvuqcLMsGxe2TBFbY/LZznvUyX95bvOq6O70O Hhe+L4NK7pPhiunhcahL6FqOOStCikiftNi1hg+MZ0HxCGMMnV4Ph6Gccbftb2NM9txOww QfoWpMm2kiFFzCD/YaTFftlIcpxGL5erU/jca1MgrAzEzKKYI8PznPG8I23JjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z455QkMzjVP; Wed, 4 Oct 2023 15:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNnlG087174; Wed, 4 Oct 2023 15:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNnqW087171; Wed, 4 Oct 2023 15:23:49 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:49 GMT Message-Id: <202310041523.394FNnqW087171@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: 53ef38313a6d - stable/14 - LinuxKPI: 802.11: improve lkpi_ic_vap_delete() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 53ef38313a6dd70e5d929a3d014cc62db807793f Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=53ef38313a6dd70e5d929a3d014cc62db807793f commit 53ef38313a6dd70e5d929a3d014cc62db807793f Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:20:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 LinuxKPI: 802.11: improve lkpi_ic_vap_delete() Changing the order of cleanup in lkpi_ic_vap_delete() will avoid firmware crashes or a direct panic as observed as ieee80211_vap_detach() will do most cleanup for us and get us into the correct state. Calling mo_stop() in lkpi_ic_vap_delete() seems to stop the problem that further VAPs could not be created (error 17) after the first one being destroyed. Sponsored by: The FreeBSD Foundation PR: 269842 (cherry picked from commit dbf7691999abe501e0ebc0fe4d8d9e97718d3890) (cherry picked from commit 6c38c6b1b917957d420902213f318bf0153214f2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index cb919bfd3f5b..5e7a3ff91b9f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2424,10 +2424,17 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); - lkpi_80211_mo_remove_interface(hw, vif); ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); + + IMPROVE("clear up other bits in this state"); + + lkpi_80211_mo_remove_interface(hw, vif); + + /* Single VAP, so we can do this here. */ + lkpi_80211_mo_stop(hw); + mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); } From nobody Wed Oct 4 15:23:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z471KLjz4w6M3; Wed, 4 Oct 2023 15:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z4702d8z4NPX; Wed, 4 Oct 2023 15:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TF1FJCpkoBHRbYA45CBhutHZaTixF3zIXxNO4uP8Ia8=; b=jYoa51pAvO435G+pBYuY28U5RcRRHgcJ0dT0CrLkXhWsdZ1QwgiDq7WraM8N8PVS15PN9C bFMl2kAsSLaEzGWWa6L1NYRJLIFArAU0KRVOF36Ia4RgqmD8kYTchRpFYKaHKOwvc6SjeR BunPl1ypP84gXgzpw7HP/GZ9euqnxCMpfStNZTvfTmZYlwMglwQwzg4TbeHx9bdCffa9NC wfSZMMwrW8yCcez6FtzAf34aJwN0E0nTzNx48HZHXiXgK4ULjke8IOrDixCDsi5g+haNJW d3AlstD4qEbJyVfgn+XC0xBLeYlyW0V5JERA8BJDxy1QvwvhjWHA16L2RhiBEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433031; a=rsa-sha256; cv=none; b=tFotq2T/XnuvhK5ReuwYHyFWEw1qA6bFy8or/V7arrHf6roEKRFMi7O4O9Ps1IALdojf17 SoJ5dSFHGDuS6zxvrQ+hFp+fhJDw9tarmbRN5lCxMKLzuf6mMPZxLzCa2ta+9m/W5QQXax x/Rs+o1xAq3BoIwiy3Ez0CkRV5KSxa0IEzJ4tQXxGnp02ODuLIFZ3/URVknxYi+juorF6C gEI+ULgpydewi9mUTBiTuml0SWJj/Kq4zAao5YCEb+VHEcu76NJzh2PXOdWDpYoeBtYMRt BI0itaPgfTr5WJrVcfZ2ZVQ0FR0Jebp+j0YEERLUWJ8CJiMuREsKROR8qk9BIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TF1FJCpkoBHRbYA45CBhutHZaTixF3zIXxNO4uP8Ia8=; b=nAK8DMS4qNPc6MnY7DPsGXlw+17fNo3kuCjePnwE4H4B0tJmMCyucINDF5O5Pd2v/QoB64 /J293ul79VDe9x5ywdlrDmyM2p8fl7EjT3s/i00Tuw9p0Kfb8aHyuGAg6j/QGgJTMNljsv 5NCFTPNV7TWGj/ek6VRimJVioRBFnDc6XXyrdeCA8E3gu6dpJeHMJ1cTwG0tLgXn3feZ7k /qwQfL27x8bgZys8u++hIUJYxNycAH3yXhK1z0BXUq5ABW7U3g0QOpmHZ8EyrU8qCc8Z5Z R2aL4EFaBHwwj2g7A8H68+G/Fd3LAOBjgr8BCqPE0bucmnV0Zcqcp85XG6CUpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z466FnxzjSW; Wed, 4 Oct 2023 15:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNoJG087234; Wed, 4 Oct 2023 15:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNo0R087231; Wed, 4 Oct 2023 15:23:50 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:50 GMT Message-Id: <202310041523.394FNo0R087231@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: 70e2b1f49c18 - stable/14 - LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 70e2b1f49c18c8ff5ca81a49abb0bdaa62708766 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=70e2b1f49c18c8ff5ca81a49abb0bdaa62708766 commit 70e2b1f49c18c8ff5ca81a49abb0bdaa62708766 Author: Bjoern A. Zeeb AuthorDate: 2023-09-24 11:55:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:19 +0000 LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi, which leads to a symbol clash in NetBSD. Rename our local LinuxKPI copy to a better name and add a comment where to find a copy of the mapping table. Sponsored by: The FreeBSD Foundation Reported by: Phil Nelson (phil netbsd org) (cherry picked from commit fb3c249ed93c834d70f8361215bc40a9e9004d3b) --- sys/compat/linuxkpi/common/src/linux_80211.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 5e7a3ff91b9f..c8232e6f33cc 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -116,7 +116,8 @@ const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; /* IEEE 802.11-05/0257r1 */ const uint8_t bridge_tunnel_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; -const uint8_t tid_to_mac80211_ac[] = { +/* IEEE 802.11e Table 20i-UP-to-AC mappings. */ +static const uint8_t ieee80211e_up_to_ac[] = { IEEE80211_AC_BE, IEEE80211_AC_BK, IEEE80211_AC_BK, @@ -242,7 +243,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], IMPROVE("AP/if we support non-STA here too"); ltxq->txq.ac = IEEE80211_AC_VO; } else { - ltxq->txq.ac = tid_to_mac80211_ac[tid & 7]; + ltxq->txq.ac = ieee80211e_up_to_ac[tid & 7]; } ltxq->seen_dequeue = false; ltxq->stopped = false; @@ -3243,7 +3244,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ac = IEEE80211_AC_BE; } else { skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK; - ac = tid_to_mac80211_ac[tid & 7]; + ac = ieee80211e_up_to_ac[tid & 7]; } skb_set_queue_mapping(skb, ac); From nobody Wed Oct 4 15:23:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z483RLFz4w6Gw; Wed, 4 Oct 2023 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z4813Svz4NSD; Wed, 4 Oct 2023 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rODIo4cBUhvoG8vx3ifnbpIzWm0HiGlTv5sI4c0UdaA=; b=qEqp6FfCYZSFJ7Nk732tukyirUWqStgz8P//9xm/wq22JqJWCSNoMpmGo5O9VrF+e/BxlK IEb4bbmWx4nGTBZOIEUNnZokdxM9bjMF0IkC0ivxzboaKS4f4KaOk7hr7zvXpoPQ+upbQL n3FxAKspFmloEKkv0QG46SQLyQa2/ZTmqNb/d7/siGKWBTo0sakFtv3uY9nn8PqoGXJK2l 3kwML8GDywoXIlUDZ5cLFHs/MD6msRYfm70WjgsHyiOFb4J4rOgyp1ajm7Qm802/BpBoTU pwZzZPWCS2+4ExlfTzwubcGLkT48eYftrXIFXJEIC4+Irw0GoJsrtE24nBNJRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433032; a=rsa-sha256; cv=none; b=U10fDGHFGZtht/LH1ECv5PPRv0RPBOk327SYrOxMCHhZfh55QouvZnclXJUl4WxwlUz/p7 sN7kyd9ibPbWegxgU1tIE1AqWbvhGXqaYjd5/5KUtRCEdJYgiCmikydUuf19PRZfPy3CGX MaJnp285JaWkSwtRVByWqfb1R5r/EhUYbMyaTJ12XHGhonDlt6SVZVOih5b8Y0FJzzLodw UC2jrVXIrwLkmG/ox+x3+wZ8Y7ZrC5Wn3Vd6ADrKNkTtiFBT5DSW/lZ5yM3+v6xPo2T5uF vLpx0jEjB5vlLV8K35cafqXieIbW9cMLB44M0DrzQb0jmkmRyJMV0jnMcUBblw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rODIo4cBUhvoG8vx3ifnbpIzWm0HiGlTv5sI4c0UdaA=; b=oDlgjB+MIIyMpDCwrHUrI+iSl5jYlwEj/bRgyJYaMNpP9Y/f1nV82XG8AAcW7Iy/6LOqOM QIg123vFJ+BwpX3C7GG04L8YAILa2vzzqhiSmBCvWfYZVfgAnku+ZtVoweXNOiDCx8NcFl N0gjSnBl2hFA0KJKOuSXz5qo7WKXYAIlK2peXqqJySUzjpKGrfj+9lNqyTFQwKIjRcM80M OFEiEEh37QgF8iFy+4nmF5jtOrNf+8f2LGCOMn8Sz/On3gHPs/M0JyzK3qtwGdpXtyvb9i M68f9naiZ/Cwdhkew5nBlL+akp/BxgrMsMxlwHsaaVOzaTPrn2yRzHj5Ir7g2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z480985zjZd; Wed, 4 Oct 2023 15:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNpCt087285; Wed, 4 Oct 2023 15:23:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNpMn087282; Wed, 4 Oct 2023 15:23:51 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:51 GMT Message-Id: <202310041523.394FNpMn087282@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: a3e10c2b1418 - stable/14 - LinuxKPI: 802.11: fill regulatory_hint() with some life List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: a3e10c2b141879a68cff691f0176a2f6ac8ea04e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a3e10c2b141879a68cff691f0176a2f6ac8ea04e commit a3e10c2b141879a68cff691f0176a2f6ac8ea04e Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 17:54:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:19 +0000 LinuxKPI: 802.11: fill regulatory_hint() with some life Start implementing regulatory_hint() using a .c file based allocation helper function so we could change structures in the future with better chances to keep compatibility. This sets wiphy->regd needed by various LinuxKPI based WiFi drivers. Sponsored by: The FreeBSD Foundation (cherry picked from commit 673d62fc359b0cb7a70af42c36d2fa54fb29452a) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 20 ++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 56ca9a231d2d..7e57ce67cc26 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1260,6 +1260,8 @@ struct cfg80211_bss *linuxkpi_cfg80211_get_bss(struct wiphy *, const uint8_t *, size_t, enum ieee80211_bss_type, enum ieee80211_privacy); void linuxkpi_cfg80211_put_bss(struct wiphy *, struct cfg80211_bss *); void linuxkpi_cfg80211_bss_flush(struct wiphy *); +struct linuxkpi_ieee80211_regdomain * + lkpi_get_linuxkpi_ieee80211_regdomain(size_t); /* -------------------------------------------------------------------------- */ @@ -1587,8 +1589,22 @@ regulatory_set_wiphy_regd(struct wiphy *wiphy, static __inline int regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2) { - TODO(); - return (-ENXIO); + struct linuxkpi_ieee80211_regdomain *regd; + + if (wiphy->regd != NULL) + return (-EBUSY); + + regd = lkpi_get_linuxkpi_ieee80211_regdomain(0); + if (regd == NULL) + return (-ENOMEM); + + regd->alpha2[0] = alpha2[0]; + regd->alpha2[1] = alpha2[1]; + wiphy->regd = regd; + + IMPROVE("are there flags who is managing? update net8011?"); + + return (0); } static __inline const char * diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index c8232e6f33cc..978a82ad2ceb 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3954,6 +3954,16 @@ linuxkpi_ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw, LKPI_80211_LHW_LVIF_UNLOCK(lhw); } +struct linuxkpi_ieee80211_regdomain * +lkpi_get_linuxkpi_ieee80211_regdomain(size_t n) +{ + struct linuxkpi_ieee80211_regdomain *regd; + + regd = kzalloc(sizeof(*regd) + n * sizeof(struct ieee80211_reg_rule), + GFP_KERNEL); + return (regd); +} + int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy, struct linuxkpi_ieee80211_regdomain *regd) From nobody Wed Oct 4 15:44:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0zXL1cvhz4w86V for ; Wed, 4 Oct 2023 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0zXL13W7z4Wv2; Wed, 4 Oct 2023 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRNnSWKM6ctt+toi6MCpvB1f5Dsy6kGZRcClEmHzvp8=; b=PV/qGTJPe8eNbKY36rbdz18DQl/lmGzsg1NHb+cyXNwgeTPhjjd5REBVlYxgk8rpdnPeRT qlViBGcjZtli5uIJUcsYVSHfUWtN/Oyz/yUpP+FPdBm4qlK769xb8jWdmy8UDB29IMFVmf 9/rICxOMrnrUU86rM5wx28XLWalkbXKouOAzDKASh+IfmPgG5cwhYyZZlh1XI2WytEUE6m l63cgXKKVTXs8RIP5jXt5Lxnwhz1NFhdywpfpzmzcl9iJpjQJkijiGDE3q+xCnKFTv+Y7E oVVeCM2Cj/hg3DQaGlGfsMm0+jjkA81zGDrRV7rQ/rYLwjSEK0lYFa9alFNqEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696434290; a=rsa-sha256; cv=none; b=DDe1T0QtSzMfgyZb5FCUFg7/Sive+2nM0cMFpYjcNTIoE9hf3FnoH7nJQ84oO9HCfhESOR EYSZUk1dUdtFYfrQzD5dPYCtv4jXREArK6PWNixeoN8tr9USIS/QJ11psyVHXQbw+L4upZ 6CraES7bbCZwdjHB/MjsWNlJW1aD9I9Y9VYLj8B36Zwx6uTRxTiJo3XPxRXVbIWXFBX7ZY ajbJS5disF0tnx1pEV5qSS8/alklAlIc+pygOsV+5GAzReOakWPRoi23t2Xs55K64yGzWA Z6kCqQPcOT3pkDGKAmYTZutDMiqmQjXzy95Np7Vqc0WYk4defgRddqUmjwVfzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRNnSWKM6ctt+toi6MCpvB1f5Dsy6kGZRcClEmHzvp8=; b=pvRt72HC0bPTA9nElSt5wkfvAntYPho+JXIBY0bxZdiN1GB/eNLSAml3Wmf+NQ45a38CA0 y7l2k0kPvo/9bbc0Bx+ZA+VMrKcvksk5y2tb+fe6DmmxsE5ZZluvYDg9W49H8pQPGmnpYj cbvVwkKpSW3FnNcjZ0PllbKdS6aZ1jfTLlIdHcgXcvPUZi6CIDOyrbChAd4I1KBDa4pVld E+LPkQ91GIPtSFy3KtD0bXF21JduEMOIjMTQS/crbZuatdKDCP8sn+kP9D8iQJ4Dn0DbND oPYQEnq0IHr+4dcPsOgv0rxD6p3EOj1Cg/deXtPfv1d+HS+7ct96GBxNflVyBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0zXK6wSzzjp7; Wed, 4 Oct 2023 15:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FinKG020294; Wed, 4 Oct 2023 15:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Finjf020293; Wed, 4 Oct 2023 15:44:49 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:44:49 GMT Message-Id: <202310041544.394Finjf020293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 9f24fda5a8e7..e56a937c3e11 - vendor/bsddialog - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bsddialog X-Git-Reftype: branch X-Git-Commit: e56a937c3e111672afff33346941fb618792308b X-Git-Oldrev: 9f24fda5a8e7ab8243e71473c7e2dc98b4877e64 X-Git-Newrev: e56a937c3e111672afff33346941fb618792308b Auto-Submitted: auto-generated The branch vendor/bsddialog has been updated by bapt: URL: https://cgit.FreeBSD.org/src/log/?id=9f24fda5a8e7..e56a937c3e11 e56a937c3e11 bsddialog: Import version 1.0 From nobody Wed Oct 4 15:44:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0zXL1cr1z4w8Qp for ; Wed, 4 Oct 2023 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0zXL1B8vz4X0s; Wed, 4 Oct 2023 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CUTMhdKKNJXiok5Puq71LrcsVe7FZl9lzGFKZt7rnN4=; b=etGWWdJmTMdxqg8qosuJcBVAfy0jFEV3oKDr9NqdVHz4zueT18W9W0nFWn+cn5FD7kgfQ/ JK0M45Lh6ANK3/aXRbvALtK+os2bsdiRuDWsPrD0OvN8+4nb2OVw+3OMZ6PxJGgpaGt6+O aFl8I86Okr0KjZP7kl4REx8v+em0c+nxrLdZRPrUKBRKcCB49AFXXXDPt+LDw2ddwIDiDk KsiUfHddCd2N7QS4oom0mclpI9D67QR+mQo7Kiv0oqlHo5C68LLqr8eetYyH62QZft963c K15OU2/vh/k+279Qk9esGr7+6TEyAvY/XxEkMbWHLSMX0zcYgWZzoYYp8BNDbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696434290; a=rsa-sha256; cv=none; b=jH7YTyRYN4ka2eOZFarDmFlb7yxsbSZ8OBL8v29rdui2ikvwpsTGzmNhdW1NSJVGDKWJVo ScJkIDLWWV7CGnM0iQohbmLH495TikQJqbRwuF5Lz4wdrE34cOoJiLEU0rhXqHfrpmojZV Anc0LcC6By3Lq12zWZdKNTH9z6vKN+fVEG14U0RKQYQUbdFUNnklch88AxrcCtsOm2E0l3 OFM+GNGO5j3udbX1jF2piGhRjXDyC3dwXfWZL+OiG0BNw6FbMs7aKQDhlZ9mR5GicPUhh+ 1R+75hYjhDyQy4VDUI5f3U1g0cUiNFf4Wng0MJ6zupFRYGIlhX0rGuIsLhqCQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CUTMhdKKNJXiok5Puq71LrcsVe7FZl9lzGFKZt7rnN4=; b=vvcqp/IxzpMbUyTZvzw1ALXtaIA0gKBntfXHvHXftT6IMbZT53QLUrUAqOsXT5kjdWilMV J0/YpuFqst6rW6f1Uwn9sII3KhKFbUm4pH5EgeLFesFs7HyXTa5NkEuH3tV0LUXmcixz1Y j0b2ANiA9TrLdgMdsRpQgPUc5r6N0uQBrfjkdTxgXlSORPmE5MF/7L5tj3fhZken3CWm+N SamovhvZPIZJxooNZUuZqdMcvk+ZbdhMxOECx6E2iW5Q25BLW1y8Q6c5/8Vb/UCj5v/YHe 6RB7kpNxxzb/TCoUxJRDrk+oMUWKSiIam/uhRtCIfxQJnjO/3vCAirR4Ar4Ejw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0zXL0GPmzjp8; Wed, 4 Oct 2023 15:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Finpn020313; Wed, 4 Oct 2023 15:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Fin5D020312; Wed, 4 Oct 2023 15:44:49 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:44:49 GMT Message-Id: <202310041544.394Fin5D020312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 4958b1f5e428 - Create tag vendor/bsddialog/1.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bsddialog/1.0 X-Git-Reftype: annotated tag X-Git-Commit: 4958b1f5e42830c762730fdca77522f4dc710c0e Auto-Submitted: auto-generated The annotated tag vendor/bsddialog/1.0 has been created by bapt: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bsddialog/1.0 tag vendor/bsddialog/1.0 Tagger: Baptiste Daroussin TaggerDate: 2023-10-04 15:44:19 +0000 tag import of bsddialog 1.0 commit e56a937c3e111672afff33346941fb618792308b Author: Baptiste Daroussin AuthorDate: 2023-10-04 15:43:22 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-04 15:43:22 +0000 bsddialog: Import version 1.0 From nobody Wed Oct 4 15:54:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0zlB4XkFz4w9Fw; Wed, 4 Oct 2023 15:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0zlB3kxbz4Zhp; Wed, 4 Oct 2023 15:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkNJ7wiEyn6+/fDz0hHP6oV/3D8yyYfUrDVdhX9ZF4E=; b=orEsBCN+KVr1bHN6lqxLEF1K7CkAUcHjil6w5T2X5Kqh1LbFdF20TV6+5Fs4k3KPmEyayW 8sxU7fqolZsuNVjFJlHP1L6bmGLYr95GC9GjXz6ueNMs1Si/gUh0R8QFbfonTIDC2o/JvF NBxsmoNY+HnfmQA/GmQeKYo/WmLI/gOxhtYjlvzoyShXJHzdlqBooTZOqcxMtn0kNUappa VtqkU9G2ou+ZbUVYIPy+9RBU2ZLCRe7h9yo2rNHHpD7NU5lPdnls/+IX89dNOZG2ZCpBQ6 L4sVll85UWlFKsosnf7ORMfcEqOttTHb80vODtjbod5hm6IFR3t7C3U7xmeJsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696434854; a=rsa-sha256; cv=none; b=gaP4M2lJMbyni3pZ2WCko1H9jR8dtYgC8rtWSkadzJJiqL4pcnhXBAf8isGfepHEcQNeEL 7vkRX7Kf6wAUhD0i6JSAay/+0nhE7kmpb0OPaHNbWcXko3sDIyHoHaLYILexqfvJc6FpIq Kpc0XcId9MBhcy+Uw40WPh5Gk2aQhHda4YWd/Q5SE7R3/Rn0Srza7C91vCA0rjCaHOWdY3 XbWdcbAUEzg596hUx7vxncxSDRjKDhLmFtDICCAqdf9Lw/VZJgsHFfEo0xjtYTQ23PO4+v JPO0ire8F8eI6UABJIXFBL4Ct7+WeuiFy+wsyWgmEUqlYITDgxJ+nqR504HYHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696434854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkNJ7wiEyn6+/fDz0hHP6oV/3D8yyYfUrDVdhX9ZF4E=; b=baA7AhBoRu7Z3X3PpC8EXed4BXGKL7UjjxuLlwbT+CCCK2oGbpbKtzJLCd9/eZ55CzGqXm LIrr40rpLhVB/zoHNSXlVINGrIyw+pa9D9x4W+DnxYQuCGp/BZ6dJE06uwwD39VT73UBwx tyl3soKK32eu9Ctgb68yJb7Dn9q/+rOqikUO5rCv9zpH0867JokhB/xnrkbl6Qp1VFd6qr 8ueGNi+29s86qHX7tUvmgBD8r8RM4SXUU/zFFWYCdJzeqfl/Xeqfdcx4nOJOBNS/DW7si0 y8cev4+1X0y2im18be7MRIIHnDHYJ3mN4KriP/0DEhKcRTQXSXz5dyilJjO0sA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0zlB2n2jzkTT; Wed, 4 Oct 2023 15:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FsE5o037711; Wed, 4 Oct 2023 15:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FsERk037708; Wed, 4 Oct 2023 15:54:14 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:54:14 GMT Message-Id: <202310041554.394FsERk037708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4b38c532efb9 - main - mount.8: Mention tarfs(5) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b38c532efb9845898d63546da57d843b3b1c1a6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b38c532efb9845898d63546da57d843b3b1c1a6 commit 4b38c532efb9845898d63546da57d843b3b1c1a6 Author: Jose Luis Duran AuthorDate: 2023-10-04 15:42:40 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 15:52:40 +0000 mount.8: Mention tarfs(5) Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/856 --- sbin/mount/mount.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 5632ad678ffb..91e697bdc3b8 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -27,7 +27,7 @@ .\" .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" -.Dd March 17, 2022 +.Dd October 4, 2023 .Dt MOUNT 8 .Os .Sh NAME @@ -569,6 +569,7 @@ support for a particular file system might be provided either on a static .Xr ext2fs 5 , .Xr fstab 5 , .Xr procfs 5 , +.Xr tarfs 5 , .Xr tmpfs 5 , .Xr automount 8 , .Xr fstyp 8 , From nobody Wed Oct 4 16:12:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S107z0TDpz4wBVy; Wed, 4 Oct 2023 16:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S107z04qXz4c6p; Wed, 4 Oct 2023 16:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696435935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MULri9xjy8jMR9Gt9I0qw0R5ACDh2TY2oWVWyXSvy2s=; b=yZRrT2B/V4zXVpiiS/dUB9ArssJ3VxCHU/epQEpNA04p9CZr4uxkBICEe/57NNZ7tRPJ05 RB/VAypJD0U/82uk9qvZzqk/uyQQfz2Xsx1Ddx+H1z6daAyPxL2k4KRXorv2HksBUOqWCi YJ7hQBNwtJRpKCotSf7oAWfEzijq1EHnjb/LOu7U1TMe/P2voRC0O19H1KeqIoUpBTJQ4N OmfNO+N+fS7oSjctgvcqpdSU/BQds+aw33RQm4H+yy6YtCmj/tvth2cXIseam2c6UiwInb aAd6QDDgvZeae8NBJ4cddJhRTJt/qeaB9tJ0F1u7yCo9sISSq6Vne7tWnERc5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696435935; a=rsa-sha256; cv=none; b=M/2btSuKZOPxVHL5xzeZLzkmZPAp/H+i+TGAQ7y5oDG4EKsLxaoL5nLm4gF53GLifU4ygy 4kc37mmnO0kEd/DUl/IjfsJn0eizEh2SXjzfRZxyj4E8KDjbymko/g4hTmJNjslWmqOoUi 6p31tckrwfY+5Zb8pXgP5j9v6KAWE1FaRXk3NPUews2F3C0SyYqCI+gNj1IUbK0AbOWGUh oo+mW/Q816pCRe7wUfudueKuHZ2ges3osvrldxcm52C+CIVIX98SJU3x35Cc/uHyHQKmd/ mJEfiwkPh/yvZHZun6QtHehA3U6KZFvlZy+Z99If55d4u1eB9nXNtYgTomtV0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696435935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MULri9xjy8jMR9Gt9I0qw0R5ACDh2TY2oWVWyXSvy2s=; b=TeN1YIc5d2FRkQaTnT//kOh0BWJdtoSLsPWA0+5ewAZqblOXSLxZLSGwbP7HfSPzCYP7fa APduOgqEyiVQpcnD+6btn4LJiqxRF4gQ9JUGIIqA3OuVonW03r9qoDBeqGd03beO3xugqF 1zQ1ppcQj2H2PKnNsETXouBNIci/gnJZjWT7nf6R5MMIcMcP9EcvDMmHZ+rI2Waut86Vee ggqclNo3hMi8DM/HEzC1la++bcbTPOke8VAvKB1/Mf2tEG1Hkat8DI4iocluAnnMQ/xIyO /Cvju8OV8uF/9TnvjH3QWTjlWFq/NgQFSsOyOX0NnLlhKKmTEDY4atB38wyY7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S107y6DsBzkyZ; Wed, 4 Oct 2023 16:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GCEtj071452; Wed, 4 Oct 2023 16:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GCEhv071446; Wed, 4 Oct 2023 16:12:14 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:12:14 GMT Message-Id: <202310041612.394GCEhv071446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 61ba55bcf70f - main - bsddialog: import version 1.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61ba55bcf70f2340f9c943c9571113b3fd8eda69 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=61ba55bcf70f2340f9c943c9571113b3fd8eda69 commit 61ba55bcf70f2340f9c943c9571113b3fd8eda69 Merge: 4b38c532efb9 e56a937c3e11 Author: Baptiste Daroussin AuthorDate: 2023-10-04 16:11:36 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-04 16:12:03 +0000 bsddialog: import version 1.0 contrib/bsddialog/.gitignore | 2 + contrib/bsddialog/CHANGELOG | 194 ++- contrib/bsddialog/GNUMakefile | 28 - contrib/bsddialog/LICENSE | 2 +- contrib/bsddialog/Makefile | 62 +- contrib/bsddialog/README.md | 35 +- contrib/bsddialog/bsddialog.c | 1687 -------------------- contrib/bsddialog/examples_library/calendar.c | 22 +- contrib/bsddialog/examples_library/checklist.c | 11 +- contrib/bsddialog/examples_library/compile | 2 +- contrib/bsddialog/examples_library/datebox.c | 21 +- contrib/bsddialog/examples_library/form.c | 11 +- contrib/bsddialog/examples_library/gauge.c | 57 + contrib/bsddialog/examples_library/infobox.c | 6 +- contrib/bsddialog/examples_library/menu.c | 11 +- contrib/bsddialog/examples_library/mixedgauge.c | 79 + contrib/bsddialog/examples_library/mixedlist.c | 21 +- contrib/bsddialog/examples_library/msgbox.c | 9 +- contrib/bsddialog/examples_library/pause.c | 21 +- contrib/bsddialog/examples_library/radiolist.c | 14 +- contrib/bsddialog/examples_library/rangebox.c | 7 +- contrib/bsddialog/examples_library/theme.c | 46 +- contrib/bsddialog/examples_library/timebox.c | 18 +- contrib/bsddialog/examples_library/yesno.c | 11 +- contrib/bsddialog/examples_utility/checklist.sh | 16 +- contrib/bsddialog/examples_utility/datebox.sh | 34 + contrib/bsddialog/examples_utility/form.sh | 4 +- contrib/bsddialog/examples_utility/infobox.sh | 2 +- contrib/bsddialog/examples_utility/inputbox.sh | 5 +- contrib/bsddialog/examples_utility/menu.sh | 13 +- contrib/bsddialog/examples_utility/mixedform.sh | 4 +- contrib/bsddialog/examples_utility/mixedgauge.sh | 10 +- contrib/bsddialog/examples_utility/passwordbox.sh | 4 +- contrib/bsddialog/examples_utility/passwordform.sh | 4 +- contrib/bsddialog/examples_utility/radiolist.sh | 18 +- contrib/bsddialog/examples_utility/rangebox.sh | 33 + contrib/bsddialog/lib/{GNUMakefile => GNUmakefile} | 15 +- contrib/bsddialog/lib/Makefile | 49 +- contrib/bsddialog/lib/barbox.c | 705 ++++---- contrib/bsddialog/lib/bsddialog.3 | 626 +++++--- contrib/bsddialog/lib/bsddialog.h | 44 +- contrib/bsddialog/lib/bsddialog_progressview.h | 8 +- contrib/bsddialog/lib/bsddialog_theme.h | 28 +- contrib/bsddialog/lib/calendarbox.c | 520 ------ contrib/bsddialog/lib/datebox.c | 715 +++++++++ contrib/bsddialog/lib/formbox.c | 940 ++++++----- contrib/bsddialog/lib/infobox.c | 96 -- contrib/bsddialog/lib/lib_util.c | 1157 ++++++++------ contrib/bsddialog/lib/lib_util.h | 169 +- contrib/bsddialog/lib/libbsddialog.c | 38 +- contrib/bsddialog/lib/menubox.c | 837 +++++----- contrib/bsddialog/lib/messagebox.c | 250 ++- contrib/bsddialog/lib/textbox.c | 268 ++-- contrib/bsddialog/lib/theme.c | 254 ++- contrib/bsddialog/lib/timebox.c | 479 +----- contrib/bsddialog/util_theme.c | 353 ---- contrib/bsddialog/util_theme.h | 36 - contrib/bsddialog/utility/GNUmakefile | 33 + contrib/bsddialog/utility/Makefile | 33 + contrib/bsddialog/{ => utility}/bsddialog.1 | 345 ++-- contrib/bsddialog/utility/bsddialog.c | 338 ++++ contrib/bsddialog/utility/util.h | 125 ++ contrib/bsddialog/utility/util_builders.c | 768 +++++++++ contrib/bsddialog/utility/util_cli.c | 841 ++++++++++ contrib/bsddialog/utility/util_theme.c | 451 ++++++ lib/libbsddialog/Makefile | 3 +- usr.bin/bsddialog/Makefile | 9 +- usr.sbin/bsdinstall/partedit/diskmenu.c | 6 +- usr.sbin/bsdinstall/partedit/diskmenu.h | 4 +- usr.sbin/bsdinstall/partedit/gpart_ops.c | 7 +- usr.sbin/bsdinstall/partedit/part_wizard.c | 4 +- usr.sbin/bsdinstall/partedit/partedit.c | 2 +- 72 files changed, 6891 insertions(+), 6189 deletions(-) diff --cc contrib/bsddialog/.gitignore index 8b8ec9d4ae0b,000000000000..c8fc68ed8a0e mode 100644,000000..100644 --- a/contrib/bsddialog/.gitignore +++ b/contrib/bsddialog/.gitignore @@@ -1,24 -1,0 +1,26 @@@ +bsddialog +.depend* +*.o +*.so* +*.a +*.gz +*.core +*~ +BSDDIALOG.geany +BSDDIALOG.tags +examples_library/calendar +examples_library/checklist +examples_library/datebox +examples_library/form ++examples_library/gauge +examples_library/infobox +examples_library/menu ++examples_library/mixedgauge +examples_library/mixedlist +examples_library/msgbox +examples_library/pause +examples_library/radiolist +examples_library/rangebox +examples_library/theme +examples_library/timebox +examples_library/yesno diff --cc contrib/bsddialog/Makefile index 28162c5e90b3,000000000000..884cfa1b3e60 mode 100644,000000..100644 --- a/contrib/bsddialog/Makefile +++ b/contrib/bsddialog/Makefile @@@ -1,50 -1,0 +1,38 @@@ +# PUBLIC DOMAIN - NO WARRANTY, see: +# +# - # Written in 2021 by Alfonso Sabato Siciliano ++# Written in 2023 by Alfonso Sabato Siciliano + - OUTPUT= bsddialog - SOURCES= bsddialog.c util_theme.c - OBJECTS= ${SOURCES:.c=.o} - LIBPATH= ${.CURDIR}/lib - LIBBSDDIALOG= ${LIBPATH}/libbsddialog.so ++OUTPUT = bsddialog ++export VERSION=1.0 ++.CURDIR ?= ${CURDIR} ++LIBPATH = ${.CURDIR}/lib ++LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so ++UTILITYPATH = ${.CURDIR}/utility + - CFLAGS+= -I${LIBPATH} -std=gnu99 -Wall -Wextra -Werror - # `make -DDEBUG` - .if defined(DEBUG) - CFLAGS= -g -Wall -I${LIBPATH} - LIBDEBUG= -DDEBUG - .endif - LDFLAGS+= -ltinfow -Wl,-rpath=${LIBPATH} -L${LIBPATH} -lbsddialog - - BINDIR= /usr/local/bin - MAN= ${OUTPUT}.1 - GZIP= gzip -cn - MANDIR= /usr/local/share/man/man1 - - INSTALL= install +RM= rm -f ++LN = ln -s -f ++ ++### cli options ### ++# port/pkg Makefile: 'MAKE_ARGS = -DNORPATH' ++NORPATH ?= ++export DISABLERPATH=${NORPATH} ++# `make -DDEBUG` ++# `gmake DEBUG=1` ++DEBUG ?= ++export ENABLEDEBUG=${DEBUG} + +all : ${OUTPUT} + - ${OUTPUT}: ${LIBBSDDIALOG} ${OBJECTS} - ${CC} ${LDFLAGS} ${OBJECTS} -o ${.PREFIX} ++${OUTPUT}: ${LIBBSDDIALOG} ++ ${MAKE} -C ${UTILITYPATH} LIBPATH=${LIBPATH} ++ ${LN} ${UTILITYPATH}/${OUTPUT} ${.CURDIR}/${OUTPUT} + +${LIBBSDDIALOG}: - make -C ${LIBPATH} ${LIBDEBUG} - - .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - - install: - ${INSTALL} -s -m 555 ${OUTPUT} ${BINDIR} - ${GZIP} ${MAN} > ${MAN}.gz - ${INSTALL} -m 444 ${MAN}.gz ${MANDIR} - - unistall: - ${RM} ${BINDIR}/${OUTPUT} - ${RM} ${MANDIR}/${MAN}.gz ++ ${MAKE} -C ${LIBPATH} + +clean: - make -C ${LIBPATH} clean - ${RM} ${OUTPUT} *.o *~ *.core ${MAN}.gz ++ ${MAKE} -C ${LIBPATH} clean ++ ${MAKE} -C ${UTILITYPATH} clean ++ ${RM} ${OUTPUT} *.core ++ diff --cc contrib/bsddialog/README.md index 59af7072e7f5,000000000000..f4846ec07745 mode 100644,000000..100644 --- a/contrib/bsddialog/README.md +++ b/contrib/bsddialog/README.md @@@ -1,120 -1,0 +1,131 @@@ - # BSDDialog 0.4 ++# BSDDialog 1.0 + +This project provides **bsddialog** and **libbsddialog**, an utility +and a library to build scripts and tools with TUI dialogs and widgets. ++ ++ ++## Demo ++ +[Screenshots](https://www.flickr.com/photos/alfonsosiciliano/albums/72157720215006074). + + +## Getting Started + - FreeBSD: ++FreeBSD and Linux: + +``` +% git clone https://gitlab.com/alfix/bsddialog.git +% cd bsddialog +% make +% ./bsddialog --msgbox "Hello World!" 8 20 +``` + - Linux: - - ``` - % git clone https://gitlab.com/alfix/bsddialog.git - % cd bsddialog - % make -f GNUMakefile - % ./bsddialog --msgbox "Hello World!" 8 20 - ``` - +Output: + +![screenshot](screenshot.png) + + +## Utility + +**Dialogs:** + +--calendar, --checklist, --datebox, --form, --gauge, --infobox, --inputbox, +--menu, --mixedform, --mixedgauge, --msgbox, --passwordbox, --passwordform, +--pause, --radiolist, --rangebox, --textbox, --timebox, --treeview, --yesno. + +**Manual** + + - [bsddialog(1)](https://alfonsosiciliano.gitlab.io/posts/2022-01-26-manual-bsddialog.html) + + +**Examples**: + +``` +% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30 +% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30 +% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30 +% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10 +% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on +% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25 +% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0 +``` + +and [Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_utility) +in the _Public Domain_ to build new projects: +``` +% sh ./examples_utility/calendar.sh +% sh ./examples_utility/checklist.sh ++% sh ./examples_utility/datebox.sh +% sh ./examples_utility/form.sh +% sh ./examples_utility/gauge.sh +% sh ./examples_utility/infobox.sh +% sh ./examples_utility/inputbox.sh +% sh ./examples_utility/menu.sh +% sh ./examples_utility/mixedform.sh +% sh ./examples_utility/mixedgauge.sh +% sh ./examples_utility/msgbox.sh +% sh ./examples_utility/passwordbox.sh +% sh ./examples_utility/passwordform.sh +% sh ./examples_utility/pause.sh +% sh ./examples_utility/radiolist.sh ++% sh ./examples_utility/rangebox.sh +% sh ./examples_utility/timebox.sh +% sh ./examples_utility/yesno.sh +``` + +## Library + +**API** + + - [bsddialog.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog.h) + - [bsddialog\_theme.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog_theme.h) + + +**Manual** + + - [bsddialog(3)](https://alfonsosiciliano.gitlab.io/posts/2022-01-15-manual-libbsddialog.html) + + +**Examples**: + +[Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_library) +in the _Public Domain_ to build new projects: +``` +% cd examples_library +% sh compile +% ./calendar +% ./checklist +% ./datebox +% ./form ++% ./gauge +% ./infobox +% ./menu ++% ./mixedgauge +% ./mixedlist +% ./msgbox +% ./pause +% ./radiolist +% ./rangebox +% ./theme +% ./timebox +% ./yesno +``` + + +## TODO and Ideas - ++ + - menubar feature + - key callback + - Right-To-Left text ++ - some terminal does not hide the cursor, move it bottom-right before to getch. ++ - refactor backtitle: multiline, conf.backtitle, WINDOW \*dialog.backtitle. ++ - refactor bottomdesc: WINDOW \*dialog.bottomdesc -> fix expandig screen. ++ - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base ++ - add bool conf.menu.depthlines. ++ - implement custom getopt\_long(). ++ - refactor/redesign gauge(). ++ - improve grey lines expanding terminal (maybe redrawwin() in hide\_dialog()). ++ - more restrictive strtol() and strtoul(). ++ - implement global buttons handler. ++ - add/move external tutorial. ++ - implement menutype.min_on. diff --cc contrib/bsddialog/examples_library/gauge.c index 000000000000,3b38a80f3f2c..3b38a80f3f2c mode 000000,100644..100644 --- a/contrib/bsddialog/examples_library/gauge.c +++ b/contrib/bsddialog/examples_library/gauge.c diff --cc contrib/bsddialog/examples_library/mixedgauge.c index 000000000000,7666867902fb..7666867902fb mode 000000,100644..100644 --- a/contrib/bsddialog/examples_library/mixedgauge.c +++ b/contrib/bsddialog/examples_library/mixedgauge.c diff --cc contrib/bsddialog/examples_utility/datebox.sh index 000000000000,bea4559dfbec..bea4559dfbec mode 000000,100755..100755 --- a/contrib/bsddialog/examples_utility/datebox.sh +++ b/contrib/bsddialog/examples_utility/datebox.sh diff --cc contrib/bsddialog/examples_utility/rangebox.sh index 000000000000,9b3213d8acad..9b3213d8acad mode 000000,100644..100644 --- a/contrib/bsddialog/examples_utility/rangebox.sh +++ b/contrib/bsddialog/examples_utility/rangebox.sh diff --cc contrib/bsddialog/lib/Makefile index 0f536fb38743,000000000000..252b33f79848 mode 100644,000000..100644 --- a/contrib/bsddialog/lib/Makefile +++ b/contrib/bsddialog/lib/Makefile @@@ -1,75 -1,0 +1,44 @@@ +# PUBLIC DOMAIN - NO WARRANTY, see: +# +# +# Written in 2021 by Alfonso Sabato Siciliano + - VERSION = 0.4 +LIBRARY = bsddialog +LIBRARY_SO = lib${LIBRARY:=.so} +LIBRARY_A = lib${LIBRARY:=.a} +HEADERS = bsddialog.h bsddialog_theme.h bsddialog_progressview.h - SOURCES = barbox.c calendarbox.c formbox.c infobox.c libbsddialog.c \ - lib_util.c menubox.c messagebox.c textbox.c theme.c timebox.c ++SOURCES = barbox.c datebox.c formbox.c libbsddialog.c lib_util.c \ ++ menubox.c messagebox.c textbox.c theme.c timebox.c +OBJECTS = ${SOURCES:.c=.o} - CFLAGS += -D_XOPEN_SOURCE_EXTENDED -fPIC -Wall -Wextra - LDFLAGS += -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} \ - -L/usr/lib -lncursesw -ltinfow + +.if defined(DEBUG) - # `make -DDEBUG` - CFLAGS = -g -D_XOPEN_SOURCE_EXTENDED -fPIC -Wall -Wextra - .else - CFLAGS += -std=gnu99 -fstack-protector-strong ++CFLAGS += -g +.endif ++CFLAGS += -D_XOPEN_SOURCE_EXTENDED -fPIC -Wall -Wextra -std=gnu99 \ ++ -fstack-protector-strong ++LDFLAGS += -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ ++ -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} \ ++ -L/usr/lib -lncursesw -ltinfow + - LOCALBASE = /usr/local +LN = ln -s -f +RM = rm -f - CP = cp - GZIP = gzip -cn - LDCONFIG = /sbin/ldconfig -m - MAN = ${OUTPUT}.3 - GZIP = gzip -cn - MANDIR = ${LOCALBASE}/share/man/man3 - INSTALL = install - RM = rm -f + - all : man ${LIBRARY} ++all : ${LIBRARY} + +${LIBRARY}: ${LIBRARY_SO} ${LIBRARY_A} + +${LIBRARY_SO}.${VERSION}: ${OBJECTS} + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${LIBRARY_SO}.${VERSION} + +${LIBRARY_SO}: ${LIBRARY_SO}.${VERSION} + ${LN} ${LIBRARY_SO}.${VERSION} ${LIBRARY_SO} + +${LIBRARY_A}: ${OBJECTS} + ${AR} cr ${.TARGET} ${OBJECTS} + ${RANLIB} ${.TARGET} + +.c.o: + ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + - man: - ${GZIP} ${LIBRARY}.3 > ${LIBRARY}.3.gz - +clean: + ${RM} ${LIBRARY_SO}* *.o *~ *.gz ${LIBRARY_A} - - - install: - ${INSTALL} -m 644 ${HEADERS} ${LOCALBASE}/include - ${INSTALL} -m 644 -s ${LIBRARY_SO}.${VERSION} ${LOCALBASE}/lib/ - ${INSTALL} -l rs ${LOCALBASE}/lib/${LIBRARY_SO}.${VERSION} ${LOCALBASE}/lib/${LIBRARY_SO} - ${INSTALL} -m 644 ${LIBRARY_A} ${LOCALBASE}/lib - ${LDCONFIG} ${LOCALBASE}/lib - ${INSTALL} -m 644 ${LIBRARY}.3.gz ${MANDIR} - - unistall: - ${RM} ${LOCALBASE}/include/${LIBRARY}*.h - ${RM} ${LOCALBASE}/lib/${LIBRARY_SO} - ${RM} ${LOCALBASE}/lib/${LIBRARY_SO}.${VERSION} - ${LDCONFIG} ${LOCALBASE}/lib - ${RM} ${MANDIR}/${LIBRARY}.3.gz diff --cc contrib/bsddialog/lib/datebox.c index 000000000000,9f26b2d08093..9f26b2d08093 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/datebox.c +++ b/contrib/bsddialog/lib/datebox.c diff --cc contrib/bsddialog/utility/GNUmakefile index 000000000000,518ec0d912d6..518ec0d912d6 mode 000000,100644..100644 --- a/contrib/bsddialog/utility/GNUmakefile +++ b/contrib/bsddialog/utility/GNUmakefile diff --cc contrib/bsddialog/utility/Makefile index 000000000000,ab51b46a25be..ab51b46a25be mode 000000,100644..100644 --- a/contrib/bsddialog/utility/Makefile +++ b/contrib/bsddialog/utility/Makefile diff --cc contrib/bsddialog/utility/bsddialog.c index 000000000000,d4d1fc3e0f3a..d4d1fc3e0f3a mode 000000,100644..100644 --- a/contrib/bsddialog/utility/bsddialog.c +++ b/contrib/bsddialog/utility/bsddialog.c diff --cc contrib/bsddialog/utility/util.h index 000000000000,2750c2ee6951..2750c2ee6951 mode 000000,100644..100644 --- a/contrib/bsddialog/utility/util.h +++ b/contrib/bsddialog/utility/util.h diff --cc contrib/bsddialog/utility/util_builders.c index 000000000000,2dfa20cb0f86..2dfa20cb0f86 mode 000000,100644..100644 --- a/contrib/bsddialog/utility/util_builders.c +++ b/contrib/bsddialog/utility/util_builders.c diff --cc contrib/bsddialog/utility/util_cli.c index 000000000000,22bed6550fb5..22bed6550fb5 mode 000000,100644..100644 --- a/contrib/bsddialog/utility/util_cli.c +++ b/contrib/bsddialog/utility/util_cli.c diff --cc contrib/bsddialog/utility/util_theme.c index 000000000000,c313d743252b..c313d743252b mode 000000,100644..100644 --- a/contrib/bsddialog/utility/util_theme.c +++ b/contrib/bsddialog/utility/util_theme.c diff --cc lib/libbsddialog/Makefile index ddb7e08f71ba,000000000000..8b02205a0d23 mode 100644,000000..100644 --- a/lib/libbsddialog/Makefile +++ b/lib/libbsddialog/Makefile @@@ -1,28 -1,0 +1,27 @@@ +BSDDIALOG= ${SRCTOP}/contrib/bsddialog + +.PATH: ${BSDDIALOG}/lib + +LIB= bsddialog +PRIVATELIB= yes +SHLIB_MAJOR= 0 +SRCS= barbox.c \ - calendarbox.c \ ++ datebox.c \ + formbox.c \ - infobox.c \ + lib_util.c \ + lib_util.h \ + libbsddialog.c \ + menubox.c \ + messagebox.c \ + textbox.c \ + theme.c \ + timebox.c +INCS= bsddialog.h \ + bsddialog_theme.h \ + bsddialog_progressview.h +MAN= bsddialog.3 + +LIBADD= ncursesw tinfow formw +CFLAGS+= -D_XOPEN_SOURCE_EXTENDED + +.include diff --cc usr.bin/bsddialog/Makefile index 1c2f9d697e97,000000000000..24a75aaf2f96 mode 100644,000000..100644 --- a/usr.bin/bsddialog/Makefile +++ b/usr.bin/bsddialog/Makefile @@@ -1,10 -1,0 +1,13 @@@ - BSDDIALOG= ${SRCTOP}/contrib/bsddialog ++BSDDIALOG= ${SRCTOP}/contrib/bsddialog/utility +.PATH: ${BSDDIALOG} + +PROG= bsddialog - SRCS= bsddialog.c util_theme.c ++SRCS= bsddialog.c \ ++ util_builders.c \ ++ util_cli.c \ ++ util_theme.c +MAN= bsddialog.1 - CFLAGS+= -I${BSDDIALOG}/lib ++CFLAGS+= -I${BSDDIALOG}/../lib +LIBADD= bsddialog tinfow + +.include diff --cc usr.sbin/bsdinstall/partedit/diskmenu.c index 9e16ef96171a,000000000000..6a14ee831e18 mode 100644,000000..100644 --- a/usr.sbin/bsdinstall/partedit/diskmenu.c +++ b/usr.sbin/bsdinstall/partedit/diskmenu.c @@@ -1,90 -1,0 +1,90 @@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 Alfonso Sabato Siciliano + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include + +#include "diskmenu.h" + +int +diskmenu_show(const char *title, const char *text, struct partedit_item *items, + int nitems, int *focusitem) +{ + int i, output; + char size[16], *mp; + struct bsddialog_menuitem *bsditems; + struct bsddialog_conf conf; + + bsditems = malloc(nitems * sizeof(struct bsddialog_menuitem)); + if (bsditems == NULL) + return BSDDIALOG_ERROR; + for (i = 0; i < nitems; i++) { + bsditems[i].prefix = ""; + bsditems[i].on = false; + bsditems[i].depth = items[i].indentation; + /* old menu sets max namelen to 10 */ + bsditems[i].name = items[i].name; + humanize_number(size, 7, items[i].size, "B", + HN_AUTOSCALE, HN_DECIMAL); + mp = items[i].mountpoint != NULL ? items[i].mountpoint : ""; + asprintf(__DECONST(char**, &bsditems[i].desc), "%s %-15s %-10s", + size, items[i].type, mp); + bsditems[i].bottomdesc = ""; + } + + bsddialog_initconf(&conf); + conf.title = title; + conf.menu.align_left = true; - conf.text.highlight = true; ++ conf.text.escape = true; + conf.key.f1_message="[\\Z1\\ZbC\\Znreate]: a new partition.\n" + "[\\Z1\\ZbD\\Znelete]: selected partition(s).\n" + "[\\Z1\\ZbC\\Znhange]: partition type or mountpoint.\n" + "[\\Z1\\ZbR\\Znevert]: changes to disk setup.\n" + "[\\Z1\\ZbA\\Znuto]: guided partitioning tool.\n" + "[\\Z1\\ZbF\\Zninish]: will ask to apply changes."; + conf.menu.shortcut_buttons = true; + conf.button.ok_label = "Create"; + conf.button.with_extra = true; + conf.button.extra_label = "Delete"; + conf.button.cancel_label = "Modify"; + conf.button.with_help = true; + conf.button.help_label = "Revert"; - conf.button.generic1_label = "Auto"; - conf.button.generic2_label = "Finish"; ++ conf.button.right1_label = "Auto"; ++ conf.button.right2_label = "Finish"; + conf.button.default_label = "Finish"; + output = bsddialog_menu(&conf, text, 20, 0, 10, nitems, bsditems, + focusitem); + + for (i = 0; i < nitems; i++) + free((char *)bsditems[i].desc); + free(bsditems); + + return output; +} diff --cc usr.sbin/bsdinstall/partedit/diskmenu.h index 7c0e3c505f9e,000000000000..9fce2e813214 mode 100644,000000..100644 --- a/usr.sbin/bsdinstall/partedit/diskmenu.h +++ b/usr.sbin/bsdinstall/partedit/diskmenu.h @@@ -1,52 -1,0 +1,52 @@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2011 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _PARTEDIT_DISKMENU_H +#define _PARTEDIT_DISKMENU_H + +#define BUTTON_CREATE BSDDIALOG_OK +#define BUTTON_DELETE BSDDIALOG_EXTRA +#define BUTTON_MODIFY BSDDIALOG_CANCEL +#define BUTTON_REVERT BSDDIALOG_HELP - #define BUTTON_AUTO BSDDIALOG_GENERIC1 - #define BUTTON_FINISH BSDDIALOG_GENERIC2 ++#define BUTTON_AUTO BSDDIALOG_RIGHT1 ++#define BUTTON_FINISH BSDDIALOG_RIGHT2 + +struct partedit_item { + int indentation; + const char *name; + intmax_t size; + const char *type; + char *mountpoint; + + void *cookie; +}; + +int diskmenu_show(const char *title, const char *text, + struct partedit_item *items, int nitems, int *selected); + +#endif diff --cc usr.sbin/bsdinstall/partedit/gpart_ops.c index 8b75d2d6d859,000000000000..92d1a367890c mode 100644,000000..100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@@ -1,1542 -1,0 +1,1539 @@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2011 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "partedit.h" + +#define GPART_FLAGS "x" /* Do not commit changes by default */ + +static void +gpart_show_error(const char *title, const char *explanation, const char *errstr) +{ + char *errmsg; + char message[512]; + int error; + struct bsddialog_conf conf; + + if (explanation == NULL) + explanation = ""; + + error = strtol(errstr, &errmsg, 0); + if (errmsg != errstr) { + while (errmsg[0] == ' ') + errmsg++; + if (errmsg[0] != '\0') + sprintf(message, "%s%s. %s", explanation, + strerror(error), errmsg); + else + sprintf(message, "%s%s", explanation, strerror(error)); + } else { + sprintf(message, "%s%s", explanation, errmsg); + } + + bsddialog_initconf(&conf); + conf.title = title; + bsddialog_msgbox(&conf, message, 0, 0); +} + +static int +scheme_supports_labels(const char *scheme) +{ + if (strcmp(scheme, "APM") == 0) + return (1); + if (strcmp(scheme, "GPT") == 0) + return (1); + + return (0); +} + +static void +newfs_command(const char *fstype, char *command, int use_default) +{ + struct bsddialog_conf conf; + + bsddialog_initconf(&conf); + + if (strcmp(fstype, "freebsd-ufs") == 0) { + int i; + struct bsddialog_menuitem items[] = { + {"", false, 0, "UFS1", "UFS Version 1", + "Use version 1 of the UFS file system instead " + "of version 2 (not recommended)"}, + {"", true, 0, "SU", "Softupdates", + "Enable softupdates (default)"}, + {"", true, 0, "SUJ", "Softupdates journaling", + "Enable file system journaling (default - " + "turn off for SSDs)"}, + {"", false, 0, "TRIM", "Enable SSD TRIM support", + "Enable TRIM support, useful on solid-state " + "drives" }, + }; + + if (!use_default) { + int choice; + conf.title = "UFS Options"; + choice = bsddialog_checklist(&conf, "", 0, 0, 0, + nitems(items), items, NULL); + if (choice == BSDDIALOG_CANCEL) + return; + } + + strcpy(command, "newfs "); + for (i = 0; i < (int)nitems(items); i++) { + if (items[i].on == false) + continue; + if (strcmp(items[i].name, "UFS1") == 0) + strcat(command, "-O1 "); + else if (strcmp(items[i].name, "SU") == 0) + strcat(command, "-U "); + else if (strcmp(items[i].name, "SUJ") == 0) + strcat(command, "-j "); + else if (strcmp(items[i].name, "TRIM") == 0) + strcat(command, "-t "); + } + } else if (strcmp(fstype, "freebsd-zfs") == 0) { + int i; + struct bsddialog_menuitem items[] = { + {"", 0, true, "fletcher4", "checksum algorithm: fletcher4", + "Use fletcher4 for data integrity checking. " + "(default)"}, + {"", 0, false, "fletcher2", "checksum algorithm: fletcher2", + "Use fletcher2 for data integrity checking. " + "(not recommended)"}, + {"", 0, false, "sha256", "checksum algorithm: sha256", + "Use sha256 for data integrity checking. " + "(not recommended)"}, + {"", 0, false, "atime", "Update atimes for files", + "Disable atime update"}, + }; + + if (!use_default) { + int choice; + conf.title = "ZFS Options"; + choice = bsddialog_checklist(&conf, "", 0, 0, 0, + nitems(items), items, NULL); + if (choice == BSDDIALOG_CANCEL) + return; + } + + strcpy(command, "zpool create -f -m none "); + if (getenv("BSDINSTALL_TMPBOOT") != NULL) { + char zfsboot_path[MAXPATHLEN]; + snprintf(zfsboot_path, sizeof(zfsboot_path), "%s/zfs", + getenv("BSDINSTALL_TMPBOOT")); + mkdir(zfsboot_path, S_IRWXU | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH); + sprintf(command, "%s -o cachefile=%s/zpool.cache ", + command, zfsboot_path); + } + for (i = 0; i < (int)nitems(items); i++) { + if (items[i].on == false) + continue; + if (strcmp(items[i].name, "fletcher4") == 0) + strcat(command, "-O checksum=fletcher4 "); + else if (strcmp(items[i].name, "fletcher2") == 0) + strcat(command, "-O checksum=fletcher2 "); + else if (strcmp(items[i].name, "sha256") == 0) + strcat(command, "-O checksum=sha256 "); + else if (strcmp(items[i].name, "atime") == 0) + strcat(command, "-O atime=off "); + } + } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0 || + strcmp(fstype, "ms-basic-data") == 0) { + int i; + struct bsddialog_menuitem items[] = { + {"", 0, true, "FAT32", "FAT Type 32", + "Create a FAT32 filesystem (default)"}, + {"", 0, false, "FAT16", "FAT Type 16", + "Create a FAT16 filesystem"}, + {"", 0, false, "FAT12", "FAT Type 12", + "Create a FAT12 filesystem"}, + }; + + if (!use_default) { + int choice; + conf.title = "FAT Options"; + choice = bsddialog_radiolist(&conf, "", 0, 0, 0, + nitems(items), items, NULL); + if (choice == BSDDIALOG_CANCEL) + return; + } + + strcpy(command, "newfs_msdos "); + for (i = 0; i < (int)nitems(items); i++) { + if (items[i].on == false) + continue; + if (strcmp(items[i].name, "FAT32") == 0) + strcat(command, "-F 32 -c 1"); + else if (strcmp(items[i].name, "FAT16") == 0) + strcat(command, "-F 16 "); + else if (strcmp(items[i].name, "FAT12") == 0) + strcat(command, "-F 12 "); + } + } else { + if (!use_default) { + conf.title = "Error"; + bsddialog_msgbox(&conf, "No configurable options exist " + "for this filesystem.", 0, 0); + } + command[0] = '\0'; + } +} + +const char * +choose_part_type(const char *def_scheme) +{ + int button, choice, i; + const char *scheme = NULL; + struct bsddialog_conf conf; + + struct bsddialog_menuitem items[] = { + {"", false, 0, "APM", "Apple Partition Map", + "Bootable on PowerPC Apple Hardware" }, + {"", false, 0, "BSD", "BSD Labels", + "Bootable on most x86 systems" }, + {"", false, 0, "GPT", "GUID Partition Table", + "Bootable on most x86 systems and EFI aware ARM64" }, + {"", false, 0, "MBR", "DOS Partitions", + "Bootable on most x86 systems" }, + }; + + for (i = 0; i < (int)nitems(items); i++) + if (strcmp(items[i].name, def_scheme) == 0) + choice = i; + + bsddialog_initconf(&conf); + +parttypemenu: + conf.title = "Partition Scheme"; + button = bsddialog_menu(&conf, + "Select a partition scheme for this volume:", 0, 0, 0, + nitems(items), items, &choice); + + if (button == BSDDIALOG_CANCEL) + return NULL; + + if (!is_scheme_bootable(items[choice].name)) { + char message[512]; + sprintf(message, "This partition scheme (%s) is not " + "bootable on this platform. Are you sure you want " + "to proceed?", items[choice].name); + conf.button.default_cancel = true; + conf.title = "Warning"; + button = bsddialog_yesno(&conf, message, 0, 0); + conf.button.default_cancel = false; + if (button == BSDDIALOG_NO) + goto parttypemenu; *** 2323 LINES SKIPPED *** From nobody Wed Oct 4 16:27:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S10TH0h1mz4wCqw; Wed, 4 Oct 2023 16:27:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S10TH09Hbz4dJD; Wed, 4 Oct 2023 16:27:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696436835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFBS9rHc0xj2lElft/pSm1w5DBwnYO9NUKI4OrsrhVo=; b=ZQg+twnQtU4u8ntmqgsz0ECcRCFqq/aaobNoqqdS7PgnTfe395A+WA+zlEKs5oR6h1hQ5H gccuwZWRHLAhuv4kXJ60Yv5fxo4jNMa2Btd/Rr3F2TUlHJuo42BbT0iNPmktBMA5PSJgMW htlmtvr/jUvEtglXQ2lK4n76LsGtJNmkbB1ZkB16NnveWfzX5hjNPc6/A4SHDe1Nx/TToO 2tf7nxUZG8Tm7SWBeYkAG+zr2t4vCqu3J1F8RwSqJWmhvLwES79Ab1Dprp5ptgeTU99UMJ Ames03O0KZlkb+pYDVpQ3aVZPL//SFQOBvwZ3Al98c0/hd+Jy4Vi9g32mn6iaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696436835; a=rsa-sha256; cv=none; b=MiUq4G+TeqKxBOKFm0yBX/A2XD79yJeDdv5BGH/mIAXTKRjDNIXDrZCfML8bs0m4ftP7ql ex6g+EHRFkS36jioiFjmgmdeoYpzYW88hRZv20V+jqXrAcPrWqkE4KfVUo6iXG8RBUEOmH +8T/XB3H76kSVywzvfcOGCz1kFg0h3Tmalg+54fdyZzZO2pawmDBMuqZVn9WIVI06tAjy+ pwsijwF/XbId0hANFbGg1iV3SPKZnHd40M3Rh2vkoV6hQ+nCBYlMJOjy2yoRmEba+fELRv Xf7hMj+NlQ+u8dfmB/1ntWSwSz6uUx/S13kEDEDZtm56fDZpm2JUYGphgO0kjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696436835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFBS9rHc0xj2lElft/pSm1w5DBwnYO9NUKI4OrsrhVo=; b=EqSmzq/bWBgDJv1BmR0DsHrMgPqU4TnQmLsLQlmz59UHHtO3GUteNAP84puMuoK8vQNe8d oZp1q7BGp644QKhy+NnEAHL4OCVbkiLrIWdTlE+a9DMzmvi6cs0p2TF+83E52qIA5QQtDf tJ+Z372J5CUSWkjN1qJrhxh/knZpsur0XhoMTSQHm+RApgvLLyAAMwXm47zfTRHN3GmqJc CfNrWyMDsLFv5K2LqqmCVnr53PLCyMik3sD/4gDAxf/cpbPjEL5mV5RjOagOsaOcVUWklq G6Owi7q3vlrxy17KiRT9iqJNUVRBihbjElk75QlsMHdUskEyojHAXFpHZb8wqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S10TG6Dj4zlDS; Wed, 4 Oct 2023 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GREkT088561; Wed, 4 Oct 2023 16:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GRE9N088558; Wed, 4 Oct 2023 16:27:14 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:27:14 GMT Message-Id: <202310041627.394GRE9N088558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dfa9e89fcd3f - main - mailmap: Fixup a few github nouser emails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfa9e89fcd3f8cf43b589a349b6c30f9cf661357 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa9e89fcd3f8cf43b589a349b6c30f9cf661357 commit dfa9e89fcd3f8cf43b589a349b6c30f9cf661357 Author: Warner Losh AuthorDate: 2023-10-04 16:15:27 +0000 Commit: Warner Losh CommitDate: 2023-10-04 16:17:55 +0000 mailmap: Fixup a few github nouser emails Fixup a couple foo@user.noreply.github.com email addresses based other information (either known FreeBSD user, known other commits with the correct name, etc) --- .mailmap | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.mailmap b/.mailmap index 273abae90fc5..b06274fe6df3 100644 --- a/.mailmap +++ b/.mailmap @@ -7,3 +7,8 @@ Mina Galić Mina Galić Mina Galić +Michal Meloun +Dmitriy Alexandrov +Alfonso Gregory <83477269+AtariDreams@users.noreply.github.com> +Alfonso Gregory <83477269+gAlfonso-bit@users.noreply.github.com> +Jose Luis Duran From nobody Wed Oct 4 16:53:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11423vS2z4wGhJ; Wed, 4 Oct 2023 16:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11422zGcz3C83; Wed, 4 Oct 2023 16:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rk9gEU/9hTUQwoONc1JSVzrhiiQzTakriA8FBndsgw=; b=IoDPfjJHv4XY2QsW6aeGnAxveWraxrAEuXBBDRLh1Stz3rUfgeAM5Lo/bJ32Ef/AhuTsVn lBMfxwL/zkuQn3/BPHwXIqX4RBrkzci48x/Q7vRxMY8HV3AGXl+HbWJy7UZvu2JZr7gpqN XZ8YdG2HfZNUs9BG+4AEMyzpMgo7iipTkv6yj67U1iA5EgJsNCuzvDvjE4WzsDXVVfkI7T zol8L6pzuIo5UV1xTdtEjHP4Ie9f/83KzgS/SVx21CLxz6KbLtr2AYhU3nSENFE63lO0Ou XP+myaD+KBqPREg5Mql3xWrjoVZTFDqCu1g9mOxJBIKs/X6+vRhQPoKpaOXGxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438434; a=rsa-sha256; cv=none; b=ex3omsPF38EXDktX0XmQuwis2SNQBPBeRCbj7SKbqDToQFcskNff1ZIegPyramCjO7gDKJ T1NDlg92hvlAvvgrC2CRFJgFbvAFGUEBdm/iJCftvfR105Zgaq50CNYy0u/BHyYdFd4owS b3eXQWNFnmgRTpzV8xGckyzqLWVl/aBu5W5T6YVWmYMfZ9yltC/Iykg9AUmjfF3OCqNkEe uFLzSasL9AxSJN71X41NmTkLGkz72f4nARVWBAo5zs3apOSVIJ7VjNN9ucKa4C89+QpCJt smS1MjIrfmDSaXtzxPhDdTDmidj/yXcDSQ8mwY1pE6pHcdKzdEhv0jDyrY9Lmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rk9gEU/9hTUQwoONc1JSVzrhiiQzTakriA8FBndsgw=; b=VmkqxCI1kOsuQdLkCKKI+7gNKhPp8/8n9lQHDz1sH9OpV/mkx7Lw/TGYVvfiGZcU2nXY2U qfhY2NNJRZgG9n34pyHLzh1yb+zQnRpccFDiwrG52zm6s1CgTF9GZWrVPBB8umkrOM+tSY Cckx4h+S2IL+/5deHmP7EwOyxx7Ox3t57+aF5VRqOoidPMhZqnioGfd4V72AOkq0xgFNIy N0FMwhRYnplLFT8b809Ygxv9YDtoYmgSAfjUea/Um0y+J2WE41aoQZU3NCuMibKwWJCoH0 pQptfuMUDqq7veT4FZJoCT0AWI/GBiV1NOsTB4qyWjFDEml8SOv4I1F2FLVbGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1142221SzlRS; Wed, 4 Oct 2023 16:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Grshs037385; Wed, 4 Oct 2023 16:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Grsae037381; Wed, 4 Oct 2023 16:53:54 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:54 GMT Message-Id: <202310041653.394Grsae037381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 01d53c34e79a - main - bhyve: Improve pcifd function naming List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01d53c34e79afaad757088e5fbb4846f02a8beca Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=01d53c34e79afaad757088e5fbb4846f02a8beca commit 01d53c34e79afaad757088e5fbb4846f02a8beca Author: Mark Johnston AuthorDate: 2023-10-04 16:19:58 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Improve pcifd function naming read_config() and write_config() are externally visible, so give them more descriptive names. No functional change intended. MFC after: 1 week Sponsored by: Innovate UK --- usr.sbin/bhyve/pci_emul.c | 2 +- usr.sbin/bhyve/pci_gvt-d.c | 8 ++++---- usr.sbin/bhyve/pci_lpc.c | 9 +++++---- usr.sbin/bhyve/pci_passthru.c | 40 +++++++++++++++++++++++----------------- usr.sbin/bhyve/pci_passthru.h | 6 ++++-- 5 files changed, 37 insertions(+), 28 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 3c34d0e22478..5fb25dbfe9c7 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -375,7 +375,7 @@ pci_config_read_reg(const struct pcisel *const host_sel, nvlist_t *nvl, if (config == NULL) { return def; } else if (host_sel != NULL && strcmp(config, "host") == 0) { - return read_config(host_sel, reg, size); + return pci_host_read_config(host_sel, reg, size); } else { return strtol(config, NULL, 16); } diff --git a/usr.sbin/bhyve/pci_gvt-d.c b/usr.sbin/bhyve/pci_gvt-d.c index 35c7f30dd292..78fa9878358e 100644 --- a/usr.sbin/bhyve/pci_gvt-d.c +++ b/usr.sbin/bhyve/pci_gvt-d.c @@ -49,11 +49,11 @@ gvt_d_probe(struct pci_devinst *const pi) sc = pi->pi_arg; - vendor = read_config(passthru_get_sel(sc), PCIR_VENDOR, 0x02); + vendor = pci_host_read_config(passthru_get_sel(sc), PCIR_VENDOR, 0x02); if (vendor != PCI_VENDOR_INTEL) return (ENXIO); - class = read_config(passthru_get_sel(sc), PCIR_CLASS, 0x01); + class = pci_host_read_config(passthru_get_sel(sc), PCIR_CLASS, 0x01); if (class != PCIC_DISPLAY) return (ENXIO); @@ -169,7 +169,7 @@ gvt_d_setup_gsm(struct pci_devinst *const pi) "Warning: Unable to reuse host address of Graphics Stolen Memory. GPU passthrough might not work properly."); } - bdsm = read_config(passthru_get_sel(sc), PCIR_BDSM, 4); + bdsm = pci_host_read_config(passthru_get_sel(sc), PCIR_BDSM, 4); pci_set_cfgdata32(pi, PCIR_BDSM, gsm->gpa | (bdsm & (PCIM_BDSM_GSM_ALIGNMENT - 1))); @@ -201,7 +201,7 @@ gvt_d_setup_opregion(struct pci_devinst *const pi) return (-1); } - asls = read_config(passthru_get_sel(sc), PCIR_ASLS_CTL, 4); + asls = pci_host_read_config(passthru_get_sel(sc), PCIR_ASLS_CTL, 4); header = mmap(NULL, sizeof(*header), PROT_READ, MAP_SHARED, memfd, asls); diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index 2ff9bbc27774..5c2a2a7965b0 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -485,15 +485,16 @@ pci_lpc_get_sel(struct pcisel *const sel) sel->pc_dev = slot; sel->pc_func = 0; - if (read_config(sel, PCIR_HDRTYPE, 1) & PCIM_MFDEV) + if (pci_host_read_config(sel, PCIR_HDRTYPE, 1) & PCIM_MFDEV) max_func = PCI_FUNCMAX; for (uint8_t func = 0; func <= max_func; ++func) { sel->pc_func = func; - if ((read_config(sel, PCIR_CLASS, 1) == PCIC_BRIDGE) && - (read_config(sel, PCIR_SUBCLASS, 1) == - PCIS_BRIDGE_ISA)) { + if (pci_host_read_config(sel, PCIR_CLASS, 1) == + PCIC_BRIDGE && + pci_host_read_config(sel, PCIR_SUBCLASS, 1) == + PCIS_BRIDGE_ISA) { return (0); } } diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index fa23358c07a2..0a80ee649689 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -145,7 +145,7 @@ pcifd_init(void) } uint32_t -read_config(const struct pcisel *sel, long reg, int width) +pci_host_read_config(const struct pcisel *sel, long reg, int width) { struct pci_io pi; @@ -165,7 +165,8 @@ read_config(const struct pcisel *sel, long reg, int width) } void -write_config(const struct pcisel *sel, long reg, int width, uint32_t data) +pci_host_write_config(const struct pcisel *sel, long reg, int width, + uint32_t data) { struct pci_io pi; @@ -224,24 +225,25 @@ cfginitmsi(struct passthru_softc *sc) * Parse the capabilities and cache the location of the MSI * and MSI-X capabilities. */ - sts = read_config(&sel, PCIR_STATUS, 2); + sts = pci_host_read_config(&sel, PCIR_STATUS, 2); if (sts & PCIM_STATUS_CAPPRESENT) { - ptr = read_config(&sel, PCIR_CAP_PTR, 1); + ptr = pci_host_read_config(&sel, PCIR_CAP_PTR, 1); while (ptr != 0 && ptr != 0xff) { - cap = read_config(&sel, ptr + PCICAP_ID, 1); + cap = pci_host_read_config(&sel, ptr + PCICAP_ID, 1); if (cap == PCIY_MSI) { /* * Copy the MSI capability into the config * space of the emulated pci device */ sc->psc_msi.capoff = ptr; - sc->psc_msi.msgctrl = read_config(&sel, - ptr + 2, 2); + sc->psc_msi.msgctrl = pci_host_read_config(&sel, + ptr + 2, 2); sc->psc_msi.emulated = 0; caplen = msi_caplen(sc->psc_msi.msgctrl); capptr = ptr; while (caplen > 0) { - u32 = read_config(&sel, capptr, 4); + u32 = pci_host_read_config(&sel, capptr, + 4); pci_set_cfgdata32(pi, capptr, u32); caplen -= 4; capptr += 4; @@ -255,7 +257,8 @@ cfginitmsi(struct passthru_softc *sc) msixcap_ptr = (char *)&msixcap; capptr = ptr; while (caplen > 0) { - u32 = read_config(&sel, capptr, 4); + u32 = pci_host_read_config(&sel, capptr, + 4); memcpy(msixcap_ptr, &u32, 4); pci_set_cfgdata32(pi, capptr, u32); caplen -= 4; @@ -263,7 +266,8 @@ cfginitmsi(struct passthru_softc *sc) msixcap_ptr += 4; } } - ptr = read_config(&sel, ptr + PCICAP_NEXTPTR, 1); + ptr = pci_host_read_config(&sel, ptr + PCICAP_NEXTPTR, + 1); } } @@ -298,7 +302,7 @@ cfginitmsi(struct passthru_softc *sc) */ if ((sts & PCIM_STATUS_CAPPRESENT) != 0 && sc->psc_msi.capoff == 0) { int origptr, msiptr; - origptr = read_config(&sel, PCIR_CAP_PTR, 1); + origptr = pci_host_read_config(&sel, PCIR_CAP_PTR, 1); msiptr = passthru_add_msicap(pi, 1, origptr); sc->psc_msi.capoff = msiptr; sc->psc_msi.msgctrl = pci_get_cfgdata16(pi, msiptr + 2); @@ -577,7 +581,8 @@ cfginitbar(struct passthru_softc *sc) return (-1); /* Use same lobits as physical bar */ - uint8_t lobits = read_config(&sc->psc_sel, PCIR_BAR(i), 0x01); + uint8_t lobits = pci_host_read_config(&sc->psc_sel, PCIR_BAR(i), + 0x01); if (bartype == PCIBAR_MEM32 || bartype == PCIBAR_MEM64) { lobits &= ~PCIM_BAR_MEM_BASE; } else { @@ -621,7 +626,8 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) intline = pci_get_cfgdata8(pi, PCIR_INTLINE); intpin = pci_get_cfgdata8(pi, PCIR_INTPIN); for (int i = 0; i <= PCIR_MAXLAT; i += 4) { - pci_set_cfgdata32(pi, i, read_config(&sc->psc_sel, i, 4)); + pci_set_cfgdata32(pi, i, + pci_host_read_config(&sc->psc_sel, i, 4)); } pci_set_cfgdata8(pi, PCIR_INTLINE, intline); pci_set_cfgdata8(pi, PCIR_INTPIN, intpin); @@ -638,7 +644,7 @@ cfginit(struct pci_devinst *pi, int bus, int slot, int func) goto done; } - write_config(&sc->psc_sel, PCIR_COMMAND, 2, + pci_host_write_config(&sc->psc_sel, PCIR_COMMAND, 2, pci_get_cfgdata16(pi, PCIR_COMMAND)); /* @@ -988,13 +994,13 @@ passthru_cfgread_default(struct passthru_softc *sc, if (coff == PCIR_COMMAND) { if (bytes <= 2) return (-1); - *rv = read_config(&sc->psc_sel, PCIR_STATUS, 2) << 16 | + *rv = pci_host_read_config(&sc->psc_sel, PCIR_STATUS, 2) << 16 | pci_get_cfgdata16(pi, PCIR_COMMAND); return (0); } /* Everything else just read from the device's config space */ - *rv = read_config(&sc->psc_sel, coff, bytes); + *rv = pci_host_read_config(&sc->psc_sel, coff, bytes); return (0); } @@ -1080,7 +1086,7 @@ passthru_cfgwrite_default(struct passthru_softc *sc, struct pci_devinst *pi, } #endif - write_config(&sc->psc_sel, coff, bytes, val); + pci_host_write_config(&sc->psc_sel, coff, bytes, val); if (coff == PCIR_COMMAND) { cmd_old = pci_get_cfgdata16(pi, PCIR_COMMAND); if (bytes == 1) diff --git a/usr.sbin/bhyve/pci_passthru.h b/usr.sbin/bhyve/pci_passthru.h index 49d2bb309f71..a89ad287cbc5 100644 --- a/usr.sbin/bhyve/pci_passthru.h +++ b/usr.sbin/bhyve/pci_passthru.h @@ -36,8 +36,10 @@ typedef int (*cfgread_handler)(struct passthru_softc *sc, typedef int (*cfgwrite_handler)(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t val); -uint32_t read_config(const struct pcisel *sel, long reg, int width); -void write_config(const struct pcisel *sel, long reg, int width, uint32_t data); +uint32_t pci_host_read_config(const struct pcisel *sel, long reg, int width); +void pci_host_write_config(const struct pcisel *sel, long reg, int width, + uint32_t data); + int passthru_cfgread_emulate(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t *rv); int passthru_cfgwrite_emulate(struct passthru_softc *sc, struct pci_devinst *pi, From nobody Wed Oct 4 16:53:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11434pMpz4wGfl; Wed, 4 Oct 2023 16:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114347zxz3C8R; Wed, 4 Oct 2023 16:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=311YNNr5JVrROgeJDtyoEWQ2QG+sas09Wql6MpJsaVA=; b=D2d+c8QQiba14puM4PXeRBGHh8ln05hNe7yZDbJy06BvHBEIhjmoK6fOK0KeVi09VeAsKS i7m8TD3B2T7lhJYinfC9NkSf6lbLkyfFuZcPhsVa5jVOa1dBxR6hcEx9c/z8vbR0qm0C0p 8V3/hW9vQyZwO77YvaNxl+jW/FI4Vr0xXk/WMO1JMhKhsRNTFyCXH6Z1qSd5MoGUmBVTpN VadppSd6DJrqeUytjhE8a93Qbeg71jhlt3anmCifO2/WXb6Lz1N5MlF3Yf2SB8AbW1HEWB EEofS9tiQBCsm2sPXCu4ynuui/D/omIMgNd42wpEwcacS6qkSkKvXDHcViiO8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438435; a=rsa-sha256; cv=none; b=e9pnHEa38zGhGaDSfwG9pq1se/RLfNYH/Io6JZJEu2QznmK7IfBCX7j25DRTChixaPJF+u JoiEbYzlF2pYtoNH6apxYcLjGmZguH09qA65Dko5F1SEoHPTPzmM0UR69FDuneE/qh5h4Y +J00EZJQM/xHxiGiWHjtUwpcBnBng4A7rl+BloEKx/sCljE5JOQBEHHXc8ZCp7niX3zx7w aKtaXMAy1xq619IpbKpRaJuDjJwsWmiCVWjfRcMt4I4NIPat1bevsN9cMU35XGp7OKSo+e KvfxIv0AX/drBpCF8C+h5OXhEl2X5vcTBuI94/qUrjzL3PpKcAbcfbMQmPjxcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=311YNNr5JVrROgeJDtyoEWQ2QG+sas09Wql6MpJsaVA=; b=kgb9ByinqsKJSrZ52xwGB2S1WxMYgHQQPHHk9PpS6AscMG6vHpdTs6XdXrHkHjl30DOQ3p grvKFk/rvwHneeelEv6qMTOguzXOSwJxq5XN/2PTpnsZ3yyX95aQ8tqLtK/5Fsu+H+RSzC AqR63JVp4aPa5fWiIeUvkq/HhJUxQWKea7dWLgZmTd5nbet6iC+twMVJ4+jhtM9Qz/fNoD IyEC6+bKKohRb8amhADwQ54RaRfm5Efse/NYoELQYHF7BQKweWUb2+YbBTjME5cCGdDZ61 QGSIezHL71V7qEG4XX4/gRC3zridy7F3VzC/Ljf9C+FHKk7mzZ5+ZyvN8r3DVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1143341jzllx; Wed, 4 Oct 2023 16:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GrtuF037434; Wed, 4 Oct 2023 16:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GrtlA037431; Wed, 4 Oct 2023 16:53:55 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:55 GMT Message-Id: <202310041653.394GrtlA037431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4f2bd4027b32 - main - bhyve: Start moving machine-dependent code into subdirectories List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f2bd4027b3261d159f6d673dc9ee9e84b4a3538 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4f2bd4027b3261d159f6d673dc9ee9e84b4a3538 commit 4f2bd4027b3261d159f6d673dc9ee9e84b4a3538 Author: Mark Johnston AuthorDate: 2023-10-04 16:20:37 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Start moving machine-dependent code into subdirectories In preparation for an arm64 port, make an easy change which puts some machine-dependent code in its own directory. Going forward, code which is only used on one platform should live in a MD directory. We should strive to layer modules in such a way as to avoid polluting shared code with lots of ifdefs. For some existing files this will take some effort. task_switch.c and fwctl.c are an easy place to start: the former is very x86-specific, and the latter provides an I/O port interface which can't be used on anything other than x86. (fwcfg as implemented has the same problem, but QEMU also supports a MMIO fwcfg interface.) So I propose that we start by simply making those files conditional. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40501 --- usr.sbin/bhyve/Makefile | 16 +++++++++------- usr.sbin/bhyve/amd64/Makefile.inc | 6 ++++++ usr.sbin/bhyve/{ => amd64}/fwctl.c | 0 usr.sbin/bhyve/{ => amd64}/fwctl.h | 0 usr.sbin/bhyve/{ => amd64}/task_switch.c | 2 ++ usr.sbin/bhyve/bhyverun.c | 8 +++++++- usr.sbin/bhyve/bhyverun.h | 2 -- usr.sbin/bhyve/snapshot.c | 1 - 8 files changed, 24 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index a720c6b3c7a4..794bfbe4c8a3 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -2,9 +2,6 @@ # .include -CFLAGS+=-I${.CURDIR}/../../contrib/lib9p -CFLAGS+=-I${SRCTOP}/sys -.PATH: ${SRCTOP}/sys/libkern ${SRCTOP}/sys/cam/ctl PROG= bhyve PACKAGE= bhyve @@ -13,6 +10,10 @@ MAN= bhyve.8 bhyve_config.5 BHYVE_SYSDIR?=${SRCTOP} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} \ + ${SRCTOP}/sys/libkern \ + ${SRCTOP}/sys/cam/ctl + SRCS= \ acpi.c \ acpi_device.c \ @@ -29,7 +30,6 @@ SRCS= \ ctl_scsi_all.c \ ctl_util.c \ e820.c \ - fwctl.c \ gdb.c \ hda_codec.c \ inout.c \ @@ -73,7 +73,6 @@ SRCS= \ smbiostbl.c \ sockstream.c \ spinup_ap.c \ - task_switch.c \ tpm_device.c \ tpm_emul_passthru.c \ tpm_intf_crb.c \ @@ -90,10 +89,13 @@ SRCS= \ SRCS+= snapshot.c .endif +.include "${MACHINE_CPUARCH}/Makefile.inc" + CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 -.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm -SRCS+= vmm_instruction_emul.c +CFLAGS+=-I${.CURDIR} \ + -I${.CURDIR}/../../contrib/lib9p \ + -I${SRCTOP}/sys LIBADD= vmmapi md nv pthread z util sbuf cam 9p diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc new file mode 100644 index 000000000000..62de5f211a23 --- /dev/null +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -0,0 +1,6 @@ +SRCS+= \ + fwctl.c \ + task_switch.c + +.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm +SRCS+= vmm_instruction_emul.c diff --git a/usr.sbin/bhyve/fwctl.c b/usr.sbin/bhyve/amd64/fwctl.c similarity index 100% rename from usr.sbin/bhyve/fwctl.c rename to usr.sbin/bhyve/amd64/fwctl.c diff --git a/usr.sbin/bhyve/fwctl.h b/usr.sbin/bhyve/amd64/fwctl.h similarity index 100% rename from usr.sbin/bhyve/fwctl.h rename to usr.sbin/bhyve/amd64/fwctl.h diff --git a/usr.sbin/bhyve/task_switch.c b/usr.sbin/bhyve/amd64/task_switch.c similarity index 99% rename from usr.sbin/bhyve/task_switch.c rename to usr.sbin/bhyve/amd64/task_switch.c index 351df7fb738b..c316d18142a7 100644 --- a/usr.sbin/bhyve/task_switch.c +++ b/usr.sbin/bhyve/amd64/task_switch.c @@ -700,6 +700,8 @@ push_errcode(struct vcpu *vcpu, struct vm_guest_paging *paging, return (VMEXIT_CONTINUE); \ } while (0) +int vmexit_task_switch(struct vmctx *, struct vcpu *, struct vm_run *); + int vmexit_task_switch(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) { diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 1d4cf048b59b..4e2d5467cfaf 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -88,7 +88,9 @@ #include "inout.h" #include "debug.h" #include "e820.h" -#include "fwctl.h" +#ifdef __amd64__ +#include "amd64/fwctl.h" +#endif #include "gdb.h" #include "ioapic.h" #include "kernemu_dev.h" @@ -921,6 +923,8 @@ vmexit_ipi(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, return (error); } +int vmexit_task_switch(struct vmctx *, struct vcpu *, struct vm_run *); + static const vmexit_handler_t handler[VM_EXITCODE_MAX] = { [VM_EXITCODE_INOUT] = vmexit_inout, [VM_EXITCODE_INOUT_STR] = vmexit_inout, @@ -1576,9 +1580,11 @@ main(int argc, char *argv[]) } free(e820_fwcfg_item); +#ifdef __amd64__ if (lpc_bootrom() && strcmp(lpc_fwcfg(), "bhyve") == 0) { fwctl_init(); } +#endif /* * Change the proc title to include the VM name. diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index 1131e18baed2..fc0d2595e66b 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -46,6 +46,4 @@ uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr); int fbsdrun_virtio_msix(void); -int vmexit_task_switch(struct vmctx *, struct vcpu *, struct vm_run *); - #endif diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index ec56bd0fed9a..7d8959756757 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -79,7 +79,6 @@ #include "debug.h" #include "inout.h" #include "ipc.h" -#include "fwctl.h" #include "ioapic.h" #include "mem.h" #include "mevent.h" From nobody Wed Oct 4 16:53:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11452sb9z4wGnV; Wed, 4 Oct 2023 16:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11445PJQz3CLB; Wed, 4 Oct 2023 16:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g727BTWPkOqSZad2UxIqglTpUx5T1urqhVYSBMS0gEo=; b=rjiOZ81XWloQjg3VtIopGx5lPoQqokoG8syOIBcnnAzh6AwYBWccMYWISUw8ENJDD8mzhB KycZA9NXhiwB/LwPkoply0sSG5WnBaZbH2xqvNTmKTPtL9+rhxJHe9anpjK07jrecvl3m1 TRa22qMOZRw7foMkMy5MEC3F9WQu07WIJiMxNIVXR0esNT3y/XWx1iIOdIRJVz3LomDciC 1UzIBbjF471ShGyFPzRYop1SoihNvjCd/LscroKwjSL3w+2TEspk9CDgbLK/G86vbto7hY 5xh6v8Q6wS+ZvVnu0SosvbqBJ3+sNeHQnNEz1T2FwT8d18PrV/6YoLmG8ZCTVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438436; a=rsa-sha256; cv=none; b=MovqZh7VuvvCZ/alIfxwkByVW/g4ZnPJQlLfg1VDo4Lrg0Vrdk152hirU5hEszDdeBoSfv 3DGkUT4x3nljm5CUYi7jbXft4YKpnG/YAhsy9hpYdw/K3IqG/D/LdqXHXOfQQ6XYJUYKGo zAJLQDg2ZRqoBGS2FHaumsSkdr6YWKMgTl8reShs/TZ09yhYjWKQ/2rQ0qWlL9mvNnsd/3 LQyqipLfkebcOqjSk3gL27yH/QIck5U5Rf+JLa8tKGatFR0lJJ3ZZ4t3xSofly9AdhHjmM RUDOdWu3OsiwE2MWInCeAefXgk9xVOGMsLRkB8si3GRl661rK9xWpOB0o2Nesg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g727BTWPkOqSZad2UxIqglTpUx5T1urqhVYSBMS0gEo=; b=brHc2R9Unu5wAnX09OcDyAKpGmqdBJuwHJIjjdEg06K6/28QMAG2+LImi0JUkLbERpD7yv bjdkpPu9AfuRLsw1hJS38t/gGkKIjS0Jmk/tRP1/FeOyfAfi5isDeVu0o1iVIqE85gvDf3 EzwEhtlxRY4A7p+pBBjjphI4lqxK433fNhvEZoeaqVNzcqVIsWPJa6Rl4i73ibSJauhptN TUISxISipxlKgcH9FDidvjsbz/tVL4dnttH+9SPiT7tBByLnG4vGzy2E/7IKWF22EVIB/5 5CKR7vV71NdGUE2XUWKzeSbd+jZguMYa4hi3pToL278ezoTbgX80EllDJQPrxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S11444KKkzm0S; Wed, 4 Oct 2023 16:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GruYx037491; Wed, 4 Oct 2023 16:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GruGI037488; Wed, 4 Oct 2023 16:53:56 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:56 GMT Message-Id: <202310041653.394GruGI037488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f927afc1a6fe - main - bhyve: Move some more amd64-specific drivers to their own subdir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f927afc1a6fe8257e28d79e8bb77305c2958724a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f927afc1a6fe8257e28d79e8bb77305c2958724a commit f927afc1a6fe8257e28d79e8bb77305c2958724a Author: Mark Johnston AuthorDate: 2023-10-04 16:20:57 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move some more amd64-specific drivers to their own subdir No functional change intended. Reviewed by: corvink, jhb, emaste MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40551 --- usr.sbin/bhyve/Makefile | 6 ------ usr.sbin/bhyve/amd64/Makefile.inc | 7 +++++++ usr.sbin/bhyve/{ => amd64}/atkbdc.c | 0 usr.sbin/bhyve/{ => amd64}/atkbdc.h | 0 usr.sbin/bhyve/{ => amd64}/post.c | 0 usr.sbin/bhyve/{ => amd64}/ps2kbd.c | 0 usr.sbin/bhyve/{ => amd64}/ps2kbd.h | 0 usr.sbin/bhyve/{ => amd64}/ps2mouse.c | 0 usr.sbin/bhyve/{ => amd64}/ps2mouse.h | 0 usr.sbin/bhyve/bhyverun.c | 6 +++++- usr.sbin/bhyve/snapshot.c | 15 +++++++++++++-- 11 files changed, 25 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 794bfbe4c8a3..86039a8c45da 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -17,7 +17,6 @@ BHYVE_SYSDIR?=${SRCTOP} SRCS= \ acpi.c \ acpi_device.c \ - atkbdc.c \ audio.c \ basl.c \ bhyvegc.c \ @@ -63,9 +62,6 @@ SRCS= \ pci_xhci.c \ pctestdev.c \ pm.c \ - post.c \ - ps2kbd.c \ - ps2mouse.c \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ @@ -138,6 +134,4 @@ NO_WTHREAD_SAFETY= NO_WCAST_ALIGN= -SUBDIR= kbdlayout - .include diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 62de5f211a23..c52219cb8dd1 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -1,6 +1,13 @@ SRCS+= \ + atkbdc.c \ fwctl.c \ + post.c \ + ps2kbd.c \ + ps2mouse.c \ task_switch.c + .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c + +SUBDIR+= kbdlayout diff --git a/usr.sbin/bhyve/atkbdc.c b/usr.sbin/bhyve/amd64/atkbdc.c similarity index 100% rename from usr.sbin/bhyve/atkbdc.c rename to usr.sbin/bhyve/amd64/atkbdc.c diff --git a/usr.sbin/bhyve/atkbdc.h b/usr.sbin/bhyve/amd64/atkbdc.h similarity index 100% rename from usr.sbin/bhyve/atkbdc.h rename to usr.sbin/bhyve/amd64/atkbdc.h diff --git a/usr.sbin/bhyve/post.c b/usr.sbin/bhyve/amd64/post.c similarity index 100% rename from usr.sbin/bhyve/post.c rename to usr.sbin/bhyve/amd64/post.c diff --git a/usr.sbin/bhyve/ps2kbd.c b/usr.sbin/bhyve/amd64/ps2kbd.c similarity index 100% rename from usr.sbin/bhyve/ps2kbd.c rename to usr.sbin/bhyve/amd64/ps2kbd.c diff --git a/usr.sbin/bhyve/ps2kbd.h b/usr.sbin/bhyve/amd64/ps2kbd.h similarity index 100% rename from usr.sbin/bhyve/ps2kbd.h rename to usr.sbin/bhyve/amd64/ps2kbd.h diff --git a/usr.sbin/bhyve/ps2mouse.c b/usr.sbin/bhyve/amd64/ps2mouse.c similarity index 100% rename from usr.sbin/bhyve/ps2mouse.c rename to usr.sbin/bhyve/amd64/ps2mouse.c diff --git a/usr.sbin/bhyve/ps2mouse.h b/usr.sbin/bhyve/amd64/ps2mouse.h similarity index 100% rename from usr.sbin/bhyve/ps2mouse.h rename to usr.sbin/bhyve/amd64/ps2mouse.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 4e2d5467cfaf..707e21caf506 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -82,7 +82,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "bootrom.h" #include "config.h" #include "inout.h" @@ -1454,7 +1456,9 @@ main(int argc, char *argv[]) init_inout(); kernemu_dev_init(); init_bootrom(ctx); +#ifdef __amd64__ atkbdc_init(ctx); +#endif pci_irq_init(ctx); ioapic_init(ctx); diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 7d8959756757..593930c7f8a3 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -75,7 +75,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "debug.h" #include "inout.h" #include "ipc.h" @@ -892,7 +894,12 @@ vm_restore_devices(struct restore_state *rstate) return (ret); } - return (vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL)); +#ifdef __amd64__ + ret = vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL); +#else + ret = 0; +#endif + return (ret); } int @@ -1131,8 +1138,12 @@ vm_snapshot_devices(int data_fd, xo_handle_t *xop) goto snapshot_err; } +#ifdef __amd64__ ret = vm_snapshot_device(atkbdc_snapshot, "atkbdc", NULL, data_fd, xop, meta, &offset); +#else + ret = 0; +#endif xo_close_list_h(xop, JSON_DEV_ARR_KEY); From nobody Wed Oct 4 16:53:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11460DSxz4wH2R; Wed, 4 Oct 2023 16:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11456G29z3CR5; Wed, 4 Oct 2023 16:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tbANAGyo3JoWa2S5xmvi3SVP3q0GMMBTt73RqWzFx+c=; b=GXXaZZnwR9I3/LS9w9Pik2uZ4K0OT+8/lemjLP1QD7TMkKdNNmqByT2PpYDWUUFFPldUJO mwCasj1pey3P/F1C7vL1BaBguTr8jQMVcATBQy2BrQu/3nZTAMQEXhQ44bYAq+3gENXSe8 WFEkHwX6KRhodJIxGj6r1nCScSnE2IfMA+zX1eUUfYhoj6nQ/FiKohcauGj2j7U1JciWwg x+1SYINMYD76v1qIO0M5WwVuS3vvotW+xQ0YZpQvGLV3t25pje+JMBfYz8TcgLbSZH6tlR HlU1h38TqC//lWPQc+DiT2XKLR42m5xCalbL4jSbp0wI+rP8XebWvdW3arkU4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438437; a=rsa-sha256; cv=none; b=k1+UmVDIVPk3LXaAwd05VZOvMs8OmnZ/l9Lcmuj4Ar2OAxZeqadJpq31oz8T1hgy6lPaaU pKSomgtiYSe82qRObpl6cQxuPGtzobfqNsbLmHzNk2JuEGDNJ5mRIw76eM7Y0yY8fdtCna zJVjiqsvCw1sMc134TfEC4eY3HfYlnWL+kYNFST+38PiDTfLy4SgKjv3ewP+3toya1sQrG 8kQRo4spAmxKiX8RhTYU8D4yX6Gnm/VlV9jJTKN9M9A2dwxTvFmJAuvD5Sxc32YVuKPZhr DWPqIxVI0kJSjU0F98Z31bNqgCQMNJMfBukb8fWt9tXHKqVL4ESHP0JVUSGqRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tbANAGyo3JoWa2S5xmvi3SVP3q0GMMBTt73RqWzFx+c=; b=Z9Q4iq4uI3zz6YRaMLowq8ynDsXeoZIbBV9QyDL4HECRUphX1Vr95ejjIAtvr4UKTye4HI FHOIsVgqJGo7eAIo6+wDjbk10vuBlka3naFGbKGxzX0BxTOPCcnazHolOLfOJzByhHvraw eJSO/mQmcSFCA5BWGIZriKaqakndAQwc9ZYqJkpgyeCxX3UJrJWIT0mKeJUFSCC3VPBsSO FrXwSJ4PwUfBAuvny6HCOBFJWBIWGSdI1ABFsrmStGkp+foKjHyfC3elkPQ8psW6ZqUtIb ThN2tTUGVPlse+fa4R2m+xoGf+TYvNIZ70LgopHavwQnXmRryw5AMZWENTzKZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S11455LxJzlRT; Wed, 4 Oct 2023 16:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GrvRD037541; Wed, 4 Oct 2023 16:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GrvUk037538; Wed, 4 Oct 2023 16:53:57 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:57 GMT Message-Id: <202310041653.394GrvUk037538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4fe5b70cae67 - main - bhyve: Move more amd64-specific code under amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fe5b70cae6761b9205ff35b72ccfe60d7326301 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fe5b70cae6761b9205ff35b72ccfe60d7326301 commit 4fe5b70cae6761b9205ff35b72ccfe60d7326301 Author: Mark Johnston AuthorDate: 2023-10-04 16:21:20 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move more amd64-specific code under amd64/ mptable and the e820 are both rather amd64-specific and can be moved easily. In the case of e820, move the registration with qemu_fwcfg into e820.c, as it simplifies bhyverun.c a bit and I can't see any downsides. No functional change intended. Reviewed by: corvink, jhb, emaste MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40552 --- usr.sbin/bhyve/Makefile | 2 -- usr.sbin/bhyve/amd64/Makefile.inc | 2 ++ usr.sbin/bhyve/{ => amd64}/e820.c | 24 +++++++++++++++++++++++- usr.sbin/bhyve/{ => amd64}/e820.h | 2 +- usr.sbin/bhyve/{ => amd64}/mptbl.c | 0 usr.sbin/bhyve/{ => amd64}/mptbl.h | 0 usr.sbin/bhyve/bhyverun.c | 30 ++++++++++++++---------------- usr.sbin/bhyve/pci_gvt-d.c | 2 +- usr.sbin/bhyve/snapshot.c | 1 - 9 files changed, 41 insertions(+), 22 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 86039a8c45da..499c0d1bb89d 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -28,7 +28,6 @@ SRCS= \ crc16.c \ ctl_scsi_all.c \ ctl_util.c \ - e820.c \ gdb.c \ hda_codec.c \ inout.c \ @@ -37,7 +36,6 @@ SRCS= \ kernemu_dev.c \ mem.c \ mevent.c \ - mptbl.c \ net_backends.c \ net_utils.c \ pci_ahci.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index c52219cb8dd1..e0cb84e32b85 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -1,6 +1,8 @@ SRCS+= \ atkbdc.c \ + e820.c \ fwctl.c \ + mptbl.c \ post.c \ ps2kbd.c \ ps2mouse.c \ diff --git a/usr.sbin/bhyve/e820.c b/usr.sbin/bhyve/amd64/e820.c similarity index 95% rename from usr.sbin/bhyve/e820.c rename to usr.sbin/bhyve/amd64/e820.c index 99a66645f70f..545878aad39f 100644 --- a/usr.sbin/bhyve/e820.c +++ b/usr.sbin/bhyve/amd64/e820.c @@ -105,7 +105,7 @@ e820_dump_table(void) } } -struct qemu_fwcfg_item * +static struct qemu_fwcfg_item * e820_get_fwcfg_item(void) { struct qemu_fwcfg_item *fwcfg_item; @@ -466,3 +466,25 @@ e820_init(struct vmctx *const ctx) return (0); } + +int +e820_finalize(void) +{ + struct qemu_fwcfg_item *e820_fwcfg_item; + int error; + + e820_fwcfg_item = e820_get_fwcfg_item(); + if (e820_fwcfg_item == NULL) { + warnx("invalid e820 table"); + return (ENOMEM); + } + error = qemu_fwcfg_add_file("etc/e820", + e820_fwcfg_item->size, e820_fwcfg_item->data); + if (error != 0) { + warnx("could not add qemu fwcfg etc/e820"); + return (error); + } + free(e820_fwcfg_item); + + return (0); +} diff --git a/usr.sbin/bhyve/e820.h b/usr.sbin/bhyve/amd64/e820.h similarity index 95% rename from usr.sbin/bhyve/e820.h rename to usr.sbin/bhyve/amd64/e820.h index 8703a55115cd..ae68fe9040a9 100644 --- a/usr.sbin/bhyve/e820.h +++ b/usr.sbin/bhyve/amd64/e820.h @@ -41,5 +41,5 @@ uint64_t e820_alloc(const uint64_t address, const uint64_t length, const uint64_t alignment, const enum e820_memory_type type, const enum e820_allocation_strategy strategy); void e820_dump_table(void); -struct qemu_fwcfg_item *e820_get_fwcfg_item(void); int e820_init(struct vmctx *const ctx); +int e820_finalize(void); diff --git a/usr.sbin/bhyve/mptbl.c b/usr.sbin/bhyve/amd64/mptbl.c similarity index 100% rename from usr.sbin/bhyve/mptbl.c rename to usr.sbin/bhyve/amd64/mptbl.c diff --git a/usr.sbin/bhyve/mptbl.h b/usr.sbin/bhyve/amd64/mptbl.h similarity index 100% rename from usr.sbin/bhyve/mptbl.h rename to usr.sbin/bhyve/amd64/mptbl.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 707e21caf506..7672c577da66 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -89,8 +89,8 @@ #include "config.h" #include "inout.h" #include "debug.h" -#include "e820.h" #ifdef __amd64__ +#include "amd64/e820.h" #include "amd64/fwctl.h" #endif #include "gdb.h" @@ -98,7 +98,9 @@ #include "kernemu_dev.h" #include "mem.h" #include "mevent.h" -#include "mptbl.h" +#ifdef __amd64__ +#include "amd64/mptbl.h" +#endif #include "pci_emul.h" #include "pci_irq.h" #include "pci_lpc.h" @@ -1221,7 +1223,6 @@ main(int argc, char *argv[]) int max_vcpus, memflags; struct vcpu *bsp; struct vmctx *ctx; - struct qemu_fwcfg_item *e820_fwcfg_item; size_t memsize; const char *optstr, *value, *vmname; #ifdef BHYVE_SNAPSHOT @@ -1349,9 +1350,11 @@ main(int argc, char *argv[]) case 'x': set_config_bool("x86.x2apic", true); break; +#ifdef __amd64__ case 'Y': set_config_bool("x86.mptable", false); break; +#endif case 'h': usage(0); default: @@ -1476,10 +1479,12 @@ main(int argc, char *argv[]) exit(4); } +#ifdef __amd64__ if (e820_init(ctx) != 0) { fprintf(stderr, "Unable to setup E820"); exit(4); } +#endif /* * Exit if a device emulation finds an error in its initialization @@ -1552,9 +1557,7 @@ main(int argc, char *argv[]) } #endif - /* - * build the guest tables, MP etc. - */ +#ifdef __amd64__ if (get_config_bool_default("x86.mptable", true)) { error = mptable_build(ctx, guest_ncpus); if (error) { @@ -1562,6 +1565,7 @@ main(int argc, char *argv[]) exit(4); } } +#endif error = smbios_build(ctx); if (error != 0) @@ -1572,17 +1576,11 @@ main(int argc, char *argv[]) assert(error == 0); } - e820_fwcfg_item = e820_get_fwcfg_item(); - if (e820_fwcfg_item == NULL) { - fprintf(stderr, "invalid e820 table"); - exit(4); - } - if (qemu_fwcfg_add_file("etc/e820", e820_fwcfg_item->size, - e820_fwcfg_item->data) != 0) { - fprintf(stderr, "could not add qemu fwcfg etc/e820"); +#ifdef __amd64__ + error = e820_finalize(); + if (error != 0) exit(4); - } - free(e820_fwcfg_item); +#endif #ifdef __amd64__ if (lpc_bootrom() && strcmp(lpc_fwcfg(), "bhyve") == 0) { diff --git a/usr.sbin/bhyve/pci_gvt-d.c b/usr.sbin/bhyve/pci_gvt-d.c index 78fa9878358e..f64cc5984352 100644 --- a/usr.sbin/bhyve/pci_gvt-d.c +++ b/usr.sbin/bhyve/pci_gvt-d.c @@ -17,7 +17,7 @@ #include #include -#include "e820.h" +#include "amd64/e820.h" #include "pci_gvt-d-opregion.h" #include "pci_passthru.h" diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 593930c7f8a3..2daef0ef74f0 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -84,7 +84,6 @@ #include "ioapic.h" #include "mem.h" #include "mevent.h" -#include "mptbl.h" #include "pci_emul.h" #include "pci_irq.h" #include "pci_lpc.h" From nobody Wed Oct 4 16:53:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11470vdpz4wGyr; Wed, 4 Oct 2023 16:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11470H9Cz3CWZ; Wed, 4 Oct 2023 16:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1egFqjeS5PMcc3+V8ZQiW/fclSYWSJBycnTPaDPvakk=; b=w0Z2l30B+QDFVcxm8EC2C+8XLAobSc8+DUr4fi3GuJ+2UkqIORRirSIbpdXitNSh4pB5Zk AHuCPgqdUC8bHjgVk9jemxJVF2udQR1OYetZnbWePbpOSPqaAFWQLoYAYyTBgSn35EpaIi srNgaXzIZ3XBS/PXLKjL6LFOEZw/dQ+a4nbus9bmXCHebHMBGYkCP1SRLmE5W8NewlwzRm 1zZeMvXfoelgSmEPlfLdAlF69agsPAeyAAiWAMuTDAOhR1ph9SWV1e9H4P2+MF7M33zoc/ JwHxJmTpeRmJBd9iwteE/DbyoPpWQzBoMogLpeIQsvbWb/onboPmCj1so0pnuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438439; a=rsa-sha256; cv=none; b=lRU4WiZwEWTDDZamMYbItJfPGGRMCm+xZIRSZy0o3q5D5sMKMaCtu2QEq/1l/XsPQV+KMc +ubYH2wiouemZ2csifMPLicIMwBM/L33yEIlmi46SUZ2rrl5gYVAGp5hcfVdrJm3XvAYg1 z2sFPVZDy8wIv5mgkdttrACi2rW3W+uJwtGAOKOkHK79pL/AKuZZPeFPdq/WuXNag1Vv1V c1guMxYLZsUY1KWQYuil5NR8VO/lZjJzOSQtV6NkoFhFx2Y/8IqkGsEkFqk7uUu9NZdUzy eYIPPMrxWZ1gEsrShJq312ze5Zha1yafhngO1lboxfCeS5vFnmFimWK6L9voJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1egFqjeS5PMcc3+V8ZQiW/fclSYWSJBycnTPaDPvakk=; b=b85DanvVzqPvKhNe6Z8HZyV60B7pJm4PJyl5Vk5asldRVL/0hTZXO9SiIq0C4/SMXNxwJT i9YqrOCacDcCjOuX4nZpH6FVtqXdy/b4nyk4WBwe77w16Svr9P/kzrwZ5F7Qs/YKgD/jKf 0jGJPGCcz7VtN81qpYUIPcBdp3bbKJ2JVBrq5IUxt51t1pugKVuPNpfEHsrjE/1SV7y/ua b69LWTZ+1z7xSSzzTaXJCM4vIUGja5Ei7u0bKaZJVvkXfYygVFr1F1Tze0/Ay4ektWxlug oKsOFoUc6eafhF077f1dHiYZVy6r8MZlQRNGptLp+W3/+FC/CKwu0O/b5qAf2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114665kZzlly; Wed, 4 Oct 2023 16:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GrwDP037583; Wed, 4 Oct 2023 16:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GrwjL037581; Wed, 4 Oct 2023 16:53:58 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:58 GMT Message-Id: <202310041653.394GrwjL037581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a1642451ce25 - main - bhyve: Move kernemu to amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1642451ce25bb0e2d01765a8dedda69c5029d48 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1642451ce25bb0e2d01765a8dedda69c5029d48 commit a1642451ce25bb0e2d01765a8dedda69c5029d48 Author: Mark Johnston AuthorDate: 2023-10-04 16:22:41 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move kernemu to amd64/ This code handles instruction emulation for accesses to various amd64-specific MMIO regions. No functional change intended. Reviewed by: corvink, jhb, emaste MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40554 --- usr.sbin/bhyve/Makefile | 3 --- usr.sbin/bhyve/amd64/Makefile.inc | 4 +++- usr.sbin/bhyve/{ => amd64}/kernemu_dev.c | 0 usr.sbin/bhyve/{ => amd64}/kernemu_dev.h | 0 usr.sbin/bhyve/bhyverun.c | 6 +++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 499c0d1bb89d..c2ccd60790ae 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -33,7 +33,6 @@ SRCS= \ inout.c \ ioapic.c \ iov.c \ - kernemu_dev.c \ mem.c \ mevent.c \ net_backends.c \ @@ -85,8 +84,6 @@ SRCS+= snapshot.c .include "${MACHINE_CPUARCH}/Makefile.inc" -CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 - CFLAGS+=-I${.CURDIR} \ -I${.CURDIR}/../../contrib/lib9p \ -I${SRCTOP}/sys diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index e0cb84e32b85..6843cec4919f 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -2,14 +2,16 @@ SRCS+= \ atkbdc.c \ e820.c \ fwctl.c \ + kernemu_dev.c \ mptbl.c \ post.c \ ps2kbd.c \ ps2mouse.c \ task_switch.c - .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c +CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 + SUBDIR+= kbdlayout diff --git a/usr.sbin/bhyve/kernemu_dev.c b/usr.sbin/bhyve/amd64/kernemu_dev.c similarity index 100% rename from usr.sbin/bhyve/kernemu_dev.c rename to usr.sbin/bhyve/amd64/kernemu_dev.c diff --git a/usr.sbin/bhyve/kernemu_dev.h b/usr.sbin/bhyve/amd64/kernemu_dev.h similarity index 100% rename from usr.sbin/bhyve/kernemu_dev.h rename to usr.sbin/bhyve/amd64/kernemu_dev.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 7672c577da66..df40c7a7cc2a 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -95,7 +95,9 @@ #endif #include "gdb.h" #include "ioapic.h" -#include "kernemu_dev.h" +#ifdef __amd64__ +#include "amd64/kernemu_dev.h" +#endif #include "mem.h" #include "mevent.h" #ifdef __amd64__ @@ -1457,7 +1459,9 @@ main(int argc, char *argv[]) init_mem(guest_ncpus); init_inout(); +#ifdef __amd64__ kernemu_dev_init(); +#endif init_bootrom(ctx); #ifdef __amd64__ atkbdc_init(ctx); From nobody Wed Oct 4 16:53:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114816fJz4wGnZ; Wed, 4 Oct 2023 16:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11480VZmz3CX8; Wed, 4 Oct 2023 16:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOVP/RdIMiG7v+ashXEeDcdb8OzdE+OVrFs92ZR3XW8=; b=nPuzDgzqlwVq8aU3SVKt/SVvqSWSFMEANm3u0A/yqwYhMOaMLLi55NnG5mMZGGQNHk/Wg/ ivc3/e2WZ8jTWWVU1I8ioCCWHgfyMvUIsW6x2s7iZi4Lof/8oJv6iz6J1r0H1RG0MpObNk 47BEjjcsUcZ0xMuwmdzMVnP45QF7Ly+j4axGs+sH4+Xw7Zg/ShhaTmfHpyGBIn2q7lS+WW wF9f+2hIy84qsBAJIz2bAceRShqdyAy9vwrF701ezN088zN71s+jyAMRetHsl6gM5JtSyC m5uuGcH14nMgyAUDYF+2HMNmk8YmwzP3RUg5P8CcZnRb2uwpJOCjHEGFmzvVWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438440; a=rsa-sha256; cv=none; b=Gg/DBQ0bTPcYzzCjtJvb4qCyvTVbVpRTpUZjt4OpixzelXASwcuIiEwqAVvUgW1P64spjb xjYeCpUUdDNl6v1q0C+sBCj4dBPf4F8K+laUzIo0GAlRDkXRFb0vWBHWvOsSAiOW7GBfqx D7fy7pLCPZD9hiRnX8BYv1HQCFR+y5pXs5chAs9+WW1Iq+6fuzm4vVpzNCe/oJ5iMGWmIC xQmyBRLt2sINnqvDDQNSxVxK2YoqIrLlKSL0mFVk+DWSn5H4QqhzD+Zja9a5KN3ah9rwVt vwmUtdkIsluqsYlosHcX5+5a9wcfrCz6Bz/c7IraRDODmaCZACwjLD6WXhShRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOVP/RdIMiG7v+ashXEeDcdb8OzdE+OVrFs92ZR3XW8=; b=kAZvE3kH+UfiqR9hnuCQJJvoJ0HPiJ//b/neH0z5Qk5AAkDSxK1wbTS46ORMy5H61qQdyL ckGbwaaP1ivMCN3KA+gAG0WrTJHYTxj46DXYLZX1Z+fxQrzUWoxwuNJMi64WymIZLXuG5F YhSXO81tsMhhdhuIed7AKdwU/zp9vo10c2BYayLRGcGm/pWG7knkiLVXHAmogxQJUX3yZQ cEqcEvOZnfREjXpfNsfvCqwA9uHbKB7WobVwEmeIhYJEo+nnYq13vV6C7fWEv5ZRPQN21M 8YDkWwO5WrrPtEV9gttil6D4B9eueHGzMFgJD5d3YGrVoioOSJFxwY2CB75Eqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S11476gNDzlRV; Wed, 4 Oct 2023 16:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GrxLp037638; Wed, 4 Oct 2023 16:53:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GrxXZ037635; Wed, 4 Oct 2023 16:53:59 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:59 GMT Message-Id: <202310041653.394GrxXZ037635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 72f9c9d82fce - main - bhyve: Split vmexit handling into a separate file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72f9c9d82fce84fcb68c9aa1f32fabcf0c0038e9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=72f9c9d82fce84fcb68c9aa1f32fabcf0c0038e9 commit 72f9c9d82fce84fcb68c9aa1f32fabcf0c0038e9 Author: Mark Johnston AuthorDate: 2023-10-04 16:22:56 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Split vmexit handling into a separate file Put it in amd64, since most of it is MD and won't be used on arm64. Add a bit of glue to bhyverun.h to make CPU startup and shutdown work without having to export more global variables. AP startup will be reworked further in a future revision. This makes bhyverun.c much more machine-independent. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40556 --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/amd64/vmexit.c | 493 ++++++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/bhyverun.c | 468 ++------------------------------------- usr.sbin/bhyve/bhyverun.h | 7 + usr.sbin/bhyve/vmexit.h | 34 +++ 5 files changed, 551 insertions(+), 452 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index c2ccd60790ae..5f13d457d914 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -75,6 +75,7 @@ SRCS= \ usb_mouse.c \ vga.c \ virtio.c \ + vmexit.c \ vmgenc.c \ xmsr.c diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c new file mode 100644 index 000000000000..152fecaf424c --- /dev/null +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -0,0 +1,493 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2011 NetApp, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``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 NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "bhyverun.h" +#include "config.h" +#include "debug.h" +#include "gdb.h" +#include "inout.h" +#include "mem.h" +#ifdef BHYVE_SNAPSHOT +#include "snapshot.h" +#endif +#include "spinup_ap.h" +#include "vmexit.h" +#include "xmsr.h" + +static int +vmexit_inout(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) +{ + struct vm_exit *vme; + int error; + int bytes, port, in; + + vme = vmrun->vm_exit; + port = vme->u.inout.port; + bytes = vme->u.inout.bytes; + in = vme->u.inout.in; + + error = emulate_inout(ctx, vcpu, vme); + if (error) { + fprintf(stderr, "Unhandled %s%c 0x%04x at 0x%lx\n", + in ? "in" : "out", + bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l'), + port, vme->rip); + return (VMEXIT_ABORT); + } else { + return (VMEXIT_CONTINUE); + } +} + +static int +vmexit_rdmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun) +{ + struct vm_exit *vme; + uint64_t val; + uint32_t eax, edx; + int error; + + vme = vmrun->vm_exit; + + val = 0; + error = emulate_rdmsr(vcpu, vme->u.msr.code, &val); + if (error != 0) { + fprintf(stderr, "rdmsr to register %#x on vcpu %d\n", + vme->u.msr.code, vcpu_id(vcpu)); + if (get_config_bool("x86.strictmsr")) { + vm_inject_gp(vcpu); + return (VMEXIT_CONTINUE); + } + } + + eax = val; + error = vm_set_register(vcpu, VM_REG_GUEST_RAX, eax); + assert(error == 0); + + edx = val >> 32; + error = vm_set_register(vcpu, VM_REG_GUEST_RDX, edx); + assert(error == 0); + + return (VMEXIT_CONTINUE); +} + +static int +vmexit_wrmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun) +{ + struct vm_exit *vme; + int error; + + vme = vmrun->vm_exit; + + error = emulate_wrmsr(vcpu, vme->u.msr.code, vme->u.msr.wval); + if (error != 0) { + fprintf(stderr, "wrmsr to register %#x(%#lx) on vcpu %d\n", + vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu)); + if (get_config_bool("x86.strictmsr")) { + vm_inject_gp(vcpu); + return (VMEXIT_CONTINUE); + } + } + return (VMEXIT_CONTINUE); +} + +static const char * const vmx_exit_reason_desc[] = { + [EXIT_REASON_EXCEPTION] = "Exception or non-maskable interrupt (NMI)", + [EXIT_REASON_EXT_INTR] = "External interrupt", + [EXIT_REASON_TRIPLE_FAULT] = "Triple fault", + [EXIT_REASON_INIT] = "INIT signal", + [EXIT_REASON_SIPI] = "Start-up IPI (SIPI)", + [EXIT_REASON_IO_SMI] = "I/O system-management interrupt (SMI)", + [EXIT_REASON_SMI] = "Other SMI", + [EXIT_REASON_INTR_WINDOW] = "Interrupt window", + [EXIT_REASON_NMI_WINDOW] = "NMI window", + [EXIT_REASON_TASK_SWITCH] = "Task switch", + [EXIT_REASON_CPUID] = "CPUID", + [EXIT_REASON_GETSEC] = "GETSEC", + [EXIT_REASON_HLT] = "HLT", + [EXIT_REASON_INVD] = "INVD", + [EXIT_REASON_INVLPG] = "INVLPG", + [EXIT_REASON_RDPMC] = "RDPMC", + [EXIT_REASON_RDTSC] = "RDTSC", + [EXIT_REASON_RSM] = "RSM", + [EXIT_REASON_VMCALL] = "VMCALL", + [EXIT_REASON_VMCLEAR] = "VMCLEAR", + [EXIT_REASON_VMLAUNCH] = "VMLAUNCH", + [EXIT_REASON_VMPTRLD] = "VMPTRLD", + [EXIT_REASON_VMPTRST] = "VMPTRST", + [EXIT_REASON_VMREAD] = "VMREAD", + [EXIT_REASON_VMRESUME] = "VMRESUME", + [EXIT_REASON_VMWRITE] = "VMWRITE", + [EXIT_REASON_VMXOFF] = "VMXOFF", + [EXIT_REASON_VMXON] = "VMXON", + [EXIT_REASON_CR_ACCESS] = "Control-register accesses", + [EXIT_REASON_DR_ACCESS] = "MOV DR", + [EXIT_REASON_INOUT] = "I/O instruction", + [EXIT_REASON_RDMSR] = "RDMSR", + [EXIT_REASON_WRMSR] = "WRMSR", + [EXIT_REASON_INVAL_VMCS] = + "VM-entry failure due to invalid guest state", + [EXIT_REASON_INVAL_MSR] = "VM-entry failure due to MSR loading", + [EXIT_REASON_MWAIT] = "MWAIT", + [EXIT_REASON_MTF] = "Monitor trap flag", + [EXIT_REASON_MONITOR] = "MONITOR", + [EXIT_REASON_PAUSE] = "PAUSE", + [EXIT_REASON_MCE_DURING_ENTRY] = + "VM-entry failure due to machine-check event", + [EXIT_REASON_TPR] = "TPR below threshold", + [EXIT_REASON_APIC_ACCESS] = "APIC access", + [EXIT_REASON_VIRTUALIZED_EOI] = "Virtualized EOI", + [EXIT_REASON_GDTR_IDTR] = "Access to GDTR or IDTR", + [EXIT_REASON_LDTR_TR] = "Access to LDTR or TR", + [EXIT_REASON_EPT_FAULT] = "EPT violation", + [EXIT_REASON_EPT_MISCONFIG] = "EPT misconfiguration", + [EXIT_REASON_INVEPT] = "INVEPT", + [EXIT_REASON_RDTSCP] = "RDTSCP", + [EXIT_REASON_VMX_PREEMPT] = "VMX-preemption timer expired", + [EXIT_REASON_INVVPID] = "INVVPID", + [EXIT_REASON_WBINVD] = "WBINVD", + [EXIT_REASON_XSETBV] = "XSETBV", + [EXIT_REASON_APIC_WRITE] = "APIC write", + [EXIT_REASON_RDRAND] = "RDRAND", + [EXIT_REASON_INVPCID] = "INVPCID", + [EXIT_REASON_VMFUNC] = "VMFUNC", + [EXIT_REASON_ENCLS] = "ENCLS", + [EXIT_REASON_RDSEED] = "RDSEED", + [EXIT_REASON_PM_LOG_FULL] = "Page-modification log full", + [EXIT_REASON_XSAVES] = "XSAVES", + [EXIT_REASON_XRSTORS] = "XRSTORS" +}; + +static const char * +vmexit_vmx_desc(uint32_t exit_reason) +{ + + if (exit_reason >= nitems(vmx_exit_reason_desc) || + vmx_exit_reason_desc[exit_reason] == NULL) + return ("Unknown"); + return (vmx_exit_reason_desc[exit_reason]); +} + +#define DEBUG_EPT_MISCONFIG +#ifdef DEBUG_EPT_MISCONFIG +#define VMCS_GUEST_PHYSICAL_ADDRESS 0x00002400 + +static uint64_t ept_misconfig_gpa, ept_misconfig_pte[4]; +static int ept_misconfig_ptenum; +#endif + +static int +vmexit_vmx(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) +{ + struct vm_exit *vme; + + vme = vmrun->vm_exit; + + fprintf(stderr, "vm exit[%d]\n", vcpu_id(vcpu)); + fprintf(stderr, "\treason\t\tVMX\n"); + fprintf(stderr, "\trip\t\t0x%016lx\n", vme->rip); + fprintf(stderr, "\tinst_length\t%d\n", vme->inst_length); + fprintf(stderr, "\tstatus\t\t%d\n", vme->u.vmx.status); + fprintf(stderr, "\texit_reason\t%u (%s)\n", vme->u.vmx.exit_reason, + vmexit_vmx_desc(vme->u.vmx.exit_reason)); + fprintf(stderr, "\tqualification\t0x%016lx\n", + vme->u.vmx.exit_qualification); + fprintf(stderr, "\tinst_type\t\t%d\n", vme->u.vmx.inst_type); + fprintf(stderr, "\tinst_error\t\t%d\n", vme->u.vmx.inst_error); +#ifdef DEBUG_EPT_MISCONFIG + if (vme->u.vmx.exit_reason == EXIT_REASON_EPT_MISCONFIG) { + vm_get_register(vcpu, + VMCS_IDENT(VMCS_GUEST_PHYSICAL_ADDRESS), + &ept_misconfig_gpa); + vm_get_gpa_pmap(ctx, ept_misconfig_gpa, ept_misconfig_pte, + &ept_misconfig_ptenum); + fprintf(stderr, "\tEPT misconfiguration:\n"); + fprintf(stderr, "\t\tGPA: %#lx\n", ept_misconfig_gpa); + fprintf(stderr, "\t\tPTE(%d): %#lx %#lx %#lx %#lx\n", + ept_misconfig_ptenum, ept_misconfig_pte[0], + ept_misconfig_pte[1], ept_misconfig_pte[2], + ept_misconfig_pte[3]); + } +#endif /* DEBUG_EPT_MISCONFIG */ + return (VMEXIT_ABORT); +} + +static int +vmexit_svm(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) +{ + struct vm_exit *vme; + + vme = vmrun->vm_exit; + + fprintf(stderr, "vm exit[%d]\n", vcpu_id(vcpu)); + fprintf(stderr, "\treason\t\tSVM\n"); + fprintf(stderr, "\trip\t\t0x%016lx\n", vme->rip); + fprintf(stderr, "\tinst_length\t%d\n", vme->inst_length); + fprintf(stderr, "\texitcode\t%#lx\n", vme->u.svm.exitcode); + fprintf(stderr, "\texitinfo1\t%#lx\n", vme->u.svm.exitinfo1); + fprintf(stderr, "\texitinfo2\t%#lx\n", vme->u.svm.exitinfo2); + return (VMEXIT_ABORT); +} + +static int +vmexit_bogus(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + struct vm_run *vmrun) +{ + assert(vmrun->vm_exit->inst_length == 0); + + return (VMEXIT_CONTINUE); +} + +static int +vmexit_reqidle(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + struct vm_run *vmrun) +{ + assert(vmrun->vm_exit->inst_length == 0); + + return (VMEXIT_CONTINUE); +} + +static int +vmexit_hlt(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + struct vm_run *vmrun __unused) +{ + /* + * Just continue execution with the next instruction. We use + * the HLT VM exit as a way to be friendly with the host + * scheduler. + */ + return (VMEXIT_CONTINUE); +} + +static int +vmexit_pause(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + struct vm_run *vmrun __unused) +{ + return (VMEXIT_CONTINUE); +} + +static int +vmexit_mtrap(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun) +{ + assert(vmrun->vm_exit->inst_length == 0); + +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_suspend(vcpu_id(vcpu)); +#endif + gdb_cpu_mtrap(vcpu); +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_resume(vcpu_id(vcpu)); +#endif + + return (VMEXIT_CONTINUE); +} + +static int +vmexit_inst_emul(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun) +{ + struct vm_exit *vme; + struct vie *vie; + int err, i, cs_d; + enum vm_cpu_mode mode; + + vme = vmrun->vm_exit; + + vie = &vme->u.inst_emul.vie; + if (!vie->decoded) { + /* + * Attempt to decode in userspace as a fallback. This allows + * updating instruction decode in bhyve without rebooting the + * kernel (rapid prototyping), albeit with much slower + * emulation. + */ + vie_restart(vie); + mode = vme->u.inst_emul.paging.cpu_mode; + cs_d = vme->u.inst_emul.cs_d; + if (vmm_decode_instruction(mode, cs_d, vie) != 0) + goto fail; + if (vm_set_register(vcpu, VM_REG_GUEST_RIP, + vme->rip + vie->num_processed) != 0) + goto fail; + } + + err = emulate_mem(vcpu, vme->u.inst_emul.gpa, vie, + &vme->u.inst_emul.paging); + if (err) { + if (err == ESRCH) { + EPRINTLN("Unhandled memory access to 0x%lx\n", + vme->u.inst_emul.gpa); + } + goto fail; + } + + return (VMEXIT_CONTINUE); + +fail: + fprintf(stderr, "Failed to emulate instruction sequence [ "); + for (i = 0; i < vie->num_valid; i++) + fprintf(stderr, "%02x", vie->inst[i]); + FPRINTLN(stderr, " ] at 0x%lx", vme->rip); + return (VMEXIT_ABORT); +} + +static int +vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) +{ + struct vm_exit *vme; + enum vm_suspend_how how; + int vcpuid = vcpu_id(vcpu); + + vme = vmrun->vm_exit; + + how = vme->u.suspended.how; + + fbsdrun_deletecpu(vcpuid); + + switch (how) { + case VM_SUSPEND_RESET: + exit(0); + case VM_SUSPEND_POWEROFF: + if (get_config_bool_default("destroy_on_poweroff", false)) + vm_destroy(ctx); + exit(1); + case VM_SUSPEND_HALT: + exit(2); + case VM_SUSPEND_TRIPLEFAULT: + exit(3); + default: + fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); + exit(100); + } + return (0); /* NOTREACHED */ +} + +static int +vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun __unused) +{ + +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_suspend(vcpu_id(vcpu)); +#endif + gdb_cpu_suspend(vcpu); +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_resume(vcpu_id(vcpu)); +#endif + /* + * XXX-MJ sleep for a short period to avoid chewing up the CPU in the + * window between activation of the vCPU thread and the STARTUP IPI. + */ + usleep(1000); + return (VMEXIT_CONTINUE); +} + +static int +vmexit_breakpoint(struct vmctx *ctx __unused, struct vcpu *vcpu, + struct vm_run *vmrun) +{ + gdb_cpu_breakpoint(vcpu, vmrun->vm_exit); + return (VMEXIT_CONTINUE); +} + +static int +vmexit_ipi(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + struct vm_run *vmrun) +{ + struct vm_exit *vme; + cpuset_t *dmask; + int error = -1; + int i; + + dmask = vmrun->cpuset; + vme = vmrun->vm_exit; + + switch (vme->u.ipi.mode) { + case APIC_DELMODE_INIT: + CPU_FOREACH_ISSET(i, dmask) { + error = fbsdrun_suspendcpu(i); + if (error) { + warnx("failed to suspend cpu %d", i); + break; + } + } + break; + case APIC_DELMODE_STARTUP: + CPU_FOREACH_ISSET(i, dmask) { + spinup_ap(fbsdrun_vcpu(i), + vme->u.ipi.vector << PAGE_SHIFT); + } + error = 0; + break; + default: + break; + } + + return (error); +} + +int vmexit_task_switch(struct vmctx *, struct vcpu *, struct vm_run *); + +const vmexit_handler_t vmexit_handlers[VM_EXITCODE_MAX] = { + [VM_EXITCODE_INOUT] = vmexit_inout, + [VM_EXITCODE_INOUT_STR] = vmexit_inout, + [VM_EXITCODE_VMX] = vmexit_vmx, + [VM_EXITCODE_SVM] = vmexit_svm, + [VM_EXITCODE_BOGUS] = vmexit_bogus, + [VM_EXITCODE_REQIDLE] = vmexit_reqidle, + [VM_EXITCODE_RDMSR] = vmexit_rdmsr, + [VM_EXITCODE_WRMSR] = vmexit_wrmsr, + [VM_EXITCODE_MTRAP] = vmexit_mtrap, + [VM_EXITCODE_INST_EMUL] = vmexit_inst_emul, + [VM_EXITCODE_SUSPENDED] = vmexit_suspend, + [VM_EXITCODE_TASK_SWITCH] = vmexit_task_switch, + [VM_EXITCODE_DEBUG] = vmexit_debug, + [VM_EXITCODE_BPT] = vmexit_breakpoint, + [VM_EXITCODE_IPI] = vmexit_ipi, + [VM_EXITCODE_HLT] = vmexit_hlt, + [VM_EXITCODE_PAUSE] = vmexit_pause, +}; diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index df40c7a7cc2a..1cf7fc5bcc24 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -41,11 +41,7 @@ #include #endif -#include -#include - #include -#include #ifndef WITHOUT_CAPSICUM #include @@ -73,11 +69,6 @@ #include #endif -#include -#ifndef WITHOUT_CAPSICUM -#include -#endif -#include #include #include "bhyverun.h" @@ -112,83 +103,14 @@ #include "snapshot.h" #endif #include "tpm_device.h" -#include "xmsr.h" -#include "spinup_ap.h" #include "rtc.h" #include "vmgenc.h" +#include "vmexit.h" +#include "xmsr.h" #define MB (1024UL * 1024) #define GB (1024UL * MB) -static const char * const vmx_exit_reason_desc[] = { - [EXIT_REASON_EXCEPTION] = "Exception or non-maskable interrupt (NMI)", - [EXIT_REASON_EXT_INTR] = "External interrupt", - [EXIT_REASON_TRIPLE_FAULT] = "Triple fault", - [EXIT_REASON_INIT] = "INIT signal", - [EXIT_REASON_SIPI] = "Start-up IPI (SIPI)", - [EXIT_REASON_IO_SMI] = "I/O system-management interrupt (SMI)", - [EXIT_REASON_SMI] = "Other SMI", - [EXIT_REASON_INTR_WINDOW] = "Interrupt window", - [EXIT_REASON_NMI_WINDOW] = "NMI window", - [EXIT_REASON_TASK_SWITCH] = "Task switch", - [EXIT_REASON_CPUID] = "CPUID", - [EXIT_REASON_GETSEC] = "GETSEC", - [EXIT_REASON_HLT] = "HLT", - [EXIT_REASON_INVD] = "INVD", - [EXIT_REASON_INVLPG] = "INVLPG", - [EXIT_REASON_RDPMC] = "RDPMC", - [EXIT_REASON_RDTSC] = "RDTSC", - [EXIT_REASON_RSM] = "RSM", - [EXIT_REASON_VMCALL] = "VMCALL", - [EXIT_REASON_VMCLEAR] = "VMCLEAR", - [EXIT_REASON_VMLAUNCH] = "VMLAUNCH", - [EXIT_REASON_VMPTRLD] = "VMPTRLD", - [EXIT_REASON_VMPTRST] = "VMPTRST", - [EXIT_REASON_VMREAD] = "VMREAD", - [EXIT_REASON_VMRESUME] = "VMRESUME", - [EXIT_REASON_VMWRITE] = "VMWRITE", - [EXIT_REASON_VMXOFF] = "VMXOFF", - [EXIT_REASON_VMXON] = "VMXON", - [EXIT_REASON_CR_ACCESS] = "Control-register accesses", - [EXIT_REASON_DR_ACCESS] = "MOV DR", - [EXIT_REASON_INOUT] = "I/O instruction", - [EXIT_REASON_RDMSR] = "RDMSR", - [EXIT_REASON_WRMSR] = "WRMSR", - [EXIT_REASON_INVAL_VMCS] = - "VM-entry failure due to invalid guest state", - [EXIT_REASON_INVAL_MSR] = "VM-entry failure due to MSR loading", - [EXIT_REASON_MWAIT] = "MWAIT", - [EXIT_REASON_MTF] = "Monitor trap flag", - [EXIT_REASON_MONITOR] = "MONITOR", - [EXIT_REASON_PAUSE] = "PAUSE", - [EXIT_REASON_MCE_DURING_ENTRY] = - "VM-entry failure due to machine-check event", - [EXIT_REASON_TPR] = "TPR below threshold", - [EXIT_REASON_APIC_ACCESS] = "APIC access", - [EXIT_REASON_VIRTUALIZED_EOI] = "Virtualized EOI", - [EXIT_REASON_GDTR_IDTR] = "Access to GDTR or IDTR", - [EXIT_REASON_LDTR_TR] = "Access to LDTR or TR", - [EXIT_REASON_EPT_FAULT] = "EPT violation", - [EXIT_REASON_EPT_MISCONFIG] = "EPT misconfiguration", - [EXIT_REASON_INVEPT] = "INVEPT", - [EXIT_REASON_RDTSCP] = "RDTSCP", - [EXIT_REASON_VMX_PREEMPT] = "VMX-preemption timer expired", - [EXIT_REASON_INVVPID] = "INVVPID", - [EXIT_REASON_WBINVD] = "WBINVD", - [EXIT_REASON_XSETBV] = "XSETBV", - [EXIT_REASON_APIC_WRITE] = "APIC write", - [EXIT_REASON_RDRAND] = "RDRAND", - [EXIT_REASON_INVPCID] = "INVPCID", - [EXIT_REASON_VMFUNC] = "VMFUNC", - [EXIT_REASON_ENCLS] = "ENCLS", - [EXIT_REASON_RDSEED] = "RDSEED", - [EXIT_REASON_PM_LOG_FULL] = "Page-modification log full", - [EXIT_REASON_XSAVES] = "XSAVES", - [EXIT_REASON_XRSTORS] = "XRSTORS" -}; - -typedef int (*vmexit_handler_t)(struct vmctx *, struct vcpu *, struct vm_run *); - int guest_ncpus; uint16_t cpu_cores, cpu_sockets, cpu_threads; @@ -508,6 +430,12 @@ fbsdrun_virtio_msix(void) return (get_config_bool_default("virtio_msix", true)); } +struct vcpu * +fbsdrun_vcpu(int vcpuid) +{ + return (vcpu_info[vcpuid].vcpu); +} + static void * fbsdrun_start_thread(void *param) { @@ -554,7 +482,7 @@ fbsdrun_addcpu(struct vcpu_info *vi) assert(error == 0); } -static void +void fbsdrun_deletecpu(int vcpu) { static pthread_mutex_t resetcpu_mtx = PTHREAD_MUTEX_INITIALIZER; @@ -581,376 +509,12 @@ fbsdrun_deletecpu(int vcpu) pthread_mutex_unlock(&resetcpu_mtx); } -static int -vmexit_inout(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) -{ - struct vm_exit *vme; - int error; - int bytes, port, in; - - vme = vmrun->vm_exit; - port = vme->u.inout.port; - bytes = vme->u.inout.bytes; - in = vme->u.inout.in; - - error = emulate_inout(ctx, vcpu, vme); - if (error) { - fprintf(stderr, "Unhandled %s%c 0x%04x at 0x%lx\n", - in ? "in" : "out", - bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l'), - port, vme->rip); - return (VMEXIT_ABORT); - } else { - return (VMEXIT_CONTINUE); - } -} - -static int -vmexit_rdmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, - struct vm_run *vmrun) -{ - struct vm_exit *vme; - uint64_t val; - uint32_t eax, edx; - int error; - - vme = vmrun->vm_exit; - - val = 0; - error = emulate_rdmsr(vcpu, vme->u.msr.code, &val); - if (error != 0) { - fprintf(stderr, "rdmsr to register %#x on vcpu %d\n", - vme->u.msr.code, vcpu_id(vcpu)); - if (get_config_bool("x86.strictmsr")) { - vm_inject_gp(vcpu); - return (VMEXIT_CONTINUE); - } - } - - eax = val; - error = vm_set_register(vcpu, VM_REG_GUEST_RAX, eax); - assert(error == 0); - - edx = val >> 32; - error = vm_set_register(vcpu, VM_REG_GUEST_RDX, edx); - assert(error == 0); - - return (VMEXIT_CONTINUE); -} - -static int -vmexit_wrmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, - struct vm_run *vmrun) -{ - struct vm_exit *vme; - int error; - - vme = vmrun->vm_exit; - - error = emulate_wrmsr(vcpu, vme->u.msr.code, vme->u.msr.wval); - if (error != 0) { - fprintf(stderr, "wrmsr to register %#x(%#lx) on vcpu %d\n", - vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu)); - if (get_config_bool("x86.strictmsr")) { - vm_inject_gp(vcpu); - return (VMEXIT_CONTINUE); - } - } - return (VMEXIT_CONTINUE); -} - -#define DEBUG_EPT_MISCONFIG -#ifdef DEBUG_EPT_MISCONFIG -#define VMCS_GUEST_PHYSICAL_ADDRESS 0x00002400 - -static uint64_t ept_misconfig_gpa, ept_misconfig_pte[4]; -static int ept_misconfig_ptenum; -#endif - -static const char * -vmexit_vmx_desc(uint32_t exit_reason) -{ - - if (exit_reason >= nitems(vmx_exit_reason_desc) || - vmx_exit_reason_desc[exit_reason] == NULL) - return ("Unknown"); - return (vmx_exit_reason_desc[exit_reason]); -} - -static int -vmexit_vmx(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) -{ - struct vm_exit *vme; - - vme = vmrun->vm_exit; - - fprintf(stderr, "vm exit[%d]\n", vcpu_id(vcpu)); - fprintf(stderr, "\treason\t\tVMX\n"); - fprintf(stderr, "\trip\t\t0x%016lx\n", vme->rip); - fprintf(stderr, "\tinst_length\t%d\n", vme->inst_length); - fprintf(stderr, "\tstatus\t\t%d\n", vme->u.vmx.status); - fprintf(stderr, "\texit_reason\t%u (%s)\n", vme->u.vmx.exit_reason, - vmexit_vmx_desc(vme->u.vmx.exit_reason)); - fprintf(stderr, "\tqualification\t0x%016lx\n", - vme->u.vmx.exit_qualification); - fprintf(stderr, "\tinst_type\t\t%d\n", vme->u.vmx.inst_type); - fprintf(stderr, "\tinst_error\t\t%d\n", vme->u.vmx.inst_error); -#ifdef DEBUG_EPT_MISCONFIG - if (vme->u.vmx.exit_reason == EXIT_REASON_EPT_MISCONFIG) { - vm_get_register(vcpu, - VMCS_IDENT(VMCS_GUEST_PHYSICAL_ADDRESS), - &ept_misconfig_gpa); - vm_get_gpa_pmap(ctx, ept_misconfig_gpa, ept_misconfig_pte, - &ept_misconfig_ptenum); - fprintf(stderr, "\tEPT misconfiguration:\n"); - fprintf(stderr, "\t\tGPA: %#lx\n", ept_misconfig_gpa); - fprintf(stderr, "\t\tPTE(%d): %#lx %#lx %#lx %#lx\n", - ept_misconfig_ptenum, ept_misconfig_pte[0], - ept_misconfig_pte[1], ept_misconfig_pte[2], - ept_misconfig_pte[3]); - } -#endif /* DEBUG_EPT_MISCONFIG */ - return (VMEXIT_ABORT); -} - -static int -vmexit_svm(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) -{ - struct vm_exit *vme; - - vme = vmrun->vm_exit; - - fprintf(stderr, "vm exit[%d]\n", vcpu_id(vcpu)); - fprintf(stderr, "\treason\t\tSVM\n"); - fprintf(stderr, "\trip\t\t0x%016lx\n", vme->rip); - fprintf(stderr, "\tinst_length\t%d\n", vme->inst_length); - fprintf(stderr, "\texitcode\t%#lx\n", vme->u.svm.exitcode); - fprintf(stderr, "\texitinfo1\t%#lx\n", vme->u.svm.exitinfo1); - fprintf(stderr, "\texitinfo2\t%#lx\n", vme->u.svm.exitinfo2); - return (VMEXIT_ABORT); -} - -static int -vmexit_bogus(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, - struct vm_run *vmrun) -{ - assert(vmrun->vm_exit->inst_length == 0); - - return (VMEXIT_CONTINUE); -} - -static int -vmexit_reqidle(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, - struct vm_run *vmrun) -{ - assert(vmrun->vm_exit->inst_length == 0); - - return (VMEXIT_CONTINUE); -} - -static int -vmexit_hlt(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, - struct vm_run *vmrun __unused) -{ - /* - * Just continue execution with the next instruction. We use - * the HLT VM exit as a way to be friendly with the host - * scheduler. - */ - return (VMEXIT_CONTINUE); -} - -static int -vmexit_pause(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, - struct vm_run *vmrun __unused) -{ - return (VMEXIT_CONTINUE); -} - -static int -vmexit_mtrap(struct vmctx *ctx __unused, struct vcpu *vcpu, - struct vm_run *vmrun) -{ - assert(vmrun->vm_exit->inst_length == 0); - -#ifdef BHYVE_SNAPSHOT - checkpoint_cpu_suspend(vcpu_id(vcpu)); -#endif - gdb_cpu_mtrap(vcpu); -#ifdef BHYVE_SNAPSHOT - checkpoint_cpu_resume(vcpu_id(vcpu)); -#endif - - return (VMEXIT_CONTINUE); -} - -static int -vmexit_inst_emul(struct vmctx *ctx __unused, struct vcpu *vcpu, - struct vm_run *vmrun) -{ - struct vm_exit *vme; - struct vie *vie; - int err, i, cs_d; - enum vm_cpu_mode mode; - - vme = vmrun->vm_exit; - - vie = &vme->u.inst_emul.vie; - if (!vie->decoded) { - /* - * Attempt to decode in userspace as a fallback. This allows - * updating instruction decode in bhyve without rebooting the - * kernel (rapid prototyping), albeit with much slower - * emulation. - */ - vie_restart(vie); - mode = vme->u.inst_emul.paging.cpu_mode; - cs_d = vme->u.inst_emul.cs_d; - if (vmm_decode_instruction(mode, cs_d, vie) != 0) - goto fail; - if (vm_set_register(vcpu, VM_REG_GUEST_RIP, - vme->rip + vie->num_processed) != 0) - goto fail; - } - - err = emulate_mem(vcpu, vme->u.inst_emul.gpa, vie, - &vme->u.inst_emul.paging); - if (err) { - if (err == ESRCH) { - EPRINTLN("Unhandled memory access to 0x%lx\n", - vme->u.inst_emul.gpa); - } - goto fail; - } - - return (VMEXIT_CONTINUE); - -fail: - fprintf(stderr, "Failed to emulate instruction sequence [ "); - for (i = 0; i < vie->num_valid; i++) - fprintf(stderr, "%02x", vie->inst[i]); - FPRINTLN(stderr, " ] at 0x%lx", vme->rip); - return (VMEXIT_ABORT); -} - -static int -vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) -{ - struct vm_exit *vme; - enum vm_suspend_how how; - int vcpuid = vcpu_id(vcpu); - - vme = vmrun->vm_exit; - - how = vme->u.suspended.how; - - fbsdrun_deletecpu(vcpuid); - - switch (how) { - case VM_SUSPEND_RESET: - exit(0); - case VM_SUSPEND_POWEROFF: - if (get_config_bool_default("destroy_on_poweroff", false)) - vm_destroy(ctx); - exit(1); - case VM_SUSPEND_HALT: - exit(2); - case VM_SUSPEND_TRIPLEFAULT: - exit(3); - default: - fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); - exit(100); - } - return (0); /* NOTREACHED */ -} - -static int -vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu, - struct vm_run *vmrun __unused) -{ - -#ifdef BHYVE_SNAPSHOT - checkpoint_cpu_suspend(vcpu_id(vcpu)); -#endif - gdb_cpu_suspend(vcpu); -#ifdef BHYVE_SNAPSHOT - checkpoint_cpu_resume(vcpu_id(vcpu)); -#endif - /* - * XXX-MJ sleep for a short period to avoid chewing up the CPU in the - * window between activation of the vCPU thread and the STARTUP IPI. - */ - usleep(1000); - return (VMEXIT_CONTINUE); -} *** 150 LINES SKIPPED *** From nobody Wed Oct 4 16:54:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S11491hQ0z4wH7S; Wed, 4 Oct 2023 16:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S11491GTlz3CXl; Wed, 4 Oct 2023 16:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcsQH/BNp1kfrGViGh40msPPpI8tDO5/ANMuM0t/VR0=; b=nDvd/KEnrQ+ab9y6ZP5T08VKQxzfDsUji4NPytqLP5NP8cBwLiDzuuhmpcMDHbI5Kn2Z/V sJxEe3mVtMwv2+YN8aC/JD0GcN8mWpZnqjms5WagC8ALCi3rlKxjfn9+jWMYQNjj6bIfVa d6cJXOcxK9mDKKtIc/bCbnN+/zRKKEA+co+eFHpn7k/J7vU4YQmfpM5PExSXNuMA6j4aWv Lna0jV+3lovWtIhx/M2j3Fn/YKwcyzAPGjHdLA//3W4OFWgz6qR20fenfcNuWIwKDXbZRw Nxb3u+RUlhvl/zTMfgySgzeKIumeRlMUNF6cy8ee7RcT5BSms7iXW9pjBOivkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438441; a=rsa-sha256; cv=none; b=UR1fTku+BuowJPWGTgL9n9DiVM5Y071bW4pmv0NvmPxhGL9UZEpHDv+LtjH52NlDNvQ1Ld J8vsgHsdZ5tgqHJBWb5aLwauorDvlERcKnGYNT1gO8qC5gMMlyIDcXNjE4kgnGtDb567gG LSbjNkJNu1rirMA6qyMQDHiusvHU9+TYeaw+k7WDl6e33O+R0Xw1mSBQaOuoPIIXay1RCh rTW8vNKWRPEdUeb1Lvr89371rDhrN6SOjdX+wWh+QZI3YzNQ26wgS3xqKqTwtTB9VYCp8K vuJ1EsNIOCiOrS3YPbPCrXNk4Y4wS3OMYGwXlhnFUGlhvYCtbcCJlBM0vHTRxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcsQH/BNp1kfrGViGh40msPPpI8tDO5/ANMuM0t/VR0=; b=ToCt/r7LjYLUxDfIeQpgRodbMJ59Z3RFr1w1/+fN47k0pFce4cwXs+pPhB6ooTp6zoznGm yPJdHAEdnKAoZTRt5jR3HnfUa9zf244fWgYr/xmEPL1TAk9CMt7m2UVw0f8b+3kwl7cD0C PA7SUpXN3lZphYurKsmi6FNvYwdXsFyshzpuWLOOOEudTaQQfMtUQ8wfK3jxGmA+SV36xq IAdyHJZHfjGFYCZymEg87Ba5gDgVYbT0mhkJHbGbV42HhkgC+NWrWPZhjyYyU85NyUkjYj 7E7oDkFDwlV2c8/QDf0s0aziyRZLKVOJiML+nrU1ZqO+pjIVC2TVxiusDMnZPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S11490Kjhzl1F; Wed, 4 Oct 2023 16:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs0QA037696; Wed, 4 Oct 2023 16:54:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs0QE037693; Wed, 4 Oct 2023 16:54:00 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:00 GMT Message-Id: <202310041654.394Gs0QE037693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 145ffd5db770 - main - bhyve: Remove some unneeded includes from snapshot.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 145ffd5db770669339fb73d242950f76d369de1b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=145ffd5db770669339fb73d242950f76d369de1b commit 145ffd5db770669339fb73d242950f76d369de1b Author: Mark Johnston AuthorDate: 2023-10-04 16:23:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Remove some unneeded includes from snapshot.c MFC after: 1 week Sponsored by: Innovate UK --- usr.sbin/bhyve/snapshot.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 2daef0ef74f0..86c76e679e53 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -44,8 +44,6 @@ #include #include -#include - #ifndef WITHOUT_CAPSICUM #include #endif @@ -79,19 +77,10 @@ #include "amd64/atkbdc.h" #endif #include "debug.h" -#include "inout.h" #include "ipc.h" -#include "ioapic.h" #include "mem.h" -#include "mevent.h" #include "pci_emul.h" -#include "pci_irq.h" -#include "pci_lpc.h" -#include "smbiostbl.h" #include "snapshot.h" -#include "xmsr.h" -#include "spinup_ap.h" -#include "rtc.h" #include #include From nobody Wed Oct 4 16:54:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114B4ZXFz4wGhY; Wed, 4 Oct 2023 16:54:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114B2QJCz3Ch9; Wed, 4 Oct 2023 16:54:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JmGeLN1JWdNURZKZXvzN7XdZN/YGrN8MlMyMoO29hck=; b=FJS/zteUXd9fNHQpBZLZfAoN8Qf/dj5tOl6W7n4tExeWKas+dQIatBMlDULrbGLydOIBuD q7+CtHDvv9Ye9NH6HRVz+wHLe5a/cY7hjsIhPJbAvQ5AAfBbMQRlxfpFnJmi8J8ViDe2xc EACBTpXgMhhzeo8iMNCyawRNm7D6jPeR5oodSlp5s0DPz0wy+7Ol2Xr8MjJZ73Cm6lX1Gk 6WtAjb0YRdn8SBkxfIDyNDlgVGzHfd41bV53z4AAmW2+VCCHhDuv3kfQ/5xB0e6rgTZNZy Rs6mkfux0reZLSTi0vUbqz/ti5rB+WJZFnoRGW9WsEZFjBSQbWICu+5wtcByig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438442; a=rsa-sha256; cv=none; b=Y9zyFZCxLQXxIfh9N3hgYQh+vxTpfBDtHRmgBUCP4LiqR1jsMPCYEbOVDMFhaR/RSG8lY4 3YA7lTyOGf46Je5nwfPZmVA6uU2g1q48r5FzmHVQSsVuYR6U1/1y0LoPbK5I2ll+0qRks2 mXfxeFbFtEYrV7Fq2+Or/jJjU2Ao/bH7vLfUMvXMYBHzd5mrSX4BQoMOTdl9CSL5Hbjgnh Ux5CdtDs3ITqIndKwAqXgtmUvRFqAunjNbIOWULOeexc2SY2jCWEeJ+kK0S+xMVk4kpbWw gywFaAJ+INghPtnZx4Ye12atbas9Aapw3lK50xsiKwHqgpTh8tWaVEtt3JYsaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JmGeLN1JWdNURZKZXvzN7XdZN/YGrN8MlMyMoO29hck=; b=aDGiAY4lGekdsBYElWBhwSnMKV95lwNv+muOyqKpEl53yDnKHXEylIxIUk6O9W+ZjCoLK4 Qe97k76KAfcdr0g0CWefJA9ezzqNfwuczh0DAgcdtHY52gdtRWpQksd/37RnWpPWLHWWwr IA58NaBiullnrZrYRsbFbsD8HiZkG159pWXEpppdqJAXo3Crh1kImWOzJncEw4LY7Fj9RX vGZnDfvHrXS+QOs0IQCHgJDA12ufm2fJlw2HHHFfo135DKkQ5XRyOUGMu7U9zH0OsMYN1v c5hote8DtIHQR+wFX/mA0anNIsStVZwlPKAa/P0J3Nu/qYRgdD9n+NtTOeGLXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114B1WWxzlm0; Wed, 4 Oct 2023 16:54:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs2Pr037748; Wed, 4 Oct 2023 16:54:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs23j037745; Wed, 4 Oct 2023 16:54:02 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:02 GMT Message-Id: <202310041654.394Gs23j037745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 548b11228f7a - main - bhyve: Move MSR emulation into amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 548b11228f7a83785dcf6c4c8b0bbfed0284d794 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=548b11228f7a83785dcf6c4c8b0bbfed0284d794 commit 548b11228f7a83785dcf6c4c8b0bbfed0284d794 Author: Mark Johnston AuthorDate: 2023-10-04 16:23:22 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move MSR emulation into amd64/ No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40733 --- usr.sbin/bhyve/Makefile | 3 +-- usr.sbin/bhyve/amd64/Makefile.inc | 3 ++- usr.sbin/bhyve/{ => amd64}/xmsr.c | 0 usr.sbin/bhyve/{ => amd64}/xmsr.h | 0 usr.sbin/bhyve/bhyverun.c | 6 +++++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 5f13d457d914..30ecf56ae748 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -76,8 +76,7 @@ SRCS= \ vga.c \ virtio.c \ vmexit.c \ - vmgenc.c \ - xmsr.c + vmgenc.c .if ${MK_BHYVE_SNAPSHOT} != "no" SRCS+= snapshot.c diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 6843cec4919f..d655708210ce 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -7,7 +7,8 @@ SRCS+= \ post.c \ ps2kbd.c \ ps2mouse.c \ - task_switch.c + task_switch.c \ + xmsr.c .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c diff --git a/usr.sbin/bhyve/xmsr.c b/usr.sbin/bhyve/amd64/xmsr.c similarity index 100% rename from usr.sbin/bhyve/xmsr.c rename to usr.sbin/bhyve/amd64/xmsr.c diff --git a/usr.sbin/bhyve/xmsr.h b/usr.sbin/bhyve/amd64/xmsr.h similarity index 100% rename from usr.sbin/bhyve/xmsr.h rename to usr.sbin/bhyve/amd64/xmsr.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 1cf7fc5bcc24..727a47892e41 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -106,7 +106,9 @@ #include "rtc.h" #include "vmgenc.h" #include "vmexit.h" -#include "xmsr.h" +#ifdef __amd64__ +#include "amd64/xmsr.h" +#endif #define MB (1024UL * 1024) #define GB (1024UL * MB) @@ -1015,11 +1017,13 @@ main(int argc, char *argv[]) exit(4); } +#ifdef __amd64__ error = init_msr(); if (error) { fprintf(stderr, "init_msr error %d", error); exit(4); } +#endif init_mem(guest_ncpus); init_inout(); From nobody Wed Oct 4 16:54:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114C4JCfz4wH2k; Wed, 4 Oct 2023 16:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114C39Cmz3CdH; Wed, 4 Oct 2023 16:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1n+zJlqyVtdzr0tHUmmM5KRvHYQkmaSeYR2y5MClDXg=; b=mJHfEZCc/zzoNl49Z9vLXto1RT+TcRjkhuXAZeER8KiNxgpuoeJeYSj7q7V2DVgMyFKMyg BO3hEGQSlzU7hP5RDZ4U5E03Jly6N5Oz6N10juFFzuOCUHkPsvB7it1AV0UPSGgYFq20Yk rvosNehp1E87wZboP84D/szAbfpACKWbsUWHdSySlnZX3qGIb8sgRFjTSHclR9Zt29j5Kp +r4vXXotg/jUzL9+nH4F08sEAPIi4iXHxef4ISFuZTKeLPt2/UDPuSH74f9mOet5eqfu5N MaBP+Sr4YKjaA+jxIVbJ+AwIQFOCKefOOGY/96cxZMOBjEEUBA0pWE4JpZVI2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438443; a=rsa-sha256; cv=none; b=uh/zuXV6NBBfu77y18xDlWxztECP1QLwFfSbjDh6Ox205QZ/Rl4CUZ/zQc/w+x/wRSwCgm 05WNFd4mQjLND/kiEckD0THt5rVFwYLuse1fhdUlv+gYXVwVYTrs51OH+pOhHg3LKvSmoI uxfAOeV9b6rqpVO5z98VgfawRbY9NZXwKa2j3y8ZzAgF75tr7FOj6sE6Uc38AEwA2er6tL 9ILxfVcnXnfAfzxVZkF7L/9hERRcP3LPCkNyUeaYdPrhdQ79McnurJ/YvXDtBWqENDtqQS UDdKd7K5v1UxM3T4pE3viG3ad/3/fxOoOIOlMChVtZQ4qA+WtN1NcEDn3jk0GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1n+zJlqyVtdzr0tHUmmM5KRvHYQkmaSeYR2y5MClDXg=; b=n99FG2TRmCv3cyQpl0/x71Pl0jDmJHFVo0ciGIgwkEpwHoO7fbI/y1c3SVvw4Pu4qWPmR/ JqV/1uGG+HBG4JTIFe1re+9kzAaOCRgnsamPY3OQKbzFetieJjLhHfMig4wDqKXFBBXLWF Ng2YpsTOhUJ6WBiGQUoNUBU40D/tec+crLAmS523lbY1/7vT4fT6Rw8c5bF5tjMoefilZ+ x+6DtDmIB3LcoDFlssKg3IkBzE4H9aqFhSZdFdxQEBb+w8Kl+6/ofCsR7RyxLT47LdnBip ypRrON3MB5TrfgqxxYYmEUqiynFtbdYxRdjUHMiEMVZrJKY9TlxgTZlWQXGY+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 4S114C2GMGzlRW; Wed, 4 Oct 2023 16:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs3oE037796; Wed, 4 Oct 2023 16:54:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs3EA037793; Wed, 4 Oct 2023 16:54:03 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:03 GMT Message-Id: <202310041654.394Gs3EA037793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a7f6c2ff732d - main - bhyve: Move the RTC driver to amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7f6c2ff732db1d0032066109ee0dd5af1a39b81 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a7f6c2ff732db1d0032066109ee0dd5af1a39b81 commit a7f6c2ff732db1d0032066109ee0dd5af1a39b81 Author: Mark Johnston AuthorDate: 2023-10-04 16:23:36 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move the RTC driver to amd64/ No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40734 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/{ => amd64}/rtc.c | 0 usr.sbin/bhyve/{ => amd64}/rtc.h | 0 usr.sbin/bhyve/bhyverun.c | 8 +++++++- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 30ecf56ae748..ef78b149c68c 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -62,7 +62,6 @@ SRCS= \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ - rtc.c \ smbiostbl.c \ sockstream.c \ spinup_ap.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index d655708210ce..a18b98a157ec 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -7,6 +7,7 @@ SRCS+= \ post.c \ ps2kbd.c \ ps2mouse.c \ + rtc.c \ task_switch.c \ xmsr.c diff --git a/usr.sbin/bhyve/rtc.c b/usr.sbin/bhyve/amd64/rtc.c similarity index 100% rename from usr.sbin/bhyve/rtc.c rename to usr.sbin/bhyve/amd64/rtc.c diff --git a/usr.sbin/bhyve/rtc.h b/usr.sbin/bhyve/amd64/rtc.h similarity index 100% rename from usr.sbin/bhyve/rtc.h rename to usr.sbin/bhyve/amd64/rtc.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 727a47892e41..7716ea119dd6 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -103,7 +103,9 @@ #include "snapshot.h" #endif #include "tpm_device.h" -#include "rtc.h" +#ifdef __amd64__ +#include "amd64/rtc.h" +#endif #include "vmgenc.h" #include "vmexit.h" #ifdef __amd64__ @@ -903,9 +905,11 @@ main(int argc, char *argv[]) case 'e': set_config_bool("x86.strictio", true); break; +#ifdef __amd64__ case 'u': set_config_bool("rtc.use_localtime", false); break; +#endif case 'U': set_config_value("uuid", optarg); break; @@ -1037,7 +1041,9 @@ main(int argc, char *argv[]) pci_irq_init(ctx); ioapic_init(ctx); +#ifdef __amd64__ rtc_init(ctx); +#endif sci_init(ctx); if (qemu_fwcfg_init(ctx) != 0) { From nobody Wed Oct 4 16:54:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114D5ZmDz4wH01; Wed, 4 Oct 2023 16:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114D4QdZz3CkF; Wed, 4 Oct 2023 16:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akLxv1hxKT+WjvYFB/eR57iPyEwAtm5p6jXmRvj0oms=; b=JQyzAp2lDS39Ya3TWzwcwMII3n3pSV/BrVGpWzaq879Rz1+HD4Z9EWOMDmR4dNyTnMV7dF ZqxMsZELRy/C40WkdZhHItVBumJH6ZywNm6wBHLcuexeAVfzmz/0ehmSrZPdMwaFDyXP7f VdUNXvxWfwYBYSwBmkrfYbGW1xm46ptYFaK540qz8xom8aDbl5kPVd0FpFshzMzlxzYfma NPkO6WcPQhxJGGu5uO3Q0vEPqIWBZ3Vh13Mdc9me6lb94l+AoDEQAOMs8wfri2qfMwZHeN MVjfIaMg3J5bG1LLoLMjfrfxp+qzx1lGcIw84Kd890AacQxkWb49KF3tKHojUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438444; a=rsa-sha256; cv=none; b=J5LSw/3geD7kEhG8Zp7RL0q9w0K85ebZn7RUnjVci0PhrzwMxrjiv4FQEa+tUjoOcSphgQ sPazNRk0XN3sDc25jVc0oQ5Bu2+k0Uaen1ToukmHZdqtzGenwfdZdaeHwpzUo8F3mxy44J f4QsiwHmBN48zN1LWYl1RO1GQdda6+oSaZ4WWSWAmiFMOsGk6GCfHB2KWNY3WC3J5ig73/ UJ938HBDDiFrPmXxCVe2WlCmbaDJLB6nqvJa+IVK+4ANSHg6qeqM4iHAMJKNLChmvqYlZf ySRJj/viwkR77eD2WaH3XZ0ejgNychFUZcuPnaiIBQ0NOnAtWT3J5OdlgzubHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akLxv1hxKT+WjvYFB/eR57iPyEwAtm5p6jXmRvj0oms=; b=Kj9MGIlBA4P5j0zRs9Z3SQJsHZuDIiDgTDLDx5Gy2ujqHe533U4rMPNadPUPNSAoCHiIVq xeiOiu/DAlpVa5bPOl7IiocmpGXkhAd4pORKQfq8JMWzAPhRMUm782I7udlO+fKTRbJptO XduCNRVwlksGbXOV07a1x+p0JCOFOsWAOLhUMmV7vUoIRTnTpoykfF1F5vU2FJE3KtopGe FDjaYELMEtNZYojgB/vk+xMidWY0G6EEn8s8GOtEJ0/bF/hANPaifikPTbHeryQmZLJAvP TYAKxsWTqYg/v+7cSGFisrrnzD9MrL/RIAYDVAGS4dxCdqYXv3phQbcDbQAuJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114D3Wcgzljj; Wed, 4 Oct 2023 16:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs451037845; Wed, 4 Oct 2023 16:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs4Sd037842; Wed, 4 Oct 2023 16:54:04 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:04 GMT Message-Id: <202310041654.394Gs4Sd037842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 75d1e855b0a2 - main - bhyve: Move power management code to amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75d1e855b0a2acfb60e5a3c81b018d8f73ebf450 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=75d1e855b0a2acfb60e5a3c81b018d8f73ebf450 commit 75d1e855b0a2acfb60e5a3c81b018d8f73ebf450 Author: Mark Johnston AuthorDate: 2023-10-04 16:23:50 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move power management code to amd64/ This implements various x86-specific interfaces. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40735 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/{ => amd64}/pm.c | 0 usr.sbin/bhyve/bhyverun.c | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index ef78b149c68c..7c14dbc4a524 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -58,7 +58,6 @@ SRCS= \ pci_virtio_scsi.c \ pci_xhci.c \ pctestdev.c \ - pm.c \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index a18b98a157ec..a176b0e5471f 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -4,6 +4,7 @@ SRCS+= \ fwctl.c \ kernemu_dev.c \ mptbl.c \ + pm.c \ post.c \ ps2kbd.c \ ps2mouse.c \ diff --git a/usr.sbin/bhyve/pm.c b/usr.sbin/bhyve/amd64/pm.c similarity index 100% rename from usr.sbin/bhyve/pm.c rename to usr.sbin/bhyve/amd64/pm.c diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 7716ea119dd6..c27cb427f1e2 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1043,8 +1043,8 @@ main(int argc, char *argv[]) #ifdef __amd64__ rtc_init(ctx); -#endif sci_init(ctx); +#endif if (qemu_fwcfg_init(ctx) != 0) { fprintf(stderr, "qemu fwcfg initialization error"); From nobody Wed Oct 4 16:54:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114F5mv0z4wGhh; Wed, 4 Oct 2023 16:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114F558Yz3D5g; Wed, 4 Oct 2023 16:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbNA8Q3znPyNQ4NIAYJj9O/tigpKs7jCinQhHMrg7bs=; b=hkq0dKntcC/SwzwEgz0gviujysQRY9eUBJsoiWu2HcFroppwgj2mlYBTxaZ/veDXa5/uR9 xgVgMcVwYW7Tnr1JCV7m2vmsJ6Dv3iTd0Sz12WyL/XNqC+KTF4xKMnOyMAT1Fs/zCf01gd 0InMf224lBlpUwmOGbvmOZb0lqpXwzd5rSfxPIsVKTdk45h/5S6jLDh39HsQQ29P7woXwj 7/RUPFqBPy3AtGv/t8WbkUiY3BxCx2CiG+pkbd2Kw1ALjl2BOjrwmzW/O97UNqw4sw/aQ8 KE74FK4TJTmrxzanHrgcILbU92qnz4cA2kG7A5Gjj+TkwKiYW6XnpBhzrnTIuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438445; a=rsa-sha256; cv=none; b=yFJr12wlVUmnNPdv9nPh/+fhHyct9qF+ISnZofGdh3bGpaUGajSkx7j67dqZ6FirTMdZdB iPG/QnjfUs4sJuMhpmIa7tCwDeJ1ZJF2XU4e9LgBKYphH9sJNCZEZA03O7EUVCEu0LUVJz S6anpc6ZUNH0oX3YCikfvoiNhboQ78Y9eyOfWtdab9fAL37oLhdChf0PlX1QNllmexcwuy MSlL1XGuzXb742MmmI4ADnx8SOTmWVLo131ELO6jIkmS8LmGFDtxxQvhnbDF537wS+jj2Z KsVebe6pE+YHL+2LalD6wS0y2rVmBZT6w0yJCyJEjzQyGcmME2Ub5h7CUGt3hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbNA8Q3znPyNQ4NIAYJj9O/tigpKs7jCinQhHMrg7bs=; b=LBeAT2jqdL8Yss8reFJvZZCUejzzsfUEei2KHFtr/TtoVsq73ZIjE919+4dH2UmRQU19RG Lre5b2MTB59dDmTSm3o5T8shtdEcyNoYLeI7USt4UV0yFkecLN8Q8G/hjHpDkCseTCXNDJ mfotPU23pfNeT6wLIrH8AhrWBwTEwSmICfdUoSBMOGbxlZo7mQ2O6rrKO3LuqFdmyutO9P v4QWazmMbJy6NLW13xPqxn0AZ8m2w3t9Cemh9iISAFlRQQKOth6WydnRe7VEHquhZiF7vv hf1lJfEnz1Zp876kjPIME+675hiigmmD2PfALFFqX7EY4pMqPjJSHbIsDjLPzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114F4BQNzm2y; Wed, 4 Oct 2023 16:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs5hX037895; Wed, 4 Oct 2023 16:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs5bU037892; Wed, 4 Oct 2023 16:54:05 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:05 GMT Message-Id: <202310041654.394Gs5bU037892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4ab7aea8ec2f - main - bhyve: Move the gvt-d driver to amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ab7aea8ec2f5fac0e6d140300c8f04db99d83df Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab7aea8ec2f5fac0e6d140300c8f04db99d83df commit 4ab7aea8ec2f5fac0e6d140300c8f04db99d83df Author: Mark Johnston AuthorDate: 2023-10-04 16:24:04 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move the gvt-d driver to amd64/ It is amd64-only. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40736 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/{ => amd64}/pci_gvt-d-opregion.h | 0 usr.sbin/bhyve/{ => amd64}/pci_gvt-d.c | 0 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 7c14dbc4a524..d510c32fccd0 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -41,7 +41,6 @@ SRCS= \ pci_e82545.c \ pci_emul.c \ pci_fbuf.c \ - pci_gvt-d.c \ pci_hda.c \ pci_hostbridge.c \ pci_irq.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index a176b0e5471f..5caecb35a620 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -4,6 +4,7 @@ SRCS+= \ fwctl.c \ kernemu_dev.c \ mptbl.c \ + pci_gvt-d.c \ pm.c \ post.c \ ps2kbd.c \ diff --git a/usr.sbin/bhyve/pci_gvt-d-opregion.h b/usr.sbin/bhyve/amd64/pci_gvt-d-opregion.h similarity index 100% rename from usr.sbin/bhyve/pci_gvt-d-opregion.h rename to usr.sbin/bhyve/amd64/pci_gvt-d-opregion.h diff --git a/usr.sbin/bhyve/pci_gvt-d.c b/usr.sbin/bhyve/amd64/pci_gvt-d.c similarity index 100% rename from usr.sbin/bhyve/pci_gvt-d.c rename to usr.sbin/bhyve/amd64/pci_gvt-d.c From nobody Wed Oct 4 16:54:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114H1YF8z4wGlM; Wed, 4 Oct 2023 16:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114G67TMz3D1h; Wed, 4 Oct 2023 16:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f3KmWW76Ddw/hcAWBRSra/OgpA7JTO9RZQueCZe4aMU=; b=mi5OuKyDbRQnwKue398/32zHk+SDdEUd8Md1e6AEcTYlDwVD1m66NLKW+XHkhjSH41BFsC 3N4+oI+2yDATj4gvQ5SKGppXUA6geiB35O4i2w1aVNCeQLyOAkqbA9f5ztZPx5XYG9nwH0 Gt8yyTvlVAFbo1mbNmw402iIKRaIzeVHY7B0FR2yctZX3XmrN1C5cz374by8DzBrQDBEsG jF0cp+b8XUCQQTh/hjRmAiTxHdp5ju6OJigcn5j83SvTZOgIytX45uWy3cJ6QXOfOoTzEc xkbojaPdwkNzmxk22kJ8Zjx4ZcG2DOLn26jk56CSPMbcxB9YIWqXD4ZGBDAdTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438446; a=rsa-sha256; cv=none; b=XXJkrwSnF7OF9pJIJx/Bmp7ATpapBbKgG1OZOdqmwLBD1XSVRA6Ij4+PEXLqLo1mmgmW+I jMRVr0Q67iC72cKCjtN/QYKQEHbYCLmlNVJU0k0LMCZgFoggcmioXnkMvOep3oDSN9or59 o1d+Dcjy6wlo7VZT2pBRzrPQZFQuLX45H5gTmM7fb3lNB1QpC4FJK7YC0Qh+tlQYnAQasa FCW/0PnxtgFqm3bIFDQHMSVrIMxRKgCS4ttJM0kyLQoLFiAyQJbewYwajZTBgp3bnZkMnu 0YXSAWUD9ct4XDAYqFPNwipw+YnKFYHAZD4CQB1JjEGXnwQBrsmGAXkeuFTafA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f3KmWW76Ddw/hcAWBRSra/OgpA7JTO9RZQueCZe4aMU=; b=vJ99MS8jjmCpXU3nAfGVz2eWJlUxMKj5lrhIUrCXQyinXgU+KR2ox1s9lc+vbyZLQijUg2 4tszHGTHmGEhpCTnowvySsIrwCA725iIKZh4eRQiGMq47ld2mKQJ38SHkuytPiQY+Ak/Ws RR3zo72TX+iSedKdiEFADhd4jo2jNDrRRN4Pr7zZtA53R+UPCHn8w4j0SJmWVSvFIsG08L okhCKl3nBduUkMOJDBaGHaEtk8cBtLu0gLFkTExph+buEqYs6g8q0of9ARXXqAVgypXxf7 6IzE4fLWGrO8EbOrmoaFTYpnLLdTUHGrUKCx9BQUvnQH7GV0tbjwFy+t6IjW6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114G5DL0zm0T; Wed, 4 Oct 2023 16:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs6wg037947; Wed, 4 Oct 2023 16:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs6v9037944; Wed, 4 Oct 2023 16:54:06 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:06 GMT Message-Id: <202310041654.394Gs6v9037944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c7c5d3e3888a - main - bhyve: Move AP startup code to amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7c5d3e3888aa9018297794285dcd884e6182bd5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7c5d3e3888aa9018297794285dcd884e6182bd5 commit c7c5d3e3888aa9018297794285dcd884e6182bd5 Author: Mark Johnston AuthorDate: 2023-10-04 16:24:19 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move AP startup code to amd64/ This code is only invoked via MD vmexit handlers. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40737 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/{ => amd64}/spinup_ap.c | 0 usr.sbin/bhyve/{ => amd64}/spinup_ap.h | 0 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index d510c32fccd0..f6db03a3358b 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -62,7 +62,6 @@ SRCS= \ rfb.c \ smbiostbl.c \ sockstream.c \ - spinup_ap.c \ tpm_device.c \ tpm_emul_passthru.c \ tpm_intf_crb.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 5caecb35a620..824f12861923 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -10,6 +10,7 @@ SRCS+= \ ps2kbd.c \ ps2mouse.c \ rtc.c \ + spinup_ap.c \ task_switch.c \ xmsr.c diff --git a/usr.sbin/bhyve/spinup_ap.c b/usr.sbin/bhyve/amd64/spinup_ap.c similarity index 100% rename from usr.sbin/bhyve/spinup_ap.c rename to usr.sbin/bhyve/amd64/spinup_ap.c diff --git a/usr.sbin/bhyve/spinup_ap.h b/usr.sbin/bhyve/amd64/spinup_ap.h similarity index 100% rename from usr.sbin/bhyve/spinup_ap.h rename to usr.sbin/bhyve/amd64/spinup_ap.h From nobody Wed Oct 4 16:54:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114J1db5z4wH9G; Wed, 4 Oct 2023 16:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114J08qQz3D6S; Wed, 4 Oct 2023 16:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eHaqTRmXknmJmeaWyM2fwBrhJOla/fLasrOnX74CYVA=; b=vDlKcqdqlTT0+HxjxwdufnpeDD+yFo70owsmVNarqYCg8lXnX/LX1nejYxu4rzXlaX7nQi wLcxQfjiIhSp7Jsl6znazoJmWuHrglEQH5QEL297VoVs7vGTUU/L8NUcEjBLjwpEVgUM1Z JDCk+zSnJPO/PJmJiBBTxx9xSqTYQDwDaz/5uVbmzvLIxqQdWdX7/1i5fxqkosazFzeT+W 2xxLChAVv0ZjKwmOz9O29wBbHVpDEpznNlF4pOz5yQVNRutW4iGgmDLvsWyBRqxFsEaw3M ziL6eoAdS1gEjqEsxd3EMrV12Om+Dh3j7s2bPun/rwdfIdqjxk6L2c+Jckee6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438448; a=rsa-sha256; cv=none; b=aPxzKagGujSKTv8GxcTqEfCTFd0iozbCqa+z+4OLX1FhNfTHm8Z5dTtRcJEi3KIagQ8JH6 +SLTN5AcQ2sH3jpxck7Ap27XpUolYkPCwXj8SwyFdQBelfZyQSGji6MraofcBX9KszeVe5 5XZ+OX2vkyFkFAd4JUwj23o6XEA43P84hChhV86DbQbmthdzCDeGHZJ28AMMX70DMtVRFL 5z10AuXgyUZDpNl/MejpXwohG4j5dBhPYyt+aHio2Sz8IbOe36VLtnnwZKNHQmL8P5k50k JWJC2uSKvZtGl8hWqOr1Kfpjas1bioYi+n2yCTMSbMM/cFsWWgOO9e3rkiZZ6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eHaqTRmXknmJmeaWyM2fwBrhJOla/fLasrOnX74CYVA=; b=fh552SJ5a8lX2+1Dh+9rZVJgChN2BVGJhPH7o9lyd3nFS7GNpK3VNlfuyglx8NzCUoQFxg Jo4IYx/4eVqNrwrtErc2D+gtNkqnJbE9Mm2wbfnVmMInSCewognsfP/L8ZKUmKGqmDy1Bv rQs272FN8s5ic5V8Aotzxm4EY+a7rZICIpt9h5Syt4yHoyfS3iGozBNlBHw0su9kUt5Bq+ 0v6kq6u6Oc9wrMQ8nwXjsPTK8HMNM6I1CbS13bBDFJELk4gjZKp1dzd/hiPR4eZF/a/fmf tt1q3ZyvdCuarEcy8qTj6SVRpsTAUYdu6iFQP/oOo1UdbJeor4g/f1SmP2RERw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114H6NK5zlRX; Wed, 4 Oct 2023 16:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs7rb037998; Wed, 4 Oct 2023 16:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs7kP037995; Wed, 4 Oct 2023 16:54:07 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:07 GMT Message-Id: <202310041654.394Gs7kP037995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 71cc76e8d78e - main - bhyve: Compile some device models only on amd64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71cc76e8d78eba4f6ff158c1d163af573a52580e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=71cc76e8d78eba4f6ff158c1d163af573a52580e commit 71cc76e8d78eba4f6ff158c1d163af573a52580e Author: Mark Johnston AuthorDate: 2023-10-04 16:24:57 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Compile some device models only on amd64 These models register legacy PCI interrupts, which won't be supported in the arm64 port. In principle it should be possible to make these models work on arm64 with a bit of effort, so don't move the sources to the amd64 subdirectory. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40738 --- usr.sbin/bhyve/Makefile | 6 ------ usr.sbin/bhyve/amd64/Makefile.inc | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index f6db03a3358b..0ec6ad73e2a2 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -37,17 +37,13 @@ SRCS= \ mevent.c \ net_backends.c \ net_utils.c \ - pci_ahci.c \ - pci_e82545.c \ pci_emul.c \ pci_fbuf.c \ - pci_hda.c \ pci_hostbridge.c \ pci_irq.c \ pci_lpc.c \ pci_nvme.c \ pci_passthru.c \ - pci_uart.c \ pci_virtio_9p.c \ pci_virtio_block.c \ pci_virtio_console.c \ @@ -55,8 +51,6 @@ SRCS= \ pci_virtio_net.c \ pci_virtio_rnd.c \ pci_virtio_scsi.c \ - pci_xhci.c \ - pctestdev.c \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 824f12861923..862aeddb16e0 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -4,7 +4,13 @@ SRCS+= \ fwctl.c \ kernemu_dev.c \ mptbl.c \ + pci_ahci.c \ + pci_e82545.c \ pci_gvt-d.c \ + pci_hda.c \ + pci_uart.c \ + pci_xhci.c \ + pctestdev.c \ pm.c \ post.c \ ps2kbd.c \ From nobody Wed Oct 4 16:54:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114K1ygkz4wH5Y; Wed, 4 Oct 2023 16:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114K1Smbz3DFg; Wed, 4 Oct 2023 16:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6LQnzwNui0Qan6v23YdzsUmbKLjD3LQ3l7StMEMZjo=; b=X5779RTaZrIao2+P2fQKzA6xPydHYCpGLGuEN9Bpa3VbkiqTSFe5sbCw1tGPU6nsHSJiux Ov087uNEhz7dM91W34QyP0QroxdVXGVjFxbHlyySbTT7AAP1jSaqHAix4DZy2khab+8h52 Dfyz0IFtmXWheouf+zxAndWCnfO9rvzlydgx0qBpVWYayvwEVpEYAzc1B0L/ky7PeM3T0A 06XqSY/v0+pzXA8vjY1OARZmyPCsO9qyqpypLCFPCt7vFC/p7j05LY1Cl6+4AtpSc6Ps1x qGX9bqleRxHPQMpXTfYcyU+1kx0Kmo7CzKVZozSYgE3Ev7zv0Pr9lWBFA0Ok2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438449; a=rsa-sha256; cv=none; b=RWHSXZLbSPQwLrym+dNjNjPElWDtDF9p7S/s51mVsdoprcDLW4R4rBi0dEtbzSZkoJHdQz 4CqEIYGBhMOKb0s7LFuajLjdrvQ/gdClr1BadNstevZt6nlkntYzUwisaSj105cZEn/9Oj 9mrw5E6WeUvPrgfSslPYTfEV0Jv4mGIpOpPb4y4qPjURwvo7CkjYX0OjB5+dgLkcRlMSAc /9tz2HNNZx3ddwJ3C8Ut19y0L2p335xxOpgZ6QyuyuP2CXGrFVtjHY56TUlFXdqQQP/jyp 8aVvzjQwqBIlUFqZM7YZioNdolBbmAmfA4jwpbkYUsBnHd45/JVjCrgW9x/MKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j6LQnzwNui0Qan6v23YdzsUmbKLjD3LQ3l7StMEMZjo=; b=OTY/Ku4kTCnl9Ja6naKmL6NZLhRGKArpcISut+X7MHCli27xiO0k6iy2iMF49rhI71TyuU oHL+xf8NvqvZqol6Wz6IGq3tEAI4Lp1At56guvK6dIqSE5vDz8RZ95Rsb5+q2AcFNk8C+J zdMnw4PfxknWeTbbNczvYv0gOsYz1FgDV97RqH1OyUgpWBBhGNO4oUfHoIqeynm9HsgMCE AF6ps953PegqsiKK7XOWagmQy7MTc0qWtCzChHnW3rjN4Z6X6PuFpCp1fyYr5xExZI/ThI p47xe2IerTH4sh65OUoLIlK5ItC/RMiN+z2oi0nW59scc5jZEaQvq1XUqXNzKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114K0G41zlWr; Wed, 4 Oct 2023 16:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394Gs8Hl038052; Wed, 4 Oct 2023 16:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394Gs8wh038049; Wed, 4 Oct 2023 16:54:08 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:08 GMT Message-Id: <202310041654.394Gs8wh038049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 55c13f6e7a41 - main - bhyve: Move legacy PCI interrupt handling under amd64/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55c13f6e7a412cc4bd0ea3fc183cd7c5c2348f01 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55c13f6e7a412cc4bd0ea3fc183cd7c5c2348f01 commit 55c13f6e7a412cc4bd0ea3fc183cd7c5c2348f01 Author: Mark Johnston AuthorDate: 2023-10-04 16:25:19 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move legacy PCI interrupt handling under amd64/ Specifically, move IO-APIC, LPC and PIRQ routing code under amd64/. Use ifdefs to conditionally compile related code in other files. In particular, legacy PCI interrupt handling is now compiled only on amd64. This is not too invasive, but suggestions for a more modular approach would be appreciated. I am not sure why qemu fwcfg handling is tied to LPC, and I suspect it should be decoupled. In this commit I just apply an ifdef hammer, but we will eventually want fwcfg on arm64 as well. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40739 --- usr.sbin/bhyve/Makefile | 3 --- usr.sbin/bhyve/amd64/Makefile.inc | 3 +++ usr.sbin/bhyve/{ => amd64}/ioapic.c | 0 usr.sbin/bhyve/{ => amd64}/ioapic.h | 0 usr.sbin/bhyve/{ => amd64}/pci_irq.c | 0 usr.sbin/bhyve/{ => amd64}/pci_irq.h | 0 usr.sbin/bhyve/{ => amd64}/pci_lpc.c | 0 usr.sbin/bhyve/{ => amd64}/pci_lpc.h | 0 usr.sbin/bhyve/bhyverun.c | 16 ++++++++++++---- usr.sbin/bhyve/pci_emul.c | 36 +++++++++++++++++++++++++++++------- usr.sbin/bhyve/pci_emul.h | 27 +++++++++++++++------------ usr.sbin/bhyve/qemu_fwcfg.c | 18 ++++++++++++++++-- usr.sbin/bhyve/virtio.h | 2 ++ 13 files changed, 77 insertions(+), 28 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 0ec6ad73e2a2..5aaf0d4ea2a0 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -31,7 +31,6 @@ SRCS= \ gdb.c \ hda_codec.c \ inout.c \ - ioapic.c \ iov.c \ mem.c \ mevent.c \ @@ -40,8 +39,6 @@ SRCS= \ pci_emul.c \ pci_fbuf.c \ pci_hostbridge.c \ - pci_irq.c \ - pci_lpc.c \ pci_nvme.c \ pci_passthru.c \ pci_virtio_9p.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 862aeddb16e0..76813891b0a0 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -2,12 +2,15 @@ SRCS+= \ atkbdc.c \ e820.c \ fwctl.c \ + ioapic.c \ kernemu_dev.c \ mptbl.c \ pci_ahci.c \ pci_e82545.c \ pci_gvt-d.c \ pci_hda.c \ + pci_irq.c \ + pci_lpc.c \ pci_uart.c \ pci_xhci.c \ pctestdev.c \ diff --git a/usr.sbin/bhyve/ioapic.c b/usr.sbin/bhyve/amd64/ioapic.c similarity index 100% rename from usr.sbin/bhyve/ioapic.c rename to usr.sbin/bhyve/amd64/ioapic.c diff --git a/usr.sbin/bhyve/ioapic.h b/usr.sbin/bhyve/amd64/ioapic.h similarity index 100% rename from usr.sbin/bhyve/ioapic.h rename to usr.sbin/bhyve/amd64/ioapic.h diff --git a/usr.sbin/bhyve/pci_irq.c b/usr.sbin/bhyve/amd64/pci_irq.c similarity index 100% rename from usr.sbin/bhyve/pci_irq.c rename to usr.sbin/bhyve/amd64/pci_irq.c diff --git a/usr.sbin/bhyve/pci_irq.h b/usr.sbin/bhyve/amd64/pci_irq.h similarity index 100% rename from usr.sbin/bhyve/pci_irq.h rename to usr.sbin/bhyve/amd64/pci_irq.h diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/amd64/pci_lpc.c similarity index 100% rename from usr.sbin/bhyve/pci_lpc.c rename to usr.sbin/bhyve/amd64/pci_lpc.c diff --git a/usr.sbin/bhyve/pci_lpc.h b/usr.sbin/bhyve/amd64/pci_lpc.h similarity index 100% rename from usr.sbin/bhyve/pci_lpc.h rename to usr.sbin/bhyve/amd64/pci_lpc.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index c27cb427f1e2..ba63a6405538 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -85,8 +85,8 @@ #include "amd64/fwctl.h" #endif #include "gdb.h" -#include "ioapic.h" #ifdef __amd64__ +#include "amd64/ioapic.h" #include "amd64/kernemu_dev.h" #endif #include "mem.h" @@ -95,8 +95,10 @@ #include "amd64/mptbl.h" #endif #include "pci_emul.h" -#include "pci_irq.h" -#include "pci_lpc.h" +#ifdef __amd64__ +#include "amd64/pci_irq.h" +#include "amd64/pci_lpc.h" +#endif #include "qemu_fwcfg.h" #include "smbiostbl.h" #ifdef BHYVE_SNAPSHOT @@ -634,8 +636,10 @@ do_open(const char *vmname) reinit = romboot = false; +#ifdef __amd64__ if (lpc_bootrom()) romboot = true; +#endif error = vm_create(vmname); if (error) { @@ -855,6 +859,7 @@ main(int argc, char *argv[]) case 'K': set_config_value("keyboard.layout", optarg); break; +#ifdef __amd64__ case 'l': if (strncmp(optarg, "help", strlen(optarg)) == 0) { lpc_print_supported_devices(); @@ -864,6 +869,7 @@ main(int argc, char *argv[]) "configuration '%s'", optarg); } break; +#endif #ifdef BHYVE_SNAPSHOT case 'r': restore_file = optarg; @@ -1037,9 +1043,9 @@ main(int argc, char *argv[]) init_bootrom(ctx); #ifdef __amd64__ atkbdc_init(ctx); -#endif pci_irq_init(ctx); ioapic_init(ctx); +#endif #ifdef __amd64__ rtc_init(ctx); @@ -1085,6 +1091,7 @@ main(int argc, char *argv[]) init_gdb(ctx); +#ifdef __amd64__ if (lpc_bootrom()) { if (vm_set_capability(bsp, VM_CAP_UNRESTRICTED_GUEST, 1)) { fprintf(stderr, "ROM boot failed: unrestricted guest " @@ -1094,6 +1101,7 @@ main(int argc, char *argv[]) error = vcpu_reset(bsp); assert(error == 0); } +#endif /* * Add all vCPUs. diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 5fb25dbfe9c7..6b2e46ce917d 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -52,11 +52,15 @@ #include "config.h" #include "debug.h" #include "inout.h" -#include "ioapic.h" +#ifdef __amd64__ +#include "amd64/ioapic.h" +#endif #include "mem.h" #include "pci_emul.h" -#include "pci_irq.h" -#include "pci_lpc.h" +#ifdef __amd64__ +#include "amd64/pci_irq.h" +#include "amd64/pci_lpc.h" +#endif #include "pci_passthru.h" #include "qemu_fwcfg.h" @@ -143,9 +147,12 @@ SYSRES_MEM(PCI_EMUL_ECFG_BASE, PCI_EMUL_ECFG_SIZE); #define PCI_EMUL_MEMLIMIT32 PCI_EMUL_ECFG_BASE #define PCI_EMUL_MEMSIZE64 (32*GB) -static struct pci_devemu *pci_emul_finddev(const char *name); +#ifdef __amd64__ static void pci_lintr_route(struct pci_devinst *pi); static void pci_lintr_update(struct pci_devinst *pi); +#endif + +static struct pci_devemu *pci_emul_finddev(const char *name); static void pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, uint32_t *val); @@ -1061,11 +1068,13 @@ pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int bus, int slot, pdi->pi_bus = bus; pdi->pi_slot = slot; pdi->pi_func = func; +#ifdef __amd64__ pthread_mutex_init(&pdi->pi_lintr.lock, NULL); pdi->pi_lintr.pin = 0; pdi->pi_lintr.state = IDLE; pdi->pi_lintr.pirq_pin = 0; pdi->pi_lintr.ioapic_irq = 0; +#endif pdi->pi_d = pde; snprintf(pdi->pi_name, PI_NAMESZ, "%s@pci.%d.%d.%d", pde->pe_emu, bus, slot, func); @@ -1203,7 +1212,9 @@ msixcap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, pi->pi_msix.enabled = val & PCIM_MSIXCTRL_MSIX_ENABLE; pi->pi_msix.function_mask = val & PCIM_MSIXCTRL_FUNCTION_MASK; +#ifdef __amd64__ pci_lintr_update(pi); +#endif } CFGWRITE(pi, offset, val, bytes); @@ -1245,7 +1256,9 @@ msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, } else { pi->pi_msi.maxmsgnum = 0; } +#ifdef __amd64__ pci_lintr_update(pi); +#endif } static void @@ -1538,6 +1551,7 @@ init_pci(struct vmctx *ctx) bi->memlimit64 = pci_emul_membase64; } +#ifdef __amd64__ /* * PCI backends are initialized before routing INTx interrupts * so that LPC devices are able to reserve ISA IRQs before @@ -1558,6 +1572,7 @@ init_pci(struct vmctx *ctx) } } lpc_pirq_routed(); +#endif if ((error = init_bootorder()) != 0) { warnx("%s: Unable to init bootorder", __func__); @@ -1601,6 +1616,7 @@ init_pci(struct vmctx *ctx) return (0); } +#ifdef __amd64__ static void pci_apic_prt_entry(int bus __unused, int slot, int pin, int pirq_pin __unused, int ioapic_irq, void *arg __unused) @@ -1633,6 +1649,7 @@ pci_pirq_prt_entry(int bus __unused, int slot, int pin, int pirq_pin, dsdt_line(" },"); free(name); } +#endif /* * A bhyve virtual machine has a flat PCI hierarchy with a root port @@ -1644,7 +1661,7 @@ pci_bus_write_dsdt(int bus) struct businfo *bi; struct slotinfo *si; struct pci_devinst *pi; - int count, func, slot; + int func, slot; /* * If there are no devices on this 'bus' then just return. @@ -1747,8 +1764,8 @@ pci_bus_write_dsdt(int bus) dsdt_line(" ,, , AddressRangeMemory, TypeStatic)"); dsdt_line(" })"); - count = pci_count_lintr(bus); - if (count != 0) { +#ifdef __amd64__ + if (pci_count_lintr(bus) != 0) { dsdt_indent(2); dsdt_line("Name (PPRT, Package ()"); dsdt_line("{"); @@ -1771,6 +1788,7 @@ pci_bus_write_dsdt(int bus) dsdt_line("}"); dsdt_unindent(2); } +#endif dsdt_indent(2); for (slot = 0; slot < MAXSLOTS; slot++) { @@ -1866,6 +1884,7 @@ pci_generate_msi(struct pci_devinst *pi, int index) } } +#ifdef __amd64__ static bool pci_lintr_permitted(struct pci_devinst *pi) { @@ -2026,6 +2045,7 @@ pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg) } } } +#endif /* __amd64__ */ /* * Return 1 if the emulated device in 'slot' is a multi-function device. @@ -2130,11 +2150,13 @@ pci_emul_cmd_changed(struct pci_devinst *pi, uint16_t old) } } +#ifdef __amd64__ /* * If INTx has been unmasked and is pending, assert the * interrupt. */ pci_lintr_update(pi); +#endif } static void diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index 0fd438151093..c367169113f8 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -115,12 +115,6 @@ struct msix_table_entry { #define MAX_MSIX_TABLE_ENTRIES 2048 #define PBA_SIZE(msgnum) (roundup2((msgnum), 64) / 8) -enum lintr_stat { - IDLE, - ASSERTED, - PENDING -}; - struct pci_devinst { struct pci_devemu *pi_d; struct vmctx *pi_vmctx; @@ -130,13 +124,19 @@ struct pci_devinst { int pi_prevcap; int pi_capend; +#ifdef __amd64__ struct { int8_t pin; - enum lintr_stat state; + enum { + IDLE, + ASSERTED, + PENDING, + } state; int pirq_pin; int ioapic_irq; pthread_mutex_t lock; } pi_lintr; +#endif struct { int enabled; @@ -221,8 +221,15 @@ struct pciecap { } __packed; static_assert(sizeof(struct pciecap) == 60, "compile-time assertion failed"); +#ifdef __amd64__ typedef void (*pci_lintr_cb)(int b, int s, int pin, int pirq_pin, int ioapic_irq, void *arg); +void pci_lintr_assert(struct pci_devinst *pi); +void pci_lintr_deassert(struct pci_devinst *pi); +void pci_lintr_request(struct pci_devinst *pi); +int pci_count_lintr(int bus); +void pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg); +#endif int init_pci(struct vmctx *ctx); void pci_callback(void); @@ -241,9 +248,6 @@ void pci_emul_capwrite(struct pci_devinst *pi, int offset, int bytes, void pci_emul_cmd_changed(struct pci_devinst *pi, uint16_t old); void pci_generate_msi(struct pci_devinst *pi, int msgnum); void pci_generate_msix(struct pci_devinst *pi, int msgnum); -void pci_lintr_assert(struct pci_devinst *pi); -void pci_lintr_deassert(struct pci_devinst *pi); -void pci_lintr_request(struct pci_devinst *pi); int pci_msi_enabled(struct pci_devinst *pi); int pci_msix_enabled(struct pci_devinst *pi); int pci_msix_table_bar(struct pci_devinst *pi); @@ -257,11 +261,10 @@ int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum); int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size, uint64_t value); uint64_t pci_emul_msix_tread(struct pci_devinst *pi, uint64_t offset, int size); -int pci_count_lintr(int bus); -void pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg); void pci_write_dsdt(void); uint64_t pci_ecfg_base(void); int pci_bus_configured(int bus); + #ifdef BHYVE_SNAPSHOT struct pci_devinst *pci_next(const struct pci_devinst *cursor); int pci_snapshot(struct vm_snapshot_meta *meta); diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index e845c70950b1..73a401ad8a81 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -23,7 +23,9 @@ #include "acpi_device.h" #include "bhyverun.h" #include "inout.h" -#include "pci_lpc.h" +#ifdef __amd64__ +#include "amd64/pci_lpc.h" +#endif #include "qemu_fwcfg.h" #define QEMU_FWCFG_ACPI_DEVICE_NAME "FWCF" @@ -423,6 +425,18 @@ int qemu_fwcfg_init(struct vmctx *const ctx) { int error; + bool fwcfg_enabled; + + /* + * The fwcfg implementation currently only provides an I/O port + * interface and thus is amd64-specific for now. An MMIO interface is + * required for other platforms. + */ +#ifdef __amd64__ + fwcfg_enabled = strcmp(lpc_fwcfg(), "qemu") == 0; +#else + fwcfg_enabled = false; +#endif /* * Bhyve supports fwctl (bhyve) and fwcfg (qemu) as firmware interfaces. @@ -430,7 +444,7 @@ qemu_fwcfg_init(struct vmctx *const ctx) * interfaces at the same time to the guest. Therefore, only create acpi * tables and register io ports for fwcfg, if it's used. */ - if (strcmp(lpc_fwcfg(), "qemu") == 0) { + if (fwcfg_enabled) { error = acpi_device_create(&fwcfg_sc.acpi_dev, &fwcfg_sc, ctx, &qemu_fwcfg_acpi_device_emul); if (error) { diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index 2b72b862ab21..4c6c8004b2d1 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -358,7 +358,9 @@ vi_interrupt(struct virtio_softc *vs, uint8_t isr, uint16_t msix_idx) VS_LOCK(vs); vs->vs_isr |= isr; pci_generate_msi(vs->vs_pi, 0); +#ifdef __amd64__ pci_lintr_assert(vs->vs_pi); +#endif VS_UNLOCK(vs); } } From nobody Wed Oct 4 16:54:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114L3bdrz4wH9V; Wed, 4 Oct 2023 16:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114L2X0nz3D77; Wed, 4 Oct 2023 16:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hsy3HWVFd9JyiuQVZIQ4XTsJt0JtjF0jv9Eltsa2j2Q=; b=qKQty9O2cYdtTVYsNuhYookeYA6oLng6dm1oiMzYGU48aSp8FnnEvSogUzpXukZs+2Mrsc A+QGvEyYFDaRaPVRcNudtUOKFCEfpvSkAbrc7obnujUIphIkB3S4aRFQ/Ag8LeqEX8ce4W Vv7V0PyU7c6+e99pIBhtxqtslKevYs3HKGAb9kNIPARQ63RxcH3wFtCqOTrxWa0IqYG981 2LFJzWawPRnI639iJl0WJbnyekjAieM1JNlXn70VLFvBK+yEhbEV2x4DFGYfWDT09irCwo isiLhj448aZtBMlPVIgINzWdttE4NcA/ZlLQ4OHChp1506qUNyZzJCbgznFrgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438450; a=rsa-sha256; cv=none; b=myEIVgT56v/cablrCMp0tShKisVz+ZCtUkmF4lj2AVUG7EuDV0WfIfBR9BnZFLtxWPXI14 sQrjj2GyfjBTwk3b1LHfCTeJnq2YaLMhYocjNkHOdYOil7TwpmBiTiMKDIyou9n3mIfT5a yeFvTVBEmoE33DqrTgZTD0VEiBNdyAVfca7m4yvC60IAC11FF4DBqUeitb+iM2lR77Q9P8 t9n2lVHLjdNHdHsR6vhDPTI4Dp73mbFAfwpPqoZcLF9rRYpJaQhl1RKBQaF4nay/MWRO/X DKfddlx73QUg1mJxVjeE5nsdUOQgcEqYpdAvnwfAQ4Osjepp0AlPB1mTIYvhGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hsy3HWVFd9JyiuQVZIQ4XTsJt0JtjF0jv9Eltsa2j2Q=; b=JdrO84HT7EDiD9pMfgvoLP78HUUCA/XYXvSMKvceJ7ewppivAx11m7z+cJxmAjfmwMEwY5 p/zm/dy4dhmuE1SpSzD3qgXTC8mmgJBvTGzqZYmUkBYGwreAF/4TkeqnkwDt72oiuQSt21 J0C6lLPK9qCA10gSM1E3fnr5bMFAcD2QNK0QIVB4twER0zjaPM8b82rB0Kn4FkhSW753dt ZAz9dz85ZZ/wAs/dz2sfAgdTZkVimLA2D+B58fEBaFwdKga0pb0a/mnyauOmwIoaNBQFi4 PvZ0Nb+y8gOc9igEOTHqlzmq+3/kEspENGWfAJt+NJx7zXn9tOrgDrm5Pep+NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114L1SkWzlm1; Wed, 4 Oct 2023 16:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsASU038094; Wed, 4 Oct 2023 16:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsAf2038091; Wed, 4 Oct 2023 16:54:10 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:10 GMT Message-Id: <202310041654.394GsAf2038091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 61429b49d2bd - main - bhyve: Conditionally compile framebuffer-related code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61429b49d2bd4fdad37e0873b2fc085eacbd26b2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=61429b49d2bd4fdad37e0873b2fc085eacbd26b2 commit 61429b49d2bd4fdad37e0873b2fc085eacbd26b2 Author: Mark Johnston AuthorDate: 2023-10-04 16:25:47 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Conditionally compile framebuffer-related code The arm64 port does not implement VGA, so move the device model sources. Compile framebuffer code only on amd64 for now, but do not move the sources, as we ought to be able to add support later. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40740 --- usr.sbin/bhyve/Makefile | 3 --- usr.sbin/bhyve/amd64/Makefile.inc | 3 +++ usr.sbin/bhyve/{ => amd64}/vga.c | 0 usr.sbin/bhyve/{ => amd64}/vga.h | 0 usr.sbin/bhyve/pci_fbuf.c | 5 +++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 5aaf0d4ea2a0..1bb3c9a1b053 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -37,7 +37,6 @@ SRCS= \ net_backends.c \ net_utils.c \ pci_emul.c \ - pci_fbuf.c \ pci_hostbridge.c \ pci_nvme.c \ pci_passthru.c \ @@ -50,7 +49,6 @@ SRCS= \ pci_virtio_scsi.c \ qemu_fwcfg.c \ qemu_loader.c \ - rfb.c \ smbiostbl.c \ sockstream.c \ tpm_device.c \ @@ -60,7 +58,6 @@ SRCS= \ uart_emul.c \ usb_emul.c \ usb_mouse.c \ - vga.c \ virtio.c \ vmexit.c \ vmgenc.c diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 76813891b0a0..435327155fc3 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -7,6 +7,7 @@ SRCS+= \ mptbl.c \ pci_ahci.c \ pci_e82545.c \ + pci_fbuf.c \ pci_gvt-d.c \ pci_hda.c \ pci_irq.c \ @@ -18,9 +19,11 @@ SRCS+= \ post.c \ ps2kbd.c \ ps2mouse.c \ + rfb.c \ rtc.c \ spinup_ap.c \ task_switch.c \ + vga.c \ xmsr.c .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/amd64/vga.c similarity index 100% rename from usr.sbin/bhyve/vga.c rename to usr.sbin/bhyve/amd64/vga.c diff --git a/usr.sbin/bhyve/vga.h b/usr.sbin/bhyve/amd64/vga.h similarity index 100% rename from usr.sbin/bhyve/vga.h rename to usr.sbin/bhyve/amd64/vga.h diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index 3d63707affa8..a6bf508a46e6 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -46,10 +46,11 @@ #include "config.h" #include "debug.h" #include "console.h" -#include "inout.h" #include "pci_emul.h" #include "rfb.h" -#include "vga.h" +#ifdef __amd64__ +#include "amd64/vga.h" +#endif /* * bhyve Framebuffer device emulation. From nobody Wed Oct 4 16:54:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114M3YtNz4wHCd; Wed, 4 Oct 2023 16:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114M34LFz3DGn; Wed, 4 Oct 2023 16:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ky23CSPDoOUkvDXTAKI/uDp3uUwjr7gBATXWx5q9jxs=; b=Sl7Gi6Vj2j/0Xn9beC/79xODX7dOgSFhkfNXL+51F6z8+17VnmoDs+jSkxFaThLUkLDlvk 089ZwvYS35Qml3nyuBSStu7IclU/hl1CXIO0/UC0j6k9X34+45Rs98jmRACysoPYz1DZsV irKQQ2pwC5ppgirm/BsE/9sOH5FXaAE+hDZ1E2VFyVVo0NyiJc+6/NwWnpemhZ8AhXj31V X6RK90DNZ48mwg2dnkv61oWjePEcCaGB+fi2qrMIdKs8D+WB4AHgTW+ExTweUkQQDyhEnA MPH2u4hLnpAnJ8lgkwTRx6ZRgqNej2/ZSFCwgM55QRN2/NOIY/Qta4eFE9f/3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438451; a=rsa-sha256; cv=none; b=dZNe3jGvV2UxtTR3RnGiOpusJ941Sih4mcMtOaS/JoQAeroXaG7rYrbg8l8jvIfGg8hO3g dt/XLPn+Her71NzZtGvxodnMCvtt9drcW7FVuBbAnfDd6S1jK7sltUvug/1M0km+5xR4CK gn7l+Myc0gvJLhazAat2a647yleyCQiUu/a1CwZDf7fL5tEJt4VU4/8SEqLow23bAWJY52 s+ncLUUbu4hqsK/F+s1tN8K/Pcmaq9+SpNozCifczUvAhA8P84oVY8QwBRbYuv+2F6ch5y eI0Dbheei5tq01FHy60W2MRveiYhGFzDGYz4omOFt9nisr5HasT091LYDgZVgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ky23CSPDoOUkvDXTAKI/uDp3uUwjr7gBATXWx5q9jxs=; b=Fr1fv00A0td/2zk8bZHA0VUQBmmY0D5kiQHZQI2NsGOTaYRHDgx4L8WkmG7SNPJCUt3FRC alQvvktwvZH8V2cbNR4mDYhfG/XxYIYxs3NLp0cY0Zrf3IG09PResoynvOVnnqECvDnMsZ djE8TBpxoioOBAttj82K4f1o+bFVOB5zrCR6tdPjnsmLOGeN836mD2UQwAZ/6ruxlo1OI1 h5Bt7jex8p4d0QnXDyQsCRCjBiLNi75Jx/8038572ks3j63aXFuMHb4RrFcq76y9z3zerp AUgvdhC/LTusZfonMASUTEbfHwKbNsQLO7yIXCa9kwZWMS7qwU2XfUNidS25Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114M27bQzlxF; Wed, 4 Oct 2023 16:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsBZ2038151; Wed, 4 Oct 2023 16:54:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsBQK038148; Wed, 4 Oct 2023 16:54:11 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:11 GMT Message-Id: <202310041654.394GsBQK038148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 31cf78c9217b - main - bhyve: Make most I/O port handling specific to amd64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31cf78c9217b8298816115474973f4f0568962cf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=31cf78c9217b8298816115474973f4f0568962cf commit 31cf78c9217b8298816115474973f4f0568962cf Author: Mark Johnston AuthorDate: 2023-10-04 16:26:08 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Make most I/O port handling specific to amd64 - The qemu_fwcfg interface, as implemented, is I/O port-based, but QEMU implements an MMIO interface that we'll eventually want to port for arm64. - Retain support for I/O space PCI BARs, simply treat them like MMIO BARs for most purposes, similar to what the arm64 kernel does. Such BARs are created by virtio devices. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40741 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/{ => amd64}/inout.c | 0 usr.sbin/bhyve/{ => amd64}/inout.h | 0 usr.sbin/bhyve/bhyverun.c | 6 ++-- usr.sbin/bhyve/pci_emul.c | 63 +++++++++++++++++++++++++++++++++++--- usr.sbin/bhyve/pctestdev.c | 4 ++- usr.sbin/bhyve/qemu_fwcfg.c | 9 ++++-- 8 files changed, 73 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 1bb3c9a1b053..7c0750fae7d7 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -30,7 +30,6 @@ SRCS= \ ctl_util.c \ gdb.c \ hda_codec.c \ - inout.c \ iov.c \ mem.c \ mevent.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 435327155fc3..96aaecafae4c 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -2,6 +2,7 @@ SRCS+= \ atkbdc.c \ e820.c \ fwctl.c \ + inout.c \ ioapic.c \ kernemu_dev.c \ mptbl.c \ diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/amd64/inout.c similarity index 100% rename from usr.sbin/bhyve/inout.c rename to usr.sbin/bhyve/amd64/inout.c diff --git a/usr.sbin/bhyve/inout.h b/usr.sbin/bhyve/amd64/inout.h similarity index 100% rename from usr.sbin/bhyve/inout.h rename to usr.sbin/bhyve/amd64/inout.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index ba63a6405538..0c8eba3e4a6b 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -78,7 +78,9 @@ #endif #include "bootrom.h" #include "config.h" -#include "inout.h" +#ifdef __amd64__ +#include "amd64/inout.h" +#endif #include "debug.h" #ifdef __amd64__ #include "amd64/e820.h" @@ -1036,8 +1038,8 @@ main(int argc, char *argv[]) #endif init_mem(guest_ncpus); - init_inout(); #ifdef __amd64__ + init_inout(); kernemu_dev_init(); #endif init_bootrom(ctx); diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 6b2e46ce917d..e91b4d0a1e20 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -51,8 +51,8 @@ #include "bhyverun.h" #include "config.h" #include "debug.h" -#include "inout.h" #ifdef __amd64__ +#include "amd64/inout.h" #include "amd64/ioapic.h" #endif #include "mem.h" @@ -502,6 +502,7 @@ pci_msix_pba_bar(struct pci_devinst *pi) return (-1); } +#ifdef __amd64__ static int pci_emul_io_handler(struct vmctx *ctx __unused, int in, int port, int bytes, uint32_t *eax, void *arg) @@ -530,6 +531,31 @@ pci_emul_io_handler(struct vmctx *ctx __unused, int in, int port, } return (-1); } +#else +static int +pci_emul_iomem_handler(struct vcpu *vcpu __unused, int dir, + uint64_t addr, int size, uint64_t *val, void *arg1, long arg2) +{ + struct pci_devinst *pdi = arg1; + struct pci_devemu *pe = pdi->pi_d; + uint64_t offset; + int bidx = (int)arg2; + + assert(bidx <= PCI_BARMAX); + assert(pdi->pi_bar[bidx].type == PCIBAR_IO); + assert(addr >= pdi->pi_bar[bidx].addr && + addr + size <= pdi->pi_bar[bidx].addr + pdi->pi_bar[bidx].size); + assert(size == 1 || size == 2 || size == 4); + + offset = addr - pdi->pi_bar[bidx].addr; + if (dir == MEM_F_READ) + *val = (*pe->pe_barread)(pdi, bidx, offset, size); + else + (*pe->pe_barwrite)(pdi, bidx, offset, size, *val); + + return (0); +} +#endif /* !__amd64__ */ static int pci_emul_mem_handler(struct vcpu *vcpu __unused, int dir, @@ -538,7 +564,7 @@ pci_emul_mem_handler(struct vcpu *vcpu __unused, int dir, struct pci_devinst *pdi = arg1; struct pci_devemu *pe = pdi->pi_d; uint64_t offset; - int bidx = (int) arg2; + int bidx = (int)arg2; assert(bidx <= PCI_BARMAX); assert(pdi->pi_bar[bidx].type == PCIBAR_MEM32 || @@ -601,12 +627,16 @@ modify_bar_registration(struct pci_devinst *pi, int idx, int registration) { struct pci_devemu *pe; int error; - struct inout_port iop; - struct mem_range mr; + enum pcibar_type type; pe = pi->pi_d; - switch (pi->pi_bar[idx].type) { + type = pi->pi_bar[idx].type; + switch (type) { case PCIBAR_IO: + { +#ifdef __amd64__ + struct inout_port iop; + bzero(&iop, sizeof(struct inout_port)); iop.name = pi->pi_name; iop.port = pi->pi_bar[idx].addr; @@ -618,9 +648,29 @@ modify_bar_registration(struct pci_devinst *pi, int idx, int registration) error = register_inout(&iop); } else error = unregister_inout(&iop); +#else + struct mem_range mr; + + bzero(&mr, sizeof(struct mem_range)); + mr.name = pi->pi_name; + mr.base = pi->pi_bar[idx].addr; + mr.size = pi->pi_bar[idx].size; + if (registration) { + mr.flags = MEM_F_RW; + mr.handler = pci_emul_iomem_handler; + mr.arg1 = pi; + mr.arg2 = idx; + error = register_mem(&mr); + } else + error = unregister_mem(&mr); +#endif break; + } case PCIBAR_MEM32: case PCIBAR_MEM64: + { + struct mem_range mr; + bzero(&mr, sizeof(struct mem_range)); mr.name = pi->pi_name; mr.base = pi->pi_bar[idx].addr; @@ -634,6 +684,7 @@ modify_bar_registration(struct pci_devinst *pi, int idx, int registration) } else error = unregister_mem(&mr); break; + } case PCIBAR_ROM: error = 0; break; @@ -2346,6 +2397,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } } +#ifdef __amd64__ static int cfgenable, cfgbus, cfgslot, cfgfunc, cfgoff; static int @@ -2401,6 +2453,7 @@ INOUT_PORT(pci_cfgdata, CONF1_DATA_PORT+0, IOPORT_F_INOUT, pci_emul_cfgdata); INOUT_PORT(pci_cfgdata, CONF1_DATA_PORT+1, IOPORT_F_INOUT, pci_emul_cfgdata); INOUT_PORT(pci_cfgdata, CONF1_DATA_PORT+2, IOPORT_F_INOUT, pci_emul_cfgdata); INOUT_PORT(pci_cfgdata, CONF1_DATA_PORT+3, IOPORT_F_INOUT, pci_emul_cfgdata); +#endif #ifdef BHYVE_SNAPSHOT /* diff --git a/usr.sbin/bhyve/pctestdev.c b/usr.sbin/bhyve/pctestdev.c index b6fc3c336a93..539016a51876 100644 --- a/usr.sbin/bhyve/pctestdev.c +++ b/usr.sbin/bhyve/pctestdev.c @@ -43,7 +43,9 @@ #include #include "debug.h" -#include "inout.h" +#ifdef __amd64__ +#include "amd64/inout.h" +#endif #include "mem.h" #include "pctestdev.h" diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index 73a401ad8a81..830cee730dbd 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -22,8 +22,8 @@ #include "acpi_device.h" #include "bhyverun.h" -#include "inout.h" #ifdef __amd64__ +#include "amd64/inout.h" #include "amd64/pci_lpc.h" #endif #include "qemu_fwcfg.h" @@ -114,6 +114,7 @@ struct qemu_fwcfg_user_file { static STAILQ_HEAD(qemu_fwcfg_user_file_list, qemu_fwcfg_user_file) user_files = STAILQ_HEAD_INITIALIZER(user_files); +#ifdef __amd64__ static int qemu_fwcfg_selector_port_handler(struct vmctx *const ctx __unused, const int in, const int port __unused, const int bytes, uint32_t *const eax, @@ -181,6 +182,7 @@ qemu_fwcfg_data_port_handler(struct vmctx *const ctx __unused, const int in, return (0); } +#endif static int qemu_fwcfg_add_item(const uint16_t architecture, const uint16_t index, @@ -295,6 +297,7 @@ qemu_fwcfg_add_item_signature(void) (uint8_t *)fwcfg_signature)); } +#ifdef __amd64__ static int qemu_fwcfg_register_port(const char *const name, const int port, const int size, const int flags, const inout_func_t handler) @@ -310,6 +313,7 @@ qemu_fwcfg_register_port(const char *const name, const int port, const int size, return (register_inout(&iop)); } +#endif int qemu_fwcfg_add_file(const char *name, const uint32_t size, void *const data) @@ -461,7 +465,7 @@ qemu_fwcfg_init(struct vmctx *const ctx) goto done; } - /* add handlers for fwcfg ports */ +#ifdef __amd64__ if ((error = qemu_fwcfg_register_port("qemu_fwcfg_selector", QEMU_FWCFG_SELECTOR_PORT_NUMBER, QEMU_FWCFG_SELECTOR_PORT_SIZE, @@ -481,6 +485,7 @@ qemu_fwcfg_init(struct vmctx *const ctx) __func__, QEMU_FWCFG_DATA_PORT_NUMBER); goto done; } +#endif } /* add common fwcfg items */ From nobody Wed Oct 4 16:54:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114Q0Q0Bz4wH9Y; Wed, 4 Oct 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114P0PL3z3DKS; Wed, 4 Oct 2023 16:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z0f0zv4CHPyShGAZi8sJWMRB46ZUnrbjHZZ1DqaI0kM=; b=pzWSJzKWrSRCqf6URkRgdpHOhGDC//PcTno2ZVhTlQeQH4KMjRu7dn0cn/T8i42lh7APUG 0NCTsbsswheIemzv8VlCiHwXXjhrnm4pIeLUgEAVC+87MlBW6fORsG73eKnkmpOuW9f8RR nnfzgp+U2Ri47gJFRxWBb/mEvU99vsSlm1C/q7Qr0MW0LjuWx7uB/2at0ht+nnrj6SzibZ iQluu2s0IFywiv5LZWiMdHqGfXokn8g5CPYn+5dXgWDHtDbqllhWNxvlHFmG+lGWjhcKIP KAFlIqo1v+pzMQuQpUPuwSYfjBd5cMOMvSC4ShpJgNt4ps7H3WTUOh47SpH+8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438453; a=rsa-sha256; cv=none; b=fgNeNsAsgaCkP8hEAqhtQ7KQv2Et5gPRjz8pImiHRRIbZyIAn0sdF+35zV3uq1NNSopOjx SKKT/Kv670tJK0sUvmMfC1gTTtDcR+STKoQfcWvcwFBetHQsOJPx3LmEQ8r7/ld7QM/i2j r5WRtjIFPES50jEKbWwXjzrejEuGVr3hWQUHqeh5b8Pz65siedwR/cxf2W8ChLJjLh4XG7 DnU26YbA4tF07Q52gtW0Fa65H3yli49p11KYliuJ9UTDzedSV335E5kz9CzhSUvl0cDOXV cphXip8sJlx2KtMWI6fXxe8ZjPOzQCisu9paX1xLm3H7ovJXGIr1szZJXMlyww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z0f0zv4CHPyShGAZi8sJWMRB46ZUnrbjHZZ1DqaI0kM=; b=lxKiwoi4S3/dsEBZCBJc+sx28p7AKcYfeWHjCoRQkqRIS9xv2DdTQktuQzUsx6z2SEmKVn f1Tjg4cwV+msTjJRpDYxv6Q9roPfuWLGhYVxyc7HXY7yoIt/+HHo7b17pli/HqI4HSv80U dDrHfJanX7fpfy+Ckl52rlv6cHOZKzYbM68xkHpLWOi/jqv6HSx/7obPDEMUY7uhprxMpU rExEnFr7SeGfoJuwFGdFoxbINcySPrizRiE709qsYhTzO3n7R4iCJEHEe3yiqlPQ1ggubZ CHNTcaR7/gV1OhPA6m4RWDLes3ySVvrs4E5cJ+Jx7M4CxCX+XniCO/GphU54tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114N2rpczlWw; Wed, 4 Oct 2023 16:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsCkE038196; Wed, 4 Oct 2023 16:54:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsCpb038193; Wed, 4 Oct 2023 16:54:12 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:12 GMT Message-Id: <202310041654.394GsCpb038193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ca2cda98d265 - main - bhyve: Make gdb support optional List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca2cda98d265ef5d80b7cd0705697a1af27fb808 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ca2cda98d265ef5d80b7cd0705697a1af27fb808 commit ca2cda98d265ef5d80b7cd0705697a1af27fb808 Author: Mark Johnston AuthorDate: 2023-10-04 16:26:36 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Make gdb support optional Add a BHYVE_GDB_SUPPORT make variable that can be set by per-arch makefiles. When set, BHYVE_GDB is defined and can be used as a preprocessor predicate. Use it to guard gdb stub calls in MI code. The arm64 bhyve port currently does not have a functional gdb stub, but that's not critical to landing the port, so this mechanism slightly reduces the friction of adding support for a new platform. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40986 --- usr.sbin/bhyve/Makefile | 13 ++++++++----- usr.sbin/bhyve/amd64/Makefile.inc | 2 ++ usr.sbin/bhyve/bhyverun.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 7c0750fae7d7..1a8191f9fd3f 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -28,7 +28,6 @@ SRCS= \ crc16.c \ ctl_scsi_all.c \ ctl_util.c \ - gdb.c \ hda_codec.c \ iov.c \ mem.c \ @@ -67,6 +66,14 @@ SRCS+= snapshot.c .include "${MACHINE_CPUARCH}/Makefile.inc" +.if defined(BHYVE_GDB_SUPPORT) +SRCS+= gdb.c +CFLAGS+= -DBHYVE_GDB +.ifdef GDB_LOG +CFLAGS+=-DGDB_LOG +.endif +.endif + CFLAGS+=-I${.CURDIR} \ -I${.CURDIR}/../../contrib/lib9p \ -I${SRCTOP}/sys @@ -102,10 +109,6 @@ CFLAGS+= -I${SRCTOP}/contrib/libucl/include CFLAGS+= -DBHYVE_SNAPSHOT .endif -.ifdef GDB_LOG -CFLAGS+=-DGDB_LOG -.endif - # Disable thread safety analysis since it only finds very simple bugs and # yields many false positives. NO_WTHREAD_SAFETY= diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 96aaecafae4c..bc0ffa720d31 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -1,3 +1,5 @@ +BHYVE_GDB_SUPPORT= + SRCS+= \ atkbdc.c \ e820.c \ diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 0c8eba3e4a6b..d054ec1301f7 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -86,7 +86,9 @@ #include "amd64/e820.h" #include "amd64/fwctl.h" #endif +#ifdef BHYVE_GDB #include "gdb.h" +#endif #ifdef __amd64__ #include "amd64/ioapic.h" #include "amd64/kernemu_dev.h" @@ -463,7 +465,9 @@ fbsdrun_start_thread(void *param) #ifdef BHYVE_SNAPSHOT checkpoint_cpu_add(vi->vcpuid); #endif +#ifdef BHYVE_GDB gdb_cpu_add(vi->vcpu); +#endif vm_loop(vi->ctx, vi->vcpu); @@ -757,6 +761,7 @@ parse_simple_config_file(const char *path) fclose(fp); } +#ifdef BHYVE_GDB static void parse_gdb_options(const char *opt) { @@ -780,6 +785,7 @@ parse_gdb_options(const char *opt) set_config_value("gdb.port", sport); } +#endif static void set_defaults(void) @@ -852,9 +858,11 @@ main(int argc, char *argv[]) errx(EX_USAGE, "invalid fwcfg item '%s'", optarg); } break; +#ifdef BHYVE_GDB case 'G': parse_gdb_options(optarg); break; +#endif case 'k': parse_simple_config_file(optarg); break; @@ -1091,7 +1099,9 @@ main(int argc, char *argv[]) if (get_config_bool("acpi_tables")) vmgenc_init(ctx); +#ifdef BHYVE_GDB init_gdb(ctx); +#endif #ifdef __amd64__ if (lpc_bootrom()) { From nobody Wed Oct 4 16:54:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114Q14xvz4wH3C; Wed, 4 Oct 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114P57Mvz3DXC; Wed, 4 Oct 2023 16:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/SiBvVfcBxPy1g6kJncPVOyK7sMaEyyzYMzZJlahXM=; b=rKZqx1JmbWR47ZOs+p7aZHSqGlCotWERUzKhfIhbVL/F/CQM+EShKOqtVNFa37mLDX8SvU PfMUWhoFsgLD3qwitBLJCAo5K2chvmUAfyi/vkHTHUVcDCj7vzKBwAmH9iXM3ykw2lhxNJ JqldIAWEDlgB0jVMEnvve6hao1gJZNgPnDwgyko6eJ18ZhpBVf+I+VABLms9TmnTxlrAzS 3sxn7H1ERYqEP4/YUhPrGxDEvGs3Ws2/C+v55RhVVmjX3K7JGQZjovX/A5/ghfrYdzmYQ9 JqEALpj2sswGLC4EchX15EiaaTH0w3PoR5axWlg4JGMBbnAzthLqopptCVKtww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438453; a=rsa-sha256; cv=none; b=dqaasJ/yXRcVHRQOrqucY22gDhw6+4rjhvMgUkxYFoibw5mt69Yiz7JxOdYvvjgTJkwwye Bvzt/B5YE99tsqC/OrD7DPFhvJA3kmf4vhdeZ0ffmQnTOHv56QvUZxQhFqjzKjedfwlyPN +yWc8Rz6oyLpkM05aH1Gqx4JnFar2u5R84mpuegCr9HZDkaxxu9CVBrAoBeQm5SpVtWyxo roYHXsKDkVZW4h+M1WsHdiMlcTEUMPgom8g5piLVUm4Knd3NJdVRxxEuDUbPh3gnR2gJv6 LR3vpYfkmUhr83MLeYfxul5XXS54NsX6p0shvxgIK1hw43dkmQGl6bUSN4458Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/SiBvVfcBxPy1g6kJncPVOyK7sMaEyyzYMzZJlahXM=; b=rdqXXHkh2jU1/OOlUcUG+ZLGCIcgW2eMpEEU3jfGLJVpAsqKbDjg9/BRlf9CM8xu2XGvbW xESXu1SIlLLbnsZ2HXXDwLG7J4Gc8m3PThrMXNFVXoai/9QvdATIRIgQ0BAgMsFVOJh/15 Hyw3QMfdFypO5EAKn4s9zwJf3h/CJ4FhRUEFDGNQRvOQ88isVWx+HGV8Qn4R0Vl/zgbCJ/ 3nKEwQRHkqfStLtVgoJyPN9CFRo+Vp9sG3ROWvZPRorN8aUqEfrMHITEcnnZA4CI42jD0X PZs3oKLZKRmLH43u7JUQa1QvqpYVwwh0Kr4J/luRF2b0x4J7rAmnpLS1rwojyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114P41TBzljp; Wed, 4 Oct 2023 16:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsDcm038250; Wed, 4 Oct 2023 16:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsDwd038247; Wed, 4 Oct 2023 16:54:13 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:13 GMT Message-Id: <202310041654.394GsDwd038247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e20b74da223d - main - bhyve: Move vcpu initialization into a MD source file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e20b74da223d675321618fe6d67858084d152c9e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e20b74da223d675321618fe6d67858084d152c9e commit e20b74da223d675321618fe6d67858084d152c9e Author: Mark Johnston AuthorDate: 2023-10-04 16:27:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move vcpu initialization into a MD source file - Make handling of x86 config options, like x86.x2apic, conditional to amd64. - Move fbsdrun_set_capabilities() and spinup_vcpu() to a new file, bhyverun_machdep.c. The moved code is all highly x86 specific. I'm not sure how best to handle the namespace. I'm using "bhyve_" for MD functions called from MI code. We also have "fbsdrun_" for some MI routines that are typically called from MD code. The file name is prefixed by "bhyverun_". Reviewed by: corvink MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40987 --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/amd64/bhyverun_machdep.c | 125 ++++++++++++++++++++++++++++++++ usr.sbin/bhyve/bhyverun.c | 111 ++++------------------------ usr.sbin/bhyve/bhyverun.h | 12 ++- 4 files changed, 152 insertions(+), 97 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 1a8191f9fd3f..de8e87d2ad49 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -21,6 +21,7 @@ SRCS= \ basl.c \ bhyvegc.c \ bhyverun.c \ + bhyverun_machdep.c \ block_if.c \ bootrom.c \ config.c \ diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c new file mode 100644 index 000000000000..c6926abe61bc --- /dev/null +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -0,0 +1,125 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2011 NetApp, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``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 NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include + +#include "bhyverun.h" +#include "config.h" +#include "pci_lpc.h" + +void +bhyve_init_config(void) +{ + init_config(); + + /* Set default values prior to option parsing. */ + set_config_bool("acpi_tables", true); + set_config_bool("acpi_tables_in_memory", true); + set_config_value("memory.size", "256M"); + set_config_bool("x86.strictmsr", true); + set_config_value("lpc.fwcfg", "bhyve"); +} + +void +bhyve_init_vcpu(struct vcpu *vcpu) +{ + int err, tmp; + + if (get_config_bool_default("x86.vmexit_on_hlt", false)) { + err = vm_get_capability(vcpu, VM_CAP_HALT_EXIT, &tmp); + if (err < 0) { + fprintf(stderr, "VM exit on HLT not supported\n"); + exit(4); + } + vm_set_capability(vcpu, VM_CAP_HALT_EXIT, 1); + } + + if (get_config_bool_default("x86.vmexit_on_pause", false)) { + /* + * pause exit support required for this mode + */ + err = vm_get_capability(vcpu, VM_CAP_PAUSE_EXIT, &tmp); + if (err < 0) { + fprintf(stderr, + "SMP mux requested, no pause support\n"); + exit(4); + } + vm_set_capability(vcpu, VM_CAP_PAUSE_EXIT, 1); + } + + if (get_config_bool_default("x86.x2apic", false)) + err = vm_set_x2apic_state(vcpu, X2APIC_ENABLED); + else + err = vm_set_x2apic_state(vcpu, X2APIC_DISABLED); + + if (err) { + fprintf(stderr, "Unable to set x2apic state (%d)\n", err); + exit(4); + } + + vm_set_capability(vcpu, VM_CAP_ENABLE_INVPCID, 1); + + err = vm_set_capability(vcpu, VM_CAP_IPI_EXIT, 1); + assert(err == 0); +} + +void +bhyve_start_vcpu(struct vcpu *vcpu, bool bsp) +{ + int error; + + if (bsp) { + if (lpc_bootrom()) { + error = vm_set_capability(vcpu, + VM_CAP_UNRESTRICTED_GUEST, 1); + if (error != 0) { + err(4, "ROM boot failed: unrestricted guest " + "capability not available"); + } + error = vcpu_reset(vcpu); + assert(error == 0); + } + } else { + bhyve_init_vcpu(vcpu); + + /* + * Enable the 'unrestricted guest' mode for APs. + * + * APs startup in power-on 16-bit mode. + */ + error = vm_set_capability(vcpu, VM_CAP_UNRESTRICTED_GUEST, 1); + assert(error == 0); + } + + fbsdrun_addcpu(vcpu_id(vcpu)); +} diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index d054ec1301f7..f42db8147d54 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -476,17 +476,20 @@ fbsdrun_start_thread(void *param) return (NULL); } -static void -fbsdrun_addcpu(struct vcpu_info *vi) +void +fbsdrun_addcpu(int vcpuid) { + struct vcpu_info *vi; pthread_t thr; int error; + vi = &vcpu_info[vcpuid]; + error = vm_activate_cpu(vi->vcpu); if (error != 0) err(EX_OSERR, "could not activate CPU %d", vi->vcpuid); - CPU_SET_ATOMIC(vi->vcpuid, &cpumask); + CPU_SET_ATOMIC(vcpuid, &cpumask); vm_suspend_cpu(vi->vcpu); @@ -590,49 +593,6 @@ num_vcpus_allowed(struct vmctx *ctx, struct vcpu *vcpu) return (1); } -static void -fbsdrun_set_capabilities(struct vcpu *vcpu) -{ - int err, tmp; - - if (get_config_bool_default("x86.vmexit_on_hlt", false)) { - err = vm_get_capability(vcpu, VM_CAP_HALT_EXIT, &tmp); - if (err < 0) { - fprintf(stderr, "VM exit on HLT not supported\n"); - exit(4); - } - vm_set_capability(vcpu, VM_CAP_HALT_EXIT, 1); - } - - if (get_config_bool_default("x86.vmexit_on_pause", false)) { - /* - * pause exit support required for this mode - */ - err = vm_get_capability(vcpu, VM_CAP_PAUSE_EXIT, &tmp); - if (err < 0) { - fprintf(stderr, - "SMP mux requested, no pause support\n"); - exit(4); - } - vm_set_capability(vcpu, VM_CAP_PAUSE_EXIT, 1); - } - - if (get_config_bool_default("x86.x2apic", false)) - err = vm_set_x2apic_state(vcpu, X2APIC_ENABLED); - else - err = vm_set_x2apic_state(vcpu, X2APIC_DISABLED); - - if (err) { - fprintf(stderr, "Unable to set x2apic state (%d)\n", err); - exit(4); - } - - vm_set_capability(vcpu, VM_CAP_ENABLE_INVPCID, 1); - - err = vm_set_capability(vcpu, VM_CAP_IPI_EXIT, 1); - assert(err == 0); -} - static struct vmctx * do_open(const char *vmname) { @@ -697,26 +657,6 @@ do_open(const char *vmname) return (ctx); } -static void -spinup_vcpu(struct vcpu_info *vi, bool bsp) -{ - int error; - - if (!bsp) { - fbsdrun_set_capabilities(vi->vcpu); - - /* - * Enable the 'unrestricted guest' mode for APs. - * - * APs startup in power-on 16-bit mode. - */ - error = vm_set_capability(vi->vcpu, VM_CAP_UNRESTRICTED_GUEST, 1); - assert(error == 0); - } - - fbsdrun_addcpu(vi); -} - static bool parse_config_option(const char *option) { @@ -787,17 +727,6 @@ parse_gdb_options(const char *opt) } #endif -static void -set_defaults(void) -{ - - set_config_bool("acpi_tables", true); - set_config_bool("acpi_tables_in_memory", true); - set_config_value("memory.size", "256M"); - set_config_bool("x86.strictmsr", true); - set_config_value("lpc.fwcfg", "bhyve"); -} - int main(int argc, char *argv[]) { @@ -814,8 +743,8 @@ main(int argc, char *argv[]) restore_file = NULL; #endif - init_config(); - set_defaults(); + bhyve_init_config(); + progname = basename(argv[0]); #ifdef BHYVE_SNAPSHOT @@ -825,9 +754,11 @@ main(int argc, char *argv[]) #endif while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { +#ifdef __amd64__ case 'a': set_config_bool("x86.x2apic", false); break; +#endif case 'A': /* * NOP. For backward compatibility. Most systems don't @@ -903,6 +834,7 @@ main(int argc, char *argv[]) if (!parse_config_option(optarg)) errx(EX_USAGE, "invalid configuration option '%s'", optarg); break; +#ifdef __amd64__ case 'H': set_config_bool("x86.vmexit_on_hlt", true); break; @@ -921,7 +853,6 @@ main(int argc, char *argv[]) case 'e': set_config_bool("x86.strictio", true); break; -#ifdef __amd64__ case 'u': set_config_bool("rtc.use_localtime", false); break; @@ -929,16 +860,18 @@ main(int argc, char *argv[]) case 'U': set_config_value("uuid", optarg); break; +#ifdef __amd64__ case 'w': set_config_bool("x86.strictmsr", false); break; +#endif case 'W': set_config_bool("virtio_msix", false); break; +#ifdef __amd64__ case 'x': set_config_bool("x86.x2apic", true); break; -#ifdef __amd64__ case 'Y': set_config_bool("x86.mptable", false); break; @@ -1012,7 +945,7 @@ main(int argc, char *argv[]) exit(4); } - fbsdrun_set_capabilities(bsp); + bhyve_init_vcpu(bsp); /* Allocate per-VCPU resources. */ vcpu_info = calloc(guest_ncpus, sizeof(*vcpu_info)); @@ -1103,23 +1036,11 @@ main(int argc, char *argv[]) init_gdb(ctx); #endif -#ifdef __amd64__ - if (lpc_bootrom()) { - if (vm_set_capability(bsp, VM_CAP_UNRESTRICTED_GUEST, 1)) { - fprintf(stderr, "ROM boot failed: unrestricted guest " - "capability not available\n"); - exit(4); - } - error = vcpu_reset(bsp); - assert(error == 0); - } -#endif - /* * Add all vCPUs. */ for (int vcpuid = 0; vcpuid < guest_ncpus; vcpuid++) - spinup_vcpu(&vcpu_info[vcpuid], vcpuid == BSP); + bhyve_start_vcpu(vcpu_info[vcpuid].vcpu, vcpuid == BSP); #ifdef BHYVE_SNAPSHOT if (restore_file != NULL) { diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index b1cfb99a964e..39e0916f08ef 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -26,8 +26,10 @@ * SUCH DAMAGE. */ -#ifndef _FBSDRUN_H_ -#define _FBSDRUN_H_ +#ifndef _BHYVERUN_H_ +#define _BHYVERUN_H_ + +#include #define VMEXIT_CONTINUE (0) #define VMEXIT_ABORT (-1) @@ -46,6 +48,7 @@ uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr); struct vcpu; struct vcpu *fbsdrun_vcpu(int vcpuid); +void fbsdrun_addcpu(int vcpuid); void fbsdrun_deletecpu(int vcpuid); int fbsdrun_suspendcpu(int vcpuid); @@ -53,4 +56,9 @@ int fbsdrun_virtio_msix(void); typedef int (*vmexit_handler_t)(struct vmctx *, struct vcpu *, struct vm_run *); +/* Interfaces implemented by machine-dependent code. */ +void bhyve_init_config(void); +void bhyve_init_vcpu(struct vcpu *vcpu); +void bhyve_start_vcpu(struct vcpu *vcpu, bool bsp); + #endif From nobody Wed Oct 4 16:54:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114Q72nGz4wH64; Wed, 4 Oct 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114Q5yy7z3DMG; Wed, 4 Oct 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0IzUI5Gsvvgp7jvrtpnUFCJwgZEnJ02MnjW5Sna/NM=; b=cb/PrJdnjAXa0A0Cq8bL+yjrLrIHrfETm+garQmn+HsIp+7/xetNiHG48rrKaMk2Solu3V DcjGlTZJZNNMWD4wg7O9F7fv3WR/OUw842g3hv+A59bBibJwy0qcNe7IifS/S+7ChRnUKR t1j50gB/f/U+ZHApuF6TfS/vjvQM1ziV8195bWrtnhdn8AWjKkcwoIWNrodnL/zJY6B/7V yjgCqapyfU/IDHALDxcZAZ97Bg/x//aELr7YbzSYDHv68KPfQgH7pSnsrjRB3w2YGnQGm6 p5Kcs+zCzH0Oln5wh8TA2b4VfTkXMQ2N/95dHnLoh/QS2W97B44prMpTP4hhXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438454; a=rsa-sha256; cv=none; b=Q7pnQ2deBr0ULwewoYm+mD5h0J5Bdnp2f8Hd7BGx7BrSbwwB9d0vDscIyLEXLaqYJVDJeo NCFGkiNoRdemhrli3oBiPDxYGKb7j41Ve7wzUDksCtTp73OB43xKCVbyW6YS41XNiO+uBG arrMI1H/UXss0kYppDkiwp7Y3fgPWI8CsrXLjf8AUSuJ8HnG4jJY50bY2Jah0fbUuixNAM XqVCqikuXcvqlL+kiafXWXqX7xeO0k4nxErvNwLX2Pl57PTFW9r0L4KXEIjjtLxpk9iC4D pnA0R/CpkySKEsnYn8/LG4KssxEt/9lfXSgEULInyzge7rOGR2dm3xr0nwfzpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0IzUI5Gsvvgp7jvrtpnUFCJwgZEnJ02MnjW5Sna/NM=; b=SbyHU1sGZp70LzGZlUHJyVl5SJRc0J65waNZYCX43hAqBqNIjIXT39AvwgzXC7KwhFBWGX g9dAWw1PPWyEFEu5Qyb2mSxCSMQux3RQiJP/ifOfKjt5S01TjdoYEhXBOExqQRhnGWUpXB bMBiGy8Gbtbs8dmtZzXK5PzTrS1C7fJEskKDr/5YMAdWWH+uXsrZYjjl/YrN42Z252swbX M5Fxkh7mX4xLbIQ0X3P4D1NOYv54g/QtAkXBnaTVBKNirKq8JZhhrv+wj3Bj6S1MPJHGGB ipidR403vjE/W3WOIunsWj9RrRtApJPcaGi29rUJktt8HUDrhacUclbUf9yAkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114Q53w1zlxK; Wed, 4 Oct 2023 16:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsELa038304; Wed, 4 Oct 2023 16:54:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsEDH038301; Wed, 4 Oct 2023 16:54:14 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:14 GMT Message-Id: <202310041654.394GsEDH038301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f82af74c7603 - main - bhyve: Move most early initialization into an MD routine List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f82af74c76030029d4d8af95c29f2036a20796a4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f82af74c76030029d4d8af95c29f2036a20796a4 commit f82af74c76030029d4d8af95c29f2036a20796a4 Author: Mark Johnston AuthorDate: 2023-10-04 16:27:54 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move most early initialization into an MD routine Prior to initializing PCI devices, main() calls a number of initialization routines, many of which are amd64-specific. Move this list of calls to bhyverun_machdep.c. Similarly, add an MD function to handle late initialization. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40989 --- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 62 +++++++++++++++++++++++ usr.sbin/bhyve/amd64/xmsr.c | 7 +-- usr.sbin/bhyve/bhyverun.c | 88 ++------------------------------- usr.sbin/bhyve/bhyverun.h | 2 + 4 files changed, 72 insertions(+), 87 deletions(-) diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index c6926abe61bc..40325a7f52c9 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -33,9 +33,21 @@ #include +#include "acpi.h" +#include "atkbdc.h" #include "bhyverun.h" #include "config.h" +#include "e820.h" +#include "fwctl.h" +#include "ioapic.h" +#include "inout.h" +#include "kernemu_dev.h" +#include "mptbl.h" +#include "pci_irq.h" #include "pci_lpc.h" +#include "rtc.h" +#include "smbiostbl.h" +#include "xmsr.h" void bhyve_init_config(void) @@ -123,3 +135,53 @@ bhyve_start_vcpu(struct vcpu *vcpu, bool bsp) fbsdrun_addcpu(vcpu_id(vcpu)); } + +int +bhyve_init_platform(struct vmctx *ctx, struct vcpu *bsp __unused) +{ + int error; + + error = init_msr(); + if (error != 0) + return (error); + init_inout(); + kernemu_dev_init(); + atkbdc_init(ctx); + pci_irq_init(ctx); + ioapic_init(ctx); + rtc_init(ctx); + sci_init(ctx); + error = e820_init(ctx); + if (error != 0) + return (error); + + return (0); +} + +int +bhyve_init_platform_late(struct vmctx *ctx, struct vcpu *bsp __unused) +{ + int error; + + if (get_config_bool_default("x86.mptable", true)) { + error = mptable_build(ctx, guest_ncpus); + if (error != 0) + return (error); + } + error = smbios_build(ctx); + if (error != 0) + return (error); + error = e820_finalize(); + if (error != 0) + return (error); + + if (lpc_bootrom() && strcmp(lpc_fwcfg(), "bhyve") == 0) + fwctl_init(); + + if (get_config_bool("acpi_tables")) { + error = acpi_build(ctx, guest_ncpus); + assert(error == 0); + } + + return (0); +} diff --git a/usr.sbin/bhyve/amd64/xmsr.c b/usr.sbin/bhyve/amd64/xmsr.c index 99e758e84fff..7481df4669e7 100644 --- a/usr.sbin/bhyve/amd64/xmsr.c +++ b/usr.sbin/bhyve/amd64/xmsr.c @@ -33,12 +33,13 @@ #include #include -#include - +#include #include #include #include +#include + #include "debug.h" #include "xmsr.h" @@ -236,7 +237,7 @@ init_msr(void) cpu_vendor_intel = 1; } else { EPRINTLN("Unknown cpu vendor \"%s\"", cpu_vendor); - error = -1; + error = ENOENT; } return (error); } diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index f42db8147d54..8d9ad3750d43 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -71,52 +71,27 @@ #include -#include "bhyverun.h" #include "acpi.h" -#ifdef __amd64__ -#include "amd64/atkbdc.h" -#endif +#include "bhyverun.h" #include "bootrom.h" #include "config.h" -#ifdef __amd64__ -#include "amd64/inout.h" -#endif #include "debug.h" -#ifdef __amd64__ -#include "amd64/e820.h" -#include "amd64/fwctl.h" -#endif #ifdef BHYVE_GDB #include "gdb.h" #endif -#ifdef __amd64__ -#include "amd64/ioapic.h" -#include "amd64/kernemu_dev.h" -#endif #include "mem.h" #include "mevent.h" -#ifdef __amd64__ -#include "amd64/mptbl.h" -#endif #include "pci_emul.h" #ifdef __amd64__ -#include "amd64/pci_irq.h" #include "amd64/pci_lpc.h" #endif #include "qemu_fwcfg.h" -#include "smbiostbl.h" #ifdef BHYVE_SNAPSHOT #include "snapshot.h" #endif #include "tpm_device.h" -#ifdef __amd64__ -#include "amd64/rtc.h" -#endif #include "vmgenc.h" #include "vmexit.h" -#ifdef __amd64__ -#include "amd64/xmsr.h" -#endif #define MB (1024UL * 1024) #define GB (1024UL * MB) @@ -970,30 +945,10 @@ main(int argc, char *argv[]) exit(4); } -#ifdef __amd64__ - error = init_msr(); - if (error) { - fprintf(stderr, "init_msr error %d", error); - exit(4); - } -#endif - init_mem(guest_ncpus); -#ifdef __amd64__ - init_inout(); - kernemu_dev_init(); -#endif init_bootrom(ctx); -#ifdef __amd64__ - atkbdc_init(ctx); - pci_irq_init(ctx); - ioapic_init(ctx); -#endif - -#ifdef __amd64__ - rtc_init(ctx); - sci_init(ctx); -#endif + if (bhyve_init_platform(ctx, bsp) != 0) + exit(4); if (qemu_fwcfg_init(ctx) != 0) { fprintf(stderr, "qemu fwcfg initialization error"); @@ -1006,13 +961,6 @@ main(int argc, char *argv[]) exit(4); } -#ifdef __amd64__ - if (e820_init(ctx) != 0) { - fprintf(stderr, "Unable to setup E820"); - exit(4); - } -#endif - /* * Exit if a device emulation finds an error in its initialization */ @@ -1076,37 +1024,9 @@ main(int argc, char *argv[]) } #endif -#ifdef __amd64__ - if (get_config_bool_default("x86.mptable", true)) { - error = mptable_build(ctx, guest_ncpus); - if (error) { - perror("error to build the guest tables"); - exit(4); - } - } -#endif - - error = smbios_build(ctx); - if (error != 0) + if (bhyve_init_platform_late(ctx, bsp) != 0) exit(4); - if (get_config_bool("acpi_tables")) { - error = acpi_build(ctx, guest_ncpus); - assert(error == 0); - } - -#ifdef __amd64__ - error = e820_finalize(); - if (error != 0) - exit(4); -#endif - -#ifdef __amd64__ - if (lpc_bootrom() && strcmp(lpc_fwcfg(), "bhyve") == 0) { - fwctl_init(); - } -#endif - /* * Change the proc title to include the VM name. */ diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index 39e0916f08ef..5fe97ca07f0b 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -60,5 +60,7 @@ typedef int (*vmexit_handler_t)(struct vmctx *, struct vcpu *, struct vm_run *); void bhyve_init_config(void); void bhyve_init_vcpu(struct vcpu *vcpu); void bhyve_start_vcpu(struct vcpu *vcpu, bool bsp); +int bhyve_init_platform(struct vmctx *ctx, struct vcpu *bsp); +int bhyve_init_platform_late(struct vmctx *ctx, struct vcpu *bsp); #endif From nobody Wed Oct 4 16:54:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114S4TG9z4wHCm; Wed, 4 Oct 2023 16:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114S2rYMz3DMq; Wed, 4 Oct 2023 16:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2UNEDC3uaM89fhmz8S2/c8u7mxkvLFKMy8QOaHnsTs=; b=g+dQ2MUa8FzJmVvWA+ejINI0rwRh+HVowOwEdvJhZhhH3QIICp2gOkOngYSYGUMZmO8N4s GIMQvZMukXdsWn7ej0AhdkXgcYcFdcsQr14zjm1mukUQy5RYuABLiXf93lN1snQNqQQRgt fBYukO/CrO1ntxWS2AmskQykq4JjvKJ7H9aA567thqPKxqz1k2/6OEhmQ9dUvsNB82IIeN bffUs5Ccw1ndec5hCyLBm96A2MpHqPYC/swcAVn1fInPhZreG4nOpcHN80UqQX3XZTSYfT jzqOSNtfnR9wclt8+lKtpzHNEDBNqomli81W9BiNg2XI4zivCYqEbYmEmvIKJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438456; a=rsa-sha256; cv=none; b=xD4P7O+fu+lXJXLgV2K6775gzbREBA7KlRQAishK3KCg6aPraD9C/0e8hZ3MvyouCv3pH6 C3bO95qcZeN4WFoST4c/+D9vWN8rCnC+DHDzJC2/NC0KbFFWYOJ4PyRouHL0ww6CeFL7x4 6AevmNnniRI9RZyD51+2UZAyQX7mteH9LhoK3mcheZMFLaYOKIduiFT92vlOmFPjmi2b8Y 0JwKLUG8qKpb5iKyPlIHnwUpOyF+cKPGnTWPmcqvv0E19VFESZL8YJn5LUy2OdWKHUf1S8 1UXbExRuoxI37kuTIO2gZKMka7QHHOhJLWqzz/9vN0cjU7sqpBmwc5zOqv6nJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2UNEDC3uaM89fhmz8S2/c8u7mxkvLFKMy8QOaHnsTs=; b=C8XXglLzDKhHnVcEO2ei8LK4DVWAcaesejBua3aTLYC9uPmgXmHzA0Oqgk8deot1VKB/sO L6AbOzrseyAzO0XRpEujq9RE2KBRqyLNuYpGjEcd9kPpi9T2CBzd8lUy1A6dR+v6SJKgcw Y4OIYsEFqQXpsMdyVLDDqF+kcDEyBlJz0CkFB3swBCx//NbU1k66tDpdU7VVcv6jga0rj6 xTevK1rpTwtufH+ZgmOk0JKmGsL+5cX3v5OpjMWI8nBRLOSnoz8w0iuaeaVM4vtB0Csx7t nWBP5GROZbRc4qFzy4FP3dHzwitwDLPpXli/9b49ylc2F1VhvQ/TPiGIpGjUFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114R5wgqzlxP; Wed, 4 Oct 2023 16:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsF78038364; Wed, 4 Oct 2023 16:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsFw4038361; Wed, 4 Oct 2023 16:54:15 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:15 GMT Message-Id: <202310041654.394GsFw4038361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 83b003fbe965 - main - bhyve: Build the HPET ACPI table on amd64 only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83b003fbe965869124706b4a80b212734152356d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=83b003fbe965869124706b4a80b212734152356d commit 83b003fbe965869124706b4a80b212734152356d Author: Mark Johnston AuthorDate: 2023-10-04 16:28:28 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Build the HPET ACPI table on amd64 only There is no HPET on arm64 and vm_get_hpet_capabilities() is not implemented there. Move the vm_get_hpet_capabilities() call into build_hpet(): I cannot see a downside, and doing so eliminates a global variable and reduces the amount of code that needs to be conditionally compiled. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40990 --- usr.sbin/bhyve/acpi.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c index 4a3233291b7a..050e1a0ab75f 100644 --- a/usr.sbin/bhyve/acpi.c +++ b/usr.sbin/bhyve/acpi.c @@ -71,7 +71,6 @@ static int basl_keep_temps; static int basl_verbose_iasl; static int basl_ncpu; -static uint32_t hpet_capabilities; /* * Contains the full pathname of the template to be passed @@ -218,6 +217,7 @@ basl_fwrite_dsdt(FILE *fp) pci_write_dsdt(); +#ifdef __amd64__ dsdt_line(""); dsdt_line(" Scope (_SB.PC00)"); dsdt_line(" {"); @@ -233,6 +233,7 @@ basl_fwrite_dsdt(FILE *fp) dsdt_line(" })"); dsdt_line(" }"); dsdt_line(" }"); +#endif vmgenc_write_dsdt(); @@ -530,11 +531,18 @@ build_fadt(struct vmctx *const ctx) return (0); } +#ifdef __amd64__ static int build_hpet(struct vmctx *const ctx) { ACPI_TABLE_HPET hpet; struct basl_table *table; + uint32_t hpet_capabilities; + int err; + + err = vm_get_hpet_capabilities(ctx, &hpet_capabilities); + if (err != 0) + return (err); BASL_EXEC(basl_table_create(&table, ctx, ACPI_SIG_HPET, BASL_TABLE_ALIGNMENT)); @@ -551,6 +559,7 @@ build_hpet(struct vmctx *const ctx) return (0); } +#endif static int build_madt(struct vmctx *const ctx) @@ -720,14 +729,8 @@ build_spcr(struct vmctx *const ctx) int acpi_build(struct vmctx *ctx, int ncpu) { - int err; - basl_ncpu = ncpu; - err = vm_get_hpet_capabilities(ctx, &hpet_capabilities); - if (err != 0) - return (err); - /* * For debug, allow the user to have iasl compiler output sent * to stdout rather than /dev/null @@ -756,7 +759,9 @@ acpi_build(struct vmctx *ctx, int ncpu) BASL_EXEC(build_rsdp(ctx)); BASL_EXEC(build_fadt(ctx)); BASL_EXEC(build_madt(ctx)); +#ifdef __amd64__ BASL_EXEC(build_hpet(ctx)); +#endif BASL_EXEC(build_mcfg(ctx)); BASL_EXEC(build_facs(ctx)); BASL_EXEC(build_spcr(ctx)); From nobody Wed Oct 4 16:54:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S114T2VNcz4wH9h; Wed, 4 Oct 2023 16:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S114T0ZDBz3DN1; Wed, 4 Oct 2023 16:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lxM8k8BOlEhiakCGU7CAmiYXn8oC41zTeFxiuf/cbA=; b=cbhhxuUMiMzt3VFHV9GaDIupHfHrBehOkrVchJDGwmfgactkEga402lCKTFZ+otd6GycZo +Ua+n6ZR7J1h5XjO301bErGhZjGp5H4Bb5Rc6FxD6GEzaS1uokQJukZdxJdxTNmo33Pv68 lUxnIvMDatD82v1N3UfIX41ebgpqsRjnOXH/DXFfV6T5GrmD88UAs6ecsGYj3FiOiC4EFR t4BQ1KO03S7T8YAOOqG+J1Oc8JIFeRHK40Pqv2+kdgD9EhZClu9h/SAU0pcgBhaZTCHbxA anSk+FMRWE7+0BlcKirf1nq1xP1nBdDWuXHbIlPnSiSuB5/jGV1BqZHZSeQCpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438457; a=rsa-sha256; cv=none; b=Dnvzs+sJTsfcyMiFn2NSmrO/rwMLH4L1Tx+LRZBJxcq7Lboyfchb6O9ql33bcUlJcIE3dG lsJtGlVPcEF7xqxAZQsA3yxMWLVSEE1Alauxzdm+wyqIhBr3IAd49lbh8MzeJ15ETPiZPp csE3TsomZ3C+VZlFVxIDVYv4JnDNyjqW1+bIT/HpS6WtGK0OmAJIzqpmucjL55mhUbX+qo gm5ucOh/Q/vZbMwtCvNuowftoBvZDI2xOv+WwBWKBC25Rd/splhCJGEXZjz3u/Uuh9Du3m oD3JgBixajb5jsCcKBFCeWpfQkaIDs9k3MK2HcL+9R+FGp2pz/MQpuVLaTV4EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lxM8k8BOlEhiakCGU7CAmiYXn8oC41zTeFxiuf/cbA=; b=QSQ4ZUFh78Zx/Q4uGOUxefvfB6J2jKjJ4U4B/B+MFROiTq1k2uFCOOHfDC8uLIkbYkiwii 2bTiziaObb9B00RjlN0s+jkCyALV92pCJ2VG1Uj9/H/bNX88V8lyOC71WU9Skp0lq/9NW2 x1cS+NvQd4XIJis2p9X5CzaD7u8otM2EszDuaJM3Fw88wwhxXR7DCmLSrcWk3FeK08/cRG xOW1RckFC69aT9PuayPbqCcLzXNXicuVzi2lDqvQ6P2Wa1Z8nX7vw+MYQl5qUPfzn6sSNk mTrFQ5K9tZz62NeHzT157z+N1OcbAP5zZUxZXdHtJmw9pzd97vx0zWOGa/6D0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S114S6bh7zlmH; Wed, 4 Oct 2023 16:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394GsGaN038423; Wed, 4 Oct 2023 16:54:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsGkZ038420; Wed, 4 Oct 2023 16:54:16 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:16 GMT Message-Id: <202310041654.394GsGkZ038420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7228ad8da93b - main - bhyve: Move the vm_inject_fault() implementation to vmexit.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7228ad8da93bcce820c85b733972d0d9cc767d27 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7228ad8da93bcce820c85b733972d0d9cc767d27 commit 7228ad8da93bcce820c85b733972d0d9cc767d27 Author: Mark Johnston AuthorDate: 2023-10-04 16:29:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move the vm_inject_fault() implementation to vmexit.c This function isn't generic and has a different signature on arm64. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40991 --- usr.sbin/bhyve/amd64/vmexit.c | 13 +++++++++++++ usr.sbin/bhyve/bhyverun.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index 152fecaf424c..5d903d98f277 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -56,6 +56,19 @@ #include "vmexit.h" #include "xmsr.h" +void +vm_inject_fault(struct vcpu *vcpu, int vector, int errcode_valid, + int errcode) +{ + int error, restart_instruction; + + restart_instruction = 1; + + error = vm_inject_exception(vcpu, vector, errcode_valid, errcode, + restart_instruction); + assert(error == 0); +} + static int vmexit_inout(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) { diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 8d9ad3750d43..027042cf0c14 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -380,19 +380,6 @@ build_vcpumaps(void) } } -void -vm_inject_fault(struct vcpu *vcpu, int vector, int errcode_valid, - int errcode) -{ - int error, restart_instruction; - - restart_instruction = 1; - - error = vm_inject_exception(vcpu, vector, errcode_valid, errcode, - restart_instruction); - assert(error == 0); -} - void * paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) { From nobody Wed Oct 4 18:14:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S12sh1Glmz4vkkt for ; Wed, 4 Oct 2023 18:15:04 +0000 (UTC) (envelope-from EllieMadison@globalprospectinfo.onmicrosoft.com) Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01on2071f.outbound.protection.outlook.com [IPv6:2a01:111:f403:700f::71f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S12sf6hNqz3Tsl for ; Wed, 4 Oct 2023 18:15:02 +0000 (UTC) (envelope-from EllieMadison@globalprospectinfo.onmicrosoft.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of EllieMadison@globalprospectinfo.onmicrosoft.com designates 2a01:111:f403:700f::71f as permitted sender) smtp.mailfrom=EllieMadison@globalprospectinfo.onmicrosoft.com; dmarc=none; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KByBIUmNYKksZJXXWTjAclGhwRvrm8HFaNRYw8pRXpf4QgNlcverefiqtBBCB8xtDjUn3wi08bj0wMIXoSiNv93AQHjH7GeI2keEQK2LJMj1HH+AjalTrhORPnnHgz19JUHX1W3lXEwteXmhblcjPCLWLZz5WOINu9UPheFgvNQ3zLLeL7Tx6IyYgiNYOjbJic+8xNj4X6zCrNfE0Tvuu9RZgPUalFL3aBX/RQYkagAeRRG2FbkEwCc+Y2T5L6WYAbj+ZgaBiS3qxtR3ZjiL8U5w1RsxuphAg/2DofkDfQ3yMA0uQPCJcc2WKnaeTJTEJpWAcDFsk3H8vWgXfWoT7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3rz0rl/9LeKhuBUHmyY9MM1X8rW1tCsPIg48+Gy15H4=; b=N7vvLYPFuKkX1ZvAN1c1Brknqq/WA8BjXTVuGakRof7kJEWY0uaDeSp4wLPxSCql/lVDZAtJIKIwyLJ1wjExWwfRXK1zbbAvZUZtn156HM6UOAzMIjO+xlgA/oUE4uOt5ZfTzwUTXUhOCDk4CGGHN62kS7/dVILr4UnUUHk7+q/TovJuSW70EyXVSiS59kGp3Ms8sB1V6BBbefW9uP1c9oQcoajdYalQPmG6uGKeqo+Q9WTYBdjLv0hHk/L++v9t3z8BpSXxKD2cMq55p3ZZpaGnYlG/2vMVy8HSfWWD9ApVYSpeiDwo1eRB8CB8bAVDxvMDqrGAmQzLLzfVOVTXVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=globalprospectinfo.onmicrosoft.com; dmarc=pass action=none header.from=globalprospectinfo.onmicrosoft.com; dkim=pass header.d=globalprospectinfo.onmicrosoft.com; arc=none Received: from PN2P287MB0398.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:f2::11) by MA0P287MB1973.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:121::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.35; Wed, 4 Oct 2023 18:14:57 +0000 Received: from PN2P287MB0398.INDP287.PROD.OUTLOOK.COM ([fe80::543e:619e:90c9:a8c]) by PN2P287MB0398.INDP287.PROD.OUTLOOK.COM ([fe80::543e:619e:90c9:a8c%4]) with mapi id 15.20.6838.033; Wed, 4 Oct 2023 18:14:57 +0000 From: Ellie Madison To: "dev-commits-src-all@freebsd.org" Subject: RE: freebsd Construction Purchasing and Procurement List Thread-Topic: freebsd Construction Purchasing and Procurement List Thread-Index: AQHZ9u6uijl6x8xs60KjyqtXfTBuag== Date: Wed, 4 Oct 2023 18:14:57 +0000 Message-ID: <6d043c30-968b-4ada-4253-f97fe57140a9@globalprospectinfo.onmicrosoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PN2P287MB0398:EE_|MA0P287MB1973:EE_ x-ms-office365-filtering-correlation-id: 5d52b6d1-b4a2-4232-00b6-08dbc505d113 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xtwvpWUTg+yDUtH5hN1Cu3zxJKfdEgTADW2BEhyzcU8Itb1Ybbj8RT4voIZ+VT92n+9uW14etz+/0zixpX0zPV981UAsIzJC257Czwh59a2YKTxFas7J1cDQM2m7cGcJvZQvgVUeM7SmHEw0rYq/Vc4wy1fqH0SVh6euaDnzZ/u5/Q//33RLhJc8uHtNaF2QuKA5SnlgG/1+Pyg0dPhavQuVgHYg7jZAvsnkz69hm+kfC3SRq7akGxbPvaGdLWoEKpzjGZE6ARv9zv/Ki5FZeelSqSvkULRbdMi/vbwBNN/WklQc8NrcvlqJ+xsxh7/fDi8j+WzIiHKoUMYP0DdQKVe5LaPnXOIy2k5ixAcoESbh2308VJZg1VtBPult+98Jo3A8kaRWrf/UtcIHxBaYIIwnIPxoq9As1/0ydx+OiSNlSxSpzgBgupbkel4psWYvJ1qmVVJnMRYM9d/suR5KgQMGs17ShVMLTWkbSboALegUzqu/uJtPBplvKjhbaisAChId7loT+nxciah+jzROwWg77fMcsynVloLpYG9tnHHbRb66GhWbF8evFYofRySerFzEVsC+JvOtCyv8wfjjoxeGJM4FF1oUYkPDQK5yv5tQ1rZFSEfNkzMFEK8w4DBCZ43wjNRC/pETdiHmWBH1VuOwRY/Cnu4szf4eYlQWfI0Gdb5Y2nR/npZSRhjNPuWDSJJ/VPblPjFm0bmMLffHNJo41KVPmRMtBn2VzhoT+bmUq4Bu40tMsu+jLDOBef4Z x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PN2P287MB0398.INDP287.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(39850400004)(366004)(136003)(376002)(396003)(346002)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(83380400001)(5660300002)(2906002)(66899024)(38070700005)(6512007)(122000001)(478600001)(53546011)(6506007)(86362001)(6486002)(91956017)(31686004)(31696002)(71200400001)(26005)(38100700002)(8676002)(8936002)(76116006)(64756008)(66446008)(66476007)(66556008)(66946007)(6916009)(316002)(41300700001)(2616005)(13220200019)(437434003)(581174003)(45980500001)(6396002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?MG9DdndqYlRsVEVHMi9Ic1JXV1YwUEFtbVltZ0s5dHlHQmY0NTBweXdUM0M1?= =?utf-8?B?ZWRaR0tKOFphMVZhVmVyM3Jyb01sU1QxbkMzMkFWUjAyaUcwOW5LeU42dUpC?= =?utf-8?B?WWdIZmxlTk9jZ1RjM05oYWZaZ1ZYcFBYRjZXbk9PeHdpbXpyS0NQZnJHa3c0?= =?utf-8?B?eWZjZDJkVGtzeTA0YmVaV01peW1BMzNtdGlRTkRVMjQ0QVFHYlJoS1NQNSts?= =?utf-8?B?RTRJcy95cy9ZUkliaXE0NmFsc0x6V0NUMXVRVXlZdXgwVFpuSHBDUmFTZzhl?= =?utf-8?B?T01VZkZySE4xT1RtYStUMUFLTklDaUNlTUhTL0I5Y3lYNFlWYTBoZnF1ZWgr?= =?utf-8?B?NFNUbSs4NE0xMEZHMDhBa0RjZG9ZTnFvQmxjUnJsOGIyeVgrdkY1cldkNmZh?= =?utf-8?B?V3RvcVBMRU1VSUhhaFVIazRoTzByYWN3aVlJOFdmbWp1UmJDYkNpUjQwRm1D?= =?utf-8?B?bFBsV3hBTENEMHFpSzdHSjI1Zm51c1JqeTdIdHlqdkhmUWJUOHlKV2JEK1VI?= =?utf-8?B?blFPTENSYzlXZGtBbG9PSWF6MTAxaFZoTDZwQ1pORU9xckZsT2tSV3VHSlFM?= =?utf-8?B?TmtnL0FKZDErcEttT2txQnJMSjc3OGZBMkVtdUlBS2JvK3VZanNvWGNOb3VC?= =?utf-8?B?TkJMSy9uM2dpT1p4MWVuNTdrbnA4R3BrNml4M1JqWnhwRFJDYlcrWHNVUk5I?= =?utf-8?B?eUdHSUxXaVBVRFc2cFVETU9JNlFka1QyRkJwZFpmckM5Mlk4dEpDRTJKQU56?= =?utf-8?B?b041aTQxOWxPZEd1bXdLaWVkVmljd2RrMkc5OUVxbVJ0OVlOZEpGNlcvQ0Ja?= =?utf-8?B?Qjg0U0ZIL1AvYUNjcFNwSVI0RXhicDhjbm5NTEJ2cVlUUU9mcVRENWdtMkhY?= =?utf-8?B?R2Ftb2FUWG1aNklQQW5FZ3pyZE1SZUQxWk5SMk9vZmMwaDhVZ2Y1OWJtNmRR?= =?utf-8?B?MklnTkswTFpicis5ZStVYW1kbE1QaUhiQy9uTU43M0wxM0JpZEt2VlhlMmM5?= =?utf-8?B?TkFDMFhEdHpvZDNqbFRuY25hb2s2bEtiQ0VVR2twZEtoRmg3S3dOMUJCZlVS?= =?utf-8?B?WjZCS3V6N0lmZ0dIbTIwUFdXbU81Z21UNnEybG9DczlLeHdEUmNGdVkzYjZO?= =?utf-8?B?dHExQ3I2bGdWcnFTOUkyNThhU3B5c1VTU280UnIyWUJ3Q2tjcUpGVzhqdjlq?= =?utf-8?B?bkZDMTdnbEtEdXZabDBZUHhoSk1xZTVWWEsyOVBSREtMVW9VR1NQNk5mak03?= =?utf-8?B?VlBoSk9KWUtwYXozWFhnTVpubkJMQTVkcEphZDAwWTIxbHo0UDk2eEZXSnRW?= =?utf-8?B?TEkxV0VNRHc2WlhjMFNIQlJza3U0Rk4rN25uMXp0UXdoRkhTTU05cEJZcXZH?= =?utf-8?B?eXRUZVZwbC9SaERkU0drbHpDd0ltc2pYMU9kVG9idzgxUDJlL1VZSTByUDl3?= =?utf-8?B?UjNyUE9pNm00L3VmOG94Q1JGQ1JwOUthOHd0NWhLZzNlL0I4SXY3RHBNUHpT?= =?utf-8?B?VE1sRTZEekQ5UVBuTnM1bU1jVUNWMWhOQVhrcEtUN282SzYzdlA0RXFWbDVt?= =?utf-8?B?aUJhOXhQY21paDZkL3JyQmZsdFlQVU9ybTVRY3pXWHlFcFRpTzJIZ1BUd2Ns?= =?utf-8?B?dmY3TGJaRWZhL1hNVnU2eFVKOXlja3BJaVZvUW1CbUQxV3JjZnYydWtJY3No?= =?utf-8?B?NjdlVGFzZVVhZVNvZDl2ZjFDRHhibTUvL2V5WUlEY3VxVkhXU3ZlaElxQVQr?= =?utf-8?B?U0tXSFZoRHFoc3g4d3BWZkgzT29JRnVEWUFwdHNDaElKWXROc05IV3ZqblJz?= =?utf-8?B?TFpNTlFxOWdLSmp4NDQ2MFJEbmtYbWJBclMzMjAvcnNKMjBtM3NwM01TeFVG?= =?utf-8?B?WXNDVWFNenhUVVN5b0dyT3N2N1JaM0ljRlRGY2dzMnA2ZVJuVGtpN3lLTlJR?= =?utf-8?B?b0tmU0hQMWYyemtsTVBWd3dpNDJGdEtwcTBmbDB3YWM0Zlo3WElmSWc0Y0JR?= =?utf-8?B?VngwVTgwS0d0dkxSVDBTUzQxWWpWUTZvb3Q5NndMRmJUeitHeXNOYkh1SnI3?= =?utf-8?B?aU1wWktHV1ZYZXRJRTd1NlF2VUlNRDhEODRuaUhDMldONzNuUmNIV0QxMXlY?= =?utf-8?B?WlJ0YVZQbUpDM2ZoV3ZwWHFuOFY4bGk0bW1ZcTRmc0pyc2tHckdvOXI3OEVj?= =?utf-8?Q?Bahq2xExGNRztrV9QOy/MkKi0kveGPqxUdoT+3j199zX?= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 X-OriginatorOrg: globalprospectinfo.onmicrosoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PN2P287MB0398.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 5d52b6d1-b4a2-4232-00b6-08dbc505d113 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2023 18:14:57.5790 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: db40464e-9457-4711-afa4-9dcb114e15d9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9V8XiCWWO94AqInEiKTu1C7eOq10XpikqUBxOywCX0kX4N0fnpVV4KH44N9zdjSxFtYzoR0h4bUT+v70K0vX/XX/wIbpv7uHY4nOyKLLMD0yPT+P+N0p9jCbbJWw+u4KoC4QPHd7N5ZgIh0skGA53Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MA0P287MB1973 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.14 / 15.00]; FAKE_REPLY(1.00)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_LONG(-0.99)[-0.989]; NEURAL_HAM_MEDIUM(-0.97)[-0.974]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f403::/49]; MIME_GOOD(-0.10)[text/plain]; MIME_BASE64_TEXT(0.10)[]; NEURAL_SPAM_SHORT(0.02)[0.020]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; RCVD_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[onmicrosoft.com]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4S12sf6hNqz3Tsl SGksDQoNCkp1c3Qgd2FudGVkIHRvIG1ha2Ugc3VyZSB5b3UgcmVjZWl2ZWQgbXkgbGFzdCBlbWFp bCByZWdhcmRpbmcgYSANCmN1c3RvbWl6ZWQgbGlzdCBvZiBDb25zdHJ1Y3Rpb24gbWFuYWdlcnMs IFB1cmNoYXNpbmcgYW5kIFByb2N1cmVtZW50IA0KbWFuYWdlcnMsIE1haW50ZW5hbmNlIE1hbmFn ZXJzLCBIVkFDIGNvbnRyYWN0b3JzLCBBcmNoaXRlY3RzIGV0Yy4gSeKAmW0gDQpsb29raW5nIHRv IGZpbmQgdGhlIHJpZ2h0IHBlcnNvbiB3aG8gbG9va3MgYWZ0ZXIgeW91ciBtYXJrZXRpbmcgYW5k IGxlYWQgDQpnZW5lcmF0aW9uLg0KDQpXZSBoZWxwIGNvbXBhbmllcyBncm93IHNhbGVzIHJldmVu dWUgd2l0aCBvdXIgaGlnaGx5IHRhcmdldGVkIGVtYWlsIA0KbGlzdHMgZGlyZWN0bHkgc291cmNl ZC4NCg0KUGxlYXNlIGxldCB1cyBrbm93IHlvdXIgdGFyZ2V0IGluZHVzdHJpZXMgYW5kIGpvYiB0 aXRsZXMgc28gd2UgY2FuIHNlbmQgDQp5b3UgdGhlIG51bWJlcnMgb2YgY29udGFjdHMuDQoNClJl Z2FyZHMsDQpFbGxpZQ0KDQpFbGxpZSBNYWRpc29ufCBNYXJrZXRpbmcgQ29uc3VsdGFudA0KDQoN Ck9uIDI3LTAyLTIwMjMgMTE6NDMsIEVsbGllIE1hZGlzb24gd3JvdGU6DQoNCkhpLA0KDQpXb3Vs ZCB5b3UgYmUgaW50ZXJlc3RlZCBpbiBhY3F1aXJpbmcgYW4gdXBkYXRlZCBlbWFpbC9jb250YWN0 IGRhdGFiYXNlIA0KZm9yIHlvdXIgbWFya2V0aW5nIGFuZCBzYWxlcyBjYW1wYWlnbnM/DQoNCiDC oMKgwqDCoMKgwqDCoCBDb25zdHJ1Y3Rpb24gbWFuYWdlcnMNCiDCoMKgwqDCoMKgwqDCoCBQdXJj aGFzaW5nIGFuZCBQcm9jdXJlbWVudCBtYW5hZ2Vycw0KIMKgwqDCoMKgwqDCoMKgIE1haW50ZW5h bmNlIE1hbmFnZXJzDQogwqDCoMKgwqDCoMKgwqAgRmFjaWxpdGllcywgSFZBQyBjb250cmFjdG9y cw0KIMKgwqDCoMKgwqDCoMKgIEJ1aWxkaW5nIE1hbmFnZXJzDQogwqDCoMKgwqDCoMKgwqAgQ29u c3RydWN0aW9uIG1hbmFnZXJzDQogwqDCoMKgwqDCoMKgwqAgQXJjaGl0ZWN0cw0KIMKgwqDCoMKg wqDCoMKgIENvbnN0cnVjdGlvbiBTdXBlcmludGVuZGVudA0KIMKgwqDCoMKgwqDCoMKgIFByb2pl Y3QvY29uc3RydWN0aW9uIG9wZXJhdGlvbnMNCg0KV2UgY2FuIHN1cHBseSBjb250YWN0cyBvZiB2 YXJpb3VzIGpvYiByb2xlcyBmcm9tIHNldmVyYWwgaGllcmFyY2hpZXMgLSANCmZvciBleDogQyBT dWl0LCBWUHMsIERpcmVjdG9ycywgTWFuYWdlcnMsIGFuZCBzdGFmZuKApg0KDQpJbmR1c3RyaWVz Og0KSW5mb3JtYXRpb24gVGVjaG5vbG9neSB8RmluYW5jZSB8QWR2ZXJ0aXNpbmcgJiBNYXJrZXRp bmcgfENvbnN0cnVjdGlvbiANCmFuZCBSZWFsIGVzdGF0ZSB8Q2hhcml0eSBhbmQgTkdP4oCZcyB8 RWR1Y2F0aW9uIHxQdWJsaXNoaW5nIHxSZXRhaWwgfCANCkNvbnN1bWVyIHwgTWFudWZhY3R1cmlu ZyB8R292ZXJubWVudCAmIHB1YmxpYyBhZ2VuY2llcyB8RWxlY3Ryb25pY3MgYW5kIA0KVGVsZWNv bW11bmljYXRpb25zIHxJbmR1c3RyeSBhc3NvY2lhdGlvbnMgfEhlYWx0aGNhcmUgfCBIb3NwaXRh bGl0eSANCnxMZWdhbCBTZXJ2aWNlcyB8Rm9vZCAmIEJldmVyYWdlcyB8TWVkaWEgJiBFbnRlcnRh aW5tZW50IHxFbmVyZ3kgYW5kIA0KY2hlbWljYWxzIHxBZXJvc3BhY2UgYW5kIERlZmVuc2UgfFRy YW5zcG9ydGF0aW9uIGFuZCBMb2dpc3RpY3MgRVRDLg0KDQpXZSB3b3VsZCBiZSBoYXBweSB0byBj dXN0b21pemUgeW91ciBsaXN0IGFjY29yZGluZ2x5IGZvciBhbnkgb3RoZXIgDQpyZXF1aXJlbWVu dHMgdGhhdCB5b3UgaGF2ZS4NCg0KQXBwcmVjaWF0ZSB5b3VyIHJlc3BvbnNlLg0KDQoNClJlZ2Fy ZHMsDQpFbGxpZQ0KDQpFbGxpZSBNYWRpc29ufCBNYXJrZXRpbmcgQ29uc3VsdGFudA0KDQpSZXBs eSBvbmx5IG9wdC1vdXQgaW4gdGhlIHN1YmplY3QgbGluZSB0byByZW1vdmUgZnJvbSB0aGUgbWFp bGluZyBsaXN0Lg0KDQo= From nobody Wed Oct 4 18:21:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S131C0htYz4vm3j; Wed, 4 Oct 2023 18:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S131C0GdRz3VQN; Wed, 4 Oct 2023 18:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnBcRlL6RYeb3Z9TYp383a/LE4aQuhKpABbuezGWSu0=; b=VcizELk2dPjoPYBKdKbirMPvnM41LjDsxWi8BMZ5mu+hkaflDkoABkltJN1655ANlql5MJ INgPfkUrfBB39YJBfSWrCR81pAyHiGTxNx2Ly/choMBtvV6u8gOtWMWRLnuT8GsEnVAElq 3GHqfyCaCWdmvNoTCJjBXBLxgXXCVGZM0fVTggq8FqGcG705At4aizekfgziAuiF61iM17 Nr5e5PFzd4zzCtSRSbhKaqRJJMS7s31p4ob2+gmpTGCoILFwpk8lnEm2TZqqdtWP3KDd3R AIcAUu8jJAMttlqbh6SEq2/JWqy9QWuTRyD7uyr7hDgjxLIP3ENyBT1bk1zB2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696443695; a=rsa-sha256; cv=none; b=lra1GpeBLyIbZ/7U09TqRePP+cRBq+0rfy+sVkl9KfPIhxY8m3ox3Ple4sDSRS8TEuHpzV L2si1MU/kJ1d4u21kPRoSccG06CNuZarj9B7k8zcueMCCae7r6PgVMWJde4qHRZ9jg58IJ IloLc2emDwXyuG7+/JYdZmmwvZhNkbQqjBbrV6Qoh3nYCYlvdE65w58Jp5TF2uZfUWgN6z nyfMTSHINPDDk3eGcfPWcWkgIg3zP4K4GaYVibgUAw4LubXCphiANSnLa/trP1B4YDgkO9 6E0ORot1T/0Vwdj8jvzFTTTPdQpTc/hU/mUZ4qG22pim6+OXkNpfa/i2d3RsqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnBcRlL6RYeb3Z9TYp383a/LE4aQuhKpABbuezGWSu0=; b=KLBk6w/uECEMIs4rRX0ERCZsDWCxOhFIQG6Jpeoa5U0TdGt5CLPK4nlOidIZXpEJCpTfX8 hTBHBnYv7dFGJnGLOdX6egj1xGgSIXNk7BmXzj49ycylHI7ORs7w8fVbMDpKh4mw5i+Dq1 cyT/L2dQGFUmEVVT7543pzDOrddGDDNfj7G54KrFBLyF2jZSSmA4lVZn9PEm4maXI9xNPa N7+AA+7zHZNoBbzzy9EEgU2sdY9lR/nJ1fi1oc4NTAEKSHBYQVeKo7hAKkEudGlY5aSBFu DmSSJ7+t3jJq/wQUjRzzAhB4+Z8YoQbuoKI5H1AX0sBZXBjUxrhsp5Pba6JD2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S131B6SK0znc9; Wed, 4 Oct 2023 18:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394ILYhQ085834; Wed, 4 Oct 2023 18:21:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394ILYSK085831; Wed, 4 Oct 2023 18:21:34 GMT (envelope-from git) Date: Wed, 4 Oct 2023 18:21:34 GMT Message-Id: <202310041821.394ILYSK085831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 4fe779900b5d - main - linux(4): Deduplicate SystemV IPC defines from amd64/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fe779900b5d9359969426d44679d28d3178604e Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4fe779900b5d9359969426d44679d28d3178604e commit 4fe779900b5d9359969426d44679d28d3178604e Author: Dmitry Chagin AuthorDate: 2023-10-04 18:18:45 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-04 18:18:45 +0000 linux(4): Deduplicate SystemV IPC defines from amd64/linux MFC after: 1 week --- sys/amd64/linux/linux.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 4603835e15e6..918b9129f47b 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -188,34 +188,6 @@ typedef struct { #define LINUX_MS_NOEXEC 0x0008 #define LINUX_MS_REMOUNT 0x0020 -/* - * SystemV IPC defines - */ -#define LINUX_IPC_RMID 0 -#define LINUX_IPC_SET 1 -#define LINUX_IPC_STAT 2 -#define LINUX_IPC_INFO 3 - -#define LINUX_SHM_LOCK 11 -#define LINUX_SHM_UNLOCK 12 -#define LINUX_SHM_STAT 13 -#define LINUX_SHM_INFO 14 - -#define LINUX_SHM_RDONLY 0x1000 -#define LINUX_SHM_RND 0x2000 -#define LINUX_SHM_REMAP 0x4000 - -/* semctl commands */ -#define LINUX_GETPID 11 -#define LINUX_GETVAL 12 -#define LINUX_GETALL 13 -#define LINUX_GETNCNT 14 -#define LINUX_GETZCNT 15 -#define LINUX_SETVAL 16 -#define LINUX_SETALL 17 -#define LINUX_SEM_STAT 18 -#define LINUX_SEM_INFO 19 - union l_semun { l_int val; l_uintptr_t buf; From nobody Wed Oct 4 18:21:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S131D23JQz4vm60; Wed, 4 Oct 2023 18:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S131D1QRhz3VFY; Wed, 4 Oct 2023 18:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7QxVIxQ1EFZ483T7JbeXRTWUYQp3AW5CVZxRfNwvvgU=; b=LJ08NgFjyHAnS6MQ0th0GbT26EKmzNClKmnT1SNZoLHi6kIq889ZTa3TybPpiQd3oNYMpv FTqVGk4crW3U9VxWO7r48lpxAZClNVT466nLUoI9EDW4e4J3I2oo5pyRm5PFE7zFBJc9qf S4C0aamC73MxoJTuu1O1numdzceP4k/oeAhnlRuXHRs5AqydD/IdU228TymZy81Ryw5Mbl l7rtIgXQnVD9BvYkDIYxdTORnVeZuqrTGTmWIO9Cz6wTvm/qb3dgXU0YpuAM39O7tKd8TG 0dFEdxhHwMIfk4PS8Wn2+pTt3kgNAp8z7QPFhVNDZWsPziXAV+4pSXgacc9s9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696443696; a=rsa-sha256; cv=none; b=ESkc7EGRItPc2BLtmrAODKicpuYfjJAJysXgunV9qXZtFhr/15lxBb3hdPJdMUCha8j48S JXT0WVUdjUUVdMMMseaeMtcviZguyomGPkp+yx+97j7etrr14mGNCBjo6aZWOdaM0Oi9ir AZZ1XsRQMfQ9Nv76GAEH6UmuCzKvSdd7GeN9VS8hPswUhs6eh9YJnK9TPncVyKJfshwzgH CmhR7FPh4GxaofMLnI4FJOPvXcG5O0/j4P4X47L20W7l0TWkfeBksq9z0nKZI4I70Qb2hs OEwA6ZAbCayAfWHf7AjysqVp3/JrsDI7QOqc/CBuTSkitru6YCYlBFEDHX55ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7QxVIxQ1EFZ483T7JbeXRTWUYQp3AW5CVZxRfNwvvgU=; b=mgghZgffsYuUhLoDNzbWGOO9LVpDmEcczvjoXiN1ZPNrFsMpUZadocuwdQi5EKrHvMpwSR sNNkIf7zkbjQud1dilx8vx6VQwrVacqMnOL/VpTrPHFSUquRQ8lW3qUm4QlmWasvykyUY+ OY7ymMadvZKa8NeKnMEFPrIBUXL0J97VgS/L/q/DjGVyA/PcmlkCtRiIugI4Q6/JUlsz1b Dq6n0pef/w9KScRS0m9Omr2Hn4xbOkBGBwXFrm4YbhoHBTTE/lebRb+PFC9Thr19EWNXI0 RbfV9dIroTcHsh+LGFgClE35g/y5B/2I/wnWLhn7Zt1y5/offPO0XCFz6qOetA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S131D0MrKzncB; Wed, 4 Oct 2023 18:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394ILZcL085880; Wed, 4 Oct 2023 18:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394ILZJA085877; Wed, 4 Oct 2023 18:21:35 GMT (envelope-from git) Date: Wed, 4 Oct 2023 18:21:35 GMT Message-Id: <202310041821.394ILZJA085877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1ee29160c5e5 - main - linux(4): Fix semid64_ds structure layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ee29160c5e5d8fa70173445b4a6de6742af74dc Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1ee29160c5e5d8fa70173445b4a6de6742af74dc commit 1ee29160c5e5d8fa70173445b4a6de6742af74dc Author: Dmitry Chagin AuthorDate: 2023-10-04 18:21:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-04 18:21:12 +0000 linux(4): Fix semid64_ds structure layout Unlike x86_64, other 64-bit architectures do not have paddings for the time fields. MFC after: 1 week --- sys/compat/linux/linux_ipc64.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linux/linux_ipc64.h b/sys/compat/linux/linux_ipc64.h index 75563c55971c..e3834b909bfc 100644 --- a/sys/compat/linux/linux_ipc64.h +++ b/sys/compat/linux/linux_ipc64.h @@ -101,9 +101,13 @@ struct l_msqid64_ds { struct l_semid64_ds { struct l_ipc64_perm sem_perm; /* permissions */ l_time_t sem_otime; /* last semop time */ +#if defined(__amd64__) || defined(__i386__) l_ulong __unused1; +#endif l_time_t sem_ctime; /* last change time */ +#if defined(__amd64__) || defined(__i386__) l_ulong __unused2; +#endif l_ulong sem_nsems; /* no. of semaphores in array */ l_ulong __unused3; l_ulong __unused4; From nobody Wed Oct 4 18:23:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S133T0BZ5z4vmWp for ; Wed, 4 Oct 2023 18:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S133S6pqgz3W2P; Wed, 4 Oct 2023 18:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DYY5A4xSwgTWTcXCmfxnxoMaitxpRAPC74siEbqGF4=; b=ZK7EwPBKGJSfpYy1SE30Z7FXlWH6gzmGvf8aGfdYNKi9FMxp0pevrQFeH+56dTJyJyPNUZ CjVdvyIaI7GwfQ3d6Mm3QGamgxOuVn2IHO5xpQ4DkQWvmHf5uUmS4pCt0pPkOFwIommPyb kzAo7t/BKYD/VP9bGPa7oHa2GEYNyCT+u3lCP/4/0I98pPi7ODitr9h3DQiV1thKt76N1h wD0b0eVXH6YEG5a+4zOnTmuX/ZrqI42cPemOsU51Cui59+XIg2+p3aysj7e/hP+Z1HiyzB j9I8Ve2KZD/B8/5R0ykCCXIde7j4sluL9SF6ukhcOFDD2i9vgNUEXZ7ywR3D9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696443813; a=rsa-sha256; cv=none; b=TH7oNIQ8KYt9edpgglQxdPjU9QlX19nHj0RJdYjy6gJr0XbMPuMCTYCfjShUcf2LICJ0lO 9tIcKkSnL56s9Jl+jwQiU0r0P2PVpX6MhaEB12m4ZYq0ZyLrqRymwfgOFu2MrYt+DkMaup 8JRwQ6SKyYCBJUlaBNgLGDsWblaoWL8Ctjb8MPcc88bAUMR6zt7sFXjmXOa3NQHNikDqkL YLX6XL5h8ZsTO3vf2776cXYDRzFeZyTVK4kjqwdyWfq6EdfWED6Av4pVCh4SYTCe510W8g 24vJgLfxMSBvScRdCPpEits8xXInqi3OnJ5ORleVOYfLWV0/Yx46cfMceEU3uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DYY5A4xSwgTWTcXCmfxnxoMaitxpRAPC74siEbqGF4=; b=ii7hwcpr5JC1VcTmSocrzlqUCsixTiSNb7IUCMB42EovB1t05w9+uSUwlhnx0oEhMhkRzx d0By59YXeRqwz0oMf6RGiZqTKXhtezMrX3PPZ/QsVoNWVxq6UuL6jj9a506cIBU5LTX2Ou qvTVUO2Eg0oY5Pr3C7p2SmLe/it2V8KVqAsxbPxqsOda0Zo9FmA4WEEtAOV1QCAjlni6S+ M76CimLRXnVpS+Fx+lGhZckGwHcYGD/sQt508Q8GMiLM4VHo39l/CkCBRJ6jLPkrZU6sRn PiOEYYXLZ+VAb5AH7u3+xy4azTsHkZStzhAoohJN2OVLQpcHeFomzYSVudqOog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S133S5ZT9zpPh; Wed, 4 Oct 2023 18:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394INW1O088365; Wed, 4 Oct 2023 18:23:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394INWAk088364; Wed, 4 Oct 2023 18:23:32 GMT (envelope-from git) Date: Wed, 4 Oct 2023 18:23:32 GMT Message-Id: <202310041823.394INWAk088364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 4bbf1f460eb3..7d1b50167725 - vendor/llvm-project/release-17.x - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/release-17.x X-Git-Reftype: branch X-Git-Commit: 7d1b50167725e83cd4b07401b6916b7f0b6919f1 X-Git-Oldrev: 4bbf1f460eb3fabdb7cf7cd731af0c227e6539c8 X-Git-Newrev: 7d1b50167725e83cd4b07401b6916b7f0b6919f1 Auto-Submitted: auto-generated The branch vendor/llvm-project/release-17.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=4bbf1f460eb3..7d1b50167725 7d1b50167725 Vendor import of llvm-project branch release/17.x llvmorg-17.0.2-0-gb2417f51dbbd. From nobody Wed Oct 4 18:23:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S133T0YZMz4vmL0 for ; Wed, 4 Oct 2023 18:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S133T06gSz3WTq; Wed, 4 Oct 2023 18:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=foDYzI7QYFIrcBzvusgQu0q1s71YrqRgdVfT3JjCsWM=; b=dDhD4Y23BzqQI8Ult0gy6IoN7oIBj0GzF4HeIw9IAJDOZBVFwsFdwC2KWevkeRv0DkuLag A2sH4yNisC2Htzkd4eEOCazydH7MyqPfmC7v7dHm8xv4zDbBG6fP+y4BgwHulof40yL3P9 P95rWVDcnazqGtkndDQ09A7QcJmwsNKea5WYas3aUWV2PL/MlxbcwACK43vxe0ONjXQA5u rXAnfSmU8yU8mJGgvilVXBRnWq8z28Xkv6diL3Yi0ABRuVgz6zaNC0k5jgNKmhAIW9xotf L+X08uMIvHL/fZcfDyDh2IHn3uqKqeZ7PqLp4ckBiqdal+KlGJq1slE4Hs5jUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696443813; a=rsa-sha256; cv=none; b=QFkYlmdgv9EFwqWzAnI2ZeN+VtI1UcrqchN0ECDs5uzy7CSU1ZS/dJTjnfc1VRW6H6w7ZE oCm6d1x/C/9A8viGHrhAFlE7JKHMaMw4CsUWatdA+0RuHkGgneAdCPDw/46MjKxg2Xnrdd XuAVuac6IG0+uJIC+bumqdBmGEiYZoRluVGvaxp0vb5ObOXVF384Pf9VrOK1A02LofD4n2 RYuyhZ6JJC3JfnN/HzGGVFBvcbaTb1Xn7KO62L8qPbImYyyMfXo77f+YUffD/weUdr0Omr DKKmTD1b2QHyskbe8T9mgJCu/jufZlHzqsk06CFi2at/EJVyxgWVYNG8r4/TiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696443813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=foDYzI7QYFIrcBzvusgQu0q1s71YrqRgdVfT3JjCsWM=; b=oqSSH2u3B/mpFBNnmcdpzkUujh51iBI3QOc0scrt4zKipGKyN+9Oj1NugP8MhxjMUvnChL D9bwdsJDpTXo/k4oXpt32sUMAThjb3PXLmHnvUbGY3kzy7i4IptyZT7DbJMXKeSekcu4vR mc/p4MEMD2A0LYNW+sQ998EedAihri6QiVhQwiwlTzzIjWmFBonZInKNMRJmj62uvEnVGn bTSCQfjwee/RF/fXbiBUNIGvxHx7PTrEv/+226zRgFT4eYC/lbkVj9yyQelUngCWF6ktau EkDl9dlDsgoM3X6cmU8niWcjFi796ZYUHgZBjoyUvLfEN1CGqpd+tQxyGKanpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S133S6Hx3zntl; Wed, 4 Oct 2023 18:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394INWpA088384; Wed, 4 Oct 2023 18:23:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394INW9L088383; Wed, 4 Oct 2023 18:23:32 GMT (envelope-from git) Date: Wed, 4 Oct 2023 18:23:32 GMT Message-Id: <202310041823.394INW9L088383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 403a42b3f711 - Create tag vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd X-Git-Reftype: annotated tag X-Git-Commit: 403a42b3f711d3b2ca1a78bac99c70e34defb22b Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd tag vendor/llvm-project/llvmorg-17.0.2-0-gb2417f51dbbd Tagger: Dimitry Andric TaggerDate: 2023-10-04 13:43:36 +0000 Tag llvm-project branch release/17.x llvmorg-17.0.2-0-gb2417f51dbbd. commit 7d1b50167725e83cd4b07401b6916b7f0b6919f1 Author: Dimitry Andric AuthorDate: 2023-10-04 13:43:17 +0000 Commit: Dimitry Andric CommitDate: 2023-10-04 13:43:17 +0000 Vendor import of llvm-project branch release/17.x llvmorg-17.0.2-0-gb2417f51dbbd. From nobody Wed Oct 4 19:19:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S14JH1Sdxz4vwSg; Wed, 4 Oct 2023 19:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S14JH11R5z3f5v; Wed, 4 Oct 2023 19:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696447183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSrFfG6KvvYWBed5NsRv22Ut14/5opTsGKII3onS9AM=; b=VK3vrwLZ5cUALddVC80nAXzxCumUd8wwIFp9V/pUnMX9cnuLS2CV6MmthTRROfeiAAeoxI hRsd3ztNgNiag60BZny8PFEPogYpG7TYqBLIJdDqh3BWexpglnsHeMnmU5ksdLpak4TSMg 0ENl7qrgMf/obv/R5kh4pc+O9dJGwiVUGKF+xZxt5UGbxfXKdy29EI3/7pgLzEayjpXaRS YNc9j5YJa01FBBaYhJQqoWmVqghCAkjnF47qy0gkOhqlXHJQ8qWlyKCwFhsBAK2hecya8w QZ2Wx7wTjMP8EvDb4s6QknvM4WAd5dJBRFdsrXChd/4/cXTSzy9mBK2nvm9CcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696447183; a=rsa-sha256; cv=none; b=XylOG+ScYvKmaBYReTszp4ekcyEZYGJ1z7sT0Xy3wIhiFqMny0dck3jvpCz1l8YF0rKCc4 UZfvhG+24HWpSlLd6xaeEdvgv5cifiXeFRqV0P9CEDUMp8ES1IU5F8FYX6zgH2RLDiGmJY R2Rw+c9reE3/DUOIuLEng11LwLDXkZBh24edmBdsHYsvblQhw0Ue9bfeEJr+EhPEuZEAaB yXfBtD+qqd/Vh0N93C/Rpg8B26re1CxrvVzFidVity01lfiF+Bm1DEoUTkFInd5T3pHhJa qSfNMNR+MijQzo3TwU1GAnHNvwipf38juKvSDqDzITv6fuRTyaNZO32e7QOc0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696447183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSrFfG6KvvYWBed5NsRv22Ut14/5opTsGKII3onS9AM=; b=tU3eSOW1uIkeyqFYqFZLtq2ZJQUVC8JZjDJ55xT4L5g11KvwjfacmhxeOiLfSwCmUh+doY Elo+YrjPUtXcYMmHYDe0CL/LIWJ8dPTRJkCzH2oM0uhojYAxlczwERSmJOzXoP+5ukdZW/ ymFWJYLJFoJulJ6njNiTjm1wfWevoDqqPF7Kcft1GakzfRjdDO2horCY4gNYyn71j47MKL 707eNSSc1JuwCw1Fv+yA01VzoXvjvDnNKF97Q83QuE614xkPAVZ96dslyzSwAAcIWog9Dy xEFXMbEzCUG6vczkPDMhd5XHdvTBMjUEy2Jeu5DLGsMYjCAxh+cJMveImKto0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S14JH04B2zptD; Wed, 4 Oct 2023 19:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394JJgET073152; Wed, 4 Oct 2023 19:19:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394JJgUE073149; Wed, 4 Oct 2023 19:19:42 GMT (envelope-from git) Date: Wed, 4 Oct 2023 19:19:42 GMT Message-Id: <202310041919.394JJgUE073149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 8818f0f1124e - main - TCP: Fix a rack bug that skyzall found which results in a crash. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8818f0f1124ea3d0e8028f85d667237536eba10c Auto-Submitted: auto-generated The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=8818f0f1124ea3d0e8028f85d667237536eba10c commit 8818f0f1124ea3d0e8028f85d667237536eba10c Author: Randall Stewart AuthorDate: 2023-10-04 19:16:01 +0000 Commit: Randall Stewart CommitDate: 2023-10-04 19:16:01 +0000 TCP: Fix a rack bug that skyzall found which results in a crash. So when we call the fast_rsm retransmit path, we should always move snd_nxt back up to snd_max. In fact during ack-processing if snd_nxt falls behind it should be moved up there as well. Otherwise what can happen is we have an incorrect mark on snd_nxt and incorrectly calculate the offset when we go through the front path (which is what skzyall was able to do) then when we go to clean up the send the offset is all wrong and we crash. Special thanks to Gleb for pointing out the problem and the email that had the reproducer so I could find the issue. Reported-by: syzbot+f5061a372f74f021ec02@syzkaller.appspotmail.com Sponsored by: Netflix Inc --- sys/netinet/tcp_stacks/rack.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a6e649f78c10..5c16cb9ed23b 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12342,8 +12342,8 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (SEQ_GT(tp->snd_una, tp->snd_recover)) tp->snd_recover = tp->snd_una; - if (SEQ_LT(tp->snd_nxt, tp->snd_una)) { - tp->snd_nxt = tp->snd_una; + if (SEQ_LT(tp->snd_nxt, tp->snd_max)) { + tp->snd_nxt = tp->snd_max; } if (under_pacing && (rack->use_fixed_rate == 0) && @@ -16363,8 +16363,8 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb /* Send recover and snd_nxt must be dragged along */ if (SEQ_GT(tp->snd_una, tp->snd_recover)) tp->snd_recover = tp->snd_una; - if (SEQ_LT(tp->snd_nxt, tp->snd_una)) - tp->snd_nxt = tp->snd_una; + if (SEQ_LT(tp->snd_nxt, tp->snd_max)) + tp->snd_nxt = tp->snd_max; /* * If the RXT timer is running we want to * stop it, so we can restart a TLP (or new RXT). @@ -19112,6 +19112,8 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma lgb->tlb_errno = error; lgb = NULL; } + /* Move snd_nxt to snd_max so we don't have false retransmissions */ + tp->snd_nxt = tp->snd_max; if (error) { goto failed; } else if (rack->rc_hw_nobuf && (ip_sendflag != IP_NO_SND_TAG_RL)) { From nobody Thu Oct 5 00:01:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1BYb1CR4z4wkCC; Thu, 5 Oct 2023 00:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1BYb0GrMz4knT; Thu, 5 Oct 2023 00:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696464099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdpJERkba2HT/L09iKgmFK7L4OO8OcL8xhW3cWcoKNo=; b=xrj5W6XXP048PitRYWOpTp3CLQw0OsZZzt1/Tej0hEZqto7LBipOseykA2WJUZ+0E0LhSq ohgEVPv9wz7bgiSKTce/tDZfqB6CqRUlx+w3qma/kErnx+RTHiFpqje9ZZ4M4vgVaRaT2u /vzIXgoQTI7O7jefI8f8GKaLGl08LkEU/a7l8BtQxLJirQeg8YES29sdhheE4su7EgmbWe 4moMhvbVhAoNpU9XNdavnS+lVMp5OC7t7D7Ad6hoGqDVmRW01v2qWe7zcDNB4gL++TBJmM 8u2dWJ6iIim2iB69es2PuijaECDmSdsmfSr7oD042ye6azkoINAvnlb1MwsxDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696464099; a=rsa-sha256; cv=none; b=U2iZC43sR6e7OAY5xRKpm5eMBWhdhtYaMNMMaPkmUxISJ30KqBxG+W+ZXByGmfTbbzcCOh 66Lx+rRvZcuY6/qDPFYdMqMF112/UcnEu8itYEYFNtdzIo55xt1LluSLzUnwKIMSj1Vy4L tvbCd3lAz7+ZLj0PpS0G8yJUVM7znfKBXHIDwJCyb+efKI+9os0ikW3+aDASMFgK+liih4 SR8ZmLFC1paGY8YZwBCRtRUO5w28B+JN0seAMpd9a9PwyQwh/42/oGqYzskv4pE6sNotl/ WoDUnyvbYDATGV1ojsRE9AVXxMuCYozfNvIWUf3yrW+KiBOMe2tnr4DTO5VIhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696464099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdpJERkba2HT/L09iKgmFK7L4OO8OcL8xhW3cWcoKNo=; b=nKR/ubWMUGcK1odeVnt2o82g66yjEc2ARNW69V0fvH5Kl94ULw4A+1V4NfkXVuFn4oH3gv T8dTYCkVJg9ciwLssyIiPBTYz5NsfuQeQiFowLYYzmfVhoSpHzCi3J6JCzwMOOV+WWTU7P BTZO4bum3MPH+P4gdlORo9ZvpjIQzL9BPsKaPXXn2195wFU3DTiQVA7tYp5RONp2ikYqHV LXs4MtqhL2zu77iroFUQR+DIKoOY68L2J3i+jp16/La/eyyW5fnE2y2rS8Sf0wQg4GAizE axqzvyHDksr8C2KWJE6UmgwsBR2JIWoElIJHhDr/iVHogwrV+tnNfdWCs1YUkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1BYZ6PkWzyV3; Thu, 5 Oct 2023 00:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39501cuo051575; Thu, 5 Oct 2023 00:01:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39501cEx051572; Thu, 5 Oct 2023 00:01:38 GMT (envelope-from git) Date: Thu, 5 Oct 2023 00:01:38 GMT Message-Id: <202310050001.39501cEx051572@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: b9c361e4af26 - stable/14 - libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b9c361e4af26547b7a373d5dda4eb7a6fee4f7c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b9c361e4af26547b7a373d5dda4eb7a6fee4f7c6 commit b9c361e4af26547b7a373d5dda4eb7a6fee4f7c6 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:06:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-04 23:59:43 +0000 libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. Compiler memory barriers do not prevent the CPU from executing the code out of order. Switch to C11 atomics. This also lets us get rid of the mutex; instead, loop until the compare_exchange succeeds. While here, change the return value of at_quick_exit() on failure to the more traditional -1, matching atexit(). Sponsored by: Klara, Inc. Reviewed by: Olivier Certner, kevans, kib Differential Revision: https://reviews.freebsd.org/D41936 (cherry picked from commit 1dc3abb052430279e47c8922d22b30922adcf0f6) libc: Add a rudimentary test for quick_exit(3). Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41937 (cherry picked from commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe) --- lib/libc/stdlib/quick_exit.c | 40 +++++++--------- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/quick_exit_test.c | 81 +++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 24 deletions(-) diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c index 05db690cb6e7..4dee7b20bd2b 100644 --- a/lib/libc/stdlib/quick_exit.c +++ b/lib/libc/stdlib/quick_exit.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011 David Chisnall + * Copyright (c) 2023 Klara, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,44 +28,35 @@ */ #include -#include + +#include #include -#include /** - * Linked list of quick exit handlers. This is simpler than the atexit() - * version, because it is not required to support C++ destructors or - * DSO-specific cleanups. + * Linked list of quick exit handlers. These will be invoked in reverse + * order of insertion when quick_exit() is called. This is simpler than + * the atexit() version, because it is not required to support C++ + * destructors or DSO-specific cleanups. */ struct quick_exit_handler { struct quick_exit_handler *next; void (*cleanup)(void); }; -/** - * Lock protecting the handlers list. - */ -static pthread_mutex_t atexit_mutex = PTHREAD_MUTEX_INITIALIZER; -/** - * Stack of cleanup handlers. These will be invoked in reverse order when - */ -static struct quick_exit_handler *handlers; +static _Atomic(struct quick_exit_handler *) handlers; int at_quick_exit(void (*func)(void)) { struct quick_exit_handler *h; - - h = malloc(sizeof(*h)); - if (NULL == h) - return (1); + if ((h = calloc(1, sizeof(*h))) == NULL) { + return (-1); + } h->cleanup = func; - pthread_mutex_lock(&atexit_mutex); - h->next = handlers; - __compiler_membar(); - handlers = h; - pthread_mutex_unlock(&atexit_mutex); + while (!atomic_compare_exchange_strong(&handlers, &h->next, h)) { + /* nothing */ ; + } return (0); } @@ -77,8 +69,8 @@ quick_exit(int status) * XXX: The C++ spec requires us to call std::terminate if there is an * exception here. */ - for (h = handlers; NULL != h; h = h->next) { - __compiler_membar(); + for (h = atomic_load_explicit(&handlers, memory_order_acquire); + h != NULL; h = h->next) { h->cleanup(); } _Exit(status); diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index a2a6420aba41..860e530389df 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= qsort_b_test ATF_TESTS_C+= qsort_r_compat_test ATF_TESTS_C+= qsort_r_test ATF_TESTS_C+= qsort_s_test +ATF_TESTS_C+= quick_exit_test ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test ATF_TESTS_C+= tsearch_test diff --git a/lib/libc/tests/stdlib/quick_exit_test.c b/lib/libc/tests/stdlib/quick_exit_test.c new file mode 100644 index 000000000000..9feed8a6fa63 --- /dev/null +++ b/lib/libc/tests/stdlib/quick_exit_test.c @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2023 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +#include + +static void func_a(void) +{ + if (write(STDOUT_FILENO, "a", 1) != 1) + _Exit(1); +} + +static void func_b(void) +{ + if (write(STDOUT_FILENO, "b", 1) != 1) + _Exit(1); +} + +static void func_c(void) +{ + if (write(STDOUT_FILENO, "c", 1) != 1) + _Exit(1); +} + +static void child(void) +{ + // this will be received by the parent + printf("hello, "); + fflush(stdout); + // this won't, because quick_exit() does not flush + printf("world"); + // these will be called in reverse order, producing "abc" + if (at_quick_exit(func_c) != 0 || + at_quick_exit(func_b) != 0 || + at_quick_exit(func_a) != 0) + _Exit(1); + quick_exit(0); +} + +ATF_TC_WITHOUT_HEAD(quick_exit); +ATF_TC_BODY(quick_exit, tc) +{ + char buf[100] = ""; + ssize_t len; + int p[2], wstatus = 0; + pid_t pid; + + ATF_REQUIRE(pipe(p) == 0); + pid = fork(); + if (pid == 0) { + if (dup2(p[1], STDOUT_FILENO) < 0) + _Exit(1); + (void)close(p[1]); + (void)close(p[0]); + child(); + _Exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK_EQ_MSG(0, wstatus, + "expect child to exit cleanly"); + ATF_CHECK_MSG((len = read(p[0], buf, sizeof(buf))) > 0, + "expect to receive output from child"); + ATF_CHECK_STREQ("hello, abc", buf); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, quick_exit); + return (atf_no_error()); +} From nobody Thu Oct 5 00:01:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1BYc2bv4z4wkJ2; Thu, 5 Oct 2023 00:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1BYc1Zb3z4kZ6; Thu, 5 Oct 2023 00:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696464100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmtIpDfYICeLglyrxBLDp/p5d46zE+ozXuytpQy2/E8=; b=t08kI0U+Ls0obKc7ITTUE8MQwVlqDCsvtDTRLTa7g1LkFuQeFNkda8sf5EgZDT9mGLHBEt IHxfzAtKxQHhf00YQ1V+tEiSsXVP4G9V7D9KNk6/8t0XeaayfboHAdwg7xmAYU9YbYtO9z 1mn+6ByR7WE9vrpfBiOGl/rLpN5g23ZI0vixTQGnaNRdbCywKH/NPfsLDb5e07gSkv534b JmkJl+HgwSuT4VlyiE8V7nURotGsvos1QDqbLAdLfEc//tBs9nrqOzwQPVW/gWTYe2tH0m i0BX2qQunDR/OH1Nk1CMcdMa6Ezaqr8SDcqFN4xaFInNcvkb80Eujj4DgqLlyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696464100; a=rsa-sha256; cv=none; b=nIjvGH5zXLl/JfOu7Q8L9+nOZ/rKh46m9tO/Botxjp4FmBcb25kFi4eCKa7TAypF1UU6Fw 1xaNljc/gRFrm/z3HRw3aqRRjPHdLTAc/if6mi6AjKJEBf1KpZXZjzEgL+loypaAxxxsFb IHMWiC+NEtZsRhPGbfN1V1f3NFAbAcn/YKltkRV4lHEJL5GxYes5YEw6wIYn6xTbOnKGax LAlxUFegTQOWgXFkf/Mnf6VVrf5s1/hVQGXfiO9NyU1fqMll8YCG9zgqY1WaoV8MyYZKpY 5HRMOvt+sO35w73MzW02/JRB0yg1eyUi6IKlViZP3NLCQteQwfxYfgXqUpW56w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696464100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmtIpDfYICeLglyrxBLDp/p5d46zE+ozXuytpQy2/E8=; b=IMETtufsW3GfKKesRiQMgtOGecpcaYRThCv5pl37FeGiHxqha2lDJDkksq6FaR2Jp/8jMC 7aVpnLAKNDhCCNq7meF4iTr2P9R6/uyk4FaaYBLqJcVScrQxhbCr3E5wkRV0xgwTH2N06E gL1iEtfOAzQiF/BDIMyhkxTXgYG5KS5Sy96CWlDtQZnd2+VsTGRUnS6maE1ZF7sxwYiYWk TMCOuH1mIWuCAUErhRxDxnsXoMUSPiBxtD0XBjnwve5Bpqi2+LFuezj2lBHx/WEV3fYlDa 4eujCBBQ5O/CPMmEi7OouUoA7akHiCjNhwiAUg+/+EiWNBlP6Z+4C0d9TUUSjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1BYc0YrHzyHv; Thu, 5 Oct 2023 00:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39501dBT051624; Thu, 5 Oct 2023 00:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39501da2051621; Thu, 5 Oct 2023 00:01:39 GMT (envelope-from git) Date: Thu, 5 Oct 2023 00:01:39 GMT Message-Id: <202310050001.39501da2051621@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: b3cef2d2f538 - stable/14 - split: Further option parsing improvements. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b3cef2d2f538671551b30c918267bfbe246d225c Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b3cef2d2f538671551b30c918267bfbe246d225c commit b3cef2d2f538671551b30c918267bfbe246d225c Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:29:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-04 23:59:44 +0000 split: Further option parsing improvements. * Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and style issues. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42010 (cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45) split: Improve GNU compatibility. * Like GNU split, turn autoextend back on if given -a0. * Add a test case that verifies that -a turns autoextend off. * Add a test case that verifies that -a0 turns autoextend back on. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42011 (cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615) --- usr.bin/split/split.c | 89 ++++++++++++++++++++++----------------- usr.bin/split/tests/split_test.sh | 19 +++++++++ 2 files changed, 70 insertions(+), 38 deletions(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index af1ed69c9482..e246a0d4adfc 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -63,7 +63,7 @@ static const char sccsid[] = "@(#)split.c 8.2 (Berkeley) 4/16/94"; #define DEFLINE 1000 /* Default num lines per file. */ static off_t bytecnt; /* Byte count to split on. */ -static off_t chunks = 0; /* Chunks count to split into. */ +static long chunks; /* Chunks count to split into. */ static bool clobber = true; /* Whether to overwrite existing output files. */ static long numlines; /* Line count to split on. */ static int file_open; /* If a file open. */ @@ -73,7 +73,7 @@ static regex_t rgx; static int pflag; static bool dflag; static long sufflen = 2; /* File name suffix length. */ -static int autosfx = 1; /* Whether to auto-extend the suffix length. */ +static bool autosfx = true; /* Whether to auto-extend the suffix length. */ static void newfile(void); static void split1(void); @@ -84,8 +84,8 @@ static void usage(void) __dead2; int main(int argc, char **argv) { - const char *p; - char *ep; + char errbuf[64]; + const char *p, *errstr; int ch, error; setlocale(LC_ALL, ""); @@ -106,20 +106,27 @@ main(int argc, char **argv) while (numlines >= 0 && *p >= '0' && *p <= '9') numlines = numlines * 10 + *p++ - '0'; if (numlines <= 0 || *p != '\0') - errx(EX_USAGE, "%c%s: illegal line count", ch, - optarg ? optarg : ""); + errx(EX_USAGE, "%c%s: line count is invalid", + ch, optarg ? optarg : ""); break; case 'a': /* Suffix length */ - if ((sufflen = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal suffix length", optarg); - autosfx = 0; + sufflen = strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: suffix length is %s", + optarg, errstr); + } + if (sufflen == 0) { + sufflen = 2; + autosfx = true; + } else { + autosfx = false; + } break; case 'b': /* Byte count. */ - errno = 0; - error = expand_number(optarg, &bytecnt); - if (error == -1) - errx(EX_USAGE, "%s: offset too large", optarg); + if (expand_number(optarg, &bytecnt) != 0) { + errx(EX_USAGE, "%s: byte count is invalid", + optarg); + } break; case 'c': /* Continue, don't overwrite output files. */ clobber = false; @@ -130,22 +137,27 @@ main(int argc, char **argv) case 'l': /* Line count. */ if (numlines != 0) usage(); - if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal line count", optarg); + numlines = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: line count is %s", + optarg, errstr); + } break; case 'n': /* Chunks. */ - if (!isdigit((unsigned char)optarg[0]) || - (chunks = (size_t)strtoul(optarg, &ep, 10)) == 0 || - *ep != '\0') { - errx(EX_USAGE, "%s: illegal number of chunks", - optarg); + chunks = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: number of chunks is %s", + optarg, errstr); } break; case 'p': /* pattern matching. */ - if (regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB) != 0) - errx(EX_USAGE, "%s: illegal regexp", optarg); + error = regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB); + if (error != 0) { + regerror(error, &rgx, errbuf, sizeof(errbuf)); + errx(EX_USAGE, "%s: regex is invalid: %s", + optarg, errbuf); + } pflag = 1; break; default: @@ -163,9 +175,10 @@ main(int argc, char **argv) --argc; } if (argc > 0) { /* File name prefix. */ - if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) - errx(EX_USAGE, "file name prefix is too long: %s", + if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) { + errx(EX_USAGE, "%s: file name prefix is too long", *argv); + } ++argv; --argc; } @@ -182,16 +195,16 @@ main(int argc, char **argv) else if (bytecnt != 0 || chunks != 0) usage(); - if (bytecnt && chunks) + if (bytecnt != 0 && chunks != 0) usage(); if (ifd == -1) /* Stdin by default. */ ifd = 0; - if (bytecnt) { + if (bytecnt != 0) { split1(); exit (0); - } else if (chunks) { + } else if (chunks != 0) { split3(); exit (0); } @@ -225,7 +238,7 @@ split1(void) /* NOTREACHED */ default: if (!file_open) { - if (!chunks || (nfiles < chunks)) { + if (chunks == 0 || nfiles < chunks) { newfile(); nfiles++; } @@ -236,24 +249,24 @@ split1(void) err(EX_IOERR, "write"); len -= dist; for (C = bfr + dist; len >= bytecnt; - len -= bytecnt, C += bytecnt) { - if (!chunks || (nfiles < chunks)) { - newfile(); + len -= bytecnt, C += bytecnt) { + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } - if (write(ofd, - C, bytecnt) != bytecnt) + if (write(ofd, C, bytecnt) != bytecnt) err(EX_IOERR, "write"); } if (len != 0) { - if (!chunks || (nfiles < chunks)) { - newfile(); + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } if (write(ofd, C, len) != len) err(EX_IOERR, "write"); - } else + } else { file_open = 0; + } bcnt = len; } else { bcnt += len; diff --git a/usr.bin/split/tests/split_test.sh b/usr.bin/split/tests/split_test.sh index c9b87c01618c..48065719055a 100755 --- a/usr.bin/split/tests/split_test.sh +++ b/usr.bin/split/tests/split_test.sh @@ -209,6 +209,23 @@ autoextend_body() atf_check -o inline:"$((26*25+1))\n" cat xzaaa } +atf_test_case noautoextend +noautoextend_body() +{ + seq $((26*26)) >input + atf_check split -a2 -l1 input + atf_check -o inline:"$((26*26))\n" cat xzz +} + +atf_test_case reautoextend +reautoextend_body() +{ + seq $((26*25+1)) >input + atf_check split -a2 -a0 -l1 input + atf_check -o inline:"$((26*25))\n" cat xyz + atf_check -o inline:"$((26*25+1))\n" cat xzaaa +} + atf_test_case continue continue_body() { @@ -249,6 +266,8 @@ atf_init_test_cases() atf_add_test_case larger_suffix_length atf_add_test_case pattern atf_add_test_case autoextend + atf_add_test_case noautoextend + atf_add_test_case reautoextend atf_add_test_case continue atf_add_test_case undocumented_kludge atf_add_test_case duplicate_linecount From nobody Thu Oct 5 02:28:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1FqX6vkPz4vtJG; Thu, 5 Oct 2023 02:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1FqX6NKJz3Qlr; Thu, 5 Oct 2023 02:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696472936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OHfKCR01GRKH4YhPXmfQegIeLF6xNLIbDqMHa1VG+2Y=; b=oTLQZTxmXVyjkX2oktyuh3XGpPVjB3Go2N30vcrEVHtKr3rcEREjwLrrnkEAuKsPQ0X8bB lCr6uCXiVfbyw5EKUHlXCYtQVSWQyH6943ZzAXbSkMxN8Lc0sRmRGHAW14GMPNhj06J22g X6aCleJDzYV7d3YPVgpw9PaE42IzKJxqZnZwhVg7O60lJqu2bc0aKrAyjvUJwpfBl0GX29 EIJdqc6lJl21MQWDmOVz4rc6oBtQl3eIgex6qjQuaaW/17gJusR4mqXAHLhyBJMPm+qa/e TxqItY29JAUuXajTV4TvF7D0uiOqA1sqWqZfRU5Q9cSjvzjkW68b1+WHJ0EeMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696472936; a=rsa-sha256; cv=none; b=cqFSnUy3TsDAHmHINHHwb3AthG0Uhx1CMLRSpyQ1n/uMXWJhQUpQJebMAnnOvedyFgpeiM KwSkrElQSsdQNClPbkmd8bCkM0MY4X79HjRjRZN8el4/yaRZ1jhPIGYCd+86BWmhIlbZyi /N12AGQW1mP5yJYdd3pZsWGeeZq//t16wl3I/VetBxZB2V/AS9mvQF+KJZdG0z3wfVgJ40 xmmsLrAoAlBqWPm/29wHuHn0CtGu8jswKytenORaUdeKzdhQ+4r5H5sDhXEZ4qDXGl3j1a 2KuEX4Mlaum3R5JUzr2jF6Omh74XhHUsTOhCT3zlRJRToDABDciNoRRZYEaZvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696472936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OHfKCR01GRKH4YhPXmfQegIeLF6xNLIbDqMHa1VG+2Y=; b=ZIfRYhk51P1I8v7V0qFJvRXiaWgw4Z19v5cZY+L8QSaaBgktWlKDTL0iwEG4FUJ7DXclo9 XVKg9NZ2zqkX8Mz0V+RY8B7zPtBglbY3JSAHoxrqryHp0axQchpIAULYQqtXCju18cHMRC fLVJkX2QzSY/R2+cPrhO6tck5FxA3vjuGdtVjqZ79tkEhZcYAB584OmLZjlmbvfaW1LxI7 rCiJrJkGiIvGQjoPX6WEOVFEgjnKy4W4I6G2QNEocP4tyESlDLqON++byEsqkEr7ZK+KAI tVBNZZegwzhzhM2fH5r843Rvcu2YL/CHPhMUgEGQ9tKJDFFxdia/iPx4ZQ8s2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1FqX5Qrfz132K; Thu, 5 Oct 2023 02:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3952SuCr095191; Thu, 5 Oct 2023 02:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3952SuUi095188; Thu, 5 Oct 2023 02:28:56 GMT (envelope-from git) Date: Thu, 5 Oct 2023 02:28:56 GMT Message-Id: <202310050228.3952SuUi095188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9b03a5de73d4 - main - bectl: fix some `mandoc -Tlint` complaints List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b03a5de73d41f98b9b3c8e250a58f62f3e48d61 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9b03a5de73d41f98b9b3c8e250a58f62f3e48d61 commit 9b03a5de73d41f98b9b3c8e250a58f62f3e48d61 Author: Kyle Evans AuthorDate: 2023-10-05 02:26:55 +0000 Commit: Kyle Evans CommitDate: 2023-10-05 02:26:55 +0000 bectl: fix some `mandoc -Tlint` complaints The EXAMPLES mis-comments caused an obnoxious amount of blank space above SEE ALSO when rendered by mandoc to a terminal. The missing termination of .Xo meant the description of -h ran together with the subcommand synopsis. The other changes were generally ignored tags due to context that simply don't need to be there. Provoked by: grahamperrin --- sbin/bectl/bectl.8 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sbin/bectl/bectl.8 b/sbin/bectl/bectl.8 index 718f4e2597ae..19cd867df56b 100644 --- a/sbin/bectl/bectl.8 +++ b/sbin/bectl/bectl.8 @@ -15,7 +15,7 @@ .\" .\" @(#)be.1 .\" -.Dd June 28, 2023 +.Dd October 5, 2023 .Dt BECTL 8 .Os .Sh NAME @@ -114,12 +114,12 @@ For instance, booting into the recovery media and manually importing a pool from one of the system's resident disks will require the .Fl r flag to work. -.Pp .Ss Supported Subcommands and Flags .Bl -tag -width activate .It Xo .Fl h | .Fl \&? +.Xc Print usage information. .It Xo .Cm activate @@ -396,7 +396,6 @@ will force the unmount if busy. .Pp Unmount will not remove the mount point. .El -.Pp .Ss Boot Environment Structures The traditional .Fx @@ -482,11 +481,11 @@ A future version of may default to handling both styles and deprecate the various .Fl r flags. -\" .Sh EXAMPLES -\" .Bl -bullet -\" .It -\" To fill in with jail upgrade example when behavior is firm. -\" .El +.\" .Sh EXAMPLES +.\" .Bl -bullet +.\" .It +.\" To fill in with jail upgrade example when behavior is firm. +.\" .El .Sh SEE ALSO .Xr libbe 3 , .Xr zfsprops 7 , From nobody Thu Oct 5 06:53:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1MjG1YT8z4wZmD; Thu, 5 Oct 2023 06:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1MjG1519z4QFw; Thu, 5 Oct 2023 06:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1m5QY8CPXW77sYcv+0RZt9/7dTtBnkPj7QbpzfeQQHU=; b=qsZHlZCLbD19CV6rcdXbhsG8Ilh7glKX4JQWxu83VSjhJfj8CpLtr9zisqPXt5ftXcBHEH o2NpEkTmePP1cBLi0oaxR41NkihbPWXWUetrKMmYyEktOCZGm49AIVjxZERQO64HaiwwQ2 YV0qodnIBVclZAEEjYE9s63yYoMczxKlXmReRdUi5eSJkppF7h6k6QSh/fQ3fqBFuyPytC w/WUv14Msfvu7XJdyZ/1m+KsSXAWHA7ajqKREkMraCfFY2Dv8kuMoVJfUIWhTryV06sE6Z fSBKk8Z3VFXzny8nlhJ//JCer65JbrKD/yA6K2DIFmwKGOIAZN2RUkxkKYQ9eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696488834; a=rsa-sha256; cv=none; b=RMM5jFS7lxgrBYT0+TcN384WiXKwvTR9oAHO7fHiG5HZwWHqeNQ+dyy4xlSkZCafDG7Nst YbWh/vaydNfuF5MnnEwX0MaLMfB1N4+MqWFyu+cV0IIsc5YlAbhddB0Qb7s7xsQLepsUYm l2ifktfMs9eeGPCbFKSu+7P7KYIbUYUpX3nWxOshgNgYahxBoiCPlaprATan7WL8rG5cPS zXWx4FpU4XTDv1WRGOgt/vprHKAYPUr45F5+ZrdA3tQBZNPIJ+XbGff/7kT3dbQD0zl4nx zILIra4w7F7+DlgXZCI30L09KCp2T3YiBDDdbDiscmdD84JcWBvk0/uveEKwWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1m5QY8CPXW77sYcv+0RZt9/7dTtBnkPj7QbpzfeQQHU=; b=WepLnXtRtTzQHmOLd5msf66BKxdLlzt2xIxcV2iKmgoQDeubPwW7Nc62LjnzUPzLZHiava F9RqHBI6jnttCAco4ywlx3LGw11poWkMkBW0qLQ5jyee7lGnXOyf59Xq0KHhM0eEZdCrlq E/sYjtVsHRDvyIT+le3afjho0F5utVOtf+WUM4pgopS6Ak1h+ZuE6SKxtnvBvfRjSe74F/ D/CO+VSfi3D9MRkgTx8IWpvT0o8FTVcaUehtMqU+PnzQm89stvmwhXA+uScSE4zXTMHN/q dDYGZY/4EA5FGHWP4IWGfkOh9bbyTUpNPhqPmdhD/KaJ3wx/Q2jpvFMKkZ8hmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1MjG08Xzz19jq; Thu, 5 Oct 2023 06:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3956rr3s042167; Thu, 5 Oct 2023 06:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3956rrHd042164; Thu, 5 Oct 2023 06:53:53 GMT (envelope-from git) Date: Thu, 5 Oct 2023 06:53:53 GMT Message-Id: <202310050653.3956rrHd042164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e4545d163576 - releng/14.0 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e4545d163576947da4e982e321b5670dc6b0e62f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e4545d163576947da4e982e321b5670dc6b0e62f commit e4545d163576947da4e982e321b5670dc6b0e62f Author: Dimitry Andric AuthorDate: 2023-09-14 16:39:31 +0000 Commit: Dimitry Andric CommitDate: 2023-10-05 06:53:32 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64 PR: 273776 Approved by: re (gjb) MFC after: 3 days (cherry picked from commit b9c012a60b6e98f7c3e765859195302cf3ae7f6c) (cherry picked from commit f03512540805694c75edb72f3aaaccbe47e69bd4) --- ObsoleteFiles.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a59151dad4ea..45670b228aaf 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -382,10 +382,13 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-armhf.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -396,9 +399,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -418,8 +423,10 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_interceptors-x86_ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -437,34 +444,41 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Thu Oct 5 06:53:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1MjH2gFfz4wZS1; Thu, 5 Oct 2023 06:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1MjH224fz4QfM; Thu, 5 Oct 2023 06:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcjdQYrlLXYf5teUIlL59CF/vInd+QMQJ1nHWR32T00=; b=trw8gIyaXrgEip6DfNLTyGNTElEu242rhwMorWwDYgIaQXvyt2m80oUx4wGo2t9yPuKyt4 uW5xKVM5yM54RT6ynVIrl8o9j04ZZkiQr7YJsWlJvZeK/73Z9x8ui7Y7gPaiX9Qa6Bfglc MBdi1baBdny9vFKOtWl8TYI5Lj9nhqFjTde+jNHFL5O+VaJfYnaYyAN0ZkMB7vtg82M1vh RekODHVYrEi83pXafCTcRqdmDB93VYYWVvgmvNZkojZOtt6MrrqA1cOL7mAce1iUtrU0Yl EJIZAQz/V/BY8ncMa5MEqI/S3cO2Abhmt3fF0Kx4CNIpgp+MNf3cqzmB4AinSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696488835; a=rsa-sha256; cv=none; b=hHunZ8YYanh2kQV5qSNgqg7xfWY5D55WjykYmsKWKbPbipcObJkbAwRolcix7PV8XY0fEv d2Hq/xHFv7FQq6K7UAweCSf6BI5fVreh8JPZ4aJCwpmF1Pv/iyBgo23UBuQnQSIYk6Ho3r ciHMuNDEy/BNx4f6uNVUr7rYRH8G0Lpfkd1A/eN5UeF75ZZhS0vGBlcXX8eDurKbHFNkvR 12g39GOxPKuUgIeYxNlQxrvZrzTWo2qkT/C5luaS3fl0kd7VsRrsHGBUJZEESE6P2nLxD9 DHKxJfdGTRBqt7ilttDczodoBG02YZ5Y+wIC91ccggOrEC1L91UuWYZv5Woa/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcjdQYrlLXYf5teUIlL59CF/vInd+QMQJ1nHWR32T00=; b=iOVrEzK243s9xiaHH2NpESvqZfkL4pbN4eOLpChJohpJdz/s2CHWpyfS+k0FSW2L8XQ5f4 z9DAdVuQXQk3CHwZBX+a+ebrN27M4tJzmfTieqmvbBBhBBc5DxcRHSOS/CGRKzD5AuOK79 ofocsT0igimV9VW/RBt5ecbVDdPv6m/zOozsNOQU8m0n6Ntug3mRAri5Px5hZwqKyvXYSe KqpOYAhKGtU5NQXc9PP5d3R6utFftoO4HCkoXkPzXOFlr0DBKautd54vu2QUt9UtXhnmDL iIX0qopoEogRMQaTW5mO4CINGasjN+BVBIcji0dMHEyWDgzknG8MaHlF1QbhRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1MjH13zwz19T6; Thu, 5 Oct 2023 06:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3956rtPX042215; Thu, 5 Oct 2023 06:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3956rt3o042212; Thu, 5 Oct 2023 06:53:55 GMT (envelope-from git) Date: Thu, 5 Oct 2023 06:53:55 GMT Message-Id: <202310050653.3956rt3o042212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 716d96e90988 - releng/14.0 - ObsoleteFiles: cleanup old libclang_rt files for powerpc64le List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 716d96e90988e57713dd00680a0bf8c596f141d9 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=716d96e90988e57713dd00680a0bf8c596f141d9 commit 716d96e90988e57713dd00680a0bf8c596f141d9 Author: Dimitry Andric AuthorDate: 2023-09-16 07:47:19 +0000 Commit: Dimitry Andric CommitDate: 2023-10-05 06:53:32 +0000 ObsoleteFiles: cleanup old libclang_rt files for powerpc64le PR: 273776 Approved by: re (gjb) MFC after: 3 days (cherry picked from commit cadbf320b352b3691cdfa90ad8ba818efca4ea68) (cherry picked from commit 0cf2f7f35877161a3d48877fcd249a9a32d9cc70) --- ObsoleteFiles.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 45670b228aaf..eec5c4231f7e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -384,11 +384,14 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-i386.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64.so +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-powerpc64le.so OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-preinit-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan-riscv64.a @@ -400,10 +403,12 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.asan_static-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.cfi-arm.a @@ -424,9 +429,11 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.msan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-arm.a @@ -435,6 +442,8 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a @@ -445,6 +454,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-aarch64.a @@ -452,19 +462,23 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.stats_client-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a @@ -472,6 +486,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a @@ -479,6 +494,7 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-aarch64.a From nobody Thu Oct 5 06:53:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1MjK09f5z4wZpb; Thu, 5 Oct 2023 06:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1MjJ3DFsz4Qc6; Thu, 5 Oct 2023 06:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxp8nkLDeLnso3eQDQfZ0vLHSrHzW6Ml5U5gc0g6QCA=; b=eGhPAUaegf3LsDkiyFeu7K7sepANZ0bqHGOR1E1iCExuI5t5KLReH0PwtN0kxSCMmE7+r3 1bNvcudfaatR4B4DsJ974dZAgS2b8AgjbKfrlYNCIayph8DS8SZ0LZ0bR8beOiVVcFABKw lSQdka0KwXYBkpAr70R/3iNTDuJPzJ3jWOu9ZEx1gwjrB/JkIcHTXnyxlCqyA227twRl7C cVh7LsuuqKWshK4hj1tKAycUF1jBPPfLZL2qRN8R+cz//aFclOON2YwX9YPcmMHKchavbw pgZhXOOJrbMJp4zKr7BS2LnR15BnAir4Bc136n3tOCVGe2AhOONKCV9Z2ZJwMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696488836; a=rsa-sha256; cv=none; b=SVagT05IilKVXsySHyYFiHnt9RLDX02RDiMjum4FnBjBrSMHDRJeewcrlUx+SDDfmDj/Ol mKvggPRiVTzwjcAaUpu2N7zkRMiBbx8nTad+kNphoPzaq+R4dXac33CN660FI2qENX0EsC BQNo/+4IpZhb4yKmDnoivw2MRCakZNsfaifHI2avd/RZDr8jCdGUtBYLwNX+5bH6bu+Mvj M/F8Jb8lcupcfwChBdpNNK68g1cXupcWHh9RewUjE2aNIwQyHVaMxuZF8IixI7WatumHSC Rk1wr4yJPh9KpmoKf8WQYFNvRvyw2AkJnuFvNyvtxK7R/ihXpjYiQHXHIVIVrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxp8nkLDeLnso3eQDQfZ0vLHSrHzW6Ml5U5gc0g6QCA=; b=SlNoi1iIArTl2is0l8PUTG0l2tXwywpxaVyZ90AJzM9bpwIzd69NcGSAWsWA+WQm5C2Ylr nyGMUW6BKBGJBeV8a3UFnrDwz824tLFcfcNV5YOkdX7QHUjzj18BiSmBrR5aukWGr76EXO 1eRucDxPE180qqELs+9UBewvnd2zL2X1EDBuuyVtPmS11xewtUjm+9Nz2pk9Os8XH6Yrpb dYm8m+MSdliyppdW0D1YMDif8SOk4tUmAgn8jyaIG+Amx3oROh5rVvvaouGs3u6kU84yDN LB5DlTZChJ9KZptD32eHtcu6G/XPw2lYWvNriE3po4i6omuBBl+IJhW4KfYJ3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1MjJ221Vz19T7; Thu, 5 Oct 2023 06:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3956ruxu042268; Thu, 5 Oct 2023 06:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3956ruYS042264; Thu, 5 Oct 2023 06:53:56 GMT (envelope-from git) Date: Thu, 5 Oct 2023 06:53:56 GMT Message-Id: <202310050653.3956ruYS042264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1bab7cb52ca4 - releng/14.0 - ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1bab7cb52ca453c438563502acb78d7d4251dbce Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1bab7cb52ca453c438563502acb78d7d4251dbce commit 1bab7cb52ca453c438563502acb78d7d4251dbce Author: Dimitry Andric AuthorDate: 2023-09-19 11:45:57 +0000 Commit: Dimitry Andric CommitDate: 2023-10-05 06:53:32 +0000 ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le PR: 273776 Approved by: re (gjb) MFC after: 3 days (cherry picked from commit 8a99263e9da1f04ede967cfa1ea6d52d258dcbe5) (cherry picked from commit 237b0c5b22c95683c2367ef0a82f54c309309db4) --- ObsoleteFiles.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index eec5c4231f7e..df9d286cd039 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -503,14 +503,18 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-armhf.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-basic-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-fdr-x86_64.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-aarch64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-arm.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-armhf.a +OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-powerpc64le.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-profiling-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.xray-x86_64.a OLD_DIRS+=usr/lib/clang/15.0.7/lib/freebsd From nobody Thu Oct 5 06:53:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1MjK6c41z4wZvK; Thu, 5 Oct 2023 06:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1MjK3kMlz4QRF; Thu, 5 Oct 2023 06:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUw/+0EHNJY0pwnSFkjc4Ii1RbaM92WP/FW/NOlGrE0=; b=uWFWyBBSiMDc7/6HNuQTnKeWaEW5AlpT5J8ldeZD3vsHCP9EjJX+AqH/2baxTnabg8hYeB ZfVclsuZbRimQtiU3gKW4q4FtHbxnuHqLok8l7QudgBkNZ/Vd69/Px/zRThRNQbY2L2DXX KXW9PK74Ek6dsAsk8qTayzRrU9u0e3DpXHrW5kjn1Go45JNMS5Hl1k24nurqiUE3OMnW8p OrWyGBrdTF1569mar25DqkYmktNgZ4HIMyAQv3R9EDM9su0NcoiQUmkeWcOHOGTJQVSwGn 7R/+9HKjHhm+1pNWSCJ+f4WaphD7hDV1azT1lBpo66vhlwtADsmnOMVkRYeqzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696488837; a=rsa-sha256; cv=none; b=x8943T/cqZGHlsD1q32ywL8UmeAfGYyQ+iQQY5PUiAvnrpqy/pf1pQCOzQTh0CwaNfQ6N6 0zIuHQK4jSPmTnGHw9G1lTrBuK9y3aSw5Y3NSx1JMRCWcySORNFsG2d80T/FlUEpIKYjYH Gm9oeJh72rMy/HqFIf4KiNGYYIsF5oODti7R6P8M8fqHyZ3nF7OAH01tNr0H/KjPV8ecbV E89DO1ReFBhFSm+sZ9MMk/gm3T7OOlb65Nt73lah+a/ryx8aEn0FBT/Jtq9LZFX59F7H99 3hMzcP0BYFyx+H0xxxBFGKEO89/jXg5jbCuGAUGuCkb4nCMXEMRwAnttP65FTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696488837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUw/+0EHNJY0pwnSFkjc4Ii1RbaM92WP/FW/NOlGrE0=; b=Q7sxh7QZlSTFWVmvOVtkx3tgfQacnJwZdpQWK50n1fMzsrzy8A4Bg5xL//HPk3F63KkyU8 UmrRrCqa7a9CLCFUqOoziA/oUtY+qvUIZ6hcWfqPu5vzBAW+XzM1WQOP1bW5QSX4az5UeO f1h4WVFS5XEGeVuvyLZHKEQdAkkg8dt9x/e7p7OEOz5GHhEf0ouNFAA19iZcX/7d8wZXsj StWL0O1TEKJGO4jwS8yfVCBnF2oGGmmkJ9FbpUGVCy8neqUtz2ZfQ6YmqxXA8twd/XwPRu HKzYW5wvAzHo+Q2qfrXOSwUzamv7KTaLUBB9a0bn57YdrLEnlkQmQcsc76oeig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1MjK2qxWz19T8; Thu, 5 Oct 2023 06:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3956rvLp042325; Thu, 5 Oct 2023 06:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3956rvCt042322; Thu, 5 Oct 2023 06:53:57 GMT (envelope-from git) Date: Thu, 5 Oct 2023 06:53:57 GMT Message-Id: <202310050653.3956rvCt042322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 83b704e29ef6 - releng/14.0 - ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 83b704e29ef625864db5c2d268a70aad7b8b1026 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=83b704e29ef625864db5c2d268a70aad7b8b1026 commit 83b704e29ef625864db5c2d268a70aad7b8b1026 Author: Dimitry Andric AuthorDate: 2023-09-29 18:41:52 +0000 Commit: Dimitry Andric CommitDate: 2023-10-05 06:53:32 +0000 ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries PR: 273776 Approved by: re (gjb) MFC after: 3 days (cherry picked from commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3) (cherry picked from commit 2d5eb9b95a9d99c0a80994fc932f6ad0589f69ed) --- ObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index df9d286cd039..589f6b968e9d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -442,8 +442,6 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a From nobody Thu Oct 5 07:26:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1NQt36kQz4wfh0; Thu, 5 Oct 2023 07:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1NQt2fS2z4VLZ; Thu, 5 Oct 2023 07:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696490790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fJde0wwwbH20byxRVjMUm84JAY/zI5uPKX6SQc4XvZ0=; b=Y8WDSlmTvggEbO02AtQ/XpvIBzwZq7vgNoo+Tpq7Gm1LPojS97+eOMuZmns5XZxn6P0j28 6tJsBOwhKtF8iyNP7T4bVonxVVcuLzOoBW2C3CrwwtZlLacSQgtXbfBD66QClOSORlVIYz VsUHasCpGSj3t1oF6WSNy2uPYvg0Hsil+I614nAWpzeJZWDoxaQCCkCGmJfkr+5g3MbDGK k9eLQqSJsjndxELIhePR1X37KZ+hrCcHKpsNdxPvVv1bdW7G1ej5zP+5kOo539RBmICt4r R3TRxxaQ6ZWAJ+JspEJ70iT8YPEGvwPH2i+KtyM+zW+2Bsg3TO9JRU9iQ/DOZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696490790; a=rsa-sha256; cv=none; b=ssds+9NfcU2WGj9Lvp2Rp0Yn5Q5qoxcqvzqYaPiI5uUlMbZLIw3SujjCCJdaUvQMHtiqHu 992Jl1xaRWS6k4SHzWLdZKxn1NnPGNulMozTtFTbKa0uIJFNLa4S9zT5AogUXo3W4B274z aLntUwaIR+v6CKGLzVJR0BsVmjoZtfV+O2lyl+YUxvsJu6KXQC613RTy7OomuNHCkoP+KL 3+/FMTLCL/U9OStfI48RvXRgG+HJoayZ97RC9YjtZxVTWzM4Sek9GsmsGJYmBI3G/4jWFe WP/Oklv1AR9ibCc5y5odToS+BDU0rA2b31h0QJPBpsyz0ZzJCHEZOgH6UlSD0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696490790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fJde0wwwbH20byxRVjMUm84JAY/zI5uPKX6SQc4XvZ0=; b=F7YZb50zW8c0e8MefyB4SprAgiRFF1IePEYVk4hLYLiyOB5ByyYKDfp/9onSudZ0P8XEH2 CNxtqDYP3xFHba2FR2Xr3TWncQbrTj2LX5D8gOzQPLTZsmJKKsgPavk/1tYmdzbio6qDIB 9+LR6yjTAEZs9orHL2ifNcBEipQtb8KqYUzXrya/0BMz7mjobDRHXOCvvTaD6k/ZN/Pn9t cYDi/UlIhsfJqEY2d4xAAp47jrPsSuVITeck0bc2jYOnbzS+QEkxdeQj4DgaW/tRbpUjLi 0xSuqSNE5NPerWO3KxRpdg1ka/JlkzLsprJNOnSvaGkyPzB5+nu8JqILqRfE4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1NQt1Vxsz1BJT; Thu, 5 Oct 2023 07:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3957QUJD093183; Thu, 5 Oct 2023 07:26:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3957QUN3093180; Thu, 5 Oct 2023 07:26:30 GMT (envelope-from git) Date: Thu, 5 Oct 2023 07:26:30 GMT Message-Id: <202310050726.3957QUN3093180@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: fb058a9a40a5 - stable/14 - libfetch: don't rely on ca_root_nss for certificate validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fb058a9a40a5adc82721ed822fb4fba213446a7b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fb058a9a40a5adc82721ed822fb4fba213446a7b commit fb058a9a40a5adc82721ed822fb4fba213446a7b Author: Michael Osipov AuthorDate: 2023-10-03 05:53:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 00:03:16 +0000 libfetch: don't rely on ca_root_nss for certificate validation Before certctl(8), there was no system trust store, and libfetch relied on the CA certificate bundle from the ca_root_nss port to verify peers. We now have a system trust store and a reliable mechanism for manipulating it (to explicitly add, remove, or revoke certificates), but if ca_root_nss is installed, libfetch will still prefer that to the system trust store. With this change, unless explicitly overridden, libfetch will rely on OpenSSL to pick up the default system trust store. PR: 256902 MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42059 (cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59) --- lib/libfetch/common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index fd2091791620..dfa742577585 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -1055,8 +1055,6 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" -#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -1066,12 +1064,6 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) if (getenv("SSL_NO_VERIFY_PEER") == NULL) { ca_cert_file = getenv("SSL_CA_CERT_FILE"); - if (ca_cert_file == NULL && - access(LOCAL_CERT_FILE, R_OK) == 0) - ca_cert_file = LOCAL_CERT_FILE; - if (ca_cert_file == NULL && - access(BASE_CERT_FILE, R_OK) == 0) - ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From nobody Thu Oct 5 07:31:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1NXf43Rnz4wgPF; Thu, 5 Oct 2023 07:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1NXf3bzHz4W7h; Thu, 5 Oct 2023 07:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696491090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WMoiyZp6+CKg400UNLzRpeh4LvVJNWBkGBWRzCVUUPE=; b=xvw8O8EX3O0aFHLC8FzeM2FtOm8UGjEL5M1K0fKHLZVCJMA+KvEKJtOGCcyZWBs8L//YIT ntisB2vWWcViXzbot4QwA5I6uyw9rucqN5gPicnbBCXkBoTwK3svx8Pf8+dhRgXtusEkF7 7pbfBI+0KU2M29cxylnzYPOi4s5JWuaiX7Deu28lKfS1XEAfh/EDhWgDnPgsVksoCy7NsJ i0jnrCkrqk787I+hutKdKnzH/GdhgE3NimSL7XT/uxGG7ez0P3tyXBtGqnMCW3qBEsPEYV dtks3WOPND3kE5oD3iBGL3wS16G3KKXz2O8gmwfG+V67iRxYXFnSXZ5oxx7Bjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696491090; a=rsa-sha256; cv=none; b=P4zRqk8dTuRM4nEUOoD/VP/JN3ig/fh33AkFdD85blNL+X7z+Z9wuGxGTCb0a3rWYxhPp2 wEG2nT8zFT0eHawgrKQrG+NBfJc3Lqil3tSX0jrtQtwhJ3GAVzadRYvj00QT6M9+p+ipYD Fa8KwHwO7ljyTo0MydaOjOVGAEYo1nzbPhw3qFNV/k/A5/6N2wVBwQfvAL270cTdA+GXdI c/9w39m+IdELrfDs8nwlKJjeUdyjS3Q2KJRM60DDu7SyPDgdcQuITfVoTavlI0xfNmurxN 5jG/qh4MM5idazfJOdRfQANvTdfNw62ViklZtNTIt0uKg9aHXkHyGfzdLL0MWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696491090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WMoiyZp6+CKg400UNLzRpeh4LvVJNWBkGBWRzCVUUPE=; b=eZE6apBUK7THxoIlOH9+SFtZUBRcOEQUjo22lxjcfwuFNimc5trWRrJswJNQv62tlnc+zN 6WNu1ktZwg70BdvNCeX81XbiC9ndYVwOeCbNDKcVZnWNZX0dYr+txMj8RXLlKlNXwToFzR CVtBnXtTSf4ilgMpAsJT8Giy8xiv4vhVm9+IcDQWOVmRVz0O6oFlXMY4qNaHD9wB7TOlTi ia0FDqK9mMYg5D4/TH3g/jBb9KVHlstgNdvA1GDz2pKPOAKncTzTZb6HnC5ac+7yeOBZt2 uvbpFYqQPuJ0Ok8AZuR9Y6X4OWkF8THyTvPSqC/ifWnaYZC0gXJU4ZPD2Mj2TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1NXf2fbhz1B5h; Thu, 5 Oct 2023 07:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3957VUNF003299; Thu, 5 Oct 2023 07:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3957VUPl003296; Thu, 5 Oct 2023 07:31:30 GMT (envelope-from git) Date: Thu, 5 Oct 2023 07:31:30 GMT Message-Id: <202310050731.3957VUPl003296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 30e9abf2fc46 - main - bsdconfig(8): add bsddialog(1) support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30e9abf2fc462084b752064fa814d90ad3161352 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=30e9abf2fc462084b752064fa814d90ad3161352 commit 30e9abf2fc462084b752064fa814d90ad3161352 Author: Alfonso S. Siciliano AuthorDate: 2023-10-05 07:29:12 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 07:31:18 +0000 bsdconfig(8): add bsddialog(1) support Add bsddialog(1) to bsdconfig(8). This can be considered an increment not a replacement, `$DIALOG=dialog' restores dialog(1). Differential Revision: https://reviews.freebsd.org/D37480 --- usr.sbin/bsdconfig/share/dialog.subr | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr index 5b7ae9123073..0b6f11f39134 100644 --- a/usr.sbin/bsdconfig/share/dialog.subr +++ b/usr.sbin/bsdconfig/share/dialog.subr @@ -51,7 +51,7 @@ f_include_lang $BSDCFG_LIBE/include/messages.subr # Default name of dialog(1) utility # NOTE: This is changed to "Xdialog" by the optional `-X' argument # -DIALOG="dialog" +DIALOG="bsddialog" # # Default dialog(1) title and backtitle text @@ -79,9 +79,15 @@ DIALOG_OK=${SUCCESS:-0} DIALOG_CANCEL=${FAILURE:-1} DIALOG_HELP=2 DIALOG_EXTRA=3 -DIALOG_ITEM_HELP=4 -export DIALOG_ERROR=254 # sh(1) can't handle the default of `-1' -DIALOG_ESC=255 +if [ $DIALOG = "bsddialog" ]; then + DIALOG_ITEM_HELP=2 + DIALOG_ERROR=255 + DIALOG_ESC=5 +else + DIALOG_ITEM_HELP=4 + export DIALOG_ERROR=254 # sh(1) can't handle the default of `-1' + DIALOG_ESC=255 +fi # # Default behavior is to call f_dialog_init() automatically when loaded. @@ -2221,7 +2227,14 @@ f_dialog_init() # # Process `-X' command-line option # - [ "$USE_XDIALOG" ] && DIALOG=Xdialog USE_DIALOG= + if [ "$USE_XDIALOG" ]; then + if [ $DIALOG = "bsddialog" ]; then + DIALOG_ESC=255 + # else it is already 255 like dialog(1) + fi + DIALOG=Xdialog + USE_DIALOG= + fi # # Sanity check, or die gracefully @@ -2229,7 +2242,7 @@ f_dialog_init() if ! f_have $DIALOG; then unset USE_XDIALOG local failed_dialog="$DIALOG" - DIALOG=dialog + DIALOG=bsddialog f_die 1 "$msg_no_such_file_or_directory" "$pgm" "$failed_dialog" fi @@ -2261,7 +2274,7 @@ f_dialog_init() if ! f_have xauth; then # Die gracefully, as we [likely] can't use Xdialog(1) unset USE_XDIALOG - DIALOG=dialog + DIALOG=bsddialog f_die 1 "$msg_no_such_file_or_directory" "$pgm" "xauth" fi HOSTNAME=$( hostname ) @@ -2283,12 +2296,13 @@ f_dialog_init() then # Xdialog(1) failed, fall back to dialog(1) unset USE_XDIALOG + DIALOG=bsddialog # Display the error message produced by Xdialog(1) local height width f_dialog_buttonbox_size height width \ "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$maxsize" - dialog \ + $DIALOG \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ --ok-label "$msg_ok" \ From nobody Thu Oct 5 07:55:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1P4Q0yMBz4vlNR; Thu, 5 Oct 2023 07:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1P4P6ZQsz4XlD; Thu, 5 Oct 2023 07:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696492533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nNAzmby5bGsRw3sNU6rgTdUC/XfoBkR4r+8xMA2s1xA=; b=VydB10uNGdcxN5ii+rqVytfKPptkjapKZ4DiAsnserROOFo34OVEJiGlitAMwJNQMHEzVg Le+JO/StzmA2lIhGqISqO1IHlnst5D0kcAiZ1uw7JyupUIDKpltkPpCOyP1iFH/TepvWin eNwGLLWXIyWSXX4PoZkd8arXEYS5e3rB7Qv/1r4Sil6VkYDtx/sWfPzsG7hhWm2yNAKe8G XeY1WhBRQ+MbWDFmflJJiawtfKhVzdWfGGPUGOmgCirC0WfaCrUqSS5qiCvREOAEqD/bB7 4po1tNOjABgbzpiVotnAHaOkFpooC0FDA7tyyih9CZTZfovMTgJw+Q23YwnkLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696492533; a=rsa-sha256; cv=none; b=MiR+2CITfPZfMMczk0+oepCJX+EbF4cGE7vQnChVsMyPEZucohDzpLoobhHKMYfOGskMii iWUEAxnu1kuesiXgfpL5T2LXzzSkWrMXPm2iR8H1B8SremAWOPweARP9+k5jxACzK8QGls 1EXQySlpkrhGZhYhh+QVtu+xk1Xu+HLkcsT+S6huwcVoGZLpBkMSLN+0cp2uqAeErryunt CrRV6ifakHd3APukUL0eTLB0sxO8TksykN78LM33nctQgTjjRZTvt9Ad1vL+Xxxxfx2EJN 2zLzlLpMknwESE5dSpuLZ1fphk1ng5fVWGv9TXJkbnxg9+lr+PTqvwwa+kx4Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696492533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nNAzmby5bGsRw3sNU6rgTdUC/XfoBkR4r+8xMA2s1xA=; b=L8Wm2UdDl/ojOuYN+mbh9RG5Qv0eAC+/MmO53ZXzv5lfxGjJE4ke6NhANHNpRK/1UxBX0W kxDTvgngWXM4vRKK2KSjIgTDYZBR39kUNMRNpsyLnAsLKJyuko72ZN4RTc0OjX9LWhboSm 4W9Bi7qZ9GSz9E6qL5OfukGhmbtxa5pu0/LQCVYE0M9+gJzfrj1MlEc0VMSlPjnzHM+BRF cOBlzZWco8fgznduaLZiWHclW/dwe8u5Sien21vmiJz0TYo4DOU/ZjumORlYo9jFPt98DS ayG3/XZxzeF14Tc35kmaJjuLJVOnXHvcCaAI6oXWlWe2qmhqEL7ASVjUWOqvog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1P4P5gHyz1Brm; Thu, 5 Oct 2023 07:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3957tX61042666; Thu, 5 Oct 2023 07:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3957tXDo042664; Thu, 5 Oct 2023 07:55:33 GMT (envelope-from git) Date: Thu, 5 Oct 2023 07:55:33 GMT Message-Id: <202310050755.3957tXDo042664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5b9f08dbc7a4 - main - bsdconfig: always build and install List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b9f08dbc7a4a08117ebf2b4a0c9046bda571f95 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5b9f08dbc7a4a08117ebf2b4a0c9046bda571f95 commit 5b9f08dbc7a4a08117ebf2b4a0c9046bda571f95 Author: Baptiste Daroussin AuthorDate: 2023-10-05 07:51:16 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 07:51:16 +0000 bsdconfig: always build and install it does not depend on dialog(1) anymore --- usr.sbin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index ca8b87a134eb..bdc45c87e3bc 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -6,6 +6,7 @@ SUBDIR= adduser \ arp \ binmiscctl \ boottrace \ + bsdconfig \ camdd \ cdcontrol \ chkgrp \ @@ -128,7 +129,6 @@ SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_OPENSSL}+= certctl .endif SUBDIR.${MK_CXGBETOOL}+= cxgbetool -SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp efibootmgr efitable efiwake .if ${MK_OPENSSL} != "no" SUBDIR.${MK_EFI}+= uefisign From nobody Thu Oct 5 07:55:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1P4R108Qz4vlNS; Thu, 5 Oct 2023 07:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1P4R0NM9z4YCh; Thu, 5 Oct 2023 07:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696492535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tYzWS0bg6owQ5VttukqtBPyfYMEZ3fcQTGDgEehKgcw=; b=dXSzT3j2UCT7zvV9h2LGPP9SdyuZHHoT568H1984hF9EIEDCRgwg4qUmVQWl/4GYmFvYFy uZya9mCE7Bq4ykVaoeMmlShmhkkFDlK44KjYXq54z8ykebZYE+GXsrwtkaON3mQ5YwSi7Z zLbcc3eI53ucvHH7FkUMZJ+U+HTrs/UeUvrrl1C3PR/Y2jKyK87r3ggci+d7hZMYXzR3KX 9ZcNMqAX14oiaNlbj93PP5mUoAEEHEEP5gZAmTLulvGbGFgisUmn0hnL4Fwe+dxOYVJwhQ uTkgLiiG471rRdnoGkCyCC3Qr/h5veYfOT9PcjfFEfrd+O6bp+9HmtZIoZmSZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696492535; a=rsa-sha256; cv=none; b=jRHUf7MMRBV1QjZM3Ni3cSZLKXVW52mg57FxMrFok0k0ulWXCyX0KfFnaYljREJdGmhh3f YVxUcGPJ4iJnKomBjg3y4By4kZJVHWUstBEhiSL82+qkmF0laDRlgjysvOLiINbMe0WBuM nUve6HQz68RkFfIfFJS9pL4ObGtMPeNl8byT63Fk0prq/Oy6qSDnUjiF32/8nDMP9e53Wy pBs+3465VggHkv1UcMad2+rsPCpXoTe4xnybVo9uK2GMs7gnnN4CIf5H2W+YiP1TcZNbcH 5KuEYeMNUFmvwFdyQ9k4awRi0KC45c3FZPvev3ptRqyS80ux6RgoyXQrr2/umw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696492535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tYzWS0bg6owQ5VttukqtBPyfYMEZ3fcQTGDgEehKgcw=; b=BsxVhvPh+6tOK7p3gwKC4gM6a1DeTKsC45dcWBrJeJw5/OkNbEjrrTOB6U3QutsdXvfJA4 c1sfZaLfGWDSKhdjnzw6QMNe/L/9VZ8XMBUqmybtF79P4cPyuTuhm1Pw1CM8wMqHn+I6Ov nNX9gSmszbGy7+SJBk1hR+FqJSkQevzUxiUWbI0f06uHiPbMn3OolfFgDggq2zF4x1y6bt 8lnEU5eAFv9otU2STl8vjXbwSXicxyT0ARvAhGXp32JiQ1aDIgsR7pPm7bDyWlKmnBtmWq HK1c7aGzDr2DVJwO27nd8eTAkFtDoz2BZl3LT298jP+yCcsfRhyE/rBcMjDgMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1P4Q6QpKz1C1q; Thu, 5 Oct 2023 07:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3957tYu9042712; Thu, 5 Oct 2023 07:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3957tYR9042708; Thu, 5 Oct 2023 07:55:34 GMT (envelope-from git) Date: Thu, 5 Oct 2023 07:55:34 GMT Message-Id: <202310050755.3957tYR9042708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 166a655fcf13 - main - bsdinstall: decouple from the MK_DIALOG option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 166a655fcf136fac9e461f3201a52dd4a959a6da Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=166a655fcf136fac9e461f3201a52dd4a959a6da commit 166a655fcf136fac9e461f3201a52dd4a959a6da Author: Baptiste Daroussin AuthorDate: 2023-10-05 07:54:20 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 07:54:20 +0000 bsdinstall: decouple from the MK_DIALOG option bsdinstall does not depend on libdialog(3) or anything using libdialog(3) for a while now, it does not need to depend on MK_DIALOG anymore --- share/mk/src.opts.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index c234a9829fca..16b2433244da 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -404,10 +404,6 @@ MK_KERBEROS:= no MK_KERBEROS_SUPPORT:= no .endif -.if ${MK_DIALOG} == "no" -MK_BSDINSTALL:= no -.endif - .if ${MK_DTRACE} == "no" MK_CTF:= no .endif From nobody Thu Oct 5 09:54:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Rjt4XSnz4w7Pq; Thu, 5 Oct 2023 09:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Rjt41Rnz3LLN; Thu, 5 Oct 2023 09:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696499682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tf4gwilzt75cmyhjLTdmIH3OYqNrIYlvmUL1xAThxEo=; b=DfJRAYmUz69HKnSGfwBgyCCd+F8i53/qdPsc7vHyc4mCyxxuF7TjQH0z63Z/+znViKetNl /tv+zrDZEZSkvz690titTslEf+CIu3Nea5f6U8b73s2STuTw040x46sO6yPAGAhPZ13X9v WUuNbcGFZNnVDXNqkQ+TMKcI27V/zoYUZAGCxnAXARZGajxAsF68HbVi2Ev+MhjYxWtiXN SJOA5nxKwuwQMtBfsyQeBckAi2dWyHu1sUtZha+n0n8AOyXj9l/OTsSADYslEWf6/LLHsW D5eiwTtHnSpznmglTYweAw9MQZAHbb7wXAIPJ46NqZxQIk4r5LmC4s2T5xFwTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696499682; a=rsa-sha256; cv=none; b=jNIfF6AHkE/XvEvjqVIou8t04at+SYdKatDMDwKC7N9e6YKvKgvU73KYVNLGzKeKlyHwZX 6h3QKLK/cT28J5dDM1OmUO8UHfWHYlgv8KMUp9kWMipqUWhom0gbALAjKpe146AFAS7nSz J4y1tim0U/rDiW0Z+WSudf+pp+Z/jzXInYIBdF9fUugI5Kvol2PEifDxKj71KWFBwdfjsc u1Dp6/CJCiXlFtkkai5QGX1Xwvi6O+gp+dQTY8cG9axusBFv0En0EBk+NEYCLIZZUcHRe9 sdVltqBQpcK+C9O4Jfpz5LcDh6QbcTXNmoFARs6gqt47BSK2HQpB+j9l81xIgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696499682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tf4gwilzt75cmyhjLTdmIH3OYqNrIYlvmUL1xAThxEo=; b=h7ySrIpQA025PNR5hoYAi65XHB21Rz5ynTAkpG5F5oo22kRiFdNTVf+JHvHG0uHmwfQyIA nUpODFsjBt52sinYo1MqwhOhhM+9Y3HA+EttI49lLtr48J02MNJ0U8rnniT1takaovOvKa Y9eYRRruPBvsgRXtD8bl9Ukgf/kaPy4WVkuX7MZHRrxo55MVl+/fNa5oBkrVxQDsJ4Mp0C xt7VIvw4JVpdHfQGz+HG02oobU07n0+GkAOVPW0duxQPn5IIYvsT+SCvkLl3EWNtX3V5kO WwJ4Sx53LfxhvBQQ+oBCxs4SwuRHfG35HNY7mDzQe7cEdoke28N5ayOEZF1I1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Rjt35Ckz1FV8; Thu, 5 Oct 2023 09:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3959sgtU043479; Thu, 5 Oct 2023 09:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3959sg2p043476; Thu, 5 Oct 2023 09:54:42 GMT (envelope-from git) Date: Thu, 5 Oct 2023 09:54:42 GMT Message-Id: <202310050954.3959sg2p043476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 956a46311462 - main - if_ovpn tests: fix ra test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 956a46311462423f97b2410065f8caff2c630701 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=956a46311462423f97b2410065f8caff2c630701 commit 956a46311462423f97b2410065f8caff2c630701 Author: Kristof Provost AuthorDate: 2023-10-05 07:41:25 +0000 Commit: Kristof Provost CommitDate: 2023-10-05 07:48:49 +0000 if_ovpn tests: fix ra test Client one is supposed to be assigend 198.51.100.2, but sometimes it loses the race and the address ends up assigned to client two. When this happened one would try to ping itself, which failed because the loopback interface isn't up. Ideally we'd generate static address assignments, but that would complicate the test. Activate loopback interfaces so the test always passes, and just try to ping both possible addresses. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/net/if_ovpn/if_ovpn.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index c052a6d7eb47..bbaffa0bce73 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -805,14 +805,18 @@ ra_body() ifconfig ${bridge} addm ${two}a vnet_mkjail srv ${srv}b ${lan}a + jexec srv ifconfig lo0 inet 127.0.0.1/8 up jexec srv ifconfig ${srv}b 192.0.2.1/24 up jexec srv ifconfig ${lan}a 203.0.113.1/24 up vnet_mkjail lan ${lan}b + jexec lan ifconfig lo0 inet 127.0.0.1/8 up jexec lan ifconfig ${lan}b 203.0.113.2/24 up jexec lan route add default 203.0.113.1 vnet_mkjail one ${one}b + jexec one ifconfig lo0 inet 127.0.0.1/8 up jexec one ifconfig ${one}b 192.0.2.2/24 up vnet_mkjail two ${two}b + jexec two ifconfig lo0 inet 127.0.0.1/8 up jexec two ifconfig ${two}b 192.0.2.3/24 up # Sanity checks @@ -890,7 +894,9 @@ ra_body() # Client-to-client communication atf_check -s exit:0 -o ignore jexec one ping -c 1 198.51.100.3 + atf_check -s exit:0 -o ignore jexec one ping -c 1 198.51.100.2 atf_check -s exit:0 -o ignore jexec two ping -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec two ping -c 1 198.51.100.3 # RA test atf_check -s exit:0 -o ignore jexec one ping -c 1 203.0.113.1 From nobody Thu Oct 5 10:54:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1T365SL8z4wHq7; Thu, 5 Oct 2023 10:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1T364wCLz3SGl; Thu, 5 Oct 2023 10:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696503282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy0zBtFfrI9wHSwbD7ssVzolNKn4eHuuO9Q0FiY8rLk=; b=VCCXRWGsxL6Aqzy4xeoTRmuLToCPmabEaN7Rq+HwluaJ+fQ3JD4qYu1CFDYFEBlTB9hZlA gfm5KYWhZqPFVvw1N7ASkXtOeY9oPMdgF5kloxJbHXShmif/kKFNlqR7iaEsH3iJiCRFOd rrN8wvNH60DqcEH/IDGWzsXF0seD/uXgD4PwEx5gXo9qrQnqdVDZj0bV5hMOIUDf34t5Ys 4nLqsoj5OvlVQv1+QERoBMRfdGyD5dEdLjHFWYa+v+FsSPEIkOCfrOO+fnmfRtScozhMWm 2gjxSODoQdzbT+olF4Sd0ZtHwlaVP/HQCjYDUQBtq5asLHIXHFndtI8eD35UYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696503282; a=rsa-sha256; cv=none; b=tWecsbiug4RX9W+YpuwPhX/Fta5WOkD9HvKOYlZp+NxqZM0pMH//tRpjER8RsqBdJr7Fan HqztyU+06NqRdeysijrpDhH4NkATJkb8DguWe3x/Lb/OayNx3/JVlGl2LrVePXeOP7mENv Y7gqcGMG9VHdWD7rR489bZbszdRkSGbhpEAvUH2djy2EVGA0w+57PiaY0/Tw60hUHAQZv3 GtaUpBK4F4wgwZLGTpVnYagyCxXjb0HAHhGiS3XZSjTHf6JSBIFhL3hzflrQHP5IKadDMI T22LkEnQF7iq+nPaEe7EFB9HfPxG5x8VAH6cH6q5IRNbEBgY4pvipEqD8A4XBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696503282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy0zBtFfrI9wHSwbD7ssVzolNKn4eHuuO9Q0FiY8rLk=; b=xnIkmCtDaq3vGGk3PwdiTdxE2cfSD26SDXQ+qFl8HeDTYrgfawUdnNM6mHJWE9dbUYICHy Ad3hxA1cnceKyEOQzJU+HH2Qs7SvGQ02d/7MmLejfi0UWeUALzjQH/QHe5Le5ctcyWCClg vDKEd12pIvzdqcCK/EVi1fvA8YVBXh+FrMLBOVPJGAnCbs+cwcg9VJMm6TImYGeTb4AZLb Xk/eU4KMXzxfqCRMl4JOzpgN6ZVqRlFrMjTgWksimf4XqU0FXtVxb7UMy5vJF4rprwtI/Q 96FIOBlmCac5cU9JZvm3vimJFvBEKu3pBX78lbthEpsBoEmhiKHo0i+SxzkAxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1T363sV5z1HQR; Thu, 5 Oct 2023 10:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Asgj8043923; Thu, 5 Oct 2023 10:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395AsgBC043920; Thu, 5 Oct 2023 10:54:42 GMT (envelope-from git) Date: Thu, 5 Oct 2023 10:54:42 GMT Message-Id: <202310051054.395AsgBC043920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e19b2ef976d3 - main - genl: add a monitor subcommand List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e19b2ef976d326d34b17331c5071d9e687d0d5d5 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e19b2ef976d326d34b17331c5071d9e687d0d5d5 commit e19b2ef976d326d34b17331c5071d9e687d0d5d5 Author: Baptiste Daroussin AuthorDate: 2023-10-05 10:51:02 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 10:53:47 +0000 genl: add a monitor subcommand usage: $ genl monitor this subcommand allows to monitor the message from a multicast group of a given family when received. If it knows how to parse the messages received it will dump the decoded version, otherwise it will just inform a new message has been received So far it only knows how to parse nlctrl notify messages, but the plan to allow to make the parsing extensible via lua scripts Differential Revision: https://reviews.freebsd.org/D40372 --- usr.bin/genl/genl.1 | 27 ++++++++-- usr.bin/genl/genl.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 158 insertions(+), 10 deletions(-) diff --git a/usr.bin/genl/genl.1 b/usr.bin/genl/genl.1 index 44ce4feaea48..b3d66298eb00 100644 --- a/usr.bin/genl/genl.1 +++ b/usr.bin/genl/genl.1 @@ -24,23 +24,44 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2023 +.Dd Oct 5, 2023 .Dt GENL 1 .Os .Sh NAME .Nm genl -.Nd "generic netlink list" +.Nd "generic netlink" .Sh SYNOPSIS .Nm +.Pp +.Nm Cm list +.Pp +.Nm Cm monitor Ao family Ac Ao multicast group Ac .Sh DESCRIPTION +The .Nm -lists all available generic netlink protocols, and presents its details: +utility is design to provide access to the user to generic netlink +protocols. +.Pp +The following commands are available: +.Bl -tag -ident +.It Cm list Po default Pc +Lists all available generic netlink protocols, and presents its details: .Bl -tag -width "multicast groups" .It operations Id of the operation if any and associated capabilities .It multicast groups If of the available multicast group if any and it associated name .El +.It Cm monitor Ao family Ac Ao multicast group Ac +Connect to the +.Ar family +protocol and subscribe to the +.Ar mulicast group +then print the received messages in a readable format if the protocol is known. +So far only +.Qq nlctrl +is known. +.El .Sh SEE ALSO .Xr genetlink 4 , .Xr netlink 4 diff --git a/usr.bin/genl/genl.c b/usr.bin/genl/genl.c index 8e8e18a7f8e2..e3acb872a39e 100644 --- a/usr.bin/genl/genl.c +++ b/usr.bin/genl/genl.c @@ -27,18 +27,41 @@ #include #include +#include #include #include #include #include #include +#include #include #include #include #include +static int monitor_mcast(int argc, char **argv); +static int list_families(int argc, char **argv); +static void parser_nlctrl_notify(struct snl_state *ss, struct nlmsghdr *hdr); +static void parser_fallback(struct snl_state *ss, struct nlmsghdr *hdr); + +static struct commands { + const char *name; + const char *usage; + int (*cmd)(int argc, char **argv); +} cmds[] = { + { "monitor", "monitor ", monitor_mcast }, + { "list", "list", list_families }, +}; + +static struct mcast_parsers { + const char *family; + void (*parser)(struct snl_state *ss, struct nlmsghdr *hdr); +} mcast_parsers [] = { + { "nlctrl", parser_nlctrl_notify }, +}; + struct genl_ctrl_op { uint32_t id; uint32_t flags; @@ -131,6 +154,13 @@ dump_mcast_groups( struct snl_genl_ctrl_mcast_groups *mcast_groups) mcast_groups->groups[i]->mcast_grp_name); } +static void +usage(void) +{ + fprintf(stderr, "Usage: %s\n", getprogname()); + for (size_t i = 0; i < nitems(cmds); i++) + fprintf(stderr, " %s %s\n", getprogname(), cmds[i].usage); +} static void dump_family(struct genl_family *family) @@ -143,8 +173,87 @@ dump_family(struct genl_family *family) dump_mcast_groups(&family->mcast_groups); } +void +parser_nlctrl_notify(struct snl_state *ss, struct nlmsghdr *hdr) +{ + struct genl_family family = {}; + + if (snl_parse_nlmsg(ss, hdr, &genl_family_parser, + &family)) + dump_family(&family); +} + +void +parser_fallback(struct snl_state *ss __unused, struct nlmsghdr *hdr __unused) +{ + printf("New unknown message\n"); +} + +int +monitor_mcast(int argc __unused, char **argv) +{ + struct snl_state ss; + struct nlmsghdr *hdr; + struct _getfamily_attrs attrs; + struct pollfd pfd; + bool found = false; + void (*parser)(struct snl_state *ss, struct nlmsghdr *hdr); + + parser = parser_fallback; + + if (!snl_init(&ss, NETLINK_GENERIC)) + err(EXIT_FAILURE, "snl_init()"); + + if (argc != 2) { + usage(); + return (EXIT_FAILURE); + } + if (!snl_get_genl_family_info(&ss, argv[0], &attrs)) + errx(EXIT_FAILURE, "Unknown family '%s'", argv[0]); + for (uint32_t i = 0; i < attrs.mcast_groups.num_groups; i++) { + if (strcmp(attrs.mcast_groups.groups[i]->mcast_grp_name, + argv[1]) == 0) { + found = true; + if (setsockopt(ss.fd, SOL_NETLINK, + NETLINK_ADD_MEMBERSHIP, + (void *)&attrs.mcast_groups.groups[i]->mcast_grp_id, + sizeof(attrs.mcast_groups.groups[i]->mcast_grp_id)) + == -1) + err(EXIT_FAILURE, "Cannot subscribe to command " + "notify"); + break; + } + } + if (!found) + errx(EXIT_FAILURE, "No such multicat group '%s'" + " in family '%s'", argv[1], argv[0]); + for (size_t i= 0; i < nitems(mcast_parsers); i++) { + if (strcmp(mcast_parsers[i].family, argv[0]) == 0) { + parser = mcast_parsers[i].parser; + break; + } + } + memset(&pfd, 0, sizeof(pfd)); + pfd.fd = ss.fd; + pfd.events = POLLIN | POLLERR; + while (true) { + pfd.revents = 0; + if (poll(&pfd, 1, -1) == -1) { + if (errno == EINTR) + continue; + err(EXIT_FAILURE, "poll()"); + } + hdr = snl_read_message(&ss); + if (hdr != NULL && hdr->nlmsg_type != NLMSG_ERROR) + parser(&ss, hdr); + + } + + return (EXIT_SUCCESS); +} + int -main(int argc, char **argv __unused) +list_families(int argc, char **argv __unused) { struct snl_state ss; struct snl_writer nw; @@ -152,16 +261,16 @@ main(int argc, char **argv __unused) struct snl_errmsg_data e = {}; uint32_t seq_id; - if (argc > 1) - errx(EXIT_FAILURE, "usage: genl does not accept any argument"); - if (modfind("netlink") == -1) - err(EXIT_FAILURE, "require netlink module to be loaded"); - + if (argc != 0) { + usage(); + return (EXIT_FAILURE); + } if (!snl_init(&ss, NETLINK_GENERIC)) err(EXIT_FAILURE, "snl_init()"); snl_init_writer(&ss, &nw); - hdr = snl_create_genl_msg_request(&nw, GENL_ID_CTRL, CTRL_CMD_GETFAMILY); + hdr = snl_create_genl_msg_request(&nw, GENL_ID_CTRL, + CTRL_CMD_GETFAMILY); if ((hdr = snl_finalize_msg(&nw)) == NULL) err(EXIT_FAILURE, "snl_finalize_msg"); seq_id = hdr->nlmsg_seq; @@ -179,3 +288,21 @@ main(int argc, char **argv __unused) return (EXIT_SUCCESS); } + +int +main(int argc, char **argv) +{ + if (modfind("netlink") == -1) + err(EXIT_FAILURE, "require netlink module to be loaded"); + + if (argc == 1) + return (list_families(0, NULL)); + + for (size_t i = 0; i < nitems(cmds); i++) { + if (strcmp(argv[1], cmds[i].name) == 0) + return (cmds[i].cmd(argc - 2, argv + 2)); + } + usage(); + + return (EXIT_FAILURE); +} From nobody Thu Oct 5 11:10:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1TPJ2lz4z4wLGZ; Thu, 5 Oct 2023 11:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1TPJ2Wngz3Tmc; Thu, 5 Oct 2023 11:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696504228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDBZgzeua14uHlW6pZSlLlg1NRmzkS6sDQ7U2gnddSE=; b=WWm+BvP0+7xfOGZI0pDZrDl9Bq8j32zt8y67t052VD8IuxM6o5oFa8nGqz5gVF2qq94ILj Mz091HCX5hC/lvdFmihJnNqICzRCzsUIAjWfBokDCPSWyoiP7UXIl+BbwSPElPJHQE8jYe sAjXSXIG8BoeeQXsek71o1h8ZRSzNzqocJcXi2pAoQygaRSTKih8Ek0DnaSWyNrYCAo0oo 4a21s5oDf7XFYE1M5+SyYmjxtckqXlVdNlxTyMTHMXPOHZcnzuPeVj82hVZh4X7nj3XDI5 OdeZZZKSfyP1MECrFPOd4K6WhE1Qr0JSMtdn4oRWJxesT4/KNGbQ1JaCoQR+4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696504228; a=rsa-sha256; cv=none; b=ZF0UWVkVjfTNMsF8xjwfJQTjveZvQ7L3HVWbpZxxhFlp/qU6bU1LBJa5jiKSYaUMzh3UDh uK8CYiWJJRS10R+3imS1pklmxFiwf2HhTO1rRMDobR+KGVEB3lPYbF8Jf9fYrxkZe44ARX U1rV+HIoq42WmxlJf4vRzunxkO7XA1NR4BB5w8LQpq+M4RJMpsyxCvweefWV8k4BtTBVIx GepbMgRI2MMn5t4nNMwoRcs7bnRPDpMNed9rp9E9YeMkv2raA9YaiGkpR3F89U36tTlvWs 9NVyjd06/hHr0iU1wuJT/VN5G2yHkP46ghKgxxV5ehPEt2HjaOV2Ziv4zDQLOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696504228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDBZgzeua14uHlW6pZSlLlg1NRmzkS6sDQ7U2gnddSE=; b=X/ZCbDZK5JKxDUOymI4dDZbBWLzeLx+mh2Fva3Q4VBNz0ZDBzrFbxGXaTfHGvSjAFMInA6 NOdNLhYiLVafHfXmB2RgrqoKUvKre0HAKwJ8OOqlmTGlolNmm1PxXSCaB6UA0Dk+1pn+NR zlVFGc72gtusMaJ6xb4Jec8Calx1Gwqe1m/ecg1aFIdufjHlrvDRWVJhbvv3A/kr9XQsiW 51YHeziuLmd71NRQ4JilXmTCcsVLpVbQ5M35aL1/XUAK+ZsR4SozuL5p6rFIzlMib/ZsiO 4BNLUBoOQltJrN1IavqiqkiGxEHY7Nggk3HhnJHorE0vLpLn8+VyxO7Vs3ElmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1TPJ1bD3z1HFd; Thu, 5 Oct 2023 11:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395BAS8x070925; Thu, 5 Oct 2023 11:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395BASgZ070922; Thu, 5 Oct 2023 11:10:28 GMT (envelope-from git) Date: Thu, 5 Oct 2023 11:10:28 GMT Message-Id: <202310051110.395BASgZ070922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 77e93191b92e - main - bsdconfig: drop support for floppies List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77e93191b92eed7842f56154eed1d1d0519dd65c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=77e93191b92eed7842f56154eed1d1d0519dd65c commit 77e93191b92eed7842f56154eed1d1d0519dd65c Author: Baptiste Daroussin AuthorDate: 2023-10-05 08:37:39 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 11:09:54 +0000 bsdconfig: drop support for floppies Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D42083 --- usr.sbin/bsdconfig/include/media.hlp | 7 - usr.sbin/bsdconfig/include/messages.subr | 9 -- usr.sbin/bsdconfig/include/options.hlp | 4 +- usr.sbin/bsdconfig/share/device.subr | 14 +- usr.sbin/bsdconfig/share/media/Makefile | 2 +- usr.sbin/bsdconfig/share/media/any.subr | 3 - usr.sbin/bsdconfig/share/media/floppy.subr | 228 --------------------------- usr.sbin/bsdconfig/share/media/options.subr | 1 - usr.sbin/bsdconfig/share/packages/index.subr | 2 - usr.sbin/bsdconfig/share/script.subr | 1 - 10 files changed, 3 insertions(+), 268 deletions(-) diff --git a/usr.sbin/bsdconfig/include/media.hlp b/usr.sbin/bsdconfig/include/media.hlp index 6fd609473810..1f07789ec0a4 100644 --- a/usr.sbin/bsdconfig/include/media.hlp +++ b/usr.sbin/bsdconfig/include/media.hlp @@ -16,13 +16,6 @@ You can install from the following types of media: get the distribution files from there. - Floppy Get distribution files from one or more DOS or UFS - formatted floppies. Such floppies are assumed to - contain the appropriate distribution pieces - see - ABOUT.TXT for more information about making floppy - distribution media. - - FTP Get the distribution files from an anonymous ftp server (you will be presented with a list). Please note that you may invoke FTP in "Active"/"Passive" auto-mode, or diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr index 63c8f4925c0f..b9ddd8e2f466 100644 --- a/usr.sbin/bsdconfig/include/messages.subr +++ b/usr.sbin/bsdconfig/include/messages.subr @@ -77,7 +77,6 @@ msg_checking_access_to="Checking access to\n %s" msg_chinese_desc="Ported software for the Chinese market." msg_choose_a_cd_dvd_type="Choose a CD/DVD type" msg_choose_a_dos_partition="Choose a DOS partition" -msg_choose_a_floppy_drive="Choose a Floppy drive" msg_choose_a_ufs_partition="Choose a UFS partition" msg_choose_a_usb_drive="Choose a USB drive" msg_choose_installation_media="Choose Installation Media" @@ -129,7 +128,6 @@ msg_enter_a_fully_qualified_pathname_for_the_directory="Enter a fully qualified msg_enter_the_device_name_of_a_ufs_formatted_partition="Enter the device-name of a UFS formatted partition" msg_error="Error" msg_error_mounting_device="Error mounting %s on %s: %s" -msg_error_mounting_floppy_device="Error mounting floppy %s (%s) on %s: %s" msg_error_mounting_usb_drive="Error mounting USB drive %s on %s: %s" msg_error_when_requesting_url="Error when requesting %s, you could try an other server" msg_estonia="Estonia" @@ -141,7 +139,6 @@ msg_failed_to_reach_wpa_supplicant="Failed to reach wpa_supplicant: %s" msg_file_system="File System" msg_finance_desc="Monetary, financial and related applications." msg_finland="Finland" -msg_floppy="Floppy" msg_forget_all="Forget All" msg_forget_all_confirm="WARNING! Are you really sure you want to forget all known networks\nby re-initializing wpa_supplicant.conf(5)? This cannot be undone." msg_forget_all_help="Reset wpa_supplicant(8) configuration, forgetting all known networks" @@ -171,7 +168,6 @@ msg_http_proxy="HTTP Proxy" msg_hungarian_desc="Ported software for the Hungarian market." msg_iceland="Iceland" msg_install_from_a_dos_partition="Install from a DOS partition" -msg_install_from_a_floppy_disk_set="Install from a floppy disk set" msg_install_from_a_freebsd_cd_dvd="Install from a FreeBSD CD/DVD" msg_install_from_a_ufs_partition="Install from a UFS partition" msg_install_from_a_usb_drive="Install from a USB drive" @@ -257,7 +253,6 @@ msg_no="No" msg_no_cd_dvd_devices_found="No CD/DVD devices found! Please check that your system's\nconfiguration is correct and that the CD/DVD drive is of a\nsupported type. For more information, consult the hardware\nguide in the Doc menu." msg_no_description_provided="No description provided" msg_no_dos_primary_partitions_found="No DOS primary partitions found! This installation method is unavailable" -msg_no_floppy_devices_found="No floppy devices found! Please check that your system's configuration\nis correct. For more information, consult the hardware guide in the Doc\nmenu." msg_no_gateway_has_been_set="No gateway has been set. You will be unable to access hosts\nnot on your local network" msg_no_network_devices="No network devices available!" msg_no_package_name_passed_in_package_variable="No package name passed in package variable" @@ -297,11 +292,8 @@ msg_please_enter_the_full_nfs_file_specification="Please enter the full NFS file msg_please_enter_the_password_for_this_user="Please enter the password for this user:" msg_please_enter_the_username_you_wish_to_login_as="Please enter the username you wish to login as:" msg_please_enter_username_password="Please enter a username and password for sudo(8):" -msg_please_insert_floppy_containing="Please insert floppy containing %s in %s" -msg_please_insert_floppy_in_drive="Please insert floppy in %s" msg_please_select_a_category_to_display="Please select a category to display." msg_please_select_a_cd_dvd_drive="FreeBSD can be installed directly from a CD/DVD containing a valid\nFreeBSD distribution. If you are seeing this menu it is because\nmore than one CD/DVD drive was found on your system. Please select\none of the following CD/DVD drives as your installation drive." -msg_please_select_a_floppy_drive="You have more than one floppy drive. Please choose which drive\nyou would like to use." msg_please_select_a_freebsd_ftp_distribution_site="Please select a FreeBSD FTP distribution site" msg_please_select_a_freebsd_http_distribution_site="Please select a FreeBSD HTTP distribution site" msg_please_select_a_usb_drive="You have more than one USB drive. Please choose which drive\nyou would like to use." @@ -447,7 +439,6 @@ msg_xfce_desc="Software related to the Xfce Desktop Environment." msg_yes="Yes" msg_yes_to_all="Yes to All" msg_you_are_not_root_but="You are not root but %s can use sudo(8).\nWhat would you like to do?" -msg_you_may_remove_the_floppy="You may remove the floppy from %s" msg_youve_already_done_the_network_configuration="You've already done the network configuration once,\nwould you like to skip over it now?" msg_zope_desc="Software related to the Zope platform." tcplayout_extras_help="Any interface-specific options to ifconfig you would like to add" diff --git a/usr.sbin/bsdconfig/include/options.hlp b/usr.sbin/bsdconfig/include/options.hlp index f47df27a6b88..257c5011fb9e 100644 --- a/usr.sbin/bsdconfig/include/options.hlp +++ b/usr.sbin/bsdconfig/include/options.hlp @@ -85,9 +85,7 @@ Release Name: Which release to attempt to load from installation media. You should only change this option if you're really sure you know what you are doing! This will change the release name used by - bsdconfig when fetching components of any distributions, and - is a useful way of using a more recent installation boot floppy - with an older release (say, on CDROM). + bsdconfig when fetching components of any distributions. Media Type: Which media type is being used. diff --git a/usr.sbin/bsdconfig/share/device.subr b/usr.sbin/bsdconfig/share/device.subr index c60ad303acfc..4ca2a80c69a5 100644 --- a/usr.sbin/bsdconfig/share/device.subr +++ b/usr.sbin/bsdconfig/share/device.subr @@ -77,7 +77,6 @@ f_struct_define DEVICE_INFO \ setvar DEVICE_TYPE_ANY "any" # Any setvar DEVICE_TYPE_NONE "NONE" # Unknown setvar DEVICE_TYPE_DISK "DISK" # GEOM `DISK' -setvar DEVICE_TYPE_FLOPPY "FD" # GEOM `FD' setvar DEVICE_TYPE_FTP "FTP" # Dynamic network device setvar DEVICE_TYPE_NETWORK "NETWORK" # See f_device_get_all_network setvar DEVICE_TYPE_CDROM "CDROM" # GEOM `DISK' @@ -440,14 +439,6 @@ f_device_probe_geom() return $retval ;; - $GEOM_CLASS_FD) - f_dprintf "Found floppy device named %s" "$devname" - debug= f_device_register device "$devname" "$desc" \ - "/dev/$devname" $DEVICE_TYPE_FLOPPY 1 \ - f_media_init_floppy f_media_get_floppy \ - f_media_shutdown_floppy "" "$capacity" - return $? - ;; $GEOM_CLASS_LABEL) : fall through to below section # reduces indentation level ;; @@ -936,7 +927,6 @@ f_device_desc() case "$__type" in $DEVICE_TYPE_CDROM) __cp="" ;; $DEVICE_TYPE_DISK) __cp="" ;; - $DEVICE_TYPE_FLOPPY) __cp="" ;; $DEVICE_TYPE_USB) __cp="" ;; $DEVICE_TYPE_NETWORK) __cp="" ;; *) @@ -1247,7 +1237,6 @@ f_device_menu() # f_cdrom() { f_device_catalog_set $DEVICE_TYPE_CDROM "$1" "$2"; } f_disk() { f_device_catalog_set $DEVICE_TYPE_DISK "$1" "$2"; } -f_floppy() { f_device_catalog_set $DEVICE_TYPE_FLOPPY "$1" "$2"; } f_usb() { f_device_catalog_set $DEVICE_TYPE_USB "$1" "$2"; } f_network() { f_device_catalog_set $DEVICE_TYPE_NETWORK "$1" "$2"; } @@ -1262,7 +1251,7 @@ f_network() { f_device_catalog_set $DEVICE_TYPE_NETWORK "$1" "$2"; } DEVICE_CATALOG_APPEND_ONLY=1 # Make initial loading faster -# CDROM, Disk, Floppy, and USB devices/names +# CDROM, Disk, and USB devices/names f_cdrom "cd%d" "SCSI CDROM drive" f_cdrom "mcd%d" "Mitsumi (old model) CDROM drive" f_cdrom "scd%d" "Sony CDROM drive - CDU31/33A type" @@ -1277,7 +1266,6 @@ f_disk "mfid%d" "LSI MegaRAID SAS array" f_disk "mlxd%d" "Mylex RAID disk" f_disk "twed%d" "3ware ATA RAID array" f_disk "vtbd%d" "VirtIO Block Device" -f_floppy "fd%d" "Floppy Drive unit A" f_usb "da%da" "USB Mass Storage Device" # Network interfaces/names diff --git a/usr.sbin/bsdconfig/share/media/Makefile b/usr.sbin/bsdconfig/share/media/Makefile index d6b77d96ee7f..2cbce2d492b2 100644 --- a/usr.sbin/bsdconfig/share/media/Makefile +++ b/usr.sbin/bsdconfig/share/media/Makefile @@ -1,7 +1,7 @@ FILESDIR= ${SHAREDIR}/bsdconfig/media FILES= any.subr cdrom.subr common.subr directory.subr dos.subr \ - floppy.subr ftp.subr http.subr httpproxy.subr network.subr \ + ftp.subr http.subr httpproxy.subr network.subr \ nfs.subr options.subr tcpip.subr ufs.subr usb.subr wlan.subr .include diff --git a/usr.sbin/bsdconfig/share/media/any.subr b/usr.sbin/bsdconfig/share/media/any.subr index d98f58567bfa..ea4fef0b5151 100644 --- a/usr.sbin/bsdconfig/share/media/any.subr +++ b/usr.sbin/bsdconfig/share/media/any.subr @@ -34,7 +34,6 @@ f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/media/cdrom.subr f_include $BSDCFG_SHARE/media/directory.subr f_include $BSDCFG_SHARE/media/dos.subr -f_include $BSDCFG_SHARE/media/floppy.subr f_include $BSDCFG_SHARE/media/ftp.subr f_include $BSDCFG_SHARE/media/http.subr f_include $BSDCFG_SHARE/media/httpproxy.subr @@ -78,7 +77,6 @@ f_media_get_type() '6 $msg_nfs' '$msg_install_over_nfs' '7 $msg_dos' '$msg_install_from_a_dos_partition' '8 $msg_ufs' '$msg_install_from_a_ufs_partition' - '9 $msg_floppy' '$msg_install_from_a_floppy_disk_set' 'A $msg_usb' '$msg_install_from_a_usb_drive' 'X $msg_options' '$msg_view_set_various_media_options' " # END-QUOTE @@ -128,7 +126,6 @@ f_media_get_type() ?" $msg_dos") f_media_set_dos ;; ?" $msg_nfs") f_media_set_nfs ;; ?" $msg_ufs") f_media_set_ufs ;; - ?" $msg_floppy") f_media_set_floppy ;; ?" $msg_usb") f_media_set_usb ;; ?" $msg_options") f_media_options_menu diff --git a/usr.sbin/bsdconfig/share/media/floppy.subr b/usr.sbin/bsdconfig/share/media/floppy.subr deleted file mode 100644 index ae17ee27f282..000000000000 --- a/usr.sbin/bsdconfig/share/media/floppy.subr +++ /dev/null @@ -1,228 +0,0 @@ -if [ ! "$_MEDIA_FLOPPY_SUBR" ]; then _MEDIA_FLOPPY_SUBR=1 -# -# Copyright (c) 2012-2013 Devin Teske -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# -############################################################ INCLUDES - -BSDCFG_SHARE="/usr/share/bsdconfig" -. $BSDCFG_SHARE/common.subr || exit 1 -f_dprintf "%s: loading includes..." media/floppy.subr -f_include $BSDCFG_SHARE/device.subr -f_include $BSDCFG_SHARE/dialog.subr -f_include $BSDCFG_SHARE/media/common.subr -f_include $BSDCFG_SHARE/struct.subr -f_include $BSDCFG_SHARE/variable.subr - -BSDCFG_LIBE="/usr/libexec/bsdconfig" -f_include_lang $BSDCFG_LIBE/include/messages.subr - -############################################################ GLOBALS - -FLOPPY_MOUNTED= -FLOPPY_DISTWANTED= - -############################################################ FUNCTIONS - -# f_media_set_floppy -# -# Return success if we both found and set the media type to be a floppy. -# -f_media_set_floppy() -{ - f_media_close - - local devs ndevs - f_device_find "" $DEVICE_TYPE_FLOPPY devs - f_count ndevs $devs - - if [ ${ndevs:=0} -eq 0 ]; then - f_interactive && f_show_msg "$msg_no_floppy_devices_found" - return $FAILURE - elif [ $ndevs -eq 1 ]; then - f_struct_copy $devs device_media - else - local dev - local title="$msg_choose_a_floppy_drive" - local prompt="$msg_please_select_a_floppy_drive" - local hline= - - dev=$( f_device_menu \ - "$title" "$prompt" "$hline" $DEVICE_TYPE_FLOPPY \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || - return $FAILURE - - f_struct_copy "$dev" device_media - fi - - f_struct device_media && - device_media unset private - - f_struct device_media || return $FAILURE -} - -# f_media_init_floppy $device -# -# Initializes the Floppy media device. Returns success if able to mount the -# Floppy disk device using either mount_msdosfs(8) or mount(8) (tried in that -# order). -# -f_media_init_floppy() -{ - local funcname=f_media_init_floppy - local dev="$1" devname err - - $dev get devname devname || return $FAILURE - f_dprintf "Init floppy called for %s distribution. devname=[%s]" \ - "${FLOPPY_DISTWANTED:-some}" "$devname" - - if [ "$FLOPPY_MOUNTED" ]; then - f_dprintf "Floppy device already mounted." - return $SUCCESS - fi - - local mp - $dev get private mp - if [ ! -e "${mp:=$MOUNTPOINT}" ] && ! f_quietly mkdir -p "$mp"; then - f_show_msg "$msg_unable_to_make_directory_mountpoint" \ - "$mp" "$devname" - return $FAILURE - fi - - if f_interactive; then - local desc - $dev get desc desc - if [ "$FLOPPY_DISTWANTED" ]; then - f_show_msg "$msg_please_insert_floppy_in_drive" "$desc" - else - f_show_msg "$msg_please_insert_floppy_containing" \ - "$FLOPPY_DISTWANTED" "$desc" - fi - fi - - if ! { - f_eval_catch -dk err $funcname mount_msdosfs \ - 'mount_msdosfs -o ro -m 0777 -u 0 -g 0 "%s" "%s"' \ - "$devname" "$mp" || - f_eval_catch -dk err $funcname mount \ - 'mount -o ro "%s" "%s"' "$devname" "$mp" - }; then - err="${err#mount: }"; err="${err#*: }" - local name - $dev get name name - f_show_msg "$msg_error_mounting_floppy_device" \ - "$name" "$devname" "$mp" "$err" - return $FAILURE - fi - FLOPPY_MOUNTED=1 - FLOPPY_DISTWANTED= - return $SUCCESS -} - -# f_media_get_floppy $device $file [$probe_type] -# -# Returns data from $file on a mounted Floppy disk device. Similar to cat(1). -# If $probe_type is present and non-NULL, limits retries to zero and returns -# success if $file exists. If $probe_type is equal to $PROBE_SIZE, prints the -# size of $file in bytes to standard-out. -# -f_media_get_floppy() -{ - local funcname=f_media_get_floppy - local dev="$1" file="$2" probe_type="$3" - local name - - $dev get name name - f_dprintf "f_media_get_floppy: dev=[%s] file=[%s] probe_type=%s" \ - "$name" "$file" "$probe_type" - - # - # floppies don't use f_media_generic_get() because it's too expensive - # to speculatively open files on a floppy disk. Make user get it - # right or give up with floppies. - # - local mp - $dev get private mp - local fp="${mp:=$MOUNTPOINT}/$file" - if ! [ -f "$fp" -a -r "$fp" ]; then - local nretries=4 - [ "$probe_type" = "$PROBE_SIZE" ] && echo "-1" - [ "$probe_type" ] && return $FAILURE - while ! [ -f "$fp" -a -r "$fp" ]; do - if [ $nretries -eq 0 ]; then - f_show_msg "$msg_failed_to_get_floppy_file" \ - "$fp" - [ "$probe_type" = "$PROBE_SIZE" ] && echo "-1" - return $FAILURE - fi - FLOPPY_DISTWANTED="$fp" - f_media_shutdown_floppy "$dev" - f_media_init_floppy "$dev" || return $FAILURE - nretries=$(( $nretries - 1 )) - done - fi - # - # If we reach here, $file exists - # - if [ "$probe_type" = "$PROBE_SIZE" ]; then - local size - f_eval_catch -dk size $funcname stat 'stat -f %%z "%s"' "$fp" - f_isinteger "$size" || size=-1 - echo "$size" - fi - [ "$probe_type" ] && return $SUCCESS - cat "$fp" -} - -# f_media_shutdown_floppy $device -# -# Shuts down the Floppy disk device using umount(8). Return status should be -# ignored. -# -f_media_shutdown_floppy() -{ - local funcname=f_media_shutdown_floppy - local dev="$1" err mp - - [ "$FLOPPY_MOUNTED" ] || return $FAILURE - - $dev get private mp - if f_eval_catch -d $funcname umount \ - 'umount -f "%s"' "${mp:=$MOUNTPOINT}" - then - FLOPPY_MOUNTED= - if f_interactive && [ "$_systemState" != "fixit" ]; then - local desc - $dev get desc desc - f_show_msg "$msg_you_may_remove_the_floppy" "$desc" - fi - fi -} - -############################################################ MAIN - -f_dprintf "%s: Successfully loaded." media/floppy.subr - -fi # ! $_MEDIA_FLOPPY_SUBR diff --git a/usr.sbin/bsdconfig/share/media/options.subr b/usr.sbin/bsdconfig/share/media/options.subr index 340619a50ac1..a4de6395127e 100644 --- a/usr.sbin/bsdconfig/share/media/options.subr +++ b/usr.sbin/bsdconfig/share/media/options.subr @@ -158,7 +158,6 @@ f_media_options_menu() $DEVICE_TYPE_UFS|$DEVICE_TYPE_DISK) cp="$msg_file_system" ;; $DEVICE_TYPE_DIRECTORY) cp="$msg_directory" ;; - $DEVICE_TYPE_FLOPPY) cp="$msg_floppy" ;; $DEVICE_TYPE_FTP) cp="$msg_ftp" ;; $DEVICE_TYPE_HTTP_PROXY) cp="$msg_http_proxy" ;; $DEVICE_TYPE_HTTP) cp="$msg_http_direct" ;; diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr index dd432adf6adf..bd29b882d0d9 100644 --- a/usr.sbin/bsdconfig/share/packages/index.subr +++ b/usr.sbin/bsdconfig/share/packages/index.subr @@ -90,8 +90,6 @@ f_index_initialize() case "$__type" in $DEVICE_TYPE_DIRECTORY) __site="file://$__data/packages/$PKG_ABI" ;; - $DEVICE_TYPE_FLOPPY) - __site="file://${__data:-$MOUNTPOINT}/packages/$PKG_ABI" ;; $DEVICE_TYPE_FTP) f_getvar $VAR_FTP_PATH __site __site="$__site/packages/$PKG_ABI" ;; diff --git a/usr.sbin/bsdconfig/share/script.subr b/usr.sbin/bsdconfig/share/script.subr index feac3b47bdef..055202f1bd93 100644 --- a/usr.sbin/bsdconfig/share/script.subr +++ b/usr.sbin/bsdconfig/share/script.subr @@ -171,7 +171,6 @@ f_resword_new mediaGetType f_media_get_type # media/any.subr f_resword_new mediaSetCDROM f_media_set_cdrom # media/cdrom.subr f_resword_new mediaSetDOS f_media_set_dos # media/dos.subr f_resword_new mediaSetDirectory f_media_set_directory # media/directory.subr -f_resword_new mediaSetFloppy f_media_set_floppy # media/floppy.subr f_resword_new mediaSetNFS f_media_set_nfs # media/nfs.subr f_resword_new mediaSetUFS f_media_set_ufs # media/ufs.subr f_resword_new mediaSetUSB f_media_set_usb # media/usb.subr From nobody Thu Oct 5 11:32:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Tt91RW5z4wP03; Thu, 5 Oct 2023 11:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Tt90xlcz3Wq8; Thu, 5 Oct 2023 11:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696505521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dzUl1W/8tPU00kVBIFFXjSKrMVoVHUqbt+uMxj+ZDjQ=; b=qHl4TE7ew7M7UNKwo7YURX9gQw/+LcflzfkTf13BfLLbNT+fZ8h9ZPGKCzdBmbmTPWTu+3 iK9bQB1UbkdnY9dKyRVbsKY8d/HuioA9iWPWBEEtHBB8pmxm5yRWx+gsS1zs4x/pAwZag+ 7gq0Rq7Aq/1JnagqfD7rfNWy4Ap/mHSg/OeZK/h3p7P20v4Nh/QjQY6VDow3T/15T3U+Nx XRfcI8S0T6NBfVOniZQKa4mBQd6lYgMmvxDXBtS4PfjBhGyOu8F6b6S11b4NYLWZkwLnNE EA/GnPElkaLyfu4R5w/Htt6i66qjVPnR//KjdsIyE6do8dgZ0x8BkSNlluHILQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696505521; a=rsa-sha256; cv=none; b=osOk9owfkcfmUr3l87yDeh0FdTKE0dMK4b1hHpdaTcyQnU0cSocvkfPGbpnqolqTkwoRRC 4oclNDTHdxKEw0J9qB2lSO3JvBf/6nK2UWmmxlg47NyX2vuQnJDwGI3l2oyGcj9BY4rVhw wx5EbxwSYX7xpmIYwrhgc0ZNAD7nGYt0udkN1hHIUwABigd/b/ctClysBBg4o2VEUNtAGO Y4kg4ful4IwdXu0vt7V2NT4+HUWu0QVuTmVUjuCTYnCRrHJ674jtFA2jnI7v+tV5bKwijn dmofoty18ni9SN1HaekV+KamZzh0BO+tgmWG0dLH0NIA8BBtvIPr1mctJrxZEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696505521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dzUl1W/8tPU00kVBIFFXjSKrMVoVHUqbt+uMxj+ZDjQ=; b=VwvXDQZPbESge7ocXJq4Da9H5gwkVhyEIfwryKNm3Gj7zqn3+Y5N/XmLF9ROIb2Zk+dYeX uJM5llmJZREqZAvB0/JBNoSJjqtW0FsP9Ox7Rj8X4s7TS8AciS+GcqaAjTiZ7WtCJY3zDD XUZmoXxyzPfhEnRu4qWyGhIjVmdTBIVfOT1kHaERyVqAlZb8goMyk/nGHWfVEUL2vIiYwO 1NW9CE74WOoNNCwSoSyD1FCFucmVbriXKIo/AejXmgmVG26x7u+6TBippUZL+8cCR/61dc ZWxLWY6Np0EoNek2fIWYY3w5xkX+/vjcoKcLwrYQ206SduTFPuhBu8Hz30nYuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Tt900Hhz1Hx4; Thu, 5 Oct 2023 11:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395BW05J006306; Thu, 5 Oct 2023 11:32:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395BW0Ov006300; Thu, 5 Oct 2023 11:32:00 GMT (envelope-from git) Date: Thu, 5 Oct 2023 11:32:00 GMT Message-Id: <202310051132.395BW0Ov006300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5c8c9e1744b3 - main - ObsoleteFiles.inc: document the removal of floppy support in bsdconfig List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c8c9e1744b3f294ed5c73c8f1d0bafbc0f90a5d Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5c8c9e1744b3f294ed5c73c8f1d0bafbc0f90a5d commit 5c8c9e1744b3f294ed5c73c8f1d0bafbc0f90a5d Author: Baptiste Daroussin AuthorDate: 2023-10-05 11:31:26 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 11:31:26 +0000 ObsoleteFiles.inc: document the removal of floppy support in bsdconfig --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 763578aeb652..89594ac77b9b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20231005: bsdconfig remove support for floppy +OLD_FILES+=usr/share/bsdconfig/media/floppy.subr + # 20230927: Man pages renamed to match the actual functions OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz From nobody Thu Oct 5 12:14:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1VqS32PPz4wVbY; Thu, 5 Oct 2023 12:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1VqS2Z2Bz3bZv; Thu, 5 Oct 2023 12:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696508084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSlN6J9PIa3zYm+uLVHazJkG6ytaIA1C7ydFCIi49T4=; b=D+1AwHtrUum7SDaCwFchuoyp9s4yExynwCNxoQaxuLnCvQrAPKMstLz+eE1AWpkuS9GsSn hzIUskcOwiDfuvY/VAFjCKzTv2tW96gOPcZ6RjCRzmUI7SyNZgxVBeQrUQ7RTWhruzRS5Z W+juDR4O+eA5c7JBQmFAYbrZ2Kil/JIzpu46h7XRLkjffVc0BXUDqCn7jaSNrrrYIJc/8C VYFM+gWpJlRU6Z3VFoTfdfVJ4VjLopWR9IrjS9pNWeKIiMUKdOlTE6PQwOkHh1MJRE9HnT /m8cYavTmkmhVgms8asTSfUHjFuv6VTN1D0/O32B223wsZyFIKuE1nxO6FmJvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696508084; a=rsa-sha256; cv=none; b=PCO6L2xagslhG4pmKmuJ6YN6M8vKeXK+YU+X/6bOBXqnfbbvEmDnZbvfXm1m3TuS3Xjvdx Z63E8jiDdaQZPbRM85cOItbXhlM5FyfdMLpeMHkhgXCZ+2B1VyFDYoIY45mmmGxEXiR3X3 rUypuv7+PsBFQEjCn6CRVZa4NyJ9nU+q3wMizUAjQXLm7JZObxiSAcccdKYgCEFIgEPHXb S0lKvatcShudYAmCGexBTuVrL0XwOcsFAbVZNXznNOfTRKQhCNDbT0soRcKhcR5uMXSulm UQ2NjKRtyf6zU6sPmt5w0rC2zDQdKgAQfeUaLoFRt1qPwoPtf/zHbgizqBKADg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696508084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSlN6J9PIa3zYm+uLVHazJkG6ytaIA1C7ydFCIi49T4=; b=pC67KTh9mK8MQU+yXRpqmkJdKcH7gtc3W3aeA2rvRqYEg3eHo6Pn8oJQh6WG+rV02aqNdb 23M9PqBUNkZenYxGmx4k3WohUZ6a3QyzCDyZ33vUvdz2IPxk9OyYg+tvXDTFf8Ae1sni2Y uDKn/ifx+FNZWkGLSUk7hTlijeURdE0RzXEjEUHDmntNyywHdh7zCROIpw7SAat8GG2jDT 1K27VwDwcEPMghQhsF+bubT6lhw678Pu/xU3abKKvXY8aVaqFzWK0sOORIsbKF5+31oVbn K51XIyCnHSLZOOcrL/y+7H11lRKDJLeSeH2RweV8k8SZUUVvoaR3gC2AF404tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1VqS1d8Cz1JsZ; Thu, 5 Oct 2023 12:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CEi8U077665; Thu, 5 Oct 2023 12:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CEiIv077662; Thu, 5 Oct 2023 12:14:44 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:14:44 GMT Message-Id: <202310051214.395CEiIv077662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: aaff6a85ff1e - main - fortune: use 115200 in serial example List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aaff6a85ff1e506e38a8c4f94f1cb1065427e8c3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=aaff6a85ff1e506e38a8c4f94f1cb1065427e8c3 commit aaff6a85ff1e506e38a8c4f94f1cb1065427e8c3 Author: Ed Maste AuthorDate: 2023-10-05 12:11:46 +0000 Commit: Ed Maste CommitDate: 2023-10-05 12:14:23 +0000 fortune: use 115200 in serial example Commit 4722ceb7d53e switched the default serial rate to 115200 bps. Follow suit in the freebsd-tips fortune example. Reviewed by: bcr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41495 --- usr.bin/fortune/datfiles/freebsd-tips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index dd2c3cfb0495..3ee4ca3a5972 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -833,7 +833,7 @@ $ sysctl -n hw.pagesize To establish a serial connection to anything including a USB device, nothing more than cu(1) is needed: -$ cu -s 9600 -l /dev/ttyU0 +$ cu -s 115200 -l /dev/ttyU0 -- Daniel Ebdrup Jensen % From nobody Thu Oct 5 12:44:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WTg2q8Yz4wZVh; Thu, 5 Oct 2023 12:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WTg2bllz3gSs; Thu, 5 Oct 2023 12:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nEYgeVWb8PWY3735a6WbAjRES0UPrvgB9P6PTkvaIj8=; b=PGUlOXbFeTx9CsudQJlxspd8kmvHuY0FgW4tmD0gNPtPcwEG3hbbErOFYrO1v4VUVlLpa4 tSwZCykdN8/uFOappQi7Qm1csVeXDCelV6Hho/6mipVpcxGTNBIwUdh6LtcY8C/RL5+IOz 7qxkd71Dvujz+gkC8g6Og0mDNipVQdpYrvhueu8yr0GrO4o+a0w3A+/kpwcBwvUGZYo/CP gg2814PPVem+1+W9mUM9rrDC1S3jERIHMLWmd3rFVC9RFGffPlNFX7NtDvj9nZrNzFnKzk TSq/zuD298R1971vi6LRczKY4r755lCgeq+BVcbRLnx5vMUzquR0y1NpnnPosA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509863; a=rsa-sha256; cv=none; b=NzJ0zYsffNtvvE03oXhiLwKmnNTe+M0p6kA3O5/WB/MuTZkYGJWCY9t3ko+uhXqcO3LAUN y0JGRq+xSDWiXh6OBXJvMbgVrHhOoM4rkNYHYA6hMS7y3reWn+FzAUtUJV4Wg7toYGQvlj uoo1wYivQZ/Fj7zQA6bng3hUtbo9CaVgLEkaorZuBT0pymzQdtliG5LjIsG3Gi+/eEyfYb qKXU0rBEUtKLbcP4uivkPTXJXnSt7r3V9quh2yP9rTVyZjXn1Sy19Dl+xVMOoV6dcbFWzJ iYwYf+I0hAzQER5bhplLLvR6pziY5wE5folhSRUckyUDRAyb8dWJlwkEqP7JWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nEYgeVWb8PWY3735a6WbAjRES0UPrvgB9P6PTkvaIj8=; b=YsWcYJlx1iVvYtGthpMx52ngU8gdrHKt9QRKqg5UoUm0yyKFfu2xZwWrFhM7pGW5ZsoRu3 A/gXT1LwPDftDwVsupx6tPnLdGmU+4lZIlkTzG8ChLw/0/2IwtrbTWz8ISQSJ5KQwZCV+a OIfi8jFP9PGVQ5NOcboCxbwobasLC2Tysh7GBXI/vMhspoq0/HLKqola++bFeEqSExoUvu rGXcUTDCfQAOzl+LSONAWYFbQ2bdE/Wj7S5+e6Ygr/nWg9K1sChMOtTHyygguHvvcR0A7c +wOVMvtP9hyfHkPOVeDETstzK4dcsZ5IU3RcOMBwa2QXL1MfepWttcOcODrhbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WTg1XPKz1Kwh; Thu, 5 Oct 2023 12:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CiNNn027093; Thu, 5 Oct 2023 12:44:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CiNIU027090; Thu, 5 Oct 2023 12:44:23 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:23 GMT Message-Id: <202310051244.395CiNIU027090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5e7aa7574445 - main - bsdconfig: remove support for ftp, pkg does not support it anymore List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e7aa7574445f1fc90140bc93ec75de83e850fbe Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5e7aa7574445f1fc90140bc93ec75de83e850fbe commit 5e7aa7574445f1fc90140bc93ec75de83e850fbe Author: Baptiste Daroussin AuthorDate: 2023-10-05 12:39:13 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 12:44:18 +0000 bsdconfig: remove support for ftp, pkg does not support it anymore --- ObsoleteFiles.inc | 3 +- usr.sbin/bsdconfig/include/media.hlp | 16 - usr.sbin/bsdconfig/include/messages.subr | 11 - usr.sbin/bsdconfig/share/media/Makefile | 2 +- usr.sbin/bsdconfig/share/media/any.subr | 15 +- usr.sbin/bsdconfig/share/media/ftp.subr | 840 -------------------------- usr.sbin/bsdconfig/share/media/httpproxy.subr | 1 - usr.sbin/bsdconfig/share/media/options.subr | 9 - usr.sbin/bsdconfig/share/media/tcpip.subr | 1 - usr.sbin/bsdconfig/share/script.subr | 6 - usr.sbin/bsdconfig/share/variable.subr | 11 - 11 files changed, 9 insertions(+), 906 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 89594ac77b9b..09e18daa7abf 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,8 +51,9 @@ # xargs -n1 | sort | uniq -d; # done -# 20231005: bsdconfig remove support for floppy +# 20231005: bsdconfig remove support for floppy and ftp OLD_FILES+=usr/share/bsdconfig/media/floppy.subr +OLD_FILES+=usr/share/bsdconfig/media/ftp.subr # 20230927: Man pages renamed to match the actual functions OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz diff --git a/usr.sbin/bsdconfig/include/media.hlp b/usr.sbin/bsdconfig/include/media.hlp index 1f07789ec0a4..ec92e035f833 100644 --- a/usr.sbin/bsdconfig/include/media.hlp +++ b/usr.sbin/bsdconfig/include/media.hlp @@ -16,22 +16,6 @@ You can install from the following types of media: get the distribution files from there. - FTP Get the distribution files from an anonymous ftp server - (you will be presented with a list). Please note that - you may invoke FTP in "Active"/"Passive" auto-mode, or - via an HTTP proxy. - - By default, ftp(1) will automatically use the best mode - for the server. Using an HTTP proxy is sometimes necessary - for firewalls which block all FTP connections. - - If you chose to enter your own URL in the FTP menu, please - note that all paths are *relative* to the home directory - of the user being logged in as. By default, this is the - user "ftp" (anonymous ftp) but you may change this in the - Options screen. - - HTTP Direct Get the distribution files directly from an HTTP server. diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr index b9ddd8e2f466..267743e87b0a 100644 --- a/usr.sbin/bsdconfig/include/messages.subr +++ b/usr.sbin/bsdconfig/include/messages.subr @@ -93,10 +93,8 @@ msg_could_not_unmount_the_cdrom_dvd="Could not unmount the CDROM/DVD from %s: %s msg_could_not_unmount_the_dos_partition="Could not unmount the DOS partition from %s: %s" msg_could_not_unmount_the_nfs_partition="Could not unmount the NFS partition from %s: %s" msg_could_not_unmount_the_ufs_partition="Could not unmount the UFS partition from %s: %s" -msg_couldnt_connect_to_ftp_server="Couldn't connect to FTP server" msg_couldnt_connect_to_proxy="Couldn't connect to proxy" msg_couldnt_connect_to_server="Couldn't connect to server" -msg_couldnt_open_ftp_connection="Couldn't open FTP connection to %s:\n %s." msg_create_new="Create New" msg_created_path="Created %s" msg_czech_republic="Czech Republic" @@ -147,8 +145,6 @@ msg_france="France" msg_french_desc="Ported software for French countries." msg_ftp="FTP" msg_ftp_desc="FTP client and server utilities." -msg_ftp_passive="FTP Passive" -msg_ftp_username="FTP username" msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..." msg_geography_desc="Geography-related software." msg_german_desc="Ported software for Germanic countries." @@ -171,8 +167,6 @@ msg_install_from_a_dos_partition="Install from a DOS partition" msg_install_from_a_freebsd_cd_dvd="Install from a FreeBSD CD/DVD" msg_install_from_a_ufs_partition="Install from a UFS partition" msg_install_from_a_usb_drive="Install from a USB drive" -msg_install_from_an_ftp_server="Install from an FTP server" -msg_install_from_an_ftp_server_thru_firewall="Install from an FTP server through a firewall" msg_install_from_an_ftp_server_thru_proxy="Install from an FTP server through an HTTP proxy" msg_install_from_an_http_server="Install from an HTTP server" msg_install_from_the_existing_filesystem="Install from the existing filesystem" @@ -224,7 +218,6 @@ msg_media_timeout="Media Timeout" msg_media_type="Media Type" msg_menu_text="If you've already installed FreeBSD, you may use\nthis menu to customize it somewhat to suit your\nparticular configuration. Most importantly, you\ncan use the Packages utility to load extra '3rd\nparty' software not provided in the base\ndistributions." msg_misc_desc="Miscellaneous utilities." -msg_missing_ftp_host_or_directory="Missing FTP host or directory specification. FTP media not initialized." msg_multimedia_desc="Multimedia software." msg_must_be_root_to_execute="%s: must be root to execute" msg_must_have_pkg_to_execute="%s: must have pkg(8) to execute" @@ -294,7 +287,6 @@ msg_please_enter_the_username_you_wish_to_login_as="Please enter the username yo msg_please_enter_username_password="Please enter a username and password for sudo(8):" msg_please_select_a_category_to_display="Please select a category to display." msg_please_select_a_cd_dvd_drive="FreeBSD can be installed directly from a CD/DVD containing a valid\nFreeBSD distribution. If you are seeing this menu it is because\nmore than one CD/DVD drive was found on your system. Please select\none of the following CD/DVD drives as your installation drive." -msg_please_select_a_freebsd_ftp_distribution_site="Please select a FreeBSD FTP distribution site" msg_please_select_a_freebsd_http_distribution_site="Please select a FreeBSD HTTP distribution site" msg_please_select_a_usb_drive="You have more than one USB drive. Please choose which drive\nyou would like to use." msg_please_select_dos_partition="FreeBSD can be installed directly from a DOS partition assuming,\nof course, that you have copied the relevant distributions into\nyour DOS partition before starting this installation. If this is\nnot the case then you should reboot DOS at this time and copy the\ndistributions you wish to install into a \"FREEBSD\" subdirectory\non one of your DOS partitions. Otherwise, please select the DOS\npartition containing the FreeBSD distribution files." @@ -331,7 +323,6 @@ msg_rescan_devices="Re-scan Devices" msg_reset="RESET!" msg_reset_all_values_to_startup_defaults="Reset all values to startup defaults" msg_return_to_previous_menu="Return to previous menu" -msg_reuse_old_ftp_site_selection_values="Re-use old FTP site selection values?" msg_reuse_old_http_site_settings="Re-use old HTTP site settings?" msg_review="Review" msg_review_desc="Review/perform pending actions" @@ -370,7 +361,6 @@ msg_sorry_try_again="Sorry, try again." msg_south_africa="South Africa" msg_spain="Spain" msg_spanish_desc="Ported software for the Spanish market." -msg_specify_some_other_ftp_site="Specify some other ftp site by URL" msg_specify_some_other_http_site="Specify some other http site by URL" msg_sweden="Sweden" msg_sysutils_desc="Various system utilities." @@ -390,7 +380,6 @@ msg_ukrainian_desc="Ported software for the Ukrainian market." msg_unable_to_configure_device="Unable to configure the %s interface!\nThis installation method cannot be used." msg_unable_to_fetch_package_from_selected_media="Unable to fetch package %s from selected media.\nNo package add will be done." msg_unable_to_get_file_from_selected_media="Unable to get %s file from selected media.\n\nThis may be because the packages collection is not available\non the distribution media you've chosen, most likely an FTP site\nwithout the packages collection mirrored. Please verify that\nyour media, or your path to the media, is correct and try again." -msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path. FTP media not initialized." msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" msg_unable_to_open="Unable to open %s" diff --git a/usr.sbin/bsdconfig/share/media/Makefile b/usr.sbin/bsdconfig/share/media/Makefile index 2cbce2d492b2..e90b87f70cc2 100644 --- a/usr.sbin/bsdconfig/share/media/Makefile +++ b/usr.sbin/bsdconfig/share/media/Makefile @@ -1,7 +1,7 @@ FILESDIR= ${SHAREDIR}/bsdconfig/media FILES= any.subr cdrom.subr common.subr directory.subr dos.subr \ - ftp.subr http.subr httpproxy.subr network.subr \ + http.subr httpproxy.subr network.subr \ nfs.subr options.subr tcpip.subr ufs.subr usb.subr wlan.subr .include diff --git a/usr.sbin/bsdconfig/share/media/any.subr b/usr.sbin/bsdconfig/share/media/any.subr index ea4fef0b5151..2c6720be364d 100644 --- a/usr.sbin/bsdconfig/share/media/any.subr +++ b/usr.sbin/bsdconfig/share/media/any.subr @@ -34,7 +34,6 @@ f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/media/cdrom.subr f_include $BSDCFG_SHARE/media/directory.subr f_include $BSDCFG_SHARE/media/dos.subr -f_include $BSDCFG_SHARE/media/ftp.subr f_include $BSDCFG_SHARE/media/http.subr f_include $BSDCFG_SHARE/media/httpproxy.subr f_include $BSDCFG_SHARE/media/nfs.subr @@ -69,15 +68,14 @@ f_media_get_type() local prompt="$msg_choose_installation_media_description" local menu_list=" '1 $msg_cd_dvd' '$msg_install_from_a_freebsd_cd_dvd' - '2 $msg_ftp' '$msg_install_from_an_ftp_server' - '3 $msg_http_proxy' + '2 $msg_http_proxy' '$msg_install_from_an_ftp_server_thru_proxy' - '4 $msg_http_direct' '$msg_install_from_an_http_server' - '5 $msg_directory' '$msg_install_from_the_existing_filesystem' + '3 $msg_http_direct' '$msg_install_from_an_http_server' + '4 $msg_directory' '$msg_install_from_the_existing_filesystem' '6 $msg_nfs' '$msg_install_over_nfs' - '7 $msg_dos' '$msg_install_from_a_dos_partition' - '8 $msg_ufs' '$msg_install_from_a_ufs_partition' - 'A $msg_usb' '$msg_install_from_a_usb_drive' + '6 $msg_dos' '$msg_install_from_a_dos_partition' + '7 $msg_ufs' '$msg_install_from_a_ufs_partition' + '8 $msg_usb' '$msg_install_from_a_usb_drive' 'X $msg_options' '$msg_view_set_various_media_options' " # END-QUOTE local hline="$hline_choose_help_for_more_information_on_media_types" @@ -119,7 +117,6 @@ f_media_get_type() case "$mtag" in ?" $msg_cd_dvd") f_media_set_cdrom ;; - ?" $msg_ftp") f_media_set_ftp ;; ?" $msg_http_proxy") f_media_set_http_proxy ;; ?" $msg_http_direct") f_media_set_http ;; ?" $msg_directory") f_media_set_directory ;; diff --git a/usr.sbin/bsdconfig/share/media/ftp.subr b/usr.sbin/bsdconfig/share/media/ftp.subr deleted file mode 100644 index 05c551c7f3d6..000000000000 --- a/usr.sbin/bsdconfig/share/media/ftp.subr +++ /dev/null @@ -1,840 +0,0 @@ -if [ ! "$_MEDIA_FTP_SUBR" ]; then _MEDIA_FTP_SUBR=1 -# -# Copyright (c) 2012-2013 Devin Teske -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# -############################################################ INCLUDES - -BSDCFG_SHARE="/usr/share/bsdconfig" -. $BSDCFG_SHARE/common.subr || exit 1 -f_dprintf "%s: loading includes..." media/ftp.subr -f_include $BSDCFG_SHARE/device.subr -f_include $BSDCFG_SHARE/dialog.subr -f_include $BSDCFG_SHARE/media/common.subr -f_include $BSDCFG_SHARE/media/tcpip.subr -f_include $BSDCFG_SHARE/strings.subr -f_include $BSDCFG_SHARE/struct.subr -f_include $BSDCFG_SHARE/variable.subr - -BSDCFG_LIBE="/usr/libexec/bsdconfig" -f_include_lang $BSDCFG_LIBE/include/messages.subr - -############################################################ GLOBALS - -FTP_SKIP_RESOLV= - -URL_MAX=261261 # according to actual fetch(1) test-results - -FTP_DIRS=" - . - releases/$UNAME_P - snapshots/$UNAME_P - pub/FreeBSD - pub/FreeBSD/releases/$UNAME_P - pub/FreeBSD/snapshots/$UNAME_P - pub/FreeBSD-Archive/old-releases/$UNAME_P -" # END-QUOTE - -############################################################ FUNCTIONS - -# f_dialog_menu_media_ftp -# -# Prompt the user to select from a range of ``built-in'' FTP servers or specify -# their own. If the user makes a choice and doesn't cancel or press Esc, stores -# the user's choice in VAR_FTP_PATH (see variables.subr) and returns success. -# -f_dialog_menu_media_ftp() -{ - f_dialog_title "$msg_please_select_a_freebsd_ftp_distribution_site" - local title="$DIALOG_TITLE" btitle="$DIALOG_BACKTITLE" - f_dialog_title_restore - local prompt="$msg_please_select_the_site_closest_to_you_or_other" - local menu_list=" - '$msg_main_site' 'download.freebsd.org' - '$msg_australia $msg_v6' 'ftp.au.freebsd.org' - ' $msg_australia #3' 'ftp3.au.freebsd.org' - '$msg_austria $msg_v6' 'ftp.at.freebsd.org' - '$msg_brazil #2' 'ftp2.br.freebsd.org' - ' $msg_brazil #3' 'ftp3.br.freebsd.org' - '$msg_bulgaria $msg_v6' 'ftp.bg.freebsd.org' - '$msg_czech_republic $msg_v6' 'ftp.cz.freebsd.org' - '$msg_denmark $msg_v6' 'ftp.dk.freebsd.org' - '$msg_finland' 'ftp.fi.freebsd.org' - '$msg_france $msg_v6' 'ftp.fr.freebsd.org' - ' $msg_france #3' 'ftp3.fr.freebsd.org' - ' $msg_france #6' 'ftp6.fr.freebsd.org' - '$msg_germany $msg_v6' 'ftp.de.freebsd.org' - ' $msg_germany #1 $msg_v6' 'ftp1.de.freebsd.org' - ' $msg_germany #2 $msg_v6' 'ftp2.de.freebsd.org' - ' $msg_germany #5 $msg_v6' 'ftp5.de.freebsd.org' - ' $msg_germany #7 $msg_v6' 'ftp7.de.freebsd.org' - '$msg_greece $msg_v6' 'ftp.gr.freebsd.org' - ' $msg_greece #2 $msg_v6' 'ftp2.gr.freebsd.org' - '$msg_japan $msg_v6' 'ftp.jp.freebsd.org' - ' $msg_japan #2' 'ftp2.jp.freebsd.org' - ' $msg_japan #3' 'ftp3.jp.freebsd.org' - ' $msg_japan #4' 'ftp4.jp.freebsd.org' - ' $msg_japan #6 $msg_v6' 'ftp6.jp.freebsd.org' - '$msg_korea' 'ftp.kr.freebsd.org' - ' $msg_korea #2' 'ftp2.kr.freebsd.org' - '$msg_latvia' 'ftp.lv.freebsd.org' - '$msg_netherlands $msg_v6' 'ftp.nl.freebsd.org' - ' $msg_netherlands #2' 'ftp2.nl.freebsd.org' - '$msg_new_zealand' 'ftp.nz.freebsd.org' - '$msg_norway $msg_v6' 'ftp.no.freebsd.org' - '$msg_poland $msg_v6' 'ftp.pl.freebsd.org' - '$msg_russia $msg_v6' 'ftp.ru.freebsd.org' - ' $msg_russia #2' 'ftp2.ru.freebsd.org' - '$msg_slovenia $msg_v6' 'ftp.si.freebsd.org' - '$msg_south_africa $msg_v6' 'ftp.za.freebsd.org' - ' $msg_south_africa #2 $msg_v6' 'ftp2.za.freebsd.org' - ' $msg_south_africa #4' 'ftp4.za.freebsd.org' - '$msg_sweden $msg_v6' 'ftp.se.freebsd.org' - '$msg_taiwan #4' 'ftp4.tw.freebsd.org' - ' $msg_taiwan #5' 'ftp5.tw.freebsd.org' - '$msg_uk' 'ftp.uk.freebsd.org' - ' $msg_uk #2' 'ftp2.uk.freebsd.org' - '$msg_ukraine $msg_v6' 'ftp.ua.freebsd.org' - '$msg_usa #5 $msg_v6' 'ftp5.us.freebsd.org' - ' $msg_usa #11 $msg_v6' 'ftp11.us.freebsd.org' - ' $msg_usa #14' 'ftp14.us.freebsd.org' - " # END-QUOTE - local hline="$msg_select_a_site_thats_close" - - local height width rows - eval f_dialog_menu_size height width rows \ - \"\$title\" \ - \"\$btitle\" \ - \"\$prompt\" \ - \"\$hline\" \ - $menu_list - - local mtag - mtag=$( eval $DIALOG \ - --title \"\$title\" \ - --backtitle \"\$btitle\" \ - --hline \"\$hline\" \ - --ok-label \"\$msg_ok\" \ - --cancel-label \"\$msg_cancel\" \ - --menu \"\$prompt\" \ - $height $width $rows \ - $menu_list \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD - ) || return $DIALOG_CANCEL - f_dialog_data_sanitize mtag - - case "$mtag" in - URL) setvar $VAR_FTP_PATH "other" ;; - *) - local value - value=$( eval f_dialog_menutag2item \"\$mtag\" $menu_list ) - setvar $VAR_FTP_PATH "ftp://$value" - esac - - return $DIALOG_OK -} - -# f_media_set_ftp -# -# Return success if we both found and set the media type to be an FTP server. -# Variables from variable.subr that can be used to script user input: -# -# VAR_FTP_PATH -# Can be a URL (including "ftp://" protocol-prefix) or "other" -# (user is prompted to enter FTP URL). If a URL, can optionally -# contain directory prefix after hostname/port. Valid examples -# include: -# ftp://myhost -# ftp://somename:21/pub/ -# ftp://192.168.2.3/pub/ -# ftp://[::1]:21/ -# The default port if not specified is 21. -# VAR_NAMESERVER [Optional] -# If set, overrides resolv.conf(5) and sets the nameserver that -# is used to convert names into addresses (when a name converts -# into multiple addresses, the first address to successfully -# connect is used). -# -# Meanwhile, the following variables from variable.subr are set after -# successful execution: -# -# VAR_FTP_HOST -# The FTP host to connect to, parsed from VAR_FTP_PATH. In the -# example case of IPv6 where VAR_FTP_PATH is "ftp://[::1]", this -# variable will be set to "::1" (the outer brackets are removed). -# VAR_FTP_PORT -# The TCP port to connect to, parsed from VAR_FTP_PATH. Usually -# 21 unless VAR_FTP_PATH was of one of the following forms: -# ftp://hostname:OTHER_PORT -# ftp://hostname:OTHER_PORT/* -# ftp://ip:OTHER_PORT -# ftp://ip:OTHER_PORT/* -# ftp://[ip6]:OTHER_PORT -# ftp://[ip6]:OTHER_PORT/* -# VAR_FTP_DIR -# If VAR_FTP_PATH contained a directory element (e.g., -# "ftp://localhost/pub") this variable contains only the -# directory element (e.g., "/pub"). -# -f_media_set_ftp() -{ - f_media_close - - local url - f_getvar $VAR_FTP_PATH url - - # If we've been through here before ... - if f_struct device_network && [ "${url#$msg_other}" ]; then - f_dialog_yesno "$msg_reuse_old_ftp_site_selection_values" || - url= - fi - - if [ ! "$url" ]; then - f_dialog_menu_media_ftp || return $FAILURE - f_getvar $VAR_FTP_PATH url - fi - [ "$url" ] || return $FAILURE - - case "$url" in - other) - setvar $VAR_FTP_PATH "ftp://" - f_variable_get_value $VAR_FTP_PATH \ - "$msg_please_specify_url_of_a_freebsd_distribution" - f_getvar $VAR_FTP_PATH url - if [ ! "${url#ftp://}" ]; then - unset $VAR_FTP_PATH - return $FAILURE - fi - if [ ${#url} -gt ${URL_MAX:-261261} ]; then - f_show_msg "$msg_length_of_specified_url_is_too_long" \ - ${#url} ${URL_MAX:-261261} - unset $VAR_FTP_PATH - return $FAILURE - fi - case "$url" in - ftp://*) : valid URL ;; - *) - f_show_msg "$msg_sorry_invalid_url" "$url" - unset $VAR_FTP_PATH - return $FAILURE - esac - esac - case "$url" in - ftp://*) : valid URL ;; - *) - f_show_msg "$msg_sorry_invalid_url" "$url" - unset $VAR_FTP_PATH - return $FAILURE - esac - - # Set the name of the FTP device to the URL - f_struct_new DEVICE device_ftp - device_ftp set name "$url" - - if ! f_struct device_network || - ! f_dialog_yesno "$msg_youve_already_done_the_network_configuration" - then - f_struct device_network && - f_device_shutdown device_network - if ! f_device_select_tcp; then - unset $VAR_FTP_PATH - return $FAILURE - fi - local dev if - f_getvar $VAR_NETWORK_DEVICE if - f_device_find -1 "$if" $DEVICE_TYPE_NETWORK dev - f_struct_copy "$dev" device_network - fi - if ! f_device_init device_network; then - f_dprintf "f_media_set_ftp: %s" "$msg_net_device_init_failed" - unset $VAR_FTP_PATH - return $FAILURE - fi - - local hostname="${url#*://}" port=21 dir=/ - case "$hostname" in - # - # The order in-which the below individual cases appear is important! - # - "["*"]":*/*) # IPv6 address with port and directory - f_dprintf "Looks like an IPv6 addr with port/dir: %s" \ - "$hostname" - hostname="${hostname#\[}" - port="${hostname#*\]:}" - port="${port%%[!0-9]*}" - dir="/${hostname#*/}" - hostname="${hostname%%\]:*}" - ;; - "["*"]":*) # IPv6 address with port - f_dprintf "Looks like an IPv6 addr with port: %s" "$hostname" - hostname="${hostname#\[}" - port="${hostname#*\]:}" - port="${port%%[!0-9]*}" - hostname="${hostname%%\]:*}" - ;; - "["*"]"/*) # IPv6 address with directory - f_dprintf "Looks like an IPv6 addr with dir: %s" "$hostname" - hostname="${hostname#\[}" - dir="/${hostname#*/}" - hostname="${hostname%%\]*}" - ;; - "["*"]") # IPv6 address - f_dprintf "Looks like an IPv6 addr: %s" "$hostname" - hostname="${hostname#\[}" - hostname="${hostname%\]}" - ;; - # - # ^^^ IPv6 above / DNS Name or IPv4 below vvv - # - *:*/*) # DNS name or IPv4 address with port and directory - f_dprintf "Looks like a %s with port/dir: %s" \ - "DNS name or IPv4 addr" "$hostname" - port="${hostname#*:}" - port="${port%%[!0-9]*}" - dir="/${hostname#*/}" - hostname="${hostname%%:*}" - ;; - *:*) # DNS name or IPv4 address with port - f_dprintf "Looks like a DNS name or IPv4 addr with port: %s" \ - "$hostname" - port="${hostname#*:}" - hostname="${hostname%%:*}" - ;; - */*) # DNS name or IPv4 address with directory - f_dprintf "Looks like a DNS name or IPv4 addr with dir: %s" \ - "$hostname" - dir="/${hostname#*/}" - hostname="${hostname%%/*}" - ;; - *) # DNS name or IPv4 address - f_dprintf "Looks like a DNS name or IPv4 addr: %s" "$hostname" - : leave hostname as-is - esac - - f_dprintf "hostname = \`%s'" "$hostname" - f_dprintf "dir = \`%s'" "$dir" - f_dprintf "port \# = \`%d'" "$port" - - local ns - f_getvar $VAR_NAMESERVER ns - [ "$ns" ] || f_resolv_conf_nameservers ns - if [ "$ns" -a ! "$FTP_SKIP_RESOLV" ] && ! { - f_validate_ipaddr "$hostname" || - f_validate_ipaddr6 "$hostname" - }; then - f_show_info "$msg_looking_up_host" "$hostname" - f_dprintf "%s: Looking up hostname, %s, using host(1)" \ - "f_media_set_ftp" "$hostname" - if ! f_quietly f_host_lookup "$hostname"; then - f_show_msg "$msg_cannot_resolve_hostname" "$hostname" - f_struct device_network && - f_device_shutdown device_network - f_struct_free device_network - unset $VAR_FTP_PATH - return $FAILURE - fi - f_dprintf "Found DNS entry for %s successfully." "$hostname" - fi - - setvar $VAR_FTP_HOST "$hostname" - setvar $VAR_FTP_PORT "$port" - setvar $VAR_FTP_DIR "$dir" - - device_ftp set type $DEVICE_TYPE_FTP - device_ftp set init f_media_init_ftp - device_ftp set get f_media_get_ftp - device_ftp set shutdown f_media_shutdown_ftp - device_ftp set private device_network - f_struct_copy device_ftp device_media - f_struct_free device_ftp - - return $SUCCESS -} - -# f_media_set_ftp_active -# -# Wrapper to f_media_set_ftp to access FTP servers actively. -# -f_media_set_ftp_active() -{ - setvar $VAR_FTP_STATE "active" - f_media_set_ftp -} - -# f_media_set_ftp_passive -# -# Wrapper to f_media_set_ftp to access FTP servers passively. -# -f_media_set_ftp_passive() -{ - setvar $VAR_FTP_STATE "passive" - f_media_set_ftp -} - -# f_media_set_ftp_userpass -# -# Prompt the user to enter/confirm the username/password variables that will -# be used to communicate with the FTP servers. Returns success if the user does -# not cancel or press Esc to either username or password. -# -# Variables from variable.subr that can be used to script user input: -# -# VAR_FTP_USER -# The username to send via ftp(1) when connecting to an FTP -# server. -# VAR_FTP_PASS -# The password to send with the above username. -# -# Does not prompt for confirmation of values if VAR_NONINTERACTIVE is set (see -# variable.subr for more information). -# -f_media_set_ftp_userpass() -{ - local user pass - f_variable_get_value $VAR_FTP_USER \ - "$msg_please_enter_the_username_you_wish_to_login_as" - f_getvar $VAR_FTP_USER user - if [ "$user" ]; then - f_variable_get_value $VAR_FTP_PASS \ - "$msg_please_enter_the_password_for_this_user" - f_getvar $VAR_FTP_PASS pass - else - pass= - fi - [ "$pass" ] # Return status -} - -# f_device_network_up $device -# -# Brings up attached network device, if any - takes FTP device as arg. -# -f_device_network_up() -{ - local dev="$1" netDev - f_struct "$dev" || return $FAILURE - $dev get private netDev || return $SUCCESS # No net == happy net -debug=1 f_dprintf "netDev=[$netDev]" - f_device_init $netDev -} - -# f_device_network_down $device -# -# Brings down attached network device, if any - takes FTP device as arg. -# -f_device_network_down() -{ - local dev="$1" netDev - f_struct "$dev" || return $FAILURE - $dev get private netDev || return $SUCCESS - f_device_shutdown $netDev -} - -# f_media_init_ftp $device -# -# Initializes the FTP media device. Returns success if both able to log into -# the FTP server and confirm the existence of at least one known release path -# using ftp(1). -# -# Variables from variable.subr used to initialize the connection are as follows -# (all of which are configured by f_media_set_ftp above): -# -# VAR_FTP_PATH -# The unparsed FTP URL representing the server to contact. -# Usually "ftp://server" for example. Can contain TCP port number -# and/or directory path (but should not contain username/password -# info). -# VAR_FTP_HOST -# The FTP host to connect to. Can be an IPv4 address (e.g., -# 127.0.0.1), IPv6 address (e.g., ::1), or DNS hostname. Usually -# set automatically in f_media_set_ftp() by parsing VAR_FTP_PATH. -# VAR_FTP_PORT -# The TCP port to connect to. Usually set automatically in -# f_media_set_ftp() by parsing VAR_FTP_PATH. -# VAR_FTP_DIR -# The base FTP directory to use when downloading files from the -# FTP server. Usually set automatically in f_media_set_ftp() by -# parsing VAR_FTP_PATH. -# VAR_FTP_USER [Optional] -# If unset, defaults to using anonymous access. -# VAR_FTP_PASS [Optional] -# If unset, defaults to a sensible value. -# -# In addition, the following (managed either manually or by f_media_set_ftp_*): -# -# VAR_FTP_STATE -# Sets FTPMODE for ftp(1) and can be one of: -# active active mode FTP only -# auto automatic determination of passive or active -# (this is the default) -# gate gate-ftp mode -# passive passive mode FTP only -# See ftp(1) for additional information. -# -# And last, but not least (managed automatically or manually): -# -# VAR_RELNAME -# Defaults to being set to $(uname -r) but can be overridden. -# This sets the name of a release to look for as part of a well -# known set of paths to search for release data once connected -# via FTP. If set to "__RELEASE" or "any" then the VAR_FTP_DIR is -# taken as the absolute path to the release and no further -# searching is done (see FTP_DIRS above in the GLOBALS section -# for a list of well known paths that are used when searching for -# a VAR_RELNAME sub-directory). -# -f_media_init_ftp() -{ - local dev="$1" - local url - - $dev get name url - f_dprintf "Init routine called for FTP device. url=[%s]" "$url" - - if [ "$FTP_INITIALIZED" ]; then - f_dprintf "FTP device already initialized." - return $SUCCESS - fi - - # If we can't initialize the network, bag it! - f_device_network_up $dev || return $FAILURE - - local cp - while :; do - f_getvar $VAR_FTP_PATH cp - if [ ! "$cp" ]; then - if ! f_media_set_ftp || - ! f_getvar $VAR_FTP_PATH cp || - [ ! "$cp" ] - then - f_show_msg "$msg_unable_to_get_proper_ftp_path" - f_device_network_down $dev - return $FAILURE - fi - fi - - local ftp_host ftp_dir - if ! { - f_getvar $VAR_FTP_HOST ftp_host && - f_getvar $VAR_FTP_DIR ftp_dir - }; then - f_show_msg "$msg_missing_ftp_host_or_directory" - f_device_network_down $dev - return $FAILURE - fi - - local ftp_port - f_getvar $VAR_FTP_PORT ftp_port - local host="$ftp_host" port="${ftp_port:+:$ftp_port}" - case "$host" in *:*) host="[$host]"; esac - - local user pass use_anon= - f_getvar $VAR_FTP_USER user - if [ ! "$user" ]; then - user="anonymous" - use_anon=1 - fi - if ! f_getvar $VAR_FTP_PASS pass; then - f_getvar $VAR_HOSTNAME cp - if f_running_as_init; then - pass="installer@$cp" - else - local name="$( id -un 2> /dev/null )" - pass="${name:-ftp}@$cp" - fi - fi - - f_show_info "$msg_logging_in_to_user_at_host" \ - "$user" "$ftp_host" - - local userpass="" - if [ ! "$use_anon" ] && [ "$user" -o "$pass" ]; then - userpass="$user${pass:+:$( f_uriencode "$pass" )}" - userpass="$userpass${userpass:+@}" - fi - - local mode rx - f_getvar $VAR_FTP_STATE mode - - if [ "$ftp_dir" ]; then - if ! rx=$( - printf 'cd "%s"\npwd\n' "$ftp_dir" | eval \ - FTPMODE=\"\$mode\" \ - ${use_anon:+FTPANONPASS=\"\$pass\"} \ - ftp -V ${use_anon:+-a} \ - \"ftp://\$userpass\$host\$port\" \ - 2>&1 - ); then - f_show_msg "$msg_couldnt_open_ftp_connection" \ - "$ftp_host" "$rx" - break # to failure - fi - if echo "$rx" | awk -v dir="/${ftp_dir#/}" ' - BEGIN { - found = 0 - if ( dir != "/" ) sub("/$", "", dir) - } - /^Remote directory: / { - sub(/^[^:]*:[[:space:]]*/, "") - if ($0 != dir) next - found = 1; exit - } - END { exit ! found } - '; then - setvar $VAR_FTP_DIR "$ftp_dir" - setvar $VAR_FTP_PATH \ - "ftp://$ftp_host/${ftp_dir#/}" - else - f_show_msg \ - "$msg_please_check_the_url_and_try_again" \ - "ftp://$ftp_host/${ftp_dir#/}" - break # to failure - fi - fi - - # - # Now that we've verified that the path we're given is ok, - # let's try to be a bit intelligent in locating the release we - # are looking for. First off, if the release is specified as - # "__RELEASE" or "any", then just assume that the current - # directory is the one we want and give up. - # - local rel - f_getvar $VAR_RELNAME rel - f_dprintf "f_media_init_ftp: rel=[%s]" "$rel" - - case "$rel" in - __RELEASE|any) - FTP_INITIALIZED=YES - return $SUCCESS - ;; - *) - # - # Ok, since we have a release variable, let's walk - # through the list of directories looking for a release - # directory. First successful CWD wins. - # - if ! rx=$( - for dir in $FTP_DIRS; do - # Avoid confusing some servers - [ "$dir" = "." ] && continue - printf 'cd "/%s/%s"\npwd\n' \ - "$dir" "$rel" - done | eval \ - FTPMODE=\"\$mode\" \ - ${use_anon:+FTPANONPASS=\"\$pass\"} \ - ftp -V ${use_anon:+-a} \ - \"ftp://\$userpass\$host\$port\" \ - 2>&1 - ); then - f_show_msg "$msg_couldnt_open_ftp_connection" \ - "$ftp_host" "$rx" - break # to failure - fi - - local fdir - if fdir=$( echo "$rx" | awk ' - /^Remote directory: / { - sub(/^[^:]*:[[:space:]]*/, "") - if ($0 == "/") next - # Exit after the first dir - found++; print; exit - } - END { exit ! found } - ' ); then - setvar $VAR_FTP_DIR "$fdir" - setvar $VAR_FTP_PATH "ftp://$ftp_host$fdir" - FTP_INITIALIZED=YES - return $SUCCESS - else - f_yesno "$msg_cant_find_distribution" \ - "$rel" "$ftp_host" - if [ $? -eq $DIALOG_OK ]; then - unset $VAR_FTP_PATH - f_media_set_ftp && continue - fi - fi - esac - break # to failure - done - - unset FTP_INITIALIZED $VAR_FTP_PATH - f_device_network_down $dev - return $FAILURE -} - -# f_media_get_ftp $device $file [$probe_type] -# -# Returns data from $file on an FTP server using ftp(1). Please note that -# $device is unused but must be present (even if null). Information is instead -# gathered from the environment. If $probe_type is present and non-NULL, -# returns success if $file exists. If $probe_type is equal to $PROBE_SIZE, -# prints the size of $file in bytes to standard-out. -# -# Variables from variable.subr used to configure the connection are as follows -# (all of which are configured by f_media_set_ftp above): -# -# VAR_FTP_HOST -# FTP host to connect to. Can be an IPv4 address, IPv6 address, -# or DNS hostname of your choice. -# VAR_FTP_PORT -# TCP port to connect on; see f_media_set_ftp() above. -# VAR_FTP_USER [Optional] -# If unset, defaults to using anonymous access. -# VAR_FTP_PASS [Optional] -# If unset, defaults to a sensible value. -# -# In addition, the following (managed either manually or by f_media_set_ftp_*): -# -# VAR_FTP_STATE -# Sets FTPMODE for ftp(1) and can be one of: -# active active mode FTP only -# auto automatic determination of passive or active -# (this is the default) -# gate gate-ftp mode -# passive passive mode FTP only -# See ftp(1) for additional information. -# -# See variable.subr for additional information. -# -# Example usage: -# f_media_set_ftp -# f_media_get_ftp media $file -# -f_media_get_ftp() -{ - local funcname=f_media_get_ftp - local dev="$1" file="$2" probe_type="$3" hosts= - - f_dprintf "f_media_get_ftp: dev=[%s] file=[%s] probe_type=%s" \ - "$dev" "$file" "$probe_type" - - local ftp_host ftp_port - f_getvar $VAR_FTP_HOST ftp_host - f_getvar $VAR_FTP_PORT ftp_port - - if [ ! "$FTP_INITIALIZED" ]; then - f_dprintf "No FTP connection open, can't get file %s" "$file" - return $FAILURE - fi - - if ! { - f_validate_ipaddr "$ftp_host" || - f_validate_ipaddr6 "$ftp_host" || - { - f_dprintf "%s: Looking up hostname, %s, using host(1)" \ - "f_media_get_ftp" "$ftp_host" - f_host_lookup "$ftp_host" hosts - } - }; then - # All the above validations failed - [ "$hosts" ] && f_dialog_msgbox "$hosts" - return $FAILURE - elif [ ! "$hosts" ]; then - # One of the first two validations passed - hosts="$ftp_host" - fi - - local host connected= - for host in $hosts; do - f_quietly nc -nz "$host" "$ftp_port" || continue - connected=1; break - done - if [ ! "$connected" ]; then - f_show_msg "$msg_couldnt_connect_to_ftp_server %s:%s" \ - "$ftp_host" "$ftp_port" - return $FAILURE - fi - - local user pass use_anon= - f_getvar $VAR_FTP_USER user - if [ ! "$user" ]; then - user="anonymous" - use_anon=1 - fi - if ! f_getvar $VAR_FTP_PASS pass; then - f_getvar $VAR_HOSTNAME cp - if f_running_as_init; then - pass="installer@$cp" - else - local name="$( id -un 2> /dev/null )" - pass="${name:-ftp}@$cp" - fi - fi - *** 173 LINES SKIPPED *** From nobody Thu Oct 5 12:44:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WTh44f0z4wZZW; Thu, 5 Oct 2023 12:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WTh3G8rz3gYk; Thu, 5 Oct 2023 12:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TnPiW007NpTW4cebJ+i491kLqUCF41k4t8RoW9fGT44=; b=yzpUrde0D3Z0Hj6V+t8knzcrhdiqIDJButK/AwuVQ6xuDAJbaz/QDJ7L2PpPkMw+N2fqzc gR56HXBvZE7R0kEDr+LN3UCv8tT+e1BtNdLFdVX46APcUcegJze+kKtlbvy0WJ+MOaOIwv 5dVULNGPQtzOscnaZEDjPNVgCVif2OfWtxVjtM5knH6fec+yYCxjPJ9/FCL9SrLGNDEZDx dUXkvNnusHIOcM6bRHpSD8y4EqL015aAwOdq9OiI4drh83XhCHZegJHGdeNHvaAVsW+9aa 9x9Sn9L9PO4WHJGOuj2ULeBXsRM+h0GWd57SYMjNq+MY2hySkkQ2EohEWqK0PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509864; a=rsa-sha256; cv=none; b=Q7hHOCOSIV/K5es37ry6uYEajxAaS5g2hm8PjCO3ZEpUiGPzNEPR8pE2ALqWUoQzAo42Jd TTYWwh9TnJ232JtCbeeCgYp6iBUzioIq7DM4c8mePrXSsiZCGN3yMeQGTfpCT8aQ84mr8l zV7GWMct6YsYr27GOtcD/0JmxeZp70VKBk9iW57zId5ooy2ZRPbfGefX+EARWlPjg5w4pJ Nk4DEspZTuYxC4rhdU2mYyfyYsCG59U+JZGQKelVez49DQO14imA29V5uh13RrFuYvSNVt XS4l4HbP+m/V0uItQltgq8ZzCvccqoorWOXRjw9ZK/ejbBLFm1fJNsOBP5keXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TnPiW007NpTW4cebJ+i491kLqUCF41k4t8RoW9fGT44=; b=vwR53ORvqI8oEKi6bJ0w+pvmSKpcR70LZ8xzU22wXOJIVg/tVssn+iBKIiSvvXNZqG9Lhi n7l3/+Tc9Wf1WDNFLMuxS4nyxmpIGH47I6MSX0OtmI7hyU+F2UjGZwHq6nP5QncVKHADRG naAmGwFBNRDbg+wQScgQjCdmJJ6nU+RohwrAloKtxVzhCbVju8CKJ6WT6+vSmyvPIvRKoY l+kyFUrucncq3eSmh4rYY8wuP++h0l29lpJ9MOgIs39qnGviWohhc2oPiJgjqloAr9QKYz 5KV1ETrXe3camTjdhKJK2TNLs8ZFQsh4QxnuDC1XilfEN/pC7vg8U+IsAR5sgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WTh2CSkz1KQx; Thu, 5 Oct 2023 12:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CiOr6027134; Thu, 5 Oct 2023 12:44:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CiOHc027131; Thu, 5 Oct 2023 12:44:24 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:24 GMT Message-Id: <202310051244.395CiOHc027131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5ad9edd4565c - main - bsdconfig: use working respositories List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ad9edd4565cdb657da3677b292b772ff573d4df Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5ad9edd4565cdb657da3677b292b772ff573d4df commit 5ad9edd4565cdb657da3677b292b772ff573d4df Author: Baptiste Daroussin AuthorDate: 2023-10-05 12:43:19 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 12:44:18 +0000 bsdconfig: use working respositories pkg(8) packages have not been published in ftp.freebsd.org, so remove this option --- usr.sbin/bsdconfig/share/media/http.subr | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bsdconfig/share/media/http.subr b/usr.sbin/bsdconfig/share/media/http.subr index c4b1b131d236..e23f1abe27db 100644 --- a/usr.sbin/bsdconfig/share/media/http.subr +++ b/usr.sbin/bsdconfig/share/media/http.subr @@ -76,7 +76,6 @@ f_dialog_menu_media_http() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - 'dist $msg_main_site' 'ftp.freebsd.org' 'pkg $msg_main_site' 'pkg.freebsd.org' 'URL' '$msg_specify_some_other_http_site' " # END-QUOTE From nobody Thu Oct 5 12:44:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WV82zGqz4wZkd; Thu, 5 Oct 2023 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WV826d8z3gtb; Thu, 5 Oct 2023 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bB+5mncnGS9EE4YEf1tbP+F03swS5HD7l6sj6oQqi+Q=; b=yuRE2mGfCNMTMak1S64nOJ2VP5dpwwJjUlSAT+zsaVIN+0gG6o/4kJoZib0QBPeWkzpEqX HJr82n7o+Ft5g/YigpNMlN0H2zxb5uYvrB0U/GjACUv3/lyFOBKMfc2FA+UqKDNWT1UPym y4a/b5/KgE5C7F1ilUntZjtKDLx1ghu3Ot8QQcyfIo7eCGBCQjgXZKxUj4R0Fmf9me7mjq m/iv4UZqWp7qtnSMpliI2pDDmWgRawrEN9PIOQPx/xbmvRXmeaH8RU9ydr3U9p8/9VQMsQ ehL1T+4/OokkFVBUb5ui9VY+1W3mL4fHNCfbxESHTMBAOee59UKFr5o0K21PxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509888; a=rsa-sha256; cv=none; b=NlSM6n4HYaG+t97xSmr7N1ab8jCMMY6M5kFwTcQPE2ohdIGyG8A71g/sQICaJiwBonUgPG kPnTDIZhxR5yetOlMbsNNscYI1v4yWRdsLK2YB8lMWFColn9MhWjy2KJXgPPhLYkVbmBAY l1X+Jr2bbm8D3zhYQb4uPAmpDIUm6Rkz9nTjLtN8QQ+nRhdfsmQKsxo+3bmdBQ5+q6S6Uo d+1kK9kGeXkfbclrpuwsasUEhdmu3ag7fA1KF5xtbgwz7Vl9NOA0tDwSPfFMljU9jhQdTz r4rBz5kmlgEGJGgaiRLn0tvboEu0XMoSOBAmNqbu4C6BFhAJdaiVLI1kgFt+MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bB+5mncnGS9EE4YEf1tbP+F03swS5HD7l6sj6oQqi+Q=; b=nk5KjQBOXqBN0S+UmPQjphCnnBre3VQWSALe01TNqDybMg15xJR5ry2fdVjPwKHa/9fsZu v54IkyzZSjDE3zQHLO8FUH4g80QLTI9joYwVRsYI5BEwfhgYaR3a9hy79ORpjw9s6oNvwo fUjick1XmNJTbWQxqlVuWcFipfTQHOgUctwUhugyrY5ER50k+TANsCpVu84FTh041ZdAU6 jlbtM85P1EJL8NeueS5mGDNhImVl0zgVfEdDA4DyKifQvtFfO6/9h01k13Wh4S/eR2QMVt SyrMNuLWCnxK0NpAT6bYo8nO84zucJMqvzNsbJ/8XycsLZkXjs8mcr6CUsj4ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WV80t5Jz1KQy; Thu, 5 Oct 2023 12:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Cim1o027351; Thu, 5 Oct 2023 12:44:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CimUE027348; Thu, 5 Oct 2023 12:44:48 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:48 GMT Message-Id: <202310051244.395CimUE027348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 2749c222da8a - main - vfs cache: sanitize debug counters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2749c222da8a6325d39c0571f72b1dbed2f7d583 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2749c222da8a6325d39c0571f72b1dbed2f7d583 commit 2749c222da8a6325d39c0571f72b1dbed2f7d583 Author: Mateusz Guzik AuthorDate: 2023-10-05 12:16:18 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 12:44:42 +0000 vfs cache: sanitize debug counters They are very rarely triggered, so no need for per-cpu distribution. At the same time the non-cpu ones still should use atomics to not lose any updates. --- sys/kern/vfs_cache.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 6ae4239cc11d..00632716a2ec 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -628,17 +628,14 @@ static SYSCTL_NODE(_vfs_cache, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Name cache debugging"); #define DEBUGNODE_ULONG(name, varname, descr) \ SYSCTL_ULONG(_vfs_cache_debug, OID_AUTO, name, CTLFLAG_RD, &varname, 0, descr); -#define DEBUGNODE_COUNTER(name, varname, descr) \ - static COUNTER_U64_DEFINE_EARLY(varname); \ - SYSCTL_COUNTER_U64(_vfs_cache_debug, OID_AUTO, name, CTLFLAG_RD, &varname, \ - descr); -DEBUGNODE_COUNTER(zap_bucket_relock_success, zap_bucket_relock_success, +static u_long zap_bucket_relock_success; +DEBUGNODE_ULONG(zap_bucket_relock_success, zap_bucket_relock_success, "Number of successful removals after relocking"); -static long zap_bucket_fail; +static u_long zap_bucket_fail; DEBUGNODE_ULONG(zap_bucket_fail, zap_bucket_fail, ""); -static long zap_bucket_fail2; +static u_long zap_bucket_fail2; DEBUGNODE_ULONG(zap_bucket_fail2, zap_bucket_fail2, ""); -static long cache_lock_vnodes_cel_3_failures; +static u_long cache_lock_vnodes_cel_3_failures; DEBUGNODE_ULONG(vnodes_cel_3_failures, cache_lock_vnodes_cel_3_failures, "Number of times 3-way vnode locking failed"); @@ -1739,7 +1736,7 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struct componentname *cnp, cache_zap_locked(rncp); mtx_unlock(blp); cache_unlock_vnodes(dvlp, vlp); - counter_u64_add(zap_bucket_relock_success, 1); + atomic_add_long(&zap_bucket_relock_success, 1); return (0); } @@ -1835,7 +1832,7 @@ retry: error = cache_zap_locked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { - zap_bucket_fail++; + atomic_add_long(&zap_bucket_fail, 1); goto retry; } counter_u64_add(numposzaps, 1); @@ -2061,7 +2058,7 @@ negative_success: counter_u64_add(numnegzaps, 1); error = cache_zap_locked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { - zap_bucket_fail2++; + atomic_add_long(&zap_bucket_fail2, 1); goto retry; } cache_free(ncp); @@ -2259,8 +2256,8 @@ cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) } else { if (mtx_trylock(vlp)) goto out; - cache_lock_vnodes_cel_3_failures++; cache_unlock_vnodes_cel(cel); + atomic_add_long(&cache_lock_vnodes_cel_3_failures, 1); if (vlp < cel->vlp[0]) { mtx_lock(vlp); mtx_lock(cel->vlp[0]); From nobody Thu Oct 5 12:44:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WV93fL9z4wZgy; Thu, 5 Oct 2023 12:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WV92yV4z4CnP; Thu, 5 Oct 2023 12:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQzMiGgRG7J9kC5BX1focLPzktVQ90DQ6UJSn0WxEr8=; b=FE0dkaWBWpFdziAKM+PLQbjJFzVTbbYAfzBq0Vbu0RRtybpIg7q+wgWu71OuL/NPzhXeix Wyu9YkCgOLsstfvE1sICVWT1fjGyiIKUZM3A7DpOdJ6WRr6jsU7pJHGZDqKYuzkZxpwY7m paYLKy79bWW0rW2xpfQF4wsAD/G12NutiaH1jqxQlm/KO8LVkUrCjaOZ2jEx3iIw6Qb1ax iMUs7lcmPJIT+7oAcxTox2hCI1FzAy3z4A1yZ6ldm6xz5Jdd5wvtM/lu/nWEp03iK2uSPn 6zkX8+juThdsWqlN6TQz2qpCjDUaJWm5fWG6n4LgVmyBXiJdQ+2jRi+DzbfRAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509889; a=rsa-sha256; cv=none; b=r2YAzKHqqdhgCRWpDUVyEdXW8oJptScKNRkA0aCbZhpgNV8g0LAFkJ1OXpU2ty9Xs+XBAh Vv1Zb7Y2BkxoQ6virqY30wHQDbIh4igLuFr5aD8I3D45gfeStDpOzscfigHbI/kW34vUrT VpmsN9vYQGxQR90fqpxBh0l39U7Vs4vnrOao6NHG6qHACCmYI7Exyo15cBwNdVT/guF7Zl 96M6WMq4QuVbeTGg6vWvMeLE15aMURS4XLdU1wlkF8wt6pg2wDbEp82UdAg6/ErqnSHR9h aiVxHeCghcIadOpGDBqFwud1oJPxiuglP2hQQsVa//i4dRO8+m2fDjTHTAmAMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQzMiGgRG7J9kC5BX1focLPzktVQ90DQ6UJSn0WxEr8=; b=JpcahhnsqW8TdPuQrPIcOfeXxzmW5T7Q4jjr2QesojYa+5U/Na+qJhG3NCaQ96LPYp1ZBL Gtwnr/kgOzl+O15yRja9a4S54NT0lCb3sEiFv21pYxdbT+bcQDLy4+BJPoKqALRDaz/7VC KC3lppDMkBk4xl6RLpVQbzhJaGXleOiG/P5Wo9ccIXeSa+EHU50Uqwe3zeafnLKgkeZq2B PX6vLoXjrT7/U5cJyDfkSGH1vs+uglq3YNEA9+lzcyM2dbc3LnN2h7m1ZMPQv0xsVvdmFL Px+6jX5ERaKVC6/AX2rrqUZW9vNckQjXzYEQncPTilArkFrDjk/2xHeZHGGQ2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WV922hPz1KR0; Thu, 5 Oct 2023 12:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Cinsn027410; Thu, 5 Oct 2023 12:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395Cin3k027407; Thu, 5 Oct 2023 12:44:49 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:49 GMT Message-Id: <202310051244.395Cin3k027407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0f15054f7990 - main - vfs cache: plug a hypothetical corner case when freeing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f15054f7990f9c772bea34778a8838aa05ebed8 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0f15054f7990f9c772bea34778a8838aa05ebed8 commit 0f15054f7990f9c772bea34778a8838aa05ebed8 Author: Mateusz Guzik AuthorDate: 2023-09-23 02:04:06 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 12:44:42 +0000 vfs cache: plug a hypothetical corner case when freeing cache_zap_unlocked_bucket is called with a bunch of addresses and without any locks held, forcing it to revalidate everything from scratch. It did not account for a case where the entry is reallocated with everything the same except for the target vnode. Should the target use a different lock than the one expected, freeing would proceed without being properly synchronized. Note this is almost impossible to happen in practice. --- sys/kern/vfs_cache.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 00632716a2ec..560ff7d441c0 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1720,6 +1720,7 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struct componentname *cnp, struct mtx *blp) { struct namecache *rncp; + struct mtx *rvlp; cache_assert_bucket_unlocked(ncp); @@ -1732,14 +1733,24 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struct componentname *cnp, !bcmp(rncp->nc_name, cnp->cn_nameptr, rncp->nc_nlen)) break; } - if (rncp != NULL) { - cache_zap_locked(rncp); - mtx_unlock(blp); - cache_unlock_vnodes(dvlp, vlp); - atomic_add_long(&zap_bucket_relock_success, 1); - return (0); - } + if (rncp == NULL) + goto out_mismatch; + + if (!(ncp->nc_flag & NCF_NEGATIVE)) + rvlp = VP2VNODELOCK(rncp->nc_vp); + else + rvlp = NULL; + if (rvlp != vlp) + goto out_mismatch; + + cache_zap_locked(rncp); + mtx_unlock(blp); + cache_unlock_vnodes(dvlp, vlp); + atomic_add_long(&zap_bucket_relock_success, 1); + return (0); + +out_mismatch: mtx_unlock(blp); cache_unlock_vnodes(dvlp, vlp); return (EAGAIN); From nobody Thu Oct 5 12:44:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WVB4g7hz4wZp1; Thu, 5 Oct 2023 12:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WVB41Gjz4CYb; Thu, 5 Oct 2023 12:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rl8tUNqrMM1534FurhcO+jWmTw5C+unksvZUGJaT10=; b=ImXQEEnGZPSUAT16X4s+dXhREwq8R/o66X9wEk43mkqYZchUrwCqjFU7a1nSOi225v/qjB O/5MYIPlTmHsL7cRzRAcptKDxTMPmKkOPMQChpM2/KUazmqg8WuJhhdx920fDuZPjDiv24 92EOn1tyHm7LGp85is9tz2gcx0FBDqUWLJ0KoAjhIzFyfdEZsemhn9uiNH2CfK6U5CgYyo J4MYTOff8eWdBU6F1RklOfbvi0R0Bk7et6mLQrHHmFbwmPqPW9xzH4eRknjJQCNsxpwAxM bAf+gsaHxXwMakG9t791klWvmMFZTum44jMNVrmz1wcA43xvugBMoIlJTDbUyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509890; a=rsa-sha256; cv=none; b=pwRn5soMdGJrYhoeWUlUOzpL0XEOE80Y9YtBk9nP0Iou3w5BP89mRAe0UPlyD4q0AJ9Ejo GRV65SFPVvIqtRTaepwwAhXtB8v0HBQM1L3kB1ETYjTVdUm8b2DcsuDPLLP8KqgtSdLiKJ 5h8UfZZpWSYNbQb6L3iKVvfJvmuWhbqnf1rS5QzdZxxQlo6PsF3Y3gHDOCWfr0URDQ7RiR Dn8q0SpMjY3HYbQyszd4UA4Njvlynkw8Fc1xoue3/ET7xMIwK1C0cWRwqZjUIWfh22JvAE hWwp3OPcLIB/3oRcRHg8n+oZ6fprkvBzvb9cYgdgEShLqilUOMgjuZboixxPsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rl8tUNqrMM1534FurhcO+jWmTw5C+unksvZUGJaT10=; b=io2FP73KaT3wTMHC+Hodd7dzQJUXgnHeedNRD9qH1yEgMmlq6rY2VVHazjdJdB0mE3Byxm GObh3C5eD3vAOKr8d9Qp3BWCWjN4tUDPmUgvoYYaTovukRNl92o9+fqOzqihKp9hT5SxMq jMgf9JGaEBc3jIEIMrqPJwp/QwoWA8ailAYDwwECMQVAuw33W178AhR/YN3wCKDUPq7hy5 Nm02gPMfHeS3hkBjM4MMnXB98rfmJbVzfWneV0dnFbYmWfX6LGES6ek7sFT6/qi4fUekMa 2eimY4IuZmkl/5Wlvw55AWcwl1geo1O3KXrTtND7eArFDbQzKKxlOKwitJv6QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WVB34Lkz1KlB; Thu, 5 Oct 2023 12:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CioLa027461; Thu, 5 Oct 2023 12:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CioXl027458; Thu, 5 Oct 2023 12:44:50 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:50 GMT Message-Id: <202310051244.395CioXl027458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: cd2105d691f4 - main - vfs cache: denote a known bug in cache_remove_cnp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd2105d691f446f7dbddf5965d82b9e9103bc8d2 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cd2105d691f446f7dbddf5965d82b9e9103bc8d2 commit cd2105d691f446f7dbddf5965d82b9e9103bc8d2 Author: Mateusz Guzik AuthorDate: 2023-10-05 12:32:29 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 12:44:43 +0000 vfs cache: denote a known bug in cache_remove_cnp --- sys/kern/vfs_cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 560ff7d441c0..cc2f405d5281 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1822,6 +1822,15 @@ retry_dotdot: return (1); } + /* + * XXX note that access here is completely unlocked with no provisions + * to keep the hash allocated. If one is sufficiently unlucky a + * parallel cache resize can reallocate the hash, unmap backing pages + * and cause the empty check below to fault. + * + * Fixing this has epsilon priority, but can be done with no overhead + * for this codepath with sufficient effort. + */ hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); blp = HASH2BUCKETLOCK(hash); retry: From nobody Thu Oct 5 12:44:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1WVC6tscz4wZkl; Thu, 5 Oct 2023 12:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1WVC4gCYz4CWt; Thu, 5 Oct 2023 12:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwlB48N6Gf2oS0dneumjCoZZnGKYOPMNjL7VWlr+DBM=; b=wW3gMpyicC/JFhN2M628In+P2hp6zFNi1V3fr1nvUmwApcVwxj68ygMB9rIHVpGv3VgJmm jTeRIBjaiuKgYdLlF1zrOhuCoM+r9JBffZrkeaMdpKc2lcp3uHPeph55UJJy2aYUbhYjAI 9o/QBtHHN7R6IyP0OhSvo+BM6N6PWogYGegl5B6WqAHjnzkI0jhT1Z7ev5nzPyxCqsuYzV X33wG+8Y4zAE/+lcL8USJoDQkwnHdaTnSE4ysymdFZYjscWnDYD1nJX1SAhyIxaaApEnQS gNrdUBTgYHabFebIn5GfZk1ttdgaAw5roroN//3W9VwFKA9SQ0SVFOLv17PSPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509891; a=rsa-sha256; cv=none; b=t0FRgPJZPj7LP48ZLZK5lppVd3OX+nkm4ubrlDhotVj3NFTfgr0YB7iAbub32PmLasnQcX ZAjLuCMbBLPthATDHnWB5dwc48IC+6F5Ni5LuTuYw2WVEh3RDzO5trMdH7z2e15q0blX5h HGuOXERmxhyB/kRmwpEzSBZYN9sqRRnMDliBYhvtPL+Ho8n7mIqYfMexT/BCRz/Y8/2jcP s+iNi5nfbeqOx1at8g2X8ERmfiZgsLEo3t/qo6dmE5W7MFJmRwzd/MEet4UhRoD92TDKYi q+ZuXYjaXQSHOJQJ0X/4YkePxsPTqJ2g2mn5jX9ypg75g3PnE8qLJzApVSRlxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwlB48N6Gf2oS0dneumjCoZZnGKYOPMNjL7VWlr+DBM=; b=WEBiHLFd4v4R6AKitntZJF7KEzqjMOEbyNUG+3QOpyvxukg0uyFpAv/qewonoOk0lqsSal lw8NSnBOMISsuVR3tYmK5yMnS7n4HVI5nBfO5W9poA98z6XMuvz25XREti/W+yTo8aYqYo 1KPR0s+cu4aBNXeTc8zZGsy4pG28IzYeENWd3+6n2Vb5XOM6K6RS6UxiSTWOCXf0nUphdq UYtaB8yHDrCzxuVEIFFTEYlsYCtB9PWks7CBylcfNARRHBKs17J6PmQLPd0oY1zIFYp2Ia hAJjjxuZtf8YH4NA7qY1+zCG8iXEpCtVnrVfVO4MkXRS6Q2kDuTFgnFJ1BwCHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1WVC3mtsz1L5N; Thu, 5 Oct 2023 12:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CipAn027509; Thu, 5 Oct 2023 12:44:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CipkC027506; Thu, 5 Oct 2023 12:44:51 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:51 GMT Message-Id: <202310051244.395CipkC027506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 8b622172ba44 - main - vfs cache: add 2 more optimizaiton ideas List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b622172ba44f914092c1d44cecb2b101eb8e17b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8b622172ba44f914092c1d44cecb2b101eb8e17b commit 8b622172ba44f914092c1d44cecb2b101eb8e17b Author: Mateusz Guzik AuthorDate: 2023-10-05 12:38:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 12:44:43 +0000 vfs cache: add 2 more optimizaiton ideas --- sys/kern/vfs_cache.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index cc2f405d5281..99e293d5a873 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -276,6 +276,20 @@ * It could become part of the API contract to *always* have a rootvnode set in * mnt_rootvnode. Such vnodes are annotated with VV_ROOT and vnlru would have * to be modified to always skip them. + * + * === inactive on v_usecount reaching 0 + * + * VOP_NEED_INACTIVE should not exist. Filesystems would indicate need for such + * processing with a bit in usecount. + * + * === v_holdcnt + * + * Hold count should probably get eliminated, but one can argue it is a useful + * feature. Even if so, handling of v_usecount could be decoupled from it -- + * vnlru et al would consider the vnode not-freeable if has either hold or + * usecount on it. + * + * This would eliminate 2 atomics. */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, From nobody Thu Oct 5 14:27:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Ymh63Ngz4wqvs; Thu, 5 Oct 2023 14:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Ymh5YT9z4PWC; Thu, 5 Oct 2023 14:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kqDVDptzNnPHGpL5Ho8Z9w8wfZULQbLNe29sMOHgs4=; b=XB6z04IsACltt0U5n201rXgXCwwfpkKmoxa/wooVr89QGZBBUPKYBIjGKd4wGZ6jfg+SMR heMmHfTDj4OALX2XW9pt8PQnaLLki7NrPTrrq+p4PAlat5d3JElWfxFAbVUl/atA86P6ol iKCO2TRujOmrlj6/KHGARtYOlu00RmB+Wy9VqOouJJPk7dIOKtZRmfQFPwZJMbj6NW3Sz6 SPZYJuSRZuV9cOw99JR13vdHcvD5odcxca+XdVMuFavM7WeO3Zv5HfgzV6MjF4GZUYSIV9 6uZeMhYiJRYz15AhD0xJCrxUFirJU0WXxBhUwCFcVECPS1nhgXUvliftPxuT8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696516052; a=rsa-sha256; cv=none; b=gKnD1AHAz5YTWwbwSTvHz//74Q86iVEFIH6g/4bb3RyVMllM701tgCQNXb13egyNfJQD+z uJDI7S/xSOU0xfzC9+5Sxyl+6n+MEBsox9OHzeWwIGmFD2hfQBBpxFGfcIO6+a6nnhiPbR IY54uq0M694NxYm01Ok0OVvfWgiYKqzqcX/8xaNI+6phkaCaz8K/59j3WVHMgz6LOZQobT ySsqEtMH4KWyxktFsQ8BqTF9q+GblxyOjLiF02ptVm852ay4M/baOGtJe/Nrj6WQ851qu/ 6xAhsiiGZn4hFmo02TtCvkwbZaWy6h8sYCJxBvwHAYFBzUaJWBNeP/y7o+LLWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+kqDVDptzNnPHGpL5Ho8Z9w8wfZULQbLNe29sMOHgs4=; b=NJfwmTo7QaPCk56O0b3D9Mcsy+SSRYoO1z/oWUPl2Xq3dU/TTVo9e9tNQp/VC97kn+u2q4 vUZSf/E1znrzeJzuEX5eDP7954upEKgbt8gK8wK6v0N0RMkNUT9oUQza1vjOqPuPCyBHFv tsXR4xNbxhoPVKWo5jBVldxPlWKqrxqt/OYEO4y52aZnQseBmdUcq4cbF14Cy+Ffwp3mgo s0i/GsoDESdeSNpps/eKK1+oNIppqW1PQCxqUtffH+9pbSolxEPEwBSgQvrgoq0g89r1t4 pzadMnxf1ATJfzI3vbHKJASoCNt+kDDy+yOkAWiRv98q1da9yw6EeKb/Wj0bTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Ymh4cxKz1MbW; Thu, 5 Oct 2023 14:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395ERWpB094858; Thu, 5 Oct 2023 14:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395ERWd3094855; Thu, 5 Oct 2023 14:27:32 GMT (envelope-from git) Date: Thu, 5 Oct 2023 14:27:32 GMT Message-Id: <202310051427.395ERWd3094855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7d48224073ce - main - netlink: fix accessing freed memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7d48224073ce14f0dd3db2d4e96876ac928b52f2 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7d48224073ce14f0dd3db2d4e96876ac928b52f2 commit 7d48224073ce14f0dd3db2d4e96876ac928b52f2 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:11:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-05 14:27:10 +0000 netlink: fix accessing freed memory The check for if_addrlen in dump_iface() is not sufficient to determine if we still have a valid if_addr. Rather than directly accessing if_addr check the STAILQ (for the first entry). This avoids panics when destroying cloned interfaces as experienced with net80211 wlan ones. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: jhibbits (earlier version), kp Differential Revision: https://reviews.freebsd.org/D42027 --- sys/netlink/route/iface.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index e1939c7681de..b6e120933f83 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -292,6 +292,7 @@ static bool dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, int if_flags_mask) { + struct epoch_tracker et; struct ifinfomsg *ifinfo; NL_LOG(LOG_DEBUG3, "dumping interface %s data", if_name(ifp)); @@ -321,11 +322,15 @@ dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, nlattr_add_u8(nw, IFLA_PROTO_DOWN, val); nlattr_add_u8(nw, IFLA_LINKMODE, val); */ - if (if_getaddrlen(ifp) != 0) { - struct ifaddr *ifa = if_getifaddr(ifp); + if (if_getaddrlen(ifp) != 0) { + struct ifaddr *ifa; - dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr); - } + NET_EPOCH_ENTER(et); + ifa = CK_STAILQ_FIRST(&ifp->if_addrhead); + if (ifa != NULL) + dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr); + NET_EPOCH_EXIT(et); + } if ((if_getbroadcastaddr(ifp) != NULL)) { nlattr_add(nw, IFLA_BROADCAST, if_getaddrlen(ifp), From nobody Thu Oct 5 14:30:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Yr159xSz4wrMF; Thu, 5 Oct 2023 14:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Yr14hgvz4QB9; Thu, 5 Oct 2023 14:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tWPIbTgs+tCzlMe3zHPqrvYErgHUIy0ULedQUOBuOE=; b=cnbXm2NMn1bhXYe8miVTy/5NyvfR32ChZudRjo1J8zVqURUt5JcDJaq8AZiociiqNk2tAr n9TQpDEBTcpSpE3ubsW1GWC0844MfHW+muXBMYvsgXJvSi96UHn5ThRI1FSbb54gbq/tXS DNWENFVsVsyxAMzdw0FmPZvONKKdx5W+qcLTrlScvF//HBKsJ7z20eCrzvEGl+rX6Pw0XV YlanZL9E/yL/MSC9EakmDcUrXlHGFbD0LFThBnjgjbmbHy0DikvRb3jXL8JSzRefPq1jzI KSDM2a9zsvyRYg7nD8IbJxlqCWLZrqzzx9VKxXgZTbE5qvHgRqYwFNk5PmFQDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696516225; a=rsa-sha256; cv=none; b=Ujjl/yZP6H6B7rlU6qTpslGUtdC9M/jTLHd+zUzeldAfXcFQKbPnHUAulT/kxE0Eohw43i LL/cM2ipRvBTaAaHhATpJxE28+6N9wF9Ls5nTyZ+W9KorWqwt9tqT6b1AyRiI3HsFDbVtc 2dzLKs1fhgaXRv0+Av7l1zbjNMkYGmzFdLAOoa8HE6bnzmociZa9A63E6KsVkxYv5l4jt5 grwOsGcGkSEI0z6Uez0nZQQYBcqfk0YkAl2lVtWpfhHo22/SqNKqN32dZjJgdjvqnRZF5X CMzYgP8AoXDYvTXonKgYEPzSRRRm9o05FqTDAf637jaUlten1yMUtmtQEoEJ+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/tWPIbTgs+tCzlMe3zHPqrvYErgHUIy0ULedQUOBuOE=; b=MrCJsn4rn02MJQrzHdkkX99fjq3gZE2uMU3tHCe8pjUkwmXd2JIrjpKxijNor58zyhVRoY 5wmKUkMJ7Z1Ym5+BjT7Q+LVCA/my/TwiA4bHhilWg6kjYewuJbQiSQaaoRjI8qV2Pdk5f8 ioSgYYjP8pBVlxRiOK89n66aoYZA+d4qq+Hzc2Gq+EzyDGDyvgT7eayENViT2UhGC4q7Z8 Tlyl/s0Boci78djSbbYkckCFZb9YISCpstE8EgyOkS6Qg/66YUlNAwQ1lVgZM+kLuTATGo Rt6l9F4TDv8kapEcIkvCFOXWbaKPcifZWuSkQ+wvHxHPM8X3FW3QhjE2NvhsIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Yr13lFHz1NNf; Thu, 5 Oct 2023 14:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395EUPsO003827; Thu, 5 Oct 2023 14:30:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395EUPxd003824; Thu, 5 Oct 2023 14:30:25 GMT (envelope-from git) Date: Thu, 5 Oct 2023 14:30:25 GMT Message-Id: <202310051430.395EUPxd003824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1137943b1c5b - main - net80211: remove ieee80211_unref_node() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1137943b1c5b225e30b82350ff7fb12c258ea90f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1137943b1c5b225e30b82350ff7fb12c258ea90f commit 1137943b1c5b225e30b82350ff7fb12c258ea90f Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 14:30:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-05 14:28:55 +0000 net80211: remove ieee80211_unref_node() ieee80211_unref_node() was only used in two error cases in ieee80211_send_nulldata(). There we do not need to guard against ni pointer reuse after decrementing the refcount of the ni as we only update the stats and return. Update the man page and remove the link for the now gone function. Sponsored by: The FreeBSD Foundation X-MFC: never Reviewed by: adrian, emaste Differential Revision: https://reviews.freebsd.org/D42035 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 +-- share/man/man9/ieee80211_node.9 | 15 ++++----------- sys/net80211/ieee80211_node.h | 7 ------- sys/net80211/ieee80211_output.c | 4 ++-- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 09e18daa7abf..c3cc72351963 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20231005: Remove man page link for now gone net80211 function. +OLD_FILES+=usr/share/man/man9/ieee80211_unref_node.9.gz + # 20231005: bsdconfig remove support for floppy and ftp OLD_FILES+=usr/share/bsdconfig/media/floppy.subr OLD_FILES+=usr/share/bsdconfig/media/ftp.subr diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 1e38eaf8adae..0b56a47db332 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1212,8 +1212,7 @@ MLINKS+=ieee80211_node.9 ieee80211_dump_node.9 \ ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_ref_node.9 \ - ieee80211_node.9 ieee80211_unref_node.9 + ieee80211_node.9 ieee80211_ref_node.9 MLINKS+=ieee80211_output.9 ieee80211_process_callback.9 \ ieee80211_output.9 M_SEQNO_GET.9 \ ieee80211_output.9 M_WME_GETAC.9 diff --git a/share/man/man9/ieee80211_node.9 b/share/man/man9/ieee80211_node.9 index 8340b4762b67..6dd492e3b33d 100644 --- a/share/man/man9/ieee80211_node.9 +++ b/share/man/man9/ieee80211_node.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2010 +.Dd October 2, 2023 .Dt IEEE80211_NODE 9 .Os .Sh NAME @@ -50,9 +50,6 @@ .Fn ieee80211_ref_node "struct ieee80211_node *" .\" .Ft void -.Fn ieee80211_unref_node "struct ieee80211_node *" -.\" -.Ft void .Fn ieee80211_free_node "struct ieee80211_node *" .\" .Ft void @@ -106,14 +103,10 @@ Routines that lookup a table entry return a (i.e. a pointer to a table entry with the reference count incremented). The .Fn ieee80211_ref_node -and -.Fn ieee80211_unref_node -calls explicitly increment/decrement the reference count of a node, -but are rarely used. -Instead most callers use +call explicitly increments the reference count of a node. .Fn ieee80211_free_node -to release a reference and, if the count goes to zero, reclaim the -table entry. +decrements the reference count of a node and if the count goes to zero +reclaims the table entry. .Pp The station table and its entries are exposed to drivers in several ways. Each frame transmitted to a station includes a reference to the diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 826ecccb1238..685df28ed519 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -326,13 +326,6 @@ ieee80211_ref_node(struct ieee80211_node *ni) return ni; } -static __inline void -ieee80211_unref_node(struct ieee80211_node **ni) -{ - ieee80211_node_decref(*ni); - *ni = NULL; /* guard against use */ -} - void ieee80211_node_attach(struct ieee80211com *); void ieee80211_node_lateattach(struct ieee80211com *); void ieee80211_node_detach(struct ieee80211com *); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 2358ba009e13..a02073ae8d9c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1104,7 +1104,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT | IEEE80211_MSG_DOTH, ni, "block %s frame in CAC state", "null data"); - ieee80211_unref_node(&ni); + ieee80211_node_decref(ni); vap->iv_stats.is_tx_badstate++; return EIO; /* XXX */ } @@ -1122,7 +1122,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) m = ieee80211_getmgtframe(&frm, ic->ic_headroom + hdrlen, 0); if (m == NULL) { /* XXX debug msg */ - ieee80211_unref_node(&ni); + ieee80211_node_decref(ni); vap->iv_stats.is_tx_nobuf++; return ENOMEM; } From nobody Thu Oct 5 14:33:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Yvb2lKWz4wrZY; Thu, 5 Oct 2023 14:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Yvb2HdDz4R03; Thu, 5 Oct 2023 14:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sprP77EsOPni5psai9secDnzb3Yr3sWht0KTuKaHmKY=; b=Imx2/c2Z3xeZqnC92bo9Q7R+X1+xqNb2v6ZZW83DMBdxLYv6QpnABue7W/iSERS5JqK4z+ BFbmpfAjVh/Vz4lAcg/thYA8UQntjLprsuqSCgxQS4BRM3ow+QhYubdU294z1hD8gxE/5Z ZRFQOoLGQWilTbSPU4SXErClPNqMKo04CU3oxpu7cuxduXKZCmIPYZ+IsGvX+I6E4RKmjZ JWfjpKUtAD35d6fXD7S0eXo6PtBdnzlr+cJed6q63njuv0Bu5u3+BU++xXeDHwDgwGcTR6 JQRsk/TxtSCZC51bmmA30IHPpwfhrRH/FBK26qr8Pjl25cEBBlyDJdaglVHHNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696516411; a=rsa-sha256; cv=none; b=cbDEg4CNEFkJjzAyawC9Ejp6x5YsCg6//GsA2QDAV14eJMBW/IFXUzz+EL5mwMJLi6+B+N bEw1EodNa5tnDBXgxJG+qPHXrcJhV3EzBnKZygRaimIPQMDeMlhXnT5IXK8XTWgM2qU+9t 1opVzNSIQ3NDTdQN0fom6Ezu2e/CwRzRS99bBnUkL/9bzOGM/xH70yB7FJSdlcE55Daaa8 4jju6FoahwHW7L1YWBXC5a4wJTtnIadlIA1wWnXbyqt3xdZrnaUXxStd6YFMRBgrh6YHS1 QPVTdoXedQ09cYM2glTE7FAqLkVisryPooV3tro5bUmi4UeoPb58kFGwZORU/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sprP77EsOPni5psai9secDnzb3Yr3sWht0KTuKaHmKY=; b=VcyRV+LCChgMqvNc3nOQLjJ0VvUJQgFQX8PSEYMc9Z8CvvoIj58bDI0MC2MIqiT+T5ux15 3BE7l+8bJJwmA/r1E9WfiXVWeL4t1md9RJig3B1mC0FuqFfv+0EXDRrHkWVzAV3cRrZ0pH ZKhnqk1qNA8qSPKlc5lTpuwGbok6aA6zzZqpGKLD9oYU1ayNrDtgAQthnuIEv8UBXMa+AD j62WcqlDuRRgEogdG68H/46ryho9f44/UCDvtDX6yNVTsppnXE3SKm2JE09cVrqPsa0HU0 yGJcjyG28AozMYX2QSUsAlL7D7KTQtmR0FtFLElW5DpS3PN9n+xOWWKIgtnLtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Yvb1LN0z1NbQ; Thu, 5 Oct 2023 14:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395EXVTW010711; Thu, 5 Oct 2023 14:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395EXV5x010708; Thu, 5 Oct 2023 14:33:31 GMT (envelope-from git) Date: Thu, 5 Oct 2023 14:33:31 GMT Message-Id: <202310051433.395EXV5x010708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4f3b2bba240b - main - rtw88: Use RF_CFGCH instead of hard coded 0x18 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4f3b2bba240b6e0603b5cbb47155fd8215bcbcb3 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4f3b2bba240b6e0603b5cbb47155fd8215bcbcb3 commit 4f3b2bba240b6e0603b5cbb47155fd8215bcbcb3 Author: Bjoern A. Zeeb AuthorDate: 2023-10-05 14:01:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-05 14:30:58 +0000 rtw88: Use RF_CFGCH instead of hard coded 0x18 While debugging some funky register reads of 0xaeaea from RF_CFGCH resulting in "rtw880: [TXGAPK] unknown channel 234!!" more of these reads came to my attention hidden by using the register index rather than the defined value. Make this more grep-able. MFC after: 3 days --- sys/contrib/dev/rtw88/rtw8822c.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/contrib/dev/rtw88/rtw8822c.c b/sys/contrib/dev/rtw88/rtw8822c.c index da58b9ca8e57..a2fda1b36e6c 100644 --- a/sys/contrib/dev/rtw88/rtw8822c.c +++ b/sys/contrib/dev/rtw88/rtw8822c.c @@ -2204,7 +2204,11 @@ static void rtw8822c_set_channel_rf(struct rtw_dev *rtwdev, u8 channel, u8 bw) u32 rf_reg18 = 0; u32 rf_rxbb = 0; +#if defined(__linux__) rf_reg18 = rtw_read_rf(rtwdev, RF_PATH_A, 0x18, RFREG_MASK); +#elif defined(__FreeBSD__) + rf_reg18 = rtw_read_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK); +#endif rf_reg18 &= ~(RF18_BAND_MASK | RF18_CHANNEL_MASK | RF18_RFSI_MASK | RF18_BW_MASK); @@ -3277,7 +3281,11 @@ static void rtw8822c_dpk_information(struct rtw_dev *rtwdev) u32 reg; u8 band_shift; +#if defined(__linux__) reg = rtw_read_rf(rtwdev, RF_PATH_A, 0x18, RFREG_MASK); +#elif defined(__FreeBSD__) + reg = rtw_read_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK); +#endif band_shift = FIELD_GET(BIT(16), reg); dpk_info->dpk_band = 1 << band_shift; @@ -4158,7 +4166,11 @@ static bool rtw8822c_dpk_reload(struct rtw_dev *rtwdev) dpk_info->is_reload = false; +#if defined(__linux__) channel = (u8)(rtw_read_rf(rtwdev, RF_PATH_A, 0x18, RFREG_MASK) & 0xff); +#elif defined(__FreeBSD__) + channel = (u8)(rtw_read_rf(rtwdev, RF_PATH_A, RF_CFGCH, RFREG_MASK) & 0xff); +#endif if (channel == dpk_info->dpk_ch) { rtw_dbg(rtwdev, RTW_DBG_RFK, From nobody Thu Oct 5 14:33:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Yvc3nDRz4ws4w; Thu, 5 Oct 2023 14:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Yvc30qnz4Qtg; Thu, 5 Oct 2023 14:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWHApdaTTBwyFz4C4bbSd23acU79KtDpiYRAJ2JbhXk=; b=G4PZ1Yxhe44Et8jsKjh46nmvQcYyAS3GKpf/8ZGPR9TbHxBz0by9td3iO3pNBMGak8ONVH DjV1XYpdIDn6BLl+/CwIVXkw4pKzfFMhm0DIHFaMCHCR5C6OwTjYxBoFfHZ483vjynmXZG RIA32NuAxuXpAz/Ur0Se2jbrg/pGolwDuXzi/Lag57/ZrdBeybxaVZtovtSfWD1EigCL8D FdirYdKiOQ4kYtqdpb/wtKISZZ2tdcwXR/JGAjCWrtMJIVWJtNTM9zkA6Gf1NyliNuWEpC ns/vQPPSMo8UIvsI8/5Z7p1I3BK7Lke1UL5rA7cSgf+wLWE3xalGgbk63upQRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696516412; a=rsa-sha256; cv=none; b=jrFL3G1yQm6fC0yT7iW6NQzrlBA5aCBcU/xpahQAUCG1KOTNWlZevlmD2aFLkVpRqlL5hz Fc03b4UklbhtGU42c+QKcpwOWarZkOw3bVx/w7ZMXH6P8gg7q6v1GALK4nBbGOHbJWDW55 WOITx9rxladSy0GxcLvwy1wk4exoeZa0NdTnb0rF9e9Ff09ENL6I7NzoaMsaq91qIeUCDB ZJEY5mEsnQD7rIEwu7Zad2JbXFsU0/xBWnyzoaNTsGFx8w0JmQz9vaZAbaQLF9thcgg39p WAxj/g95cQokl/yqiVxZJPuqbPIujgKDQIk9fF5PZn66ILMwlhomKgE64ZcHpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696516412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWHApdaTTBwyFz4C4bbSd23acU79KtDpiYRAJ2JbhXk=; b=oruiFn1cw5aS0Uw+DltO3j4duLEqO6PXq9OxyEOENs1tQXOO+cgw9BtWlxLge1WRr8PiTE VEldfAd/td8R87cmtjBSC43crnBISXEVynDvfekBDvWQ/ywEDV5oPf4BRGRNRoDM4K32zb SSSQhXRcqPva7sJvzvhr9orZ/5C0YHHUeFtHekPjZWa2KBulas4aaujtkmb/ZPqB3jDpQw ZSIC7oi6j/oLhRup1fEiWeRVa+l9pTYqf5K0zrhIw7s87513qvv83L9IefJ2JMOR8ljk+I wuUYF+bxuNgb7QKUC+rTRWIZQheKnT7oGrxSJJPm8poAiLysfWl3Y1yOD+zasA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Yvc25wHz1NVt; Thu, 5 Oct 2023 14:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395EXWkd010765; Thu, 5 Oct 2023 14:33:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395EXWGE010762; Thu, 5 Oct 2023 14:33:32 GMT (envelope-from git) Date: Thu, 5 Oct 2023 14:33:32 GMT Message-Id: <202310051433.395EXWGE010762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0d2cb6a6ecde - main - LinuxKPI: 802.11: hide txq debugging behind checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0d2cb6a6ecde3b271ede59d77801cb43a8804688 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0d2cb6a6ecde3b271ede59d77801cb43a8804688 commit 0d2cb6a6ecde3b271ede59d77801cb43a8804688 Author: Bjoern A. Zeeb AuthorDate: 2023-10-04 20:30:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-05 14:32:41 +0000 LinuxKPI: 802.11: hide txq debugging behind checks Two txq debug messages were left unconditionally. Hide them behind ifdef/if() condition checks for selective debugging only. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9f5f5bef7f27..4a296e2f0fad 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4911,15 +4911,18 @@ linuxkpi_ieee80211_stop_queue(struct ieee80211_hw *hw, int qnum) for (ac = 0; ac < ac_count; ac++) { IMPROVE_TXQ("LOCKING"); if (qnum == vif->hw_queue[ac]) { +#ifdef LINUXKPI_DEBUG_80211 /* * For now log this to better understand * how this is supposed to work. */ - if (lvif->hw_queue_stopped[ac]) + if (lvif->hw_queue_stopped[ac] && + (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) != 0) ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " "lvif %p vif %p ac %d qnum %d already " "stopped\n", __func__, __LINE__, lhw, hw, lvif, vif, ac, qnum); +#endif lvif->hw_queue_stopped[ac] = true; } } @@ -4966,15 +4969,18 @@ lkpi_ieee80211_wake_queues(struct ieee80211_hw *hw, int hwq) /* XXX-BZ what about software scan? */ +#ifdef LINUXKPI_DEBUG_80211 /* * For now log this to better understand * how this is supposed to work. */ - if (!lvif->hw_queue_stopped[ac]) + if (!lvif->hw_queue_stopped[ac] && + (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) != 0) ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " "lvif %p vif %p ac %d hw_q not stopped\n", __func__, __LINE__, lhw, hw, lvif, vif, ac); +#endif lvif->hw_queue_stopped[ac] = false; LKPI_80211_LVIF_LOCK(lvif); From nobody Thu Oct 5 15:03:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1ZZN4G7hz4vj0d; Thu, 5 Oct 2023 15:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1ZZN3m9Rz4Wmt; Thu, 5 Oct 2023 15:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooEQPWLY+lfeZXcGytA8EGLdx/RHCek4EelRvBtGly0=; b=u1vQLjIw5I7ciYkN6aaSWUYx35W/zNXSEAexvXlm/ljOe9L/jUO5CkK+N1hi3EF/25J/S2 Zz9Apq+Bo5CFmZ6Gz3EPhGGW7mb/eDWLC+muOHDiChRP9r5ZEgZvcBoHt75xyiM9B9iX3s ZahOKzB7ePf1ABAT6K6TVm/JmBsd1uPD6/w7+ikDQB+ULQKBNgt5yDTVERWTehCJUTaed5 7SLgmGjddyb4Ug5suR2Nc5t5ybetUcct8OuWLdGccSu7yWnBsHBPG2mWCVfuSKWV2+BL+c 7XZG925wAd2lKM4r4KDf+jbNz+O38NxH5dv++ZBPZn+h465uJDxnnwjY5G6sSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518220; a=rsa-sha256; cv=none; b=M70oqPZO1nokBdBIXEMJYxCgeLq+S6Amk3V6QIbzIKt6EznHshJPP6XyQEIC0EVofSqvzf MAziGZB3zymD0XZgZGUmcxt+5n97557C8fKLOZUPm+LLpOhhySoj+KmrypO1kRo4EJhhAi VTjrh0FwbA+JG91rui6yGlqEhspDOdMtIav3xDrfrVW8YPsngqv3TXv9hVWg/PE2PG0Lwi wox/fsw4gUgiynrzXk8LdhbHcYLMo+uI9q0xXd8YAgI4qMgiNhgVSt9ARZIIdmWwg/RApy APLg9GEchCRr3sWWueXEaTijbcx+DhhkZWCdR5P4/FRp0yluPCiYlatVeD8OXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooEQPWLY+lfeZXcGytA8EGLdx/RHCek4EelRvBtGly0=; b=pV0PIAR6vMAubgE6Jj3MQQ5s7G/Bo3/WeOHQXK2NPeEPjBKii6LPozDv8+Ht1cAiBqO6A+ BkiZAIA24Vlx72xTI46A0yQalfZXZ7dlFs9gd6QrarXy8mygPQ1WvaKIl6kR78sOv/RaFB OFZPZb4bthcqZbBgvgHmoYQ5gHKuzB756vTlQhau7SYv8OdAlv15KENEpAWNfDjtIXHrPY AkDR7Fj4ZSjPHbhtE3UV5/7/pBcLTslMPxAJ3bERt4EX8qnpx2H00T6+/1ZEBQ+c5+e2pT 7dRU1OgiZn+aquoNOjfT41o4f8dQTAJmMuDwM3bDedUXktmU0lAss9JFZ/jdvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1ZZN2q4Sz1PCm; Thu, 5 Oct 2023 15:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395F3e8M061879; Thu, 5 Oct 2023 15:03:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395F3e2D061876; Thu, 5 Oct 2023 15:03:40 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:03:40 GMT Message-Id: <202310051503.395F3e2D061876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 218885219615 - main - net80211: de-inline ieee80211_ref_node() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2188852196151e5f04533eaa928a7ad0896e4bd6 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2188852196151e5f04533eaa928a7ad0896e4bd6 commit 2188852196151e5f04533eaa928a7ad0896e4bd6 Author: Bjoern A. Zeeb AuthorDate: 2023-10-02 20:20:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-05 14:56:02 +0000 net80211: de-inline ieee80211_ref_node() Make ieee80211_ref_node() a macro so we can pass __func__, __LINE__ in for IEEE80211_DEBUG_REFCNT as we do for other refcount related functions. Add the appropriate IEEE80211_DPRINTF() call to the _ieee80211_ref_node() implementation to support wlandebug(8) +node printf style tracing. As a plus we can now also use Dtrace fbt on the _ieee80211_{ref,free}_node() implementations with futher logic, gathering backtraces, etc. more flexibly. Sponsored by: The FreeBSD Foundation X-MFC: never --- sys/net80211/ieee80211_node.c | 14 ++++++++++++++ sys/net80211/ieee80211_node.h | 11 ++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index b7cdc5090c96..88c8ab4eff1c 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -2056,6 +2056,20 @@ _ieee80211_find_txnode(struct ieee80211vap *vap, return ni; } +struct ieee80211_node * +_ieee80211_ref_node(struct ieee80211_node *ni, + const char *func __debrefcnt_used, int line __debrefcnt_used) +{ + +#ifdef IEEE80211_DEBUG_REFCNT + IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_NODE, + "%s (%s:%u) %p<%s> refcnt %d\n", __func__, func, line, ni, + ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)+1); +#endif + ieee80211_node_incref(ni); + return (ni); +} + static void __ieee80211_free_node(struct ieee80211_node *ni) { diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 685df28ed519..954e8e03563f 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -319,13 +319,6 @@ MALLOC_DECLARE(M_80211_NODE_IE); #define IEEE80211_RSSI_GET(x) \ IEEE80211_RSSI_EP_RND(x, IEEE80211_RSSI_EP_MULTIPLIER) -static __inline struct ieee80211_node * -ieee80211_ref_node(struct ieee80211_node *ni) -{ - ieee80211_node_incref(ni); - return ni; -} - void ieee80211_node_attach(struct ieee80211com *); void ieee80211_node_lateattach(struct ieee80211com *); void ieee80211_node_detach(struct ieee80211com *); @@ -397,6 +390,8 @@ struct ieee80211_node *ieee80211_node_create_wds(struct ieee80211vap *, struct ieee80211_channel *); /* These functions are taking __func__, __LINE__ for IEEE80211_DEBUG_REFCNT */ +struct ieee80211_node *_ieee80211_ref_node(struct ieee80211_node *, + const char *func, int line); void _ieee80211_free_node(struct ieee80211_node *, const char *func, int line); struct ieee80211_node *_ieee80211_find_node_locked( @@ -426,6 +421,8 @@ struct ieee80211_node *_ieee80211_find_rxnode_withkey( struct ieee80211_node *_ieee80211_find_txnode(struct ieee80211vap *, const uint8_t macaddr[IEEE80211_ADDR_LEN], const char *func, int line); +#define ieee80211_ref_node(ni) \ + _ieee80211_ref_node(ni, __func__, __LINE__) #define ieee80211_free_node(ni) \ _ieee80211_free_node(ni, __func__, __LINE__) #define ieee80211_find_node_locked(nt, mac) \ From nobody Thu Oct 5 15:10:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Zk11V74z4vjjv; Thu, 5 Oct 2023 15:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Zk1141Zz4XBn; Thu, 5 Oct 2023 15:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7x8som8QDy264UGe78DPPZQPuEh/YWY8q7fyX5Hz8nI=; b=ZZ4bHuACU9dYn2G4wwoduPNGvoXL9+bfV7yQqPKPvLP5DUR480DfGCNkfqA29dWxfAx8ki YapWSHoemDK7Pp0SN54ZTa6JTTrK363NKlQuAvY/1b7zY2JJMZDPG0O0/JAFcb3XlBhWbi 33fm2SHU7FmYkzDg6wwggKxQR5BHQN7pKAg7YR2aMQQ/qH2RqVEvflSOSKYTcsWdMAS+8j KwSdQmljZNgAWIvDlXT1fZ+2CoVMEPHfPK9bYJjEqDfQluGEKdICtigtp4urw0vHQ/A/gB 3HH2hNru/tHQ97niLJAyhZCTyuVN1tsZJ6JIGvZJ5ctZxrfAYFfxOE3EmZ2g7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518617; a=rsa-sha256; cv=none; b=ZQ7ZeY/bC5VU6zdLcPgeIOzf2cJTSNUwq7Wk3KkdCdUGbSPkn2bn2AwKgrbMjU8doU7iRn 5nFAWodXAgJHIJB7KSQmmoKOlq1xAr/QvPuMU3pqq+g3+fbYFBWiIHGIijIsxV7Ty4Kzjt fkX+BJwjwQdn5WYte9pwr1dzE18spWNPrTd4cTbo8r5iWqRZdmHV86QFVos5UpgbsmMOnm lf3J+s5EHfr+hSPTdiXoyCoFjkumLgfk6byw4R7cYA4iE1AsxvWSnP+aFnu/n7pY1vXkBO PJzvRsE1yBOtjVSPEfD+GHpBe7PSqUVAqi22jCCQAPSnL55oCPPNaLlCo8Dy3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7x8som8QDy264UGe78DPPZQPuEh/YWY8q7fyX5Hz8nI=; b=c94AyCipsOegrU4NZ55StJE3POfkIEcHVkSRpDeOKekeLMAT1+hXkRT4Mn5RHgkxcZmy2o SA1NSfrsZYI/lMJs2W5bnvK184PU+fgoZSxcv94r+5n7m/VtAk9lsy4tTr72JBL2hr0Y1K dlpXfaT8Q1mthF+1tw/o98GwHw74Dy9SdoxGorSRkuXVVshj0rbJ5zfHgv2Oi4hvak2bFH 5nMeadodFWRX2b/muTYjVPmiXUrGwC9hDDiE41peQH6MHTp3uZe7NhrC1T3bn735oh+mbh bgxvdZum+TzMsYbgvBVg1tiqJiGLDfuMFWciSSwYPrNmCGAGDVSWC2qNI7yuVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Zk106dDz1PWx; Thu, 5 Oct 2023 15:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FAGWL070775; Thu, 5 Oct 2023 15:10:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FAGg9070770; Thu, 5 Oct 2023 15:10:16 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:10:16 GMT Message-Id: <202310051510.395FAGg9070770@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: e1105ded372d - releng/14.0 - unix: Fix a lock order reveral List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e1105ded372d6993cd8c14721a33c01fbe355111 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1105ded372d6993cd8c14721a33c01fbe355111 commit e1105ded372d6993cd8c14721a33c01fbe355111 Author: Mark Johnston AuthorDate: 2023-09-27 12:24:11 +0000 Commit: Mark Johnston CommitDate: 2023-10-05 14:01:14 +0000 unix: Fix a lock order reveral Running the test suite yields: lock order reversal: 1st 0xfffff80004bc6700 unp (unp, sleep mutex) @ sys/kern/uipc_usrreq.c:390 2nd 0xffffffff81a94b30 unp_link_rwlock (unp_link_rwlock, rw) @ sys/kern/uipc_usrreq.c:2934 lock order unp -> unp_link_rwlock attempted at: 0xffffffff80bc216e at witness_checkorder+0xbbe 0xffffffff80b493a5 at _rw_wlock_cookie+0x65 0xffffffff80c0a8e2 at unp_discard+0x22 0xffffffff80c0a888 at unp_freerights+0x38 0xffffffff80c09fdd at unp_scan+0x9d 0xffffffff80c0f9a7 at uipc_sosend_dgram+0x727 0xffffffff80c00a79 at sousrsend+0x79 0xffffffff80c072d0 at kern_sendit+0x1c0 0xffffffff80c074d7 at sendit+0xb7 0xffffffff80c076f3 at sys_sendmsg+0x63 0xffffffff8104d957 at amd64_syscall+0x6b7 0xffffffff8101f9eb at fast_syscall_common+0xf8 This happens when uipc_sosend_dgram() discards a control message because the receive socket buffer is full. The overflow handling frees internalized file references in the socket buffer before freeing mbufs. It does this with socket PCBs locked, leading to the LOR. Defer handling of file references until the PCBs are unlocked. Approved by: re (gjb) Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41884 (cherry picked from commit 61a14ddfe012ca7b57a101725e5c654269f200ca) (cherry picked from commit 20c494a9d3f20e2942c99ca517d0e983a0ac73e8) --- sys/kern/uipc_usrreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 291ff7cf8cae..f12693f3982a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1332,8 +1332,10 @@ uipc_sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, } else { soroverflow_locked(so2); error = ENOBUFS; - if (f->m_next->m_type == MT_CONTROL) - unp_scan(f->m_next, unp_freerights); + if (f->m_next->m_type == MT_CONTROL) { + c = f->m_next; + f->m_next = NULL; + } } if (addr != NULL) From nobody Thu Oct 5 15:10:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Zk22Zwrz4vjdr; Thu, 5 Oct 2023 15:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Zk21rzkz4XQG; Thu, 5 Oct 2023 15:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aeuFRYsHaV/oLsA7bbrBQS0+gIsRYWOgL+P2vvkCrFU=; b=kY1XecLFDzVtb3xp8Bzj63qBPCV1Q2KcKkWLwvkZoNUkV398xhg/CzROWAHmQ+RsBv+Qb5 kGQhVSkEzMJfpYzJzX9gn5yErqAa8KZb2fgSz0gWeHP8btBMIBhNAvFQ6Uq96q3030sW0f mn6I9hxYgcQPkXuY7tZDh8YNvEVuNhdAElM+lkYr6vlYxc1n32rHb8ruvlAgHtKRTJNQNq locYUZfVcKbETMuysIror/lztfNNxQyw0MWp7xVflBsPlL+gRSR12taioc51QMbwTBbVlv XjkF40iThQAF2/TMMJUAAiwgS936YkLcDUj6IDZTIti+8viAEpYUJpmk17cXcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518618; a=rsa-sha256; cv=none; b=eGIh2luzwqOj1JbBzqdfLooFXPg4pdVcaQuQCPD30XGjKod1sYY6Oy7PD3KXC6r7epRqqQ AgiHVFpddYoMVd27fRPX7sXkiiLCuCE6Yr/ZtY4iaTugJmrt4T2rouCBK9wJf983bsOevG 3VazR3kw67XuAto+zZ0F9qW7BEXeDXW/r3mzp/UKN0o/Ko0LBw5ZFzGqV5TPVRXpJPEKjl NOO4X1ODHU566XK6/DGceokCCX0OZuXGk0/KHuZvWHyp9hdtG2TJK4SYcjBWmlZ54ucoKZ WzfosnTwOkqnI/zYer9gIGdEmjjNF3mmvWgzYSWlwzTkcQcg9Wgp+4Qoz2CwHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aeuFRYsHaV/oLsA7bbrBQS0+gIsRYWOgL+P2vvkCrFU=; b=Zsd40zD7maDSIEH7wY8R7mY5EO45GHi6ECcogS3g1kkhZVEA+dIL/7DKzjMNoD9UhbkEN5 18Uq0E26nk4ZqOaXHn09AWmzN1AdL+3EeysZgVvA8C3Usdy2EV2s30pkCKi6yXPvNJhW9P l0j0U6BKytqOSOGqBLvciqoUQNFg/CpEXgKp6HQtsrsYNxKQ7nEAJ/2KE08IjSsF8JRLv0 Cqyg0Ug9LinjOb9S/22DOSO2zPASKXF195l7u76/laH99r76fQ6GDRIQRJwtdRC4Dv/yBg f5OgPh0rdkex51q4ehuNPRTw4tejJQPAscjWd9AGMiJySGadx3BduQFMzVyY5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Zk20y19z1PZ6; Thu, 5 Oct 2023 15:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FAIoF071380; Thu, 5 Oct 2023 15:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FAIM2071377; Thu, 5 Oct 2023 15:10:18 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:10:18 GMT Message-Id: <202310051510.395FAIM2071377@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: 901d81c3e0f4 - releng/14.0 - hdac: Defer interrupt allocation in hdac_attach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 901d81c3e0f43cb0e4e10bb42ab9f0a71cfcda0a Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=901d81c3e0f43cb0e4e10bb42ab9f0a71cfcda0a commit 901d81c3e0f43cb0e4e10bb42ab9f0a71cfcda0a Author: Mark Johnston AuthorDate: 2023-09-27 12:23:58 +0000 Commit: Mark Johnston CommitDate: 2023-10-05 14:01:19 +0000 hdac: Defer interrupt allocation in hdac_attach() hdac_attach() registers an interrupt handler before allocating various driver resources which are accessed by the interrupt handler. On some platforms we observe what appear to be spurious interrupts upon a cold boot, resulting in panics. Partially work around the problem by deferring irq allocation until after other resources are allocated. I think this is not a complete solution, but is correct and sufficient to work around the problems reported in the PR. Approved by: re (gjb) PR: 268393 Tested by: Alexander Sherikov Tested by: Oleh Hushchenkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41883 (cherry picked from commit 015daf5221f7588b9258fe0242cee09bde39fe21) (cherry picked from commit 1e8737f4e884fdf4b966056662e4e6003d3379d9) --- sys/dev/sound/pci/hda/hdac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 422f7f930ea5..2cf9239499af 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1270,9 +1270,6 @@ hdac_attach(device_t dev) /* Allocate resources */ result = hdac_mem_alloc(sc); - if (result != 0) - goto hdac_attach_fail; - result = hdac_irq_alloc(sc); if (result != 0) goto hdac_attach_fail; @@ -1347,6 +1344,10 @@ hdac_attach(device_t dev) hdac_corb_init(sc); hdac_rirb_init(sc); + result = hdac_irq_alloc(sc); + if (result != 0) + goto hdac_attach_fail; + /* Defer remaining of initialization until interrupts are enabled */ sc->intrhook.ich_func = hdac_attach2; sc->intrhook.ich_arg = (void *)sc; From nobody Thu Oct 5 15:10:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Zk33TJgz4vjk4; Thu, 5 Oct 2023 15:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Zk32ygzz4XT1; Thu, 5 Oct 2023 15:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGuNG5EHDloGYOLzn0nvxRiboyjUakAbDelPw7Y++OI=; b=MntTJzv/jJ5s9JQsgwp94JA7qd74tfYhcGaE6i3j9B4XBwIAlq/sVoRv0XpL2adGV0pVOb m8qR+udNswkVVLcWU9VVEOWGmZ4RRk6qelfsw49dUN+kSFVRqhSuv5/owQLpTS8k51stEa T6lFRxuiPP9RnbieK4EoiafH+Yq3fYrGJ0VqVvihcZX8QesCZaSwgzOp/aDojIrE20MyMz Yu5SiHJz0S6tGzpxC33MA1imuDHKbG6stS/fVq1NSE2nH6rUbF145XXk5rhQEHnUYqTCeO 0ejqBUKSWbjMwGlUZ/yGbFUPX39YiFee5PETHwXPJwoLes2njKK4r4x3sb4hog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518619; a=rsa-sha256; cv=none; b=ApjXSWFWWcq/bO4Oa2tQcWeWMfsB63Pt8vBS6907WFhpfEKWLxk8qjPk7m0X6sKs1XD/fq gPiRRn5jUM0yfOvctWIOLzo+MQz2RxMKUTikePEjZkT+YWC8Tav+YoGGX0BxP/jJj9B1KQ q7H7R/E+xiodFVV/lX/yY3GXdDrvavEdxpYu3JwSANpfZmTXbaOy/r23F1ickMEE/rEN4D ZCEKij4cXG+q3RIGzradBvaojEplVs0rf7y/Eu/mD9phRJITAcRLkSaM4PSVMZmfEVJWVp bWUvvLsXW9/LSLc9hl9m3+q7PLeAR4O+zudGxAcZLwKoTCAgG/YQiIw1p9vq4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGuNG5EHDloGYOLzn0nvxRiboyjUakAbDelPw7Y++OI=; b=qVi9+/pnvqqOtH2xmhq0UMmmdn0kfAcqQZBpcRblmjqdS+B/g0lN8wi2LkDVTWtFy+8sAq 5tAspXto1eA8+z6e2qU7RR6nZBfIqDf20efGBKFhZWnoK5+ziGPvmjziwpk567MWpJz1PW /bU+vWpsr4iji3UAx5E3g1OgS+4UFmwJe7Lr15dC5WbWsP2XaObCfazCcl4D0teTC03nc6 /9wKQaeRekDr2xU7e+/hqA0C9LBddnUs02v9kQjnoyddJk14t9sfSLI7+yc/Hl+8lhl+uG +oVBzZW0ugVRdIdIRCtDZaIVKQwULUGUl3VKmWUerk4ZBkHqgsMROfYnirDVmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Zk322Dpz1PNR; Thu, 5 Oct 2023 15:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FAJPe071434; Thu, 5 Oct 2023 15:10:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FAJ7b071431; Thu, 5 Oct 2023 15:10:19 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:10:19 GMT Message-Id: <202310051510.395FAJ7b071431@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: 7377d7440fcd - releng/14.0 - makefs/zfs: Set the objset block pointer fill field correctly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7377d7440fcd60fd58d6a4b51a61f1a7b921eae1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7377d7440fcd60fd58d6a4b51a61f1a7b921eae1 commit 7377d7440fcd60fd58d6a4b51a61f1a7b921eae1 Author: Mark Johnston AuthorDate: 2023-09-27 15:56:33 +0000 Commit: Mark Johnston CommitDate: 2023-10-05 14:01:23 +0000 makefs/zfs: Set the objset block pointer fill field correctly It is supposed to contain the number of objects allocated from the set, excluding the meta dnode. Approved by: re (gjb) Reported by: mav MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 46402fd21631b7d4686f8c341d92db6bcb190e5d) (cherry picked from commit ea5173e5725564da4b95a5b98410b8cd43520dab) --- usr.sbin/makefs/zfs/objset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/objset.c b/usr.sbin/makefs/zfs/objset.c index 22277c150712..3e3dcdeced4b 100644 --- a/usr.sbin/makefs/zfs/objset.c +++ b/usr.sbin/makefs/zfs/objset.c @@ -121,6 +121,7 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, STAILQ_FOREACH_SAFE(chunk, &os->dnodechunks, next, tmp) { unsigned int i; + assert(chunk->nextfree > 0); assert(chunk->nextfree <= os->dnodecount); assert(chunk->nextfree <= DNODES_PER_CHUNK); @@ -149,8 +150,8 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, * Write the object set itself. The saved block pointer will be copied * into the referencing DSL dataset or the uberblocks. */ - vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, 1, - os->phys, os->osblksz, os->osloc, &os->osbp); + vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, + os->dnodecount - 1, os->phys, os->osblksz, os->osloc, &os->osbp); } void From nobody Thu Oct 5 15:10:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Zk44VRhz4vjlw; Thu, 5 Oct 2023 15:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Zk43wvgz4XPB; Thu, 5 Oct 2023 15:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pEy6vfrWOp85dRTWmHyMdDPEOkl4RIGZfgu80GlUlU=; b=LwfeFjxcdOkvyIP0El6NTuHogGPyN8so8+mvFCvyA/Oh0gOVbTiUpEL96aNaevIooY3PXs aTkc220yzMXyasXvqveZipK3KZnT9XyXDpttqgQuZuMHe1wVAkGhipZ21geixTh9ot5pWq HvZKOovzksUft24PuB+w+Lpwm6fWu102OpKL0+/0S3W7xJTGCpW+JQN5WGHJV8CklWeQBF Pd9kgrA/EVCJE1IMuX4P8a47DnD7YHv15yfVHQzlWUXwAFH+kEdKdF6ome4urR/8I8RwSI 30gDQSIKJ7IlfLzjDEbg2IH51Upc9wxtwom2eilMbMArx09j9fOrBin89UXg5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518620; a=rsa-sha256; cv=none; b=fnCDXEeJg9zWgaH8s/pQRmRz8HS+wmzDp9fGhzpvPUdk14E8xbR4SBfBMcYiV45AIpUsTw /j0Te5UfE4t3snzNbv05RGowoDrGOihK5LKnnFh3l8trQD9PYqALCgM2+etnFpmWfpvtUX XAvqAImfy8Xex5ew7bH6AMMhqKEVpUSQzDJk+7X03ltbl1NTXnBLl/h1BZo/PSH8GPRGIo M1JEHb2XYh9a+6nzra/zHG925o6MWrD7G1ZLLzOj80SLl/MwHw6EH+xc442S1XSDQoULGj KvoeRvEzrAWlTmujtEYn9nv5wvEd6GqeKxS03Pzmq05sGwpfeSqJQzvSdQra5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pEy6vfrWOp85dRTWmHyMdDPEOkl4RIGZfgu80GlUlU=; b=JAN4jZ5bDgjnNFGamvrCUwIvhD2WUiKe/QBxmpr5YQlh/PV9v40s1yIXgfDC37BIWaKi1w gjoEO0eH6nZCcTNteaWd4Yj+Uv8ufmxRWdz9PFfIKjEY+SWqOuPgrmvpr+ihJP2qyc7VO8 /lxhrIWsFwgvT1sYU+UvqnNYa+j2WsKcaQTs0qiCABnAQMy1FblW6QVkabl8i2nBoCrN0p sI0N1DnARB54hmzZDjBo3HrN/ZztiJH/Oe+bxhEOR9amtpI1PFR98A2MmVcZGzKtvwfOKs BO4vIYIR5NmhAibnT6vSIzzNDC18p2hZcqGleJ3OGSbRy3XkIeBEo7+x98nb6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Zk43277z1PcX; Thu, 5 Oct 2023 15:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FAKWr071476; Thu, 5 Oct 2023 15:10:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FAKiJ071473; Thu, 5 Oct 2023 15:10:20 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:10:20 GMT Message-Id: <202310051510.395FAKiJ071473@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: 5e78399dda05 - releng/14.0 - makefs/zfs: Remove a nonsensical comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5e78399dda052dfa8c62b3e8b678d29196ca7a0c Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5e78399dda052dfa8c62b3e8b678d29196ca7a0c commit 5e78399dda052dfa8c62b3e8b678d29196ca7a0c Author: Mark Johnston AuthorDate: 2023-09-27 22:21:37 +0000 Commit: Mark Johnston CommitDate: 2023-10-05 14:01:26 +0000 makefs/zfs: Remove a nonsensical comment When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Though, it could possibly be used when building other types of filesystems. Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d) (cherry picked from commit 0074d0551ded1652155a23c6a8d04043c8ede1fd) --- usr.sbin/makefs/zfs/fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index a4968d5f91e8..0d85ea8eb9d8 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -551,8 +551,6 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) /* * Fill up our buffer, handling partial reads. - * - * It might be profitable to use copy_file_range(2) here. */ sofar = 0; target = MIN(size - foff, (off_t)bufsz); From nobody Thu Oct 5 15:10:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1Zk55TTyz4vjs5; Thu, 5 Oct 2023 15:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1Zk54f7Vz4XlW; Thu, 5 Oct 2023 15:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BtbmO8tdhK1XfnivjCef804L9XtBogN+uJlYmlQY3Ds=; b=KPmHF0yz2lsyqazQCxwjGd3cWTrrwn8nqK3TtURJzEW3WrOEFpQGPUECUAzu8dAzozcrCs EgvhHWA5Iz35tMrSyi7MiA+BezXdbFVCoBX2AncWOvPq/h3p3EKazPfhx2i3xqcr0UG4pr 2hHUI4LGfhnJf64ulC4F90ijYQRIBTBdShumkCXh316DkbzpdeFyErC8FoAIPjFpCR/HNX j2bfrG3WWqz2B16Ne7UgwZaCmsTFpt35QQoqnun7XXzKF8/StLwQdPy+rlZ1U3QOj35/vT ie8R3BGorTJaLEpId+FnERSbev7i/zEsiZ9FD4QaI/OhRIj/IWiVQUY4hIAq6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518621; a=rsa-sha256; cv=none; b=mFO+08C4lkeRREdIgmH21oebY6Wy9igdbNZWVRVIowp2xPIXoyYpxkFefzDAcmY85TwMy3 hxttyDXSUVezsmux4fdNaS03UMN/g4eSDfBzEV2vxWKnKtIJRPtmubxmPz+FYgvATAlpnq Gx7man44tuMzJO6rWB1Golc1tZ2KtDDi4M3w0ViabrzfQA3i3fFl1orxK+2EQFHLA0IbqK UQr+l5cm5KB2MzOFasZDmT3zT6javnS/i4trMdLr3G62KlszjOa4NJmOYj/lCi7iwq/iVq YAVCvWJ4g3RL/jOUIAC+Vo8qbCiymSCENM3SLOWsTDM3h+BeRBv9v32hdRhl+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BtbmO8tdhK1XfnivjCef804L9XtBogN+uJlYmlQY3Ds=; b=dVKHFbiFlwJgZmUo39riLKj3W6wk5qz5sDA2vCcHlvxR/jpZHPDnqPFQib+25+OOTsrcEz kst4/bOEm0U6qzntMZawycfcro5hsITdVrHS/000TSP4zFBoOqXriwgjXhwmw9Z8cAvEwi k21Ab+LcSDH8dRpZYsvAyWvFJzdH7i9khhSfNzorYEsMNwNooEWiRWZAa7l1JPHrEb1GyQ zENjvLof+veG0aNYMEGgjIjxr+AHtyiuVS2sEbqsPzazW5sj3ZQ075kVB9YU3cDi/ohTfi dtot/BlmH1+kIwz9b9tGAn/GYG9HF6ajs9vdLCcnpB5I4kkr9XsY5eUjyqWjAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1Zk53YMyz1PcY; Thu, 5 Oct 2023 15:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FALRe071545; Thu, 5 Oct 2023 15:10:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FALsq071541; Thu, 5 Oct 2023 15:10:21 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:10:21 GMT Message-Id: <202310051510.395FALsq071541@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: 3042b1d8159a - releng/14.0 - makefs/zfs: Ensure that the last block of a file has the right size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 3042b1d8159a44faa2bac8c28810ec05025ebfbb Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3042b1d8159a44faa2bac8c28810ec05025ebfbb commit 3042b1d8159a44faa2bac8c28810ec05025ebfbb Author: Mark Johnston AuthorDate: 2023-09-28 20:16:17 +0000 Commit: Mark Johnston CommitDate: 2023-10-05 14:01:29 +0000 makefs/zfs: Ensure that the last block of a file has the right size When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for each block. The space allocator rounds up to the nearest block size, but for files larger than the maximum size, this can result in the last block having a smaller logical size than the rest of the blocks belonging to that dnode. This violates some ZFS invariants when appending to that file. Modify fs_populate_file() to use the same block size for the final block. Approved by: re (gjb) Reported by: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit ef20cd33d3287ebead0d30f2e177fc57a97dc2d5) (cherry picked from commit 5175923ef4acb6faff370177fb60700721f13f92) --- usr.sbin/makefs/zfs/fs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index 0d85ea8eb9d8..b0a4c639f256 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -515,7 +515,7 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) uint64_t dnid; ssize_t n; size_t bufsz; - off_t size, target; + off_t nbytes, reqbytes, size; int fd; assert(cur->type == S_IFREG); @@ -546,29 +546,30 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) bufsz = sizeof(zfs->filebuf); size = cur->inode->st.st_size; c = dnode_cursor_init(zfs, arg->fs->os, dnode, size, 0); - for (off_t foff = 0; foff < size; foff += target) { + for (off_t foff = 0; foff < size; foff += nbytes) { off_t loc, sofar; /* * Fill up our buffer, handling partial reads. */ sofar = 0; - target = MIN(size - foff, (off_t)bufsz); + nbytes = MIN(size - foff, (off_t)bufsz); do { - n = read(fd, buf + sofar, target); + n = read(fd, buf + sofar, nbytes); if (n < 0) err(1, "reading from '%s'", cur->name); if (n == 0) errx(1, "unexpected EOF reading '%s'", cur->name); sofar += n; - } while (sofar < target); + } while (sofar < nbytes); - if (target < (off_t)bufsz) - memset(buf + target, 0, bufsz - target); + if (nbytes < (off_t)bufsz) + memset(buf + nbytes, 0, bufsz - nbytes); - loc = objset_space_alloc(zfs, arg->fs->os, &target); - vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, target, loc, + reqbytes = foff == 0 ? nbytes : MAXBLOCKSIZE; + loc = objset_space_alloc(zfs, arg->fs->os, &reqbytes); + vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, reqbytes, loc, dnode_cursor_next(zfs, c, foff)); } eclose(fd); From nobody Thu Oct 5 15:11:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1ZlR1H1tz4vjl0; Thu, 5 Oct 2023 15:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1ZlR0p0qz4YnD; Thu, 5 Oct 2023 15: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=1696518691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zREOov4CzYLhADlObb84aoLq76IiOOCoGfP9YpZDJ2A=; b=tPknnupsp0QlJt4poxMS9LDabPvFBheJljnXBOsHzDeyf7MUR4NfEinJvwh5GueFEn6tY9 WbS3pbXyb/oQtTvQLjasq4o9LU3UzakDN9NeXmn6QKoFSGAdw+ux8qg9xmAsXyRgLTQLU8 iGyraxfulkd0d8+vFUdHk3SCIO0bPdG630JIhJ57czhRT3PE67fBCsuPSUsz7gaIQ6Mtqg E9b9RukUDSnavHXrVloBvI2TvadNxqZtkeJDV/GPMpysAqpIjefNC8VYz/Uj6UEW6aJcIj GaqPOTqjnCGc73am+t6CB1w0BWaiprZ3RmqpTd90J/w1nKbHsjm+K/y7PhqeHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518691; a=rsa-sha256; cv=none; b=SDUjPous+mNa3iwi9S0WrNqrY0iL4qbAGfRlOu6Gc16//cTLNyBtX0y5HaThvm+lcnCu4m BQXxUnnNTSjA/y9A0ag7/qqtiedG5MtGV91XJPWHtLsCN41T98DRM0Z/CnTSRVdjeRS+ZC Vkx7X5DA/2vADsD0iKSBO9871fGKriJidhHBVG8dJByOZyDnNUbk66cxs3I/odkYYP0EFI VQRkAiXv2BqrX+qohvG8Tq0NF7Jq+bDZQxfBzQoxzj2PXNC4fS2F8/RemlKm7XfiGf2hPp SHe1hIRoitsL3GyTHEHOBHA2LtJJE4RjHZWSHyRBrLsVTOUGp2fIMCiBUwrxsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zREOov4CzYLhADlObb84aoLq76IiOOCoGfP9YpZDJ2A=; b=qHzaWyJxDRsvrrUrD18OAZibAfENfWcf2F//dfcr16oafuUkq9DCjxxm5JNceGPOm55yJJ 8os11w9aIzCgVNROT0c8eaAEysuZS3blmwa3d6KJgt6wfLvHpAlBhNZtAAShoLA0iAOHQv SuaZ14QSPzaKTtN8X6Il7jSwdq6XJJsniRtvuVSa5OXFF8HoHBX24cSCbxWxBM8e5E0ssk T5n8gl4plA0YsZoLF7icj9IL+Tei87dus3hGr6oIM8VITzsTNlRFAIziSTExZYUN/0UJVD 5yYZbqYGm/FGcAnhiTtuzJrRSLHW7LtcVniImVrO4mgDcP2w4sjBgR+eYGVmGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1ZlQ6gfpz1PZH; Thu, 5 Oct 2023 15:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FBUu3072794; Thu, 5 Oct 2023 15:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FBUK8072791; Thu, 5 Oct 2023 15:11:30 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:11:30 GMT Message-Id: <202310051511.395FBUK8072791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1525625c7c94 - main - certctl: Clean up. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1525625c7c945856d4814987fd65784fd62cba74 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1525625c7c945856d4814987fd65784fd62cba74 commit 1525625c7c945856d4814987fd65784fd62cba74 Author: Dag-Erling Smørgrav AuthorDate: 2023-10-05 14:49:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:11:22 +0000 certctl: Clean up. MFC after: 3 days Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42086 --- usr.sbin/certctl/certctl.sh | 173 +++++++++++++++++++++++++------------------- 1 file changed, 99 insertions(+), 74 deletions(-) diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh index c216734a6e9a..02d055102c33 100755 --- a/usr.sbin/certctl/certctl.sh +++ b/usr.sbin/certctl/certctl.sh @@ -26,32 +26,53 @@ # POSSIBILITY OF SUCH DAMAGE. # +set -u + ############################################################ CONFIGURATION : ${DESTDIR:=} : ${DISTBASE:=} : ${FILEPAT:="\.pem$|\.crt$|\.cer$|\.crl$"} -: ${VERBOSE:=0} ############################################################ GLOBALS SCRIPTNAME="${0##*/}" ERRORS=0 -NOOP=0 -UNPRIV=0 +NOOP=false +UNPRIV=false +VERBOSE=false ############################################################ FUNCTIONS +info() +{ + echo "${0##*/}: $@" >&2 +} + +verbose() +{ + if "${VERBOSE}" ; then + info "$@" + fi +} + +perform() +{ + if ! "${NOOP}" ; then + "$@" + fi +} + do_hash() { local hash - if hash=$( openssl x509 -noout -subject_hash -in "$1" ); then + if hash=$(openssl x509 -noout -subject_hash -in "$1") ; then echo "$hash" return 0 else - echo "Error: $1" >&2 - ERRORS=$(( $ERRORS + 1 )) + info "Error: $1" + ERRORS=$((ERRORS + 1)) return 1 fi } @@ -64,7 +85,7 @@ get_decimal() hash=$2 decimal=0 - while [ -e "$checkdir/$hash.$decimal" ]; do + while [ -e "$checkdir/$hash.$decimal" ] ; do decimal=$((decimal + 1)) done @@ -74,22 +95,21 @@ get_decimal() create_trusted_link() { - local blisthash certhash hash + local hash certhash otherfile otherhash local suffix - hash=$( do_hash "$1" ) || return - certhash=$( openssl x509 -sha1 -in "$1" -noout -fingerprint ) - for blistfile in $(find $UNTRUSTDESTDIR -name "$hash.*"); do - blisthash=$( openssl x509 -sha1 -in "$blistfile" -noout -fingerprint ) - if [ "$certhash" = "$blisthash" ]; then - echo "Skipping untrusted certificate $1 ($blistfile)" + hash=$(do_hash "$1") || return + certhash=$(openssl x509 -sha1 -in "$1" -noout -fingerprint) + for otherfile in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do + otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint) + if [ "$certhash" = "$otherhash" ] ; then + info "Skipping untrusted certificate $1 ($otherfile)" return 1 fi done suffix=$(get_decimal "$CERTDESTDIR" "$hash") - [ $VERBOSE -gt 0 ] && echo "Adding $hash.$suffix to trust store" - [ $NOOP -eq 0 ] && \ - install ${INSTALLFLAGS} -lrs $(realpath "$1") "$CERTDESTDIR/$hash.$suffix" + verbose "Adding $hash.$suffix to trust store" + perform install ${INSTALLFLAGS} -lrs "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix" } # Accepts either dot-hash form from `certctl list` or a path to a valid cert. @@ -99,13 +119,13 @@ resolve_certname() local suffix # If it exists as a file, we'll try that; otherwise, we'll scan - if [ -e "$1" ]; then - hash=$( do_hash "$1" ) || return + if [ -e "$1" ] ; then + hash=$(do_hash "$1") || return srcfile=$(realpath "$1") suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash") filename="$hash.$suffix" echo "$srcfile" "$hash.$suffix" - elif [ -e "${CERTDESTDIR}/$1" ]; then + elif [ -e "${CERTDESTDIR}/$1" ] ; then srcfile=$(realpath "${CERTDESTDIR}/$1") hash=$(echo "$1" | sed -Ee 's/\.([0-9])+$//') suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash") @@ -122,12 +142,12 @@ create_untrusted() srcfile=$1 filename=$2 - if [ -z "$srcfile" -o -z "$filename" ]; then + if [ -z "$srcfile" -o -z "$filename" ] ; then return fi - [ $VERBOSE -gt 0 ] && echo "Adding $filename to untrusted list" - [ $NOOP -eq 0 ] && install ${INSTALLFLAGS} -lrs "$srcfile" "$UNTRUSTDESTDIR/$filename" + verbose "Adding $filename to untrusted list" + perform install ${INSTALLFLAGS} -lrs "$srcfile" "$UNTRUSTDESTDIR/$filename" } do_scan() @@ -142,10 +162,10 @@ do_scan() IFS="$oldIFS" for CPATH in "$@"; do [ -d "$CPATH" ] || continue - echo "Scanning $CPATH for certificates..." - for CFILE in $(ls -1 "${CPATH}" | grep -Ee "${FILEPAT}"); do + info "Scanning $CPATH for certificates..." + for CFILE in $(ls -1 "${CPATH}" | grep -Ee "${FILEPAT}") ; do [ -e "$CPATH/$CFILE" ] || continue - [ $VERBOSE -gt 0 ] && echo "Reading $CFILE" + verbose "Reading $CFILE" "$CFUNC" "$CPATH/$CFILE" done done @@ -155,21 +175,21 @@ do_list() { local CFILE subject - if [ -e "$1" ]; then + if [ -e "$1" ] ; then cd "$1" - for CFILE in *.[0-9]; do - if [ ! -s "$CFILE" ]; then - echo "Unable to read $CFILE" >&2 - ERRORS=$(( $ERRORS + 1 )) + for CFILE in *.[0-9] ; do + if [ ! -s "$CFILE" ] ; then + info "Unable to read $CFILE" + ERRORS=$((ERRORS + 1)) continue fi subject= - if [ $VERBOSE -eq 0 ]; then - subject=$( openssl x509 -noout -subject -nameopt multiline -in "$CFILE" | - sed -n '/commonName/s/.*= //p' ) + if [ $VERBOSE -eq 0 ] ; then + subject=$(openssl x509 -noout -subject -nameopt multiline -in "$CFILE" | + sed -n '/commonName/s/.*= //p') fi [ "$subject" ] || - subject=$( openssl x509 -noout -subject -in "$CFILE" ) + subject=$(openssl x509 -noout -subject -in "$CFILE") printf "%s\t%s\n" "$CFILE" "$subject" done cd - @@ -179,17 +199,15 @@ do_list() cmd_rehash() { - if [ $NOOP -eq 0 ]; then - if [ -e "$CERTDESTDIR" ]; then - find "$CERTDESTDIR" -type link -delete - else - mkdir -p "$CERTDESTDIR" - fi - if [ -e "$UNTRUSTDESTDIR" ]; then - find "$UNTRUSTDESTDIR" -type link -delete - else - mkdir -p "$UNTRUSTDESTDIR" - fi + if [ -e "$CERTDESTDIR" ] ; then + perform find "$CERTDESTDIR" -type link -delete + else + perform install -d -m 0755 "$CERTDESTDIR" + fi + if [ -e "$UNTRUSTDESTDIR" ] ; then + perform find "$UNTRUSTDESTDIR" -type link -delete + else + perform install -d -m 0755 "$UNTRUSTDESTDIR" fi do_scan create_untrusted "$UNTRUSTPATH" @@ -198,51 +216,51 @@ cmd_rehash() cmd_list() { - echo "Listing Trusted Certificates:" + info "Listing Trusted Certificates:" do_list "$CERTDESTDIR" } cmd_untrust() { - local BPATH + local UTFILE shift # verb - [ $NOOP -eq 0 ] && mkdir -p "$UNTRUSTDESTDIR" - for BFILE in "$@"; do - echo "Adding $BFILE to untrusted list" - create_untrusted "$BFILE" + perform install -d -m 0755 "$UNTRUSTDESTDIR" + for UTFILE in "$@"; do + info "Adding $UTFILE to untrusted list" + create_untrusted "$UTFILE" done } cmd_trust() { - local BFILE blisthash certhash hash + local UTFILE untrustedhash certhash hash shift # verb - for BFILE in "$@"; do - if [ -s "$BFILE" ]; then - hash=$( do_hash "$BFILE" ) - certhash=$( openssl x509 -sha1 -in "$BFILE" -noout -fingerprint ) - for BLISTEDFILE in $(find $UNTRUSTDESTDIR -name "$hash.*"); do - blisthash=$( openssl x509 -sha1 -in "$BLISTEDFILE" -noout -fingerprint ) - if [ "$certhash" = "$blisthash" ]; then - echo "Removing $(basename "$BLISTEDFILE") from untrusted list" - [ $NOOP -eq 0 ] && rm -f $BLISTEDFILE + for UTFILE in "$@"; do + if [ -s "$UTFILE" ] ; then + hash=$(do_hash "$UTFILE") + certhash=$(openssl x509 -sha1 -in "$UTFILE" -noout -fingerprint) + for UNTRUSTEDFILE in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do + untrustedhash=$(openssl x509 -sha1 -in "$UNTRUSTEDFILE" -noout -fingerprint) + if [ "$certhash" = "$untrustedhash" ] ; then + info "Removing $(basename "$UNTRUSTEDFILE") from untrusted list" + perform rm -f $UNTRUSTEDFILE fi done - elif [ -e "$UNTRUSTDESTDIR/$BFILE" ]; then - echo "Removing $BFILE from untrusted list" - [ $NOOP -eq 0 ] && rm -f "$UNTRUSTDESTDIR/$BFILE" + elif [ -e "$UNTRUSTDESTDIR/$UTFILE" ] ; then + info "Removing $UTFILE from untrusted list" + perform rm -f "$UNTRUSTDESTDIR/$UTFILE" else - echo "Cannot find $BFILE" >&2 - ERRORS=$(( $ERRORS + 1 )) + info "Cannot find $UTFILE" + ERRORS=$((ERRORS + 1)) fi done } cmd_untrusted() { - echo "Listing Untrusted Certificates:" + info "Listing Untrusted Certificates:" do_list "$UNTRUSTDESTDIR" } @@ -270,18 +288,23 @@ while getopts D:d:M:nUv flag; do D) DESTDIR=${OPTARG} ;; d) DISTBASE=${OPTARG} ;; M) METALOG=${OPTARG} ;; - n) NOOP=1 ;; - U) UNPRIV=1 ;; - v) VERBOSE=$(( $VERBOSE + 1 )) ;; + n) NOOP=true ;; + U) UNPRIV=true ;; + v) VERBOSE=true ;; esac done -shift $(( $OPTIND - 1 )) +shift $((OPTIND - 1)) DESTDIR=${DESTDIR%/} +if ! [ -z "${CERTCTL_VERBOSE:-}" ] ; then + VERBOSE=true +fi : ${METALOG:=${DESTDIR}/METALOG} INSTALLFLAGS= -[ $UNPRIV -eq 1 ] && INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR}" +if "$UNPRIV" ; then + INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR}" +fi : ${LOCALBASE:=$(sysctl -n user.localbase)} : ${TRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/trusted:${DESTDIR}${LOCALBASE}/share/certs:${DESTDIR}${LOCALBASE}/etc/ssl/certs} : ${UNTRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/untrusted:${DESTDIR}${LOCALBASE}/etc/ssl/untrusted:${DESTDIR}${LOCALBASE}/etc/ssl/blacklisted} @@ -302,7 +325,9 @@ blacklisted) cmd_untrusted ;; esac retval=$? -[ $ERRORS -gt 0 ] && echo "Encountered $ERRORS errors" >&2 +if [ $ERRORS -gt 0 ] ; then + info "Encountered $ERRORS errors" +fi exit $retval ################################################################################ From nobody Thu Oct 5 15:11:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1ZlS2D68z4vjsw; Thu, 5 Oct 2023 15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1ZlS1RYPz4YnZ; Thu, 5 Oct 2023 15: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=1696518692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xp84SFSl/oFw7ookW6F8zp+BY8XWH+KvsetuIOwVKAo=; b=BbumE4T8KoT2uPcSdNnFXtdwFMs77SRpc1oEkT+ZbuDlviO6SPCuPNT3o7L0PPrpOeUR+X IJ3jZJPb32L1+3RHT85V1D1/jggZ/rSsLgDeqO+fAh4EKHvann9R6euiElJoVR9Ic3eNX+ mXxKBsDUZqUHTFYhNPFyK5M3N2cFEOA2B+mflrx+JbNQRVFISKiprnoi8YyBTxXMsTBdgS fLCz9VgIB/5mjzjvsL/GmEQLcHWVNgGExI1qGAvYPgq/0enxsxkYDMFOu04hzw7OGm0EP8 eRW1T6IMR+Lz4B8ji/Yxh5QWHtiOtHJLT201u04jOxXwHNLIaPHxMq7JcvDOWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696518692; a=rsa-sha256; cv=none; b=dmyUU2greLCqk11isig9VanpGCsMLuAv4+3HfrX8oAIJEELsgkZ2djaXDDYQlxGRC9/9lv 9JauHtQ0MFSQgRBbv3NCykUgG90pXGDZEaOnVRlX7hz/uCwX5kLqYK82BMYwM2kPitCLus 4yyOr/vQt5GPAEZG6q16owBeHF6x8iV0dSB+KiiNlr1NX8LdQnjnn6VMdsE6PvZHoO4oja e62EyUw+mVcdU1B9Qh57DjVwBW5BH4CfZxdnGxQvzuN5uNhMGnjV4Y0w7ejV3++JLZ9h9i uD2EdGOpSPzFRCY/M0kpKdU3w3tA17uBUHYveJQmh85UwlYIWM/QxzkimrCSlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696518692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xp84SFSl/oFw7ookW6F8zp+BY8XWH+KvsetuIOwVKAo=; b=yDRDEjVVSDWBPv7lGSfL0uCC0pR6iVziYYosd9jx/4HF8CDNQr7evpU7nRuOtTmtdJhUc2 qqoKnOu6ERlKR+UevhMM+QYtsPBS3HE2Vet7gK2RT5269X+DdxWBMMxD2R40RqI7sD/pMd p5P/+dsTBbLxn+5pPDWffA0o53cOFG66PCjEbjOWWXfquyzJfXm3Hb9FFBO+f2WGqEgO3j cfNn0hVN/iyGitPFjl6P3cMHk3Dde5F7Zcumw6dnNjj3AfHl88v5cEBNgUMvDpFUaAmIDy FXgMn8DDdq5kxQUN6skkAEY/Um3j8KDYLcSEKYVeMSHxR32XZ8PoMxSFsyG7eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1ZlS0XV3z1Pcn; Thu, 5 Oct 2023 15:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FBV8t072842; Thu, 5 Oct 2023 15:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FBVR6072839; Thu, 5 Oct 2023 15:11:31 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:11:31 GMT Message-Id: <202310051511.395FBVR6072839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a401c8cb26b2 - main - certctl: Split certificate bundles before processing. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a401c8cb26b22688087ad7c5ee527718459df15a Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a401c8cb26b22688087ad7c5ee527718459df15a commit a401c8cb26b22688087ad7c5ee527718459df15a Author: Dag-Erling Smørgrav AuthorDate: 2023-10-05 14:50:01 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:11:22 +0000 certctl: Split certificate bundles before processing. This allows 'certctl rehash' to do the right thing when ca_root_nss is installed, instead of linking the entire bundle to the hash of the first certificate it contains. MFC after: 3 days Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42087 --- usr.sbin/certctl/certctl.sh | 99 ++++++++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 36 deletions(-) diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh index 02d055102c33..b7d3a95bc7d7 100755 --- a/usr.sbin/certctl/certctl.sh +++ b/usr.sbin/certctl/certctl.sh @@ -32,7 +32,6 @@ set -u : ${DESTDIR:=} : ${DISTBASE:=} -: ${FILEPAT:="\.pem$|\.crt$|\.cer$|\.crl$"} ############################################################ GLOBALS @@ -63,6 +62,16 @@ perform() fi } +cert_files_in() +{ + find -L "$@" -type f \( \ + -name '*.pem' -or \ + -name '*.crt' -or \ + -name '*.cer' -or \ + -name '*.crl' \ + \) 2>/dev/null +} + do_hash() { local hash @@ -93,23 +102,32 @@ get_decimal() return 0 } -create_trusted_link() +create_trusted() { local hash certhash otherfile otherhash local suffix + local link=${2:+-lm} hash=$(do_hash "$1") || return certhash=$(openssl x509 -sha1 -in "$1" -noout -fingerprint) for otherfile in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint) if [ "$certhash" = "$otherhash" ] ; then - info "Skipping untrusted certificate $1 ($otherfile)" + info "Skipping untrusted certificate $hash ($otherfile)" return 1 fi done + for otherfile in $(find $CERTDESTDIR -name "$hash.*") ; do + otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint) + if [ "$certhash" = "$otherhash" ] ; then + verbose "Skipping duplicate entry for certificate $hash" + return 0 + fi + done suffix=$(get_decimal "$CERTDESTDIR" "$hash") verbose "Adding $hash.$suffix to trust store" - perform install ${INSTALLFLAGS} -lrs "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix" + perform install ${INSTALLFLAGS} -m 0444 ${link} \ + "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix" } # Accepts either dot-hash form from `certctl list` or a path to a valid cert. @@ -137,6 +155,7 @@ resolve_certname() create_untrusted() { local srcfile filename + local link=${2:+-lm} set -- $(resolve_certname "$1") srcfile=$1 @@ -147,12 +166,13 @@ create_untrusted() fi verbose "Adding $filename to untrusted list" - perform install ${INSTALLFLAGS} -lrs "$srcfile" "$UNTRUSTDESTDIR/$filename" + perform install ${INSTALLFLAGS} -m 0444 ${link} \ + "$srcfile" "$UNTRUSTDESTDIR/$filename" } do_scan() { - local CFUNC CSEARCH CPATH CFILE + local CFUNC CSEARCH CPATH CFILE CERT SPLITDIR local oldIFS="$IFS" CFUNC="$1" CSEARCH="$2" @@ -160,14 +180,25 @@ do_scan() IFS=: set -- $CSEARCH IFS="$oldIFS" - for CPATH in "$@"; do - [ -d "$CPATH" ] || continue - info "Scanning $CPATH for certificates..." - for CFILE in $(ls -1 "${CPATH}" | grep -Ee "${FILEPAT}") ; do - [ -e "$CPATH/$CFILE" ] || continue - verbose "Reading $CFILE" - "$CFUNC" "$CPATH/$CFILE" - done + for CFILE in $(cert_files_in "$@") ; do + verbose "Reading $CFILE" + case $(grep -c '^Certificate:$' "$CFILE") in + 0) + ;; + 1) + "$CFUNC" "$CFILE" link + ;; + *) + verbose "Multiple certificates found, splitting..." + SPLITDIR=$(mktemp -d) + egrep '^[^#]' "$CFILE" | \ + split -p '^Certificate:$' - "$SPLITDIR/x" + for CERT in $(find "$SPLITDIR" -type f) ; do + "$CFUNC" "$CERT" + done + rm -rf "$SPLITDIR" + ;; + esac done } @@ -175,43 +206,39 @@ do_list() { local CFILE subject - if [ -e "$1" ] ; then - cd "$1" - for CFILE in *.[0-9] ; do - if [ ! -s "$CFILE" ] ; then - info "Unable to read $CFILE" - ERRORS=$((ERRORS + 1)) - continue - fi - subject= - if [ $VERBOSE -eq 0 ] ; then - subject=$(openssl x509 -noout -subject -nameopt multiline -in "$CFILE" | - sed -n '/commonName/s/.*= //p') - fi - [ "$subject" ] || - subject=$(openssl x509 -noout -subject -in "$CFILE") - printf "%s\t%s\n" "$CFILE" "$subject" - done - cd - - fi + for CFILE in $(find "$@" \( -type f -or -type l \) -name '*.[0-9]') ; do + if [ ! -s "$CFILE" ] ; then + info "Unable to read $CFILE" + ERRORS=$((ERRORS + 1)) + continue + fi + subject= + if ! "$VERBOSE" ; then + subject=$(openssl x509 -noout -subject -nameopt multiline -in "$CFILE" | sed -n '/commonName/s/.*= //p') + fi + if [ -z "$subject" ] ; then + subject=$(openssl x509 -noout -subject -in "$CFILE") + fi + printf "%s\t%s\n" "${CFILE##*/}" "$subject" + done } cmd_rehash() { if [ -e "$CERTDESTDIR" ] ; then - perform find "$CERTDESTDIR" -type link -delete + perform find "$CERTDESTDIR" \( -type f -or -type l \) -delete else perform install -d -m 0755 "$CERTDESTDIR" fi if [ -e "$UNTRUSTDESTDIR" ] ; then - perform find "$UNTRUSTDESTDIR" -type link -delete + perform find "$UNTRUSTDESTDIR" \( -type f -or -type l \) -delete else perform install -d -m 0755 "$UNTRUSTDESTDIR" fi do_scan create_untrusted "$UNTRUSTPATH" - do_scan create_trusted_link "$TRUSTPATH" + do_scan create_trusted "$TRUSTPATH" } cmd_list() From nobody Thu Oct 5 15:31:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bBW1CNKz4vmTb; Thu, 5 Oct 2023 15:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bBW0kvRz4bjt; Thu, 5 Oct 2023 15:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696519891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zjTgEvsa2PyXtoTi1eDqrjv0zX6m/ol2MYzYZyst7w=; b=ITziiSXhqrs2ygx3ohpUYGmuK/lQz0z+hhh+KHyrF03yo627beyM8PQ4g7sCl2EGZcWYpv xoMoomGNoa/dXPacdKWEa7joi0FMZc4rkxOPuBum+yLcvJ+KF/gQqB5UAYeCxWU3lvn1Hx c1cc0fZ3MtPgyXNFJ6x+VTo6XiM51xwqeXB1uFDwcxc1LmZ+xY4AbRulHtQL6p2larkCUu /q0keFHtI8eaukuxAh/JqKzpc2zTHG7840bIdx8nOxBxO5Tz3/5mHC8U7oW7YZyx1oEu8d BNeoobyWqjc4mO+aPzMTzZLLqMKjMyBz/2INss0BXVcSJnl3khM0/ZJfIBvTfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696519891; a=rsa-sha256; cv=none; b=egalqt7yoo7CiAkzb3HLt41U/4rnAxQqJxieGS5hPjP6eIjIT+sRYoARnK/DXbzS5XeWlj Hs+sSfIOkvkfmNckjFqnomceWwKCwYT73IScZH1DraVck04pDe6Ts+wyRdMFB7G+aPdeLw H7aU+aDPrwowG06Fl8Ce87Ctifr0uTEh0FEXpKo/oozFH2Bo4BZmFh3YCdzzQaqad5dp/W /hahCSu6g1/NVHxIhO+Y8DcxI0MAgE9UrOGUBTGpqo70aNQy9AIe+zbbholZ8mjZR29zr9 sxTErgfFdG//zQiztIPdXbI6TMRoZlTOHdlefTniHpv84YOvdodpJnsRxTo+yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696519891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8zjTgEvsa2PyXtoTi1eDqrjv0zX6m/ol2MYzYZyst7w=; b=qqUxeErASZ9Q7ZTMSEXKGCjzvXv9+WiGjEn8k/lUecxs+Lr3Y8MPSFsezq/F/AwU1eEVbo hlgxgmkWK4Mw+jaRc6OrKhDtOF3OsGEfpBIcuzuHSjvbpZgytsANjf0j6p9dYtHPTJ9ctw t5b0ZwyF34XJgW1N9stptPoG6H8yl6CdB7WiXNlfXKdCO6AIp+BhY5Alol51MTfTXwJ8K6 Au5CuqHbQDK7SwRbqUBu14wwlaCt3DPXsUWH6+utDWwMC86mScB6HsUIx8CycOL7xj6JEZ L8jDLQMR8a4rIdpW8otsvBr2Xft037fh5jUCitrc7GjqKNcrHF9ZskSHpjbJNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bBV6vS5z1Q6q; Thu, 5 Oct 2023 15:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FVUSK008764; Thu, 5 Oct 2023 15:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FVUFg008750; Thu, 5 Oct 2023 15:31:30 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:31:30 GMT Message-Id: <202310051531.395FVUFg008750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 4ab019329025 - main - bsdconfig: simplify pkg installation and ABI detection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ab0193290255dffce3e123b7b9eec8f768740de Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab0193290255dffce3e123b7b9eec8f768740de commit 4ab0193290255dffce3e123b7b9eec8f768740de Author: Baptiste Daroussin AuthorDate: 2023-10-05 15:16:31 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 15:30:17 +0000 bsdconfig: simplify pkg installation and ABI detection --- usr.sbin/bsdconfig/share/packages/musthavepkg.subr | 34 ++++++++-------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/usr.sbin/bsdconfig/share/packages/musthavepkg.subr b/usr.sbin/bsdconfig/share/packages/musthavepkg.subr index 9b5d94675345..0a1026afe86c 100644 --- a/usr.sbin/bsdconfig/share/packages/musthavepkg.subr +++ b/usr.sbin/bsdconfig/share/packages/musthavepkg.subr @@ -44,26 +44,16 @@ f_include $BSDCFG_SHARE/mustberoot.subr f_musthavepkg_init() { local funcname=f_musthavepkg_init - local pkg_abi_awk=' # BEGIN-AWK - $1 ~ /^ABI/ && $0 = $NF, sub(/^"/, "") && sub(/".*/, "") { - print; found = 1; exit - } END { exit ! found } - ' # END-AWK - if [ "$PKG_ABI" ]; then # Already set - f_dprintf "PKG_ABI=[%s]" "$PKG_ABI" - export PKG_ABI - f_quietly pkg -N -vv # return status (pkg(8) functional?) - return $? - fi - - # Attempt to get PKG_ABI without prematurely bootstrapping pkg(8) - if f_eval_catch -k PKG_ABI $funcname pkg \ - "pkg -N -vv | awk '%s'" "$pkg_abi_awk" - then - f_dprintf "PKG_ABI=[%s]" "$PKG_ABI" - export PKG_ABI - return $SUCCESS + if f_quietly pkg -N; then + if [ -n "$PKG_ABI" ]; then + export PKG_ABI + return $SUCCESS + fi + if f_eval_catch -k PKG_ABI $funcname pkg "pkg config abi"; then + export PKG_ABI + return $SUCCESS + fi fi # pkg(8) not yet bootstrapped; ask for permission unless nonInteractive @@ -74,10 +64,10 @@ f_musthavepkg_init() # Bootstrap pkg(8) f_dialog_info "$msg_bootstrapping_pkg" - f_eval_catch -k PKG_ABI $funcname pkg \ - "ASSUME_ALWAYS_YES=1 pkg -vv | awk '%s'" "$pkg_abi_awk" || + f_eval_catch $funcname pkg \ + "pkg bootstrap -y" || f_die 1 "$msg_must_have_pkg_to_execute" "$pgm" - + f_eval_catch -k PKG_ABI $funcname pkg "pkg config abi" f_dprintf "PKG_ABI=[%s]" "$PKG_ABI" export PKG_ABI return $SUCCESS From nobody Thu Oct 5 15:34:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGP6hr8z4vnFV; Thu, 5 Oct 2023 15:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGP6Dpxz4cYQ; Thu, 5 Oct 2023 15:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEnH9AW5cQrC8QEEwpufvxSnOh4BRrnYJ2eoDOpH840=; b=tsPbA7yourDgEWHpt910fsndEpmPT1fSV0nlrAt4xt7/eLvs+owPdYfQX5oT5QjtAL/+e9 vdBa95NtIwEGaMzcvDel/cPjYG6aNw1BVQ707E/jUM77jkUXSV3J1mCJifj54WCclMwJb1 GuggN3H2K594CsOVaR8ljB0Q6SWJvAaJTw+wjf7LkfBdxeOHv0kzHkO0cx412N0EW/dllg w1QASw9HFU8vNZUydc7P/JQdiV5qFoazzTwuzYUxgmcYDFsXEtOA6h5jKV4QoCHLWfVRGg NHIYPxM4PIpczQr3pframrjmW5/S6Lo7bSEQELDaEjz0ZSAJazto7gORYzhkjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520093; a=rsa-sha256; cv=none; b=TlI5+FPo9yd4LBef1nfPCMOx0MWQ1Z0rsm1f22AJScxMDlxomGKiSX0UT/p4T3tEjlCzI6 ao01776LcXpUBTZzruf93xVO/5jTXhFzWEc1y5nb/R00QGWzd9WEBW50BfkWTUvxPlXcqh bFSF+nqeexWFg45I4yer8mKl+LPb5kqhSearJwfyxb1VMDSc/SWcMAzCLaNiJ6PYaUFTQ8 tN4yTEfbtugY+Vg6rYXTkbiRvgsr0SCRCruEXIz2mg5EAghvhr8Of14/hdE5yZGLDFB7op fWoZfQtH0t/iGlxlu/DepSPYMk5ZiLlIFRXfzY8ITIeznh3R3HBC9AdySVPPiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEnH9AW5cQrC8QEEwpufvxSnOh4BRrnYJ2eoDOpH840=; b=gXFogRPebN11SCh8nt361NGBNfmD9uUwQlJOZJxrzI2ybI2J85odAb/lY5dnfXCNfuhhE0 pCUDiHUfQI4LFk0si6C3rIQXZhtXx+NRr1lKFM5ptKRFgW8V/Fo8IgykhvuBaqYeL2KZJV KX12WpFlo4pnJ5Aemw8IT74Cm25b6Bq6uW6Sk3CizXpin7hD+kZOD2+QXXVG/e+TkJ/5yS fh4nERY1tlS0dxgbdW02JI01Bi3OCyZYcHMTJX0uVLxqpKccAExmbKk3trVQucFUybbpeN +wi3axdV3nZLXgT8mYvNMBt5vx2JHYEVpDsfAzsJ9qe8G5zcDKAjFexo9eOD2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGP5HN9z1PGn; Thu, 5 Oct 2023 15:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYrZt012016; Thu, 5 Oct 2023 15:34:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYrOK012013; Thu, 5 Oct 2023 15:34:53 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:53 GMT Message-Id: <202310051534.395FYrOK012013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 432ae724e6eb - main - dwc: Move every sub drivers to dev/dwc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 432ae724e6ebac4696a7baf5020e2445db06dc2f Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=432ae724e6ebac4696a7baf5020e2445db06dc2f commit 432ae724e6ebac4696a7baf5020e2445db06dc2f Author: Emmanuel Vadot AuthorDate: 2023-09-23 14:38:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Move every sub drivers to dev/dwc It makes it easier to find all the sub drivers and change them if needed. While here do not gate dwc_rk with soc options, dwc_rk is made for all rockchip SoCs. Same thing for dwc_socfpga --- sys/arm/allwinner/files.allwinner | 2 +- sys/arm/rockchip/files.rk32xx | 2 +- sys/conf/files.arm64 | 5 +++-- sys/{arm/allwinner/aw_if_dwc.c => dev/dwc/if_dwc_aw.c} | 0 sys/{arm64/rockchip => dev/dwc}/if_dwc_rk.c | 0 sys/dev/{altera => }/dwc/if_dwc_socfpga.c | 0 6 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/arm/allwinner/files.allwinner b/sys/arm/allwinner/files.allwinner index cc609e50f2bd..a136b2e050ac 100644 --- a/sys/arm/allwinner/files.allwinner +++ b/sys/arm/allwinner/files.allwinner @@ -5,7 +5,6 @@ arm/allwinner/a10_dmac.c optional a10_dmac arm/allwinner/a31_dmac.c optional a31_dmac arm/allwinner/a10_sramc.c optional SOC_ALLWINNER_A10 arm/allwinner/aw_gpio.c optional gpio -arm/allwinner/aw_if_dwc.c optional dwc arm/allwinner/aw_machdep.c standard arm/allwinner/aw_mmc.c optional mmc | mmccam arm/allwinner/aw_mp.c optional smp @@ -22,6 +21,7 @@ arm/allwinner/axp81x.c optional axp81x arm/allwinner/if_awg.c optional awg syscon arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m optional a10_dmac | a31_dmac +dev/dwc/if_dwc_aw.c optional dwc dev/iicbus/controller/twsi/a10_twsi.c optional twsi dev/usb/controller/generic_ohci.c optional ohci dev/usb/controller/generic_usb_if.m optional ohci diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 4dc9a4df908c..0f2774fd76cc 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -2,7 +2,6 @@ kern/kern_clocksource.c standard arm/rockchip/rk32xx_machdep.c standard arm/rockchip/rk32xx_mp.c optional smp -arm64/rockchip/if_dwc_rk.c standard arm64/rockchip/rk_i2c.c standard arm64/rockchip/rk_iodomain.c standard arm64/rockchip/rk_gpio.c standard @@ -22,6 +21,7 @@ arm64/rockchip/clk/rk_clk_pll.c standard arm64/rockchip/clk/rk_cru.c standard arm64/rockchip/clk/rk3288_cru.c standard +dev/dwc/if_dwc_rk.c standard dev/iicbus/pmic/act8846.c standard dev/iicbus/pmic/act8846_regulator.c standard dev/iicbus/pmic/fan53555.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index baf8734fb38f..eaf4577ee14e 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -224,8 +224,11 @@ dev/dpaa2/memac_mdio_common.c optional soc_nxp_ls dpaa2 acpi | soc_nxp_ls dpaa dev/dpaa2/memac_mdio_fdt.c optional soc_nxp_ls dpaa2 fdt dev/dpaa2/memac_mdio_if.m optional soc_nxp_ls dpaa2 acpi | soc_nxp_ls dpaa2 fdt +# Synopsys DesignWare Ethernet Controller dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 +dev/dwc/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +dev/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga dev/enetc/enetc_mdio.c optional enetc soc_nxp_ls dev/enetc/if_enetc.c optional enetc iflib pci fdt soc_nxp_ls @@ -469,7 +472,6 @@ arm/allwinner/h6/h6_padconf.c optional soc_allwinner_h6 fdt arm/allwinner/h6/h6_r_padconf.c optional soc_allwinner_h6 fdt # Altera/Intel -dev/altera/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga arm64/intel/stratix10-soc-fpga-mgr.c optional soc_intel_stratix10 fdt arm64/intel/stratix10-svc.c optional soc_intel_stratix10 fdt @@ -672,7 +674,6 @@ arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | fdt rk_usb2phy soc_rockchip_rk3399 | fdt rk_usb2phy soc_rockchip_rk3568 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 -arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_pwm.c optional fdt rk_pwm diff --git a/sys/arm/allwinner/aw_if_dwc.c b/sys/dev/dwc/if_dwc_aw.c similarity index 100% rename from sys/arm/allwinner/aw_if_dwc.c rename to sys/dev/dwc/if_dwc_aw.c diff --git a/sys/arm64/rockchip/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c similarity index 100% rename from sys/arm64/rockchip/if_dwc_rk.c rename to sys/dev/dwc/if_dwc_rk.c diff --git a/sys/dev/altera/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c similarity index 100% rename from sys/dev/altera/dwc/if_dwc_socfpga.c rename to sys/dev/dwc/if_dwc_socfpga.c From nobody Thu Oct 5 15:34:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGR0kT2z4vnbq; Thu, 5 Oct 2023 15:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGR01JMz4cW5; Thu, 5 Oct 2023 15:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH6KJIwRP3HzvH9cifm3hoP6LggeItOVavyKguBGTGc=; b=V3HB1zNlk+ngNRbGvNZaIu0VPTsqKlHAs56s8JhasO6v1NU/vSz6WK29eiLeGDawlChcf6 4gDc+mZdoDY4Vjy0IJuCC5Zhmm83n19zEAf5fV+YZBVmnpRw6KhsiWMXXXm2Qj/iNd+eKi n/V2++eOrpclncNFelhM2NR7pNx+n1nYW7J+pWP9MhCcnNWUvl0CLBT4ePMEM/amMEz/WM X7uAGkIdl+ENfiJ8ePB/uv03uT1Pz6NWl0G/p9CydGS8rKGOKGfoum9MGJCIjkKVSLhWwd uGw11seGT6OkdS/Uzztah0xS6ig7fbo+aT4z7ZIstxjpDK2+zZQjXxdbmGIvVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520095; a=rsa-sha256; cv=none; b=jR2R5p/uN4h4VaHgxo7s1b4dW9urCUPFRNgtlfG6s+ZNRBCujtJUGOCYWGS5AZNZtzchkl EjhXvTSwMva7IoyOll+ntrCxvHt1uSQXlQzJ3odhrU4Wd3okxEyH1gtue/714bwK8qk6Ck xvNMWRpLJ4h3Mcwfg4xcw5nJYCFCVZ2EvGXoRXOcdIJmk4z+iKae5KUBesLtRuIceSs7jG dOJLPjNHqmTz6WlfH54l0DciDdFPiFyVR02kvExMvUfslO02W2DRD2FG9A28uTUdcmCvOu SYcvgarLHJG6a7b5ny5wZWweKsZzFf7z08QX6hiO1KKKniKyE0pXudtQEqoKMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH6KJIwRP3HzvH9cifm3hoP6LggeItOVavyKguBGTGc=; b=LY0NqK+K6o6MLIiwQF/7fAFRTfA6MlVqbsU9UAz9SKiu3DEvSjBCvAFyHO2IvDW7/UMDnq 9wuSi/YBL00MrFsmb/oTTUOdHaSktdhvwQ/kN2ezC1nQ9xsPabkYotQK8gKzqaWFJuLuhj Sx3rPT0Hhff59olUt9HX1+8zBK96NAlrbqi2fNonWtQ+nPxsh0CKEBykSD3V0a/eVwQVYy hL5yACrLMR2G/EjC6HUIu+Dfn7a6ju8rz18zqYsO1mYnwlQ0mXbFsTOO0AO5+WNBsVgMpd cLc2W1IA+gw+eI9IefPpgi7scUbiOwo1IcifwvpBzxojvvMEHH9WpMN29sjH3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGQ6Bt5z1PfY; Thu, 5 Oct 2023 15:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYsqu012065; Thu, 5 Oct 2023 15:34:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYsrC012061; Thu, 5 Oct 2023 15:34:54 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:54 GMT Message-Id: <202310051534.395FYsrC012061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f114aadd3e23 - main - dwc: Rename dwc_reset to dwc_reset_phy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f114aadd3e2300f74922511dcdd69b10a47e7328 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f114aadd3e2300f74922511dcdd69b10a47e7328 commit f114aadd3e2300f74922511dcdd69b10a47e7328 Author: Emmanuel Vadot AuthorDate: 2023-09-23 16:34:19 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Rename dwc_reset to dwc_reset_phy It only deals with reseting the phy. While here avoid calling ofw_bus_get_node again and save the node in softc. --- sys/dev/dwc/if_dwc.c | 41 ++++++++++++++++++++++------------------- sys/dev/dwc/if_dwcvar.h | 1 + 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 18e86ac025d4..accc1b6949cb 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1495,43 +1495,47 @@ dwc_tick(void *arg) #define GPIO_ACTIVE_LOW 1 static int -dwc_reset(device_t dev) +dwc_reset_phy(struct dwc_softc *sc) { pcell_t gpio_prop[4]; pcell_t delay_prop[3]; - phandle_t node, gpio_node; + phandle_t gpio_node; device_t gpio; uint32_t pin, flags; uint32_t pin_value; - node = ofw_bus_get_node(dev); - if (OF_getencprop(node, "snps,reset-gpio", + /* + * All those properties are deprecated but still used in some DTS. + * The new way to deal with this is to use the generic bindings + * present in the ethernet-phy node. + */ + if (OF_getencprop(sc->node, "snps,reset-gpio", gpio_prop, sizeof(gpio_prop)) <= 0) return (0); - if (OF_getencprop(node, "snps,reset-delays-us", + if (OF_getencprop(sc->node, "snps,reset-delays-us", delay_prop, sizeof(delay_prop)) <= 0) { - device_printf(dev, + device_printf(sc->dev, "Wrong property for snps,reset-delays-us"); return (ENXIO); } gpio_node = OF_node_from_xref(gpio_prop[0]); if ((gpio = OF_device_from_xref(gpio_prop[0])) == NULL) { - device_printf(dev, + device_printf(sc->dev, "Can't find gpio controller for phy reset\n"); return (ENXIO); } - if (GPIO_MAP_GPIOS(gpio, node, gpio_node, + if (GPIO_MAP_GPIOS(gpio, sc->node, gpio_node, nitems(gpio_prop) - 1, gpio_prop + 1, &pin, &flags) != 0) { - device_printf(dev, "Can't map gpio for phy reset\n"); + device_printf(sc->dev, "Can't map gpio for phy reset\n"); return (ENXIO); } pin_value = GPIO_PIN_LOW; - if (OF_hasprop(node, "snps,reset-active-low")) + if (OF_hasprop(sc->node, "snps,reset-active-low")) pin_value = GPIO_PIN_HIGH; GPIO_PIN_SETFLAGS(gpio, pin, GPIO_PIN_OUTPUT); @@ -1604,7 +1608,6 @@ dwc_attach(device_t dev) if_t ifp; int error, i; uint32_t reg; - phandle_t node; uint32_t txpbl, rxpbl, pbl; bool nopblx8 = false; bool fixed_burst = false; @@ -1617,8 +1620,8 @@ dwc_attach(device_t dev) sc->mii_clk = IF_DWC_MII_CLK(dev); sc->mactype = IF_DWC_MAC_TYPE(dev); - node = ofw_bus_get_node(dev); - switch (mii_fdt_get_contype(node)) { + sc->node = ofw_bus_get_node(dev); + switch (mii_fdt_get_contype(sc->node)) { case MII_CONTYPE_RGMII: case MII_CONTYPE_RGMII_ID: case MII_CONTYPE_RGMII_RXID: @@ -1636,15 +1639,15 @@ dwc_attach(device_t dev) return (ENXIO); } - if (OF_getencprop(node, "snps,pbl", &pbl, sizeof(uint32_t)) <= 0) + if (OF_getencprop(sc->node, "snps,pbl", &pbl, sizeof(uint32_t)) <= 0) pbl = BUS_MODE_DEFAULT_PBL; - if (OF_getencprop(node, "snps,txpbl", &txpbl, sizeof(uint32_t)) <= 0) + if (OF_getencprop(sc->node, "snps,txpbl", &txpbl, sizeof(uint32_t)) <= 0) txpbl = pbl; - if (OF_getencprop(node, "snps,rxpbl", &rxpbl, sizeof(uint32_t)) <= 0) + if (OF_getencprop(sc->node, "snps,rxpbl", &rxpbl, sizeof(uint32_t)) <= 0) rxpbl = pbl; - if (OF_hasprop(node, "snps,no-pbl-x8") == 1) + if (OF_hasprop(sc->node, "snps,no-pbl-x8") == 1) nopblx8 = true; - if (OF_hasprop(node, "snps,fixed-burst") == 1) + if (OF_hasprop(sc->node, "snps,fixed-burst") == 1) fixed_burst = true; if (IF_DWC_INIT(dev) != 0) @@ -1662,7 +1665,7 @@ dwc_attach(device_t dev) dwc_get_hwaddr(sc, macaddr); /* Reset the PHY if needed */ - if (dwc_reset(dev) != 0) { + if (dwc_reset_phy(sc) != 0) { device_printf(dev, "Can't reset the PHY\n"); bus_release_resources(dev, dwc_spec, sc->res); return (ENXIO); diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index 8a8b9b283784..5e5792974560 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -59,6 +59,7 @@ struct dwc_bufmap { struct dwc_softc { struct resource *res[2]; device_t dev; + phandle_t node; int mactype; int mii_clk; device_t miibus; From nobody Thu Oct 5 15:34:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGS2Cdnz4vnFf; Thu, 5 Oct 2023 15:34:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGS1GLgz4cZT; Thu, 5 Oct 2023 15:34:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XC3lSE7vEa/0noN65hfSIfhgtbcR8Dz4llqfAGWnsek=; b=GhsVXb4nc+FUpAvTxDwUm77YWWQh0ADiX0RJ6nmqLnyqMmrCcYGoOawzcWJCx1/QrQGNKK qD8g4M3a95VZQuhWdjgrhS7Eu897WPsXSXMteBa1rq6pSFDUkO9Ep1u0BIGlJyu/D3a7rN MGFn+xw32s8CH6Tccss/Iv84qY2NJXBrJ2rC0+c0WxJxAc4p67aAVv4vYIINLOHKMBX+4d 36IE5/4Sx9D/JfeeP9NPbe975/Oik/5SeAsve2WHJDqI4lv1OnNaXRvmtN06Lhz1/OIIYs Dl6vTSprnv3cuy4f9fk+KSnGFwUNC6polkcPgj+jMINhf00o+08h6vGF1958qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520096; a=rsa-sha256; cv=none; b=bGiJi6wRdtmYloReT3WR3mWMavziywUeMsIaxE8q3FFbEqvDL1bql70YOyeN7NYgeZIF07 oPGGmVSjHrLdTFiJXajFPJr2yQ8+hTzNSYSYIk8BWVa9GOJXYGaG/9AKRmmCgQV1BgrOoh LCHjgLJ3/FAOhrJzSBRW8mLppeLSVVNsSQBb/DxItUTB+3D2zUu2AVbVRsAQwqktOyhZUm eFKhxVuZpNUmLyxQDycwzg65fsv9hkpLbAntqikinvtWHVoTqVRNiz77E9djTT9ocWRDGZ c2kmuCJCdY5/5n/GScOE3PyZ2K0+PAzEbmipdyvV7sWPYo+dGkSis8VAMBV7Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XC3lSE7vEa/0noN65hfSIfhgtbcR8Dz4llqfAGWnsek=; b=cGmiY8ZexhXxloqty+S7V8M/scWlx/wxwV/UrH8CDPpfiBNAaveHw3H6SrPUo5pb6XunnS ScbiHhF9JsyvpYjjUSQ3rCWMyU8f7nYecEK3quWRHWGCmVm0CAwW/ALhJYOnoyuhuoe26K M0zBkVBApUeP3OgDSuASd5XNgoG88QrcRjLhPaz93BTFJOrj8j3FCJOyh2eKqa7+yfNQrh uqEQZ0cw7Z4gHpc+LiFmWfW9yAEuKu5rtIYKCU9J0rIjS8HKupambmcqelekYBXGKcMoSx 83mASL80sUQ8k04sm7lzsOu+u1Hr17UKOE5F/OpGVh1NNkHEVCeCvuB667AIYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGS0KT2z1PqT; Thu, 5 Oct 2023 15:34:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYtFx012110; Thu, 5 Oct 2023 15:34:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYtaL012107; Thu, 5 Oct 2023 15:34:55 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:55 GMT Message-Id: <202310051534.395FYtaL012107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 27f03f1608f3 - main - dwc: Remove unused GPIO_ACTIVE_LOW define List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27f03f1608f35c59d4f05e759729fa58685db8aa Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=27f03f1608f35c59d4f05e759729fa58685db8aa commit 27f03f1608f35c59d4f05e759729fa58685db8aa Author: Emmanuel Vadot AuthorDate: 2023-09-23 16:45:04 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Remove unused GPIO_ACTIVE_LOW define While here move comment block above the appropriate functions. --- sys/dev/dwc/if_dwc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index accc1b6949cb..6ef9fb8513af 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1488,12 +1488,6 @@ dwc_tick(void *arg) callout_reset(&sc->dwc_callout, hz, dwc_tick, sc); } -/* - * Probe/Attach functions - */ - -#define GPIO_ACTIVE_LOW 1 - static int dwc_reset_phy(struct dwc_softc *sc) { @@ -1586,6 +1580,10 @@ dwc_clock_init(device_t dev) return (0); } +/* + * Probe/Attach functions + */ + static int dwc_probe(device_t dev) { From nobody Thu Oct 5 15:34:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGT31l6z4vnND; Thu, 5 Oct 2023 15:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGT2RG5z4cXG; Thu, 5 Oct 2023 15:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tlVgRyNiC+TKti7jtX/im8/BqhVelvzsIF527ti1XKg=; b=sv6EqXb8x8UIEPUQSO/9UtK1IttR+U63eel6FlCxxCWxmc81iVISCVlYA2IgOwhEcUSZ6t /VR2AXJcSv5i/u7uA95U7bl9PHgWCGk/MLvgLga6GNubvAxO9mWtmcsMz1JwsphD1Nhgnq XBUE2YlnVT7V79U7cIqEMh7/Vy3uAOXVFbGmj1JdKJi/V58qjCYtSZDqyoN3tgBQz5NR8z C/mE2aXtFvcEDk3s+GSbNk9akJPB8r0VQ6pYXOxh5rQwPrTsk+yRRlh/SwB94BUpWrzQJD rYGvdYquci5030+3PNASITNz3geNlOMKDsEH0EfJzuDy6N6bK7g+0dJzaDYPpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520097; a=rsa-sha256; cv=none; b=btbDu2yv6v0iE+fJzOIChUNJLkKs1i/nlipCm4EESAO8RI7B7GzdygbJYsyW80YDlMRQO/ xjdzLm+Vix7//6p7ra48kJJsZ7qlWPeEw/GS96F/V/53TyS+YE25/tFyiOuaJP1DFrItqO OxZr4Hk7WBzpXzCz3xpzrR5rPYsxxOr0YI6HAMxVHCyI4Nlo7cNrdsJz0kJbp19G1GyELs ftsz5gOnXPuWPEaAdqg1zIRnS2k1x3Um0Yq9sqFFDqN8P4CeoP0ynfFgru6autQvdqK0pN dWpfVjY0Ajt53LS6SD/wgOdS+Xm+qL4XGxzK1d/KRIf0WvRGounqmx+AcqsQDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tlVgRyNiC+TKti7jtX/im8/BqhVelvzsIF527ti1XKg=; b=pvnV8zMYM5+rY8IjoWrOhIhpswtN/LZ5tFVXj3XH3SbF2LWvmx3YcxwPNAohd4zfkqBOIw PqyJkDMwr2lSeAVLzeLTbrCtfZIm4HVsYi85t12NIVYXwe/hk+LuGr1RepAII40Or/WA61 +APztKM3RtC80/e17vZzi8QJI6Q+GFzNlnN0uYIlwsj4D0IwThZYeP+zxn5ewVdzlcoEb8 k6eo03HT/qaoQtuTFtkdroDHd/o90ruEM5vfvIrQXYAhyMORdZ3RDXpFVFGxTiWy0XmkS9 5JqLVN5lTn5Aiyn6ILLeGLY0i/FbhZJQBbBGfLrbfCvXHHw3g+UzRlIHMVWt9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGT1K2Rz1QGS; Thu, 5 Oct 2023 15:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYvks012153; Thu, 5 Oct 2023 15:34:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYvt6012150; Thu, 5 Oct 2023 15:34:57 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:57 GMT Message-Id: <202310051534.395FYvt6012150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f4bb6ea5212b - main - dwc: Add support for mixed-burst List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4bb6ea5212b05445e1e7f01d9023714c83344cb Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f4bb6ea5212b05445e1e7f01d9023714c83344cb commit f4bb6ea5212b05445e1e7f01d9023714c83344cb Author: Emmanuel Vadot AuthorDate: 2023-09-23 16:52:29 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Add support for mixed-burst snps,mixed-burst is used to indicate that the DMA engine should use mixed-burst mode. --- sys/dev/dwc/if_dwc.c | 5 +++++ sys/dev/dwc/if_dwc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 6ef9fb8513af..7acb70457a24 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1609,6 +1609,7 @@ dwc_attach(device_t dev) uint32_t txpbl, rxpbl, pbl; bool nopblx8 = false; bool fixed_burst = false; + bool mixed_burst = false; sc = device_get_softc(dev); sc->dev = dev; @@ -1647,6 +1648,8 @@ dwc_attach(device_t dev) nopblx8 = true; if (OF_hasprop(sc->node, "snps,fixed-burst") == 1) fixed_burst = true; + if (OF_hasprop(sc->node, "snps,mixed-burst") == 1) + mixed_burst = true; if (IF_DWC_INIT(dev) != 0) return (ENXIO); @@ -1692,6 +1695,8 @@ dwc_attach(device_t dev) reg |= (rxpbl << BUS_MODE_RPBL_SHIFT); if (fixed_burst) reg |= BUS_MODE_FIXEDBURST; + if (mixed_burst) + reg |= BUS_MODE_MIXEDBURST; WRITE4(sc, BUS_MODE, reg); diff --git a/sys/dev/dwc/if_dwc.h b/sys/dev/dwc/if_dwc.h index 5397b5801596..113477818e4b 100644 --- a/sys/dev/dwc/if_dwc.h +++ b/sys/dev/dwc/if_dwc.h @@ -219,6 +219,7 @@ /* DMA */ #define BUS_MODE 0x1000 +#define BUS_MODE_MIXEDBURST (1 << 26) #define BUS_MODE_EIGHTXPBL (1 << 24) /* Multiplies PBL by 8 */ #define BUS_MODE_USP (1 << 23) #define BUS_MODE_RPBL_SHIFT 17 /* Single block transfer size */ From nobody Thu Oct 5 15:34:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGV4cTXz4vnWW; Thu, 5 Oct 2023 15:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGV3GqQz4cj6; Thu, 5 Oct 2023 15:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElGeCR13j//VeArsD+9wrMreZiH1VsFz1Z57NkqQzwY=; b=TokaNZ24TxGM5TnJKiyVr/U3LewQT9tFkoZV0vHUiVxEFEsxD/ySPQlXb4Rui2fLQ75Txc obSU9Kr32IiGhdBk+eplw1VgUjSHWRmF3TyojLIuFT82/n/SWq/ykxtosvsl10zbm3/hni G4iQee2lh9+DmMSfAH1n+0U0t2FXcsI3lCu2N27IeaJwDY14ukvEr5o6i5SF2+h0zMNI+a MdaHRcWEiOb6UDbOk+yml3RxnCELyebw9gXtCvRksH/8CffkWzYvaGetkGd38i22wJ1j++ /Bv1z1Nzlj+TjOrFauaFcvAee3xSXZadr1JLT2ls7FvIsQ9x5xiif9Uq2YbV7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520098; a=rsa-sha256; cv=none; b=hZZLWMYRtAKYws7ZA1nyRxbeLDyFianjkjFyEdD5dXEE++dfeL4BjKX8JcolsIhRhDHNjj bKqVo10d+IDKjc43pf9fVfFCHqr+5LBmgzAzw/y37sd3KpVx4CJtUJQqKbLzwE/8cD48Pw TFGvUY2QUw7Ueoq36hjK2NqKDRnH58x6U6U5MszqZQoQ9jdJMFG/kUqxgT4jYRSlMY+N0+ TzINsUJ7Hk6yKC/vdMQOdyyOufPyX7UINFSELvN1ggbqw6JgY/aduNO5pQUSdhb4KU8Glr 8pUD6lVkv6riGr1gMDZKBcaNXOPOry7LP32DzYRIigzAarMwCTMz0LtN7vjebw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElGeCR13j//VeArsD+9wrMreZiH1VsFz1Z57NkqQzwY=; b=C+n8ALMQNX0A7iaZpOeAW7fj+TTi86eoM6Em22vdrZe8ecbdBtPaSp1+bKXh+dsmfrBHXp ylENQw5oIIMWUNDZ99qb0F/3UvFhsnR7PQHD+uGz4kvi9YT05loYpG1lAzUWn5MiyZp/Rs PWOqp7BB7MOSvazvI9zB8Z1hDalvxH7pILriXLaLo2VrBrl2eIFSea8+xLSwptkGMyeOVi 0xiNChY14F5dTPGcfusy0m892n8VgWYHxMWyO0NobkiHF2g1X5kbZwdM18Y8KTF80ib5E5 8Nk3NF2aQ24mc3k2gHYPB5SQNtR+rUiHbUcajoxXLQrgAq9JjSa/CzmZUJZP9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGV2Kqsz1QCS; Thu, 5 Oct 2023 15:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYwTx012195; Thu, 5 Oct 2023 15:34:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYwmB012192; Thu, 5 Oct 2023 15:34:58 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:58 GMT Message-Id: <202310051534.395FYwmB012192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: b69c49d10632 - main - dwc: Add support for aal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c commit b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c Author: Emmanuel Vadot AuthorDate: 2023-09-23 16:56:26 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Add support for aal snps,aal is used to indicate that the DMA engine should use Address-Aligned Beats. --- sys/dev/dwc/if_dwc.c | 5 +++++ sys/dev/dwc/if_dwc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 7acb70457a24..7b9cd936681d 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1610,6 +1610,7 @@ dwc_attach(device_t dev) bool nopblx8 = false; bool fixed_burst = false; bool mixed_burst = false; + bool aal = false; sc = device_get_softc(dev); sc->dev = dev; @@ -1650,6 +1651,8 @@ dwc_attach(device_t dev) fixed_burst = true; if (OF_hasprop(sc->node, "snps,mixed-burst") == 1) mixed_burst = true; + if (OF_hasprop(sc->node, "snps,aal") == 1) + aal = true; if (IF_DWC_INIT(dev) != 0) return (ENXIO); @@ -1697,6 +1700,8 @@ dwc_attach(device_t dev) reg |= BUS_MODE_FIXEDBURST; if (mixed_burst) reg |= BUS_MODE_MIXEDBURST; + if (aal) + reg |= BUS_MODE_AAL; WRITE4(sc, BUS_MODE, reg); diff --git a/sys/dev/dwc/if_dwc.h b/sys/dev/dwc/if_dwc.h index 113477818e4b..be27b189e4e8 100644 --- a/sys/dev/dwc/if_dwc.h +++ b/sys/dev/dwc/if_dwc.h @@ -220,6 +220,7 @@ /* DMA */ #define BUS_MODE 0x1000 #define BUS_MODE_MIXEDBURST (1 << 26) +#define BUS_MODE_AAL (1 << 25) #define BUS_MODE_EIGHTXPBL (1 << 24) /* Multiplies PBL by 8 */ #define BUS_MODE_USP (1 << 23) #define BUS_MODE_RPBL_SHIFT 17 /* Single block transfer size */ From nobody Thu Oct 5 15:34:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGW4n5Hz4vnJP; Thu, 5 Oct 2023 15:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGW3x0tz4cft; Thu, 5 Oct 2023 15:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MhVIdeE0S5Q1QZFKaHYuvbTI4x7Je8BhrYVB7v9ECIs=; b=xk2CGu8saciQ9O7UehX21E0P2qYw9P+pNxeYP1zyxqmV2V6EvQq54ViKckn5br4uwtvkzI EpZqZT5sqAWeS9impobFOIXloEsD8YHnRG2/CllS8Wys8yq/mfB0z7h4CErBVD1Cx/sgD7 cgIyzSwpvSw6kqZBc7+JeGrUSQFm8dQ1vedCqx6Lz2DtMEtuP1iTriIE9Q6n/coPOY/HOb JNLiAW8E52Tx2NU78GcEuk7ZfmldKSj+NBeqHN7TuwN7zgk/GDzf50nx0MVPmffUayaS9I ZXFq5Gcm1sL+vKpyztF7iyuipB6icTsi+zfVGIBFnr/tqJJ7aXqVPBC52wC4VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520099; a=rsa-sha256; cv=none; b=PvbTKV7fE0GbwHQbN3pgkRvkMXK/uhHUOO4i+1hTxjL9gM9QW41SRwWgAwKGw054Ykwl/Z wm8U9YHgX4yUoI/fT7Zzng4gDUvRU3rtK5mpicUgJM2SBGR0+j0d+apmClQfBVAZLsZImV Fv5c9f1OQXFVftJQtBpF3Sv74VVThhCbpd7m+XojTHCsUqYYoVPZE3OAommFEGOxWUHix6 h3H0fBn3q5i1+8AQWqnt+gUyOT3aCmjgUotAu2xuVU8gVc/j5xn0EH28H7FaSeEWNAfeEZ Eh42xrclh0bju02Y5o11Ccos7fvZxaj6kmfLiBLobKyY0qIbD3Pn7QTL4F14GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MhVIdeE0S5Q1QZFKaHYuvbTI4x7Je8BhrYVB7v9ECIs=; b=u1yFYLrxtFW0FLDrMskM85NAgx/9+fjq7Qm9KTwlbJYT4CjkXzsn9py/aX5JaTS6FwUwyg TISGjPmq604ctxi+Zovop59qbz494x8e3o8NWkFcdPPBcEzh+obNO1Q3/WD38HdxGt4irV BxmT3Hk8IXf7ZfoLnyhk20b9lxJ01KRonVISkz9SeVUK03MC/IzDh4+jc8L4PEso8KfuuL ZZ07TQoMoheYh2k3D/N1UWcScbKXW1Gqix0IBTOluvcUCSOY6rV4riugJbaUX7S1OrKixt rlDaWH4cLujJBssuyIM57ljt+pOHzUkbLmpC9H9Bbk5y1YWMCTolouIwSRNo3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGW2zKMz1PqV; Thu, 5 Oct 2023 15:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FYxuF012241; Thu, 5 Oct 2023 15:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FYxnZ012238; Thu, 5 Oct 2023 15:34:59 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:34:59 GMT Message-Id: <202310051534.395FYxnZ012238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 50059a60edec - main - dwc: Rewrite clock and reset functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50059a60edec3c8c37e2f7b490fef83ec288b2da Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=50059a60edec3c8c37e2f7b490fef83ec288b2da commit 50059a60edec3c8c37e2f7b490fef83ec288b2da Author: Emmanuel Vadot AuthorDate: 2023-09-23 16:24:22 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:38 +0000 dwc: Rewrite clock and reset functions snps,dwmac have one required clock named stmmaceth and one optional pclk, correctly handle both in if_dwc, no need to get/enable stmmacseth again in if_dwc_rk. It also have one required reset also named stmmaceth and one optional ahb, correctly handle both. Rockchip have another optional clock named clk_mac_speed, get it and enable it if present. Also fix the optional RMII clocks, they were previously wrongly enabled in RGMII case. --- sys/dev/dwc/if_dwc.c | 100 +++++++++++++++++++++++++++++-------------- sys/dev/dwc/if_dwc_aw.c | 4 +- sys/dev/dwc/if_dwc_rk.c | 39 ++++++++--------- sys/dev/dwc/if_dwc_socfpga.c | 3 ++ sys/dev/dwc/if_dwcvar.h | 6 +++ 5 files changed, 98 insertions(+), 54 deletions(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 7b9cd936681d..981e823a6fcc 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -61,6 +61,9 @@ #include +#include +#include + #include #include #include @@ -69,9 +72,6 @@ #include #include -#include -#include - #include "if_dwc_if.h" #include "gpio_if.h" #include "miibus_if.h" @@ -1544,37 +1544,65 @@ dwc_reset_phy(struct dwc_softc *sc) } static int -dwc_clock_init(device_t dev) +dwc_clock_init(struct dwc_softc *sc) { - hwreset_t rst; - clk_t clk; - int error; + int rv; int64_t freq; - /* Enable clocks */ - if (clk_get_by_ofw_name(dev, 0, "stmmaceth", &clk) == 0) { - error = clk_enable(clk); - if (error != 0) { - device_printf(dev, "could not enable main clock\n"); - return (error); - } - if (bootverbose) { - clk_get_freq(clk, &freq); - device_printf(dev, "MAC clock(%s) freq: %jd\n", - clk_get_name(clk), (intmax_t)freq); - } + /* Required clock */ + rv = clk_get_by_ofw_name(sc->dev, 0, "stmmaceth", &sc->clk_stmmaceth); + if (rv != 0) { + device_printf(sc->dev, "Cannot get GMAC main clock\n"); + return (ENXIO); } - else { - device_printf(dev, "could not find clock stmmaceth\n"); + if ((rv = clk_enable(sc->clk_stmmaceth)) != 0) { + device_printf(sc->dev, "could not enable main clock\n"); + return (rv); } - /* De-assert reset */ - if (hwreset_get_by_ofw_name(dev, 0, "stmmaceth", &rst) == 0) { - error = hwreset_deassert(rst); - if (error != 0) { - device_printf(dev, "could not de-assert reset\n"); - return (error); - } + /* Optional clock */ + rv = clk_get_by_ofw_name(sc->dev, 0, "pclk", &sc->clk_pclk); + if (rv != 0) + return (0); + if ((rv = clk_enable(sc->clk_pclk)) != 0) { + device_printf(sc->dev, "could not enable peripheral clock\n"); + return (rv); + } + + if (bootverbose) { + clk_get_freq(sc->clk_stmmaceth, &freq); + device_printf(sc->dev, "MAC clock(%s) freq: %jd\n", + clk_get_name(sc->clk_stmmaceth), (intmax_t)freq); + } + + return (0); +} + +static int +dwc_reset_deassert(struct dwc_softc *sc) +{ + int rv; + + /* Required reset */ + rv = hwreset_get_by_ofw_name(sc->dev, 0, "stmmaceth", &sc->rst_stmmaceth); + if (rv != 0) { + device_printf(sc->dev, "Cannot get GMAC reset\n"); + return (ENXIO); + } + rv = hwreset_deassert(sc->rst_stmmaceth); + if (rv != 0) { + device_printf(sc->dev, "could not de-assert GMAC reset\n"); + return (rv); + } + + /* Optional reset */ + rv = hwreset_get_by_ofw_name(sc->dev, 0, "ahb", &sc->rst_ahb); + if (rv != 0) + return (0); + rv = hwreset_deassert(sc->rst_ahb); + if (rv != 0) { + device_printf(sc->dev, "could not de-assert AHB reset\n"); + return (rv); } return (0); @@ -1654,10 +1682,20 @@ dwc_attach(device_t dev) if (OF_hasprop(sc->node, "snps,aal") == 1) aal = true; - if (IF_DWC_INIT(dev) != 0) - return (ENXIO); + error = clk_set_assigned(dev, ofw_bus_get_node(dev)); + if (error != 0) { + device_printf(dev, "clk_set_assigned failed\n"); + return (error); + } - if (dwc_clock_init(dev) != 0) + /* Enable main clock */ + if ((error = dwc_clock_init(sc)) != 0) + return (error); + /* De-assert main reset */ + if ((error = dwc_reset_deassert(sc)) != 0) + return (error); + + if (IF_DWC_INIT(dev) != 0) return (ENXIO); if (bus_alloc_resources(dev, dwc_spec, sc->res)) { diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 5992a652facb..2e34a311b0a7 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -36,13 +36,15 @@ #include +#include +#include + #include #include #include #include #include -#include #include #include "if_dwc_if.h" diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 7c8a6c2ab668..49cf5fef7808 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -38,16 +38,16 @@ #include #include -#include -#include -#include -#include - #include #include #include #include +#include +#include +#include +#include + #include "if_dwc_if.h" #include "syscon_if.h" @@ -130,6 +130,7 @@ struct if_dwc_rk_softc { clk_t aclk_mac; clk_t pclk_mac; clk_t clk_stmmaceth; + clk_t clk_mac_speed; /* RMII clocks */ clk_t clk_mac_ref; clk_t clk_mac_refout; @@ -391,26 +392,10 @@ static int if_dwc_rk_init_clocks(device_t dev) { struct if_dwc_rk_softc *sc; - int error; sc = device_get_softc(dev); - error = clk_set_assigned(dev, ofw_bus_get_node(dev)); - if (error != 0) { - device_printf(dev, "clk_set_assigned failed\n"); - return (error); - } /* Enable clocks */ - error = clk_get_by_ofw_name(dev, 0, "stmmaceth", &sc->clk_stmmaceth); - if (error != 0) { - device_printf(dev, "could not find clock stmmaceth\n"); - return (error); - } - - if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &sc->mac_clk_rx) != 0) { - device_printf(sc->base.dev, "could not get mac_clk_rx clock\n"); - sc->mac_clk_rx = NULL; - } if (clk_get_by_ofw_name(dev, 0, "mac_clk_tx", &sc->mac_clk_tx) != 0) { device_printf(sc->base.dev, "could not get mac_clk_tx clock\n"); @@ -427,7 +412,15 @@ if_dwc_rk_init_clocks(device_t dev) sc->pclk_mac = NULL; } - if (sc->base.phy_mode == PHY_MODE_RGMII) { + /* Optional clock */ + clk_get_by_ofw_name(dev, 0, "clk_mac_speed", &sc->clk_mac_speed); + + if (sc->base.phy_mode == PHY_MODE_RMII) { + if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &sc->mac_clk_rx) != 0) { + device_printf(sc->base.dev, "could not get mac_clk_rx clock\n"); + sc->mac_clk_rx = NULL; + } + if (clk_get_by_ofw_name(dev, 0, "clk_mac_ref", &sc->clk_mac_ref) != 0) { device_printf(sc->base.dev, "could not get clk_mac_ref clock\n"); sc->clk_mac_ref = NULL; @@ -470,6 +463,8 @@ if_dwc_rk_init_clocks(device_t dev) clk_enable(sc->pclk_mac); if (sc->mac_clk_tx) clk_enable(sc->mac_clk_tx); + if (sc->clk_mac_speed) + clk_enable(sc->clk_mac_speed); DELAY(50); diff --git a/sys/dev/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c index ac8c78326df7..63a19ed12977 100644 --- a/sys/dev/dwc/if_dwc_socfpga.c +++ b/sys/dev/dwc/if_dwc_socfpga.c @@ -42,6 +42,9 @@ #include +#include +#include + #include #include #include diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index 5e5792974560..da31fa8c6575 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -76,6 +76,12 @@ struct dwc_softc { int stats_harvest_count; int phy_mode; + /* clocks and reset */ + clk_t clk_stmmaceth; + clk_t clk_pclk; + hwreset_t rst_stmmaceth; + hwreset_t rst_ahb; + /* RX */ bus_dma_tag_t rxdesc_tag; bus_dmamap_t rxdesc_map; From nobody Thu Oct 5 15:35:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGX55vRz4vnYq; Thu, 5 Oct 2023 15:35:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGX4dykz4cgF; Thu, 5 Oct 2023 15:35:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gi4FjAOqSwqRTm2Xq/zSFO3gYCio2ThCEkYwIF0vR3M=; b=x8WOE+ClGs3e0qxc1sCv1ebfar1mvRLvkh3yuvI2f8s1TudCJ/sJCcIj+HGEKxcHsJNqhP K63DbI+RTljRXQ1lsyIlF4aQmJ9Uz7WCBsfVakJkYazCY8X4ghoaxQQ0OGYk5QlTMUahG2 DZScgXQHgz0Oey5sADXBIYV/vJl6rLXprRHrJgXaLFi9CkXC9IrsiEdXWztyGnYKSD9brK mxzI1kxABEdEBKdgUffCvn71l44JdSgOiB+y9v98/55eDyxKGB+z7k2Tbuf0wcdMnWpBHL V8g1oYcK66ceyLy+dt2pxt0ryJUL+nsNpwJ2V7ayoLZ5+o4i4BcCJ3UO8GUm5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520100; a=rsa-sha256; cv=none; b=wuHaHg7oiiN2YgRQFyR2M5+nHaGqK3yiBbz2ClwdmjSu4I+qwgM0acrEegv8SbDGOjzgcz 1B67Y4U6bzsQeZv+B1j6WLMTfxW23WYHP/MnNmae5le8xxzHHpMfeLG/mpCoMaPOm2K/lG sLteUvn9BYUlau4kUq7t+nQ/zEygMAGK0gdURuhWQLwzpzpbvShgvv7AEHFyxtmXiDonE6 gf//za9Lz1Fyp8Bc2W6WB5viUCx9SSDlaE2rNgo3Knr6rh+xZI0vzxXAB1BmUzUuFtOuXa a2W0d1R2hiFaL+sMETjv9tS6wMw9utdz15u/pEwZfqRwxwf/rsiM14IEasHpmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gi4FjAOqSwqRTm2Xq/zSFO3gYCio2ThCEkYwIF0vR3M=; b=c/lCdvR2EQxy8mG+CtqDhNsgmM+7vYs/sdU1V5msBOv8mPVhxo1USiHYXsEYjNcgTP16/o 5+sNqYd/6q+tIM9/I0ZzjW5DOxoacAFYjlJGEDDhi+ix5kyIMfJirc2DqD/MDEeyTjBzXh TOnvN6C1Hr1e0YEXyW8MW5w2WwGQOB2ZwS7FjUlHuLiM9hliLtjgzNWl/HE+9wchzlaW1n NIrz3WYCM3JdCZG/Evwqk/LIURZdPDcTIYj5Le8/elRtRemJnrIy3wnj3m8rps/Bm3wOvL jk7FaukRh7kC1UVeghRmWBgn22hzs2qrUCTkSAf0erGVv3dk74ubpXSEMo2xXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGX3f0Fz1Q6y; Thu, 5 Oct 2023 15:35:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ09h012305; Thu, 5 Oct 2023 15:35:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ0Mo012302; Thu, 5 Oct 2023 15:35:00 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:00 GMT Message-Id: <202310051535.395FZ0Mo012302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 9e3879fcc111 - main - dwc: Drop 'All rights reserved' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e3879fcc11152ad52b13221cd488d40c89a40e9 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=9e3879fcc11152ad52b13221cd488d40c89a40e9 commit 9e3879fcc11152ad52b13221cd488d40c89a40e9 Author: Emmanuel Vadot AuthorDate: 2023-09-26 17:26:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Drop 'All rights reserved' Discussed with: br --- sys/dev/dwc/if_dwc.c | 1 - sys/dev/dwc/if_dwc_if.m | 1 - sys/dev/dwc/if_dwcvar.h | 1 - 3 files changed, 3 deletions(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 981e823a6fcc..6dca1e204c41 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 Ruslan Bukin - * All rights reserved. * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) diff --git a/sys/dev/dwc/if_dwc_if.m b/sys/dev/dwc/if_dwc_if.m index b8133ef898da..8e3a4196fdbf 100644 --- a/sys/dev/dwc/if_dwc_if.m +++ b/sys/dev/dwc/if_dwc_if.m @@ -1,7 +1,6 @@ #- # Copyright (c) 2015 Luiz Otavio O Souza # Copyright (c) 2014 Ruslan Bukin -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index da31fa8c6575..15bc3e25f0b7 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 Ruslan Bukin - * All rights reserved. * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) From nobody Thu Oct 5 15:35:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGY6wz7z4vnR8; Thu, 5 Oct 2023 15:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGY5s4zz4cgb; Thu, 5 Oct 2023 15:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkY4O1E3f4sK4vfCuFENKlTa7y0lI1gWvkW6t/8nquE=; b=rb/Aca8oFE8FeT3wIz1/bU+qm74Q91xb6n7Ebz+wdRSP4GDLykUQq5G5sPXXsTYwKb90S8 PGs1eQeILqzyetkVU+aUk3WoI2imfO3Kdfn4AmBXqlFtkoQ99yKTaOmQN+sEGzwvN90o5w +4fOlKciVzvWfIA67J8RJXjB2+qL38ISIeu4fXgDzMn35OckXwql53S5SQgoNcIESPiY6G wvSY3t4hooUSHORDTTsWAXVabNsaH5kBCnUJJjhGgCZE5auvvQD106KHJEqGTwtwutLsn0 rlpubyFeK/5oS0qqovlLgvwzyi+vdSIlysCzf7fKsqB+umlKinLbqezpnHa+nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520101; a=rsa-sha256; cv=none; b=P9fIBGI3axkBTFCQSGg5Fe8ZrLewgTsKAwBGA/F4ByQ6TQ846wbsjA/3cLZft0r7Y0kaiM deC3nFTDMfbZtLHatKFT9sRrTzNtBAitD/iFI61bKfgOpw8JRpWb34nlR3ZvTrgHm/+36f lXdg7HcZ5nKDLiwGbqtJpdiiVuBa+9uLBaumFdC/W2RhUcnVPPpCo/x1UUkPf2r7hgfgMP UnrNaTQcgn7zTCTOpEatVknRmdh8FLoCPhVbD5yYQ80EVgqpxZ4JllauBx7wSnb23g+orn eumwytH1geWVFUljAI1MhNgAavcsQv1kx52Cob7nnkMSkj3FRvU5MvFHHBGilw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vkY4O1E3f4sK4vfCuFENKlTa7y0lI1gWvkW6t/8nquE=; b=BbuqAVNiwXdkkGDFa6+y5/bI6NbJFlEDwoUKgb6RNIOr3LjfhFfajyEMUNzjZ+qTh+E1ah om0QtVo1G2ZtumWVkpB7Z7S4Q6KEDpfDV0iqQFJGWfnuP46i/KVjR/Dee3jAhENdLDT/hB ZE7piRkkGjb/cgdjywR0T/1WghhuxRSUuB881X041zFHD+igytaYFA6wP29LFHLICgo0Ze TgmkLXjm6xSWtdkg1ZAUI91LPWZqDky/3vYzQ+nUtmM+g+7haSWjJ/EHdtuRRUDd0mDI8I 5ozNexxXYS7YuUBwia5wia6rtwenWjZMyYJxtjiHHr5iTHBpYD775LXQEdbdgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGY4tz6z1QJh; Thu, 5 Oct 2023 15:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ1es012347; Thu, 5 Oct 2023 15:35:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ1ef012344; Thu, 5 Oct 2023 15:35:01 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:01 GMT Message-Id: <202310051535.395FZ1ef012344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: c36125f6cc8b - main - dwc: Rename if_dwc.h to dwc1000_reg.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c36125f6cc8b3577f913da757ae588dd357a765c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c36125f6cc8b3577f913da757ae588dd357a765c commit c36125f6cc8b3577f913da757ae588dd357a765c Author: Emmanuel Vadot AuthorDate: 2023-09-25 17:56:31 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Rename if_dwc.h to dwc1000_reg.h Synopsis/Designware controller have multiple version. The version currently supported by dwc(4) is the version 3 and it's usually called 1000 for gigabit. This file only have definition for the registers of this version so rename it. No functional changes intended. --- sys/dev/dwc/{if_dwc.h => dwc1000_reg.h} | 7 +++---- sys/dev/dwc/if_dwc.c | 5 +++-- sys/dev/dwc/if_dwc_aw.c | 13 +++++++------ sys/dev/dwc/if_dwc_if.m | 2 +- sys/dev/dwc/if_dwc_rk.c | 7 ++++--- sys/dev/dwc/if_dwc_socfpga.c | 7 ++++--- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/sys/dev/dwc/if_dwc.h b/sys/dev/dwc/dwc1000_reg.h similarity index 99% rename from sys/dev/dwc/if_dwc.h rename to sys/dev/dwc/dwc1000_reg.h index be27b189e4e8..1f0957b688ac 100644 --- a/sys/dev/dwc/if_dwc.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 Ruslan Bukin - * All rights reserved. * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) @@ -32,8 +31,8 @@ * Register names were taken almost as is from the documentation. */ -#ifndef __IF_DWC_H__ -#define __IF_DWC_H__ +#ifndef __DWC1000_REG_H__ +#define __DWC1000_REG_H__ #define PHY_MODE_UNKNOWN 0x0 #define PHY_MODE_RMII 0x1 @@ -302,4 +301,4 @@ #define GMAC_MII_CLK_DIV16 0xe #define GMAC_MII_CLK_DIV18 0xf -#endif /* __IF_DWC_H__ */ +#endif /* __DWC1000_REG_H__ */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 6dca1e204c41..86e00c76a1be 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -63,14 +63,15 @@ #include #include -#include -#include #include #include #include #include #include +#include +#include + #include "if_dwc_if.h" #include "gpio_if.h" #include "miibus_if.h" diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 2e34a311b0a7..e6cf30f91fc3 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -36,17 +36,18 @@ #include -#include -#include - -#include -#include #include #include -#include +#include +#include #include +#include + +#include +#include + #include "if_dwc_if.h" static int diff --git a/sys/dev/dwc/if_dwc_if.m b/sys/dev/dwc/if_dwc_if.m index 8e3a4196fdbf..0d0d9ee114f7 100644 --- a/sys/dev/dwc/if_dwc_if.m +++ b/sys/dev/dwc/if_dwc_if.m @@ -27,7 +27,7 @@ INTERFACE if_dwc; -#include +#include CODE { static int diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 49cf5fef7808..d05352a27793 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -38,15 +38,16 @@ #include #include +#include +#include + #include #include #include #include -#include #include -#include -#include +#include #include "if_dwc_if.h" #include "syscon_if.h" diff --git a/sys/dev/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c index 63a19ed12977..7b4ead1a940c 100644 --- a/sys/dev/dwc/if_dwc_socfpga.c +++ b/sys/dev/dwc/if_dwc_socfpga.c @@ -42,13 +42,14 @@ #include +#include +#include + #include #include -#include #include -#include -#include +#include #include "if_dwc_if.h" From nobody Thu Oct 5 15:35:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGb0jhCz4vnYv; Thu, 5 Oct 2023 15:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGZ65g8z4cy2; Thu, 5 Oct 2023 15:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JvErCHnBCnFR9/LQas5qk4WUWaKuAjRXBxl7TNNQolI=; b=pSEWeIAEZvm0JSFZCYj7PTiLrLrH6ydlcOv4QYQ1K2vcq725DIAICi0BMB2+xAJiN1Yf/7 HebRdMqHxR0VvzBkprXg+0uNmnkxmFtZjTMVp1pm0Q7LicSy6JOC0H16UWT1w7F6Xttui4 ls3HLofqsGHaXLTpnLtVtEalnrpEVbBcjvMUCkLSrXDHa4YqvXnxRCjX76Kr1MP/hKWjAn uiCdWajg1NCloyCSeREGNCghf9MH6pZyRtGgHEX+gtjJx8Lzgn4X1BySLZ1g543BEGSyFF nCSptacgVCse/CNtvgj19uMoWKcXx5Szq/I6LkV9fWeyuY0qmGnYcpP05sV+1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520102; a=rsa-sha256; cv=none; b=WHwBFFFnv63DVyO8sQc9NPv2+483cYlrTX6aORpDtN6mSKzR/uYuXejW6ceMVl5EqNTzn8 +TdwGI5oD3enyWIvBWxwUoySN/cCOKmBzI/xzsuVt1D2hPFRxiuanGz828qNJec3VBarCH xjaus5HbcbuUWMZs4aVTyZhWCuOc1ZLheAEG6nGxrFOAA99YqnDQNxcKmp4C6F7Tu0bpIP hRpuYSUPloXvB/PDATLHsRkSdcC1rA3ilM9HLzitq4gXngK2VZcnxC8dpZ0wmVuxrz0HDY ViFZPpJ4yz5T5k7LZrflyboxVuiPwb0bcLHCEFkO81ucR5uOrQGAhY+uEqKHWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JvErCHnBCnFR9/LQas5qk4WUWaKuAjRXBxl7TNNQolI=; b=mf/urha6M6RvSEblhsJHY0Myz7QF7Kot3cgUGIGf5guEF2etb+ZhkD8ANjLK0ZK6YD77zM NTBRykVbRxNvdTBMfxwlvUfIlSr8nPjGM0Pc6LiUPXdDPxSZB8wnKkVFlFwl0SC/JToEMH R+yneB15ZeYE7ABGqDwRiVHhFdhYvA2nGZQwDAyVPcnmvYh5ATaJ2FIC7hExG3ZssE1Pni CZ8ECbotHJ1/x49eBiHazPx6iC9JCBYNKjIhc5Egmql20We3wEpZpwMfzGdgC5LucI8707 +vbyXampdGAgqsGeF05RiCZ+GMLrPMnzUFBjZDlANABaBOSzqXkB+3GYjntp3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGZ5B99z1QCT; Thu, 5 Oct 2023 15:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ2Pl012387; Thu, 5 Oct 2023 15:35:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ2MU012384; Thu, 5 Oct 2023 15:35:02 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:02 GMT Message-Id: <202310051535.395FZ2MU012384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 972adf0f97ac - main - dwc: Split dma functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 972adf0f97ac5e2f3a6024c25623a908403aff9b Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=972adf0f97ac5e2f3a6024c25623a908403aff9b commit 972adf0f97ac5e2f3a6024c25623a908403aff9b Author: Emmanuel Vadot AuthorDate: 2023-09-28 18:40:55 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Split dma functions Synopsis/Designware controller have multiple dma version, the one included in the driver is the base one. if_awg is one example of a dwc variant that have another DMA controller. eqos is a newer variant of dwc that have a newer dma controller. In the goal to support all of those in the same base driver start splitting the dma function to a new file. No functional changes intended. --- sys/conf/files.arm | 1 + sys/conf/files.arm64 | 1 + sys/dev/dwc/dwc1000_dma.c | 668 +++++++++++++++++++++++++++++++++++++++++ sys/dev/dwc/dwc1000_dma.h | 160 ++++++++++ sys/dev/dwc/if_dwc.c | 751 +--------------------------------------------- sys/dev/dwc/if_dwcvar.h | 10 + 6 files changed, 850 insertions(+), 741 deletions(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 344dada420c9..d47f2b7a78e8 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -88,6 +88,7 @@ crypto/des/des_enc.c optional netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dwc/if_dwc.c optional dwc dev/dwc/if_dwc_if.m optional dwc +dev/dwc/dwc1000_dma.c optional dwc dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/video/crtc_if.m optional vt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index eaf4577ee14e..b9e690d2ca50 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -227,6 +227,7 @@ dev/dpaa2/memac_mdio_if.m optional soc_nxp_ls dpaa2 acpi | soc_nxp_ls dpaa2 fd # Synopsys DesignWare Ethernet Controller dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 +dev/dwc/dwc1000_dma.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c new file mode 100644 index 000000000000..a04f65de8501 --- /dev/null +++ b/sys/dev/dwc/dwc1000_dma.c @@ -0,0 +1,668 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include +#include +#include + +static inline uint32_t +next_rxidx(struct dwc_softc *sc, uint32_t curidx) +{ + + return ((curidx + 1) % RX_DESC_COUNT); +} + +static void +dwc_get1paddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + + if (error != 0) + return; + *(bus_addr_t *)arg = segs[0].ds_addr; +} + +inline static void +dwc_set_owner(struct dwc_softc *sc, int idx) +{ + wmb(); + sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; + wmb(); +} + +inline static void +dwc_setup_txdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr, + uint32_t len, uint32_t flags, bool first, bool last) +{ + uint32_t desc0, desc1; + + /* Addr/len 0 means we're clearing the descriptor after xmit done. */ + if (paddr == 0 || len == 0) { + desc0 = 0; + desc1 = 0; + --sc->tx_desccount; + } else { + if (sc->mactype != DWC_GMAC_EXT_DESC) { + desc0 = 0; + desc1 = NTDESC1_TCH | len | flags; + if (first) + desc1 |= NTDESC1_FS; + if (last) + desc1 |= NTDESC1_LS | NTDESC1_IC; + } else { + desc0 = ETDESC0_TCH | flags; + if (first) + desc0 |= ETDESC0_FS; + if (last) + desc0 |= ETDESC0_LS | ETDESC0_IC; + desc1 = len; + } + ++sc->tx_desccount; + } + + sc->txdesc_ring[idx].addr1 = (uint32_t)(paddr); + sc->txdesc_ring[idx].desc0 = desc0; + sc->txdesc_ring[idx].desc1 = desc1; +} + +inline static uint32_t +dwc_setup_rxdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr) +{ + uint32_t nidx; + + sc->rxdesc_ring[idx].addr1 = (uint32_t)paddr; + nidx = next_rxidx(sc, idx); + sc->rxdesc_ring[idx].addr2 = sc->rxdesc_ring_paddr + + (nidx * sizeof(struct dwc_hwdesc)); + if (sc->mactype != DWC_GMAC_EXT_DESC) + sc->rxdesc_ring[idx].desc1 = NRDESC1_RCH | + MIN(MCLBYTES, NRDESC1_RBS1_MASK); + else + sc->rxdesc_ring[idx].desc1 = ERDESC1_RCH | + MIN(MCLBYTES, ERDESC1_RBS1_MASK); + + wmb(); + sc->rxdesc_ring[idx].desc0 = RDESC0_OWN; + wmb(); + return (nidx); +} + +int +dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp) +{ + struct bus_dma_segment segs[TX_MAP_MAX_SEGS]; + int error, nsegs; + struct mbuf * m; + uint32_t flags = 0; + int i; + int first, last; + + error = bus_dmamap_load_mbuf_sg(sc->txbuf_tag, sc->txbuf_map[idx].map, + *mp, segs, &nsegs, 0); + if (error == EFBIG) { + /* + * The map may be partially mapped from the first call. + * Make sure to reset it. + */ + bus_dmamap_unload(sc->txbuf_tag, sc->txbuf_map[idx].map); + if ((m = m_defrag(*mp, M_NOWAIT)) == NULL) + return (ENOMEM); + *mp = m; + error = bus_dmamap_load_mbuf_sg(sc->txbuf_tag, sc->txbuf_map[idx].map, + *mp, segs, &nsegs, 0); + } + if (error != 0) + return (ENOMEM); + + if (sc->tx_desccount + nsegs > TX_DESC_COUNT) { + bus_dmamap_unload(sc->txbuf_tag, sc->txbuf_map[idx].map); + return (ENOMEM); + } + + m = *mp; + + if ((m->m_pkthdr.csum_flags & CSUM_IP) != 0) { + if ((m->m_pkthdr.csum_flags & (CSUM_TCP|CSUM_UDP)) != 0) { + if (sc->mactype != DWC_GMAC_EXT_DESC) + flags = NTDESC1_CIC_FULL; + else + flags = ETDESC0_CIC_FULL; + } else { + if (sc->mactype != DWC_GMAC_EXT_DESC) + flags = NTDESC1_CIC_HDR; + else + flags = ETDESC0_CIC_HDR; + } + } + + bus_dmamap_sync(sc->txbuf_tag, sc->txbuf_map[idx].map, + BUS_DMASYNC_PREWRITE); + + sc->txbuf_map[idx].mbuf = m; + + first = sc->tx_desc_head; + for (i = 0; i < nsegs; i++) { + dwc_setup_txdesc(sc, sc->tx_desc_head, + segs[i].ds_addr, segs[i].ds_len, + (i == 0) ? flags : 0, /* only first desc needs flags */ + (i == 0), + (i == nsegs - 1)); + if (i > 0) + dwc_set_owner(sc, sc->tx_desc_head); + last = sc->tx_desc_head; + sc->tx_desc_head = next_txidx(sc, sc->tx_desc_head); + } + + sc->txbuf_map[idx].last_desc_idx = last; + + dwc_set_owner(sc, first); + + return (0); +} + +static int +dma1000_setup_rxbuf(struct dwc_softc *sc, int idx, struct mbuf *m) +{ + struct bus_dma_segment seg; + int error, nsegs; + + m_adj(m, ETHER_ALIGN); + + error = bus_dmamap_load_mbuf_sg(sc->rxbuf_tag, sc->rxbuf_map[idx].map, + m, &seg, &nsegs, 0); + if (error != 0) + return (error); + + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + bus_dmamap_sync(sc->rxbuf_tag, sc->rxbuf_map[idx].map, + BUS_DMASYNC_PREREAD); + + sc->rxbuf_map[idx].mbuf = m; + dwc_setup_rxdesc(sc, idx, seg.ds_addr); + + return (0); +} + +static struct mbuf * +dwc_alloc_mbufcl(struct dwc_softc *sc) +{ + struct mbuf *m; + + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (m != NULL) + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + + return (m); +} + +static struct mbuf * +dwc_rxfinish_one(struct dwc_softc *sc, struct dwc_hwdesc *desc, + struct dwc_bufmap *map) +{ + if_t ifp; + struct mbuf *m, *m0; + int len; + uint32_t rdesc0; + + m = map->mbuf; + ifp = sc->ifp; + rdesc0 = desc ->desc0; + + if ((rdesc0 & (RDESC0_FS | RDESC0_LS)) != + (RDESC0_FS | RDESC0_LS)) { + /* + * Something very wrong happens. The whole packet should be + * recevied in one descriptr. Report problem. + */ + device_printf(sc->dev, + "%s: RX descriptor without FIRST and LAST bit set: 0x%08X", + __func__, rdesc0); + return (NULL); + } + + len = (rdesc0 >> RDESC0_FL_SHIFT) & RDESC0_FL_MASK; + if (len < 64) { + /* + * Lenght is invalid, recycle old mbuf + * Probably impossible case + */ + return (NULL); + } + + /* Allocate new buffer */ + m0 = dwc_alloc_mbufcl(sc); + if (m0 == NULL) { + /* no new mbuf available, recycle old */ + if_inc_counter(sc->ifp, IFCOUNTER_IQDROPS, 1); + return (NULL); + } + /* Do dmasync for newly received packet */ + bus_dmamap_sync(sc->rxbuf_tag, map->map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->rxbuf_tag, map->map); + + /* Received packet is valid, process it */ + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = len; + m->m_len = len; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + + if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0 && + (rdesc0 & RDESC0_FT) != 0) { + m->m_pkthdr.csum_flags = CSUM_IP_CHECKED; + if ((rdesc0 & RDESC0_ICE) == 0) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; + if ((rdesc0 & RDESC0_PCE) == 0) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } + + /* Remove trailing FCS */ + m_adj(m, -ETHER_CRC_LEN); + + DWC_UNLOCK(sc); + if_input(ifp, m); + DWC_LOCK(sc); + return (m0); +} + +void +dma1000_txfinish_locked(struct dwc_softc *sc) +{ + struct dwc_bufmap *bmap; + struct dwc_hwdesc *desc; + if_t ifp; + int idx, last_idx; + bool map_finished; + + DWC_ASSERT_LOCKED(sc); + + ifp = sc->ifp; + /* check if all descriptors of the map are done */ + while (sc->tx_map_tail != sc->tx_map_head) { + map_finished = true; + bmap = &sc->txbuf_map[sc->tx_map_tail]; + idx = sc->tx_desc_tail; + last_idx = next_txidx(sc, bmap->last_desc_idx); + while (idx != last_idx) { + desc = &sc->txdesc_ring[idx]; + if ((desc->desc0 & TDESC0_OWN) != 0) { + map_finished = false; + break; + } + idx = next_txidx(sc, idx); + } + + if (!map_finished) + break; + bus_dmamap_sync(sc->txbuf_tag, bmap->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->txbuf_tag, bmap->map); + m_freem(bmap->mbuf); + bmap->mbuf = NULL; + sc->tx_mapcount--; + while (sc->tx_desc_tail != last_idx) { + dwc_setup_txdesc(sc, sc->tx_desc_tail, 0, 0, 0, false, false); + sc->tx_desc_tail = next_txidx(sc, sc->tx_desc_tail); + } + sc->tx_map_tail = next_txidx(sc, sc->tx_map_tail); + if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + } + + /* If there are no buffers outstanding, muzzle the watchdog. */ + if (sc->tx_desc_tail == sc->tx_desc_head) { + sc->tx_watchdog_count = 0; + } +} + +void +dma1000_rxfinish_locked(struct dwc_softc *sc) +{ + struct mbuf *m; + int error, idx; + struct dwc_hwdesc *desc; + + DWC_ASSERT_LOCKED(sc); + for (;;) { + idx = sc->rx_idx; + desc = sc->rxdesc_ring + idx; + if ((desc->desc0 & RDESC0_OWN) != 0) + break; + + m = dwc_rxfinish_one(sc, desc, sc->rxbuf_map + idx); + if (m == NULL) { + wmb(); + desc->desc0 = RDESC0_OWN; + wmb(); + } else { + /* We cannot create hole in RX ring */ + error = dma1000_setup_rxbuf(sc, idx, m); + if (error != 0) + panic("dma1000_setup_rxbuf failed: error %d\n", + error); + + } + sc->rx_idx = next_rxidx(sc, sc->rx_idx); + } +} + +/* + * Start the DMA controller + */ +void +dma1000_start(struct dwc_softc *sc) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + + /* Initializa DMA and enable transmitters */ + reg = READ4(sc, OPERATION_MODE); + reg |= (MODE_TSF | MODE_OSF | MODE_FUF); + reg &= ~(MODE_RSF); + reg |= (MODE_RTC_LEV32 << MODE_RTC_SHIFT); + WRITE4(sc, OPERATION_MODE, reg); + + WRITE4(sc, INTERRUPT_ENABLE, INT_EN_DEFAULT); + + /* Start DMA */ + reg = READ4(sc, OPERATION_MODE); + reg |= (MODE_ST | MODE_SR); + WRITE4(sc, OPERATION_MODE, reg); +} + +/* + * Stop the DMA controller + */ +void +dma1000_stop(struct dwc_softc *sc) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + + /* Stop DMA TX */ + reg = READ4(sc, OPERATION_MODE); + reg &= ~(MODE_ST); + WRITE4(sc, OPERATION_MODE, reg); + + /* Flush TX */ + reg = READ4(sc, OPERATION_MODE); + reg |= (MODE_FTF); + WRITE4(sc, OPERATION_MODE, reg); + + /* Stop DMA RX */ + reg = READ4(sc, OPERATION_MODE); + reg &= ~(MODE_SR); + WRITE4(sc, OPERATION_MODE, reg); +} + +/* + * Create the bus_dma resources + */ +int +dma1000_init(struct dwc_softc *sc) +{ + struct mbuf *m; + int error; + int nidx; + int idx; + + /* + * Set up TX descriptor ring, descriptors, and dma maps. + */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag. */ + DWC_DESC_RING_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + TX_DESC_SIZE, 1, /* maxsize, nsegments */ + TX_DESC_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->txdesc_tag); + if (error != 0) { + device_printf(sc->dev, + "could not create TX ring DMA tag.\n"); + goto out; + } + + error = bus_dmamem_alloc(sc->txdesc_tag, (void**)&sc->txdesc_ring, + BUS_DMA_COHERENT | BUS_DMA_WAITOK | BUS_DMA_ZERO, + &sc->txdesc_map); + if (error != 0) { + device_printf(sc->dev, + "could not allocate TX descriptor ring.\n"); + goto out; + } + + error = bus_dmamap_load(sc->txdesc_tag, sc->txdesc_map, + sc->txdesc_ring, TX_DESC_SIZE, dwc_get1paddr, + &sc->txdesc_ring_paddr, 0); + if (error != 0) { + device_printf(sc->dev, + "could not load TX descriptor ring map.\n"); + goto out; + } + + for (idx = 0; idx < TX_DESC_COUNT; idx++) { + nidx = next_txidx(sc, idx); + sc->txdesc_ring[idx].addr2 = sc->txdesc_ring_paddr + + (nidx * sizeof(struct dwc_hwdesc)); + } + + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag. */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES*TX_MAP_MAX_SEGS, /* maxsize */ + TX_MAP_MAX_SEGS, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->txbuf_tag); + if (error != 0) { + device_printf(sc->dev, + "could not create TX ring DMA tag.\n"); + goto out; + } + + for (idx = 0; idx < TX_MAP_COUNT; idx++) { + error = bus_dmamap_create(sc->txbuf_tag, BUS_DMA_COHERENT, + &sc->txbuf_map[idx].map); + if (error != 0) { + device_printf(sc->dev, + "could not create TX buffer DMA map.\n"); + goto out; + } + } + + for (idx = 0; idx < TX_DESC_COUNT; idx++) + dwc_setup_txdesc(sc, idx, 0, 0, 0, false, false); + + /* + * Set up RX descriptor ring, descriptors, dma maps, and mbufs. + */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag. */ + DWC_DESC_RING_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + RX_DESC_SIZE, 1, /* maxsize, nsegments */ + RX_DESC_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->rxdesc_tag); + if (error != 0) { + device_printf(sc->dev, + "could not create RX ring DMA tag.\n"); + goto out; + } + + error = bus_dmamem_alloc(sc->rxdesc_tag, (void **)&sc->rxdesc_ring, + BUS_DMA_COHERENT | BUS_DMA_WAITOK | BUS_DMA_ZERO, + &sc->rxdesc_map); + if (error != 0) { + device_printf(sc->dev, + "could not allocate RX descriptor ring.\n"); + goto out; + } + + error = bus_dmamap_load(sc->rxdesc_tag, sc->rxdesc_map, + sc->rxdesc_ring, RX_DESC_SIZE, dwc_get1paddr, + &sc->rxdesc_ring_paddr, 0); + if (error != 0) { + device_printf(sc->dev, + "could not load RX descriptor ring map.\n"); + goto out; + } + + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* Parent tag. */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, 1, /* maxsize, nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->rxbuf_tag); + if (error != 0) { + device_printf(sc->dev, + "could not create RX buf DMA tag.\n"); + goto out; + } + + for (idx = 0; idx < RX_DESC_COUNT; idx++) { + error = bus_dmamap_create(sc->rxbuf_tag, BUS_DMA_COHERENT, + &sc->rxbuf_map[idx].map); + if (error != 0) { + device_printf(sc->dev, + "could not create RX buffer DMA map.\n"); + goto out; + } + if ((m = dwc_alloc_mbufcl(sc)) == NULL) { + device_printf(sc->dev, "Could not alloc mbuf\n"); + error = ENOMEM; + goto out; + } + if ((error = dma1000_setup_rxbuf(sc, idx, m)) != 0) { + device_printf(sc->dev, + "could not create new RX buffer.\n"); + goto out; + } + } + +out: + if (error != 0) + return (ENXIO); + + return (0); +} + +/* + * Free the bus_dma resources + */ +void +dma1000_free(struct dwc_softc *sc) +{ + bus_dmamap_t map; + int idx; + + /* Clean up RX DMA resources and free mbufs. */ + for (idx = 0; idx < RX_DESC_COUNT; ++idx) { + if ((map = sc->rxbuf_map[idx].map) != NULL) { + bus_dmamap_unload(sc->rxbuf_tag, map); + bus_dmamap_destroy(sc->rxbuf_tag, map); + m_freem(sc->rxbuf_map[idx].mbuf); + } + } + if (sc->rxbuf_tag != NULL) + bus_dma_tag_destroy(sc->rxbuf_tag); + if (sc->rxdesc_map != NULL) { + bus_dmamap_unload(sc->rxdesc_tag, sc->rxdesc_map); + bus_dmamem_free(sc->rxdesc_tag, sc->rxdesc_ring, + sc->rxdesc_map); + } + if (sc->rxdesc_tag != NULL) + bus_dma_tag_destroy(sc->rxdesc_tag); + + /* Clean up TX DMA resources. */ + for (idx = 0; idx < TX_DESC_COUNT; ++idx) { + if ((map = sc->txbuf_map[idx].map) != NULL) { + /* TX maps are already unloaded. */ + bus_dmamap_destroy(sc->txbuf_tag, map); + } + } + if (sc->txbuf_tag != NULL) + bus_dma_tag_destroy(sc->txbuf_tag); + if (sc->txdesc_map != NULL) { + bus_dmamap_unload(sc->txdesc_tag, sc->txdesc_map); + bus_dmamem_free(sc->txdesc_tag, sc->txdesc_ring, + sc->txdesc_map); + } + if (sc->txdesc_tag != NULL) + bus_dma_tag_destroy(sc->txdesc_tag); +} diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h new file mode 100644 index 000000000000..613faeee91ff --- /dev/null +++ b/sys/dev/dwc/dwc1000_dma.h @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __DWC1000_DMA_H__ +#define __DWC1000_DMA_H__ + +/* TX descriptors - TDESC0 is almost unified */ +#define TDESC0_OWN (1U << 31) +#define TDESC0_IHE (1U << 16) /* IP Header Error */ +#define TDESC0_ES (1U << 15) /* Error Summary */ +#define TDESC0_JT (1U << 14) /* Jabber Timeout */ +#define TDESC0_FF (1U << 13) /* Frame Flushed */ +#define TDESC0_PCE (1U << 12) /* Payload Checksum Error */ +#define TDESC0_LOC (1U << 11) /* Loss of Carrier */ +#define TDESC0_NC (1U << 10) /* No Carrier */ +#define TDESC0_LC (1U << 9) /* Late Collision */ +#define TDESC0_EC (1U << 8) /* Excessive Collision */ +#define TDESC0_VF (1U << 7) /* VLAN Frame */ +#define TDESC0_CC_MASK 0xf +#define TDESC0_CC_SHIFT 3 /* Collision Count */ +#define TDESC0_ED (1U << 2) /* Excessive Deferral */ +#define TDESC0_UF (1U << 1) /* Underflow Error */ +#define TDESC0_DB (1U << 0) /* Deferred Bit */ +/* TX descriptors - TDESC0 extended format only */ +#define ETDESC0_IC (1U << 30) /* Interrupt on Completion */ +#define ETDESC0_LS (1U << 29) /* Last Segment */ +#define ETDESC0_FS (1U << 28) /* First Segment */ +#define ETDESC0_DC (1U << 27) /* Disable CRC */ +#define ETDESC0_DP (1U << 26) /* Disable Padding */ +#define ETDESC0_CIC_NONE (0U << 22) /* Checksum Insertion Control */ +#define ETDESC0_CIC_HDR (1U << 22) +#define ETDESC0_CIC_SEG (2U << 22) +#define ETDESC0_CIC_FULL (3U << 22) +#define ETDESC0_TER (1U << 21) /* Transmit End of Ring */ +#define ETDESC0_TCH (1U << 20) /* Second Address Chained */ + +/* TX descriptors - TDESC1 normal format */ +#define NTDESC1_IC (1U << 31) /* Interrupt on Completion */ +#define NTDESC1_LS (1U << 30) /* Last Segment */ +#define NTDESC1_FS (1U << 29) /* First Segment */ +#define NTDESC1_CIC_NONE (0U << 27) /* Checksum Insertion Control */ +#define NTDESC1_CIC_HDR (1U << 27) +#define NTDESC1_CIC_SEG (2U << 27) +#define NTDESC1_CIC_FULL (3U << 27) +#define NTDESC1_DC (1U << 26) /* Disable CRC */ +#define NTDESC1_TER (1U << 25) /* Transmit End of Ring */ +#define NTDESC1_TCH (1U << 24) /* Second Address Chained */ +/* TX descriptors - TDESC1 extended format */ +#define ETDESC1_DP (1U << 23) /* Disable Padding */ +#define ETDESC1_TBS2_MASK 0x7ff +#define ETDESC1_TBS2_SHIFT 11 /* Receive Buffer 2 Size */ +#define ETDESC1_TBS1_MASK 0x7ff +#define ETDESC1_TBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* RX descriptor - RDESC0 is unified */ +#define RDESC0_OWN (1U << 31) +#define RDESC0_AFM (1U << 30) /* Dest. Address Filter Fail */ +#define RDESC0_FL_MASK 0x3fff +#define RDESC0_FL_SHIFT 16 /* Frame Length */ +#define RDESC0_ES (1U << 15) /* Error Summary */ +#define RDESC0_DE (1U << 14) /* Descriptor Error */ +#define RDESC0_SAF (1U << 13) /* Source Address Filter Fail */ +#define RDESC0_LE (1U << 12) /* Length Error */ +#define RDESC0_OE (1U << 11) /* Overflow Error */ +#define RDESC0_VLAN (1U << 10) /* VLAN Tag */ +#define RDESC0_FS (1U << 9) /* First Descriptor */ +#define RDESC0_LS (1U << 8) /* Last Descriptor */ +#define RDESC0_ICE (1U << 7) /* IPC Checksum Error */ +#define RDESC0_LC (1U << 6) /* Late Collision */ +#define RDESC0_FT (1U << 5) /* Frame Type */ +#define RDESC0_RWT (1U << 4) /* Receive Watchdog Timeout */ +#define RDESC0_RE (1U << 3) /* Receive Error */ +#define RDESC0_DBE (1U << 2) /* Dribble Bit Error */ +#define RDESC0_CE (1U << 1) /* CRC Error */ +#define RDESC0_PCE (1U << 0) /* Payload Checksum Error */ +#define RDESC0_RXMA (1U << 0) /* Rx MAC Address */ + +/* RX descriptors - RDESC1 normal format */ +#define NRDESC1_DIC (1U << 31) /* Disable Intr on Completion */ +#define NRDESC1_RER (1U << 25) /* Receive End of Ring */ +#define NRDESC1_RCH (1U << 24) /* Second Address Chained */ +#define NRDESC1_RBS2_MASK 0x7ff +#define NRDESC1_RBS2_SHIFT 11 /* Receive Buffer 2 Size */ +#define NRDESC1_RBS1_MASK 0x7ff +#define NRDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* RX descriptors - RDESC1 enhanced format */ +#define ERDESC1_DIC (1U << 31) /* Disable Intr on Completion */ +#define ERDESC1_RBS2_MASK 0x7ffff +#define ERDESC1_RBS2_SHIFT 16 /* Receive Buffer 2 Size */ +#define ERDESC1_RER (1U << 15) /* Receive End of Ring */ +#define ERDESC1_RCH (1U << 14) /* Second Address Chained */ +#define ERDESC1_RBS1_MASK 0x7ffff +#define ERDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* + * A hardware buffer descriptor. Rx and Tx buffers have the same descriptor + * layout, but the bits in the fields have different meanings. + */ +struct dwc_hwdesc +{ + uint32_t desc0; + uint32_t desc1; + uint32_t addr1; /* ptr to first buffer data */ + uint32_t addr2; /* ptr to next descriptor / second buffer data*/ +}; + +struct dwc_hash_maddr_ctx { + struct dwc_softc *sc; + uint32_t hash[8]; +}; + +/* + * The hardware imposes alignment restrictions on various objects involved in + * DMA transfers. These values are expressed in bytes (not bits). + */ +#define DWC_DESC_RING_ALIGN 2048 + +int dma1000_init(struct dwc_softc *sc); +void dma1000_free(struct dwc_softc *sc); +void dma1000_start(struct dwc_softc *sc); +void dma1000_stop(struct dwc_softc *sc); +int dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp); +void dma1000_txfinish_locked(struct dwc_softc *sc); +void dma1000_rxfinish_locked(struct dwc_softc *sc); + +static inline uint32_t +next_txidx(struct dwc_softc *sc, uint32_t curidx) +{ + + return ((curidx + 1) % TX_DESC_COUNT); +} + +#endif /* __DWC1000_DMA_H__ */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 86e00c76a1be..c491106eacd0 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -69,154 +69,28 @@ #include #include -#include #include +#include +#include #include "if_dwc_if.h" #include "gpio_if.h" #include "miibus_if.h" -#define READ4(_sc, _reg) \ - bus_read_4((_sc)->res[0], _reg) -#define WRITE4(_sc, _reg, _val) \ - bus_write_4((_sc)->res[0], _reg, _val) - #define MAC_RESET_TIMEOUT 100 #define WATCHDOG_TIMEOUT_SECS 5 #define STATS_HARVEST_INTERVAL 2 -#define DWC_LOCK(sc) mtx_lock(&(sc)->mtx) -#define DWC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) -#define DWC_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) -#define DWC_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) - -/* TX descriptors - TDESC0 is almost unified */ -#define TDESC0_OWN (1U << 31) -#define TDESC0_IHE (1U << 16) /* IP Header Error */ -#define TDESC0_ES (1U << 15) /* Error Summary */ -#define TDESC0_JT (1U << 14) /* Jabber Timeout */ -#define TDESC0_FF (1U << 13) /* Frame Flushed */ -#define TDESC0_PCE (1U << 12) /* Payload Checksum Error */ -#define TDESC0_LOC (1U << 11) /* Loss of Carrier */ -#define TDESC0_NC (1U << 10) /* No Carrier */ -#define TDESC0_LC (1U << 9) /* Late Collision */ -#define TDESC0_EC (1U << 8) /* Excessive Collision */ -#define TDESC0_VF (1U << 7) /* VLAN Frame */ -#define TDESC0_CC_MASK 0xf -#define TDESC0_CC_SHIFT 3 /* Collision Count */ -#define TDESC0_ED (1U << 2) /* Excessive Deferral */ -#define TDESC0_UF (1U << 1) /* Underflow Error */ -#define TDESC0_DB (1U << 0) /* Deferred Bit */ -/* TX descriptors - TDESC0 extended format only */ -#define ETDESC0_IC (1U << 30) /* Interrupt on Completion */ -#define ETDESC0_LS (1U << 29) /* Last Segment */ -#define ETDESC0_FS (1U << 28) /* First Segment */ -#define ETDESC0_DC (1U << 27) /* Disable CRC */ -#define ETDESC0_DP (1U << 26) /* Disable Padding */ -#define ETDESC0_CIC_NONE (0U << 22) /* Checksum Insertion Control */ -#define ETDESC0_CIC_HDR (1U << 22) -#define ETDESC0_CIC_SEG (2U << 22) -#define ETDESC0_CIC_FULL (3U << 22) -#define ETDESC0_TER (1U << 21) /* Transmit End of Ring */ -#define ETDESC0_TCH (1U << 20) /* Second Address Chained */ - -/* TX descriptors - TDESC1 normal format */ -#define NTDESC1_IC (1U << 31) /* Interrupt on Completion */ -#define NTDESC1_LS (1U << 30) /* Last Segment */ -#define NTDESC1_FS (1U << 29) /* First Segment */ -#define NTDESC1_CIC_NONE (0U << 27) /* Checksum Insertion Control */ -#define NTDESC1_CIC_HDR (1U << 27) -#define NTDESC1_CIC_SEG (2U << 27) -#define NTDESC1_CIC_FULL (3U << 27) -#define NTDESC1_DC (1U << 26) /* Disable CRC */ -#define NTDESC1_TER (1U << 25) /* Transmit End of Ring */ -#define NTDESC1_TCH (1U << 24) /* Second Address Chained */ -/* TX descriptors - TDESC1 extended format */ -#define ETDESC1_DP (1U << 23) /* Disable Padding */ -#define ETDESC1_TBS2_MASK 0x7ff -#define ETDESC1_TBS2_SHIFT 11 /* Receive Buffer 2 Size */ -#define ETDESC1_TBS1_MASK 0x7ff -#define ETDESC1_TBS1_SHIFT 0 /* Receive Buffer 1 Size */ - -/* RX descriptor - RDESC0 is unified */ -#define RDESC0_OWN (1U << 31) -#define RDESC0_AFM (1U << 30) /* Dest. Address Filter Fail */ -#define RDESC0_FL_MASK 0x3fff -#define RDESC0_FL_SHIFT 16 /* Frame Length */ -#define RDESC0_ES (1U << 15) /* Error Summary */ -#define RDESC0_DE (1U << 14) /* Descriptor Error */ -#define RDESC0_SAF (1U << 13) /* Source Address Filter Fail */ -#define RDESC0_LE (1U << 12) /* Length Error */ -#define RDESC0_OE (1U << 11) /* Overflow Error */ -#define RDESC0_VLAN (1U << 10) /* VLAN Tag */ -#define RDESC0_FS (1U << 9) /* First Descriptor */ -#define RDESC0_LS (1U << 8) /* Last Descriptor */ -#define RDESC0_ICE (1U << 7) /* IPC Checksum Error */ -#define RDESC0_LC (1U << 6) /* Late Collision */ *** 772 LINES SKIPPED *** From nobody Thu Oct 5 15:35:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGb75Jjz4vnSv; Thu, 5 Oct 2023 15:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGb6nBkz4cvX; Thu, 5 Oct 2023 15:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoNJtigiugWRy/CaUxwZ/EpT1kMi/sFzGbrAC9bQAow=; b=hDSOqGo5/edEbcEnvh+BLjYpXn+7IsC4544xJdqRcwPFxuIPireL7jYVOCjjS2lZLauPy4 XxPBPmNLp/g8GL+NAy7R0qNtCh4p6LLXUBwNWTRnXiQXWGhxqd9aQO/B3C0JghOdoUURJA r8eNiZQ+r17xyuhqzyvFdvwO4qHhv2LKROODdQ1JI+j1cihzSDFDzl4gzm3e80c8cI1qWn dqe1VcezzgOInUMuR8ATWdRwrkGUy8c38Wb636tHmId3M0BfxwWGwaSXKD6cpQ7HY8IayD nma/94r1eEm9n4QuESGq6a2anX5ARhY4Qx18B/k40+fVnJawDZ0eLbvkQHWF3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520103; a=rsa-sha256; cv=none; b=doGMkWkx5DXE7InOLkSxcYM2GEjkwiIDjOb1v5mrgW/Elhx4fe1NQz3THqEdNlIH+dRkLT SA+rc+9umEOlnRE/rJPzMPocXhC5v8l7caEzVaJ9WeM/SZa1Q1YQmy5RdbMbgGhfL5Dyw6 DsGofbUWz+oPhK4C3A2twVr01G23LL5Ywy+msnsvxWfsMJFmBU1rDGH2ajklJD7sIR66KC Sbc4N0GNv5MmatDn6N9GHmya4Ucp8/EMuFYaZzFdtaY1T2O3AjuJM5K6Xx4bx4u2azl/r8 191H9Hd0spnojpAad/2JR7CvR3gd4TXjTCsKR8vYAZyUwbULgPARs1+6/cO7Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoNJtigiugWRy/CaUxwZ/EpT1kMi/sFzGbrAC9bQAow=; b=CbDTMZUiX/e5SXWnD1Acr7Gfye35YOPRFyACACgz6Bd//VDGyCjgcnVR1LohHzXA86v7lS muoKGo3jRJ7upj7lCvnIguqgoWtYDEisZNztsdRIiOhDOwkEMksvjCvFKKCLKLShqbPAFw D6tylgkmlub3lWyLnjxC+wYLK3O7VpsNqvpkddwgeL6TF4I6apazSumNjP9lxs6fSplqjU fflmh9/d89aTmMS+b2KsN+xNzSatn6uNxye2lIzm95O49dpJ/ZMNEz/DaJp5LVi5p67kd9 LOjiBIM9nr4QKpsr086q3Zh4sfAF54fp/VXDpx4fh5YDWBM1lZqRIS+FpVL8KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGb5t8yz1QCV; Thu, 5 Oct 2023 15:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ3gE012427; Thu, 5 Oct 2023 15:35:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ3V3012424; Thu, 5 Oct 2023 15:35:03 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:03 GMT Message-Id: <202310051535.395FZ3V3012424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 62519d5a4f71 - main - dwc: Split core functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62519d5a4f719a420803a3a0823268da6e950fcb Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=62519d5a4f719a420803a3a0823268da6e950fcb commit 62519d5a4f719a420803a3a0823268da6e950fcb Author: Emmanuel Vadot AuthorDate: 2023-09-28 19:38:36 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Split core functions Synopsis/Designware controller have multiple version. The version currently supported by dwc(4) is the version 3 and it's usually called 1000 for gigabit. In the goal to support all of those in the same base driver start splitting the core function to a new file. No functional changes intended. --- sys/conf/files.arm | 1 + sys/conf/files.arm64 | 1 + sys/dev/dwc/dwc1000_core.c | 416 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/dwc/dwc1000_core.h | 43 +++++ sys/dev/dwc/if_dwc.c | 378 ++-------------------------------------- 5 files changed, 476 insertions(+), 363 deletions(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index d47f2b7a78e8..772bbb8b0e3b 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -88,6 +88,7 @@ crypto/des/des_enc.c optional netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dwc/if_dwc.c optional dwc dev/dwc/if_dwc_if.m optional dwc +dev/dwc/dwc1000_core.c optional dwc dev/dwc/dwc1000_dma.c optional dwc dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index b9e690d2ca50..38b9e40463eb 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -227,6 +227,7 @@ dev/dpaa2/memac_mdio_if.m optional soc_nxp_ls dpaa2 acpi | soc_nxp_ls dpaa2 fd # Synopsys DesignWare Ethernet Controller dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 +dev/dwc/dwc1000_core.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/dwc1000_dma.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c new file mode 100644 index 000000000000..ef6db707a3a1 --- /dev/null +++ b/sys/dev/dwc/dwc1000_core.c @@ -0,0 +1,416 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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. + */ + +/* + * Ethernet media access controller (EMAC) + * Chapter 17, Altera Cyclone V Device Handbook (CV-5V2 2014.07.22) + * + * EMAC is an instance of the Synopsys DesignWare 3504-0 + * Universal 10/100/1000 Ethernet MAC (DWC_gmac). + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "if_dwc_if.h" + +#define STATS_HARVEST_INTERVAL 2 + +/* Pause time field in the transmitted control frame */ +static int dwc_pause_time = 0xffff; +TUNABLE_INT("hw.dwc.pause_time", &dwc_pause_time); + +/* + * MIIBUS functions + */ + +int +dwc1000_miibus_read_reg(device_t dev, int phy, int reg) +{ + struct dwc_softc *sc; + uint16_t mii; + size_t cnt; + int rv = 0; + + sc = device_get_softc(dev); + + mii = ((phy & GMII_ADDRESS_PA_MASK) << GMII_ADDRESS_PA_SHIFT) + | ((reg & GMII_ADDRESS_GR_MASK) << GMII_ADDRESS_GR_SHIFT) + | (sc->mii_clk << GMII_ADDRESS_CR_SHIFT) + | GMII_ADDRESS_GB; /* Busy flag */ + + WRITE4(sc, GMII_ADDRESS, mii); + + for (cnt = 0; cnt < 1000; cnt++) { + if (!(READ4(sc, GMII_ADDRESS) & GMII_ADDRESS_GB)) { + rv = READ4(sc, GMII_DATA); + break; + } + DELAY(10); + } + + return rv; +} + +int +dwc1000_miibus_write_reg(device_t dev, int phy, int reg, int val) +{ + struct dwc_softc *sc; + uint16_t mii; + size_t cnt; + + sc = device_get_softc(dev); + + mii = ((phy & GMII_ADDRESS_PA_MASK) << GMII_ADDRESS_PA_SHIFT) + | ((reg & GMII_ADDRESS_GR_MASK) << GMII_ADDRESS_GR_SHIFT) + | (sc->mii_clk << GMII_ADDRESS_CR_SHIFT) + | GMII_ADDRESS_GB | GMII_ADDRESS_GW; + + WRITE4(sc, GMII_DATA, val); + WRITE4(sc, GMII_ADDRESS, mii); + + for (cnt = 0; cnt < 1000; cnt++) { + if (!(READ4(sc, GMII_ADDRESS) & GMII_ADDRESS_GB)) { + break; + } + DELAY(10); + } + + return (0); +} + +void +dwc1000_miibus_statchg(device_t dev) +{ + struct dwc_softc *sc; + struct mii_data *mii; + uint32_t reg; + + /* + * Called by the MII bus driver when the PHY establishes + * link to set the MAC interface registers. + */ + + sc = device_get_softc(dev); + + DWC_ASSERT_LOCKED(sc); + + mii = sc->mii_softc; + + if (mii->mii_media_status & IFM_ACTIVE) + sc->link_is_up = true; + else + sc->link_is_up = false; + + reg = READ4(sc, MAC_CONFIGURATION); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_1000_T: + case IFM_1000_SX: + reg &= ~(CONF_FES | CONF_PS); + break; + case IFM_100_TX: + reg |= (CONF_FES | CONF_PS); + break; + case IFM_10_T: + reg &= ~(CONF_FES); + reg |= (CONF_PS); + break; + case IFM_NONE: + sc->link_is_up = false; + return; + default: + sc->link_is_up = false; + device_printf(dev, "Unsupported media %u\n", + IFM_SUBTYPE(mii->mii_media_active)); + return; + } + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + reg |= (CONF_DM); + else + reg &= ~(CONF_DM); + WRITE4(sc, MAC_CONFIGURATION, reg); + + reg = FLOW_CONTROL_UP; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) + reg |= FLOW_CONTROL_TX; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) + reg |= FLOW_CONTROL_RX; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + reg |= dwc_pause_time << FLOW_CONTROL_PT_SHIFT; + WRITE4(sc, FLOW_CONTROL, reg); + + IF_DWC_SET_SPEED(dev, IFM_SUBTYPE(mii->mii_media_active)); + +} + +void +dwc1000_core_setup(struct dwc_softc *sc) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + + /* Enable core */ + reg = READ4(sc, MAC_CONFIGURATION); + reg |= (CONF_JD | CONF_ACS | CONF_BE); + WRITE4(sc, MAC_CONFIGURATION, reg); +} + +void +dwc1000_enable_mac(struct dwc_softc *sc, bool enable) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + reg = READ4(sc, MAC_CONFIGURATION); + if (enable) + reg |= CONF_TE | CONF_RE; + else + reg &= ~(CONF_TE | CONF_RE); + WRITE4(sc, MAC_CONFIGURATION, reg); +} + +void +dwc1000_enable_csum_offload(struct dwc_softc *sc) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + reg = READ4(sc, MAC_CONFIGURATION); + if ((if_getcapenable(sc->ifp) & IFCAP_RXCSUM) != 0) + reg |= CONF_IPC; + else + reg &= ~CONF_IPC; + WRITE4(sc, MAC_CONFIGURATION, reg); +} + +static const uint8_t nibbletab[] = { + /* 0x0 0000 -> 0000 */ 0x0, + /* 0x1 0001 -> 1000 */ 0x8, + /* 0x2 0010 -> 0100 */ 0x4, + /* 0x3 0011 -> 1100 */ 0xc, + /* 0x4 0100 -> 0010 */ 0x2, + /* 0x5 0101 -> 1010 */ 0xa, + /* 0x6 0110 -> 0110 */ 0x6, + /* 0x7 0111 -> 1110 */ 0xe, + /* 0x8 1000 -> 0001 */ 0x1, + /* 0x9 1001 -> 1001 */ 0x9, + /* 0xa 1010 -> 0101 */ 0x5, + /* 0xb 1011 -> 1101 */ 0xd, + /* 0xc 1100 -> 0011 */ 0x3, + /* 0xd 1101 -> 1011 */ 0xb, + /* 0xe 1110 -> 0111 */ 0x7, + /* 0xf 1111 -> 1111 */ 0xf, }; + +static uint8_t +bitreverse(uint8_t x) +{ + + return (nibbletab[x & 0xf] << 4) | nibbletab[x >> 4]; +} + +static u_int +dwc_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) +{ + struct dwc_hash_maddr_ctx *ctx = arg; + uint32_t crc, hashbit, hashreg; + uint8_t val; + + crc = ether_crc32_le(LLADDR(sdl), ETHER_ADDR_LEN); + /* Take lower 8 bits and reverse it */ + val = bitreverse(~crc & 0xff); + if (ctx->sc->mactype != DWC_GMAC_EXT_DESC) + val >>= 2; /* Only need lower 6 bits */ + hashreg = (val >> 5); + hashbit = (val & 31); + ctx->hash[hashreg] |= (1 << hashbit); + + return (1); +} + +void +dwc1000_setup_rxfilter(struct dwc_softc *sc) +{ + struct dwc_hash_maddr_ctx ctx; + if_t ifp; + uint8_t *eaddr; + uint32_t ffval, hi, lo; + int nhash, i; + + DWC_ASSERT_LOCKED(sc); + + ifp = sc->ifp; + nhash = sc->mactype != DWC_GMAC_EXT_DESC ? 2 : 8; + + /* + * Set the multicast (group) filter hash. + */ + if ((if_getflags(ifp) & IFF_ALLMULTI) != 0) { + ffval = (FRAME_FILTER_PM); + for (i = 0; i < nhash; i++) + ctx.hash[i] = ~0; + } else { + ffval = (FRAME_FILTER_HMC); + for (i = 0; i < nhash; i++) + ctx.hash[i] = 0; + ctx.sc = sc; + if_foreach_llmaddr(ifp, dwc_hash_maddr, &ctx); + } + + /* + * Set the individual address filter hash. + */ + if ((if_getflags(ifp) & IFF_PROMISC) != 0) + ffval |= (FRAME_FILTER_PR); + + /* + * Set the primary address. + */ + eaddr = if_getlladdr(ifp); + lo = eaddr[0] | (eaddr[1] << 8) | (eaddr[2] << 16) | + (eaddr[3] << 24); + hi = eaddr[4] | (eaddr[5] << 8); + WRITE4(sc, MAC_ADDRESS_LOW(0), lo); + WRITE4(sc, MAC_ADDRESS_HIGH(0), hi); + WRITE4(sc, MAC_FRAME_FILTER, ffval); + if (sc->mactype != DWC_GMAC_EXT_DESC) { + WRITE4(sc, GMAC_MAC_HTLOW, ctx.hash[0]); + WRITE4(sc, GMAC_MAC_HTHIGH, ctx.hash[1]); + } else { + for (i = 0; i < nhash; i++) + WRITE4(sc, HASH_TABLE_REG(i), ctx.hash[i]); + } +} + +void +dwc1000_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr) +{ + uint32_t hi, lo, rnd; + + /* + * Try to recover a MAC address from the running hardware. If there's + * something non-zero there, assume the bootloader did the right thing + * and just use it. + * + * Otherwise, set the address to a convenient locally assigned address, + * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally + * assigned bit set, and the broadcast/multicast bit clear. + */ + lo = READ4(sc, MAC_ADDRESS_LOW(0)); + hi = READ4(sc, MAC_ADDRESS_HIGH(0)) & 0xffff; + if ((lo != 0xffffffff) || (hi != 0xffff)) { + hwaddr[0] = (lo >> 0) & 0xff; + hwaddr[1] = (lo >> 8) & 0xff; + hwaddr[2] = (lo >> 16) & 0xff; + hwaddr[3] = (lo >> 24) & 0xff; + hwaddr[4] = (hi >> 0) & 0xff; + hwaddr[5] = (hi >> 8) & 0xff; + } else { + rnd = arc4random() & 0x00ffffff; + hwaddr[0] = 'b'; + hwaddr[1] = 's'; + hwaddr[2] = 'd'; + hwaddr[3] = rnd >> 16; + hwaddr[4] = rnd >> 8; + hwaddr[5] = rnd >> 0; + } +} + +/* + * Stats + */ + +static void +dwc1000_clear_stats(struct dwc_softc *sc) +{ + uint32_t reg; + + reg = READ4(sc, MMC_CONTROL); + reg |= (MMC_CONTROL_CNTRST); + WRITE4(sc, MMC_CONTROL, reg); +} + +void +dwc1000_harvest_stats(struct dwc_softc *sc) +{ + if_t ifp; + + /* We don't need to harvest too often. */ + if (++sc->stats_harvest_count < STATS_HARVEST_INTERVAL) + return; + + sc->stats_harvest_count = 0; + ifp = sc->ifp; + + if_inc_counter(ifp, IFCOUNTER_IERRORS, + READ4(sc, RXOVERSIZE_G) + READ4(sc, RXUNDERSIZE_G) + + READ4(sc, RXCRCERROR) + READ4(sc, RXALIGNMENTERROR) + + READ4(sc, RXRUNTERROR) + READ4(sc, RXJABBERERROR) + + READ4(sc, RXLENGTHERROR)); + + if_inc_counter(ifp, IFCOUNTER_OERRORS, + READ4(sc, TXOVERSIZE_G) + READ4(sc, TXEXCESSDEF) + + READ4(sc, TXCARRIERERR) + READ4(sc, TXUNDERFLOWERROR)); + + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, + READ4(sc, TXEXESSCOL) + READ4(sc, TXLATECOL)); + + dwc1000_clear_stats(sc); +} diff --git a/sys/dev/dwc/dwc1000_core.h b/sys/dev/dwc/dwc1000_core.h new file mode 100644 index 000000000000..2069215bfffe --- /dev/null +++ b/sys/dev/dwc/dwc1000_core.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __DWC1000_CORE_H__ +#define __DWC1000_CORE_H__ + +int dwc1000_miibus_read_reg(device_t dev, int phy, int reg); +int dwc1000_miibus_write_reg(device_t dev, int phy, int reg, int val); +void dwc1000_miibus_statchg(device_t dev); +void dwc1000_core_setup(struct dwc_softc *sc); +void dwc1000_enable_mac(struct dwc_softc *sc, bool enable); +void dwc1000_enable_csum_offload(struct dwc_softc *sc); +void dwc1000_setup_rxfilter(struct dwc_softc *sc); +void dwc1000_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr); +void dwc1000_harvest_stats(struct dwc_softc *sc); + +#endif /* __DWC1000_CORE_H__ */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index c491106eacd0..29f78dd94a9a 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -71,6 +71,7 @@ #include #include +#include #include #include "if_dwc_if.h" @@ -79,7 +80,6 @@ #define MAC_RESET_TIMEOUT 100 #define WATCHDOG_TIMEOUT_SECS 5 -#define STATS_HARVEST_INTERVAL 2 static struct resource_spec dwc_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -88,139 +88,9 @@ static struct resource_spec dwc_spec[] = { }; static void dwc_stop_locked(struct dwc_softc *sc); -static void dwc_setup_rxfilter(struct dwc_softc *sc); -static void dwc_setup_core(struct dwc_softc *sc); -static void dwc_enable_mac(struct dwc_softc *sc, bool enable); static void dwc_tick(void *arg); -/* Pause time field in the transmitted control frame */ -static int dwc_pause_time = 0xffff; -TUNABLE_INT("hw.dwc.pause_time", &dwc_pause_time); - -/* - * MIIBUS functions - */ - -static int -dwc_miibus_read_reg(device_t dev, int phy, int reg) -{ - struct dwc_softc *sc; - uint16_t mii; - size_t cnt; - int rv = 0; - - sc = device_get_softc(dev); - - mii = ((phy & GMII_ADDRESS_PA_MASK) << GMII_ADDRESS_PA_SHIFT) - | ((reg & GMII_ADDRESS_GR_MASK) << GMII_ADDRESS_GR_SHIFT) - | (sc->mii_clk << GMII_ADDRESS_CR_SHIFT) - | GMII_ADDRESS_GB; /* Busy flag */ - - WRITE4(sc, GMII_ADDRESS, mii); - - for (cnt = 0; cnt < 1000; cnt++) { - if (!(READ4(sc, GMII_ADDRESS) & GMII_ADDRESS_GB)) { - rv = READ4(sc, GMII_DATA); - break; - } - DELAY(10); - } - - return rv; -} - -static int -dwc_miibus_write_reg(device_t dev, int phy, int reg, int val) -{ - struct dwc_softc *sc; - uint16_t mii; - size_t cnt; - - sc = device_get_softc(dev); - - mii = ((phy & GMII_ADDRESS_PA_MASK) << GMII_ADDRESS_PA_SHIFT) - | ((reg & GMII_ADDRESS_GR_MASK) << GMII_ADDRESS_GR_SHIFT) - | (sc->mii_clk << GMII_ADDRESS_CR_SHIFT) - | GMII_ADDRESS_GB | GMII_ADDRESS_GW; - - WRITE4(sc, GMII_DATA, val); - WRITE4(sc, GMII_ADDRESS, mii); - - for (cnt = 0; cnt < 1000; cnt++) { - if (!(READ4(sc, GMII_ADDRESS) & GMII_ADDRESS_GB)) { - break; - } - DELAY(10); - } - - return (0); -} - -static void -dwc_miibus_statchg(device_t dev) -{ - struct dwc_softc *sc; - struct mii_data *mii; - uint32_t reg; - - /* - * Called by the MII bus driver when the PHY establishes - * link to set the MAC interface registers. - */ - - sc = device_get_softc(dev); - - DWC_ASSERT_LOCKED(sc); - - mii = sc->mii_softc; - - if (mii->mii_media_status & IFM_ACTIVE) - sc->link_is_up = true; - else - sc->link_is_up = false; - - reg = READ4(sc, MAC_CONFIGURATION); - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_1000_T: - case IFM_1000_SX: - reg &= ~(CONF_FES | CONF_PS); - break; - case IFM_100_TX: - reg |= (CONF_FES | CONF_PS); - break; - case IFM_10_T: - reg &= ~(CONF_FES); - reg |= (CONF_PS); - break; - case IFM_NONE: - sc->link_is_up = false; - return; - default: - sc->link_is_up = false; - device_printf(dev, "Unsupported media %u\n", - IFM_SUBTYPE(mii->mii_media_active)); - return; - } - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) - reg |= (CONF_DM); - else - reg &= ~(CONF_DM); - WRITE4(sc, MAC_CONFIGURATION, reg); - - reg = FLOW_CONTROL_UP; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) - reg |= FLOW_CONTROL_TX; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) - reg |= FLOW_CONTROL_RX; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) - reg |= dwc_pause_time << FLOW_CONTROL_PT_SHIFT; - WRITE4(sc, FLOW_CONTROL, reg); - - IF_DWC_SET_SPEED(dev, IFM_SUBTYPE(mii->mii_media_active)); - -} - /* * Media functions */ @@ -261,183 +131,6 @@ dwc_media_change(if_t ifp) return (error); } -/* - * Core functions - */ - -static const uint8_t nibbletab[] = { - /* 0x0 0000 -> 0000 */ 0x0, - /* 0x1 0001 -> 1000 */ 0x8, - /* 0x2 0010 -> 0100 */ 0x4, - /* 0x3 0011 -> 1100 */ 0xc, - /* 0x4 0100 -> 0010 */ 0x2, - /* 0x5 0101 -> 1010 */ 0xa, - /* 0x6 0110 -> 0110 */ 0x6, - /* 0x7 0111 -> 1110 */ 0xe, - /* 0x8 1000 -> 0001 */ 0x1, - /* 0x9 1001 -> 1001 */ 0x9, - /* 0xa 1010 -> 0101 */ 0x5, - /* 0xb 1011 -> 1101 */ 0xd, - /* 0xc 1100 -> 0011 */ 0x3, - /* 0xd 1101 -> 1011 */ 0xb, - /* 0xe 1110 -> 0111 */ 0x7, - /* 0xf 1111 -> 1111 */ 0xf, }; - -static uint8_t -bitreverse(uint8_t x) -{ - - return (nibbletab[x & 0xf] << 4) | nibbletab[x >> 4]; -} - -static u_int -dwc_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) -{ - struct dwc_hash_maddr_ctx *ctx = arg; - uint32_t crc, hashbit, hashreg; - uint8_t val; - - crc = ether_crc32_le(LLADDR(sdl), ETHER_ADDR_LEN); - /* Take lower 8 bits and reverse it */ - val = bitreverse(~crc & 0xff); - if (ctx->sc->mactype != DWC_GMAC_EXT_DESC) - val >>= 2; /* Only need lower 6 bits */ - hashreg = (val >> 5); - hashbit = (val & 31); - ctx->hash[hashreg] |= (1 << hashbit); - - return (1); -} - -static void -dwc_setup_rxfilter(struct dwc_softc *sc) -{ - struct dwc_hash_maddr_ctx ctx; - if_t ifp; - uint8_t *eaddr; - uint32_t ffval, hi, lo; - int nhash, i; - - DWC_ASSERT_LOCKED(sc); - - ifp = sc->ifp; - nhash = sc->mactype != DWC_GMAC_EXT_DESC ? 2 : 8; - - /* - * Set the multicast (group) filter hash. - */ - if ((if_getflags(ifp) & IFF_ALLMULTI) != 0) { - ffval = (FRAME_FILTER_PM); - for (i = 0; i < nhash; i++) - ctx.hash[i] = ~0; - } else { - ffval = (FRAME_FILTER_HMC); - for (i = 0; i < nhash; i++) - ctx.hash[i] = 0; - ctx.sc = sc; - if_foreach_llmaddr(ifp, dwc_hash_maddr, &ctx); - } - - /* - * Set the individual address filter hash. - */ - if ((if_getflags(ifp) & IFF_PROMISC) != 0) - ffval |= (FRAME_FILTER_PR); - - /* - * Set the primary address. - */ - eaddr = if_getlladdr(ifp); - lo = eaddr[0] | (eaddr[1] << 8) | (eaddr[2] << 16) | - (eaddr[3] << 24); - hi = eaddr[4] | (eaddr[5] << 8); - WRITE4(sc, MAC_ADDRESS_LOW(0), lo); - WRITE4(sc, MAC_ADDRESS_HIGH(0), hi); - WRITE4(sc, MAC_FRAME_FILTER, ffval); - if (sc->mactype != DWC_GMAC_EXT_DESC) { - WRITE4(sc, GMAC_MAC_HTLOW, ctx.hash[0]); - WRITE4(sc, GMAC_MAC_HTHIGH, ctx.hash[1]); - } else { - for (i = 0; i < nhash; i++) - WRITE4(sc, HASH_TABLE_REG(i), ctx.hash[i]); - } -} - -static void -dwc_setup_core(struct dwc_softc *sc) -{ - uint32_t reg; - - DWC_ASSERT_LOCKED(sc); - - /* Enable core */ - reg = READ4(sc, MAC_CONFIGURATION); - reg |= (CONF_JD | CONF_ACS | CONF_BE); - WRITE4(sc, MAC_CONFIGURATION, reg); -} - -static void -dwc_enable_mac(struct dwc_softc *sc, bool enable) -{ - uint32_t reg; - - DWC_ASSERT_LOCKED(sc); - reg = READ4(sc, MAC_CONFIGURATION); - if (enable) - reg |= CONF_TE | CONF_RE; - else - reg &= ~(CONF_TE | CONF_RE); - WRITE4(sc, MAC_CONFIGURATION, reg); -} - -static void -dwc_enable_csum_offload(struct dwc_softc *sc) -{ - uint32_t reg; - - DWC_ASSERT_LOCKED(sc); - reg = READ4(sc, MAC_CONFIGURATION); - if ((if_getcapenable(sc->ifp) & IFCAP_RXCSUM) != 0) - reg |= CONF_IPC; - else - reg &= ~CONF_IPC; - WRITE4(sc, MAC_CONFIGURATION, reg); -} - -static void -dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr) -{ - uint32_t hi, lo, rnd; - - /* - * Try to recover a MAC address from the running hardware. If there's - * something non-zero there, assume the bootloader did the right thing - * and just use it. - * - * Otherwise, set the address to a convenient locally assigned address, - * 'bsd' + random 24 low-order bits. 'b' is 0x62, which has the locally - * assigned bit set, and the broadcast/multicast bit clear. - */ - lo = READ4(sc, MAC_ADDRESS_LOW(0)); - hi = READ4(sc, MAC_ADDRESS_HIGH(0)) & 0xffff; - if ((lo != 0xffffffff) || (hi != 0xffff)) { - hwaddr[0] = (lo >> 0) & 0xff; - hwaddr[1] = (lo >> 8) & 0xff; - hwaddr[2] = (lo >> 16) & 0xff; - hwaddr[3] = (lo >> 24) & 0xff; - hwaddr[4] = (hi >> 0) & 0xff; - hwaddr[5] = (hi >> 8) & 0xff; - } else { - rnd = arc4random() & 0x00ffffff; - hwaddr[0] = 'b'; - hwaddr[1] = 's'; - hwaddr[2] = 'd'; - hwaddr[3] = rnd >> 16; - hwaddr[4] = rnd >> 8; - hwaddr[5] = rnd >> 0; - } -} - /* * if_ functions */ @@ -514,15 +207,15 @@ dwc_init_locked(struct dwc_softc *sc) return; /* - * Call mii_mediachg() which will call back into dwc_miibus_statchg() + * Call mii_mediachg() which will call back into dwc1000_miibus_statchg() * to set up the remaining config registers based on current media. */ mii_mediachg(sc->mii_softc); - dwc_setup_rxfilter(sc); - dwc_setup_core(sc); - dwc_enable_mac(sc, true); - dwc_enable_csum_offload(sc); + dwc1000_setup_rxfilter(sc); + dwc1000_core_setup(sc); + dwc1000_enable_mac(sc, true); + dwc1000_enable_csum_offload(sc); dma1000_start(sc); if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); @@ -555,7 +248,7 @@ dwc_stop_locked(struct dwc_softc *sc) callout_stop(&sc->dwc_callout); dma1000_stop(sc); - dwc_enable_mac(sc, false); + dwc1000_enable_mac(sc, false); } static int @@ -577,7 +270,7 @@ dwc_ioctl(if_t ifp, u_long cmd, caddr_t data) if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { flags = if_getflags(ifp) ^ sc->if_flags; if ((flags & (IFF_PROMISC|IFF_ALLMULTI)) != 0) - dwc_setup_rxfilter(sc); + dwc1000_setup_rxfilter(sc); } else { if (!sc->is_detaching) dwc_init_locked(sc); @@ -593,7 +286,7 @@ dwc_ioctl(if_t ifp, u_long cmd, caddr_t data) case SIOCDELMULTI: if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { DWC_LOCK(sc); - dwc_setup_rxfilter(sc); + dwc1000_setup_rxfilter(sc); DWC_UNLOCK(sc); } break; @@ -619,7 +312,7 @@ dwc_ioctl(if_t ifp, u_long cmd, caddr_t data) if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { DWC_LOCK(sc); - dwc_enable_csum_offload(sc); + dwc1000_enable_csum_offload(sc); DWC_UNLOCK(sc); } break; @@ -676,47 +369,6 @@ dwc_intr(void *arg) DWC_UNLOCK(sc); } -/* - * Stats - */ - -static void dwc_clear_stats(struct dwc_softc *sc) -{ - uint32_t reg; - - reg = READ4(sc, MMC_CONTROL); - reg |= (MMC_CONTROL_CNTRST); - WRITE4(sc, MMC_CONTROL, reg); -} - -static void -dwc_harvest_stats(struct dwc_softc *sc) -{ - if_t ifp; - - /* We don't need to harvest too often. */ - if (++sc->stats_harvest_count < STATS_HARVEST_INTERVAL) - return; - - sc->stats_harvest_count = 0; - ifp = sc->ifp; - - if_inc_counter(ifp, IFCOUNTER_IERRORS, - READ4(sc, RXOVERSIZE_G) + READ4(sc, RXUNDERSIZE_G) + - READ4(sc, RXCRCERROR) + READ4(sc, RXALIGNMENTERROR) + - READ4(sc, RXRUNTERROR) + READ4(sc, RXJABBERERROR) + - READ4(sc, RXLENGTHERROR)); - - if_inc_counter(ifp, IFCOUNTER_OERRORS, - READ4(sc, TXOVERSIZE_G) + READ4(sc, TXEXCESSDEF) + - READ4(sc, TXCARRIERERR) + READ4(sc, TXUNDERFLOWERROR)); - - if_inc_counter(ifp, IFCOUNTER_COLLISIONS, - READ4(sc, TXEXESSCOL) + READ4(sc, TXLATECOL)); - - dwc_clear_stats(sc); -} - static void dwc_tick(void *arg) { @@ -745,7 +397,7 @@ dwc_tick(void *arg) } /* Gather stats from hardware counters. */ - dwc_harvest_stats(sc); + dwc1000_harvest_stats(sc); /* Check the media status. */ link_was_up = sc->link_is_up; @@ -973,7 +625,7 @@ dwc_attach(device_t dev) } /* Read MAC before reset */ - dwc_get_hwaddr(sc, macaddr); + dwc1000_get_hwaddr(sc, macaddr); /* Reset the PHY if needed */ *** 14 LINES SKIPPED *** From nobody Thu Oct 5 15:35:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGd1Rjwz4vnRD; Thu, 5 Oct 2023 15:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGd0p7nz4d24; Thu, 5 Oct 2023 15:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JoiVNhogr1kRt+4GqknfHyzYQzzZfm1eZlEFdROa800=; b=fI56wGevz1dOA4aRumsmby/RcqKRPPFKftwN6mQNQ1+hLG4fYOE0oZIufI3PGVBwv9wWUW qEFefmhg1IivbA9k4zSLv54ETK6JdUtap6QAHqVe0iVF0S4Twhnh4fZiiETcucc51MxE84 TMYuN79uiFodHh96psfMsKJq6PH8x79p623vg5O1ejf1I0FuyWBaOums4AEUqyBS8FNSNy e2irdy97QTzLVSCbfdL+FWFU9ryzGdpVHt7Rd0AMPaopEnjH2i5l5G5c2DejoVtqJ0ollR f5yIg273N+xnZPQ/u8GdVyleYHhDZiSZQ+ARp9DJeBpGHqGK9zfl+lBPqGHEzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520105; a=rsa-sha256; cv=none; b=I9mECFEdgBRGDbVU3xtLPnK+ybI0ExaH3kWN6TBUZHttDwxVU5F92Lq4KdJtBC7OX0URmT JZOXYx5uSovbuZ2AH7X6dq48X3mvilF0mcJB8lTh+CADkalE+tN6J1bTRP/GCtVwiVMlNM +TkrqdtY6ysFT0Ew1Av/VsTksm6lp+KPRGhbNdaOFCRPnIP4aECZ/N98V/owar1C0HhRum eS/v/vwuMoG4ipTWWxTp6YXQC/oVZMz9b3G04wlBrBCPVVO1QIEOgpV9TKwF9BJ8IbxHmv gVg8g7rONj1YwJk0R8+c8ECsPr70fcLWHst4uuA1MIUx9z6gus8L+tWAzSZraA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JoiVNhogr1kRt+4GqknfHyzYQzzZfm1eZlEFdROa800=; b=TQxMpr0LaH1gcgo99vKda7HbrOgz+IBQiI301eH7/scqQNDJJ4Zlu/5CN09Bu4cHHZDr56 2a2K2+mlgKGcQbAOJIUZsCKQBqJuMqkY3t880p22+MjxC9lxOPEkGrfe0i7l/qr62OkY5c xa6gJprjA9EnYTFXVBJq0OzFtPNYpD9M10AWn70gr+IhZtvgt0K5P89rCnhoxmZ2856MH0 WS/xFG5iE4ZErpOPyuRt/m2N2WFRv+T1MNtNTZxU41sTQXB0yDDbr2W0jn/7Ey1qSaNJUc wlJVmXvFfQDggpctW/m9+5/L8lEXYZjdjBxCrDk3KCcFlYA4Yw5VDtj2QQJkIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGc6ybCz1PfZ; Thu, 5 Oct 2023 15:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ4x3012493; Thu, 5 Oct 2023 15:35:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ4sO012490; Thu, 5 Oct 2023 15:35:04 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:04 GMT Message-Id: <202310051535.395FZ4sO012490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: afa0f66e81cc - main - dwc: Move the txstart dma part to dwc1000_dma List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afa0f66e81ccd6a946133bb9aceaf1fe59370431 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=afa0f66e81ccd6a946133bb9aceaf1fe59370431 commit afa0f66e81ccd6a946133bb9aceaf1fe59370431 Author: Emmanuel Vadot AuthorDate: 2023-09-28 20:34:47 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Move the txstart dma part to dwc1000_dma This is dma related to move it to the dma file. No functional changes intended. --- sys/dev/dwc/dwc1000_dma.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/dwc/dwc1000_dma.h | 8 +------- sys/dev/dwc/if_dwc.c | 36 +---------------------------------- 3 files changed, 50 insertions(+), 42 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index a04f65de8501..505e3fcaebef 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -60,6 +60,15 @@ #include #include +#define WATCHDOG_TIMEOUT_SECS 5 + +static inline uint32_t +next_txidx(struct dwc_softc *sc, uint32_t curidx) +{ + + return ((curidx + 1) % TX_DESC_COUNT); +} + static inline uint32_t next_rxidx(struct dwc_softc *sc, uint32_t curidx) { @@ -372,6 +381,45 @@ dma1000_txfinish_locked(struct dwc_softc *sc) } } +void +dma1000_txstart(struct dwc_softc *sc) +{ + int enqueued; + struct mbuf *m; + + enqueued = 0; + + for (;;) { + if (sc->tx_desccount > (TX_DESC_COUNT - TX_MAP_MAX_SEGS + 1)) { + if_setdrvflagbits(sc->ifp, IFF_DRV_OACTIVE, 0); + break; + } + + if (sc->tx_mapcount == (TX_MAP_COUNT - 1)) { + if_setdrvflagbits(sc->ifp, IFF_DRV_OACTIVE, 0); + break; + } + + m = if_dequeue(sc->ifp); + if (m == NULL) + break; + if (dma1000_setup_txbuf(sc, sc->tx_map_head, &m) != 0) { + if_sendq_prepend(sc->ifp, m); + if_setdrvflagbits(sc->ifp, IFF_DRV_OACTIVE, 0); + break; + } + bpf_mtap_if(sc->ifp, m); + sc->tx_map_head = next_txidx(sc, sc->tx_map_head); + sc->tx_mapcount++; + ++enqueued; + } + + if (enqueued != 0) { + WRITE4(sc, TRANSMIT_POLL_DEMAND, 0x1); + sc->tx_watchdog_count = WATCHDOG_TIMEOUT_SECS; + } +} + void dma1000_rxfinish_locked(struct dwc_softc *sc) { diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h index 613faeee91ff..97cebd07f215 100644 --- a/sys/dev/dwc/dwc1000_dma.h +++ b/sys/dev/dwc/dwc1000_dma.h @@ -149,12 +149,6 @@ void dma1000_stop(struct dwc_softc *sc); int dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp); void dma1000_txfinish_locked(struct dwc_softc *sc); void dma1000_rxfinish_locked(struct dwc_softc *sc); - -static inline uint32_t -next_txidx(struct dwc_softc *sc, uint32_t curidx) -{ - - return ((curidx + 1) % TX_DESC_COUNT); -} +void dma1000_txstart(struct dwc_softc *sc); #endif /* __DWC1000_DMA_H__ */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 29f78dd94a9a..107158cebf02 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -79,7 +79,6 @@ #include "miibus_if.h" #define MAC_RESET_TIMEOUT 100 -#define WATCHDOG_TIMEOUT_SECS 5 static struct resource_spec dwc_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -139,8 +138,6 @@ static void dwc_txstart_locked(struct dwc_softc *sc) { if_t ifp; - struct mbuf *m; - int enqueued; DWC_ASSERT_LOCKED(sc); @@ -152,38 +149,7 @@ dwc_txstart_locked(struct dwc_softc *sc) if ((if_getdrvflags(ifp) & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) return; - - enqueued = 0; - - for (;;) { - if (sc->tx_desccount > (TX_DESC_COUNT - TX_MAP_MAX_SEGS + 1)) { - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); - break; - } - - if (sc->tx_mapcount == (TX_MAP_COUNT - 1)) { - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); - break; - } - - m = if_dequeue(ifp); - if (m == NULL) - break; - if (dma1000_setup_txbuf(sc, sc->tx_map_head, &m) != 0) { - if_sendq_prepend(ifp, m); - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); - break; - } - bpf_mtap_if(ifp, m); - sc->tx_map_head = next_txidx(sc, sc->tx_map_head); - sc->tx_mapcount++; - ++enqueued; - } - - if (enqueued != 0) { - WRITE4(sc, TRANSMIT_POLL_DEMAND, 0x1); - sc->tx_watchdog_count = WATCHDOG_TIMEOUT_SECS; - } + dma1000_txstart(sc); } static void From nobody Thu Oct 5 15:35:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGf2DVDz4vncP; Thu, 5 Oct 2023 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGf1Vl9z4d6R; Thu, 5 Oct 2023 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/G0VSd+/kCXD10+Q77/VT9gXQUllaORLF29sXChWtZI=; b=thDMuTRiaoF/W4I07OQX2rpYlgTBt+LY4zzc4S+MLM3cdPnl7DykUztOZhjTzAnqfesmoQ NuQLmAsdVgehNSFsquhQVeRSpBuJn6r1qyp2Xucc9f6BW1modjJDzjkYcOaTKYmtXy88OB YtpobRwtBpuGtbaBD+tSFNQAR+NdchxK49wLjicklKsa/8dwieZ7tsn76g1dAfJ64wiI58 rTJTFd0dZe7wuw+cUcAAuOXo4l2AN75vnA13TxCgvnbM4q5QQT7Dzc7v3lBBmYGITbUpRh TAqH7yM5sImU2PjCjsXzrFLUWefgyw1Cds7/6AmizBj5QQFDCkjHSN+Fc44fjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520106; a=rsa-sha256; cv=none; b=UmEIgTWQNJE+vhE84i+/c+RpZJ0nArPENcvvYrchEWQgYzcV7WCcouTW3LXu47iUq8YIaE RV9SPOv/Z92bbJL07ed3TGhrs+trQQErb8o+wQnsYJusmZV0IPSbdRpATJ04gyF4+egTqx h9If6v3LUHSU+jHCC1cQhgEYuJRqyXzg+nWP9l2Hm6/9W82prGH7c4vEcYU+Bjtu/ynBJd /M5hNX0TJTuK2IQjhbMsiN3rCe2idVJvlYkWqWZ2pDyxZQ6Be0ejq7TA8/R7uX5Nol+WqK qEw264BDACALr+Gbit4cllSVhhSnX9n5Utg56fCmYPVVajSW7k17tr0mYSJsEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/G0VSd+/kCXD10+Q77/VT9gXQUllaORLF29sXChWtZI=; b=uBiplRSKodoEvMhHWdyzg4+L9T4VQAQvULFBtiKYBQN6qy4awUCkS/7rlmppnQC2rZWGXu hZgGWwOyA4ezN/etrhMh5EQRSOPzLRfYQvXjkorYaoc/+AvBMk3C+p1GkKvyPgCsbVAPI/ 0kUJSu+Iu9b9N8/ZJsBTHlHZqjeyTSASabxYEvqPUykbGGXLVUpz9CNpvPozw2vIyTGBgo PI10CyeUkO/Qlxgr05/UzubPdbZugCkrykpK6WFQRxSd6BJWvjvLALpuAcWn9DPRI7NDuH 1SsaekSy7WtqBrlRH8IpFfJvSlMF8usS0DLJUaCV0DL/bsIdp4vuimRAjpjIsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGf0bCpz1QJj; Thu, 5 Oct 2023 15:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ59Z012649; Thu, 5 Oct 2023 15:35:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ5bl012646; Thu, 5 Oct 2023 15:35:05 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:05 GMT Message-Id: <202310051535.395FZ5bl012646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 627726b5b6fa - main - dwc: Move struct dwc_hash_maddr_ctx declaration in dwc1000_core List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 627726b5b6fa861079e1d4edd68374a2e798a9da Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=627726b5b6fa861079e1d4edd68374a2e798a9da commit 627726b5b6fa861079e1d4edd68374a2e798a9da Author: Emmanuel Vadot AuthorDate: 2023-09-28 20:36:24 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Move struct dwc_hash_maddr_ctx declaration in dwc1000_core it's only used there. No functional change intended. --- sys/dev/dwc/dwc1000_core.c | 5 +++++ sys/dev/dwc/dwc1000_dma.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c index ef6db707a3a1..c93019a49f3e 100644 --- a/sys/dev/dwc/dwc1000_core.c +++ b/sys/dev/dwc/dwc1000_core.c @@ -71,6 +71,11 @@ #include "if_dwc_if.h" +struct dwc_hash_maddr_ctx { + struct dwc_softc *sc; + uint32_t hash[8]; +}; + #define STATS_HARVEST_INTERVAL 2 /* Pause time field in the transmitted control frame */ diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h index 97cebd07f215..3858b14cc862 100644 --- a/sys/dev/dwc/dwc1000_dma.h +++ b/sys/dev/dwc/dwc1000_dma.h @@ -131,11 +131,6 @@ struct dwc_hwdesc uint32_t addr2; /* ptr to next descriptor / second buffer data*/ }; -struct dwc_hash_maddr_ctx { - struct dwc_softc *sc; - uint32_t hash[8]; -}; - /* * The hardware imposes alignment restrictions on various objects involved in * DMA transfers. These values are expressed in bytes (not bits). From nobody Thu Oct 5 15:35:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGg58nTz4vnWk; Thu, 5 Oct 2023 15:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGg2j4Wz4dR7; Thu, 5 Oct 2023 15:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r2fWvNdYVP5l8FK4U8iq18hLNT/cKsLL0/duzUmhxo=; b=dAbGLlqdHgs96yn4rwQPhSfR0hujQNJ94Nk6DswFbERdEh7utvWEgWaZLO80nMF3GxG+X7 bpNCXudA1YbBsieAgX/bSi4/rx44bQ4jTSvF2r/kVgKYPtROUdT6KUT1zopsXBKce/Jsnn wK7otaPgHje5GaRKNrgj/qwdv51luQQAxS/zL/dX9Yu5lnx+JBD42iMFM9OHPNHw0qIWD9 1mzzyfYdRR0Ap0UgHZtQPmIYtZ6tCWhOTjowwHoabR3KEABrzRn61j2I45dYw7LGpBBool 95OePEHk78W1/Ng/QXiCjVsi76W1nnHVHOknqGezWee2pjQ8PIImQVNb0rxvNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520107; a=rsa-sha256; cv=none; b=Zsdzb59oHbFBYPjmdIXWpi7rPb+VPHLGREqIq34xUDjgYXh9wcqSgyMtAvOdYw4JKvXhoG upua2IB3AbAithAHC8wKTao+DMnxrgyCfWCJBX/nL+X21GC1kojW7MY1YMby4pmtKDk2Q4 jDvrJZtcGk0AAJLYRe/RLx7xbyfJlFkeLQpzkVnprk/GjVyoauro/SKpwJWZojiVNOM2cX zNpJmlvpcYR/pyW8apEG33DN7gGkZ0XiEN9n/XXJUldO9GnLK7Bmf34FYWLSyJO37vGnxO SkdobxnVyVXIxsrxSYfU+Ov3twtg6uzZGFBbRJPseu77rh6cXkC6VKSNb7enwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r2fWvNdYVP5l8FK4U8iq18hLNT/cKsLL0/duzUmhxo=; b=PwmT2tMZ08vCzWHiC+nMvnoToPDFEEoov7DpFu6aoQWTNo2MkioSQRWTL74Ueq5AVJo5Nb wiNxIh38MIqq67C2xqWsLbWFG2HIgaQS95sWcausFon4t+1tlP6LL5hz0i2qbV8IUw/VmX pgQHDoxk5mMCUskaZC3grMjurPkEhMt2iyqxJPpWCLed3BuydKRLfULW4/ImAuXSCRvyVR GWU7k4YV02sBvbAS6hS8vNm8D1j63yxZvuiTD/gxCQvflHHLoW131DhBro8jbW6IGYQxg3 Zyo/LkESfDGs0M1LwUt/XBrS2ZMfiVM1l5uA+Mr86BmIdjJ05dPA8kosq+muZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGg1bcdz1PqW; Thu, 5 Oct 2023 15:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ7AW012725; Thu, 5 Oct 2023 15:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ7S2012722; Thu, 5 Oct 2023 15:35:07 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:07 GMT Message-Id: <202310051535.395FZ7S2012722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: fe82f82dcc3d - main - dwc: Put all DMA related defines in dma1000_dma.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe82f82dcc3dea2b2f82fd14bbccf845d6c31951 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fe82f82dcc3dea2b2f82fd14bbccf845d6c31951 commit fe82f82dcc3dea2b2f82fd14bbccf845d6c31951 Author: Emmanuel Vadot AuthorDate: 2023-09-28 20:37:48 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:39 +0000 dwc: Put all DMA related defines in dma1000_dma.c No need to polute dwm1000_dma.h now. No functional changes intended. --- sys/dev/dwc/dwc1000_dma.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/dwc/dwc1000_dma.h | 95 ---------------------------------------------- 2 files changed, 96 insertions(+), 95 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 505e3fcaebef..ad8bdbcfc883 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -62,6 +62,102 @@ #define WATCHDOG_TIMEOUT_SECS 5 + +/* TX descriptors - TDESC0 is almost unified */ +#define TDESC0_OWN (1U << 31) +#define TDESC0_IHE (1U << 16) /* IP Header Error */ +#define TDESC0_ES (1U << 15) /* Error Summary */ +#define TDESC0_JT (1U << 14) /* Jabber Timeout */ +#define TDESC0_FF (1U << 13) /* Frame Flushed */ +#define TDESC0_PCE (1U << 12) /* Payload Checksum Error */ +#define TDESC0_LOC (1U << 11) /* Loss of Carrier */ +#define TDESC0_NC (1U << 10) /* No Carrier */ +#define TDESC0_LC (1U << 9) /* Late Collision */ +#define TDESC0_EC (1U << 8) /* Excessive Collision */ +#define TDESC0_VF (1U << 7) /* VLAN Frame */ +#define TDESC0_CC_MASK 0xf +#define TDESC0_CC_SHIFT 3 /* Collision Count */ +#define TDESC0_ED (1U << 2) /* Excessive Deferral */ +#define TDESC0_UF (1U << 1) /* Underflow Error */ +#define TDESC0_DB (1U << 0) /* Deferred Bit */ +/* TX descriptors - TDESC0 extended format only */ +#define ETDESC0_IC (1U << 30) /* Interrupt on Completion */ +#define ETDESC0_LS (1U << 29) /* Last Segment */ +#define ETDESC0_FS (1U << 28) /* First Segment */ +#define ETDESC0_DC (1U << 27) /* Disable CRC */ +#define ETDESC0_DP (1U << 26) /* Disable Padding */ +#define ETDESC0_CIC_NONE (0U << 22) /* Checksum Insertion Control */ +#define ETDESC0_CIC_HDR (1U << 22) +#define ETDESC0_CIC_SEG (2U << 22) +#define ETDESC0_CIC_FULL (3U << 22) +#define ETDESC0_TER (1U << 21) /* Transmit End of Ring */ +#define ETDESC0_TCH (1U << 20) /* Second Address Chained */ + +/* TX descriptors - TDESC1 normal format */ +#define NTDESC1_IC (1U << 31) /* Interrupt on Completion */ +#define NTDESC1_LS (1U << 30) /* Last Segment */ +#define NTDESC1_FS (1U << 29) /* First Segment */ +#define NTDESC1_CIC_NONE (0U << 27) /* Checksum Insertion Control */ +#define NTDESC1_CIC_HDR (1U << 27) +#define NTDESC1_CIC_SEG (2U << 27) +#define NTDESC1_CIC_FULL (3U << 27) +#define NTDESC1_DC (1U << 26) /* Disable CRC */ +#define NTDESC1_TER (1U << 25) /* Transmit End of Ring */ +#define NTDESC1_TCH (1U << 24) /* Second Address Chained */ +/* TX descriptors - TDESC1 extended format */ +#define ETDESC1_DP (1U << 23) /* Disable Padding */ +#define ETDESC1_TBS2_MASK 0x7ff +#define ETDESC1_TBS2_SHIFT 11 /* Receive Buffer 2 Size */ +#define ETDESC1_TBS1_MASK 0x7ff +#define ETDESC1_TBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* RX descriptor - RDESC0 is unified */ +#define RDESC0_OWN (1U << 31) +#define RDESC0_AFM (1U << 30) /* Dest. Address Filter Fail */ +#define RDESC0_FL_MASK 0x3fff +#define RDESC0_FL_SHIFT 16 /* Frame Length */ +#define RDESC0_ES (1U << 15) /* Error Summary */ +#define RDESC0_DE (1U << 14) /* Descriptor Error */ +#define RDESC0_SAF (1U << 13) /* Source Address Filter Fail */ +#define RDESC0_LE (1U << 12) /* Length Error */ +#define RDESC0_OE (1U << 11) /* Overflow Error */ +#define RDESC0_VLAN (1U << 10) /* VLAN Tag */ +#define RDESC0_FS (1U << 9) /* First Descriptor */ +#define RDESC0_LS (1U << 8) /* Last Descriptor */ +#define RDESC0_ICE (1U << 7) /* IPC Checksum Error */ +#define RDESC0_LC (1U << 6) /* Late Collision */ +#define RDESC0_FT (1U << 5) /* Frame Type */ +#define RDESC0_RWT (1U << 4) /* Receive Watchdog Timeout */ +#define RDESC0_RE (1U << 3) /* Receive Error */ +#define RDESC0_DBE (1U << 2) /* Dribble Bit Error */ +#define RDESC0_CE (1U << 1) /* CRC Error */ +#define RDESC0_PCE (1U << 0) /* Payload Checksum Error */ +#define RDESC0_RXMA (1U << 0) /* Rx MAC Address */ + +/* RX descriptors - RDESC1 normal format */ +#define NRDESC1_DIC (1U << 31) /* Disable Intr on Completion */ +#define NRDESC1_RER (1U << 25) /* Receive End of Ring */ +#define NRDESC1_RCH (1U << 24) /* Second Address Chained */ +#define NRDESC1_RBS2_MASK 0x7ff +#define NRDESC1_RBS2_SHIFT 11 /* Receive Buffer 2 Size */ +#define NRDESC1_RBS1_MASK 0x7ff +#define NRDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* RX descriptors - RDESC1 enhanced format */ +#define ERDESC1_DIC (1U << 31) /* Disable Intr on Completion */ +#define ERDESC1_RBS2_MASK 0x7ffff +#define ERDESC1_RBS2_SHIFT 16 /* Receive Buffer 2 Size */ +#define ERDESC1_RER (1U << 15) /* Receive End of Ring */ +#define ERDESC1_RCH (1U << 14) /* Second Address Chained */ +#define ERDESC1_RBS1_MASK 0x7ffff +#define ERDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ + +/* + * The hardware imposes alignment restrictions on various objects involved in + * DMA transfers. These values are expressed in bytes (not bits). + */ +#define DWC_DESC_RING_ALIGN 2048 + static inline uint32_t next_txidx(struct dwc_softc *sc, uint32_t curidx) { diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h index 3858b14cc862..b4af29076625 100644 --- a/sys/dev/dwc/dwc1000_dma.h +++ b/sys/dev/dwc/dwc1000_dma.h @@ -30,95 +30,6 @@ #ifndef __DWC1000_DMA_H__ #define __DWC1000_DMA_H__ -/* TX descriptors - TDESC0 is almost unified */ -#define TDESC0_OWN (1U << 31) -#define TDESC0_IHE (1U << 16) /* IP Header Error */ -#define TDESC0_ES (1U << 15) /* Error Summary */ -#define TDESC0_JT (1U << 14) /* Jabber Timeout */ -#define TDESC0_FF (1U << 13) /* Frame Flushed */ -#define TDESC0_PCE (1U << 12) /* Payload Checksum Error */ -#define TDESC0_LOC (1U << 11) /* Loss of Carrier */ -#define TDESC0_NC (1U << 10) /* No Carrier */ -#define TDESC0_LC (1U << 9) /* Late Collision */ -#define TDESC0_EC (1U << 8) /* Excessive Collision */ -#define TDESC0_VF (1U << 7) /* VLAN Frame */ -#define TDESC0_CC_MASK 0xf -#define TDESC0_CC_SHIFT 3 /* Collision Count */ -#define TDESC0_ED (1U << 2) /* Excessive Deferral */ -#define TDESC0_UF (1U << 1) /* Underflow Error */ -#define TDESC0_DB (1U << 0) /* Deferred Bit */ -/* TX descriptors - TDESC0 extended format only */ -#define ETDESC0_IC (1U << 30) /* Interrupt on Completion */ -#define ETDESC0_LS (1U << 29) /* Last Segment */ -#define ETDESC0_FS (1U << 28) /* First Segment */ -#define ETDESC0_DC (1U << 27) /* Disable CRC */ -#define ETDESC0_DP (1U << 26) /* Disable Padding */ -#define ETDESC0_CIC_NONE (0U << 22) /* Checksum Insertion Control */ -#define ETDESC0_CIC_HDR (1U << 22) -#define ETDESC0_CIC_SEG (2U << 22) -#define ETDESC0_CIC_FULL (3U << 22) -#define ETDESC0_TER (1U << 21) /* Transmit End of Ring */ -#define ETDESC0_TCH (1U << 20) /* Second Address Chained */ - -/* TX descriptors - TDESC1 normal format */ -#define NTDESC1_IC (1U << 31) /* Interrupt on Completion */ -#define NTDESC1_LS (1U << 30) /* Last Segment */ -#define NTDESC1_FS (1U << 29) /* First Segment */ -#define NTDESC1_CIC_NONE (0U << 27) /* Checksum Insertion Control */ -#define NTDESC1_CIC_HDR (1U << 27) -#define NTDESC1_CIC_SEG (2U << 27) -#define NTDESC1_CIC_FULL (3U << 27) -#define NTDESC1_DC (1U << 26) /* Disable CRC */ -#define NTDESC1_TER (1U << 25) /* Transmit End of Ring */ -#define NTDESC1_TCH (1U << 24) /* Second Address Chained */ -/* TX descriptors - TDESC1 extended format */ -#define ETDESC1_DP (1U << 23) /* Disable Padding */ -#define ETDESC1_TBS2_MASK 0x7ff -#define ETDESC1_TBS2_SHIFT 11 /* Receive Buffer 2 Size */ -#define ETDESC1_TBS1_MASK 0x7ff -#define ETDESC1_TBS1_SHIFT 0 /* Receive Buffer 1 Size */ - -/* RX descriptor - RDESC0 is unified */ -#define RDESC0_OWN (1U << 31) -#define RDESC0_AFM (1U << 30) /* Dest. Address Filter Fail */ -#define RDESC0_FL_MASK 0x3fff -#define RDESC0_FL_SHIFT 16 /* Frame Length */ -#define RDESC0_ES (1U << 15) /* Error Summary */ -#define RDESC0_DE (1U << 14) /* Descriptor Error */ -#define RDESC0_SAF (1U << 13) /* Source Address Filter Fail */ -#define RDESC0_LE (1U << 12) /* Length Error */ -#define RDESC0_OE (1U << 11) /* Overflow Error */ -#define RDESC0_VLAN (1U << 10) /* VLAN Tag */ -#define RDESC0_FS (1U << 9) /* First Descriptor */ -#define RDESC0_LS (1U << 8) /* Last Descriptor */ -#define RDESC0_ICE (1U << 7) /* IPC Checksum Error */ -#define RDESC0_LC (1U << 6) /* Late Collision */ -#define RDESC0_FT (1U << 5) /* Frame Type */ -#define RDESC0_RWT (1U << 4) /* Receive Watchdog Timeout */ -#define RDESC0_RE (1U << 3) /* Receive Error */ -#define RDESC0_DBE (1U << 2) /* Dribble Bit Error */ -#define RDESC0_CE (1U << 1) /* CRC Error */ -#define RDESC0_PCE (1U << 0) /* Payload Checksum Error */ -#define RDESC0_RXMA (1U << 0) /* Rx MAC Address */ - -/* RX descriptors - RDESC1 normal format */ -#define NRDESC1_DIC (1U << 31) /* Disable Intr on Completion */ -#define NRDESC1_RER (1U << 25) /* Receive End of Ring */ -#define NRDESC1_RCH (1U << 24) /* Second Address Chained */ -#define NRDESC1_RBS2_MASK 0x7ff -#define NRDESC1_RBS2_SHIFT 11 /* Receive Buffer 2 Size */ -#define NRDESC1_RBS1_MASK 0x7ff -#define NRDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ - -/* RX descriptors - RDESC1 enhanced format */ -#define ERDESC1_DIC (1U << 31) /* Disable Intr on Completion */ -#define ERDESC1_RBS2_MASK 0x7ffff -#define ERDESC1_RBS2_SHIFT 16 /* Receive Buffer 2 Size */ -#define ERDESC1_RER (1U << 15) /* Receive End of Ring */ -#define ERDESC1_RCH (1U << 14) /* Second Address Chained */ -#define ERDESC1_RBS1_MASK 0x7ffff -#define ERDESC1_RBS1_SHIFT 0 /* Receive Buffer 1 Size */ - /* * A hardware buffer descriptor. Rx and Tx buffers have the same descriptor * layout, but the bits in the fields have different meanings. @@ -131,12 +42,6 @@ struct dwc_hwdesc uint32_t addr2; /* ptr to next descriptor / second buffer data*/ }; -/* - * The hardware imposes alignment restrictions on various objects involved in - * DMA transfers. These values are expressed in bytes (not bits). - */ -#define DWC_DESC_RING_ALIGN 2048 - int dma1000_init(struct dwc_softc *sc); void dma1000_free(struct dwc_softc *sc); void dma1000_start(struct dwc_softc *sc); From nobody Thu Oct 5 15:35:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGh5Bvrz4vnZJ; Thu, 5 Oct 2023 15:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGh3cv6z4d97; Thu, 5 Oct 2023 15:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EW/TUh4kl1nXCA57TpAPJb++aH68qGemMg0LF9sFqFw=; b=FcTlhXA3i/UCaGe1iRIOQ/RoVlBduljgqLCqSHsJQLm4EFqzOEMr+jl/md4U/dttE72Ute rA9olxMEiQ2hBszXWBFnznuRFYqvOle4pY/ugZBloK3+K9MHglcstnx1AOEt5VRo9A9qWK wfe/sh2TNpYcnj8ab+tIuxK0oMG8cYgsvy1ZGmHvGQ8BCicY/cDCdk30SXUEOIuKqyXG0M tPaBuAR9Vrpp7qJGP2HuPIWVEwMWYF6bN5tUbxvI7izuBXgP49LIxLMmUxOYCvbw9b3nE0 JCHO1mCmATNR0Oj2DpLr2u/x7f9pZlIqruGW0z7kCg3bIovVFtJzoANTNpSMvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520108; a=rsa-sha256; cv=none; b=xGwixul6eaDbPmKlQAm/E13PqPrEz52y2tBiAzhyMkDZQrLnxzwdKIHhoXXf9cM5Pav8+/ R6hOdskzwGsqxVPL5RwJrIfqQuRCnoJyy2cj8R/a/AYC9UFjAl2/NICJM0ikJKErOcRJ+I 7JC2LlHo2UO49MexXxORK6VKvnZPatey16MX5T7OioC3HptZzwLroMDmjXIjclrWrbd/8V NwQQ9qrrX64cgv3sgYalsyeEljMSxvMPmUmexiu5eqwOx1rvV1HeqQBnkPp17lEl45sXQP V0yaiHStcoWBPrHtKtpqUR0LsBWC2HZG2gAdhhkgokzgtXg1dCiV4KcJMB7VzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EW/TUh4kl1nXCA57TpAPJb++aH68qGemMg0LF9sFqFw=; b=KUt1i3EiXuyXBEqzDm+hdRfTyFOswdeov5FeSJKujtsPjuNpVS+DdZ1rttzL59+CR3Yphh TduJiWXEc6nj0JkyQVWJXnouK9yA0b+9NwZlagQvK7QzpFrQxJdWz6ov5W4qw73RixP4Vb snbruxBmbAg8ZgE7juT2tJBg+GNlL9UtQ1zO6Pk2azo9vnUdT195ayojeVbRxCt0+ufUiM Ky19toFeOlSjgX8ySWeJ3o/ruiZeewGEI7CuNFccm69mTeTNEUVt5ZOWOzxQVAuNDGTPBA CPL1KvbUtNEbQ5mPIBqxc/Edgy8NeXuEsqVfM8Qy8d7xyYkFM2zAfuVOa0SFxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGh2dwqz1QJk; Thu, 5 Oct 2023 15:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ8PE012786; Thu, 5 Oct 2023 15:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ8SI012783; Thu, 5 Oct 2023 15:35:08 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:08 GMT Message-Id: <202310051535.395FZ8SI012783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 29776aa436cf - main - dwc: Move interrupt related code to core and dma file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29776aa436cf248950bcf755c6a53ec0590d89bf Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=29776aa436cf248950bcf755c6a53ec0590d89bf commit 29776aa436cf248950bcf755c6a53ec0590d89bf Author: Emmanuel Vadot AuthorDate: 2023-10-03 16:04:03 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Move interrupt related code to core and dma file No functional changes intended. --- sys/dev/dwc/dwc1000_core.c | 19 +++++++++++++++++++ sys/dev/dwc/dwc1000_core.h | 2 ++ sys/dev/dwc/dwc1000_dma.c | 35 +++++++++++++++++++++++++++++++++++ sys/dev/dwc/dwc1000_dma.h | 1 + sys/dev/dwc/if_dwc.c | 38 +++++++++----------------------------- 5 files changed, 66 insertions(+), 29 deletions(-) diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c index c93019a49f3e..6cf836f87be2 100644 --- a/sys/dev/dwc/dwc1000_core.c +++ b/sys/dev/dwc/dwc1000_core.c @@ -419,3 +419,22 @@ dwc1000_harvest_stats(struct dwc_softc *sc) dwc1000_clear_stats(sc); } + +void +dwc1000_intr(struct dwc_softc *sc) +{ + uint32_t reg; + + DWC_ASSERT_LOCKED(sc); + + reg = READ4(sc, INTERRUPT_STATUS); + if (reg) + READ4(sc, SGMII_RGMII_SMII_CTRL_STATUS); +} + +void +dwc1000_intr_disable(struct dwc_softc *sc) +{ + + WRITE4(sc, INTERRUPT_ENABLE, 0); +} diff --git a/sys/dev/dwc/dwc1000_core.h b/sys/dev/dwc/dwc1000_core.h index 2069215bfffe..cb7d1f3946e9 100644 --- a/sys/dev/dwc/dwc1000_core.h +++ b/sys/dev/dwc/dwc1000_core.h @@ -39,5 +39,7 @@ void dwc1000_enable_csum_offload(struct dwc_softc *sc); void dwc1000_setup_rxfilter(struct dwc_softc *sc); void dwc1000_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr); void dwc1000_harvest_stats(struct dwc_softc *sc); +void dwc1000_intr(struct dwc_softc *softc); +void dwc1000_intr_disable(struct dwc_softc *sc); #endif /* __DWC1000_CORE_H__ */ diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index ad8bdbcfc883..3d95c9d8e764 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -810,3 +810,38 @@ dma1000_free(struct dwc_softc *sc) if (sc->txdesc_tag != NULL) bus_dma_tag_destroy(sc->txdesc_tag); } + +/* + * Interrupt function + */ + +int +dma1000_intr(struct dwc_softc *sc) +{ + uint32_t reg; + int rv; + + DWC_ASSERT_LOCKED(sc); + + rv = 0; + reg = READ4(sc, DMA_STATUS); + if (reg & DMA_STATUS_NIS) { + if (reg & DMA_STATUS_RI) + dma1000_rxfinish_locked(sc); + + if (reg & DMA_STATUS_TI) { + dma1000_txfinish_locked(sc); + dma1000_txstart(sc); + } + } + + if (reg & DMA_STATUS_AIS) { + if (reg & DMA_STATUS_FBI) { + /* Fatal bus error */ + rv = EIO; + } + } + + WRITE4(sc, DMA_STATUS, reg & DMA_STATUS_INTR_MASK); + return (rv); +} diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h index b4af29076625..96a98c2d6d51 100644 --- a/sys/dev/dwc/dwc1000_dma.h +++ b/sys/dev/dwc/dwc1000_dma.h @@ -50,5 +50,6 @@ int dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp); void dma1000_txfinish_locked(struct dwc_softc *sc); void dma1000_rxfinish_locked(struct dwc_softc *sc); void dma1000_txstart(struct dwc_softc *sc); +int dma1000_intr(struct dwc_softc *sc); #endif /* __DWC1000_DMA_H__ */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 107158cebf02..896e2f2205a0 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -300,38 +300,18 @@ static void dwc_intr(void *arg) { struct dwc_softc *sc; - uint32_t reg; + int rv; sc = arg; - DWC_LOCK(sc); - - reg = READ4(sc, INTERRUPT_STATUS); - if (reg) - READ4(sc, SGMII_RGMII_SMII_CTRL_STATUS); - - reg = READ4(sc, DMA_STATUS); - if (reg & DMA_STATUS_NIS) { - if (reg & DMA_STATUS_RI) - dma1000_rxfinish_locked(sc); - - if (reg & DMA_STATUS_TI) { - dma1000_txfinish_locked(sc); - dwc_txstart_locked(sc); - } - } - - if (reg & DMA_STATUS_AIS) { - if (reg & DMA_STATUS_FBI) { - /* Fatal bus error */ - device_printf(sc->dev, - "Ethernet DMA error, restarting controller.\n"); - dwc_stop_locked(sc); - dwc_init_locked(sc); - } + dwc1000_intr(sc); + rv = dma1000_intr(sc); + if (rv == EIO) { + device_printf(sc->dev, + "Ethernet DMA error, restarting controller.\n"); + dwc_stop_locked(sc); + dwc_init_locked(sc); } - - WRITE4(sc, DMA_STATUS, reg & DMA_STATUS_INTR_MASK); DWC_UNLOCK(sc); } @@ -706,7 +686,7 @@ dwc_detach(device_t dev) * Disable and tear down interrupts before anything else, so we don't * race with the handler. */ - WRITE4(sc, INTERRUPT_ENABLE, 0); + dwc1000_intr_disable(sc); if (sc->intr_cookie != NULL) { bus_teardown_intr(dev, sc->res[1], sc->intr_cookie); } From nobody Thu Oct 5 15:35:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGj5Yfvz4vnWw; Thu, 5 Oct 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGj4tPhz4dML; Thu, 5 Oct 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J67tjjukdvBH7qGluxyJy5PEgZxLhtMBAnLeu0UEYTA=; b=vTOKUFHF4BQPAky5B+fGnk45pVgUgotNb145x4RYFGcn9G7g0yrBd8yNy/YpsGG134GXQh J2cIENXAF2oUSX6+Q4p2XchRv1xzlr8stLElTJPRFIS5T2gH80vyfhnDPb2v3pCuslDvjE BbEAz/dflLQ8s8xD2PMGpYFVZqGMHw5MI8pJUnmKYnOYmT1+wASSJvA3KbeCeLWje2Io2z UVN3Zm+MhMCseh4XfLgNqJPMeIFBzD2Rnz2WD7oMCAdIEyAXOKtvmsmYkZoV6JcVm02pvc 2ov/FTpjnmIdubQmwRMkJ8INSmUw8FBIEDEPxYl4d54G+x7SvJNjkV3Lb8cdBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520109; a=rsa-sha256; cv=none; b=tKgvmktytz8PROz1d/Zm6wsaLpCaITUPPxh1/JJVL2gBc3ax/U2cWWQBkLQ+iSbB0qVhgi +OVFKUMmz5J2bt5EdKBOSxVX2TieWVtDIIkFOY4+ljpOxJDMQDWsWKzkjkuDI8QrPs8Tg4 p7zId/fFCR/3nNdk58+I2itGheHk6wlG0X6VW1yJJ5p99Bs8DL3ooGANU8efIuY5qRIIlm 1Er6LBxtsX7+dI7iOImkRtTYSuduD/XdTw3/okfXYBxdv5948laukTfKyJj+kLfJMjl1bQ tUkvDDILIAawzveVQy0f8Hz2bkQL7oZbJHesC/EhLA34GfjYxSBwcLb4vEwGvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J67tjjukdvBH7qGluxyJy5PEgZxLhtMBAnLeu0UEYTA=; b=uIk2OSMKK4hjBKZrxRJ0m9MDCiH4HEON7sRIcP6M7qiyVuGYzZYK5ql+yd+SG5ZUppB9Gd 2PRU4/0BnfNh3OSNokxhZaDJJ6fmeWmYsroTlj/duD3J8cYPgJ9bWSJbi2z4pcj3XI3pza HJTmzrC6oqZlF72Rnm1NNrxls0ncJb4CLSeMmk+Wlyv1tRO3JyDMiTiAggTpszmweoXyYj TTCc7TB/QeWaJ0G3u4OhHVL5viOkNisdz4hXelLSNymx81QAsG3Aa7pYl3Wh9HdMxP+RNX 1CKZubm7rO1ihHpKyzLgNHRD3nvH2IwftPjrLY6hgEQ4d7TqWQae87lUZSqjfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGj3tNSz1PGp; Thu, 5 Oct 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZ9dn012841; Thu, 5 Oct 2023 15:35:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZ9Hr012838; Thu, 5 Oct 2023 15:35:09 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:09 GMT Message-Id: <202310051535.395FZ9Hr012838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f0a7dd770312 - main - dwc: Setup desc addresses in the dma init function. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0a7dd7703124af42da3705bb11e785c0eb9f0c4 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a7dd7703124af42da3705bb11e785c0eb9f0c4 commit f0a7dd7703124af42da3705bb11e785c0eb9f0c4 Author: Emmanuel Vadot AuthorDate: 2023-10-03 16:46:56 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Setup desc addresses in the dma init function. --- sys/dev/dwc/dwc1000_dma.c | 11 +++++++++++ sys/dev/dwc/if_dwc.c | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 3d95c9d8e764..cdfd24afd574 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -605,10 +605,18 @@ int dma1000_init(struct dwc_softc *sc) { struct mbuf *m; + uint32_t reg; int error; int nidx; int idx; + /* + * DMA must be stop while changing descriptor list addresses. + */ + reg = READ4(sc, OPERATION_MODE); + reg &= ~(MODE_ST | MODE_SR); + WRITE4(sc, OPERATION_MODE, reg); + /* * Set up TX descriptor ring, descriptors, and dma maps. */ @@ -684,6 +692,8 @@ dma1000_init(struct dwc_softc *sc) for (idx = 0; idx < TX_DESC_COUNT; idx++) dwc_setup_txdesc(sc, idx, 0, 0, 0, false, false); + WRITE4(sc, TX_DESCR_LIST_ADDR, sc->txdesc_ring_paddr); + /* * Set up RX descriptor ring, descriptors, dma maps, and mbufs. */ @@ -758,6 +768,7 @@ dma1000_init(struct dwc_softc *sc) goto out; } } + WRITE4(sc, RX_DESCR_LIST_ADDR, sc->rxdesc_ring_paddr); out: if (error != 0) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 896e2f2205a0..0df99a7c205c 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -610,22 +610,11 @@ dwc_attach(device_t dev) WRITE4(sc, BUS_MODE, reg); - /* - * DMA must be stop while changing descriptor list addresses. - */ - reg = READ4(sc, OPERATION_MODE); - reg &= ~(MODE_ST | MODE_SR); - WRITE4(sc, OPERATION_MODE, reg); - if (dma1000_init(sc)) { bus_release_resources(dev, dwc_spec, sc->res); return (ENXIO); } - /* Setup addresses */ - WRITE4(sc, RX_DESCR_LIST_ADDR, sc->rxdesc_ring_paddr); - WRITE4(sc, TX_DESCR_LIST_ADDR, sc->txdesc_ring_paddr); - mtx_init(&sc->mtx, device_get_nameunit(sc->dev), MTX_NETWORK_LOCK, MTX_DEF); From nobody Thu Oct 5 15:35:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGk68qqz4vnX2; Thu, 5 Oct 2023 15:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGk5c6Yz4dQ3; Thu, 5 Oct 2023 15:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y3eRb1/0jKw2wsws9XRaB3wKt6EYgnMfaPl4iNnyejE=; b=W8iWVLWtu1C6nsRzg+9BBDkHzm4Fhpd6ItvKKXbMKa8fiqiOTxX3ZERTLWEeZwI+qwseqs GWEU174VDEnDmtjxcBuJ1rHhkDGzXfViKLhu08TtKeHeiy3tFItV6M2b8s4DNj6yBWvh4X rkgfW0hTzdLBS0kQvZDZIMwGiNCh4cG/dpawCOX6kkWDBNGtmey7pg/4qGXhKKhzu02Evf RpVZuYs5FoiONYuk0pJMt0V7MhGPooCtm6N3+0zkOUkoyh8DsPk+m33jfS/Ct/zmOTEoMG 7v+bDbG2dNcZDgcldIJ0R8Je2UkFX9mMHSg6FA/lhmCWpyL0cZw/H+5EH1CmWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520110; a=rsa-sha256; cv=none; b=PCuQ66GZYm9Qtds2GKqe4RlX8lL7S2T9OjxDmW+JFXIdTqIKTRROxeyJrC4QmbUd6Me1Yt h3p90EK/GJCxwgmA3LBN1WU2xTqOnxsJXoiHN3/B49jtpJfgO/LD8GqI3lBxzppgaER+Zw sq0v6lnKwu/qSLPpkiTZe2k29bXSZJYvKoGeaIrAAI9ypx0zyKh35dxKJDcco0fnu5P3NK gfkVApB35PBtbCnxmvAslPaCMH/OHZtYSN0csannpdEnhyQmLOZw+9XLX7BUqtlc6Z6ViX H+D80JMVXZTwKHx2IvYpv4dWAp7AicTPuMhLzE1dG0mzihPfkMg7X/uZl8Y75g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y3eRb1/0jKw2wsws9XRaB3wKt6EYgnMfaPl4iNnyejE=; b=jA4e2tXA4wPSAFpESC63crvPeCDsmMGvV2Io6MEQyRNb4gEpaOJuBJg3eIoSAWgvfn9wDA RoOhw9X7kZCIsPvwcvecNW64GUjlG2X/E3UR6Dx3rPmeX5/TA1eaOoikgJUGfH/OP+91jT PpZFPSpdSpoxq8yvhYKL5MaGutSUw+mYBlYhAynld1RZfzSOoZch+EgmTf4uNRQ1gz3uR0 CvFaz1jmfdo6unX1y5rx2zPq694hnDYIcx5Os04Ph18G4oiRpAJfgt8HGb8r94sUyTnlI2 JMu/g6GenubzOh4X1l+t7pcj2xvRuTbNvenQc13Q4X2ZMyuCKVleHM7Zzo5c0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGk4hnsz1QCW; Thu, 5 Oct 2023 15:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZA4U012894; Thu, 5 Oct 2023 15:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZAkY012891; Thu, 5 Oct 2023 15:35:10 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:10 GMT Message-Id: <202310051535.395FZAkY012891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 363b7c39fbad - main - dwc: Move the dma reset code in dwc1000_dma.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 363b7c39fbad7c03f46e24bb4e435fad5cb56aa7 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=363b7c39fbad7c03f46e24bb4e435fad5cb56aa7 commit 363b7c39fbad7c03f46e24bb4e435fad5cb56aa7 Author: Emmanuel Vadot AuthorDate: 2023-10-04 05:55:11 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Move the dma reset code in dwc1000_dma.c No functional changes intended --- sys/dev/dwc/dwc1000_core.h | 1 + sys/dev/dwc/dwc1000_dma.c | 24 +++++++++++++++++++++++- sys/dev/dwc/dwc1000_dma.h | 1 + sys/dev/dwc/if_dwc.c | 21 +++++---------------- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/sys/dev/dwc/dwc1000_core.h b/sys/dev/dwc/dwc1000_core.h index cb7d1f3946e9..ade5270e25b1 100644 --- a/sys/dev/dwc/dwc1000_core.h +++ b/sys/dev/dwc/dwc1000_core.h @@ -34,6 +34,7 @@ int dwc1000_miibus_read_reg(device_t dev, int phy, int reg); int dwc1000_miibus_write_reg(device_t dev, int phy, int reg, int val); void dwc1000_miibus_statchg(device_t dev); void dwc1000_core_setup(struct dwc_softc *sc); +int dwc1000_core_reset(struct dwc_softc *sc); void dwc1000_enable_mac(struct dwc_softc *sc, bool enable); void dwc1000_enable_csum_offload(struct dwc_softc *sc); void dwc1000_setup_rxfilter(struct dwc_softc *sc); diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index cdfd24afd574..25916404bb63 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -61,7 +61,7 @@ #include #define WATCHDOG_TIMEOUT_SECS 5 - +#define DMA_RESET_TIMEOUT 100 /* TX descriptors - TDESC0 is almost unified */ #define TDESC0_OWN (1U << 31) @@ -598,6 +598,28 @@ dma1000_stop(struct dwc_softc *sc) WRITE4(sc, OPERATION_MODE, reg); } +int +dma1000_reset(struct dwc_softc *sc) +{ + uint32_t reg; + int i; + + reg = READ4(sc, BUS_MODE); + reg |= (BUS_MODE_SWR); + WRITE4(sc, BUS_MODE, reg); + + for (i = 0; i < DMA_RESET_TIMEOUT; i++) { + if ((READ4(sc, BUS_MODE) & BUS_MODE_SWR) == 0) + break; + DELAY(10); + } + if (i >= DMA_RESET_TIMEOUT) { + return (ENXIO); + } + + return (0); +} + /* * Create the bus_dma resources */ diff --git a/sys/dev/dwc/dwc1000_dma.h b/sys/dev/dwc/dwc1000_dma.h index 96a98c2d6d51..f0d22a67617f 100644 --- a/sys/dev/dwc/dwc1000_dma.h +++ b/sys/dev/dwc/dwc1000_dma.h @@ -46,6 +46,7 @@ int dma1000_init(struct dwc_softc *sc); void dma1000_free(struct dwc_softc *sc); void dma1000_start(struct dwc_softc *sc); void dma1000_stop(struct dwc_softc *sc); +int dma1000_reset(struct dwc_softc *sc); int dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp); void dma1000_txfinish_locked(struct dwc_softc *sc); void dma1000_rxfinish_locked(struct dwc_softc *sc); diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 0df99a7c205c..a3ce32c95cb9 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -78,8 +78,6 @@ #include "gpio_if.h" #include "miibus_if.h" -#define MAC_RESET_TIMEOUT 100 - static struct resource_spec dwc_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -499,7 +497,7 @@ dwc_attach(device_t dev) uint8_t macaddr[ETHER_ADDR_LEN]; struct dwc_softc *sc; if_t ifp; - int error, i; + int error; uint32_t reg; uint32_t txpbl, rxpbl, pbl; bool nopblx8 = false; @@ -581,19 +579,10 @@ dwc_attach(device_t dev) } /* Reset */ - reg = READ4(sc, BUS_MODE); - reg |= (BUS_MODE_SWR); - WRITE4(sc, BUS_MODE, reg); - - for (i = 0; i < MAC_RESET_TIMEOUT; i++) { - if ((READ4(sc, BUS_MODE) & BUS_MODE_SWR) == 0) - break; - DELAY(10); - } - if (i >= MAC_RESET_TIMEOUT) { - device_printf(sc->dev, "Can't reset DWC.\n"); - bus_release_resources(dev, dwc_spec, sc->res); - return (ENXIO); + if ((error = dma1000_reset(sc)) != 0) { + device_printf(sc->dev, "Can't reset DMA controller.\n"); + bus_release_resources(sc->dev, dwc_spec, sc->res); + return (error); } reg = BUS_MODE_USP; From nobody Thu Oct 5 15:35:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGm17XVz4vncg; Thu, 5 Oct 2023 15:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGm045qz4dn9; Thu, 5 Oct 2023 15:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3+8R8M/aN1UMQrr37msZDIKRYJnVeD4xTpD5Wm0+/4=; b=noUGRhAqveNnQa6oNY6ZxQjzAI7mfVCrFDXWRbI5g/9AtSr4e2ThzR4mXYhWrdKQo+n8JV dfhWqrpP3cPsa4a1jn2PecUrTMnziWeV+33MSzOeJILdx3ZEnv6kOa6XZXnzHjA/bDUUUz CiuAdVwDleUi1Pe6HO00sBm+t+XYXw2azNjrfddWVOJkGPc2CHkZE/aDe5zbfMShCJ6vh8 YYcVIaf44HVUbZ1b1IEFjPw02j8sXwuVPo6kk8BCmacY7tp+qETtu2kNR3bFezdScN9swk npia/cLgNteESYW56HugZ0y76nieO4RUMbIJHQSnTSjv1YjHIT65fBZy7VX0Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520112; a=rsa-sha256; cv=none; b=illOik56hgssX/itRE7JqVq3jzIp6NAzL2qtWvkivP6YGv1+EorMP1SmwzDR9ev5EqKqAa y97INn7ttZPSGIZ+F70SrvESwIcXVmT+BiUjp5Nmc3vOu3JlXg7vBmbe9gpvEFLHu95wuo kiIy7QUj6SrpcLJNe2tvrx6aNMjsB4l9fZHeOcR6MRHn3AcbTQMaH4+8OPFTfVWurQProi 8FIBqysRdyMa5kpRCyzSlfCSKLjFCLu020Nr240LUvgKC5bc8ZH3YMhdzMBEwS+KuKdLIW U2m4c1POTPY+VBjmF+QOGVZ+MHVg/Eiz01wJ77WZ9B7sMWqepgWlLadJetZn5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3+8R8M/aN1UMQrr37msZDIKRYJnVeD4xTpD5Wm0+/4=; b=P2Ou+9ZCJ2xsOvu7rd5teik9JzgK9R9AytP9o+wrveJyri+Kmjadn68Gc0fnbL5CEQsluM NFBFk+xpYcMWMEDd0LbboVFq3oAHMnqcANgNJWMalDzNrBFbPitaF6XsqC/yXatsB5PSXt Oq4ebHRR+h7VlG3TQx+TLhxJ0BZegew3aTworXhfBeZuQRUghiNgCiy+UbnYzYoXmA61fh iSzS2eaxKWOMHVIQmMbKJq5MuKPVkLOXvXWEaXN86r5TeCdIefju86MbSqUXNs393rjr6c v0WYX6Snh4AKceN/qmiJW0ooFvsf6F5zQLg0YarNgUJ4FDMeoJyI7Jyj/Zlvsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGl5xnmz1Q70; Thu, 5 Oct 2023 15:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZB9Q012946; Thu, 5 Oct 2023 15:35:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZB05012943; Thu, 5 Oct 2023 15:35:11 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:11 GMT Message-Id: <202310051535.395FZB05012943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5d88a52be44a - main - dwc: Move dma engine configuration to dwc1000_dma.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d88a52be44a98e2b49db7ead317b2d0b2ef9eaa Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5d88a52be44a98e2b49db7ead317b2d0b2ef9eaa commit 5d88a52be44a98e2b49db7ead317b2d0b2ef9eaa Author: Emmanuel Vadot AuthorDate: 2023-10-04 16:19:26 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Move dma engine configuration to dwc1000_dma.c No functional changes intended. --- sys/dev/dwc/dwc1000_dma.c | 14 ++++++++++++++ sys/dev/dwc/if_dwc.c | 37 +++++++++---------------------------- sys/dev/dwc/if_dwcvar.h | 8 ++++++++ 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 25916404bb63..16b2b2a3241d 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -632,6 +632,20 @@ dma1000_init(struct dwc_softc *sc) int nidx; int idx; + reg = BUS_MODE_USP; + if (!sc->nopblx8) + reg |= BUS_MODE_EIGHTXPBL; + reg |= (sc->txpbl << BUS_MODE_PBL_SHIFT); + reg |= (sc->rxpbl << BUS_MODE_RPBL_SHIFT); + if (sc->fixed_burst) + reg |= BUS_MODE_FIXEDBURST; + if (sc->mixed_burst) + reg |= BUS_MODE_MIXEDBURST; + if (sc->aal) + reg |= BUS_MODE_AAL; + + WRITE4(sc, BUS_MODE, reg); + /* * DMA must be stop while changing descriptor list addresses. */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index a3ce32c95cb9..0e18d57a4c23 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -498,12 +498,7 @@ dwc_attach(device_t dev) struct dwc_softc *sc; if_t ifp; int error; - uint32_t reg; - uint32_t txpbl, rxpbl, pbl; - bool nopblx8 = false; - bool fixed_burst = false; - bool mixed_burst = false; - bool aal = false; + uint32_t pbl; sc = device_get_softc(dev); sc->dev = dev; @@ -534,18 +529,18 @@ dwc_attach(device_t dev) if (OF_getencprop(sc->node, "snps,pbl", &pbl, sizeof(uint32_t)) <= 0) pbl = BUS_MODE_DEFAULT_PBL; - if (OF_getencprop(sc->node, "snps,txpbl", &txpbl, sizeof(uint32_t)) <= 0) - txpbl = pbl; - if (OF_getencprop(sc->node, "snps,rxpbl", &rxpbl, sizeof(uint32_t)) <= 0) - rxpbl = pbl; + if (OF_getencprop(sc->node, "snps,txpbl", &sc->txpbl, sizeof(uint32_t)) <= 0) + sc->txpbl = pbl; + if (OF_getencprop(sc->node, "snps,rxpbl", &sc->rxpbl, sizeof(uint32_t)) <= 0) + sc->rxpbl = pbl; if (OF_hasprop(sc->node, "snps,no-pbl-x8") == 1) - nopblx8 = true; + sc->nopblx8 = true; if (OF_hasprop(sc->node, "snps,fixed-burst") == 1) - fixed_burst = true; + sc->fixed_burst = true; if (OF_hasprop(sc->node, "snps,mixed-burst") == 1) - mixed_burst = true; + sc->mixed_burst = true; if (OF_hasprop(sc->node, "snps,aal") == 1) - aal = true; + sc->aal = true; error = clk_set_assigned(dev, ofw_bus_get_node(dev)); if (error != 0) { @@ -585,20 +580,6 @@ dwc_attach(device_t dev) return (error); } - reg = BUS_MODE_USP; - if (!nopblx8) - reg |= BUS_MODE_EIGHTXPBL; - reg |= (txpbl << BUS_MODE_PBL_SHIFT); - reg |= (rxpbl << BUS_MODE_RPBL_SHIFT); - if (fixed_burst) - reg |= BUS_MODE_FIXEDBURST; - if (mixed_burst) - reg |= BUS_MODE_MIXEDBURST; - if (aal) - reg |= BUS_MODE_AAL; - - WRITE4(sc, BUS_MODE, reg); - if (dma1000_init(sc)) { bus_release_resources(dev, dwc_spec, sc->res); return (ENXIO); diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index 8a4b941297d0..2481b5c220bf 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -81,6 +81,14 @@ struct dwc_softc { hwreset_t rst_stmmaceth; hwreset_t rst_ahb; + /* DMA config */ + uint32_t txpbl; /* TX Burst lenght */ + uint32_t rxpbl; /* RX Burst lenght */ + bool nopblx8; + bool fixed_burst; + bool mixed_burst; + bool aal; + /* RX */ bus_dma_tag_t rxdesc_tag; bus_dmamap_t rxdesc_map; From nobody Thu Oct 5 15:35:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGn2VZxz4vnNy; Thu, 5 Oct 2023 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGn10Wnz4dnM; Thu, 5 Oct 2023 15:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBohuhs2sFnHoz3vFVR7Bh6ij6aRWUNEKwVmhNvUUfA=; b=AoZQVjuKbgfyBL+WPpYjtdglgK5WueEBs0wkxQOoZFfZM4m4k56PWxS9ml8tpd0l2HDSZp 38DIfCoFHkp6izAxECS+Uu7LCO4ESPbPr4N4S6TYSxZ2lnv/2h2cT1l+uqm7SuI1Fuyy+0 oiM98lgJmBeFELWx7yS20yi1nTCCN2KiXcP4WSMy7LJf8mWKU6QQVb1RUdz1BQCsfFfCGJ MPDs5eHTGH28SHMsTjvgWmg5DtVeWEjjZRQKPKNqo0Wcdx+P3ZwhjGdFku+DdiGRy3HtRO V4t7izEQvUyAfnSfcRHYxmfeoxkvdGo6ilhNRJhQ1dRNGWmli/tCNlyoXAGSdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520113; a=rsa-sha256; cv=none; b=QjPXVnjA2RaBew6uVEQAndob6Fbx5Qo777PDJC5sVuc8KUBOrcu7Ttk89eq281zu2aOzpz hGpaiMmjGgrS2zWZgSNRao1LlmPSaKBEYslLW+8xRPko+IKfJNk8FLMYghZYdwWtR/r0W3 e5A6gPH/I9FUwqi1NRZdpqtstEmRQA9iP6/pKgO4RWv9Q+3TIBCqmtvhcXu2Ka0zCUSU2G JO1eW+n98UGyPyTbBfr4vBa9hGn23v3D1JAOUOcny8K7+g314Du1ulQ1hx+g91i/OGKtzR x7mmlu95clBlPU9Lo5uFkNp/rxork8dVq8Aeo8l+ML7Y9OX3h6XyP14oxV3yPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBohuhs2sFnHoz3vFVR7Bh6ij6aRWUNEKwVmhNvUUfA=; b=KbgWCHnDTLq0A9o2wYGS5X7BIAQft0/dJbD6S7xlDM2peXwt96Sifo0f2nknQwbEOdzEWx YqS7iVyScuPHLUaPsXu+5bBgyco3WwoFqQaXJvoO/ncqX3G1pr8wUEAjfQMSYxOuY9m0ad LKnamr6ljQ2TtHv8vHcjyDis+ajLAoDp/dSTNBR46giuU7XdWJaXvhp1yJavo9+hxhq9Qf JH7Z/UoHc7wBG0jU0Hbn6GTnUMlOz03JjsUQhjXE5+LSNdGfWswq2SzWEEzuoDbxkWDj4Q SE7TlU8sj75m6hmuk1EFWLqXKzkEEJHjaS6ZkMLseAkLzWjJpWY9KLtb3xK8lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGm6vDjz1QCX; Thu, 5 Oct 2023 15:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZCmB013000; Thu, 5 Oct 2023 15:35:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZCZO012997; Thu, 5 Oct 2023 15:35:12 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:12 GMT Message-Id: <202310051535.395FZCZO012997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 801fb66a7e34 - main - dwc: Do not re-invent phy mode type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 801fb66a7e34c340f23d82f2b375feee4bd87df4 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=801fb66a7e34c340f23d82f2b375feee4bd87df4 commit 801fb66a7e34c340f23d82f2b375feee4bd87df4 Author: Emmanuel Vadot AuthorDate: 2023-10-04 16:29:11 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Do not re-invent phy mode type Directly uses the MII_CONTYPE_* No functional changes intended. --- sys/dev/dwc/dwc1000_reg.h | 5 ----- sys/dev/dwc/if_dwc.c | 8 ++------ sys/dev/dwc/if_dwc_aw.c | 9 +++++++-- sys/dev/dwc/if_dwc_rk.c | 24 ++++++++++++++++-------- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/sys/dev/dwc/dwc1000_reg.h b/sys/dev/dwc/dwc1000_reg.h index 1f0957b688ac..40ba8156ea5d 100644 --- a/sys/dev/dwc/dwc1000_reg.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -34,11 +34,6 @@ #ifndef __DWC1000_REG_H__ #define __DWC1000_REG_H__ -#define PHY_MODE_UNKNOWN 0x0 -#define PHY_MODE_RMII 0x1 -#define PHY_MODE_RGMII 0x2 -#define PHY_MODE_MII 0x3 - #define MAC_CONFIGURATION 0x0 #define CONF_JD (1 << 22) /* jabber timer disable */ #define CONF_BE (1 << 21) /* Frame Burst Enable */ diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 0e18d57a4c23..58e4d3cd5a6b 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -509,18 +509,14 @@ dwc_attach(device_t dev) sc->mactype = IF_DWC_MAC_TYPE(dev); sc->node = ofw_bus_get_node(dev); - switch (mii_fdt_get_contype(sc->node)) { + sc->phy_mode = mii_fdt_get_contype(sc->node); + switch (sc->phy_mode) { case MII_CONTYPE_RGMII: case MII_CONTYPE_RGMII_ID: case MII_CONTYPE_RGMII_RXID: case MII_CONTYPE_RGMII_TXID: - sc->phy_mode = PHY_MODE_RGMII; - break; case MII_CONTYPE_RMII: - sc->phy_mode = PHY_MODE_RMII; - break; case MII_CONTYPE_MII: - sc->phy_mode = PHY_MODE_MII; break; default: device_printf(dev, "Unsupported MII type\n"); diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index e6cf30f91fc3..5ad1d14b385b 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -36,6 +36,8 @@ #include +#include + #include #include @@ -76,10 +78,13 @@ a20_if_dwc_init(device_t dev) /* Configure PHY for MII or RGMII mode */ switch(sc->phy_mode) { - case PHY_MODE_RGMII: + case MII_CONTYPE_RGMII: + case MII_CONTYPE_RGMII_ID: + case MII_CONTYPE_RGMII_RXID: + case MII_CONTYPE_RGMII_TXID: tx_parent_name = "gmac_int_tx"; break; - case PHY_MODE_MII: + case MII_CONTYPE_MII: tx_parent_name = "mii_phy_tx"; break; default: diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index d05352a27793..51edd2450b42 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -38,6 +38,8 @@ #include #include +#include + #include #include @@ -175,7 +177,7 @@ rk3328_set_delays(struct if_dwc_rk_softc *sc) uint32_t reg; uint32_t tx, rx; - if (sc->base.phy_mode != PHY_MODE_RGMII) + if (!mii_contype_is_rgmii(sc->base.phy_mode)) return; reg = SYSCON_READ_4(sc->grf, RK3328_GRF_MAC_CON0); @@ -210,7 +212,10 @@ rk3328_set_speed(struct if_dwc_rk_softc *sc, int speed) uint32_t reg; switch (sc->base.phy_mode) { - case PHY_MODE_RGMII: + case MII_CONTYPE_RGMII: + case MII_CONTYPE_RGMII_ID: + case MII_CONTYPE_RGMII_RXID: + case MII_CONTYPE_RGMII_TXID: switch (speed) { case IFM_1000_T: case IFM_1000_SX: @@ -230,7 +235,7 @@ rk3328_set_speed(struct if_dwc_rk_softc *sc, int speed) SYSCON_WRITE_4(sc->grf, RK3328_GRF_MAC_CON1, ((MAC_CON1_GMAC2IO_GMII_CLK_SEL_MASK << 16) | reg)); break; - case PHY_MODE_RMII: + case MII_CONTYPE_RMII: switch (speed) { case IFM_100_TX: reg = MAC_CON1_GMAC2IO_RMII_CLK_SEL_25 | @@ -260,12 +265,15 @@ rk3328_set_phy_mode(struct if_dwc_rk_softc *sc) { switch (sc->base.phy_mode) { - case PHY_MODE_RGMII: + case MII_CONTYPE_RGMII: + case MII_CONTYPE_RGMII_ID: + case MII_CONTYPE_RGMII_RXID: + case MII_CONTYPE_RGMII_TXID: SYSCON_WRITE_4(sc->grf, RK3328_GRF_MAC_CON1, ((MAC_CON1_GMAC2IO_INTF_SEL_MASK | MAC_CON1_GMAC2IO_RMII_MODE_MASK) << 16) | MAC_CON1_GMAC2IO_INTF_RGMII); break; - case PHY_MODE_RMII: + case MII_CONTYPE_RMII: SYSCON_WRITE_4(sc->grf, sc->integrated_phy ? RK3328_GRF_MAC_CON2 : RK3328_GRF_MAC_CON1, ((MAC_CON1_GMAC2IO_INTF_SEL_MASK | MAC_CON1_GMAC2IO_RMII_MODE_MASK) << 16) | MAC_CON1_GMAC2IO_INTF_RMII | MAC_CON1_GMAC2IO_RMII_MODE); @@ -286,7 +294,7 @@ rk3399_set_delays(struct if_dwc_rk_softc *sc) { uint32_t reg, tx, rx; - if (sc->base.phy_mode != PHY_MODE_RGMII) + if (!mii_contype_is_rgmii(sc->base.phy_mode)) return; reg = SYSCON_READ_4(sc->grf, RK3399_GRF_SOC_CON6); @@ -416,7 +424,7 @@ if_dwc_rk_init_clocks(device_t dev) /* Optional clock */ clk_get_by_ofw_name(dev, 0, "clk_mac_speed", &sc->clk_mac_speed); - if (sc->base.phy_mode == PHY_MODE_RMII) { + if (sc->base.phy_mode == MII_CONTYPE_RMII) { if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &sc->mac_clk_rx) != 0) { device_printf(sc->base.dev, "could not get mac_clk_rx clock\n"); sc->mac_clk_rx = NULL; @@ -448,7 +456,7 @@ if_dwc_rk_init_clocks(device_t dev) } } - if (sc->base.phy_mode == PHY_MODE_RMII) { + if (sc->base.phy_mode == MII_CONTYPE_RMII) { if (sc->mac_clk_rx) clk_enable(sc->mac_clk_rx); if (sc->clk_mac_ref) From nobody Thu Oct 5 15:35:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGp5vfkz4vnP1; Thu, 5 Oct 2023 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGp1ny0z4dqr; Thu, 5 Oct 2023 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6ih19D3QBtOVksL6MXu3NjhtpNj/4MjAsVgDMf2WY0=; b=K1Q7fFSFpOfrZyxE+bXMErhG5CyY8Tzob7eoO5WwJjzn6oYoOl19gQ7PM/c8nG1lxgc5Vf 0YNCfxQSjSN61Q0hXr8IGAf6AyyBuzs9E5I1giy8B1jjk4B8dQIQ60JNTPb53sTQRDEkGa /hUbFeJtZJjyijCYJUGleKDXDVlhg3wQkPeOhCjTir7Am1xglUFKUjArD/5WbhIDz6uwiy wjmBJohmgiUrdHA2faCLCQc1jZFw37nt6j6tb8ZWYaE9KU8IzcHZ6WnOT9tGOB4+HBoWWa Parlue+yHsZ8orkz/iKS3KcbFfvR8hvzUY6o9RhNOPilnaqJbrYULZGmqFkdvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520114; a=rsa-sha256; cv=none; b=TI0vFP4VVALXRVHseKAs8gFDzdFhZK+YtM+3csBPDOq222q9bP2p/mBytVHfIiGw1gkpTV 0dpPQU1FaacIcPXUQwpLX3u1cKXnzPCsDjJVf1Ij9Kl4GeaDy36b7AYfeP/4gIOfDzezF9 mPaxXbZTQeJ/WYd1lM/7GcakJ4SQqHN2hSFoRj5LqZYDy0w/kE4PLjKgCo+htZCAtfezvK EssP+EzwTt8YUyKAQ5uxhVxR9hdw6F85pOtao96f5g5MBVp+2fuNrQKHFRLMrdhJNqTijo M83gINgjqBTzPr9DsQI07WDSwoWm0MbuD2UO6THqJnEGTKKHtBGB15R9joOh0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6ih19D3QBtOVksL6MXu3NjhtpNj/4MjAsVgDMf2WY0=; b=ZeqdNsdboRU3sDFCe0tTtbezMgf2b1BMSwipJwxz/bippzs0c+11gN2NRxxl8Fo9FmLDCj j4Gwt++cCjQCqnuOU7KVIdtElDvVrT7ZIxB6J043lhRzNf5WdTXWLrvGLYlXNy5hL/NT+O MM5M/5VAoAanXrXNm9JbqDAXTX8JsBdJ3Ng4SEuNKBbs+XknYTE6gq0jQrp5KmxIE/QSYO bFHXc0ppn0iv9bfddg3m2R376z3Snoeb75CmRD4h7G4mvRD6EVY/yevRM//nCJQw5S/WKI 5Pj02fiLYqRYryQu9NvaPTJq4BlvLOO/90RmhO4GvXJnGGI6JDrs/DkT5m7PNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGp0rbyz1QJl; Thu, 5 Oct 2023 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZDMh013042; Thu, 5 Oct 2023 15:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZDRH013039; Thu, 5 Oct 2023 15:35:13 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:13 GMT Message-Id: <202310051535.395FZDRH013039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: cef444d068ff - main - dwc: Move BUS_MODE_DEFAULT_PBL; in if_dwcvar.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cef444d068ff95e51d2b1c60a60cde632764c7b3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cef444d068ff95e51d2b1c60a60cde632764c7b3 commit cef444d068ff95e51d2b1c60a60cde632764c7b3 Author: Emmanuel Vadot AuthorDate: 2023-10-04 18:21:24 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Move BUS_MODE_DEFAULT_PBL; in if_dwcvar.h And rename it to DMA_DEFAULT_PBL, this is the default for all (most ?) dma engine that dwc should support. While here stop including dwc1000_reg.h in if_dwc.c, we don't need it anymore. No functional changes intended. --- sys/dev/dwc/dwc1000_reg.h | 1 - sys/dev/dwc/if_dwc.c | 3 +-- sys/dev/dwc/if_dwcvar.h | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dwc/dwc1000_reg.h b/sys/dev/dwc/dwc1000_reg.h index 40ba8156ea5d..768da530bf7c 100644 --- a/sys/dev/dwc/dwc1000_reg.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -226,7 +226,6 @@ #define BUS_MODE_PRIORXTX_11 0 #define BUS_MODE_PBL_SHIFT 8 /* Single block transfer size */ #define BUS_MODE_SWR (1 << 0) /* Reset */ -#define BUS_MODE_DEFAULT_PBL 8 #define TRANSMIT_POLL_DEMAND 0x1004 #define RECEIVE_POLL_DEMAND 0x1008 #define RX_DESCR_LIST_ADDR 0x100C diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 58e4d3cd5a6b..9e17d67d434d 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -70,7 +70,6 @@ #include #include -#include #include #include @@ -524,7 +523,7 @@ dwc_attach(device_t dev) } if (OF_getencprop(sc->node, "snps,pbl", &pbl, sizeof(uint32_t)) <= 0) - pbl = BUS_MODE_DEFAULT_PBL; + pbl = DMA_DEFAULT_PBL; if (OF_getencprop(sc->node, "snps,txpbl", &sc->txpbl, sizeof(uint32_t)) <= 0) sc->txpbl = pbl; if (OF_getencprop(sc->node, "snps,rxpbl", &sc->rxpbl, sizeof(uint32_t)) <= 0) diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index 2481b5c220bf..ca0a91d6bf12 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -48,6 +48,8 @@ #define TX_DESC_SIZE (sizeof(struct dwc_hwdesc) * TX_DESC_COUNT) #define TX_MAP_MAX_SEGS 32 +#define DMA_DEFAULT_PBL 8 + struct dwc_bufmap { bus_dmamap_t map; struct mbuf *mbuf; From nobody Thu Oct 5 15:35:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bGq3Rfvz4vnX8; Thu, 5 Oct 2023 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bGq2Rdwz4dyq; Thu, 5 Oct 2023 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=blrq6vEuZl9xhk5SH2C/0TuhPHpkEyTp1dhghMXgnjc=; b=EQ9pwr42l7VDg9Z+qqg2wkDfYETcLutVd5aWSmwU+1Ei3FaY0/cOGSzBZx6l5z6j7V+6w6 c2qPkfGRQmd3IQM1o74ckxigjB+N4BTgxZdCgaY83iFgx1mEZZYxIOwtRtz8lC9zoF/ytv jbS6d7pdL131cj0vpmyBTgVP0WkyZPqwZS1Fd1efZsfPgOmdUYhO3Sap+UICL1mpkT1Hsx a6X1z7oFzHHZvZD+SnJGs1gVDOmEVWb/5OlDfL5C2YPfWv+ajuKevodiswoVGknjvOXqx4 Z1UmCv9HmbIIOWChq8CTtY1d45IpaDRGegV9yNdB+qTHwyD+jSzfYneZ3hGtbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520115; a=rsa-sha256; cv=none; b=XnA7oxmhDrz4lPnZnJRge2xomCRIBQm6JFHUL84nzFLqnUpa57aGsprxnQdZ8Z9ahbRshv 4d2Nx8uw4QC4PxsZyTL7EnKIASa0+tLAFvH/fo+6G87AZkK4jtyrp3ou2w5ZJili4RpUIY exmQtWAM2fcLX0K1CbficqiMYzUhFr6SOR25ju7YgWC+YHwYzptIC5TVpKRFLjVZnBUiDD /fZBnZJNPh0cmebcl0YA5m6wDLC+vujT0JXUDmqai10Teh2lf6x+PUVY2HuvB7kmnAGz79 crZeshbfskA3HekbO3T3i6v1tgizNHlC/vTFp2zEc2BUZSpAUc0Za+KfO0Tchg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=blrq6vEuZl9xhk5SH2C/0TuhPHpkEyTp1dhghMXgnjc=; b=sVDCFaqPu4y9YwgE6kVjQUxuYO1yrZroOsd/wVSMNJFdSdAmM7eOFJIPDemrBSXqw4DHaW CVdkwPshZJ+UeVGoDlhvVO2dQL8N/sJKN9oSz0gaWBAQoYFOQ/6xks04r6TOfdQRUQqgox RrMVcr2uX7Y/+fc90xucEDi4RXpRRiBY0RJ6pED/5ePcuMCGiHb7i7MJA2Hyj3OKy2XO4a CN4LV568KtlNMy5gLqAc+roiWj5oj92C4+8uOrxto84uZ/ygQzvO/2yFFJ/2VBg/ls0tyJ 4gXd/BQIsZOKmz0ymxxKHRatWPVXrG/6BtEpb5YZNyE3CNFXWI5/rQnmjz3lGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bGq1NYRz1Q71; Thu, 5 Oct 2023 15:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FZFxf013078; Thu, 5 Oct 2023 15:35:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZFJG013075; Thu, 5 Oct 2023 15:35:15 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:15 GMT Message-Id: <202310051535.395FZFJG013075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 4b7975ecdc36 - main - dwc: Remove if_dwc_mac_type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b7975ecdc3631beac717d4addc71006cdc665c5 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4b7975ecdc3631beac717d4addc71006cdc665c5 commit 4b7975ecdc3631beac717d4addc71006cdc665c5 Author: Emmanuel Vadot AuthorDate: 2023-10-04 19:10:47 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Remove if_dwc_mac_type This doesn't represent the mac_type but if the DMA engine support extended descriptors. Read the HW_FEATURE register to learn if the DMA engine supports it. No functional changes intended. --- sys/dev/dwc/dwc1000_core.c | 14 +++++++++++--- sys/dev/dwc/dwc1000_dma.c | 12 ++++++++---- sys/dev/dwc/dwc1000_reg.h | 2 ++ sys/dev/dwc/if_dwc.c | 1 - sys/dev/dwc/if_dwc_aw.c | 8 -------- sys/dev/dwc/if_dwc_if.m | 13 ------------- sys/dev/dwc/if_dwc_rk.c | 8 -------- sys/dev/dwc/if_dwc_socfpga.c | 8 -------- sys/dev/dwc/if_dwcvar.h | 2 +- 9 files changed, 22 insertions(+), 46 deletions(-) diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c index 6cf836f87be2..872d1a488454 100644 --- a/sys/dev/dwc/dwc1000_core.c +++ b/sys/dev/dwc/dwc1000_core.c @@ -281,7 +281,11 @@ dwc_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) crc = ether_crc32_le(LLADDR(sdl), ETHER_ADDR_LEN); /* Take lower 8 bits and reverse it */ val = bitreverse(~crc & 0xff); - if (ctx->sc->mactype != DWC_GMAC_EXT_DESC) + /* + * TODO: There is probably a HW_FEATURES bit which isn't + * related to the extended descriptors that describe this + */ + if (!ctx->sc->dma_ext_desc) val >>= 2; /* Only need lower 6 bits */ hashreg = (val >> 5); hashbit = (val & 31); @@ -302,7 +306,11 @@ dwc1000_setup_rxfilter(struct dwc_softc *sc) DWC_ASSERT_LOCKED(sc); ifp = sc->ifp; - nhash = sc->mactype != DWC_GMAC_EXT_DESC ? 2 : 8; + /* + * TODO: There is probably a HW_FEATURES bit which isn't + * related to the extended descriptors that describe this + */ + nhash = sc->dma_ext_desc == false ? 2 : 8; /* * Set the multicast (group) filter hash. @@ -335,7 +343,7 @@ dwc1000_setup_rxfilter(struct dwc_softc *sc) WRITE4(sc, MAC_ADDRESS_LOW(0), lo); WRITE4(sc, MAC_ADDRESS_HIGH(0), hi); WRITE4(sc, MAC_FRAME_FILTER, ffval); - if (sc->mactype != DWC_GMAC_EXT_DESC) { + if (!sc->dma_ext_desc) { WRITE4(sc, GMAC_MAC_HTLOW, ctx.hash[0]); WRITE4(sc, GMAC_MAC_HTHIGH, ctx.hash[1]); } else { diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 16b2b2a3241d..7c5924296894 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -201,7 +201,7 @@ dwc_setup_txdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr, desc1 = 0; --sc->tx_desccount; } else { - if (sc->mactype != DWC_GMAC_EXT_DESC) { + if (!sc->dma_ext_desc) { desc0 = 0; desc1 = NTDESC1_TCH | len | flags; if (first) @@ -233,7 +233,7 @@ dwc_setup_rxdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr) nidx = next_rxidx(sc, idx); sc->rxdesc_ring[idx].addr2 = sc->rxdesc_ring_paddr + (nidx * sizeof(struct dwc_hwdesc)); - if (sc->mactype != DWC_GMAC_EXT_DESC) + if (!sc->dma_ext_desc) sc->rxdesc_ring[idx].desc1 = NRDESC1_RCH | MIN(MCLBYTES, NRDESC1_RBS1_MASK); else @@ -282,12 +282,12 @@ dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp) if ((m->m_pkthdr.csum_flags & CSUM_IP) != 0) { if ((m->m_pkthdr.csum_flags & (CSUM_TCP|CSUM_UDP)) != 0) { - if (sc->mactype != DWC_GMAC_EXT_DESC) + if (!sc->dma_ext_desc) flags = NTDESC1_CIC_FULL; else flags = ETDESC0_CIC_FULL; } else { - if (sc->mactype != DWC_GMAC_EXT_DESC) + if (!sc->dma_ext_desc) flags = NTDESC1_CIC_HDR; else flags = ETDESC0_CIC_HDR; @@ -646,6 +646,10 @@ dma1000_init(struct dwc_softc *sc) WRITE4(sc, BUS_MODE, reg); + reg = READ4(sc, HW_FEATURE); + if (reg & HW_FEATURE_EXT_DESCRIPTOR) + sc->dma_ext_desc = true; + /* * DMA must be stop while changing descriptor list addresses. */ diff --git a/sys/dev/dwc/dwc1000_reg.h b/sys/dev/dwc/dwc1000_reg.h index 768da530bf7c..f581bf135cd8 100644 --- a/sys/dev/dwc/dwc1000_reg.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -275,7 +275,9 @@ #define CURRENT_HOST_RECEIVE_DESCR 0x104C #define CURRENT_HOST_TRANSMIT_BUF_ADDR 0x1050 #define CURRENT_HOST_RECEIVE_BUF_ADDR 0x1054 + #define HW_FEATURE 0x1058 +#define HW_FEATURE_EXT_DESCRIPTOR (1 << 24) #define DWC_GMAC_NORMAL_DESC 0x1 #define DWC_GMAC_EXT_DESC 0x2 diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 9e17d67d434d..ffcf3e8d6afd 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -505,7 +505,6 @@ dwc_attach(device_t dev) sc->tx_desccount = TX_DESC_COUNT; sc->tx_mapcount = 0; sc->mii_clk = IF_DWC_MII_CLK(dev); - sc->mactype = IF_DWC_MAC_TYPE(dev); sc->node = ofw_bus_get_node(dev); sc->phy_mode = mii_fdt_get_contype(sc->node); diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 5ad1d14b385b..6419c9dedca8 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -122,13 +122,6 @@ a20_if_dwc_init(device_t dev) return (0); } -static int -a20_if_dwc_mac_type(device_t dev) -{ - - return (DWC_GMAC_NORMAL_DESC); -} - static int a20_if_dwc_mii_clk(device_t dev) { @@ -140,7 +133,6 @@ static device_method_t a20_dwc_methods[] = { DEVMETHOD(device_probe, a20_if_dwc_probe), DEVMETHOD(if_dwc_init, a20_if_dwc_init), - DEVMETHOD(if_dwc_mac_type, a20_if_dwc_mac_type), DEVMETHOD(if_dwc_mii_clk, a20_if_dwc_mii_clk), DEVMETHOD_END diff --git a/sys/dev/dwc/if_dwc_if.m b/sys/dev/dwc/if_dwc_if.m index 0d0d9ee114f7..aea61579946e 100644 --- a/sys/dev/dwc/if_dwc_if.m +++ b/sys/dev/dwc/if_dwc_if.m @@ -36,12 +36,6 @@ CODE { return (0); } - static int - if_dwc_default_mac_type(device_t dev) - { - return (DWC_GMAC_EXT_DESC); - } - static int if_dwc_default_mii_clk(device_t dev) { @@ -65,13 +59,6 @@ METHOD int init { device_t dev; } DEFAULT if_dwc_default_init; -# -# Return the DWC MAC type (descriptor type). -# -METHOD int mac_type { - device_t dev; -} DEFAULT if_dwc_default_mac_type; - # # Return the DWC MII clock for a specific hardware. # diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 51edd2450b42..43d4e4847c62 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -578,13 +578,6 @@ if_dwc_rk_init(device_t dev) return (0); } -static int -if_dwc_rk_mac_type(device_t dev) -{ - - return (DWC_GMAC_NORMAL_DESC); -} - static int if_dwc_rk_mii_clk(device_t dev) { @@ -610,7 +603,6 @@ static device_method_t if_dwc_rk_methods[] = { DEVMETHOD(device_probe, if_dwc_rk_probe), DEVMETHOD(if_dwc_init, if_dwc_rk_init), - DEVMETHOD(if_dwc_mac_type, if_dwc_rk_mac_type), DEVMETHOD(if_dwc_mii_clk, if_dwc_rk_mii_clk), DEVMETHOD(if_dwc_set_speed, if_dwc_rk_set_speed), diff --git a/sys/dev/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c index 7b4ead1a940c..867c09109d2a 100644 --- a/sys/dev/dwc/if_dwc_socfpga.c +++ b/sys/dev/dwc/if_dwc_socfpga.c @@ -75,13 +75,6 @@ if_dwc_socfpga_init(device_t dev) return (0); } -static int -if_dwc_socfpga_mac_type(device_t dev) -{ - - return (DWC_GMAC_EXT_DESC); -} - static int if_dwc_socfpga_mii_clk(device_t dev) { @@ -100,7 +93,6 @@ static device_method_t dwc_socfpga_methods[] = { DEVMETHOD(device_probe, if_dwc_socfpga_probe), DEVMETHOD(if_dwc_init, if_dwc_socfpga_init), - DEVMETHOD(if_dwc_mac_type, if_dwc_socfpga_mac_type), DEVMETHOD(if_dwc_mii_clk, if_dwc_socfpga_mii_clk), DEVMETHOD_END diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index ca0a91d6bf12..e21e256852fa 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -61,7 +61,6 @@ struct dwc_softc { struct resource *res[2]; device_t dev; phandle_t node; - int mactype; int mii_clk; device_t miibus; struct mii_data * mii_softc; @@ -90,6 +89,7 @@ struct dwc_softc { bool fixed_burst; bool mixed_burst; bool aal; + bool dma_ext_desc; /* RX */ bus_dma_tag_t rxdesc_tag; From nobody Thu Oct 5 15:38:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bM65Vwcz4vpDg; Thu, 5 Oct 2023 15:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bM62CYPz3HbT; Thu, 5 Oct 2023 15:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzX+5QNqqZydB62/gSyt/XIqhVpdL4NKvfK3QOmFcK8=; b=ggHL1CLTO+3DAtw+0OrDQs5fnZJc4/6jn4VtKaOol46WYOV/vLRwB3uRBautR5XDKU/S6D cas4JJizP0vIz/EoaKoCw3Z72XH0WVGVN0emlbkGUOGVgAk6fYDm1txmp8tk+0fQRUHrMD oCdCYD97sEIqutyg9ugmqYDxQTtrEPAWTvcqUrnsY+s3rIGxlDbxPrx3v5b1oErqwU0Zro v2KdHcE6Xo/vdMGqjq1RnuzgOjLulKnJmcJZoHSBJBDdDUUIk1nQFyTiIjPkUf3ZFYv97j +6WVmZMTg1OiUN8LQtyp15nCQnsWDWjD6f18QrCVVrqd4Nhl15KXRopBw0GtFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520338; a=rsa-sha256; cv=none; b=eQTJxVrpYQkhhTqZsmAqrr8gmpnKZsYrHhD+VJGVfbazEZ469WVTW6fy8QkFQ6VRP6mxOI bEnrKvxx2pfm4s7DlOUilc1Bv1D3iecdBr1wnyuUwaX5Jh1P2I6wnIfRr+PxnhThelpcxA hCkyDWXiTJO3abYlS1HbhMEVd6le8g70meHqFd51mB84kMooZ6Wvp2DvTk0hemyktGN2L9 lrXXQN4qLg5FsypdN2rag0TUiq8U8sBiuFfLjD9WL0ts8HFyvPpnGECqoy/0qBluYUx9jq FYogrPZlwPHQ3qEau3NpZTe8aCpOjvt73CJcR/I7ikRyTNp/XGaNP8zvp5satQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzX+5QNqqZydB62/gSyt/XIqhVpdL4NKvfK3QOmFcK8=; b=KH8MPnEa3nFjAbj/BPBQabXmRWV6QnhbCG1ejdEF+Miwgk0gJXzLETtwptPm64uv67BPpp q6QTaY43s4KcK6/twxYB2tpfKqZTxnTtZ2d6MlEdgxpowCq0nIQFVGalgIecMznXvmsLiz hO+jlNJmbtZCksjwM2g0Milcj5rZoTUEFbNauoMoll4clY/W2lO4RJwczWqkHnM+3n34c7 Dbpb9sZPvqTP5JTWPKYV/omrDAJ8q0HIIX8t+tzVjr34DfNHgINXfs5oGRCNdduVZF60Nj pF2gQ1D6foqW3BHqWNtnwXJNr7mplWrbU6cpBfN5mv+2NmXkS0D+7xJ02838Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bM6148Zz1PqZ; Thu, 5 Oct 2023 15:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FcvDp013778; Thu, 5 Oct 2023 15:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FcvR0013775; Thu, 5 Oct 2023 15:38:57 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:38:57 GMT Message-Id: <202310051538.395FcvR0013775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 25fcf889bd7d - main - bsdconfig: remove even more of the ftp support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25fcf889bd7d46fa0d1524073e38b3883a97f9c9 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=25fcf889bd7d46fa0d1524073e38b3883a97f9c9 commit 25fcf889bd7d46fa0d1524073e38b3883a97f9c9 Author: Baptiste Daroussin AuthorDate: 2023-10-05 15:37:21 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-05 15:37:39 +0000 bsdconfig: remove even more of the ftp support --- usr.sbin/bsdconfig/share/packages/index.subr | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr index bd29b882d0d9..34c40d6905ab 100644 --- a/usr.sbin/bsdconfig/share/packages/index.subr +++ b/usr.sbin/bsdconfig/share/packages/index.subr @@ -90,9 +90,6 @@ f_index_initialize() case "$__type" in $DEVICE_TYPE_DIRECTORY) __site="file://$__data/packages/$PKG_ABI" ;; - $DEVICE_TYPE_FTP) - f_getvar $VAR_FTP_PATH __site - __site="$__site/packages/$PKG_ABI" ;; $DEVICE_TYPE_HTTP) f_getvar $VAR_HTTP_PATH __site __site="$__site/$PKG_ABI/latest" ;; From nobody Thu Oct 5 15:53:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bh837Sdz4vrNj; Thu, 5 Oct 2023 15:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bh82VHVz3Kn1; Thu, 5 Oct 2023 15:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1lnMj3u3MjG+uBWoeeSr4FpzJOw02nKRl5Qc4bwSpY=; b=ROME49/hraRgM6ph0nkErYCghcVZrJ7Z22rUe4mvh3X0jHzUgy7TCqzYXCO7Hiiw2cFc2V jthDVhIbZmhAPYUYJ3ktzRQMfabr/CHhEyXIaFFxXVVkzYyqbkXwVy6wOy0vH6wB2s8/Ox JwS0kcJUvBPZ+wJR43syTsKeqVIE82NENCsFwrgzoejU+r0zi7egFyra/OUReJHpymsfbA WaPUqwnjahi2DBSmoThPrguGZAAw90S/iZU7Gt5CmAN/d+iYtcwFY2lNX+iIUl3kdZF/UX VQfu2R5i/m/4ULI7bsGZs7YEx8zw9BsKctd883CNyYjYYfmL/LhC8Qr4uuyp1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521224; a=rsa-sha256; cv=none; b=bWe7ll08JJmSynOoMbiJ7WTdH3JhpYtuI/+qRtg1I25VQWAR3XafIVHPtfzmv2Y3wxEXNa lNst+Hy4D/Mwj/D8HNSRe/Tl5pCc7p5UAmHPyknyXf0MOPNC43YH8BR2UOh0M/l7pRVTKX 9au5/usnXD5c0eayPvOvVqMouPZKi80lLUenV3+U2WQVKKCtxcR0Y/5VaEjZ6ABduixCwG YzWtJWXVzrYI2GPNyDoGqjtubMS0SEW9aJdgk9FLVDEksTnVLLOSaFeiMxQl8FCSvWVLhE Ulnqu9GTwkAgJGtxXQGxuo/JCHlTb12KLhWLhX6MBgeAx7s1XuSuihQpwgS3pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1lnMj3u3MjG+uBWoeeSr4FpzJOw02nKRl5Qc4bwSpY=; b=o6SStZ1UYKSPLP7+22l/i6eRz8U3SMgyRLGETnP07jA6rvvJ07nx21/N2zK+iegp9BRxht 0jbhcxuQ5drQHiwUxx8HSjcZAvZkoYpQYcHlbCrmqZRQuYNEq0f/Lbdu1LMgUMMV4sxSMY dqk/Eqqp+4jnWiFggb9SApuIhJEjjZWFH8fZcf0zYW34nhCG46rx5nFKaQv0dLvNh+zaRB OaUNUKl/bW+qinUaQE/bP0VSyHUhaLKfGMOIvrSZE2jE2sXZDSUIP72Ji6dv/Hk5rnbEW7 RqJS085YtgXvjgRFF7LxvU+KGX+jFkBr6JfTGaYuoY9C9uypS2ZSLw4gXwdEnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bh81Xhsz1Q89; Thu, 5 Oct 2023 15:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fripd046271; Thu, 5 Oct 2023 15:53:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FriGk046268; Thu, 5 Oct 2023 15:53:44 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:53:44 GMT Message-Id: <202310051553.395FriGk046268@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: 4357ae1174f3 - releng/14.0 - libfetch: don't rely on ca_root_nss for certificate validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4357ae1174f37fa2c10f7de7c05536f23e7439c4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4357ae1174f37fa2c10f7de7c05536f23e7439c4 commit 4357ae1174f37fa2c10f7de7c05536f23e7439c4 Author: Michael Osipov AuthorDate: 2023-10-03 05:53:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:52:43 +0000 libfetch: don't rely on ca_root_nss for certificate validation Before certctl(8), there was no system trust store, and libfetch relied on the CA certificate bundle from the ca_root_nss port to verify peers. We now have a system trust store and a reliable mechanism for manipulating it (to explicitly add, remove, or revoke certificates), but if ca_root_nss is installed, libfetch will still prefer that to the system trust store. With this change, unless explicitly overridden, libfetch will rely on OpenSSL to pick up the default system trust store. PR: 256902 MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42059 Approved by: re (gjb) (cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59) (cherry picked from commit fb058a9a40a5adc82721ed822fb4fba213446a7b) --- lib/libfetch/common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index fd2091791620..dfa742577585 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -1055,8 +1055,6 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" -#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -1066,12 +1064,6 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) if (getenv("SSL_NO_VERIFY_PEER") == NULL) { ca_cert_file = getenv("SSL_CA_CERT_FILE"); - if (ca_cert_file == NULL && - access(LOCAL_CERT_FILE, R_OK) == 0) - ca_cert_file = LOCAL_CERT_FILE; - if (ca_cert_file == NULL && - access(BASE_CERT_FILE, R_OK) == 0) - ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From nobody Thu Oct 5 15:54:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj33KtTz4vryf; Thu, 5 Oct 2023 15:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj32tNsz3LKJ; Thu, 5 Oct 2023 15:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jY8yNmz2CejtlLAqLY7ivPxQcTnAqCODzKNSqbvZn9g=; b=qdSHOqykG+UWNLmg9tT4NQEq38HXDpaAzJTNPELdYOoIKu+ci7o7uYMDZds06XUW0UFnL+ bGERAlTjcoJ+s0HP/7SSR8KA5Wp4QYa9TT1+I3IzddEmuNOuk8K21gD2MvF/aIaIigF/Gb fhQ3wtX2Ct6lQxC1XNIS9Xsq8TKaHIDjNIR63e73PEPajqhUF/hpsWgs8QJ08GOussz4xP ctvs8BhsZfCz+daMVw/aCpikKFVHyeIKnVeOjLNs1LATqoKx0p4WwCFJIjWhLXiPd+T4Hj EmaeeTSbJrQFjIIllZ14zx45BqlPM0ytVK5urfiGRNX0OTUGgM6pYMrKQiWg4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521271; a=rsa-sha256; cv=none; b=w/3e4p9fT9nSs4TkoGu2h5zhy2Rj50AHqd0eLWDymt8lRr0BEMeDrCnSaU3tcSUJvaokyd 7PZQCwzjaql6p2VVs3HvGS29XDK7lJmOKUbo7ty937wqpj/vagQhI4Anz+R4rrJdPrd3Qe Aqz/sYM9dnxTHf+yuZzB0EzNJ5vRa9uhVUKH1MPur8ZA0iLrPUbV944rUgxUhW7dNSsop+ 6yYku0IM7pkjC43je0I5F/MrH1fY7N0CFJfofq9Yc9DujbD2td7feSBTrPLLvL43nOvkgA YbsD0FIXSny+sNgfuWkBYe3jZXr8CoehQGk1EoNaM4dPwURNhZFVprx0NqOKNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jY8yNmz2CejtlLAqLY7ivPxQcTnAqCODzKNSqbvZn9g=; b=kLS/JUx1+di0udygpnBQoyqzDI+5Lnmg1CUwxkLT1Q6kE3dv0zPsDrQZZMqh7Yj7HLWDd1 AnbVOmoQ2YE/nIviltdkNgW0fvjDjNawbdXYEP78FBI/K3p7yPPgCsKgnORjvL9nFty1pA eYwkKZIOueZGBuL1Q4IWw3cPpvA1apxhXWBFXx8TuDso8eIdCC/J4hgiUjWes4b69d0Rke 0ptQx6r4M1dmgY4EMW7pCqK8FEENOdHbKURf5RNpnnR7cfcnN1xPQaLLLtFDUpg3h4HtVl mGiYNnzgL+KUmOGVya9ejd7RY79kSGFd0r9PfEFxXyE0PcoXDJudgI1gasqqXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bj31pZRz1Prl; Thu, 5 Oct 2023 15:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FsVar046568; Thu, 5 Oct 2023 15:54:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsViO046565; Thu, 5 Oct 2023 15:54:31 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:31 GMT Message-Id: <202310051554.395FsViO046565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: e76b9cc26d68 - releng/14.0 - release/ec2: Remove references to portsnap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e76b9cc26d68fa0d398571c0142acc1a54bcb1a8 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e76b9cc26d68fa0d398571c0142acc1a54bcb1a8 commit e76b9cc26d68fa0d398571c0142acc1a54bcb1a8 Author: Mark Johnston AuthorDate: 2023-09-27 22:02:36 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:02 +0000 release/ec2: Remove references to portsnap We no longer install a default portsnap.conf, so the sed invocation just generates an error. Reviewed by: cperciva Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D42003 (cherry picked from commit 63aa2e91342ead0495eada5667f413f0cf8eb56a) (cherry picked from commit 1cc968931bef915dd700b5eaefc8e6bd13fdb8a0) --- release/tools/ec2.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 71f9f5c330cb..d033739adc26 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -126,11 +126,9 @@ EOF 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config - # Use FreeBSD Update and Portsnap mirrors hosted in AWS + # Use FreeBSD Update mirrors hosted in AWS sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ ${DESTDIR}/etc/freebsd-update.conf - sed -i '' -e 's/portsnap.FreeBSD.org/aws.portsnap.FreeBSD.org/' \ - ${DESTDIR}/etc/portsnap.conf # Use the NTP service provided by Amazon sed -i '' -e 's/^pool/#pool/' \ From nobody Thu Oct 5 15:54:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj43cLdz4vrn5; Thu, 5 Oct 2023 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj431q3z3LWT; Thu, 5 Oct 2023 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nve0cm/eqo183xAr46wzmY00uqxTOLK/Akaa9hg2Z0Y=; b=EkaGKWUqgd89iIjulgX8JBEhZDs9XteFkVKfLUH7DBUryhYq408+1p4eWllyrv89Ie1qsZ nqx+RHZx2QMafKKm625Ur21799VIETmZbGaUK614Jcu7j8na30mCgyyi4N6R15PagYcpH3 mJfaEpmBiTqfvKyJncvSefHlQfTgHYCX4YMEfr+R6SzeYROD7Pns64KCGC5nRZ9Znupo4s L4cvWbMnnOxrFf1hEzFD9OAOFlIKH+NimRmtrfEQVhybE/E1oI1bfAEy1FlZI+cYRpa0mo dYrFGxlBNC4PkVVG//edzlJcixNGCnIuYnHjyX0pMphkmIjbE/zuY6XFs+1BZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521272; a=rsa-sha256; cv=none; b=bBAftkeArskALDdUdRwpt+VgLzjHMZlMMkRLHIzcL4rPpLdPNvS8slyIPKJc5wcBzm7vxN NdPIlzmM/uVHeXm6pC/mkM5F45YFvZ82PoLgL+o1whQUZoEGMwYJVw+uEl6vvn6BoStiwN +/7i8VUVwnPPFvdlPNPu7NqpblLF6LC6x/7XDey3M866Mt3QVzsd8T4kC18HB2Q96o19sw gcUcBNFBvj1GvH4aG/fOJuUgW8dYvIt6mnOZiw6cczo1UFlVVTgeYxV0VUIEOuLIXQxOzt KZTuhLIqPfIZuP9SII/4GIDya5GpJJR74QFQ7ARnDAWycCL5lnKK8LoJdxNc0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nve0cm/eqo183xAr46wzmY00uqxTOLK/Akaa9hg2Z0Y=; b=nuQtDLV8lV1nRUb+qIXNK8u9k/Hq961mWhsJUM2sScDkyI2tbyht1LV/tn64hTZ9XtyF5U ewASoui4+cBX/zIzKGI6y6nuXwV/saNhiYJiG3g1WSsOG0b5tpJSd0Q3fewZkju2uLlOst FO/8Nc2CJuNYZ2En1/9qW3stlEBJIQ2UL01/zpnvrXHWNn0Axp+oXZa5du7H00eFC47ZSu Y0snvDQzK9an8/2hOx+z4yNBoWckbFOX0L5pA2cAY/zoYEY13DSpMHxM072sbiTJM1a27j +vmAWMNXBUjXdNhTFPO0ivdtMQm1C5j4R0lVi+ckbRp0KEi1x40BA/NqqrEI2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bj427Tsz1QPF; Thu, 5 Oct 2023 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FsWkb046613; Thu, 5 Oct 2023 15:54:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsWEe046610; Thu, 5 Oct 2023 15:54:32 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:32 GMT Message-Id: <202310051554.395FsWEe046610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 84d45b29dd3f - releng/14.0 - release/Makefile.vm: Garbage collect unused bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 84d45b29dd3f588308c63a52fd1e92b03f50b002 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=84d45b29dd3f588308c63a52fd1e92b03f50b002 commit 84d45b29dd3f588308c63a52fd1e92b03f50b002 Author: Colin Percival AuthorDate: 2023-09-09 00:49:35 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:03 +0000 release/Makefile.vm: Garbage collect unused bits The cw*-package targets were introduced in February 2015 as part of adding support for building GCE images; but GCE support was reworked in June 2015 and the cw*-package targets were in fact never used. Remove them. The *_DISK variables were introduced in February 2015 as part of adding the cloudware-install target; this was removed in May 2016 as the cloudware images are published via the respective cloud systems and not published as disk images via the FreeBSD FTP site. As such, the *_DISK variables are not unused; remove them. Approved by: re (gjb) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41789 (cherry picked from commit fcbeeb5ff456b2f21d19d4fc6221774b512e30b7) (cherry picked from commit b9013d75c8531e1eaa993321a22eb7714af10f68) --- release/Makefile.vm | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index fb00804a81ec..4041ae14e2f3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,35 +26,27 @@ CLOUDWARE?= BASIC-CI \ AZURE_FORMAT= vhdf AZURE_FSLIST= ufs AZURE_DESC= Microsoft Azure platform image -AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI -BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT} EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image -EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image -GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2 OCI_FSLIST= ufs OCI_DESC= Oracle Cloud Infrastructure image -OCI_DISK= ${OSRELEASE}.${OCI_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} VAGRANT-VIRTUALBOX_FORMAT= vmdk VAGRANT-VIRTUALBOX_FSLIST= ufs VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare -VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) @@ -90,9 +82,7 @@ CLOUDTARGETS+= cw-${_CW:tl}-${_FS} CLEANDIRS+= cw-${_CW:tl}-${_FS} CLEANFILES+= ${_CW:tl}.${_FS}.img \ ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw \ - cw${_CW:tl}-package -CLOUDPACKAGE+= cw${_CW:tl}-package + ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} cw-${_CW:tl}-${_FS}: emulator-portinstall @@ -114,17 +104,6 @@ CLEANFILES+= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} cw-${_CW:tl}: cw-${_CW:tl}-${VMFS} ln -f ${${_CW:tu}${VMFS:tu}IMAGE} ${${_CW:tu}IMAGE} - -cw${_CW:tl}-package: - @# Special target to handle packaging cloud images in the formats - @# specific to each hosting provider. -.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/tools/${_CW:tl}-package.sh \ - -D ${DESTDIR} -I ${${_CW}_DISK} -S ${WORLDDIR} -.endif - touch ${.TARGET} - . endfor .endif From nobody Thu Oct 5 15:54:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj54TRXz4vs6L; Thu, 5 Oct 2023 15:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj542nJz3LfK; Thu, 5 Oct 2023 15:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VdyopBprf7E8Q/QO/yIjiRWJo8ddrCjPlKz4jT7Uhg4=; b=p2sl29GMNTn0lMrot9M/kZHyUcu1bxvWa1TV7hHfcevNJ5uFSZ5b1k1VegZ0jfseMeKhm9 gxt5ygCiDU3bVKa8M+Q78hT7nk1nXI1BR+tXpS6zbqD+aMGVcfpAqDASfg8UQd9O7FyKjv VWRT+GqKe+mwsiNfWFeI6Wg5KI+DUKB47Qku4x168mvr0uJJYr/KC2dcQhOVA7qUeslQgq bok81nNZOdRnLez9/cQt0Zvb5H+lfoZHb635txDMSoSfu2y/oLGprYVRpv6DnNMrA3zR88 8e3pYMe1oE793+5cWPgtZ892F/YwxEgyLvtzuD2KErmiieL1UkPV37a918KCfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521273; a=rsa-sha256; cv=none; b=xIrW4F+jnGX+U+hibP3NSodi0Gw87TMPdPxErCDzx0KSFlRTESCWGV2cBPgdSPRbzEmGNu FoQMUgiwandN0Qrp4gnc2BAVaxT2Ilg5tyYqsoi5b/ypLlbEtOhpUWL+3iS4y9dixeFH3o 2n8jOaibgFXr89kqN+eACClAWNvtzHZrBZK2qYO5JiaiDJTUGJga29mc0F7g3inSqBHn8M 2gHW22otGvnEZ8RE5oeESXXH/QtIJC3yVYmbx00UH6EPnjrM69Z/D0HIJJivmnrpSgIl+6 cf1s8ghDV6h/Y9Rz8teA/rtdG6Zj2rnd5RGmiaVvN3TFqFpYWqkVDymqUv1pbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VdyopBprf7E8Q/QO/yIjiRWJo8ddrCjPlKz4jT7Uhg4=; b=UlJOVReoGG87J2w2z9fAzlBdG5FFMx8xhIcqS2oGiLHELgbGiBXu7H4/BX6thHqvFBEwxl ESGA/vbt2yka0qLOG8+X3eUmy+9it5Hgea5Snk7mD28pp9jsRfpY8e8HWUA5mQ+ngtuB4T MPeYsttIJKWQgmJeW574V2f8i/rJ2UN8VXpUXNkUupJ7M8vI4dbeEv9q6+SBTb3QggnrDm AwGfnBApJr1nrlRKXMap1gEgeF2nbVO9FPEIogdHPzfDRuNQXtpzCDaERMiwbVI77XizHP xa6n1CixPzQX9CC09pPvJqMqAeXX9MPpAK3RA9gN76OCiuNC5sxYGjWb6xYG0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bj534ZFz1QPG; Thu, 5 Oct 2023 15:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FsXA4046662; Thu, 5 Oct 2023 15:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsX4G046659; Thu, 5 Oct 2023 15:54:33 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:33 GMT Message-Id: <202310051554.395FsX4G046659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d371e6ef0624 - releng/14.0 - release/Makefile.vm: Add support for CW flavours List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d371e6ef06242dcb63219d6163d279c7cff847bc Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d371e6ef06242dcb63219d6163d279c7cff847bc commit d371e6ef06242dcb63219d6163d279c7cff847bc Author: Colin Percival AuthorDate: 2023-09-09 00:51:08 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:03 +0000 release/Makefile.vm: Add support for CW flavours There are two "Vagrant" images right now: "Vagrant Image for VirtualBox" and "Vagrant Image for VMWare". Rather than listing these separately in a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then use a VAGRANT_FLAVOURS variable to identify the two versions. Add make logic to allow defaults (in this case, image format and filesystem) to be specified once for VAGRANT and inherited by both flavours. This will make future work to add flavoured EC2 images simpler. Approved by: re (gjb) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41790 (cherry picked from commit e6eeac9b71795252b12a6b94e7a06633a9ff6e4e) (cherry picked from commit fec4f6a7c377f576c78dabe16bc632ecf20058b4) --- release/Makefile.vm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 4041ae14e2f3..e7ff86c28df3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,12 +17,11 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE?= BASIC-CI \ +CLOUDWARE_TYPES?= BASIC-CI \ EC2 \ GCE \ OCI \ - VAGRANT-VIRTUALBOX \ - VAGRANT-VMWARE + VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST= ufs AZURE_DESC= Microsoft Azure platform image @@ -41,13 +40,26 @@ OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -VAGRANT-VIRTUALBOX_FORMAT= vmdk -VAGRANT-VIRTUALBOX_FSLIST= ufs +VAGRANT_FORMAT= vmdk +VAGRANT_FSLIST= ufs +VAGRANT_FLAVOURS= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VMWARE_FORMAT= vmdk -VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +.for _CWT in ${CLOUDWARE_TYPES} +. if defined(${_CWT}_FLAVOURS) +. for _CWF in ${${_CWT}_FLAVOURS} +CLOUDWARE_GEN+= ${_CWT}-${_CWF} +${_CWT}-${_CWF}_FORMAT?= ${${_CWT}_FORMAT} +${_CWT}-${_CWF}_FSLIST?= ${${_CWT}_FSLIST} +${_CWT}-${_CWF}_DESC?= ${${_CWT}_DESC} +. endfor +. else +CLOUDWARE_GEN+= ${_CWT} +. endif +.endfor +CLOUDWARE?= ${CLOUDWARE_GEN} + .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} From nobody Thu Oct 5 15:54:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj675jfz4vs8Y; Thu, 5 Oct 2023 15:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj666KMz3Lhv; Thu, 5 Oct 2023 15:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7IYMppSIl4VdMOuyXi0UNH05N3F3Q8eWCD7X+ZTm1gA=; b=h6EC/FdAH4DcK/8zUJ6XD0lFzbzOHUrY3U/+810Sy9c2gTCkB2LT0EZTXknygSmLiu9qBH HxhzDtQmyxOESSKbmgdG4pqC1QoOKis/m6W0XgEXA+i08uNEF6PdbCg/Go9Z8Sc5QhHdni VWSV47auOVw9Gdj0o/ssRnWKce0uQ9lMiJ8NMuaprh6Fv1vR00xlvmevdbIxxmaHKn+XtB DTfIQpbO+HVpNKuXEKjhLBYw6+Ex5rLqeV7DNZvW5EHnksH7Bs6cvUTddjccToe2sETQVy iz5sRMHrhoahMUHxPQS4QHTcT9HOkN0M/t7Iofc5hSdBvDgOJtPfi0Nib6bJCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521274; a=rsa-sha256; cv=none; b=k/HmlFudCt9XJbslu0NyBvvhkU9CUXgpKQhlrb9NmALR+Lkz35KO3y04BaSqUn+SZGTCn7 kj15fCwV4OozcKPzIcj2TOj9NvSQ7yVvKDk1sMtpdIhCkX6+aQv/pY2TZNjZGGQ9aMJUFo DqUl3LkgwP/J5clPrHgX+14CuEfQdGILDpx+RdmkdkoUfNAtxsPg69H4XReHt5/2x4tqjb JddeKOwRuDi0rOI9a7FJ9syHM0+svRlj6HSerCvVlAC+z3qvX0vh64nOIz3QcYSfwJW3DM EIG5jUwdhBe9ZcSi7MNKbpWBEfxGiRI/TxiZfKdKXQ97oys80lbfNaVVychVog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7IYMppSIl4VdMOuyXi0UNH05N3F3Q8eWCD7X+ZTm1gA=; b=sZ0ZR2oomR1bJTyjapiyCamXqfUSwnsI1n9p6JZ7G7mTMIVciKrLoVBaiubMTAf7r68pFT pD2gE03twYCs+DJSO1U5v6oxJUnFaTsajZWnuldyaSD2BrNpPA/XEl+BEIjUP0YoSn467e dH1UgA+DI+1AYlANdpWGzVGAzg7j48GjTu/gOUPncyFH3ArAuZha2HtioAMlrqajRR/rvQ J1nwV7rJHIxGC0z1OuYWPgJJF0q4Vz/wV8z1QW92fpx/vwuy7fBeKCGbDmxA8qoLdXBL0G qCo5sxpkrKqf0CX0qCOQ/npIhAEvjmkLmF6wru2JJBfIOU9tqZS/MyoDcJ6jSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bj64zmFz1Qfp; Thu, 5 Oct 2023 15:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FsYp5046710; Thu, 5 Oct 2023 15:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsYcb046707; Thu, 5 Oct 2023 15:54:34 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:34 GMT Message-Id: <202310051554.395FsYcb046707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c34cce0a2bae - releng/14.0 - EC2: Flavour existing AMIs as "base" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c34cce0a2bae98ca1fcd1bba6c462f99e733d36b Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c34cce0a2bae98ca1fcd1bba6c462f99e733d36b commit c34cce0a2bae98ca1fcd1bba6c462f99e733d36b Author: Colin Percival AuthorDate: 2023-09-09 00:51:57 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:04 +0000 EC2: Flavour existing AMIs as "base" Using the recently-added "cloudware flavours" mechanism, turn the existing EC2 AMIs into a new "base" flavour. The only user-visible change is that AMI names now include the word "base". Approved by: re (gjb) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41791 (cherry picked from commit 7494fb6b7d809257d4eb9eff06ce226143f27add) (cherry picked from commit a18905a9bfccc962f67b8a6067e7cbd4eb2bba17) --- release/Makefile.ec2 | 16 +++++++++------- release/Makefile.vm | 1 + release/tools/{ec2.conf => ec2-base.conf} | 0 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index b3f32d0e3efb..c674c967ff57 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -51,11 +51,12 @@ cw-ec2-portinstall: @touch ${.TARGET} .for _FS in ${EC2_FSLIST} +.for _FL in ${EC2_FLAVOURS:tl} .if defined(SSMPREFIX) && !empty(SSMPREFIX) -SSMOPTS_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${_FS}/${REVISION}/${BRANCH} +SSMOPTS_${_FL}_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH} .endif -EC2AMILIST+= ec2ami-${_FS} -ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} +EC2AMILIST+= ec2ami-${_FL}-${_FS} +ec2ami-${_FL}-${_FS}: cw-ec2-${_FL}-${_FS} ${CW_EC2_PORTINSTALL} .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" @@ -75,14 +76,15 @@ ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} ${SSMOPTS_${_FS}} ${BOOTMODEOPT} --sriov --ena \ - ${.OBJDIR}/${EC2${_FS:tu}IMAGE} \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FS:tu}" \ + ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${BOOTMODEOPT} --sriov --ena \ + ${.OBJDIR}/${EC2-${_FL:tu}${_FS:tu}IMAGE} \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FL} ${_FS:tu}" \ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} .endfor +.endfor -ec2ami: ec2ami-${VMFS} +ec2ami: ec2ami-base-${VMFS} ec2amis: ${EC2AMILIST} diff --git a/release/Makefile.vm b/release/Makefile.vm index e7ff86c28df3..8828b99599e7 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image +EC2_FLAVOURS= BASE GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2.conf b/release/tools/ec2-base.conf similarity index 100% rename from release/tools/ec2.conf rename to release/tools/ec2-base.conf From nobody Thu Oct 5 15:54:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj80St4z4vs8d; Thu, 5 Oct 2023 15:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj75xb2z3Lp7; Thu, 5 Oct 2023 15:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/OF5BaPu4oFkow2QfULCArUCMuJO6YTes5KZaF+A9ZQ=; b=ECna4/I/Sasp0ncU7IN77tUZ7GOnAl/4KkFtGW5T+azfk0HQWbwg66LuMbvKELUIDXuKLW TrtCDBi3a/wyBpD0p9kWFM97W87LmH0ehSJ+qcHKkOf9TTj3M/nH8yk/dq/14UjxdcriDj 2d0XRDlMcblEFLFEh09mp/UvAPDoZ7KFLE3eofQBuQw7HfcRBCkhlb2ZS2klpj1euEraU8 5aY5H6/5JJpHESoYGxf/Z/d392amCc3vOAqoMWSsmiSCzszGsa488b+q1tYwcHzqvUHT+t kQb5ZvopFLs8DrcSOdZmuIzlUq6fMClEjQed20M/JWNf/VFM3d8oI/Jjmyweog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521275; a=rsa-sha256; cv=none; b=r2Q+5qVR/JNIkA5q1UKzkP54M685DPuQBib7h05I+MtjulZ8RiD2toHbl0vFD5bREkPWgs SKoo/j/G6hKsr0GkgrD/02Mq/+g24an9OpUIECxl6fbop0ZGmL/xge8k5qADmi/MW+YCIk BQ44L+JGyJQGc85gqnI9AwjKZ0oN/lqR/nc+NLF258O4BVVI/BWJI78FgsLXSzfEwJVJtz vH7/kwKFt6xHuE0zJTi2cko71tGlaSGzclU8e2gTdqaSdNyhqUB28J2udQUBqEy6e4fb5n zPDHBLytsdK2HPqPgtF/H/LhdBsgs4W0yqkNDO4sV+CGY55z5sLQgyKrgVOogw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/OF5BaPu4oFkow2QfULCArUCMuJO6YTes5KZaF+A9ZQ=; b=M8euVWdXoISraeitMkROju6XSr01Okfl3WRH85f/F00GCXSQrrI9Ybaj6OpvRtFXXIMXXA 4Pu/G60PrvbhTlC9ivLD6Muh9RVpak6z/WF85uQLSkoi527R0jkKH2KoGX14eXAuAhXk/1 GZ1gghI0hSQZ1pmol/4C0KTEhgoAqqs59LSdzh1mJdpr0rWJs3aLTGgtBWkbSTefl1kfUj uAMC1jJMG7e0Xelam8m7h7dPOD/gd5ZcTNKPIbKYE+dAF8aOZXMBs6TDDz92c8hbSnaUWi VjfZ0i7r1O9qhzS2VdwSLLiowty5Vf8+tlElRAgkNoWwh4/04Q9w9OVoJnRg+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 4S1bj752ZZz1QrK; Thu, 5 Oct 2023 15:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395FsZ8O046763; Thu, 5 Oct 2023 15:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsZMR046760; Thu, 5 Oct 2023 15:54:35 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:35 GMT Message-Id: <202310051554.395FsZMR046760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a02a57f65b20 - releng/14.0 - EC2: Split off reusable configuration bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a02a57f65b200aa4a4cb6474d6f389e5d918d8f2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a02a57f65b200aa4a4cb6474d6f389e5d918d8f2 commit a02a57f65b200aa4a4cb6474d6f389e5d918d8f2 Author: Colin Percival AuthorDate: 2023-09-09 00:54:11 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:04 +0000 EC2: Split off reusable configuration bits Split ec2-base.conf into ec2-base.conf and a reusable ec2.conf, similar to how Vagrant flavours share a common vagrant.conf. Approved by: re (gjb) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41792 (cherry picked from commit fada6e2389fb62ff621a98fab7319e426da58b0b) (cherry picked from commit f4576ea0d5bcc26d8ffdf033cab36c651a5f0885) --- release/tools/ec2-base.conf | 161 ++++++-------------------------------------- release/tools/ec2.conf | 111 ++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 142 deletions(-) diff --git a/release/tools/ec2-base.conf b/release/tools/ec2-base.conf index d033739adc26..f4c46fe285cd 100644 --- a/release/tools/ec2-base.conf +++ b/release/tools/ec2-base.conf @@ -1,78 +1,36 @@ #!/bin/sh -# -# -# Packages to install into the image we're creating. This is a deliberately -# minimalist set, providing only the packages necessary to bootstrap further -# package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ - firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ - ebsnvme-id" - -# Include the amazon-ssm-agent package in amd64 images, since some users want -# to be able to use it on systems which are not connected to the Internet. -# (It is not enabled by default, however.) This package does not exist for -# aarch64, so we have to be selective about when we install it. -if [ "${TARGET_ARCH}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" -fi - -# Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk ec2_ephemeral_swap" +. ${WORLDDIR}/release/tools/ec2.conf -# Build with a 4.9 GB partition; the growfs rc.d script will expand -# the partition to fill the root disk after the EC2 instance is launched. -# Note that if this is set to G, we will end up with an GB disk -# image since VMSIZE is the size of the filesystem partition, not the disk -# which it resides within. -export VMSIZE=5000m +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install: +# * ec2-scripts, which provides a range of EC2ification startup scripts, +# * firstboot-freebsd-update, to install security updates at first boot, +# * firstboot-pkgs, to install packages at first boot, and +# * isc-dhcp44-client, used for IPv6 network setup. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client" -# No swap space; the ec2_ephemeralswap rc.d script will allocate swap -# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances -# and the C4 compute-optimized instances don't have ephemeral disks. But -# it would be silly to bloat the image and increase costs for every instance -# just for those two families, especially since instances ranging in size -# from 1 GB of RAM to 60 GB of RAM would need different sizes of swap space -# anyway.) -export NOSWAP=YES +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \ + ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \ + growfs sshd" vm_extra_pre_umount() { - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - - # The size of the EC2 root disk can be configured at instance launch - # time; expand our filesystem to fill the disk. - echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - - # EC2 instances use DHCP to get their network configuration. IPv6 - # requires accept_rtadv. - echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf - - # Unless the system has been configured via EC2 user-data, the user - # will need to SSH in to do anything. - echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf - # The AWS CLI tools are generally useful, and small enough that they # will download quickly; but users will often override this setting # via EC2 user-data. echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf + # EC2 instances use DHCP to get their network configuration. IPv6 + # requires accept_rtadv. + echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf + # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf - # Turn off IPv6 Duplicate Address Detection; the EC2 networking - # configuration makes it unnecessary. - echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf - # Provide a script which rtsold can use to launch DHCPv6 mkdir -p ${DESTDIR}/usr/local/libexec cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' @@ -82,94 +40,13 @@ vm_extra_pre_umount() { EOF chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M - # The EC2 console is output-only, so while printing a backtrace can - # be useful, there's no point dropping into a debugger or waiting - # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf - - # The console is not interactive, so we might as well boot quickly. - echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf - echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf - - # Tell gptboot not to wait 3 seconds for a keypress which won't - # arrive either. - printf -- "-n\n" > ${DESTDIR}/boot.config - - # The emulated keyboard attached to EC2 instances is inaccessible to - # users, and there is no mouse attached at all; disable to keyboard - # and the keyboard controller (to which the mouse would attach, if - # one existed) in order to save time in device probing. - echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - - # EC2 has two consoles: An emulated serial port ("system log"), - # which has been present since 2006; and a VGA console ("instance - # screenshot") which was introduced in 2016. - echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf - - # Some older EC2 hardware used a version of Xen with a bug in its - # emulated serial port. It is not clear if EC2 still has any such - # nodes, but apply the workaround just in case. - echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - - # Load the kernel module for the Amazon "Elastic Network Adapter" - echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf - - # Use the "nda" driver for accessing NVMe disks rather than the - # historical "nvd" driver. - echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf - - # Disable KbdInteractiveAuthentication according to EC2 requirements. - sed -i '' -e \ - 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ - ${DESTDIR}/etc/ssh/sshd_config - - # Use FreeBSD Update mirrors hosted in AWS - sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ - ${DESTDIR}/etc/freebsd-update.conf - - # Use the NTP service provided by Amazon - sed -i '' -e 's/^pool/#pool/' \ - -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ - ${DESTDIR}/etc/ntp.conf - - # Provide a map for accessing Elastic File System mounts - cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' -#!/bin/sh - -if [ $# -eq 0 ]; then - # No way to know which EFS filesystems exist and are - # accessible to this EC2 instance. - exit 0 -fi - -# Provide instructions on how to mount the requested filesystem. -FS=$1 -REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` -echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" -EOF - chmod 755 ${DESTDIR}/etc/autofs/special_efs - - # The first time the AMI boots, the installed "first boot" scripts - # should be allowed to run: - # * ec2_configinit (download and process EC2 user-data) - # * ec2_fetchkey (arrange for SSH using the EC2-provided public key) - # * growfs (expand the filesystem to fill the provided disk) - # * firstboot_freebsd_update (install critical updates) - # * firstboot_pkgs (install packages) - touch ${DESTDIR}/firstboot - # Any EC2 ephemeral disks seen when the system first boots will # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen - if ! [ -z "${QEMUSTATIC}" ]; then - rm -f ${DESTDIR}/${EMULATOR} - fi - rm -f ${DESTDIR}/etc/resolv.conf + # Configuration common to all EC2 AMIs + ec2_common return 0 } diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf new file mode 100644 index 000000000000..a233bf5981c1 --- /dev/null +++ b/release/tools/ec2.conf @@ -0,0 +1,111 @@ +#!/bin/sh + +# Packages which should be installed onto all EC2 AMIs: +# * ebsnvme-id, which is very minimal and provides important EBS-specific +# functionality, +# * amazon-ssm-agent (not enabled by default, but some users need to use +# it on systems not connected to the internet). +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ebsnvme-id amazon-ssm-agent" + +# Services which should be enabled by default in rc.conf(5). +export VM_RC_LIST="dev_aws_disk ntpd" + +# Build with a 4.9 GB partition; the growfs rc.d script will expand +# the partition to fill the root disk after the EC2 instance is launched. +# Note that if this is set to G, we will end up with an GB disk +# image since VMSIZE is the size of the filesystem partition, not the disk +# which it resides within. +export VMSIZE=5000m + +# No swap space; it doesn't make sense to provision any as part of the disk +# image when we could be launching onto a system with anywhere between 0.5 +# and 4096 GB of RAM. +export NOSWAP=YES + +ec2_common() { + # Delete the pkg package and the repo database; they will likely be + # long out of date before the EC2 instance is launched. + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + + # Turn off IPv6 Duplicate Address Detection; the EC2 networking + # configuration makes it unnecessary. + echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + + # Booting quickly is more important than giving users a chance to + # access the boot loader via the serial port. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # Tell gptboot not to wait 3 seconds for a keypress which will + # never arrive. + printf -- "-n\n" > ${DESTDIR}/boot.config + + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + + # EC2 has two consoles: An emulated serial port ("system log"), + # which has been present since 2006; and a VGA console ("instance + # screenshot") which was introduced in 2016. + echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf + + # Some older EC2 hardware used a version of Xen with a bug in its + # emulated serial port. It is not clear if EC2 still has any such + # nodes, but apply the workaround just in case. + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + # Load the kernel module for the Amazon "Elastic Network Adapter" + echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + + # Use the "nda" driver for accessing NVMe disks rather than the + # historical "nvd" driver. + echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf + + # Disable KbdInteractiveAuthentication according to EC2 requirements. + sed -i '' -e \ + 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ + ${DESTDIR}/etc/ssh/sshd_config + + # Use FreeBSD Update mirrors hosted in AWS + sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ + ${DESTDIR}/etc/freebsd-update.conf + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf + + # Provide a map for accessing Elastic File System mounts + cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' +#!/bin/sh + +if [ $# -eq 0 ]; then + # No way to know which EFS filesystems exist and are + # accessible to this EC2 instance. + exit 0 +fi + +# Provide instructions on how to mount the requested filesystem. +FS=$1 +REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` +echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" +EOF + chmod 755 ${DESTDIR}/etc/autofs/special_efs + + # The first time the AMI boots, run "first boot" scripts. + touch ${DESTDIR}/firstboot + + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} From nobody Thu Oct 5 15:54:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bj91GZ2z4vs6f; Thu, 5 Oct 2023 15:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bj90LRJz3Lx9; Thu, 5 Oct 2023 15:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XYA9MoCwefY1QO7OhgbLvze5egX85oFUnkbWC6ppYOk=; b=h8yzQSHiisrFnQ00lFCaXbvUjzX6uL51lXb3NWfybGhrafcAr3cx3fv8oLH+py06s3jXqd 59X0cormRFA35Ren6wNm9Q/IW3g2RWPKx8rw3NVVR98umo8mrpv0+FAp1uBSLyqi1aG4UJ OLjAdqHEjT313SA9yzHTuGBniMgPcN5ryLuwSyLwosvfnFb35gfPIcZ/Z/OsV/4PzG0Z5v oTH3yJYOb0kC1c5Ek4BaeDlZsGk4RHTJNylG9mDsdAySAq8X1xmpolFk4IwofFvFzvd6hu mpxcVJz1FbGr5dM9ii0S2s+CMUoGJDjSMFEGK3MYTac7icci1S26pdqaHz+yhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521277; a=rsa-sha256; cv=none; b=hQnJZjp9I/gxjhcD4LMWXX56ffgx2oYq2yHtJ6HBBUPYowOB2AjtGd0c7fS3CTvlCoQiGA 2bpYk9xeGEOOZ3V1gYsCalsH/e9JArKDxgWBaRd10pnXxVYVR29xkNCtajn5LNhNre/5TM /vKGDvoJOB9w2A437pha/C7NbSsBgSpng+mAb8NodCZvLW+0fJGjUme5Na1GFlO9lzdZgV XOZG245N4Bfd+JZYFgcD+330fq+/5S3B4jttfazEEK3Dc0OriELrONPfbWp+oWUSKUdAWE YkzTr/vHCVHWi7OaFD2Ggp1CJG2g4K9ZdQVEeQDDh1xpha1SFN7oYmTglcOGkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XYA9MoCwefY1QO7OhgbLvze5egX85oFUnkbWC6ppYOk=; b=McvykfMR+5Dc3rtE/HODrVqazQuemPVfhM3fwM6f98XK7T1CvBMECuqKQMMfydSir9MK62 fT/dNcDNo4hVpH/0PoBczvjo5Pak9tBZ4k8Yytw4ks3LerEPz6EH6D9tofSgneiAotQQmH Zm/3n8V07/CyQqSgM6b71G+Z+ohwi936YCyK3lTZX1p0H49l8/F+JCCuI2+nFDZCtJcSQn fEa2iijaDcW+C38YGVJPExL9RhJk5fd2vcWdcINHAy1MnUyfqfMS2KLTEebyLTaYiQIRaW 6MhwdWihQWm0O28I035ZELXIJ+bs5ExlACXKqIWMd8Z3c11KmD3Ob4cN0mM8QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bj86P4Pz1Qck; Thu, 5 Oct 2023 15:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fsamr046808; Thu, 5 Oct 2023 15:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FsatF046805; Thu, 5 Oct 2023 15:54:36 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:54:36 GMT Message-Id: <202310051554.395FsatF046805@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: bdd892341813 - releng/14.0 - EC2: Add experimental cloud-init images List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: bdd89234181337347ea6a81677875fc676325380 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bdd89234181337347ea6a81677875fc676325380 commit bdd89234181337347ea6a81677875fc676325380 Author: Colin Percival AuthorDate: 2023-09-09 00:55:16 +0000 Commit: Colin Percival CommitDate: 2023-10-05 15:54:04 +0000 EC2: Add experimental cloud-init images Known issues: 1. The ec2-user user is created with a homedir of /usr/home/ec2-user instead of /home/ec2-user; this appears to be a bug in cloud-init's FreeBSD support. 2. Cloud-init configures IPv4 networking but not IPv6 networking. Approved by: re (gjb) Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41793 (cherry picked from commit 1f4ce7a39f0f4b0621ff55d228014ccddb366d37) (cherry picked from commit d9243c1ab3cd8e744aaf54177232cdbffa07392d) --- release/Makefile.vm | 5 +++-- release/tools/ec2-cloud-init.conf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 8828b99599e7..09e31e3c0b6f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -30,8 +30,9 @@ BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs -EC2_DESC= Amazon EC2 image -EC2_FLAVOURS= BASE +EC2_FLAVOURS= BASE CLOUD-INIT +EC2-BASE_DESC= Amazon EC2 image +EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw GCE_FSLIST= ufs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf new file mode 100644 index 000000000000..2dd4df390fa3 --- /dev/null +++ b/release/tools/ec2-cloud-init.conf @@ -0,0 +1,31 @@ +#!/bin/sh + +. ${WORLDDIR}/release/tools/ec2.conf + +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install cloud-init. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init" + +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd" + +vm_extra_pre_umount() { + # Configuration common to all EC2 AMIs + ec2_common + + # Configure cloud-init + cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg + disable_root: true + system_info: + distro: freebsd + default_user: + name: ec2-user + lock_passwd: True + groups: [wheel] + shell: /bin/sh + # Currently broken, cloud-init hard-codes to /usr/home/* + homedir: /home/ec2-user + EOF + + return 0 +} From nobody Thu Oct 5 15:56:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bks1VC5z4vs7M; Thu, 5 Oct 2023 15:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bks0xKgz3NC2; Thu, 5 Oct 2023 15:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhSu87BABk2HuzXshRMaCvkeekorLq7wwIsZqH+TPuM=; b=f2A7IRnFT6xqDyWkRoRbAy5vKqRTnu0wm02EdpYDVgtZbafBWgYO6E40JTx9ntHtXHtxsE BCQqmzHNlA5eCUfH5xOmfgx/nlVn+UlGWh9wCFoBBwYsgZF4huEvwrp0xI+Kpdbkr6NDau vkcNbzsW9yYH5w+/74CUl3AaoFIfpQG1EWQMZXPX5H+d9HXdgWBpSkKICLlN1aAqdrgPh+ AQGVzu6PUTiKMae3EPJdQxKoNSwReAm4MSkZF9ubxfWwt5K15PQKDqRaUWbrxHRhh9iIMO j3leQgo3XZCw2oYLRHDu/R3Io8bkP/u7XAHfdWIazZGM0JQqi3ZGR9OobQgq8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521365; a=rsa-sha256; cv=none; b=ex/FUm9PG4j8S/AkYGzHv69Ie5LfIbOkB0nCcULnF3YjYshgtF4e52u9CkMwx+cFIKDewp GULyNSTpsA9vzejgFRDqjIQFX1Mmmxo3NCrvY3IXnn1++nPeFlquAj2CIE4bDIfmTl9mWB xfYDgAofyJvz2SSWnUK5Dt5QpJnTgZ5+QBDjZCnqi1J1D9PpKAkzXNB96qN9Cc+kA2rtx3 9zyGzg0MVxX8gWC0UI33jmLXlQy1e0xOPKrIJuMHXVJ6eiDwpJxcc8VIcnZOju0yIfM+uU khfoVFx8ha3QZHuqJqQU/hQhH6+GMqc2rbMhJ5vfVHofP/B2GXBWhMJf9uJj7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhSu87BABk2HuzXshRMaCvkeekorLq7wwIsZqH+TPuM=; b=BC/SIyFdQnRUEcYxapWfKTEuJCFhoWyg6b1gcO0ekCLzFxmynSVe1zIlXVSjr52Y1L6cqq 5U1a8sS/tYzVKfhTBanUSggVR5EdkoshP/nl4vM+5Fp6WZw6Qe8n4pRgMZTDaxLBKYoU0T Ekn+rA29CEV5Z/wbZYoyPOZ/wfpUkQblhOx6iVwWLXv1dE9PTVoUxOreQrLBBWYWrjHn+p BmecoThu9itpF6LO+FgAQ9WHkaHU43Avb+NSKhdXzJCIPJ/lctcB51b0Z2rnK0ZSuEp89F OcloK5uMEAXt08X4jUlqvG1/PGOS4rZA7kuNX0f3uCW79QJ1mGfa7tGBy6OmWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bkr75Y4z1QQy; Thu, 5 Oct 2023 15:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fu474047249; Thu, 5 Oct 2023 15:56:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395Fu48F047246; Thu, 5 Oct 2023 15:56:04 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:56:04 GMT Message-Id: <202310051556.395Fu48F047246@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: 681fbce51d33 - stable/13 - libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 681fbce51d337febf945a9f66592711f56cf3f51 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=681fbce51d337febf945a9f66592711f56cf3f51 commit 681fbce51d337febf945a9f66592711f56cf3f51 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:06:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:55:29 +0000 libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. Compiler memory barriers do not prevent the CPU from executing the code out of order. Switch to C11 atomics. This also lets us get rid of the mutex; instead, loop until the compare_exchange succeeds. While here, change the return value of at_quick_exit() on failure to the more traditional -1, matching atexit(). Sponsored by: Klara, Inc. Reviewed by: Olivier Certner, kevans, kib Differential Revision: https://reviews.freebsd.org/D41936 (cherry picked from commit 1dc3abb052430279e47c8922d22b30922adcf0f6) libc: Add a rudimentary test for quick_exit(3). Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41937 (cherry picked from commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe) --- lib/libc/stdlib/quick_exit.c | 40 +++++++--------- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/quick_exit_test.c | 81 +++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 24 deletions(-) diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c index 05db690cb6e7..4dee7b20bd2b 100644 --- a/lib/libc/stdlib/quick_exit.c +++ b/lib/libc/stdlib/quick_exit.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011 David Chisnall + * Copyright (c) 2023 Klara, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,44 +28,35 @@ */ #include -#include + +#include #include -#include /** - * Linked list of quick exit handlers. This is simpler than the atexit() - * version, because it is not required to support C++ destructors or - * DSO-specific cleanups. + * Linked list of quick exit handlers. These will be invoked in reverse + * order of insertion when quick_exit() is called. This is simpler than + * the atexit() version, because it is not required to support C++ + * destructors or DSO-specific cleanups. */ struct quick_exit_handler { struct quick_exit_handler *next; void (*cleanup)(void); }; -/** - * Lock protecting the handlers list. - */ -static pthread_mutex_t atexit_mutex = PTHREAD_MUTEX_INITIALIZER; -/** - * Stack of cleanup handlers. These will be invoked in reverse order when - */ -static struct quick_exit_handler *handlers; +static _Atomic(struct quick_exit_handler *) handlers; int at_quick_exit(void (*func)(void)) { struct quick_exit_handler *h; - - h = malloc(sizeof(*h)); - if (NULL == h) - return (1); + if ((h = calloc(1, sizeof(*h))) == NULL) { + return (-1); + } h->cleanup = func; - pthread_mutex_lock(&atexit_mutex); - h->next = handlers; - __compiler_membar(); - handlers = h; - pthread_mutex_unlock(&atexit_mutex); + while (!atomic_compare_exchange_strong(&handlers, &h->next, h)) { + /* nothing */ ; + } return (0); } @@ -77,8 +69,8 @@ quick_exit(int status) * XXX: The C++ spec requires us to call std::terminate if there is an * exception here. */ - for (h = handlers; NULL != h; h = h->next) { - __compiler_membar(); + for (h = atomic_load_explicit(&handlers, memory_order_acquire); + h != NULL; h = h->next) { h->cleanup(); } _Exit(status); diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 772c470e8865..aa2fa7683cb7 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -10,6 +10,7 @@ ATF_TESTS_C+= qsort_b_test .endif ATF_TESTS_C+= qsort_r_test ATF_TESTS_C+= qsort_s_test +ATF_TESTS_C+= quick_exit_test ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test ATF_TESTS_C+= tsearch_test diff --git a/lib/libc/tests/stdlib/quick_exit_test.c b/lib/libc/tests/stdlib/quick_exit_test.c new file mode 100644 index 000000000000..9feed8a6fa63 --- /dev/null +++ b/lib/libc/tests/stdlib/quick_exit_test.c @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2023 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +#include + +static void func_a(void) +{ + if (write(STDOUT_FILENO, "a", 1) != 1) + _Exit(1); +} + +static void func_b(void) +{ + if (write(STDOUT_FILENO, "b", 1) != 1) + _Exit(1); +} + +static void func_c(void) +{ + if (write(STDOUT_FILENO, "c", 1) != 1) + _Exit(1); +} + +static void child(void) +{ + // this will be received by the parent + printf("hello, "); + fflush(stdout); + // this won't, because quick_exit() does not flush + printf("world"); + // these will be called in reverse order, producing "abc" + if (at_quick_exit(func_c) != 0 || + at_quick_exit(func_b) != 0 || + at_quick_exit(func_a) != 0) + _Exit(1); + quick_exit(0); +} + +ATF_TC_WITHOUT_HEAD(quick_exit); +ATF_TC_BODY(quick_exit, tc) +{ + char buf[100] = ""; + ssize_t len; + int p[2], wstatus = 0; + pid_t pid; + + ATF_REQUIRE(pipe(p) == 0); + pid = fork(); + if (pid == 0) { + if (dup2(p[1], STDOUT_FILENO) < 0) + _Exit(1); + (void)close(p[1]); + (void)close(p[0]); + child(); + _Exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK_EQ_MSG(0, wstatus, + "expect child to exit cleanly"); + ATF_CHECK_MSG((len = read(p[0], buf, sizeof(buf))) > 0, + "expect to receive output from child"); + ATF_CHECK_STREQ("hello, abc", buf); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, quick_exit); + return (atf_no_error()); +} From nobody Thu Oct 5 15:56:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bkt4Ntjz4vs09; Thu, 5 Oct 2023 15:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bkt2hR0z3NVk; Thu, 5 Oct 2023 15:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c6LtYUpSOPQO2IJZ+n8T0us1oQ1PWrsGhhXiKmslT94=; b=uQbIWcBUEATNAz/RbbheQeXtD+EzAbfWuwjjd+WbTKKEB+tn3Ho8XY44VsDvK3ehYeL6fY P5RQrIaSXgaw4UOxR/jtCLjyOc+2Yknne5jprvu+R4QGzC4RyRFAIDEapbyQo6BWnijTma /Qq1U4mT7wxmGSwsQojCJrcoFLwvlyZh76By3xcRcl5xpa52+2Zrel1Qv/GI4snRlM+hkK mfQ+fmHs5r2yVHhxyBJz77KoL2Pu0HFC1QTnaphLrS5/D++q79+v17P+vcvPBZ8ovK7lFn 9AJZ29GeyGhuqCsqNxFdyGI8GqvoGpapqd79t8rRC9msPVrJtrCs1yhTuDp+UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521366; a=rsa-sha256; cv=none; b=gQeORLG2tUUvE/Wf/oohRUsdvulrYapRLj5M2QQblnROd7oVn1xPMbYGbff5J5HM3hRqSY eJNeBIplAeXGHC11GBMk9MJlrbxv8GgIIXdG08lexM3xp0WFB9PWnSOqzKkYFDXhwxa1e/ Bj1r1T4352O8O+D+tlOSJ9QPVs1FGpYIUzczK2clIHB7fF8lpzKOay7Nn9p7mmZNCA1YJ9 ChFXeLAq2h5lwIVsJRAy4gBoodDPFBqmWguFqrpF71PPlFrtojZx8JEbDJHNkEhBfZPgFu 0RDJ/fGu272g+cOj39B9/t8rHDGy9gbC+MMgrfS3yYpIsMjC2wcFT8IpyUCmMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c6LtYUpSOPQO2IJZ+n8T0us1oQ1PWrsGhhXiKmslT94=; b=sNhGgquq6pIXegbueuZlvbaf82FPupUTeyTOX5FrM+lXuBey1MPrOakwEURrHR5aZmSVyM lQGsPghmzBofO77kDkmuA/Kf7tjZEK7uQAyb8/UfoIPF9uPDYIq42cl4RA/olfh8xUvrVw B4GNHMSAj4UWSEE4Xb4YDEvNENwemvubYtuIozvmgZtyc877rgh5faLDdae3w5IcY3kBXL pnndDNYDS787VrLmojzhDstyjx7WRjh/+v7kL603oDstZT/uRJVWkBhLGaJdZYuWuBaxuZ UlHEyRDXnUQFyoAuKkqsyOzfeH+pMU26u9ga7j1JAPGeWIBOS2xj8Y3qtaSEqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bkt1Nczz1QpR; Thu, 5 Oct 2023 15:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fu6fA047294; Thu, 5 Oct 2023 15:56:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395Fu62U047291; Thu, 5 Oct 2023 15:56:06 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:56:06 GMT Message-Id: <202310051556.395Fu62U047291@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: db95aeb922c9 - stable/13 - split: Further option parsing improvements. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: db95aeb922c9ca20d0914a6ee449064e6d507fe8 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=db95aeb922c9ca20d0914a6ee449064e6d507fe8 commit db95aeb922c9ca20d0914a6ee449064e6d507fe8 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:29:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:55:30 +0000 split: Further option parsing improvements. * Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and style issues. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42010 (cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45) split: Improve GNU compatibility. * Like GNU split, turn autoextend back on if given -a0. * Add a test case that verifies that -a turns autoextend off. * Add a test case that verifies that -a0 turns autoextend back on. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42011 (cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615) --- usr.bin/split/split.c | 89 ++++++++++++++++++++++----------------- usr.bin/split/tests/split_test.sh | 19 +++++++++ 2 files changed, 70 insertions(+), 38 deletions(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index af1ed69c9482..e246a0d4adfc 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -63,7 +63,7 @@ static const char sccsid[] = "@(#)split.c 8.2 (Berkeley) 4/16/94"; #define DEFLINE 1000 /* Default num lines per file. */ static off_t bytecnt; /* Byte count to split on. */ -static off_t chunks = 0; /* Chunks count to split into. */ +static long chunks; /* Chunks count to split into. */ static bool clobber = true; /* Whether to overwrite existing output files. */ static long numlines; /* Line count to split on. */ static int file_open; /* If a file open. */ @@ -73,7 +73,7 @@ static regex_t rgx; static int pflag; static bool dflag; static long sufflen = 2; /* File name suffix length. */ -static int autosfx = 1; /* Whether to auto-extend the suffix length. */ +static bool autosfx = true; /* Whether to auto-extend the suffix length. */ static void newfile(void); static void split1(void); @@ -84,8 +84,8 @@ static void usage(void) __dead2; int main(int argc, char **argv) { - const char *p; - char *ep; + char errbuf[64]; + const char *p, *errstr; int ch, error; setlocale(LC_ALL, ""); @@ -106,20 +106,27 @@ main(int argc, char **argv) while (numlines >= 0 && *p >= '0' && *p <= '9') numlines = numlines * 10 + *p++ - '0'; if (numlines <= 0 || *p != '\0') - errx(EX_USAGE, "%c%s: illegal line count", ch, - optarg ? optarg : ""); + errx(EX_USAGE, "%c%s: line count is invalid", + ch, optarg ? optarg : ""); break; case 'a': /* Suffix length */ - if ((sufflen = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal suffix length", optarg); - autosfx = 0; + sufflen = strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: suffix length is %s", + optarg, errstr); + } + if (sufflen == 0) { + sufflen = 2; + autosfx = true; + } else { + autosfx = false; + } break; case 'b': /* Byte count. */ - errno = 0; - error = expand_number(optarg, &bytecnt); - if (error == -1) - errx(EX_USAGE, "%s: offset too large", optarg); + if (expand_number(optarg, &bytecnt) != 0) { + errx(EX_USAGE, "%s: byte count is invalid", + optarg); + } break; case 'c': /* Continue, don't overwrite output files. */ clobber = false; @@ -130,22 +137,27 @@ main(int argc, char **argv) case 'l': /* Line count. */ if (numlines != 0) usage(); - if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal line count", optarg); + numlines = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: line count is %s", + optarg, errstr); + } break; case 'n': /* Chunks. */ - if (!isdigit((unsigned char)optarg[0]) || - (chunks = (size_t)strtoul(optarg, &ep, 10)) == 0 || - *ep != '\0') { - errx(EX_USAGE, "%s: illegal number of chunks", - optarg); + chunks = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: number of chunks is %s", + optarg, errstr); } break; case 'p': /* pattern matching. */ - if (regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB) != 0) - errx(EX_USAGE, "%s: illegal regexp", optarg); + error = regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB); + if (error != 0) { + regerror(error, &rgx, errbuf, sizeof(errbuf)); + errx(EX_USAGE, "%s: regex is invalid: %s", + optarg, errbuf); + } pflag = 1; break; default: @@ -163,9 +175,10 @@ main(int argc, char **argv) --argc; } if (argc > 0) { /* File name prefix. */ - if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) - errx(EX_USAGE, "file name prefix is too long: %s", + if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) { + errx(EX_USAGE, "%s: file name prefix is too long", *argv); + } ++argv; --argc; } @@ -182,16 +195,16 @@ main(int argc, char **argv) else if (bytecnt != 0 || chunks != 0) usage(); - if (bytecnt && chunks) + if (bytecnt != 0 && chunks != 0) usage(); if (ifd == -1) /* Stdin by default. */ ifd = 0; - if (bytecnt) { + if (bytecnt != 0) { split1(); exit (0); - } else if (chunks) { + } else if (chunks != 0) { split3(); exit (0); } @@ -225,7 +238,7 @@ split1(void) /* NOTREACHED */ default: if (!file_open) { - if (!chunks || (nfiles < chunks)) { + if (chunks == 0 || nfiles < chunks) { newfile(); nfiles++; } @@ -236,24 +249,24 @@ split1(void) err(EX_IOERR, "write"); len -= dist; for (C = bfr + dist; len >= bytecnt; - len -= bytecnt, C += bytecnt) { - if (!chunks || (nfiles < chunks)) { - newfile(); + len -= bytecnt, C += bytecnt) { + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } - if (write(ofd, - C, bytecnt) != bytecnt) + if (write(ofd, C, bytecnt) != bytecnt) err(EX_IOERR, "write"); } if (len != 0) { - if (!chunks || (nfiles < chunks)) { - newfile(); + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } if (write(ofd, C, len) != len) err(EX_IOERR, "write"); - } else + } else { file_open = 0; + } bcnt = len; } else { bcnt += len; diff --git a/usr.bin/split/tests/split_test.sh b/usr.bin/split/tests/split_test.sh index c9b87c01618c..48065719055a 100755 --- a/usr.bin/split/tests/split_test.sh +++ b/usr.bin/split/tests/split_test.sh @@ -209,6 +209,23 @@ autoextend_body() atf_check -o inline:"$((26*25+1))\n" cat xzaaa } +atf_test_case noautoextend +noautoextend_body() +{ + seq $((26*26)) >input + atf_check split -a2 -l1 input + atf_check -o inline:"$((26*26))\n" cat xzz +} + +atf_test_case reautoextend +reautoextend_body() +{ + seq $((26*25+1)) >input + atf_check split -a2 -a0 -l1 input + atf_check -o inline:"$((26*25))\n" cat xyz + atf_check -o inline:"$((26*25+1))\n" cat xzaaa +} + atf_test_case continue continue_body() { @@ -249,6 +266,8 @@ atf_init_test_cases() atf_add_test_case larger_suffix_length atf_add_test_case pattern atf_add_test_case autoextend + atf_add_test_case noautoextend + atf_add_test_case reautoextend atf_add_test_case continue atf_add_test_case undocumented_kludge atf_add_test_case duplicate_linecount From nobody Thu Oct 5 15:56:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bkv3ZhMz4vs55; Thu, 5 Oct 2023 15:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bkv30sFz3NNQ; Thu, 5 Oct 2023 15:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnX6xRX0nmY8teL90GWAD7lYKkJc90iVkUZbIBBr1xI=; b=DM16WoNhPlw71uIcYCVdgHquWEfgiyN5EoTPkbJ1122tDhvqqvmfQLxxNh+C9wNtufTrFj Nt2EI/lL38OEgdI8vcXC1cGwQyJdH21cMsAGi3rG3aIRs/3pzR4aW/1MQdqqTAyj3ksLKx Jeu1sQ17UpKfBLseMcjtE+7SHNIjGLMfps4hZOPTyr5XCiy8t0Ntb6iiz2x3Uu2N7QqSfi yMmXZ/ykScZN19qP4hN8RiKCwBNKmF7Hp5RW914mg8B7t8rj8nxI13571F0KZcPsbUNU4L d6Fxy9k9RDj/KILudqtYmq44IQJO315NEt6lb36yieXfvkI8rEX/+3B8zQ16SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521367; a=rsa-sha256; cv=none; b=Ml5ajtHZt4/l3qlAu9mRPmuXZbqPS54P6+XmxHkTBqsLzwglk2MZA+OQRlDq+/GXwK5iHE YKVfUucFvERzyaEwYIr6j5DAH7RD+Mh5wsx3pLmqooUTTbRijzL04aOq9kh/t4A3UZcOIf xipj4TJ2AfcXjcuHWvZ1XYRF8s/fhTrem/4Pwj65UxHGwAcjXJWgutJlv6r0Zoa5OChebz KitxID43PojiKkn9Lo6AVZe0heoEVETtRM37qeqrPLanWDaj2ERNd99qyQHTBULHRksowW XS0ndr/dVEFEp1UMGG5bvSGBPPrB0/8f27wHvXgWIxfUf4rqoJ7Sob0B5gZKiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnX6xRX0nmY8teL90GWAD7lYKkJc90iVkUZbIBBr1xI=; b=jfLJk1jqMhaI0/whr6dscPNxa5wmCZf9o61ww7kidxi40hYv11jOY6zSQnFA5vrjn2hkkW xBWbivXmoauv3gjZpW2uTJknjanWNpnuC+ah7kxjPqzRhb5b/PKIsWLO/WRdVsEf5PZ68H F2YxZhvzPjggH2t1+D1fRUImeVrWD7MhmuoqwxbwCykIB8wFhHLSouPX5npRI0uxG/Fp/q ZezjewZghsCrtoX/IauH//Z23Q6fgfm6Mn+ec8mhIlk4gULjDokWXfoj0G7hgOpLE5JnKK mI6ZLmSLDkCIud7nZp16sV31MvSO0afnD7pgrllwM3trve8ujCADCgVurIHV5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bkv1rYpz1QrQ; Thu, 5 Oct 2023 15:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fu7Iq047355; Thu, 5 Oct 2023 15:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395Fu7eF047352; Thu, 5 Oct 2023 15:56:07 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:56:07 GMT Message-Id: <202310051556.395Fu7eF047352@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: baf69f6c9973 - stable/13 - libfetch: don't rely on ca_root_nss for certificate validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: baf69f6c997392cde9ae75d3ebc25a8201c7cc99 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=baf69f6c997392cde9ae75d3ebc25a8201c7cc99 commit baf69f6c997392cde9ae75d3ebc25a8201c7cc99 Author: Michael Osipov AuthorDate: 2023-10-03 05:53:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:55:33 +0000 libfetch: don't rely on ca_root_nss for certificate validation Before certctl(8), there was no system trust store, and libfetch relied on the CA certificate bundle from the ca_root_nss port to verify peers. We now have a system trust store and a reliable mechanism for manipulating it (to explicitly add, remove, or revoke certificates), but if ca_root_nss is installed, libfetch will still prefer that to the system trust store. With this change, unless explicitly overridden, libfetch will rely on OpenSSL to pick up the default system trust store. PR: 256902 MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42059 (cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59) --- lib/libfetch/common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index c01710832791..69b507109bc4 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -1071,8 +1071,6 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" -#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -1082,12 +1080,6 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) if (getenv("SSL_NO_VERIFY_PEER") == NULL) { ca_cert_file = getenv("SSL_CA_CERT_FILE"); - if (ca_cert_file == NULL && - access(LOCAL_CERT_FILE, R_OK) == 0) - ca_cert_file = LOCAL_CERT_FILE; - if (ca_cert_file == NULL && - access(BASE_CERT_FILE, R_OK) == 0) - ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From nobody Thu Oct 5 15:59:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1bpz5BZVz4vsn9; Thu, 5 Oct 2023 15:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1bpz4b1fz3PRs; Thu, 5 Oct 2023 15:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQ+ERgHqxOrACocBbiLi/xYDdcOoWxSzqK8ABcbpfOk=; b=Y94d146QePvqYp+ySHr9Cp9cXbhMX334tYPk3yQwKzJfm9EYXYoOvUiZHH8NUVEIjEQvoh qUDFhUs8hFu1asOwrPIXr8yIfZhf1LRUhPiTzJKl7KkOQcNf6VAiIU6TEa0+5MG+QAKNK+ 0rUy6OvfiB5vZuKgnryH/F4kC9iALUyrf5vuEdU6FDDBhBXvFzHR8GiRhX4A4Tm9HZomcQ cIqQGAD7iqVJ0osozEBPUoP6cfmynZikgPxVqgOWY+Awvg6aocCxy1QaMHyAn7MKi1Z5Y0 KJYDCjqu7CvU1v1dKjGk2uOfo8HfzkR2S65Zh6VYVk/H5YBHTjVNELO0zr7bZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696521579; a=rsa-sha256; cv=none; b=Uyxk9WXJie9YpqSz+b3rVrnKiD8QIwRJs4SnYJt0JlvCkqHnE4Ij9Rl/LgP5jvmaPfnAZQ WQUxQ/HQ+FsYnXHjCGwXE+ovqtJ7+0hWvMsYhOu4YbXCdURstzbDUzbNmYEiXezuoX3Mb+ XBT1Con7lJGzPEwEIL1/QcAPMZKFYmtZ6Z2iN3EysyC8Ui9V6eaEM4jhA2bfIhQXxSr9WK 4rNrv5tigKs6wC+kTvtP54fw14UHmrwH5CuFiWwjNZvC6zAvWMYvdmSzZIG474QJ3KXskJ sRwxgAO+MSZbw5Bh1mDMlQYMAUDz9MH7YBSYUGW+Cu8hlX6OewDBY0KV/rXNhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696521579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQ+ERgHqxOrACocBbiLi/xYDdcOoWxSzqK8ABcbpfOk=; b=SivxHnDhNqAyAf8AeoIGEDCw3OjNxT4mwZcJSR2i/HYhaSrddgX9IOjP25f6UJo5crvXlc y+xRy/yqbomVF4HjqEHzXVwZSOJBBq1flpu5lKHytzoB3ISkSShQbYxu4x5aU+ACefrOf8 ysV2ZwaE+mgZm1tzD2bzFTX9EslXF4uJ2TffieqfQmQjL+HEZoep8DBHqg50W5iaVUqDPm 7rv1HM54HEsdV5Qr3sZssEaHcu7fnnPgwxRPx+QWi48vLWCLQ6iJhdJGmT/30aPyRxFL26 ztYzOVvgyf6SpbD3Cq6aLeUXFHVzywqIHhGqz6rdd2AlS9BwUvecWr/bWlAMnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1bpz3fP7z1QpV; Thu, 5 Oct 2023 15:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Fxdak047999; Thu, 5 Oct 2023 15:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FxdVW047996; Thu, 5 Oct 2023 15:59:39 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:59:39 GMT Message-Id: <202310051559.395FxdVW047996@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: 8d939b7d9845 - stable/12 - libfetch: don't rely on ca_root_nss for certificate validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/12 X-Git-Reftype: branch X-Git-Commit: 8d939b7d98452c0357e49b090d5a685ea8a0e69a Auto-Submitted: auto-generated The branch stable/12 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8d939b7d98452c0357e49b090d5a685ea8a0e69a commit 8d939b7d98452c0357e49b090d5a685ea8a0e69a Author: Michael Osipov AuthorDate: 2023-10-03 05:53:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-05 15:58:59 +0000 libfetch: don't rely on ca_root_nss for certificate validation Before certctl(8), there was no system trust store, and libfetch relied on the CA certificate bundle from the ca_root_nss port to verify peers. We now have a system trust store and a reliable mechanism for manipulating it (to explicitly add, remove, or revoke certificates), but if ca_root_nss is installed, libfetch will still prefer that to the system trust store. With this change, unless explicitly overridden, libfetch will rely on OpenSSL to pick up the default system trust store. PR: 256902 MFC after: 3 days Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42059 (cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59) --- lib/libfetch/common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 80a63123abdb..8b3b69ff3351 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -786,8 +786,6 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE "/usr/local/etc/ssl/cert.pem" -#define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) { @@ -797,12 +795,6 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) if (getenv("SSL_NO_VERIFY_PEER") == NULL) { ca_cert_file = getenv("SSL_CA_CERT_FILE"); - if (ca_cert_file == NULL && - access(LOCAL_CERT_FILE, R_OK) == 0) - ca_cert_file = LOCAL_CERT_FILE; - if (ca_cert_file == NULL && - access(BASE_CERT_FILE, R_OK) == 0) - ca_cert_file = BASE_CERT_FILE; ca_cert_path = getenv("SSL_CA_CERT_PATH"); if (verbose) { fetch_info("Peer verification enabled"); From nobody Thu Oct 5 16:11:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1c4N3lV2z4vvKs; Thu, 5 Oct 2023 16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1c4N3DcZz3Rsq; Thu, 5 Oct 2023 16: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=1696522276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OiJ7pc/J4ZnQmR9TPvQoWCug/9x4F+LoI93Yb1yUlaA=; b=LT2rneizug+lAn2SjpM+p0ZnfenAJmkuPgBRLEqD4u454HA2dd0sZbVoRWSQUHho23JN1W 9HKCti2KyfV/lsOOShqhIraYSZLg7gevi5tre7tJSngbWnI/gL6JcOdiCqy1I6wXnXTkPp N27KwQzGvbovvR4q63DWvUk2LRqyLB4UI6wgFfsWBGyDIx6n+Kym0S+P057PrFufmoTJMM rYPM3uFCFk/GCJqa/byJYWh7TQgcsQGNcAroJKMcYiPXQrGNC+qr4q2eM45WoPkgAi4dqa GOtL9XlL6Ou/Yl4pxtaUuOPwZ0RRzLetCsCtYFzLv3UBVDOp20da+ZQWEAPVZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696522276; a=rsa-sha256; cv=none; b=wGLSykwYXSjQbFhDE4ndolBmR0MEVQPdfXQge0FBK9ryrymjdDcSXutw9cgARVKhGNuCms wJko11cXLE380WZPlp2HcngySlnJcn9vTAVB71Ta7lq1y8N+rhuuZ1N6/cbL76r3Q8w120 t9UjtG2xQENbm/ZnQ+5oSvheWZPWnLiOvxjqc8Y2tDMXExPQ7JnRyqU/ccJzbu9B++VSFr tmU2qWMJpq+2PeNcgiQ/qjGyZDQoGgQDmTTXiO4TQBaCVYyjhDCpGWVAlUUevcHXw3WcQw flEWefVSL7Or928vQrUAg3UpeUi2vtrzlI9xdj1rfwBlTFmNUdY2hfsd9nWhoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696522276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OiJ7pc/J4ZnQmR9TPvQoWCug/9x4F+LoI93Yb1yUlaA=; b=eUncZdJ//DmAKwAvwSL7n09qx6efa87j9e6hnl6lNNjZfotp9OVLep3ZdYA7uqLUgSGBm+ ZQvLgqhPGD/OGM8iOyPRmBZ7SVqImfil31bGo7KeuKPpWe6KcKydnEyjgMV2ApemJYexVl zEemp3HFgzW145TTKnIWaUZRRVmPT5l/gU3y6tMz2F90t7VG/I/Lby1SfibM/2BGB8REdW ytSvzo13SzBaR0ozWClzkJF86bqTpQyMyKrvJ5CT4kXUQVL31X8zA+SzDHHoBD5fJyHR0c WHLvAss+3GzUOlocptRR8WMEeOoZjXrN+rHeXAOU+ms1Oo4CqvxHEV8LAOMfWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1c4N2Dt1z1Qsj; Thu, 5 Oct 2023 16:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395GBGC9078009; Thu, 5 Oct 2023 16:11:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395GBGOQ078006; Thu, 5 Oct 2023 16:11:16 GMT (envelope-from git) Date: Thu, 5 Oct 2023 16:11:16 GMT Message-Id: <202310051611.395GBGOQ078006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b00dbe851c66 - main - pf: fix SCTP SDT probe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b00dbe851c66f26a16219d31c76b7fb411ace94c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b00dbe851c66f26a16219d31c76b7fb411ace94c commit b00dbe851c66f26a16219d31c76b7fb411ace94c Author: Kristof Provost AuthorDate: 2023-10-05 14:57:50 +0000 Commit: Kristof Provost CommitDate: 2023-10-05 15:53:13 +0000 pf: fix SCTP SDT probe We want the return value of pf_test_rule(), i.e. the result of the evaluation of the new state, not the result of the evaluation of the original packet/state. MFC after: 1 week Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index fae0bd2854f9..3dddfdd0b1a4 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5943,7 +5943,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, ret = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); - SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); + SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, ret); if (sm) { /* Inherit v_tag values. */ sm->src.scrub->pfss_v_tag = s->src.scrub->pfss_flags; From nobody Thu Oct 5 16:15:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1c901CXqz4vw0Z; Thu, 5 Oct 2023 16:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1c900mpQz3SHV; Thu, 5 Oct 2023 16:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696522516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZermLQkHYy8GLPVHF3HeaJmhJHrhzCrsaOEx9igLQ=; b=FHpNmMJ7PRrB0XNQD6CrEBJlYzKkFGXChBMvu9zh9Svo9EGMV+oiVcIuENZKfmTrjnbGsY waHMoLaZTNlmpZgzrzY5XY7b8SK876wszGgYtxOSyGEOgsCJiDj4tWSdd3Yx/HbowaMdS8 8Tq6Mgl60juoq+GEUTO0zdQlVmexXwdw/W6Pkhk+XkbxY0glEurmR/FWuJYZqlJ9olTLbH iVz03hDE73KbCwGIEz3nLpJFDzlqBqx3IOovo7Cmi9GFCgMxcmgWUzTWCONW1g2C+V1pgp kN0ms/cG73dGSDXoDSRZkHUjp7EaUXPBglE9XT34fv9g1AIxeqJRbPECCnwLFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696522516; a=rsa-sha256; cv=none; b=iEqQ37vWW2h1fxqUlddCPVZasfifQ6AhLoXaX75Ubn1hAeMeC2iNbg5gJnMZZq37KgyvcL neihhYp/xDEN2R9f5+gfRq41BLd6k99ShzcxQB0AnFvODuTkTaHIuJ1Xop13V1hbzoDryn k8tcvGIt5pIllgsZW8Gmkk4VYjv8kM07pKU7G76LiLFW+nKUlkviV1ADTaETGmIe+yfgKN ZCnfFqNPGWn8RJnUQtcFjYyD16nFSSAT6lXHM369UNbE8CdY+y0SEsAAdYclO1s4U6XFSL chTE9HVhW6s85j0K+8zcbxjGmeb0jRI9AHwpfHvfiSdeik4WmpOUJ+JJ8cfm3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696522516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZermLQkHYy8GLPVHF3HeaJmhJHrhzCrsaOEx9igLQ=; b=Y+GyH3ZATgwLeaGQz1qRCVcAYMeBTuBLDILfZ9XGAuILt/kyEPJSc6hVIywcppyOZ+d1od KHsL7ITmy8Xud6YQnZqXL+YNHfkEhyIt+36ZqJ0vHpDP67nPwG8MZR34OcWgp5NcJ+eJBN pmmrnZxvoXNkY7ftHep9SC7Quq9XbJsqBjPIZgNCpd6HsGohUouI0CFJAOznqjKWkLZMtL mhehQDNri/FljyHStihRo1TAbaZBDSfuyvCHR+5eSyKDcBqGRfxxfHdNunysYyFl2EcxXu XvYXOM2MCb5Iia/EedM/4TO2Tlaw+LchUkQt2G0GVFHJr3ndUxM5NxmkP9VNVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1c8z6t8pz1QtR; Thu, 5 Oct 2023 16:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395GFFER081636; Thu, 5 Oct 2023 16:15:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395GFF4b081633; Thu, 5 Oct 2023 16:15:15 GMT (envelope-from git) Date: Thu, 5 Oct 2023 16:15:15 GMT Message-Id: <202310051615.395GFF4b081633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 6a773a0582ba - main - fusefs: add more readdir tests for misbehaving servers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a773a0582ba936cc19734b21ee5a7bed49cfdec Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6a773a0582ba936cc19734b21ee5a7bed49cfdec commit 6a773a0582ba936cc19734b21ee5a7bed49cfdec Author: Alan Somers AuthorDate: 2023-10-05 16:13:05 +0000 Commit: Alan Somers CommitDate: 2023-10-05 16:15:03 +0000 fusefs: add more readdir tests for misbehaving servers Inspired by PR 274268 MFC after: 2 weeks Sponsored by: Axcient --- tests/sys/fs/fusefs/readdir.cc | 87 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/tests/sys/fs/fusefs/readdir.cc b/tests/sys/fs/fusefs/readdir.cc index 5fd8f25e8bb7..6b78e3a70697 100644 --- a/tests/sys/fs/fusefs/readdir.cc +++ b/tests/sys/fs/fusefs/readdir.cc @@ -321,6 +321,50 @@ TEST_F(Readdir, nodots) leakdir(dir); } +/* + * FUSE_READDIR returns a path with an embedded NUL. Obviously illegal, but + * nothing bad should happen. + */ +TEST_F(Readdir, nul) +{ + const char FULLPATH[] = "mountpoint/some_dir"; + const char RELPATH[] = "some_dir"; + uint64_t ino = 42; + DIR *dir; + struct dirent *de; + vector ents(1); + vector empty_ents(0); + const char nul[] = "foo\0bar"; + + expect_lookup(RELPATH, ino); + expect_opendir(ino); + ents[0].d_fileno = 4; + ents[0].d_off = 4000; + ents[0].d_namlen = sizeof(nul); + ents[0].d_type = DT_REG; + strncpy(ents[0].d_name, nul, ents[0].d_namlen); + expect_readdir(ino, 0, ents); + expect_readdir(ino, 4000, empty_ents); + + errno = 0; + dir = opendir(FULLPATH); + ASSERT_NE(nullptr, dir) << strerror(errno); + + errno = 0; + de = readdir(dir); + ASSERT_NE(nullptr, de) << strerror(errno); + EXPECT_EQ(4ul, de->d_fileno); + EXPECT_EQ(DT_REG, de->d_type); + EXPECT_EQ(sizeof(nul), de->d_namlen); + EXPECT_EQ(0, strcmp(nul, de->d_name)); + + ASSERT_EQ(nullptr, readdir(dir)); + ASSERT_EQ(0, errno); + + leakdir(dir); +} + + /* telldir(3) and seekdir(3) should work with fuse */ TEST_F(Readdir, seekdir) { @@ -397,6 +441,49 @@ TEST_F(Readdir, seekdir) leakdir(dir); } +/* + * FUSE_READDIR returns a path with an embedded /. Obviously illegal, but + * nothing bad should happen. + */ +TEST_F(Readdir, slash) +{ + const char FULLPATH[] = "mountpoint/some_dir"; + const char RELPATH[] = "some_dir"; + uint64_t ino = 42; + DIR *dir; + struct dirent *de; + vector ents(1); + vector empty_ents(0); + const char foobar[] = "foo/bar"; + + expect_lookup(RELPATH, ino); + expect_opendir(ino); + ents[0].d_fileno = 4; + ents[0].d_off = 4000; + ents[0].d_namlen = sizeof(foobar); + ents[0].d_type = DT_REG; + strncpy(ents[0].d_name, foobar, ents[0].d_namlen); + expect_readdir(ino, 0, ents); + expect_readdir(ino, 4000, empty_ents); + + errno = 0; + dir = opendir(FULLPATH); + ASSERT_NE(nullptr, dir) << strerror(errno); + + errno = 0; + de = readdir(dir); + ASSERT_NE(nullptr, de) << strerror(errno); + EXPECT_EQ(4ul, de->d_fileno); + EXPECT_EQ(DT_REG, de->d_type); + EXPECT_EQ(sizeof(foobar), de->d_namlen); + EXPECT_EQ(0, strcmp(foobar, de->d_name)); + + ASSERT_EQ(nullptr, readdir(dir)); + ASSERT_EQ(0, errno); + + leakdir(dir); +} + TEST_F(Readdir_7_8, nodots) { const char FULLPATH[] = "mountpoint/some_dir"; From nobody Thu Oct 5 17:02:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1dD11lmdz4w3wB; Thu, 5 Oct 2023 17:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1dD11H6kz3YMl; Thu, 5 Oct 2023 17:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696525377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F/RkckI/aZKR/Xg5QmMWs4ZdVexTzYQAP/Zefhp+gvY=; b=kV1vOtM+SE0u+qKzae7Fxl8N/iTd4aswp7MrGyh2YTSmudXiPNQKr2xk6sTVT9D9/FT8x3 qebmGx97dmyJfTDhreGeht6nTzHHX0568YwIvBCDkf5f91gUoX151GR4nM0Lnokg3KY87J sk7Np2G1Hbwsg268x19mSnLbKaQZ25KoBrRVpQz5hd9gVdw45c2fU4uzKrG9LyndOWjvIl ZYjIUWS6YuHaRHCjnIc7KLEKIA+xYvMHSHyBM2vDMSG9JoW8SPlraajOxq9h9MeoMLoYj3 KR93EYz5twNyzFkRvB0B/30xWdbAqFvaoVpyjyL/LNp/sSt4Mtcacd0b3WZBFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696525377; a=rsa-sha256; cv=none; b=LjKkoVfEBVe7k7WTtsNTy0dGgYJi8emjYf5evIqis5KhDVRej1p0v35bV4w+PFjJwCGpeL pxT8g8PTHQeQHkq0BkU8VJL4xUmuKmkGr/exMcNCZcEeKVjNzl+LPWasDJY9SnHPDHzE5S ZYmLvY5jbEsoR30cF7qXT/SRdnZcsObqKWQi7WRXBNM/to6KqQ2HxAcjY3EngrUMda/8oi ygVC4KzArtX8x9qbC0A2w9/4kptq/IsfzPLugCiXbAAJ78a9ENSmAir3HOY2iUbipIzwuF D1gvSQiJmu8o4yjWkK+KcLC2Ye7ZMPwJhLARr0LSd/3oBpZPTNYONsSU9VYJRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696525377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F/RkckI/aZKR/Xg5QmMWs4ZdVexTzYQAP/Zefhp+gvY=; b=R++Gpcb05wxbrMAzTWIrMmNeq18ORMi2RW6m32ZRi9N/4JbVoOv4FXxazTKQS6BmVXcrmW NLCaRJ6HEzeW74+PUS3Frs3jgZm+h4fluwCljzVZ2MH7ZBeZBpo0ZJJw3EcwC0zRMUm4il XHcrBBuICwvBuqZAscTtmqaXUCxlS6dQNvbVZa1VPruFU+QKOciF+CPfxydKDE5VfaBkLW qthxKhz4nUZWlV86Fsur4ELQZ4QNR+WGBT1yo09oh6yW69izRwDgHxnStGjdsooTp5PEiY Evj0Y1ljxs0mjrAEjYAi7CQftdHzB9ZIM7JpqJ8/M+i1oiG0pigGdanQk5L7ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1dD10Lgbz1Rsk; Thu, 5 Oct 2023 17:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395H2u62065257; Thu, 5 Oct 2023 17:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395H2uP2065254; Thu, 5 Oct 2023 17:02:56 GMT (envelope-from git) Date: Thu, 5 Oct 2023 17:02:56 GMT Message-Id: <202310051702.395H2uP2065254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: b911f504005d - main - dwc: if_dwc_aw: Include net/if_media.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b911f504005df67f8c25f9b2f817c16588cd309c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b911f504005df67f8c25f9b2f817c16588cd309c commit b911f504005df67f8c25f9b2f817c16588cd309c Author: Emmanuel Vadot AuthorDate: 2023-10-05 16:59:56 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 17:00:55 +0000 dwc: if_dwc_aw: Include net/if_media.h Needed my miivar.h Fixes: 6b73554e3e9b ("dwc: Do not re-invent phy mode type") --- sys/dev/dwc/if_dwc_aw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 6419c9dedca8..4b2735cd07cf 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -33,6 +33,7 @@ #include #include +#include #include From nobody Thu Oct 5 17:34:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1dwk0Zmhz4w8s8; Thu, 5 Oct 2023 17:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1dwk050tz3gf7; Thu, 5 Oct 2023 17:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696527286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fx5Ny1FODsaiJ8ClGdvGVTh8EwYyTA0jx7Y0ULPcpVA=; b=IGp98MUozYJ1W/R7Zrjxu/wKTfGRaydJO7JLjEiP3w/Kp/OKYdKbT7UEtSUE2Fxv0+e9bc mH+0GIglK6SdPYC3VvDW4IhuDfwDztxwu1usvS79CRtn7IDAbk7yOcJEeRjBnnLfc6fmrf E+c2R2I340+xnCPeUtNQaCmwwnNOfHK8YtzzaK8OFzEYisVH3Wof3Qh8Xn5wJCYL2omQbQ X2BMbVwkni+grbU/pvTUAtrb56QIWmq7pImU6f2Yyp/eQYg2w0eg0V5bZ08agESxh0pEEp QUfy1dujDV2Rt/FbvQlGe29SKdlbUaAlz4ECkAigbDtaDuXBGRTvYyB15IOB1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696527286; a=rsa-sha256; cv=none; b=MtrDEBHF25nMBZ31DS4PDNv4Pv/gEqROkA3qSnY8o+fEj0BAYkK5Dhhrd61/P0fil/oV/w jf5Hqv5BIr5o1ZUKb0B+X2cqb1RWaHAwE1e1jQysMYyvyDx69MKlTsTtgpFk1P08F0XbNO 8J+bpc0CRH5WyOO1sMZ0C7RfV7dG+7ASuaHv7bG1H7DF9hwD6maTahOPhxRfa/qdzDpZuy oeIlbiB5HgPtaApTtHRfxx9G3N9plczj4L+GlOaRdQ2TDGLIw0xqh5sch1UXIKAbHapyqI lAyTGDlLwMz6Brn2IVD5fYGsitkEH806fHKuQzmtKw/E2Jd5lDzK+31BzRw8qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696527286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fx5Ny1FODsaiJ8ClGdvGVTh8EwYyTA0jx7Y0ULPcpVA=; b=QEGuChvgj4Aejg7wpXSvFFYJSJV6BV0RNkzNfJ8JXir18X8EcjgXq1kaaRFqQO3pSsK/Nt QoeP2/XVRd17PU9Vu+ymfnaOrzR4q5NWt6XRD5C9IE8yB/t1XRDSsMQ/8whxuCtp6BS41U qAkWv2AYZOezOPWp1R0ivhgyyE3TyyigEQCH4bgb/V8bRmyOD5SYcWUYnz2CnW7cwQOz7S U/GqCvjYSTWAn3AryGlTPkMtlNUvq2HH6l+dmRBTfqYbwqn5o5ohy75m4WRaC3CRd1obdM ecqEwS0DnqOx4CGCrRh15/aCSJnPM7ZRABxCnwqag8JGPoTcKPLd9iveiv/0pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1dwj68Ykzmq; Thu, 5 Oct 2023 17:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395HYjo4014515; Thu, 5 Oct 2023 17:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395HYjV7014512; Thu, 5 Oct 2023 17:34:45 GMT (envelope-from git) Date: Thu, 5 Oct 2023 17:34:45 GMT Message-Id: <202310051734.395HYjV7014512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 2d05cbe00272 - stable/13 - fusefs: fix some bugs updating atime during close List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2d05cbe002726a28e11060a601d1877784f6d587 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2d05cbe002726a28e11060a601d1877784f6d587 commit 2d05cbe002726a28e11060a601d1877784f6d587 Author: Alan Somers AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers CommitDate: 2023-10-05 16:16:11 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) --- sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 5cd67d9af5a3..8fa60ff95d4c 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -780,6 +780,7 @@ static int fuse_vnop_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; + struct mount *mp = vnode_mount(vp); struct ucred *cred = ap->a_cred; int fflag = ap->a_fflag; struct thread *td = ap->a_td; @@ -795,12 +796,30 @@ fuse_vnop_close(struct vop_close_args *ap) return 0; err = fuse_flush(vp, cred, pid, fflag); - if (err == 0 && (fvdat->flag & FN_ATIMECHANGE)) { + if (err == 0 && (fvdat->flag & FN_ATIMECHANGE) && !vfs_isrdonly(mp)) { struct vattr vap; + struct fuse_data *data; + int dataflags; + int access_e = 0; - VATTR_NULL(&vap); - vap.va_atime = fvdat->cached_attrs.va_atime; - err = fuse_internal_setattr(vp, &vap, td, NULL); + data = fuse_get_mpdata(mp); + dataflags = data->dataflags; + if (dataflags & FSESS_DEFAULT_PERMISSIONS) { + struct vattr va; + + fuse_internal_getattr(vp, &va, cred, td); + access_e = vaccess(vp->v_type, va.va_mode, va.va_uid, + va.va_gid, VWRITE, cred); + } + if (access_e == 0) { + VATTR_NULL(&vap); + vap.va_atime = fvdat->cached_attrs.va_atime; + /* + * Ignore errors setting when setting atime. That + * should not cause close(2) to fail. + */ + fuse_internal_setattr(vp, &vap, td, NULL); + } } /* TODO: close the file handle, if we're sure it's no longer used */ if ((fvdat->flag & FN_SIZECHANGE) != 0) { diff --git a/tests/sys/fs/fusefs/access.cc b/tests/sys/fs/fusefs/access.cc index 3d6cddb9417b..5762269fac7b 100644 --- a/tests/sys/fs/fusefs/access.cc +++ b/tests/sys/fs/fusefs/access.cc @@ -55,7 +55,7 @@ void expect_lookup(const char *relpath, uint64_t ino) } /* - * Expect tha FUSE_ACCESS will never be called for the given inode, with any + * Expect that FUSE_ACCESS will never be called for the given inode, with any * bits in the supplied access_mask set */ void expect_noaccess(uint64_t ino, mode_t access_mask) diff --git a/tests/sys/fs/fusefs/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc index 8527b0c6deb5..ff25d37f5b4d 100644 --- a/tests/sys/fs/fusefs/default_permissions.cc +++ b/tests/sys/fs/fusefs/default_permissions.cc @@ -30,7 +30,7 @@ /* * Tests for the "default_permissions" mount option. They must be in their own - * file so they can be run as an unprivileged user + * file so they can be run as an unprivileged user. */ extern "C" { @@ -162,6 +162,7 @@ class CopyFileRange: public DefaultPermissions {}; class Lookup: public DefaultPermissions {}; class Open: public DefaultPermissions {}; class PosixFallocate: public DefaultPermissions {}; +class Read: public DefaultPermissions {}; class Setattr: public DefaultPermissions {}; class Unlink: public DefaultPermissions {}; class Utimensat: public DefaultPermissions {}; @@ -1140,6 +1141,44 @@ TEST_F(Rename, ok_to_remove_src_because_of_stickiness) ASSERT_EQ(0, rename(FULLSRC, FULLDST)) << strerror(errno); } +// Don't update atime during close after read, if we lack permissions to write +// that file. +TEST_F(Read, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = 100; + uint8_t buf[bufsize]; + const char *CONTENTS = "abcdefgh"; + ssize_t fsize = sizeof(CONTENTS); + + expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0755, UINT64_MAX, 1); + FuseTest::expect_lookup(RELPATH, ino, S_IFREG | 0755, fsize, + 1, UINT64_MAX, 0, 0); + expect_open(ino, 0, 1); + expect_read(ino, 0, fsize, fsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(fsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + TEST_F(Setattr, ok) { const char FULLPATH[] = "mountpoint/some_file.txt"; diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 3b2a04fe0a52..5beb59e9f3be 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -57,6 +57,14 @@ void expect_lookup(const char *relpath, uint64_t ino, uint64_t size) } }; +class RofsRead: public Read { +public: +virtual void SetUp() { + m_ro = true; + Read::SetUp(); +} +}; + class Read_7_8: public FuseTest { public: virtual void SetUp() { @@ -454,6 +462,47 @@ TEST_F(Read, atime_during_close) close(fd); } +/* + * When not using -o default_permissions, the daemon may make its own decisions + * regarding access permissions, and these may be unpredictable. If it rejects + * our attempt to set atime, that should not cause close(2) to fail. + */ +TEST_F(Read, atime_during_close_eacces) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + uint32_t valid = FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(EACCES))); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + ASSERT_EQ(0, close(fd)); +} + /* A cached atime should be flushed during FUSE_SETATTR */ TEST_F(Read, atime_during_setattr) { @@ -1321,6 +1370,40 @@ INSTANTIATE_TEST_CASE_P(RA, ReadAhead, tuple(true, 1), tuple(true, 2))); +/* With read-only mounts, fuse should never update atime during close */ +TEST_F(RofsRead, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + return (in.header.opcode == FUSE_SETATTR); + }, Eq(true)), + _) + ).Times(0); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + + close(fd); +} + /* fuse_init_out.time_gran controls the granularity of timestamps */ TEST_P(TimeGran, atime_during_setattr) { From nobody Thu Oct 5 17:37:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1dzk2Bssz4w95p; Thu, 5 Oct 2023 17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1dzk1jRdz4CYN; Thu, 5 Oct 2023 17: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=1696527442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0OwbQx3KeWM9EIVj8U9llZR7zaKJmmPkGyYa+vCSbo=; b=PNkSg2y1CrPi+cX9UaKqH470+fYSpgUwiifmnjs30o209GOnTghB0lce3cAMK7JPSdSr4Z hnI04SKPJZ2Z9/g4Y43VmFFxEVg2prD6BTZKShZbwuSPkErLhZdUs+1arcbpZZaNfbvoj8 Z3NLyUU9HQ7Ws9ylE5CbijrAIo/dKQJnoMjkAEN6A+sRMa4kOsJYKTjFBjjU8WMB9hEmHL dQcooHv9ohf4qxDzDXtkADWli4r3wFme2lUPdDZpC9r398Txn/Nm6CuL/rT4E1XFgQ1wKR ZKq+/bwQa2tiPnNyHcmi96HaKx2B+Vkfs92aduFl2yzydhTjEw9TNwJWIBHKAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696527442; a=rsa-sha256; cv=none; b=cDaZRKrfl3e91pjnHhBmuDC+BQjL0FGvdFR6jZb1rrH63eS0UptKnfSNh9o6F9smydo7VN PciJv6xy+1RYBQodXKwh6LGZs4nTdtYfNsPqLakoQAhPKYlQ2FERNYyd23BjVIersXsA/g Dd5DGHO5zb3jEmPq951iPxmB9S7hAXihfEu+FiSNCjTevZNpJMipeCLjuHUay7fE/0YNhX vnUjRBHsEVPE6/eDgAk6oEVvCcHPbDTxh9+wPL+ClQvZ0lPtOINOWFeBnsWJsWofzDTi3S QVY2FmpiFEqZXjrllLv2EZebpTgoylOigIYuBEkDWCEEZh3xwzlVqZ39Nc3HcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696527442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0OwbQx3KeWM9EIVj8U9llZR7zaKJmmPkGyYa+vCSbo=; b=pXjOEFiKz8MsqhWji56lPdUhGauV+YnTN+LGSHbbihgDX+CRDVi8wZUboPlNg7f1PihHPG 5lTDxjVHWbjL7mviWcdNFjzKkdGen6pMdzyjQLBEzhgWFfdhqpd0bYxFw6Mk51hVvJRBvY KMJG76OueT4SgOPit3FW+P6urD60ULaabtU84wOeaR5Xl+7qGWiNAPT21tISvkW6zO+xzS x7W51tnLP7v/htjZ6jpBxPIxtaEFmHrmOkQH6Ai2Dq+MmWsasU1/rftaANJRsvRnv2DHD0 48tU8+pLzEfLwy/NvAZ+PtL+GdHUGW9rG460cqg/Jy0rjwuWmlg4OFcemJ3ruw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1dzk0fgGzZf; Thu, 5 Oct 2023 17:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395HbLrO015024; Thu, 5 Oct 2023 17:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395HbLJZ015021; Thu, 5 Oct 2023 17:37:21 GMT (envelope-from git) Date: Thu, 5 Oct 2023 17:37:21 GMT Message-Id: <202310051737.395HbLJZ015021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 51426ad9c75b - stable/13 - mprutil: "fix user reply buffer (64)..." warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 51426ad9c75b21424a05208a0c3d122beb08ddd7 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=51426ad9c75b21424a05208a0c3d122beb08ddd7 commit 51426ad9c75b21424a05208a0c3d122beb08ddd7 Author: Alan Somers AuthorDate: 2023-02-22 22:06:43 +0000 Commit: Alan Somers CommitDate: 2023-10-05 17:35:27 +0000 mprutil: "fix user reply buffer (64)..." warnings Depending on the card's firmware version, it may return different length responses for MPI2_FUNCTION_IOC_FACTS. But the first part of the response contains the length of the rest, so query it first to get the length and then use that to size the buffer for the full response. Also, correctly zero-initialize MPI2_IOC_FACTS_REQUEST. It only worked by luck before. PR: 264848 Reported by: Julien Cigar Sponsored by: Axcient Reviewed by: scottl, imp Differential Revision: https://reviews.freebsd.org/D38739 (cherry picked from commit 7d154c4dc64e61af7ca536c4e9927fa07c675a83) --- sys/dev/mpr/mpr.c | 2 +- sys/dev/mpr/mpr_user.c | 4 ++-- sys/dev/mps/mps.c | 2 +- sys/dev/mps/mps_user.c | 4 ++-- usr.sbin/mpsutil/mps_cmd.c | 40 +++++++++++++++++++++++++++------------- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 6d41b77b1182..161914748e56 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1871,7 +1871,7 @@ mpr_setup_sysctl(struct mpr_softc *sc) SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, - strlen(sc->msg_version), "message interface version"); + strlen(sc->msg_version), "message interface version (deprecated)"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index d9dc3d2377a2..f2847ae36d66 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -852,7 +852,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1077,7 +1077,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index a312e95df771..10aea28db9ee 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1716,7 +1716,7 @@ mps_setup_sysctl(struct mps_softc *sc) SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, - strlen(sc->msg_version), "message interface version"); + strlen(sc->msg_version), "message interface version (deprecated)"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index a1ee620c713a..49dc0f05619c 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -863,7 +863,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1017,7 +1017,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/usr.sbin/mpsutil/mps_cmd.c b/usr.sbin/mpsutil/mps_cmd.c index 448e4cea602f..2101bbba73b0 100644 --- a/usr.sbin/mpsutil/mps_cmd.c +++ b/usr.sbin/mpsutil/mps_cmd.c @@ -721,25 +721,39 @@ mps_pass_command(int fd, void *req, uint32_t req_len, void *reply, return (0); } +/* Return the length in bytes of the device's MPI2_IOC_FACTS reply */ +static size_t +mps_get_ioc_factslen(int fd) +{ + MPI2_IOC_FACTS_REQUEST req; + const size_t factslen = 4; + char factsbuf[4] = {0}; + MPI2_IOC_FACTS_REPLY *facts = (MPI2_IOC_FACTS_REPLY*)factsbuf; + int error; + + bzero(&req, sizeof(req)); + req.Function = MPI2_FUNCTION_IOC_FACTS; + error = mps_pass_command(fd, &req, sizeof(MPI2_IOC_FACTS_REQUEST), + factsbuf, factslen, NULL, 0, NULL, 0, 10); + + if (error) + return (0); + + /* The card's response is measured in dwords */ + return (facts->MsgLength * 4); +} + MPI2_IOC_FACTS_REPLY * mps_get_iocfacts(int fd) { MPI2_IOC_FACTS_REPLY *facts; MPI2_IOC_FACTS_REQUEST req; - char msgver[8], sysctlname[128]; - size_t len, factslen; + size_t factslen; int error; - snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%d.msg_version", - is_mps ? "mps" : "mpr", mps_unit); - - factslen = sizeof(MPI2_IOC_FACTS_REPLY); - len = sizeof(msgver); - error = sysctlbyname(sysctlname, msgver, &len, NULL, 0); - if (error == 0) { - if (strncmp(msgver, "2.6", sizeof(msgver)) == 0) - factslen += 4; - } + factslen = mps_get_ioc_factslen(fd); + if (factslen == 0) + return (NULL); facts = malloc(factslen); if (facts == NULL) { @@ -747,7 +761,7 @@ mps_get_iocfacts(int fd) return (NULL); } - bzero(&req, factslen); + bzero(&req, sizeof(req)); req.Function = MPI2_FUNCTION_IOC_FACTS; #if 1 From nobody Thu Oct 5 17:52:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1fJn4cVvz4wCTB; Thu, 5 Oct 2023 17:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1fJn4QwFz4FHr; Thu, 5 Oct 2023 17:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696528329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cfx++HyOMK1g6mVR/vUnc5TO9o5fM5M2or2XQUirkII=; b=E8RkpnsYZ1FFYI66rgQMZK40Mzp5HCOIBrzu0nZ/4GlrCreCZdAHlDm2W+Ozt2CV/RZzJE gKJPBzaQnIxgT7MI34Y1srlTlxZmelNpI934/UPkczqTXTJE6BVyxlJUyhfzZ61rvo5MXg qspMp8Im5yPjlcyzujPk3V0bnlrUJtpSzquyEylDxA4h9Vxjs82uc5/qBjKUkjAtYBrAji yIZqYRE/PoQhYTjzCX1ZHg2YmVcBCQx6e+Ypj7QGRdwz88iOLthYECUvydW/yd+V+ubJP0 AwPH+fXbGPakFd0nCn8gq78qRxAM+UJ6yx7Gn+VtM9MlnusY1wXSEUitsiRylA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696528329; a=rsa-sha256; cv=none; b=yv3N9GEy0h/2d5nGmETxikfJ3BjxvLy/Z1hc1qpv6IlXwX71xcdISbId1xSUzFxV0gpOP9 TR8Zdqso/4JnmiRsVCd6T2hh61ZSr19fK7zF9rmTFskn37uuTfitMlvJMj9rEQvhFpcsPu PawFEc3Kxqn2KF6BVrYtBIDPgnYRwn/WHqSUXzHAG/owPrh2n/fmJ3kRPVnlDLPmNv2xr1 d3+jQpmr92EcSyU5yhwqHbMo91fPgjtanjHHoDcxCRAZB3M3Oqlt9PeQh2ajLau+uQl17p 34sZkMkRuHc1qn6UI1uVECLiUg2dcSizbJF/cNGDlt48CuDp69NyFBSXfBrgSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696528329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cfx++HyOMK1g6mVR/vUnc5TO9o5fM5M2or2XQUirkII=; b=pl2C1I4/UhNkSgF4BDGyLmzIATGCy+1EWLxFEXMjTJUdYQwupOQ2Uq2/lNVg+3VzD3NnWH /SRfh2+irPwSeCX8kocZAGJKqA34rIXF4yRlxonqSnWAwM6YKVTAJ2dncioc2PXWx7hlmD F1144oaF3LbVO37t+3sV5IchWWxbwb6X5HiZR8QiWAFP6W+5B+345hEzZUdm5qCgXXDuzd 0JkpPrPGl9fpTwtf5K19WuAmM7UsytYbqvzKx36afPLOVAVfF4uGR/iyj0A6RcUET5mypD C/m8evbQBKJn//bI6kCJ5xg0+GPoHFZrKUcohIpsxInrpkXN3BZUlOl/NUj1eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1fJn3VWGz19Q; Thu, 5 Oct 2023 17:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Hq98O043911; Thu, 5 Oct 2023 17:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395Hq9sh043908; Thu, 5 Oct 2023 17:52:09 GMT (envelope-from git) Date: Thu, 5 Oct 2023 17:52:09 GMT Message-Id: <202310051752.395Hq9sh043908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b6a61ac2d475 - main - Add mitigations(7) describing our vulnerability mitigations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6a61ac2d475fba9c45f7f407549a522f60dea18 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b6a61ac2d475fba9c45f7f407549a522f60dea18 commit b6a61ac2d475fba9c45f7f407549a522f60dea18 Author: Ed Maste AuthorDate: 2023-09-08 17:49:11 +0000 Commit: Ed Maste CommitDate: 2023-10-05 17:50:54 +0000 Add mitigations(7) describing our vulnerability mitigations This is an initial take on documenting vulnerability mitigations. Reviewed by: gbe (earlier) Sponsored by: The FreeBSD Foundation Co-authored-by: Olivier Certner Differential Revision: https://reviews.freebsd.org/D41794 --- share/man/man7/mitigations.7 | 349 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 349 insertions(+) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 new file mode 100644 index 000000000000..8023f094d678 --- /dev/null +++ b/share/man/man7/mitigations.7 @@ -0,0 +1,349 @@ +.\" Copyright © 2023 The FreeBSD Foundation +.\" +.\" This documentation was written by Ed Maste , and +.\" Olivier Certner at Kumacom SAS, under +.\" sponsorship of 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. +.\" +.Dd October 5, 2023 +.Dt MITIGATIONS 7 +.Os +.Sh NAME +.Nm mitigations +.Nd FreeBSD Security Vulnerability Mitigations +.Sh SYNOPSIS +In +.Fx , +various security mitigations are employed to limit the impact of +vulnerabilities and protect the system from malicious attacks. +Some of these mitigations have run-time controls to enable them on a global +or per-process basis, some are optionally enabled or disabled at compile time, +and some are inherent to the implementation and have no controls. +.Pp +The following vulnerability mitigations are covered in this document: +.Bl -bullet -compact +.It +Address Space Layout Randomization (ASLR) +.It +Position Independent Executable (PIE) +.It +Write XOR Execute page protection policy +.It +.Dv PROT_MAX +".It +"Read-Only Relocation (RELRO) +.\".It +.\"Bind Now +.\".It +.\"Stack Smashing Protection (SSP) +.\".It +.\"Supervisor Mode Memory Protection +.It +Hardware Vulnerability Mitigation Controls +.It +Capsicum +.El +.Pp +Please note that the effectiveness and availability of these mitigations may +vary depending on the +.Fx +version and system configuration. +.Sh DESCRIPTION +Security vulnerability mitigations are techniques employed in +.Fx +to limit the potential impact of security vulnerabilities in software and +hardware. +It is essential to understand that mitigations do not directly address the +underlying security issues. +They are not a substitute for secure coding practices. +Mitigations serve as an additional layer of defense, helping to reduce the +likelihood of a successful exploitation of vulnerabilities by making it +more difficult for attackers to achieve their objectives. +.Pp +This manual page describes the security mitigations implemented in +.Fx +to enhance the overall security of the operating system. +Each mitigation is designed to protect against specific types of attacks +and vulnerabilities. +.\" +.Sh SOFTWARE VULNERABILITY MITIGATIONS +.Ss Address Space Layout Randomization (ASLR) +Address Space Layout Randomization (ASLR) is a security mitigation technique +that works by randomizing the memory addresses where system and application +code, data, and libraries are loaded, making it more challenging for attackers +to predict the memory layout and exploit vulnerabilities. +.Pp +ASLR introduces randomness into the memory layout during process execution, +reducing the predictability of memory addresses. +ASLR is intended to make exploitation more difficult in the event that an +attacker discovers a software vulnerability, such as a buffer overflow. +.Pp +ASLR can be enabled on both a global and per-process basis. +Global control is provided by a separate set of +.Xr sysctl 8 +knobs for 32- and 64-bit processes. +It can be or disabled on a per-process basis via +.Xr proccontrol 1 . +Note that an ASLR mode change takes effect upon address space change, +i.e., upon +.Xr execve 2 . +.Pp +Global controls for 32-bit processes: +.Bl -tag -width kern.elf32.aslr.pie_enable +.It Va kern.elf32.aslr.enable +Enable ASLR for 32-bit ELF binaries, other than Position Independent +Exectutable (PIE) binaries. +.It Va kern.elf32.aslr.pie_enable +Enable ASLR for 32-bit Position Independent Executable (PIE) ELF binaries. +.It Va kern.elf32.aslr.honor_sbrk +Reserve the legacy +.Xr sbrk 2 +region for compatibility with older binaries. +.It Va kern.elf32.aslr.stack +If ASLR is enabled for a process, also randomize the stack location. +.El +.Pp +Global controls for 64-bit processes: +.Bl -tag -width kern.elf64.aslr.pie_enable +.It Va kern.elf64.aslr.enable +Enable ASLR for 64-bit ELF binaries, other than Position Independent +Exectutable (PIE) binaries. +.It Va kern.elf64.aslr.pie_enable +Enable ASLR for 64-bit Position Independent Executable (PIE) ELF binaries. +.It Va kern.elf64.aslr.honor_sbrk +Reserve the legacy +.Xr sbrk 2 +region for compatibility with older binaries. +.It Va kern.elf64.aslr.stack +If ASLR is enabled for a process, also randomize the stack location. +.El +.Pp +To execute a command with ASLR enabled or disabled: +.Pp +proccontrol +.Fl m Ar aslr +.Op Fl s Ar enable | disable +.Ar command +.\" +.Ss Position Independent Executable (PIE) +PIE binaries are executable files that do not have a fixed load address. +They can be loaded at an arbitrary memory address by the +.Xr rtld +run-time linker. +With ASLR they are loaded at a random address on each execution. +.\" +.Ss Write XOR Execute page protection policy +Write XOR Execute (W^X) is a vulnerability mitigation strategy that strengthens +the security of the system by controlling memory access permissions. +.Pp +Under the W^X mitigation, memory pages may be writable (W) or executable (E), +but not both at the same time. +This means that code execution is prevented in areas of memory that are +designated as writable, and writing or modification of memory is restricted in +areas marked for execution. +Applications that perform Just In Time (JIT) compilation need to be adapted +to be compatible with W^X. +.Pp +There are separate +.Xr sysctl 8 +knobs to control W^X policy enforcement for 32- and 64-bit processes. +The W^X policy is enabled by setting the appropriate +.Dv allow_wx +sysctl to 0. +.Bl -tag -width kern.elf64.allow_wx +.It Va kern.elf32.allow_wx +Allow 32-bit processes to map pages simultaneously writable and executable. +.It Va kern.elf64.allow_wx +Allow 64-bit processes to map pages simultaneously writable and executable. +.El +.\" +.Ss PROT_MAX +.Dv PROT_MAX +is a FreeBSD-specific extension to +.Xr mmap 2 . +.Dv PROT_MAX +provides the ability to set the maximum protection of a region allocated by +.Xr mmap +and later altered by +.Xr mprotect . +For example, memory allocated originally with an mmap prot argument of +PROT_MAX(PROT_READ | PROT_WRITE) | PROT_READ +may be made writable by a future +.Xr mprotect +call, but may not be made executable. +.\" +.\".Ss Read-Only Relocation (RELRO) +.\" +.Ss BIND_NOW +The +.Va WITH_BIND_NOW +.Xr src.conf 5 +build-time option causes binaries to be built with the +.Dv DF_BIND_NOW +flag set. +The run-time loader +.Xr rtld 1 +will then perform all relocation processing when the process starts, instead of +on demand (on the first access to each symbol). +When enabled in combination with +.Dv RELRO +(which is enabled by default) this provides +.Qt full +RELRO, the entire GOT (.got and .got.plt) are made read-only at program startup, +preventing attacks on the relocation table. +Note that this results in a nonstandard Application Binary Interface (ABI), +and it is possible that some applications may not function correctly. +.\" +.\".Ss Stack Smashing Protection (SSP) +.\" +.\".Ss Supervisor mode memory protection +.\" +.Ss Hardware vulnerability controls +See +.Xr security 7 +for more information. +.\" +.Ss Capsicum +Capsicum is a lightweight OS capability and sandbox framework. +See +.Xr capsicum 4 +for more information. +.Pp +.Sh HARDWARE VULNERABILITY MITIGATIONS +Recent years have seen an unending stream of new hardware vulnerabilities, +notably CPU ones generally caused by detectable microarchitectural side-effects +of speculative execution which leak private data from some other thread or +process or sometimes even internal CPU state that is normally inaccessible. +Hardware vendors usually address these vulnerabilities as they are discovered by +releasing microcode updates, which may then be bundled into platform firmware +updates +.Pq historically called BIOS updates for PCs . +.Pp +The best defense overall against hardware vulnerabilities is to timely apply +these updates when available and to disable the affected hardware's problematic +functionalities when possible (e.g., CPU Simultaneous Multi-Threading). +Software mitigations are only partial substitutes for these, but they can be +helpful on out-of-support hardware or as complements for just-discovered +vulnerabilities not yet addressed by vendors. +Some software mitigations depend on hardware capabilities provided by a +microcode update. +.Pp +FreeBSD's usual policy is to apply by default all OS-level mitigations that do +not require recompilation, except those the particular hardware it is running on +is known not to be vulnerable to +.Pq which sometimes requires firmware updates , +or those that are extremely detrimental to performance in proportion to the +protection they actually provide. +OS-level mitigations generally can have noticeable performance impacts on +specific workloads. +If your threat model allows it, you may want to try disabling some of them in +order to possibly get better performance. +Conversely, minimizing the risks may require you to explicitly enable the most +expensive ones. +The description of each vulnerability/mitigation indicates whether it is enabled +or disabled by default and under which conditions. +It also lists the knobs to tweak to force a particular status. +.Ss Zenbleed +The +.Dq Zenbleed +vulnerability exclusively affects AMD processors based on the Zen2 +microarchitecture. +In contrast with, e.g., Meltdown and the different variants of Spectre, which +leak data by leaving microarchitectural traces, Zenbleed is a genuine hardware +bug affecting the CPU's architectural state. +With particular sequences of instructions whose last ones are mispredicted by +speculative execution, it is possible to make appear in an XMM register data +previously put in some XMM register by some preceding or concurrent task +executing on the same physical core +.Po disabling Simultaneous Muti-Threading +.Pq SMT +is thus not a sufficient protection +.Pc . +.Pp +According to the vulnerability's discoverer, all Zen2-based processors are +affected +.Po see +.Lk https://lock.cmpxchg8b.com/zenbleed.html +.Pc . +As of August 2023, AMD has not publicly listed any corresponding errata but has +issued a security bulletin +.Pq AMD-SB-7008 +entitled +.Dq Cross-Process Information Leak +indicating that platform firmware fixing the vulnerability will be distributed +to manufacturers no sooner than the end of 2023, except for Rome processors for +which it is already available. +No standalone CPU microcodes have been announced so far. +The only readily-applicable fix mentioned by the discoverer is to set a bit of +an undocumented MSR, which reportedly completely stops XMM register leaks. +.Pp +.Fx +currently sets this bit by default on all Zen2 processors. +In the future, it might set it by default only on those Zen2 processors whose +microcode has not been updated to revisions fixing the vulnerability, once such +microcode updates have been actually released and community-tested. +To this mitigation are associated the following knobs: +.Bl -tag -width indent +.It Va machdep.mitigations.zenbleed.enable +A read-write integer tunable and sysctl indicating whether the mitigation should +be forcibly disabled (0), enabled (1) or if it is left to +.Fx +to selectively apply it (2). +Any other integer value is silently converted to and treated as value 2. +Note that this setting is silently ignored when running on non-Zen2 processors +to ease applying a common configuration to heterogeneous machines. +.It Va machdep.mitigations.zenbleed.state +A read-only string indicating the current mitigation state. +It can be either +.Dq Not applicable , +if the processor is not Zen2-based, +.Dq Mitigation enabled +or +.Dq Mitigation disabled . +This state is automatically updated each time the sysctl +.Va machdep.mitigations.zenbleed.enable +is written to. +Note that it can become inaccurate if the chicken bit is set or cleared +directly via +.Xr cpuctl 4 +.Po which includes the +.Xr cpucontrol 8 +utility +.Pc . +.El +.Pp +The performance impact and threat models related to these mitigations +should be considered when configuring and deploying them in a +.Fx +system. +.Pp +.Sh SEE ALSO +.Xr elfctl 1 , +.Xr proccontrol 1 , +.Xr rtld 1 , +.Xr mmap 2 , +.Xr src.conf 5 , +.Xr sysctl.conf 5 , +.Xr security 7 , +.Xr cpucontrol 8 , +.Xr sysctl 8 From nobody Thu Oct 5 18:27:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1g5f5WtBz4wJGw; Thu, 5 Oct 2023 18:27:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1g5f3FrZz4JX4; Thu, 5 Oct 2023 18:27:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id oPwyqeZQBmfesoT4PqNBRk; Thu, 05 Oct 2023 18:27:33 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id oT4NqepX1Zru0oT4OqjPL2; Thu, 05 Oct 2023 18:27:33 +0000 X-Authority-Analysis: v=2.4 cv=CpOsz10D c=1 sm=1 tr=0 ts=651f0015 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=8nJEP1OIZ-IA:10 a=bhdUkHdE2iEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=pMndMITy2tz2_I68OK0A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 422683B4; Thu, 5 Oct 2023 11:27:31 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 0F365134; Thu, 5 Oct 2023 11:27:31 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b6a61ac2d475 - main - Add mitigations(7) describing our vulnerability mitigations In-reply-to: <202310051752.395Hq9sh043908@gitrepo.freebsd.org> References: <202310051752.395Hq9sh043908@gitrepo.freebsd.org> Comments: In-reply-to Ed Maste message dated "Thu, 05 Oct 2023 17:52:09 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 05 Oct 2023 11:27:30 -0700 Message-Id: <20231005182731.0F365134@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNKoDCF9LGBgNB9CbYlIopXlU50/6XXOVpiqY4iTJvI1liW7pRZJtYs+fZoGDVogVitMNxLHC/7jKJzHBMdh4jOuUr5FoUwNjNuutQaSSCyXJeDwOUuU ZH9CBQ4VEXj4NW2PIChmek7j1hpl0fm5HFVmK678LobOpyWnqF0CZ0zrP9CECNLzvZpNV4FP+dvkdn5ZkemgxBRFJidpM3+vtji34GVQnvfWD1pT09B8mEX/ GA/DAHMmU6jeQ6NPr6zfUYLUJmiLoFqD3ZCaf6lZ3M+lmMtMIPuCfuSWGa/JUimVnbUOZr5afvo6TjcxH5OgS3aqRALYrBp75wrWpyktjAA= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4S1g5f3FrZz4JX4 In message <202310051752.395Hq9sh043908@gitrepo.freebsd.org>, Ed Maste writes: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b6a61ac2d475fba9c45f7f407549a522 > f60dea18 > > commit b6a61ac2d475fba9c45f7f407549a522f60dea18 > Author: Ed Maste > AuthorDate: 2023-09-08 17:49:11 +0000 > Commit: Ed Maste > CommitDate: 2023-10-05 17:50:54 +0000 > > Add mitigations(7) describing our vulnerability mitigations > > This is an initial take on documenting vulnerability mitigations. > > Reviewed by: gbe (earlier) > Sponsored by: The FreeBSD Foundation > Co-authored-by: Olivier Certner > Differential Revision: https://reviews.freebsd.org/D41794 > --- > share/man/man7/mitigations.7 | 349 +++++++++++++++++++++++++++++++++++++++++ This would be a good MFC candidate. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Thu Oct 5 20:36:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1jyv5CLKz4wf00; Thu, 5 Oct 2023 20:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1jyv4jbRz4Xjv; Thu, 5 Oct 2023 20:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696538215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9stKKMbcia1RrAsowRtNiixaih1X0pG/ya/89qkL+I=; b=gRpCCrtFA8FS3JXEF1PELfaYtHiVex3Bavn6whYvylpCJOu3LitjMzHC7tU4UWCsJZ1uli 5aPPDigJ5toFZOMQzVK9D4DwDe5RSSLsvFtDDy3jEKjyv76AFEc5obyOWq7JFfBXv8fLqV maw1gBqwFVNtr5N4DCYvMDSFFxshlkGaAB5iqsQJeDx8lZ+oFeMyNgJ5Wy3xJ18VcDTGkc CYKPhlTDgZhY06u/LvH+5QJQV0QksZzmbVebeyoZbt2+BSABsO++W3981X3/rBbth/MjFI NJ7G7hIB8QJDF2vr9lITd8biSqCXz1d0XC48cbpafV0JDK6BQ1Eazxuo6q8n4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696538215; a=rsa-sha256; cv=none; b=uCvpCrwO4GNCt9/u8UXW9W/DKPOO382uPO2XKcBgXgLbBCdhk4QpbJJHlr0KRc1WhVqflr ZfYl5QlMfmRbAS0sp1HR6p3MdqfxJaYiFU8p+fJY5o6rU0bX9LhT2fyRrkMmYHDHtg80+D bZh7izVBRhKnJn783Nc4X6cVcvtZFhM5Q6WTo7VenkwtGlRTPz3FKYxrNYitGrjscelg4g yqqkA8BfitEnGIkYiqev8rSCvQhncUgWkZHNt7Hm8CqvrAdE6Cq5NrQMEnLjTM1tXl6hUc X5cgRDWhBb726TOQo9vze4zNThvJ/ZF8Yy/zZklvrMNV+4WHlvmxwbZGXO5THA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696538215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9stKKMbcia1RrAsowRtNiixaih1X0pG/ya/89qkL+I=; b=NYtP75CJTWiTdxLvD8e3PdGHF8RUfc8R9muwjhOfEFSWH630vdou7mdz484awAl+ZU6g9o WrmuSLZ42k6lEBEUBpKkqCUHbw6tzTowKh2CypyFQW0VHRdnNa6DpD3Mj/EZvdQcrM8vbe lcksvkLvkZP1GxOc0dA6TO7O3s7yU8Hj8ldEiw7JNSSdaJ1YCXijc8WT8grpbP08RBVZEE VGBUGuII0c7W0VA8BddFX+TBA2vlN25GWUAnmKOnWY0iVP74qdR8Z5jk4JnbEYj9X7HX2/ 4l0PC3ReoiwpVUiegai600Ce7kZo10ZNWMTFxQaUwbRp/L0d8k9n7uu3m4fFVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1jyv3mBhz4gm; Thu, 5 Oct 2023 20:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395Kat4N013855; Thu, 5 Oct 2023 20:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395KatmI013852; Thu, 5 Oct 2023 20:36:55 GMT (envelope-from git) Date: Thu, 5 Oct 2023 20:36:55 GMT Message-Id: <202310052036.395KatmI013852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 73765a5fa7d0 - stable/12 - Advertise the MPI Message Version that's contained in the IOCFacts message in the sysctl block for the driver. mpsutil/mprutil needs this so it can know how big of a buffer to allocate when requesting the IOCFacts from the controller. This eliminates the kernel console messages about wrong allocation sizes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 73765a5fa7d0daa72387d41661c36922f7860bcb Auto-Submitted: auto-generated The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=73765a5fa7d0daa72387d41661c36922f7860bcb commit 73765a5fa7d0daa72387d41661c36922f7860bcb Author: Scott Long AuthorDate: 2020-02-07 12:15:39 +0000 Commit: Alan Somers CommitDate: 2023-10-05 20:36:00 +0000 Advertise the MPI Message Version that's contained in the IOCFacts message in the sysctl block for the driver. mpsutil/mprutil needs this so it can know how big of a buffer to allocate when requesting the IOCFacts from the controller. This eliminates the kernel console messages about wrong allocation sizes. Reported by: imp (cherry picked from commit 69e85eb8ae4919e0806bc2957cbc4a33f9138b54) mprutil: "fix user reply buffer (64)..." warnings Depending on the card's firmware version, it may return different length responses for MPI2_FUNCTION_IOC_FACTS. But the first part of the response contains the length of the rest, so query it first to get the length and then use that to size the buffer for the full response. Also, correctly zero-initialize MPI2_IOC_FACTS_REQUEST. It only worked by luck before. PR: 264848 Reported by: Julien Cigar Sponsored by: Axcient Reviewed by: scottl, imp Differential Revision: https://reviews.freebsd.org/D38739 (cherry picked from commit 7d154c4dc64e61af7ca536c4e9927fa07c675a83) --- sys/dev/mpr/mpr.c | 14 ++++++++++++-- sys/dev/mpr/mpr_user.c | 6 +++--- sys/dev/mpr/mprvar.h | 1 + sys/dev/mps/mps.c | 14 ++++++++++++-- sys/dev/mps/mps_user.c | 6 +++--- sys/dev/mps/mpsvar.h | 1 + usr.sbin/mpsutil/mps_cmd.c | 35 +++++++++++++++++++++++++++++++---- 7 files changed, 63 insertions(+), 14 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 562d629c7afa..b36e10d103d3 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -521,6 +521,12 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t attaching) sc->facts->FWVersion.Struct.Unit, sc->facts->FWVersion.Struct.Dev); + snprintf(sc->msg_version, sizeof(sc->msg_version), "%d.%d", + (sc->facts->MsgVersion & MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK) >> + MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT, + (sc->facts->MsgVersion & MPI2_IOCFACTS_MSGVERSION_MINOR_MASK) >> + MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT); + mpr_dprint(sc, MPR_INFO, "Firmware: %s, Driver: %s\n", sc->fw_version, MPR_DRIVER_VERSION); mpr_dprint(sc, MPR_INFO, @@ -1904,13 +1910,17 @@ mpr_setup_sysctl(struct mpr_softc *sc) "Total number of event frames allocated"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "firmware_version", CTLFLAG_RW, sc->fw_version, + OID_AUTO, "firmware_version", CTLFLAG_RD, sc->fw_version, strlen(sc->fw_version), "firmware version"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "driver_version", CTLFLAG_RW, MPR_DRIVER_VERSION, + OID_AUTO, "driver_version", CTLFLAG_RD, MPR_DRIVER_VERSION, strlen(MPR_DRIVER_VERSION), "driver version"); + SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, + strlen(sc->msg_version), "message interface version (deprecated)"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, &sc->io_cmds_active, 0, "number of currently active commands"); diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index 53b3f94ea152..62111b91af0b 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -855,8 +855,8 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) if ((cm != NULL) && (cm->cm_reply != NULL)) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - - if (sz > data->ReplySize) { + + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1081,7 +1081,7 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mpr_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index 8eb9379d8cff..bda6e9c7da17 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -369,6 +369,7 @@ struct mpr_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; char fw_version[16]; + char msg_version[8]; struct mpr_command *commands; struct mpr_chain *chains; struct mpr_prp_page *prps; diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 1fb7cf09eae8..7bb7d97cb538 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -498,6 +498,12 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) sc->facts->FWVersion.Struct.Unit, sc->facts->FWVersion.Struct.Dev); + snprintf(sc->msg_version, sizeof(sc->msg_version), "%d.%d", + (sc->facts->MsgVersion & MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK) >> + MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT, + (sc->facts->MsgVersion & MPI2_IOCFACTS_MSGVERSION_MINOR_MASK) >> + MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT); + mps_dprint(sc, MPS_INFO, "Firmware: %s, Driver: %s\n", sc->fw_version, MPS_DRIVER_VERSION); mps_dprint(sc, MPS_INFO, "IOCCapabilities: %b\n", @@ -1738,13 +1744,17 @@ mps_setup_sysctl(struct mps_softc *sc) "Total number of event frames allocated"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "firmware_version", CTLFLAG_RW, sc->fw_version, + OID_AUTO, "firmware_version", CTLFLAG_RD, sc->fw_version, strlen(sc->fw_version), "firmware version"); SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, "driver_version", CTLFLAG_RW, MPS_DRIVER_VERSION, + OID_AUTO, "driver_version", CTLFLAG_RD, MPS_DRIVER_VERSION, strlen(MPS_DRIVER_VERSION), "driver version"); + SYSCTL_ADD_STRING(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "msg_version", CTLFLAG_RD, sc->msg_version, + strlen(sc->msg_version), "message interface version (deprecated)"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "io_cmds_active", CTLFLAG_RD, &sc->io_cmds_active, 0, "number of currently active commands"); diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c index e7e376288961..a065112bf138 100644 --- a/sys/dev/mps/mps_user.c +++ b/sys/dev/mps/mps_user.c @@ -866,8 +866,8 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) if ((cm != NULL) && (cm->cm_reply != NULL)) { rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - - if (sz > data->ReplySize) { + + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) " "smaller than returned buffer (%d)\n", __func__, data->ReplySize, sz); @@ -1021,7 +1021,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data) rpl = (MPI2_DEFAULT_REPLY *)cm->cm_reply; sz = rpl->MsgLength * 4; - if (sz > data->ReplySize) { + if (bootverbose && sz > data->ReplySize) { mps_printf(sc, "%s: user reply buffer (%d) smaller " "than returned buffer (%d)\n", __func__, data->ReplySize, sz); diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h index bb0087bf0346..2326084fee3d 100644 --- a/sys/dev/mps/mpsvar.h +++ b/sys/dev/mps/mpsvar.h @@ -327,6 +327,7 @@ struct mps_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; char fw_version[16]; + char msg_version[8]; struct mps_command *commands; struct mps_chain *chains; struct callout periodic; diff --git a/usr.sbin/mpsutil/mps_cmd.c b/usr.sbin/mpsutil/mps_cmd.c index 51a0e77822d9..8d7432651495 100644 --- a/usr.sbin/mpsutil/mps_cmd.c +++ b/usr.sbin/mpsutil/mps_cmd.c @@ -727,28 +727,55 @@ mps_pass_command(int fd, void *req, uint32_t req_len, void *reply, return (0); } +/* Return the length in bytes of the device's MPI2_IOC_FACTS reply */ +static size_t +mps_get_ioc_factslen(int fd) +{ + MPI2_IOC_FACTS_REQUEST req; + const size_t factslen = 4; + char factsbuf[4] = {0}; + MPI2_IOC_FACTS_REPLY *facts = (MPI2_IOC_FACTS_REPLY*)factsbuf; + int error; + + bzero(&req, sizeof(req)); + req.Function = MPI2_FUNCTION_IOC_FACTS; + error = mps_pass_command(fd, &req, sizeof(MPI2_IOC_FACTS_REQUEST), + factsbuf, factslen, NULL, 0, NULL, 0, 10); + + if (error) + return (0); + + /* The card's response is measured in dwords */ + return (facts->MsgLength * 4); +} + MPI2_IOC_FACTS_REPLY * mps_get_iocfacts(int fd) { MPI2_IOC_FACTS_REPLY *facts; MPI2_IOC_FACTS_REQUEST req; + size_t factslen; int error; - facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY)); + factslen = mps_get_ioc_factslen(fd); + if (factslen == 0) + return (NULL); + + facts = malloc(factslen); if (facts == NULL) { errno = ENOMEM; return (NULL); } - bzero(&req, sizeof(MPI2_IOC_FACTS_REQUEST)); + bzero(&req, sizeof(req)); req.Function = MPI2_FUNCTION_IOC_FACTS; #if 1 error = mps_pass_command(fd, &req, sizeof(MPI2_IOC_FACTS_REQUEST), - facts, sizeof(MPI2_IOC_FACTS_REPLY), NULL, 0, NULL, 0, 10); + facts, factslen, NULL, 0, NULL, 0, 10); #else error = mps_user_command(fd, &req, sizeof(MPI2_IOC_FACTS_REQUEST), - facts, sizeof(MPI2_IOC_FACTS_REPLY), NULL, 0, 0); + facts, factslen, NULL, 0, 0); #endif if (error) { free(facts); From nobody Thu Oct 5 22:05:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1lwm3DY2z4vwdW; Thu, 5 Oct 2023 22:05:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1lwm2kfPz3GGx; Thu, 5 Oct 2023 22:05:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696543512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fdh59te33r8HTHQevfhZHVRDPktPS5vMr5nDRPC9sa4=; b=wdtY2gx5nCv4eMdMQ2bxri5br12aUPnMjXfmUKVuUj8fJ6/6Lasc6heWvSTGJZ7lpqPYIF IohPoikWa8vB3koH4XYbvxeMEj1zblVVZBoDOVF99FCCDeOZWISzPGokmDcoyWsyuTsYW6 tVz8usrIPcqcpRRYAWCG4wyOOqSzQI6mtKozCXO0y52cREzhipiZJytvsBaxQERq/iy6gP Wr156fRPPS9iNbWupuDiE+ZpWHilHwMmci/5+2oREcvlgcUAwYnVgrz7tlZmaHG+ckrBOX Qm4fyt8jRSrFoyLS+Y/Q4v1WSJE1kz4yI1slov+nNdMHcE2j8vlCJXwePioYHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696543512; a=rsa-sha256; cv=none; b=hRemQe4E4dlaE+hAK+m2GlWT3t4KtAhYQtGzSdWWUC2A2IE6DlBB5OgUA7q9g6h3Lix7oi dIVfuI9lt5B7JX3wi62hmVWUVeL8+4u7ET6CzuRpxsUTFVyM1ehic2ISqQCkT8DXPUOPWF yT598CyfRuSzRQf9RZtcUopb/5tWOggQXXrpC8rES2yGrQp18tl5zJ6htInE2JOcEO7vrD qlXEm279t5E/qagzZ5L/JffmG6x4y68wiTECa2RIMa6MlCA3Q2BnFKz4xr6up92Mz9EPOV 1kkxa72qWj8zkI9HzekqXmCWEsdhXyxWjd/c8yONtqMo0YB91N3t1Ip5ZR/0Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696543512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fdh59te33r8HTHQevfhZHVRDPktPS5vMr5nDRPC9sa4=; b=nH7AV8AuWOysG0wwn+qr9g38457yQnJus1ztiksD87pJ6y5djOUotikzcqQRv/XsE/VdRt 7vZHyxacUWQvQizOoJXi0IhTH+oO0zs4FrHxWi1SrTw+MMl1K4DPZVeDCI6aN8/I6v+a3S 7Q0w1huAaaclmFVVy7mLuZ/kWhDuP8DCNSoBhzpNqFQYZcKd9wclLZOJrK2F6aEjOXHxy6 olX8pApDjiAc4107PnYuxtsJsavZwhzLOMZCN80iqdLX634rf109H+EIdhLt6Sq1VaDV/2 W6eCN4PErVlMW+nMe+tZ/8zpEhXO1WRDiJp6KH+PGUpS3Efp2UADj1/OmtfNig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1lwm1nHwz7MQ; Thu, 5 Oct 2023 22:05:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395M5CgJ063436; Thu, 5 Oct 2023 22:05:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395M5Cqs063433; Thu, 5 Oct 2023 22:05:12 GMT (envelope-from git) Date: Thu, 5 Oct 2023 22:05:12 GMT Message-Id: <202310052205.395M5Cqs063433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 7a360746c877 - stable/14 - vfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a360746c877e00c994c60004ccd87253091dbba Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7a360746c877e00c994c60004ccd87253091dbba commit 7a360746c877e00c994c60004ccd87253091dbba Author: Mateusz Guzik AuthorDate: 2023-10-03 13:34:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 22:05:00 +0000 vfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup (cherry picked from commit 38a375c472d295df41adf73c5ddd50543f9d877c) --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 12b9f2d74641..7e059d374c31 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4036,7 +4036,7 @@ syscal_vfs_cache_fast_lookup(SYSCTL_HANDLER_ARGS) cache_fast_lookup_enabled_recalc(); return (error); } -SYSCTL_PROC(_vfs, OID_AUTO, cache_fast_lookup, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, +SYSCTL_PROC(_vfs_cache_param, OID_AUTO, fast_lookup, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, &cache_fast_lookup, 0, syscal_vfs_cache_fast_lookup, "IU", ""); /* From nobody Fri Oct 6 00:00:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1pV34MpVz4wHG2; Fri, 6 Oct 2023 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1pV33qNLz3Tlx; Fri, 6 Oct 2023 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696550443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SoAFPtrLsGzOvIyH7SsZ2QoipUiZ3kd9FkM1JGJpFPA=; b=dR1tUVbmBsQmFgXLjRz5CWCATgsZtza9o5ECk3NZBVtNu4ihEslU5IkeBM3eOX+85VQGw8 khFTxm3omrtdRLV3mROBXlH0osshueMoUHR7dOLYLEHl3P1ATt1EMnHlG+NUvvNxYoz2XU exPq0KHD9cC9u4+CE38MB3KNKv6rg9nOFISrCOU+6/n32uiKXsw9hXshTf8/jS4ix3gNDi XlnJdk915/k4sLvFB7Re3DF9VN25b0yGoluU+h8B3YtpAKDhsugh/D0f10yq98G9HU7Nsg XrUg0JVdGYovk4JeFd764o1FdDpVI2lkSw88nQoqCo2kSIM4lIn/84WdTUowXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696550443; a=rsa-sha256; cv=none; b=l76TG/C6fJ9Q7A/8mAKJwmXzeEzpIiZOTmJx/Hr2LZaMkcX+4fy3APwc30U7EGLIs1SNeV aHh2Z5eroeXve+C9sQPvjwJRUvGOX3WxA31JRWEGh7yiZABMk9+KC0IBRwZq3RetvdyQe/ V11uuBboNNeOI2RHgLgucj4OYfcIpZ1N+mLkM0EqzQxPk5T47waVKLfILuXvlXAucgSoA4 nQi9k3M/vzV5kAw0RKA1TyC1fOPqLsSDD71HH+ZmR0ThKHf4t3fxITr3UWMQBRllnU+R17 yBTREjbwo66FpSziFAcC00toG/gLqftdy6Atd9XwZbdXhLi5xnW2cVZT18Dg6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696550443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SoAFPtrLsGzOvIyH7SsZ2QoipUiZ3kd9FkM1JGJpFPA=; b=nbuveYy5dqNw5yHLrKdhHFcTA6YsekHfDfjBGi/2d6/3dPpYfeniadTRjUPzrLZX/5vPQK 00AwtMe6pGTXfj1iyG1mwWrrh1313d+OAu9Lj18LweiTZrxQ/wja/p//bs3MX04srF02Uu pt9s/M77nMeP9t8bmEMHDKyYADj9eOAzFU/ffbV7GSI78eTSuRhT1v7tkrhvWiXX8ta1oI 1e6RwwQYYDydEqXqeI6qp13Rv/EoKl+6tFs1CGSYcVrUcYsXyi9OebwC0js33LZ//agUb3 ggv3JtArjwbVc2omBYD+uXutl/8WlnteTJsdJcZDBaKBnhDtyhw76OtakaTPnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1pV32pQQzBMl; Fri, 6 Oct 2023 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39600hLM056437; Fri, 6 Oct 2023 00:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39600hME056434; Fri, 6 Oct 2023 00:00:43 GMT (envelope-from git) Date: Fri, 6 Oct 2023 00:00:43 GMT Message-Id: <202310060000.39600hME056434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 243550d32f42 - releng/14.0 - release: update releng/14.0 to BETA5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 243550d32f4231d4407cd57220d36e42153d97f0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=243550d32f4231d4407cd57220d36e42153d97f0 commit 243550d32f4231d4407cd57220d36e42153d97f0 Author: Glen Barber AuthorDate: 2023-10-06 00:00:16 +0000 Commit: Glen Barber CommitDate: 2023-10-06 00:00:16 +0000 release: update releng/14.0 to BETA5 Approved by: re (implicit) Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 58dc89079e90..41c4da97d022 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="BETA4" +BRANCH="BETA5" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Oct 6 01:50:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1rwW6D3tz4wZ11; Fri, 6 Oct 2023 01:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1rwW5lLWz4J55; Fri, 6 Oct 2023 01:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696557019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNpnCQ0UO91uouLDRsMVYOHBpviKE14JNZ5cEydRHeY=; b=GG1swYXJiSvIqRJvZ3It9dg5ur6S4JmvKnJNDEKATrMgpgKmisbyxbQm5H2HN0HgWT8gDU 17RAWKESBAFSlblzY7oV88YF8BZzsFGCdp8DuXc1UjgSRA3Rc/v8JOCxW55dizxf0rOI2Y JmkbjOVBa7SA1/nFfEpcI9swL8ScZqjivgtxXL5vjy4JiE+G+OBZnhq2Y7MyGiUudVpbpS x85LhUwqjJEuqvgHSAhnj0rn82aG53LwdurwPL/uSKnAdZIlGNFvuILkey41emPKenGdw5 zHCzysKhKVvzlVuczpMUsyPJNEHRAEOtabuaQDzbqsF3NFPS053oOMPiw6aasA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696557019; a=rsa-sha256; cv=none; b=Je/cs+/wV++a+DO+i3ZRrJBki1gQqOioNTspOQEJ6IJrvwhfxCNFsSXHnDiY/dhDbcnNbh UAEtEtbR3GdBblxd7DYP3hnLfOcomD2/e++3Ps5aVD5aNbYSKKZ4TicK6S84lj7EW9yBAs CRi5Pw4p92xk8+Hgvf77/M8iXfFR2Z+nONjxZlG+oq3EF3+N/UNum0PsTvdcVacBrijqCG KpDir0csHO3/W/DileBP2Bxa/+manXuiO/wcf8xL5qizG9p36YcMy/nyA31ZudNAt+QDgH G3BTFJcixTS+pnx5w4+c0hMa7FEFHMzuHp6Dkn5OAfEU/A+XR6ilABh8FeJEEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696557019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNpnCQ0UO91uouLDRsMVYOHBpviKE14JNZ5cEydRHeY=; b=XsgRMO8AtEhlCiA0litxt37FnQv0vEWeTFBksbFvlR5EnoKHE+8DOaPvdBjrsxD8+I9Pk1 2zGdPgHy9YyeObuG0OKmui/gJTgtwUI3gLcpNBgoUZRIScQbbpK5wyOBFgUgbKApoOEbHJ aofUSrhw2YJs2MIBFD/1TELiStv8zWZS1IR7c/3FxleGHY1hc2/GTWTUDfbXPlu9Ag5orZ bAa/DX4YxPpaUDRBfRSM2YRX7cLyxQHTWjqg7k3oXBnWlK9DPKxy0ubv2jjaPDM/Cnmkuq LOEffFb2nHBhxIca1RzwGGzrhdWxLgDjwbqTbNDi1XkTWZniHvaxItoClDEVMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1rwW4qPtzTZQ; Fri, 6 Oct 2023 01:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3961oJEW035831; Fri, 6 Oct 2023 01:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3961oJEq035828; Fri, 6 Oct 2023 01:50:19 GMT (envelope-from git) Date: Fri, 6 Oct 2023 01:50:19 GMT Message-Id: <202310060150.3961oJEq035828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6e5dcc6113da - main - Connect mitigations(7) to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e5dcc6113da649a79e5bc2c3ea9329bcd1d85d5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6e5dcc6113da649a79e5bc2c3ea9329bcd1d85d5 commit 6e5dcc6113da649a79e5bc2c3ea9329bcd1d85d5 Author: Ed Maste AuthorDate: 2023-10-05 17:55:36 +0000 Commit: Ed Maste CommitDate: 2023-10-06 01:48:27 +0000 Connect mitigations(7) to the build Also add some cross references. Sponsored by: The FreeBSD Foundation --- share/man/man7/Makefile | 1 + share/man/man7/security.7 | 3 ++- usr.bin/elfctl/elfctl.1 | 4 +++- usr.bin/proccontrol/proccontrol.1 | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 43d37fa33275..11246195201c 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -19,6 +19,7 @@ MAN= arch.7 \ hostname.7 \ intro.7 \ maclabel.7 \ + mitigations.7 \ operator.7 \ orders.7 \ ports.7 \ diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 6d6742fca0bb..a48e3607f0e5 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 18, 2023 +.Dd October 5, 2023 .Dt SECURITY 7 .Os .Sh NAME @@ -1101,6 +1101,7 @@ Enables mapping of simultaneously writable and executable pages for .Xr xdm 1 Pq Pa ports/x11/xorg-clients , .Xr group 5 , .Xr ttys 5 , +.Xr mitigations 7 , .Xr accton 8 , .Xr init 8 , .Xr sshd 8 , diff --git a/usr.bin/elfctl/elfctl.1 b/usr.bin/elfctl/elfctl.1 index 7c565049c155..2dbe04ee0ed2 100644 --- a/usr.bin/elfctl/elfctl.1 +++ b/usr.bin/elfctl/elfctl.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 4, 2022 +.Dd October 5, 2023 .Dt ELFCTL 1 .Os .Sh NAME @@ -95,6 +95,8 @@ Features may also be specified as a single combined value: .Bd -literal -offset -indent elfctl -e =0x5 file .Ed +.Sh SEE ALSO +.Xr mitigations 7 .Sh HISTORY .Nm first appeared in diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 index 6bef355a54c9..5cb5d584f480 100644 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 2, 2021 +.Dd October 5, 2023 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -126,7 +126,8 @@ process 1020, do .Sh SEE ALSO .Xr kill 2 , .Xr procctl 2 , -.Xr ptrace 2 +.Xr ptrace 2 , +.Xr mitigations 7 .Sh HISTORY The .Nm From nobody Fri Oct 6 07:55:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S211q6VMyz4wKWR; Fri, 6 Oct 2023 07:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S211q60Gxz3RcL; Fri, 6 Oct 2023 07:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696578927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zytb/AKN1BFq9bBFMedaod9wilrq0VzLQZX8gPIqn/U=; b=RaQVzDZNppqp1haSaGHDm/c9NmRTt461mnqZ0UMW3KbgWUarHKEnGLuJXiC6Y7Ixqbu5Qj uefBkgpmeHs815WNour2rfdpFXI9tpyerqqLGhtQNZFZIns94dSWqW+cSfgmR9wk0qbNSd Kx8uu7UkYwgcsFLnDdKoabw475ylMwWBWQucUUnVpvpdCMuonC+BAyB/6i3fKrSfGFqrv4 BK0nUFy6JY/rdGIuyFusozGFOYeDU3g8gfd3i4xoLHN0+wd9HwCqlXoeernRwbGuhSDkah HDn9XmLJQblpflB6T9oL355IluVYVZVn5Xx+6IDHjBkvaGWh8Fkbq1W+ry7UCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696578927; a=rsa-sha256; cv=none; b=EtAVeEvZNk+3CoH2Qnue8uguYLWK16GOAs0VvfR49i+ZleqQn28EOpy/o90mU1ai0Y+oPR uh2C8WGmZ8+5vzKhnVVp8A+MKFxpKrucdLedNKRS34rtngulus57vd38ExAJwHyFdinDcB OzkjlLun05diQkHCDEBT0zsqM3qWJaGoj/cYYn7fe0LbuDNtaT7r3X3VpqclR6DoNxenfY m9A2bT41pP7dueoJNl7iT+p2ceyJmRETuJ8Bal4/mlkvVlBq3usIfOFAfkmuUcNoMvztvf RJzrFGmcbhoFqlDJsYJ2g/iHgCKc2A37VoCSViwsbxSAsP48b3Nr6AyTt6nUkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696578927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zytb/AKN1BFq9bBFMedaod9wilrq0VzLQZX8gPIqn/U=; b=mR14zkrZYfPXfIae3fmlLlXzLKMGhPvoL0kCGM+EUdvxEfV8rMal2mFRyVAXuXG+cCUw7q qYZQKaOlvtXEo8M915COCNUM1ek7Mevhht2J5PUHG20zZMVcbAh5d+bGYSiGsebDbRnSY5 sGWVIC4dPbG0+9vn9eqHV7OJCevrJbSvRM5bP0DPoupSUnml7TF+A3ghfLL91UqDQGvDWS htBVNyCKgyk8y80Uu8UFgdCRwI+mrHO+l7QuQEUVmTVcrWWWL0HWEtHv4257QUa9wGd8n3 WXud5VUhy3eTq+sVNw/j+kyDfxUTGGOd4dGC+I6Kkte+VzVb3aaSHseZ1FFr6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S211q52y2zg9s; Fri, 6 Oct 2023 07:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3967tR4D041769; Fri, 6 Oct 2023 07:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3967tRoX041766; Fri, 6 Oct 2023 07:55:27 GMT (envelope-from git) Date: Fri, 6 Oct 2023 07:55:27 GMT Message-Id: <202310060755.3967tRoX041766@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: 1e853a1196fc - stable/14 - sbuf.9: Add LIBRARY section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1e853a1196fcabe890aafdf1a22616d392e28974 Auto-Submitted: auto-generated The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e853a1196fcabe890aafdf1a22616d392e28974 commit 1e853a1196fcabe890aafdf1a22616d392e28974 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-10-03 17:07:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-06 07:55:14 +0000 sbuf.9: Add LIBRARY section Sponsored by: Klara, Inc. MFC after: 3 days (cherry picked from commit 5a82fc7859f746d95811e43b3a117b8eea297749) --- share/man/man9/sbuf.9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 5ab045118f51..d4ffa050a893 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2020 +.Dd October 3, 2023 .Dt SBUF 9 .Os .Sh NAME @@ -60,6 +60,8 @@ .Nm sbuf_printf_drain , .Nm sbuf_putbuf .Nd safe string composition +.Sh LIBRARY +.Lb libsbuf .Sh SYNOPSIS .In sys/types.h .In sys/sbuf.h From nobody Fri Oct 6 07:55:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S211y5Wn6z4wKLt; Fri, 6 Oct 2023 07:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S211y4Kbbz3RxP; Fri, 6 Oct 2023 07:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696578934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h31yuekMRbz4OiaJErxdTVryhV3fejzQSVf0gFaVSq4=; b=OBevaNMiPS3MPH+rqe2K6Rkb9T/5gsw2h5leptSrS8UoBDHoLmiYFa3WCvkdh1INp17jiS QMkUF2WmencJFi+2E0rMCqRQofbPa5pqZ5MbSUTeRnKMH6LdGbiUY0+u4zNwoafft1r7kL aYzhS6/IUQv70vyAT3vPXzjjHNmsqK5IG5W0OBwo37LQ4gXFuiHKxnNW5FIgH+KkCLMiOy ddpFU0D5CPVOvhv75UdWec4GueKXFsUDN5llGV+8N5OkNDkSYgviHkChgWcKG6cNt0I4VY yOMGHXawiLzdW6KrBS/gbk8/R9tDB4AS5yfx1WaU2zOxetZhUJYXM94iHwnnUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696578934; a=rsa-sha256; cv=none; b=ww/7i+q2Gck8ltlqml+pCWqyjd7Go9/5pZMlwkq/TlFEbGZ7/DcwYwVC1JtAbYCfEy/P+L P9lEsBMMP1HpDZ2xlsvUw9LFDs0l4BudBqxFKbv4jVBRpxjek36jVcDlSrpmHbEOm1F8xl Aed8ht9LbmgUg+j56cl+BKkhuTheHiIORwKQyYs0p3GiObIWGJDJr4rNU6LWw4Mv+JbZnz GdNiAlYAOffWQDhks2sdtFIHAi4FKUh8ZCCIIJY0gsByXqWTLcD90ABn6AUxgnBZ54woNG QzZ35lEF9ZSMnab7yfaDlSojSC4wlOVILmdPXbGbTgecdKH3GtCC/m9zh+T+rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696578934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h31yuekMRbz4OiaJErxdTVryhV3fejzQSVf0gFaVSq4=; b=n3a7jYlP3hbR0rA5iN+tBe0BttthlYyVkAeLnjGhtC3TpF7UeFvSweqRz6MjE9q0viWtBJ IxRJkAh/D2y16D/DFqG6DtCmTiB+z7xRfF6/CvQxVMX8/TkX6JVzYds4LsKrbnyobMv7K9 p7KR5WoVuKFjVDS2npSCPUA2VWmBksdo9t1NO/u2O2tExmFfP9DjgKI1l68ZIEXOUNT7Kp EElXcHfMO0ZWqzwLCC4ZlAAiY1Oibi+SRJLcyV8e0L52uR1TZNZRtoEdqcNEKUz5LA0Lkr Inoxbg1e6qaAb9QtEdj3ur9KzHTDleuJVsmF5ReG6HlktfJ3g0+MYXYZDZTxEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S211y3R1Lzfnq; Fri, 6 Oct 2023 07:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3967tY2k041906; Fri, 6 Oct 2023 07:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3967tYu5041903; Fri, 6 Oct 2023 07:55:34 GMT (envelope-from git) Date: Fri, 6 Oct 2023 07:55:34 GMT Message-Id: <202310060755.3967tYu5041903@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: 1369c31e7808 - stable/13 - sbuf.9: Add LIBRARY section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1369c31e78082f70cb4a95429c866df397eb9d8b Auto-Submitted: auto-generated The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=1369c31e78082f70cb4a95429c866df397eb9d8b commit 1369c31e78082f70cb4a95429c866df397eb9d8b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-10-03 17:07:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-10-06 07:55:28 +0000 sbuf.9: Add LIBRARY section Sponsored by: Klara, Inc. MFC after: 3 days (cherry picked from commit 5a82fc7859f746d95811e43b3a117b8eea297749) --- share/man/man9/sbuf.9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 499b9b194d35..77640fb7fd26 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2020 +.Dd October 3, 2023 .Dt SBUF 9 .Os .Sh NAME @@ -60,6 +60,8 @@ .Nm sbuf_printf_drain , .Nm sbuf_putbuf .Nd safe string composition +.Sh LIBRARY +.Lb libsbuf .Sh SYNOPSIS .In sys/types.h .In sys/sbuf.h From nobody Fri Oct 6 08:25:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S21hG5vhGz4wPmB; Fri, 6 Oct 2023 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S21hG5Sb6z3VrH; Fri, 6 Oct 2023 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696580718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DabLgwITcVM4W16li6+fIf+Vt1N3smrrs7aILqBAQIg=; b=p/xC6Rti5dh9jI7DFy+QiB6AEVUya2AM433Ysk7r7gzo48uVEJKyiA6g3AGsYgvKktvn6l lG1Mfxx9XnD1gHPWOclZC7CN5ZR6YY9LhSJQ/oM45zudQ8tUYmJLARiBFxOPINiMwB/uta 2gWtfSjRXNG7AYJanSKzTEOCwAv/W+JCPtYSbi60+YZiFvI2aY+U820Y1Il6FkF2GbrDJD 3R/VZXi7j+rxOA+XJXRFQVMkq6wZPVcfBmnqKm0X9k4m0aBCY7rN8quHHZIbYPXmu15p40 ZnlcNWgTVgK4AofrDnD8RESfoyZifW6Dtg89XUPL3aADYH8l37VS2XkbnQZ3GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696580718; a=rsa-sha256; cv=none; b=HzKKPNWiuqYnWneTLH7U6vRXuuMi9wUr0GH3Kn64YL4KlrTcxaHUiVoeB7KOg7ch/L8fto g5Fr2lk3b/n7fxh36pSDb7+uy6C+QyJWbU+FoWvaLXSvRdiv5erNn/uxKASLpWv5j4O38C JDFOIaggPGCtolPA+JAv8Yc7BvApPdZvtkllqkv8wINbluO9hsludPOG9nVxpOmETydkTN kZvMtAukwpBHzj9oIhrOpF+Xs6KmBEMqVGf4FDno6amZIcXAV5xRs76jlkAxsOnCTD77O8 sTNZLoXtviVLmDnzbsAI8E4rH7hiu9azxOslz/PBgzHrv4RHMJ+biXjA7hRShQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696580718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DabLgwITcVM4W16li6+fIf+Vt1N3smrrs7aILqBAQIg=; b=wazIUVoCZs6A1G8YaMgPKMKSaJRr9WW0bz2dmw44hhZl4IDGDEpvSMq8ugS93WlCr742wV Rm5yuxf2e8Bi10EHFKcQpWM5UgWvkCyvau0clkTBSCtriAlimkFtQEeXjvOrGaiQDBDpZl M3WH6eYSpCafSDgQmup2popw8luIRExR7Rj/XoS+lDRHn6bsDlhwSwwXZ6PF+Y/o8MuHNC xkIpV/xfJGCOIcNOHTvCx1HLIeUfrDB18W84dwiBTtDEflDXnyjVyvi6VwXo0ZykCNNkeS h/RYKDamYE956dneHCYlVdo8TCteZHOD9nr9ETxUDIJtT9DCn9UvHbn+MjZWGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S21hG4XCKzgmc; Fri, 6 Oct 2023 08:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3968PIpH092854; Fri, 6 Oct 2023 08:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3968PIoH092851; Fri, 6 Oct 2023 08:25:18 GMT (envelope-from git) Date: Fri, 6 Oct 2023 08:25:18 GMT Message-Id: <202310060825.3968PIoH092851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3c871489cdd6 - main - if_re: add Realtek Killer Ethernet E2600 IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c871489cdd6c5606b2b1125f66b0e9b8f39561f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c871489cdd6c5606b2b1125f66b0e9b8f39561f commit 3c871489cdd6c5606b2b1125f66b0e9b8f39561f Author: Sk Razee AuthorDate: 2023-10-06 06:08:16 +0000 Commit: Kristof Provost CommitDate: 2023-10-06 06:10:04 +0000 if_re: add Realtek Killer Ethernet E2600 IDs PR: 274292 MFC after: 1 week Reviewed by: kp Event: Oslo Hackathon at Modirum --- sys/dev/re/if_re.c | 2 ++ sys/dev/rl/if_rlreg.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 27984200bd91..83fd31fc4f0b 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -178,6 +178,8 @@ static const struct rl_type re_devs[] = { "D-Link DGE-528(T) Gigabit Ethernet Adapter" }, { DLINK_VENDORID, DLINK_DEVICEID_530T_REVC, 0, "D-Link DGE-530(T) Gigabit Ethernet Adapter" }, + { RT_VENDORID, RT_DEVICEID_2600, 0, + "RealTek Killer E2600 Gigabit Ethernet Controller" }, { RT_VENDORID, RT_DEVICEID_8139, 0, "RealTek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, diff --git a/sys/dev/rl/if_rlreg.h b/sys/dev/rl/if_rlreg.h index 01634bb704c7..808d11e34346 100644 --- a/sys/dev/rl/if_rlreg.h +++ b/sys/dev/rl/if_rlreg.h @@ -991,6 +991,7 @@ struct rl_softc { /* * RealTek chip device IDs. */ +#define RT_DEVICEID_2600 0x2600 #define RT_DEVICEID_8139D 0x8039 #define RT_DEVICEID_8129 0x8129 #define RT_DEVICEID_8101E 0x8136 From nobody Fri Oct 6 09:05:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S22ZM6Swgz4wVVx; Fri, 6 Oct 2023 09:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S22ZM61xwz3cQn; Fri, 6 Oct 2023 09:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696583115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XioRreEG2wM1x4l12G4aB6alSC7i52CQyQ1qu9Ju3I4=; b=IGiVtt+SFSiO59qGG+F2hTMnCbHq5SyqHY9D6XAS1peKkyBPIUhjPg4f6pyiI59wzGfkVD 5KIjDc1CNTjbAMkTiYvVEx/xoibAkMQ5W2fAcFue3VbT/ctg1Rqlt3thTZzcGMmIzo94z6 7nzCx9z8mcok/2LlDAhNB3g6yDZyJl4R7srlQGdVsXPCCzTOYaUnkKS4IRwLUl5Ts+nzCJ vqNEj5aq7EqbMdpEbKXpayE9MCW7TZ9j3ZdRUrTGAXOxX8WZdDGQGA5JKLUU9Gr9w8cyBz ebLDqKzCP/XBlgrPsR9sIKD+9JbHSFo85zAOvE8v6/Nyad1LRxXUnLjTtL6FPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696583115; a=rsa-sha256; cv=none; b=XAWZGVJNGrR6ncW8J9JML2k4ShqeCw+inOlX9Wa4xpNu1wn2+qX1JQSAqmHVFCbo3zgJNZ 4uTR3PaOasMwhld8zNDE3SpdxE7K4IWZXnh9KHJ/biNtbh5cWcosP5Zil6frVXb4LKQJs+ rgVZPmazANlXu7cT11iP4TXSFMLkEv70vrEQuS2+KILyP6u3iL2+NNIAZQmsc0alzRdM83 SXEvfItBeVx6oEhpxlKA9Kom/7eStgtb737TPOMWBY1ZzKf/Da077Wkws+0uHMNR0KS3/w HzRJl5b6kfQ5lX3bdV0/OSng0S9oEClf5BAH8rKuahfscRD3lJHgEM1iN2PYrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696583115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XioRreEG2wM1x4l12G4aB6alSC7i52CQyQ1qu9Ju3I4=; b=xAIB47UZUHAxIxg8sr0rnIiJn+s3GIJM7PNZG7bxHt04jhuiYn0cetsdC2GBjCEE0Y28QN 9hv7cmSFAZ8LFzi9LDY1CsdcH0NGBkmTv5uxNGs6K9ZFzuosziJtA2Y7uhdomrGwiDjWgn //zSodrjtQIarIQKrqvehSEJpw47jKYUAjmvjQkcpOiwAsqTHd88KJjysU31X17mWjlpa4 ymEm1dnKuoVMuhHPSbLMUB8xQyzNwUkyx+BFDtpWJV8G4meSs0mmtbo0i4PCKnjlchP1hj ZWuDJiEIOUhVZQeTi0h8a4A1jbLMfUQMrzuqjfLPPVmNK95JnJsDltz0hHn8DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S22ZM55S6zhm4; Fri, 6 Oct 2023 09:05:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39695F5d059378; Fri, 6 Oct 2023 09:05:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39695FCI059375; Fri, 6 Oct 2023 09:05:15 GMT (envelope-from git) Date: Fri, 6 Oct 2023 09:05:15 GMT Message-Id: <202310060905.39695FCI059375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 07b2c79cc6c7 - main - Correct the example: use maxproc instead of nonexistent nproc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07b2c79cc6c782ae57b6287688338d0ac3941e66 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=07b2c79cc6c782ae57b6287688338d0ac3941e66 commit 07b2c79cc6c782ae57b6287688338d0ac3941e66 Author: Benedict Reuschling AuthorDate: 2023-10-06 09:02:30 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-06 09:02:30 +0000 Correct the example: use maxproc instead of nonexistent nproc Reported by: dewayne@heuristicsystems.com.au PR: 272357 Differential Revision: https://reviews.freebsd.org/D40885 --- share/man/man5/rctl.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rctl.conf.5 b/share/man/man5/rctl.conf.5 index 4f48b197214a..bf64e54fc567 100644 --- a/share/man/man5/rctl.conf.5 +++ b/share/man/man5/rctl.conf.5 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 14, 2011 +.Dd October 6, 2023 .Dt RCTL.CONF 5 .Os .Sh NAME @@ -61,7 +61,7 @@ To limit the number of processes for users in login class "testing", use a rule like .Bd -literal -offset indent # Resource limits for the "testing" class. -loginclass:testing:nproc:deny=100/user # At most 100 processes per user +loginclass:testing:maxproc:deny=100/user # At most 100 processes per user .Ed .Sh SEE ALSO .Xr rctl 8 From nobody Fri Oct 6 10:50:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S24w13LbVz4w47K; Fri, 6 Oct 2023 10:50:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S24w12xc5z4NS4; Fri, 6 Oct 2023 10:50:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696589441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7dtYScGtT50EEsnbldp7Nuhm44hRn8vvgpCd3yhVFs=; b=LQJKqCFiwvzSleavZILXmcIn/MXKFxOEnhI3i/vwPnB6+QAg5qomHJ3kEqe+qdZHmVCXnF +FoxDGr7hhlPdx7IpgVujKhpjBneK1F4Xp4H6WPWk+HhLixNCli6efk8o1ztPbnOZqHWwg YIJzhrkCQZmH5koPkLIBp7UXed+zo55UhSJmXel7bBqYSR5k6SxdVKxbrSTKFgl+5+JTOB rU5SieYl+vEUINdWT+y8IZlp7SsTw+uh3Q9fD3IDYgxx9LdU4TiUVISgE2yj6R0s4Ma24X Ew3JX2qGvUrIZelT3Hrb22q96BtOUcGIHV88o1OTnpLFFiDKsa903+eGMhlo3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696589441; a=rsa-sha256; cv=none; b=BvsYMAPDKAMLIzcQvdKUUgBQ+w0O286wnTv4tSAIboEopssjaa7vgEIh6Uad0Wvk9UAesZ xnivXTNDbUWg6NoIHOoDJ0gcOd2hDsa+NO+X+sJZtID3khD/E11rrozWv0OgDUXz91iwoX pH5bJ3HRWE+iPUVqxlGlFbxlZ5Aa+tX1ffDg4W7pab7WIOP7K9EBNTpPWl94StvlQXaA6a inxHNfwIrHB0UCfxNaF0fV1saW1ZsbWJ5NIV0yWKOrD58gjHyJfmZdmqzNqF52QWbNdNhB uoQpoCxKgMy4OvJcunomiGsXbwY9E2r/TiOcxMm7ja4dV1DwqE1Qe20CEb6Tjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696589441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7dtYScGtT50EEsnbldp7Nuhm44hRn8vvgpCd3yhVFs=; b=NNtL3SkhuN65FMmUw6kiPTa2AgRYI0NYvDA/AAEyl+Kx68V25mU88HuJCJuQjNZUj9IRa7 5HgDbo50yDHDq1sh+13X5qldm58J8FyU4GysejyEhjqVwdykONIN3xfSaAp+1j4pgneNB3 TZgh9QmbMLC2y9a+aVNOcPML+LoRkh+LxrgwxwY/9qQ4bVEbULeNhubjU2JxMx6MKArq0Y yHxRE6ibCJCGKhDED/6yG65kMV721u7h/PhpY+0TBSCesAQY1XvIfljhON0+4hZq0260zn pixgqqKzYJoNHcMbUBGMk5YwOU6qg41uls5oKbdQ/+fRrA4GmTNOxu0DuDYKMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S24w1204PzlYL; Fri, 6 Oct 2023 10:50:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396AofwC036760; Fri, 6 Oct 2023 10:50:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396AofGg036757; Fri, 6 Oct 2023 10:50:41 GMT (envelope-from git) Date: Fri, 6 Oct 2023 10:50:41 GMT Message-Id: <202310061050.396AofGg036757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3a11944bca0f - main - net80211: pass __func__, __LINE__ also to ieee80211_alloc_node() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3a11944bca0f07079a61f10468b704589c52a76f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3a11944bca0f07079a61f10468b704589c52a76f commit 3a11944bca0f07079a61f10468b704589c52a76f Author: Bjoern A. Zeeb AuthorDate: 2023-10-06 10:38:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 10:50:06 +0000 net80211: pass __func__, __LINE__ also to ieee80211_alloc_node() Pass caller information to ieee80211_alloc_node() so that in case IEEE80211_DEBUG_REFCNT is compiled in we can (better) track references, in this case the initial ieee80211_node_initref(). Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/net80211/ieee80211_node.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 88c8ab4eff1c..e451b03d8dac 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -84,7 +84,7 @@ static int ieee80211_sta_join1(struct ieee80211_node *); static struct ieee80211_node *ieee80211_alloc_node( struct ieee80211_node_table *, struct ieee80211vap *, - const uint8_t macaddr[IEEE80211_ADDR_LEN]); + const uint8_t macaddr[IEEE80211_ADDR_LEN], const char *, int); static struct ieee80211_node *node_alloc(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); static int node_init(struct ieee80211_node *); @@ -348,7 +348,8 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct ieee80211_channel *chan) ieee80211_channel_type_char(chan), chan->ic_flags); - ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr); + ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr, + __func__, __LINE__); if (ni == NULL) { /* XXX recovery? */ return; @@ -458,7 +459,8 @@ ieee80211_reset_bss(struct ieee80211vap *vap) /* XXX multi-bss: wrong */ ieee80211_vap_reset_erp(vap); - ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr); + ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr, + __func__, __LINE__); KASSERT(ni != NULL, ("unable to setup initial BSS node")); obss = vap->iv_update_bss(vap, ieee80211_ref_node(ni)); if (obss != NULL) { @@ -921,7 +923,8 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan, struct ieee80211_node *ni; int do_ht = 0; - ni = ieee80211_alloc_node(&ic->ic_sta, vap, se->se_macaddr); + ni = ieee80211_alloc_node(&ic->ic_sta, vap, se->se_macaddr, + __func__, __LINE__); if (ni == NULL) { /* XXX msg */ return 0; @@ -1401,7 +1404,8 @@ ieee80211_del_node_nt(struct ieee80211_node_table *nt, static struct ieee80211_node * ieee80211_alloc_node(struct ieee80211_node_table *nt, - struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) + struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN], + const char *func __debrefcnt_used, int line __debrefcnt_used) { struct ieee80211com *ic = nt->nt_ic; struct ieee80211_node *ni; @@ -1418,6 +1422,11 @@ ieee80211_alloc_node(struct ieee80211_node_table *nt, IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr); ieee80211_node_initref(ni); /* mark referenced */ +#ifdef IEEE80211_DEBUG_REFCNT + IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, + "%s (%s:%u) %p<%s> refcnt %d\n", __func__, func, line, ni, + ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)); +#endif ni->ni_chan = IEEE80211_CHAN_ANYC; ni->ni_authmode = IEEE80211_AUTH_OPEN; ni->ni_txpower = ic->ic_txpowlimit; /* max power */ @@ -1480,6 +1489,12 @@ ieee80211_tmp_node(struct ieee80211vap *vap, IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr); IEEE80211_ADDR_COPY(ni->ni_bssid, bss->ni_bssid); ieee80211_node_initref(ni); /* mark referenced */ +#ifdef IEEE80211_DEBUG_REFCNT + /* Only one caller so we skip func/line passing into the func. */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, + "%s (%s:%u) %p<%s> refcnt %d\n", __func__, "", -1, ni, + ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)); +#endif /* NB: required by ieee80211_fix_rate */ ieee80211_node_set_chan(ni, bss->ni_chan); ieee80211_crypto_resetkey(vap, &ni->ni_ucastkey, @@ -1513,7 +1528,7 @@ ieee80211_dup_bss(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; - ni = ieee80211_alloc_node(&ic->ic_sta, vap, macaddr); + ni = ieee80211_alloc_node(&ic->ic_sta, vap, macaddr, __func__, __LINE__); if (ni != NULL) { struct ieee80211_node *bss = vap->iv_bss; /* @@ -1541,7 +1556,7 @@ ieee80211_node_create_wds(struct ieee80211vap *vap, struct ieee80211_node *ni; /* XXX check if node already in sta table? */ - ni = ieee80211_alloc_node(&ic->ic_sta, vap, bssid); + ni = ieee80211_alloc_node(&ic->ic_sta, vap, bssid, __func__, __LINE__); if (ni != NULL) { ni->ni_wdsvap = vap; IEEE80211_ADDR_COPY(ni->ni_bssid, bssid); From nobody Fri Oct 6 10:57:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S253p1S63z4w5NV; Fri, 6 Oct 2023 10:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S253n6Tdzz4PN7; Fri, 6 Oct 2023 10:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696589845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kan/6lKfBNxtdlOTgzPy8mlUldGQ5jkMyi0VtRBBUHc=; b=hjN8g4hIg07yl20lxwpUC3hkawPrZd1d3nxVy3ewabOmBsBiZvcYi5kulB4AuH4vzxMpnZ 1t/ZxzqilOpzRghyZOXMB913ZCBzoxL8zrplLnstG6ads044hT7BUlP/BlWYYvCxabuAKI ZQ8TW2kS/hYLOkKjsN7Ti0PA+tmXDjiSnpfJzbmw7G6ohJ2TXK71RkosiH0r0IHwIOlqo1 +SQXIVpFRdRmYlE7iLJWFqo42Xc32y4MYtzJK6rMe5XMZ/uf0Ifwmu2yhqNZ8l1+SZiX+0 OqQ8qu7JGjnF5SHXJMNVoaRs9Ne3dahlTF2k5W4mncqWW1MCHu9bi1omO/Z08A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696589845; a=rsa-sha256; cv=none; b=jeNscsZpXt59749oBYDqR2x41PKN5S8Av4IGt5tA2TxL9wm9OE47mRJ6/lP0SSlvEm9+uM QTwhIY87p61rz19c9DaZ5yqTZk/Wv6P1Rp897I2qSfB88R3SymK9K4kake252HMRNFETne 7ajyP6kqQBcR/AzUbii2zZo7Fl/4KgOnivve/JLkY91cAjlHqNm2SW82lDV4QcPFkwcI8p swFzR6LJzkyRHK2WicHn2cKB+eHWDr7CDH8I8w+tieVxoAty3UtenKJ4Vuv9VLKyYbA/CT PJ9QuR2z7C3sE6t2GdIzq8EBIM37qUnq8fowN6wZnTTkjcp+7eoVtcy1DO0VAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696589845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kan/6lKfBNxtdlOTgzPy8mlUldGQ5jkMyi0VtRBBUHc=; b=lflJc26xYphZzBaGCXgpf8uDI1+QLtRYAD1LJvY3tEDVZPvFPGBJwhzYtf5RMLzTVO8aGS DsbmErFiHOwzYXcCqnGuq9dt6ADCfwAcUxwHhnwEVlAOEVB59/nn5ZvFkBRG3WizSoGGeL vqXfu18U5ft+71kySsYN62r85wTMuMXFF3p3BH/d/3ETnI0TFLrHGs0jhfRvjpp1eC+vb9 K7GyjtnvfCG1ImMhDF5kfWeendJSR3ofhT5ZIuJ34DqCJrwQx4FF2ioBAtFM5xbQMQtWu4 VB7L+geZktuEBVEeoW0m43LA3x5I8xW0m6h04ntEC/DOLDeJO6dAlHpZJ3hoFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S253n5ZxBzlLT; Fri, 6 Oct 2023 10:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396AvPUG043927; Fri, 6 Oct 2023 10:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396AvPPS043924; Fri, 6 Oct 2023 10:57:25 GMT (envelope-from git) Date: Fri, 6 Oct 2023 10:57:25 GMT Message-Id: <202310061057.396AvPPS043924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 299e2d5724c2 - main - rtw88: re-connect to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 299e2d5724c2bc4929b6eac3258f04055e97992e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=299e2d5724c2bc4929b6eac3258f04055e97992e commit 299e2d5724c2bc4929b6eac3258f04055e97992e Author: Bjoern A. Zeeb AuthorDate: 2023-10-06 10:53:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 10:56:37 +0000 rtw88: re-connect to the build This adds the (updated) rtw88 driver back to the build. Functionality has not been tested (much) so might not currently work but people offered to test. Firmware is provided by the wifi-firmware-rtw88-kmod port/package. This reverts commit 712468443df1130db8f893a5e2ce5c6a8dbf5cde. --- share/man/man4/rtw88.4 | 6 ++---- sys/modules/Makefile | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 24baf6a5194f..a1a74db41b42 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2022-2023 Bjoern A. Zeeb +.\" Copyright (c) 2022 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,15 +22,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 5, 2023 +.Dd October 06, 2023 .Dt RTW88 4 .Os .Sh NAME .Nm rtw88 .Nd Realtek IEEE 802.11n/ac wireless network driver .Sh SYNOPSIS -.Sy The driver is temporary disconnected from the build. -.Pp The driver will auto-load without any user interaction using .Xr devmatch 8 if enabled in diff --git a/sys/modules/Makefile b/sys/modules/Makefile index d2c5cc44705a..3eff75312fd3 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -565,7 +565,7 @@ _iwlwifi= iwlwifi _iwlwififw= iwlwififw .endif _ossl= ossl -#_rtw88= rtw88 +_rtw88= rtw88 _vmware= vmware .endif From nobody Fri Oct 6 13:04:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S27td6g43z4wS9y; Fri, 6 Oct 2023 13:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S27td6BBlz3DGL; Fri, 6 Oct 2023 13:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696597481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXG5ElnhmNCEOMDPbCPxYwO6iD2yMdKFzNnTnSYELi0=; b=jd5FR+t7BjYoXBZ0PPYTr1lVfQVaYXLHjxCZ/brJKKZDQw3ZBG+bmv3/EE4m3rT/1912Ww FFTcPDqK80xw9Rukhn4H1eAaeUrk94oZsPapjUgkcMl/RDUwzV5PoF5xzPC2tEeymQctNC bG97Gihac1idMgzL5hNCPnFKuRyM+AbvYlsnouYNPzDGi+J53+x3DYf+8f7bmt4JzSIZ3I lkBej5oDb09KRJ8qj+qppLtnECr/X2dtWmTgGC/8cV13JsJtGSfBHpl84t0aAqBpmlbHwh dI/C4boYnoxlv4QTkNWD5wkj0fU5iMLV10FbOoTt8XeXKfAiLkRX/NfY0Q0q8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696597481; a=rsa-sha256; cv=none; b=yuyW584EZzH0tEyPUyZ/T/qvCbxrSq3d9ZcQhRte/UeJ+4G0dqcTN2fEjLTnLouEH8ZCZ4 tGU/98fwAyeiO1cAVxxsRtSnBsOTCx1oN8jIkor6hiKjHqim13uy7PmadlJgVkWgEqfV+7 AMZopgc4N/4vZb4+TJDPG9SAaahEimDnvtO+qTflCmDArJ4tFNkkkmQn+WoIsaQ+gJFOQ5 AOmDU3phutGIq45dGwgUANw17ou3nAtWwlU7sCp9xqroBSBX5OX3ykRBkHHXkIIfaOJkrR ywz0o/Ve+JBJrUDCijOS/IRJDRXPBYRefyCQ32FMot1v3ar4GJXunUjXKhJZyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696597481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXG5ElnhmNCEOMDPbCPxYwO6iD2yMdKFzNnTnSYELi0=; b=wdFr2fomxiUAegN2nMWS1/xitVuWP9nBvBPoiq06sXDLfy4rt3hdz+DwKEIAiC2p0xclfc 1uOyYN67oA1wvhRZaKmNL+DWn0TpJjckPiCaVUHRGrMgEgQgPQInAbuF52h9w6kXa7icME JK88zRtympZZBW8GjolCY1QVUM8IAWuiIUEQMMNKGLcf94QapAg8vjQHerHFrWs4APXWcM NpJofpT/i82NOjQRr74he0xz3un0YqL6L+ud/8lj0jzSX02RLBN74Qx7PMeWIhBnDSGg3Q xxIZ/jnK5RQ5/ftW4cPintvdRp9fkNiRcm2saF5ChsHgEoLq4QaqI/iDY4gbaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S27td5FYyzprf; Fri, 6 Oct 2023 13:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396D4fIl059980; Fri, 6 Oct 2023 13:04:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396D4fPD059977; Fri, 6 Oct 2023 13:04:41 GMT (envelope-from git) Date: Fri, 6 Oct 2023 13:04:41 GMT Message-Id: <202310061304.396D4fPD059977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 70a0fb43f91c - main - growfs: make exit codes more consistent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70a0fb43f91cfe3d08db7cb443d9690f8bff065e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=70a0fb43f91cfe3d08db7cb443d9690f8bff065e commit 70a0fb43f91cfe3d08db7cb443d9690f8bff065e Author: Mina Galić AuthorDate: 2023-10-05 18:24:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-06 13:02:40 +0000 growfs: make exit codes more consistent We have overused err(1), so it's hard to distinguish when an error is very, very serious, and when it's just a user-error, or even harmless. This patch changes the current behaviour to distinguish between the following three: 1 for usage errors 2 for recoverable errors 3 or higher for unrecoverable errors Reviewed by: jilles, pauamma_gundo.com, des Differential Revision: https://reviews.freebsd.org/D27161 --- sbin/growfs/growfs.8 | 6 +++++- sbin/growfs/growfs.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/sbin/growfs/growfs.8 b/sbin/growfs/growfs.8 index f83c3c00cf1f..9a6076017c74 100644 --- a/sbin/growfs/growfs.8 +++ b/sbin/growfs/growfs.8 @@ -36,7 +36,7 @@ .\" .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" -.Dd December 13, 2017 +.Dd October 3, 2023 .Dt GROWFS 8 .Os .Sh NAME @@ -88,6 +88,10 @@ This value defaults to the size of the raw partition specified in .Nm will enlarge the file system to the size of the entire partition). .El +.Sh EXIT STATUS +Exit status is 0 on success, and >= 1 on errors. +Errors recoverable by user action are indicated by 2. +OS errors, which are usually not recoverable, are indicated by 3 or greater. .Sh EXAMPLES Expand root file system to fill up available space: .Dl growfs / diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index fc314d19a4e3..a63002271af1 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -147,7 +147,7 @@ growfs(int fsi, int fso, unsigned int Nflag) */ fscs = (struct csum *)calloc((size_t)1, (size_t)sblock.fs_cssize); if (fscs == NULL) - errx(1, "calloc failed"); + errx(3, "calloc failed"); memcpy(fscs, osblock.fs_csp, osblock.fs_cssize); free(osblock.fs_csp); osblock.fs_csp = NULL; @@ -259,7 +259,7 @@ growfs(int fsi, int fso, unsigned int Nflag) * and all the alternates back to disk. */ if (!Nflag && sbput(fso, &sblock, sblock.fs_ncg) != 0) - errc(2, EIO, "could not write updated superblock"); + errc(3, EIO, "could not write updated superblock"); DBG_PRINT0("fscs written\n"); #ifdef FS_DEBUG @@ -1339,7 +1339,7 @@ main(int argc, char **argv) size <<= 30; size <<= 10; } else - errx(1, "unknown suffix on -s argument"); + errx(2, "unknown suffix on -s argument"); break; case 'v': /* for compatibility to newfs */ break; @@ -1364,23 +1364,23 @@ main(int argc, char **argv) statfsp = getmntpoint(*argv); device = getdev(*argv, statfsp); if (device == NULL) - errx(1, "cannot find special device for %s", *argv); + errx(2, "cannot find special device for %s", *argv); fsi = open(device, O_RDONLY); if (fsi < 0) - err(1, "%s", device); + err(3, "%s", device); /* * Try to guess the slice size if not specified. */ if (ioctl(fsi, DIOCGMEDIASIZE, &mediasize) == -1) - err(1,"DIOCGMEDIASIZE"); + err(3,"DIOCGMEDIASIZE"); /* * Check if that partition is suitable for growing a file system. */ if (mediasize < 1) - errx(1, "partition is unavailable"); + errx(2, "partition is unavailable"); /* * Read the current superblock, and take a backup. @@ -1388,16 +1388,16 @@ main(int argc, char **argv) if ((ret = sbget(fsi, &fs, UFS_STDSB, 0)) != 0) { switch (ret) { case ENOENT: - errx(1, "superblock not recognized"); + errx(2, "superblock not recognized"); default: - errc(1, ret, "unable to read superblock"); + errc(3, ret, "unable to read superblock"); } } /* * Check for filesystem that was unclean at mount time. */ if ((fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) - errx(1, "%s is not clean - run fsck.\n", *argv); + errx(2, "%s is not clean - run fsck.\n", *argv); memcpy(&osblock, fs, fs->fs_sbsize); free(fs); memcpy((void *)&fsun1, (void *)&fsun2, osblock.fs_sbsize); @@ -1418,7 +1418,7 @@ main(int argc, char **argv) mediasize, "B", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - errx(1, "requested size %s is larger " + errx(2, "requested size %s is larger " "than the available %s", oldsizebuf, newsizebuf); } } @@ -1439,7 +1439,7 @@ main(int argc, char **argv) if (size == (uint64_t)(osblock.fs_size * osblock.fs_fsize)) errx(0, "requested size %s is equal to the current " "filesystem size %s", newsizebuf, oldsizebuf); - errx(1, "requested size %s is smaller than the current " + errx(2, "requested size %s is smaller than the current " "filesystem size %s", newsizebuf, oldsizebuf); } @@ -1451,7 +1451,7 @@ main(int argc, char **argv) * Are we really growing? */ if (osblock.fs_size >= sblock.fs_size) { - errx(1, "we are not growing (%jd->%jd)", + errx(3, "we are not growing (%jd->%jd)", (intmax_t)osblock.fs_size, (intmax_t)sblock.fs_size); } @@ -1461,7 +1461,7 @@ main(int argc, char **argv) if (yflag == 0) { for (j = 0; j < FSMAXSNAP; j++) { if (sblock.fs_snapinum[j]) { - errx(1, "active snapshot found in file system; " + errx(2, "active snapshot found in file system; " "please remove all snapshots before " "using growfs"); } @@ -1506,14 +1506,14 @@ main(int argc, char **argv) if (statfsp != NULL && (statfsp->f_flags & MNT_RDONLY) == 0) { fso = open(_PATH_UFSSUSPEND, O_RDWR); if (fso == -1) - err(1, "unable to open %s", _PATH_UFSSUSPEND); + err(3, "unable to open %s", _PATH_UFSSUSPEND); error = ioctl(fso, UFSSUSPEND, &statfsp->f_fsid); if (error != 0) - err(1, "UFSSUSPEND"); + err(3, "UFSSUSPEND"); } else { fso = open(device, O_WRONLY); if (fso < 0) - err(1, "%s", device); + err(3, "%s", device); } } @@ -1522,7 +1522,7 @@ main(int argc, char **argv) */ testbuf = malloc(sblock.fs_fsize); if (testbuf == NULL) - err(1, "malloc"); + err(3, "malloc"); rdfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), sblock.fs_fsize, testbuf, fsi); wtfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), @@ -1577,7 +1577,7 @@ main(int argc, char **argv) fragroundup(&sblock, sblock.fs_ncg * sizeof(struct csum)); if (osblock.fs_size >= sblock.fs_size) - errx(1, "not enough new space"); + errx(3, "not enough new space"); DBG_PRINT0("sblock calculated\n"); @@ -1591,11 +1591,11 @@ main(int argc, char **argv) if (statfsp != NULL && (statfsp->f_flags & MNT_RDONLY) == 0) { error = ioctl(fso, UFSRESUME); if (error != 0) - err(1, "UFSRESUME"); + err(3, "UFSRESUME"); } error = close(fso); if (error != 0) - err(1, "close"); + err(3, "close"); if (statfsp != NULL && (statfsp->f_flags & MNT_RDONLY) != 0 && chkdoreload(statfsp, warn) != 0) exit(9); From nobody Fri Oct 6 13:04:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S27tg1T0Dz4wS7t; Fri, 6 Oct 2023 13:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S27tg0PhHz3DP9; Fri, 6 Oct 2023 13:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696597483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuiibwZsRW3m6cOqhbz36ufOp+kUZVslgiL4IQOGJ6Q=; b=LA3NDwQEDnx82cBnblrYiUppAI/tlwc9Eovw8LU/LbuwgD810q19MW1rvo6YqMNGW3sn43 5K2u8E9ZvVGmPG/jkPAinTtgwwbEqrrUMhpW3AqLNyCoEo9Kt+H7pEeO6KWQb06xUhnuHU x1F/iH0nW1HnvHNWSHSdo14ueSB5lhIejwq0SPxe+xS9HUtBYQr0Efd45xMcp2/SfMia+Y LrfFcejgdoWsNi+eYSboRGZeMBIqu7BAPce+6oNRMB9rW2kRofh1fJDwce/xHkIO+KW8eZ rCaAXWCZByMZYHpdRhDpc7B15A94tWFYdxg2Sj4u6JLPVhvA2jC2et9WHNxnDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696597483; a=rsa-sha256; cv=none; b=CsgP6T5a+hmMS7f8OxNb01SNsca6vwuWgSQOCuRvQR7n00w2jx6VZvWwY64WT2sTABG0K4 lD6vFrpX8DqNpgXWW9ZdF+iSlN1YMJVFHhkWEFC0tONoB7unLwPDtNr52L708tK52MKi/n qdqmjtUSHFF1jMAUVAV347IEtrPaqcSnPjdtnOYTdxoshWpWjsWbTu+LxpvltQKfgYEYwu 04GNqk/pnfhiG+iGd3HiHvNyW5as/MvlI54NfXQzJG1XFjFIVb5sDwPkzDZbFwr/dBSDIE 2RBYsZPn3IEhqWsBudPSsXJYyhzIbxos0V4fSzPzcOHUeV52iHhQa+5gI9JVcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696597483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuiibwZsRW3m6cOqhbz36ufOp+kUZVslgiL4IQOGJ6Q=; b=PAWOmftV7F3D0SmstaH2EoWc0SaRTs4SbHEqG5Ep5/C9xV7ym1b41a87Rf28k9VHnxkaxh 2mxsOLZaTbgVuE4qE4uhrpiXxC6d/p6jfC5owWJLLBOK8fMu4Jn4HjzUtkoRNkCa6CSIcQ 4NogF6IspsCVjoI6kXgFQrkzVPsAm8Is/Ix2WGrlzBj92CYoxvPXEGhaAqgJqL2PO/4LiJ NGTXSSJX0tjrC/9hLsx2s019zjsteBqZMM+v5zDcKc5qzeP3DuVF4hNrgYygBam2VvYsAS 5oBLlgbV4hDKLxwFM1yiksnqBaXdGARzR1N2Ef9N8Td7d54nPCqvggosvu6TXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S27tf6YqXzpCG; Fri, 6 Oct 2023 13:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396D4g8T060025; Fri, 6 Oct 2023 13:04:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396D4gxA060022; Fri, 6 Oct 2023 13:04:42 GMT (envelope-from git) Date: Fri, 6 Oct 2023 13:04:42 GMT Message-Id: <202310061304.396D4gxA060022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6594288a6088 - main - mailmap: Add pstef and val List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6594288a6088caf9821487637d5d6ee8c27cd558 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6594288a6088caf9821487637d5d6ee8c27cd558 commit 6594288a6088caf9821487637d5d6ee8c27cd558 Author: Mina Galić AuthorDate: 2023-10-05 18:25:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-06 13:02:41 +0000 mailmap: Add pstef and val normalize pstef@'s Name, as well as Val Packett's. Reviewed by: pstef, val_packett.cool Differential Revision: https://reviews.freebsd.org/D41949 --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index b06274fe6df3..2e4c03966084 100644 --- a/.mailmap +++ b/.mailmap @@ -12,3 +12,5 @@ Dmitriy Alexandrov <83477269+AtariDreams@users.noreply.github.com> Alfonso Gregory <83477269+gAlfonso-bit@users.noreply.github.com> Jose Luis Duran +Val Packett +Piotr Paweł Stefaniak From nobody Fri Oct 6 14:08:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29JF1PgHz4wdKD; Fri, 6 Oct 2023 14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29JF0yZTz3Mxv; Fri, 6 Oct 2023 14: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=1696601309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOaTYBnOdRCu0XY0e4H9r9vp6mNutzKrgYNCPBj2Go8=; b=BwSgzsZ5PbhIibuUjoYu3Ed1pJYOqPLgOuob4DS85doOcEA0rXLXVOuEdR6+n4WG94CVB7 ALmOLBOcR/1p59U/6AJ0MTCsPe8ZOxRIsXvb36vPBFiiB0TvLv5FFwUA+2LZOo+VSXrwgb vJCZJ4Yp51wXfZQmXpxTyboQzAsiuKu2P39ESPUonhZpR3Is6ratQo3MAl/851XkPa3WbQ eOqScud8V3SMVllrXKCSVUTrVOzNvVyMivh8bd71fhIiq8SbLgtcpYM6F/vV9TJY8rFpRP OhapmUHNdARZYYHr+eNj47Rdn9CeFMLwu2/x2SXUmHeg98QIaGRoHaOFmfJq4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696601309; a=rsa-sha256; cv=none; b=aeRDzOKU6VMSzOZ7TwXxae4OeRhnJSCfmH2OOB947Uxs8fvNX1+btx6937/UtXjse5WOlz MirfvTNjMInTODHmlHwmrVwrZXAoRWkdewSRQg6C1gO0nZAgACNaY6d8K6dahHu4PrZuhn EgPMfQwgfm9LYvPOlyyiNHm7jOXNJk/cPsc0coJ3ioKTBKfl4RiBsNh50dVPG67KX3hjca Wi2J2xiANUGXi32uKbTFS+Ykd8iy5m2gw3khYK3SteTnm+yBwz5fyokb609bFpaZOsTl5F vaYwHphBUCyDZA7h/n885Ik+E1CloUr1TxtrjZcw1H1z0EP3xdOG2aWhMrswAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696601309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOaTYBnOdRCu0XY0e4H9r9vp6mNutzKrgYNCPBj2Go8=; b=Tq66Bn7CipkuKqH2jN6V07Jorea5Y7MGuEXIRnD9BCvjSpYov8dVKCBa0CtG7WUPe2dQhv yNe1dMPb7DT+erNXgBdYg0o6LffErcbGExar32F7Wwze/X2FnLN+BAjKoVkU404HHK9QG0 F9YFGcKbbLPQwPHM3BT8sTdHdud0nOzu852/+mdfyuFYK8GBu3n+QATLjeXuIYcb0UhZUX +XTqwJexERjpPxpM+7JDRTj9BfOeA1CqN22YxCb5lWXnu1p4EUayOgboEwPfwSEBPj5xHu 9o3i4JzMPeJvp4n7j9j488Gg3iZU1ri02yzaKdwO/U9gTEYMrTmBLAyRN2wwdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29JF00kZzqyH; Fri, 6 Oct 2023 14:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396E8SPW059966; Fri, 6 Oct 2023 14:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396E8S91059964; Fri, 6 Oct 2023 14:08:28 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:08:28 GMT Message-Id: <202310061408.396E8S91059964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 57b9a104a26d - main - Cirrus CI: Only trigger amd64-gcc12 on pull requests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57b9a104a26d0761c4cba5726f0ab78b50a57ded Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=57b9a104a26d0761c4cba5726f0ab78b50a57ded commit 57b9a104a26d0761c4cba5726f0ab78b50a57ded Author: Jose Luis Duran AuthorDate: 2023-10-06 12:13:26 +0000 Commit: Ed Maste CommitDate: 2023-10-06 14:07:59 +0000 Cirrus CI: Only trigger amd64-gcc12 on pull requests Since Cirrus Labs is limiting their free usage tier [1], limit gcc CI runs to pull requests only. [1]: https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/ --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 345e7ab148bb..99a6e0106897 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,7 +63,7 @@ task: TOOLCHAIN_PKG: ${TOOLCHAIN} EXTRA_MAKE_FLAGS: -s - name: amd64-gcc12 World and kernel build and boot smoke test (FreeBSD repo) - only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' + only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' && $CIRRUS_BRANCH =~ 'pull/.*' env: TARGET: amd64 TARGET_ARCH: amd64 From nobody Fri Oct 6 14:25:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gL684nz4wgbH; Fri, 6 Oct 2023 14:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gL5gXHz3QWp; Fri, 6 Oct 2023 14:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydchxDGLVTdouxGgENzP8fR50JLDXGaCtyRvjl/quz8=; b=nZmG9RfUbMZzokhtiyk2YlMQs60qW2oODoRTO+dCldr4LGLB5mkTMzxzoUAqPr8TyCeupK Bpuotbc0S8olIM9/T73HTjofaMKizWKR4SDkEAg3dHcQpz8SxjE6z8r8iPs0zKnpIJItnr E97E39yj/84BM45jSpA6O055xugaNVrivg0RX1+3olsq8vHA4bYgfRpbh7WNX9AcFe8wuc rObaflh6xA6yxZYABFczumFkq+KQXk4j8me0NzG2OzAYe+E+GjkCLeox5bS8z5y2entPuh YSRzpW2QrdN1akf/iz9ZEfWKhAzOwOrMb42j/w36VCGVJ9AILtwB6fquIrX77g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602302; a=rsa-sha256; cv=none; b=HxZ8sV/Sq6s4Z0JM4q1L4M7RzPSNBVw8TMt63FftkldAretu+ic8WxvIOsx11v6YPYxP0A 8QSCHtVKW9FLei89ByS7vkOYkC02IOWlrtrIWqDlaYD7xfgSsrWpppeCwGoqz9jV3jwPQJ ePZ5FI4oLcU/43ClWOvDJku6nLRCWXB4ZZVuhCrBcsVNjsMWP7bM31tkF+g0unysd5U82y 1OmTx5j0r9FEyp8AR/ai0UV9/v6i1ypugDCTcQJbQ0XcDMhYmjRoq23D85uglePkzSBN3/ iokrT/ZtaWcCayFu+S+UmXJJXVU4MkVz61tzBCSUcrB/CTee6Gqz++mw6kptYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydchxDGLVTdouxGgENzP8fR50JLDXGaCtyRvjl/quz8=; b=ycWgU89+dF9RNIEbO6gem1BcDqRISiSiqETUTz4X40ak/9s4YLXX+jQgLqJ29w3mj+FfVM 2hYdEvOTeqj29Bu+ctKXwGww9bRErPmu8o3iQCYscMXbJc9+hc8VXPgxByKtn6/2gn6rFi lwBQZLpw3LPPgLXNRWqpyuYCb+1XE62U1dUJ9ujf3zAklVaH+gj7EbjjA6zdPGph+GjCvd jpbG+Z58qQiZAxDBzM/dCqpNVyN/HxRDGOpW7lVwoeKDK2y9i+YMVxmKYNUFxD94Piqafp 3hCBTmxynXw0K5IsFam4a71yVMJEWYJlA1d0F6kG7xzxW93dHqQLHTCTT+H+sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gL4StkzrXF; Fri, 6 Oct 2023 14:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP2B0092901; Fri, 6 Oct 2023 14:25:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP2N9092896; Fri, 6 Oct 2023 14:25:02 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:02 GMT Message-Id: <202310061425.396EP2N9092896@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: 2709483a725e - stable/14 - linuxkpi: fix iteration in __sg_alloc_table_from_pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 2709483a725e1da2d443d9e391bfaa0f223099be Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2709483a725e1da2d443d9e391bfaa0f223099be commit 2709483a725e1da2d443d9e391bfaa0f223099be Author: Austin Shafer AuthorDate: 2023-09-06 14:08:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 linuxkpi: fix iteration in __sg_alloc_table_from_pages Commit 3f686532c9b4 tried to fix an issue with not properly starting at the first page in the sg list to prevent a panic. This worked but with the side effect of incrementing "s" during the final iteration causing it to be NULL since the list had ended. In cases non-DEBUG kernels this causes a panic with drm-5.15, since "s" is NULL when we later pass it to sg_mark_end(). This change decouples the iteration sg from the return value so that it is never incremented past the final page in the chain. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41574 (cherry picked from commit 09b0401e91a92bcb58ea1873857b42f8211f660f) --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 0e4cc90e57a5..e462d5c649f1 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, { unsigned int i, segs, cur, len; int rc; - struct scatterlist *s; + struct scatterlist *s, *sg_iter; #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 if (prv != NULL) { @@ -377,10 +377,18 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, #endif cur = 0; - for (i = 0, s = sgt->sgl; i < sgt->orig_nents; i++) { + for_each_sg(sgt->sgl, sg_iter, sgt->orig_nents, i) { unsigned long seg_size; unsigned int j; + /* + * We need to make sure that when we exit this loop "s" has the + * last sg in the chain so we can call sg_mark_end() on it. + * Only set this inside the loop since sg_iter will be iterated + * until it is NULL. + */ + s = sg_iter; + len = 0; for (j = cur + 1; j < count; ++j) { len += PAGE_SIZE; @@ -394,8 +402,6 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, size -= seg_size; off = 0; cur = j; - - s = sg_next(s); } KASSERT(s != NULL, ("s is NULL after loop in __sg_alloc_table_from_pages()")); From nobody Fri Oct 6 14:25:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gN0DxJz4wghG; Fri, 6 Oct 2023 14:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gM6qgTz3QVQ; Fri, 6 Oct 2023 14:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSWChhgW8dk0YKKiJfaLFA0ifSPsEtbFij/sUsEUeUQ=; b=qr0Uv00+rFVzfWhjnr3aFRulW9Syozm7QGfY41K/iY18r12rGwZelA06DOwIvXZaQVIk/E rTTGVGMwzFs0/7uJI8ptFVDAD7E93Puyx4slMmditXLHQKsMcvLn99KKlIGeA1n4lIPPZQ 4svU9WEyurTct6ADc58KdUDO7Eu/d9nAPPC8h9rLIy8Wt2aZDO7DTyA2hCf/LVMhcVgDWj Som1W2XnfARv+HbHAKPKrGbgkid+a4yx7/1/IC2Gn72+r6W5hT/Wnh+pNl7+2/BLRn9ipt RnxRjoI9BvrTVeYXkX1R6loiWFhXJBGeqY6vLSycRqRNYnOifT9CbDUSi3rOMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602304; a=rsa-sha256; cv=none; b=ZHj22s6SuNaqFwAcSxr4SNPK9rlbsWDBTPyZqU4aqLLygAEQ13VkinK6pUmny0RZ0Vt0Wk uzPJVtRvjQem7GZ3aq9fnd8P1sHXFjaunqkXsTFfyxHE5JfwFHKDNlt0XzFKUHIwy/w/B8 qR0QAhMdCmaDQWW/90XzUfo4kxF4NdhVlq+5kzV3kiiEO2IKqngfFclybPIXyGFmgYDKtx BPdMh7o9s73THn9SnmQx2wTpDOv5DhfVz/dCltXxSE823sU3B0HeChCKQxncPRkQVx/fl6 JUBj6P/HN+/CDUikDWm+kA3kBvBwV3IF8UQbBBExcn6IrrdnRqm2TA/cATlHEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSWChhgW8dk0YKKiJfaLFA0ifSPsEtbFij/sUsEUeUQ=; b=FWlOmUR4q1z93ogfqbcysIq5vHj6X7nrFOjKU2HuWH/ehdp2Tp4jEtMMIaEpQ7zaKq21pY zRLFMhhtf+q1S7We4QQODL5oanfT7T8SGpKdOKIskeizaqIF7ZzkSffb4YTK6+Ojsr5jDO 84idj9sefQa3OuJvvmBnrGkl1KMIbjsCDT4aoDMCqA3ZG2WY3de3M0XnxCnImtrX9wlX9Z RQleY9T9UNUyzZg5s52cCAKcMJMH9CdykbHpsl7kP1KdeTwq3ODgUCk5rLlnr7UlooNdeR m4xiaMGWlN9kWi7JtuTrDJ+5zGbTy1Y4KP8UMhazTl2Q6vGDODGbib6d220QOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gM5GzQzrXG; Fri, 6 Oct 2023 14:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP3cj092955; Fri, 6 Oct 2023 14:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP3Fj092952; Fri, 6 Oct 2023 14:25:03 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:03 GMT Message-Id: <202310061425.396EP3Fj092952@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: 8bda9f9c56a9 - stable/14 - netlink: fix accessing freed memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 8bda9f9c56a997d851e8fc2c20b5e37f072ecb4a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8bda9f9c56a997d851e8fc2c20b5e37f072ecb4a commit 8bda9f9c56a997d851e8fc2c20b5e37f072ecb4a Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:11:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 netlink: fix accessing freed memory The check for if_addrlen in dump_iface() is not sufficient to determine if we still have a valid if_addr. Rather than directly accessing if_addr check the STAILQ (for the first entry). This avoids panics when destroying cloned interfaces as experienced with net80211 wlan ones. Sponsored by: The FreeBSD Foundation Reviewed by: jhibbits (earlier version), kp Differential Revision: https://reviews.freebsd.org/D42027 (cherry picked from commit 7d48224073ce14f0dd3db2d4e96876ac928b52f2) --- sys/netlink/route/iface.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index e1939c7681de..b6e120933f83 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -292,6 +292,7 @@ static bool dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, int if_flags_mask) { + struct epoch_tracker et; struct ifinfomsg *ifinfo; NL_LOG(LOG_DEBUG3, "dumping interface %s data", if_name(ifp)); @@ -321,11 +322,15 @@ dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, nlattr_add_u8(nw, IFLA_PROTO_DOWN, val); nlattr_add_u8(nw, IFLA_LINKMODE, val); */ - if (if_getaddrlen(ifp) != 0) { - struct ifaddr *ifa = if_getifaddr(ifp); + if (if_getaddrlen(ifp) != 0) { + struct ifaddr *ifa; - dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr); - } + NET_EPOCH_ENTER(et); + ifa = CK_STAILQ_FIRST(&ifp->if_addrhead); + if (ifa != NULL) + dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr); + NET_EPOCH_EXIT(et); + } if ((if_getbroadcastaddr(ifp) != NULL)) { nlattr_add(nw, IFLA_BROADCAST, if_getaddrlen(ifp), From nobody Fri Oct 6 14:25:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gP0gmvz4wghL; Fri, 6 Oct 2023 14:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gN6wWdz3QPY; Fri, 6 Oct 2023 14:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MrN0YZQn8zl8lYddQlaNUDOP6tDd+Xi6dWuPmBdLweU=; b=OoL7VelrpKd+GwqUtCyjIRWLgsqST1KLqtlXd6ke1IHOBArnOrSsILxcS8x/EUn6RseXER hs16ThmFz6eBUpGenfNyf04gSmnXOF6mGxN7RAc9TUDLuBbuHn0A4j7112WjHjDekukLVq L9A+h5PUsdVffvB83lInTFQN5uY42Q74NYJBOyf1OARTIndkRCR6ZfGtPxiMdVWi1jdTyB Q5NHcP8PO8Lv8MUdIkJcKvdiuo/cysrXq4HMWnD/022K2AnjVMjmiVBFPjwlyRGK+aWZqc hBacAlgwDRy26aHtfjHvvwpQ3ZWnwnUPpuWkc5KeJCHnab7OkTmzy5S2aApwPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602305; a=rsa-sha256; cv=none; b=Wvb03c6Zj/Lumd4EDno3ldzWin7ZayFycwsvcgpw1uPtgAR50o6KbGK1ZD2IpkW+si6m3Y 8JbFwCSZbK40H3+vi69tvjsZWUJsiMuP3JcKQkYJSO4NmTwu5kOp/oDwDza/w6oMwlJOsP oI0x9vFS6PBwThTcyi+1zqGWFUCcJoW9PtBKvcrLbxwVr+a27vt1RJInmf2D7E71tnwhBP J1n9xIZtlplaFTJ+P4iQUJTCIKHXeZkIjZkfzaf06emwAfILMG8xEhn+8zauvDvWtX3wP9 Yxw1erqdfeEP+JrCnYIPnDk1LEWPxwxZz38CcytEPDxBqtJ9NIHUp7Ee9aMnaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MrN0YZQn8zl8lYddQlaNUDOP6tDd+Xi6dWuPmBdLweU=; b=XcOXU1KsTrUMBO7klGvquKQz+rq5fkzc5kaXQxVQAlMDMLqPbQqzl7EIqu3hcYHcHM8e6s a4Pr1AwyZaueg5n38VW6sRwyTWXSdv7G+Z9q0AT2rxR+h8vly9ksXmQmvlCDM9460orf6X WTq6yyhwfnNUqJmZEtWV4y+zCxqfOTYGa8WAgpbscbdJE7kCpCIVAh2mgweRStMnmmm9xh /c+P886xoLGYtR3vMy3OtAUr9fEX+V+i0r6Ae5jIsyxeyZYiuwOU5uSE699+JHt+PjUSm3 Q3MTr6yuWRcWIwKPq69x4/BigEx4KOAwesXugn90riubIuvuRy8nrw7kZts7GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gN60JWzrXH; Fri, 6 Oct 2023 14:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP45j093012; Fri, 6 Oct 2023 14:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP4J3093009; Fri, 6 Oct 2023 14:25:04 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:04 GMT Message-Id: <202310061425.396EP4J3093009@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: b6fbec77eb97 - stable/14 - iwlwifi / rtw88: temporary disconnect from build for updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: b6fbec77eb977538ab4c353789fdb255e01e0a8e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b6fbec77eb977538ab4c353789fdb255e01e0a8e commit b6fbec77eb977538ab4c353789fdb255e01e0a8e Author: Bjoern A. Zeeb AuthorDate: 2023-09-05 17:34:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 iwlwifi / rtw88: temporary disconnect from build for updates Disconnect iwlwifi/rtw88 from the build for a few commits which, due to incompatible LinuxKPI 802.11 changes would break the build for a revision. It will be re-enabled "instantly". Sponsored by: The FreeBSD Foundation (cherry picked from commit 712468443df1130db8f893a5e2ce5c6a8dbf5cde) (cherry picked from commit b75d1ce6c10652fc4bfbf509deeae0e05c3d1356) --- sys/modules/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 4b98c7ed6e0d..66d7c895a460 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -561,12 +561,12 @@ _mlx5ib= mlx5ib ${MACHINE_CPUARCH} == "i386" _ena= ena _gve= gve -_iwlwifi= iwlwifi +#_iwlwifi= iwlwifi .if ${MK_SOURCELESS_UCODE} != "no" _iwlwififw= iwlwififw .endif _ossl= ossl -_rtw88= rtw88 +#_rtw88= rtw88 .if ${MK_SOURCELESS_UCODE} != "no" _rtw88fw= rtw88fw .endif From nobody Fri Oct 6 14:25:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gQ1c6Vz4wgXk; Fri, 6 Oct 2023 14:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gQ0lCFz3Qjl; Fri, 6 Oct 2023 14:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CBHqk4Ygmz+8eWBoDNBxeYttEc1Ifw0eS2+5bQGo5mw=; b=QETzjdJ4UrDGmpAaFuDx0FH5yHKV8OuKhdt2KeZpR82B40APlgsLdMCupPzbg1i2Lwib3C u1l5iKwg5q6Xdxex06YuyCRTgnHf+amYUVuH4y7kgsRREKD4DaCsbIn16CkSkdS71coyWw TrMA3eqj5pObbbnP65D98xrd4JiIDC2CfrfulVxIt1ilkLW25VaOp80LhBmIhFAn4dM4v/ D+C02HQ4TjE5qK5hMAdG884rZeKu4ARLqjNCwumwfe8Zf9ItKhRL5LyKvXkOnP6Tc3XS35 5WYixd3ZqEbPVH4tm3Z1JFzqcNm5eTuP7rrNoRfqgXG8nmQm0Pv0r6Y9oq8uEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602306; a=rsa-sha256; cv=none; b=mDfqox6qLgn6dU7JaE8b2lTJgbFpHiVl27YDSpoOqjHIVbaE02NHgxCfA4lRQeAPsuuOmI JW8ZgnxuzYhgLk8p6NtmNdmOPy+SyYGOSLnFViOMn72RQQEGZ9R/4r/uCBznJkepn4Dg+M I5QTVFbMpFlIYlv2rlq8R4QgPe3emeZ80+l0tIwhzAA9yti36BuubIsnOobKixjd9ZwjSA S06Usiow36BtjL9ec23/IYVCdobyrBh9eaBJRwYeh1yJTsJJBjlkgqw926NYSJpAoTXVR2 kdMQg+Oe2CE+/ykyHDheFHZ8mnffzpL+USzoPnTy8UC9o1xNEnkZXn1P0x9D5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CBHqk4Ygmz+8eWBoDNBxeYttEc1Ifw0eS2+5bQGo5mw=; b=vMAxrn++daYBO/BarpBMcqyrg7WNPFz/+prD4mcmPUMKnAHz5w51vNBkCq4WWbsxlrZHCl hyK5ZLZOF4xJTi35uhHsRYOlQNMWx4R5zyOgwiAF14tICi4WwX7uJWnVE1CmoAvRtO0z0w nmw1u6k20c/88XaOkBZ+YvB/05Y1XE0P8+SxyLWDWlYFnIDaPap0/72gbCuK2jtgdfwOVQ Ye4TJnrt56AM/cqJwzcXh/JDT0NFbotNxFKN1MwiwFxNR2xKSutXL3bWa2IbltnjnuEzmh USq5sh3vSCNSee4qF7jeLcBu5BKloN0UUhxDGy3pm7ON9KfD4phTW7lhMtglow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gP6nfzzrw4; Fri, 6 Oct 2023 14:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP59X093073; Fri, 6 Oct 2023 14:25:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP5rt093070; Fri, 6 Oct 2023 14:25:05 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:05 GMT Message-Id: <202310061425.396EP5rt093070@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: 82782cffead3 - stable/14 - LinuxKPI: 802.11: prepare for iwlwifi driver updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 82782cffead3c757a94a10fe02b202a4dd3b1a04 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=82782cffead3c757a94a10fe02b202a4dd3b1a04 commit 82782cffead3c757a94a10fe02b202a4dd3b1a04 Author: Bjoern A. Zeeb AuthorDate: 2023-09-05 18:02:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 LinuxKPI: 802.11: prepare for iwlwifi driver updates Update ieee80211_request_smps() to the new number of arguments in LinuxKPI (which was already prepared) and update the one call in the older iwlwifi driver version. This will allow iwlwifi as-is now and rtw88 to compile in case someone else wants to work on the latter in parallel to predominant efforts on the former. Unconditionally enable the other changes for newer drivers, as needed by iwlwifi (and others). Sponsored by: The FreeBSD Foundation (cherry picked from commit 815b7436a7c6302365b6514194d27d41cb736227) (cherry picked from commit 3e1f5cc9a81a6065ddc371eea5755b4e207d72f8) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 29 +++-------------------- sys/contrib/dev/iwlwifi/mvm/utils.c | 2 +- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index cacf9d652fd0..20371812198a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -703,12 +703,6 @@ struct ieee80211_sta { struct ieee80211_link_sta deflink; struct ieee80211_link_sta *link[IEEE80211_MLD_MAX_NUM_LINKS]; /* rcu? */ -#ifndef __FOR_LATER_DRV_UPDATE - uint16_t max_rc_amsdu_len; - uint16_t max_amsdu_len; - uint16_t max_tid_amsdu_len[IEEE80211_NUM_TIDS]; -#endif - /* Must stay last. */ uint8_t drv_priv[0] __aligned(CACHE_LINE_SIZE); }; @@ -1421,7 +1415,6 @@ ieee80211_is_back_req(__le16 fc) } static __inline bool -#ifdef __FOR_LATER_DRV_UPDATE ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) { struct ieee80211_mgmt *mgmt; @@ -1429,10 +1422,6 @@ ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) mgmt = (struct ieee80211_mgmt *)skb->data; fc = mgmt->frame_control; -#else -ieee80211_is_bufferable_mmpdu(__le16 fc) -{ -#endif /* 11.2.2 Bufferable MMPDUs, 80211-2020. */ /* XXX we do not care about IBSS yet. */ @@ -2022,10 +2011,7 @@ ieee80211_ie_split(const u8 *ies, size_t ies_len, } static __inline void -ieee80211_request_smps(struct ieee80211_vif *vif, -#ifdef __FOR_LATER_DRV_UPDATE - u_int link_id, -#endif +ieee80211_request_smps(struct ieee80211_vif *vif, u_int link_id, enum ieee80211_smps_mode smps) { static const char *smps_mode_name[] = { @@ -2222,10 +2208,7 @@ ieee80211_tx_dequeue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) static __inline void ieee80211_update_mu_groups(struct ieee80211_vif *vif, -#ifdef __FOR_LATER_DRV_UPDATE - u_int _i, -#endif - uint8_t *ms, uint8_t *up) + u_int _i, uint8_t *ms, uint8_t *up) { TODO(); } @@ -2345,14 +2328,8 @@ ieee80211_proberesp_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static __inline struct sk_buff * ieee80211_nullfunc_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -#ifdef __FOR_LATER_DRV_UPDATE - int linkid, -#endif - bool qos) + int linkid, bool qos) { -#ifndef __FOR_LATER_DRV_UPDATE - int linkid = 0; -#endif /* Only STA needs this. Otherwise return NULL and panic bad drivers. */ if (vif->type != NL80211_IFTYPE_STATION) diff --git a/sys/contrib/dev/iwlwifi/mvm/utils.c b/sys/contrib/dev/iwlwifi/mvm/utils.c index 075ada8ba356..5370cec8140a 100644 --- a/sys/contrib/dev/iwlwifi/mvm/utils.c +++ b/sys/contrib/dev/iwlwifi/mvm/utils.c @@ -307,7 +307,7 @@ void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, smps_mode = IEEE80211_SMPS_DYNAMIC; } - ieee80211_request_smps(vif, smps_mode); + ieee80211_request_smps(vif, 0, smps_mode); } static bool iwl_wait_stats_complete(struct iwl_notif_wait_data *notif_wait, From nobody Fri Oct 6 14:25:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gR4SCTz4wgTH; Fri, 6 Oct 2023 14:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gR1ppJz3Qbx; Fri, 6 Oct 2023 14:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t37mM1hiWaV3umPWzG40WyXsACotvp+l/mPM22AF02E=; b=KG9myCS/NyYhIXbGvxdNTjxAcwMS9paPyNuLhRp3XdHLcSU8Vr//j7joroTm+3jDypr6CQ qdczAaeJdYiZYJxDO8+aTzOzPQzttM8xW2Typ5WX2pVRZKMmif7b30dr8JWmeBqb2cXCg0 nyw4emqYuBJWZynY4THuocmSIWmua4s6/VlQQ00gjHhnwazH8xhTX15mvznlm0fDdGH4NW KIYnGzAlC86C++Oz+7vLtoRj7msRPOHiiuHOnpfwksWEDbTDHIahA7zba2shIE8Fr1bAn/ axTW2Okx7qmOk/UtECZb3c6o+/3jkFiVHkLQmLp8rv3fmg+hA04JlOeHcKp0kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602307; a=rsa-sha256; cv=none; b=qHSfHmnoGs2cjY8pWEDnv+IedGIBHL+xyTFpdbbOBmDNUIl9Fw+g/8ckr1siigOdlgkvVL rujHuXKk09BYZbPY/F96zJp/0pajBt62AOBmSjSAhCnlWSTjm5ILLDnFwgRb2Lhf1rO4qe 4997FdrrHc+se3zNCSpKCS8LO6Lj2h/TNA7zHB+a6H77q4WgZO5k9VhjdVpx9gLsAEIRDX TodJPLkj5AtE2PJurDE7FYFuaC1MtvkM8CcekttkFPbSARGboc69AvpmFFrQf25zmSUAcI XttHU8ucGhg89fs3suDnZ1JevDLy2B8+g3mRfApdH5rJGUlwjy8T3yQv97Rrng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t37mM1hiWaV3umPWzG40WyXsACotvp+l/mPM22AF02E=; b=SDLRNrzkGZtHaPH5MtP/3G3CvLSXVyrT3y9dsAXnmDwcaPolUeuuoWX5vZjTcjZfdxEdJF w5kLEfF8Xr6MqSaQ2x3kaCW41ZxKD6+Kz/FAH/OLNNghzbd/OuIdPfWtCYiOlFVRJS2Jap pvzYe3KKNGzTnyla+/VcmyV4m/D0wxRghBOEIbBTcg2HteftjCUYOYridZS3wVoz6eNDwX uLe9Lzy/nR75BTxszsfSobhI3XefOwHmHeCr0ufAokLe3EAGqhsiGvsOa5V8+6ZKOyMXIX X52NQzLm3o/GxeY6NgE8egTUn/X9TOOPcIxDQMxVGYOKAHwI2yW49l/V9MbSgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gR0wYQzrkD; Fri, 6 Oct 2023 14:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP7Mc093128; Fri, 6 Oct 2023 14:25:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP7Tf093125; Fri, 6 Oct 2023 14:25:07 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:07 GMT Message-Id: <202310061425.396EP7Tf093125@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: be5f1d2e7138 - stable/14 - LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: be5f1d2e7138eb680db400813af54d9f33d9b252 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=be5f1d2e7138eb680db400813af54d9f33d9b252 commit be5f1d2e7138eb680db400813af54d9f33d9b252 Author: Bjoern A. Zeeb AuthorDate: 2023-09-16 13:10:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions In [1] we updated the KPI for various mac80211 ops functions to deal with MLD code. Newer iwlwifi driver and firmware supports these functions so we need to pass non-dummy (0, NULL) arguments to them. Start extending the internel MO functions by these arguments and pass down values from LinuxKPI 802.11 code. It is assumed that further work will be needed to have all the right fields available to at least work in the lgeacy way of a single link. Sponsored by: The FreeBSD Foundation Improves: 549198b1ab95 (update mac80211 KPI) [1] (cherry picked from commit 6854154638a2c04ab59da43aedbe2c0ee8ef71a5) --- sys/compat/linuxkpi/common/src/linux_80211.c | 11 ++++++----- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +++--- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 21 ++++++++++++--------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 978a82ad2ceb..37e1de0b76ad 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -991,7 +991,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } /* Assign vif chanctx. */ if (error == 0) - error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, conf); + error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, + &vif->bss_conf, conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { @@ -1172,7 +1173,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -1447,7 +1448,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -1909,7 +1910,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -2200,7 +2201,7 @@ lkpi_wme_update(struct lkpi_hw *lhw, struct ieee80211vap *vap, bool planned) txqp.cw_max = wmep->wmep_logcwmax; txqp.txop = wmep->wmep_txopLimit; txqp.aifs = wmep->wmep_aifsn; - error = lkpi_80211_mo_conf_tx(hw, vif, ac, &txqp); + error = lkpi_80211_mo_conf_tx(hw, vif, /* link_id */0, ac, &txqp); if (error != 0) ic_printf(ic, "%s: conf_tx ac %u failed %d\n", __func__, ac, error); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 42b4192bac63..22a5f5a6377c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -276,9 +276,9 @@ int lkpi_80211_mo_sta_state(struct ieee80211_hw *, struct ieee80211_vif *, struct lkpi_sta *, enum ieee80211_sta_state); int lkpi_80211_mo_config(struct ieee80211_hw *, uint32_t); int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *, - struct ieee80211_chanctx_conf *); + struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *); void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *, - struct ieee80211_chanctx_conf **); + struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf **); int lkpi_80211_mo_add_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *); void lkpi_80211_mo_change_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *, uint32_t); @@ -287,7 +287,7 @@ void lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *, void lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, uint64_t); int lkpi_80211_mo_conf_tx(struct ieee80211_hw *, struct ieee80211_vif *, - uint16_t, const struct ieee80211_tx_queue_params *); + uint32_t, uint16_t, const struct ieee80211_tx_queue_params *); void lkpi_80211_mo_flush(struct ieee80211_hw *, struct ieee80211_vif *, uint32_t, bool); void lkpi_80211_mo_mgd_prepare_tx(struct ieee80211_hw *, struct ieee80211_vif *, diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index c386c096add7..8444c3b3f245 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -444,7 +444,7 @@ out: int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_chanctx_conf *chanctx_conf) + struct ieee80211_bss_conf *conf, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; int error; @@ -455,8 +455,9 @@ lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif * goto out; } - LKPI_80211_TRACE_MO("hw %p vif %p chanctx_conf %p", hw, vif, chanctx_conf); - error = lhw->ops->assign_vif_chanctx(hw, vif, NULL, chanctx_conf); + LKPI_80211_TRACE_MO("hw %p vif %p bss_conf %p chanctx_conf %p", + hw, vif, conf, chanctx_conf); + error = lhw->ops->assign_vif_chanctx(hw, vif, conf, chanctx_conf); if (error == 0) vif->chanctx_conf = chanctx_conf; @@ -466,7 +467,7 @@ out: void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_chanctx_conf **chanctx_conf) + struct ieee80211_bss_conf *conf, struct ieee80211_chanctx_conf **chanctx_conf) { struct lkpi_hw *lhw; @@ -477,8 +478,9 @@ lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif if (*chanctx_conf == NULL) return; - LKPI_80211_TRACE_MO("hw %p vif %p chanctx_conf %p", hw, vif, *chanctx_conf); - lhw->ops->unassign_vif_chanctx(hw, vif, NULL, *chanctx_conf); + LKPI_80211_TRACE_MO("hw %p vif %p bss_conf %p chanctx_conf %p", + hw, vif, conf, *chanctx_conf); + lhw->ops->unassign_vif_chanctx(hw, vif, conf, *chanctx_conf); *chanctx_conf = NULL; } @@ -548,7 +550,7 @@ lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vi int lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - uint16_t ac, const struct ieee80211_tx_queue_params *txqp) + uint32_t link_id, uint16_t ac, const struct ieee80211_tx_queue_params *txqp) { struct lkpi_hw *lhw; int error; @@ -559,8 +561,9 @@ lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, goto out; } - LKPI_80211_TRACE_MO("hw %p vif %p ac %u txpq %p", hw, vif, ac, txqp); - error = lhw->ops->conf_tx(hw, vif, 0, ac, txqp); + LKPI_80211_TRACE_MO("hw %p vif %p link_id %u ac %u txpq %p", + hw, vif, link_id, ac, txqp); + error = lhw->ops->conf_tx(hw, vif, link_id, ac, txqp); out: return (error); From nobody Fri Oct 6 14:25:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gS3V6Qz4wgXp; Fri, 6 Oct 2023 14:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gS2ssnz3QhW; Fri, 6 Oct 2023 14:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8jvU6Wr6op+uhR2376a/y32WEE5wjtIG0CBm8zwwSA=; b=NefxwSaD9BbqYgjbt9AqMUIl+8WZ5qJMziKmxdENWe3of8H/CUaP+D3hI30dSg/Es+G06H 4wwi9WN40joCoARB0/GFj9j+yGprLuMrkIpz9leyGd+FSw6c2ssqTqjxzUp7AxF6UT+ZS7 mKakMZax7XSaUWk/8gQ/ZHpSLLs/1O9et4otiIBdj3t+78lUtKRuJOknwRXooA7Rks3/cV GKm7OMQYLpmzxOsZhbksnVZRGhWmOvEzAPXaadWRkRSvb0FqDLatd2OIjTuBZr+ChGv6nG Xj4aLAmatgC9nKaP1o+GWFTY6LCfI7n+8h+6hUKgpKvQr97MC6uBvKb4AHmSRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602308; a=rsa-sha256; cv=none; b=T4ulEiZVeLanqq1glQoVYIpH+MYnZzOfoasxPSXH3vHeMmWzE718cNPPTiW/6YIueunb8+ j062Es0YYbhji6GlxRGM290h9ED7LBKBFKgr7IcN/HiglZ04zl/LpkacGdIb49xhmAbT8V hiOE38I4hxYvEzUNJU5OzOTN/b6L4J0SHqXddd9RA8ASs3lID/MKC4fUvIx8CxvMr9i2Uc XdIkykyxp1n9SXbqKiM6ptxevd6q5Z7lwWAYo4BDZFpLU1eFBD5h8Dc8YFk3B5/yWJuPnq zoF2hrWLygkxnSAldHn926C9QRdOfoZfOCAGa22Z8e6Q5XPx5fj+xgygxnLBsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8jvU6Wr6op+uhR2376a/y32WEE5wjtIG0CBm8zwwSA=; b=tew2AXD3yHwbpi1szM0RRlK5fgDMh8M/AlihT0hfDJJtr07s04DmpzeAaEZS05LSJt9F91 DjB9Kx9dbMMUrq9vp4jxcbK5noEophZ22867HYLa48y7xPkH2DQTlGzzj7mUEv6s8pwmJM YHM3Ea7AG+ycPPn/RxBMYw08pBdTpuR2NwSRzX4F40Os6w+dErjNUBr1ULWhhO8RPxjJXR sAYbMMwzPkcSP1O23iH3RpHey8WY2lyB+2VGJYmXenEcy6w+VR2yd5+psnwiAoJKXgo8Yo COFqG2/lwIc7yWARCNyLj7odIvZwjNwvncw/osBfcIlWMmt9it8sudCL5Sn+xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gS1wfJzrNn; Fri, 6 Oct 2023 14:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP8oQ093182; Fri, 6 Oct 2023 14:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP8pf093179; Fri, 6 Oct 2023 14:25:08 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:08 GMT Message-Id: <202310061425.396EP8pf093179@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: ad79da1b1ad3 - stable/14 - LinuxKPI: 802.11: mac80211 ops: distinguish between {bss,link}_info_changed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: ad79da1b1ad323a00329c1c80fe9b90eb1e434b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ad79da1b1ad323a00329c1c80fe9b90eb1e434b2 commit ad79da1b1ad323a00329c1c80fe9b90eb1e434b2 Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 11:58:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 LinuxKPI: 802.11: mac80211 ops: distinguish between {bss,link}_info_changed With MLO and multi-link setups if avail we want to call link_info_changed whereas for legacy drivers we still need to call bss_info_changed. While we currently do not (yet) support multi-link configurations we still need to drive the correct commands to satisfy firmware requirements. Sponsored by: The FreeBSD Foundation (cherry picked from commit 727f88f2617acaff4ada0f3dda6ca23c6679310d) --- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 8444c3b3f245..b3b53d23f62e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -540,14 +540,17 @@ lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vi struct lkpi_hw *lhw; lhw = HW_TO_LHW(hw); - if (lhw->ops->bss_info_changed == NULL) + if (lhw->ops->link_info_changed == NULL && + lhw->ops->bss_info_changed == NULL) return; LKPI_80211_TRACE_MO("hw %p vif %p conf %p changed %#jx", hw, vif, conf, (uintmax_t)changed); - lhw->ops->bss_info_changed(hw, vif, conf, changed); + if (lhw->ops->link_info_changed != NULL) + lhw->ops->link_info_changed(hw, vif, conf, changed); + else + lhw->ops->bss_info_changed(hw, vif, conf, changed); } - int lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, uint32_t link_id, uint16_t ac, const struct ieee80211_tx_queue_params *txqp) From nobody Fri Oct 6 14:25:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gT4J5xz4wgXs; Fri, 6 Oct 2023 14:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gT3hpSz3Qvx; Fri, 6 Oct 2023 14:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vPBj+eo4dRsiDzdiivaXOmjAlIUTO5+C9GiBdLyqmYw=; b=pFXK3rYKq0+sjqJsLRiteNO6hillcKXe1YW99OP8byWHI0fJlFIz7ghdZL30y1ZOlaUoBa x9wO1KYk4l83/4VH6OazlJq28fxwK+blIjZ47gxEnu/80kjo2INlyE1EcFp/0uGzycWeGW 8WKLOI3q+ZZxzm4TTeQWiz3xk1ufDZJcjlSZ0c4ZGw/SgC5FnDAfCsn9TRA+f4FrXDzhu7 /aeH5im3qA5AzaR5W5tZ5YMynggf6HGztVIUA39V0Dced8w/65n6O43q6ruV4cIWJISlJX /peTJ3EHX6cqdR46Sg1Xb7QqFM3c9E+g9HN63WFzzXGGlltnLK1iP0N9IyzPyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602309; a=rsa-sha256; cv=none; b=F69FekPlt0RUyTjCLMw786DPq2IqKHaz11WxHSReGQIkzxrDlrzHcE626B+kiq+UOEO1tt c5gJW6gMbzrDaszLVMYyU/cGqaZHOP/I8ZGIBbHy2W8DdIrnAItKknj30e06RsLq9pKtRi bK51T95wp2KFvm64jLCMhUs+0A0EmatRhK3PNoYGTemi4XPZoJ9LVUEGcHvGXzLF6oBE9D AlChNQgMGgdB4aOr99kVUSNQZaubZERpwvaF2/7AAhSKGF7WlJVi06hYUghY8+c/KsZ32o sJx/RqcmTcPXYRzR3BLuJQ7gnKA3Y1YNCVNdHat2tdEiysn4sb/wD0/VKB0qcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vPBj+eo4dRsiDzdiivaXOmjAlIUTO5+C9GiBdLyqmYw=; b=OVaOgug/KZLoDaxeSaJPO48Zxni+9qUypa/NQHau6C9e6Ec3YSvwl5EmuZ+tq1xlceHyzz ka7zuXAazomPNHL1iRMhH3LMJXxsmToxuZO0018R4Dxdl5dTH/FpPDWcth0CQjMQAD+LUc ZaEhLUtEVZAV+CkyfeozONZQH4SZ92daniCxyA2wca9sCAxgN4+Qdi5Q4khW7Ym5/qAMiW tMs8GcVcbxI2ueR/9ZSdKASsfUoXNlAfZ62TCbtOglhEhmJWlV7/dZIWF01QPgRFulViVE 1nKjAmtDgPLqLjcYCxnOEutwgkXRAE5JgWvGawMD0stCGB8dp0AxLUro159ImQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gT2ldczrw5; Fri, 6 Oct 2023 14:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EP9aU093236; Fri, 6 Oct 2023 14:25:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EP9xP093233; Fri, 6 Oct 2023 14:25:09 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:09 GMT Message-Id: <202310061425.396EP9xP093233@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: 8614ae463a1e - stable/14 - LinuxKPI: 802.11: adjust code to new structure layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 8614ae463a1e913ff97039655a08316556839b4c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8614ae463a1e913ff97039655a08316556839b4c commit 8614ae463a1e913ff97039655a08316556839b4c Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:19:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:39 +0000 LinuxKPI: 802.11: adjust code to new structure layout With past commits new structures were added. Now switch over some bss_conf fields into vif->cfg where they got moved to and remove the old fields. This allows drivers to find the expected values in the now expected places and work better. Sponsored by: The FreeBSD Foundation (cherry picked from commit 616e13301bcf274b007f84ef99ea857a55bef46d) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 9 ++--- sys/compat/linuxkpi/common/src/linux_80211.c | 44 +++++++++++------------ 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 20371812198a..7e6fb1bce16e 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -280,19 +280,13 @@ struct ieee80211_bss_conf { bool eht_su_beamformer; bool eht_mu_beamformer; - size_t ssid_len; - uint8_t ssid[IEEE80211_NWID_LEN]; - uint16_t aid; uint16_t ht_operation_mode; int arp_addr_cnt; uint16_t eht_puncturing; uint8_t dtim_period; uint8_t sync_dtim_count; - bool assoc; - bool idle; bool qos; - bool ps; bool twt_broadcast; bool use_cts_prot; bool use_short_preamble; @@ -991,6 +985,8 @@ struct ieee80211_ops { void (*config_iface_filter)(struct ieee80211_hw *, struct ieee80211_vif *, unsigned int, unsigned int); void (*bss_info_changed)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, u64); + void (*link_info_changed)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, u64); + int (*set_rts_threshold)(struct ieee80211_hw *, u32); void (*event_callback)(struct ieee80211_hw *, struct ieee80211_vif *, const struct ieee80211_event *); int (*get_survey)(struct ieee80211_hw *, int, struct survey_info *); @@ -1038,7 +1034,6 @@ struct ieee80211_ops { int (*set_hw_timestamp)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_set_hw_timestamp *); - void (*link_info_changed)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, u64); void (*vif_cfg_changed)(struct ieee80211_hw *, struct ieee80211_vif *, u64); int (*change_vif_links)(struct ieee80211_hw *, struct ieee80211_vif *, u16, u16, struct ieee80211_bss_conf *[IEEE80211_MLD_MAX_NUM_LINKS]); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 37e1de0b76ad..ac43b1248536 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -744,7 +744,7 @@ lkpi_update_dtim_tsf(struct ieee80211_vif *vif, struct ieee80211_node *ni, "dtim_period %u sync_dtim_count %u sync_tsf %ju " "sync_device_ts %u bss_changed %#08x\n", __func__, __LINE__, _f, _l, - vif->bss_conf.assoc, vif->bss_conf.aid, + vif->cfg.assoc, vif->cfg.aid, vif->bss_conf.beacon_int, vif->bss_conf.dtim_period, vif->bss_conf.sync_dtim_count, (uintmax_t)vif->bss_conf.sync_tsf, @@ -775,7 +775,7 @@ lkpi_update_dtim_tsf(struct ieee80211_vif *vif, struct ieee80211_node *ni, "dtim_period %u sync_dtim_count %u sync_tsf %ju " "sync_device_ts %u bss_changed %#08x\n", __func__, __LINE__, _f, _l, - vif->bss_conf.assoc, vif->bss_conf.aid, + vif->cfg.assoc, vif->cfg.aid, vif->bss_conf.beacon_int, vif->bss_conf.dtim_period, vif->bss_conf.sync_dtim_count, (uintmax_t)vif->bss_conf.sync_tsf, @@ -846,7 +846,7 @@ lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { sta->aid = 0; - if (vif->bss_conf.assoc) { + if (vif->cfg.assoc) { struct ieee80211_hw *hw; enum ieee80211_bss_changed changed; @@ -854,8 +854,8 @@ lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, lkpi_update_mcast_filter(lhw->ic, true); changed = 0; - vif->bss_conf.assoc = false; - vif->bss_conf.aid = 0; + vif->cfg.assoc = false; + vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; /* * This will remove the sta from firmware for iwlwifi. @@ -1009,12 +1009,12 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int bss_changed |= BSS_CHANGED_BSSID; vif->bss_conf.txpower = ni->ni_txpower; bss_changed |= BSS_CHANGED_TXPOWER; - vif->bss_conf.idle = false; + vif->cfg.idle = false; bss_changed |= BSS_CHANGED_IDLE; /* Should almost assert it is this. */ - vif->bss_conf.assoc = false; - vif->bss_conf.aid = 0; + vif->cfg.assoc = false; + vif->cfg.aid = 0; bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__); @@ -1433,8 +1433,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; - vif->bss_conf.ssid_len = 0; - memset(vif->bss_conf.ssid, '\0', sizeof(vif->bss_conf.ssid)); + vif->cfg.ssid_len = 0; + memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); @@ -1549,14 +1549,14 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int #ifdef LKPI_80211_WME bss_changed |= lkpi_wme_update(lhw, vap, true); #endif - if (!vif->bss_conf.assoc || vif->bss_conf.aid != IEEE80211_NODE_AID(ni)) { - vif->bss_conf.assoc = true; - vif->bss_conf.aid = IEEE80211_NODE_AID(ni); + if (!vif->cfg.assoc || vif->cfg.aid != IEEE80211_NODE_AID(ni)) { + vif->cfg.assoc = true; + vif->cfg.aid = IEEE80211_NODE_AID(ni); bss_changed |= BSS_CHANGED_ASSOC; } /* We set SSID but this is not BSSID! */ - vif->bss_conf.ssid_len = ni->ni_esslen; - memcpy(vif->bss_conf.ssid, ni->ni_essid, ni->ni_esslen); + vif->cfg.ssid_len = ni->ni_esslen; + memcpy(vif->cfg.ssid, ni->ni_essid, ni->ni_esslen); if ((vap->iv_flags & IEEE80211_F_SHPREAMBLE) != vif->bss_conf.use_short_preamble) { vif->bss_conf.use_short_preamble ^= 1; @@ -1895,8 +1895,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; - vif->bss_conf.ssid_len = 0; - memset(vif->bss_conf.ssid, '\0', sizeof(vif->bss_conf.ssid)); + vif->cfg.ssid_len = 0; + memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); @@ -2276,16 +2276,16 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], #if 1 vif->chanctx_conf = NULL; vif->bss_conf.vif = vif; - vif->bss_conf.idle = true; - vif->bss_conf.ps = false; vif->bss_conf.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */ vif->bss_conf.use_short_slot = false; /* vap->iv_flags IEEE80211_F_SHSLOT */ vif->bss_conf.qos = false; vif->bss_conf.use_cts_prot = false; /* vap->iv_protmode */ vif->bss_conf.ht_operation_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONE; - vif->bss_conf.assoc = false; - vif->bss_conf.aid = 0; + vif->cfg.aid = 0; + vif->cfg.assoc = false; + vif->cfg.idle = true; + vif->cfg.ps = false; /* * We need to initialize it to something as the bss_info_changed call * will try to copy from it in iwlwifi and NULL is a panic. @@ -4712,7 +4712,7 @@ linuxkpi_ieee80211_pspoll_get(struct ieee80211_hw *hw, psp = skb_put_zero(skb, sizeof(*psp)); psp->i_fc[0] = IEEE80211_FC0_VERSION_0; psp->i_fc[0] |= IEEE80211_FC0_SUBTYPE_PS_POLL | IEEE80211_FC0_TYPE_CTL; - v = htole16(vif->bss_conf.aid | 1<<15 | 1<<16); + v = htole16(vif->cfg.aid | 1<<15 | 1<<16); memcpy(&psp->i_aid, &v, sizeof(v)); IEEE80211_ADDR_COPY(psp->i_bssid, vap->iv_bss->ni_macaddr); IEEE80211_ADDR_COPY(psp->i_ta, vif->addr); From nobody Fri Oct 6 14:25:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gV5XYnz4wgkM; Fri, 6 Oct 2023 14:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gV4srWz3R6l; Fri, 6 Oct 2023 14:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJWoYEfDLO+JH2Z13vnqZI3dJhyqKkXTlrL2LEEDMKs=; b=TS4skLsGfuAkY+/KnIDGUlMqnF5PVtw/WPhCII9xEt1tvvYHhP4/5N1LUvmS2Hq3REv4fW uZZb5539yCxbeMEcDOJKH/a4oKoY+xYh/nOjhGHwNPC9cIg1cUfNEYY3EfF6VGprY6mJOa iqi98hoqOmCp/UiUysZlQEtH2o6IYqGCMh7tfNy7k+I2/1h+4pkE3RXZVEpolDEKZ34xIe vX3LUFpVcyOS+/dUT1+mmB56NXr9DshOKbDFcpOfWaA+bLDTlpnmy0/ZkX5qxo9v6le/bs DjSO2qqGs1ZbkBCz4GsunAXZUidFKAYxN+G4Wdz5tc8zWqeA1GDc8x+duW5vhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602310; a=rsa-sha256; cv=none; b=VjBXjkS670oXJNnMnPCOOIqI3J1ZlKUsaTmGqyON9pTLgn6At1mRJPCSFGyGFknkKQGSF8 wKNSvNpPuuSoYi0GeRt356/seVgR68x5relYzKL1Re0hENoXk14R4FJ7cWKCCZsCj7UBQh yAb+JsG4QoR/EZw6SCmj6rva4quxjSdRLcPtcPI+fUhBBsyQXYAfCBpNMr2U4ESQOuV1wM 5O8hIl4tE1SQh5v99k8W5IYYnXfmguIKUnxNiFflG8veAxI61cX8BzCSRDDjQzHGxpLbTZ lwq9vx3KMBnuU29BCztqAIEUxnSkKyk+5P/qXHxIUu+Ruk6oyN07iOsXggUZdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJWoYEfDLO+JH2Z13vnqZI3dJhyqKkXTlrL2LEEDMKs=; b=w/EjOceNpM/kcwZ3uEZDUj+aizCVR5ZmJpJY06AXi6pARNT3Dtc4fcPtSyC/oJWZ4gfknm XVxfgIX+81/irwtZFuH2ZuBkArB0GJJCgmC2/tl0Gau20ykBQ+Ywu21dkIp3cT0YS42jgH WOXXg/kraOgKjl863BYutSECH2PexwNv/Tan35Zyku7APOwLSwW3Mzbc5RN5jHdIrenVpC ti8/xWNp7GDGNX/dsT9lyz4WdTLbReUlg44HZULhmVs44my0SKyEGf47W3hPRabluYwDBZ 2gQdK0DjGM2jRSLUzmKGQ0WdFOA2Z+jX+OqJB3AstlFRusJNtz5kddVM7Ai3cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gV3ysVzrkF; Fri, 6 Oct 2023 14:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPAEO093290; Fri, 6 Oct 2023 14:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPAFg093287; Fri, 6 Oct 2023 14:25:10 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:10 GMT Message-Id: <202310061425.396EPAFg093287@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: 753730087671 - stable/14 - LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 753730087671551425554a28d64c898997f9bbdd Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=753730087671551425554a28d64c898997f9bbdd commit 753730087671551425554a28d64c898997f9bbdd Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:25:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start() Driven by net80211 we may call mac80211 ops stop() and start() mostly when toggling a first VAP. While this is FreeBSD behaviour the firmware based LinuxKPI drivers seem to possibly clear state in the case of stop() triggering further errors down the line. We call mo_start() when starting the VAP and mo_stop() when destroying it now only. In the future (e.g., in multi-VAP setups) we may need to re-address some of this so keep the code under #ifdef. Sponsored by: The FreeBSD Foundation (cherry picked from commit 8d58a0578635dc7dd1025ab08b0479f2b383e1a4) --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ac43b1248536..04ee75eb2c68 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2468,24 +2468,32 @@ static void lkpi_ic_parent(struct ieee80211com *ic) { struct lkpi_hw *lhw; +#ifdef HW_START_STOP struct ieee80211_hw *hw; int error; +#endif bool start_all; IMPROVE(); lhw = ic->ic_softc; +#ifdef HW_START_STOP hw = LHW_TO_HW(lhw); +#endif start_all = false; /* IEEE80211_UNLOCK(ic); */ LKPI_80211_LHW_LOCK(lhw); if (ic->ic_nrunning > 0) { +#ifdef HW_START_STOP error = lkpi_80211_mo_start(hw); if (error == 0) +#endif start_all = true; } else { +#ifdef HW_START_STOP lkpi_80211_mo_stop(hw); +#endif } LKPI_80211_LHW_UNLOCK(lhw); /* IEEE80211_LOCK(ic); */ From nobody Fri Oct 6 14:25:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gX0ZZRz4wgkP; Fri, 6 Oct 2023 14:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gW5fzKz3R59; Fri, 6 Oct 2023 14:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GGoBhBfzcqCeu+IcK/3M5yZ4sWREeTwFcsqodL6Ux4=; b=QNU0ODyEIMpUJiBwoDvSQ8EIHAjoNiEg+3K+qiNyGEY5QTG93BW1VHjPjfBsqayHhttr6w uqpn8eP9G1EtsKpcbY43h+ZT+OBPpxkItHkKQan+Xanc5O9GCV+vJbQZGcvAnIUl7cPIAd FvXwmclV1haT+Okx8ljmg65egjC8yd64Goo6xi70vAd46TIqwgVKePIGAV2gDyFRvLmVP6 13Jo5gOGc6yhyKP+iv2nYnXY0IFpF9ckQxYmMVTkdqQmqoaKkKMnn7Nnt2HSCqtADX5QrT KnWiXnNsJ3zEsALHmbLJoA/vuiNUaKs/2uQ0pd4h+ke9nFwlYZY8nMmT/EgaBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602311; a=rsa-sha256; cv=none; b=j1BjdSqKJbzWZV19FDYTvEpDDwmd6n5vo3TEYaj3NvI9td2yHrjTjKa2jQ7nEmNnPQmEF0 c8pXNaP+h10uPLEqwxGUatkH5CysBQgRtSl2RM6Gl9sTNMm+W9QHHQpNtET2GAeSrFhjP7 zy0jsIFAVkYQ2H2xfI4Au0tzjYdRjy2rSiun6rIRteEn7UeVaLVhlk5ys5HAGo2iJssXO9 BMeFrcM/R+5rqljmkEOMrH2GMqSj0Pwrd24LBL4klZCb7kOfL4lNUPQwYrIuO/wdqBkaDt cHryyNbQMXdTkbN20SI7nVm9h9mfIZj2n88IfmcjZyJGrr3Sl4Bfgn4QqlV8Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GGoBhBfzcqCeu+IcK/3M5yZ4sWREeTwFcsqodL6Ux4=; b=qndGNay7+LVeHVqPWVDTvPmgK45eQ/xaluyt7BAB2JZEwIAJlJSGvGItiPvtvdstpGbNp/ sOImQr+pf18pCW+FxmouLBkJQBR1hUfqVg+Jy0rhwqrovlohHn56y6Bd+L+XdOl6UK+ob1 XKlky689epj5R/dOI9ySON8W8FRkBOduYzGWymeX12UNAlj+8oE3TABr37K1zrwqUWXnmv lOCSGxs5QlPgsVkKK9WxUKKPPKUCPl2oOHZb9vZS9yUS49BGh4VmM27jLvkKrjlMCR7qUZ +MUEhAKvQ6W29d3lcDoEbLc+SG/FA1SabuDbR7z9dClULoBznke6ozA0bjC12g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gW4dClzrtW; Fri, 6 Oct 2023 14:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPBH1093344; Fri, 6 Oct 2023 14:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPB5p093341; Fri, 6 Oct 2023 14:25:11 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:11 GMT Message-Id: <202310061425.396EPB5p093341@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: 68e1e25baf2e - stable/14 - LinuxKPI: 802.11: inialize tx queue params List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 68e1e25baf2e5576011ed532d5a30e70997d488c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=68e1e25baf2e5576011ed532d5a30e70997d488c commit 68e1e25baf2e5576011ed532d5a30e70997d488c Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:36:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: inialize tx queue params When adding a VAP (vif) initialize its tx queue parameters calling mo_conf_tx(). I could not spot net80211 providing some of the values needed before having a node so currrently we use hard-coded values with a comment with a reference on how to properly calculate the values in the future (e.g., in case of 11b or other cases). Sponsored by: The FreeBSD Foundation (cherry picked from commit a6042e17c8999c4965bd4d762c4564b322f1ae7b) --- sys/compat/linuxkpi/common/src/linux_80211.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 04ee75eb2c68..1e7ae261779c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2245,9 +2245,11 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], struct lkpi_vif *lvif; struct ieee80211vap *vap; struct ieee80211_vif *vif; + struct ieee80211_tx_queue_params txqp; enum ieee80211_bss_changed changed; size_t len; int error, i; + uint16_t ac; if (!TAILQ_EMPTY(&ic->ic_vaps)) /* 1 so far. Add once this works. */ return (NULL); @@ -2346,7 +2348,24 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], changed = 0; lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, changed); - /* conf_tx setup; default WME? */ + /* Configure tx queues (conf_tx), default WME & send BSS_CHANGED_QOS. */ + IMPROVE("Hardcoded values; to fix see 802.11-2016, 9.4.2.29 EDCA Parameter Set element"); + LKPI_80211_LHW_LOCK(lhw); + for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { + + bzero(&txqp, sizeof(txqp)); + txqp.cw_min = 15; + txqp.cw_max = 1023; + txqp.txop = 0; + txqp.aifs = 2; + error = lkpi_80211_mo_conf_tx(hw, vif, /* link_id */0, ac, &txqp); + if (error != 0) + ic_printf(ic, "%s: conf_tx ac %u failed %d\n", + __func__, ac, error); + } + LKPI_80211_LHW_UNLOCK(lhw); + changed = BSS_CHANGED_QOS; + lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, changed); /* Force MC init. */ lkpi_update_mcast_filter(ic, true); From nobody Fri Oct 6 14:25:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gY2m4Sz4wgbX; Fri, 6 Oct 2023 14:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gX6MSwz3R5L; Fri, 6 Oct 2023 14:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x09Sg9dKobnqmC77H4RU4TQw5f657jdgy8kin2YjG24=; b=R5LOazrZB0VwEj264KEIzL6ule/mxrinTAUUHc5v+D2sl0t4IrfIbSXopeagnqKyWA8Yxv iWA1x2ZFk1011nmDTPjvkO0Gy5jpLy66Eb+vzV/1pCLQGwyrm9SUFCPofzbgur4s8yR7j0 3460w1a3Ns1LibeyYYjY2ArDq9LxyjBVrgkb93XgnDAuArMV8t4U55suG99LQ0K3xnuQ6M bWiOeb63HYfl22veIGMqHiXRtVddHYOovqVm/9qn4gdoE3H9l6bvKPtdGQnnsH8Q2yxzst CoLGMhQbVLvAVIN8FJw2BorXHnZ34eNF8GP8EqStaOOPgsa03AzMwhvRxLmUuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602312; a=rsa-sha256; cv=none; b=DVvDuhAOQxXOIsls4TMUagEM2Y1wi/l/6azyzmR8VRC3v0A+54P5uowCzD/60qr2tGEG/D bOKVuP7m0edXALs8ZDjGoZi3nzH+Gv7nZ1aTKcLjeNK9x/A7GKfEo9NaMeXJQ0qth/o2AF v33O6u1n0Td9OyajgIRPcdhUoTWinGf5bJ8TFowTmv7bJumuXGGKL1A4CHscbezpX8aVaa srI2aTV5VErd0qb5u1y1faoKE67zZFYB6hHLhl2SPk5TXJNkLsW7Ogky72bwu47qGh/MVc Lh4Qfb8HOWCsM6ShrJE9r174BhB3PkFBNBHEZ5QTQFbvxm+/wwALtfs7McY9yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x09Sg9dKobnqmC77H4RU4TQw5f657jdgy8kin2YjG24=; b=fUARtzsA72yqLIbTpwUu8q9+Nz/VhY9pq1HpXnGJ753hc3A79DurZ0dbGyIlhlvmu0HOsc UwQFMBIbIQNCxosp263o+drAQCkMg8Xeft0M5FmbwP6I8+BlmAncNRqcUBAX7Gslat8wQ4 Q0O5lypY/yeMWOPK4ZARuFaIeT+W/Uhk91tq32HhdkTdVSBqgx7i36dluifnKfQ0s4AEy9 mi2cAZIAilqOPOJWqSyBVxKK1USv6yS0HxHRE4G+hw6Dcl8VOuGUlQ1N7Pe065hdFJsEIy ngPC0cFElYZUZgxLuXo0rKc1tTmk07WKUZFhvX2bQvAFKdt7UntkeozLPOvWNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gX5TgDzr9S; Fri, 6 Oct 2023 14:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPCwx093404; Fri, 6 Oct 2023 14:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPCu6093401; Fri, 6 Oct 2023 14:25:12 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:12 GMT Message-Id: <202310061425.396EPCu6093401@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: c18ead9cb26d - stable/14 - LinuxKPI: 802.11: setup a default link[0] and adjust related needs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: c18ead9cb26d4199dbea8cc032420ae2164928ad Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c18ead9cb26d4199dbea8cc032420ae2164928ad commit c18ead9cb26d4199dbea8cc032420ae2164928ad Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:49:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: setup a default link[0] and adjust related needs Setup more link_conf/deflink fields for vif/sta as are needed to allow us to work with the KPI bits in a non-MLO configuration. In lkpi_sta_scan_to_auth() set the bss_conf values before calling into the driver for chanctx setup/updates as certain values (e.g., beacon_int) need to be set before; we still call the MO function for the updates after to keep the expected workflow. Deal with the (to be dealt with otherwise later) net80211 ni swaps and update the addresses on the deflink as well as otherwise firmware will hit asserts or things will not work (e.g. indicating the peer is us). Sponsored by: The FreeBSD Foundation (cherry picked from commit 6ffb7bd469b26f2ff6cc62cedca6ffe884076196) --- sys/compat/linuxkpi/common/src/linux_80211.c | 63 ++++++++++++++++++---------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1e7ae261779c..1fee5f6809fd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -107,9 +107,6 @@ SYSCTL_INT(_compat_linuxkpi_80211, OID_AUTO, debug, CTLFLAG_RWTUN, #define PREP_TX_INFO_DURATION 0 /* Let the driver do its thing. */ #endif -/* c.f. ieee80211_ioctl.c */ -static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; - /* This is DSAP | SSAP | CTRL | ProtoID/OrgCode{3}. */ const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; @@ -270,9 +267,17 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], sta->deflink.supp_rates[band] |= BIT(i); } } + sta->deflink.smps_mode = IEEE80211_SMPS_OFF; IMPROVE("ht, vht, he, ... bandwidth, smps_mode, .."); /* bandwidth = IEEE80211_STA_RX_... */ + /* Link configuration. */ + IEEE80211_ADDR_COPY(sta->deflink.addr, sta->addr); + sta->link[0] = &sta->deflink; + for (i = 1; i < nitems(sta->link); i++) { + IMPROVE("more links; only link[0] = deflink currently."); + } + /* Deferred TX path. */ mtx_init(&lsta->txq_mtx, "lsta_txq", NULL, MTX_DEF); TASK_INIT(&lsta->txq_task, 0, lkpi_80211_txq_task, lsta); @@ -970,6 +975,23 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT only"); + /* Set bss info (bss_info_changed). */ + bss_changed = 0; + vif->bss_conf.bssid = ni->ni_bssid; + bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.txpower = ni->ni_txpower; + bss_changed |= BSS_CHANGED_TXPOWER; + vif->cfg.idle = false; + bss_changed |= BSS_CHANGED_IDLE; + + /* vif->bss_conf.basic_rates ? Where exactly? */ + + /* Should almost assert it is this. */ + vif->cfg.assoc = false; + vif->cfg.aid = 0; + + bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__); + error = 0; if (vif->chanctx_conf != NULL) { changed = IEEE80211_CHANCTX_CHANGE_MIN_WIDTH; @@ -989,6 +1011,9 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } else { goto out; } + + vif->bss_conf.chanctx_conf = conf; + /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, @@ -1003,21 +1028,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IMPROVE("update radiotap chan fields too"); - /* Set bss info (bss_info_changed). */ - bss_changed = 0; - vif->bss_conf.bssid = ni->ni_bssid; - bss_changed |= BSS_CHANGED_BSSID; - vif->bss_conf.txpower = ni->ni_txpower; - bss_changed |= BSS_CHANGED_TXPOWER; - vif->cfg.idle = false; - bss_changed |= BSS_CHANGED_IDLE; - - /* Should almost assert it is this. */ - vif->cfg.assoc = false; - vif->cfg.aid = 0; - - bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__); - /* RATES */ IMPROVE("bss info: not all needs to come now and rates are missing"); lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); @@ -2132,12 +2142,14 @@ lkpi_iv_update_bss(struct ieee80211vap *vap, struct ieee80211_node *ni) lsta->ni = ni; sta = LSTA_TO_STA(lsta); IEEE80211_ADDR_COPY(sta->addr, lsta->ni->ni_macaddr); + IEEE80211_ADDR_COPY(sta->deflink.addr, sta->addr); } lsta = obss->ni_drv_data; if (lsta != NULL) { lsta->ni = obss; sta = LSTA_TO_STA(lsta); IEEE80211_ADDR_COPY(sta->addr, lsta->ni->ni_macaddr); + IEEE80211_ADDR_COPY(sta->deflink.addr, sta->addr); } out: @@ -2278,6 +2290,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], #if 1 vif->chanctx_conf = NULL; 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); + 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 */ vif->bss_conf.use_short_slot = false; /* vap->iv_flags IEEE80211_F_SHSLOT */ @@ -2288,15 +2303,13 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->cfg.assoc = false; vif->cfg.idle = true; vif->cfg.ps = false; + IMPROVE("Check other fields and then figure out whats is left elsewhere of them"); /* * We need to initialize it to something as the bss_info_changed call * will try to copy from it in iwlwifi and NULL is a panic. * We will set the proper one in scan_to_auth() before being assoc. - * NB: the logic there with using an array as bssid_override and checking - * for non-NULL later is flawed but in their workflow does not seem to - * matter. */ - vif->bss_conf.bssid = zerobssid; + vif->bss_conf.bssid = ieee80211broadcastaddr; #endif #if 0 vif->bss_conf.dtim_period = 0; /* IEEE80211_DTIM_DEFAULT ; must stay 0. */ @@ -2307,6 +2320,12 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->bss_conf.beacon_int = 16; #endif + /* Link Config */ + vif->link_conf[0] = &vif->bss_conf; + for (i = 0; i < nitems(vif->link_conf); i++) { + IMPROVE("more than 1 link one day"); + } + /* Setup queue defaults; driver may override in (*add_interface). */ for (i = 0; i < IEEE80211_NUM_ACS; i++) { if (ieee80211_hw_check(hw, QUEUE_CONTROL)) From nobody Fri Oct 6 14:25:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gZ3yhtz4wgmf; Fri, 6 Oct 2023 14:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gZ08lsz3R0k; Fri, 6 Oct 2023 14:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQcfG+BFaSiNUNmuACcbsZMmCOMmnuQvSdT738nLQgs=; b=eLkdvV1Ka+9LdZN2/KAHvH+BHYuOCHWq1+snlqPGnBWumX9WpIjqv7OskBNwo9r3Xp7jz2 eg3a3NvFkP3a/RJeVCCd9b76WmdUTcL3PhjEcKsDAfDXZMxyGgrPM5sllDO1tIvJsf9Fen yUbTsT32Q213LW1Qqs1gAYGd7oHUv3UmGx/SZc+9NKGnU8L/ZisnHnf7pHmjbssE6UlFle sgHtJNDZfZfDvcKcthNRwP7fbwm0K3GUhuKrCZ9XLXanYvSKKFPS9EB6MtHaRSVjHpYsug PDx/yhWOml5SaadlI4YQ/w+LCXpHUdrPgvaTVauLiwy9UsrOW9t5GksGSnjhtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602314; a=rsa-sha256; cv=none; b=NGedsffTfeH1H3DsSeCLYobqK58XKKXDT44wzf3E9R7j0sKCcbrdtdG2fKcJfffe9BDMMD xSBAcQ1K/LT8+kwYSSNgfb+wkCdzVm42bKSsaBYbgbNQNUOvPd6E7wXTf5vMJP0k7uJNbz sqz2fngM/2xeDuY5xELLqMWq8Yxt9aVCFD1kE+qGZWzhXJfiFF7IR8jks4asEFlpPHsBy5 cUYE8vB7gcY2ISCOWc5AlO0jGzAIkSPFlI35wWDncAuF4EdIRU0Td4qAqQErlLReuIxTHs 2Q7Ag8FmOhLNDW3ZkJkiwhwvdAPfZF3Zb1RNYb1ZoRbycFBDgdvdeRYYCtx2pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TQcfG+BFaSiNUNmuACcbsZMmCOMmnuQvSdT738nLQgs=; b=wLlP6ycJt30LrTLMhCe4sTQ2QAHDsFPJeQfT7OdBj9RYcCORWg7qZzp7i5AAtMiyw/STYq rPO+hKMR7mD8WLBIGuxdlLuGdD7Te4q/+EsZPx2v9j4H/MiNhAarW/8A8rWmL25tXzBc8h rYSH7T5AULaIswZWnX6uZ6p2sMVlqj0+++XVMN2cBCbYLTq+yRIBBCkf5bOXKzGhFhOK/Q 9IFZ4TASymco2OGkzUrYz97K/3VwD8RomoZnTGXKLIKOQC6b0adT6o7uKLMC/9tFw2+QF7 KT4u/IwYcdAKsNt3DvDSm93AYIhBimy9ZgNnR/iiHHxPWiNmC6EQfI1Ouk/Jgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gY6NCbzrXJ; Fri, 6 Oct 2023 14:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPDo0093459; Fri, 6 Oct 2023 14:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPDoG093456; Fri, 6 Oct 2023 14:25:13 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:13 GMT Message-Id: <202310061425.396EPDoG093456@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: b6628a233e8e - stable/14 - LinuxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: b6628a233e8e6407a504172a562ba14a66c7e7da Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b6628a233e8e6407a504172a562ba14a66c7e7da commit b6628a233e8e6407a504172a562ba14a66c7e7da Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 16:57:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to keep local state as well. In first instance that is added_to_drv only. For now we stay single-chanctx only but this paves the path to make it a list. Use the new information to implement ieee80211_iter_chan_contexts_atomic(). Sponsored by: The FreeBSD Foundation (cherry picked from commit c5e257985085bd987b1dddffd0455c2230df2d1d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 46 +++++++++++++++++++--- sys/compat/linuxkpi/common/src/linux_80211.h | 9 +++++ .../linuxkpi/common/src/linux_80211_macops.c | 8 ++++ 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1fee5f6809fd..d2f67230a812 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -922,6 +922,7 @@ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct linuxkpi_ieee80211_channel *chan; + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -953,11 +954,13 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ - conf = malloc(sizeof(*conf) + hw->chanctx_data_size, + lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); + conf = &lchanctx->conf; } conf->rx_chains_dynamic = 1; @@ -1022,7 +1025,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = 0; if (error != 0) { lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); goto out; } } @@ -1179,6 +1183,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1188,7 +1193,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } out: @@ -1454,6 +1460,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1463,7 +1470,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -1916,6 +1924,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1925,7 +1934,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -3968,8 +3978,32 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, void *), void *arg) { + struct lkpi_hw *lhw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_chanctx *lchanctx; - UNIMPLEMENTED; + KASSERT(hw != NULL && iterfunc != NULL, + ("%s: hw %p iterfunc %p arg %p\n", __func__, hw, iterfunc, arg)); + + lhw = HW_TO_LHW(hw); + + IMPROVE("lchanctx should be its own list somewhere"); + + LKPI_80211_LHW_LVIF_LOCK(lhw); + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + + vif = LVIF_TO_VIF(lvif); + if (vif->chanctx_conf == NULL) + continue; + + lchanctx = CHANCTX_CONF_TO_LCHANCTX(vif->chanctx_conf); + if (!lchanctx->added_to_drv) + continue; + + iterfunc(hw, &lchanctx->conf, arg); + } + LKPI_80211_LHW_LVIF_UNLOCK(lhw); } void diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 22a5f5a6377c..93c1e2873206 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -210,6 +210,15 @@ struct lkpi_hw { /* name it mac80211_sc? */ #define LHW_TO_HW(_lhw) (&(_lhw)->hw) #define HW_TO_LHW(_hw) container_of(_hw, struct lkpi_hw, hw) +struct lkpi_chanctx { + bool added_to_drv; /* Managed by MO */ + struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); +}; +#define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ + (&(_lchanctx)->conf) +#define CHANCTX_CONF_TO_LCHANCTX(_conf) \ + container_of(_conf, struct lkpi_chanctx, conf) + struct lkpi_wiphy { const struct cfg80211_ops *ops; diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index b3b53d23f62e..8f75b1bdf8b1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -490,6 +490,7 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; int error; lhw = HW_TO_LHW(hw); @@ -500,6 +501,10 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); error = lhw->ops->add_chanctx(hw, chanctx_conf); + if (error == 0) { + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = true; + } out: return (error); @@ -524,6 +529,7 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; lhw = HW_TO_LHW(hw); if (lhw->ops->remove_chanctx == NULL) @@ -531,6 +537,8 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); lhw->ops->remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = false; } void From nobody Fri Oct 6 14:25:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gb3yRVz4wgWH; Fri, 6 Oct 2023 14:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gb1D72z3R10; Fri, 6 Oct 2023 14:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvCHp0SFl5eCXdwdbZtQJJqvrg2lEbneH4EkX3jGB28=; b=j59w7T/+H+e7It3QZrDLaNx+eupvxIqtrS6MLVPgAJAV3pqfofNSPSZf7Zkenv5FmzQFBC spDj9oqPLxHoK3OB/x+q2qtdIoGEk9n+8beFazGXNgIqs2LryibhAM0w6dsHIZXNx+WZCm WFL045LQXHhc8MDSLopFw9pehlsdecYEAA2xUoReWxy1cGu5+EFCAGW008tXi5jVCACGIk A6Z+Tz4GHT6KriL1UMNDP6OK/bggDZWfMvm19dsKKY1HCzOr9IhrEW9JYY4ej2buZhy83C w6edcEmdNybjjslLVBBefcVPbqSB1BSdm7CHuDBwbn8sEW2UPOMD3J9yLiWaxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602315; a=rsa-sha256; cv=none; b=EAV4rqdBhdS8Vr3xpYaDOfMnk9fkUJ340JiPzbDeQ79VWv0Zmi7w1JErtgA82QWpj/9roP 60c7iklGbipqRxzTbohV3PStfLUkfPst2fGqoONuey3tZjy17ZuseKfSoPIrF3EKdLxk12 qXGo7xF4UnaAP4hmqn9SzvkKrfVw3W+nkYo8Bv8Ycylw75xzFOq60gl9DNt+yaJLMsCC1D eOIBVawIbEXIcDa3VTYX8pIH+puDthBqkXABSaa76pW8Q7+X6QDEsqrtxgyBu9aH8D4dzj +Tvcmr9v2ZdqTdeuxY7ntORL6c2nStxlyr/nD55UdqCT6T3UuuaPOZOsZafnxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xvCHp0SFl5eCXdwdbZtQJJqvrg2lEbneH4EkX3jGB28=; b=Z9e1SZQbfg/seW7FPQaHv4zJnDm0PNbO8aoq7+tY+Ef4vl+e3MVkQLP1W3ve+iN2gcN2Ad jM/URBn1MSS7sCKLBQ5n7G6beYh0OaQ+g5kq2Hdc+nSlj1imr6PVPowmK2e2glZInXpqGW 85WJu7/0U2vvcWQ06Zw/Z0j4LwXNH4TDLEm39I/4nTX4qabybDxeD/BLCNg4N6+0n7qmZD T1JLIvwr9vOWoIlFFZRt9VoFlojpbGCzJqO8GhnwqWfCeWVuCKuAdP3T1A1EmCyHIDPGqh u5HBp2SX1dmmsKryaXFvsWUO+hkSGAnHx3thpSrkWsvq/rLfQthTbVYA4Tr34Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gb0LHbzrXK; Fri, 6 Oct 2023 14:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPE00093507; Fri, 6 Oct 2023 14:25:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPE7D093504; Fri, 6 Oct 2023 14:25:14 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:14 GMT Message-Id: <202310061425.396EPE7D093504@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: 4e26de26431b - stable/14 - LinuxKPI: 802.11: fix problem removing sta List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 4e26de26431be8b830ef9d2d2397490b68437ddd Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4e26de26431be8b830ef9d2d2397490b68437ddd commit 4e26de26431be8b830ef9d2d2397490b68437ddd Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 07:59:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: fix problem removing sta Move the call to lkpi_disassoc() before the state change to IEEE80211_STA_NOTEXIST which will remove the sta (from firmware). Based on a comment it seems that originally we had to do it the other way round. iwlwifi(4) has a check and will silently not remove the sta from the firmware when vif->cfg.assoc is still set (see iwl_mvm_sta_del()). This leads to the LinuxKPI 802.11 code thinking the sta is gone as downward state changes by the mac80211 op (*sta_state)() may not fail. Once we try to assoc with a newly added station later, iwlwifi firmware will run into an assert having two ap_sta set on the same vif. We can observe that problem in iwlwifi(4) having __le32 sta_id = 1 instead of sta_id = 0 in iwl_mvm_sta_cfg_cmd{} on the HCMD. This should fix one of the most seen problems with iwlwifi(4), e.g., when running service netif restart wlan0 or service wpa_supplicant restart wlan0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 16e688b2a403a3dbc05de3b9f8a3132838613790) --- sys/compat/linuxkpi/common/src/linux_80211.c | 37 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d2f67230a812..9f5f5bef7f27 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1426,6 +1426,15 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1435,15 +1444,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* We need to do this now, can only do after sta is IEEE80211_STA_NOTEXIST. */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; @@ -1887,6 +1889,13 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * One would expect this to happen when going off AUTHORIZED. + * See comment there; removes the sta from fw. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1896,18 +1905,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; From nobody Fri Oct 6 14:25:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gc4pVGz4wgmk; Fri, 6 Oct 2023 14:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gc2b5Zz3R64; Fri, 6 Oct 2023 14:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FUjqq2MSeSnj3nFjD0Eia0Evkxc2PWJH+xeHB01TSeQ=; b=Q10hoZwHcBGnnv8EYV1BiylJOL7LDcvGUNNZcvMlItlBAeaqof25kuYJ8G9Fwq03tKJAtt JgWKD9oFGDlgpB7L4N1xMH3hc/1NEBBj9zckzW5WcrwDi0M45lFJB08UjE3O7xAmeZjKmX R6GJDT2PcF/519duo1Ef+2JaWDkBXAFrspVoS9AxnJq73bxxL4NooEhy/iYSqdV8c61j2h 8vd4/P5ADnq+oxydKAykM4iWoyzFb2AOYeuNM/rKVG7MNueF9U3hanENrNF7TV0vWYFRSd 2XnsuH59FDx6l9c0nUTsoR2Dxjcg5rIvQF9XBG2lN4Xy4Y6MR43sqc02bONqGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602316; a=rsa-sha256; cv=none; b=I7n826b+dZIsPbYL57X4oOPKN5rCdHixPReBxh5DkcXAYMmKGIPWB/1HlpV8zxj/g7YjAz 5SjhDe9YUJsTZ2zn0TmVxlOQyoNOrfbDZkFARD+TEStotTqJOCqGPTnaYB3NLGpHOsoDBN 8GWlETxXp7WyQKfRZN1lucDNS4ztgtaOMpjW7+C85lTfOjG0MJWnFBpLDQFIj2SdqsIXzc T/7xBFV3Sh314n3DyT6C/TglTmdQCibW5MeOecWEGl3zBH0N0uM4jBP6kZ86nBb7x69l+y TYKC7LV4xC4vzV2wl7d02iSXPOxTyPNxYyY911fjfWm/V/rJw2L82KQ+tJK3dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FUjqq2MSeSnj3nFjD0Eia0Evkxc2PWJH+xeHB01TSeQ=; b=v+njGHbURStTHD+lU2odlvsaHD8mUbZ5MgUXIYitSY4Y0bL6BWnDwGZeCi9p1x08f+xfev bgqQoU5p9ygdrrvTdpeM76GF+eSNYmS7rvXAn8KWSAoKU8XRpRVw43ePmxaB12hVYOcM21 53ORk+mbcPPAAf7/6QCahBuLyoBJ/KyYGcdf46gE6NxzWKkiu0IcOJlgfzBgDjYExZ38Zc djAfSd81qn1MiF1W/wS3K+91UDi+7VONtk1W7TjiRqqFPFP38h5DxSdihQyhNDbtjKKXZ5 zEVf9534HzfmWsFljLAg7V1dZhPNd3GaCWDehBc10SZdwKuQ/iibLaHvejSPeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gc1hQmzr9T; Fri, 6 Oct 2023 14:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPGLs093560; Fri, 6 Oct 2023 14:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPG8L093557; Fri, 6 Oct 2023 14:25:16 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:16 GMT Message-Id: <202310061425.396EPG8L093557@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: 5b9404565fef - stable/14 - LinuxKPI: 802.11: hide txq debugging behind checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 5b9404565fef6cf4f01210343c8074b9407cb268 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5b9404565fef6cf4f01210343c8074b9407cb268 commit 5b9404565fef6cf4f01210343c8074b9407cb268 Author: Bjoern A. Zeeb AuthorDate: 2023-10-04 20:30:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: hide txq debugging behind checks Two txq debug messages were left unconditionally. Hide them behind ifdef/if() condition checks for selective debugging only. Sponsored by: The FreeBSD Foundation (cherry picked from commit 0d2cb6a6ecde3b271ede59d77801cb43a8804688) --- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9f5f5bef7f27..4a296e2f0fad 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4911,15 +4911,18 @@ linuxkpi_ieee80211_stop_queue(struct ieee80211_hw *hw, int qnum) for (ac = 0; ac < ac_count; ac++) { IMPROVE_TXQ("LOCKING"); if (qnum == vif->hw_queue[ac]) { +#ifdef LINUXKPI_DEBUG_80211 /* * For now log this to better understand * how this is supposed to work. */ - if (lvif->hw_queue_stopped[ac]) + if (lvif->hw_queue_stopped[ac] && + (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) != 0) ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " "lvif %p vif %p ac %d qnum %d already " "stopped\n", __func__, __LINE__, lhw, hw, lvif, vif, ac, qnum); +#endif lvif->hw_queue_stopped[ac] = true; } } @@ -4966,15 +4969,18 @@ lkpi_ieee80211_wake_queues(struct ieee80211_hw *hw, int hwq) /* XXX-BZ what about software scan? */ +#ifdef LINUXKPI_DEBUG_80211 /* * For now log this to better understand * how this is supposed to work. */ - if (!lvif->hw_queue_stopped[ac]) + if (!lvif->hw_queue_stopped[ac] && + (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) != 0) ic_printf(lhw->ic, "%s:%d: lhw %p hw %p " "lvif %p vif %p ac %d hw_q not stopped\n", __func__, __LINE__, lhw, hw, lvif, vif, ac); +#endif lvif->hw_queue_stopped[ac] = false; LKPI_80211_LVIF_LOCK(lvif); From nobody Fri Oct 6 14:25:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gf0vDDz4wgkV; Fri, 6 Oct 2023 14:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gd6Rdpz3RDC; Fri, 6 Oct 2023 14:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FO7hc++UY3WPJUyS9iq+f1C9VNaExI0Xlukx07uqp0g=; b=lpaMpMoMFcfExr3bdSF3d+DM84izXzzaDgf8tkOJ7QGH/XAk34W6KBHQ4KCCekNj63c86L auMIZaX2k+ldt95QAST8qg9t3yLX2GEDEQf362Yrlhrrk8geR3YraFlAtIzYgCyruN+lnb vJ0wM5G1mCg/w25uuw6NP0of9mAP/Y6vzsdibkGQ2JMvgQRRJtaq8dG9Cv4ljsgAt90/eO 6O74hbrmP2d5yJRAdr/LKIuBnmi/+v91anmBg3Dsnra5jAGh7jx2MKVFLLp10s/IukCYFO 1O5pvutqtA0TUdAhPdkMzUpBlnqziMja8U0UfA6opwxbO79RIczqIYRLC/cVcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602317; a=rsa-sha256; cv=none; b=k8Gq0RGPFLYSGwU0ys5trxCtpSFSH1iTcCKM2/txIY0L+6govMX7kCaNp5UYOVnQW7jz1Y MO5D+g6b6ZG1Ma5LCW3od7X0MHmlUABVDf4SAZhZjz2dL0dbkmd0sFf75tYZc16Y5DiED7 2fiExGN+IExeldasbi4I4d/Ek5LWXPIg2jKdgGmNgNAzGABo0aghg6JTZ5TXgcG6qcX8Ob laYdQ+BIqgUU6lILYJSo4Cr62tCjBf9Ui65xinb+nh7i4RmU5uYI0TVgNLhgDl+hysvYZh MCQyrbAt9EAQkfsokKXJLKN/fZeZnhsDlC6ZOZFXoFe5Ed97KV1x+wd4cqdlqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FO7hc++UY3WPJUyS9iq+f1C9VNaExI0Xlukx07uqp0g=; b=pshfhNQYx7MZXEMy+JJ2gJS4fGrREWOpPDODFu1jw19964coU21brrU/khWp62rvbV9jV3 Xid9ClXMGpHNmIoezbwsZQMUxsPuvU8QhtYYde5nUDeW/DGlI5jSv1QsfTG1vSrLo8ruDL bFK/G3z+cTHg0m6BNUJ0LEFaQb3MtdLAoJOayR/20Q1cqiJ4V+odX2fMeZrbzWmDSLagX0 qnm3whK7ua1wzJxXntkvuIAWaRuuykEWgxGyyzNtTQInvSWdM1Nr3jFvAXVAwwmLw8TH+e BpicBI8XCyEilcFsvGimARuR6Gx3/jR+rBZETdO6kaGHMNxcw61Df4xnFMHXtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gd5VB0zrtX; Fri, 6 Oct 2023 14:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPHO6093613; Fri, 6 Oct 2023 14:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPHIV093609; Fri, 6 Oct 2023 14:25:17 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:17 GMT Message-Id: <202310061425.396EPHIV093609@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: 12d5f2e7196f - stable/14 - iwlwifi: update driver from upstream List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 12d5f2e7196fc4a68833c154c74de814f770d468 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=12d5f2e7196fc4a68833c154c74de814f770d468 commit 12d5f2e7196fc4a68833c154c74de814f770d468 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:56:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:40 +0000 iwlwifi: update driver from upstream This is a combined versions of updates of the iwlwifi driver based on wireless-testing (wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1). (wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5). (wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3). Sponsored by: The FreeBSD Foundation (cherry picked from commit 9af1bba44e1ce9b0296ae56760b564d67ab7a1cf) --- sys/contrib/dev/iwlwifi/cfg/22000.c | 617 +----- sys/contrib/dev/iwlwifi/cfg/7000.c | 22 +- sys/contrib/dev/iwlwifi/cfg/8000.c | 10 +- sys/contrib/dev/iwlwifi/cfg/9000.c | 10 +- sys/contrib/dev/iwlwifi/cfg/ax210.c | 301 +++ sys/contrib/dev/iwlwifi/cfg/bz.c | 183 ++ sys/contrib/dev/iwlwifi/cfg/sc.c | 166 ++ sys/contrib/dev/iwlwifi/fw/acpi.c | 172 +- sys/contrib/dev/iwlwifi/fw/acpi.h | 41 +- sys/contrib/dev/iwlwifi/fw/api/binding.h | 14 +- sys/contrib/dev/iwlwifi/fw/api/commands.h | 47 +- sys/contrib/dev/iwlwifi/fw/api/config.h | 15 +- sys/contrib/dev/iwlwifi/fw/api/context.h | 13 +- sys/contrib/dev/iwlwifi/fw/api/d3.h | 98 +- sys/contrib/dev/iwlwifi/fw/api/datapath.h | 287 ++- sys/contrib/dev/iwlwifi/fw/api/dbg-tlv.h | 4 +- sys/contrib/dev/iwlwifi/fw/api/debug.h | 100 +- sys/contrib/dev/iwlwifi/fw/api/filter.h | 2 +- sys/contrib/dev/iwlwifi/fw/api/location.h | 16 +- sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h | 465 ++++- sys/contrib/dev/iwlwifi/fw/api/mac.h | 30 +- sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h | 46 +- sys/contrib/dev/iwlwifi/fw/api/offload.h | 20 +- sys/contrib/dev/iwlwifi/fw/api/phy-ctxt.h | 39 +- sys/contrib/dev/iwlwifi/fw/api/phy.h | 10 +- sys/contrib/dev/iwlwifi/fw/api/power.h | 2 +- sys/contrib/dev/iwlwifi/fw/api/rs.h | 39 +- sys/contrib/dev/iwlwifi/fw/api/rx.h | 215 ++- sys/contrib/dev/iwlwifi/fw/api/scan.h | 66 +- sys/contrib/dev/iwlwifi/fw/api/sta.h | 2 +- sys/contrib/dev/iwlwifi/fw/api/tdls.h | 2 +- sys/contrib/dev/iwlwifi/fw/api/time-event.h | 7 +- sys/contrib/dev/iwlwifi/fw/api/tx.h | 23 +- sys/contrib/dev/iwlwifi/fw/dbg.c | 129 +- sys/contrib/dev/iwlwifi/fw/dbg.h | 18 +- sys/contrib/dev/iwlwifi/fw/debugfs.c | 39 +- sys/contrib/dev/iwlwifi/fw/dump.c | 87 +- sys/contrib/dev/iwlwifi/fw/error-dump.h | 19 +- sys/contrib/dev/iwlwifi/fw/file.h | 23 +- sys/contrib/dev/iwlwifi/fw/img.h | 5 +- sys/contrib/dev/iwlwifi/fw/pnvm.c | 233 ++- sys/contrib/dev/iwlwifi/fw/pnvm.h | 27 +- sys/contrib/dev/iwlwifi/fw/rs.c | 6 +- sys/contrib/dev/iwlwifi/fw/runtime.h | 11 +- sys/contrib/dev/iwlwifi/fw/uefi.c | 331 ++-- sys/contrib/dev/iwlwifi/fw/uefi.h | 58 +- sys/contrib/dev/iwlwifi/iwl-config.h | 55 +- sys/contrib/dev/iwlwifi/iwl-context-info-gen3.h | 53 +- sys/contrib/dev/iwlwifi/iwl-context-info.h | 5 +- sys/contrib/dev/iwlwifi/iwl-csr.h | 5 + sys/contrib/dev/iwlwifi/iwl-dbg-tlv.c | 99 +- sys/contrib/dev/iwlwifi/iwl-debug.c | 3 +- sys/contrib/dev/iwlwifi/iwl-drv.c | 105 +- sys/contrib/dev/iwlwifi/iwl-drv.h | 6 +- sys/contrib/dev/iwlwifi/iwl-eeprom-parse.h | 8 +- sys/contrib/dev/iwlwifi/iwl-fh.h | 4 +- sys/contrib/dev/iwlwifi/iwl-io.c | 4 +- sys/contrib/dev/iwlwifi/iwl-modparams.h | 1 + sys/contrib/dev/iwlwifi/iwl-nvm-parse.c | 393 +++- sys/contrib/dev/iwlwifi/iwl-nvm-parse.h | 4 +- sys/contrib/dev/iwlwifi/iwl-prph.h | 20 +- sys/contrib/dev/iwlwifi/iwl-trans.c | 6 +- sys/contrib/dev/iwlwifi/iwl-trans.h | 138 +- sys/contrib/dev/iwlwifi/mei/iwl-mei.h | 23 +- sys/contrib/dev/iwlwifi/mvm/binding.c | 23 +- sys/contrib/dev/iwlwifi/mvm/coex.c | 112 +- sys/contrib/dev/iwlwifi/mvm/constants.h | 6 +- sys/contrib/dev/iwlwifi/mvm/d3.c | 1148 ++++++++---- sys/contrib/dev/iwlwifi/mvm/debugfs-vif.c | 31 +- sys/contrib/dev/iwlwifi/mvm/debugfs.c | 468 ++++- sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c | 98 +- sys/contrib/dev/iwlwifi/mvm/ftm-responder.c | 44 +- sys/contrib/dev/iwlwifi/mvm/fw.c | 383 ++-- sys/contrib/dev/iwlwifi/mvm/link.c | 285 +++ sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c | 686 ++++--- sys/contrib/dev/iwlwifi/mvm/mac80211.c | 2288 +++++++++++++++-------- sys/contrib/dev/iwlwifi/mvm/mld-key.c | 376 ++++ sys/contrib/dev/iwlwifi/mvm/mld-mac.c | 321 ++++ sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c | 1215 ++++++++++++ sys/contrib/dev/iwlwifi/mvm/mld-sta.c | 1181 ++++++++++++ sys/contrib/dev/iwlwifi/mvm/mvm.h | 669 ++++++- sys/contrib/dev/iwlwifi/mvm/nvm.c | 73 +- sys/contrib/dev/iwlwifi/mvm/offloading.c | 10 +- sys/contrib/dev/iwlwifi/mvm/ops.c | 131 +- sys/contrib/dev/iwlwifi/mvm/phy-ctxt.c | 73 +- sys/contrib/dev/iwlwifi/mvm/power.c | 104 +- sys/contrib/dev/iwlwifi/mvm/ptp.c | 326 ++++ sys/contrib/dev/iwlwifi/mvm/quota.c | 15 +- sys/contrib/dev/iwlwifi/mvm/rfi.c | 16 +- sys/contrib/dev/iwlwifi/mvm/rs-fw.c | 366 +++- sys/contrib/dev/iwlwifi/mvm/rs.c | 6 +- sys/contrib/dev/iwlwifi/mvm/rs.h | 14 +- sys/contrib/dev/iwlwifi/mvm/rx.c | 94 +- sys/contrib/dev/iwlwifi/mvm/rxmq.c | 1204 ++++++++---- sys/contrib/dev/iwlwifi/mvm/scan.c | 313 +++- sys/contrib/dev/iwlwifi/mvm/sf.c | 66 +- sys/contrib/dev/iwlwifi/mvm/sta.c | 844 +++++---- sys/contrib/dev/iwlwifi/mvm/sta.h | 154 +- sys/contrib/dev/iwlwifi/mvm/tdls.c | 12 +- sys/contrib/dev/iwlwifi/mvm/time-event.c | 33 +- sys/contrib/dev/iwlwifi/mvm/time-sync.c | 173 ++ sys/contrib/dev/iwlwifi/mvm/time-sync.h | 30 + sys/contrib/dev/iwlwifi/mvm/tt.c | 79 +- sys/contrib/dev/iwlwifi/mvm/tx.c | 342 ++-- sys/contrib/dev/iwlwifi/mvm/utils.c | 115 +- sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c | 278 ++- sys/contrib/dev/iwlwifi/pcie/ctxt-info.c | 8 +- sys/contrib/dev/iwlwifi/pcie/drv.c | 711 +++---- sys/contrib/dev/iwlwifi/pcie/internal.h | 13 +- sys/contrib/dev/iwlwifi/pcie/rx.c | 52 +- sys/contrib/dev/iwlwifi/pcie/trans-gen2.c | 89 +- sys/contrib/dev/iwlwifi/pcie/trans.c | 225 ++- sys/contrib/dev/iwlwifi/pcie/tx.c | 7 +- sys/contrib/dev/iwlwifi/queue/tx.c | 32 +- sys/contrib/dev/iwlwifi/queue/tx.h | 8 +- sys/modules/iwlwifi/Makefile | 4 + 116 files changed, 15387 insertions(+), 4969 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/cfg/22000.c b/sys/contrib/dev/iwlwifi/cfg/22000.c index 192ecc480f90..d594694206b3 100644 --- a/sys/contrib/dev/iwlwifi/cfg/22000.c +++ b/sys/contrib/dev/iwlwifi/cfg/22000.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* * Copyright (C) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation */ #include #include @@ -10,10 +10,10 @@ #include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_22000_UCODE_API_MAX 73 +#define IWL_22000_UCODE_API_MAX 77 /* Lowest firmware API version supported */ -#define IWL_22000_UCODE_API_MIN 39 +#define IWL_22000_UCODE_API_MIN 50 /* NVM versions */ #define IWL_22000_NVM_VERSION 0x0a1d @@ -26,111 +26,26 @@ #define IWL_22000_SMEM_OFFSET 0x400000 #define IWL_22000_SMEM_LEN 0xD0000 -#define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" -#define IWL_QNJ_B_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-" -#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-" -#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-" -#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-" -#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-" -#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-" -#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-" -#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-" -#define IWL_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0-" -#define IWL_SO_A_HR_B_FW_PRE "iwlwifi-so-a0-hr-b0-" -#define IWL_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-" -#define IWL_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-" -#define IWL_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-" -#define IWL_SO_A_MR_A_FW_PRE "iwlwifi-so-a0-mr-a0-" -#define IWL_SNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-" -#define IWL_SNJ_A_GF_A_FW_PRE "iwlwifi-SoSnj-a0-gf-a0-" -#define IWL_SNJ_A_HR_B_FW_PRE "iwlwifi-SoSnj-a0-hr-b0-" -#define IWL_SNJ_A_JF_B_FW_PRE "iwlwifi-SoSnj-a0-jf-b0-" -#define IWL_MA_A_HR_B_FW_PRE "iwlwifi-ma-a0-hr-b0-" -#define IWL_MA_A_GF_A_FW_PRE "iwlwifi-ma-a0-gf-a0-" -#define IWL_MA_A_GF4_A_FW_PRE "iwlwifi-ma-a0-gf4-a0-" -#define IWL_MA_A_MR_A_FW_PRE "iwlwifi-ma-a0-mr-a0-" -#define IWL_MA_A_FM_A_FW_PRE "iwlwifi-ma-a0-fm-a0-" -#define IWL_SNJ_A_MR_A_FW_PRE "iwlwifi-SoSnj-a0-mr-a0-" -#define IWL_BZ_A_HR_B_FW_PRE "iwlwifi-bz-a0-hr-b0-" -#define IWL_BZ_A_GF_A_FW_PRE "iwlwifi-bz-a0-gf-a0-" -#define IWL_BZ_A_GF4_A_FW_PRE "iwlwifi-bz-a0-gf4-a0-" -#define IWL_BZ_A_MR_A_FW_PRE "iwlwifi-bz-a0-mr-a0-" -#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-" -#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm-a0-" -#define IWL_BZ_Z_GF_A_FW_PRE "iwlwifi-bz-z0-gf-a0-" -#define IWL_BNJ_A_FM_A_FW_PRE "iwlwifi-BzBnj-a0-fm-a0-" -#define IWL_BNJ_A_FM4_A_FW_PRE "iwlwifi-BzBnj-a0-fm4-a0-" -#define IWL_BNJ_A_GF_A_FW_PRE "iwlwifi-BzBnj-a0-gf-a0-" -#define IWL_BNJ_A_GF4_A_FW_PRE "iwlwifi-BzBnj-a0-gf4-a0-" -#define IWL_BNJ_A_HR_B_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-" - +#define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0" +#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0" +#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0" +#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0" +#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0" +#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0" +#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0" #define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \ - IWL_QU_B_HR_B_FW_PRE __stringify(api) ".ucode" -#define IWL_QNJ_B_HR_B_MODULE_FIRMWARE(api) \ - IWL_QNJ_B_HR_B_FW_PRE __stringify(api) ".ucode" + IWL_QU_B_HR_B_FW_PRE "-" __stringify(api) ".ucode" #define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \ - IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode" + IWL_QUZ_A_HR_B_FW_PRE "-" __stringify(api) ".ucode" #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \ - IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode" + IWL_QUZ_A_JF_B_FW_PRE "-" __stringify(api) ".ucode" #define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \ - IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode" + IWL_QU_C_HR_B_FW_PRE "-" __stringify(api) ".ucode" #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \ - IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode" -#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \ - IWL_QNJ_B_JF_B_FW_PRE __stringify(api) ".ucode" + IWL_QU_B_JF_B_FW_PRE "-" __stringify(api) ".ucode" #define IWL_CC_A_MODULE_FIRMWARE(api) \ - IWL_CC_A_FW_PRE __stringify(api) ".ucode" -#define IWL_SO_A_JF_B_MODULE_FIRMWARE(api) \ - IWL_SO_A_JF_B_FW_PRE __stringify(api) ".ucode" -#define IWL_SO_A_HR_B_MODULE_FIRMWARE(api) \ - IWL_SO_A_HR_B_FW_PRE __stringify(api) ".ucode" -#define IWL_SO_A_GF_A_MODULE_FIRMWARE(api) \ - IWL_SO_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_TY_A_GF_A_MODULE_FIRMWARE(api) \ - IWL_TY_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(api) \ - IWL_SNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode" -#define IWL_SNJ_A_GF_A_MODULE_FIRMWARE(api) \ - IWL_SNJ_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_SNJ_A_HR_B_MODULE_FIRMWARE(api) \ - IWL_SNJ_A_HR_B_FW_PRE __stringify(api) ".ucode" -#define IWL_SNJ_A_JF_B_MODULE_FIRMWARE(api) \ - IWL_SNJ_A_JF_B_FW_PRE __stringify(api) ".ucode" -#define IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(api) \ - IWL_MA_A_HR_B_FW_PRE __stringify(api) ".ucode" -#define IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(api) \ - IWL_MA_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(api) \ - IWL_MA_A_GF4_A_FW_PRE __stringify(api) ".ucode" -#define IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(api) \ - IWL_MA_A_MR_A_FW_PRE __stringify(api) ".ucode" -#define IWL_MA_A_FM_A_FW_MODULE_FIRMWARE(api) \ - IWL_MA_A_FM_A_FW_PRE __stringify(api) ".ucode" -#define IWL_SNJ_A_MR_A_MODULE_FIRMWARE(api) \ - IWL_SNJ_A_MR_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BZ_A_HR_B_MODULE_FIRMWARE(api) \ - IWL_BZ_A_HR_B_FW_PRE __stringify(api) ".ucode" -#define IWL_BZ_A_GF_A_MODULE_FIRMWARE(api) \ - IWL_BZ_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BZ_A_GF4_A_MODULE_FIRMWARE(api) \ - IWL_BZ_A_GF4_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BZ_A_MR_A_MODULE_FIRMWARE(api) \ - IWL_BZ_A_MR_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BZ_A_FM_A_MODULE_FIRMWARE(api) \ - IWL_BZ_A_FM_A_FW_PRE __stringify(api) ".ucode" -#define IWL_GL_A_FM_A_MODULE_FIRMWARE(api) \ - IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BNJ_A_FM_A_MODULE_FIRMWARE(api) \ - IWL_BNJ_A_FM_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(api) \ - IWL_BNJ_A_FM4_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BNJ_A_GF_A_MODULE_FIRMWARE(api) \ - IWL_BNJ_A_GF_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(api) \ - IWL_BNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode" -#define IWL_BNJ_A_HR_B_MODULE_FIRMWARE(api) \ - IWL_BNJ_A_HR_B_FW_PRE __stringify(api) ".ucode" + IWL_CC_A_FW_PRE "-" __stringify(api) ".ucode" static const struct iwl_base_params iwl_22000_base_params = { .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, @@ -144,19 +59,7 @@ static const struct iwl_base_params iwl_22000_base_params = { .pcie_l1_allowed = true, }; -static const struct iwl_base_params iwl_ax210_base_params = { - .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, - .num_of_queues = 512, - .max_tfd_queue_size = 65536, - .shadow_ram_support = true, - .led_compensation = 57, - .wd_timeout = IWL_LONG_WD_TIMEOUT, - .max_event_log_size = 512, - .shadow_reg_enable = true, - .pcie_l1_allowed = true, -}; - -static const struct iwl_ht_params iwl_22000_ht_params = { +const struct iwl_ht_params iwl_22000_ht_params = { .stbc = true, .ldpc = true, .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) | @@ -164,7 +67,6 @@ static const struct iwl_ht_params iwl_22000_ht_params = { }; #define IWL_DEVICE_22000_COMMON \ - .ucode_api_max = IWL_22000_UCODE_API_MAX, \ .ucode_api_min = IWL_22000_UCODE_API_MIN, \ .led_mode = IWL_LED_RF_STATE, \ .nvm_hw_section_num = 10, \ @@ -182,7 +84,6 @@ static const struct iwl_ht_params iwl_22000_ht_params = { .mac_addr_from_csr = 0x380, \ .ht_params = &iwl_22000_ht_params, \ .nvm_ver = IWL_22000_NVM_VERSION, \ - .trans.use_tfh = true, \ .trans.rf_id = true, \ .trans.gen2 = true, \ .nvm_type = IWL_NVM_EXT, \ @@ -203,6 +104,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = { #define IWL_DEVICE_22500 \ IWL_DEVICE_22000_COMMON, \ + .ucode_api_max = IWL_22000_UCODE_API_MAX, \ .trans.device_family = IWL_DEVICE_FAMILY_22000, \ .trans.base_params = &iwl_22000_base_params, \ .gp2_reg_addr = 0xa02c68, \ @@ -217,108 +119,8 @@ static const struct iwl_ht_params iwl_22000_ht_params = { }, \ } -#define IWL_DEVICE_AX210 \ - IWL_DEVICE_22000_COMMON, \ - .trans.umac_prph_offset = 0x300000, \ - .trans.device_family = IWL_DEVICE_FAMILY_AX210, \ - .trans.base_params = &iwl_ax210_base_params, \ - .min_txq_size = 128, \ - .gp2_reg_addr = 0xd02c68, \ - .min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_HE, \ - .mon_dram_regs = { \ - .write_ptr = { \ - .addr = DBGC_CUR_DBGBUF_STATUS, \ - .mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \ - }, \ - .cycle_cnt = { \ - .addr = DBGC_DBGBUF_WRAP_AROUND, \ - .mask = 0xffffffff, \ - }, \ - .cur_frag = { \ - .addr = DBGC_CUR_DBGBUF_STATUS, \ - .mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \ - }, \ - } - -#define IWL_DEVICE_BZ_COMMON \ - .ucode_api_max = IWL_22000_UCODE_API_MAX, \ - .ucode_api_min = IWL_22000_UCODE_API_MIN, \ - .led_mode = IWL_LED_RF_STATE, \ - .nvm_hw_section_num = 10, \ - .non_shared_ant = ANT_B, \ - .dccm_offset = IWL_22000_DCCM_OFFSET, \ - .dccm_len = IWL_22000_DCCM_LEN, \ - .dccm2_offset = IWL_22000_DCCM2_OFFSET, \ - .dccm2_len = IWL_22000_DCCM2_LEN, \ - .smem_offset = IWL_22000_SMEM_OFFSET, \ - .smem_len = IWL_22000_SMEM_LEN, \ - .features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM, \ - .apmg_not_supported = true, \ - .trans.mq_rx_supported = true, \ - .vht_mu_mimo_supported = true, \ - .mac_addr_from_csr = 0x30, \ - .ht_params = &iwl_22000_ht_params, \ - .nvm_ver = IWL_22000_NVM_VERSION, \ - .trans.use_tfh = true, \ - .trans.rf_id = true, \ - .trans.gen2 = true, \ - .nvm_type = IWL_NVM_EXT, \ - .dbgc_supported = true, \ - .min_umac_error_event_table = 0x400000, \ - .d3_debug_data_base_addr = 0x401000, \ - .d3_debug_data_length = 60 * 1024, \ - .mon_smem_regs = { \ - .write_ptr = { \ - .addr = LDBG_M2S_BUF_WPTR, \ - .mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \ - }, \ - .cycle_cnt = { \ - .addr = LDBG_M2S_BUF_WRAP_CNT, \ - .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \ - }, \ - } - -#define IWL_DEVICE_BZ \ - IWL_DEVICE_BZ_COMMON, \ - .trans.umac_prph_offset = 0x300000, \ - .trans.device_family = IWL_DEVICE_FAMILY_BZ, \ - .trans.base_params = &iwl_ax210_base_params, \ - .min_txq_size = 128, \ - .gp2_reg_addr = 0xd02c68, \ - .min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \ - .mon_dram_regs = { \ - .write_ptr = { \ - .addr = DBGC_CUR_DBGBUF_STATUS, \ - .mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \ - }, \ - .cycle_cnt = { \ - .addr = DBGC_DBGBUF_WRAP_AROUND, \ - .mask = 0xffffffff, \ - }, \ - .cur_frag = { \ - .addr = DBGC_CUR_DBGBUF_STATUS, \ - .mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \ - }, \ - }, \ - .mon_dbgi_regs = { \ - .write_ptr = { \ - .addr = DBGI_SRAM_FIFO_POINTERS, \ - .mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \ - }, \ - } - -const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = { - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .device_family = IWL_DEVICE_FAMILY_22000, - .base_params = &iwl_22000_base_params, -}; - const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { .mq_rx_supported = true, - .use_tfh = true, .rf_id = true, .gen2 = true, .device_family = IWL_DEVICE_FAMILY_22000, @@ -330,7 +132,6 @@ const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = { .mq_rx_supported = true, - .use_tfh = true, .rf_id = true, .gen2 = true, .device_family = IWL_DEVICE_FAMILY_22000, @@ -342,7 +143,6 @@ const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = { const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { .mq_rx_supported = true, - .use_tfh = true, .rf_id = true, .gen2 = true, .device_family = IWL_DEVICE_FAMILY_22000, @@ -353,59 +153,6 @@ const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, }; -const struct iwl_cfg_trans_params iwl_snj_trans_cfg = { - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .device_family = IWL_DEVICE_FAMILY_AX210, - .base_params = &iwl_ax210_base_params, - .umac_prph_offset = 0x300000, -}; - -const struct iwl_cfg_trans_params iwl_so_trans_cfg = { - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .device_family = IWL_DEVICE_FAMILY_AX210, - .base_params = &iwl_ax210_base_params, - .umac_prph_offset = 0x300000, - .integrated = true, - /* TODO: the following values need to be checked */ - .xtal_latency = 500, - .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US, -}; - -const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = { - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .device_family = IWL_DEVICE_FAMILY_AX210, - .base_params = &iwl_ax210_base_params, - .umac_prph_offset = 0x300000, - .integrated = true, - .low_latency_xtal = true, - .xtal_latency = 12000, - .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, -}; - -const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = { - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .device_family = IWL_DEVICE_FAMILY_AX210, - .base_params = &iwl_ax210_base_params, - .umac_prph_offset = 0x300000, - .integrated = true, - .low_latency_xtal = true, - .xtal_latency = 12000, - .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, - .imr_enabled = true, -}; - /* * If the device doesn't support HE, no need to have that many buffers. * 22000 devices can split multiple frames into a single RB, so fewer are @@ -415,7 +162,6 @@ const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = { */ #define IWL_NUM_RBDS_NON_HE 512 #define IWL_NUM_RBDS_22000_HE 2048 -#define IWL_NUM_RBDS_AX210_HE 4096 /* * All JF radio modules are part of the 9000 series, but the MAC part @@ -446,63 +192,20 @@ const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = { .num_rbds = IWL_NUM_RBDS_NON_HE, }; -const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg = { - .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE, - IWL_DEVICE_22500, - /* - * This device doesn't support receiving BlockAck with a large bitmap - * so we need to restrict the size of transmitted aggregation to the - * HT size; mac80211 would otherwise pick the HE max (256) by default. - */ - .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, - .num_rbds = IWL_NUM_RBDS_NON_HE, -}; - const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = { .device_family = IWL_DEVICE_FAMILY_22000, .base_params = &iwl_22000_base_params, .mq_rx_supported = true, - .use_tfh = true, .rf_id = true, .gen2 = true, .bisr_workaround = 1, }; -const struct iwl_cfg_trans_params iwl_ma_trans_cfg = { - .device_family = IWL_DEVICE_FAMILY_AX210, - .base_params = &iwl_ax210_base_params, - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .integrated = true, - .umac_prph_offset = 0x300000 -}; - -const struct iwl_cfg_trans_params iwl_bz_trans_cfg = { - .device_family = IWL_DEVICE_FAMILY_BZ, - .base_params = &iwl_ax210_base_params, - .mq_rx_supported = true, - .use_tfh = true, - .rf_id = true, - .gen2 = true, - .integrated = true, - .umac_prph_offset = 0x300000, - .xtal_latency = 12000, - .low_latency_xtal = true, - .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, -}; - const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101"; const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz"; const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz"; const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203"; const char iwl_ax204_name[] = "Intel(R) Wi-Fi 6 AX204 160MHz"; -const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz"; -const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz"; -const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz"; -const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz"; -const char iwl_bz_name[] = "Intel(R) TBD Bz device"; const char iwl_ax200_killer_1650w_name[] = "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)"; @@ -512,18 +215,6 @@ const char iwl_ax201_killer_1650s_name[] = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)"; const char iwl_ax201_killer_1650i_name[] = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)"; -const char iwl_ax210_killer_1675w_name[] = - "Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)"; -const char iwl_ax210_killer_1675x_name[] = - "Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)"; -const char iwl_ax211_killer_1675s_name[] = - "Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW)"; -const char iwl_ax211_killer_1675i_name[] = - "Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)"; -const char iwl_ax411_killer_1690s_name[] = - "Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)"; -const char iwl_ax411_killer_1690i_name[] = - "Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)"; const struct iwl_cfg iwl_qu_b0_hr1_b0 = { .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, @@ -717,168 +408,6 @@ const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = { .num_rbds = IWL_NUM_RBDS_22000_HE, }; -const struct iwl_cfg iwl_qnj_b0_hr_b0_cfg = { - .fw_name_pre = IWL_QNJ_B_HR_B_FW_PRE, - IWL_DEVICE_22500, - /* - * This device doesn't support receiving BlockAck with a large bitmap - * so we need to restrict the size of transmitted aggregation to the - * HT size; mac80211 would otherwise pick the HE max (256) by default. - */ - .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, - .num_rbds = IWL_NUM_RBDS_22000_HE, -}; - -const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = { - .name = "Intel(R) Wireless-AC 9560 160MHz", - .fw_name_pre = IWL_SO_A_JF_B_FW_PRE, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_NON_HE, -}; - -const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = { - .name = iwl_ax211_name, - .fw_name_pre = IWL_SO_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = { - .name = iwl_ax211_name, - .fw_name_pre = IWL_SO_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, - .trans.xtal_latency = 12000, - .trans.low_latency_xtal = true, -}; - -const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = { - .name = "Intel(R) Wi-Fi 6 AX210 160MHz", - .fw_name_pre = IWL_TY_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { - .name = iwl_ax411_name, - .fw_name_pre = IWL_SO_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = { - .name = iwl_ax411_name, - .fw_name_pre = IWL_SO_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, - .trans.xtal_latency = 12000, - .trans.low_latency_xtal = true, -}; - -const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = { - .name = iwl_ax411_name, - .fw_name_pre = IWL_SNJ_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwlax211_cfg_snj_gf_a0 = { - .name = iwl_ax211_name, - .fw_name_pre = IWL_SNJ_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_snj_hr_b0 = { - .fw_name_pre = IWL_SNJ_A_HR_B_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_snj_a0_jf_b0 = { - .fw_name_pre = IWL_SNJ_A_JF_B_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_hr_b0 = { - .fw_name_pre = IWL_MA_A_HR_B_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_gf_a0 = { - .fw_name_pre = IWL_MA_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_gf4_a0 = { - .fw_name_pre = IWL_MA_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_mr_a0 = { - .fw_name_pre = IWL_MA_A_MR_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_ms_a0 = { - .fw_name_pre = IWL_MA_A_MR_A_FW_PRE, - .uhb_supported = false, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_so_a0_ms_a0 = { - .fw_name_pre = IWL_SO_A_MR_A_FW_PRE, - .uhb_supported = false, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_ma_a0_fm_a0 = { - .fw_name_pre = IWL_MA_A_FM_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_snj_a0_mr_a0 = { - .fw_name_pre = IWL_SNJ_A_MR_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_snj_a0_ms_a0 = { - .fw_name_pre = IWL_SNJ_A_MR_A_FW_PRE, - .uhb_supported = false, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = { - .fw_name_pre = IWL_SO_A_HR_B_FW_PRE, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = { .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, IWL_DEVICE_22500, @@ -891,119 +420,9 @@ const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = { .num_rbds = IWL_NUM_RBDS_22000_HE, }; -const struct iwl_cfg iwl_cfg_bz_a0_hr_b0 = { - .fw_name_pre = IWL_BZ_A_HR_B_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bz_a0_gf_a0 = { - .fw_name_pre = IWL_BZ_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bz_a0_gf4_a0 = { - .fw_name_pre = IWL_BZ_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bz_a0_mr_a0 = { - .fw_name_pre = IWL_BZ_A_MR_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bz_a0_fm_a0 = { - .fw_name_pre = IWL_BZ_A_FM_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_gl_a0_fm_a0 = { - .fw_name_pre = IWL_GL_A_FM_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = { - .fw_name_pre = IWL_BZ_Z_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0 = { - .fw_name_pre = IWL_BNJ_A_FM_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0 = { - .fw_name_pre = IWL_BNJ_A_FM4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0 = { - .fw_name_pre = IWL_BNJ_A_GF_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0 = { - .fw_name_pre = IWL_BNJ_A_GF4_A_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; - -const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0 = { - .fw_name_pre = IWL_BNJ_A_HR_B_FW_PRE, - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_AX210_HE, -}; MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_QNJ_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SNJ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_MA_A_FM_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_SNJ_A_MR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BZ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BZ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BZ_A_MR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BZ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_GL_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BNJ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); -MODULE_FIRMWARE(IWL_BNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); diff --git a/sys/contrib/dev/iwlwifi/cfg/7000.c b/sys/contrib/dev/iwlwifi/cfg/7000.c index b24dc5523a52..4e2afdedf4c6 100644 --- a/sys/contrib/dev/iwlwifi/cfg/7000.c +++ b/sys/contrib/dev/iwlwifi/cfg/7000.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2012-2014, 2018-2020 Intel Corporation + * Copyright (C) 2012-2014, 2018-2020, 2023 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015 Intel Deutschland GmbH */ @@ -34,20 +34,20 @@ #define IWL3160_DCCM_LEN 0x10000 #define IWL7265_DCCM_LEN 0x17A00 -#define IWL7260_FW_PRE "iwlwifi-7260-" -#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode" +#define IWL7260_FW_PRE "iwlwifi-7260" +#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE "-" __stringify(api) ".ucode" -#define IWL3160_FW_PRE "iwlwifi-3160-" -#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode" +#define IWL3160_FW_PRE "iwlwifi-3160" +#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE "-" __stringify(api) ".ucode" -#define IWL3168_FW_PRE "iwlwifi-3168-" -#define IWL3168_MODULE_FIRMWARE(api) IWL3168_FW_PRE __stringify(api) ".ucode" +#define IWL3168_FW_PRE "iwlwifi-3168" +#define IWL3168_MODULE_FIRMWARE(api) IWL3168_FW_PRE "-" __stringify(api) ".ucode" -#define IWL7265_FW_PRE "iwlwifi-7265-" -#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode" +#define IWL7265_FW_PRE "iwlwifi-7265" +#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE "-" __stringify(api) ".ucode" -#define IWL7265D_FW_PRE "iwlwifi-7265D-" -#define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE __stringify(api) ".ucode" +#define IWL7265D_FW_PRE "iwlwifi-7265D" +#define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE "-" __stringify(api) ".ucode" static const struct iwl_base_params iwl7000_base_params = { .eeprom_size = OTP_LOW_IMAGE_SIZE_16K, diff --git a/sys/contrib/dev/iwlwifi/cfg/8000.c b/sys/contrib/dev/iwlwifi/cfg/8000.c index a6454287d506..d09cf8d7dc01 100644 --- a/sys/contrib/dev/iwlwifi/cfg/8000.c +++ b/sys/contrib/dev/iwlwifi/cfg/8000.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2014, 2018-2020 Intel Corporation + * Copyright (C) 2014, 2018-2020, 2023 Intel Corporation * Copyright (C) 2014-2015 Intel Mobile Communications GmbH * Copyright (C) 2016 Intel Deutschland GmbH */ @@ -27,13 +27,13 @@ #define IWL8260_SMEM_OFFSET 0x400000 #define IWL8260_SMEM_LEN 0x68000 -#define IWL8000_FW_PRE "iwlwifi-8000C-" +#define IWL8000_FW_PRE "iwlwifi-8000C" #define IWL8000_MODULE_FIRMWARE(api) \ - IWL8000_FW_PRE __stringify(api) ".ucode" + IWL8000_FW_PRE "-" __stringify(api) ".ucode" -#define IWL8265_FW_PRE "iwlwifi-8265-" +#define IWL8265_FW_PRE "iwlwifi-8265" #define IWL8265_MODULE_FIRMWARE(api) \ - IWL8265_FW_PRE __stringify(api) ".ucode" + IWL8265_FW_PRE "-" __stringify(api) ".ucode" #define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C" diff --git a/sys/contrib/dev/iwlwifi/cfg/9000.c b/sys/contrib/dev/iwlwifi/cfg/9000.c index 7a7ca06d46c1..0130d9a9b78b 100644 --- a/sys/contrib/dev/iwlwifi/cfg/9000.c +++ b/sys/contrib/dev/iwlwifi/cfg/9000.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* * Copyright (C) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2021, 2023 Intel Corporation */ #include *** 31085 LINES SKIPPED *** From nobody Fri Oct 6 14:25:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gh0H1jz4wgWS; Fri, 6 Oct 2023 14:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gg4l7wz3RSM; Fri, 6 Oct 2023 14:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ut8HXBNzq2S3Kmnhdl/fXIWoNJDk7I7vcGwNfXvFQIE=; b=yUlfzQlmiIK+TwLCfyUkgB/UEYk+czgXkznY05xqxMB8RuZIWy68SMpoGTS2Y2y026cffV BH5vKND3hHW1QIRQ18KK40dCGHNhohNmFEB/0mVkeLIuYzkkb6ByZ26KMyRtQw1qiJiL4s CP8y2iVso40roo84U7JFol2I7OTRN2vZ8yhGTDhkfPqsjuwnjQ6yQmqtNftjGCJ4kB+ohr r0D/fokwL9nymCnCoiosm0nKQFXMXWg4/wlg0nvVUO9ZEcYPZvI4J6ao0GcfBycZMrDSh9 N2XQpsYS8hR196jehaITiwdBZBG9W0SL2mDLkcZzgNIIj1eEGIMe2H1qe6WpMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602319; a=rsa-sha256; cv=none; b=n5+glywbfH21f3wpGrmTKIdRftoDt+FOgzdCqf5aZlPjJ0nTCeaLtha8m4zgO/Orw56+I0 7FwbmbiAVye5GnvY29ZQbV7qfq21fL1S9AKv/JfBr5TL6bV1HPGdb5YEnHSd5pDwxf7NAA QDigseHumtRKuZTS5Q1Zg9AWXwF2xAhkfCALZtEc0eiyqj2r0QksenFTVWIEc04rh3mhDO 5MsCLE+9M47ouBjqR0yVGOHB0GGi+ygXAQ/hqLkpNyaj78dQbnQk4yKbl7zKI2pIj5vNSL SGsOSK68bOob87A/hFu3HpPgFsHr08Gc6zDjicRsQ0AwbsLr38SvRNOx99Q/MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ut8HXBNzq2S3Kmnhdl/fXIWoNJDk7I7vcGwNfXvFQIE=; b=rn2XP15LOAggfoEYlPAdmW1kzXQg23b4j1tWf+kMxs/chlpkcd1Ilj18Xqp2r9W4GepTLd HhI/Zs0cblBqApidjmAKb4rb67F3C2GndYfdKAK0AHP9c0eHUgFRPeCeTaPo5vp5nBx46n tn8S6JZ1ILR/ZQaS5nF2oqYJyrnmsjoqhPIvLo3ipRVkOiUlignZFbQgYu+CiBFwOl989E T1dUIzeScP4yEpiRspV9dXpd0JcUD+sWnvJETZ3iX6vpDrm5euJlnyHCMSdBBTsKcipyD1 I+Mq7LgiKd1H2daKRQt1hL4/x8qJIl+IAOc0R1Sm3+yJFIo45RdhYIdG5bcUqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gg3s1Jzrb3; Fri, 6 Oct 2023 14:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPJER093676; Fri, 6 Oct 2023 14:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPJRV093671; Fri, 6 Oct 2023 14:25:19 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:19 GMT Message-Id: <202310061425.396EPJRV093671@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: e504b5da3ef2 - stable/14 - iwlwifi firmware: update up-to -83 / updated -77 for others List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: e504b5da3ef2c24b4e09e7331e9628a8299540f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e504b5da3ef2c24b4e09e7331e9628a8299540f6 commit e504b5da3ef2c24b4e09e7331e9628a8299540f6 Author: Bjoern A. Zeeb AuthorDate: 2023-06-11 00:45:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:41 +0000 iwlwifi firmware: update up-to -83 / updated -77 for others Firmware was obtained from linux-firmware at dfa11466cf000120d1551146fd5bf78c44941eda. Sponsored by: The FreeBSD Foundation (cherry picked from commit 027768a21217499dd85aba8608715a5bf66a7857) --- .../iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode | Bin 1518788 -> 1518772 bytes .../iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode | Bin 1489548 -> 1489652 bytes ...hr-b0-73.ucode => iwlwifi-Qu-b0-hr-b0-77.ucode} | Bin 1369840 -> 1404704 bytes ...jf-b0-73.ucode => iwlwifi-Qu-b0-jf-b0-77.ucode} | Bin 1290220 -> 1322436 bytes ...hr-b0-73.ucode => iwlwifi-Qu-c0-hr-b0-77.ucode} | Bin 1369976 -> 1404720 bytes ...jf-b0-73.ucode => iwlwifi-Qu-c0-jf-b0-77.ucode} | Bin 1290100 -> 1322452 bytes ...r-b0-73.ucode => iwlwifi-QuZ-a0-hr-b0-77.ucode} | Bin 1369856 -> 1404840 bytes ...f-b0-73.ucode => iwlwifi-QuZ-a0-jf-b0-77.ucode} | Bin 1290084 -> 1321956 bytes ...lwifi-cc-a0-73.ucode => iwlwifi-cc-a0-77.ucode} | Bin 1333296 -> 1366144 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf-a0-73.ucode | Bin 1563692 -> 0 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf-a0-83.ucode | Bin 0 -> 1739988 bytes sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0.pnvm | Bin 41808 -> 55580 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf4-a0-73.ucode | Bin 1587800 -> 0 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf4-a0-83.ucode | Bin 0 -> 1703968 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf4-a0.pnvm | Bin 28064 -> 28064 bytes ...hr-b0-73.ucode => iwlwifi-so-a0-hr-b0-81.ucode} | Bin 1465208 -> 1539288 bytes ...jf-b0-73.ucode => iwlwifi-so-a0-jf-b0-77.ucode} | Bin 1409336 -> 1446036 bytes .../dev/iwlwififw/iwlwifi-ty-a0-gf-a0-73.ucode | Bin 1502900 -> 0 bytes .../dev/iwlwififw/iwlwifi-ty-a0-gf-a0-83.ucode | Bin 0 -> 1683076 bytes sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm | Bin 41588 -> 55484 bytes .../iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile | 2 +- sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile | 2 +- .../iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile | 2 +- 35 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode index f9ea46dc928c..9af424f1ce06 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode index fec9d0aba254..4c2b25e585cb 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-77.ucode similarity index 52% rename from sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-77.ucode index 26abb3a850a4..de6cd8b98985 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-77.ucode similarity index 52% rename from sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-77.ucode index 072064dde7b1..ad87490d470b 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-77.ucode similarity index 51% rename from sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-77.ucode index 16e42ff8889f..37e1c7af3f16 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-77.ucode similarity index 52% rename from sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-77.ucode index 4e88eb24ba76..bd0b2b249894 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-77.ucode similarity index 52% rename from sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-77.ucode index c3a23c81643c..256997390af6 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-77.ucode similarity index 52% rename from sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-77.ucode index e1ecc31408e2..7c2a06a2dd2e 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-77.ucode similarity index 51% rename from sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-77.ucode index 9f7df7693322..d138e34af24d 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-73.ucode deleted file mode 100644 index 196a3bda21b7..000000000000 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-73.ucode and /dev/null differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-83.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-83.ucode new file mode 100644 index 000000000000..dbb15f487716 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-83.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0.pnvm b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0.pnvm index b649de0118ef..9dad35a1f5f5 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0.pnvm and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0.pnvm differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-73.ucode deleted file mode 100644 index c1595fd0baa8..000000000000 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-73.ucode and /dev/null differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-83.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-83.ucode new file mode 100644 index 000000000000..1bc07d83ac07 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-83.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0.pnvm b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0.pnvm index 8658ebaa8fa8..86b9a7c63776 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0.pnvm and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0.pnvm differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-81.ucode similarity index 50% rename from sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-81.ucode index 2da5b4cdcae9..fc8558c6cc90 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-81.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-77.ucode similarity index 54% rename from sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-73.ucode rename to sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-77.ucode index 4704c56f8456..3649a1c89238 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-73.ucode and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-77.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-73.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-73.ucode deleted file mode 100644 index 1a6592408f1d..000000000000 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-73.ucode and /dev/null differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-83.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-83.ucode new file mode 100644 index 000000000000..3fdd6d5a0d9a Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-83.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm index 70882a9127db..68b8668df93d 100644 Binary files a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm and b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm differ diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile index bc41b21969dd..e781e790a048 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= Qu-b0-hr-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile index 125d3e969e51..ac8b13cd1777 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= Qu-b0-jf-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile index c254768fcb68..15389b3c3e2f 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= Qu-c0-hr-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile index af8ad15e7576..bd9cd5077021 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= Qu-c0-jf-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile index d89f4c878d7b..d15ee3643679 100644 --- a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= QuZ-a0-hr-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile index e92608872e07..ac0f398a10d6 100644 --- a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= QuZ-a0-jf-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile index 0cb3830c4d57..645e3c94684a 100644 --- a/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= cc-a0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile index 98e1efddd7f3..4106eedfa339 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= so-a0-gf-a0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile index 6a4085119166..56b5cbde6c26 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= so-a0-gf-a0 EXT= pnvm _NAME= iwlwifi-${NAME}.${EXT} diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile index 44cd873e0b8e..f89756193b89 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= so-a0-gf4-a0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile index 5a63a147c156..a13ba593b628 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= so-a0-gf4-a0 EXT= pnvm _NAME= iwlwifi-${NAME}.${EXT} diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile index b95aba38ed80..ae908c41376a 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 81 NAME= so-a0-hr-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile index 0211cf81d4e3..372a04314cf7 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 77 NAME= so-a0-jf-b0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile index 62c98afb76ba..3bb0931b5248 100644 --- a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= ty-a0-gf-a0 .include diff --git a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile index f61111576131..1dcb41414755 100644 --- a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile @@ -1,5 +1,5 @@ -FWVERSION= 73 +FWVERSION= 83 NAME= ty-a0-gf-a0 EXT= pnvm _NAME= iwlwifi-${NAME}.${EXT} From nobody Fri Oct 6 14:25:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gh5p0pz4wgmr; Fri, 6 Oct 2023 14:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gh5ZYLz3RBw; Fri, 6 Oct 2023 14:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nGgSmMoynuA8i70WCuz80KgyYuQu/kU09wLYfJMOnlc=; b=RhrmNcAhC4h+5L9B6q0Q32qJxcctta01ymYh28n2akKBNhgA77xx/8XrB2GeQSRoUPyYAg APRy9t/W6SbV6g02ymCUZ1DzXNkoShvS8BP2dPJPo7uBDi34lsHNXhGMa9Gtx7XGwH8pvo e0jeQBVtgEHrLenJ+Zck9XvNEMIGz+lr9U3tF5SZa5J5YE9i4pniKX0DO6qFNUITN+0MqJ Ymby+DBrHTzhaw/tgpD1eYeNafk1VHcYDgaRFPBsjJx9YrdipbMGKopaED6Ge1BKScv9N1 eu0iVYVfKXbS2HM7Blm5GQCEoHqm7aTBmuOsRm2lZQZVeLyCAUre9lXQ7JE/7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602320; a=rsa-sha256; cv=none; b=bxd5VQqQhZx/xgmElFd4y0IJUXmMBg+/RPjrkhWDZlJ3JkjOJzZTpxlle1NSZ4xrWMcvlw KwoCXRc5eFA+EbFrOELpkTK3yBjA91q/JYG7mDI4YpETKyN3biHx/rQtrN9N/KvezQNIjQ Y9zE7A3cqEJg4S+283hxVBN+56F+OA25m4sVPotLq7a4Sp2Qjs+eGJ3XCDlQqIWnViFlWL s3jNZ/Fba5kpzmYQeixcR5VS44zMYMbF6u7dt0Xca0BV3Ga9KGHHJ+8iA0DeAyQOppIRAj krOI1NBABoETGwxW4P/Akzuy7jWFfbuDGnphh3TKzY/j6bPCCsz9hfd4ZHfBkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nGgSmMoynuA8i70WCuz80KgyYuQu/kU09wLYfJMOnlc=; b=FVDeQKW6diaQHvdgo3s+HaPh75ajvFUxODg3eyg0xHzEw6CDkUClgzvkbbT0CaraiCG5uo YYL4bPsCE9qR3nduPjcmdheETxwMaIznNzbBb6KpzEGCgmdZR7g6C1de0qMLLrqihDIxDb 2QoLUD6Vom4wcLcJq5hCJn4uAsU8qP8i0LNXes3qip5Y8redWS3uQ8rR9ryqeJtLEhkpUZ 6PiFVpyEOnXWE0QAHbdH8FF9W5CUGtB+B9kr1XqM4fuzMypWRIsXYGBCwWQrkRltfLZRKy 1hitb6aAw284+fZ/LKU0RZwxLVmDnssxLcjfm6rmpZob3BX1zbOhGC+VyA6HBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gh4gS9zrtY; Fri, 6 Oct 2023 14:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPK0r093727; Fri, 6 Oct 2023 14:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPKwG093724; Fri, 6 Oct 2023 14:25:20 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:20 GMT Message-Id: <202310061425.396EPKwG093724@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: e96f025905d6 - stable/14 - iwlwifi: Update iwlwifi.4 and iwlwififw.4 device list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: e96f025905d6a39f5c77b6bcb3bfecb7c5d10736 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e96f025905d6a39f5c77b6bcb3bfecb7c5d10736 commit e96f025905d6a39f5c77b6bcb3bfecb7c5d10736 Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 21:47:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:41 +0000 iwlwifi: Update iwlwifi.4 and iwlwififw.4 device list Update the man pages for iwlwifi.4 and iwlwififw.4 to list the current state of devices supported and which firmware they need. The list is automatically generated based on a sysctl added to the iwlwifi driver (so this is the driver's view). The reader should not be surprised by the larger number of any/any/any/any entries for PCI vendor and devices in the firmware table for which other matching logic happens. The reader should also not be confused about "TBD" (to be done) entries for chipsets which the driver already supports but have no (public) product yet. Sponsored by: The FreeBSD Foundation (cherry picked from commit 242f314842767c36eaaacca9f433c80d34def39c) --- share/man/man4/iwlwifi.4 | 6 +- share/man/man4/iwlwififw.4 | 1002 +++++++++++++++++++------------------------- 2 files changed, 445 insertions(+), 563 deletions(-) diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index b67f1d440bde..1cf61c0008b5 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2021 The FreeBSD Foundation +.\" Copyright (c) 2021-2023 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 3, 2022 +.Dd September 21, 2023 .Dt IWLWIFI 4 .Os .Sh NAME @@ -178,6 +178,8 @@ Intel(R) Wi-Fi 6E AX231 160MHz Intel(R) TBD Bz device .It Intel(R) Wi-Fi 6 AX204 160MHz +.It +Intel(R) TBD Sc device .\" --------------------------------------------------------------------- .El .Pp diff --git a/share/man/man4/iwlwififw.4 b/share/man/man4/iwlwififw.4 index 82ee376aaa72..a377f6b51f78 100644 --- a/share/man/man4/iwlwififw.4 +++ b/share/man/man4/iwlwififw.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2021 The FreeBSD Foundation +.\" Copyright (c) 2021-2023 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 3, 2022 +.Dd September 21, 2023 .Dt iwlwififw 4 .Os .Sh NAME @@ -52,1414 +52,1294 @@ driver. .% --------------------------------------------------------------------- .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4070 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4070 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4072 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4072 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4170 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4170 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c60 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c60 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c70 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c70 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4060 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4060 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x406a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x406a Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4160 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4160 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4062 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4062 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4162 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4162 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4270 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4270 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4272 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4272 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4260 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4260 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x426a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x426a Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4262 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4262 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4470 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4470 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4472 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4472 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4460 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4460 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x446a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x446a Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4462 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4462 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4870 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4870 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x486e Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x486e Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a70 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a70 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6e Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6e Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6c Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6c Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4570 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4570 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4560 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4560 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4370 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4370 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4360 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4360 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5070 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5070 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5072 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5072 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5170 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5170 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5770 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5770 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4020 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4020 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x402a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x402a Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4220 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4220 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4420 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4420 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc070 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc070 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc072 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc072 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc170 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc170 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc060 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc060 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc06a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc06a Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc160 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc160 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc062 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc062 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc162 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc162 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc770 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc770 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc760 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc760 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc270 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc270 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc70 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc70 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc60 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc60 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc272 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc272 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc260 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc260 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc26a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc26a Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc262 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc262 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc470 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc470 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc472 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc472 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc460 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc460 Ta iwlwifi-7260 .It "" .It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc462 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc462 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc570 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc570 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc560 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc560 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc370 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc370 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc360 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc360 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc020 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc020 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc02a Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc02a Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc220 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc220 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc420 Ta iwlwifi-7260- +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc420 Ta iwlwifi-7260 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0070 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0070 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0072 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0072 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0170 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0170 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0172 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0172 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0060 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0060 Ta iwlwifi-3160 .It "" .It Intel(R) Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0062 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0062 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0270 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0270 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0272 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0272 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0470 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0470 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0472 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0472 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0370 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0370 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8070 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8070 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8072 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8072 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8170 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8170 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8172 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8172 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8060 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8060 Ta iwlwifi-3160 .It "" .It Intel(R) Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8062 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8062 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8270 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8270 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8370 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8370 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8272 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8272 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8470 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8470 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8570 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8570 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x1070 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x1070 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x1170 Ta iwlwifi-3160- +.It 0x8086 Ta 0x08b3 Ta any Ta 0x1170 Ta iwlwifi-3160 .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4010 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x4010 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4012 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x4012 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4212 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3166 Ta any Ta 0x4212 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4410 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x4410 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4510 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x4510 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4110 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x4110 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4310 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3166 Ta any Ta 0x4310 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4210 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3166 Ta any Ta 0x4210 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x8010 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x8010 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x8110 Ta iwlwifi-7265D- +.It 0x8086 Ta 0x3165 Ta any Ta 0x8110 Ta iwlwifi-7265D .It "" .It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2010 Ta iwlwifi-3168- +.It 0x8086 Ta 0x24fb Ta any Ta 0x2010 Ta iwlwifi-3168 .It "" .It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2110 Ta iwlwifi-3168- +.It 0x8086 Ta 0x24fb Ta any Ta 0x2110 Ta iwlwifi-3168 .It "" .It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2050 Ta iwlwifi-3168- +.It 0x8086 Ta 0x24fb Ta any Ta 0x2050 Ta iwlwifi-3168 .It "" .It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2150 Ta iwlwifi-3168- +.It 0x8086 Ta 0x24fb Ta any Ta 0x2150 Ta iwlwifi-3168 .It "" .It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 000000 Ta iwlwifi-3168- +.It 0x8086 Ta 0x24fb Ta any Ta 000000 Ta iwlwifi-3168 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5010 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5010 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5110 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5110 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5100 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5100 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5310 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5310 Ta iwlwifi-7265 .It "" .It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5302 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5302 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5210 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5210 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5c10 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5c10 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5012 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5012 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5412 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5412 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5410 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5410 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5510 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5510 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5400 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5400 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x1010 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x1010 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5000 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5000 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x500a Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x500a Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5200 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5200 Ta iwlwifi-7265 .It "" .It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5002 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5002 Ta iwlwifi-7265 .It "" .It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5102 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5102 Ta iwlwifi-7265 .It "" .It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5202 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5202 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9010 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9010 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9012 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9012 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x900a Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x900a Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9110 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9110 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9112 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9112 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9210 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x9210 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9200 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x9200 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9510 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9510 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9310 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x9310 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9410 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9410 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5020 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5020 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x502a Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x502a Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5420 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5420 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5090 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5090 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5190 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5190 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5590 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5590 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5290 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5290 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5490 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5490 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5f10 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x5f10 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5212 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x5212 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x520a Ta iwlwifi-7265- +.It 0x8086 Ta 0x095b Ta any Ta 0x520a Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9000 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9000 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9400 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9400 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9e10 Ta iwlwifi-7265- +.It 0x8086 Ta 0x095a Ta any Ta 0x9e10 Ta iwlwifi-7265 .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x10b0 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x10b0 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0130 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0130 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1130 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1130 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0132 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0132 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1132 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1132 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0110 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0110 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x01f0 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x01f0 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0012 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0012 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1012 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1012 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1110 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1110 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0250 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0250 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0150 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0150 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1150 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1150 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x0030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0x0030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x1030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0x1030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc110 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc110 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd0b0 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd0b0 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xb0b0 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0xb0b0 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8110 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8110 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9110 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9110 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x8030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0x8030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x9030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0x9030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0xc030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0xc030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0xd030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f4 Ta any Ta 0xd030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8130 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8130 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9130 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9130 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8132 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8132 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9132 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9132 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8150 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8150 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9050 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9050 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9150 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9150 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless N 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0004 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0004 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless N 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0044 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0044 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 4165 -.It 0x8086 Ta 0x24f5 Ta any Ta 0x0010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f5 Ta any Ta 0x0010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 4165 -.It 0x8086 Ta 0x24f6 Ta any Ta 0x0030 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f6 Ta any Ta 0x0030 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0810 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0810 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0910 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0910 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0850 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0850 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0950 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0950 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0930 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0930 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24f3 Ta any Ta 000000 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24f3 Ta any Ta 000000 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x4010 Ta iwlwifi-8000C- +.It 0x8086 Ta 0x24f3 Ta any Ta 0x4010 Ta iwlwifi-8000C .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0010 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0010 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0110 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0110 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1110 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x1110 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1130 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x1130 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0130 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0130 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1010 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x1010 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x10d0 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x10d0 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0050 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0050 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0150 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0150 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x9010 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x9010 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8110 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x8110 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8050 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x8050 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8010 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x8010 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0810 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0810 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x9110 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x9110 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8130 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x8130 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0910 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0910 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0930 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0930 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0950 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0950 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0850 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0850 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1014 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x1014 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x3e02 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x3e02 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x3e01 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x3e01 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1012 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x1012 Ta iwlwifi-8265 .It "" .It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0012 Ta iwlwifi-8265- +.It 0x8086 Ta 0x24fd Ta any Ta 0x0012 Ta iwlwifi-8265 .It "" *** 947 LINES SKIPPED *** From nobody Fri Oct 6 14:25:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gk0R45z4wgms; Fri, 6 Oct 2023 14:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gj6YsVz3RTW; Fri, 6 Oct 2023 14:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCqEiX6GyY7wEMFrkzpRbaaIIRPD7/PnhT5HkrLqO8k=; b=lCXPsQRdTMzc2zqZz6Ww/A9XR2UzI29TuwR1lnRU+JquEimcK6sY4ihhPCbcxisxg90rXw yckH8yXaF07StqUalQR0Yzt/CtybGomBBOtEHLgV/bhPfQUP2jeNknapr1ravc85yXdzf0 KYPUEarBn3wTsIDVmWMXSbsAiuHNO7UZI5e968jOagPRTnM57z9Sg5lm7ruebwxZMRYyMV RBzapYkTa4qy6P4XDHEeerakdd2pLOMVDEYCG3qNjyoLyxjXs+M21RNvXz0O5gXom+ANIw FfWQp3cBNHk6e0qj6pgfEdtoyW6phiGlC6XMp7cuuX4EtzL526nMLgxY2jJzSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602321; a=rsa-sha256; cv=none; b=VfKFcHqwQeA1hFtDoD1PibYFv/iLPFNjr24buN8SuVw6S3Rfx1n8J/lU2pJlIe4gzcFyDv sTa5Nw3V/aWJHojVrxQyZmQK9wal7tuIp4xKiruEV7TuZKY6GPqlLgxhPNQWMjJpFCcNRo 5qPEsOLi08TmNTy9VyB5VtucEbMOsCOD232jXz0HAst2AkWiIOWY7XP475hNDJq0MNm19R +n84FRzgM9G47TWj0kYsTJDunWb69WlC6mlNenlGRjq3mx3Fr8Z+7++gKOJQgjKuz8UACw +BZtUs+B1kJ+JB6OvXPPoUPx/s2KNKT+weUQYjMhT92fIiGXvWJnFJrTAIKKuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCqEiX6GyY7wEMFrkzpRbaaIIRPD7/PnhT5HkrLqO8k=; b=G6dspLwiBZA/xT9hylI0sl+VLLJJ79uJmqeJAWQDwToc8yKdUOVB4sZoj1nNLc52sqQ4X7 HQTOwsft8wCtZI0DsXDwHOlbHTTYCR/C+ZBQbxuKWz3cOqyHi/ZbnF63KDn/xTA8TIeH9T 9C3kFvTLWsLAdQWbgANpu0sauRQl0jhaMXhcCR+sYyzUwxeTl8KF+j4GXPjK3v9qj8q6Ay qQSVJdJCodadEGeILOjFJY5nRX76I1v7LwFLjd/pCw3noJdpLG+Vlnub8hgaEjBm428oX9 1jaLf4uirmI8mNot8sKVZLXPAM/z1+BLyW3Vpfyuv+hGEXLOb1Wvt2VqJ7sebQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gj5ft4zrNp; Fri, 6 Oct 2023 14:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPLYn093778; Fri, 6 Oct 2023 14:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPLmv093775; Fri, 6 Oct 2023 14:25:21 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:21 GMT Message-Id: <202310061425.396EPLmv093775@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: 8aa738297b57 - stable/14 - iwlwifi: local namespace change for sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 8aa738297b57e43b4847b6c38ec16c51f6d37db5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8aa738297b57e43b4847b6c38ec16c51f6d37db5 commit 8aa738297b57e43b4847b6c38ec16c51f6d37db5 Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 22:05:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:41 +0000 iwlwifi: local namespace change for sysctl In order for the FreeBSD-specific sysctl (which gives us a full list of PCI device IDs/names/and firmware prefixes) to be in the proper namespace add a LINUXKPI_PARAM_PREFIX definition to the file as well. The sysctl can now be used as: sysctl -n compat.linuxkpi.iwlwifi_pci_ids_name Sponsored by: The FreeBSD Foundation (cherry picked from commit 0a22677bce28bc9ad39f219b726b5791852d84ba) --- sys/contrib/dev/iwlwifi/pcie/drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/pcie/drv.c b/sys/contrib/dev/iwlwifi/pcie/drv.c index 3bde223e3f9c..0aab7a1fdc8e 100644 --- a/sys/contrib/dev/iwlwifi/pcie/drv.c +++ b/sys/contrib/dev/iwlwifi/pcie/drv.c @@ -4,6 +4,9 @@ * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ +#if defined(__FreeBSD__) +#define LINUXKPI_PARAM_PREFIX iwlwifi_ +#endif #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include From nobody Fri Oct 6 14:25:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gl1thXz4wghx; Fri, 6 Oct 2023 14:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gl0sMJz3RX5; Fri, 6 Oct 2023 14:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XLm0vPiYTWyri0S/zJm/VVu0wPSxI+1yWPYYTXe5I68=; b=kVUUDaJOl9lDDI4b7StD6SpSqDQxlo1dM0IlcprFv+qA976gUKanxOhSxq5KCerBzQFNkk xYgKglPf8dqMO7plMi2xw2PYmZ+lC+4qXl71HTE5SWRLHjATlBAqdHxspV7xdVAYxUJHb5 po/fVMiJJmXD9WXeYRVrSqACtP3+WQIpT1wu8CzCq6f78nVK+dta9peR87bu9YiOfFXtHb HOODkAJPBVavL7ez2QrDNlJPUbHUEIL1qWN58mDKxaLzxHUbvxJ8ukMf0rLjiq710z4IOq h8+JQktUh8ocbIKiXVkpOpgvwmNDclFEJRuIztSO0+RGomayYq0aqNF7oGMEDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602323; a=rsa-sha256; cv=none; b=NnX+uFBFTdcl4fIDIrXNl1msIfLLnr7GH0+BQlsQI/KfZrKDrFtOOP4pJBqdYFlrKGYMKh CEtWMO/1zfkDxYHOjXOZm3GQrylrWyVknrIxpHkI76Ty117QXlOT44KM6sM0wOIz9XahvM CeGopbg21DnzBkP7OK1PyFO+TBxiuns08x+dHq6hw7jJ0thAC80Cusn5ap2f/a3EYVSSor iUfEmSiRPtCYh+Uygn0An8uyz4GkJANf935ARpfDqG29qPE+UE7rhTW+L9duW4W1Km1tMs rGSl1Za6oit9eyhbE8Nr72Ac/SlJ/zW45h2FJdBfxbIVxHcpbMI4S7EG9G+jvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XLm0vPiYTWyri0S/zJm/VVu0wPSxI+1yWPYYTXe5I68=; b=y16QZ/ZDfJZZaPFuqdYap/enVlhFmqNvIxMqIi1xJtd3UfywISaxPnYpz5kpX6PT2CptEk e04sRIUznKNyHAnOExYAcFVOp7W8u0R0XuhqAozq726qt21o8TekxaG2D8CHE6QyRYflU7 ya7yYNXixOR8LWl8+0otqaHjWBTrXroO/f6uMF29mfIeaVWZ8JnHV+aybvEKfonXFmVaf4 Z2CKJRHYUYYEcnJs1MkWMVbJc6djh2fgiIrg7bjdzk6/6yv5Cqzv6PQhNCLJY+CDG0g54G UoNrS4xf7oxKLVk0ssOpOkR6GEwnzemGpQloZAUao46BG4Z43sdQ+AsbU29NCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gk6njFzrkG; Fri, 6 Oct 2023 14:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPMXE093829; Fri, 6 Oct 2023 14:25:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPMHD093826; Fri, 6 Oct 2023 14:25:22 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:22 GMT Message-Id: <202310061425.396EPMHD093826@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: 8323f69b8869 - stable/14 - rtw88: update driver from upstream List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 8323f69b8869ab714e329a378f632a55888d3fab Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8323f69b8869ab714e329a378f632a55888d3fab commit 8323f69b8869ab714e329a378f632a55888d3fab Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 23:19:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:41 +0000 rtw88: update driver from upstream This is a combined version of updates of the rtw88 driver based on wireless-testing (wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1), (wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5), (wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3), (wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4). This update follows other currently disconnected LinuxKPI based wireless drivers to lift them all to a same version in case someone else wants to work on this driver in parallel to predominant iwlwifi efforts. While debugging some funky register reads of 0xaeaea from RF_CFGCH resulting in "rtw880: [TXGAPK] unknown channel 234!!" more of these reads came to my attention hidden by using the register index rather than the defined value. Make this more grep-able. (cherry picked from commit 90aac0d83bc9645f51ef0c2aeae6f9c0540bb031) (cherry picked from commit 4f3b2bba240b6e0603b5cbb47155fd8215bcbcb3) --- sys/contrib/dev/rtw88/Makefile | 78 +++ sys/contrib/dev/rtw88/bf.c | 17 +- sys/contrib/dev/rtw88/coex.c | 93 ++- sys/contrib/dev/rtw88/coex.h | 14 +- sys/contrib/dev/rtw88/debug.c | 85 ++- sys/contrib/dev/rtw88/debug.h | 1 + sys/contrib/dev/rtw88/efuse.c | 4 +- sys/contrib/dev/rtw88/fw.c | 220 ++++-- sys/contrib/dev/rtw88/fw.h | 47 +- sys/contrib/dev/rtw88/hci.h | 9 +- sys/contrib/dev/rtw88/mac.c | 119 +++- sys/contrib/dev/rtw88/mac.h | 1 - sys/contrib/dev/rtw88/mac80211.c | 89 ++- sys/contrib/dev/rtw88/main.c | 451 +++++++++--- sys/contrib/dev/rtw88/main.h | 81 ++- sys/contrib/dev/rtw88/pci.c | 89 +-- sys/contrib/dev/rtw88/phy.c | 71 +- sys/contrib/dev/rtw88/phy.h | 2 +- sys/contrib/dev/rtw88/ps.c | 57 +- sys/contrib/dev/rtw88/ps.h | 2 + sys/contrib/dev/rtw88/reg.h | 15 + sys/contrib/dev/rtw88/regd.c | 2 + sys/contrib/dev/rtw88/rtw8723d.c | 43 +- sys/contrib/dev/rtw88/rtw8723d.h | 19 +- sys/contrib/dev/rtw88/rtw8723ds.c | 41 ++ sys/contrib/dev/rtw88/rtw8723du.c | 39 ++ sys/contrib/dev/rtw88/rtw8821c.c | 54 +- sys/contrib/dev/rtw88/rtw8821c.h | 27 + sys/contrib/dev/rtw88/rtw8821cs.c | 36 + sys/contrib/dev/rtw88/rtw8821cu.c | 53 ++ sys/contrib/dev/rtw88/rtw8822b.c | 32 +- sys/contrib/dev/rtw88/rtw8822b.h | 8 +- sys/contrib/dev/rtw88/rtw8822bs.c | 36 + sys/contrib/dev/rtw88/rtw8822bu.c | 93 +++ sys/contrib/dev/rtw88/rtw8822c.c | 49 +- sys/contrib/dev/rtw88/rtw8822c.h | 8 +- sys/contrib/dev/rtw88/rtw8822cs.c | 36 + sys/contrib/dev/rtw88/rtw8822cu.c | 47 ++ sys/contrib/dev/rtw88/sdio.c | 1404 +++++++++++++++++++++++++++++++++++++ sys/contrib/dev/rtw88/sdio.h | 178 +++++ sys/contrib/dev/rtw88/tx.c | 149 ++-- sys/contrib/dev/rtw88/tx.h | 138 ++-- sys/contrib/dev/rtw88/usb.c | 919 ++++++++++++++++++++++++ sys/contrib/dev/rtw88/usb.h | 100 +++ sys/contrib/dev/rtw88/util.c | 104 ++- sys/contrib/dev/rtw88/util.h | 11 +- sys/contrib/dev/rtw88/wow.c | 2 +- 47 files changed, 4622 insertions(+), 551 deletions(-) diff --git a/sys/contrib/dev/rtw88/Makefile b/sys/contrib/dev/rtw88/Makefile new file mode 100644 index 000000000000..fd212c09d88a --- /dev/null +++ b/sys/contrib/dev/rtw88/Makefile @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + +obj-$(CONFIG_RTW88_CORE) += rtw88_core.o +rtw88_core-y += main.o \ + mac80211.o \ + util.o \ + debug.o \ + tx.o \ + rx.o \ + mac.o \ + phy.o \ + coex.o \ + efuse.o \ + fw.o \ + ps.o \ + sec.o \ + bf.o \ + sar.o \ + regd.o + +rtw88_core-$(CONFIG_PM) += wow.o + +obj-$(CONFIG_RTW88_8822B) += rtw88_8822b.o +rtw88_8822b-objs := rtw8822b.o rtw8822b_table.o + +obj-$(CONFIG_RTW88_8822BE) += rtw88_8822be.o +rtw88_8822be-objs := rtw8822be.o + +obj-$(CONFIG_RTW88_8822BS) += rtw88_8822bs.o +rtw88_8822bs-objs := rtw8822bs.o + +obj-$(CONFIG_RTW88_8822BU) += rtw88_8822bu.o +rtw88_8822bu-objs := rtw8822bu.o + +obj-$(CONFIG_RTW88_8822C) += rtw88_8822c.o +rtw88_8822c-objs := rtw8822c.o rtw8822c_table.o + +obj-$(CONFIG_RTW88_8822CE) += rtw88_8822ce.o +rtw88_8822ce-objs := rtw8822ce.o + +obj-$(CONFIG_RTW88_8822CS) += rtw88_8822cs.o +rtw88_8822cs-objs := rtw8822cs.o + +obj-$(CONFIG_RTW88_8822CU) += rtw88_8822cu.o +rtw88_8822cu-objs := rtw8822cu.o + +obj-$(CONFIG_RTW88_8723D) += rtw88_8723d.o +rtw88_8723d-objs := rtw8723d.o rtw8723d_table.o + +obj-$(CONFIG_RTW88_8723DE) += rtw88_8723de.o +rtw88_8723de-objs := rtw8723de.o + +obj-$(CONFIG_RTW88_8723DS) += rtw88_8723ds.o +rtw88_8723ds-objs := rtw8723ds.o + +obj-$(CONFIG_RTW88_8723DU) += rtw88_8723du.o +rtw88_8723du-objs := rtw8723du.o + +obj-$(CONFIG_RTW88_8821C) += rtw88_8821c.o +rtw88_8821c-objs := rtw8821c.o rtw8821c_table.o + +obj-$(CONFIG_RTW88_8821CE) += rtw88_8821ce.o +rtw88_8821ce-objs := rtw8821ce.o + +obj-$(CONFIG_RTW88_8821CS) += rtw88_8821cs.o +rtw88_8821cs-objs := rtw8821cs.o + +obj-$(CONFIG_RTW88_8821CU) += rtw88_8821cu.o +rtw88_8821cu-objs := rtw8821cu.o + +obj-$(CONFIG_RTW88_PCI) += rtw88_pci.o +rtw88_pci-objs := pci.o + +obj-$(CONFIG_RTW88_SDIO) += rtw88_sdio.o +rtw88_sdio-objs := sdio.o + +obj-$(CONFIG_RTW88_USB) += rtw88_usb.o +rtw88_usb-objs := usb.o diff --git a/sys/contrib/dev/rtw88/bf.c b/sys/contrib/dev/rtw88/bf.c index d207fa5c122f..16c6a1d972e5 100644 --- a/sys/contrib/dev/rtw88/bf.c +++ b/sys/contrib/dev/rtw88/bf.c @@ -30,11 +30,11 @@ void rtw_bf_disassoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf) { + const struct rtw_chip_info *chip = rtwdev->chip; struct ieee80211_hw *hw = rtwdev->hw; struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; struct rtw_bfee *bfee = &rtwvif->bfee; struct rtw_bf_info *bfinfo = &rtwdev->bf_info; - struct rtw_chip_info *chip = rtwdev->chip; struct ieee80211_sta *sta; struct ieee80211_sta_vht_cap *vht_cap; struct ieee80211_sta_vht_cap *ic_vht_cap; @@ -49,6 +49,8 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, sta = ieee80211_find_sta(vif, bssid); if (!sta) { + rcu_read_unlock(); + #if defined(__linux__) rtw_warn(rtwdev, "failed to find station entry for bss %pM\n", bssid); @@ -56,23 +58,25 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, rtw_warn(rtwdev, "failed to find station entry for bss %6D\n", bssid, ":"); #endif - goto out_unlock; + return; } ic_vht_cap = &hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap; vht_cap = &sta->deflink.vht_cap; + rcu_read_unlock(); + if ((ic_vht_cap->cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE) && (vht_cap->cap & IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE)) { if (bfinfo->bfer_mu_cnt >= chip->bfer_mu_max_num) { rtw_dbg(rtwdev, RTW_DBG_BF, "mu bfer number over limit\n"); - goto out_unlock; + return; } ether_addr_copy(bfee->mac_addr, bssid); bfee->role = RTW_BFEE_MU; bfee->p_aid = (bssid[5] << 1) | (bssid[4] >> 7); - bfee->aid = bss_conf->aid; + bfee->aid = vif->cfg.aid; bfinfo->bfer_mu_cnt++; rtw_chip_config_bfee(rtwdev, rtwvif, bfee, true); @@ -80,7 +84,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, (vht_cap->cap & IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE)) { if (bfinfo->bfer_su_cnt >= chip->bfer_su_max_num) { rtw_dbg(rtwdev, RTW_DBG_BF, "su bfer number over limit\n"); - goto out_unlock; + return; } sound_dim = vht_cap->cap & @@ -103,9 +107,6 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, rtw_chip_config_bfee(rtwdev, rtwvif, bfee, true); } - -out_unlock: - rcu_read_unlock(); } void rtw_bf_init_bfer_entry_mu(struct rtw_dev *rtwdev, diff --git a/sys/contrib/dev/rtw88/coex.c b/sys/contrib/dev/rtw88/coex.c index cac053f485c3..86467d2f8888 100644 --- a/sys/contrib/dev/rtw88/coex.c +++ b/sys/contrib/dev/rtw88/coex.c @@ -13,7 +13,7 @@ static u8 rtw_coex_next_rssi_state(struct rtw_dev *rtwdev, u8 pre_state, u8 rssi, u8 rssi_thresh) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; u8 tol = chip->rssi_tolerance; u8 next_state; @@ -36,7 +36,7 @@ static u8 rtw_coex_next_rssi_state(struct rtw_dev *rtwdev, u8 pre_state, static void rtw_coex_limited_tx(struct rtw_dev *rtwdev, bool tx_limit_en, bool ampdu_limit_en) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; u8 num_of_active_port = 1; @@ -365,7 +365,7 @@ static void rtw_coex_set_wl_pri_mask(struct rtw_dev *rtwdev, u8 bitmap, void rtw_coex_write_scbd(struct rtw_dev *rtwdev, u16 bitpos, bool set) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; u16 val = 0x2; @@ -400,7 +400,7 @@ EXPORT_SYMBOL(rtw_coex_write_scbd); static u16 rtw_coex_read_scbd(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; if (!chip->scbd_support) return 0; @@ -410,7 +410,7 @@ static u16 rtw_coex_read_scbd(struct rtw_dev *rtwdev) static void rtw_coex_check_rfk(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_rfe *coex_rfe = &coex->rfe; @@ -489,7 +489,7 @@ static void rtw_coex_monitor_bt_ctr(struct rtw_dev *rtwdev) static void rtw_coex_monitor_bt_enable(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; @@ -524,10 +524,10 @@ static void rtw_coex_monitor_bt_enable(struct rtw_dev *rtwdev) static void rtw_coex_update_wl_link_info(struct rtw_dev *rtwdev, u8 reason) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_traffic_stats *stats = &rtwdev->stats; bool is_5G = false; bool wl_busy = false; @@ -633,7 +633,7 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev, struct rtw_coex *coex = &rtwdev->coex; struct sk_buff *skb_resp = NULL; - mutex_lock(&coex->mutex); + lockdep_assert_held(&rtwdev->mutex); rtw_fw_query_bt_mp_info(rtwdev, req); @@ -650,7 +650,6 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev, } out: - mutex_unlock(&coex->mutex); return skb_resp; } @@ -706,10 +705,10 @@ static const char *rtw_coex_get_bt_status_string(u8 bt_status) static void rtw_coex_update_bt_link_info(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; - struct rtw_chip_info *chip = rtwdev->chip; u8 i; u8 rssi_state; u8 rssi_step; @@ -806,7 +805,7 @@ static void rtw_coex_update_bt_link_info(struct rtw_dev *rtwdev) static void rtw_coex_update_wl_ch_info(struct rtw_dev *rtwdev, u8 type) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; struct rtw_coex_dm *coex_dm = &rtwdev->coex.dm; struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; @@ -933,7 +932,7 @@ EXPORT_SYMBOL(rtw_coex_write_indirect_reg); static void rtw_coex_coex_ctrl_owner(struct rtw_dev *rtwdev, bool wifi_control) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; const struct rtw_hw_reg *btg_reg = chip->btg_reg; if (wifi_control) { @@ -981,7 +980,7 @@ static void rtw_coex_mimo_ps(struct rtw_dev *rtwdev, bool force, bool state) static void rtw_btc_wltoggle_table_a(struct rtw_dev *rtwdev, bool force, u8 table_case) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; u8 h2c_para[6] = {0}; u32 table_wl = 0x5a5a5a5a; @@ -1065,9 +1064,9 @@ static void rtw_coex_set_table(struct rtw_dev *rtwdev, bool force, u32 table0, static void rtw_coex_table(struct rtw_dev *rtwdev, bool force, u8 type) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_dm *coex_dm = &coex->dm; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; struct rtw_coex_stat *coex_stat = &coex->stat; @@ -1135,9 +1134,9 @@ static void rtw_coex_power_save_state(struct rtw_dev *rtwdev, u8 ps_type, static void rtw_coex_set_tdma(struct rtw_dev *rtwdev, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u8 byte5) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_dm *coex_dm = &coex->dm; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_stat *coex_stat = &coex->stat; u8 ps_type = COEX_PS_WIFI_NATIVE; bool ap_enable = false; @@ -1193,10 +1192,10 @@ static void rtw_coex_set_tdma(struct rtw_dev *rtwdev, u8 byte1, u8 byte2, static void rtw_coex_tdma(struct rtw_dev *rtwdev, bool force, u32 tcase) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_coex_stat *coex_stat = &coex->stat; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; u8 n, type; bool turn_on; @@ -1526,8 +1525,8 @@ static u8 rtw_coex_algorithm(struct rtw_dev *rtwdev) static void rtw_coex_action_coex_all_off(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -1549,11 +1548,11 @@ static void rtw_coex_action_coex_all_off(struct rtw_dev *rtwdev) static void rtw_coex_action_freerun(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 level = 0; bool bt_afh_loss = true; @@ -1594,8 +1593,8 @@ static void rtw_coex_action_freerun(struct rtw_dev *rtwdev) static void rtw_coex_action_rf4ce(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -1619,8 +1618,8 @@ static void rtw_coex_action_rf4ce(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_whql_test(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -1644,10 +1643,10 @@ static void rtw_coex_action_bt_whql_test(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_relink(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; u32 slot_type = 0; @@ -1684,11 +1683,11 @@ static void rtw_coex_action_bt_relink(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_idle(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_rfe *coex_rfe = &coex->rfe; u8 table_case = 0xff, tdma_case = 0xff; @@ -1753,10 +1752,10 @@ exit: static void rtw_coex_action_bt_inquiry(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; bool wl_hi_pri = false; u8 table_case, tdma_case; u32 slot_type = 0; @@ -1853,11 +1852,11 @@ static void rtw_coex_action_bt_inquiry(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_game_hid(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; struct rtw_coex_dm *coex_dm = &coex->dm; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -1901,10 +1900,10 @@ static void rtw_coex_action_bt_game_hid(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_hfp(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -1932,10 +1931,10 @@ static void rtw_coex_action_bt_hfp(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_hid(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; u32 slot_type = 0; bool bt_multi_link_remain = false, is_toggle_table = false; @@ -2015,11 +2014,11 @@ static void rtw_coex_action_bt_hid(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_a2dp(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; u32 slot_type = 0; @@ -2057,10 +2056,10 @@ static void rtw_coex_action_bt_a2dp(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_a2dpsink(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; bool ap_enable = false; @@ -2096,10 +2095,10 @@ static void rtw_coex_action_bt_a2dpsink(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_pan(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -2133,11 +2132,11 @@ static void rtw_coex_action_bt_pan(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_a2dp_hid(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case, interval = 0; u32 slot_type = 0; bool is_toggle_table = false; @@ -2190,10 +2189,10 @@ static void rtw_coex_action_bt_a2dp_hid(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; bool wl_cpt_test = false, bt_cpt_test = false; @@ -2247,10 +2246,10 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_pan_hid(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -2282,10 +2281,10 @@ static void rtw_coex_action_bt_pan_hid(struct rtw_dev *rtwdev) static void rtw_coex_action_bt_a2dp_pan_hid(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -2316,9 +2315,9 @@ static void rtw_coex_action_bt_a2dp_pan_hid(struct rtw_dev *rtwdev) static void rtw_coex_action_wl_under5g(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_stat *coex_stat = &coex->stat; u8 table_case, tdma_case; @@ -2348,8 +2347,8 @@ static void rtw_coex_action_wl_under5g(struct rtw_dev *rtwdev) static void rtw_coex_action_wl_only(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -2372,9 +2371,9 @@ static void rtw_coex_action_wl_only(struct rtw_dev *rtwdev) static void rtw_coex_action_wl_native_lps(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_stat *coex_stat = &coex->stat; u8 table_case, tdma_case; @@ -2411,10 +2410,10 @@ static void rtw_coex_action_wl_native_lps(struct rtw_dev *rtwdev) static void rtw_coex_action_wl_linkscan(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; u32 slot_type = 0; @@ -2451,8 +2450,8 @@ static void rtw_coex_action_wl_linkscan(struct rtw_dev *rtwdev) static void rtw_coex_action_wl_not_connected(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 table_case, tdma_case; rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__); @@ -2528,8 +2527,8 @@ static void rtw_coex_action_wl_connected(struct rtw_dev *rtwdev) static void rtw_coex_run_coex(struct rtw_dev *rtwdev, u8 reason) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_dm *coex_dm = &coex->dm; struct rtw_coex_stat *coex_stat = &coex->stat; bool rf4ce_en = false; @@ -3002,9 +3001,9 @@ void rtw_coex_media_status_notify(struct rtw_dev *rtwdev, u8 type) void rtw_coex_bt_info_notify(struct rtw_dev *rtwdev, u8 *buf, u8 length) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_dm *coex_dm = &coex->dm; u32 bt_relink_time; u8 i, rsp_source = 0, type; @@ -3270,8 +3269,8 @@ static const u8 coex_bt_hidinfo_xb[] = {0x58, 0x62, 0x6f}; void rtw_coex_bt_hid_info_notify(struct rtw_dev *rtwdev, u8 *buf, u8 length) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_hid *hidinfo; struct rtw_coex_hid_info_a *hida; @@ -3360,8 +3359,8 @@ void rtw_coex_bt_hid_info_notify(struct rtw_dev *rtwdev, u8 *buf, u8 length) void rtw_coex_query_bt_hid_list(struct rtw_dev *rtwdev) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex *coex = &rtwdev->coex; - struct rtw_chip_info *chip = rtwdev->chip; struct rtw_coex_stat *coex_stat = &coex->stat; struct rtw_coex_hid *hidinfo; u8 i, handle; @@ -3582,7 +3581,7 @@ static const char *rtw_coex_get_reason_string(u8 reason) static u8 rtw_coex_get_table_index(struct rtw_dev *rtwdev, u32 wl_reg_6c0, u32 wl_reg_6c4) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; u8 ans = 0xFF; u8 n, i; @@ -3618,8 +3617,8 @@ static u8 rtw_coex_get_table_index(struct rtw_dev *rtwdev, u32 wl_reg_6c0, static u8 rtw_coex_get_tdma_index(struct rtw_dev *rtwdev, u8 *tdma_para) { + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_efuse *efuse = &rtwdev->efuse; - struct rtw_chip_info *chip = rtwdev->chip; u8 ans = 0xFF; u8 n, i, j; u8 load_cur_tab_val; @@ -3736,7 +3735,7 @@ static int rtw_coex_val_info(struct rtw_dev *rtwdev, static void rtw_coex_set_coexinfo_hw(struct rtw_dev *rtwdev, struct seq_file *m) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; const struct rtw_reg_domain *reg; char addr_info[INFO_SIZE]; int n_addr = 0; @@ -3910,7 +3909,7 @@ static const char *rtw_coex_get_wl_coex_mode(u8 coex_wl_link_mode) void rtw_coex_display_coex_info(struct rtw_dev *rtwdev, struct seq_file *m) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; struct rtw_dm_info *dm_info = &rtwdev->dm_info; struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; @@ -4057,7 +4056,7 @@ void rtw_coex_display_coex_info(struct rtw_dev *rtwdev, struct seq_file *m) rtwdev->stats.tx_throughput, rtwdev->stats.rx_throughput); seq_printf(m, "%-40s = %u/ %u/ %u\n", "IPS/ Low Power/ PS mode", - test_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags), + !test_bit(RTW_FLAG_POWERON, rtwdev->flags), test_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags), rtwdev->lps_conf.mode); diff --git a/sys/contrib/dev/rtw88/coex.h b/sys/contrib/dev/rtw88/coex.h index 07fa7aa34d4b..57cf29da9ea4 100644 --- a/sys/contrib/dev/rtw88/coex.h +++ b/sys/contrib/dev/rtw88/coex.h @@ -327,7 +327,7 @@ struct coex_rf_para { static inline void rtw_coex_set_init(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_init(rtwdev); } @@ -335,7 +335,7 @@ static inline void rtw_coex_set_init(struct rtw_dev *rtwdev) static inline void rtw_coex_set_ant_switch(struct rtw_dev *rtwdev, u8 ctrl_type, u8 pos_type) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; if (!chip->ops->coex_set_ant_switch) return; @@ -345,28 +345,28 @@ void rtw_coex_set_ant_switch(struct rtw_dev *rtwdev, u8 ctrl_type, u8 pos_type) static inline void rtw_coex_set_gnt_fix(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_gnt_fix(rtwdev); } static inline void rtw_coex_set_gnt_debug(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_gnt_debug(rtwdev); } static inline void rtw_coex_set_rfe_type(struct rtw_dev *rtwdev) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_rfe_type(rtwdev); } static inline void rtw_coex_set_wl_tx_power(struct rtw_dev *rtwdev, u8 wl_pwr) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_wl_tx_power(rtwdev, wl_pwr); } @@ -374,7 +374,7 @@ static inline void rtw_coex_set_wl_tx_power(struct rtw_dev *rtwdev, u8 wl_pwr) static inline void rtw_coex_set_wl_rx_gain(struct rtw_dev *rtwdev, bool low_gain) { - struct rtw_chip_info *chip = rtwdev->chip; + const struct rtw_chip_info *chip = rtwdev->chip; chip->ops->coex_set_wl_rx_gain(rtwdev, low_gain); } diff --git a/sys/contrib/dev/rtw88/debug.c b/sys/contrib/dev/rtw88/debug.c index fbbd11be5eef..d745c774aa6f 100644 --- a/sys/contrib/dev/rtw88/debug.c +++ b/sys/contrib/dev/rtw88/debug.c @@ -144,7 +144,9 @@ static int rtw_debugfs_get_rf_read(struct seq_file *m, void *v) addr = debugfs_priv->rf_addr; mask = debugfs_priv->rf_mask; + mutex_lock(&rtwdev->mutex); val = rtw_read_rf(rtwdev, path, addr, mask); + mutex_unlock(&rtwdev->mutex); seq_printf(m, "rf_read path:%d addr:0x%08x mask:0x%08x val=0x%08x\n", path, addr, mask, val); @@ -181,8 +183,8 @@ static int rtw_debugfs_copy_from_user(char tmp[], int size, tmp_len = (count > size - 1 ? size - 1 : count); - if (!buffer || copy_from_user(tmp, buffer, tmp_len)) - return count; + if (copy_from_user(tmp, buffer, tmp_len)) + return -EFAULT; tmp[tmp_len] = '\0'; @@ -199,13 +201,16 @@ static ssize_t rtw_debugfs_set_read_reg(struct file *filp, char tmp[32 + 1]; u32 addr, len; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 2); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 2); + if (ret) + return ret; num = sscanf(tmp, "%x %x", &addr, &len); if (num != 2) - return count; + return -EINVAL; if (len != 1 && len != 2 && len != 4) { rtw_warn(rtwdev, "read reg setting wrong len\n"); @@ -286,8 +291,11 @@ static ssize_t rtw_debugfs_set_rsvd_page(struct file *filp, char tmp[32 + 1]; u32 offset, page_num; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 2); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 2); + if (ret) + return ret; num = sscanf(tmp, "%d %d", &offset, &page_num); @@ -312,8 +320,11 @@ static ssize_t rtw_debugfs_set_single_input(struct file *filp, char tmp[32 + 1]; u32 input; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 1); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 1); + if (ret) + return ret; num = kstrtoint(tmp, 0, &input); @@ -336,14 +347,17 @@ static ssize_t rtw_debugfs_set_write_reg(struct file *filp, char tmp[32 + 1]; u32 addr, val, len; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + if (ret) + return ret; /* write BB/MAC register */ num = sscanf(tmp, "%x %x %x", &addr, &val, &len); if (num != 3) - return count; + return -EINVAL; switch (len) { case 1: @@ -379,8 +393,11 @@ static ssize_t rtw_debugfs_set_h2c(struct file *filp, char tmp[32 + 1]; u8 param[8]; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + if (ret) + return ret; num = sscanf(tmp, "%hhx,%hhx,%hhx,%hhx,%hhx,%hhx,%hhx,%hhx", ¶m[0], ¶m[1], ¶m[2], ¶m[3], @@ -390,7 +407,9 @@ static ssize_t rtw_debugfs_set_h2c(struct file *filp, return -EINVAL; } + mutex_lock(&rtwdev->mutex); rtw_fw_h2c_cmd_dbg(rtwdev, param); + mutex_unlock(&rtwdev->mutex); return count; } @@ -404,17 +423,22 @@ static ssize_t rtw_debugfs_set_rf_write(struct file *filp, char tmp[32 + 1]; u32 path, addr, mask, val; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 4); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 4); + if (ret) + return ret; num = sscanf(tmp, "%x %x %x %x", &path, &addr, &mask, &val); if (num != 4) { rtw_warn(rtwdev, "invalid args, [path] [addr] [mask] [val]\n"); - return count; + return -EINVAL; } + mutex_lock(&rtwdev->mutex); rtw_write_rf(rtwdev, path, addr, mask, val); + mutex_unlock(&rtwdev->mutex); rtw_dbg(rtwdev, RTW_DBG_DEBUGFS, "write_rf path:%d addr:0x%08x mask:0x%08x, val:0x%08x\n", path, addr, mask, val); @@ -432,14 +456,17 @@ static ssize_t rtw_debugfs_set_rf_read(struct file *filp, char tmp[32 + 1]; u32 path, addr, mask; int num; + int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 3); + if (ret) + return ret; num = sscanf(tmp, "%x %x %x", &path, &addr, &mask); if (num != 3) { rtw_warn(rtwdev, "invalid args, [path] [addr] [mask] [val]\n"); - return count; + return -EINVAL; } debugfs_priv->rf_path = path; @@ -461,7 +488,9 @@ static ssize_t rtw_debugfs_set_fix_rate(struct file *filp, char tmp[32 + 1]; int ret; - rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 1); + ret = rtw_debugfs_copy_from_user(tmp, sizeof(tmp), buffer, count, 1); + if (ret) + return ret; ret = kstrtou8(tmp, 0, &fix_rate); if (ret) { @@ -519,6 +548,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) u32 addr, offset, data; u8 path; + mutex_lock(&rtwdev->mutex); + for (path = 0; path < rtwdev->hal.rf_path_num; path++) { seq_printf(m, "RF path:%d\n", path); for (addr = 0; addr < 0x100; addr += 4) { @@ -533,6 +564,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) seq_puts(m, "\n"); *** 7356 LINES SKIPPED *** From nobody Fri Oct 6 14:25:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gm3Wk9z4wgWY; Fri, 6 Oct 2023 14:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gm1m9yz3Rbq; Fri, 6 Oct 2023 14:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9XBO3JTT0ANK405NowSvLCLBY6SXT5R5Zzh24WdpR0=; b=AhL0JobQmR8tKZ3WsH3Di9XxE8YfJ/Sc5Wse0+EuQZdNUPX52GPrxPHm+LbI+oDyluie8+ 7BT0J/NLVp/4YfLScsFEi5OnF2JGEUIOCc6eY2ohIHfoHZ1utogxz2uGRjreRzb+CIwq5f fCmP74fbBXCjhtKecAzz2VrgVJ5uPx+yHb/HvDSftGCbBTDx0VhYs3DsMfKG6Bxto7VZND W/5oDauL1cP0NJ8Ino0V4kESw8v+Pptbvn0hizk7Z8w1MBJfuW8PSl82k56Z+kklQU1UK2 f62DqfAiFWN/5k+Ga555L4eJAkP18XnRI568pydyCzWAbJFHCZij5tr+sgcUqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602324; a=rsa-sha256; cv=none; b=b+k48RLKtHM+lFVdE3woqcZLEnacnmlJ/NwN55Te6RXQwuq0WQj6AjB37pqoAAVBNXqcS7 kWlhJsEwRmblWf1+7VbGatQcRCOmb8vmbRTw028um+Ql7QrjFOM8wj+GCExN23cUHAALks ya/AOpqFvfcwGgDS20eOyrfnYi1UngOMbzYjW45NXyUWwMrNTG4LT6YkVfqXKiRGenboiO tS49PiLETiKVCtGbxDYbToOaUv3QOCMJoh4MbwkgbGvyuSaOoP3Tr+1SQVqtEpQCi6nDXk J0EH5xhQF6HS3556RssiAtmfJAiSPkLb5RaLmkGUzamxl2UJZ2c8pUxIA4lnTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9XBO3JTT0ANK405NowSvLCLBY6SXT5R5Zzh24WdpR0=; b=S5s7X9BzQqbcDoBEc3FSMKyTcp05AX/8pI9N+9ZOIYgntC6QhbOhc9YNKlb9d4Bf8JdTGk izrQiVyXIw0vdU3n5OwuUB+88WSFVh0QFhIhZitiUItkSHY5vPW7tfcS2fD8sg43+VlFP0 wpKUyGu6uoa0ljZvBZCh6R0zv48mB24uDP/mLsBT+b3QGp1ot6qlKfzAAlv7DfNJ7gRFjK laiK7DV41x88EHSfjYnBy+HlUjegD9yz9xK70GNneXTsKZnsqQ9fsJfjV7oBxHyknjrXp7 b52PCytGBGdb/RgUllCxWxwhClhJQoF7kHw4uIRp/klMjPaqKfSW0ltX5z8hPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gm0bckzr9V; Fri, 6 Oct 2023 14:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPNtE093883; Fri, 6 Oct 2023 14:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPNQi093880; Fri, 6 Oct 2023 14:25:23 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:23 GMT Message-Id: <202310061425.396EPNQi093880@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: 7ec227367ed7 - stable/14 - iwlwifi / rtw88: re-attach to build after updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 7ec227367ed748011a97540296b0935de877cc5a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec227367ed748011a97540296b0935de877cc5a commit 7ec227367ed748011a97540296b0935de877cc5a Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 17:12:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-06 12:47:42 +0000 iwlwifi / rtw88: re-attach to build after updates While the build-breaking changes were only in a smaller window further updates restored some functionality as well. Now that we are done, add iwlwifi back to the build. Sponsored by: The FreeBSD Foundation This also adds the (updated) rtw88 driver back to the build. Functionality has not been tested (much) so might not currently work but people offered to test. (cherry picked from commit af6aaa90057d75644c41527acc903082104e4114) (cherry picked from commit 299e2d5724c2bc4929b6eac3258f04055e97992e) --- sys/modules/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 66d7c895a460..4b98c7ed6e0d 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -561,12 +561,12 @@ _mlx5ib= mlx5ib ${MACHINE_CPUARCH} == "i386" _ena= ena _gve= gve -#_iwlwifi= iwlwifi +_iwlwifi= iwlwifi .if ${MK_SOURCELESS_UCODE} != "no" _iwlwififw= iwlwififw .endif _ossl= ossl -#_rtw88= rtw88 +_rtw88= rtw88 .if ${MK_SOURCELESS_UCODE} != "no" _rtw88fw= rtw88fw .endif From nobody Fri Oct 6 14:31:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29qM3fz1z4whGJ; Fri, 6 Oct 2023 14:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29qM1b97z3Wj8; Fri, 6 Oct 2023 14:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TlNgeaMdHJrty2P4soXxbHXEPK9vpEqNlLnDLfsjOE=; b=LwNjV0c1S5GzUzj0CTqcIpIdmhsgsUfpTq2+NEQl9w33FkBXwMuDb+GBoxZDJtZKvgR9C2 hU9qRqYySEjVM8j7P+q0I4bOrbucOzPrUGHpGIIrsAM4WSYwgQem3r3rZ74aup3FdZvRGr ICaEbxGP2EC2FUQfMzqrnBynyGpOb8lv6E8oVjLeERF76Y/ZCjPz6t1Z69sgByPQtzrf9G DK4H3T6HDI3wc/ibSOYgcMVop/JDllO7ir2tVY77ZSSTe7m9PWH3QGh7/1jM/xAYEhC/+6 4wVbYBkope1VEoaPo8qdbTamveoQKTGHOkc6maei77eSpKNvM1VFXAFi0y7u+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602719; a=rsa-sha256; cv=none; b=uE9d8jRxI+hpJk/z2EEyK6jXwu1p3GJPOwp8w9Z8pQGtTpX28TOWTtd0Wowfr+zwF9hl7h E2k9MLCESRq2mXae16I5gxi90SkconrgPq0ciBrmG7w8WTh+U3AG29damaQrGjiahXWT3k 5iElQSn+IWiOgF3n0vVcDVqYgmki03tOiHTI2LNBPFfEFzM0chY5ZUiFlRxHjdYUB9EOiw lB6PCeupcoAdJBPm3U3o78SKlhqz8KPgP8epbdqAbLI+fLzfZOI7me2KG0VXke/qME8k7S OogIxULfZZdvt5s1ShdpNayihNO8zglWr23s5lxAOTD3EMmcPeKoEEwP6QwW/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TlNgeaMdHJrty2P4soXxbHXEPK9vpEqNlLnDLfsjOE=; b=qg5Mtv5PvBbUCG8MkAJoJGm8ajZ/23ViXW1QoNCxBryf0ATaM2WJm19d1EoTGCOO6R2j3M WyoHgEysgE9URIH+rLkI7XrVDSLn9OS6iwPzjrVDKGQUsFttv8D2f4iOpG6aBZbYFPDK/+ WMxyZEsNWHY+lqSIG0EIXh86UzLJU+hpsNJuqnOgxcy4x7XFNmzF2kriH0ym1qlCboV9h9 UHyz8sm5LJ89/0tmVjwdFdWZflYe/RHxlOgE/A1xvmva8WXgbhVOxjoLIOgDjVhhC2WypY +iSZt+6ShkcFM+SY886LELUE8s60/53N9YzTqsbvVjlaTJXFiaTvcqtahNdjyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29qM0gZ2zrPH; Fri, 6 Oct 2023 14:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EVwss007835; Fri, 6 Oct 2023 14:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EVwW1007832; Fri, 6 Oct 2023 14:31:58 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:31:58 GMT Message-Id: <202310061431.396EVwW1007832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: d6ae056e9dc9 - main - Extend description of -p to include interactions with -d and implying -x List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6ae056e9dc96c2db45982ac358ba9ed716a9202 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=d6ae056e9dc96c2db45982ac358ba9ed716a9202 commit d6ae056e9dc96c2db45982ac358ba9ed716a9202 Author: Benedict Reuschling AuthorDate: 2023-10-06 14:29:21 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-06 14:29:21 +0000 Extend description of -p to include interactions with -d and implying -x PR: 268052 Event: Oslo Hackathon Differential Revision: https://reviews.freebsd.org/D40595 --- bin/ps/ps.1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 23868d8b3009..c393b2e49c28 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -28,7 +28,7 @@ .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" -.Dd August 24, 2023 +.Dd October 6, 2023 .Dt PS 1 .Os .Sh NAME @@ -238,6 +238,11 @@ So the header texts for multiple keywords can be changed. If all keywords have empty header texts, no header line is written. .It Fl p Display information about processes which match the specified process IDs. +It implies the use of +.Fl x . +When combined with +.Fl d , +all descendent processes are included. .It Fl r Sort by current CPU usage, instead of the combination of controlling terminal and process ID. From nobody Fri Oct 6 15:22:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2Bx562H2z4wqCm; Fri, 6 Oct 2023 15:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2Bx55d4rz3f16; Fri, 6 Oct 2023 15:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696605721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oL8gl+5MvCajClH8ow1ciMZLhJllipEqZJNhjD5Nq/Q=; b=g5zo3Mq8G/uV1dbcX4wGg0LHT197GMD127ZHQXz9N7StEvcEY691i27f50+NnrnE8DykqM 6VYTPv+jcymY6EAhC83AdS2n2I5ggCM/IrZ2zjoJQtxq7wckVUDMjWYhtkPNTujcR/w4SX cdz/MoyeMLtw7ZVc4qWwNP4YqPRiUMBh7Y+LT4E5Qw5XrR7NCrl3hxVoggZ1jyVhc2XKu/ xx4o9BbHtRVgR81aEDs6lbWXsK2d6CxLqGWyesjven3BGqtX2+usI8fcC8NxYLW1iV/dim N6wRXf1fOJQLQ13pPtsdDXM+HpFJNwdY29N1tkxGwRk+70SOr+4ABaRjqV3Awg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696605721; a=rsa-sha256; cv=none; b=qOU4LRa+GeIHnVWbgPU3fE+8emQWC86dF8NfvszxYzubqi/l0wXzjMnatmFByPDZlAi+cO aXSZLNyECZpFsoQwhdmO+vyvqTo5EH6sfa0vmC9cyLf2peRSAiqO5zo5qo+UgETm1egeoL s3ehrWmFdLK0nW68RYGnSFxC2+Dycr6DLWyrotDx+TlQVbY9OgpmRU1wqlRpz3Vwtr4BTS fs9br6YrRtcqB0+k12U/YvNoH2WVimLkT2XbKyhawqZUDBUS8qe1lo/A91PlClg7Rj+D2u T3rtQEx5pdt4eTY3+ZybnWqZ/lOf653+KIZV7qI3tj0JwVKjtlRfi0KDYk6Amg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696605721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oL8gl+5MvCajClH8ow1ciMZLhJllipEqZJNhjD5Nq/Q=; b=DjENEjo9tdzfIzlJXK08adhg8vYDKhzL8tfSr8Uu06BmmhrvFXpt096tRq1amdj5sCX4Qq gucIGYKqXUw8Ruc1Fyk7YMYuL79TQaw9X3IZh8vgwCqp7vfo8RoEqjUbc0nRbyYm2S1Or4 1a2VJGUrC2Pbb/nJP5jYr+2QsANVg3rW3oPGSfQ8F3njPE9IXoJR+JBTajUMHyBccRtNhx HAsMCoKZ+ujkzgf//iw8KmBhyarHlP1wxgDvVe74JKOz5sBiufkkRX3BB2WllDBGTLwOip K5y1SC+qCYCVU7Muj1Yv8mAn2esPaUFLoIUS5TRXO7YN/p9DHnw7mNxmhK11vA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2Bx54c81zt9c; Fri, 6 Oct 2023 15:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396FM1sb091690; Fri, 6 Oct 2023 15:22:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396FM1dL091687; Fri, 6 Oct 2023 15:22:01 GMT (envelope-from git) Date: Fri, 6 Oct 2023 15:22:01 GMT Message-Id: <202310061522.396FM1dL091687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 7bf5f682c073 - main - Improve the pf nat exhaustion test by checking the reply from the echo server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bf5f682c073fe271b159964f8f17eb2ac8590b3 Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=7bf5f682c073fe271b159964f8f17eb2ac8590b3 commit 7bf5f682c073fe271b159964f8f17eb2ac8590b3 Author: Brad Davis AuthorDate: 2023-10-06 15:19:51 +0000 Commit: Brad Davis CommitDate: 2023-10-06 15:19:51 +0000 Improve the pf nat exhaustion test by checking the reply from the echo server Event: Oslo Hackathon Approved by: kp --- tests/sys/netpfil/pf/nat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 4ceded782cfb..7cc0d8f35c96 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -61,8 +61,8 @@ exhaust_body() # Sanity check atf_check -s exit:0 -o ignore ping -c 3 198.51.100.2 - echo "foo" | nc -N 198.51.100.2 7 - echo "foo" | nc -N 198.51.100.2 7 + atf_check -s exit:0 -o match:foo* echo "foo" | nc -N 198.51.100.2 7 + atf_check -s exit:0 -o match:foo* echo "foo" | nc -N 198.51.100.2 7 # This one will fail, but that's expected echo "foo" | nc -N 198.51.100.2 7 & From nobody Fri Oct 6 16:05:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2CvB3bRpz4wx3M; Fri, 6 Oct 2023 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2CvB36qfz4H4G; Fri, 6 Oct 2023 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696608326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+Xr4Kv0GBun5N4x3H3caDtM3+CTw6DmiVH+kBZ3+Gk=; b=E/JFYfTG5Hc+YQPWLPdZ5UQmLjndudHiQxORDv4ZJpOS70kKMEkMyj16oXR6kuogc9FxSp LUDXuYdFDJMdS05geI4yM999KaSrpkyBuTlOfcjIOjRAkRvLitUP2BAuHzIjtzUCQLaahP bZD0+l/HaRT8eEcuIPbuct2OV0qUDw461pJbgcxJGl2jqfyTi90NrsxYH3t+JVU2akA7Qd iQwdKpjK4oHDILl8SkMifjVCHJpAUxo1vaZ2d30vE3Nkhj1Tq5aLlAzvylpC+hujC0wzbV HnMDxIxtzIeYCOxUOLRwlo1AOd5uv3DjatQWfz1/Ogpofp/R+8/JuA2BpvDzag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696608326; a=rsa-sha256; cv=none; b=WbUtW6CCsPkyL7T4XEtwUBa3lT3zFU4XhfaiNMw9ziJv6TGOIn2tHMjAN6FisD37zWlvcG 0Xkfmdzneb/PV7W80j6pqZrEY1nkVYtu7XThA6Ns/e2AAxfM/PtMcwGM+yxJaLl07gn3eB qicsaXVA13ZBIZlN1Z5pku2XQfwjM7osk7GhUgKz3AfxUWRomTJ/VEDVpNajmpvhBSYUGe sdDt0sHFomSXA2Ac4Xxo4eKABzoEGdR1uVyu2gfFfI3/HdRpdmzbI7tXucgvY6Aussnc4M tkj9i/LvMvhCQJbpcWrfsC3DGU9RbjAYwWI/3jphHP4e29t8kPxTlgR7vJi2ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696608326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+Xr4Kv0GBun5N4x3H3caDtM3+CTw6DmiVH+kBZ3+Gk=; b=c2eUTaauelUulRd3fQ/stYy6hG4iINY/cwGeNselQkiQgdl8pNsLgiILKmK1h9g1MW8nwP JV2v5n58puw0ieNA8apo7qSnnV4FEk7HKJk7kBUXoTHsZ7EO970cZE2ADC0Bg0Qy7DCzQN euxZeiA4WQ9YZMI6NCTy+hX7nUFHt6bqfT8Rh6S7NIiqV1tZAmMQLjGGQT6TnGs60nTDcE Wdtzp155OIIUcHBSVd7NxM+40OyFDv1gVGbT2rAuXTX1IbfGTyogFDco+m+tKNx1yr5a+y xt6fFLHpN494qloCjoFsuZrMj+8Nk4nMsmFU2p7rzndJaQeBsQ2S1LQOVZFZLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2CvB297tzvN7; Fri, 6 Oct 2023 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396G5QMX060846; Fri, 6 Oct 2023 16:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396G5QBJ060843; Fri, 6 Oct 2023 16:05:26 GMT (envelope-from git) Date: Fri, 6 Oct 2023 16:05:26 GMT Message-Id: <202310061605.396G5QBJ060843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: a5bebe4359ef - main - geom.4: Document kern.geom.notaste sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5bebe4359ef3f80f592dcc989b4088f18abb939 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=a5bebe4359ef3f80f592dcc989b4088f18abb939 commit a5bebe4359ef3f80f592dcc989b4088f18abb939 Author: Felix Johnson AuthorDate: 2023-10-06 15:58:32 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-06 16:02:49 +0000 geom.4: Document kern.geom.notaste sysctl Reported by: jdc_koitsu.org PR: 254897 Approved by: des Event: Oslo Hackathon Differential Revision: https://reviews.freebsd.org/D42109 --- share/man/man4/geom.4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4 index c7f5f7e5250a..c0f3bb23499d 100644 --- a/share/man/man4/geom.4 +++ b/share/man/man4/geom.4 @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 26, 2023 +.Dd October 6, 2023 .Dt GEOM 4 .Os .Sh NAME @@ -226,6 +226,12 @@ Examine the rank number of the provider's geom. .It Examine the method name of the provider's geom. .El +.Pp +Tasting is controlled by the +.Va kern.geom.notaste +sysctl. +To disable tasting, set the sysctl to 1, to +re-enable tasting, set the sysctl to 0. .It Em ORPHANIZATION is the process by which a provider is removed while it potentially is still being used. From nobody Fri Oct 6 16:16:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2D841nSTz4wyn2; Fri, 6 Oct 2023 16:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2D836ChWz4KtN; Fri, 6 Oct 2023 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696608995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSeMzntKrKJM2gp1OJkar78dYATkug8CSzy7PFSQCR0=; b=efTDbWQOCAWDFDKX09iVA0kdt2NEUXoWqAMZGbOUuTc0sAyjUx1l6E4VZBAE5IC6am/s7X cEh3+VvZsqWvCnFrgtQifM1bhDvnwpbYH4Vxjuj1NRvWfGViqsAtRXFaJUVcS5yXBuokHZ /X50gAfya/r6HudNmuQR7Bz9CBQcOCftpFDMZn/u/u/NPFrNLi3G86hlqUq/hx8xU1vBr5 2eNqqZGqmhchbOy2vtN5wN4m71A8jaupgg5hWGjFqJT4u+5adXOLH19h+g6JpjskCQYD05 x52r+QctpWas0ykW20J2qtJrZyGM2F5X52Xc71Yxu1UYFIVu9KNwUIZlT1BYNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696608995; a=rsa-sha256; cv=none; b=Y+jK8kytKd6Cg4K6IlsOIM/5XE3KtFp4ImEbMx+YZF8nv8NQtPf9yJO857whkxw17mf+VZ EMO3g44FhVLJnJUOpIheqHCohyDx8XA4x44e3Q8t38LjuvhkkytW2+pLev6GsBhrYByKjU MEMyTYjky7WMYyohCf7qfyb0WFmrjI0CokoSodRtK9mQAtqoVdq+158/6ZGkb7HZKD/E5e Lcmk+HTJ5RocOxIwaFnhbh0nfK80HVse2N7LAJvL4S/2d/j3ixQjbeHbQXc4hQuEqykxN2 hTM2j6X121jRv+UaIZw4H+6tVXE2KTkLAN/5BcLxW0gf5vRUBeo3FA05tJPLgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696608995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSeMzntKrKJM2gp1OJkar78dYATkug8CSzy7PFSQCR0=; b=nVUY6sk2sRCSwPD/DGUlEVtnMIuriKA91c5M9gCYV2NCq4osLwarWscV85ZzoKfGjuk1PQ NJBLsiswIEEzH6+ZzbSACP+ttjvRDERZeeN18TMHYGSpNw/PTzcD67S7wluXhkktcSmml/ ZR08fU4sAw+Rq+RZMK3NDX7AJ4aHrHkknjff0f5X/bCzyJJjxjABkZG/RqkmVuy3lC898o 52HvyPKoOXIsMXPAA2zebz80VtCtOlP5Yq6vsdBBH9xzoVTfhhjJc5PloKU5BHtdpsBAqn LAOor87mmyEzUj3iSvNLuDs1+jFXjfarkFymdtOvllflpD9KJtX15NrhXIPGFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2D835HBLzvjW; Fri, 6 Oct 2023 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396GGZMo077095; Fri, 6 Oct 2023 16:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396GGZho077093; Fri, 6 Oct 2023 16:16:35 GMT (envelope-from git) Date: Fri, 6 Oct 2023 16:16:35 GMT Message-Id: <202310061616.396GGZho077093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 7ce98cf2f87a - main - pfctl: fix incorrect mask on dynamic address List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ce98cf2f87a22240b66e4c38fd887431a25bf7d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7ce98cf2f87a22240b66e4c38fd887431a25bf7d commit 7ce98cf2f87a22240b66e4c38fd887431a25bf7d Author: Kristof Provost AuthorDate: 2023-10-06 12:20:17 +0000 Commit: Kristof Provost CommitDate: 2023-10-06 16:11:28 +0000 pfctl: fix incorrect mask on dynamic address A PF rule using an IPv4 address followed by an IPv6 address and then a dynamic address, e.g. "pass from {192.0.2.1 2001:db8::1} to (pppoe0)", will have an incorrect /32 mask applied to the dynamic address. MFC after: 3 weeks Obtained from: OpenBSD See also: https://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/007_pfctl.patch.sig Sponsored by: Rubicon Communications, LLC ("Netgate") Event: Oslo Hackathon at Modirum --- sbin/pfctl/parse.y | 39 +++++++++++++++++++++++++++++++++++- sbin/pfctl/pfctl_parser.c | 30 ++++++++++++++++++++++----- sbin/pfctl/pfctl_parser.h | 1 + sbin/pfctl/tests/files/pf0102.ok | 4 ++-- sbin/pfctl/tests/files/pf1018.in | 1 + sbin/pfctl/tests/files/pf1018.ok | 2 ++ sbin/pfctl/tests/pfctl_test_list.inc | 1 + 7 files changed, 70 insertions(+), 8 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 041dcb0587b3..17227b674814 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -4720,6 +4720,10 @@ natrule : nataction interface af proto fromto tag tagged rtable remove_invalid_hosts(&$9->host, &r.af); if (invalid_redirect($9->host, r.af)) YYERROR; + if ($9->host->addr.type == PF_ADDR_DYNIFTL) { + if (($9->host = gen_dynnode($9->host, r.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9->host, r.af)) YYERROR; @@ -4936,6 +4940,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($8->addr.type == PF_ADDR_DYNIFTL) { + if (($8 = gen_dynnode($8, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($8, binat.af)) YYERROR; memcpy(&binat.src.addr, &$8->addr, @@ -4951,6 +4959,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($9->addr.type == PF_ADDR_DYNIFTL) { + if (($9 = gen_dynnode($9, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9, binat.af)) YYERROR; memcpy(&binat.dst.addr, &$9->addr, @@ -4980,6 +4992,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag "a single address"); YYERROR; } + if ($13->host->addr.type == PF_ADDR_DYNIFTL) { + if (($13->host = gen_dynnode($13->host, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($13->host, binat.af)) YYERROR; @@ -5982,7 +5998,7 @@ expand_rule(struct pfctl_rule *r, char tagname[PF_TAG_NAME_SIZE]; char match_tagname[PF_TAG_NAME_SIZE]; struct pf_pooladdr *pa; - struct node_host *h; + struct node_host *h, *osrch, *odsth; u_int8_t flags, flagset, keep_state; memcpy(label, r->label, sizeof(r->label)); @@ -6043,6 +6059,18 @@ expand_rule(struct pfctl_rule *r, sizeof(r->match_tagname)) >= sizeof(r->match_tagname)) errx(1, "expand_rule: strlcpy"); + osrch = odsth = NULL; + if (src_host->addr.type == PF_ADDR_DYNIFTL) { + osrch = src_host; + if ((src_host = gen_dynnode(src_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + if (dst_host->addr.type == PF_ADDR_DYNIFTL) { + odsth = dst_host; + if ((dst_host = gen_dynnode(dst_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + error += check_netmask(src_host, r->af); error += check_netmask(dst_host, r->af); @@ -6121,6 +6149,15 @@ expand_rule(struct pfctl_rule *r, added++; } + if (osrch && src_host->addr.type == PF_ADDR_DYNIFTL) { + free(src_host); + src_host = osrch; + } + if (odsth && dst_host->addr.type == PF_ADDR_DYNIFTL) { + free(dst_host); + dst_host = odsth; + } + )))))))))); FREE_LIST(struct node_if, interfaces); diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 936c5ec53759..925848055bba 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1306,16 +1306,12 @@ int check_netmask(struct node_host *h, sa_family_t af) { struct node_host *n = NULL; - struct pf_addr *m; + struct pf_addr *m; for (n = h; n != NULL; n = n->next) { if (h->addr.type == PF_ADDR_TABLE) continue; m = &h->addr.v.a.mask; - /* fix up netmask for dynaddr */ - if (af == AF_INET && h->addr.type == PF_ADDR_DYNIFTL && - unmask(m, AF_INET6) > 32) - set_ipmask(n, 32); /* netmasks > 32 bit are invalid on v4 */ if (af == AF_INET && (m->addr32[1] || m->addr32[2] || m->addr32[3])) { @@ -1327,6 +1323,30 @@ check_netmask(struct node_host *h, sa_family_t af) return (0); } +struct node_host * +gen_dynnode(struct node_host *h, sa_family_t af) +{ + struct node_host *n; + struct pf_addr *m; + + if (h->addr.type != PF_ADDR_DYNIFTL) + return (NULL); + + if ((n = calloc(1, sizeof(*n))) == NULL) + return (NULL); + bcopy(h, n, sizeof(*n)); + n->ifname = NULL; + n->next = NULL; + n->tail = NULL; + + /* fix up netmask */ + m = &n->addr.v.a.mask; + if (af == AF_INET && unmask(m, AF_INET6) > 32) + set_ipmask(n, 32); + + return (n); +} + /* interface lookup routines */ static struct node_host *iftab; diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 83a4880106a8..d0f3bc3c303c 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -360,6 +360,7 @@ extern const struct pf_timeout pf_timeouts[]; void set_ipmask(struct node_host *, u_int8_t); int check_netmask(struct node_host *, sa_family_t); int unmask(struct pf_addr *, sa_family_t); +struct node_host *gen_dynnode(struct node_host *, sa_family_t); void ifa_load(void); int get_query_socket(void); struct node_host *ifa_exists(char *); diff --git a/sbin/pfctl/tests/files/pf0102.ok b/sbin/pfctl/tests/files/pf0102.ok index 3233ca5a2643..1c76ec2725ba 100644 --- a/sbin/pfctl/tests/files/pf0102.ok +++ b/sbin/pfctl/tests/files/pf0102.ok @@ -1,8 +1,8 @@ pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self) flags S/SA keep state pass inet6 from 2002:: to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state diff --git a/sbin/pfctl/tests/files/pf1018.in b/sbin/pfctl/tests/files/pf1018.in new file mode 100644 index 000000000000..90f0a3a0bab7 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.in @@ -0,0 +1 @@ +pass from { 192.0.2.1 2001:db8::1 } to (pppoe0) diff --git a/sbin/pfctl/tests/files/pf1018.ok b/sbin/pfctl/tests/files/pf1018.ok new file mode 100644 index 000000000000..04950f0035b8 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.ok @@ -0,0 +1,2 @@ +pass inet from 192.0.2.1 to (pppoe0) flags S/SA keep state +pass inet6 from 2001:db8::1 to (pppoe0) flags S/SA keep state diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index 98ea3257d492..4a63c0ba48b7 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -126,3 +126,4 @@ PFCTL_TEST(1014, "Ethernet rule with one label") PFCTL_TEST(1015, "Ethernet rule with several labels") PFCTL_TEST(1016, "Ethernet rule with ridentifier and one label") PFCTL_TEST(1017, "Ethernet rule with ridentifier and several labels") +PFCTL_TEST(1018, "Test dynamic address mask") From nobody Fri Oct 6 16:31:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2DTl3Plkz4x1rR; Fri, 6 Oct 2023 16:31:55 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2DTl2yHTz4P1h; Fri, 6 Oct 2023 16:31:55 +0000 (UTC) (envelope-from pstef@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696609915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Phf2Xa6c9WzEk0lV+zfJcE04601MGJS2cb93FD6F0E0=; b=Al0q3SVP0lupdcQMtszEoivQ+RLGXjXA9M8lIrv41tQaauMn7N6izsjhHmRmwbO7AIHRwQ PXPSmNa1OnilHK6HPAIA+qSWs2uE6HVgCuCtUiVLlKOk2azev1+S2z32GfG3yj31DClAbG U0tdBDXGoXLq6z/Xc8wdJu4l2vzmwVXamPGqBxyTRJOUg07SdIEM30c4OjogxkHypgJo11 jffJRhJjK+I/5cDfzVOb3vGz/Q8neLw5WwFLzxxp4tKhRzVQLdsbgduOPnHS1OvjYdcjh1 t2gX4wV3GEHXAer8mbMqSaRxhj39AksKHwZaAYgGcBtikxfIgPajxNGQNvbHhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696609915; a=rsa-sha256; cv=none; b=r9+xSgLMTs0n2c7KNgYjKVeHQDPbtcDruXLOut1ZduwIyuU6hsv7Zc07ZIvSDgLxWQjUy+ JBxS83CjGw0edS+O6U+gZRZdiatHDMmBCC1WcjYMtWDbhRlYImEbTGUEOUY4KRAB88Ygr5 TwN3ZAJjwOLOXTDiAdvn34OQ/BXrhqW3lsPbFZANxvGhTU+BwAdahAsqSdM7Rd1Vbs3Uly Omly7nHNvIdk590rtq4K6BC98YhHMy0iAPR2Bfp4HbuJYTIizFo9BuclB9zWakWLG+iKEt ktNfDWR4WvkParvcPAWnZKh3AAZ9/rspveUjG55GupGoZbIFce5YrXYue678eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696609915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Phf2Xa6c9WzEk0lV+zfJcE04601MGJS2cb93FD6F0E0=; b=w/5tFeYBwVpyWrtutHMbSYX5aj/weteBo3CBL5XhaHroVKk8R0WHavs0wNKIn8Hix6VRhc bmEFE9U+x23ZMRnm97aZF5c6d/x9FWK75MoQkO7iJ8pXGmXB7K+NS7yYxpcxSPNx8G8O8y OBORT5jxBJ2V4TfyakfadigxhcAfK7HyNQC6oPAfJ07E/giEd2yU69RgiubpJhu84RZF+D QHZhk+wYwJ+9n2STA/BEIixgHWoSkQ1UDSCOsvf8p/9qHD5A4GExE3BH6Z+S3/HAcwHgLU NdyLkpK8ptObvo/CBIZftB2xWcULq/37V+BBWHhIyXDMARO6A+fmb/r8m15aNQ== Received: by freefall.freebsd.org (Postfix, from userid 1403) id 4435B1DA93; Fri, 6 Oct 2023 16:31:55 +0000 (UTC) Date: Fri, 6 Oct 2023 16:31:55 +0000 From: "Piotr P. Stefaniak" To: Benedict Reuschling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d6ae056e9dc9 - main - Extend description of -p to include interactions with -d and implying -x Message-ID: References: <202310061431.396EVwW1007832@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202310061431.396EVwW1007832@gitrepo.freebsd.org> On 2023-10-06 14:31:58, Benedict Reuschling wrote: > Extend description of -p to include interactions with -d and implying -x > > PR: 268052 > Event: Oslo Hackathon > Differential Revision: https://reviews.freebsd.org/D40595 Sorry, but that's been changed, see https://reviews.freebsd.org/D41231 and the email thread under https://lists.freebsd.org/archives/freebsd-current/2023-July/004071.html Piotr From nobody Fri Oct 6 16:40:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2DgV2BkGz4x2jV; Fri, 6 Oct 2023 16:40:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2DgV1jt1z4Q3q; Fri, 6 Oct 2023 16:40:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696610422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mEt3l7/EpXOarg5/VthYedOktwGrzv1CC6N0fV7zooQ=; b=VCTJTpqd2Aba7FhMxUsYmVL5Rxrp7vjEomLzTBzRdnI+6VZ7EN7v7548IIbE2c8mSJd/yB HcsuKhwprxFvJKJ2Zy5lFyMsVViUkr1m7jKcZIcxRnclpcThrnfMe51DCc0uI/nd5Bf6RC X6+IFaobl0fnrVPICK1x3F6YN9S0JmY0YibNFOsRNXCxV5eDEJ9ATS1GiztTp7EjLbkG3y y9F0ITxMPWr4nV3A2MWPpXWJnaXJrmWqXB1epXKUf02Lrlrq9z+efkivUOaxnq1HZ8GFUG KOpeya7KO1qGh3ZXCIUxJNwXbD62vu+kMuUBukAD8y6Zj5JO2wWbRuEBZxuU/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696610422; a=rsa-sha256; cv=none; b=aoJ026ac7XNcbQHgLNAeif66VTVLclyCSEwQ3z3ClIE1zcsxjs8gCZWgyGMEAOl1vmbDom +P1S5vtEe9gG5q9mguq+EC4fVJ2F45c1y6a/4bvl7VIhJr9EiJZBKxKfOsF/r51SYhZinS eIqDsjCLpwliexXolz88XM67gc4UtgDJbc5W42sRlKn9bG8vK/gXU+gAC8GIYv7iM8y2LM ZPrcQhk3JUP/ja07XP+k4tmZXhVf9E5gxmuYlyS5CYyu7J8SbGxnbowkkApI+Q8j6lv8gu VwwkyGlYTGIsucjF+VRCuy385a/hxnSQXhSDQM+rVutUnr5/DJoBIlNWjelQmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696610422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mEt3l7/EpXOarg5/VthYedOktwGrzv1CC6N0fV7zooQ=; b=H9OJhcgFjkOnlVLy1tR7AQOnEjl7SSxsG06Sr/QsN7PtPh2lKb6QNaYSlBfZzOV6NB0Mc6 Pap40tE8MMXIPD0rBv1hImq5TSoURvOCmURSLU0tA3JYor1PioTgrJL4+bVJmtX8Mj22tK HeFLdfIZFGy9YrGx+bq6XUlh287idkn/DPivBXIPVmz0XUMysD5EJXR/xg0WuzdHBhV/16 d4rrQK1uuUmzu7Oddnpdse9/c9XJjFwCQe+UIJ+zX8+PG1fMzKmD9MShFSkZqZ+jn48WZD TkAPsd3WadW9VtsBQyp0ap+NCo0roOHP3TSFAW1OEOSJ3yAxMCIJhApNTV23Fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2DgV0dDTzvwY; Fri, 6 Oct 2023 16:40:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396GeMhD019250; Fri, 6 Oct 2023 16:40:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396GeMZ9019247; Fri, 6 Oct 2023 16:40:22 GMT (envelope-from git) Date: Fri, 6 Oct 2023 16:40:22 GMT Message-Id: <202310061640.396GeMZ9019247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: aad8fb3e2be2 - main - tests: Add a test case for arp host lookups. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aad8fb3e2be27ed3a04531aa01913ab4b7616244 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aad8fb3e2be27ed3a04531aa01913ab4b7616244 commit aad8fb3e2be27ed3a04531aa01913ab4b7616244 Author: Dag-Erling Smørgrav AuthorDate: 2023-10-06 16:39:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-06 16:39:59 +0000 tests: Add a test case for arp host lookups. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D42108 --- tests/sys/netinet/arp.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netinet/arp.sh b/tests/sys/netinet/arp.sh index 045ccd1dc7a7..9181d38b10b0 100755 --- a/tests/sys/netinet/arp.sh +++ b/tests/sys/netinet/arp.sh @@ -120,12 +120,61 @@ pending_delete_if_cleanup() { } +atf_test_case "arp_lookup_host" "cleanup" +arp_lookup_host_head() { + atf_set descr 'Test looking up a specific host' + atf_set require.user root +} + +arp_lookup_host_body() { + + vnet_init + + jname="v4t-arp_lookup_host" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname}a ${epair0}a + vnet_mkjail ${jname}b ${epair0}b + + ipa=198.51.100.1 + ipb=198.51.100.2 + + atf_check -o ignore \ + ifconfig -j ${jname}a ${epair0}a inet ${ipa}/24 + atf_check -o ignore \ + ifconfig -j ${jname}b ${epair0}b inet ${ipb}/24 + + # get jail b's MAC address + eth="$(ifconfig -j ${jname}b ${epair0}b | + sed -nE "s/^\tether ([0-9a-f:]*)$/\1/p")" + + # no entry yet + atf_check -s exit:1 -o match:"\(${ipb}\) -- no entry" \ + jexec ${jname}a arp -n ${ipb} + + # now ping jail b from jail a + atf_check -o ignore \ + jexec ${jname}a ping -c1 ${ipb} + + # should be populated + atf_check -o match:"\(${ipb}\) at $eth on ${epair0}a" \ + jexec ${jname}a arp -n ${ipb} + +} + +arp_lookup_host_cleanup() { + vnet_cleanup +} + + atf_init_test_cases() { atf_add_test_case "arp_add_success" atf_add_test_case "arp_del_success" atf_add_test_case "pending_delete_if" + atf_add_test_case "arp_lookup_host" } # end From nobody Fri Oct 6 16:40:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2DgW3WnWz4x2XL; Fri, 6 Oct 2023 16:40:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2DgW2lpKz4QSR; Fri, 6 Oct 2023 16:40:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696610423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2YMgFsBueVdIUF+NtJw5K00qkcFw1Ess5WSkvTB5Ao=; b=d46I7hLxmhGnzlxZTRVKphHdT9N9c/zO86UU7Xq/hslsRlMSyYQWYuQa7XkgjXHZZtusvq bklTubpypW9A8BJguoWQxBvrbiMif7jMbD30/EXuNzzG3vCFkPTijDCh1ZqSFZW0zF4QAB /y2Yy9+Rk1UbV38AH+2B/p9xoiVltS14vwmXyj/rjuP/ksLx94e0qUsYCwbiRXxpe0DbDj T93jh02HaQZJOCuVXlROH8Mkqc8wlYCVbswFFdgU/c7Us62hthCn/1Fttyf9UKX6ewnlrJ U7P2Iv0WgD4ZDRkbtBcIIGXc02kS1wGBv9+fOmXZ4Ngc9++7+j6RN8H4Au5cew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696610423; a=rsa-sha256; cv=none; b=S/HhdCh5eyi2plfoy67tdzbFtMkLx8RoLNmHfJeNxbkwvzolPq6IfqqPta2Bw4FY/KLC+X 8q74IfBrzUtXyiB2wgtYFwmNRCm/mEEL0oZjdYSpVvGRqxAjzmgV6Npfn/9SeRdS0nqmss CktGY2FbbenLLMczu/QK4/nLZqmwsl3k+gHvAWDoF8yUbYu+gFH9ic5DBNEzHIPutnrYiW vEg+9lD45jZhguJoYil+Q1xCTJ3ga5BH47nPiFrMdoz0nJPGT/F0M/BdhN5WnqI6QIyfHd XtBwk0jfIdEIjRFWON/mq0RZYvjjZyPIWqf7hzgq/1KwLw9RJcbOsgu8lsb3Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696610423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2YMgFsBueVdIUF+NtJw5K00qkcFw1Ess5WSkvTB5Ao=; b=aWcfFLEa7FE/ET8KerB9PoogkWK88KjvnInnpgsjZpHLSYAZWziZYm0Rv+iHs2vZlWKiof VSnAOexcXYLk/jIKpFTfnHAET9j4q8AOz3NX9q5wvf1zttp8XKOlI6+YyN4ElF7zaZbJY+ VN67W7nChKa4Lm+3umMCYQYvS7N7wgj6M30aee0WJ+0TWklpdHtEpKcRuiAx1MkbjOJxCM YO9A6rk8ODeBcnHTbarvIz/4Ro19iCy2rcspLwm5j+USusrk15Zg/sMrjmGOx7qSTXpEZ7 vOYbC2irPlRJ5wToH6Ccbx0U2ZMeYfl5BOZGHy6mVktGeE74zKk2OmyXmrUbAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2DgW1mPTzvt3; Fri, 6 Oct 2023 16:40:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396GeNnU019319; Fri, 6 Oct 2023 16:40:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396GeNkY019316; Fri, 6 Oct 2023 16:40:23 GMT (envelope-from git) Date: Fri, 6 Oct 2023 16:40:23 GMT Message-Id: <202310061640.396GeNkY019316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c5e5722220e0 - main - tests: Use ifconfig -j instead of jexec ifconfig. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e5722220e091737c70ef4b6571480ad4188fed Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e5722220e091737c70ef4b6571480ad4188fed commit c5e5722220e091737c70ef4b6571480ad4188fed Author: Dag-Erling Smørgrav AuthorDate: 2023-10-06 16:40:07 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-06 16:40:07 +0000 tests: Use ifconfig -j instead of jexec ifconfig. Reviewed by: kp, asomers Differential Revision: https://reviews.freebsd.org/D42110 --- tests/sys/common/vnet.subr | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 50abadaec81d..183f7284d614 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -79,7 +79,7 @@ vnet_ifrename_jail() ifname=$2 ifnewname=$3 - jexec ${jailname} ifconfig $ifname name $ifnewname + ifconfig -j ${jailname} $ifname name $ifnewname sed -i "" "/^${jailname}/s/${ifname}/${ifnewname}/" created_jails.lst } @@ -88,7 +88,7 @@ vnet_cleanup() if [ -f created_jails.lst ]; then while read jailname ifnames; do for ifname in ${ifnames}; do - jexec ${jailname} ifconfig ${ifname} destroy + ifconfig -j ${jailname} ${ifname} destroy done jail -r ${jailname} done < created_jails.lst @@ -96,10 +96,9 @@ vnet_cleanup() fi if [ -f created_interfaces.lst ]; then - for ifname in `cat created_interfaces.lst` - do + while read ifname; do ifconfig ${ifname} destroy - done + done < created_interfaces.lst rm created_interfaces.lst fi } From nobody Fri Oct 6 16:45:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2Dn12p4Qz4x3cp; Fri, 6 Oct 2023 16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2Dn12HJmz4SBQ; Fri, 6 Oct 2023 16: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=1696610709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA04pzFro5bq44lmiconX3kwNgBUco2jMwAjV9NQkCI=; b=LZrcCun3JP/PuAkdi/B71Xv68ingZjrLU9H92PFo3o9gkTRqn7wQzuoVs2fWwnM/aVZTXh 8HTa0OwWyv70JeLGd6BGTl9Voq0M9Fi+a2r59I7n6tGFpzR8JwBpFUpbR5rJwyEO2u92MG uEoUz08xX6yoDx25NfcHmET2iA74lL1Mq028vkqkQbdRCq12mG/hUhoZ+4WUJ+JdV+ygxU rZ9L1GYKtPNjiW3z2trrlQPyiHVi0hJZHibZsxJHT1Ue1wfhXJtX89nJqt7eZlkacex4Cj /7Ew6wwpVnbcvi5W0f+dk98vPdpdzqFOjKejUXVxBzHmHSmKn5eKARG+YCGDEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696610709; a=rsa-sha256; cv=none; b=yGZjW7HXCjttzvWDb6BhU7q0l5LQ1ioNT89FY+SP8tq01bREpsYpWFAC19pq0mfxU/chf4 GAqDDMdP2bOtHwGJ2HaVxL6G9yuJ0uxorKfF9d/uaLfRoVmPg4pQANc7vsukZmw+E+pfyv cuu9pdPo8/fELGZ20Vo1QlksXA1cMiNIHxbB79p+woHd/GDNZAd7lchg5MUiPpR+rUjI9g AeB1IiKe8zHzgKI/+TASK2kRZpJGojJxg9NrgNp9rBx506UlsCN11rZwtAa7nSEXGhPW/4 iICdcduEe869c52atZZLHWb0ixfdwUcT8M9Zm0zvT2G1owlVhKI7AV6kaqpNTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696610709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA04pzFro5bq44lmiconX3kwNgBUco2jMwAjV9NQkCI=; b=hgFVEGLyDQf1nPADz0dn/dPyfLWPiUss2HCtarW/Kl83S5/NolNGGAE9rOYoJCWbQkfXtK dHo3gSLyU2zVsamoDszLUKNyWyUZ4VaL/NnIY2u8QUOfpe8XeDggldnDljmoiQF0cd3vBv p/fDBU07P+ZyoKqOrTE6+OmwRdJimbz5xvK8PIjvf/ev8X5cLfUIZWSNNDxBEdmy0hd1qB NFVKO59SWscVEu8gwInxZMuVrts++XZl2sp8PEbZurwT5jnayIPSXVpVrWceSmPeihtB9K gVbRQOVgar895xeMHztTbpbfYQiyMreiwfx6XXm0GuUwvB8JgDWZDSApaVx/jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2Dn11NHxzw3D; Fri, 6 Oct 2023 16:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396Gj9GR026913; Fri, 6 Oct 2023 16:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396Gj9PH026910; Fri, 6 Oct 2023 16:45:09 GMT (envelope-from git) Date: Fri, 6 Oct 2023 16:45:09 GMT Message-Id: <202310061645.396Gj9PH026910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: cec8e6ba64cc - main - daemon: Disable stdio buffering. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cec8e6ba64ccab7fb0d9fa531ebad9228233334d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cec8e6ba64ccab7fb0d9fa531ebad9228233334d commit cec8e6ba64ccab7fb0d9fa531ebad9228233334d Author: Dag-Erling Smørgrav AuthorDate: 2023-10-06 16:44:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-06 16:44:52 +0000 daemon: Disable stdio buffering. The daemon utility already does its own buffering and retransmits its child's output line by line. There's no need for stdio to add its own buffering on top of this. MFC after: 1 week Sponsored by: Modirum MDPay Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D42111 --- usr.sbin/daemon/daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index dfbb609ce10d..65e6bb7ca190 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -420,6 +420,7 @@ daemon_eventloop(struct daemon_state *state) close(state->pipe_fd[1]); state->pipe_fd[1] = -1; setproctitle("%s[%d]", state->title, (int)state->pid); + setbuf(stdout, NULL); while (state->mode != MODE_NOCHILD) { ret = kevent(kq, NULL, 0, &event, 1, NULL); From nobody Fri Oct 6 17:05:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2FF416l1z4x68g; Fri, 6 Oct 2023 17:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2FF40dJDz4VwK; Fri, 6 Oct 2023 17:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QA74JIT4LioNZkuww4fp2WyEwe4KXKfWwC9hlyqm5rk=; b=iXP87pRbX9B8WZ9zRkgRGuHkSUnDJfRporQtuwHH386A6UPopouXZX2xhQU9jMkaaKAZ4e xpPAJhYH/OrN4r0ed3qxGIbpmPjn7KhzKSnk8MWqFSkIeIdCo86tS+7Mc3QTju+UOrNrc4 bIYE/JeJRGxv4WRydpsUFt+Jou5DWhCEh593T45YTOk0sd1pX6tNkz3dv8pZhEYZWySf9N SI+ZYjDF04wyx+grzSkSnIXDsYActOs1TGaKmCnpo/SWy9d1RyszYiejB2T36QiJuq1HkH fCM4v1Lc+THuP/HqiNZXuyPJWxh/Sop5JLR5BTx1jXiFvzKODQ+zX2E0XReG2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696611960; a=rsa-sha256; cv=none; b=iakOLe981vF0o8Ix1+oilkRuymjGe05dN/RLdmY++Y3CFmJpkEm96IqYHxOjVUpMjT5Iad ZmzIL7xRxTI0mqy6wxJD4p+OdSCWKg3ak+78mjtFJSggWZrn8/VfCLELksskZv4GhH89nl wtbHx0VJ/t7BbQ77Xum7rohbAOl3N6yCDObhzVVzC5fOkFj+xMDLB0qNytfB8jA1t4KcQu U1dISvXtiXQPMkLZwBWDh9y37oRfZqPh9iHebqXeaKaL+VUSp5llqQfgHH4Ul/Q1Q3lG4/ TlxxeEgAdj9ic4dtvfsOxfLMdDqzLAsxMCDWodv81LZnIFnfD5pmIPZddHh0yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QA74JIT4LioNZkuww4fp2WyEwe4KXKfWwC9hlyqm5rk=; b=FqbhHVVXukXKuieFlafaBwclCvUPIyOlIwmLahT3eUNFM9PCSrUh5K0iX2Wei3YWiytMWb spOAq4oJX93j3arw0KybOxjdPtctE4Yd3u9L/CxJQcdu7p2GLYeLnIgoGvFvUOpfLRLxQ9 JnBPODfOlsUcTJL4DQlLVyOpZs/5yMhoWi0xWPU7IzCxfv0LMOMuqyEqN9CMLaDzL2Yipv O4iTDe/FO4j4hsJpk1S5OGe5+3t5UY3WEQVmozITvSUGXdUwwDCAVSmtGABV2nH8HHQwnX iBuvwWyCf+5bobycm+ccee2024XRT4nphD4Gp1hDC7R23qQ2mqm57bhq+jww9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2FF36p8mzwpH; Fri, 6 Oct 2023 17:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396H5xc6060655; Fri, 6 Oct 2023 17:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396H5xjI060652; Fri, 6 Oct 2023 17:05:59 GMT (envelope-from git) Date: Fri, 6 Oct 2023 17:05:59 GMT Message-Id: <202310061705.396H5xjI060652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 7786911ffd1f - main - dwc: Rewrite part of the descriptors setup functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7786911ffd1f7c6eec0334a06bf9ec1bc14540d3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7786911ffd1f7c6eec0334a06bf9ec1bc14540d3 commit 7786911ffd1f7c6eec0334a06bf9ec1bc14540d3 Author: Emmanuel Vadot AuthorDate: 2023-10-05 17:10:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-06 17:05:37 +0000 dwc: Rewrite part of the descriptors setup functions - Add a txdesc_clear which clears the tx desc instead of doing that in dwc_setup_txdesc based on arguments. - Remove dwc_set_owner, in the end we always set the owner of the desc as we do it for id > 0 and then for the first one. - Remove dwc_ prefix No functional changes intended. --- sys/dev/dwc/dwc1000_dma.c | 68 +++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 7c5924296894..f6baa0bd3e45 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -182,50 +182,47 @@ dwc_get1paddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) } inline static void -dwc_set_owner(struct dwc_softc *sc, int idx) +txdesc_clear(struct dwc_softc *sc, int idx) { - wmb(); - sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; - wmb(); + + sc->tx_desccount--; + sc->txdesc_ring[idx].addr1 = (uint32_t)(0); + sc->txdesc_ring[idx].desc0 = 0; + sc->txdesc_ring[idx].desc1 = 0; } inline static void -dwc_setup_txdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr, +txdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr, uint32_t len, uint32_t flags, bool first, bool last) { uint32_t desc0, desc1; - /* Addr/len 0 means we're clearing the descriptor after xmit done. */ - if (paddr == 0 || len == 0) { + if (!sc->dma_ext_desc) { desc0 = 0; - desc1 = 0; - --sc->tx_desccount; + desc1 = NTDESC1_TCH | len | flags; + if (first) + desc1 |= NTDESC1_FS; + if (last) + desc1 |= NTDESC1_LS | NTDESC1_IC; } else { - if (!sc->dma_ext_desc) { - desc0 = 0; - desc1 = NTDESC1_TCH | len | flags; - if (first) - desc1 |= NTDESC1_FS; - if (last) - desc1 |= NTDESC1_LS | NTDESC1_IC; - } else { - desc0 = ETDESC0_TCH | flags; - if (first) - desc0 |= ETDESC0_FS; - if (last) - desc0 |= ETDESC0_LS | ETDESC0_IC; - desc1 = len; - } - ++sc->tx_desccount; - } - + desc0 = ETDESC0_TCH | flags; + if (first) + desc0 |= ETDESC0_FS; + if (last) + desc0 |= ETDESC0_LS | ETDESC0_IC; + desc1 = len; + } + ++sc->tx_desccount; sc->txdesc_ring[idx].addr1 = (uint32_t)(paddr); sc->txdesc_ring[idx].desc0 = desc0; sc->txdesc_ring[idx].desc1 = desc1; + wmb(); + sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; + wmb(); } inline static uint32_t -dwc_setup_rxdesc(struct dwc_softc *sc, int idx, bus_addr_t paddr) +rxdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr) { uint32_t nidx; @@ -254,7 +251,7 @@ dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp) struct mbuf * m; uint32_t flags = 0; int i; - int first, last; + int last; error = bus_dmamap_load_mbuf_sg(sc->txbuf_tag, sc->txbuf_map[idx].map, *mp, segs, &nsegs, 0); @@ -299,23 +296,18 @@ dma1000_setup_txbuf(struct dwc_softc *sc, int idx, struct mbuf **mp) sc->txbuf_map[idx].mbuf = m; - first = sc->tx_desc_head; for (i = 0; i < nsegs; i++) { - dwc_setup_txdesc(sc, sc->tx_desc_head, + txdesc_setup(sc, sc->tx_desc_head, segs[i].ds_addr, segs[i].ds_len, (i == 0) ? flags : 0, /* only first desc needs flags */ (i == 0), (i == nsegs - 1)); - if (i > 0) - dwc_set_owner(sc, sc->tx_desc_head); last = sc->tx_desc_head; sc->tx_desc_head = next_txidx(sc, sc->tx_desc_head); } sc->txbuf_map[idx].last_desc_idx = last; - dwc_set_owner(sc, first); - return (0); } @@ -338,7 +330,7 @@ dma1000_setup_rxbuf(struct dwc_softc *sc, int idx, struct mbuf *m) BUS_DMASYNC_PREREAD); sc->rxbuf_map[idx].mbuf = m; - dwc_setup_rxdesc(sc, idx, seg.ds_addr); + rxdesc_setup(sc, idx, seg.ds_addr); return (0); } @@ -463,7 +455,7 @@ dma1000_txfinish_locked(struct dwc_softc *sc) bmap->mbuf = NULL; sc->tx_mapcount--; while (sc->tx_desc_tail != last_idx) { - dwc_setup_txdesc(sc, sc->tx_desc_tail, 0, 0, 0, false, false); + txdesc_clear(sc, sc->tx_desc_tail); sc->tx_desc_tail = next_txidx(sc, sc->tx_desc_tail); } sc->tx_map_tail = next_txidx(sc, sc->tx_map_tail); @@ -730,7 +722,7 @@ dma1000_init(struct dwc_softc *sc) } for (idx = 0; idx < TX_DESC_COUNT; idx++) - dwc_setup_txdesc(sc, idx, 0, 0, 0, false, false); + txdesc_clear(sc, idx); WRITE4(sc, TX_DESCR_LIST_ADDR, sc->txdesc_ring_paddr); From nobody Fri Oct 6 17:06:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2FF533xgz4x6HQ; Fri, 6 Oct 2023 17:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2FF52QpSz4WG9; Fri, 6 Oct 2023 17:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tSnB0a1Vl1X9qLMF5WIFIWiPyVXkhmKXnutyV8tqwpA=; b=nd/C7UYUmVFAg6/VyHnoztr2YCcald+dWcC33N9RQqCSoYlQK1jbI34kE9AYBRbEdrocLv WJMIcSdjp3foPMAYYlDLEQTmiqKzdXOKX2pH7f8qa23KhzcJJby/vj1iaYE5wBCsLCeoPL 3hPla0nXwQ2u3ReolMEeepGnM5tA0V9EY856yAY+Gu0fFuoIyxnzZgcyC0tcbmlvu0yLYP uZby5xBrT7Ge6tmxxnGfuHjK2cpaT6IUQWhSFkbRvHdTV68cvenDxt/hmAuj3kDrF5nXwH sQIsrbNAZmQkC8pUvH+tpP2QpqjxvVR7KJR3VLtKNIrAkmn58tMZ7P9995r3SA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696611961; a=rsa-sha256; cv=none; b=E9ADifn7uMv7tqeX4o9W4F8plQMkxxRPU2DfnQ/uGK7usObW5aVAn/6Vs6UvzUypht1Mjl 6wEagrEHubHDd/c1S//5FYmwaVMtKZtdXvt0sip78WzJKPGa9XZaF/16eFfARcv+p3r+nY W7/YQBwZ7f+Ws9OcrIXRISC+rtSe0q+8D4ClWPk3Ny90v65UB9NWnONRPdo6LRsOY3VBTp vOlRqnI5em3HiMO/SHb7SmxX+X4fs/5LHn/kKkv+KScqHz9Z1ezeaR0A2+CGOZ/eb73nol 1F+kMjS0s4aMNsBmU4WXVEiMuvHwn0pouDD5btU4YVpgvZfodVYEmK1G47SzIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tSnB0a1Vl1X9qLMF5WIFIWiPyVXkhmKXnutyV8tqwpA=; b=xmRbHLMelVx4sUW49LU/zEhgP1H/rM/1hrTVyoGuTzS+QQ7Vjv9sGcgkC359ThIve9/iY9 S3wX5KjVHuzcaBUsp9pWLCQVKRvUq9yxbYkPzZa8Ybl/hvUYyuQopTVNMhvY+I6Fc1HvcL nBDT/DlIzkg0WEtPjs1zDD1qac/E9+fS3ix/Mb4xhBXZfEhFUmXGI3m43QJbmsqKoC85gl LHxwDp6nInYvlV0VQjU7ezzXkRD6UJxe8Inp0dJeNrznCPqqS8xswN0eyOPcW1RpCIK/jj W9JyMOnn74/ZxxpMzamldt7b69thoqSAeHGlR0WsxH5hLUyidmgZm+OwYJ068g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2FF50wJjzwpJ; Fri, 6 Oct 2023 17:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396H61Q8060712; Fri, 6 Oct 2023 17:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396H615W060709; Fri, 6 Oct 2023 17:06:01 GMT (envelope-from git) Date: Fri, 6 Oct 2023 17:06:01 GMT Message-Id: <202310061706.396H615W060709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 7854d0f6584d - main - dwc: Get the mii clock after calling IF_DWC_INIT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7854d0f6584d259fd7f13595e3d3a4f157db9339 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7854d0f6584d259fd7f13595e3d3a4f157db9339 commit 7854d0f6584d259fd7f13595e3d3a4f157db9339 Author: Emmanuel Vadot AuthorDate: 2023-10-06 15:43:09 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-06 17:05:40 +0000 dwc: Get the mii clock after calling IF_DWC_INIT We need to calculate it based on the clocks and they aren't started before IF_DWC_INIT. --- sys/dev/dwc/if_dwc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index ffcf3e8d6afd..d212c2db131f 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -504,7 +504,6 @@ dwc_attach(device_t dev) sc->rx_idx = 0; sc->tx_desccount = TX_DESC_COUNT; sc->tx_mapcount = 0; - sc->mii_clk = IF_DWC_MII_CLK(dev); sc->node = ofw_bus_get_node(dev); sc->phy_mode = mii_fdt_get_contype(sc->node); @@ -552,6 +551,11 @@ dwc_attach(device_t dev) if (IF_DWC_INIT(dev) != 0) return (ENXIO); + if ((sc->mii_clk = IF_DWC_MII_CLK(dev)) < 0) { + device_printf(dev, "Cannot get mii clock value %d\n", -sc->mii_clk); + return (ENXIO); + } + if (bus_alloc_resources(dev, dwc_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); From nobody Fri Oct 6 17:06:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2FF63RxKz4x6CD; Fri, 6 Oct 2023 17:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2FF62ttBz4WK4; Fri, 6 Oct 2023 17:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gryxDZJtkT+LSBZdVNfxUjmZB7kEBIYK5ZeKzGXivZI=; b=mISUTfFo+X5d3CSJOs9WVjLjWDd6ntFP5A8R2johw+hz58nLg/3eSmd2LzHvQj909bH67w P6/EdBF60xcGb/q516LE62J8H/CsAKFwuAtCnysoqMRFJ+PVKFEKoqoNxAfEh6WELi5pmc c/UQ1VwU3/32jorOnGrFAC63HDMRv7UNZGIDeNXeK4q2K9L3Sqmel3SQHfibEUJadrtSEJ wNaivbudRcAyk8nGkRljn7EL2qYUe38Pg5VbLkGXLX362DkQ1ZJLQSAF5dgCYirQwuMdI4 2rqQflAAMbPeil4nxJXGBoQbNannUZouaMkGQcTIjZ/dLMQBDac/2UXa6qtpvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696611962; a=rsa-sha256; cv=none; b=BuEzdHk+ORTA9IhUde53S+CgmaBKFNhV04S58n3uSMWw2aDdPDt4geqUPTrk1i9nsa+aPk h7yiBp/0kFhb2T+LitXinSiQjp9oT/7TwEOyh5WiSLvFTzLELQ2ZKt/i+bc+mjlaVtPJeT Hl35ADs2Bqlfi9k+P9GzQfANpFd56C+uHBzXYxMMDyHBCDTc0+fK0c7Hd10JTjV3zfngj4 w7A4PpaNH++rxtXuBOWiawiHJpFloVBURCvsFHxNvgQEIGFs4fz853TomQEAqnhsadVEnw Bw7lT5UgqfUEq4oy2SgR0LPvZ1olF5yxXh+y92vvUEEVZPtfRpAIFlROVv6tLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gryxDZJtkT+LSBZdVNfxUjmZB7kEBIYK5ZeKzGXivZI=; b=TYFiT2OUwNE/DaZT36hWS5qZYjXfO771d1Bclu7LSp08ORgt0Fb2XJPqvRzgDQHW33ORGW TxwWuEsGKLwE2CdV0InVCYbiRPO88zIXddDaxR2zT90UPGqvMXEIqEzjy6taAcfzrN2OOT 1X+HCUjU6gzUuN3JoV+eWLrVjUlEJZpu6zJ09IN0Q/Uujr/CdWpMPweE1/aVLHV3cdno4l weP2ZrObiTkEyaVz6I46/Iq1V+g+rlyGHetYpyz+IAxX8Vo392UZoxkY//BcvyBQgxiiEn UDoRs7w3R/veBNLFRxM7EllPs+72a3beFQ6Jc6kgim//afg2Q44e6/xKp8K2hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2FF61swWzx0q; Fri, 6 Oct 2023 17:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396H62pj060766; Fri, 6 Oct 2023 17:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396H62a5060763; Fri, 6 Oct 2023 17:06:02 GMT (envelope-from git) Date: Fri, 6 Oct 2023 17:06:02 GMT Message-Id: <202310061706.396H62a5060763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: cf037a17c7c8 - main - dwc: rockchip: Properly calculate mii clock based on pclk_mac List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf037a17c7c81e8a2e73c89eb90877f2625749d7 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cf037a17c7c81e8a2e73c89eb90877f2625749d7 commit cf037a17c7c81e8a2e73c89eb90877f2625749d7 Author: Emmanuel Vadot AuthorDate: 2023-10-06 15:44:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-06 17:05:43 +0000 dwc: rockchip: Properly calculate mii clock based on pclk_mac --- sys/dev/dwc/if_dwc_rk.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 43d4e4847c62..257d80bd1e59 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -581,9 +581,29 @@ if_dwc_rk_init(device_t dev) static int if_dwc_rk_mii_clk(device_t dev) { + struct if_dwc_rk_softc *sc; + uint64_t freq; + int rv; - /* Should be calculated from the clock */ - return (GMAC_MII_CLK_150_250M_DIV102); + sc = device_get_softc(dev); + if ((rv = clk_get_freq(sc->pclk_mac, &freq)) != 0) + return (-rv); + freq = freq / 1000 / 1000; + + if (freq >= 60 && freq <= 100) + return (GMAC_MII_CLK_60_100M_DIV42); + else if (freq >= 100 && freq <= 150) + return (GMAC_MII_CLK_100_150M_DIV62); + else if (freq >= 20 && freq <= 35) + return (GMAC_MII_CLK_25_35M_DIV16); + else if (freq >= 35 && freq <= 60) + return (GMAC_MII_CLK_35_60M_DIV26); + else if (freq >= 150 && freq <= 250) + return (GMAC_MII_CLK_150_250M_DIV102); + else if (freq >= 250 && freq <= 300) + return (GMAC_MII_CLK_250_300M_DIV124); + + return (-ERANGE); } static int From nobody Fri Oct 6 17:06:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2FF742Ffz4x5wW; Fri, 6 Oct 2023 17:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2FF73L6kz4Wcn; Fri, 6 Oct 2023 17:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JRM3YLLsm/Yd9Yet1biAFpkL9uwJKnKXX1v6+VIU5YA=; b=TbbNh5xlE9us9bodfHo4qsbQ73YsrlNAn2yubr8tyYgO0O3rO8agp9lIrgwJTDRXAF9262 f8Uk0JZmuQurGCmUcQBSFe5CORFSIPFWg6kGbNqC+75Lv6Auli7+gviGlipuD+TQ5x5qQo OReBHygU7jmtGWSc1f2MdaF58GIRulK6+pHX65zqp4sVMDmuyr7+Tf4KZ0rFgvNgFwvHVh TbaQOoJ0snO18KY+78LedyK92cqbxU/3XkIulEkC2thxr+k6Uvje042NUmcbwCZj7S1afe WVA8sTGNyBjwsLc0brv6Fnei9L1vZAxwibGNOj7hoDko0itKiyYN0tFT8xuyDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696611963; a=rsa-sha256; cv=none; b=n0PTFc+bZKJz5glfHKBPNsW1sHbh6j9gUzvOGOlhcFHWPFLE256E6OC6Vb0Gl1J/6iBMlV 1liNv8Spv4FJt/6ZaQSyiZHZx4cJl8z4xdVLv1PLDK/gzTq+DXBrTFSyj0Z8wnwID1Fh+w 2YaywvExh9qeGJ4ltqYeTeWFmqWVd7DX7UMIWXCLPZQ4IP5EcxSL0couKQIpAyygdFN8G/ 5byBqUhftyQh7SgD3HwkJnQJDoCJHLp272xr/hFwndJgdyB1iAu6Zt2SaQIMV+p6iq9cwQ li+bImbh9U3KdLCLbWRyeQ2fs7Oj5/4qi8eWe5s2jMpMRccDf1HW7xel+vFe1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696611963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JRM3YLLsm/Yd9Yet1biAFpkL9uwJKnKXX1v6+VIU5YA=; b=JpRIt+ITaDhEFybyfuZNKWKyQtBNWgX0yNvLLCbjjojjI5H9OIIlYfaGEIOpzrRkbIGrO4 x32QFWVG4VvYgHfiJ7BLJSRxgZplQCY2KtIoLBE75nD9+ZKjtbeoi08MoYwjqA4PWsxcGz /QUELd6k1q624qngr1HwjsdxH2IRkf2JBc9OvIz3m3kNDEpEQ+K/9ZjPQEf1Sb2ND6VFyv ODz/ah42ewsaFsgRZylfkLwfo+z9OZyt0c5OPqRDPz2giJtQopgTEn1FgiRzxmlzcdFlTA DnilUGyMRZaTJkPBrtXJTKue2dwXdwOA1OFPW/bCKSsT/VDrUdiMMy1vCGtxIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2FF72F8YzwjN; Fri, 6 Oct 2023 17:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396H63ql060811; Fri, 6 Oct 2023 17:06:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396H63in060807; Fri, 6 Oct 2023 17:06:03 GMT (envelope-from git) Date: Fri, 6 Oct 2023 17:06:03 GMT Message-Id: <202310061706.396H63in060807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 38cbdae33b7c - main - dwc: Rewrite barrier part List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38cbdae33b7c3f772845c06f52b86c0ddeab6a17 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=38cbdae33b7c3f772845c06f52b86c0ddeab6a17 commit 38cbdae33b7c3f772845c06f52b86c0ddeab6a17 Author: Emmanuel Vadot AuthorDate: 2023-10-06 16:04:49 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-06 17:05:45 +0000 dwc: Rewrite barrier part We only need a barrier after writing the OWN bit so everything is coherent for the DMA engine. --- sys/dev/dwc/dwc1000_dma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index f6baa0bd3e45..4f8ae088305a 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -216,7 +216,6 @@ txdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr, sc->txdesc_ring[idx].addr1 = (uint32_t)(paddr); sc->txdesc_ring[idx].desc0 = desc0; sc->txdesc_ring[idx].desc1 = desc1; - wmb(); sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; wmb(); } @@ -237,7 +236,6 @@ rxdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr) sc->rxdesc_ring[idx].desc1 = ERDESC1_RCH | MIN(MCLBYTES, ERDESC1_RBS1_MASK); - wmb(); sc->rxdesc_ring[idx].desc0 = RDESC0_OWN; wmb(); return (nidx); @@ -524,7 +522,6 @@ dma1000_rxfinish_locked(struct dwc_softc *sc) m = dwc_rxfinish_one(sc, desc, sc->rxbuf_map + idx); if (m == NULL) { - wmb(); desc->desc0 = RDESC0_OWN; wmb(); } else { From nobody Fri Oct 6 19:29:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2JR013lPz4wJDb; Fri, 6 Oct 2023 19:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2JR00bznz3PPd; Fri, 6 Oct 2023 19:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696620588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nHngIWPzrO+RyAbxpSyzBAigTWh1MpkvWp5u5ZlNRHg=; b=syIa6tV/OEA72YV/SN7PYyxRYlzgi2pIByRYZJSlt8kN/Ex3RsWsTBepVMAcRN44pFGV1K FhPHy0+IzIA8r56cHXNweSJJP+xgMeolp0Def+VlHFU9vE2rnX7p3RM67dh2vdYBpwfmc9 85lwYNOwJEAkOhs+PGkUnWaWvfjZSBwgnl8FG/MmJ/fH//vBySeoXWJyGpj1MnvCwTY+kM idzpBTFW3kGBFtHXMiEhk6SvSCq7rSA+wk/7TobVeGendtt/cy9cCEeDk3YhPXo6m2iIO9 z84g3LPc0FcuX4kM11FNSiJzyTk7jn5saESIxwQfJuVDWzYMr14tbBuqTF545A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696620588; a=rsa-sha256; cv=none; b=NxKzMQVL8KpST7py+I4m2f3DyOv6o7MrQvdKrYyGmt6B4SkmnwNsTPOdiCfT+VHoHGgwGB cusIgi0nXLJgWKvJgcQxDoG8qZLsC64aVy5dAAyvuBlpUNmMhUBqcjSwU+dee4NPf0xNyf JYyMdtWwbQU8exgiPd1M9TH8RGRgKsFBSR6vh/b0uGxrKgSScl1ugEqabnX7GtSKJOdewT ASOl+CrkNo5qIrfUglpmn9OMWbP9NcuzLdlHMAk8J1J2knoYvhL7E9d+jBn77YUVJQJ3tF JWxZFdOj2Sil/qZtfi6u3bHazUERRclX1Wnl/qbkjyGGPZ05iNsAltwhlmLSPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696620588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nHngIWPzrO+RyAbxpSyzBAigTWh1MpkvWp5u5ZlNRHg=; b=czGWHL4Lf589b1D785JVlc9xk87+zStiGx6TinHuqA5yu2DsIDRzV3ZEpTgHOlDrWg02Kf UfugHypJyfjyHwQ+UVN8uMXEeKMBdnL99oagq/tRNEAyDffi51xzxlUAcGWz4XeO1dm5Xy 7dqC94Bzn9chyFUFqKVE/uqbu3O10gRj8D0GAYefWj5jYoXlrCC9NLraal2M6IeGCAOXCF w9K4+Be9bLy3onAz4FI9B3TeBjbtwTOA/WUwMweoGXWJ5Zor47I8Ve/ZZZgX1ekh5mpMyu 31X/66TZdYz0dFnZh7GKLFiQ/gCYhdzX5cgzSRxJRTpwiW0d5yU+XO5caH2Gtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2JQz6gxQz11Mb; Fri, 6 Oct 2023 19:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396JTl7t093973; Fri, 6 Oct 2023 19:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396JTlYt093970; Fri, 6 Oct 2023 19:29:47 GMT (envelope-from git) Date: Fri, 6 Oct 2023 19:29:47 GMT Message-Id: <202310061929.396JTlYt093970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 03205a8cd57f - main - i2c: rtc: Add module for hym8563 driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03205a8cd57feb95752142d899d026ff8f45f3e6 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=03205a8cd57feb95752142d899d026ff8f45f3e6 commit 03205a8cd57feb95752142d899d026ff8f45f3e6 Author: Emmanuel Vadot AuthorDate: 2023-10-06 19:20:00 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-06 19:29:38 +0000 i2c: rtc: Add module for hym8563 driver It's used in the nanopi-r5s --- sys/modules/i2c/Makefile | 3 ++- sys/modules/i2c/hym8563/Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index abbb390b0e07..6c976e9303f1 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -28,7 +28,8 @@ SUBDIR = \ smbus \ .if !empty(OPT_FDT) -SUBDIR += rv3032 \ +SUBDIR += hym8563 \ + rv3032 \ rx8803 \ tca64xx \ tmp461 diff --git a/sys/modules/i2c/hym8563/Makefile b/sys/modules/i2c/hym8563/Makefile new file mode 100644 index 000000000000..e64190887610 --- /dev/null +++ b/sys/modules/i2c/hym8563/Makefile @@ -0,0 +1,13 @@ + +.PATH: ${SRCTOP}/sys/dev/iicbus/rtc +KMOD= hym8563 +SRCS= hym8563.c + +SRCS+= bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + ofw_bus_if.h + +.include From nobody Fri Oct 6 19:57:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2K3J3Pj9z4wNYv; Fri, 6 Oct 2023 19:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2K3J2wSCz3Svf; Fri, 6 Oct 2023 19:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696622268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPQ8W7xbbyVGpuiNL8yg7cLAco9NxJCZ2deMrPdpjSg=; b=O3busy3H/6m915msF6vIyaLmj91AHfLDCAp2ntpqrDcbjsggFl21WAxIr1wN2HIBZ9VHuH hxtPJx2x5rc1Ig/tlxXADNLlpDXrvORIALlgmwkVnVurcJvnOaVw2fowLZxQxo86X6t13U VdGoHwQqbJxVdSgT0ieb2ivKrW7YrjF9ZL7xlLuDSNHkDx0VLeHZMSgSX9pbdsCmazWqou YUZJV9qqMswzKBJYXpzaFs8BLcjYRwB8yT1y0jk5qpcphSoffVrPI2zGPC7DhdgN+StEjT WSHwWcUXUlNfPn6zs/5NbugwgfsEK7NNiefn8QOIaBMGJ6JSCPiwvn4yNnOP9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696622268; a=rsa-sha256; cv=none; b=eQzlKPlYDb2+gU768SXvfbGVI9Rba54nx4/Hf+AKyoqQAh8VD3lK6PXvV4J1SAiPUpMSkU rZHAJXMxb8jMWVtOr2ZoG4OdHqHnfbWz7sZ4ZUOu8ZqKp0p2fRp8+1wSw51My6Krq1IZjE np8eyMO0OmWWHj3hzRwNP19gW3pz9jLCVdU6bhmk+1NKcaC/YV2VlskXvSQMgc68cAMwcE lBbzl8HzS3ZSIGjWg9gjEivMTdCwMNBnoWV9w4P3VKxLaNT3gd0JZqhB7ZaJZ91FkWEmZL Oj4FjMafTl6k5KiGRCC9IBPJzdC1nfdcsKrnsvZemuIGkk1K6uhLpObtVW7nzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696622268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPQ8W7xbbyVGpuiNL8yg7cLAco9NxJCZ2deMrPdpjSg=; b=Vgyc0dgftRwRBV9FN6s4ceJQjoYQ4BRMvyzcFTsj0wWkvcZrs6CESFf56q2fRPY9k3s0KJ /dghEXNbPh0B9dAy3Bl/8BD8XUcmp4fgn+kwBLvLhfolHGFLkyFlX2Xl0mc9juVA0xbokL EX80U2PlNYvO1ylt5TvU3a1kwKr588EW1xzm3atLOcrhAuohhdFq//qagJvGEo2tdiRgR2 +S8RYqnOB2+PpDiZ6/FwYVwvV7KY5PDfnvrVghusXY4bUXiCGiLdnEDaWg8aeKAptl1Yc5 ct1804JLWsLfB9Y7+zmFlrPjnGjDaFuqmMMnihGTohWR2MPgRkgBBBCdLxOWfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2K3J1tByz11BD; Fri, 6 Oct 2023 19:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396JvmDL043323; Fri, 6 Oct 2023 19:57:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396JvmS8043320; Fri, 6 Oct 2023 19:57:48 GMT (envelope-from git) Date: Fri, 6 Oct 2023 19:57:48 GMT Message-Id: <202310061957.396JvmS8043320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 86885b186898 - main - Fix intermittency in the sys.fs.fusefs.mknod.main test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86885b18689889e9b9142fd31d8c67f21334ba32 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=86885b18689889e9b9142fd31d8c67f21334ba32 commit 86885b18689889e9b9142fd31d8c67f21334ba32 Author: Alan Somers AuthorDate: 2023-10-06 19:46:42 +0000 Commit: Alan Somers CommitDate: 2023-10-06 19:57:38 +0000 Fix intermittency in the sys.fs.fusefs.mknod.main test In the Mknod.parent_inode test case, the kernel sends an extra FUSE_FORGET message. But because it gets sent asynchronously with the failing syscall, it doesn't always get received before the test ends. So we never setup an expectation for it. And 90+% of the time the test would exit successfully. Fix the intermittency by always waiting to receive the FUSE_FORGET message. MFC after: 2 weeks Sponsored by: Axcient --- tests/sys/fs/fusefs/mknod.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/sys/fs/fusefs/mknod.cc b/tests/sys/fs/fusefs/mknod.cc index 223d38f8acb1..1fb855f44f29 100644 --- a/tests/sys/fs/fusefs/mknod.cc +++ b/tests/sys/fs/fusefs/mknod.cc @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include } #include "mockfs.hh" @@ -255,14 +256,18 @@ TEST_F(Mknod, parent_inode) const char RELPATH[] = "some_node"; mode_t mode = S_IFSOCK | 0755; struct sockaddr_un sa; + sem_t sem; int fd; dev_t rdev = -1; /* Really it's a don't care */ uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_mknod(ino, RELPATH, ino, mode, rdev); + expect_forget(ino, 1, &sem); fd = socket(AF_UNIX, SOCK_STREAM, 0); ASSERT_LE(0, fd) << strerror(errno); @@ -273,6 +278,8 @@ TEST_F(Mknod, parent_inode) ASSERT_EQ(EIO, errno); leak(fd); + sem_wait(&sem); + sem_destroy(&sem); } /* From nobody Fri Oct 6 20:44:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2L5g3PTTz4wWCH; Fri, 6 Oct 2023 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2L5g1qCBz3ZDK; Fri, 6 Oct 2023 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696625095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3wF+RLTyyttD1tw6qnHZO9TWMizIruXYgQX7hcTY+0=; b=arvFQIabFmjjWZrctsfh8d9j/BLqdgXRZzL99OCbqzs/+A9OhKrKHC+8cO3NuymxuSjd5U 9qknthnC0tYET7c0GZO4gFz6Vi9jRGiSXJhBzTPtq6xjhAVnvz4imSIwCzdRlRt3dUEwyE 0KzcNpYkp9kaGj/4S+Cb1MszOFpGN0P6QuoORKT64ebifPE++qeW/a9ONVGtu49tcpzG0n VWAL008xxm6CrH0+WyMYpMjSY4Gb/VROrlWDFyUU6xL239CFYGM4lmN5qsKu4RftEstiqu K3Lgd/RBjlXwqbzuu1ZsxJvjwRsl1XlqVJ42DelsaBFa7PRRyyJEF+KOkF4LcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696625095; a=rsa-sha256; cv=none; b=sJTi+vUR9OTddzuX/89ROJX+9U/ap3uKKQ9b+BDNvHtwXyjSv6Q1cd+xqqnFE+YT7qb/tu 9pUL1rqb7m3StnyBi+7/fAPl7VuGPBx8HZcXCAv8XeBslGPZfAPZXjEaPGkXhGoDe28SYe oEHMkYYUGSp13C5jLRacqPY0dGH9UavYSqWP5I5UebHf812I40jC5qzIV9SRSVWHMOYYv8 37sq7XTnn8k8slpvNA5Rclr42Uykq6MkXmB5qQBmFFMcIqit2enp+3i0TrmoNfnGwu3dKa UTgQPt/1QMYPsNi5FpKzA+g/KNz+Fq3UF/du2K7OfnkuD/MSgJUkPraAozN5tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696625095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3wF+RLTyyttD1tw6qnHZO9TWMizIruXYgQX7hcTY+0=; b=NvXIp7KsAMvcN4vZ6WSZnNJ207zo1dh7uTo2N93uqg6XOZBHa+NfSPxzJEzyU8rErAtFpL kbSXz62VQeA/kb8o8aC+jZPoMhNqRaJKjCxJFminYEISCZowIaQemIPdQPdROLCRyYGEM2 mJRzdSrs0aEkwj11xPqrqO2IaCOXqA7BhVEWHITbiXTibVNZ0UE08N8zST1lfGA6pz08V5 TOUD4iRtalJLGCm7oCNymtcGi3ng6Re14ZSG8674GJHiW3XprznA1IzaaO2Kloc+BO1rFe hvsVbX9AWhQgYaHXXKWsliIge/j3ta+6v4nCr0wkn2Ie8W/nrwKTYIZnxoOGtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2L5g0cSdz130h; Fri, 6 Oct 2023 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396KisZZ025450; Fri, 6 Oct 2023 20:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396KisdI025447; Fri, 6 Oct 2023 20:44:54 GMT (envelope-from git) Date: Fri, 6 Oct 2023 20:44:54 GMT Message-Id: <202310062044.396KisdI025447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a2b289608d6b - main - mitigations.7: briefly explain RELRO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2b289608d6b54b6e1ce85096560807e551bb5ac Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a2b289608d6b54b6e1ce85096560807e551bb5ac commit a2b289608d6b54b6e1ce85096560807e551bb5ac Author: Ed Maste AuthorDate: 2023-10-06 14:37:55 +0000 Commit: Ed Maste CommitDate: 2023-10-06 20:44:07 +0000 mitigations.7: briefly explain RELRO Reviewed by: bcr (earlier), kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42107 --- share/man/man7/mitigations.7 | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 index 8023f094d678..fed16d7b325f 100644 --- a/share/man/man7/mitigations.7 +++ b/share/man/man7/mitigations.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 5, 2023 +.Dd October 6, 2023 .Dt MITIGATIONS 7 .Os .Sh NAME @@ -50,10 +50,10 @@ Position Independent Executable (PIE) Write XOR Execute page protection policy .It .Dv PROT_MAX -".It -"Read-Only Relocation (RELRO) -.\".It -.\"Bind Now +.It +Relocation Read-Only (RELRO) +.It +Bind Now .\".It .\"Stack Smashing Protection (SSP) .\".It @@ -192,8 +192,25 @@ may be made writable by a future .Xr mprotect call, but may not be made executable. .\" -.\".Ss Read-Only Relocation (RELRO) -.\" +.Ss Relocation Read-Only (RELRO) +Relocation Read-Only (RELRO) is a mitigation tool that makes certain portions +of a program's address space that contain ELF metadata read-only, after +relocation processing by +.Xr rtld 1 . +.Pp +When enabled in isolation the RELRO option provides +.Em partial RELRO +support. +In this case the Procedure Linkage Table (PLT)-related part of the +Global Offset Table (GOT) (in the section typically named .got.plt) remains +writable. +.Pp +RELRO is enabled by default. +The +.Xr src.conf 5 +build-time option +.Va WITHOUT_RELRO +may be used to disable it. .Ss BIND_NOW The .Va WITH_BIND_NOW @@ -205,11 +222,12 @@ The run-time loader .Xr rtld 1 will then perform all relocation processing when the process starts, instead of on demand (on the first access to each symbol). +.Pp When enabled in combination with .Dv RELRO (which is enabled by default) this provides -.Qt full -RELRO, the entire GOT (.got and .got.plt) are made read-only at program startup, +.Em full RELRO . +The entire GOT (.got and .got.plt) are made read-only at program startup, preventing attacks on the relocation table. Note that this results in a nonstandard Application Binary Interface (ABI), and it is possible that some applications may not function correctly. From nobody Fri Oct 6 21:08:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2Lcm6qhKz4wZk0; Fri, 6 Oct 2023 21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2Lcm6Qjbz3cT5; Fri, 6 Oct 2023 21: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=1696626504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZmuOxBTeyUzKioBr75zDHEhZLfxkYbZMKzeyJn4xM0=; b=T3S9sedDllicJ6XH6ukV4reKG5/tRrEG24SyjSnQhV35tdY1ZcfGlJSzyatb9JyDwckiKs u+jtmIXaSk/78Nw8OaUQZChFcZ0QuAbCCETL9P0ZIbt/XQ56k6kbKV8MbluXinkY9OuPcY tbCZka3mxyIMl3e5Bc1U3UC07lQklJTV1BvNplNObd+d+v+PInaL4Jo0QmrFQy+ioUsz0I LcLECSDV0nU5YAJ5Hmy1fswx8wMCsOJANpxV/yxz5dDJclNXxK+eC70g0+sMvwVxqbeej7 P0KAUopD0viLrKIquH0glTHF1cFJsaycTDCYyqx0PkaEXY5C+qGpKBFLL+UgBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696626504; a=rsa-sha256; cv=none; b=gPtL/CoayZT/wSxOV2p7+tlpV3kPy+qEEeUw5Bl+47f3a5fKRCeAm6Ak6mfiIDnvUy8P/S EOUinW4fHCg8e+uwR7sg8UbzjDSmqLgzBL/CrLWwaO0S9NCjRjvcU59ymZOk6VNZEB4SrK dDbwbd6Cb/8hyozDofCvlLKy2/wg3fB7ZN2ZXA7fiIaMGgbLEb3Rp9KgwKEfFuYzwWNJWS OsJfBlRyFEMRJeEH1ezeeZHfwsYnVnuS3+1biHs28hktRr/Uq2qLue7GVx55lj+QKZvv9g hBJbhmTOmDWzHrBRc4WZjIgE/x14zeXHQcszjpjGgSmyOwds3RshrDaosTt/Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696626504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZmuOxBTeyUzKioBr75zDHEhZLfxkYbZMKzeyJn4xM0=; b=rBcb/CX74U2m8SzTXCo0XQfD/N9U7MlVmAFv/JU+S+DiKGLGEu54FyafbvN8r7KbjJ+qrh 63sPIp29ZCfGXLRCuTLuU3RarQ9ncGnWorJmPcFWs4IbONheG45isAn9hBTsloHpNdjnav 8SVeLqaMZ5akozHzJ7ejRDQCJL74cu599MrPtJpdBtuwrjpWywaDXKYtud5WY9erqjNgMz UzeYKRjQJYCvE4HQzuRNI8fmAchOdtfa2ACIUdnvTp85p5swPIKPenIZ2zSgpKoZG0D0R/ pz91TbQa6YH3IJtleZLuieu0vGTMU+b9LkFZmFIEpcykyUSJBTxnQdxZm2X/hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2Lcm5TlMz13J9; Fri, 6 Oct 2023 21:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396L8Olv059649; Fri, 6 Oct 2023 21:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396L8OFk059646; Fri, 6 Oct 2023 21:08:24 GMT (envelope-from git) Date: Fri, 6 Oct 2023 21:08:24 GMT Message-Id: <202310062108.396L8OFk059646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 8399d764c929 - main - Fix intermittency in the sys.fs.fusefs.symlink.main test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8399d764c929a4b2fa98dbfae0ca7359810e4668 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=8399d764c929a4b2fa98dbfae0ca7359810e4668 commit 8399d764c929a4b2fa98dbfae0ca7359810e4668 Author: Alan Somers AuthorDate: 2023-10-06 21:05:41 +0000 Commit: Alan Somers CommitDate: 2023-10-06 21:08:03 +0000 Fix intermittency in the sys.fs.fusefs.symlink.main test This change is identical to 86885b18689 but for symlink instead of mknod. The kernel sends a FUSE_FORGET asynchronously with the final syscall. The lack of an expectation caused this test to occasionally fail. Also, remove a sleep that accidentally snuck into a different test. MFC after: 2 weeks MFC with: 86885b18689889e9b9142fd31d8c67f21334ba32 Sponsored by: Axcient --- tests/sys/fs/fusefs/mkdir.cc | 1 - tests/sys/fs/fusefs/symlink.cc | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mkdir.cc b/tests/sys/fs/fusefs/mkdir.cc index 48453ff8bb8a..f020feb94ed8 100644 --- a/tests/sys/fs/fusefs/mkdir.cc +++ b/tests/sys/fs/fusefs/mkdir.cc @@ -241,7 +241,6 @@ TEST_F(Mkdir, parent_inode) ASSERT_EQ(-1, mkdir(FULLPATH, mode)); ASSERT_EQ(EIO, errno); - usleep(100000); } TEST_F(Mkdir_7_8, ok) diff --git a/tests/sys/fs/fusefs/symlink.cc b/tests/sys/fs/fusefs/symlink.cc index 19286a446fc3..bd355497a8bd 100644 --- a/tests/sys/fs/fusefs/symlink.cc +++ b/tests/sys/fs/fusefs/symlink.cc @@ -29,6 +29,7 @@ */ extern "C" { +#include #include } @@ -174,15 +175,22 @@ TEST_F(Symlink, parent_ino) const char PPATH[] = "parent"; const char RELPATH[] = "src"; const char dst[] = "dst"; + sem_t sem; const uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_symlink(ino, dst, RELPATH); + expect_forget(ino, 1, &sem); EXPECT_EQ(-1, symlink(dst, FULLPATH)); EXPECT_EQ(EIO, errno); + + sem_wait(&sem); + sem_destroy(&sem); } TEST_F(Symlink_7_8, ok) From nobody Sat Oct 7 00:32:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2R7v5cfyz4wB5p; Sat, 7 Oct 2023 00:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2R7v4GySz4b3p; Sat, 7 Oct 2023 00:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696638731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MF/7kL+s/frbndNjOGD+Oqj4Zx45clJxJu21VXJaMFA=; b=vRkH9HgTE4CdNXE5zRN94i8n/xQx8rTfurgBa8QeDc7FhKhg6I9b66NV2YeNPgx1ozu/IX UXHVkaaLVbPtkQ4gPQKc16BqBuBlucQ1KOFK7sUgbzF8wQ0FVzQJjofokMcFGNZnET/Xd0 V465rmgeuHzP7G6y1KZs6meEmsNpamzDRoHES+lI+7ZzhHw5faRFZv6s5cWWlPX/+THRq7 PTsmwQwYwk+jSTKYRFsywuE/7ucYmyI164LwKRTQPoRozNiy+4glmd9S1AQXNxyT7FG0Kt 0GqXOtbZyoIH7FEOsIOG1lfNKZQm3IJg3n4bpfZOhQJnJG2pWmfU1HxN3K/bXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696638731; a=rsa-sha256; cv=none; b=hKJdCMn6MR1qsqKfKZD2M7hVkYw6LknL7l31QT90UYXypCwy66jkuUb+q2C2bt7LExlYAn 9BiFsSoivJ3A6Z52UYRVSQ5WsYgJyrzLRdM80SHOI/PzzXcNw/knknMvBvMdFkwKkNaUfY 9z4hrRlZtc7JI7mJuSIGiN1hUdhYybuxksw1q5stMPCpSqAYtqmd3hoBfMvSRTsbWKOJhw jcM6T08J43M2IGvQwj+CANd3IjQ0AmYIrqCULBO70yuElQF8BLfJng9xHOm3B+vocN+ksK ytdwzHLyBVWdreMP4HQv5iQnBFhT0w9gWaITYzUKElGumQWqm5a4H/ngBAPuhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696638731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MF/7kL+s/frbndNjOGD+Oqj4Zx45clJxJu21VXJaMFA=; b=uRAc/DZTS9M4Ets8g+saHT0qBWFNNBibklOJWDx97VnkqcRveVlibRXGJhcHr4mn7OlEQv 34t1nStkxJZaasyMUAmeedx/j4PGTMOqlrawySUx39Ddf3g7jvFvyi+BEcCO6+MwZ9DON9 KeEhilNBTZKbN73Npq1cBgLEsPjDcOhtWmjNis+X8iGAtck350OYybhARvrS+sUuB/LLv2 1b9LqCEMf8Nh/X6xqPQwgzA8Irmy1arWymbQqa28t3FCb21PkvC1kn5Alqrq8Av6PIfLjV H3wot+/XhEru8bqO4k1SJ53STn5xJ9WgR1pMSat6BRhUExRdBN11h5PvzSAc0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2R7v2yJPz18B2; Sat, 7 Oct 2023 00:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3970WBHt005674; Sat, 7 Oct 2023 00:32:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3970WBCE005671; Sat, 7 Oct 2023 00:32:11 GMT (envelope-from git) Date: Sat, 7 Oct 2023 00:32:11 GMT Message-Id: <202310070032.3970WBCE005671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4640df1b0a49 - main - mrsas: Fix callout locking in mrsas_complete_cmd() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4640df1b0a49697840b81f6bcd269a483514c6aa Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4640df1b0a49697840b81f6bcd269a483514c6aa commit 4640df1b0a49697840b81f6bcd269a483514c6aa Author: Mark Johnston AuthorDate: 2023-10-07 00:31:03 +0000 Commit: Mark Johnston CommitDate: 2023-10-07 00:31:03 +0000 mrsas: Fix callout locking in mrsas_complete_cmd() callout_stop() requires the associated lock to be held. This is a bit hacky, but I believe it's safe since the subsequent mrsas_cmd_done() call will also acquire the SIM lock to stop a different callout. PR: 265484 Reviewed by: imp Tested by: Jérémie Jourdin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39559 --- sys/dev/mrsas/mrsas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 1241f44761c4..e362d4b455fc 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1732,11 +1732,13 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex) data_length = r1_cmd->io_request->DataLength; sense = r1_cmd->sense; } + mtx_lock(&sc->sim_lock); r1_cmd->ccb_ptr = NULL; if (r1_cmd->callout_owner) { callout_stop(&r1_cmd->cm_callout); r1_cmd->callout_owner = false; } + mtx_unlock(&sc->sim_lock); mrsas_release_mpt_cmd(r1_cmd); mrsas_atomic_dec(&sc->fw_outstanding); mrsas_map_mpt_cmd_status(cmd_mpt, cmd_mpt->ccb_ptr, status, From nobody Sat Oct 7 01:16:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2S7L4rkpz4wJKb; Sat, 7 Oct 2023 01:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2S7L30BKz4gHM; Sat, 7 Oct 2023 01:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696641406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Jm7c2YAvM+mZE+pHl926Be3jo3vQ/2jcbHMRBErC3A=; b=WBlthp+PdBDPVQE3gN91ZjyKCKQml4n6rOwctSO6CFagtWjx830RSI5EU7HVh7Ed/SKS/9 yqT5+hQNhU6Hpxo82fh3PJ1pgEeEYTl+YCZ8UHxVPeu7ch0bRzRYQKWwhR4ksO+0908xjA Otq+CjOQXNpJBebH7hM7DdXYJkoC5Tt042yi6JsOLKzfoHB0Q0W/+UwztAEjWr50yEKNkn +XPmVixLFjoYjPZYyKMlxvlbuo30Nm5xtoQI2ksoPY2oy9CUEaN7sucmnoiUSl7vDlBqPM yHWjbmwJxSeQGc6DTfwBp/XoWvT52UHbKthOWpgv0Rl4h5GykYTpKSsOJ6/E4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696641406; a=rsa-sha256; cv=none; b=VHjYBRHIUcKwjf3kZ/rENN1m7WA9MAJjWVf1AMz0vCMkeH8VA2K7EAEoei7RHYb/8YRQo0 0rFeRLNB2W7ftvjbzDHF8w4saek9SJkZJptvHKjOTn+xjEAQO6scZVunn0s8H09C5GTIpq Tzf7pcYer1ArMjcC1PGQWrjLHaXl8exgbzENHT1Ub9qXgKf8vrHBsII2Zyh5Va1Ozu/94J qDr+dQB4VWkajY4E+zweVyZafYmgc1Xa2SWa/i8yjPdtLJjFwlGKZWFnQRDxri0ayxg9ft ohdo6vjQLu+VEPtxLsGErBUxUA5dHiU+PbMJfLipsNwlP+mm6uRXZBNLpiUI5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696641406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Jm7c2YAvM+mZE+pHl926Be3jo3vQ/2jcbHMRBErC3A=; b=m+A9eV78weDq98H2qeK1c19FENUgIQstVD1M1A14AATcssOPF1RwRKgufHEAiJgprn/qd0 5Uauu2zKjwF2K3LrGfKWyjfJK67xoAjdb93cHUsL/xupYBOoB1n/kTbIeP/YGsxHON7Vl1 yp1QiNVGQ1DumeUG3wJoIW4aMUgDYU4oshSFRhMwMsMW/9tdX172/vs2Rz6G0RyN7SqDk5 MjLp4kn+wGEe3J5k5SbtoCVmp4RqMhaXJ/4piiJL+OmRB5mJLTNMK91sLrS4cT6NZsZ1o7 3x5MlAYISSUinpA2/TpbVARTIXwR5f8ABMT8hKu3KZMBvjztBatlw7L9T2YGUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2S7L24R1z18s5; Sat, 7 Oct 2023 01:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3971GkTC074819; Sat, 7 Oct 2023 01:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3971Gkct074816; Sat, 7 Oct 2023 01:16:46 GMT (envelope-from git) Date: Sat, 7 Oct 2023 01:16:46 GMT Message-Id: <202310070116.3971Gkct074816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f7a2eeaa75dc - main - src.conf(5): regen after 166a655fcf13 (bsdinstall/libdialog) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7a2eeaa75dc95f2958d2db2170744f44e14b7ea Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a2eeaa75dc95f2958d2db2170744f44e14b7ea commit f7a2eeaa75dc95f2958d2db2170744f44e14b7ea Author: Ed Maste AuthorDate: 2023-10-07 01:14:11 +0000 Commit: Ed Maste CommitDate: 2023-10-07 01:16:18 +0000 src.conf(5): regen after 166a655fcf13 (bsdinstall/libdialog) Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 64f725c7b2fa..cc26c026052d 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd September 7, 2023 +.Dd October 6, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -477,12 +477,6 @@ Do not build .Xr dpv 1 , and .Xr dpv 3 . -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_BSDINSTALL -.El .It Va WITHOUT_DICT Do not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD From nobody Sat Oct 7 02:48:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2V9j6C9bz4wY7L; Sat, 7 Oct 2023 02:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2V9j5hnnz3LKk; Sat, 7 Oct 2023 02:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696646937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzTXzgUPs5Q2uX1rp5rKsTKMRXZQev6yF4CBai8FN/A=; b=j+hRLa7SlXl/y7RaCA1PMN6Jbu5RsejBwJV8vuAw+aHz50tD3G1Z3e9zVzM18OryZcR37n ngsZSEuVdhz6re7EO7/lkMVieAxiVTYXzfcthFzyPkxfJiJGzJOQCwm99C08tr2GISy3Wy 65pocxJ8TUTVINBYH1DAZMYqqUVkYVvu5loyZ9C5QKYQBFzn9DLbPmW+4tG3L05z+EUdNX rP89yaQS5lxtrUBKSrK0hJpPJ2uWhk1RmGrNrTWBtsdto/yT0TNhUIqm3QWyzPCA5+kAAs GgDiLGSiuDnrm84B8l4uzlerT2sJHANRuI9p56nNe7p5xE+mfUKArE7nrfgjhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696646937; a=rsa-sha256; cv=none; b=WeekiBoHcPgEYnyoD8CtlMFTQEoH4HgfRnHxGK76PgNgoioB+zPdcN7D0F6Tm5zAPK4c26 Ot8bq6OlF3JANjed/+SSYklthVTRd+cl0vnLPcETu9gklPbiIhzHbij/1tytlNDh9F/yTv 6DTIVHUVoQYq/EgyQEEbZewe+b+SXUIczzaN5mmZ3sh90kVfld6/E6Y2WCyt9jLpFZBIho dAZPWlayAUyjaKQGG5dPwZrmEDaSuuR670LfYwiQdf4OJ+EtJ7k1mKVUIEMlwezbWVrSWN vldnZonKAmC1Ka844U3vOssFL3D56AReB3LuFDSEIjxPM3hsaWT+wm4sz/0rEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696646937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzTXzgUPs5Q2uX1rp5rKsTKMRXZQev6yF4CBai8FN/A=; b=fprliSh1q2A/x65jeslsxcnngBxS6xf6JHB/GYJuZpBfhuodypLmurSUUQubfJVF/BRl/K JV2ftLAYmCMiY2zLduu7Pzo9ZRT/dUsjMrYwb50PskzAUtxV7pHhTJtWkEccg9hL7ZQ1B+ WvvlAXy+itMCT14fmU6kXTP6nsK/SvothFUDGm0aYJppnw/C1Rt/IY4EVeDY+ZX/WJYv+k L+ZoNYEUZNa1Grv34hgVnVsjz3fdQ86BDXQ7tVHFj23MIn7wWJp+tinkuzTPCQrFF3cdcT plNBVsyTFMJNmpJ3c2DosPw8N382kz+rlh21SF57G9YB86TxrJdiC+sM28WYUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2V9j4mKNz1Csr; Sat, 7 Oct 2023 02:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3972mv2L022988; Sat, 7 Oct 2023 02:48:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3972mvNQ022985; Sat, 7 Oct 2023 02:48:57 GMT (envelope-from git) Date: Sat, 7 Oct 2023 02:48:57 GMT Message-Id: <202310070248.3972mvNQ022985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: d67558ef3149 - releng/14.0 - Fix padding in struct tcp_info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d67558ef3149c02223fd15206c8c7766f6891be2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d67558ef3149c02223fd15206c8c7766f6891be2 commit d67558ef3149c02223fd15206c8c7766f6891be2 Author: Alan Somers AuthorDate: 2023-09-17 14:22:08 +0000 Commit: Alan Somers CommitDate: 2023-10-07 02:48:17 +0000 Fix padding in struct tcp_info This structure should have the same size across different FreeBSD versions to ensure backwards-compatibility. It has since stable/6. But two recent changes added fields without compensating by reducing padding: 945f9a7cc9dcc071bfcc702748fbbb11087ae773 and 22c81cc51636cfebe94e0979eb31556d87775938 . Reduce padding to compensate. Direct commit to stable/14 because we decided to break compatibility in FreeBSD 15 in order to add more fields. Of course, that decision could be reversed before 15.0-RELEASE. See the review for details. PR: 273902 Reviewed by: tuexen, glebius Differential Revision: https://reviews.freebsd.org/D41894 Approved by: gjb (re) (cherry picked from commit 2209676efe9a23d9411fa0314b9c6bb285baefc1) --- sys/netinet/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 2b898d062b0d..bfb825930c66 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -434,7 +434,7 @@ struct tcp_info { u_int32_t tcpi_dupacks; /* Consecutive dup ACKs recvd */ /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[14]; /* Padding. */ + u_int32_t __tcpi_pad[10]; /* Padding. */ }; /* From nobody Sat Oct 7 14:04:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2n8j0c42z4wTNy; Sat, 7 Oct 2023 14:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2n8j04wDz4Xjl; Sat, 7 Oct 2023 14:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696687445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2FHIeaXaArm42Dfyn+lXL+uLAQcNG6nuHqmyfM43iz4=; b=HZvlHDovBJSZw2PODALqGAbT75Qeljpj2bc2ABWmcz5ObSrwZZva5r4SuwdIQJQaLbXeP9 qwOUBXGfyV17EziZ1nZWY+VjHkILNzHvOYeDmBblyqXN9XqIxLowBt/S4jeSSwwGc3VC8O EjLZQykmY2hvMq/CAU8vFTIv2HZVe34nPDGzjbFLD4wPRU9IaCehkUa/hoPPBx7Yyt1kax E+gkljujUbG97oC3/25CBEO1Piuf8Lm6VR1pe6+Tbpb4OESkuWOyRQvXqwXXaSlVBzEe6y HxU+3QC6jrA3sULqz4X/j8vJWcjXi11e7S5pI6/mbUrQj99I9RAUCgFnlhgyZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696687445; a=rsa-sha256; cv=none; b=tn9VLyJyBcuGK9/rD6SUeIKLrYfPaYHhgsW5JjGCsPSb9XhqWThCqGV7aJZLVBJsCD/Jl9 9AC2UQllPTtspomdwCkak0d7HwO9Hlk39pTp0JVZNp7J7GOfcPxgw5DvrLH7PfPsAyEdNq YnK+sj/WcpPrXZ5tjCc2tNiLXp5VyRudb1KVsIQEcJvcLxWhX1+Nq2MORqu2O58mIIYfWF WxHXXC4QXOqQlWsOILAPFDD/9zmuPBMOcgS0Y0upCcNzN/OwSZ0Uayt48Ukhm8uxkXTWCC T7axRF9WjBJYdKGFy9T+ghfZMOmzsX6WjeBG2k25t4q09Sopp5uphAq6QvDRgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696687445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2FHIeaXaArm42Dfyn+lXL+uLAQcNG6nuHqmyfM43iz4=; b=Bz47OSCqLrbN2Tdn9RZ6vcAPcw0wUNIIisYbxbxpada4YhgS188Kc654Zm/aM0XBrsbVEt ZblXjhjkObLKN1isaanYuLRnZ2y+3ZvCbkL6NGmTp/UM7B6gsF9gqelhfFllZpfwYkALmR K6+OC/haXkXAB5K/3zaRMQqbsqKMPKgACeD3rWDQwjHU5fAyyslngWWEwI26L+8o8Rra+H 9c2lX3F2bKn3amHm/ArKYQGzSkt26hZlXcRdSzEQ7ap2E0Szx35mdjAgGChoC5CyopF8pP jKHDMBAWohzk0gFMFTcAPgPfCh4CQZeMVHP1neA4yiG0wcOPz3P3vvdu0cS3+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 4S2n8h6G5KzYvt; Sat, 7 Oct 2023 14:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397E44iQ053563; Sat, 7 Oct 2023 14:04:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397E449k053560; Sat, 7 Oct 2023 14:04:04 GMT (envelope-from git) Date: Sat, 7 Oct 2023 14:04:04 GMT Message-Id: <202310071404.397E449k053560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: abca3ae7734f - main - udp: fix sending of IPv4-mapped addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abca3ae7734f664ee9c5edc7a9d3a17e29180bdb Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=abca3ae7734f664ee9c5edc7a9d3a17e29180bdb commit abca3ae7734f664ee9c5edc7a9d3a17e29180bdb Author: Michael Tuexen AuthorDate: 2023-10-07 13:56:00 +0000 Commit: Michael Tuexen CommitDate: 2023-10-07 13:56:00 +0000 udp: fix sending of IPv4-mapped addresses The inp_vflags field must be adjusted during the call of in_pcbbind_setup(). This is consistent with the other places in the code, but not elegant at all. PR: 274009 Reported by: syzbot+81ccc423a2737ed031ac@syzkaller.appspotmail.com Reported by: syzbot+c8e3dac881bba85bc029@syzkaller.appspotmail.com Reviewed by: markj, rrs, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42031 --- sys/netinet/udp_usrreq.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 70d738bf2108..cbda7f536262 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1050,7 +1050,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, int cscov_partial = 0; int ipflags = 0; u_short fport, lport; - u_char tos; + u_char tos, vflagsav; uint8_t pr; uint16_t cscov = 0; uint32_t flowid = 0; @@ -1092,7 +1092,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, * pcb hash. */ if (sin == NULL || - (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0)) + (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) || + (flags & PRUS_IPV6) != 0) INP_WLOCK(inp); else INP_RLOCK(inp); @@ -1203,10 +1204,17 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, error = EINVAL; goto release; } + if ((flags & PRUS_IPV6) != 0) { + vflagsav = inp->inp_vflag; + inp->inp_vflag |= INP_IPV4; + inp->inp_vflag &= ~INP_IPV6; + } INP_HASH_WLOCK(pcbinfo); error = in_pcbbind_setup(inp, &src, &laddr.s_addr, &lport, td->td_ucred); INP_HASH_WUNLOCK(pcbinfo); + if ((flags & PRUS_IPV6) != 0) + inp->inp_vflag = vflagsav; if (error) goto release; } @@ -1249,9 +1257,16 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, inp->inp_lport == 0 || sin->sin_addr.s_addr == INADDR_ANY || sin->sin_addr.s_addr == INADDR_BROADCAST) { + if ((flags & PRUS_IPV6) != 0) { + vflagsav = inp->inp_vflag; + inp->inp_vflag |= INP_IPV4; + inp->inp_vflag &= ~INP_IPV6; + } INP_HASH_WLOCK(pcbinfo); error = in_pcbconnect_setup(inp, sin, &laddr.s_addr, &lport, &faddr.s_addr, &fport, td->td_ucred); + if ((flags & PRUS_IPV6) != 0) + inp->inp_vflag = vflagsav; if (error) { INP_HASH_WUNLOCK(pcbinfo); goto release; From nobody Sat Oct 7 14:24:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2nch61Cbz4wX7Q; Sat, 7 Oct 2023 14:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2nch5ZXGz4cdD; Sat, 7 Oct 2023 14:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696688692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9EjGhQiNRXg/TG8exDgsNyccePkRqg0ZGJxioiq1H+s=; b=b5XEovb0AMrVczpmWWpO5kJdoO01M1kAiknffmvKbpOqPwwuXgpTmRMu2uNcV89x/SXQmS zSVcw+difCrI5vBCvzZY8d0XS//UHpU35AmJHnndAyAdNHqFMVHf9hm9VAwjQwPzWK5jpk M/GipbWcvh7FxZ5ysHYGijyW7A66qDsFPjz+L7Ujk0yVGjI1mkgHLIYypVawjp6NOTYE2X NZGumn8ERiwAfKVTVVmUCuw1KgrKedxDb5+tfgVn8szoiMY95ehwQEHOmICnhnVD5wqdtA HAYfdm1hPcKjaUNUc3/89uzxBFtjoEThxc9z2XR2UZdnpkH/VuzeXxXsUlDI5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696688692; a=rsa-sha256; cv=none; b=FXPJBYrKfSB8SJu8jXjNAi6J96p6tuQ1kT9ss5gSGY9UmAXHchkH/oIzBlrNc/T1mFLNhq TTNWov/hQq0mhjjBSL1MKhlRRcUZali96YGoJA9rYvbFswyDNHuMMAAp9mhMagk1BBp8NA d5c3laSWDsXhx2I6vW+ijs9C9oJ5RjB3cfcQK0Xe9GOtkYB8Nj7/Y3FbgCRaEmJauipjib rMPwgwJDD41ipPitkuHw07ugZIRRSs7KUK4QpIAJ19QjFRwXfHt8h8r7NvExudc+FFwyeH DfFI1LxOP4zYVe0zRnB+OVXttxFOgm460iiyrnH6Kl73zMcdCbT7LeirhzkbKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696688692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9EjGhQiNRXg/TG8exDgsNyccePkRqg0ZGJxioiq1H+s=; b=qbVWtfbbq/XL6cJVN+wU0Ix8RlND8Jm0i6CDKksIuHL2W+ZRYtw/klq+LYaXCJzF+1N9P8 yfBt75rVtNpVj4QkciP/Lo3JeKqN+gpoFmDTZIujp6U6H391eFhWt7QoXmDVlLkm2y96GV ZrrodHrfw05YSFk5Ik4ba22NTTBIDgyAok9EGEZBrUoSU3PRTkhP+lUvy0c2uBFyGt534R hhaRxaRr0916PxFO5VEeT6kA5Romjod1IxSb5SOWpSfTUWZP++S8SeNoV2DDabMEvbvIft 1x7/ar+AdzZgWsnHU6BJjwap/yzGhs7GrhBt60F3gOyGhUM9iqTg9SnIsdJTpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2nch4WvSzZNv; Sat, 7 Oct 2023 14:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397EOqHG086648; Sat, 7 Oct 2023 14:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397EOq0u086645; Sat, 7 Oct 2023 14:24:52 GMT (envelope-from git) Date: Sat, 7 Oct 2023 14:24:52 GMT Message-Id: <202310071424.397EOq0u086645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 662ec2f78152 - main - fusefs: sanitize FUSE_READLINK results for embedded NULs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 662ec2f781521c36b76af748d74bb0a3c2e27a76 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=662ec2f781521c36b76af748d74bb0a3c2e27a76 commit 662ec2f781521c36b76af748d74bb0a3c2e27a76 Author: Alan Somers AuthorDate: 2023-10-04 18:48:01 +0000 Commit: Alan Somers CommitDate: 2023-10-07 14:22:03 +0000 fusefs: sanitize FUSE_READLINK results for embedded NULs If VOP_READLINK returns a path that contains a NUL, it will trigger an assertion in vfs_lookup. Sanitize such paths in fusefs, rejecting any and warning the user about the misbehaving server. PR: 274268 MFC after: 1 week Sponsored by: Axcient Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D42081 --- sys/fs/fuse/fuse_ipc.h | 1 + sys/fs/fuse/fuse_vnops.c | 7 +++++++ tests/sys/fs/fusefs/readlink.cc | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 27f3662741c5..0ec556138be0 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -239,6 +239,7 @@ struct fuse_data { #define FSESS_WARN_CACHE_INCOHERENT 0x200000 /* Read cache incoherent */ #define FSESS_WARN_WB_CACHE_INCOHERENT 0x400000 /* WB cache incoherent */ #define FSESS_WARN_ILLEGAL_INODE 0x800000 /* Illegal inode for new file */ +#define FSESS_WARN_READLINK_EMBEDDED_NUL 0x1000000 /* corrupt READLINK output */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 21ee378b24c6..3249e5988801 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2007,6 +2007,13 @@ fuse_vnop_readlink(struct vop_readlink_args *ap) if (err) { goto out; } + if (strnlen(fdi.answ, fdi.iosize) + 1 < fdi.iosize) { + struct fuse_data *data = fuse_get_mpdata(vnode_mount(vp)); + fuse_warn(data, FSESS_WARN_READLINK_EMBEDDED_NUL, + "Returned an embedded NUL from FUSE_READLINK."); + err = EIO; + goto out; + } if (((char *)fdi.answ)[0] == '/' && fuse_get_mpdata(vnode_mount(vp))->dataflags & FSESS_PUSH_SYMLINKS_IN) { char *mpth = vnode_mount(vp)->mnt_stat.f_mntonname; diff --git a/tests/sys/fs/fusefs/readlink.cc b/tests/sys/fs/fusefs/readlink.cc index ff9aa08f6fae..30815f2cd4b6 100644 --- a/tests/sys/fs/fusefs/readlink.cc +++ b/tests/sys/fs/fusefs/readlink.cc @@ -79,6 +79,45 @@ TEST_F(Readlink, eloop) EXPECT_EQ(ELOOP, errno); } +/* + * If a malicious or buggy server returns a NUL in the FUSE_READLINK result, it + * should be handled gracefully. + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274268 + */ +TEST_F(Readlink, embedded_nul) +{ + const char FULLPATH[] = "mountpoint/src"; + const char RELPATH[] = "src"; + const char dst[] = "dst\0stuff"; + char buf[80]; + const uint64_t ino = 42; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.attr.mode = S_IFLNK | 0777; + out.body.entry.nodeid = ino; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = UINT64_MAX; + }))); + + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_READLINK && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).WillRepeatedly(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + memcpy(out.body.str, dst, sizeof(dst)); + out.header.len = sizeof(out.header) + sizeof(dst) + 1; + }))); + + EXPECT_EQ(-1, readlink(FULLPATH, buf, sizeof(buf))); + EXPECT_EQ(EIO, errno); + EXPECT_EQ(-1, access(FULLPATH, R_OK)); + EXPECT_EQ(EIO, errno); +} + TEST_F(Readlink, ok) { const char FULLPATH[] = "mountpoint/src"; From nobody Sat Oct 7 15:36:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2qCY4g1yz4wkj3; Sat, 7 Oct 2023 15:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2qCY4Fk9z4v45; Sat, 7 Oct 2023 15:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696693001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w8BCtbtN7/ZJzrFOugZ91IphoZar7i45nsdAcxFINjk=; b=Z79BN01fPTlgffflKzGpuhPRlcJKUTw3DWbznOhx28dszn9NQkmnTCmBxtsx7XBbxLyqez oYoePBcRaexQcAx1gLBY17L/ARrzUwLACtoAYZHyhnqkujpW5jiv1Hlw3l0QwNqC94U1Cj uH187aIVmuOnGNeHCJV9rsp5wr9GhoxnzbzaPa20qjsre1sYgclCj1Qe76fKZA0WaJF6jG C3ld9KBLOZCjhJIuSyi8l3+kpx3Ny/lLFRe/CJYtQlckM0O3ZaNlCSWcj0A/PXndS6ainn nK6frgHdq9DSC42iRr43rIObak5I3ANo/CaNpFEuejKMrHx2RIIJiuYqk/ooBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696693001; a=rsa-sha256; cv=none; b=mmnIV0WwRkJ1v6YzSD+rNrWI1p19QfAOKSrM3EdcGBpDxiggbk/EjBlBzCSqKvxjdg67JL aBaHwiEQ8HFpk9nkiUsNt65abrVWft7C719kB3TwgTRm5ZEJUkZa2TwGi5p0LChSWu2HZv O+qYaTnkoLeUOOXJtLFPkFcJtTx/VUiVHOL58E6Et6/DTwiLHrn6ePgO/uefECbnSAuZqH xehxnuMrJ8j5bFyO9zfslQUlqUBU0T7yf2ZXLmrorgvOOgsrvaApNkPjzVd5k7j9iye63S d1F/zxLa7yX6XcnKlOtEIw95uxpY8dFRnHWbqp/T/TMcultGGT5maoDBxIr2JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696693001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w8BCtbtN7/ZJzrFOugZ91IphoZar7i45nsdAcxFINjk=; b=MN6t3AYOH64Svp21Z2Hc4e5HLJmANux6XqFuvL+pLCqsiDkdgngKR68iRhZECfArYKko7P hBniS0jzpvgusIou0GlBanNq9m5mNyw98gNZmIQetT4TtpnD2tLhFkktwZjBkxhIuYS1Au TAkkuQrRO+l8f+Jzxiv+/plYsUYmmOOvUwXawyZq3FWjFbeSNNsSbV8TI2J2yoqPnOa1Yi 3DzvO7XAPtSlZ+77isCHLgEC9qLw/Ygh69fszrBKcCyjNSvALDn/YunZphnkl+BuFSN8Ls PZawY/W3ndd6NKbswdMqtfDah2VyeYLeG1vpPEiSuYEZNBdYB+78FxafRX/nDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2qCY3BL0zbZC; Sat, 7 Oct 2023 15:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397FafeJ003857; Sat, 7 Oct 2023 15:36:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397Fafi9003854; Sat, 7 Oct 2023 15:36:41 GMT (envelope-from git) Date: Sat, 7 Oct 2023 15:36:41 GMT Message-Id: <202310071536.397Fafi9003854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f69181e9de1b - stable/14 - pf: cope with missing rpool.cur List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f69181e9de1b021f4689ce50b420f9c694268ec8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f69181e9de1b021f4689ce50b420f9c694268ec8 commit f69181e9de1b021f4689ce50b420f9c694268ec8 Author: Kristof Provost AuthorDate: 2023-10-03 15:11:44 +0000 Commit: Kristof Provost CommitDate: 2023-10-07 07:39:04 +0000 pf: cope with missing rpool.cur If we're evaluating a pfsync'd state (and have different rules on both ends) our state may point to the default rule, which does not have rpool.cur set. As a result we can end up dereferencing a NULL pointer. Explicitly check for this when we try to re-construct the route-to interface. Also add a test case which can trigger this issue. MFC after: 3 days See also: https://redmine.pfsense.org/issues/14804 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 74c2461386ea5eeb41e674df6b16a44b0509a882) --- sys/netpfil/pf/pf.c | 9 ++-- tests/sys/netpfil/pf/pfsync.sh | 96 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3e1c8d32add9..fae0bd2854f9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6978,7 +6978,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -7035,9 +7035,10 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, s->rt_addr.v4.s_addr; ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) { ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; + } PF_STATE_UNLOCK(s); } @@ -7191,7 +7192,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -7249,7 +7250,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, &s->rt_addr, AF_INET6); ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; } diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index d62cdddd504a..91c7b8410a08 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -825,6 +825,101 @@ basic_ipv6_cleanup() pfsynct_cleanup } +atf_test_case "route_to" "cleanup" +route_to_head() +{ + atf_set descr 'Test route-to with default rule' + atf_set require.user root + atf_set require.progs scapy +} + +route_to_body() +{ + pfsynct_init + + epair_sync=$(vnet_mkepair) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + epair_out_one=$(vnet_mkepair) + epair_out_two=$(vnet_mkepair) + + vnet_mkjail one ${epair_one}a ${epair_sync}a ${epair_out_one}a + vnet_mkjail two ${epair_two}a ${epair_sync}b ${epair_out_two}a + + # pfsync interface + jexec one ifconfig ${epair_sync}a 192.0.2.1/24 up + jexec one ifconfig ${epair_one}a 198.51.100.1/24 up + jexec one ifconfig ${epair_out_one}a 203.0.113.1/24 up + jexec one ifconfig ${epair_out_one}a name outif + jexec one sysctl net.inet.ip.forwarding=1 + jexec one arp -s 203.0.113.254 00:01:02:03:04:05 + jexec one ifconfig pfsync0 \ + syncdev ${epair_sync}a \ + maxupd 1 \ + up + + jexec two ifconfig ${epair_sync}b 192.0.2.2/24 up + jexec two ifconfig ${epair_two}a 198.51.100.2/24 up + jexec two ifconfig ${epair_out_two}a 203.0.113.2/24 up + #jexec two ifconfig ${epair_out_two}a name outif + jexec two sysctl net.inet.ip.forwarding=1 + jexec two arp -s 203.0.113.254 00:01:02:03:04:05 + jexec two ifconfig pfsync0 \ + syncdev ${epair_sync}b \ + maxupd 1 \ + up + + # Enable pf! + jexec one pfctl -e + pft_set_rules one \ + "set skip on ${epair_sync}a" \ + "pass out route-to (outif 203.0.113.254)" + jexec two pfctl -e + + # Make sure we have different rulesets so the synced state is associated with + # V_pf_default_rule + pft_set_rules two \ + "set skip on ${epair_sync}b" \ + "pass out route-to (outif 203.0.113.254)" \ + "pass out proto tcp" + + ifconfig ${epair_one}b 198.51.100.254/24 up + ifconfig ${epair_two}b 198.51.100.253/24 up + route add -net 203.0.113.0/24 198.51.100.1 + ifconfig ${epair_two}b up + ifconfig ${epair_out_one}b up + ifconfig ${epair_out_two}b up + + atf_check -s exit:0 env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_one}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_one}b + + # Allow time for sync + ifconfig ${epair_one}b inet 198.51.100.254 -alias + route del -net 203.0.113.0/24 198.51.100.1 + route add -net 203.0.113.0/24 198.51.100.2 + + sleep 2 + + # Now try to trigger the state on the other pfsync member + env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_two}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_two}b + + true +} + +route_to_cleanup() +{ + pfsynct_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -837,4 +932,5 @@ atf_init_test_cases() atf_add_test_case "timeout" atf_add_test_case "basic_ipv6_unicast" atf_add_test_case "basic_ipv6" + atf_add_test_case "route_to" } From nobody Sat Oct 7 17:16:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2sRC6Z8Sz4x1bT; Sat, 7 Oct 2023 17:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2sRC5qGrz3SMW; Sat, 7 Oct 2023 17:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696699015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+awxEkHhx9kkVByTgm/gxkOH9sYBmM0rwBEOvqTao90=; b=xIyQwosO8Kc5AGsoY9J5HaukLNMQaGIQF4vmAL3U4WezNZtw6tIR5k5pkus7X/VaTVrKWa oJKVx4ZpP0GwitCLa+MLXmpJz6NdpOAwPti9QZoSV2c8q2LTT+aQ2CTTs+wZErfsIWZi5x 4ITbSkSaohKvDVwGFihORTc7XA4ERizsdfEmNIzPqYub7UytNnS4kvWkQEcM/BmLshpPGj WwdTLKdh9sNVhIKf3BqCGVCiKuIObKrP/pHLby8Pz4FuRC87tDa+wuvhN9UWEpDYhO7NtY NayvaUhbM693xiL3/aJRbM0KF53WiK+sraVMkVFFdWDcKEjUdRbXUGGcSWTCwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696699015; a=rsa-sha256; cv=none; b=qS2YRE26SXkd/xyvXtrDFpU+8Ptycqnfxp1hdgtxpz75wOQ/EVXp2XjT4vwhaFwSu7jB5J AEfkceMltPavO55+mkUDfv3K+VHklpdjaoKSZ+fP6+cHNulpnSTh5rVi6+Y6H+RKljuwwm K6hkr+26XWQcjrGY7W40qC4hsi2UZ76tbEbi1Q92SAGj2+OaobLonQa7nMUt7tLWqVMIBP DGaD3LY3FzPDmgxUKb5uOxz8txArRDngngG99b55MCngFJzs+fKb4R7Quc1WB2O5/B1yZF p0Od3QbAL9WT05c5m87+eUUE86eX4SGzCLeVzfHmD4YQ50kJXAjOQ5wWfT+/sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696699015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+awxEkHhx9kkVByTgm/gxkOH9sYBmM0rwBEOvqTao90=; b=oWD5KQzfzqrZkTpDw0+ZX9DZ1vCbR6/ko2TF6eLpRcnFy+T9GKCxcOAS72szTDCHEj7iDs LYUb5uUAE28thrsr0M32oAfWW4QWJC/O/Ik2yQ232MrTLfnV7AovkY8aIc6eO/2fnyV//+ IH18u5qF7m2DXqoVitu9DZk0Z5MBVH8opd7arOz59h9sJhocRazEMtsKgnjnb/vzC4OlmU qPit1wUQtOnFcNhG/cwVv0YwSkTvfqI+BWDaRd0CGx07P0Eru6bUoxYA4f3xa+yIzhg5QS bxuzOHdGq7LZMD4sOpDHRn82L44lgrHwoFaGwutrl3frlZ/LAi1uymy+1lOkHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2sRC4ZH7zfK3; Sat, 7 Oct 2023 17:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397HGt6E070546; Sat, 7 Oct 2023 17:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397HGtqr070543; Sat, 7 Oct 2023 17:16:55 GMT (envelope-from git) Date: Sat, 7 Oct 2023 17:16:55 GMT Message-Id: <202310071716.397HGtqr070543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0b42158e5ef5 - releng/14.0 - pf: cope with missing rpool.cur List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0b42158e5ef5b2d9ed05bc8dff7fbfd106e1bcac Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0b42158e5ef5b2d9ed05bc8dff7fbfd106e1bcac commit 0b42158e5ef5b2d9ed05bc8dff7fbfd106e1bcac Author: Kristof Provost AuthorDate: 2023-10-03 15:11:44 +0000 Commit: Kristof Provost CommitDate: 2023-10-07 17:16:25 +0000 pf: cope with missing rpool.cur If we're evaluating a pfsync'd state (and have different rules on both ends) our state may point to the default rule, which does not have rpool.cur set. As a result we can end up dereferencing a NULL pointer. Explicitly check for this when we try to re-construct the route-to interface. Also add a test case which can trigger this issue. MFC after: 3 days See also: https://redmine.pfsense.org/issues/14804 Sponsored by: Rubicon Communications, LLC ("Netgate") Approved by: gjb (re) (cherry picked from commit 74c2461386ea5eeb41e674df6b16a44b0509a882) (cherry picked from commit f69181e9de1b021f4689ce50b420f9c694268ec8) --- sys/netpfil/pf/pf.c | 9 ++-- tests/sys/netpfil/pf/pfsync.sh | 96 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a5d7c1ba0155..0973c829644a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6737,7 +6737,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -6794,9 +6794,10 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, s->rt_addr.v4.s_addr; ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) { ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; + } PF_STATE_UNLOCK(s); } @@ -6950,7 +6951,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; PF_STATE_UNLOCK(s); @@ -7008,7 +7009,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, &s->rt_addr, AF_INET6); ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; /* If pfsync'd */ - if (ifp == NULL) + if (ifp == NULL && r->rpool.cur != NULL) ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; } diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index d62cdddd504a..91c7b8410a08 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -825,6 +825,101 @@ basic_ipv6_cleanup() pfsynct_cleanup } +atf_test_case "route_to" "cleanup" +route_to_head() +{ + atf_set descr 'Test route-to with default rule' + atf_set require.user root + atf_set require.progs scapy +} + +route_to_body() +{ + pfsynct_init + + epair_sync=$(vnet_mkepair) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + epair_out_one=$(vnet_mkepair) + epair_out_two=$(vnet_mkepair) + + vnet_mkjail one ${epair_one}a ${epair_sync}a ${epair_out_one}a + vnet_mkjail two ${epair_two}a ${epair_sync}b ${epair_out_two}a + + # pfsync interface + jexec one ifconfig ${epair_sync}a 192.0.2.1/24 up + jexec one ifconfig ${epair_one}a 198.51.100.1/24 up + jexec one ifconfig ${epair_out_one}a 203.0.113.1/24 up + jexec one ifconfig ${epair_out_one}a name outif + jexec one sysctl net.inet.ip.forwarding=1 + jexec one arp -s 203.0.113.254 00:01:02:03:04:05 + jexec one ifconfig pfsync0 \ + syncdev ${epair_sync}a \ + maxupd 1 \ + up + + jexec two ifconfig ${epair_sync}b 192.0.2.2/24 up + jexec two ifconfig ${epair_two}a 198.51.100.2/24 up + jexec two ifconfig ${epair_out_two}a 203.0.113.2/24 up + #jexec two ifconfig ${epair_out_two}a name outif + jexec two sysctl net.inet.ip.forwarding=1 + jexec two arp -s 203.0.113.254 00:01:02:03:04:05 + jexec two ifconfig pfsync0 \ + syncdev ${epair_sync}b \ + maxupd 1 \ + up + + # Enable pf! + jexec one pfctl -e + pft_set_rules one \ + "set skip on ${epair_sync}a" \ + "pass out route-to (outif 203.0.113.254)" + jexec two pfctl -e + + # Make sure we have different rulesets so the synced state is associated with + # V_pf_default_rule + pft_set_rules two \ + "set skip on ${epair_sync}b" \ + "pass out route-to (outif 203.0.113.254)" \ + "pass out proto tcp" + + ifconfig ${epair_one}b 198.51.100.254/24 up + ifconfig ${epair_two}b 198.51.100.253/24 up + route add -net 203.0.113.0/24 198.51.100.1 + ifconfig ${epair_two}b up + ifconfig ${epair_out_one}b up + ifconfig ${epair_out_two}b up + + atf_check -s exit:0 env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_one}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_one}b + + # Allow time for sync + ifconfig ${epair_one}b inet 198.51.100.254 -alias + route del -net 203.0.113.0/24 198.51.100.1 + route add -net 203.0.113.0/24 198.51.100.2 + + sleep 2 + + # Now try to trigger the state on the other pfsync member + env PYTHONPATH=${common_dir} \ + ${common_dir}/pft_ping.py \ + --sendif ${epair_two}b \ + --fromaddr 198.51.100.254 \ + --to 203.0.113.254 \ + --recvif ${epair_out_two}b + + true +} + +route_to_cleanup() +{ + pfsynct_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -837,4 +932,5 @@ atf_init_test_cases() atf_add_test_case "timeout" atf_add_test_case "basic_ipv6_unicast" atf_add_test_case "basic_ipv6" + atf_add_test_case "route_to" } From nobody Sat Oct 7 18:00:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2tPt2Fb6z4x7pH; Sat, 7 Oct 2023 18:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2tPt1qX2z3Zd2; Sat, 7 Oct 2023 18:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696701650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuEhUwKkQk03qdUfoG+SV4Pt31z/ku+mDQ/e/JV2MeY=; b=Et9JIBbkUK4qEl8JaSFBPZuF3lVqXvfXCo3e68IGc3DJPQeEQFpjgQbak/FpqSz7TnvLHp NFt8ZBikSEkWRxz2UlpUJPgY1Gasq1lHHxXXtVdRh5Zyk2BP/vn+7IOlfM0/xNvIir4PWS HsZcuX7BnRlke4CAinbteVmks8E18lIsf0TT7M6fkfp3VrLhjbgMsyfKcFfTbqyDYAhqWi sJWOTULPd/VZ+V8+H9f50eJdjIan6FScDNccaGwL0WMGgXn5sadDeh2IQN6PqByrLzFfNc cHektxJrLOjDfLGv9H5bHx0BhASJFLGnnUUon68cwZsXMFGxc9nj6kN5RVJ+kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696701650; a=rsa-sha256; cv=none; b=Fc+yrMTiQ3PaW7GjroGiZJOxE9bBOrYvUuy301VUkaw9DmPa05luRfqcXPDA4ILh+eDIsi yUfFa0PChtzx8RS66/UCAHMNxB+6tMAmly4YZoDxLLBIvcxKq8NitqV8TFzgfRegDcDyp7 V6HslLyP24OcJCcF/kMXEhbsf5BVvo8bTp9rKnQC6FYfqa2Ej9PTtJjudU0O4hkY8RIC3X WN0xeMaPFn33oZXZhjGz19lk20Vp+rLzeW31MEhqgTNJcljug5oMP5QWI4X+Itq/6Mri2N 5d8WL0GcGKgSmn7aDhTbwuUnRC+1CShiCl+tmgSaPqUesxc7+4dbSzfUXd2Efg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696701650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuEhUwKkQk03qdUfoG+SV4Pt31z/ku+mDQ/e/JV2MeY=; b=Xio5hodY7YRGJq7f2Zo//9eAgRCxD7P+FAp67K8pdyQW1EgYjQL6wQYOngLlOFIlb6ndVY QSvdkxEI+aarf9WNwFTKEoJUj8ryPGTHKg8Ac+v1L5XR34wQO9jGEbhNtLr+KZyOg2Caq7 V6vLA0fw/4IKQbz/7aJRXVAJKyvq+MPZs73T/gU8kyZbn9ab1rem+grXvNB25XtI/unw9W AXoNQY47erNfqGBtOgm3PM/bR8Q60Iq3BqFsmG9ZfjeWKa7/dp5eroyJmG/O8Jht188q6e kysMKl4CPz6spxdNMPkoq1T6fRTL0RTCX+vh63irhcauNCl9k9FeQ92pJP+cQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2tPt0w8nzgvY; Sat, 7 Oct 2023 18:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397I0oB4047771; Sat, 7 Oct 2023 18:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397I0oN0047768; Sat, 7 Oct 2023 18:00:50 GMT (envelope-from git) Date: Sat, 7 Oct 2023 18:00:50 GMT Message-Id: <202310071800.397I0oN0047768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 128f63cedc14 - main - (s)tty: add support for IUTF8 input flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 128f63cedc14ae21b35f74e11e2fe1a5659c58e8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=128f63cedc14ae21b35f74e11e2fe1a5659c58e8 commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8 Author: Bojan Novković AuthorDate: 2023-10-07 17:59:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-07 17:59:57 +0000 (s)tty: add support for IUTF8 input flag This patch adds the necessary kernel and stty code to support setting the IUTF8 flag for ttys. It is the first of two patches that fix backspace behaviour for UTF-8 encoded characters when in canonical mode. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42066 --- bin/stty/modes.c | 2 ++ bin/stty/print.c | 1 + bin/stty/stty.1 | 3 +++ share/man/man4/termios.4 | 2 ++ sys/kern/tty.c | 4 ++-- sys/sys/_termios.h | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/stty/modes.c b/bin/stty/modes.c index ce39083d7d63..3818677ddc4e 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -126,6 +126,8 @@ static const struct modes imodes[] = { { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index 07a3c2058474..33472bbccea1 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -127,6 +127,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt) put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 9e9405928c67..c572a657a997 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -224,6 +224,9 @@ if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. +.It Cm iutf8 Pq Fl iutf8 +Assume that input characters are UTF-8 encoded. Setting this flag +causes backspace to properly delete multibyte characters in canonical mode. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index d3a5c8fa582d..80015025345e 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -884,6 +884,8 @@ following masks: /* any char will restart after stop */ .It Dv IMAXBEL /* ring bell on input queue full */ +.It Dv IUTF8 +/* assume input is UTF-8 encoded */ .El .Pp In the context of asynchronous serial data transmission, a break diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 134c1dfba98b..620233947410 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -85,8 +85,8 @@ static const char *dev_console_filename; /* * Flags that are supported and stored by this implementation. */ -#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|\ - INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL) +#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|\ + IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL|IUTF8) #define TTYSUP_OFLAG (OPOST|ONLCR|TAB3|ONOEOT|OCRNL|ONOCR|ONLRET) #define TTYSUP_LFLAG (ECHOKE|ECHOE|ECHOK|ECHO|ECHONL|ECHOPRT|\ ECHOCTL|ISIG|ICANON|ALTWERASE|IEXTEN|TOSTOP|\ diff --git a/sys/sys/_termios.h b/sys/sys/_termios.h index 327ffcb2f98b..823752732ee2 100644 --- a/sys/sys/_termios.h +++ b/sys/sys/_termios.h @@ -97,6 +97,7 @@ #endif #if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ +#define IUTF8 0x00004000 /* assume input is utf-8 encoded */ #endif /* From nobody Sat Oct 7 18:00:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2tPv44vqz4x7gd; Sat, 7 Oct 2023 18:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2tPv3B6Hz3ZXF; Sat, 7 Oct 2023 18:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696701651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PjtaIpZBXhLRrOV4iwKdzmXx9naDb4GhbYLInmVVkls=; b=R3KJL7Y385p5PmnicISMSWe7nA/GXixZMHwm24os1uu5j0OwHboL5V9d9RSClSmEOMfLUE lQX05sIvMWbZHUWhX/TFqNFcARFkA3Qdb2T5Dopgc9BZnZDTEGc+AppcEg9PUDNCJNbTTN W/gl/at2DPRGy6BbsAWgD/ITVxlzghuCx1/vWxbOtMUGYQm0sPgyh6CexoJHAb8IUDxZ7v EqvWIottuh/z237L9oIOiXk4jOLrbPFTSBBRXHwN9rW+J3UELA718g2zjBtuKf6LpYPp4x 3JN/jg+5/U1T+Mw/1PjIbQiLcxCxATD1XkmbeoHLWqthTNSIo0spH2DcLRdJwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696701651; a=rsa-sha256; cv=none; b=yt8dKbzS//isz2ANV8BE7jhtNIFzS8tybs07Pcmis8+q1BmpiNBfI4SJ1Qa2J8HABveaxg oJWIU6N1wgOsJaI8d/W8L9ft0qe+638xGbnh9dC1f15XCVhupPu1XkB7cnjo8gaGHcvBX5 YER4FaXrrIw94gUriKPJ4BF7lp0T49BvniKtkmo6W/eIEjvE+D6w1OVJ4K5L81+bkBbVAp wlCz+FCTIL+8n5qqsRx7wfbx+vwGK+ILw4bQG13/QSkg1xrpYv5zKOJZ3zYoixRGrWZjTz p3RyUZABgaf+sY+/DwkS2WFE3Euh7nfFe3cD9pSoX6hNIoX7izaE5Mf3Bu/Z8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696701651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PjtaIpZBXhLRrOV4iwKdzmXx9naDb4GhbYLInmVVkls=; b=o8/x+JsKdPl+IQgtv91I498TxfIgP4Pmsiu0RfakTsNGaP5mDGVelPTtXp+JmVb0+M+gCw XTZZh0IaPRJRQNPXzs30KWeEaUchVh2Oc3J/EXir/CyVYpSF/wV5aurkkJiWTZLnHoIuN+ hKajFXK7ymbtOJIOkvQNW4q6lkVaDIfMqEB91aDRvbtq2i9acSF6yHUFrWghrBCgkiBJik xdHYKDFzM65iH1MHKdvEVjV4cDD7FBZYvH7NGuFi3Puvrjtl/w5413CYpvbVvccNbinz7m +guO+6gitOmZ+H77B99LF/35kuZCM2M5xOgcOXeQdWozCASHwlyPAA9Eq/OdXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2tPv1xRTzgkD; Sat, 7 Oct 2023 18:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397I0pnj047834; Sat, 7 Oct 2023 18:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397I0p9G047831; Sat, 7 Oct 2023 18:00:51 GMT (envelope-from git) Date: Sat, 7 Oct 2023 18:00:51 GMT Message-Id: <202310071800.397I0p9G047831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9e589b093857 - main - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e589b0938579f3f4d89fa5c051f845bf754184d Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9e589b0938579f3f4d89fa5c051f845bf754184d commit 9e589b0938579f3f4d89fa5c051f845bf754184d Author: Bojan Novković AuthorDate: 2023-10-07 18:00:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-07 18:00:11 +0000 tty: fix improper backspace behaviour for UTF8 characters when in canonical mode This patch adds additional logic in ttydisc_rubchar() to properly handle backspace behaviour for UTF-8 characters. Currently, typing in a backspace after a UTF8 character will delete only one byte from the byte sequence, leaving garbled output in the tty's output queue. With this change all of the character's bytes are deleted. This change is only active when the IUTF8 flag is set (see 19054eb6053189144aa962b2ecc1bf5087758a3e "(s)tty: add support for IUTF8 input flag") The code uses the teken_wcwidth() function to properly handle character column widths for different code points, and adds the teken_utf8_bytes_to_codepoint() function that converts a UTF-8 byte sequence to a codepoint, as specified in RFC3629. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42067 --- sys/kern/tty_ttydisc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ sys/teken/teken_wcwidth.h | 30 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index 665275ee93e7..eae7162e31c0 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -43,6 +43,9 @@ #include #include +#include +#include + /* * Standard TTYDISC `termios' line discipline. */ @@ -78,8 +81,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, tty_nout, CTLFLAG_RD, /* Character is alphanumeric. */ #define CTL_ALNUM(c) (((c) >= '0' && (c) <= '9') || \ ((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) +/* Character is UTF8-encoded. */ +#define CTL_UTF8(c) (!!((c) & 0x80)) +/* Character is a UTF8 continuation byte. */ +#define CTL_UTF8_CONT(c) (((c) & 0xc0) == 0x80) #define TTY_STACKBUF 256 +#define UTF8_STACKBUF 4 void ttydisc_open(struct tty *tp) @@ -800,6 +808,72 @@ ttydisc_rubchar(struct tty *tp) ttyoutq_write_nofrag(&tp->t_outq, "\b\b\b\b\b\b\b\b", tablen); return (0); + } else if ((tp->t_termios.c_iflag & IUTF8) != 0 && + CTL_UTF8(c)) { + uint8_t bytes[UTF8_STACKBUF] = { 0 }; + int curidx = UTF8_STACKBUF - 1, cwidth = 1, + nb = 0; + teken_char_t codepoint; + + /* Save current byte. */ + bytes[curidx] = c; + curidx--; + nb++; + /* Loop back through inq until we hit the + * leading byte. */ + while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) { + ttyinq_peekchar(&tp->t_inq, &c, "e); + ttyinq_unputchar(&tp->t_inq); + bytes[curidx] = c; + curidx--; + nb++; + } + /* + * Shift array so that the leading + * byte ends up at idx 0. + */ + if (nb < UTF8_STACKBUF) + memmove(&bytes[0], &bytes[curidx + 1], + nb * sizeof(uint8_t)); + /* Check for malformed UTF8 characters. */ + if (nb == UTF8_STACKBUF && + CTL_UTF8_CONT(bytes[0])) { + /* + * Place all bytes back into the inq and + * delete the last byte only. + */ + ttyinq_write(&tp->t_inq, bytes, + UTF8_STACKBUF, 0); + } else { + /* Find codepoint and width. */ + codepoint = + teken_utf8_bytes_to_codepoint(bytes, + nb); + if (codepoint != + TEKEN_UTF8_INVALID_CODEPOINT) { + cwidth = teken_wcwidth( + codepoint); + } else { + /* + * Place all bytes back into the + * inq and fall back to + * default behaviour. + */ + ttyinq_write(&tp->t_inq, bytes, + nb, 0); + } + } + tp->t_column -= cwidth; + /* + * Delete character by punching + * 'cwidth' spaces over it. + */ + if (cwidth == 1) + ttyoutq_write_nofrag(&tp->t_outq, + "\b \b", 3); + else if (cwidth == 2) + ttyoutq_write_nofrag(&tp->t_outq, + "\b\b \b\b", 6); } else { /* * Remove a regular character by diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f57a185c2433..f5a23dbc9679 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -8,6 +8,8 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +#define TEKEN_UTF8_INVALID_CODEPOINT -1 + struct interval { teken_char_t first; teken_char_t last; @@ -116,3 +118,31 @@ static int teken_wcwidth(teken_char_t ucs) (ucs >= 0x20000 && ucs <= 0x2fffd) || (ucs >= 0x30000 && ucs <= 0x3fffd))); } + +/* + * Converts an UTF-8 byte sequence to a codepoint as specified in + * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function + * expects the 'bytes' array to start with the leading character. + */ +static teken_char_t +teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) +{ + + /* Check for malformed characters. */ + if (bitcount(bytes[0] & 0xf0) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); + + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } +} From nobody Sat Oct 7 21:04:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2yTf6TTCz4wPb9; Sat, 7 Oct 2023 21:04:22 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2yTf5yflz4VXW; Sat, 7 Oct 2023 21:04:22 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696712662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MJAhbwmsnrgxrT3YBjqbX9IOfDGsRuLeOR1/EwE1Qag=; b=ISxVMwGVVBpxU6bRMZSoUNW2LFpPw7Bx79/HAkcKcSFXnxU1atiVfiFr4Vm740NhKkqPfZ o53s7ouUzgHQ7AIpSLrUVsuzBN+vEKl7eMmkPys8Uymto6b3mAZz/dYA+jkmc19C1rFi0n 7cCguRmmYFAAPQSmFDhEm+wb98Rb60jteV0W7/DjK68MbP0okwkdVErAKQlZT3T8pzZtxi 6uGpfJ1Qy0LHTRxD9kO4EvvotzEuAeqNp6vV27jEZeVd43z8MheDhwZM/kQVdRt/le1r47 sGqQmbAY/EoPYAakQZL94eL86FkR8kAgu+edgNgQfyJJaCncsTq5Ku8vV76mTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696712662; a=rsa-sha256; cv=none; b=DM9Kxy8EqYl40X762zwyD3N2W6J5SY8pQfUhIefIPxKVR0s+XJfw6xVLvPvxnvhAp9S+Uo Pqk8KAzvWMeDhgRXnKVDeYirH+xomwQQiH7mWTVhp7i/TV6Jk4jzrlhHOCEd4BDDZ4Fvic 8E852odcKU37RQIv8LaP6jnUX9+s6CcOpaf5YWMmkTpT5Xp+5Z64LOGy9bhtzM43lwpBYB KCCWieKNdL5xcwHSSs0XfAMwMWSeNpQG9m7DZAll3FdQJ+0Y659zCvDBu7LL457z5qrqT2 NzmGLCycicoaV8Yk6C7B/VcWLxxq3W4w9KKilKNAbdpyGV3+mQzIb/2Q6c9WOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696712662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MJAhbwmsnrgxrT3YBjqbX9IOfDGsRuLeOR1/EwE1Qag=; b=kge2aQgRLbTt/LAXlG9090mQiSkvd+7D6XTs3av/F68DsdmlaTD7UXWhson4Qk0M5YDgwj Zy1HwWYBp/yz8oc/TuZcuJipUJx2K62Q3OV1QQ/F7Mx4F/jwbQuRZiwfoXhRm+9J2CA6ac kCb59cQholWrgZA63b0TxouWwsRIdLNw22URVr3KLzdQuqmbw+IhewGSFOLMDvZPi5Oc67 r6heKAc+tdkPbSzsyowktVZc8lRpapbrytGKiKMDXRjt4Azzew9OjoQcAhhvfcg6CMbdff BqKgNkKBhPeomP9GDBOEm7Xra0hYGJqzOkHcRtfpqesrKY9UyHmTsgFa+X5d6w== Received: from [10.216.0.102] (unknown [188.243.165.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S2yTf0YNgzvrG; Sat, 7 Oct 2023 21:04:21 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: <816f8408-865a-488f-a139-ad4bae2301fb@FreeBSD.org> Date: Sun, 8 Oct 2023 00:04:19 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9e589b093857 - main - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode Content-Language: ru, en-GB, en-US To: Christos Margiolis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202310071800.397I0p9G047831@gitrepo.freebsd.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: <202310071800.397I0p9G047831@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------gKOlBnU1tFebtn0FXPxvZfe0" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------gKOlBnU1tFebtn0FXPxvZfe0 Content-Type: multipart/mixed; boundary="------------Vuuk9vmWgU0JvpFOp1Rm0g4s"; protected-headers="v1" From: Dima Panov To: Christos Margiolis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <816f8408-865a-488f-a139-ad4bae2301fb@FreeBSD.org> Subject: Re: git: 9e589b093857 - main - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode References: <202310071800.397I0p9G047831@gitrepo.freebsd.org> In-Reply-To: <202310071800.397I0p9G047831@gitrepo.freebsd.org> --------------Vuuk9vmWgU0JvpFOp1Rm0g4s Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 TW9pbi1tb2luIQ0KDQpJdCBicmVha3MgdGhlIGJ1aWxkICUoDQoNCg0KSW4gZmlsZSBpbmNs dWRlZCBmcm9tIC91c3IvbG9jYWwvcG91ZHJpZXJlL2phaWxzLzE1MGFhcmNoNjQvdXNyL3Ny Yy9zeXMvdGVrZW4vdGVrZW4uYzo3MDoNCi91c3IvbG9jYWwvcG91ZHJpZXJlL2phaWxzLzE1 MGFhcmNoNjQvdXNyL3NyYy9zeXMvdGVrZW4vdGVrZW5fd2N3aWR0aC5oOjEzMjo3OiBlcnJv cjogY2FsbCB0byB1bmRlY2xhcmVkIGZ1bmN0aW9uICdiaXRjb3VudCc7IElTTyBDOTkgYW5k IGxhdGVyIGRvIG5vdCBzdXBwb3J0IGltcGxpY2l0IGZ1bmN0aW9uIGRlY2xhcmF0aW9ucyBb LVdlcnJvciwtV2ltcGxpY2l0LWZ1bmN0aW9uLWRlY2xhcmF0aW9uXQ0KICAgaWYgKGJpdGNv dW50KGJ5dGVzWzBdICYgMHhmMCkgIT0gbmJ5dGVzKQ0KICAgICAgIF4NCjEgZXJyb3IgZ2Vu ZXJhdGVkLg0KKioqIFt0ZWtlbi5vXSBFcnJvciBjb2RlIDENCg0KbWFrZVs1XTogc3RvcHBl ZCBpbiAvdXNyL2xvY2FsL3BvdWRyaWVyZS9qYWlscy8xNTBhYXJjaDY0L3Vzci9zcmMvc3Rh bmQvZWZpL2xpYmVmaQ0KDQoNCg0KT24gMDcuMTAuMjAyMyAyMTowMCwgQ2hyaXN0b3MgTWFy Z2lvbGlzIHdyb3RlOg0KPiBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBj aHJpc3RvczoNCj4gDQo+IFVSTDogaHR0cHM6Ly9jZ2l0LkZyZWVCU0Qub3JnL3NyYy9jb21t aXQvP2lkPTllNTg5YjA5Mzg1NzlmM2Y0ZDg5ZmE1YzA1MWY4NDViZjc1NDE4NGQNCj4gDQo+ IGNvbW1pdCA5ZTU4OWIwOTM4NTc5ZjNmNGQ4OWZhNWMwNTFmODQ1YmY3NTQxODRkDQo+IEF1 dGhvcjogICAgIEJvamFuIE5vdmtvdmnEhyA8Ym9qYW4ubm92a292aWNAZmVyLmhyPg0KPiBB dXRob3JEYXRlOiAyMDIzLTEwLTA3IDE4OjAwOjExICswMDAwDQo+IENvbW1pdDogICAgIENo cmlzdG9zIE1hcmdpb2xpcyA8Y2hyaXN0b3NARnJlZUJTRC5vcmc+DQo+IENvbW1pdERhdGU6 IDIwMjMtMTAtMDcgMTg6MDA6MTEgKzAwMDANCj4gDQo+ICAgICAgdHR5OiBmaXggaW1wcm9w ZXIgYmFja3NwYWNlIGJlaGF2aW91ciBmb3IgVVRGOCBjaGFyYWN0ZXJzIHdoZW4gaW4gY2Fu b25pY2FsIG1vZGUNCj4gICAgICANCj4gICAgICBUaGlzIHBhdGNoIGFkZHMgYWRkaXRpb25h bCBsb2dpYyBpbiB0dHlkaXNjX3J1YmNoYXIoKSB0byBwcm9wZXJseSBoYW5kbGUNCj4gICAg ICBiYWNrc3BhY2UgYmVoYXZpb3VyIGZvciBVVEYtOCBjaGFyYWN0ZXJzLg0KPiAgICAgIA0K PiAgICAgIEN1cnJlbnRseSwgdHlwaW5nIGluIGEgYmFja3NwYWNlIGFmdGVyIGEgVVRGOCBj aGFyYWN0ZXIgd2lsbCBkZWxldGUgb25seQ0KPiAgICAgIG9uZSBieXRlIGZyb20gdGhlIGJ5 dGUgc2VxdWVuY2UsIGxlYXZpbmcgZ2FyYmxlZCBvdXRwdXQgaW4gdGhlIHR0eSdzDQo+ICAg ICAgb3V0cHV0IHF1ZXVlLiBXaXRoIHRoaXMgY2hhbmdlIGFsbCBvZiB0aGUgY2hhcmFjdGVy J3MgYnl0ZXMgYXJlIGRlbGV0ZWQuDQo+ICAgICAgVGhpcyBjaGFuZ2UgaXMgb25seSBhY3Rp dmUgd2hlbiB0aGUgSVVURjggZmxhZyBpcyBzZXQgKHNlZQ0KPiAgICAgIDE5MDU0ZWI2MDUz MTg5MTQ0YWE5NjJiMmVjYzFiZjUwODc3NThhM2UgIihzKXR0eTogYWRkIHN1cHBvcnQgZm9y IElVVEY4DQo+ICAgICAgaW5wdXQgZmxhZyIpDQo+ICAgICAgDQo+ICAgICAgVGhlIGNvZGUg dXNlcyB0aGUgdGVrZW5fd2N3aWR0aCgpIGZ1bmN0aW9uIHRvIHByb3Blcmx5IGhhbmRsZSBj aGFyYWN0ZXINCj4gICAgICBjb2x1bW4gd2lkdGhzIGZvciBkaWZmZXJlbnQgY29kZSBwb2lu dHMsIGFuZCBhZGRzIHRoZQ0KPiAgICAgIHRla2VuX3V0ZjhfYnl0ZXNfdG9fY29kZXBvaW50 KCkgZnVuY3Rpb24gdGhhdCBjb252ZXJ0cyBhIFVURi04IGJ5dGUNCj4gICAgICBzZXF1ZW5j ZSB0byBhIGNvZGVwb2ludCwgYXMgc3BlY2lmaWVkIGluIFJGQzM2MjkuDQo+ICAgICAgDQo+ ICAgICAgUmVwb3J0ZWQgYnk6ICAgIGNocmlzdG9zDQo+ICAgICAgUmV2aWV3ZWQgYnk6ICAg IGNocmlzdG9zLCBpbXANCj4gICAgICBNRkMgYWZ0ZXI6ICAgICAgMiB3ZWVrcw0KPiAgICAg IERpZmZlcmVudGlhbCBSZXZpc2lvbjogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9E NDIwNjcNCj4gLS0tDQo+ICAgc3lzL2tlcm4vdHR5X3R0eWRpc2MuYyAgICB8IDc0ICsrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrDQo+ICAgc3lzL3Rl a2VuL3Rla2VuX3djd2lkdGguaCB8IDMwICsrKysrKysrKysrKysrKysrKysNCj4gICAyIGZp bGVzIGNoYW5nZWQsIDEwNCBpbnNlcnRpb25zKCspDQo+IA0KPiBkaWZmIC0tZ2l0IGEvc3lz L2tlcm4vdHR5X3R0eWRpc2MuYyBiL3N5cy9rZXJuL3R0eV90dHlkaXNjLmMNCj4gaW5kZXgg NjY1Mjc1ZWU5M2U3Li5lYWU3MTYyZTMxYzAgMTAwNjQ0DQo+IC0tLSBhL3N5cy9rZXJuL3R0 eV90dHlkaXNjLmMNCj4gKysrIGIvc3lzL2tlcm4vdHR5X3R0eWRpc2MuYw0KPiBAQCAtNDMs NiArNDMsOSBAQA0KPiAgICNpbmNsdWRlIDxzeXMvdWlvLmg+DQo+ICAgI2luY2x1ZGUgPHN5 cy92bm9kZS5oPg0KPiAgIA0KPiArI2luY2x1ZGUgPHRla2VuL3Rla2VuLmg+DQo+ICsjaW5j bHVkZSA8dGVrZW4vdGVrZW5fd2N3aWR0aC5oPg0KPiArDQo+ICAgLyoNCj4gICAgKiBTdGFu ZGFyZCBUVFlESVNDIGB0ZXJtaW9zJyBsaW5lIGRpc2NpcGxpbmUuDQo+ICAgICovDQo+IEBA IC03OCw4ICs4MSwxMyBAQCBTWVNDVExfVUxPTkcoX2tlcm4sIE9JRF9BVVRPLCB0dHlfbm91 dCwgQ1RMRkxBR19SRCwNCj4gICAvKiBDaGFyYWN0ZXIgaXMgYWxwaGFudW1lcmljLiAqLw0K PiAgICNkZWZpbmUgQ1RMX0FMTlVNKGMpCSgoKGMpID49ICcwJyAmJiAoYykgPD0gJzknKSB8 fCBcDQo+ICAgICAgICgoYykgPj0gJ2EnICYmIChjKSA8PSAneicpIHx8ICgoYykgPj0gJ0En ICYmIChjKSA8PSAnWicpKQ0KPiArLyogQ2hhcmFjdGVyIGlzIFVURjgtZW5jb2RlZC4gKi8N Cj4gKyNkZWZpbmUgQ1RMX1VURjgoYykgKCEhKChjKSAmIDB4ODApKQ0KPiArLyogQ2hhcmFj dGVyIGlzIGEgVVRGOCBjb250aW51YXRpb24gYnl0ZS4gKi8NCj4gKyNkZWZpbmUgQ1RMX1VU RjhfQ09OVChjKSAoKChjKSAmIDB4YzApID09IDB4ODApDQo+ICAgDQo+ICAgI2RlZmluZQlU VFlfU1RBQ0tCVUYJMjU2DQo+ICsjZGVmaW5lIFVURjhfU1RBQ0tCVUYgNA0KPiAgIA0KPiAg IHZvaWQNCj4gICB0dHlkaXNjX29wZW4oc3RydWN0IHR0eSAqdHApDQo+IEBAIC04MDAsNiAr ODA4LDcyIEBAIHR0eWRpc2NfcnViY2hhcihzdHJ1Y3QgdHR5ICp0cCkNCj4gICAJCQkJdHR5 b3V0cV93cml0ZV9ub2ZyYWcoJnRwLT50X291dHEsDQo+ICAgCQkJCSAgICAiXGJcYlxiXGJc YlxiXGJcYiIsIHRhYmxlbik7DQo+ICAgCQkJCXJldHVybiAoMCk7DQo+ICsJCQl9IGVsc2Ug aWYgKCh0cC0+dF90ZXJtaW9zLmNfaWZsYWcgJiBJVVRGOCkgIT0gMCAmJg0KPiArCQkJICAg IENUTF9VVEY4KGMpKSB7DQo+ICsJCQkJdWludDhfdCBieXRlc1tVVEY4X1NUQUNLQlVGXSA9 IHsgMCB9Ow0KPiArCQkJCWludCBjdXJpZHggPSBVVEY4X1NUQUNLQlVGIC0gMSwgY3dpZHRo ID0gMSwNCj4gKwkJCQkgICAgbmIgPSAwOw0KPiArCQkJCXRla2VuX2NoYXJfdCBjb2RlcG9p bnQ7DQo+ICsNCj4gKwkJCQkvKiBTYXZlIGN1cnJlbnQgYnl0ZS4gKi8NCj4gKwkJCQlieXRl c1tjdXJpZHhdID0gYzsNCj4gKwkJCQljdXJpZHgtLTsNCj4gKwkJCQluYisrOw0KPiArCQkJ CS8qIExvb3AgYmFjayB0aHJvdWdoIGlucSB1bnRpbCB3ZSBoaXQgdGhlDQo+ICsJCQkJICog bGVhZGluZyBieXRlLiAqLw0KPiArCQkJCXdoaWxlIChDVExfVVRGOF9DT05UKGMpICYmIG5i IDwgVVRGOF9TVEFDS0JVRikgew0KPiArCQkJCQl0dHlpbnFfcGVla2NoYXIoJnRwLT50X2lu cSwgJmMsICZxdW90ZSk7DQo+ICsJCQkJCXR0eWlucV91bnB1dGNoYXIoJnRwLT50X2lucSk7 DQo+ICsJCQkJCWJ5dGVzW2N1cmlkeF0gPSBjOw0KPiArCQkJCQljdXJpZHgtLTsNCj4gKwkJ CQkJbmIrKzsNCj4gKwkJCQl9DQo+ICsJCQkJLyoNCj4gKwkJCQkgKiBTaGlmdCBhcnJheSBz byB0aGF0IHRoZSBsZWFkaW5nDQo+ICsJCQkJICogYnl0ZSBlbmRzIHVwIGF0IGlkeCAwLg0K PiArCQkJCSAqLw0KPiArCQkJCWlmIChuYiA8IFVURjhfU1RBQ0tCVUYpDQo+ICsJCQkJCW1l bW1vdmUoJmJ5dGVzWzBdLCAmYnl0ZXNbY3VyaWR4ICsgMV0sDQo+ICsJCQkJCSAgICBuYiAq IHNpemVvZih1aW50OF90KSk7DQo+ICsJCQkJLyogQ2hlY2sgZm9yIG1hbGZvcm1lZCBVVEY4 IGNoYXJhY3RlcnMuICovDQo+ICsJCQkJaWYgKG5iID09IFVURjhfU1RBQ0tCVUYgJiYNCj4g KwkJCQkgICAgQ1RMX1VURjhfQ09OVChieXRlc1swXSkpIHsNCj4gKwkJCQkJLyoNCj4gKwkJ CQkJICogUGxhY2UgYWxsIGJ5dGVzIGJhY2sgaW50byB0aGUgaW5xIGFuZA0KPiArCQkJCQkg KiBkZWxldGUgdGhlIGxhc3QgYnl0ZSBvbmx5Lg0KPiArCQkJCQkgKi8NCj4gKwkJCQkJdHR5 aW5xX3dyaXRlKCZ0cC0+dF9pbnEsIGJ5dGVzLA0KPiArCQkJCQkgICAgVVRGOF9TVEFDS0JV RiwgMCk7DQo+ICsJCQkJfSBlbHNlIHsNCj4gKwkJCQkJLyogRmluZCBjb2RlcG9pbnQgYW5k IHdpZHRoLiAqLw0KPiArCQkJCQljb2RlcG9pbnQgPQ0KPiArCQkJCQkgICAgdGVrZW5fdXRm OF9ieXRlc190b19jb2RlcG9pbnQoYnl0ZXMsDQo+ICsJCQkJCQluYik7DQo+ICsJCQkJCWlm IChjb2RlcG9pbnQgIT0NCj4gKwkJCQkJICAgIFRFS0VOX1VURjhfSU5WQUxJRF9DT0RFUE9J TlQpIHsNCj4gKwkJCQkJCWN3aWR0aCA9IHRla2VuX3djd2lkdGgoDQo+ICsJCQkJCQkgICAg Y29kZXBvaW50KTsNCj4gKwkJCQkJfSBlbHNlIHsNCj4gKwkJCQkJCS8qDQo+ICsJCQkJCQkg KiBQbGFjZSBhbGwgYnl0ZXMgYmFjayBpbnRvIHRoZQ0KPiArCQkJCQkJICogaW5xIGFuZCBm YWxsIGJhY2sgdG8NCj4gKwkJCQkJCSAqIGRlZmF1bHQgYmVoYXZpb3VyLg0KPiArCQkJCQkJ ICovDQo+ICsJCQkJCQl0dHlpbnFfd3JpdGUoJnRwLT50X2lucSwgYnl0ZXMsDQo+ICsJCQkJ CQkgICAgbmIsIDApOw0KPiArCQkJCQl9DQo+ICsJCQkJfQ0KPiArCQkJCXRwLT50X2NvbHVt biAtPSBjd2lkdGg7DQo+ICsJCQkJLyoNCj4gKwkJCQkgKiBEZWxldGUgY2hhcmFjdGVyIGJ5 IHB1bmNoaW5nDQo+ICsJCQkJICogJ2N3aWR0aCcgc3BhY2VzIG92ZXIgaXQuDQo+ICsJCQkJ ICovDQo+ICsJCQkJaWYgKGN3aWR0aCA9PSAxKQ0KPiArCQkJCQl0dHlvdXRxX3dyaXRlX25v ZnJhZygmdHAtPnRfb3V0cSwNCj4gKwkJCQkJICAgICJcYiBcYiIsIDMpOw0KPiArCQkJCWVs c2UgaWYgKGN3aWR0aCA9PSAyKQ0KPiArCQkJCQl0dHlvdXRxX3dyaXRlX25vZnJhZygmdHAt PnRfb3V0cSwNCj4gKwkJCQkJICAgICJcYlxiICBcYlxiIiwgNik7DQo+ICAgCQkJfSBlbHNl IHsNCj4gICAJCQkJLyoNCj4gICAJCQkJICogUmVtb3ZlIGEgcmVndWxhciBjaGFyYWN0ZXIg YnkNCj4gZGlmZiAtLWdpdCBhL3N5cy90ZWtlbi90ZWtlbl93Y3dpZHRoLmggYi9zeXMvdGVr ZW4vdGVrZW5fd2N3aWR0aC5oDQo+IGluZGV4IGY1N2ExODVjMjQzMy4uZjVhMjNkYmM5Njc5 IDEwMDY0NA0KPiAtLS0gYS9zeXMvdGVrZW4vdGVrZW5fd2N3aWR0aC5oDQo+ICsrKyBiL3N5 cy90ZWtlbi90ZWtlbl93Y3dpZHRoLmgNCj4gQEAgLTgsNiArOCw4IEBADQo+ICAgICogTGF0 ZXN0IHZlcnNpb246IGh0dHA6Ly93d3cuY2wuY2FtLmFjLnVrL35tZ2syNS91Y3Mvd2N3aWR0 aC5jDQo+ICAgICovDQo+ICAgDQo+ICsjZGVmaW5lIFRFS0VOX1VURjhfSU5WQUxJRF9DT0RF UE9JTlQgLTENCj4gKw0KPiAgIHN0cnVjdCBpbnRlcnZhbCB7DQo+ICAgICB0ZWtlbl9jaGFy X3QgZmlyc3Q7DQo+ICAgICB0ZWtlbl9jaGFyX3QgbGFzdDsNCj4gQEAgLTExNiwzICsxMTgs MzEgQEAgc3RhdGljIGludCB0ZWtlbl93Y3dpZHRoKHRla2VuX2NoYXJfdCB1Y3MpDQo+ICAg ICAgICAgKHVjcyA+PSAweDIwMDAwICYmIHVjcyA8PSAweDJmZmZkKSB8fA0KPiAgICAgICAg ICh1Y3MgPj0gMHgzMDAwMCAmJiB1Y3MgPD0gMHgzZmZmZCkpKTsNCj4gICB9DQo+ICsNCj4g Ky8qDQo+ICsgKiBDb252ZXJ0cyBhbiBVVEYtOCBieXRlIHNlcXVlbmNlIHRvIGEgY29kZXBv aW50IGFzIHNwZWNpZmllZCBpbg0KPiArICogaHR0cHM6Ly9kYXRhdHJhY2tlci5pZXRmLm9y Zy9kb2MvaHRtbC9yZmMzNjI5I3NlY3Rpb24tMyAuIFRoZSBmdW5jdGlvbg0KPiArICogZXhw ZWN0cyB0aGUgJ2J5dGVzJyBhcnJheSB0byBzdGFydCB3aXRoIHRoZSBsZWFkaW5nIGNoYXJh Y3Rlci4NCj4gKyAqLw0KPiArc3RhdGljIHRla2VuX2NoYXJfdA0KPiArdGVrZW5fdXRmOF9i eXRlc190b19jb2RlcG9pbnQodWludDhfdCBieXRlc1s0XSwgaW50IG5ieXRlcykNCj4gK3sN Cj4gKw0KPiArICAvKiBDaGVjayBmb3IgbWFsZm9ybWVkIGNoYXJhY3RlcnMuICovDQo+ICsg IGlmIChiaXRjb3VudChieXRlc1swXSAmIDB4ZjApICE9IG5ieXRlcykNCj4gKyAgICByZXR1 cm4gKFRFS0VOX1VURjhfSU5WQUxJRF9DT0RFUE9JTlQpOw0KPiArDQo+ICsgIHN3aXRjaCAo bmJ5dGVzKSB7DQo+ICsgIGNhc2UgMToNCj4gKyAgICByZXR1cm4gKGJ5dGVzWzBdICYgMHg3 Zik7DQo+ICsgIGNhc2UgMjoNCj4gKyAgICByZXR1cm4gKGJ5dGVzWzBdICYgMHhmKSA8PCA2 IHwgKGJ5dGVzWzFdICYgMHgzZik7DQo+ICsgIGNhc2UgMzoNCj4gKyAgICByZXR1cm4gKGJ5 dGVzWzBdICYgMHhmKSA8PCAxMiB8IChieXRlc1sxXSAmIDB4M2YpIDw8IDYgfCAoYnl0ZXNb Ml0gJiAweDNmKTsNCj4gKyAgY2FzZSA0Og0KPiArICAgIHJldHVybiAoYnl0ZXNbMF0gJiAw eDcpIDw8IDE4IHwgKGJ5dGVzWzFdICYgMHgzZikgPDwgMTIgfA0KPiArCShieXRlc1syXSAm IDB4M2YpIDw8IDYgfCAoYnl0ZXNbM10gJiAweDNmKTsNCj4gKyAgZGVmYXVsdDoNCj4gKyAg ICByZXR1cm4gKFRFS0VOX1VURjhfSU5WQUxJRF9DT0RFUE9JTlQpOw0KPiArICB9DQo+ICt9 DQo+IA0KDQotLSANClNpbmNlcmVseSwNCkRpbWEgKGZsdWZmeUBGcmVlQlNELm9yZywgaHR0 cHM6Ly90Lm1lL0ZsdWZmeUJTRCkNCihkZXNrdG9wLCBrZGUsIHgxMSwgb2ZmaWNlLCBwb3J0 cy1zZWN0ZWFtKUBGcmVlQlNEIHRlYW0NCg== --------------Vuuk9vmWgU0JvpFOp1Rm0g4s-- --------------gKOlBnU1tFebtn0FXPxvZfe0 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmUhx9MFAwAAAAAACgkQ+4ugndU5jykX lg/+Lx1ahUYMh47IRZfbLHaKGE7atCm9WZG/NJkwEltDxxUVl6Pmt9tcE/NXhP3Zecm/f3n/Xfgk 3+goYUJByvLYWfcmtX9C4fSb8k2bJFy0mLi8jk5kkaAfBrEcPfg3bb4jWOf5hddjiqogHWeN7wrN RDFpJTUO1KyjadJD3L5vV4Pyk0uL8t+mcvECI0tkFZpQreHBCtnnWt1f1RKm3kE9JYDxY08MFRuQ cWccUig3cxN06oK0aYBdf9BdptvoJ+V5MX7W2N1N5Bllyz3L5kV2qi03P5pETeMB8io4JqBY2j6p 4/bblYEySTzNBvoSc1/JHTDx88zwKr34Nh0BzP1BpNhUPMLIg28uvFqAtOQaTkvzEdR8tmAI7u7y 1Nof4KJKS4AnB+PXrEFUiRNXntTkx0DU4gnMlnqd9wcuQWT+BNYoW7BDjRdCTSPxRdBD29//XPGw P4OUnQEISlptpkVk/ng1PVw/UJfdt3D5Cq70BsxZKnk5DeMwAncMdVJnbW6FRc8+kpZP1TuQMxzv f6pIhldGUKr56ncnVoS+4u9ucBo50ce4ujqoeD7J/jvaQCt+xqNI3I5hJqcpm0kYpUqreUqERExj xQw/qczVsGl81NdlmxjtizXBS7ZDs6xoaY1M4G1N/MnMAGeCrqPe9jWhhR2BmyfZxtHxFEd6Y+lB 7J8= =qbbP -----END PGP SIGNATURE----- --------------gKOlBnU1tFebtn0FXPxvZfe0-- From nobody Sat Oct 7 21:36:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2zCJ3cNCz4wVCy; Sat, 7 Oct 2023 21:37:00 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2zCH3KNsz4ZJD; Sat, 7 Oct 2023 21:36:59 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=Or9pPaegt9hK8oZ 8GK2biAQsBQkyjqmFic+SaqPjMzs=; h=in-reply-to:references:subject:cc:to: from:date; d=margiolis.net; b=Y6hBLVi94plj7wOGbkpc3lfxoDSMAZVqzZXt773B JUavCLYm4EF81FAPPXOiFOr+y3y1h1C1i5pocrfswiip3tCplpDIJJAFv2Kewuj0h1HEv2 yErb78eeOEn+08pAVvb6zEmiEZsUw8JiQUKoZd0tn8PxfeEHyUR/RSTnCpVtM= Received: from pleb (ppp-94-66-59-115.home.otenet.gr [94.66.59.115]) by margiolis.net (OpenSMTPD) with ESMTPSA id 5b5587ea (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 7 Oct 2023 21:36:50 +0000 (UTC) Date: Sun, 8 Oct 2023 00:36:48 +0300 From: Christos Margiolis To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 9e589b093857 - main - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode Message-ID: References: <202310071800.397I0p9G047831@gitrepo.freebsd.org> <816f8408-865a-488f-a139-ad4bae2301fb@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <816f8408-865a-488f-a139-ad4bae2301fb@FreeBSD.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Queue-Id: 4S2zCH3KNsz4ZJD Dima Panov wrote: > It breaks the build %( > > > In file included from /usr/local/poudriere/jails/150aarch64/usr/src/sys/teken/teken.c:70: > /usr/local/poudriere/jails/150aarch64/usr/src/sys/teken/teken_wcwidth.h:132:7: error: call to undeclared function 'bitcount'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] > if (bitcount(bytes[0] & 0xf0) != nbytes) > ^ > 1 error generated. > *** [teken.o] Error code 1 The cross builds had succeeded on GitHub's Actions, our local machines and the FreeBSD cluster, so we thought it was good to go. Apparently, the code should call __bitcount() which is defined in sys/types.h (included in teken/teken.h), instead of bitcount(), which is defined in sys/libkern.h and is not included. I am pushing a fix right now. Unfortunately, since all the machines I keep trying to clean build on succeed, we'll have to wait for feedback again to be sure that the fix is working... Christos From nobody Sat Oct 7 21:37:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S2zCv1mjHz4wVNh; Sat, 7 Oct 2023 21:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S2zCv1Hhnz4ZVX; Sat, 7 Oct 2023 21:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696714651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y17bIXKOjibYNTp9AJothV1ySmNXV4SJ3uElbViNuOs=; b=IJc5aNjdw8i4bqSGQuQNO1+O4AExz8Z3vBb0hS4UpP4uBo6sXv0omrGkSEnhq65z0PFxHc wXkx3vpdtrFMIsU8Sv2MlVIk6KPnzzgpy/2v1tO0Hn2w0P6PUpHVlZLiph3xQxV+jQVM8b CM5dEwbxJ1HfUDKifN8C993LAsugCRN5+gzi0FVnja5/zKDsRHl+gqm0P+AODXYdj9Olmf /z1zgR0t8FWk3UB07iGoGaM7ayis9PN1OvdIVdS5sG8ZGOEV6TP5UbrJQnwJKXSJJMtoXE yw/4b94f5TtZQL4MQWanO0L+7k5RvFeD7ejaFkqyUr1D2qhxSeWA3LifcuXbRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696714651; a=rsa-sha256; cv=none; b=Kgkpd6tZi7Je8N785C3ve9e1U7/Akzt1THaWtodT6KZ4MArZLxkcDW7/bdrIUTYP1iHK84 fXWY5X0GK0A2dvPxJDLLuX7blo9iM04vNxMZUYvtPC+kML3nhRYadDV5Sdwmv1t3HLLp2g AHitqYsuy61DQmvrfLdKohE97I3alvGKFWbzVJ8i1ilOrg/6LggzpJF4NBYI6ke3zcxVLM 1AP0SG4HtiC1AQKItFf2CqgnpnTz3xxOaIRmqmudtKddAouwahpzIe9mEQPmIxLt7MLH3A posLYKZw7sD+lZrb/clcNIs06HeN6We/RiSI3HB4103ovvg0fo8JJROenEI/7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696714651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y17bIXKOjibYNTp9AJothV1ySmNXV4SJ3uElbViNuOs=; b=Qo0BdZHqdCoc1uFykjMffuDqI2X/xH98H1wijfDTO1MCfuVxZY6+3r0uBByL8k0Nn8vjEM HocXuC7JqDGgncib58dHnk1nS2aaEYqzdAp/bjk9PiUe8wPzvnixMC/4ixuTWuYXPh2PX3 RstabaPwc7jSVB444vv7ateWlOWpnYOSNdNhcpRI+dqGeAKLx4OXJEV0H5+BrSApoSoAIE ibeomzuxau6saQ7I784hVj0Bp4H+UEtWdS2vHudkDkkNWvBGQqf1yAgCCFcwOmtcSOHRoP ElrTQ0khaNZbCHSqeba33KHVHlVTodH2Y19PxNBAsc2Z7EG43iuhUG5PogG3hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S2zCv0M5LzmrZ; Sat, 7 Oct 2023 21:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397LbUIG007725; Sat, 7 Oct 2023 21:37:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397LbUCU007722; Sat, 7 Oct 2023 21:37:30 GMT (envelope-from git) Date: Sat, 7 Oct 2023 21:37:30 GMT Message-Id: <202310072137.397LbUCU007722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 6d3296f16a06 - main - teken: use __bitcount() instead of bitcount() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d3296f16a06bcaa49918799e683936711dcf9c9 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6d3296f16a06bcaa49918799e683936711dcf9c9 commit 6d3296f16a06bcaa49918799e683936711dcf9c9 Author: Christos Margiolis AuthorDate: 2023-10-07 21:36:59 +0000 Commit: Christos Margiolis CommitDate: 2023-10-07 21:36:59 +0000 teken: use __bitcount() instead of bitcount() The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is included in teken/teken.h. MFC after: 2 weeks --- sys/teken/teken_wcwidth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f5a23dbc9679..bc992e1ef5d8 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -129,7 +129,7 @@ teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { /* Check for malformed characters. */ - if (bitcount(bytes[0] & 0xf0) != nbytes) + if (__bitcount(bytes[0] & 0xf0) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { From nobody Sat Oct 7 22:47:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S30mn1v04z4wj1y; Sat, 7 Oct 2023 22:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S30mn1RMxz3G7W; Sat, 7 Oct 2023 22:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696718857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4J2ZmykaOeT6VGUeQtpobkE0UrQQwfGnEDqNVkhbEHw=; b=lzrKCcxg7o40C+zOXUGrNfYEQhMCTCyLAYwZeUJIL63GhYp8FrhIoAJbK/hkX6Itdp28dM auD7hl0ZU6Z7QvudXWieWy2Vk0GzInybUw4PMh5lSoysIXtXKSc2pa8cV6fS0XYNHCWeo+ b2ZjjdTN3zKX/eBNx+tQw3+3Ld0k2jGGCl/BT980MnY2I0gpfK4xYABmSIgDCDX0hfHwxk yn6+37gLEaVlv16XCN3T+eRUJzF4KvnHUBvAirXWynKK89J8I4CTh64i9YA1p3vu+sfw4Q a7t0jku5OUF21zMAAZYXfvevWwJQmi0il1OsTKnLvkUQwxnzq2EZ7Snfe4WBww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696718857; a=rsa-sha256; cv=none; b=J0pGgAKXCRrRYvxgHA7tz5Rw294xWPgVgFDXIa81qJTIBiXMvR1V1+JnLLfsLb9kidPq+Z KYjnfvwDD/SMvQZPXJrOrSgKFcvBBXD4yzfUkWdxyIkPaz2JJdXW5wufzFp2/b1w90cNqa kFEUybG0iWUGgLpAynlXc4i86jdniK8DpHzhs2eto+Ssx+wwPbUtv3hjfXq03tWM/ZPDxZ GmtSZxyFmiTCzX5B8XXWXjaGCV+1OHuYX6UZJgS2AVDFhv3SLa9aBZPNrDB18ce5+2I5fA EC1Djx8vosYWE1mc4M1b3z6wZYikLYjMf4ij0O4Bd+f8rOU8+MHBAW0nCCBpMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696718857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4J2ZmykaOeT6VGUeQtpobkE0UrQQwfGnEDqNVkhbEHw=; b=VOjaZP7qMeR0ozOpX6aLpfeuL45GVblKTO59X8Q/H2ik+xgmuYEV1ugNLaU33A+OqthPUh mz0KKdeo4uP97J/5PYVYM9O3uYTFmW/XQnCi4puZ7/i20wwS6Een8XVGPoIUP5sp+AkU6a m/vWajx3IVKtzg1Vh6GEYw1RexMAod5mY51j2pXggss2Sa//sTX0eBBmrzIhReBtqWQGdM iwotl4yQG7j6Bt+rZOuENw4XAHa+u+UnupU9DcMCqm5DlX5h+vuE8oxFBRPs5N+SFU57cu QIm/5wG4LhYniljK1bUAGMTkKRz9xrgl04YmHeNMzpKi08ADbpaaesVHHB21tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S30mn0NWbzpny; Sat, 7 Oct 2023 22:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 397Mlalk024077; Sat, 7 Oct 2023 22:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 397MlaNt024074; Sat, 7 Oct 2023 22:47:36 GMT (envelope-from git) Date: Sat, 7 Oct 2023 22:47:36 GMT Message-Id: <202310072247.397MlaNt024074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Danilo G. Baio" Subject: git: 04c8bfc17610 - main - jexec.8: Add examples section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dbaio X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04c8bfc1761010c36081cf300fa751548d541122 Auto-Submitted: auto-generated The branch main has been updated by dbaio: URL: https://cgit.FreeBSD.org/src/commit/?id=04c8bfc1761010c36081cf300fa751548d541122 commit 04c8bfc1761010c36081cf300fa751548d541122 Author: Danilo G. Baio AuthorDate: 2023-10-07 22:44:44 +0000 Commit: Danilo G. Baio CommitDate: 2023-10-07 22:44:44 +0000 jexec.8: Add examples section MFC after: 3 days Reviewed by: gbe, 0mp, danfe, pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D40831 --- usr.sbin/jexec/jexec.8 | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/usr.sbin/jexec/jexec.8 b/usr.sbin/jexec/jexec.8 index 69f380676c30..4400cbbe56a3 100644 --- a/usr.sbin/jexec/jexec.8 +++ b/usr.sbin/jexec/jexec.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 24, 2016 +.Dd October 7, 2023 .Dt JEXEC 8 .Os .Sh NAME @@ -65,6 +65,44 @@ The user name from jailed environment as whom the .Ar command should run. .El +.Sh EXAMPLES +.Ss Example 1 : Open a shell in a jail +The following command specifies a jail by its name and utilizes the current +user's shell: +.Pp +.Dl # jexec name +.Pp +It is also possible to specify a jail by its jid: +.Pp +.Dl # jexec JID +.Ss Example 2 : Run a single command without opening a shell +The following command runs +.Ql uname -a +in a jail called +.Dq name . +Since a command is specified explicitly, +.Nm +does not spawn an interactive shell. +Instead, +.Nm +executes the specified command directly. +.Pp +.Dl # jexec name uname -a +.Ss Example 3 : Open a shell in a jail with a clean environment +The following command opens a +.Xr sh 1 +shell in a jail with a clean environment: +.Pp +.Dl # jexec -l name sh +.Ss Example 4 : Open a shell in a jail with the login command +The following command utilizes +.Xr login 1 +to access the jail, submitting an audit record, and displaying the +user's last login, system copyright, and +.Xr motd 5 +message: +.Pp +.Dl # jexec -l name login -f root .Sh SEE ALSO .Xr jail_attach 2 , .Xr jail 8 ,